nfets 0.0.16 → 0.0.18

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.
@@ -0,0 +1,259 @@
1
+ import{a as o,b as Xe,d as Z,f as Yx}from"./chunk-W6MRGYXP.mjs";var $t=Z((Dpe,OO)=>{"use strict";OO.exports={options:{usePureJavaScript:!1}}});var VO=Z((Rpe,LO)=>{"use strict";var k2={};LO.exports=k2;var kO={};k2.encode=function(r,e,t){if(typeof e!="string")throw new TypeError('"alphabet" must be a string.');if(t!==void 0&&typeof t!="number")throw new TypeError('"maxline" must be a number.');var n="";if(!(r instanceof Uint8Array))n=Ez(r,e);else{var s=0,i=e.length,a=e.charAt(0),u=[0];for(s=0;s<r.length;++s){for(var c=0,f=r[s];c<u.length;++c)f+=u[c]<<8,u[c]=f%i,f=f/i|0;for(;f>0;)u.push(f%i),f=f/i|0}for(s=0;r[s]===0&&s<r.length-1;++s)n+=a;for(s=u.length-1;s>=0;--s)n+=e[u[s]]}if(t){var h=new RegExp(".{1,"+t+"}","g");n=n.match(h).join(`\r
2
+ `)}return n};k2.decode=function(r,e){if(typeof r!="string")throw new TypeError('"input" must be a string.');if(typeof e!="string")throw new TypeError('"alphabet" must be a string.');var t=kO[e];if(!t){t=kO[e]=[];for(var n=0;n<e.length;++n)t[e.charCodeAt(n)]=n}r=r.replace(/\s/g,"");for(var s=e.length,i=e.charAt(0),a=[0],n=0;n<r.length;n++){var u=t[r.charCodeAt(n)];if(u===void 0)return;for(var c=0,f=u;c<a.length;++c)f+=a[c]*s,a[c]=f&255,f>>=8;for(;f>0;)a.push(f&255),f>>=8}for(var h=0;r[h]===i&&h<r.length-1;++h)a.push(0);return typeof Buffer<"u"?Buffer.from(a.reverse()):new Uint8Array(a.reverse())};function Ez(r,e){var t=0,n=e.length,s=e.charAt(0),i=[0];for(t=0;t<r.length();++t){for(var a=0,u=r.at(t);a<i.length;++a)u+=i[a]<<8,i[a]=u%n,u=u/n|0;for(;u>0;)i.push(u%n),u=u/n|0}var c="";for(t=0;r.at(t)===0&&t<r.length()-1;++t)c+=s;for(t=i.length-1;t>=0;--t)c+=e[i[t]];return c}o(Ez,"_encodeWithByteBuffer")});var lr=Z((Ope,FO)=>{"use strict";var UO=$t(),jO=VO(),ne=FO.exports=UO.util=UO.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){ne.nextTick=process.nextTick,typeof setImmediate=="function"?ne.setImmediate=setImmediate:ne.setImmediate=ne.nextTick;return}if(typeof setImmediate=="function"){ne.setImmediate=function(){return setImmediate.apply(void 0,arguments)},ne.nextTick=function(u){return setImmediate(u)};return}if(ne.setImmediate=function(u){setTimeout(u,0)},typeof window<"u"&&typeof window.postMessage=="function"){let u=function(c){if(c.source===window&&c.data===r){c.stopPropagation();var f=e.slice();e.length=0,f.forEach(function(h){h()})}};var a=u;o(u,"handler");var r="forge.setImmediate",e=[];ne.setImmediate=function(c){e.push(c),e.length===1&&window.postMessage(r,"*")},window.addEventListener("message",u,!0)}if(typeof MutationObserver<"u"){var t=Date.now(),n=!0,s=document.createElement("div"),e=[];new MutationObserver(function(){var c=e.slice();e.length=0,c.forEach(function(f){f()})}).observe(s,{attributes:!0});var i=ne.setImmediate;ne.setImmediate=function(c){Date.now()-t>15?(t=Date.now(),i(c)):(e.push(c),e.length===1&&s.setAttribute("a",n=!n))}}ne.nextTick=ne.setImmediate})();ne.isNodejs=typeof process<"u"&&process.versions&&process.versions.node;ne.globalScope=(function(){return ne.isNodejs?global:typeof self>"u"?window:self})();ne.isArray=Array.isArray||function(r){return Object.prototype.toString.call(r)==="[object Array]"};ne.isArrayBuffer=function(r){return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer};ne.isArrayBufferView=function(r){return r&&ne.isArrayBuffer(r.buffer)&&r.byteLength!==void 0};function X0(r){if(!(r===8||r===16||r===24||r===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+r)}o(X0,"_checkBitsParam");ne.ByteBuffer=L2;function L2(r){if(this.data="",this.read=0,typeof r=="string")this.data=r;else if(ne.isArrayBuffer(r)||ne.isArrayBufferView(r))if(typeof Buffer<"u"&&r instanceof Buffer)this.data=r.toString("binary");else{var e=new Uint8Array(r);try{this.data=String.fromCharCode.apply(null,e)}catch{for(var t=0;t<e.length;++t)this.putByte(e[t])}}else(r instanceof L2||typeof r=="object"&&typeof r.data=="string"&&typeof r.read=="number")&&(this.data=r.data,this.read=r.read);this._constructedStringLength=0}o(L2,"ByteStringBuffer");ne.ByteStringBuffer=L2;var Az=4096;ne.ByteStringBuffer.prototype._optimizeConstructedString=function(r){this._constructedStringLength+=r,this._constructedStringLength>Az&&(this.data.substr(0,1),this._constructedStringLength=0)};ne.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};ne.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};ne.ByteStringBuffer.prototype.putByte=function(r){return this.putBytes(String.fromCharCode(r))};ne.ByteStringBuffer.prototype.fillWithByte=function(r,e){r=String.fromCharCode(r);for(var t=this.data;e>0;)e&1&&(t+=r),e>>>=1,e>0&&(r+=r);return this.data=t,this._optimizeConstructedString(e),this};ne.ByteStringBuffer.prototype.putBytes=function(r){return this.data+=r,this._optimizeConstructedString(r.length),this};ne.ByteStringBuffer.prototype.putString=function(r){return this.putBytes(ne.encodeUtf8(r))};ne.ByteStringBuffer.prototype.putInt16=function(r){return this.putBytes(String.fromCharCode(r>>8&255)+String.fromCharCode(r&255))};ne.ByteStringBuffer.prototype.putInt24=function(r){return this.putBytes(String.fromCharCode(r>>16&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(r&255))};ne.ByteStringBuffer.prototype.putInt32=function(r){return this.putBytes(String.fromCharCode(r>>24&255)+String.fromCharCode(r>>16&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(r&255))};ne.ByteStringBuffer.prototype.putInt16Le=function(r){return this.putBytes(String.fromCharCode(r&255)+String.fromCharCode(r>>8&255))};ne.ByteStringBuffer.prototype.putInt24Le=function(r){return this.putBytes(String.fromCharCode(r&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(r>>16&255))};ne.ByteStringBuffer.prototype.putInt32Le=function(r){return this.putBytes(String.fromCharCode(r&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(r>>16&255)+String.fromCharCode(r>>24&255))};ne.ByteStringBuffer.prototype.putInt=function(r,e){X0(e);var t="";do e-=8,t+=String.fromCharCode(r>>e&255);while(e>0);return this.putBytes(t)};ne.ByteStringBuffer.prototype.putSignedInt=function(r,e){return r<0&&(r+=2<<e-1),this.putInt(r,e)};ne.ByteStringBuffer.prototype.putBuffer=function(r){return this.putBytes(r.getBytes())};ne.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};ne.ByteStringBuffer.prototype.getInt16=function(){var r=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,r};ne.ByteStringBuffer.prototype.getInt24=function(){var r=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,r};ne.ByteStringBuffer.prototype.getInt32=function(){var r=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,r};ne.ByteStringBuffer.prototype.getInt16Le=function(){var r=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,r};ne.ByteStringBuffer.prototype.getInt24Le=function(){var r=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,r};ne.ByteStringBuffer.prototype.getInt32Le=function(){var r=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,r};ne.ByteStringBuffer.prototype.getInt=function(r){X0(r);var e=0;do e=(e<<8)+this.data.charCodeAt(this.read++),r-=8;while(r>0);return e};ne.ByteStringBuffer.prototype.getSignedInt=function(r){var e=this.getInt(r),t=2<<r-2;return e>=t&&(e-=t<<1),e};ne.ByteStringBuffer.prototype.getBytes=function(r){var e;return r?(r=Math.min(this.length(),r),e=this.data.slice(this.read,this.read+r),this.read+=r):r===0?e="":(e=this.read===0?this.data:this.data.slice(this.read),this.clear()),e};ne.ByteStringBuffer.prototype.bytes=function(r){return typeof r>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+r)};ne.ByteStringBuffer.prototype.at=function(r){return this.data.charCodeAt(this.read+r)};ne.ByteStringBuffer.prototype.setAt=function(r,e){return this.data=this.data.substr(0,this.read+r)+String.fromCharCode(e)+this.data.substr(this.read+r+1),this};ne.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};ne.ByteStringBuffer.prototype.copy=function(){var r=ne.createBuffer(this.data);return r.read=this.read,r};ne.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this};ne.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};ne.ByteStringBuffer.prototype.truncate=function(r){var e=Math.max(0,this.length()-r);return this.data=this.data.substr(this.read,e),this.read=0,this};ne.ByteStringBuffer.prototype.toHex=function(){for(var r="",e=this.read;e<this.data.length;++e){var t=this.data.charCodeAt(e);t<16&&(r+="0"),r+=t.toString(16)}return r};ne.ByteStringBuffer.prototype.toString=function(){return ne.decodeUtf8(this.bytes())};function Cz(r,e){e=e||{},this.read=e.readOffset||0,this.growSize=e.growSize||1024;var t=ne.isArrayBuffer(r),n=ne.isArrayBufferView(r);if(t||n){t?this.data=new DataView(r):this.data=new DataView(r.buffer,r.byteOffset,r.byteLength),this.write="writeOffset"in e?e.writeOffset:this.data.byteLength;return}this.data=new DataView(new ArrayBuffer(0)),this.write=0,r!=null&&this.putBytes(r),"writeOffset"in e&&(this.write=e.writeOffset)}o(Cz,"DataBuffer");ne.DataBuffer=Cz;ne.DataBuffer.prototype.length=function(){return this.write-this.read};ne.DataBuffer.prototype.isEmpty=function(){return this.length()<=0};ne.DataBuffer.prototype.accommodate=function(r,e){if(this.length()>=r)return this;e=Math.max(e||this.growSize,r);var t=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+e);return n.set(t),this.data=new DataView(n.buffer),this};ne.DataBuffer.prototype.putByte=function(r){return this.accommodate(1),this.data.setUint8(this.write++,r),this};ne.DataBuffer.prototype.fillWithByte=function(r,e){this.accommodate(e);for(var t=0;t<e;++t)this.data.setUint8(r);return this};ne.DataBuffer.prototype.putBytes=function(r,e){if(ne.isArrayBufferView(r)){var t=new Uint8Array(r.buffer,r.byteOffset,r.byteLength),n=t.byteLength-t.byteOffset;this.accommodate(n);var s=new Uint8Array(this.data.buffer,this.write);return s.set(t),this.write+=n,this}if(ne.isArrayBuffer(r)){var t=new Uint8Array(r);this.accommodate(t.byteLength);var s=new Uint8Array(this.data.buffer);return s.set(t,this.write),this.write+=t.byteLength,this}if(r instanceof ne.DataBuffer||typeof r=="object"&&typeof r.read=="number"&&typeof r.write=="number"&&ne.isArrayBufferView(r.data)){var t=new Uint8Array(r.data.byteLength,r.read,r.length());this.accommodate(t.byteLength);var s=new Uint8Array(r.data.byteLength,this.write);return s.set(t),this.write+=t.byteLength,this}if(r instanceof ne.ByteStringBuffer&&(r=r.data,e="binary"),e=e||"binary",typeof r=="string"){var i;if(e==="hex")return this.accommodate(Math.ceil(r.length/2)),i=new Uint8Array(this.data.buffer,this.write),this.write+=ne.binary.hex.decode(r,i,this.write),this;if(e==="base64")return this.accommodate(Math.ceil(r.length/4)*3),i=new Uint8Array(this.data.buffer,this.write),this.write+=ne.binary.base64.decode(r,i,this.write),this;if(e==="utf8"&&(r=ne.encodeUtf8(r),e="binary"),e==="binary"||e==="raw")return this.accommodate(r.length),i=new Uint8Array(this.data.buffer,this.write),this.write+=ne.binary.raw.decode(i),this;if(e==="utf16")return this.accommodate(r.length*2),i=new Uint16Array(this.data.buffer,this.write),this.write+=ne.text.utf16.encode(i),this;throw new Error("Invalid encoding: "+e)}throw Error("Invalid parameter: "+r)};ne.DataBuffer.prototype.putBuffer=function(r){return this.putBytes(r),r.clear(),this};ne.DataBuffer.prototype.putString=function(r){return this.putBytes(r,"utf16")};ne.DataBuffer.prototype.putInt16=function(r){return this.accommodate(2),this.data.setInt16(this.write,r),this.write+=2,this};ne.DataBuffer.prototype.putInt24=function(r){return this.accommodate(3),this.data.setInt16(this.write,r>>8&65535),this.data.setInt8(this.write,r>>16&255),this.write+=3,this};ne.DataBuffer.prototype.putInt32=function(r){return this.accommodate(4),this.data.setInt32(this.write,r),this.write+=4,this};ne.DataBuffer.prototype.putInt16Le=function(r){return this.accommodate(2),this.data.setInt16(this.write,r,!0),this.write+=2,this};ne.DataBuffer.prototype.putInt24Le=function(r){return this.accommodate(3),this.data.setInt8(this.write,r>>16&255),this.data.setInt16(this.write,r>>8&65535,!0),this.write+=3,this};ne.DataBuffer.prototype.putInt32Le=function(r){return this.accommodate(4),this.data.setInt32(this.write,r,!0),this.write+=4,this};ne.DataBuffer.prototype.putInt=function(r,e){X0(e),this.accommodate(e/8);do e-=8,this.data.setInt8(this.write++,r>>e&255);while(e>0);return this};ne.DataBuffer.prototype.putSignedInt=function(r,e){return X0(e),this.accommodate(e/8),r<0&&(r+=2<<e-1),this.putInt(r,e)};ne.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};ne.DataBuffer.prototype.getInt16=function(){var r=this.data.getInt16(this.read);return this.read+=2,r};ne.DataBuffer.prototype.getInt24=function(){var r=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,r};ne.DataBuffer.prototype.getInt32=function(){var r=this.data.getInt32(this.read);return this.read+=4,r};ne.DataBuffer.prototype.getInt16Le=function(){var r=this.data.getInt16(this.read,!0);return this.read+=2,r};ne.DataBuffer.prototype.getInt24Le=function(){var r=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,r};ne.DataBuffer.prototype.getInt32Le=function(){var r=this.data.getInt32(this.read,!0);return this.read+=4,r};ne.DataBuffer.prototype.getInt=function(r){X0(r);var e=0;do e=(e<<8)+this.data.getInt8(this.read++),r-=8;while(r>0);return e};ne.DataBuffer.prototype.getSignedInt=function(r){var e=this.getInt(r),t=2<<r-2;return e>=t&&(e-=t<<1),e};ne.DataBuffer.prototype.getBytes=function(r){var e;return r?(r=Math.min(this.length(),r),e=this.data.slice(this.read,this.read+r),this.read+=r):r===0?e="":(e=this.read===0?this.data:this.data.slice(this.read),this.clear()),e};ne.DataBuffer.prototype.bytes=function(r){return typeof r>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+r)};ne.DataBuffer.prototype.at=function(r){return this.data.getUint8(this.read+r)};ne.DataBuffer.prototype.setAt=function(r,e){return this.data.setUint8(r,e),this};ne.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};ne.DataBuffer.prototype.copy=function(){return new ne.DataBuffer(this)};ne.DataBuffer.prototype.compact=function(){if(this.read>0){var r=new Uint8Array(this.data.buffer,this.read),e=new Uint8Array(r.byteLength);e.set(r),this.data=new DataView(e),this.write-=this.read,this.read=0}return this};ne.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this};ne.DataBuffer.prototype.truncate=function(r){return this.write=Math.max(0,this.length()-r),this.read=Math.min(this.read,this.write),this};ne.DataBuffer.prototype.toHex=function(){for(var r="",e=this.read;e<this.data.byteLength;++e){var t=this.data.getUint8(e);t<16&&(r+="0"),r+=t.toString(16)}return r};ne.DataBuffer.prototype.toString=function(r){var e=new Uint8Array(this.data,this.read,this.length());if(r=r||"utf8",r==="binary"||r==="raw")return ne.binary.raw.encode(e);if(r==="hex")return ne.binary.hex.encode(e);if(r==="base64")return ne.binary.base64.encode(e);if(r==="utf8")return ne.text.utf8.decode(e);if(r==="utf16")return ne.text.utf16.decode(e);throw new Error("Invalid encoding: "+r)};ne.createBuffer=function(r,e){return e=e||"raw",r!==void 0&&e==="utf8"&&(r=ne.encodeUtf8(r)),new ne.ByteBuffer(r)};ne.fillString=function(r,e){for(var t="";e>0;)e&1&&(t+=r),e>>>=1,e>0&&(r+=r);return t};ne.xorBytes=function(r,e,t){for(var n="",s="",i="",a=0,u=0;t>0;--t,++a)s=r.charCodeAt(a)^e.charCodeAt(a),u>=10&&(n+=i,i="",u=0),i+=String.fromCharCode(s),++u;return n+=i,n};ne.hexToBytes=function(r){var e="",t=0;for(r.length&!0&&(t=1,e+=String.fromCharCode(parseInt(r[0],16)));t<r.length;t+=2)e+=String.fromCharCode(parseInt(r.substr(t,2),16));return e};ne.bytesToHex=function(r){return ne.createBuffer(r).toHex()};ne.int32ToBytes=function(r){return String.fromCharCode(r>>24&255)+String.fromCharCode(r>>16&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(r&255)};var Du="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Ru=[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],MO="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";ne.encode64=function(r,e){for(var t="",n="",s,i,a,u=0;u<r.length;)s=r.charCodeAt(u++),i=r.charCodeAt(u++),a=r.charCodeAt(u++),t+=Du.charAt(s>>2),t+=Du.charAt((s&3)<<4|i>>4),isNaN(i)?t+="==":(t+=Du.charAt((i&15)<<2|a>>6),t+=isNaN(a)?"=":Du.charAt(a&63)),e&&t.length>e&&(n+=t.substr(0,e)+`\r
3
+ `,t=t.substr(e));return n+=t,n};ne.decode64=function(r){r=r.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var e="",t,n,s,i,a=0;a<r.length;)t=Ru[r.charCodeAt(a++)-43],n=Ru[r.charCodeAt(a++)-43],s=Ru[r.charCodeAt(a++)-43],i=Ru[r.charCodeAt(a++)-43],e+=String.fromCharCode(t<<2|n>>4),s!==64&&(e+=String.fromCharCode((n&15)<<4|s>>2),i!==64&&(e+=String.fromCharCode((s&3)<<6|i)));return e};ne.encodeUtf8=function(r){return unescape(encodeURIComponent(r))};ne.decodeUtf8=function(r){return decodeURIComponent(escape(r))};ne.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:jO.encode,decode:jO.decode}};ne.binary.raw.encode=function(r){return String.fromCharCode.apply(null,r)};ne.binary.raw.decode=function(r,e,t){var n=e;n||(n=new Uint8Array(r.length)),t=t||0;for(var s=t,i=0;i<r.length;++i)n[s++]=r.charCodeAt(i);return e?s-t:n};ne.binary.hex.encode=ne.bytesToHex;ne.binary.hex.decode=function(r,e,t){var n=e;n||(n=new Uint8Array(Math.ceil(r.length/2))),t=t||0;var s=0,i=t;for(r.length&1&&(s=1,n[i++]=parseInt(r[0],16));s<r.length;s+=2)n[i++]=parseInt(r.substr(s,2),16);return e?i-t:n};ne.binary.base64.encode=function(r,e){for(var t="",n="",s,i,a,u=0;u<r.byteLength;)s=r[u++],i=r[u++],a=r[u++],t+=Du.charAt(s>>2),t+=Du.charAt((s&3)<<4|i>>4),isNaN(i)?t+="==":(t+=Du.charAt((i&15)<<2|a>>6),t+=isNaN(a)?"=":Du.charAt(a&63)),e&&t.length>e&&(n+=t.substr(0,e)+`\r
4
+ `,t=t.substr(e));return n+=t,n};ne.binary.base64.decode=function(r,e,t){var n=e;n||(n=new Uint8Array(Math.ceil(r.length/4)*3)),r=r.replace(/[^A-Za-z0-9\+\/\=]/g,""),t=t||0;for(var s,i,a,u,c=0,f=t;c<r.length;)s=Ru[r.charCodeAt(c++)-43],i=Ru[r.charCodeAt(c++)-43],a=Ru[r.charCodeAt(c++)-43],u=Ru[r.charCodeAt(c++)-43],n[f++]=s<<2|i>>4,a!==64&&(n[f++]=(i&15)<<4|a>>2,u!==64&&(n[f++]=(a&3)<<6|u));return e?f-t:n.subarray(0,f)};ne.binary.base58.encode=function(r,e){return ne.binary.baseN.encode(r,MO,e)};ne.binary.base58.decode=function(r,e){return ne.binary.baseN.decode(r,MO,e)};ne.text={utf8:{},utf16:{}};ne.text.utf8.encode=function(r,e,t){r=ne.encodeUtf8(r);var n=e;n||(n=new Uint8Array(r.length)),t=t||0;for(var s=t,i=0;i<r.length;++i)n[s++]=r.charCodeAt(i);return e?s-t:n};ne.text.utf8.decode=function(r){return ne.decodeUtf8(String.fromCharCode.apply(null,r))};ne.text.utf16.encode=function(r,e,t){var n=e;n||(n=new Uint8Array(r.length*2));var s=new Uint16Array(n.buffer);t=t||0;for(var i=t,a=t,u=0;u<r.length;++u)s[a++]=r.charCodeAt(u),i+=2;return e?i-t:n};ne.text.utf16.decode=function(r){return String.fromCharCode.apply(null,new Uint16Array(r.buffer))};ne.deflate=function(r,e,t){if(e=ne.decode64(r.deflate(ne.encode64(e)).rval),t){var n=2,s=e.charCodeAt(1);s&32&&(n=6),e=e.substring(n,e.length-4)}return e};ne.inflate=function(r,e,t){var n=r.inflate(ne.encode64(e)).rval;return n===null?null:ne.decode64(n)};var V2=o(function(r,e,t){if(!r)throw new Error("WebStorage not available.");var n;if(t===null?n=r.removeItem(e):(t=ne.encode64(JSON.stringify(t)),n=r.setItem(e,t)),typeof n<"u"&&n.rval!==!0){var s=new Error(n.error.message);throw s.id=n.error.id,s.name=n.error.name,s}},"_setStorageObject"),U2=o(function(r,e){if(!r)throw new Error("WebStorage not available.");var t=r.getItem(e);if(r.init)if(t.rval===null){if(t.error){var n=new Error(t.error.message);throw n.id=t.error.id,n.name=t.error.name,n}t=null}else t=t.rval;return t!==null&&(t=JSON.parse(ne.decode64(t))),t},"_getStorageObject"),Nz=o(function(r,e,t,n){var s=U2(r,e);s===null&&(s={}),s[t]=n,V2(r,e,s)},"_setItem"),Tz=o(function(r,e,t){var n=U2(r,e);return n!==null&&(n=t in n?n[t]:null),n},"_getItem"),Iz=o(function(r,e,t){var n=U2(r,e);if(n!==null&&t in n){delete n[t];var s=!0;for(var i in n){s=!1;break}s&&(n=null),V2(r,e,n)}},"_removeItem"),_z=o(function(r,e){V2(r,e,null)},"_clearItems"),cw=o(function(r,e,t){var n=null;typeof t>"u"&&(t=["web","flash"]);var s,i=!1,a=null;for(var u in t){s=t[u];try{if(s==="flash"||s==="both"){if(e[0]===null)throw new Error("Flash local storage not available.");n=r.apply(this,e),i=s==="flash"}(s==="web"||s==="both")&&(e[0]=localStorage,n=r.apply(this,e),i=!0)}catch(c){a=c}if(i)break}if(!i)throw a;return n},"_callStorageFunction");ne.setItem=function(r,e,t,n,s){cw(Nz,arguments,s)};ne.getItem=function(r,e,t,n){return cw(Tz,arguments,n)};ne.removeItem=function(r,e,t,n){cw(Iz,arguments,n)};ne.clearItems=function(r,e,t){cw(_z,arguments,t)};ne.isEmpty=function(r){for(var e in r)if(r.hasOwnProperty(e))return!1;return!0};ne.format=function(r){for(var e=/%./g,t,n,s=0,i=[],a=0;t=e.exec(r);){n=r.substring(a,e.lastIndex-2),n.length>0&&i.push(n),a=e.lastIndex;var u=t[0][1];switch(u){case"s":case"o":s<arguments.length?i.push(arguments[s+++1]):i.push("<?>");break;case"%":i.push("%");break;default:i.push("<%"+u+"?>")}}return i.push(r.substring(a)),i.join("")};ne.formatNumber=function(r,e,t,n){var s=r,i=isNaN(e=Math.abs(e))?2:e,a=t===void 0?",":t,u=n===void 0?".":n,c=s<0?"-":"",f=parseInt(s=Math.abs(+s||0).toFixed(i),10)+"",h=f.length>3?f.length%3:0;return c+(h?f.substr(0,h)+u:"")+f.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+u)+(i?a+Math.abs(s-f).toFixed(i).slice(2):"")};ne.formatSize=function(r){return r>=1073741824?r=ne.formatNumber(r/1073741824,2,".","")+" GiB":r>=1048576?r=ne.formatNumber(r/1048576,2,".","")+" MiB":r>=1024?r=ne.formatNumber(r/1024,0)+" KiB":r=ne.formatNumber(r,0)+" bytes",r};ne.bytesFromIP=function(r){return r.indexOf(".")!==-1?ne.bytesFromIPv4(r):r.indexOf(":")!==-1?ne.bytesFromIPv6(r):null};ne.bytesFromIPv4=function(r){if(r=r.split("."),r.length!==4)return null;for(var e=ne.createBuffer(),t=0;t<r.length;++t){var n=parseInt(r[t],10);if(isNaN(n))return null;e.putByte(n)}return e.getBytes()};ne.bytesFromIPv6=function(r){var e=0;r=r.split(":").filter(function(a){return a.length===0&&++e,!0});for(var t=(8-r.length+e)*2,n=ne.createBuffer(),s=0;s<8;++s){if(!r[s]||r[s].length===0){n.fillWithByte(0,t),t=0;continue}var i=ne.hexToBytes(r[s]);i.length<2&&n.putByte(0),n.putBytes(i)}return n.getBytes()};ne.bytesToIP=function(r){return r.length===4?ne.bytesToIPv4(r):r.length===16?ne.bytesToIPv6(r):null};ne.bytesToIPv4=function(r){if(r.length!==4)return null;for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t));return e.join(".")};ne.bytesToIPv6=function(r){if(r.length!==16)return null;for(var e=[],t=[],n=0,s=0;s<r.length;s+=2){for(var i=ne.bytesToHex(r[s]+r[s+1]);i[0]==="0"&&i!=="0";)i=i.substr(1);if(i==="0"){var a=t[t.length-1],u=e.length;!a||u!==a.end+1?t.push({start:u,end:u}):(a.end=u,a.end-a.start>t[n].end-t[n].start&&(n=t.length-1))}e.push(i)}if(t.length>0){var c=t[n];c.end-c.start>0&&(e.splice(c.start,c.end-c.start+1,""),c.start===0&&e.unshift(""),c.end===7&&e.push(""))}return e.join(":")};ne.estimateCores=function(r,e){if(typeof r=="function"&&(e=r,r={}),r=r||{},"cores"in ne&&!r.update)return e(null,ne.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return ne.cores=navigator.hardwareConcurrency,e(null,ne.cores);if(typeof Worker>"u")return ne.cores=1,e(null,ne.cores);if(typeof Blob>"u")return ne.cores=2,e(null,ne.cores);var t=URL.createObjectURL(new Blob(["(",(function(){self.addEventListener("message",function(a){for(var u=Date.now(),c=u+4;Date.now()<c;);self.postMessage({st:u,et:c})})}).toString(),")()"],{type:"application/javascript"}));n([],5,16);function n(a,u,c){if(u===0){var f=Math.floor(a.reduce(function(h,m){return h+m},0)/a.length);return ne.cores=Math.max(1,f),URL.revokeObjectURL(t),e(null,ne.cores)}s(c,function(h,m){a.push(i(c,m)),n(a,u-1,c)})}o(n,"sample");function s(a,u){for(var c=[],f=[],h=0;h<a;++h){var m=new Worker(t);m.addEventListener("message",function(g){if(f.push(g.data),f.length===a){for(var x=0;x<a;++x)c[x].terminate();u(null,f)}}),c.push(m)}for(var h=0;h<a;++h)c[h].postMessage(h)}o(s,"map");function i(a,u){for(var c=[],f=0;f<a;++f)for(var h=u[f],m=c[f]=[],g=0;g<a;++g)if(f!==g){var x=u[g];(h.st>x.st&&h.st<x.et||x.st>h.st&&x.st<h.et)&&m.push(g)}return c.reduce(function(v,w){return Math.max(v,w.length)},0)}o(i,"reduce")}});var lw=Z((Lpe,qO)=>{"use strict";var Tn=$t();lr();qO.exports=Tn.cipher=Tn.cipher||{};Tn.cipher.algorithms=Tn.cipher.algorithms||{};Tn.cipher.createCipher=function(r,e){var t=r;if(typeof t=="string"&&(t=Tn.cipher.getAlgorithm(t),t&&(t=t())),!t)throw new Error("Unsupported algorithm: "+r);return new Tn.cipher.BlockCipher({algorithm:t,key:e,decrypt:!1})};Tn.cipher.createDecipher=function(r,e){var t=r;if(typeof t=="string"&&(t=Tn.cipher.getAlgorithm(t),t&&(t=t())),!t)throw new Error("Unsupported algorithm: "+r);return new Tn.cipher.BlockCipher({algorithm:t,key:e,decrypt:!0})};Tn.cipher.registerAlgorithm=function(r,e){r=r.toUpperCase(),Tn.cipher.algorithms[r]=e};Tn.cipher.getAlgorithm=function(r){return r=r.toUpperCase(),r in Tn.cipher.algorithms?Tn.cipher.algorithms[r]:null};var j2=Tn.cipher.BlockCipher=function(r){this.algorithm=r.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=r.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=r.decrypt,this.algorithm.initialize(r)};j2.prototype.start=function(r){r=r||{};var e={};for(var t in r)e[t]=r[t];e.decrypt=this._decrypt,this._finish=!1,this._input=Tn.util.createBuffer(),this.output=r.output||Tn.util.createBuffer(),this.mode.start(e)};j2.prototype.update=function(r){for(r&&this._input.putBuffer(r);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};j2.prototype.finish=function(r){r&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(t){return r(this.blockSize,t,!1)},this.mode.unpad=function(t){return r(this.blockSize,t,!0)});var e={};return e.decrypt=this._decrypt,e.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,e)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,e))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,e))}});var F2=Z((Vpe,HO)=>{"use strict";var In=$t();lr();In.cipher=In.cipher||{};var Jt=HO.exports=In.cipher.modes=In.cipher.modes||{};Jt.ecb=function(r){r=r||{},this.name="ECB",this.cipher=r.cipher,this.blockSize=r.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};Jt.ecb.prototype.start=function(r){};Jt.ecb.prototype.encrypt=function(r,e,t){if(r.length()<this.blockSize&&!(t&&r.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=r.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var n=0;n<this._ints;++n)e.putInt32(this._outBlock[n])};Jt.ecb.prototype.decrypt=function(r,e,t){if(r.length()<this.blockSize&&!(t&&r.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=r.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var n=0;n<this._ints;++n)e.putInt32(this._outBlock[n])};Jt.ecb.prototype.pad=function(r,e){var t=r.length()===this.blockSize?this.blockSize:this.blockSize-r.length();return r.fillWithByte(t,t),!0};Jt.ecb.prototype.unpad=function(r,e){if(e.overflow>0)return!1;var t=r.length(),n=r.at(t-1);return n>this.blockSize<<2?!1:(r.truncate(n),!0)};Jt.cbc=function(r){r=r||{},this.name="CBC",this.cipher=r.cipher,this.blockSize=r.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};Jt.cbc.prototype.start=function(r){if(r.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in r)this._iv=fw(r.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")};Jt.cbc.prototype.encrypt=function(r,e,t){if(r.length()<this.blockSize&&!(t&&r.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=this._prev[n]^r.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var n=0;n<this._ints;++n)e.putInt32(this._outBlock[n]);this._prev=this._outBlock};Jt.cbc.prototype.decrypt=function(r,e,t){if(r.length()<this.blockSize&&!(t&&r.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=r.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var n=0;n<this._ints;++n)e.putInt32(this._prev[n]^this._outBlock[n]);this._prev=this._inBlock.slice(0)};Jt.cbc.prototype.pad=function(r,e){var t=r.length()===this.blockSize?this.blockSize:this.blockSize-r.length();return r.fillWithByte(t,t),!0};Jt.cbc.prototype.unpad=function(r,e){if(e.overflow>0)return!1;var t=r.length(),n=r.at(t-1);return n>this.blockSize<<2?!1:(r.truncate(n),!0)};Jt.cfb=function(r){r=r||{},this.name="CFB",this.cipher=r.cipher,this.blockSize=r.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=In.util.createBuffer(),this._partialBytes=0};Jt.cfb.prototype.start=function(r){if(!("iv"in r))throw new Error("Invalid IV parameter.");this._iv=fw(r.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Jt.cfb.prototype.encrypt=function(r,e,t){var n=r.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var s=0;s<this._ints;++s)this._inBlock[s]=r.getInt32()^this._outBlock[s],e.putInt32(this._inBlock[s]);return}var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(var s=0;s<this._ints;++s)this._partialBlock[s]=r.getInt32()^this._outBlock[s],this._partialOutput.putInt32(this._partialBlock[s]);if(i>0)r.read-=this.blockSize;else for(var s=0;s<this._ints;++s)this._inBlock[s]=this._partialBlock[s];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!t)return e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};Jt.cfb.prototype.decrypt=function(r,e,t){var n=r.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var s=0;s<this._ints;++s)this._inBlock[s]=r.getInt32(),e.putInt32(this._inBlock[s]^this._outBlock[s]);return}var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(var s=0;s<this._ints;++s)this._partialBlock[s]=r.getInt32(),this._partialOutput.putInt32(this._partialBlock[s]^this._outBlock[s]);if(i>0)r.read-=this.blockSize;else for(var s=0;s<this._ints;++s)this._inBlock[s]=this._partialBlock[s];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!t)return e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};Jt.ofb=function(r){r=r||{},this.name="OFB",this.cipher=r.cipher,this.blockSize=r.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=In.util.createBuffer(),this._partialBytes=0};Jt.ofb.prototype.start=function(r){if(!("iv"in r))throw new Error("Invalid IV parameter.");this._iv=fw(r.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Jt.ofb.prototype.encrypt=function(r,e,t){var n=r.length();if(r.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var s=0;s<this._ints;++s)e.putInt32(r.getInt32()^this._outBlock[s]),this._inBlock[s]=this._outBlock[s];return}var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(var s=0;s<this._ints;++s)this._partialOutput.putInt32(r.getInt32()^this._outBlock[s]);if(i>0)r.read-=this.blockSize;else for(var s=0;s<this._ints;++s)this._inBlock[s]=this._outBlock[s];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!t)return e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};Jt.ofb.prototype.decrypt=Jt.ofb.prototype.encrypt;Jt.ctr=function(r){r=r||{},this.name="CTR",this.cipher=r.cipher,this.blockSize=r.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=In.util.createBuffer(),this._partialBytes=0};Jt.ctr.prototype.start=function(r){if(!("iv"in r))throw new Error("Invalid IV parameter.");this._iv=fw(r.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Jt.ctr.prototype.encrypt=function(r,e,t){var n=r.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize)for(var s=0;s<this._ints;++s)e.putInt32(r.getInt32()^this._outBlock[s]);else{var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(var s=0;s<this._ints;++s)this._partialOutput.putInt32(r.getInt32()^this._outBlock[s]);if(i>0&&(r.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!t)return e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}hw(this._inBlock)};Jt.ctr.prototype.decrypt=Jt.ctr.prototype.encrypt;Jt.gcm=function(r){r=r||{},this.name="GCM",this.cipher=r.cipher,this.blockSize=r.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=In.util.createBuffer(),this._partialBytes=0,this._R=3774873600};Jt.gcm.prototype.start=function(r){if(!("iv"in r))throw new Error("Invalid IV parameter.");var e=In.util.createBuffer(r.iv);this._cipherLength=0;var t;if("additionalData"in r?t=In.util.createBuffer(r.additionalData):t=In.util.createBuffer(),"tagLength"in r?this._tagLength=r.tagLength:this._tagLength=128,this._tag=null,r.decrypt&&(this._tag=In.util.createBuffer(r.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 n=e.length();if(n===12)this._j0=[e.getInt32(),e.getInt32(),e.getInt32(),1];else{for(this._j0=[0,0,0,0];e.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(M2(n*8)))}this._inBlock=this._j0.slice(0),hw(this._inBlock),this._partialBytes=0,t=In.util.createBuffer(t),this._aDataLength=M2(t.length()*8);var s=t.length()%this.blockSize;for(s&&t.fillWithByte(0,this.blockSize-s),this._s=[0,0,0,0];t.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()])};Jt.gcm.prototype.encrypt=function(r,e,t){var n=r.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var s=0;s<this._ints;++s)e.putInt32(this._outBlock[s]^=r.getInt32());this._cipherLength+=this.blockSize}else{var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(var s=0;s<this._ints;++s)this._partialOutput.putInt32(r.getInt32()^this._outBlock[s]);if(i<=0||t){if(t){var a=n%this.blockSize;this._cipherLength+=a,this._partialOutput.truncate(this.blockSize-a)}else this._cipherLength+=this.blockSize;for(var s=0;s<this._ints;++s)this._outBlock[s]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!t)return r.read-=this.blockSize,e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),hw(this._inBlock)};Jt.gcm.prototype.decrypt=function(r,e,t){var n=r.length();if(n<this.blockSize&&!(t&&n>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),hw(this._inBlock),this._hashBlock[0]=r.getInt32(),this._hashBlock[1]=r.getInt32(),this._hashBlock[2]=r.getInt32(),this._hashBlock[3]=r.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var s=0;s<this._ints;++s)e.putInt32(this._outBlock[s]^this._hashBlock[s]);n<this.blockSize?this._cipherLength+=n%this.blockSize:this._cipherLength+=this.blockSize};Jt.gcm.prototype.afterFinish=function(r,e){var t=!0;e.decrypt&&e.overflow&&r.truncate(this.blockSize-e.overflow),this.tag=In.util.createBuffer();var n=this._aDataLength.concat(M2(this._cipherLength*8));this._s=this.ghash(this._hashSubkey,this._s,n);var s=[];this.cipher.encrypt(this._j0,s);for(var i=0;i<this._ints;++i)this.tag.putInt32(this._s[i]^s[i]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),e.decrypt&&this.tag.bytes()!==this._tag&&(t=!1),t};Jt.gcm.prototype.multiply=function(r,e){for(var t=[0,0,0,0],n=e.slice(0),s=0;s<128;++s){var i=r[s/32|0]&1<<31-s%32;i&&(t[0]^=n[0],t[1]^=n[1],t[2]^=n[2],t[3]^=n[3]),this.pow(n,n)}return t};Jt.gcm.prototype.pow=function(r,e){for(var t=r[3]&1,n=3;n>0;--n)e[n]=r[n]>>>1|(r[n-1]&1)<<31;e[0]=r[0]>>>1,t&&(e[0]^=this._R)};Jt.gcm.prototype.tableMultiply=function(r){for(var e=[0,0,0,0],t=0;t<32;++t){var n=t/8|0,s=r[n]>>>(7-t%8)*4&15,i=this._m[t][s];e[0]^=i[0],e[1]^=i[1],e[2]^=i[2],e[3]^=i[3]}return e};Jt.gcm.prototype.ghash=function(r,e,t){return e[0]^=t[0],e[1]^=t[1],e[2]^=t[2],e[3]^=t[3],this.tableMultiply(e)};Jt.gcm.prototype.generateHashTable=function(r,e){for(var t=8/e,n=4*t,s=16*t,i=new Array(s),a=0;a<s;++a){var u=[0,0,0,0],c=a/n|0,f=(n-1-a%n)*e;u[c]=1<<e-1<<f,i[a]=this.generateSubHashTable(this.multiply(u,r),e)}return i};Jt.gcm.prototype.generateSubHashTable=function(r,e){var t=1<<e,n=t>>>1,s=new Array(t);s[n]=r.slice(0);for(var i=n>>>1;i>0;)this.pow(s[2*i],s[i]=[]),i>>=1;for(i=2;i<n;){for(var a=1;a<i;++a){var u=s[i],c=s[a];s[i+a]=[u[0]^c[0],u[1]^c[1],u[2]^c[2],u[3]^c[3]]}i*=2}for(s[0]=[0,0,0,0],i=n+1;i<t;++i){var f=s[i^n];s[i]=[r[0]^f[0],r[1]^f[1],r[2]^f[2],r[3]^f[3]]}return s};function fw(r,e){if(typeof r=="string"&&(r=In.util.createBuffer(r)),In.util.isArray(r)&&r.length>4){var t=r;r=In.util.createBuffer();for(var n=0;n<t.length;++n)r.putByte(t[n])}if(r.length()<e)throw new Error("Invalid IV length; got "+r.length()+" bytes and expected "+e+" bytes.");if(!In.util.isArray(r)){for(var s=[],i=e/4,n=0;n<i;++n)s.push(r.getInt32());r=s}return r}o(fw,"transformIV");function hw(r){r[r.length-1]=r[r.length-1]+1&4294967295}o(hw,"inc32");function M2(r){return[r/4294967296|0,r&4294967295]}o(M2,"from64To32")});var Pu=Z((jpe,XO)=>{"use strict";var Dr=$t();lw();F2();lr();XO.exports=Dr.aes=Dr.aes||{};Dr.aes.startEncrypting=function(r,e,t,n){var s=pw({key:r,output:t,decrypt:!1,mode:n});return s.start(e),s};Dr.aes.createEncryptionCipher=function(r,e){return pw({key:r,output:null,decrypt:!1,mode:e})};Dr.aes.startDecrypting=function(r,e,t,n){var s=pw({key:r,output:t,decrypt:!0,mode:n});return s.start(e),s};Dr.aes.createDecryptionCipher=function(r,e){return pw({key:r,output:null,decrypt:!0,mode:e})};Dr.aes.Algorithm=function(r,e){K2||$O();var t=this;t.name=r,t.mode=new e({blockSize:16,cipher:{encrypt:o(function(n,s){return H2(t._w,n,s,!1)},"encrypt"),decrypt:o(function(n,s){return H2(t._w,n,s,!0)},"decrypt")}}),t._init=!1};Dr.aes.Algorithm.prototype.initialize=function(r){if(!this._init){var e=r.key,t;if(typeof e=="string"&&(e.length===16||e.length===24||e.length===32))e=Dr.util.createBuffer(e);else if(Dr.util.isArray(e)&&(e.length===16||e.length===24||e.length===32)){t=e,e=Dr.util.createBuffer();for(var n=0;n<t.length;++n)e.putByte(t[n])}if(!Dr.util.isArray(e)){t=e,e=[];var s=t.length();if(s===16||s===24||s===32){s=s>>>2;for(var n=0;n<s;++n)e.push(t.getInt32())}}if(!Dr.util.isArray(e)||!(e.length===4||e.length===6||e.length===8))throw new Error("Invalid key parameter.");var i=this.mode.name,a=["CFB","OFB","CTR","GCM"].indexOf(i)!==-1;this._w=GO(e,r.decrypt&&!a),this._init=!0}};Dr.aes._expandKey=function(r,e){return K2||$O(),GO(r,e)};Dr.aes._updateBlock=H2;ip("AES-ECB",Dr.cipher.modes.ecb);ip("AES-CBC",Dr.cipher.modes.cbc);ip("AES-CFB",Dr.cipher.modes.cfb);ip("AES-OFB",Dr.cipher.modes.ofb);ip("AES-CTR",Dr.cipher.modes.ctr);ip("AES-GCM",Dr.cipher.modes.gcm);function ip(r,e){var t=o(function(){return new Dr.aes.Algorithm(r,e)},"factory");Dr.cipher.registerAlgorithm(r,t)}o(ip,"registerAlgorithm");var K2=!1,sp=4,gs,q2,KO,Il,Zi;function $O(){K2=!0,KO=[0,1,2,4,8,16,32,64,128,27,54];for(var r=new Array(256),e=0;e<128;++e)r[e]=e<<1,r[e+128]=e+128<<1^283;gs=new Array(256),q2=new Array(256),Il=new Array(4),Zi=new Array(4);for(var e=0;e<4;++e)Il[e]=new Array(256),Zi[e]=new Array(256);for(var t=0,n=0,s,i,a,u,c,f,h,e=0;e<256;++e){u=n^n<<1^n<<2^n<<3^n<<4,u=u>>8^u&255^99,gs[t]=u,q2[u]=t,c=r[u],s=r[t],i=r[s],a=r[i],f=c<<24^u<<16^u<<8^(u^c),h=(s^i^a)<<24^(t^a)<<16^(t^i^a)<<8^(t^s^a);for(var m=0;m<4;++m)Il[m][t]=f,Zi[m][u]=h,f=f<<24|f>>>8,h=h<<24|h>>>8;t===0?t=n=1:(t=s^r[r[r[s^a]]],n^=r[r[n]])}}o($O,"initialize");function GO(r,e){for(var t=r.slice(0),n,s=1,i=t.length,a=i+6+1,u=sp*a,c=i;c<u;++c)n=t[c-1],c%i===0?(n=gs[n>>>16&255]<<24^gs[n>>>8&255]<<16^gs[n&255]<<8^gs[n>>>24]^KO[s]<<24,s++):i>6&&c%i===4&&(n=gs[n>>>24]<<24^gs[n>>>16&255]<<16^gs[n>>>8&255]<<8^gs[n&255]),t[c]=t[c-i]^n;if(e){var f,h=Zi[0],m=Zi[1],g=Zi[2],x=Zi[3],v=t.slice(0);u=t.length;for(var c=0,w=u-sp;c<u;c+=sp,w-=sp)if(c===0||c===u-sp)v[c]=t[w],v[c+1]=t[w+3],v[c+2]=t[w+2],v[c+3]=t[w+1];else for(var S=0;S<sp;++S)f=t[w+S],v[c+(3&-S)]=h[gs[f>>>24]]^m[gs[f>>>16&255]]^g[gs[f>>>8&255]]^x[gs[f&255]];t=v}return t}o(GO,"_expandKey");function H2(r,e,t,n){var s=r.length/4-1,i,a,u,c,f;n?(i=Zi[0],a=Zi[1],u=Zi[2],c=Zi[3],f=q2):(i=Il[0],a=Il[1],u=Il[2],c=Il[3],f=gs);var h,m,g,x,v,w,S;h=e[0]^r[0],m=e[n?3:1]^r[1],g=e[2]^r[2],x=e[n?1:3]^r[3];for(var A=3,T=1;T<s;++T)v=i[h>>>24]^a[m>>>16&255]^u[g>>>8&255]^c[x&255]^r[++A],w=i[m>>>24]^a[g>>>16&255]^u[x>>>8&255]^c[h&255]^r[++A],S=i[g>>>24]^a[x>>>16&255]^u[h>>>8&255]^c[m&255]^r[++A],x=i[x>>>24]^a[h>>>16&255]^u[m>>>8&255]^c[g&255]^r[++A],h=v,m=w,g=S;t[0]=f[h>>>24]<<24^f[m>>>16&255]<<16^f[g>>>8&255]<<8^f[x&255]^r[++A],t[n?3:1]=f[m>>>24]<<24^f[g>>>16&255]<<16^f[x>>>8&255]<<8^f[h&255]^r[++A],t[2]=f[g>>>24]<<24^f[x>>>16&255]<<16^f[h>>>8&255]<<8^f[m&255]^r[++A],t[n?1:3]=f[x>>>24]<<24^f[h>>>16&255]<<16^f[m>>>8&255]<<8^f[g&255]^r[++A]}o(H2,"_updateBlock");function pw(r){r=r||{};var e=(r.mode||"CBC").toUpperCase(),t="AES-"+e,n;r.decrypt?n=Dr.cipher.createDecipher(t,r.key):n=Dr.cipher.createCipher(t,r.key);var s=n.start;return n.start=function(i,a){var u=null;a instanceof Dr.util.ByteBuffer&&(u=a,a={}),a=a||{},a.output=u,a.iv=i,s.call(n,a)},n}o(pw,"_createCipher")});var Ou=Z((Fpe,WO)=>{"use strict";var W0=$t();W0.pki=W0.pki||{};var $2=WO.exports=W0.pki.oids=W0.oids=W0.oids||{};function Ue(r,e){$2[r]=e,$2[e]=r}o(Ue,"_IN");function xr(r,e){$2[r]=e}o(xr,"_I_");Ue("1.2.840.113549.1.1.1","rsaEncryption");Ue("1.2.840.113549.1.1.4","md5WithRSAEncryption");Ue("1.2.840.113549.1.1.5","sha1WithRSAEncryption");Ue("1.2.840.113549.1.1.7","RSAES-OAEP");Ue("1.2.840.113549.1.1.8","mgf1");Ue("1.2.840.113549.1.1.9","pSpecified");Ue("1.2.840.113549.1.1.10","RSASSA-PSS");Ue("1.2.840.113549.1.1.11","sha256WithRSAEncryption");Ue("1.2.840.113549.1.1.12","sha384WithRSAEncryption");Ue("1.2.840.113549.1.1.13","sha512WithRSAEncryption");Ue("1.3.101.112","EdDSA25519");Ue("1.2.840.10040.4.3","dsa-with-sha1");Ue("1.3.14.3.2.7","desCBC");Ue("1.3.14.3.2.26","sha1");Ue("1.3.14.3.2.29","sha1WithRSASignature");Ue("2.16.840.1.101.3.4.2.1","sha256");Ue("2.16.840.1.101.3.4.2.2","sha384");Ue("2.16.840.1.101.3.4.2.3","sha512");Ue("2.16.840.1.101.3.4.2.4","sha224");Ue("2.16.840.1.101.3.4.2.5","sha512-224");Ue("2.16.840.1.101.3.4.2.6","sha512-256");Ue("1.2.840.113549.2.2","md2");Ue("1.2.840.113549.2.5","md5");Ue("1.2.840.113549.1.7.1","data");Ue("1.2.840.113549.1.7.2","signedData");Ue("1.2.840.113549.1.7.3","envelopedData");Ue("1.2.840.113549.1.7.4","signedAndEnvelopedData");Ue("1.2.840.113549.1.7.5","digestedData");Ue("1.2.840.113549.1.7.6","encryptedData");Ue("1.2.840.113549.1.9.1","emailAddress");Ue("1.2.840.113549.1.9.2","unstructuredName");Ue("1.2.840.113549.1.9.3","contentType");Ue("1.2.840.113549.1.9.4","messageDigest");Ue("1.2.840.113549.1.9.5","signingTime");Ue("1.2.840.113549.1.9.6","counterSignature");Ue("1.2.840.113549.1.9.7","challengePassword");Ue("1.2.840.113549.1.9.8","unstructuredAddress");Ue("1.2.840.113549.1.9.14","extensionRequest");Ue("1.2.840.113549.1.9.20","friendlyName");Ue("1.2.840.113549.1.9.21","localKeyId");Ue("1.2.840.113549.1.9.22.1","x509Certificate");Ue("1.2.840.113549.1.12.10.1.1","keyBag");Ue("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag");Ue("1.2.840.113549.1.12.10.1.3","certBag");Ue("1.2.840.113549.1.12.10.1.4","crlBag");Ue("1.2.840.113549.1.12.10.1.5","secretBag");Ue("1.2.840.113549.1.12.10.1.6","safeContentsBag");Ue("1.2.840.113549.1.5.13","pkcs5PBES2");Ue("1.2.840.113549.1.5.12","pkcs5PBKDF2");Ue("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4");Ue("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4");Ue("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC");Ue("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC");Ue("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC");Ue("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC");Ue("1.2.840.113549.2.7","hmacWithSHA1");Ue("1.2.840.113549.2.8","hmacWithSHA224");Ue("1.2.840.113549.2.9","hmacWithSHA256");Ue("1.2.840.113549.2.10","hmacWithSHA384");Ue("1.2.840.113549.2.11","hmacWithSHA512");Ue("1.2.840.113549.3.7","des-EDE3-CBC");Ue("2.16.840.1.101.3.4.1.2","aes128-CBC");Ue("2.16.840.1.101.3.4.1.22","aes192-CBC");Ue("2.16.840.1.101.3.4.1.42","aes256-CBC");Ue("2.5.4.3","commonName");Ue("2.5.4.4","surname");Ue("2.5.4.5","serialNumber");Ue("2.5.4.6","countryName");Ue("2.5.4.7","localityName");Ue("2.5.4.8","stateOrProvinceName");Ue("2.5.4.9","streetAddress");Ue("2.5.4.10","organizationName");Ue("2.5.4.11","organizationalUnitName");Ue("2.5.4.12","title");Ue("2.5.4.13","description");Ue("2.5.4.15","businessCategory");Ue("2.5.4.17","postalCode");Ue("2.5.4.42","givenName");Ue("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName");Ue("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName");Ue("2.16.840.1.113730.1.1","nsCertType");Ue("2.16.840.1.113730.1.13","nsComment");xr("2.5.29.1","authorityKeyIdentifier");xr("2.5.29.2","keyAttributes");xr("2.5.29.3","certificatePolicies");xr("2.5.29.4","keyUsageRestriction");xr("2.5.29.5","policyMapping");xr("2.5.29.6","subtreesConstraint");xr("2.5.29.7","subjectAltName");xr("2.5.29.8","issuerAltName");xr("2.5.29.9","subjectDirectoryAttributes");xr("2.5.29.10","basicConstraints");xr("2.5.29.11","nameConstraints");xr("2.5.29.12","policyConstraints");xr("2.5.29.13","basicConstraints");Ue("2.5.29.14","subjectKeyIdentifier");Ue("2.5.29.15","keyUsage");xr("2.5.29.16","privateKeyUsagePeriod");Ue("2.5.29.17","subjectAltName");Ue("2.5.29.18","issuerAltName");Ue("2.5.29.19","basicConstraints");xr("2.5.29.20","cRLNumber");xr("2.5.29.21","cRLReason");xr("2.5.29.22","expirationDate");xr("2.5.29.23","instructionCode");xr("2.5.29.24","invalidityDate");xr("2.5.29.25","cRLDistributionPoints");xr("2.5.29.26","issuingDistributionPoint");xr("2.5.29.27","deltaCRLIndicator");xr("2.5.29.28","issuingDistributionPoint");xr("2.5.29.29","certificateIssuer");xr("2.5.29.30","nameConstraints");Ue("2.5.29.31","cRLDistributionPoints");Ue("2.5.29.32","certificatePolicies");xr("2.5.29.33","policyMappings");xr("2.5.29.34","policyConstraints");Ue("2.5.29.35","authorityKeyIdentifier");xr("2.5.29.36","policyConstraints");Ue("2.5.29.37","extKeyUsage");xr("2.5.29.46","freshestCRL");xr("2.5.29.54","inhibitAnyPolicy");Ue("1.3.6.1.4.1.11129.2.4.2","timestampList");Ue("1.3.6.1.5.5.7.1.1","authorityInfoAccess");Ue("1.3.6.1.5.5.7.3.1","serverAuth");Ue("1.3.6.1.5.5.7.3.2","clientAuth");Ue("1.3.6.1.5.5.7.3.3","codeSigning");Ue("1.3.6.1.5.5.7.3.4","emailProtection");Ue("1.3.6.1.5.5.7.3.8","timeStamping")});var ea=Z((Hpe,JO)=>{"use strict";var jr=$t();lr();Ou();var Ye=JO.exports=jr.asn1=jr.asn1||{};Ye.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};Ye.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};Ye.maxDepth=256;Ye.create=function(r,e,t,n,s){if(jr.util.isArray(n)){for(var i=[],a=0;a<n.length;++a)n[a]!==void 0&&i.push(n[a]);n=i}var u={tagClass:r,type:e,constructed:t,composed:t||jr.util.isArray(n),value:n};return s&&"bitStringContents"in s&&(u.bitStringContents=s.bitStringContents,u.original=Ye.copy(u)),u};Ye.copy=function(r,e){var t;if(jr.util.isArray(r)){t=[];for(var n=0;n<r.length;++n)t.push(Ye.copy(r[n],e));return t}return typeof r=="string"?r:(t={tagClass:r.tagClass,type:r.type,constructed:r.constructed,composed:r.composed,value:Ye.copy(r.value,e)},e&&!e.excludeBitStringContents&&(t.bitStringContents=r.bitStringContents),t)};Ye.equals=function(r,e,t){if(jr.util.isArray(r)){if(!jr.util.isArray(e)||r.length!==e.length)return!1;for(var n=0;n<r.length;++n)if(!Ye.equals(r[n],e[n]))return!1;return!0}if(typeof r!=typeof e)return!1;if(typeof r=="string")return r===e;var s=r.tagClass===e.tagClass&&r.type===e.type&&r.constructed===e.constructed&&r.composed===e.composed&&Ye.equals(r.value,e.value);return t&&t.includeBitStringContents&&(s=s&&r.bitStringContents===e.bitStringContents),s};Ye.getBerValueLength=function(r){var e=r.getByte();if(e!==128){var t,n=e&128;return n?t=r.getInt((e&127)<<3):t=e,t}};function z0(r,e,t){if(t>e){var n=new Error("Too few bytes to parse DER.");throw n.available=r.length(),n.remaining=e,n.requested=t,n}}o(z0,"_checkBufferLength");var Bz=o(function(r,e){var t=r.getByte();if(e--,t!==128){var n,s=t&128;if(!s)n=t;else{var i=t&127;z0(r,e,i),n=r.getInt(i<<3)}if(n<0)throw new Error("Negative length: "+n);return n}},"_getValueLength");Ye.fromDer=function(r,e){e===void 0&&(e={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),typeof e=="boolean"&&(e={strict:e,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in e||(e.strict=!0),"parseAllBytes"in e||(e.parseAllBytes=!0),"decodeBitStrings"in e||(e.decodeBitStrings=!0),"maxDepth"in e||(e.maxDepth=Ye.maxDepth),typeof r=="string"&&(r=jr.util.createBuffer(r));var t=r.length(),n=dw(r,r.length(),0,e);if(e.parseAllBytes&&r.length()!==0){var s=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw s.byteCount=t,s.remaining=r.length(),s}return n};function dw(r,e,t,n){if(t>=n.maxDepth)throw new Error("ASN.1 parsing error: Max depth exceeded.");var s;z0(r,e,2);var i=r.getByte();e--;var a=i&192,u=i&31;s=r.length();var c=Bz(r,e);if(e-=s-r.length(),c!==void 0&&c>e){if(n.strict){var f=new Error("Too few bytes to read ASN.1 value.");throw f.available=r.length(),f.remaining=e,f.requested=c,f}c=e}var h,m,g=(i&32)===32;if(g)if(h=[],c===void 0)for(;;){if(z0(r,e,2),r.bytes(2)==="\0\0"){r.getBytes(2),e-=2;break}s=r.length(),h.push(dw(r,e,t+1,n)),e-=s-r.length()}else for(;c>0;)s=r.length(),h.push(dw(r,c,t+1,n)),e-=s-r.length(),c-=s-r.length();if(h===void 0&&a===Ye.Class.UNIVERSAL&&u===Ye.Type.BITSTRING&&(m=r.bytes(c)),h===void 0&&n.decodeBitStrings&&a===Ye.Class.UNIVERSAL&&u===Ye.Type.BITSTRING&&c>1){var x=r.read,v=e,w=0;if(u===Ye.Type.BITSTRING&&(z0(r,e,1),w=r.getByte(),e--),w===0)try{s=r.length();var S={strict:!0,decodeBitStrings:!0},A=dw(r,e,t+1,S),T=s-r.length();e-=T,u==Ye.Type.BITSTRING&&T++;var b=A.tagClass;T===c&&(b===Ye.Class.UNIVERSAL||b===Ye.Class.CONTEXT_SPECIFIC)&&(h=[A])}catch{}h===void 0&&(r.read=x,e=v)}if(h===void 0){if(c===void 0){if(n.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");c=e}if(u===Ye.Type.BMPSTRING)for(h="";c>0;c-=2)z0(r,e,2),h+=String.fromCharCode(r.getInt16()),e-=2;else h=r.getBytes(c),e-=c}var E=m===void 0?null:{bitStringContents:m};return Ye.create(a,u,g,h,E)}o(dw,"_fromDer");Ye.toDer=function(r){var e=jr.util.createBuffer(),t=r.tagClass|r.type,n=jr.util.createBuffer(),s=!1;if("bitStringContents"in r&&(s=!0,r.original&&(s=Ye.equals(r,r.original))),s)n.putBytes(r.bitStringContents);else if(r.composed){r.constructed?t|=32:n.putByte(0);for(var i=0;i<r.value.length;++i)r.value[i]!==void 0&&n.putBuffer(Ye.toDer(r.value[i]))}else if(r.type===Ye.Type.BMPSTRING)for(var i=0;i<r.value.length;++i)n.putInt16(r.value.charCodeAt(i));else r.type===Ye.Type.INTEGER&&r.value.length>1&&(r.value.charCodeAt(0)===0&&(r.value.charCodeAt(1)&128)===0||r.value.charCodeAt(0)===255&&(r.value.charCodeAt(1)&128)===128)?n.putBytes(r.value.substr(1)):n.putBytes(r.value);if(e.putByte(t),n.length()<=127)e.putByte(n.length()&127);else{var a=n.length(),u="";do u+=String.fromCharCode(a&255),a=a>>>8;while(a>0);e.putByte(u.length|128);for(var i=u.length-1;i>=0;--i)e.putByte(u.charCodeAt(i))}return e.putBuffer(n),e};Ye.oidToDer=function(r){var e=r.split("."),t=jr.util.createBuffer();t.putByte(40*parseInt(e[0],10)+parseInt(e[1],10));for(var n,s,i,a,u=2;u<e.length;++u){if(n=!0,s=[],i=parseInt(e[u],10),i>4294967295)throw new Error("OID value too large; max is 32-bits.");do a=i&127,i=i>>>7,n||(a|=128),s.push(a),n=!1;while(i>0);for(var c=s.length-1;c>=0;--c)t.putByte(s[c])}return t};Ye.derToOid=function(r){var e;typeof r=="string"&&(r=jr.util.createBuffer(r));var t=r.getByte();e=Math.floor(t/40)+"."+t%40;for(var n=0;r.length()>0;){if(n>70368744177663)throw new Error("OID value too large; max is 53-bits.");t=r.getByte(),n=n*128,t&128?n+=t&127:(e+="."+(n+t),n=0)}return e};Ye.utcTimeToDate=function(r){var e=new Date,t=parseInt(r.substr(0,2),10);t=t>=50?1900+t:2e3+t;var n=parseInt(r.substr(2,2),10)-1,s=parseInt(r.substr(4,2),10),i=parseInt(r.substr(6,2),10),a=parseInt(r.substr(8,2),10),u=0;if(r.length>11){var c=r.charAt(10),f=10;c!=="+"&&c!=="-"&&(u=parseInt(r.substr(10,2),10),f+=2)}if(e.setUTCFullYear(t,n,s),e.setUTCHours(i,a,u,0),f&&(c=r.charAt(f),c==="+"||c==="-")){var h=parseInt(r.substr(f+1,2),10),m=parseInt(r.substr(f+4,2),10),g=h*60+m;g*=6e4,c==="+"?e.setTime(+e-g):e.setTime(+e+g)}return e};Ye.generalizedTimeToDate=function(r){var e=new Date,t=parseInt(r.substr(0,4),10),n=parseInt(r.substr(4,2),10)-1,s=parseInt(r.substr(6,2),10),i=parseInt(r.substr(8,2),10),a=parseInt(r.substr(10,2),10),u=parseInt(r.substr(12,2),10),c=0,f=0,h=!1;r.charAt(r.length-1)==="Z"&&(h=!0);var m=r.length-5,g=r.charAt(m);if(g==="+"||g==="-"){var x=parseInt(r.substr(m+1,2),10),v=parseInt(r.substr(m+4,2),10);f=x*60+v,f*=6e4,g==="+"&&(f*=-1),h=!0}return r.charAt(14)==="."&&(c=parseFloat(r.substr(14),10)*1e3),h?(e.setUTCFullYear(t,n,s),e.setUTCHours(i,a,u,c),e.setTime(+e+f)):(e.setFullYear(t,n,s),e.setHours(i,a,u,c)),e};Ye.dateToUtcTime=function(r){if(typeof r=="string")return r;var e="",t=[];t.push((""+r.getUTCFullYear()).substr(2)),t.push(""+(r.getUTCMonth()+1)),t.push(""+r.getUTCDate()),t.push(""+r.getUTCHours()),t.push(""+r.getUTCMinutes()),t.push(""+r.getUTCSeconds());for(var n=0;n<t.length;++n)t[n].length<2&&(e+="0"),e+=t[n];return e+="Z",e};Ye.dateToGeneralizedTime=function(r){if(typeof r=="string")return r;var e="",t=[];t.push(""+r.getUTCFullYear()),t.push(""+(r.getUTCMonth()+1)),t.push(""+r.getUTCDate()),t.push(""+r.getUTCHours()),t.push(""+r.getUTCMinutes()),t.push(""+r.getUTCSeconds());for(var n=0;n<t.length;++n)t[n].length<2&&(e+="0"),e+=t[n];return e+="Z",e};Ye.integerToDer=function(r){var e=jr.util.createBuffer();if(r>=-128&&r<128)return e.putSignedInt(r,8);if(r>=-32768&&r<32768)return e.putSignedInt(r,16);if(r>=-8388608&&r<8388608)return e.putSignedInt(r,24);if(r>=-2147483648&&r<2147483648)return e.putSignedInt(r,32);var t=new Error("Integer too large; max is 32-bits.");throw t.integer=r,t};Ye.derToInteger=function(r){typeof r=="string"&&(r=jr.util.createBuffer(r));var e=r.length()*8;if(e>32)throw new Error("Integer too large; max is 32-bits.");return r.getSignedInt(e)};Ye.validate=function(r,e,t,n){var s=!1;if((r.tagClass===e.tagClass||typeof e.tagClass>"u")&&(r.type===e.type||typeof e.type>"u"))if(r.constructed===e.constructed||typeof e.constructed>"u"){if(s=!0,e.value&&jr.util.isArray(e.value))for(var i=0,a=0;s&&a<e.value.length;++a){var u=e.value[a];s=!!u.optional;var c=r.value[i];if(!c){u.optional||(s=!1,n&&n.push("["+e.name+'] Missing required element. Expected tag class "'+u.tagClass+'", type "'+u.type+'"'));continue}var f=typeof u.tagClass<"u"&&typeof u.type<"u";if(f&&(c.tagClass!==u.tagClass||c.type!==u.type))if(u.optional){s=!0;continue}else{s=!1,n&&n.push("["+e.name+"] Tag mismatch. Expected ("+u.tagClass+","+u.type+"), got ("+c.tagClass+","+c.type+")");break}var h=Ye.validate(c,u,t,n);if(h)++i,s=!0;else if(u.optional)s=!0;else{s=!1;break}}if(s&&t&&(e.capture&&(t[e.capture]=r.value),e.captureAsn1&&(t[e.captureAsn1]=r),e.captureBitStringContents&&"bitStringContents"in r&&(t[e.captureBitStringContents]=r.bitStringContents),e.captureBitStringValue&&"bitStringContents"in r)){var m;if(r.bitStringContents.length<2)t[e.captureBitStringValue]="";else{var g=r.bitStringContents.charCodeAt(0);if(g!==0)throw new Error("captureBitStringValue only supported for zero unused bits");t[e.captureBitStringValue]=r.bitStringContents.slice(1)}}}else n&&n.push("["+e.name+'] Expected constructed "'+e.constructed+'", got "'+r.constructed+'"');else n&&(r.tagClass!==e.tagClass&&n.push("["+e.name+'] Expected tag class "'+e.tagClass+'", got "'+r.tagClass+'"'),r.type!==e.type&&n.push("["+e.name+'] Expected type "'+e.type+'", got "'+r.type+'"'));return s};var zO=/[^\\u0000-\\u00ff]/;Ye.prettyPrint=function(r,e,t){var n="";e=e||0,t=t||2,e>0&&(n+=`
5
+ `);for(var s="",i=0;i<e*t;++i)s+=" ";switch(n+=s+"Tag: ",r.tagClass){case Ye.Class.UNIVERSAL:n+="Universal:";break;case Ye.Class.APPLICATION:n+="Application:";break;case Ye.Class.CONTEXT_SPECIFIC:n+="Context-Specific:";break;case Ye.Class.PRIVATE:n+="Private:";break}if(r.tagClass===Ye.Class.UNIVERSAL)switch(n+=r.type,r.type){case Ye.Type.NONE:n+=" (None)";break;case Ye.Type.BOOLEAN:n+=" (Boolean)";break;case Ye.Type.INTEGER:n+=" (Integer)";break;case Ye.Type.BITSTRING:n+=" (Bit string)";break;case Ye.Type.OCTETSTRING:n+=" (Octet string)";break;case Ye.Type.NULL:n+=" (Null)";break;case Ye.Type.OID:n+=" (Object Identifier)";break;case Ye.Type.ODESC:n+=" (Object Descriptor)";break;case Ye.Type.EXTERNAL:n+=" (External or Instance of)";break;case Ye.Type.REAL:n+=" (Real)";break;case Ye.Type.ENUMERATED:n+=" (Enumerated)";break;case Ye.Type.EMBEDDED:n+=" (Embedded PDV)";break;case Ye.Type.UTF8:n+=" (UTF8)";break;case Ye.Type.ROID:n+=" (Relative Object Identifier)";break;case Ye.Type.SEQUENCE:n+=" (Sequence)";break;case Ye.Type.SET:n+=" (Set)";break;case Ye.Type.PRINTABLESTRING:n+=" (Printable String)";break;case Ye.Type.IA5String:n+=" (IA5String (ASCII))";break;case Ye.Type.UTCTIME:n+=" (UTC time)";break;case Ye.Type.GENERALIZEDTIME:n+=" (Generalized time)";break;case Ye.Type.BMPSTRING:n+=" (BMP String)";break}else n+=r.type;if(n+=`
6
+ `,n+=s+"Constructed: "+r.constructed+`
7
+ `,r.composed){for(var a=0,u="",i=0;i<r.value.length;++i)r.value[i]!==void 0&&(a+=1,u+=Ye.prettyPrint(r.value[i],e+1,t),i+1<r.value.length&&(u+=","));n+=s+"Sub values: "+a+u}else{if(n+=s+"Value: ",r.type===Ye.Type.OID){var c=Ye.derToOid(r.value);n+=c,jr.pki&&jr.pki.oids&&c in jr.pki.oids&&(n+=" ("+jr.pki.oids[c]+") ")}if(r.type===Ye.Type.INTEGER)try{n+=Ye.derToInteger(r.value)}catch{n+="0x"+jr.util.bytesToHex(r.value)}else if(r.type===Ye.Type.BITSTRING){if(r.value.length>1?n+="0x"+jr.util.bytesToHex(r.value.slice(1)):n+="(none)",r.value.length>0){var f=r.value.charCodeAt(0);f==1?n+=" (1 unused bit shown)":f>1&&(n+=" ("+f+" unused bits shown)")}}else if(r.type===Ye.Type.OCTETSTRING)zO.test(r.value)||(n+="("+r.value+") "),n+="0x"+jr.util.bytesToHex(r.value);else if(r.type===Ye.Type.UTF8)try{n+=jr.util.decodeUtf8(r.value)}catch(h){if(h.message==="URI malformed")n+="0x"+jr.util.bytesToHex(r.value)+" (malformed UTF8)";else throw h}else r.type===Ye.Type.PRINTABLESTRING||r.type===Ye.Type.IA5String?n+=r.value:zO.test(r.value)?n+="0x"+jr.util.bytesToHex(r.value):r.value.length===0?n+="[null]":n+=r.value}return n}});var Ia=Z(($pe,YO)=>{"use strict";var mw=$t();YO.exports=mw.md=mw.md||{};mw.md.algorithms=mw.md.algorithms||{}});var ap=Z((Gpe,QO)=>{"use strict";var Co=$t();Ia();lr();var Dz=QO.exports=Co.hmac=Co.hmac||{};Dz.create=function(){var r=null,e=null,t=null,n=null,s={};return s.start=function(i,a){if(i!==null)if(typeof i=="string")if(i=i.toLowerCase(),i in Co.md.algorithms)e=Co.md.algorithms[i].create();else throw new Error('Unknown hash algorithm "'+i+'"');else e=i;if(a===null)a=r;else{if(typeof a=="string")a=Co.util.createBuffer(a);else if(Co.util.isArray(a)){var u=a;a=Co.util.createBuffer();for(var c=0;c<u.length;++c)a.putByte(u[c])}var f=a.length();f>e.blockLength&&(e.start(),e.update(a.bytes()),a=e.digest()),t=Co.util.createBuffer(),n=Co.util.createBuffer(),f=a.length();for(var c=0;c<f;++c){var u=a.at(c);t.putByte(54^u),n.putByte(92^u)}if(f<e.blockLength)for(var u=e.blockLength-f,c=0;c<u;++c)t.putByte(54),n.putByte(92);r=a,t=t.bytes(),n=n.bytes()}e.start(),e.update(t)},s.update=function(i){e.update(i)},s.getMac=function(){var i=e.digest().bytes();return e.start(),e.update(n),e.update(i),e.digest()},s.digest=s.getMac,s}});var vw=Z((Xpe,r3)=>{"use strict";var _a=$t();Ia();lr();var e3=r3.exports=_a.md5=_a.md5||{};_a.md.md5=_a.md.algorithms.md5=e3;e3.create=function(){t3||Rz();var r=null,e=_a.util.createBuffer(),t=new Array(16),n={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var s=n.messageLengthSize/4,i=0;i<s;++i)n.fullMessageLength.push(0);return e=_a.util.createBuffer(),r={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},n},n.start(),n.update=function(s,i){i==="utf8"&&(s=_a.util.encodeUtf8(s));var a=s.length;n.messageLength+=a,a=[a/4294967296>>>0,a>>>0];for(var u=n.fullMessageLength.length-1;u>=0;--u)n.fullMessageLength[u]+=a[1],a[1]=a[0]+(n.fullMessageLength[u]/4294967296>>>0),n.fullMessageLength[u]=n.fullMessageLength[u]>>>0,a[0]=a[1]/4294967296>>>0;return e.putBytes(s),ZO(r,t,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var s=_a.util.createBuffer();s.putBytes(e.bytes());var i=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,a=i&n.blockLength-1;s.putBytes(G2.substr(0,n.blockLength-a));for(var u,c=0,f=n.fullMessageLength.length-1;f>=0;--f)u=n.fullMessageLength[f]*8+c,c=u/4294967296>>>0,s.putInt32Le(u>>>0);var h={h0:r.h0,h1:r.h1,h2:r.h2,h3:r.h3};ZO(h,t,s);var m=_a.util.createBuffer();return m.putInt32Le(h.h0),m.putInt32Le(h.h1),m.putInt32Le(h.h2),m.putInt32Le(h.h3),m},n};var G2=null,gw=null,J0=null,op=null,t3=!1;function Rz(){G2="\x80",G2+=_a.util.fillString("\0",64),gw=[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],J0=[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],op=new Array(64);for(var r=0;r<64;++r)op[r]=Math.floor(Math.abs(Math.sin(r+1))*4294967296);t3=!0}o(Rz,"_init");function ZO(r,e,t){for(var n,s,i,a,u,c,f,h,m=t.length();m>=64;){for(s=r.h0,i=r.h1,a=r.h2,u=r.h3,h=0;h<16;++h)e[h]=t.getInt32Le(),c=u^i&(a^u),n=s+c+op[h]+e[h],f=J0[h],s=u,u=a,a=i,i+=n<<f|n>>>32-f;for(;h<32;++h)c=a^u&(i^a),n=s+c+op[h]+e[gw[h]],f=J0[h],s=u,u=a,a=i,i+=n<<f|n>>>32-f;for(;h<48;++h)c=i^a^u,n=s+c+op[h]+e[gw[h]],f=J0[h],s=u,u=a,a=i,i+=n<<f|n>>>32-f;for(;h<64;++h)c=a^(i|~u),n=s+c+op[h]+e[gw[h]],f=J0[h],s=u,u=a,a=i,i+=n<<f|n>>>32-f;r.h0=r.h0+s|0,r.h1=r.h1+i|0,r.h2=r.h2+a|0,r.h3=r.h3+u|0,m-=64}}o(ZO,"_update")});var _l=Z((zpe,s3)=>{"use strict";var xw=$t();lr();var n3=s3.exports=xw.pem=xw.pem||{};n3.encode=function(r,e){e=e||{};var t="-----BEGIN "+r.type+`-----\r
8
+ `,n;if(r.procType&&(n={name:"Proc-Type",values:[String(r.procType.version),r.procType.type]},t+=yw(n)),r.contentDomain&&(n={name:"Content-Domain",values:[r.contentDomain]},t+=yw(n)),r.dekInfo&&(n={name:"DEK-Info",values:[r.dekInfo.algorithm]},r.dekInfo.parameters&&n.values.push(r.dekInfo.parameters),t+=yw(n)),r.headers)for(var s=0;s<r.headers.length;++s)t+=yw(r.headers[s]);return r.procType&&(t+=`\r
9
+ `),t+=xw.util.encode64(r.body,e.maxline||64)+`\r
10
+ `,t+="-----END "+r.type+`-----\r
11
+ `,t};n3.decode=function(r){for(var e=[],t=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,n=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,s=/\r?\n/,i;i=t.exec(r),!!i;){var a=i[1];a==="NEW CERTIFICATE REQUEST"&&(a="CERTIFICATE REQUEST");var u={type:a,procType:null,contentDomain:null,dekInfo:null,headers:[],body:xw.util.decode64(i[3])};if(e.push(u),!!i[2]){for(var c=i[2].split(s),f=0;i&&f<c.length;){for(var h=c[f].replace(/\s+$/,""),m=f+1;m<c.length;++m){var g=c[m];if(!/\s/.test(g[0]))break;h+=g,f=m}if(i=h.match(n),i){for(var x={name:i[1],values:[]},v=i[2].split(","),w=0;w<v.length;++w)x.values.push(Pz(v[w]));if(u.procType)if(!u.contentDomain&&x.name==="Content-Domain")u.contentDomain=v[0]||"";else if(!u.dekInfo&&x.name==="DEK-Info"){if(x.values.length===0)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');u.dekInfo={algorithm:v[0],parameters:v[1]||null}}else u.headers.push(x);else{if(x.name!=="Proc-Type")throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(x.values.length!==2)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');u.procType={version:v[0],type:v[1]}}}++f}if(u.procType==="ENCRYPTED"&&!u.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(e.length===0)throw new Error("Invalid PEM formatted message.");return e};function yw(r){for(var e=r.name+": ",t=[],n=o(function(c,f){return" "+f},"insertSpace"),s=0;s<r.values.length;++s)t.push(r.values[s].replace(/^(\S+\r\n)/,n));e+=t.join(",")+`\r
12
+ `;for(var i=0,a=-1,s=0;s<e.length;++s,++i)if(i>65&&a!==-1){var u=e[a];u===","?(++a,e=e.substr(0,a)+`\r
13
+ `+e.substr(a)):e=e.substr(0,a)+`\r
14
+ `+u+e.substr(a+1),i=s-a-1,a=-1,++s}else(e[s]===" "||e[s]===" "||e[s]===",")&&(a=s);return e}o(yw,"foldHeader");function Pz(r){return r.replace(/^\s+/,"")}o(Pz,"ltrim")});var Y0=Z((Ype,a3)=>{"use strict";var Hr=$t();lw();F2();lr();a3.exports=Hr.des=Hr.des||{};Hr.des.startEncrypting=function(r,e,t,n){var s=ww({key:r,output:t,decrypt:!1,mode:n||(e===null?"ECB":"CBC")});return s.start(e),s};Hr.des.createEncryptionCipher=function(r,e){return ww({key:r,output:null,decrypt:!1,mode:e})};Hr.des.startDecrypting=function(r,e,t,n){var s=ww({key:r,output:t,decrypt:!0,mode:n||(e===null?"ECB":"CBC")});return s.start(e),s};Hr.des.createDecryptionCipher=function(r,e){return ww({key:r,output:null,decrypt:!0,mode:e})};Hr.des.Algorithm=function(r,e){var t=this;t.name=r,t.mode=new e({blockSize:8,cipher:{encrypt:o(function(n,s){return i3(t._keys,n,s,!1)},"encrypt"),decrypt:o(function(n,s){return i3(t._keys,n,s,!0)},"decrypt")}}),t._init=!1};Hr.des.Algorithm.prototype.initialize=function(r){if(!this._init){var e=Hr.util.createBuffer(r.key);if(this.name.indexOf("3DES")===0&&e.length()!==24)throw new Error("Invalid Triple-DES key size: "+e.length()*8);this._keys=qz(e),this._init=!0}};Ba("DES-ECB",Hr.cipher.modes.ecb);Ba("DES-CBC",Hr.cipher.modes.cbc);Ba("DES-CFB",Hr.cipher.modes.cfb);Ba("DES-OFB",Hr.cipher.modes.ofb);Ba("DES-CTR",Hr.cipher.modes.ctr);Ba("3DES-ECB",Hr.cipher.modes.ecb);Ba("3DES-CBC",Hr.cipher.modes.cbc);Ba("3DES-CFB",Hr.cipher.modes.cfb);Ba("3DES-OFB",Hr.cipher.modes.ofb);Ba("3DES-CTR",Hr.cipher.modes.ctr);function Ba(r,e){var t=o(function(){return new Hr.des.Algorithm(r,e)},"factory");Hr.cipher.registerAlgorithm(r,t)}o(Ba,"registerAlgorithm");var Oz=[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],kz=[-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],Lz=[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],Vz=[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],Uz=[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],jz=[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],Mz=[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],Fz=[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 qz(r){for(var e=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],t=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],n=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],s=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],i=[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],u=[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],f=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],h=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],m=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],g=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],x=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],v=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],w=r.length()>8?3:1,S=[],A=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],T=0,b,E=0;E<w;E++){var C=r.getInt32(),_=r.getInt32();b=(C>>>4^_)&252645135,_^=b,C^=b<<4,b=(_>>>-16^C)&65535,C^=b,_^=b<<-16,b=(C>>>2^_)&858993459,_^=b,C^=b<<2,b=(_>>>-16^C)&65535,C^=b,_^=b<<-16,b=(C>>>1^_)&1431655765,_^=b,C^=b<<1,b=(_>>>8^C)&16711935,C^=b,_^=b<<8,b=(C>>>1^_)&1431655765,_^=b,C^=b<<1,b=C<<8|_>>>20&240,C=_<<24|_<<8&16711680|_>>>8&65280|_>>>24&240,_=b;for(var F=0;F<A.length;++F){A[F]?(C=C<<2|C>>>26,_=_<<2|_>>>26):(C=C<<1|C>>>27,_=_<<1|_>>>27),C&=-15,_&=-15;var R=e[C>>>28]|t[C>>>24&15]|n[C>>>20&15]|s[C>>>16&15]|i[C>>>12&15]|a[C>>>8&15]|u[C>>>4&15],q=c[_>>>28]|f[_>>>24&15]|h[_>>>20&15]|m[_>>>16&15]|g[_>>>12&15]|x[_>>>8&15]|v[_>>>4&15];b=(q>>>16^R)&65535,S[T++]=R^b,S[T++]=q^b<<16}}return S}o(qz,"_createKeys");function i3(r,e,t,n){var s=r.length===32?3:9,i;s===3?i=n?[30,-2,-2]:[0,32,2]:i=n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var a,u=e[0],c=e[1];a=(u>>>4^c)&252645135,c^=a,u^=a<<4,a=(u>>>16^c)&65535,c^=a,u^=a<<16,a=(c>>>2^u)&858993459,u^=a,c^=a<<2,a=(c>>>8^u)&16711935,u^=a,c^=a<<8,a=(u>>>1^c)&1431655765,c^=a,u^=a<<1,u=u<<1|u>>>31,c=c<<1|c>>>31;for(var f=0;f<s;f+=3){for(var h=i[f+1],m=i[f+2],g=i[f];g!=h;g+=m){var x=c^r[g],v=(c>>>4|c<<28)^r[g+1];a=u,u=c,c=a^(kz[x>>>24&63]|Vz[x>>>16&63]|jz[x>>>8&63]|Fz[x&63]|Oz[v>>>24&63]|Lz[v>>>16&63]|Uz[v>>>8&63]|Mz[v&63])}a=u,u=c,c=a}u=u>>>1|u<<31,c=c>>>1|c<<31,a=(u>>>1^c)&1431655765,c^=a,u^=a<<1,a=(c>>>8^u)&16711935,u^=a,c^=a<<8,a=(c>>>2^u)&858993459,u^=a,c^=a<<2,a=(u>>>16^c)&65535,c^=a,u^=a<<16,a=(u>>>4^c)&252645135,c^=a,u^=a<<4,t[0]=u,t[1]=c}o(i3,"_updateBlock");function ww(r){r=r||{};var e=(r.mode||"CBC").toUpperCase(),t="DES-"+e,n;r.decrypt?n=Hr.cipher.createDecipher(t,r.key):n=Hr.cipher.createCipher(t,r.key);var s=n.start;return n.start=function(i,a){var u=null;a instanceof Hr.util.ByteBuffer&&(u=a,a={}),a=a||{},a.output=u,a.iv=i,s.call(n,a)},n}o(ww,"_createCipher")});var Sw=Z((Zpe,o3)=>{"use strict";var vs=$t();ap();Ia();lr();var Hz=vs.pkcs5=vs.pkcs5||{},No;vs.util.isNodejs&&!vs.options.usePureJavaScript&&(No=Xe("crypto"));o3.exports=vs.pbkdf2=Hz.pbkdf2=function(r,e,t,n,s,i){if(typeof s=="function"&&(i=s,s=null),vs.util.isNodejs&&!vs.options.usePureJavaScript&&No.pbkdf2&&(s===null||typeof s!="object")&&(No.pbkdf2Sync.length>4||!s||s==="sha1"))return typeof s!="string"&&(s="sha1"),r=Buffer.from(r,"binary"),e=Buffer.from(e,"binary"),i?No.pbkdf2Sync.length===4?No.pbkdf2(r,e,t,n,function(b,E){if(b)return i(b);i(null,E.toString("binary"))}):No.pbkdf2(r,e,t,n,s,function(b,E){if(b)return i(b);i(null,E.toString("binary"))}):No.pbkdf2Sync.length===4?No.pbkdf2Sync(r,e,t,n).toString("binary"):No.pbkdf2Sync(r,e,t,n,s).toString("binary");if((typeof s>"u"||s===null)&&(s="sha1"),typeof s=="string"){if(!(s in vs.md.algorithms))throw new Error("Unknown hash algorithm: "+s);s=vs.md[s].create()}var a=s.digestLength;if(n>4294967295*a){var u=new Error("Derived key is too long.");if(i)return i(u);throw u}var c=Math.ceil(n/a),f=n-(c-1)*a,h=vs.hmac.create();h.start(s,r);var m="",g,x,v;if(!i){for(var w=1;w<=c;++w){h.start(null,null),h.update(e),h.update(vs.util.int32ToBytes(w)),g=v=h.digest().getBytes();for(var S=2;S<=t;++S)h.start(null,null),h.update(v),x=h.digest().getBytes(),g=vs.util.xorBytes(g,x,a),v=x;m+=w<c?g:g.substr(0,f)}return m}var w=1,S;function A(){if(w>c)return i(null,m);h.start(null,null),h.update(e),h.update(vs.util.int32ToBytes(w)),g=v=h.digest().getBytes(),S=2,T()}o(A,"outer");function T(){if(S<=t)return h.start(null,null),h.update(v),x=h.digest().getBytes(),g=vs.util.xorBytes(g,x,a),v=x,++S,vs.util.setImmediate(T);m+=w<c?g:g.substr(0,f),++w,A()}o(T,"inner"),A()}});var W2=Z((tde,h3)=>{"use strict";var Da=$t();Ia();lr();var c3=h3.exports=Da.sha256=Da.sha256||{};Da.md.sha256=Da.md.algorithms.sha256=c3;c3.create=function(){l3||Kz();var r=null,e=Da.util.createBuffer(),t=new Array(64),n={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var s=n.messageLengthSize/4,i=0;i<s;++i)n.fullMessageLength.push(0);return e=Da.util.createBuffer(),r={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},n},n.start(),n.update=function(s,i){i==="utf8"&&(s=Da.util.encodeUtf8(s));var a=s.length;n.messageLength+=a,a=[a/4294967296>>>0,a>>>0];for(var u=n.fullMessageLength.length-1;u>=0;--u)n.fullMessageLength[u]+=a[1],a[1]=a[0]+(n.fullMessageLength[u]/4294967296>>>0),n.fullMessageLength[u]=n.fullMessageLength[u]>>>0,a[0]=a[1]/4294967296>>>0;return e.putBytes(s),u3(r,t,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var s=Da.util.createBuffer();s.putBytes(e.bytes());var i=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,a=i&n.blockLength-1;s.putBytes(X2.substr(0,n.blockLength-a));for(var u,c,f=n.fullMessageLength[0]*8,h=0;h<n.fullMessageLength.length-1;++h)u=n.fullMessageLength[h+1]*8,c=u/4294967296>>>0,f+=c,s.putInt32(f>>>0),f=u>>>0;s.putInt32(f);var m={h0:r.h0,h1:r.h1,h2:r.h2,h3:r.h3,h4:r.h4,h5:r.h5,h6:r.h6,h7:r.h7};u3(m,t,s);var g=Da.util.createBuffer();return g.putInt32(m.h0),g.putInt32(m.h1),g.putInt32(m.h2),g.putInt32(m.h3),g.putInt32(m.h4),g.putInt32(m.h5),g.putInt32(m.h6),g.putInt32(m.h7),g},n};var X2=null,l3=!1,f3=null;function Kz(){X2="\x80",X2+=Da.util.fillString("\0",64),f3=[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],l3=!0}o(Kz,"_init");function u3(r,e,t){for(var n,s,i,a,u,c,f,h,m,g,x,v,w,S,A,T=t.length();T>=64;){for(f=0;f<16;++f)e[f]=t.getInt32();for(;f<64;++f)n=e[f-2],n=(n>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,s=e[f-15],s=(s>>>7|s<<25)^(s>>>18|s<<14)^s>>>3,e[f]=n+e[f-7]+s+e[f-16]|0;for(h=r.h0,m=r.h1,g=r.h2,x=r.h3,v=r.h4,w=r.h5,S=r.h6,A=r.h7,f=0;f<64;++f)a=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),u=S^v&(w^S),i=(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),c=h&m|g&(h^m),n=A+a+u+f3[f]+e[f],s=i+c,A=S,S=w,w=v,v=x+n>>>0,x=g,g=m,m=h,h=n+s>>>0;r.h0=r.h0+h|0,r.h1=r.h1+m|0,r.h2=r.h2+g|0,r.h3=r.h3+x|0,r.h4=r.h4+v|0,r.h5=r.h5+w|0,r.h6=r.h6+S|0,r.h7=r.h7+A|0,T-=64}}o(u3,"_update")});var z2=Z((nde,p3)=>{"use strict";var Ra=$t();lr();var bw=null;Ra.util.isNodejs&&!Ra.options.usePureJavaScript&&!process.versions["node-webkit"]&&(bw=Xe("crypto"));var $z=p3.exports=Ra.prng=Ra.prng||{};$z.create=function(r){for(var e={plugin:r,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},t=r.md,n=new Array(32),s=0;s<32;++s)n[s]=t.create();e.pools=n,e.pool=0,e.generate=function(f,h){if(!h)return e.generateSync(f);var m=e.plugin.cipher,g=e.plugin.increment,x=e.plugin.formatKey,v=e.plugin.formatSeed,w=Ra.util.createBuffer();e.key=null,S();function S(A){if(A)return h(A);if(w.length()>=f)return h(null,w.getBytes(f));if(e.generated>1048575&&(e.key=null),e.key===null)return Ra.util.nextTick(function(){i(S)});var T=m(e.key,e.seed);e.generated+=T.length,w.putBytes(T),e.key=x(m(e.key,g(e.seed))),e.seed=v(m(e.key,e.seed)),Ra.util.setImmediate(S)}o(S,"generate")},e.generateSync=function(f){var h=e.plugin.cipher,m=e.plugin.increment,g=e.plugin.formatKey,x=e.plugin.formatSeed;e.key=null;for(var v=Ra.util.createBuffer();v.length()<f;){e.generated>1048575&&(e.key=null),e.key===null&&a();var w=h(e.key,e.seed);e.generated+=w.length,v.putBytes(w),e.key=g(h(e.key,m(e.seed))),e.seed=x(h(e.key,e.seed))}return v.getBytes(f)};function i(f){if(e.pools[0].messageLength>=32)return u(),f();var h=32-e.pools[0].messageLength<<5;e.seedFile(h,function(m,g){if(m)return f(m);e.collect(g),u(),f()})}o(i,"_reseed");function a(){if(e.pools[0].messageLength>=32)return u();var f=32-e.pools[0].messageLength<<5;e.collect(e.seedFileSync(f)),u()}o(a,"_reseedSync");function u(){e.reseeds=e.reseeds===4294967295?0:e.reseeds+1;var f=e.plugin.md.create();f.update(e.keyBytes);for(var h=1,m=0;m<32;++m)e.reseeds%h===0&&(f.update(e.pools[m].digest().getBytes()),e.pools[m].start()),h=h<<1;e.keyBytes=f.digest().getBytes(),f.start(),f.update(e.keyBytes);var g=f.digest().getBytes();e.key=e.plugin.formatKey(e.keyBytes),e.seed=e.plugin.formatSeed(g),e.generated=0}o(u,"_seed");function c(f){var h=null,m=Ra.util.globalScope,g=m.crypto||m.msCrypto;g&&g.getRandomValues&&(h=o(function(C){return g.getRandomValues(C)},"getRandomValues"));var x=Ra.util.createBuffer();if(h)for(;x.length()<f;){var v=Math.max(1,Math.min(f-x.length(),65536)/4),w=new Uint32Array(Math.floor(v));try{h(w);for(var S=0;S<w.length;++S)x.putInt32(w[S])}catch(C){if(!(typeof QuotaExceededError<"u"&&C instanceof QuotaExceededError))throw C}}if(x.length()<f)for(var A,T,b,E=Math.floor(Math.random()*65536);x.length()<f;){T=16807*(E&65535),A=16807*(E>>16),T+=(A&32767)<<16,T+=A>>15,T=(T&2147483647)+(T>>31),E=T&4294967295;for(var S=0;S<3;++S)b=E>>>(S<<3),b^=Math.floor(Math.random()*256),x.putByte(b&255)}return x.getBytes(f)}return o(c,"defaultSeedFile"),bw?(e.seedFile=function(f,h){bw.randomBytes(f,function(m,g){if(m)return h(m);h(null,g.toString())})},e.seedFileSync=function(f){return bw.randomBytes(f).toString()}):(e.seedFile=function(f,h){try{h(null,c(f))}catch(m){h(m)}},e.seedFileSync=c),e.collect=function(f){for(var h=f.length,m=0;m<h;++m)e.pools[e.pool].update(f.substr(m,1)),e.pool=e.pool===31?0:e.pool+1},e.collectInt=function(f,h){for(var m="",g=0;g<h;g+=8)m+=String.fromCharCode(f>>g&255);e.collect(m)},e.registerWorker=function(f){if(f===self)e.seedFile=function(m,g){function x(v){var w=v.data;w.forge&&w.forge.prng&&(self.removeEventListener("message",x),g(w.forge.prng.err,w.forge.prng.bytes))}o(x,"listener"),self.addEventListener("message",x),self.postMessage({forge:{prng:{needed:m}}})};else{var h=o(function(m){var g=m.data;g.forge&&g.forge.prng&&e.seedFile(g.forge.prng.needed,function(x,v){f.postMessage({forge:{prng:{err:x,bytes:v}}})})},"listener");f.addEventListener("message",h)}},e}});var bi=Z((ide,J2)=>{"use strict";var _n=$t();Pu();W2();z2();lr();(function(){if(_n.random&&_n.random.getBytes){J2.exports=_n.random;return}(function(r){var e={},t=new Array(4),n=_n.util.createBuffer();e.formatKey=function(m){var g=_n.util.createBuffer(m);return m=new Array(4),m[0]=g.getInt32(),m[1]=g.getInt32(),m[2]=g.getInt32(),m[3]=g.getInt32(),_n.aes._expandKey(m,!1)},e.formatSeed=function(m){var g=_n.util.createBuffer(m);return m=new Array(4),m[0]=g.getInt32(),m[1]=g.getInt32(),m[2]=g.getInt32(),m[3]=g.getInt32(),m},e.cipher=function(m,g){return _n.aes._updateBlock(m,g,t,!1),n.putInt32(t[0]),n.putInt32(t[1]),n.putInt32(t[2]),n.putInt32(t[3]),n.getBytes()},e.increment=function(m){return++m[3],m},e.md=_n.md.sha256;function s(){var m=_n.prng.create(e);return m.getBytes=function(g,x){return m.generate(g,x)},m.getBytesSync=function(g){return m.generate(g)},m}o(s,"spawnPrng");var i=s(),a=null,u=_n.util.globalScope,c=u.crypto||u.msCrypto;if(c&&c.getRandomValues&&(a=o(function(m){return c.getRandomValues(m)},"getRandomValues")),_n.options.usePureJavaScript||!_n.util.isNodejs&&!a){if(typeof window>"u"||window.document,i.collectInt(+new Date,32),typeof navigator<"u"){var f="";for(var h in navigator)try{typeof navigator[h]=="string"&&(f+=navigator[h])}catch{}i.collect(f),f=null}r&&(r().mousemove(function(m){i.collectInt(m.clientX,16),i.collectInt(m.clientY,16)}),r().keypress(function(m){i.collectInt(m.charCode,8)}))}if(!_n.random)_n.random=i;else for(var h in i)_n.random[h]=i[h];_n.random.createInstance=s,J2.exports=_n.random})(typeof jQuery<"u"?jQuery:null)})()});var Q2=Z((ode,g3)=>{"use strict";var _s=$t();lr();var Y2=[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],d3=[1,2,3,5],Gz=o(function(r,e){return r<<e&65535|(r&65535)>>16-e},"rol"),Xz=o(function(r,e){return(r&65535)>>e|r<<16-e&65535},"ror");g3.exports=_s.rc2=_s.rc2||{};_s.rc2.expandKey=function(r,e){typeof r=="string"&&(r=_s.util.createBuffer(r)),e=e||128;var t=r,n=r.length(),s=e,i=Math.ceil(s/8),a=255>>(s&7),u;for(u=n;u<128;u++)t.putByte(Y2[t.at(u-1)+t.at(u-n)&255]);for(t.setAt(128-i,Y2[t.at(128-i)&a]),u=127-i;u>=0;u--)t.setAt(u,Y2[t.at(u+1)^t.at(u+i)]);return t};var m3=o(function(r,e,t){var n=!1,s=null,i=null,a=null,u,c,f,h,m=[];for(r=_s.rc2.expandKey(r,e),f=0;f<64;f++)m.push(r.getInt16Le());t?(u=o(function(v){for(f=0;f<4;f++)v[f]+=m[h]+(v[(f+3)%4]&v[(f+2)%4])+(~v[(f+3)%4]&v[(f+1)%4]),v[f]=Gz(v[f],d3[f]),h++},"mixRound"),c=o(function(v){for(f=0;f<4;f++)v[f]+=m[v[(f+3)%4]&63]},"mashRound")):(u=o(function(v){for(f=3;f>=0;f--)v[f]=Xz(v[f],d3[f]),v[f]-=m[h]+(v[(f+3)%4]&v[(f+2)%4])+(~v[(f+3)%4]&v[(f+1)%4]),h--},"mixRound"),c=o(function(v){for(f=3;f>=0;f--)v[f]-=m[v[(f+3)%4]&63]},"mashRound"));var g=o(function(v){var w=[];for(f=0;f<4;f++){var S=s.getInt16Le();a!==null&&(t?S^=a.getInt16Le():a.putInt16Le(S)),w.push(S&65535)}h=t?0:63;for(var A=0;A<v.length;A++)for(var T=0;T<v[A][0];T++)v[A][1](w);for(f=0;f<4;f++)a!==null&&(t?a.putInt16Le(w[f]):w[f]^=a.getInt16Le()),i.putInt16Le(w[f])},"runPlan"),x=null;return x={start:o(function(v,w){v&&typeof v=="string"&&(v=_s.util.createBuffer(v)),n=!1,s=_s.util.createBuffer(),i=w||new _s.util.createBuffer,a=v,x.output=i},"start"),update:o(function(v){for(n||s.putBuffer(v);s.length()>=8;)g([[5,u],[1,c],[6,u],[1,c],[5,u]])},"update"),finish:o(function(v){var w=!0;if(t)if(v)w=v(8,s,!t);else{var S=s.length()===8?8:8-s.length();s.fillWithByte(S,S)}if(w&&(n=!0,x.update()),!t&&(w=s.length()===0,w))if(v)w=v(8,i,!t);else{var A=i.length(),T=i.at(A-1);T>A?w=!1:i.truncate(T)}return w},"finish")},x},"createCipher");_s.rc2.startEncrypting=function(r,e,t){var n=_s.rc2.createEncryptionCipher(r,128);return n.start(e,t),n};_s.rc2.createEncryptionCipher=function(r,e){return m3(r,e,!0)};_s.rc2.startDecrypting=function(r,e,t){var n=_s.rc2.createDecryptionCipher(r,128);return n.start(e,t),n};_s.rc2.createDecryptionCipher=function(r,e){return m3(r,e,!1)}});var Z0=Z((cde,A3)=>{"use strict";var Z2=$t();A3.exports=Z2.jsbn=Z2.jsbn||{};var To,Wz=0xdeadbeefcafe,v3=(Wz&16777215)==15715070;function Oe(r,e,t){this.data=[],r!=null&&(typeof r=="number"?this.fromNumber(r,e,t):e==null&&typeof r!="string"?this.fromString(r,256):this.fromString(r,e))}o(Oe,"BigInteger");Z2.jsbn.BigInteger=Oe;function fr(){return new Oe(null)}o(fr,"nbi");function zz(r,e,t,n,s,i){for(;--i>=0;){var a=e*this.data[r++]+t.data[n]+s;s=Math.floor(a/67108864),t.data[n++]=a&67108863}return s}o(zz,"am1");function Jz(r,e,t,n,s,i){for(var a=e&32767,u=e>>15;--i>=0;){var c=this.data[r]&32767,f=this.data[r++]>>15,h=u*c+f*a;c=a*c+((h&32767)<<15)+t.data[n]+(s&1073741823),s=(c>>>30)+(h>>>15)+u*f+(s>>>30),t.data[n++]=c&1073741823}return s}o(Jz,"am2");function y3(r,e,t,n,s,i){for(var a=e&16383,u=e>>14;--i>=0;){var c=this.data[r]&16383,f=this.data[r++]>>14,h=u*c+f*a;c=a*c+((h&16383)<<14)+t.data[n]+s,s=(c>>28)+(h>>14)+u*f,t.data[n++]=c&268435455}return s}o(y3,"am3");typeof navigator>"u"?(Oe.prototype.am=y3,To=28):v3&&navigator.appName=="Microsoft Internet Explorer"?(Oe.prototype.am=Jz,To=30):v3&&navigator.appName!="Netscape"?(Oe.prototype.am=zz,To=26):(Oe.prototype.am=y3,To=28);Oe.prototype.DB=To;Oe.prototype.DM=(1<<To)-1;Oe.prototype.DV=1<<To;var eN=52;Oe.prototype.FV=Math.pow(2,eN);Oe.prototype.F1=eN-To;Oe.prototype.F2=2*To-eN;var Yz="0123456789abcdefghijklmnopqrstuvwxyz",Ew=new Array,up,Ei;up=48;for(Ei=0;Ei<=9;++Ei)Ew[up++]=Ei;up=97;for(Ei=10;Ei<36;++Ei)Ew[up++]=Ei;up=65;for(Ei=10;Ei<36;++Ei)Ew[up++]=Ei;function x3(r){return Yz.charAt(r)}o(x3,"int2char");function w3(r,e){var t=Ew[r.charCodeAt(e)];return t??-1}o(w3,"intAt");function Qz(r){for(var e=this.t-1;e>=0;--e)r.data[e]=this.data[e];r.t=this.t,r.s=this.s}o(Qz,"bnpCopyTo");function Zz(r){this.t=1,this.s=r<0?-1:0,r>0?this.data[0]=r:r<-1?this.data[0]=r+this.DV:this.t=0}o(Zz,"bnpFromInt");function ku(r){var e=fr();return e.fromInt(r),e}o(ku,"nbv");function eJ(r,e){var t;if(e==16)t=4;else if(e==8)t=3;else if(e==256)t=8;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else{this.fromRadix(r,e);return}this.t=0,this.s=0;for(var n=r.length,s=!1,i=0;--n>=0;){var a=t==8?r[n]&255:w3(r,n);if(a<0){r.charAt(n)=="-"&&(s=!0);continue}s=!1,i==0?this.data[this.t++]=a:i+t>this.DB?(this.data[this.t-1]|=(a&(1<<this.DB-i)-1)<<i,this.data[this.t++]=a>>this.DB-i):this.data[this.t-1]|=a<<i,i+=t,i>=this.DB&&(i-=this.DB)}t==8&&(r[0]&128)!=0&&(this.s=-1,i>0&&(this.data[this.t-1]|=(1<<this.DB-i)-1<<i)),this.clamp(),s&&Oe.ZERO.subTo(this,this)}o(eJ,"bnpFromString");function tJ(){for(var r=this.s&this.DM;this.t>0&&this.data[this.t-1]==r;)--this.t}o(tJ,"bnpClamp");function rJ(r){if(this.s<0)return"-"+this.negate().toString(r);var e;if(r==16)e=4;else if(r==8)e=3;else if(r==2)e=1;else if(r==32)e=5;else if(r==4)e=2;else return this.toRadix(r);var t=(1<<e)-1,n,s=!1,i="",a=this.t,u=this.DB-a*this.DB%e;if(a-- >0)for(u<this.DB&&(n=this.data[a]>>u)>0&&(s=!0,i=x3(n));a>=0;)u<e?(n=(this.data[a]&(1<<u)-1)<<e-u,n|=this.data[--a]>>(u+=this.DB-e)):(n=this.data[a]>>(u-=e)&t,u<=0&&(u+=this.DB,--a)),n>0&&(s=!0),s&&(i+=x3(n));return s?i:"0"}o(rJ,"bnToString");function nJ(){var r=fr();return Oe.ZERO.subTo(this,r),r}o(nJ,"bnNegate");function sJ(){return this.s<0?this.negate():this}o(sJ,"bnAbs");function iJ(r){var e=this.s-r.s;if(e!=0)return e;var t=this.t;if(e=t-r.t,e!=0)return this.s<0?-e:e;for(;--t>=0;)if((e=this.data[t]-r.data[t])!=0)return e;return 0}o(iJ,"bnCompareTo");function Aw(r){var e=1,t;return(t=r>>>16)!=0&&(r=t,e+=16),(t=r>>8)!=0&&(r=t,e+=8),(t=r>>4)!=0&&(r=t,e+=4),(t=r>>2)!=0&&(r=t,e+=2),(t=r>>1)!=0&&(r=t,e+=1),e}o(Aw,"nbits");function aJ(){return this.t<=0?0:this.DB*(this.t-1)+Aw(this.data[this.t-1]^this.s&this.DM)}o(aJ,"bnBitLength");function oJ(r,e){var t;for(t=this.t-1;t>=0;--t)e.data[t+r]=this.data[t];for(t=r-1;t>=0;--t)e.data[t]=0;e.t=this.t+r,e.s=this.s}o(oJ,"bnpDLShiftTo");function uJ(r,e){for(var t=r;t<this.t;++t)e.data[t-r]=this.data[t];e.t=Math.max(this.t-r,0),e.s=this.s}o(uJ,"bnpDRShiftTo");function cJ(r,e){var t=r%this.DB,n=this.DB-t,s=(1<<n)-1,i=Math.floor(r/this.DB),a=this.s<<t&this.DM,u;for(u=this.t-1;u>=0;--u)e.data[u+i+1]=this.data[u]>>n|a,a=(this.data[u]&s)<<t;for(u=i-1;u>=0;--u)e.data[u]=0;e.data[i]=a,e.t=this.t+i+1,e.s=this.s,e.clamp()}o(cJ,"bnpLShiftTo");function lJ(r,e){e.s=this.s;var t=Math.floor(r/this.DB);if(t>=this.t){e.t=0;return}var n=r%this.DB,s=this.DB-n,i=(1<<n)-1;e.data[0]=this.data[t]>>n;for(var a=t+1;a<this.t;++a)e.data[a-t-1]|=(this.data[a]&i)<<s,e.data[a-t]=this.data[a]>>n;n>0&&(e.data[this.t-t-1]|=(this.s&i)<<s),e.t=this.t-t,e.clamp()}o(lJ,"bnpRShiftTo");function fJ(r,e){for(var t=0,n=0,s=Math.min(r.t,this.t);t<s;)n+=this.data[t]-r.data[t],e.data[t++]=n&this.DM,n>>=this.DB;if(r.t<this.t){for(n-=r.s;t<this.t;)n+=this.data[t],e.data[t++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;t<r.t;)n-=r.data[t],e.data[t++]=n&this.DM,n>>=this.DB;n-=r.s}e.s=n<0?-1:0,n<-1?e.data[t++]=this.DV+n:n>0&&(e.data[t++]=n),e.t=t,e.clamp()}o(fJ,"bnpSubTo");function hJ(r,e){var t=this.abs(),n=r.abs(),s=t.t;for(e.t=s+n.t;--s>=0;)e.data[s]=0;for(s=0;s<n.t;++s)e.data[s+t.t]=t.am(0,n.data[s],e,s,0,t.t);e.s=0,e.clamp(),this.s!=r.s&&Oe.ZERO.subTo(e,e)}o(hJ,"bnpMultiplyTo");function pJ(r){for(var e=this.abs(),t=r.t=2*e.t;--t>=0;)r.data[t]=0;for(t=0;t<e.t-1;++t){var n=e.am(t,e.data[t],r,2*t,0,1);(r.data[t+e.t]+=e.am(t+1,2*e.data[t],r,2*t+1,n,e.t-t-1))>=e.DV&&(r.data[t+e.t]-=e.DV,r.data[t+e.t+1]=1)}r.t>0&&(r.data[r.t-1]+=e.am(t,e.data[t],r,2*t,0,1)),r.s=0,r.clamp()}o(pJ,"bnpSquareTo");function dJ(r,e,t){var n=r.abs();if(!(n.t<=0)){var s=this.abs();if(s.t<n.t){e?.fromInt(0),t!=null&&this.copyTo(t);return}t==null&&(t=fr());var i=fr(),a=this.s,u=r.s,c=this.DB-Aw(n.data[n.t-1]);c>0?(n.lShiftTo(c,i),s.lShiftTo(c,t)):(n.copyTo(i),s.copyTo(t));var f=i.t,h=i.data[f-1];if(h!=0){var m=h*(1<<this.F1)+(f>1?i.data[f-2]>>this.F2:0),g=this.FV/m,x=(1<<this.F1)/m,v=1<<this.F2,w=t.t,S=w-f,A=e??fr();for(i.dlShiftTo(S,A),t.compareTo(A)>=0&&(t.data[t.t++]=1,t.subTo(A,t)),Oe.ONE.dlShiftTo(f,A),A.subTo(i,i);i.t<f;)i.data[i.t++]=0;for(;--S>=0;){var T=t.data[--w]==h?this.DM:Math.floor(t.data[w]*g+(t.data[w-1]+v)*x);if((t.data[w]+=i.am(0,T,t,S,0,f))<T)for(i.dlShiftTo(S,A),t.subTo(A,t);t.data[w]<--T;)t.subTo(A,t)}e!=null&&(t.drShiftTo(f,e),a!=u&&Oe.ZERO.subTo(e,e)),t.t=f,t.clamp(),c>0&&t.rShiftTo(c,t),a<0&&Oe.ZERO.subTo(t,t)}}}o(dJ,"bnpDivRemTo");function mJ(r){var e=fr();return this.abs().divRemTo(r,null,e),this.s<0&&e.compareTo(Oe.ZERO)>0&&r.subTo(e,e),e}o(mJ,"bnMod");function Bl(r){this.m=r}o(Bl,"Classic");function gJ(r){return r.s<0||r.compareTo(this.m)>=0?r.mod(this.m):r}o(gJ,"cConvert");function vJ(r){return r}o(vJ,"cRevert");function yJ(r){r.divRemTo(this.m,null,r)}o(yJ,"cReduce");function xJ(r,e,t){r.multiplyTo(e,t),this.reduce(t)}o(xJ,"cMulTo");function wJ(r,e){r.squareTo(e),this.reduce(e)}o(wJ,"cSqrTo");Bl.prototype.convert=gJ;Bl.prototype.revert=vJ;Bl.prototype.reduce=yJ;Bl.prototype.mulTo=xJ;Bl.prototype.sqrTo=wJ;function SJ(){if(this.t<1)return 0;var r=this.data[0];if((r&1)==0)return 0;var e=r&3;return e=e*(2-(r&15)*e)&15,e=e*(2-(r&255)*e)&255,e=e*(2-((r&65535)*e&65535))&65535,e=e*(2-r*e%this.DV)%this.DV,e>0?this.DV-e:-e}o(SJ,"bnpInvDigit");function Dl(r){this.m=r,this.mp=r.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<r.DB-15)-1,this.mt2=2*r.t}o(Dl,"Montgomery");function bJ(r){var e=fr();return r.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),r.s<0&&e.compareTo(Oe.ZERO)>0&&this.m.subTo(e,e),e}o(bJ,"montConvert");function EJ(r){var e=fr();return r.copyTo(e),this.reduce(e),e}o(EJ,"montRevert");function AJ(r){for(;r.t<=this.mt2;)r.data[r.t++]=0;for(var e=0;e<this.m.t;++e){var t=r.data[e]&32767,n=t*this.mpl+((t*this.mph+(r.data[e]>>15)*this.mpl&this.um)<<15)&r.DM;for(t=e+this.m.t,r.data[t]+=this.m.am(0,n,r,e,0,this.m.t);r.data[t]>=r.DV;)r.data[t]-=r.DV,r.data[++t]++}r.clamp(),r.drShiftTo(this.m.t,r),r.compareTo(this.m)>=0&&r.subTo(this.m,r)}o(AJ,"montReduce");function CJ(r,e){r.squareTo(e),this.reduce(e)}o(CJ,"montSqrTo");function NJ(r,e,t){r.multiplyTo(e,t),this.reduce(t)}o(NJ,"montMulTo");Dl.prototype.convert=bJ;Dl.prototype.revert=EJ;Dl.prototype.reduce=AJ;Dl.prototype.mulTo=NJ;Dl.prototype.sqrTo=CJ;function TJ(){return(this.t>0?this.data[0]&1:this.s)==0}o(TJ,"bnpIsEven");function IJ(r,e){if(r>4294967295||r<1)return Oe.ONE;var t=fr(),n=fr(),s=e.convert(this),i=Aw(r)-1;for(s.copyTo(t);--i>=0;)if(e.sqrTo(t,n),(r&1<<i)>0)e.mulTo(n,s,t);else{var a=t;t=n,n=a}return e.revert(t)}o(IJ,"bnpExp");function _J(r,e){var t;return r<256||e.isEven()?t=new Bl(e):t=new Dl(e),this.exp(r,t)}o(_J,"bnModPowInt");Oe.prototype.copyTo=Qz;Oe.prototype.fromInt=Zz;Oe.prototype.fromString=eJ;Oe.prototype.clamp=tJ;Oe.prototype.dlShiftTo=oJ;Oe.prototype.drShiftTo=uJ;Oe.prototype.lShiftTo=cJ;Oe.prototype.rShiftTo=lJ;Oe.prototype.subTo=fJ;Oe.prototype.multiplyTo=hJ;Oe.prototype.squareTo=pJ;Oe.prototype.divRemTo=dJ;Oe.prototype.invDigit=SJ;Oe.prototype.isEven=TJ;Oe.prototype.exp=IJ;Oe.prototype.toString=rJ;Oe.prototype.negate=nJ;Oe.prototype.abs=sJ;Oe.prototype.compareTo=iJ;Oe.prototype.bitLength=aJ;Oe.prototype.mod=mJ;Oe.prototype.modPowInt=_J;Oe.ZERO=ku(0);Oe.ONE=ku(1);function BJ(){var r=fr();return this.copyTo(r),r}o(BJ,"bnClone");function DJ(){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]}o(DJ,"bnIntValue");function RJ(){return this.t==0?this.s:this.data[0]<<24>>24}o(RJ,"bnByteValue");function PJ(){return this.t==0?this.s:this.data[0]<<16>>16}o(PJ,"bnShortValue");function OJ(r){return Math.floor(Math.LN2*this.DB/Math.log(r))}o(OJ,"bnpChunkSize");function kJ(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}o(kJ,"bnSigNum");function LJ(r){if(r==null&&(r=10),this.signum()==0||r<2||r>36)return"0";var e=this.chunkSize(r),t=Math.pow(r,e),n=ku(t),s=fr(),i=fr(),a="";for(this.divRemTo(n,s,i);s.signum()>0;)a=(t+i.intValue()).toString(r).substr(1)+a,s.divRemTo(n,s,i);return i.intValue().toString(r)+a}o(LJ,"bnpToRadix");function VJ(r,e){this.fromInt(0),e==null&&(e=10);for(var t=this.chunkSize(e),n=Math.pow(e,t),s=!1,i=0,a=0,u=0;u<r.length;++u){var c=w3(r,u);if(c<0){r.charAt(u)=="-"&&this.signum()==0&&(s=!0);continue}a=e*a+c,++i>=t&&(this.dMultiply(n),this.dAddOffset(a,0),i=0,a=0)}i>0&&(this.dMultiply(Math.pow(e,i)),this.dAddOffset(a,0)),s&&Oe.ZERO.subTo(this,this)}o(VJ,"bnpFromRadix");function UJ(r,e,t){if(typeof e=="number")if(r<2)this.fromInt(1);else for(this.fromNumber(r,t),this.testBit(r-1)||this.bitwiseTo(Oe.ONE.shiftLeft(r-1),tN,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>r&&this.subTo(Oe.ONE.shiftLeft(r-1),this);else{var n=new Array,s=r&7;n.length=(r>>3)+1,e.nextBytes(n),s>0?n[0]&=(1<<s)-1:n[0]=0,this.fromString(n,256)}}o(UJ,"bnpFromNumber");function jJ(){var r=this.t,e=new Array;e[0]=this.s;var t=this.DB-r*this.DB%8,n,s=0;if(r-- >0)for(t<this.DB&&(n=this.data[r]>>t)!=(this.s&this.DM)>>t&&(e[s++]=n|this.s<<this.DB-t);r>=0;)t<8?(n=(this.data[r]&(1<<t)-1)<<8-t,n|=this.data[--r]>>(t+=this.DB-8)):(n=this.data[r]>>(t-=8)&255,t<=0&&(t+=this.DB,--r)),(n&128)!=0&&(n|=-256),s==0&&(this.s&128)!=(n&128)&&++s,(s>0||n!=this.s)&&(e[s++]=n);return e}o(jJ,"bnToByteArray");function MJ(r){return this.compareTo(r)==0}o(MJ,"bnEquals");function FJ(r){return this.compareTo(r)<0?this:r}o(FJ,"bnMin");function qJ(r){return this.compareTo(r)>0?this:r}o(qJ,"bnMax");function HJ(r,e,t){var n,s,i=Math.min(r.t,this.t);for(n=0;n<i;++n)t.data[n]=e(this.data[n],r.data[n]);if(r.t<this.t){for(s=r.s&this.DM,n=i;n<this.t;++n)t.data[n]=e(this.data[n],s);t.t=this.t}else{for(s=this.s&this.DM,n=i;n<r.t;++n)t.data[n]=e(s,r.data[n]);t.t=r.t}t.s=e(this.s,r.s),t.clamp()}o(HJ,"bnpBitwiseTo");function KJ(r,e){return r&e}o(KJ,"op_and");function $J(r){var e=fr();return this.bitwiseTo(r,KJ,e),e}o($J,"bnAnd");function tN(r,e){return r|e}o(tN,"op_or");function GJ(r){var e=fr();return this.bitwiseTo(r,tN,e),e}o(GJ,"bnOr");function S3(r,e){return r^e}o(S3,"op_xor");function XJ(r){var e=fr();return this.bitwiseTo(r,S3,e),e}o(XJ,"bnXor");function b3(r,e){return r&~e}o(b3,"op_andnot");function WJ(r){var e=fr();return this.bitwiseTo(r,b3,e),e}o(WJ,"bnAndNot");function zJ(){for(var r=fr(),e=0;e<this.t;++e)r.data[e]=this.DM&~this.data[e];return r.t=this.t,r.s=~this.s,r}o(zJ,"bnNot");function JJ(r){var e=fr();return r<0?this.rShiftTo(-r,e):this.lShiftTo(r,e),e}o(JJ,"bnShiftLeft");function YJ(r){var e=fr();return r<0?this.lShiftTo(-r,e):this.rShiftTo(r,e),e}o(YJ,"bnShiftRight");function QJ(r){if(r==0)return-1;var e=0;return(r&65535)==0&&(r>>=16,e+=16),(r&255)==0&&(r>>=8,e+=8),(r&15)==0&&(r>>=4,e+=4),(r&3)==0&&(r>>=2,e+=2),(r&1)==0&&++e,e}o(QJ,"lbit");function ZJ(){for(var r=0;r<this.t;++r)if(this.data[r]!=0)return r*this.DB+QJ(this.data[r]);return this.s<0?this.t*this.DB:-1}o(ZJ,"bnGetLowestSetBit");function eY(r){for(var e=0;r!=0;)r&=r-1,++e;return e}o(eY,"cbit");function tY(){for(var r=0,e=this.s&this.DM,t=0;t<this.t;++t)r+=eY(this.data[t]^e);return r}o(tY,"bnBitCount");function rY(r){var e=Math.floor(r/this.DB);return e>=this.t?this.s!=0:(this.data[e]&1<<r%this.DB)!=0}o(rY,"bnTestBit");function nY(r,e){var t=Oe.ONE.shiftLeft(r);return this.bitwiseTo(t,e,t),t}o(nY,"bnpChangeBit");function sY(r){return this.changeBit(r,tN)}o(sY,"bnSetBit");function iY(r){return this.changeBit(r,b3)}o(iY,"bnClearBit");function aY(r){return this.changeBit(r,S3)}o(aY,"bnFlipBit");function oY(r,e){for(var t=0,n=0,s=Math.min(r.t,this.t);t<s;)n+=this.data[t]+r.data[t],e.data[t++]=n&this.DM,n>>=this.DB;if(r.t<this.t){for(n+=r.s;t<this.t;)n+=this.data[t],e.data[t++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;t<r.t;)n+=r.data[t],e.data[t++]=n&this.DM,n>>=this.DB;n+=r.s}e.s=n<0?-1:0,n>0?e.data[t++]=n:n<-1&&(e.data[t++]=this.DV+n),e.t=t,e.clamp()}o(oY,"bnpAddTo");function uY(r){var e=fr();return this.addTo(r,e),e}o(uY,"bnAdd");function cY(r){var e=fr();return this.subTo(r,e),e}o(cY,"bnSubtract");function lY(r){var e=fr();return this.multiplyTo(r,e),e}o(lY,"bnMultiply");function fY(r){var e=fr();return this.divRemTo(r,e,null),e}o(fY,"bnDivide");function hY(r){var e=fr();return this.divRemTo(r,null,e),e}o(hY,"bnRemainder");function pY(r){var e=fr(),t=fr();return this.divRemTo(r,e,t),new Array(e,t)}o(pY,"bnDivideAndRemainder");function dY(r){this.data[this.t]=this.am(0,r-1,this,0,0,this.t),++this.t,this.clamp()}o(dY,"bnpDMultiply");function mY(r,e){if(r!=0){for(;this.t<=e;)this.data[this.t++]=0;for(this.data[e]+=r;this.data[e]>=this.DV;)this.data[e]-=this.DV,++e>=this.t&&(this.data[this.t++]=0),++this.data[e]}}o(mY,"bnpDAddOffset");function Q0(){}o(Q0,"NullExp");function E3(r){return r}o(E3,"nNop");function gY(r,e,t){r.multiplyTo(e,t)}o(gY,"nMulTo");function vY(r,e){r.squareTo(e)}o(vY,"nSqrTo");Q0.prototype.convert=E3;Q0.prototype.revert=E3;Q0.prototype.mulTo=gY;Q0.prototype.sqrTo=vY;function yY(r){return this.exp(r,new Q0)}o(yY,"bnPow");function xY(r,e,t){var n=Math.min(this.t+r.t,e);for(t.s=0,t.t=n;n>0;)t.data[--n]=0;var s;for(s=t.t-this.t;n<s;++n)t.data[n+this.t]=this.am(0,r.data[n],t,n,0,this.t);for(s=Math.min(r.t,e);n<s;++n)this.am(0,r.data[n],t,n,0,e-n);t.clamp()}o(xY,"bnpMultiplyLowerTo");function wY(r,e,t){--e;var n=t.t=this.t+r.t-e;for(t.s=0;--n>=0;)t.data[n]=0;for(n=Math.max(e-this.t,0);n<r.t;++n)t.data[this.t+n-e]=this.am(e-n,r.data[n],t,0,0,this.t+n-e);t.clamp(),t.drShiftTo(1,t)}o(wY,"bnpMultiplyUpperTo");function cp(r){this.r2=fr(),this.q3=fr(),Oe.ONE.dlShiftTo(2*r.t,this.r2),this.mu=this.r2.divide(r),this.m=r}o(cp,"Barrett");function SY(r){if(r.s<0||r.t>2*this.m.t)return r.mod(this.m);if(r.compareTo(this.m)<0)return r;var e=fr();return r.copyTo(e),this.reduce(e),e}o(SY,"barrettConvert");function bY(r){return r}o(bY,"barrettRevert");function EY(r){for(r.drShiftTo(this.m.t-1,this.r2),r.t>this.m.t+1&&(r.t=this.m.t+1,r.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);r.compareTo(this.r2)<0;)r.dAddOffset(1,this.m.t+1);for(r.subTo(this.r2,r);r.compareTo(this.m)>=0;)r.subTo(this.m,r)}o(EY,"barrettReduce");function AY(r,e){r.squareTo(e),this.reduce(e)}o(AY,"barrettSqrTo");function CY(r,e,t){r.multiplyTo(e,t),this.reduce(t)}o(CY,"barrettMulTo");cp.prototype.convert=SY;cp.prototype.revert=bY;cp.prototype.reduce=EY;cp.prototype.mulTo=CY;cp.prototype.sqrTo=AY;function NY(r,e){var t=r.bitLength(),n,s=ku(1),i;if(t<=0)return s;t<18?n=1:t<48?n=3:t<144?n=4:t<768?n=5:n=6,t<8?i=new Bl(e):e.isEven()?i=new cp(e):i=new Dl(e);var a=new Array,u=3,c=n-1,f=(1<<n)-1;if(a[1]=i.convert(this),n>1){var h=fr();for(i.sqrTo(a[1],h);u<=f;)a[u]=fr(),i.mulTo(h,a[u-2],a[u]),u+=2}var m=r.t-1,g,x=!0,v=fr(),w;for(t=Aw(r.data[m])-1;m>=0;){for(t>=c?g=r.data[m]>>t-c&f:(g=(r.data[m]&(1<<t+1)-1)<<c-t,m>0&&(g|=r.data[m-1]>>this.DB+t-c)),u=n;(g&1)==0;)g>>=1,--u;if((t-=u)<0&&(t+=this.DB,--m),x)a[g].copyTo(s),x=!1;else{for(;u>1;)i.sqrTo(s,v),i.sqrTo(v,s),u-=2;u>0?i.sqrTo(s,v):(w=s,s=v,v=w),i.mulTo(v,a[g],s)}for(;m>=0&&(r.data[m]&1<<t)==0;)i.sqrTo(s,v),w=s,s=v,v=w,--t<0&&(t=this.DB-1,--m)}return i.revert(s)}o(NY,"bnModPow");function TY(r){var e=this.s<0?this.negate():this.clone(),t=r.s<0?r.negate():r.clone();if(e.compareTo(t)<0){var n=e;e=t,t=n}var s=e.getLowestSetBit(),i=t.getLowestSetBit();if(i<0)return e;for(s<i&&(i=s),i>0&&(e.rShiftTo(i,e),t.rShiftTo(i,t));e.signum()>0;)(s=e.getLowestSetBit())>0&&e.rShiftTo(s,e),(s=t.getLowestSetBit())>0&&t.rShiftTo(s,t),e.compareTo(t)>=0?(e.subTo(t,e),e.rShiftTo(1,e)):(t.subTo(e,t),t.rShiftTo(1,t));return i>0&&t.lShiftTo(i,t),t}o(TY,"bnGCD");function IY(r){if(r<=0)return 0;var e=this.DV%r,t=this.s<0?r-1:0;if(this.t>0)if(e==0)t=this.data[0]%r;else for(var n=this.t-1;n>=0;--n)t=(e*t+this.data[n])%r;return t}o(IY,"bnpModInt");function _Y(r){var e=r.isEven();if(this.isEven()&&e||r.signum()==0)return Oe.ZERO;for(var t=r.clone(),n=this.clone(),s=ku(1),i=ku(0),a=ku(0),u=ku(1);t.signum()!=0;){for(;t.isEven();)t.rShiftTo(1,t),e?((!s.isEven()||!i.isEven())&&(s.addTo(this,s),i.subTo(r,i)),s.rShiftTo(1,s)):i.isEven()||i.subTo(r,i),i.rShiftTo(1,i);for(;n.isEven();)n.rShiftTo(1,n),e?((!a.isEven()||!u.isEven())&&(a.addTo(this,a),u.subTo(r,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(r,u),u.rShiftTo(1,u);t.compareTo(n)>=0?(t.subTo(n,t),e&&s.subTo(a,s),i.subTo(u,i)):(n.subTo(t,n),e&&a.subTo(s,a),u.subTo(i,u))}if(n.compareTo(Oe.ONE)!=0)return Oe.ZERO;if(u.compareTo(r)>=0)return u.subtract(r);if(u.signum()<0)u.addTo(r,u);else return u;return u.signum()<0?u.add(r):u}o(_Y,"bnModInverse");var ta=[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],BY=(1<<26)/ta[ta.length-1];function DY(r){var e,t=this.abs();if(t.t==1&&t.data[0]<=ta[ta.length-1]){for(e=0;e<ta.length;++e)if(t.data[0]==ta[e])return!0;return!1}if(t.isEven())return!1;for(e=1;e<ta.length;){for(var n=ta[e],s=e+1;s<ta.length&&n<BY;)n*=ta[s++];for(n=t.modInt(n);e<s;)if(n%ta[e++]==0)return!1}return t.millerRabin(r)}o(DY,"bnIsProbablePrime");function RY(r){var e=this.subtract(Oe.ONE),t=e.getLowestSetBit();if(t<=0)return!1;for(var n=e.shiftRight(t),s=PY(),i,a=0;a<r;++a){do i=new Oe(this.bitLength(),s);while(i.compareTo(Oe.ONE)<=0||i.compareTo(e)>=0);var u=i.modPow(n,this);if(u.compareTo(Oe.ONE)!=0&&u.compareTo(e)!=0){for(var c=1;c++<t&&u.compareTo(e)!=0;)if(u=u.modPowInt(2,this),u.compareTo(Oe.ONE)==0)return!1;if(u.compareTo(e)!=0)return!1}}return!0}o(RY,"bnpMillerRabin");function PY(){return{nextBytes:o(function(r){for(var e=0;e<r.length;++e)r[e]=Math.floor(Math.random()*256)},"nextBytes")}}o(PY,"bnGetPrng");Oe.prototype.chunkSize=OJ;Oe.prototype.toRadix=LJ;Oe.prototype.fromRadix=VJ;Oe.prototype.fromNumber=UJ;Oe.prototype.bitwiseTo=HJ;Oe.prototype.changeBit=nY;Oe.prototype.addTo=oY;Oe.prototype.dMultiply=dY;Oe.prototype.dAddOffset=mY;Oe.prototype.multiplyLowerTo=xY;Oe.prototype.multiplyUpperTo=wY;Oe.prototype.modInt=IY;Oe.prototype.millerRabin=RY;Oe.prototype.clone=BJ;Oe.prototype.intValue=DJ;Oe.prototype.byteValue=RJ;Oe.prototype.shortValue=PJ;Oe.prototype.signum=kJ;Oe.prototype.toByteArray=jJ;Oe.prototype.equals=MJ;Oe.prototype.min=FJ;Oe.prototype.max=qJ;Oe.prototype.and=$J;Oe.prototype.or=GJ;Oe.prototype.xor=XJ;Oe.prototype.andNot=WJ;Oe.prototype.not=zJ;Oe.prototype.shiftLeft=JJ;Oe.prototype.shiftRight=YJ;Oe.prototype.getLowestSetBit=ZJ;Oe.prototype.bitCount=tY;Oe.prototype.testBit=rY;Oe.prototype.setBit=sY;Oe.prototype.clearBit=iY;Oe.prototype.flipBit=aY;Oe.prototype.add=uY;Oe.prototype.subtract=cY;Oe.prototype.multiply=lY;Oe.prototype.divide=fY;Oe.prototype.remainder=hY;Oe.prototype.divideAndRemainder=pY;Oe.prototype.modPow=NY;Oe.prototype.modInverse=_Y;Oe.prototype.pow=yY;Oe.prototype.gcd=TY;Oe.prototype.isProbablePrime=DY});var lp=Z((fde,I3)=>{"use strict";var Pa=$t();Ia();lr();var N3=I3.exports=Pa.sha1=Pa.sha1||{};Pa.md.sha1=Pa.md.algorithms.sha1=N3;N3.create=function(){T3||OY();var r=null,e=Pa.util.createBuffer(),t=new Array(80),n={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var s=n.messageLengthSize/4,i=0;i<s;++i)n.fullMessageLength.push(0);return e=Pa.util.createBuffer(),r={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},n},n.start(),n.update=function(s,i){i==="utf8"&&(s=Pa.util.encodeUtf8(s));var a=s.length;n.messageLength+=a,a=[a/4294967296>>>0,a>>>0];for(var u=n.fullMessageLength.length-1;u>=0;--u)n.fullMessageLength[u]+=a[1],a[1]=a[0]+(n.fullMessageLength[u]/4294967296>>>0),n.fullMessageLength[u]=n.fullMessageLength[u]>>>0,a[0]=a[1]/4294967296>>>0;return e.putBytes(s),C3(r,t,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var s=Pa.util.createBuffer();s.putBytes(e.bytes());var i=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,a=i&n.blockLength-1;s.putBytes(rN.substr(0,n.blockLength-a));for(var u,c,f=n.fullMessageLength[0]*8,h=0;h<n.fullMessageLength.length-1;++h)u=n.fullMessageLength[h+1]*8,c=u/4294967296>>>0,f+=c,s.putInt32(f>>>0),f=u>>>0;s.putInt32(f);var m={h0:r.h0,h1:r.h1,h2:r.h2,h3:r.h3,h4:r.h4};C3(m,t,s);var g=Pa.util.createBuffer();return g.putInt32(m.h0),g.putInt32(m.h1),g.putInt32(m.h2),g.putInt32(m.h3),g.putInt32(m.h4),g},n};var rN=null,T3=!1;function OY(){rN="\x80",rN+=Pa.util.fillString("\0",64),T3=!0}o(OY,"_init");function C3(r,e,t){for(var n,s,i,a,u,c,f,h,m=t.length();m>=64;){for(s=r.h0,i=r.h1,a=r.h2,u=r.h3,c=r.h4,h=0;h<16;++h)n=t.getInt32(),e[h]=n,f=u^i&(a^u),n=(s<<5|s>>>27)+f+c+1518500249+n,c=u,u=a,a=(i<<30|i>>>2)>>>0,i=s,s=n;for(;h<20;++h)n=e[h-3]^e[h-8]^e[h-14]^e[h-16],n=n<<1|n>>>31,e[h]=n,f=u^i&(a^u),n=(s<<5|s>>>27)+f+c+1518500249+n,c=u,u=a,a=(i<<30|i>>>2)>>>0,i=s,s=n;for(;h<32;++h)n=e[h-3]^e[h-8]^e[h-14]^e[h-16],n=n<<1|n>>>31,e[h]=n,f=i^a^u,n=(s<<5|s>>>27)+f+c+1859775393+n,c=u,u=a,a=(i<<30|i>>>2)>>>0,i=s,s=n;for(;h<40;++h)n=e[h-6]^e[h-16]^e[h-28]^e[h-32],n=n<<2|n>>>30,e[h]=n,f=i^a^u,n=(s<<5|s>>>27)+f+c+1859775393+n,c=u,u=a,a=(i<<30|i>>>2)>>>0,i=s,s=n;for(;h<60;++h)n=e[h-6]^e[h-16]^e[h-28]^e[h-32],n=n<<2|n>>>30,e[h]=n,f=i&a|u&(i^a),n=(s<<5|s>>>27)+f+c+2400959708+n,c=u,u=a,a=(i<<30|i>>>2)>>>0,i=s,s=n;for(;h<80;++h)n=e[h-6]^e[h-16]^e[h-28]^e[h-32],n=n<<2|n>>>30,e[h]=n,f=i^a^u,n=(s<<5|s>>>27)+f+c+3395469782+n,c=u,u=a,a=(i<<30|i>>>2)>>>0,i=s,s=n;r.h0=r.h0+s|0,r.h1=r.h1+i|0,r.h2=r.h2+a|0,r.h3=r.h3+u|0,r.h4=r.h4+c|0,m-=64}}o(C3,"_update")});var nN=Z((pde,B3)=>{"use strict";var Oa=$t();lr();bi();lp();var _3=B3.exports=Oa.pkcs1=Oa.pkcs1||{};_3.encode_rsa_oaep=function(r,e,t){var n,s,i,a;typeof t=="string"?(n=t,s=arguments[3]||void 0,i=arguments[4]||void 0):t&&(n=t.label||void 0,s=t.seed||void 0,i=t.md||void 0,t.mgf1&&t.mgf1.md&&(a=t.mgf1.md)),i?i.start():i=Oa.md.sha1.create(),a||(a=i);var u=Math.ceil(r.n.bitLength()/8),c=u-2*i.digestLength-2;if(e.length>c){var f=new Error("RSAES-OAEP input message length is too long.");throw f.length=e.length,f.maxLength=c,f}n||(n=""),i.update(n,"raw");for(var h=i.digest(),m="",g=c-e.length,x=0;x<g;x++)m+="\0";var v=h.getBytes()+m+""+e;if(!s)s=Oa.random.getBytes(i.digestLength);else if(s.length!==i.digestLength){var f=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw f.seedLength=s.length,f.digestLength=i.digestLength,f}var w=Cw(s,u-i.digestLength-1,a),S=Oa.util.xorBytes(v,w,v.length),A=Cw(S,i.digestLength,a),T=Oa.util.xorBytes(s,A,s.length);return"\0"+T+S};_3.decode_rsa_oaep=function(r,e,t){var n,s,i;typeof t=="string"?(n=t,s=arguments[3]||void 0):t&&(n=t.label||void 0,s=t.md||void 0,t.mgf1&&t.mgf1.md&&(i=t.mgf1.md));var a=Math.ceil(r.n.bitLength()/8);if(e.length!==a){var S=new Error("RSAES-OAEP encoded message length is invalid.");throw S.length=e.length,S.expectedLength=a,S}if(s===void 0?s=Oa.md.sha1.create():s.start(),i||(i=s),a<2*s.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");n||(n=""),s.update(n,"raw");for(var u=s.digest().getBytes(),c=e.charAt(0),f=e.substring(1,s.digestLength+1),h=e.substring(1+s.digestLength),m=Cw(h,s.digestLength,i),g=Oa.util.xorBytes(f,m,f.length),x=Cw(g,a-s.digestLength-1,i),v=Oa.util.xorBytes(h,x,h.length),w=v.substring(0,s.digestLength),S=c!=="\0",A=0;A<s.digestLength;++A)S|=u.charAt(A)!==w.charAt(A);for(var T=1,b=s.digestLength,E=s.digestLength;E<v.length;E++){var C=v.charCodeAt(E),_=C&1^1,F=T?65534:0;S|=C&F,T=T&_,b+=T}if(S||v.charCodeAt(b)!==1)throw new Error("Invalid RSAES-OAEP padding.");return v.substring(b+1)};function Cw(r,e,t){t||(t=Oa.md.sha1.create());for(var n="",s=Math.ceil(e/t.digestLength),i=0;i<s;++i){var a=String.fromCharCode(i>>24&255,i>>16&255,i>>8&255,i&255);t.start(),t.update(r+a),n+=t.digest().getBytes()}return n.substring(0,e)}o(Cw,"rsa_mgf1")});var iN=Z((mde,sN)=>{"use strict";var Lu=$t();lr();Z0();bi();(function(){if(Lu.prime){sN.exports=Lu.prime;return}var r=sN.exports=Lu.prime=Lu.prime||{},e=Lu.jsbn.BigInteger,t=[6,4,2,4,2,4,6,2],n=new e(null);n.fromInt(30);var s=o(function(m,g){return m|g},"op_or");r.generateProbablePrime=function(m,g,x){typeof g=="function"&&(x=g,g={}),g=g||{};var v=g.algorithm||"PRIMEINC";typeof v=="string"&&(v={name:v}),v.options=v.options||{};var w=g.prng||Lu.random,S={nextBytes:o(function(A){for(var T=w.getBytesSync(A.length),b=0;b<A.length;++b)A[b]=T.charCodeAt(b)},"nextBytes")};if(v.name==="PRIMEINC")return i(m,S,v.options,x);throw new Error("Invalid prime generation algorithm: "+v.name)};function i(m,g,x,v){return"workers"in x?c(m,g,x,v):a(m,g,x,v)}o(i,"primeincFindPrime");function a(m,g,x,v){var w=f(m,g),S=0,A=h(w.bitLength());"millerRabinTests"in x&&(A=x.millerRabinTests);var T=10;"maxBlockTime"in x&&(T=x.maxBlockTime),u(w,m,g,S,A,T,v)}o(a,"primeincFindPrimeWithoutWorkers");function u(m,g,x,v,w,S,A){var T=+new Date;do{if(m.bitLength()>g&&(m=f(g,x)),m.isProbablePrime(w))return A(null,m);m.dAddOffset(t[v++%8],0)}while(S<0||+new Date-T<S);Lu.util.setImmediate(function(){u(m,g,x,v,w,S,A)})}o(u,"_primeinc");function c(m,g,x,v){if(typeof Worker>"u")return a(m,g,x,v);var w=f(m,g),S=x.workers,A=x.workLoad||100,T=A*30/8,b=x.workerScript||"forge/prime.worker.js";if(S===-1)return Lu.util.estimateCores(function(C,_){C&&(_=2),S=_-1,E()});E();function E(){S=Math.max(1,S);for(var C=[],_=0;_<S;++_)C[_]=new Worker(b);for(var F=S,_=0;_<S;++_)C[_].addEventListener("message",q);var R=!1;function q(H){if(!R){--F;var K=H.data;if(K.found){for(var X=0;X<C.length;++X)C[X].terminate();return R=!0,v(null,new e(K.prime,16))}w.bitLength()>m&&(w=f(m,g));var pe=w.toString(16);H.target.postMessage({hex:pe,workLoad:A}),w.dAddOffset(T,0)}}o(q,"workerMessage")}o(E,"generate")}o(c,"primeincFindPrimeWithWorkers");function f(m,g){var x=new e(m,g),v=m-1;return x.testBit(v)||x.bitwiseTo(e.ONE.shiftLeft(v),s,x),x.dAddOffset(31-x.mod(n).byteValue(),0),x}o(f,"generateRandom");function h(m){return m<=100?27:m<=150?18:m<=200?15:m<=250?12:m<=300?9:m<=350?8:m<=400?7:m<=500?6:m<=600?5:m<=800?4:m<=1250?3:2}o(h,"getMillerRabinTests")})()});var eg=Z((vde,V3)=>{"use strict";var yt=$t();ea();Z0();Ou();nN();iN();bi();lr();typeof ar>"u"&&(ar=yt.jsbn.BigInteger);var ar,aN=yt.util.isNodejs?Xe("crypto"):null,de=yt.asn1,Ai=yt.util;yt.pki=yt.pki||{};V3.exports=yt.pki.rsa=yt.rsa=yt.rsa||{};var Vt=yt.pki,kY=[6,4,2,4,2,4,6,2],LY={name:"PrivateKeyInfo",tagClass:de.Class.UNIVERSAL,type:de.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:de.Class.UNIVERSAL,type:de.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:de.Class.UNIVERSAL,type:de.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:de.Class.UNIVERSAL,type:de.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},VY={name:"RSAPrivateKey",tagClass:de.Class.UNIVERSAL,type:de.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},UY={name:"RSAPublicKey",tagClass:de.Class.UNIVERSAL,type:de.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},jY=yt.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:de.Class.UNIVERSAL,type:de.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:de.Class.UNIVERSAL,type:de.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:de.Class.UNIVERSAL,type:de.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:de.Class.UNIVERSAL,type:de.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:de.Class.UNIVERSAL,type:de.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},MY={name:"DigestInfo",tagClass:de.Class.UNIVERSAL,type:de.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:de.Class.UNIVERSAL,type:de.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:de.Class.UNIVERSAL,type:de.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:de.Class.UNIVERSAL,type:de.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:de.Class.UNIVERSAL,type:de.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},FY=o(function(r){var e;if(r.algorithm in Vt.oids)e=Vt.oids[r.algorithm];else{var t=new Error("Unknown message digest algorithm.");throw t.algorithm=r.algorithm,t}var n=de.oidToDer(e).getBytes(),s=de.create(de.Class.UNIVERSAL,de.Type.SEQUENCE,!0,[]),i=de.create(de.Class.UNIVERSAL,de.Type.SEQUENCE,!0,[]);i.value.push(de.create(de.Class.UNIVERSAL,de.Type.OID,!1,n)),i.value.push(de.create(de.Class.UNIVERSAL,de.Type.NULL,!1,""));var a=de.create(de.Class.UNIVERSAL,de.Type.OCTETSTRING,!1,r.digest().getBytes());return s.value.push(i),s.value.push(a),de.toDer(s).getBytes()},"emsaPkcs1v15encode"),k3=o(function(r,e,t){if(t)return r.modPow(e.e,e.n);if(!e.p||!e.q)return r.modPow(e.d,e.n);e.dP||(e.dP=e.d.mod(e.p.subtract(ar.ONE))),e.dQ||(e.dQ=e.d.mod(e.q.subtract(ar.ONE))),e.qInv||(e.qInv=e.q.modInverse(e.p));var n;do n=new ar(yt.util.bytesToHex(yt.random.getBytes(e.n.bitLength()/8)),16);while(n.compareTo(e.n)>=0||!n.gcd(e.n).equals(ar.ONE));r=r.multiply(n.modPow(e.e,e.n)).mod(e.n);for(var s=r.mod(e.p).modPow(e.dP,e.p),i=r.mod(e.q).modPow(e.dQ,e.q);s.compareTo(i)<0;)s=s.add(e.p);var a=s.subtract(i).multiply(e.qInv).mod(e.p).multiply(e.q).add(i);return a=a.multiply(n.modInverse(e.n)).mod(e.n),a},"_modPow");Vt.rsa.encrypt=function(r,e,t){var n=t,s,i=Math.ceil(e.n.bitLength()/8);t!==!1&&t!==!0?(n=t===2,s=L3(r,e,t)):(s=yt.util.createBuffer(),s.putBytes(r));for(var a=new ar(s.toHex(),16),u=k3(a,e,n),c=u.toString(16),f=yt.util.createBuffer(),h=i-Math.ceil(c.length/2);h>0;)f.putByte(0),--h;return f.putBytes(yt.util.hexToBytes(c)),f.getBytes()};Vt.rsa.decrypt=function(r,e,t,n){var s=Math.ceil(e.n.bitLength()/8);if(r.length!==s){var i=new Error("Encrypted message length is invalid.");throw i.length=r.length,i.expected=s,i}var a=new ar(yt.util.createBuffer(r).toHex(),16);if(a.compareTo(e.n)>=0)throw new Error("Encrypted message is invalid.");for(var u=k3(a,e,t),c=u.toString(16),f=yt.util.createBuffer(),h=s-Math.ceil(c.length/2);h>0;)f.putByte(0),--h;return f.putBytes(yt.util.hexToBytes(c)),n!==!1?Nw(f.getBytes(),e,t):f.getBytes()};Vt.rsa.createKeyPairGenerationState=function(r,e,t){typeof r=="string"&&(r=parseInt(r,10)),r=r||2048,t=t||{};var n=t.prng||yt.random,s={nextBytes:o(function(u){for(var c=n.getBytesSync(u.length),f=0;f<u.length;++f)u[f]=c.charCodeAt(f)},"nextBytes")},i=t.algorithm||"PRIMEINC",a;if(i==="PRIMEINC")a={algorithm:i,state:0,bits:r,rng:s,eInt:e||65537,e:new ar(null),p:null,q:null,qBits:r>>1,pBits:r-(r>>1),pqState:0,num:null,keys:null},a.e.fromInt(a.eInt);else throw new Error("Invalid key generation algorithm: "+i);return a};Vt.rsa.stepKeyPairGenerationState=function(r,e){"algorithm"in r||(r.algorithm="PRIMEINC");var t=new ar(null);t.fromInt(30);for(var n=0,s=o(function(m,g){return m|g},"op_or"),i=+new Date,a,u=0;r.keys===null&&(e<=0||u<e);){if(r.state===0){var c=r.p===null?r.pBits:r.qBits,f=c-1;r.pqState===0?(r.num=new ar(c,r.rng),r.num.testBit(f)||r.num.bitwiseTo(ar.ONE.shiftLeft(f),s,r.num),r.num.dAddOffset(31-r.num.mod(t).byteValue(),0),n=0,++r.pqState):r.pqState===1?r.num.bitLength()>c?r.pqState=0:r.num.isProbablePrime(HY(r.num.bitLength()))?++r.pqState:r.num.dAddOffset(kY[n++%8],0):r.pqState===2?r.pqState=r.num.subtract(ar.ONE).gcd(r.e).compareTo(ar.ONE)===0?3:0:r.pqState===3&&(r.pqState=0,r.p===null?r.p=r.num:r.q=r.num,r.p!==null&&r.q!==null&&++r.state,r.num=null)}else if(r.state===1)r.p.compareTo(r.q)<0&&(r.num=r.p,r.p=r.q,r.q=r.num),++r.state;else if(r.state===2)r.p1=r.p.subtract(ar.ONE),r.q1=r.q.subtract(ar.ONE),r.phi=r.p1.multiply(r.q1),++r.state;else if(r.state===3)r.phi.gcd(r.e).compareTo(ar.ONE)===0?++r.state:(r.p=null,r.q=null,r.state=0);else if(r.state===4)r.n=r.p.multiply(r.q),r.n.bitLength()===r.bits?++r.state:(r.q=null,r.state=0);else if(r.state===5){var h=r.e.modInverse(r.phi);r.keys={privateKey:Vt.rsa.setPrivateKey(r.n,r.e,h,r.p,r.q,h.mod(r.p1),h.mod(r.q1),r.q.modInverse(r.p)),publicKey:Vt.rsa.setPublicKey(r.n,r.e)}}a=+new Date,u+=a-i,i=a}return r.keys!==null};Vt.rsa.generateKeyPair=function(r,e,t,n){if(arguments.length===1?typeof r=="object"?(t=r,r=void 0):typeof r=="function"&&(n=r,r=void 0):arguments.length===2?typeof r=="number"?typeof e=="function"?(n=e,e=void 0):typeof e!="number"&&(t=e,e=void 0):(t=r,n=e,r=void 0,e=void 0):arguments.length===3&&(typeof e=="number"?typeof t=="function"&&(n=t,t=void 0):(n=t,t=e,e=void 0)),t=t||{},r===void 0&&(r=t.bits||2048),e===void 0&&(e=t.e||65537),!yt.options.usePureJavaScript&&!t.prng&&r>=256&&r<=16384&&(e===65537||e===3)){if(n){if(D3("generateKeyPair"))return aN.generateKeyPair("rsa",{modulusLength:r,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(u,c,f){if(u)return n(u);n(null,{privateKey:Vt.privateKeyFromPem(f),publicKey:Vt.publicKeyFromPem(c)})});if(R3("generateKey")&&R3("exportKey"))return Ai.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:r,publicExponent:O3(e),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(u){return Ai.globalScope.crypto.subtle.exportKey("pkcs8",u.privateKey)}).then(void 0,function(u){n(u)}).then(function(u){if(u){var c=Vt.privateKeyFromAsn1(de.fromDer(yt.util.createBuffer(u)));n(null,{privateKey:c,publicKey:Vt.setRsaPublicKey(c.n,c.e)})}});if(P3("generateKey")&&P3("exportKey")){var s=Ai.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:r,publicExponent:O3(e),hash:{name:"SHA-256"}},!0,["sign","verify"]);s.oncomplete=function(u){var c=u.target.result,f=Ai.globalScope.msCrypto.subtle.exportKey("pkcs8",c.privateKey);f.oncomplete=function(h){var m=h.target.result,g=Vt.privateKeyFromAsn1(de.fromDer(yt.util.createBuffer(m)));n(null,{privateKey:g,publicKey:Vt.setRsaPublicKey(g.n,g.e)})},f.onerror=function(h){n(h)}},s.onerror=function(u){n(u)};return}}else if(D3("generateKeyPairSync")){var i=aN.generateKeyPairSync("rsa",{modulusLength:r,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:Vt.privateKeyFromPem(i.privateKey),publicKey:Vt.publicKeyFromPem(i.publicKey)}}}var a=Vt.rsa.createKeyPairGenerationState(r,e,t);if(!n)return Vt.rsa.stepKeyPairGenerationState(a,0),a.keys;qY(a,t,n)};Vt.setRsaPublicKey=Vt.rsa.setPublicKey=function(r,e){var t={n:r,e};return t.encrypt=function(n,s,i){if(typeof s=="string"?s=s.toUpperCase():s===void 0&&(s="RSAES-PKCS1-V1_5"),s==="RSAES-PKCS1-V1_5")s={encode:o(function(u,c,f){return L3(u,c,2).getBytes()},"encode")};else if(s==="RSA-OAEP"||s==="RSAES-OAEP")s={encode:o(function(u,c){return yt.pkcs1.encode_rsa_oaep(c,u,i)},"encode")};else if(["RAW","NONE","NULL",null].indexOf(s)!==-1)s={encode:o(function(u){return u},"encode")};else if(typeof s=="string")throw new Error('Unsupported encryption scheme: "'+s+'".');var a=s.encode(n,t,!0);return Vt.rsa.encrypt(a,t,!0)},t.verify=function(n,s,i,a){typeof i=="string"?i=i.toUpperCase():i===void 0&&(i="RSASSA-PKCS1-V1_5"),a===void 0&&(a={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in a||(a._parseAllDigestBytes=!0),i==="RSASSA-PKCS1-V1_5"?i={verify:o(function(c,f){f=Nw(f,t,!0);var h=de.fromDer(f,{parseAllBytes:a._parseAllDigestBytes}),m={},g=[];if(!de.validate(h,MY,m,g)){var x=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw x.errors=g,x}var v=de.derToOid(m.algorithmIdentifier);if(!(v===yt.oids.md2||v===yt.oids.md5||v===yt.oids.sha1||v===yt.oids.sha224||v===yt.oids.sha256||v===yt.oids.sha384||v===yt.oids.sha512||v===yt.oids["sha512-224"]||v===yt.oids["sha512-256"])){var x=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw x.oid=v,x}if((v===yt.oids.md2||v===yt.oids.md5)&&!("parameters"in m))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifier NULL parameters.");return c===m.digest},"verify")}:(i==="NONE"||i==="NULL"||i===null)&&(i={verify:o(function(c,f){return f=Nw(f,t,!0),c===f},"verify")});var u=Vt.rsa.decrypt(s,t,!0,!1);return i.verify(n,u,t.n.bitLength())},t};Vt.setRsaPrivateKey=Vt.rsa.setPrivateKey=function(r,e,t,n,s,i,a,u){var c={n:r,e,d:t,p:n,q:s,dP:i,dQ:a,qInv:u};return c.decrypt=function(f,h,m){typeof h=="string"?h=h.toUpperCase():h===void 0&&(h="RSAES-PKCS1-V1_5");var g=Vt.rsa.decrypt(f,c,!1,!1);if(h==="RSAES-PKCS1-V1_5")h={decode:Nw};else if(h==="RSA-OAEP"||h==="RSAES-OAEP")h={decode:o(function(x,v){return yt.pkcs1.decode_rsa_oaep(v,x,m)},"decode")};else if(["RAW","NONE","NULL",null].indexOf(h)!==-1)h={decode:o(function(x){return x},"decode")};else throw new Error('Unsupported encryption scheme: "'+h+'".');return h.decode(g,c,!1)},c.sign=function(f,h){var m=!1;typeof h=="string"&&(h=h.toUpperCase()),h===void 0||h==="RSASSA-PKCS1-V1_5"?(h={encode:FY},m=1):(h==="NONE"||h==="NULL"||h===null)&&(h={encode:o(function(){return f},"encode")},m=1);var g=h.encode(f,c.n.bitLength());return Vt.rsa.encrypt(g,c,m)},c};Vt.wrapRsaPrivateKey=function(r){return de.create(de.Class.UNIVERSAL,de.Type.SEQUENCE,!0,[de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,de.integerToDer(0).getBytes()),de.create(de.Class.UNIVERSAL,de.Type.SEQUENCE,!0,[de.create(de.Class.UNIVERSAL,de.Type.OID,!1,de.oidToDer(Vt.oids.rsaEncryption).getBytes()),de.create(de.Class.UNIVERSAL,de.Type.NULL,!1,"")]),de.create(de.Class.UNIVERSAL,de.Type.OCTETSTRING,!1,de.toDer(r).getBytes())])};Vt.privateKeyFromAsn1=function(r){var e={},t=[];if(de.validate(r,LY,e,t)&&(r=de.fromDer(yt.util.createBuffer(e.privateKey))),e={},t=[],!de.validate(r,VY,e,t)){var n=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw n.errors=t,n}var s,i,a,u,c,f,h,m;return s=yt.util.createBuffer(e.privateKeyModulus).toHex(),i=yt.util.createBuffer(e.privateKeyPublicExponent).toHex(),a=yt.util.createBuffer(e.privateKeyPrivateExponent).toHex(),u=yt.util.createBuffer(e.privateKeyPrime1).toHex(),c=yt.util.createBuffer(e.privateKeyPrime2).toHex(),f=yt.util.createBuffer(e.privateKeyExponent1).toHex(),h=yt.util.createBuffer(e.privateKeyExponent2).toHex(),m=yt.util.createBuffer(e.privateKeyCoefficient).toHex(),Vt.setRsaPrivateKey(new ar(s,16),new ar(i,16),new ar(a,16),new ar(u,16),new ar(c,16),new ar(f,16),new ar(h,16),new ar(m,16))};Vt.privateKeyToAsn1=Vt.privateKeyToRSAPrivateKey=function(r){return de.create(de.Class.UNIVERSAL,de.Type.SEQUENCE,!0,[de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,de.integerToDer(0).getBytes()),de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,ka(r.n)),de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,ka(r.e)),de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,ka(r.d)),de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,ka(r.p)),de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,ka(r.q)),de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,ka(r.dP)),de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,ka(r.dQ)),de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,ka(r.qInv))])};Vt.publicKeyFromAsn1=function(r){var e={},t=[];if(de.validate(r,jY,e,t)){var n=de.derToOid(e.publicKeyOid);if(n!==Vt.oids.rsaEncryption){var s=new Error("Cannot read public key. Unknown OID.");throw s.oid=n,s}r=e.rsaPublicKey}if(t=[],!de.validate(r,UY,e,t)){var s=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw s.errors=t,s}var i=yt.util.createBuffer(e.publicKeyModulus).toHex(),a=yt.util.createBuffer(e.publicKeyExponent).toHex();return Vt.setRsaPublicKey(new ar(i,16),new ar(a,16))};Vt.publicKeyToAsn1=Vt.publicKeyToSubjectPublicKeyInfo=function(r){return de.create(de.Class.UNIVERSAL,de.Type.SEQUENCE,!0,[de.create(de.Class.UNIVERSAL,de.Type.SEQUENCE,!0,[de.create(de.Class.UNIVERSAL,de.Type.OID,!1,de.oidToDer(Vt.oids.rsaEncryption).getBytes()),de.create(de.Class.UNIVERSAL,de.Type.NULL,!1,"")]),de.create(de.Class.UNIVERSAL,de.Type.BITSTRING,!1,[Vt.publicKeyToRSAPublicKey(r)])])};Vt.publicKeyToRSAPublicKey=function(r){return de.create(de.Class.UNIVERSAL,de.Type.SEQUENCE,!0,[de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,ka(r.n)),de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,ka(r.e))])};function L3(r,e,t){var n=yt.util.createBuffer(),s=Math.ceil(e.n.bitLength()/8);if(r.length>s-11){var i=new Error("Message is too long for PKCS#1 v1.5 padding.");throw i.length=r.length,i.max=s-11,i}n.putByte(0),n.putByte(t);var a=s-3-r.length,u;if(t===0||t===1){u=t===0?0:255;for(var c=0;c<a;++c)n.putByte(u)}else for(;a>0;){for(var f=0,h=yt.random.getBytes(a),c=0;c<a;++c)u=h.charCodeAt(c),u===0?++f:n.putByte(u);a=f}return n.putByte(0),n.putBytes(r),n}o(L3,"_encodePkcs1_v1_5");function Nw(r,e,t,n){var s=Math.ceil(e.n.bitLength()/8),i=yt.util.createBuffer(r),a=i.getByte(),u=i.getByte();if(a!==0||t&&u!==0&&u!==1||!t&&u!=2||t&&u===0&&typeof n>"u")throw new Error("Encryption block is invalid.");var c=0;if(u===0){c=s-3-n;for(var f=0;f<c;++f)if(i.getByte()!==0)throw new Error("Encryption block is invalid.")}else if(u===1)for(c=0;i.length()>1;){if(i.getByte()!==255){--i.read;break}++c}else if(u===2)for(c=0;i.length()>1;){if(i.getByte()===0){--i.read;break}++c}var h=i.getByte();if(h!==0||c!==s-3-i.length())throw new Error("Encryption block is invalid.");return i.getBytes()}o(Nw,"_decodePkcs1_v1_5");function qY(r,e,t){typeof e=="function"&&(t=e,e={}),e=e||{};var n={algorithm:{name:e.algorithm||"PRIMEINC",options:{workers:e.workers||2,workLoad:e.workLoad||100,workerScript:e.workerScript}}};"prng"in e&&(n.prng=e.prng),s();function s(){i(r.pBits,function(u,c){if(u)return t(u);if(r.p=c,r.q!==null)return a(u,r.q);i(r.qBits,a)})}o(s,"generate");function i(u,c){yt.prime.generateProbablePrime(u,n,c)}o(i,"getPrime");function a(u,c){if(u)return t(u);if(r.q=c,r.p.compareTo(r.q)<0){var f=r.p;r.p=r.q,r.q=f}if(r.p.subtract(ar.ONE).gcd(r.e).compareTo(ar.ONE)!==0){r.p=null,s();return}if(r.q.subtract(ar.ONE).gcd(r.e).compareTo(ar.ONE)!==0){r.q=null,i(r.qBits,a);return}if(r.p1=r.p.subtract(ar.ONE),r.q1=r.q.subtract(ar.ONE),r.phi=r.p1.multiply(r.q1),r.phi.gcd(r.e).compareTo(ar.ONE)!==0){r.p=r.q=null,s();return}if(r.n=r.p.multiply(r.q),r.n.bitLength()!==r.bits){r.q=null,i(r.qBits,a);return}var h=r.e.modInverse(r.phi);r.keys={privateKey:Vt.rsa.setPrivateKey(r.n,r.e,h,r.p,r.q,h.mod(r.p1),h.mod(r.q1),r.q.modInverse(r.p)),publicKey:Vt.rsa.setPublicKey(r.n,r.e)},t(null,r.keys)}o(a,"finish")}o(qY,"_generateKeyPair");function ka(r){var e=r.toString(16);e[0]>="8"&&(e="00"+e);var t=yt.util.hexToBytes(e);return t.length>1&&(t.charCodeAt(0)===0&&(t.charCodeAt(1)&128)===0||t.charCodeAt(0)===255&&(t.charCodeAt(1)&128)===128)?t.substr(1):t}o(ka,"_bnToBytes");function HY(r){return r<=100?27:r<=150?18:r<=200?15:r<=250?12:r<=300?9:r<=350?8:r<=400?7:r<=500?6:r<=600?5:r<=800?4:r<=1250?3:2}o(HY,"_getMillerRabinTests");function D3(r){return yt.util.isNodejs&&typeof aN[r]=="function"}o(D3,"_detectNodeCrypto");function R3(r){return typeof Ai.globalScope<"u"&&typeof Ai.globalScope.crypto=="object"&&typeof Ai.globalScope.crypto.subtle=="object"&&typeof Ai.globalScope.crypto.subtle[r]=="function"}o(R3,"_detectSubtleCrypto");function P3(r){return typeof Ai.globalScope<"u"&&typeof Ai.globalScope.msCrypto=="object"&&typeof Ai.globalScope.msCrypto.subtle=="object"&&typeof Ai.globalScope.msCrypto.subtle[r]=="function"}o(P3,"_detectSubtleMsCrypto");function O3(r){for(var e=yt.util.hexToBytes(r.toString(16)),t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}o(O3,"_intToUint8Array")});var oN=Z((xde,q3)=>{"use strict";var it=$t();Pu();ea();Y0();Ia();Ou();Sw();_l();bi();Q2();eg();lr();typeof U3>"u"&&(U3=it.jsbn.BigInteger);var U3,Se=it.asn1,Ft=it.pki=it.pki||{};q3.exports=Ft.pbe=it.pbe=it.pbe||{};var Rl=Ft.oids,KY={name:"EncryptedPrivateKeyInfo",tagClass:Se.Class.UNIVERSAL,type:Se.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:Se.Class.UNIVERSAL,type:Se.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Se.Class.UNIVERSAL,type:Se.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:Se.Class.UNIVERSAL,type:Se.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:Se.Class.UNIVERSAL,type:Se.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},$Y={name:"PBES2Algorithms",tagClass:Se.Class.UNIVERSAL,type:Se.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:Se.Class.UNIVERSAL,type:Se.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:Se.Class.UNIVERSAL,type:Se.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:Se.Class.UNIVERSAL,type:Se.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:Se.Class.UNIVERSAL,type:Se.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:Se.Class.UNIVERSAL,type:Se.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:Se.Class.UNIVERSAL,type:Se.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:Se.Class.UNIVERSAL,type:Se.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:Se.Class.UNIVERSAL,type:Se.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:Se.Class.UNIVERSAL,type:Se.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:Se.Class.UNIVERSAL,type:Se.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:Se.Class.UNIVERSAL,type:Se.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},GY={name:"pkcs-12PbeParams",tagClass:Se.Class.UNIVERSAL,type:Se.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:Se.Class.UNIVERSAL,type:Se.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:Se.Class.UNIVERSAL,type:Se.Type.INTEGER,constructed:!1,capture:"iterations"}]};Ft.encryptPrivateKeyInfo=function(r,e,t){t=t||{},t.saltSize=t.saltSize||8,t.count=t.count||2048,t.algorithm=t.algorithm||"aes128",t.prfAlgorithm=t.prfAlgorithm||"sha1";var n=it.random.getBytesSync(t.saltSize),s=t.count,i=Se.integerToDer(s),a,u,c;if(t.algorithm.indexOf("aes")===0||t.algorithm==="des"){var f,h,m;switch(t.algorithm){case"aes128":a=16,f=16,h=Rl["aes128-CBC"],m=it.aes.createEncryptionCipher;break;case"aes192":a=24,f=16,h=Rl["aes192-CBC"],m=it.aes.createEncryptionCipher;break;case"aes256":a=32,f=16,h=Rl["aes256-CBC"],m=it.aes.createEncryptionCipher;break;case"des":a=8,f=8,h=Rl.desCBC,m=it.des.createEncryptionCipher;break;default:var g=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw g.algorithm=t.algorithm,g}var x="hmacWith"+t.prfAlgorithm.toUpperCase(),v=F3(x),w=it.pkcs5.pbkdf2(e,n,s,a,v),S=it.random.getBytesSync(f),A=m(w);A.start(S),A.update(Se.toDer(r)),A.finish(),c=A.output.getBytes();var T=XY(n,i,a,x);u=Se.create(Se.Class.UNIVERSAL,Se.Type.SEQUENCE,!0,[Se.create(Se.Class.UNIVERSAL,Se.Type.OID,!1,Se.oidToDer(Rl.pkcs5PBES2).getBytes()),Se.create(Se.Class.UNIVERSAL,Se.Type.SEQUENCE,!0,[Se.create(Se.Class.UNIVERSAL,Se.Type.SEQUENCE,!0,[Se.create(Se.Class.UNIVERSAL,Se.Type.OID,!1,Se.oidToDer(Rl.pkcs5PBKDF2).getBytes()),T]),Se.create(Se.Class.UNIVERSAL,Se.Type.SEQUENCE,!0,[Se.create(Se.Class.UNIVERSAL,Se.Type.OID,!1,Se.oidToDer(h).getBytes()),Se.create(Se.Class.UNIVERSAL,Se.Type.OCTETSTRING,!1,S)])])])}else if(t.algorithm==="3des"){a=24;var b=new it.util.ByteBuffer(n),w=Ft.pbe.generatePkcs12Key(e,b,1,s,a),S=Ft.pbe.generatePkcs12Key(e,b,2,s,a),A=it.des.createEncryptionCipher(w);A.start(S),A.update(Se.toDer(r)),A.finish(),c=A.output.getBytes(),u=Se.create(Se.Class.UNIVERSAL,Se.Type.SEQUENCE,!0,[Se.create(Se.Class.UNIVERSAL,Se.Type.OID,!1,Se.oidToDer(Rl["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),Se.create(Se.Class.UNIVERSAL,Se.Type.SEQUENCE,!0,[Se.create(Se.Class.UNIVERSAL,Se.Type.OCTETSTRING,!1,n),Se.create(Se.Class.UNIVERSAL,Se.Type.INTEGER,!1,i.getBytes())])])}else{var g=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw g.algorithm=t.algorithm,g}var E=Se.create(Se.Class.UNIVERSAL,Se.Type.SEQUENCE,!0,[u,Se.create(Se.Class.UNIVERSAL,Se.Type.OCTETSTRING,!1,c)]);return E};Ft.decryptPrivateKeyInfo=function(r,e){var t=null,n={},s=[];if(!Se.validate(r,KY,n,s)){var i=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=s,i}var a=Se.derToOid(n.encryptionOid),u=Ft.pbe.getCipher(a,n.encryptionParams,e),c=it.util.createBuffer(n.encryptedData);return u.update(c),u.finish()&&(t=Se.fromDer(u.output)),t};Ft.encryptedPrivateKeyToPem=function(r,e){var t={type:"ENCRYPTED PRIVATE KEY",body:Se.toDer(r).getBytes()};return it.pem.encode(t,{maxline:e})};Ft.encryptedPrivateKeyFromPem=function(r){var e=it.pem.decode(r)[0];if(e.type!=="ENCRYPTED PRIVATE KEY"){var t=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw t.headerType=e.type,t}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return Se.fromDer(e.body)};Ft.encryptRsaPrivateKey=function(r,e,t){if(t=t||{},!t.legacy){var n=Ft.wrapRsaPrivateKey(Ft.privateKeyToAsn1(r));return n=Ft.encryptPrivateKeyInfo(n,e,t),Ft.encryptedPrivateKeyToPem(n)}var s,i,a,u;switch(t.algorithm){case"aes128":s="AES-128-CBC",a=16,i=it.random.getBytesSync(16),u=it.aes.createEncryptionCipher;break;case"aes192":s="AES-192-CBC",a=24,i=it.random.getBytesSync(16),u=it.aes.createEncryptionCipher;break;case"aes256":s="AES-256-CBC",a=32,i=it.random.getBytesSync(16),u=it.aes.createEncryptionCipher;break;case"3des":s="DES-EDE3-CBC",a=24,i=it.random.getBytesSync(8),u=it.des.createEncryptionCipher;break;case"des":s="DES-CBC",a=8,i=it.random.getBytesSync(8),u=it.des.createEncryptionCipher;break;default:var c=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+t.algorithm+'".');throw c.algorithm=t.algorithm,c}var f=it.pbe.opensslDeriveBytes(e,i.substr(0,8),a),h=u(f);h.start(i),h.update(Se.toDer(Ft.privateKeyToAsn1(r))),h.finish();var m={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:s,parameters:it.util.bytesToHex(i).toUpperCase()},body:h.output.getBytes()};return it.pem.encode(m)};Ft.decryptRsaPrivateKey=function(r,e){var t=null,n=it.pem.decode(r)[0];if(n.type!=="ENCRYPTED PRIVATE KEY"&&n.type!=="PRIVATE KEY"&&n.type!=="RSA PRIVATE KEY"){var s=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw s.headerType=s,s}if(n.procType&&n.procType.type==="ENCRYPTED"){var i,a;switch(n.dekInfo.algorithm){case"DES-CBC":i=8,a=it.des.createDecryptionCipher;break;case"DES-EDE3-CBC":i=24,a=it.des.createDecryptionCipher;break;case"AES-128-CBC":i=16,a=it.aes.createDecryptionCipher;break;case"AES-192-CBC":i=24,a=it.aes.createDecryptionCipher;break;case"AES-256-CBC":i=32,a=it.aes.createDecryptionCipher;break;case"RC2-40-CBC":i=5,a=o(function(m){return it.rc2.createDecryptionCipher(m,40)},"cipherFn");break;case"RC2-64-CBC":i=8,a=o(function(m){return it.rc2.createDecryptionCipher(m,64)},"cipherFn");break;case"RC2-128-CBC":i=16,a=o(function(m){return it.rc2.createDecryptionCipher(m,128)},"cipherFn");break;default:var s=new Error('Could not decrypt private key; unsupported encryption algorithm "'+n.dekInfo.algorithm+'".');throw s.algorithm=n.dekInfo.algorithm,s}var u=it.util.hexToBytes(n.dekInfo.parameters),c=it.pbe.opensslDeriveBytes(e,u.substr(0,8),i),f=a(c);if(f.start(u),f.update(it.util.createBuffer(n.body)),f.finish())t=f.output.getBytes();else return t}else t=n.body;return n.type==="ENCRYPTED PRIVATE KEY"?t=Ft.decryptPrivateKeyInfo(Se.fromDer(t),e):t=Se.fromDer(t),t!==null&&(t=Ft.privateKeyFromAsn1(t)),t};Ft.pbe.generatePkcs12Key=function(r,e,t,n,s,i){var a,u;if(typeof i>"u"||i===null){if(!("sha1"in it.md))throw new Error('"sha1" hash algorithm unavailable.');i=it.md.sha1.create()}var c=i.digestLength,f=i.blockLength,h=new it.util.ByteBuffer,m=new it.util.ByteBuffer;if(r!=null){for(u=0;u<r.length;u++)m.putInt16(r.charCodeAt(u));m.putInt16(0)}var g=m.length(),x=e.length(),v=new it.util.ByteBuffer;v.fillWithByte(t,f);var w=f*Math.ceil(x/f),S=new it.util.ByteBuffer;for(u=0;u<w;u++)S.putByte(e.at(u%x));var A=f*Math.ceil(g/f),T=new it.util.ByteBuffer;for(u=0;u<A;u++)T.putByte(m.at(u%g));var b=S;b.putBuffer(T);for(var E=Math.ceil(s/c),C=1;C<=E;C++){var _=new it.util.ByteBuffer;_.putBytes(v.bytes()),_.putBytes(b.bytes());for(var F=0;F<n;F++)i.start(),i.update(_.getBytes()),_=i.digest();var R=new it.util.ByteBuffer;for(u=0;u<f;u++)R.putByte(_.at(u%c));var q=Math.ceil(x/f)+Math.ceil(g/f),H=new it.util.ByteBuffer;for(a=0;a<q;a++){var K=new it.util.ByteBuffer(b.getBytes(f)),X=511;for(u=R.length()-1;u>=0;u--)X=X>>8,X+=R.at(u)+K.at(u),K.setAt(u,X&255);H.putBuffer(K)}b=H,h.putBuffer(_)}return h.truncate(h.length()-s),h};Ft.pbe.getCipher=function(r,e,t){switch(r){case Ft.oids.pkcs5PBES2:return Ft.pbe.getCipherForPBES2(r,e,t);case Ft.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case Ft.oids["pbewithSHAAnd40BitRC2-CBC"]:return Ft.pbe.getCipherForPKCS12PBE(r,e,t);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=r,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}};Ft.pbe.getCipherForPBES2=function(r,e,t){var n={},s=[];if(!Se.validate(e,$Y,n,s)){var i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=s,i}if(r=Se.derToOid(n.kdfOid),r!==Ft.oids.pkcs5PBKDF2){var i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw i.oid=r,i.supportedOids=["pkcs5PBKDF2"],i}if(r=Se.derToOid(n.encOid),r!==Ft.oids["aes128-CBC"]&&r!==Ft.oids["aes192-CBC"]&&r!==Ft.oids["aes256-CBC"]&&r!==Ft.oids["des-EDE3-CBC"]&&r!==Ft.oids.desCBC){var i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw i.oid=r,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i}var a=n.kdfSalt,u=it.util.createBuffer(n.kdfIterationCount);u=u.getInt(u.length()<<3);var c,f;switch(Ft.oids[r]){case"aes128-CBC":c=16,f=it.aes.createDecryptionCipher;break;case"aes192-CBC":c=24,f=it.aes.createDecryptionCipher;break;case"aes256-CBC":c=32,f=it.aes.createDecryptionCipher;break;case"des-EDE3-CBC":c=24,f=it.des.createDecryptionCipher;break;case"desCBC":c=8,f=it.des.createDecryptionCipher;break}var h=M3(n.prfOid),m=it.pkcs5.pbkdf2(t,a,u,c,h),g=n.encIv,x=f(m);return x.start(g),x};Ft.pbe.getCipherForPKCS12PBE=function(r,e,t){var n={},s=[];if(!Se.validate(e,GY,n,s)){var i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=s,i}var a=it.util.createBuffer(n.salt),u=it.util.createBuffer(n.iterations);u=u.getInt(u.length()<<3);var c,f,h;switch(r){case Ft.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:c=24,f=8,h=it.des.startDecrypting;break;case Ft.oids["pbewithSHAAnd40BitRC2-CBC"]:c=5,f=8,h=o(function(w,S){var A=it.rc2.createDecryptionCipher(w,40);return A.start(S,null),A},"cipherFn");break;default:var i=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw i.oid=r,i}var m=M3(n.prfOid),g=Ft.pbe.generatePkcs12Key(t,a,1,u,c,m);m.start();var x=Ft.pbe.generatePkcs12Key(t,a,2,u,f,m);return h(g,x)};Ft.pbe.opensslDeriveBytes=function(r,e,t,n){if(typeof n>"u"||n===null){if(!("md5"in it.md))throw new Error('"md5" hash algorithm unavailable.');n=it.md.md5.create()}e===null&&(e="");for(var s=[j3(n,r+e)],i=16,a=1;i<t;++a,i+=16)s.push(j3(n,s[a-1]+r+e));return s.join("").substr(0,t)};function j3(r,e){return r.start().update(e).digest().getBytes()}o(j3,"hash");function M3(r){var e;if(!r)e="hmacWithSHA1";else if(e=Ft.oids[Se.derToOid(r)],!e){var t=new Error("Unsupported PRF OID.");throw t.oid=r,t.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],t}return F3(e)}o(M3,"prfOidToMessageDigest");function F3(r){var e=it.md;switch(r){case"hmacWithSHA224":e=it.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":r=r.substr(8).toLowerCase();break;default:var t=new Error("Unsupported PRF algorithm.");throw t.algorithm=r,t.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],t}if(!e||!(r in e))throw new Error("Unknown hash algorithm: "+r);return e[r].create()}o(F3,"prfAlgorithmToMessageDigest");function XY(r,e,t,n){var s=Se.create(Se.Class.UNIVERSAL,Se.Type.SEQUENCE,!0,[Se.create(Se.Class.UNIVERSAL,Se.Type.OCTETSTRING,!1,r),Se.create(Se.Class.UNIVERSAL,Se.Type.INTEGER,!1,e.getBytes())]);return n!=="hmacWithSHA1"&&s.value.push(Se.create(Se.Class.UNIVERSAL,Se.Type.INTEGER,!1,it.util.hexToBytes(t.toString(16))),Se.create(Se.Class.UNIVERSAL,Se.Type.SEQUENCE,!0,[Se.create(Se.Class.UNIVERSAL,Se.Type.OID,!1,Se.oidToDer(Ft.oids[n]).getBytes()),Se.create(Se.Class.UNIVERSAL,Se.Type.NULL,!1,"")])),s}o(XY,"createPbkdf2Params")});var uN=Z((Sde,$3)=>{"use strict";var fp=$t();ea();lr();var rt=fp.asn1,hp=$3.exports=fp.pkcs7asn1=fp.pkcs7asn1||{};fp.pkcs7=fp.pkcs7||{};fp.pkcs7.asn1=hp;var H3={name:"ContentInfo",tagClass:rt.Class.UNIVERSAL,type:rt.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:rt.Class.UNIVERSAL,type:rt.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:rt.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};hp.contentInfoValidator=H3;var K3={name:"EncryptedContentInfo",tagClass:rt.Class.UNIVERSAL,type:rt.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:rt.Class.UNIVERSAL,type:rt.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:rt.Class.UNIVERSAL,type:rt.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:rt.Class.UNIVERSAL,type:rt.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:rt.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:rt.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};hp.envelopedDataValidator={name:"EnvelopedData",tagClass:rt.Class.UNIVERSAL,type:rt.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:rt.Class.UNIVERSAL,type:rt.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:rt.Class.UNIVERSAL,type:rt.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(K3)};hp.encryptedDataValidator={name:"EncryptedData",tagClass:rt.Class.UNIVERSAL,type:rt.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:rt.Class.UNIVERSAL,type:rt.Type.INTEGER,constructed:!1,capture:"version"}].concat(K3)};var WY={name:"SignerInfo",tagClass:rt.Class.UNIVERSAL,type:rt.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:rt.Class.UNIVERSAL,type:rt.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:rt.Class.UNIVERSAL,type:rt.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:rt.Class.UNIVERSAL,type:rt.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:rt.Class.UNIVERSAL,type:rt.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:rt.Class.UNIVERSAL,type:rt.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:rt.Class.UNIVERSAL,type:rt.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:rt.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:rt.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:rt.Class.UNIVERSAL,type:rt.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:rt.Class.UNIVERSAL,type:rt.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:rt.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};hp.signedDataValidator={name:"SignedData",tagClass:rt.Class.UNIVERSAL,type:rt.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:rt.Class.UNIVERSAL,type:rt.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:rt.Class.UNIVERSAL,type:rt.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},H3,{name:"SignedData.Certificates",tagClass:rt.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:rt.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:rt.Class.UNIVERSAL,type:rt.Type.SET,capture:"signerInfos",optional:!0,value:[WY]}]};hp.recipientInfoValidator={name:"RecipientInfo",tagClass:rt.Class.UNIVERSAL,type:rt.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:rt.Class.UNIVERSAL,type:rt.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:rt.Class.UNIVERSAL,type:rt.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:rt.Class.UNIVERSAL,type:rt.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:rt.Class.UNIVERSAL,type:rt.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:rt.Class.UNIVERSAL,type:rt.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:rt.Class.UNIVERSAL,type:rt.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:rt.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:rt.Class.UNIVERSAL,type:rt.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}});var cN=Z((bde,G3)=>{"use strict";var Pl=$t();lr();Pl.mgf=Pl.mgf||{};var zY=G3.exports=Pl.mgf.mgf1=Pl.mgf1=Pl.mgf1||{};zY.create=function(r){var e={generate:o(function(t,n){for(var s=new Pl.util.ByteBuffer,i=Math.ceil(n/r.digestLength),a=0;a<i;a++){var u=new Pl.util.ByteBuffer;u.putInt32(a),r.start(),r.update(t+u.getBytes()),s.putBuffer(r.digest())}return s.truncate(s.length()-n),s.getBytes()},"generate")};return e}});var W3=Z((Ade,X3)=>{"use strict";var Tw=$t();cN();X3.exports=Tw.mgf=Tw.mgf||{};Tw.mgf.mgf1=Tw.mgf1});var Iw=Z((Cde,z3)=>{"use strict";var Ol=$t();bi();lr();var JY=z3.exports=Ol.pss=Ol.pss||{};JY.create=function(r){arguments.length===3&&(r={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var e=r.md,t=r.mgf,n=e.digestLength,s=r.salt||null;typeof s=="string"&&(s=Ol.util.createBuffer(s));var i;if("saltLength"in r)i=r.saltLength;else if(s!==null)i=s.length();else throw new Error("Salt length not specified or specific salt not given.");if(s!==null&&s.length()!==i)throw new Error("Given salt length does not match length of given salt.");var a=r.prng||Ol.random,u={};return u.encode=function(c,f){var h,m=f-1,g=Math.ceil(m/8),x=c.digest().getBytes();if(g<n+i+2)throw new Error("Message is too long to encrypt.");var v;s===null?v=a.getBytesSync(i):v=s.bytes();var w=new Ol.util.ByteBuffer;w.fillWithByte(0,8),w.putBytes(x),w.putBytes(v),e.start(),e.update(w.getBytes());var S=e.digest().getBytes(),A=new Ol.util.ByteBuffer;A.fillWithByte(0,g-i-n-2),A.putByte(1),A.putBytes(v);var T=A.getBytes(),b=g-n-1,E=t.generate(S,b),C="";for(h=0;h<b;h++)C+=String.fromCharCode(T.charCodeAt(h)^E.charCodeAt(h));var _=65280>>8*g-m&255;return C=String.fromCharCode(C.charCodeAt(0)&~_)+C.substr(1),C+S+"\xBC"},u.verify=function(c,f,h){var m,g=h-1,x=Math.ceil(g/8);if(f=f.substr(-x),x<n+i+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(f.charCodeAt(x-1)!==188)throw new Error("Encoded message does not end in 0xBC.");var v=x-n-1,w=f.substr(0,v),S=f.substr(v,n),A=65280>>8*x-g&255;if((w.charCodeAt(0)&A)!==0)throw new Error("Bits beyond keysize not zero as expected.");var T=t.generate(S,v),b="";for(m=0;m<v;m++)b+=String.fromCharCode(w.charCodeAt(m)^T.charCodeAt(m));b=String.fromCharCode(b.charCodeAt(0)&~A)+b.substr(1);var E=x-n-i-2;for(m=0;m<E;m++)if(b.charCodeAt(m)!==0)throw new Error("Leftmost octets not zero as expected");if(b.charCodeAt(E)!==1)throw new Error("Inconsistent PSS signature, 0x01 marker not found");var C=b.substr(-i),_=new Ol.util.ByteBuffer;_.fillWithByte(0,8),_.putBytes(c),_.putBytes(C),e.start(),e.update(_.getBytes());var F=e.digest().getBytes();return S===F},u}});var Dw=Z((Nde,ek)=>{"use strict";var xt=$t();Pu();ea();Y0();Ia();W3();Ou();_l();Iw();eg();lr();var k=xt.asn1,$e=ek.exports=xt.pki=xt.pki||{},or=$e.oids,Qr={};Qr.CN=or.commonName;Qr.commonName="CN";Qr.C=or.countryName;Qr.countryName="C";Qr.L=or.localityName;Qr.localityName="L";Qr.ST=or.stateOrProvinceName;Qr.stateOrProvinceName="ST";Qr.O=or.organizationName;Qr.organizationName="O";Qr.OU=or.organizationalUnitName;Qr.organizationalUnitName="OU";Qr.E=or.emailAddress;Qr.emailAddress="E";var Y3=xt.pki.rsa.publicKeyValidator,YY={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},Y3,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},QY={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},ZY={name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},Y3,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},eQ={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[ZY,{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};$e.RDNAttributesAsArray=function(r,e){for(var t=[],n,s,i,a=0;a<r.value.length;++a){n=r.value[a];for(var u=0;u<n.value.length;++u)i={},s=n.value[u],i.type=k.derToOid(s.value[0].value),i.value=s.value[1].value,i.valueTagClass=s.value[1].type,i.type in or&&(i.name=or[i.type],i.name in Qr&&(i.shortName=Qr[i.name])),e&&(e.update(i.type),e.update(i.value)),t.push(i)}return t};$e.CRIAttributesAsArray=function(r){for(var e=[],t=0;t<r.length;++t)for(var n=r[t],s=k.derToOid(n.value[0].value),i=n.value[1].value,a=0;a<i.length;++a){var u={};if(u.type=s,u.value=i[a].value,u.valueTagClass=i[a].type,u.type in or&&(u.name=or[u.type],u.name in Qr&&(u.shortName=Qr[u.name])),u.type===or.extensionRequest){u.extensions=[];for(var c=0;c<u.value.length;++c)u.extensions.push($e.certificateExtensionFromAsn1(u.value[c]))}e.push(u)}return e};function Vu(r,e){typeof e=="string"&&(e={shortName:e});for(var t=null,n,s=0;t===null&&s<r.attributes.length;++s)n=r.attributes[s],(e.type&&e.type===n.type||e.name&&e.name===n.name||e.shortName&&e.shortName===n.shortName)&&(t=n);return t}o(Vu,"_getAttribute");var _w=o(function(r,e,t){var n={};if(r!==or["RSASSA-PSS"])return n;t&&(n={hash:{algorithmOid:or.sha1},mgf:{algorithmOid:or.mgf1,hash:{algorithmOid:or.sha1}},saltLength:20});var s={},i=[];if(!k.validate(e,QY,s,i)){var a=new Error("Cannot read RSASSA-PSS parameter block.");throw a.errors=i,a}return s.hashOid!==void 0&&(n.hash=n.hash||{},n.hash.algorithmOid=k.derToOid(s.hashOid)),s.maskGenOid!==void 0&&(n.mgf=n.mgf||{},n.mgf.algorithmOid=k.derToOid(s.maskGenOid),n.mgf.hash=n.mgf.hash||{},n.mgf.hash.algorithmOid=k.derToOid(s.maskGenHashOid)),s.saltLength!==void 0&&(n.saltLength=s.saltLength.charCodeAt(0)),n},"_readSignatureParameters"),Bw=o(function(r){switch(or[r.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return xt.md.sha1.create();case"md5WithRSAEncryption":return xt.md.md5.create();case"sha256WithRSAEncryption":return xt.md.sha256.create();case"sha384WithRSAEncryption":return xt.md.sha384.create();case"sha512WithRSAEncryption":return xt.md.sha512.create();case"RSASSA-PSS":return xt.md.sha256.create();default:var e=new Error("Could not compute "+r.type+" digest. Unknown signature OID.");throw e.signatureOid=r.signatureOid,e}},"_createSignatureDigest"),Q3=o(function(r){var e=r.certificate,t;switch(e.signatureOid){case or.sha1WithRSAEncryption:case or.sha1WithRSASignature:break;case or["RSASSA-PSS"]:var n,s;if(n=or[e.signatureParameters.mgf.hash.algorithmOid],n===void 0||xt.md[n]===void 0){var i=new Error("Unsupported MGF hash function.");throw i.oid=e.signatureParameters.mgf.hash.algorithmOid,i.name=n,i}if(s=or[e.signatureParameters.mgf.algorithmOid],s===void 0||xt.mgf[s]===void 0){var i=new Error("Unsupported MGF function.");throw i.oid=e.signatureParameters.mgf.algorithmOid,i.name=s,i}if(s=xt.mgf[s].create(xt.md[n].create()),n=or[e.signatureParameters.hash.algorithmOid],n===void 0||xt.md[n]===void 0){var i=new Error("Unsupported RSASSA-PSS hash function.");throw i.oid=e.signatureParameters.hash.algorithmOid,i.name=n,i}t=xt.pss.create(xt.md[n].create(),s,e.signatureParameters.saltLength);break}return e.publicKey.verify(r.md.digest().getBytes(),r.signature,t)},"_verifySignature");$e.certificateFromPem=function(r,e,t){var n=xt.pem.decode(r)[0];if(n.type!=="CERTIFICATE"&&n.type!=="X509 CERTIFICATE"&&n.type!=="TRUSTED CERTIFICATE"){var s=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw s.headerType=n.type,s}if(n.procType&&n.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var i=k.fromDer(n.body,t);return $e.certificateFromAsn1(i,e)};$e.certificateToPem=function(r,e){var t={type:"CERTIFICATE",body:k.toDer($e.certificateToAsn1(r)).getBytes()};return xt.pem.encode(t,{maxline:e})};$e.publicKeyFromPem=function(r){var e=xt.pem.decode(r)[0];if(e.type!=="PUBLIC KEY"&&e.type!=="RSA PUBLIC KEY"){var t=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw t.headerType=e.type,t}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert public key from PEM; PEM is encrypted.");var n=k.fromDer(e.body);return $e.publicKeyFromAsn1(n)};$e.publicKeyToPem=function(r,e){var t={type:"PUBLIC KEY",body:k.toDer($e.publicKeyToAsn1(r)).getBytes()};return xt.pem.encode(t,{maxline:e})};$e.publicKeyToRSAPublicKeyPem=function(r,e){var t={type:"RSA PUBLIC KEY",body:k.toDer($e.publicKeyToRSAPublicKey(r)).getBytes()};return xt.pem.encode(t,{maxline:e})};$e.getPublicKeyFingerprint=function(r,e){e=e||{};var t=e.md||xt.md.sha1.create(),n=e.type||"RSAPublicKey",s;switch(n){case"RSAPublicKey":s=k.toDer($e.publicKeyToRSAPublicKey(r)).getBytes();break;case"SubjectPublicKeyInfo":s=k.toDer($e.publicKeyToAsn1(r)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+e.type+'".')}t.start(),t.update(s);var i=t.digest();if(e.encoding==="hex"){var a=i.toHex();return e.delimiter?a.match(/.{2}/g).join(e.delimiter):a}else{if(e.encoding==="binary")return i.getBytes();if(e.encoding)throw new Error('Unknown encoding "'+e.encoding+'".')}return i};$e.certificationRequestFromPem=function(r,e,t){var n=xt.pem.decode(r)[0];if(n.type!=="CERTIFICATE REQUEST"){var s=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw s.headerType=n.type,s}if(n.procType&&n.procType.type==="ENCRYPTED")throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var i=k.fromDer(n.body,t);return $e.certificationRequestFromAsn1(i,e)};$e.certificationRequestToPem=function(r,e){var t={type:"CERTIFICATE REQUEST",body:k.toDer($e.certificationRequestToAsn1(r)).getBytes()};return xt.pem.encode(t,{maxline:e})};$e.createCertificate=function(){var r={};return r.version=2,r.serialNumber="00",r.signatureOid=null,r.signature=null,r.siginfo={},r.siginfo.algorithmOid=null,r.validity={},r.validity.notBefore=new Date,r.validity.notAfter=new Date,r.issuer={},r.issuer.getField=function(e){return Vu(r.issuer,e)},r.issuer.addField=function(e){Ci([e]),r.issuer.attributes.push(e)},r.issuer.attributes=[],r.issuer.hash=null,r.subject={},r.subject.getField=function(e){return Vu(r.subject,e)},r.subject.addField=function(e){Ci([e]),r.subject.attributes.push(e)},r.subject.attributes=[],r.subject.hash=null,r.extensions=[],r.publicKey=null,r.md=null,r.setSubject=function(e,t){Ci(e),r.subject.attributes=e,delete r.subject.uniqueId,t&&(r.subject.uniqueId=t),r.subject.hash=null},r.setIssuer=function(e,t){Ci(e),r.issuer.attributes=e,delete r.issuer.uniqueId,t&&(r.issuer.uniqueId=t),r.issuer.hash=null},r.setExtensions=function(e){for(var t=0;t<e.length;++t)Z3(e[t],{cert:r});r.extensions=e},r.getExtension=function(e){typeof e=="string"&&(e={name:e});for(var t=null,n,s=0;t===null&&s<r.extensions.length;++s)n=r.extensions[s],(e.id&&n.id===e.id||e.name&&n.name===e.name)&&(t=n);return t},r.sign=function(e,t){r.md=t||xt.md.sha1.create();var n=or[r.md.algorithm+"WithRSAEncryption"];if(!n){var s=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw s.algorithm=r.md.algorithm,s}r.signatureOid=r.siginfo.algorithmOid=n,r.tbsCertificate=$e.getTBSCertificate(r);var i=k.toDer(r.tbsCertificate);r.md.update(i.getBytes()),r.signature=e.sign(r.md)},r.verify=function(e){var t=!1;if(!r.issued(e)){var n=e.issuer,s=r.subject,i=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 i.expectedIssuer=s.attributes,i.actualIssuer=n.attributes,i}var a=e.md;if(a===null){a=Bw({signatureOid:e.signatureOid,type:"certificate"});var u=e.tbsCertificate||$e.getTBSCertificate(e),c=k.toDer(u);a.update(c.getBytes())}return a!==null&&(t=Q3({certificate:r,md:a,signature:e.signature})),t},r.isIssuer=function(e){var t=!1,n=r.issuer,s=e.subject;if(n.hash&&s.hash)t=n.hash===s.hash;else if(n.attributes.length===s.attributes.length){t=!0;for(var i,a,u=0;t&&u<n.attributes.length;++u)i=n.attributes[u],a=s.attributes[u],(i.type!==a.type||i.value!==a.value)&&(t=!1)}return t},r.issued=function(e){return e.isIssuer(r)},r.generateSubjectKeyIdentifier=function(){return $e.getPublicKeyFingerprint(r.publicKey,{type:"RSAPublicKey"})},r.verifySubjectKeyIdentifier=function(){for(var e=or.subjectKeyIdentifier,t=0;t<r.extensions.length;++t){var n=r.extensions[t];if(n.id===e){var s=r.generateSubjectKeyIdentifier().getBytes();return xt.util.hexToBytes(n.subjectKeyIdentifier)===s}}return!1},r};$e.certificateFromAsn1=function(r,e){var t={},n=[];if(!k.validate(r,YY,t,n)){var s=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw s.errors=n,s}var i=k.derToOid(t.publicKeyOid);if(i!==$e.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var a=$e.createCertificate();a.version=t.certVersion?t.certVersion.charCodeAt(0):0;var u=xt.util.createBuffer(t.certSerialNumber);a.serialNumber=u.toHex(),a.signatureOid=xt.asn1.derToOid(t.certSignatureOid),a.signatureParameters=_w(a.signatureOid,t.certSignatureParams,!0),a.siginfo.algorithmOid=xt.asn1.derToOid(t.certinfoSignatureOid),a.siginfo.parameters=_w(a.siginfo.algorithmOid,t.certinfoSignatureParams,!1),a.signature=t.certSignature;var c=[];if(t.certValidity1UTCTime!==void 0&&c.push(k.utcTimeToDate(t.certValidity1UTCTime)),t.certValidity2GeneralizedTime!==void 0&&c.push(k.generalizedTimeToDate(t.certValidity2GeneralizedTime)),t.certValidity3UTCTime!==void 0&&c.push(k.utcTimeToDate(t.certValidity3UTCTime)),t.certValidity4GeneralizedTime!==void 0&&c.push(k.generalizedTimeToDate(t.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=t.tbsCertificate,e){a.md=Bw({signatureOid:a.signatureOid,type:"certificate"});var f=k.toDer(a.tbsCertificate);a.md.update(f.getBytes())}var h=xt.md.sha1.create(),m=k.toDer(t.certIssuer);h.update(m.getBytes()),a.issuer.getField=function(v){return Vu(a.issuer,v)},a.issuer.addField=function(v){Ci([v]),a.issuer.attributes.push(v)},a.issuer.attributes=$e.RDNAttributesAsArray(t.certIssuer),t.certIssuerUniqueId&&(a.issuer.uniqueId=t.certIssuerUniqueId),a.issuer.hash=h.digest().toHex();var g=xt.md.sha1.create(),x=k.toDer(t.certSubject);return g.update(x.getBytes()),a.subject.getField=function(v){return Vu(a.subject,v)},a.subject.addField=function(v){Ci([v]),a.subject.attributes.push(v)},a.subject.attributes=$e.RDNAttributesAsArray(t.certSubject),t.certSubjectUniqueId&&(a.subject.uniqueId=t.certSubjectUniqueId),a.subject.hash=g.digest().toHex(),t.certExtensions?a.extensions=$e.certificateExtensionsFromAsn1(t.certExtensions):a.extensions=[],a.publicKey=$e.publicKeyFromAsn1(t.subjectPublicKeyInfo),a};$e.certificateExtensionsFromAsn1=function(r){for(var e=[],t=0;t<r.value.length;++t)for(var n=r.value[t],s=0;s<n.value.length;++s)e.push($e.certificateExtensionFromAsn1(n.value[s]));return e};$e.certificateExtensionFromAsn1=function(r){var e={};if(e.id=k.derToOid(r.value[0].value),e.critical=!1,r.value[1].type===k.Type.BOOLEAN?(e.critical=r.value[1].value.charCodeAt(0)!==0,e.value=r.value[2].value):e.value=r.value[1].value,e.id in or){if(e.name=or[e.id],e.name==="keyUsage"){var t=k.fromDer(e.value),n=0,s=0;t.value.length>1&&(n=t.value.charCodeAt(1),s=t.value.length>2?t.value.charCodeAt(2):0),e.digitalSignature=(n&128)===128,e.nonRepudiation=(n&64)===64,e.keyEncipherment=(n&32)===32,e.dataEncipherment=(n&16)===16,e.keyAgreement=(n&8)===8,e.keyCertSign=(n&4)===4,e.cRLSign=(n&2)===2,e.encipherOnly=(n&1)===1,e.decipherOnly=(s&128)===128}else if(e.name==="basicConstraints"){var t=k.fromDer(e.value);t.value.length>0&&t.value[0].type===k.Type.BOOLEAN?e.cA=t.value[0].value.charCodeAt(0)!==0:e.cA=!1;var i=null;t.value.length>0&&t.value[0].type===k.Type.INTEGER?i=t.value[0].value:t.value.length>1&&(i=t.value[1].value),i!==null&&(e.pathLenConstraint=k.derToInteger(i))}else if(e.name==="extKeyUsage")for(var t=k.fromDer(e.value),a=0;a<t.value.length;++a){var u=k.derToOid(t.value[a].value);u in or?e[or[u]]=!0:e[u]=!0}else if(e.name==="nsCertType"){var t=k.fromDer(e.value),n=0;t.value.length>1&&(n=t.value.charCodeAt(1)),e.client=(n&128)===128,e.server=(n&64)===64,e.email=(n&32)===32,e.objsign=(n&16)===16,e.reserved=(n&8)===8,e.sslCA=(n&4)===4,e.emailCA=(n&2)===2,e.objCA=(n&1)===1}else if(e.name==="subjectAltName"||e.name==="issuerAltName"){e.altNames=[];for(var c,t=k.fromDer(e.value),f=0;f<t.value.length;++f){c=t.value[f];var h={type:c.type,value:c.value};switch(e.altNames.push(h),c.type){case 1:case 2:case 6:break;case 7:h.ip=xt.util.bytesToIP(c.value);break;case 8:h.oid=k.derToOid(c.value);break;default:}}}else if(e.name==="subjectKeyIdentifier"){var t=k.fromDer(e.value);e.subjectKeyIdentifier=xt.util.bytesToHex(t.value)}}return e};$e.certificationRequestFromAsn1=function(r,e){var t={},n=[];if(!k.validate(r,eQ,t,n)){var s=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw s.errors=n,s}var i=k.derToOid(t.publicKeyOid);if(i!==$e.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var a=$e.createCertificationRequest();if(a.version=t.csrVersion?t.csrVersion.charCodeAt(0):0,a.signatureOid=xt.asn1.derToOid(t.csrSignatureOid),a.signatureParameters=_w(a.signatureOid,t.csrSignatureParams,!0),a.siginfo.algorithmOid=xt.asn1.derToOid(t.csrSignatureOid),a.siginfo.parameters=_w(a.siginfo.algorithmOid,t.csrSignatureParams,!1),a.signature=t.csrSignature,a.certificationRequestInfo=t.certificationRequestInfo,e){a.md=Bw({signatureOid:a.signatureOid,type:"certification request"});var u=k.toDer(a.certificationRequestInfo);a.md.update(u.getBytes())}var c=xt.md.sha1.create();return a.subject.getField=function(f){return Vu(a.subject,f)},a.subject.addField=function(f){Ci([f]),a.subject.attributes.push(f)},a.subject.attributes=$e.RDNAttributesAsArray(t.certificationRequestInfoSubject,c),a.subject.hash=c.digest().toHex(),a.publicKey=$e.publicKeyFromAsn1(t.subjectPublicKeyInfo),a.getAttribute=function(f){return Vu(a,f)},a.addAttribute=function(f){Ci([f]),a.attributes.push(f)},a.attributes=$e.CRIAttributesAsArray(t.certificationRequestInfoAttributes||[]),a};$e.createCertificationRequest=function(){var r={};return r.version=0,r.signatureOid=null,r.signature=null,r.siginfo={},r.siginfo.algorithmOid=null,r.subject={},r.subject.getField=function(e){return Vu(r.subject,e)},r.subject.addField=function(e){Ci([e]),r.subject.attributes.push(e)},r.subject.attributes=[],r.subject.hash=null,r.publicKey=null,r.attributes=[],r.getAttribute=function(e){return Vu(r,e)},r.addAttribute=function(e){Ci([e]),r.attributes.push(e)},r.md=null,r.setSubject=function(e){Ci(e),r.subject.attributes=e,r.subject.hash=null},r.setAttributes=function(e){Ci(e),r.attributes=e},r.sign=function(e,t){r.md=t||xt.md.sha1.create();var n=or[r.md.algorithm+"WithRSAEncryption"];if(!n){var s=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw s.algorithm=r.md.algorithm,s}r.signatureOid=r.siginfo.algorithmOid=n,r.certificationRequestInfo=$e.getCertificationRequestInfo(r);var i=k.toDer(r.certificationRequestInfo);r.md.update(i.getBytes()),r.signature=e.sign(r.md)},r.verify=function(){var e=!1,t=r.md;if(t===null){t=Bw({signatureOid:r.signatureOid,type:"certification request"});var n=r.certificationRequestInfo||$e.getCertificationRequestInfo(r),s=k.toDer(n);t.update(s.getBytes())}return t!==null&&(e=Q3({certificate:r,md:t,signature:r.signature})),e},r};function pp(r){for(var e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),t,n,s=r.attributes,i=0;i<s.length;++i){t=s[i];var a=t.value,u=k.Type.PRINTABLESTRING;"valueTagClass"in t&&(u=t.valueTagClass,u===k.Type.UTF8&&(a=xt.util.encodeUtf8(a))),n=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(t.type).getBytes()),k.create(k.Class.UNIVERSAL,u,!1,a)])]),e.value.push(n)}return e}o(pp,"_dnToAsn1");function Ci(r){for(var e,t=0;t<r.length;++t){if(e=r[t],typeof e.name>"u"&&(e.type&&e.type in $e.oids?e.name=$e.oids[e.type]:e.shortName&&e.shortName in Qr&&(e.name=$e.oids[Qr[e.shortName]])),typeof e.type>"u")if(e.name&&e.name in $e.oids)e.type=$e.oids[e.name];else{var n=new Error("Attribute type not specified.");throw n.attribute=e,n}if(typeof e.shortName>"u"&&e.name&&e.name in Qr&&(e.shortName=Qr[e.name]),e.type===or.extensionRequest&&(e.valueConstructed=!0,e.valueTagClass=k.Type.SEQUENCE,!e.value&&e.extensions)){e.value=[];for(var s=0;s<e.extensions.length;++s)e.value.push($e.certificateExtensionToAsn1(Z3(e.extensions[s])))}if(typeof e.value>"u"){var n=new Error("Attribute value not specified.");throw n.attribute=e,n}}}o(Ci,"_fillMissingFields");function Z3(r,e){if(e=e||{},typeof r.name>"u"&&r.id&&r.id in $e.oids&&(r.name=$e.oids[r.id]),typeof r.id>"u")if(r.name&&r.name in $e.oids)r.id=$e.oids[r.name];else{var t=new Error("Extension ID not specified.");throw t.extension=r,t}if(typeof r.value<"u")return r;if(r.name==="keyUsage"){var n=0,s=0,i=0;r.digitalSignature&&(s|=128,n=7),r.nonRepudiation&&(s|=64,n=6),r.keyEncipherment&&(s|=32,n=5),r.dataEncipherment&&(s|=16,n=4),r.keyAgreement&&(s|=8,n=3),r.keyCertSign&&(s|=4,n=2),r.cRLSign&&(s|=2,n=1),r.encipherOnly&&(s|=1,n=0),r.decipherOnly&&(i|=128,n=7);var a=String.fromCharCode(n);i!==0?a+=String.fromCharCode(s)+String.fromCharCode(i):s!==0&&(a+=String.fromCharCode(s)),r.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,a)}else if(r.name==="basicConstraints")r.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),r.cA&&r.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,"\xFF")),"pathLenConstraint"in r&&r.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(r.pathLenConstraint).getBytes()));else if(r.name==="extKeyUsage"){r.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var u=r.value.value;for(var c in r)r[c]===!0&&(c in or?u.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(or[c]).getBytes())):c.indexOf(".")!==-1&&u.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(c).getBytes())))}else if(r.name==="nsCertType"){var n=0,s=0;r.client&&(s|=128,n=7),r.server&&(s|=64,n=6),r.email&&(s|=32,n=5),r.objsign&&(s|=16,n=4),r.reserved&&(s|=8,n=3),r.sslCA&&(s|=4,n=2),r.emailCA&&(s|=2,n=1),r.objCA&&(s|=1,n=0);var a=String.fromCharCode(n);s!==0&&(a+=String.fromCharCode(s)),r.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,a)}else if(r.name==="subjectAltName"||r.name==="issuerAltName"){r.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);for(var f,h=0;h<r.altNames.length;++h){f=r.altNames[h];var a=f.value;if(f.type===7&&f.ip){if(a=xt.util.bytesFromIP(f.ip),a===null){var t=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw t.extension=r,t}}else f.type===8&&(f.oid?a=k.oidToDer(k.oidToDer(f.oid)):a=k.oidToDer(a));r.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,f.type,!1,a))}}else if(r.name==="nsComment"&&e.cert){if(!/^[\x00-\x7F]*$/.test(r.comment)||r.comment.length<1||r.comment.length>128)throw new Error('Invalid "nsComment" content.');r.value=k.create(k.Class.UNIVERSAL,k.Type.IA5STRING,!1,r.comment)}else if(r.name==="subjectKeyIdentifier"&&e.cert){var m=e.cert.generateSubjectKeyIdentifier();r.subjectKeyIdentifier=m.toHex(),r.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,m.getBytes())}else if(r.name==="authorityKeyIdentifier"&&e.cert){r.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var u=r.value.value;if(r.keyIdentifier){var g=r.keyIdentifier===!0?e.cert.generateSubjectKeyIdentifier().getBytes():r.keyIdentifier;u.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!1,g))}if(r.authorityCertIssuer){var x=[k.create(k.Class.CONTEXT_SPECIFIC,4,!0,[pp(r.authorityCertIssuer===!0?e.cert.issuer:r.authorityCertIssuer)])];u.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,x))}if(r.serialNumber){var v=xt.util.hexToBytes(r.serialNumber===!0?e.cert.serialNumber:r.serialNumber);u.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!1,v))}}else if(r.name==="cRLDistributionPoints"){r.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);for(var u=r.value.value,w=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),S=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]),f,h=0;h<r.altNames.length;++h){f=r.altNames[h];var a=f.value;if(f.type===7&&f.ip){if(a=xt.util.bytesFromIP(f.ip),a===null){var t=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw t.extension=r,t}}else f.type===8&&(f.oid?a=k.oidToDer(k.oidToDer(f.oid)):a=k.oidToDer(a));S.value.push(k.create(k.Class.CONTEXT_SPECIFIC,f.type,!1,a))}w.value.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[S])),u.push(w)}if(typeof r.value>"u"){var t=new Error("Extension value not specified.");throw t.extension=r,t}return r}o(Z3,"_fillMissingExtensionFields");function lN(r,e){switch(r){case or["RSASSA-PSS"]:var t=[];return e.hash.algorithmOid!==void 0&&t.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])),e.mgf.algorithmOid!==void 0&&t.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])])),e.saltLength!==void 0&&t.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(e.saltLength).getBytes())])),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,t);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")}}o(lN,"_signatureParametersToAsn1");function tQ(r){var e=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(r.attributes.length===0)return e;for(var t=r.attributes,n=0;n<t.length;++n){var s=t[n],i=s.value,a=k.Type.UTF8;"valueTagClass"in s&&(a=s.valueTagClass),a===k.Type.UTF8&&(i=xt.util.encodeUtf8(i));var u=!1;"valueConstructed"in s&&(u=s.valueConstructed);var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(s.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,a,u,i)])]);e.value.push(c)}return e}o(tQ,"_CRIAttributesToAsn1");var rQ=new Date("1950-01-01T00:00:00Z"),nQ=new Date("2050-01-01T00:00:00Z");function J3(r){return r>=rQ&&r<nQ?k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(r)):k.create(k.Class.UNIVERSAL,k.Type.GENERALIZEDTIME,!1,k.dateToGeneralizedTime(r))}o(J3,"_dateToAsn1");$e.getTBSCertificate=function(r){var e=J3(r.validity.notBefore),t=J3(r.validity.notAfter),n=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(r.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,xt.util.hexToBytes(r.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(r.siginfo.algorithmOid).getBytes()),lN(r.siginfo.algorithmOid,r.siginfo.parameters)]),pp(r.issuer),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[e,t]),pp(r.subject),$e.publicKeyToAsn1(r.publicKey)]);return r.issuer.uniqueId&&n.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,"\0"+r.issuer.uniqueId)])),r.subject.uniqueId&&n.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,"\0"+r.subject.uniqueId)])),r.extensions.length>0&&n.value.push($e.certificateExtensionsToAsn1(r.extensions)),n};$e.getCertificationRequestInfo=function(r){var e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(r.version).getBytes()),pp(r.subject),$e.publicKeyToAsn1(r.publicKey),tQ(r)]);return e};$e.distinguishedNameToAsn1=function(r){return pp(r)};$e.certificateToAsn1=function(r){var e=r.tbsCertificate||$e.getTBSCertificate(r);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[e,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(r.signatureOid).getBytes()),lN(r.signatureOid,r.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,"\0"+r.signature)])};$e.certificateExtensionsToAsn1=function(r){var e=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),t=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);e.value.push(t);for(var n=0;n<r.length;++n)t.value.push($e.certificateExtensionToAsn1(r[n]));return e};$e.certificateExtensionToAsn1=function(r){var e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);e.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(r.id).getBytes())),r.critical&&e.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,"\xFF"));var t=r.value;return typeof r.value!="string"&&(t=k.toDer(t).getBytes()),e.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,t)),e};$e.certificationRequestToAsn1=function(r){var e=r.certificationRequestInfo||$e.getCertificationRequestInfo(r);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[e,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(r.signatureOid).getBytes()),lN(r.signatureOid,r.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,"\0"+r.signature)])};$e.createCaStore=function(r){var e={certs:{}};e.getIssuer=function(a){var u=t(a.issuer);return u},e.addCertificate=function(a){if(typeof a=="string"&&(a=xt.pki.certificateFromPem(a)),n(a.subject),!e.hasCertificate(a))if(a.subject.hash in e.certs){var u=e.certs[a.subject.hash];xt.util.isArray(u)||(u=[u]),u.push(a),e.certs[a.subject.hash]=u}else e.certs[a.subject.hash]=a},e.hasCertificate=function(a){typeof a=="string"&&(a=xt.pki.certificateFromPem(a));var u=t(a.subject);if(!u)return!1;xt.util.isArray(u)||(u=[u]);for(var c=k.toDer($e.certificateToAsn1(a)).getBytes(),f=0;f<u.length;++f){var h=k.toDer($e.certificateToAsn1(u[f])).getBytes();if(c===h)return!0}return!1},e.listAllCertificates=function(){var a=[];for(var u in e.certs)if(e.certs.hasOwnProperty(u)){var c=e.certs[u];if(!xt.util.isArray(c))a.push(c);else for(var f=0;f<c.length;++f)a.push(c[f])}return a},e.removeCertificate=function(a){var u;if(typeof a=="string"&&(a=xt.pki.certificateFromPem(a)),n(a.subject),!e.hasCertificate(a))return null;var c=t(a.subject);if(!xt.util.isArray(c))return u=e.certs[a.subject.hash],delete e.certs[a.subject.hash],u;for(var f=k.toDer($e.certificateToAsn1(a)).getBytes(),h=0;h<c.length;++h){var m=k.toDer($e.certificateToAsn1(c[h])).getBytes();f===m&&(u=c[h],c.splice(h,1))}return c.length===0&&delete e.certs[a.subject.hash],u};function t(a){return n(a),e.certs[a.hash]||null}o(t,"getBySubject");function n(a){if(!a.hash){var u=xt.md.sha1.create();a.attributes=$e.RDNAttributesAsArray(pp(a),u),a.hash=u.digest().toHex()}}if(o(n,"ensureSubjectHasHash"),r)for(var s=0;s<r.length;++s){var i=r[s];e.addCertificate(i)}return e};$e.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"};$e.verifyCertificateChain=function(r,e,t){typeof t=="function"&&(t={verify:t}),t=t||{},e=e.slice(0);var n=e.slice(0),s=t.validityCheckDate;typeof s>"u"&&(s=new Date);var i=!0,a=null,u=0;do{var c=e.shift(),f=null,h=!1;if(s&&(s<c.validity.notBefore||s>c.validity.notAfter)&&(a={message:"Certificate is not valid yet or has expired.",error:$e.certificateError.certificate_expired,notBefore:c.validity.notBefore,notAfter:c.validity.notAfter,now:s}),a===null){if(f=e[0]||r.getIssuer(c),f===null&&c.isIssuer(c)&&(h=!0,f=c),f){var m=f;xt.util.isArray(m)||(m=[m]);for(var g=!1;!g&&m.length>0;){f=m.shift();try{g=f.verify(c)}catch{}}g||(a={message:"Certificate signature is invalid.",error:$e.certificateError.bad_certificate})}a===null&&(!f||h)&&!r.hasCertificate(c)&&(a={message:"Certificate is not trusted.",error:$e.certificateError.unknown_ca})}if(a===null&&f&&!c.isIssuer(f)&&(a={message:"Certificate issuer is invalid.",error:$e.certificateError.bad_certificate}),a===null)for(var x={keyUsage:!0,basicConstraints:!0},v=0;a===null&&v<c.extensions.length;++v){var w=c.extensions[v];w.critical&&!(w.name in x)&&(a={message:"Certificate has an unsupported critical extension.",error:$e.certificateError.unsupported_certificate})}if(a===null&&(!i||e.length===0&&(!f||h))){var S=c.getExtension("basicConstraints"),A=c.getExtension("keyUsage");if(A!==null&&(!A.keyCertSign||S===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:$e.certificateError.bad_certificate}),a===null&&S!==null&&!S.cA&&(a={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:$e.certificateError.bad_certificate}),a===null&&A!==null&&"pathLenConstraint"in S){var T=u-1;T>S.pathLenConstraint&&(a={message:"Certificate basicConstraints pathLenConstraint violated.",error:$e.certificateError.bad_certificate})}}var b=a===null?!0:a.error,E=t.verify?t.verify(b,u,n):b;if(E===!0)a=null;else throw b===!0&&(a={message:"The application rejected the certificate.",error:$e.certificateError.bad_certificate}),(E||E===0)&&(typeof E=="object"&&!xt.util.isArray(E)?(E.message&&(a.message=E.message),E.error&&(a.error=E.error)):typeof E=="string"&&(a.error=E)),a;i=!1,++u}while(e.length>0);return!0}});var hN=Z((Ide,rk)=>{"use strict";var Rr=$t();ea();ap();Ou();uN();oN();bi();eg();lp();lr();Dw();var Y=Rr.asn1,Yt=Rr.pki,rg=rk.exports=Rr.pkcs12=Rr.pkcs12||{},tk={name:"ContentInfo",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:Y.Class.UNIVERSAL,type:Y.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:Y.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},sQ={name:"PFX",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:Y.Class.UNIVERSAL,type:Y.Type.INTEGER,constructed:!1,capture:"version"},tk,{name:"PFX.macData",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:Y.Class.UNIVERSAL,type:Y.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:Y.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:Y.Class.UNIVERSAL,type:Y.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:Y.Class.UNIVERSAL,type:Y.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:Y.Class.UNIVERSAL,type:Y.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},iQ={name:"SafeBag",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:Y.Class.UNIVERSAL,type:Y.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:Y.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},aQ={name:"Attribute",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:Y.Class.UNIVERSAL,type:Y.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SET,constructed:!0,capture:"values"}]},oQ={name:"CertBag",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:Y.Class.UNIVERSAL,type:Y.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:Y.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:Y.Class.UNIVERSAL,type:Y.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function tg(r,e,t,n){for(var s=[],i=0;i<r.length;i++)for(var a=0;a<r[i].safeBags.length;a++){var u=r[i].safeBags[a];if(!(n!==void 0&&u.type!==n)){if(e===null){s.push(u);continue}u.attributes[e]!==void 0&&u.attributes[e].indexOf(t)>=0&&s.push(u)}}return s}o(tg,"_getBagsByAttribute");rg.pkcs12FromAsn1=function(r,e,t){typeof e=="string"?(t=e,e=!0):e===void 0&&(e=!0);var n={},s=[];if(!Y.validate(r,sQ,n,s)){var i=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw i.errors=i,i}var a={version:n.version.charCodeAt(0),safeContents:[],getBags:o(function(S){var A={},T;return"localKeyId"in S?T=S.localKeyId:"localKeyIdHex"in S&&(T=Rr.util.hexToBytes(S.localKeyIdHex)),T===void 0&&!("friendlyName"in S)&&"bagType"in S&&(A[S.bagType]=tg(a.safeContents,null,null,S.bagType)),T!==void 0&&(A.localKeyId=tg(a.safeContents,"localKeyId",T,S.bagType)),"friendlyName"in S&&(A.friendlyName=tg(a.safeContents,"friendlyName",S.friendlyName,S.bagType)),A},"getBags"),getBagsByFriendlyName:o(function(S,A){return tg(a.safeContents,"friendlyName",S,A)},"getBagsByFriendlyName"),getBagsByLocalKeyId:o(function(S,A){return tg(a.safeContents,"localKeyId",S,A)},"getBagsByLocalKeyId")};if(n.version.charCodeAt(0)!==3){var i=new Error("PKCS#12 PFX of version other than 3 not supported.");throw i.version=n.version.charCodeAt(0),i}if(Y.derToOid(n.contentType)!==Yt.oids.data){var i=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw i.oid=Y.derToOid(n.contentType),i}var u=n.content.value[0];if(u.tagClass!==Y.Class.UNIVERSAL||u.type!==Y.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(u=fN(u),n.mac){var c=null,f=0,h=Y.derToOid(n.macAlgorithm);switch(h){case Yt.oids.sha1:c=Rr.md.sha1.create(),f=20;break;case Yt.oids.sha256:c=Rr.md.sha256.create(),f=32;break;case Yt.oids.sha384:c=Rr.md.sha384.create(),f=48;break;case Yt.oids.sha512:c=Rr.md.sha512.create(),f=64;break;case Yt.oids.md5:c=Rr.md.md5.create(),f=16;break}if(c===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+h);var m=new Rr.util.ByteBuffer(n.macSalt),g="macIterations"in n?parseInt(Rr.util.bytesToHex(n.macIterations),16):1,x=rg.generateKey(t,m,3,g,f,c),v=Rr.hmac.create();v.start(c,x),v.update(u.value);var w=v.getMac();if(w.getBytes()!==n.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}else if(Array.isArray(r.value)&&r.value.length>2)throw new Error("Invalid PKCS#12. macData field present but MAC was not validated.");return uQ(a,u.value,e,t),a};function fN(r){if(r.composed||r.constructed){for(var e=Rr.util.createBuffer(),t=0;t<r.value.length;++t)e.putBytes(r.value[t].value);r.composed=r.constructed=!1,r.value=e.getBytes()}return r}o(fN,"_decodePkcs7Data");function uQ(r,e,t,n){if(e=Y.fromDer(e,t),e.tagClass!==Y.Class.UNIVERSAL||e.type!==Y.Type.SEQUENCE||e.constructed!==!0)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var s=0;s<e.value.length;s++){var i=e.value[s],a={},u=[];if(!Y.validate(i,tk,a,u)){var c=new Error("Cannot read ContentInfo.");throw c.errors=u,c}var f={encrypted:!1},h=null,m=a.content.value[0];switch(Y.derToOid(a.contentType)){case Yt.oids.data:if(m.tagClass!==Y.Class.UNIVERSAL||m.type!==Y.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");h=fN(m).value;break;case Yt.oids.encryptedData:h=cQ(m,n),f.encrypted=!0;break;default:var c=new Error("Unsupported PKCS#12 contentType.");throw c.contentType=Y.derToOid(a.contentType),c}f.safeBags=lQ(h,t,n),r.safeContents.push(f)}}o(uQ,"_decodeAuthenticatedSafe");function cQ(r,e){var t={},n=[];if(!Y.validate(r,Rr.pkcs7.asn1.encryptedDataValidator,t,n)){var s=new Error("Cannot read EncryptedContentInfo.");throw s.errors=n,s}var i=Y.derToOid(t.contentType);if(i!==Yt.oids.data){var s=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw s.oid=i,s}i=Y.derToOid(t.encAlgorithm);var a=Yt.pbe.getCipher(i,t.encParameter,e),u=fN(t.encryptedContentAsn1),c=Rr.util.createBuffer(u.value);if(a.update(c),!a.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return a.output.getBytes()}o(cQ,"_decryptSafeContents");function lQ(r,e,t){if(!e&&r.length===0)return[];if(r=Y.fromDer(r,e),r.tagClass!==Y.Class.UNIVERSAL||r.type!==Y.Type.SEQUENCE||r.constructed!==!0)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var n=[],s=0;s<r.value.length;s++){var i=r.value[s],a={},u=[];if(!Y.validate(i,iQ,a,u)){var c=new Error("Cannot read SafeBag.");throw c.errors=u,c}var f={type:Y.derToOid(a.bagId),attributes:fQ(a.bagAttributes)};n.push(f);var h,m,g=a.bagValue.value[0];switch(f.type){case Yt.oids.pkcs8ShroudedKeyBag:if(g=Yt.decryptPrivateKeyInfo(g,t),g===null)throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case Yt.oids.keyBag:try{f.key=Yt.privateKeyFromAsn1(g)}catch{f.key=null,f.asn1=g}continue;case Yt.oids.certBag:h=oQ,m=o(function(){if(Y.derToOid(a.certId)!==Yt.oids.x509Certificate){var v=new Error("Unsupported certificate type, only X.509 supported.");throw v.oid=Y.derToOid(a.certId),v}var w=Y.fromDer(a.cert,e);try{f.cert=Yt.certificateFromAsn1(w,!0)}catch{f.cert=null,f.asn1=w}},"decoder");break;default:var c=new Error("Unsupported PKCS#12 SafeBag type.");throw c.oid=f.type,c}if(h!==void 0&&!Y.validate(g,h,a,u)){var c=new Error("Cannot read PKCS#12 "+h.name);throw c.errors=u,c}m()}return n}o(lQ,"_decodeSafeContents");function fQ(r){var e={};if(r!==void 0)for(var t=0;t<r.length;++t){var n={},s=[];if(!Y.validate(r[t],aQ,n,s)){var i=new Error("Cannot read PKCS#12 BagAttribute.");throw i.errors=s,i}var a=Y.derToOid(n.oid);if(Yt.oids[a]!==void 0){e[Yt.oids[a]]=[];for(var u=0;u<n.values.length;++u)e[Yt.oids[a]].push(n.values[u].value)}}return e}o(fQ,"_decodeBagAttributes");rg.toPkcs12Asn1=function(r,e,t,n){n=n||{},n.saltSize=n.saltSize||8,n.count=n.count||2048,n.algorithm=n.algorithm||n.encAlgorithm||"aes128","useMac"in n||(n.useMac=!0),"localKeyId"in n||(n.localKeyId=null),"generateLocalKeyId"in n||(n.generateLocalKeyId=!0);var s=n.localKeyId,i;if(s!==null)s=Rr.util.hexToBytes(s);else if(n.generateLocalKeyId)if(e){var a=Rr.util.isArray(e)?e[0]:e;typeof a=="string"&&(a=Yt.certificateFromPem(a));var u=Rr.md.sha1.create();u.update(Y.toDer(Yt.certificateToAsn1(a)).getBytes()),s=u.digest().getBytes()}else s=Rr.random.getBytes(20);var c=[];s!==null&&c.push(Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Yt.oids.localKeyId).getBytes()),Y.create(Y.Class.UNIVERSAL,Y.Type.SET,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OCTETSTRING,!1,s)])])),"friendlyName"in n&&c.push(Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Yt.oids.friendlyName).getBytes()),Y.create(Y.Class.UNIVERSAL,Y.Type.SET,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.BMPSTRING,!1,n.friendlyName)])])),c.length>0&&(i=Y.create(Y.Class.UNIVERSAL,Y.Type.SET,!0,c));var f=[],h=[];e!==null&&(Rr.util.isArray(e)?h=e:h=[e]);for(var m=[],g=0;g<h.length;++g){e=h[g],typeof e=="string"&&(e=Yt.certificateFromPem(e));var x=g===0?i:void 0,v=Yt.certificateToAsn1(e),w=Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Yt.oids.certBag).getBytes()),Y.create(Y.Class.CONTEXT_SPECIFIC,0,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Yt.oids.x509Certificate).getBytes()),Y.create(Y.Class.CONTEXT_SPECIFIC,0,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OCTETSTRING,!1,Y.toDer(v).getBytes())])])]),x]);m.push(w)}if(m.length>0){var S=Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,m),A=Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Yt.oids.data).getBytes()),Y.create(Y.Class.CONTEXT_SPECIFIC,0,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OCTETSTRING,!1,Y.toDer(S).getBytes())])]);f.push(A)}var T=null;if(r!==null){var b=Yt.wrapRsaPrivateKey(Yt.privateKeyToAsn1(r));t===null?T=Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Yt.oids.keyBag).getBytes()),Y.create(Y.Class.CONTEXT_SPECIFIC,0,!0,[b]),i]):T=Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Yt.oids.pkcs8ShroudedKeyBag).getBytes()),Y.create(Y.Class.CONTEXT_SPECIFIC,0,!0,[Yt.encryptPrivateKeyInfo(b,t,n)]),i]);var E=Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[T]),C=Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Yt.oids.data).getBytes()),Y.create(Y.Class.CONTEXT_SPECIFIC,0,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OCTETSTRING,!1,Y.toDer(E).getBytes())])]);f.push(C)}var _=Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,f),F;if(n.useMac){var u=Rr.md.sha1.create(),R=new Rr.util.ByteBuffer(Rr.random.getBytes(n.saltSize)),q=n.count,r=rg.generateKey(t,R,3,q,20),H=Rr.hmac.create();H.start(u,r),H.update(Y.toDer(_).getBytes());var K=H.getMac();F=Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Yt.oids.sha1).getBytes()),Y.create(Y.Class.UNIVERSAL,Y.Type.NULL,!1,"")]),Y.create(Y.Class.UNIVERSAL,Y.Type.OCTETSTRING,!1,K.getBytes())]),Y.create(Y.Class.UNIVERSAL,Y.Type.OCTETSTRING,!1,R.getBytes()),Y.create(Y.Class.UNIVERSAL,Y.Type.INTEGER,!1,Y.integerToDer(q).getBytes())])}return Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.INTEGER,!1,Y.integerToDer(3).getBytes()),Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Yt.oids.data).getBytes()),Y.create(Y.Class.CONTEXT_SPECIFIC,0,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OCTETSTRING,!1,Y.toDer(_).getBytes())])]),F])};rg.generateKey=Rr.pbe.generatePkcs12Key});var dN=Z((Bde,nk)=>{"use strict";var Uu=$t();ea();Ou();oN();_l();Sw();hN();Iw();eg();lr();Dw();var pN=Uu.asn1,dp=nk.exports=Uu.pki=Uu.pki||{};dp.pemToDer=function(r){var e=Uu.pem.decode(r)[0];if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return Uu.util.createBuffer(e.body)};dp.privateKeyFromPem=function(r){var e=Uu.pem.decode(r)[0];if(e.type!=="PRIVATE KEY"&&e.type!=="RSA PRIVATE KEY"){var t=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw t.headerType=e.type,t}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var n=pN.fromDer(e.body);return dp.privateKeyFromAsn1(n)};dp.privateKeyToPem=function(r,e){var t={type:"RSA PRIVATE KEY",body:pN.toDer(dp.privateKeyToAsn1(r)).getBytes()};return Uu.pem.encode(t,{maxline:e})};dp.privateKeyInfoToPem=function(r,e){var t={type:"PRIVATE KEY",body:pN.toDer(r).getBytes()};return Uu.pem.encode(t,{maxline:e})}});var wN=Z((Dde,fk)=>{"use strict";var ke=$t();ea();ap();vw();_l();dN();bi();lp();lr();var kw=o(function(r,e,t,n){var s=ke.util.createBuffer(),i=r.length>>1,a=i+(r.length&1),u=r.substr(0,a),c=r.substr(i,a),f=ke.util.createBuffer(),h=ke.hmac.create();t=e+t;var m=Math.ceil(n/16),g=Math.ceil(n/20);h.start("MD5",u);var x=ke.util.createBuffer();f.putBytes(t);for(var v=0;v<m;++v)h.start(null,null),h.update(f.getBytes()),f.putBuffer(h.digest()),h.start(null,null),h.update(f.bytes()+t),x.putBuffer(h.digest());h.start("SHA1",c);var w=ke.util.createBuffer();f.clear(),f.putBytes(t);for(var v=0;v<g;++v)h.start(null,null),h.update(f.getBytes()),f.putBuffer(h.digest()),h.start(null,null),h.update(f.bytes()+t),w.putBuffer(h.digest());return s.putBytes(ke.util.xorBytes(x.getBytes(),w.getBytes(),n)),s},"prf_TLS1"),hQ=o(function(r,e,t){var n=ke.hmac.create();n.start("SHA1",r);var s=ke.util.createBuffer();return s.putInt32(e[0]),s.putInt32(e[1]),s.putByte(t.type),s.putByte(t.version.major),s.putByte(t.version.minor),s.putInt16(t.length),s.putBytes(t.fragment.bytes()),n.update(s.getBytes()),n.digest().getBytes()},"hmac_sha1"),pQ=o(function(r,e,t){var n=!1;try{var s=r.deflate(e.fragment.getBytes());e.fragment=ke.util.createBuffer(s),e.length=s.length,n=!0}catch{}return n},"deflate"),dQ=o(function(r,e,t){var n=!1;try{var s=r.inflate(e.fragment.getBytes());e.fragment=ke.util.createBuffer(s),e.length=s.length,n=!0}catch{}return n},"inflate"),ni=o(function(r,e){var t=0;switch(e){case 1:t=r.getByte();break;case 2:t=r.getInt16();break;case 3:t=r.getInt24();break;case 4:t=r.getInt32();break}return ke.util.createBuffer(r.getBytes(t))},"readVector"),Ni=o(function(r,e,t){r.putInt(t.length(),e<<3),r.putBuffer(t)},"writeVector"),U={};U.Versions={TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}};U.SupportedVersions=[U.Versions.TLS_1_1,U.Versions.TLS_1_0];U.Version=U.SupportedVersions[0];U.MaxFragment=15360;U.ConnectionEnd={server:0,client:1};U.PRFAlgorithm={tls_prf_sha256:0};U.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};U.CipherType={stream:0,block:1,aead:2};U.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};U.CompressionMethod={none:0,deflate:1};U.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24};U.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};U.Alert={};U.Alert.Level={warning:1,fatal:2};U.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};U.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};U.CipherSuites={};U.getCipherSuite=function(r){var e=null;for(var t in U.CipherSuites){var n=U.CipherSuites[t];if(n.id[0]===r.charCodeAt(0)&&n.id[1]===r.charCodeAt(1)){e=n;break}}return e};U.handleUnexpected=function(r,e){var t=!r.open&&r.entity===U.ConnectionEnd.client;t||r.error(r,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.unexpected_message}})};U.handleHelloRequest=function(r,e,t){!r.handshaking&&r.handshakes>0&&(U.queue(r,U.createAlert(r,{level:U.Alert.Level.warning,description:U.Alert.Description.no_renegotiation})),U.flush(r)),r.process()};U.parseHelloMessage=function(r,e,t){var n=null,s=r.entity===U.ConnectionEnd.client;if(t<38)r.error(r,{message:s?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.illegal_parameter}});else{var i=e.fragment,a=i.length();if(n={version:{major:i.getByte(),minor:i.getByte()},random:ke.util.createBuffer(i.getBytes(32)),session_id:ni(i,1),extensions:[]},s?(n.cipher_suite=i.getBytes(2),n.compression_method=i.getByte()):(n.cipher_suites=ni(i,2),n.compression_methods=ni(i,1)),a=t-(a-i.length()),a>0){for(var u=ni(i,2);u.length()>0;)n.extensions.push({type:[u.getByte(),u.getByte()],data:ni(u,2)});if(!s)for(var c=0;c<n.extensions.length;++c){var f=n.extensions[c];if(f.type[0]===0&&f.type[1]===0)for(var h=ni(f.data,2);h.length()>0;){var m=h.getByte();if(m!==0)break;r.session.extensions.server_name.serverNameList.push(ni(h,2).getBytes())}}}if(r.session.version&&(n.version.major!==r.session.version.major||n.version.minor!==r.session.version.minor))return r.error(r,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.protocol_version}});if(s)r.session.cipherSuite=U.getCipherSuite(n.cipher_suite);else for(var g=ke.util.createBuffer(n.cipher_suites.bytes());g.length()>0&&(r.session.cipherSuite=U.getCipherSuite(g.getBytes(2)),r.session.cipherSuite===null););if(r.session.cipherSuite===null)return r.error(r,{message:"No cipher suites in common.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.handshake_failure},cipherSuite:ke.util.bytesToHex(n.cipher_suite)});s?r.session.compressionMethod=n.compression_method:r.session.compressionMethod=U.CompressionMethod.none}return n};U.createSecurityParameters=function(r,e){var t=r.entity===U.ConnectionEnd.client,n=e.random.bytes(),s=t?r.session.sp.client_random:n,i=t?n:U.createRandom().getBytes();r.session.sp={entity:r.entity,prf_algorithm:U.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:r.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:s,server_random:i}};U.handleServerHello=function(r,e,t){var n=U.parseHelloMessage(r,e,t);if(!r.fail){if(n.version.minor<=r.version.minor)r.version.minor=n.version.minor;else return r.error(r,{message:"Incompatible TLS version.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.protocol_version}});r.session.version=r.version;var s=n.session_id.bytes();s.length>0&&s===r.session.id?(r.expect=ak,r.session.resuming=!0,r.session.sp.server_random=n.random.bytes()):(r.expect=gQ,r.session.resuming=!1,U.createSecurityParameters(r,n)),r.session.id=s,r.process()}};U.handleClientHello=function(r,e,t){var n=U.parseHelloMessage(r,e,t);if(!r.fail){var s=n.session_id.bytes(),i=null;if(r.sessionCache&&(i=r.sessionCache.getSession(s),i===null?s="":(i.version.major!==n.version.major||i.version.minor>n.version.minor)&&(i=null,s="")),s.length===0&&(s=ke.random.getBytes(32)),r.session.id=s,r.session.clientHelloVersion=n.version,r.session.sp={},i)r.version=r.session.version=i.version,r.session.sp=i.sp;else{for(var a,u=1;u<U.SupportedVersions.length&&(a=U.SupportedVersions[u],!(a.minor<=n.version.minor));++u);r.version={major:a.major,minor:a.minor},r.session.version=r.version}i!==null?(r.expect=yN,r.session.resuming=!0,r.session.sp.client_random=n.random.bytes()):(r.expect=r.verifyClient!==!1?EQ:vN,r.session.resuming=!1,U.createSecurityParameters(r,n)),r.open=!0,U.queue(r,U.createRecord(r,{type:U.ContentType.handshake,data:U.createServerHello(r)})),r.session.resuming?(U.queue(r,U.createRecord(r,{type:U.ContentType.change_cipher_spec,data:U.createChangeCipherSpec()})),r.state.pending=U.createConnectionState(r),r.state.current.write=r.state.pending.write,U.queue(r,U.createRecord(r,{type:U.ContentType.handshake,data:U.createFinished(r)}))):(U.queue(r,U.createRecord(r,{type:U.ContentType.handshake,data:U.createCertificate(r)})),r.fail||(U.queue(r,U.createRecord(r,{type:U.ContentType.handshake,data:U.createServerKeyExchange(r)})),r.verifyClient!==!1&&U.queue(r,U.createRecord(r,{type:U.ContentType.handshake,data:U.createCertificateRequest(r)})),U.queue(r,U.createRecord(r,{type:U.ContentType.handshake,data:U.createServerHelloDone(r)})))),U.flush(r),r.process()}};U.handleCertificate=function(r,e,t){if(t<3)return r.error(r,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.illegal_parameter}});var n=e.fragment,s={certificate_list:ni(n,3)},i,a,u=[];try{for(;s.certificate_list.length()>0;)i=ni(s.certificate_list,3),a=ke.asn1.fromDer(i),i=ke.pki.certificateFromAsn1(a,!0),u.push(i)}catch(f){return r.error(r,{message:"Could not parse certificate list.",cause:f,send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.bad_certificate}})}var c=r.entity===U.ConnectionEnd.client;(c||r.verifyClient===!0)&&u.length===0?r.error(r,{message:c?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.illegal_parameter}}):u.length===0?r.expect=c?sk:vN:(c?r.session.serverCertificate=u[0]:r.session.clientCertificate=u[0],U.verifyCertificateChain(r,u)&&(r.expect=c?sk:vN)),r.process()};U.handleServerKeyExchange=function(r,e,t){if(t>0)return r.error(r,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.unsupported_certificate}});r.expect=vQ,r.process()};U.handleClientKeyExchange=function(r,e,t){if(t<48)return r.error(r,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.unsupported_certificate}});var n=e.fragment,s={enc_pre_master_secret:ni(n,2).getBytes()},i=null;if(r.getPrivateKey)try{i=r.getPrivateKey(r,r.session.serverCertificate),i=ke.pki.privateKeyFromPem(i)}catch(c){r.error(r,{message:"Could not get private key.",cause:c,send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.internal_error}})}if(i===null)return r.error(r,{message:"No private key set.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.internal_error}});try{var a=r.session.sp;a.pre_master_secret=i.decrypt(s.enc_pre_master_secret);var u=r.session.clientHelloVersion;if(u.major!==a.pre_master_secret.charCodeAt(0)||u.minor!==a.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{a.pre_master_secret=ke.random.getBytes(48)}r.expect=yN,r.session.clientCertificate!==null&&(r.expect=AQ),r.process()};U.handleCertificateRequest=function(r,e,t){if(t<3)return r.error(r,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.illegal_parameter}});var n=e.fragment,s={certificate_types:ni(n,1),certificate_authorities:ni(n,2)};r.session.certificateRequest=s,r.expect=yQ,r.process()};U.handleCertificateVerify=function(r,e,t){if(t<2)return r.error(r,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.illegal_parameter}});var n=e.fragment;n.read-=4;var s=n.bytes();n.read+=4;var i={signature:ni(n,2).getBytes()},a=ke.util.createBuffer();a.putBuffer(r.session.md5.digest()),a.putBuffer(r.session.sha1.digest()),a=a.getBytes();try{var u=r.session.clientCertificate;if(!u.publicKey.verify(a,i.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");r.session.md5.update(s),r.session.sha1.update(s)}catch{return r.error(r,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.handshake_failure}})}r.expect=yN,r.process()};U.handleServerHelloDone=function(r,e,t){if(t>0)return r.error(r,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.record_overflow}});if(r.serverCertificate===null){var n={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.insufficient_security}},s=0,i=r.verify(r,n.alert.description,s,[]);if(i!==!0)return(i||i===0)&&(typeof i=="object"&&!ke.util.isArray(i)?(i.message&&(n.message=i.message),i.alert&&(n.alert.description=i.alert)):typeof i=="number"&&(n.alert.description=i)),r.error(r,n)}r.session.certificateRequest!==null&&(e=U.createRecord(r,{type:U.ContentType.handshake,data:U.createCertificate(r)}),U.queue(r,e)),e=U.createRecord(r,{type:U.ContentType.handshake,data:U.createClientKeyExchange(r)}),U.queue(r,e),r.expect=SQ;var a=o(function(u,c){u.session.certificateRequest!==null&&u.session.clientCertificate!==null&&U.queue(u,U.createRecord(u,{type:U.ContentType.handshake,data:U.createCertificateVerify(u,c)})),U.queue(u,U.createRecord(u,{type:U.ContentType.change_cipher_spec,data:U.createChangeCipherSpec()})),u.state.pending=U.createConnectionState(u),u.state.current.write=u.state.pending.write,U.queue(u,U.createRecord(u,{type:U.ContentType.handshake,data:U.createFinished(u)})),u.expect=ak,U.flush(u),u.process()},"callback");if(r.session.certificateRequest===null||r.session.clientCertificate===null)return a(r,null);U.getClientSignature(r,a)};U.handleChangeCipherSpec=function(r,e){if(e.fragment.getByte()!==1)return r.error(r,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.illegal_parameter}});var t=r.entity===U.ConnectionEnd.client;(r.session.resuming&&t||!r.session.resuming&&!t)&&(r.state.pending=U.createConnectionState(r)),r.state.current.read=r.state.pending.read,(!r.session.resuming&&t||r.session.resuming&&!t)&&(r.state.pending=null),r.expect=t?xQ:CQ,r.process()};U.handleFinished=function(r,e,t){var n=e.fragment;n.read-=4;var s=n.bytes();n.read+=4;var i=e.fragment.getBytes();n=ke.util.createBuffer(),n.putBuffer(r.session.md5.digest()),n.putBuffer(r.session.sha1.digest());var a=r.entity===U.ConnectionEnd.client,u=a?"server finished":"client finished",c=r.session.sp,f=12,h=kw;if(n=h(c.master_secret,u,n.getBytes(),f),n.getBytes()!==i)return r.error(r,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.decrypt_error}});r.session.md5.update(s),r.session.sha1.update(s),(r.session.resuming&&a||!r.session.resuming&&!a)&&(U.queue(r,U.createRecord(r,{type:U.ContentType.change_cipher_spec,data:U.createChangeCipherSpec()})),r.state.current.write=r.state.pending.write,r.state.pending=null,U.queue(r,U.createRecord(r,{type:U.ContentType.handshake,data:U.createFinished(r)}))),r.expect=a?wQ:NQ,r.handshaking=!1,++r.handshakes,r.peerCertificate=a?r.session.serverCertificate:r.session.clientCertificate,U.flush(r),r.isConnected=!0,r.connected(r),r.process()};U.handleAlert=function(r,e){var t=e.fragment,n={level:t.getByte(),description:t.getByte()},s;switch(n.description){case U.Alert.Description.close_notify:s="Connection closed.";break;case U.Alert.Description.unexpected_message:s="Unexpected message.";break;case U.Alert.Description.bad_record_mac:s="Bad record MAC.";break;case U.Alert.Description.decryption_failed:s="Decryption failed.";break;case U.Alert.Description.record_overflow:s="Record overflow.";break;case U.Alert.Description.decompression_failure:s="Decompression failed.";break;case U.Alert.Description.handshake_failure:s="Handshake failure.";break;case U.Alert.Description.bad_certificate:s="Bad certificate.";break;case U.Alert.Description.unsupported_certificate:s="Unsupported certificate.";break;case U.Alert.Description.certificate_revoked:s="Certificate revoked.";break;case U.Alert.Description.certificate_expired:s="Certificate expired.";break;case U.Alert.Description.certificate_unknown:s="Certificate unknown.";break;case U.Alert.Description.illegal_parameter:s="Illegal parameter.";break;case U.Alert.Description.unknown_ca:s="Unknown certificate authority.";break;case U.Alert.Description.access_denied:s="Access denied.";break;case U.Alert.Description.decode_error:s="Decode error.";break;case U.Alert.Description.decrypt_error:s="Decrypt error.";break;case U.Alert.Description.export_restriction:s="Export restriction.";break;case U.Alert.Description.protocol_version:s="Unsupported protocol version.";break;case U.Alert.Description.insufficient_security:s="Insufficient security.";break;case U.Alert.Description.internal_error:s="Internal error.";break;case U.Alert.Description.user_canceled:s="User canceled.";break;case U.Alert.Description.no_renegotiation:s="Renegotiation not supported.";break;default:s="Unknown error.";break}if(n.description===U.Alert.Description.close_notify)return r.close();r.error(r,{message:s,send:!1,origin:r.entity===U.ConnectionEnd.client?"server":"client",alert:n}),r.process()};U.handleHandshake=function(r,e){var t=e.fragment,n=t.getByte(),s=t.getInt24();if(s>t.length())return r.fragmented=e,e.fragment=ke.util.createBuffer(),t.read-=4,r.process();r.fragmented=null,t.read-=4;var i=t.bytes(s+4);t.read+=4,n in Ow[r.entity][r.expect]?(r.entity===U.ConnectionEnd.server&&!r.open&&!r.fail&&(r.handshaking=!0,r.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:ke.md.md5.create(),sha1:ke.md.sha1.create()}),n!==U.HandshakeType.hello_request&&n!==U.HandshakeType.certificate_verify&&n!==U.HandshakeType.finished&&(r.session.md5.update(i),r.session.sha1.update(i)),Ow[r.entity][r.expect][n](r,e,s)):U.handleUnexpected(r,e)};U.handleApplicationData=function(r,e){r.data.putBuffer(e.fragment),r.dataReady(r),r.process()};U.handleHeartbeat=function(r,e){var t=e.fragment,n=t.getByte(),s=t.getInt16(),i=t.getBytes(s);if(n===U.HeartbeatMessageType.heartbeat_request){if(r.handshaking||s>i.length)return r.process();U.queue(r,U.createRecord(r,{type:U.ContentType.heartbeat,data:U.createHeartbeat(U.HeartbeatMessageType.heartbeat_response,i)})),U.flush(r)}else if(n===U.HeartbeatMessageType.heartbeat_response){if(i!==r.expectedHeartbeatPayload)return r.process();r.heartbeatReceived&&r.heartbeatReceived(r,ke.util.createBuffer(i))}r.process()};var mQ=0,gQ=1,sk=2,vQ=3,yQ=4,ak=5,xQ=6,wQ=7,SQ=8,bQ=0,EQ=1,vN=2,AQ=3,yN=4,CQ=5,NQ=6,V=U.handleUnexpected,ok=U.handleChangeCipherSpec,qn=U.handleAlert,ys=U.handleHandshake,uk=U.handleApplicationData,Hn=U.handleHeartbeat,xN=[];xN[U.ConnectionEnd.client]=[[V,qn,ys,V,Hn],[V,qn,ys,V,Hn],[V,qn,ys,V,Hn],[V,qn,ys,V,Hn],[V,qn,ys,V,Hn],[ok,qn,V,V,Hn],[V,qn,ys,V,Hn],[V,qn,ys,uk,Hn],[V,qn,ys,V,Hn]];xN[U.ConnectionEnd.server]=[[V,qn,ys,V,Hn],[V,qn,ys,V,Hn],[V,qn,ys,V,Hn],[V,qn,ys,V,Hn],[ok,qn,V,V,Hn],[V,qn,ys,V,Hn],[V,qn,ys,uk,Hn],[V,qn,ys,V,Hn]];var ju=U.handleHelloRequest,TQ=U.handleServerHello,ck=U.handleCertificate,ik=U.handleServerKeyExchange,mN=U.handleCertificateRequest,Rw=U.handleServerHelloDone,lk=U.handleFinished,Ow=[];Ow[U.ConnectionEnd.client]=[[V,V,TQ,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V],[ju,V,V,V,V,V,V,V,V,V,V,ck,ik,mN,Rw,V,V,V,V,V,V],[ju,V,V,V,V,V,V,V,V,V,V,V,ik,mN,Rw,V,V,V,V,V,V],[ju,V,V,V,V,V,V,V,V,V,V,V,V,mN,Rw,V,V,V,V,V,V],[ju,V,V,V,V,V,V,V,V,V,V,V,V,V,Rw,V,V,V,V,V,V],[ju,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V],[ju,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,lk],[ju,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V],[ju,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V]];var IQ=U.handleClientHello,_Q=U.handleClientKeyExchange,BQ=U.handleCertificateVerify;Ow[U.ConnectionEnd.server]=[[V,IQ,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,ck,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,_Q,V,V,V,V],[V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,BQ,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,lk],[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]];U.generateKeys=function(r,e){var t=kw,n=e.client_random+e.server_random;r.session.resuming||(e.master_secret=t(e.pre_master_secret,"master secret",n,48).bytes(),e.pre_master_secret=null),n=e.server_random+e.client_random;var s=2*e.mac_key_length+2*e.enc_key_length,i=r.version.major===U.Versions.TLS_1_0.major&&r.version.minor===U.Versions.TLS_1_0.minor;i&&(s+=2*e.fixed_iv_length);var a=t(e.master_secret,"key expansion",n,s),u={client_write_MAC_key:a.getBytes(e.mac_key_length),server_write_MAC_key:a.getBytes(e.mac_key_length),client_write_key:a.getBytes(e.enc_key_length),server_write_key:a.getBytes(e.enc_key_length)};return i&&(u.client_write_IV=a.getBytes(e.fixed_iv_length),u.server_write_IV=a.getBytes(e.fixed_iv_length)),u};U.createConnectionState=function(r){var e=r.entity===U.ConnectionEnd.client,t=o(function(){var i={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:o(function(a){return!0},"cipherFunction"),compressionState:null,compressFunction:o(function(a){return!0},"compressFunction"),updateSequenceNumber:o(function(){i.sequenceNumber[1]===4294967295?(i.sequenceNumber[1]=0,++i.sequenceNumber[0]):++i.sequenceNumber[1]},"updateSequenceNumber")};return i},"createMode"),n={read:t(),write:t()};if(n.read.update=function(i,a){return n.read.cipherFunction(a,n.read)?n.read.compressFunction(i,a,n.read)||i.error(i,{message:"Could not decompress record.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.decompression_failure}}):i.error(i,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.bad_record_mac}}),!i.fail},n.write.update=function(i,a){return n.write.compressFunction(i,a,n.write)?n.write.cipherFunction(a,n.write)||i.error(i,{message:"Could not encrypt record.",send:!1,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.internal_error}}):i.error(i,{message:"Could not compress record.",send:!1,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.internal_error}}),!i.fail},r.session){var s=r.session.sp;switch(r.session.cipherSuite.initSecurityParameters(s),s.keys=U.generateKeys(r,s),n.read.macKey=e?s.keys.server_write_MAC_key:s.keys.client_write_MAC_key,n.write.macKey=e?s.keys.client_write_MAC_key:s.keys.server_write_MAC_key,r.session.cipherSuite.initConnectionState(n,r,s),s.compression_algorithm){case U.CompressionMethod.none:break;case U.CompressionMethod.deflate:n.read.compressFunction=dQ,n.write.compressFunction=pQ;break;default:throw new Error("Unsupported compression algorithm.")}}return n};U.createRandom=function(){var r=new Date,e=+r+r.getTimezoneOffset()*6e4,t=ke.util.createBuffer();return t.putInt32(e),t.putBytes(ke.random.getBytes(28)),t};U.createRecord=function(r,e){if(!e.data)return null;var t={type:e.type,version:{major:r.version.major,minor:r.version.minor},length:e.data.length(),fragment:e.data};return t};U.createAlert=function(r,e){var t=ke.util.createBuffer();return t.putByte(e.level),t.putByte(e.description),U.createRecord(r,{type:U.ContentType.alert,data:t})};U.createClientHello=function(r){r.session.clientHelloVersion={major:r.version.major,minor:r.version.minor};for(var e=ke.util.createBuffer(),t=0;t<r.cipherSuites.length;++t){var n=r.cipherSuites[t];e.putByte(n.id[0]),e.putByte(n.id[1])}var s=e.length(),i=ke.util.createBuffer();i.putByte(U.CompressionMethod.none);var a=i.length(),u=ke.util.createBuffer();if(r.virtualHost){var c=ke.util.createBuffer();c.putByte(0),c.putByte(0);var f=ke.util.createBuffer();f.putByte(0),Ni(f,2,ke.util.createBuffer(r.virtualHost));var h=ke.util.createBuffer();Ni(h,2,f),Ni(c,2,h),u.putBuffer(c)}var m=u.length();m>0&&(m+=2);var g=r.session.id,x=g.length+1+2+4+28+2+s+1+a+m,v=ke.util.createBuffer();return v.putByte(U.HandshakeType.client_hello),v.putInt24(x),v.putByte(r.version.major),v.putByte(r.version.minor),v.putBytes(r.session.sp.client_random),Ni(v,1,ke.util.createBuffer(g)),Ni(v,2,e),Ni(v,1,i),m>0&&Ni(v,2,u),v};U.createServerHello=function(r){var e=r.session.id,t=e.length+1+2+4+28+2+1,n=ke.util.createBuffer();return n.putByte(U.HandshakeType.server_hello),n.putInt24(t),n.putByte(r.version.major),n.putByte(r.version.minor),n.putBytes(r.session.sp.server_random),Ni(n,1,ke.util.createBuffer(e)),n.putByte(r.session.cipherSuite.id[0]),n.putByte(r.session.cipherSuite.id[1]),n.putByte(r.session.compressionMethod),n};U.createCertificate=function(r){var e=r.entity===U.ConnectionEnd.client,t=null;if(r.getCertificate){var n;e?n=r.session.certificateRequest:n=r.session.extensions.server_name.serverNameList,t=r.getCertificate(r,n)}var s=ke.util.createBuffer();if(t!==null)try{ke.util.isArray(t)||(t=[t]);for(var i=null,a=0;a<t.length;++a){var u=ke.pem.decode(t[a])[0];if(u.type!=="CERTIFICATE"&&u.type!=="X509 CERTIFICATE"&&u.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=u.type,c}if(u.procType&&u.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var f=ke.util.createBuffer(u.body);i===null&&(i=ke.asn1.fromDer(f.bytes(),!1));var h=ke.util.createBuffer();Ni(h,3,f),s.putBuffer(h)}t=ke.pki.certificateFromAsn1(i),e?r.session.clientCertificate=t:r.session.serverCertificate=t}catch(x){return r.error(r,{message:"Could not send certificate list.",cause:x,send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.bad_certificate}})}var m=3+s.length(),g=ke.util.createBuffer();return g.putByte(U.HandshakeType.certificate),g.putInt24(m),Ni(g,3,s),g};U.createClientKeyExchange=function(r){var e=ke.util.createBuffer();e.putByte(r.session.clientHelloVersion.major),e.putByte(r.session.clientHelloVersion.minor),e.putBytes(ke.random.getBytes(46));var t=r.session.sp;t.pre_master_secret=e.getBytes();var n=r.session.serverCertificate.publicKey;e=n.encrypt(t.pre_master_secret);var s=e.length+2,i=ke.util.createBuffer();return i.putByte(U.HandshakeType.client_key_exchange),i.putInt24(s),i.putInt16(e.length),i.putBytes(e),i};U.createServerKeyExchange=function(r){var e=0,t=ke.util.createBuffer();return e>0&&(t.putByte(U.HandshakeType.server_key_exchange),t.putInt24(e)),t};U.getClientSignature=function(r,e){var t=ke.util.createBuffer();t.putBuffer(r.session.md5.digest()),t.putBuffer(r.session.sha1.digest()),t=t.getBytes(),r.getSignature=r.getSignature||function(n,s,i){var a=null;if(n.getPrivateKey)try{a=n.getPrivateKey(n,n.session.clientCertificate),a=ke.pki.privateKeyFromPem(a)}catch(u){n.error(n,{message:"Could not get private key.",cause:u,send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.internal_error}})}a===null?n.error(n,{message:"No private key set.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.internal_error}}):s=a.sign(s,null),i(n,s)},r.getSignature(r,t,e)};U.createCertificateVerify=function(r,e){var t=e.length+2,n=ke.util.createBuffer();return n.putByte(U.HandshakeType.certificate_verify),n.putInt24(t),n.putInt16(e.length),n.putBytes(e),n};U.createCertificateRequest=function(r){var e=ke.util.createBuffer();e.putByte(1);var t=ke.util.createBuffer();for(var n in r.caStore.certs){var s=r.caStore.certs[n],i=ke.pki.distinguishedNameToAsn1(s.subject),a=ke.asn1.toDer(i);t.putInt16(a.length()),t.putBuffer(a)}var u=1+e.length()+2+t.length(),c=ke.util.createBuffer();return c.putByte(U.HandshakeType.certificate_request),c.putInt24(u),Ni(c,1,e),Ni(c,2,t),c};U.createServerHelloDone=function(r){var e=ke.util.createBuffer();return e.putByte(U.HandshakeType.server_hello_done),e.putInt24(0),e};U.createChangeCipherSpec=function(){var r=ke.util.createBuffer();return r.putByte(1),r};U.createFinished=function(r){var e=ke.util.createBuffer();e.putBuffer(r.session.md5.digest()),e.putBuffer(r.session.sha1.digest());var t=r.entity===U.ConnectionEnd.client,n=r.session.sp,s=12,i=kw,a=t?"client finished":"server finished";e=i(n.master_secret,a,e.getBytes(),s);var u=ke.util.createBuffer();return u.putByte(U.HandshakeType.finished),u.putInt24(e.length()),u.putBuffer(e),u};U.createHeartbeat=function(r,e,t){typeof t>"u"&&(t=e.length);var n=ke.util.createBuffer();n.putByte(r),n.putInt16(t),n.putBytes(e);var s=n.length(),i=Math.max(16,s-t-3);return n.putBytes(ke.random.getBytes(i)),n};U.queue=function(r,e){if(e&&!(e.fragment.length()===0&&(e.type===U.ContentType.handshake||e.type===U.ContentType.alert||e.type===U.ContentType.change_cipher_spec))){if(e.type===U.ContentType.handshake){var t=e.fragment.bytes();r.session.md5.update(t),r.session.sha1.update(t),t=null}var n;if(e.fragment.length()<=U.MaxFragment)n=[e];else{n=[];for(var s=e.fragment.bytes();s.length>U.MaxFragment;)n.push(U.createRecord(r,{type:e.type,data:ke.util.createBuffer(s.slice(0,U.MaxFragment))})),s=s.slice(U.MaxFragment);s.length>0&&n.push(U.createRecord(r,{type:e.type,data:ke.util.createBuffer(s)}))}for(var i=0;i<n.length&&!r.fail;++i){var a=n[i],u=r.state.current.write;u.update(r,a)&&r.records.push(a)}}};U.flush=function(r){for(var e=0;e<r.records.length;++e){var t=r.records[e];r.tlsData.putByte(t.type),r.tlsData.putByte(t.version.major),r.tlsData.putByte(t.version.minor),r.tlsData.putInt16(t.fragment.length()),r.tlsData.putBuffer(r.records[e].fragment)}return r.records=[],r.tlsDataReady(r)};var gN=o(function(r){switch(r){case!0:return!0;case ke.pki.certificateError.bad_certificate:return U.Alert.Description.bad_certificate;case ke.pki.certificateError.unsupported_certificate:return U.Alert.Description.unsupported_certificate;case ke.pki.certificateError.certificate_revoked:return U.Alert.Description.certificate_revoked;case ke.pki.certificateError.certificate_expired:return U.Alert.Description.certificate_expired;case ke.pki.certificateError.certificate_unknown:return U.Alert.Description.certificate_unknown;case ke.pki.certificateError.unknown_ca:return U.Alert.Description.unknown_ca;default:return U.Alert.Description.bad_certificate}},"_certErrorToAlertDesc"),DQ=o(function(r){switch(r){case!0:return!0;case U.Alert.Description.bad_certificate:return ke.pki.certificateError.bad_certificate;case U.Alert.Description.unsupported_certificate:return ke.pki.certificateError.unsupported_certificate;case U.Alert.Description.certificate_revoked:return ke.pki.certificateError.certificate_revoked;case U.Alert.Description.certificate_expired:return ke.pki.certificateError.certificate_expired;case U.Alert.Description.certificate_unknown:return ke.pki.certificateError.certificate_unknown;case U.Alert.Description.unknown_ca:return ke.pki.certificateError.unknown_ca;default:return ke.pki.certificateError.bad_certificate}},"_alertDescToCertError");U.verifyCertificateChain=function(r,e){try{var t={};for(var n in r.verifyOptions)t[n]=r.verifyOptions[n];t.verify=function(i,a,u){var c=gN(i),f=r.verify(r,i,a,u);if(f!==!0){if(typeof f=="object"&&!ke.util.isArray(f)){var h=new Error("The application rejected the certificate.");throw h.send=!0,h.alert={level:U.Alert.Level.fatal,description:U.Alert.Description.bad_certificate},f.message&&(h.message=f.message),f.alert&&(h.alert.description=f.alert),h}f!==i&&(f=DQ(f))}return f},ke.pki.verifyCertificateChain(r.caStore,e,t)}catch(i){var s=i;(typeof s!="object"||ke.util.isArray(s))&&(s={send:!0,alert:{level:U.Alert.Level.fatal,description:gN(i)}}),"send"in s||(s.send=!0),"alert"in s||(s.alert={level:U.Alert.Level.fatal,description:gN(s.error)}),r.error(r,s)}return!r.fail};U.createSessionCache=function(r,e){var t=null;if(r&&r.getSession&&r.setSession&&r.order)t=r;else{t={},t.cache=r||{},t.capacity=Math.max(e||100,1),t.order=[];for(var n in r)t.order.length<=e?t.order.push(n):delete r[n];t.getSession=function(s){var i=null,a=null;if(s?a=ke.util.bytesToHex(s):t.order.length>0&&(a=t.order[0]),a!==null&&a in t.cache){i=t.cache[a],delete t.cache[a];for(var u in t.order)if(t.order[u]===a){t.order.splice(u,1);break}}return i},t.setSession=function(s,i){if(t.order.length===t.capacity){var a=t.order.shift();delete t.cache[a]}var a=ke.util.bytesToHex(s);t.order.push(a),t.cache[a]=i}}return t};U.createConnection=function(r){var e=null;r.caStore?ke.util.isArray(r.caStore)?e=ke.pki.createCaStore(r.caStore):e=r.caStore:e=ke.pki.createCaStore();var t=r.cipherSuites||null;if(t===null){t=[];for(var n in U.CipherSuites)t.push(U.CipherSuites[n])}var s=r.server?U.ConnectionEnd.server:U.ConnectionEnd.client,i=r.sessionCache?U.createSessionCache(r.sessionCache):null,a={version:{major:U.Version.major,minor:U.Version.minor},entity:s,sessionId:r.sessionId,caStore:e,sessionCache:i,cipherSuites:t,connected:r.connected,virtualHost:r.virtualHost||null,verifyClient:r.verifyClient||!1,verify:r.verify||function(h,m,g,x){return m},verifyOptions:r.verifyOptions||{},getCertificate:r.getCertificate||null,getPrivateKey:r.getPrivateKey||null,getSignature:r.getSignature||null,input:ke.util.createBuffer(),tlsData:ke.util.createBuffer(),data:ke.util.createBuffer(),tlsDataReady:r.tlsDataReady,dataReady:r.dataReady,heartbeatReceived:r.heartbeatReceived,closed:r.closed,error:o(function(h,m){m.origin=m.origin||(h.entity===U.ConnectionEnd.client?"client":"server"),m.send&&(U.queue(h,U.createAlert(h,m.alert)),U.flush(h));var g=m.fatal!==!1;g&&(h.fail=!0),r.error(h,m),g&&h.close(!1)},"error"),deflate:r.deflate||null,inflate:r.inflate||null};a.reset=function(h){a.version={major:U.Version.major,minor:U.Version.minor},a.record=null,a.session=null,a.peerCertificate=null,a.state={pending:null,current:null},a.expect=a.entity===U.ConnectionEnd.client?mQ:bQ,a.fragmented=null,a.records=[],a.open=!1,a.handshakes=0,a.handshaking=!1,a.isConnected=!1,a.fail=!(h||typeof h>"u"),a.input.clear(),a.tlsData.clear(),a.data.clear(),a.state.current=U.createConnectionState(a)},a.reset();var u=o(function(h,m){var g=m.type-U.ContentType.change_cipher_spec,x=xN[h.entity][h.expect];g in x?x[g](h,m):U.handleUnexpected(h,m)},"_update"),c=o(function(h){var m=0,g=h.input,x=g.length();if(x<5)m=5-x;else{h.record={type:g.getByte(),version:{major:g.getByte(),minor:g.getByte()},length:g.getInt16(),fragment:ke.util.createBuffer(),ready:!1};var v=h.record.version.major===h.version.major;v&&h.session&&h.session.version&&(v=h.record.version.minor===h.version.minor),v||h.error(h,{message:"Incompatible TLS version.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.protocol_version}})}return m},"_readRecordHeader"),f=o(function(h){var m=0,g=h.input,x=g.length();if(x<h.record.length)m=h.record.length-x;else{h.record.fragment.putBytes(g.getBytes(h.record.length)),g.compact();var v=h.state.current.read;v.update(h,h.record)&&(h.fragmented!==null&&(h.fragmented.type===h.record.type?(h.fragmented.fragment.putBuffer(h.record.fragment),h.record=h.fragmented):h.error(h,{message:"Invalid fragmented record.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.unexpected_message}})),h.record.ready=!0)}return m},"_readRecord");return a.handshake=function(h){if(a.entity!==U.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,h=h||"";var m=null;h.length>0&&(a.sessionCache&&(m=a.sessionCache.getSession(h)),m===null&&(h="")),h.length===0&&a.sessionCache&&(m=a.sessionCache.getSession(),m!==null&&(h=m.id)),a.session={id:h,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:ke.md.md5.create(),sha1:ke.md.sha1.create()},m&&(a.version=m.version,a.session.sp=m.sp),a.session.sp.client_random=U.createRandom().getBytes(),a.open=!0,U.queue(a,U.createRecord(a,{type:U.ContentType.handshake,data:U.createClientHello(a)})),U.flush(a)}},a.process=function(h){var m=0;return h&&a.input.putBytes(h),a.fail||(a.record!==null&&a.record.ready&&a.record.fragment.isEmpty()&&(a.record=null),a.record===null&&(m=c(a)),!a.fail&&a.record!==null&&!a.record.ready&&(m=f(a)),!a.fail&&a.record!==null&&a.record.ready&&u(a,a.record)),m},a.prepare=function(h){return U.queue(a,U.createRecord(a,{type:U.ContentType.application_data,data:ke.util.createBuffer(h)})),U.flush(a)},a.prepareHeartbeatRequest=function(h,m){return h instanceof ke.util.ByteBuffer&&(h=h.bytes()),typeof m>"u"&&(m=h.length),a.expectedHeartbeatPayload=h,U.queue(a,U.createRecord(a,{type:U.ContentType.heartbeat,data:U.createHeartbeat(U.HeartbeatMessageType.heartbeat_request,h,m)})),U.flush(a)},a.close=function(h){if(!a.fail&&a.sessionCache&&a.session){var m={id:a.session.id,version:a.session.version,sp:a.session.sp};m.sp.keys=null,a.sessionCache.setSession(m.id,m)}a.open&&(a.open=!1,a.input.clear(),(a.isConnected||a.handshaking)&&(a.isConnected=a.handshaking=!1,U.queue(a,U.createAlert(a,{level:U.Alert.Level.warning,description:U.Alert.Description.close_notify})),U.flush(a)),a.closed(a)),a.reset(h)},a};fk.exports=ke.tls=ke.tls||{};for(Pw in U)typeof U[Pw]!="function"&&(ke.tls[Pw]=U[Pw]);var Pw;ke.tls.prf_tls1=kw;ke.tls.hmac_sha1=hQ;ke.tls.createSessionCache=U.createSessionCache;ke.tls.createConnection=U.createConnection});var dk=Z((Pde,pk)=>{"use strict";var Mu=$t();Pu();wN();var Ti=pk.exports=Mu.tls;Ti.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:o(function(r){r.bulk_cipher_algorithm=Ti.BulkCipherAlgorithm.aes,r.cipher_type=Ti.CipherType.block,r.enc_key_length=16,r.block_length=16,r.fixed_iv_length=16,r.record_iv_length=16,r.mac_algorithm=Ti.MACAlgorithm.hmac_sha1,r.mac_length=20,r.mac_key_length=20},"initSecurityParameters"),initConnectionState:hk};Ti.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:o(function(r){r.bulk_cipher_algorithm=Ti.BulkCipherAlgorithm.aes,r.cipher_type=Ti.CipherType.block,r.enc_key_length=32,r.block_length=16,r.fixed_iv_length=16,r.record_iv_length=16,r.mac_algorithm=Ti.MACAlgorithm.hmac_sha1,r.mac_length=20,r.mac_key_length=20},"initSecurityParameters"),initConnectionState:hk};function hk(r,e,t){var n=e.entity===Mu.tls.ConnectionEnd.client;r.read.cipherState={init:!1,cipher:Mu.cipher.createDecipher("AES-CBC",n?t.keys.server_write_key:t.keys.client_write_key),iv:n?t.keys.server_write_IV:t.keys.client_write_IV},r.write.cipherState={init:!1,cipher:Mu.cipher.createCipher("AES-CBC",n?t.keys.client_write_key:t.keys.server_write_key),iv:n?t.keys.client_write_IV:t.keys.server_write_IV},r.read.cipherFunction=kQ,r.write.cipherFunction=RQ,r.read.macLength=r.write.macLength=t.mac_length,r.read.macFunction=r.write.macFunction=Ti.hmac_sha1}o(hk,"initConnectionState");function RQ(r,e){var t=!1,n=e.macFunction(e.macKey,e.sequenceNumber,r);r.fragment.putBytes(n),e.updateSequenceNumber();var s;r.version.minor===Ti.Versions.TLS_1_0.minor?s=e.cipherState.init?null:e.cipherState.iv:s=Mu.random.getBytesSync(16),e.cipherState.init=!0;var i=e.cipherState.cipher;return i.start({iv:s}),r.version.minor>=Ti.Versions.TLS_1_1.minor&&i.output.putBytes(s),i.update(r.fragment),i.finish(PQ)&&(r.fragment=i.output,r.length=r.fragment.length(),t=!0),t}o(RQ,"encrypt_aes_cbc_sha1");function PQ(r,e,t){if(!t){var n=r-e.length()%r;e.fillWithByte(n-1,n)}return!0}o(PQ,"encrypt_aes_cbc_sha1_padding");function OQ(r,e,t){var n=!0;if(t){for(var s=e.length(),i=e.last(),a=s-1-i;a<s-1;++a)n=n&&e.at(a)==i;n&&e.truncate(i+1)}return n}o(OQ,"decrypt_aes_cbc_sha1_padding");function kQ(r,e){var t=!1,n;r.version.minor===Ti.Versions.TLS_1_0.minor?n=e.cipherState.init?null:e.cipherState.iv:n=r.fragment.getBytes(16),e.cipherState.init=!0;var s=e.cipherState.cipher;s.start({iv:n}),s.update(r.fragment),t=s.finish(OQ);var i=e.macLength,a=Mu.random.getBytesSync(i),u=s.output.length();u>=i?(r.fragment=s.output.getBytes(u-i),a=s.output.getBytes(i)):r.fragment=s.output.getBytes(),r.fragment=Mu.util.createBuffer(r.fragment),r.length=r.fragment.length();var c=e.macFunction(e.macKey,e.sequenceNumber,r);return e.updateSequenceNumber(),t=LQ(e.macKey,a,c)&&t,t}o(kQ,"decrypt_aes_cbc_sha1");function LQ(r,e,t){var n=Mu.hmac.create();return n.start("SHA1",r),n.update(e),e=n.digest().getBytes(),n.start(null,null),n.update(t),t=n.digest().getBytes(),e===t}o(LQ,"compareMacs")});var EN=Z((kde,yk)=>{"use strict";var Mr=$t();Ia();lr();var ng=yk.exports=Mr.sha512=Mr.sha512||{};Mr.md.sha512=Mr.md.algorithms.sha512=ng;var gk=Mr.sha384=Mr.sha512.sha384=Mr.sha512.sha384||{};gk.create=function(){return ng.create("SHA-384")};Mr.md.sha384=Mr.md.algorithms.sha384=gk;Mr.sha512.sha256=Mr.sha512.sha256||{create:o(function(){return ng.create("SHA-512/256")},"create")};Mr.md["sha512/256"]=Mr.md.algorithms["sha512/256"]=Mr.sha512.sha256;Mr.sha512.sha224=Mr.sha512.sha224||{create:o(function(){return ng.create("SHA-512/224")},"create")};Mr.md["sha512/224"]=Mr.md.algorithms["sha512/224"]=Mr.sha512.sha224;ng.create=function(r){if(vk||VQ(),typeof r>"u"&&(r="SHA-512"),!(r in kl))throw new Error("Invalid SHA-512 algorithm: "+r);for(var e=kl[r],t=null,n=Mr.util.createBuffer(),s=new Array(80),i=0;i<80;++i)s[i]=new Array(2);var a=64;switch(r){case"SHA-384":a=48;break;case"SHA-512/256":a=32;break;case"SHA-512/224":a=28;break}var u={algorithm:r.replace("-","").toLowerCase(),blockLength:128,digestLength:a,messageLength:0,fullMessageLength:null,messageLengthSize:16};return u.start=function(){u.messageLength=0,u.fullMessageLength=u.messageLength128=[];for(var c=u.messageLengthSize/4,f=0;f<c;++f)u.fullMessageLength.push(0);n=Mr.util.createBuffer(),t=new Array(e.length);for(var f=0;f<e.length;++f)t[f]=e[f].slice(0);return u},u.start(),u.update=function(c,f){f==="utf8"&&(c=Mr.util.encodeUtf8(c));var h=c.length;u.messageLength+=h,h=[h/4294967296>>>0,h>>>0];for(var m=u.fullMessageLength.length-1;m>=0;--m)u.fullMessageLength[m]+=h[1],h[1]=h[0]+(u.fullMessageLength[m]/4294967296>>>0),u.fullMessageLength[m]=u.fullMessageLength[m]>>>0,h[0]=h[1]/4294967296>>>0;return n.putBytes(c),mk(t,s,n),(n.read>2048||n.length()===0)&&n.compact(),u},u.digest=function(){var c=Mr.util.createBuffer();c.putBytes(n.bytes());var f=u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize,h=f&u.blockLength-1;c.putBytes(SN.substr(0,u.blockLength-h));for(var m,g,x=u.fullMessageLength[0]*8,v=0;v<u.fullMessageLength.length-1;++v)m=u.fullMessageLength[v+1]*8,g=m/4294967296>>>0,x+=g,c.putInt32(x>>>0),x=m>>>0;c.putInt32(x);for(var w=new Array(t.length),v=0;v<t.length;++v)w[v]=t[v].slice(0);mk(w,s,c);var S=Mr.util.createBuffer(),A;r==="SHA-512"?A=w.length:r==="SHA-384"?A=w.length-2:A=w.length-4;for(var v=0;v<A;++v)S.putInt32(w[v][0]),(v!==A-1||r!=="SHA-512/224")&&S.putInt32(w[v][1]);return S},u};var SN=null,vk=!1,bN=null,kl=null;function VQ(){SN="\x80",SN+=Mr.util.fillString("\0",128),bN=[[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]],kl={},kl["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],kl["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],kl["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],kl["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],vk=!0}o(VQ,"_init");function mk(r,e,t){for(var n,s,i,a,u,c,f,h,m,g,x,v,w,S,A,T,b,E,C,_,F,R,q,H,K,X,pe,le,ue,ee,he,we,Ke,Ae,xe,je=t.length();je>=128;){for(ue=0;ue<16;++ue)e[ue][0]=t.getInt32()>>>0,e[ue][1]=t.getInt32()>>>0;for(;ue<80;++ue)we=e[ue-2],ee=we[0],he=we[1],n=((ee>>>19|he<<13)^(he>>>29|ee<<3)^ee>>>6)>>>0,s=((ee<<13|he>>>19)^(he<<3|ee>>>29)^(ee<<26|he>>>6))>>>0,Ae=e[ue-15],ee=Ae[0],he=Ae[1],i=((ee>>>1|he<<31)^(ee>>>8|he<<24)^ee>>>7)>>>0,a=((ee<<31|he>>>1)^(ee<<24|he>>>8)^(ee<<25|he>>>7))>>>0,Ke=e[ue-7],xe=e[ue-16],he=s+Ke[1]+a+xe[1],e[ue][0]=n+Ke[0]+i+xe[0]+(he/4294967296>>>0)>>>0,e[ue][1]=he>>>0;for(w=r[0][0],S=r[0][1],A=r[1][0],T=r[1][1],b=r[2][0],E=r[2][1],C=r[3][0],_=r[3][1],F=r[4][0],R=r[4][1],q=r[5][0],H=r[5][1],K=r[6][0],X=r[6][1],pe=r[7][0],le=r[7][1],ue=0;ue<80;++ue)f=((F>>>14|R<<18)^(F>>>18|R<<14)^(R>>>9|F<<23))>>>0,h=((F<<18|R>>>14)^(F<<14|R>>>18)^(R<<23|F>>>9))>>>0,m=(K^F&(q^K))>>>0,g=(X^R&(H^X))>>>0,u=((w>>>28|S<<4)^(S>>>2|w<<30)^(S>>>7|w<<25))>>>0,c=((w<<4|S>>>28)^(S<<30|w>>>2)^(S<<25|w>>>7))>>>0,x=(w&A|b&(w^A))>>>0,v=(S&T|E&(S^T))>>>0,he=le+h+g+bN[ue][1]+e[ue][1],n=pe+f+m+bN[ue][0]+e[ue][0]+(he/4294967296>>>0)>>>0,s=he>>>0,he=c+v,i=u+x+(he/4294967296>>>0)>>>0,a=he>>>0,pe=K,le=X,K=q,X=H,q=F,H=R,he=_+s,F=C+n+(he/4294967296>>>0)>>>0,R=he>>>0,C=b,_=E,b=A,E=T,A=w,T=S,he=s+a,w=n+i+(he/4294967296>>>0)>>>0,S=he>>>0;he=r[0][1]+S,r[0][0]=r[0][0]+w+(he/4294967296>>>0)>>>0,r[0][1]=he>>>0,he=r[1][1]+T,r[1][0]=r[1][0]+A+(he/4294967296>>>0)>>>0,r[1][1]=he>>>0,he=r[2][1]+E,r[2][0]=r[2][0]+b+(he/4294967296>>>0)>>>0,r[2][1]=he>>>0,he=r[3][1]+_,r[3][0]=r[3][0]+C+(he/4294967296>>>0)>>>0,r[3][1]=he>>>0,he=r[4][1]+R,r[4][0]=r[4][0]+F+(he/4294967296>>>0)>>>0,r[4][1]=he>>>0,he=r[5][1]+H,r[5][0]=r[5][0]+q+(he/4294967296>>>0)>>>0,r[5][1]=he>>>0,he=r[6][1]+X,r[6][0]=r[6][0]+K+(he/4294967296>>>0)>>>0,r[6][1]=he>>>0,he=r[7][1]+le,r[7][0]=r[7][0]+pe+(he/4294967296>>>0)>>>0,r[7][1]=he>>>0,je-=128}}o(mk,"_update")});var xk=Z(AN=>{"use strict";var UQ=$t();ea();var Bn=UQ.asn1;AN.privateKeyValidator={name:"PrivateKeyInfo",tagClass:Bn.Class.UNIVERSAL,type:Bn.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:Bn.Class.UNIVERSAL,type:Bn.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:Bn.Class.UNIVERSAL,type:Bn.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Bn.Class.UNIVERSAL,type:Bn.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:Bn.Class.UNIVERSAL,type:Bn.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]};AN.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:Bn.Class.UNIVERSAL,type:Bn.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:Bn.Class.UNIVERSAL,type:Bn.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Bn.Class.UNIVERSAL,type:Bn.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:Bn.Class.UNIVERSAL,type:Bn.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}});var Rk=Z((Ude,Dk)=>{"use strict";var Kn=$t();Z0();bi();EN();lr();var Ck=xk(),jQ=Ck.publicKeyValidator,MQ=Ck.privateKeyValidator;typeof wk>"u"&&(wk=Kn.jsbn.BigInteger);var wk,TN=Kn.util.ByteBuffer,Bs=typeof Buffer>"u"?Uint8Array:Buffer;Kn.pki=Kn.pki||{};Dk.exports=Kn.pki.ed25519=Kn.ed25519=Kn.ed25519||{};var Qt=Kn.ed25519;Qt.constants={};Qt.constants.PUBLIC_KEY_BYTE_LENGTH=32;Qt.constants.PRIVATE_KEY_BYTE_LENGTH=64;Qt.constants.SEED_BYTE_LENGTH=32;Qt.constants.SIGN_BYTE_LENGTH=64;Qt.constants.HASH_BYTE_LENGTH=64;Qt.generateKeyPair=function(r){r=r||{};var e=r.seed;if(e===void 0)e=Kn.random.getBytesSync(Qt.constants.SEED_BYTE_LENGTH);else if(typeof e=="string"){if(e.length!==Qt.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+Qt.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(e instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');e=Io({message:e,encoding:"binary"});for(var t=new Bs(Qt.constants.PUBLIC_KEY_BYTE_LENGTH),n=new Bs(Qt.constants.PRIVATE_KEY_BYTE_LENGTH),s=0;s<32;++s)n[s]=e[s];return KQ(t,n),{publicKey:t,privateKey:n}};Qt.privateKeyFromAsn1=function(r){var e={},t=[],n=Kn.asn1.validate(r,MQ,e,t);if(!n){var s=new Error("Invalid Key.");throw s.errors=t,s}var i=Kn.asn1.derToOid(e.privateKeyOid),a=Kn.oids.EdDSA25519;if(i!==a)throw new Error('Invalid OID "'+i+'"; OID must be "'+a+'".');var u=e.privateKey,c=Io({message:Kn.asn1.fromDer(u).value,encoding:"binary"});return{privateKeyBytes:c}};Qt.publicKeyFromAsn1=function(r){var e={},t=[],n=Kn.asn1.validate(r,jQ,e,t);if(!n){var s=new Error("Invalid Key.");throw s.errors=t,s}var i=Kn.asn1.derToOid(e.publicKeyOid),a=Kn.oids.EdDSA25519;if(i!==a)throw new Error('Invalid OID "'+i+'"; OID must be "'+a+'".');var u=e.ed25519PublicKey;if(u.length!==Qt.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return Io({message:u,encoding:"binary"})};Qt.publicKeyFromPrivateKey=function(r){r=r||{};var e=Io({message:r.privateKey,encoding:"binary"});if(e.length!==Qt.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+Qt.constants.PRIVATE_KEY_BYTE_LENGTH);for(var t=new Bs(Qt.constants.PUBLIC_KEY_BYTE_LENGTH),n=0;n<t.length;++n)t[n]=e[32+n];return t};Qt.sign=function(r){r=r||{};var e=Io(r),t=Io({message:r.privateKey,encoding:"binary"});if(t.length===Qt.constants.SEED_BYTE_LENGTH){var n=Qt.generateKeyPair({seed:t});t=n.privateKey}else if(t.length!==Qt.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+Qt.constants.SEED_BYTE_LENGTH+" or "+Qt.constants.PRIVATE_KEY_BYTE_LENGTH);var s=new Bs(Qt.constants.SIGN_BYTE_LENGTH+e.length);$Q(s,e,e.length,t);for(var i=new Bs(Qt.constants.SIGN_BYTE_LENGTH),a=0;a<i.length;++a)i[a]=s[a];return i};Qt.verify=function(r){r=r||{};var e=Io(r);if(r.signature===void 0)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var t=Io({message:r.signature,encoding:"binary"});if(t.length!==Qt.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+Qt.constants.SIGN_BYTE_LENGTH);var n=Io({message:r.publicKey,encoding:"binary"});if(n.length!==Qt.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+Qt.constants.PUBLIC_KEY_BYTE_LENGTH);var s=new Bs(Qt.constants.SIGN_BYTE_LENGTH+e.length),i=new Bs(Qt.constants.SIGN_BYTE_LENGTH+e.length),a;for(a=0;a<Qt.constants.SIGN_BYTE_LENGTH;++a)s[a]=t[a];for(a=0;a<e.length;++a)s[a+Qt.constants.SIGN_BYTE_LENGTH]=e[a];return GQ(i,s,s.length,n)>=0};function Io(r){var e=r.message;if(e instanceof Uint8Array||e instanceof Bs)return e;var t=r.encoding;if(e===void 0)if(r.md)e=r.md.digest().getBytes(),t="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof e=="string"&&!t)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof e=="string"){if(typeof Buffer<"u")return Buffer.from(e,t);e=new TN(e,t)}else if(!(e instanceof TN))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 n=new Bs(e.length()),s=0;s<n.length;++s)n[s]=e.at(s);return n}o(Io,"messageToNativeBuffer");var IN=Nt(),Lw=Nt([1]),FQ=Nt([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),qQ=Nt([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),Sk=Nt([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),bk=Nt([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),CN=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]),HQ=Nt([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function sg(r,e){var t=Kn.md.sha512.create(),n=new TN(r);t.update(n.getBytes(e),"binary");var s=t.digest().getBytes();if(typeof Buffer<"u")return Buffer.from(s,"binary");for(var i=new Bs(Qt.constants.HASH_BYTE_LENGTH),a=0;a<64;++a)i[a]=s.charCodeAt(a);return i}o(sg,"sha512");function KQ(r,e){var t=[Nt(),Nt(),Nt(),Nt()],n,s=sg(e,32);for(s[0]&=248,s[31]&=127,s[31]|=64,RN(t,s),DN(r,t),n=0;n<32;++n)e[n+32]=r[n];return 0}o(KQ,"crypto_sign_keypair");function $Q(r,e,t,n){var s,i,a=new Float64Array(64),u=[Nt(),Nt(),Nt(),Nt()],c=sg(n,32);c[0]&=248,c[31]&=127,c[31]|=64;var f=t+64;for(s=0;s<t;++s)r[64+s]=e[s];for(s=0;s<32;++s)r[32+s]=c[32+s];var h=sg(r.subarray(32),t+32);for(_N(h),RN(u,h),DN(r,u),s=32;s<64;++s)r[s]=n[s];var m=sg(r,t+64);for(_N(m),s=32;s<64;++s)a[s]=0;for(s=0;s<32;++s)a[s]=h[s];for(s=0;s<32;++s)for(i=0;i<32;i++)a[s+i]+=m[s]*c[i];return Nk(r.subarray(32),a),f}o($Q,"crypto_sign");function GQ(r,e,t,n){var s,i,a=new Bs(32),u=[Nt(),Nt(),Nt(),Nt()],c=[Nt(),Nt(),Nt(),Nt()];if(i=-1,t<64||XQ(c,n))return-1;for(s=0;s<t;++s)r[s]=e[s];for(s=0;s<32;++s)r[s+32]=n[s];var f=sg(r,t);if(_N(f),_k(u,c,f),RN(c,e.subarray(32)),BN(u,c),DN(a,u),t-=64,Tk(e,0,a,0)){for(s=0;s<t;++s)r[s]=0;return-1}for(s=0;s<t;++s)r[s]=e[s+64];return i=t,i}o(GQ,"crypto_sign_open");function Nk(r,e){var t,n,s,i;for(n=63;n>=32;--n){for(t=0,s=n-32,i=n-12;s<i;++s)e[s]+=t-16*e[n]*CN[s-(n-32)],t=e[s]+128>>8,e[s]-=t*256;e[s]+=t,e[n]=0}for(t=0,s=0;s<32;++s)e[s]+=t-(e[31]>>4)*CN[s],t=e[s]>>8,e[s]&=255;for(s=0;s<32;++s)e[s]-=t*CN[s];for(n=0;n<32;++n)e[n+1]+=e[n]>>8,r[n]=e[n]&255}o(Nk,"modL");function _N(r){for(var e=new Float64Array(64),t=0;t<64;++t)e[t]=r[t],r[t]=0;Nk(r,e)}o(_N,"reduce");function BN(r,e){var t=Nt(),n=Nt(),s=Nt(),i=Nt(),a=Nt(),u=Nt(),c=Nt(),f=Nt(),h=Nt();gp(t,r[1],r[0]),gp(h,e[1],e[0]),Ir(t,t,h),mp(n,r[0],r[1]),mp(h,e[0],e[1]),Ir(n,n,h),Ir(s,r[3],e[3]),Ir(s,s,qQ),Ir(i,r[2],e[2]),mp(i,i,i),gp(a,n,t),gp(u,i,s),mp(c,i,s),mp(f,n,t),Ir(r[0],a,u),Ir(r[1],f,c),Ir(r[2],c,u),Ir(r[3],a,f)}o(BN,"add");function Ek(r,e,t){for(var n=0;n<4;++n)Bk(r[n],e[n],t)}o(Ek,"cswap");function DN(r,e){var t=Nt(),n=Nt(),s=Nt();YQ(s,e[2]),Ir(t,e[0],s),Ir(n,e[1],s),Vw(r,n),r[31]^=Ik(t)<<7}o(DN,"pack");function Vw(r,e){var t,n,s,i=Nt(),a=Nt();for(t=0;t<16;++t)a[t]=e[t];for(NN(a),NN(a),NN(a),n=0;n<2;++n){for(i[0]=a[0]-65517,t=1;t<15;++t)i[t]=a[t]-65535-(i[t-1]>>16&1),i[t-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),s=i[15]>>16&1,i[14]&=65535,Bk(a,i,1-s)}for(t=0;t<16;t++)r[2*t]=a[t]&255,r[2*t+1]=a[t]>>8}o(Vw,"pack25519");function XQ(r,e){var t=Nt(),n=Nt(),s=Nt(),i=Nt(),a=Nt(),u=Nt(),c=Nt();return Fu(r[2],Lw),WQ(r[1],e),Ll(s,r[1]),Ir(i,s,FQ),gp(s,s,r[2]),mp(i,r[2],i),Ll(a,i),Ll(u,a),Ir(c,u,a),Ir(t,c,s),Ir(t,t,i),zQ(t,t),Ir(t,t,s),Ir(t,t,i),Ir(t,t,i),Ir(r[0],t,i),Ll(n,r[0]),Ir(n,n,i),Ak(n,s)&&Ir(r[0],r[0],HQ),Ll(n,r[0]),Ir(n,n,i),Ak(n,s)?-1:(Ik(r[0])===e[31]>>7&&gp(r[0],IN,r[0]),Ir(r[3],r[0],r[1]),0)}o(XQ,"unpackneg");function WQ(r,e){var t;for(t=0;t<16;++t)r[t]=e[2*t]+(e[2*t+1]<<8);r[15]&=32767}o(WQ,"unpack25519");function zQ(r,e){var t=Nt(),n;for(n=0;n<16;++n)t[n]=e[n];for(n=250;n>=0;--n)Ll(t,t),n!==1&&Ir(t,t,e);for(n=0;n<16;++n)r[n]=t[n]}o(zQ,"pow2523");function Ak(r,e){var t=new Bs(32),n=new Bs(32);return Vw(t,r),Vw(n,e),Tk(t,0,n,0)}o(Ak,"neq25519");function Tk(r,e,t,n){return JQ(r,e,t,n,32)}o(Tk,"crypto_verify_32");function JQ(r,e,t,n,s){var i,a=0;for(i=0;i<s;++i)a|=r[e+i]^t[n+i];return(1&a-1>>>8)-1}o(JQ,"vn");function Ik(r){var e=new Bs(32);return Vw(e,r),e[0]&1}o(Ik,"par25519");function _k(r,e,t){var n,s;for(Fu(r[0],IN),Fu(r[1],Lw),Fu(r[2],Lw),Fu(r[3],IN),s=255;s>=0;--s)n=t[s/8|0]>>(s&7)&1,Ek(r,e,n),BN(e,r),BN(r,r),Ek(r,e,n)}o(_k,"scalarmult");function RN(r,e){var t=[Nt(),Nt(),Nt(),Nt()];Fu(t[0],Sk),Fu(t[1],bk),Fu(t[2],Lw),Ir(t[3],Sk,bk),_k(r,t,e)}o(RN,"scalarbase");function Fu(r,e){var t;for(t=0;t<16;t++)r[t]=e[t]|0}o(Fu,"set25519");function YQ(r,e){var t=Nt(),n;for(n=0;n<16;++n)t[n]=e[n];for(n=253;n>=0;--n)Ll(t,t),n!==2&&n!==4&&Ir(t,t,e);for(n=0;n<16;++n)r[n]=t[n]}o(YQ,"inv25519");function NN(r){var e,t,n=1;for(e=0;e<16;++e)t=r[e]+n+65535,n=Math.floor(t/65536),r[e]=t-n*65536;r[0]+=n-1+37*(n-1)}o(NN,"car25519");function Bk(r,e,t){for(var n,s=~(t-1),i=0;i<16;++i)n=s&(r[i]^e[i]),r[i]^=n,e[i]^=n}o(Bk,"sel25519");function Nt(r){var e,t=new Float64Array(16);if(r)for(e=0;e<r.length;++e)t[e]=r[e];return t}o(Nt,"gf");function mp(r,e,t){for(var n=0;n<16;++n)r[n]=e[n]+t[n]}o(mp,"A");function gp(r,e,t){for(var n=0;n<16;++n)r[n]=e[n]-t[n]}o(gp,"Z");function Ll(r,e){Ir(r,e,e)}o(Ll,"S");function Ir(r,e,t){var n,s,i=0,a=0,u=0,c=0,f=0,h=0,m=0,g=0,x=0,v=0,w=0,S=0,A=0,T=0,b=0,E=0,C=0,_=0,F=0,R=0,q=0,H=0,K=0,X=0,pe=0,le=0,ue=0,ee=0,he=0,we=0,Ke=0,Ae=t[0],xe=t[1],je=t[2],Je=t[3],Ze=t[4],lt=t[5],O=t[6],D=t[7],se=t[8],z=t[9],Ge=t[10],Re=t[11],Ce=t[12],ft=t[13],nr=t[14],Me=t[15];n=e[0],i+=n*Ae,a+=n*xe,u+=n*je,c+=n*Je,f+=n*Ze,h+=n*lt,m+=n*O,g+=n*D,x+=n*se,v+=n*z,w+=n*Ge,S+=n*Re,A+=n*Ce,T+=n*ft,b+=n*nr,E+=n*Me,n=e[1],a+=n*Ae,u+=n*xe,c+=n*je,f+=n*Je,h+=n*Ze,m+=n*lt,g+=n*O,x+=n*D,v+=n*se,w+=n*z,S+=n*Ge,A+=n*Re,T+=n*Ce,b+=n*ft,E+=n*nr,C+=n*Me,n=e[2],u+=n*Ae,c+=n*xe,f+=n*je,h+=n*Je,m+=n*Ze,g+=n*lt,x+=n*O,v+=n*D,w+=n*se,S+=n*z,A+=n*Ge,T+=n*Re,b+=n*Ce,E+=n*ft,C+=n*nr,_+=n*Me,n=e[3],c+=n*Ae,f+=n*xe,h+=n*je,m+=n*Je,g+=n*Ze,x+=n*lt,v+=n*O,w+=n*D,S+=n*se,A+=n*z,T+=n*Ge,b+=n*Re,E+=n*Ce,C+=n*ft,_+=n*nr,F+=n*Me,n=e[4],f+=n*Ae,h+=n*xe,m+=n*je,g+=n*Je,x+=n*Ze,v+=n*lt,w+=n*O,S+=n*D,A+=n*se,T+=n*z,b+=n*Ge,E+=n*Re,C+=n*Ce,_+=n*ft,F+=n*nr,R+=n*Me,n=e[5],h+=n*Ae,m+=n*xe,g+=n*je,x+=n*Je,v+=n*Ze,w+=n*lt,S+=n*O,A+=n*D,T+=n*se,b+=n*z,E+=n*Ge,C+=n*Re,_+=n*Ce,F+=n*ft,R+=n*nr,q+=n*Me,n=e[6],m+=n*Ae,g+=n*xe,x+=n*je,v+=n*Je,w+=n*Ze,S+=n*lt,A+=n*O,T+=n*D,b+=n*se,E+=n*z,C+=n*Ge,_+=n*Re,F+=n*Ce,R+=n*ft,q+=n*nr,H+=n*Me,n=e[7],g+=n*Ae,x+=n*xe,v+=n*je,w+=n*Je,S+=n*Ze,A+=n*lt,T+=n*O,b+=n*D,E+=n*se,C+=n*z,_+=n*Ge,F+=n*Re,R+=n*Ce,q+=n*ft,H+=n*nr,K+=n*Me,n=e[8],x+=n*Ae,v+=n*xe,w+=n*je,S+=n*Je,A+=n*Ze,T+=n*lt,b+=n*O,E+=n*D,C+=n*se,_+=n*z,F+=n*Ge,R+=n*Re,q+=n*Ce,H+=n*ft,K+=n*nr,X+=n*Me,n=e[9],v+=n*Ae,w+=n*xe,S+=n*je,A+=n*Je,T+=n*Ze,b+=n*lt,E+=n*O,C+=n*D,_+=n*se,F+=n*z,R+=n*Ge,q+=n*Re,H+=n*Ce,K+=n*ft,X+=n*nr,pe+=n*Me,n=e[10],w+=n*Ae,S+=n*xe,A+=n*je,T+=n*Je,b+=n*Ze,E+=n*lt,C+=n*O,_+=n*D,F+=n*se,R+=n*z,q+=n*Ge,H+=n*Re,K+=n*Ce,X+=n*ft,pe+=n*nr,le+=n*Me,n=e[11],S+=n*Ae,A+=n*xe,T+=n*je,b+=n*Je,E+=n*Ze,C+=n*lt,_+=n*O,F+=n*D,R+=n*se,q+=n*z,H+=n*Ge,K+=n*Re,X+=n*Ce,pe+=n*ft,le+=n*nr,ue+=n*Me,n=e[12],A+=n*Ae,T+=n*xe,b+=n*je,E+=n*Je,C+=n*Ze,_+=n*lt,F+=n*O,R+=n*D,q+=n*se,H+=n*z,K+=n*Ge,X+=n*Re,pe+=n*Ce,le+=n*ft,ue+=n*nr,ee+=n*Me,n=e[13],T+=n*Ae,b+=n*xe,E+=n*je,C+=n*Je,_+=n*Ze,F+=n*lt,R+=n*O,q+=n*D,H+=n*se,K+=n*z,X+=n*Ge,pe+=n*Re,le+=n*Ce,ue+=n*ft,ee+=n*nr,he+=n*Me,n=e[14],b+=n*Ae,E+=n*xe,C+=n*je,_+=n*Je,F+=n*Ze,R+=n*lt,q+=n*O,H+=n*D,K+=n*se,X+=n*z,pe+=n*Ge,le+=n*Re,ue+=n*Ce,ee+=n*ft,he+=n*nr,we+=n*Me,n=e[15],E+=n*Ae,C+=n*xe,_+=n*je,F+=n*Je,R+=n*Ze,q+=n*lt,H+=n*O,K+=n*D,X+=n*se,pe+=n*z,le+=n*Ge,ue+=n*Re,ee+=n*Ce,he+=n*ft,we+=n*nr,Ke+=n*Me,i+=38*C,a+=38*_,u+=38*F,c+=38*R,f+=38*q,h+=38*H,m+=38*K,g+=38*X,x+=38*pe,v+=38*le,w+=38*ue,S+=38*ee,A+=38*he,T+=38*we,b+=38*Ke,s=1,n=i+s+65535,s=Math.floor(n/65536),i=n-s*65536,n=a+s+65535,s=Math.floor(n/65536),a=n-s*65536,n=u+s+65535,s=Math.floor(n/65536),u=n-s*65536,n=c+s+65535,s=Math.floor(n/65536),c=n-s*65536,n=f+s+65535,s=Math.floor(n/65536),f=n-s*65536,n=h+s+65535,s=Math.floor(n/65536),h=n-s*65536,n=m+s+65535,s=Math.floor(n/65536),m=n-s*65536,n=g+s+65535,s=Math.floor(n/65536),g=n-s*65536,n=x+s+65535,s=Math.floor(n/65536),x=n-s*65536,n=v+s+65535,s=Math.floor(n/65536),v=n-s*65536,n=w+s+65535,s=Math.floor(n/65536),w=n-s*65536,n=S+s+65535,s=Math.floor(n/65536),S=n-s*65536,n=A+s+65535,s=Math.floor(n/65536),A=n-s*65536,n=T+s+65535,s=Math.floor(n/65536),T=n-s*65536,n=b+s+65535,s=Math.floor(n/65536),b=n-s*65536,n=E+s+65535,s=Math.floor(n/65536),E=n-s*65536,i+=s-1+37*(s-1),s=1,n=i+s+65535,s=Math.floor(n/65536),i=n-s*65536,n=a+s+65535,s=Math.floor(n/65536),a=n-s*65536,n=u+s+65535,s=Math.floor(n/65536),u=n-s*65536,n=c+s+65535,s=Math.floor(n/65536),c=n-s*65536,n=f+s+65535,s=Math.floor(n/65536),f=n-s*65536,n=h+s+65535,s=Math.floor(n/65536),h=n-s*65536,n=m+s+65535,s=Math.floor(n/65536),m=n-s*65536,n=g+s+65535,s=Math.floor(n/65536),g=n-s*65536,n=x+s+65535,s=Math.floor(n/65536),x=n-s*65536,n=v+s+65535,s=Math.floor(n/65536),v=n-s*65536,n=w+s+65535,s=Math.floor(n/65536),w=n-s*65536,n=S+s+65535,s=Math.floor(n/65536),S=n-s*65536,n=A+s+65535,s=Math.floor(n/65536),A=n-s*65536,n=T+s+65535,s=Math.floor(n/65536),T=n-s*65536,n=b+s+65535,s=Math.floor(n/65536),b=n-s*65536,n=E+s+65535,s=Math.floor(n/65536),E=n-s*65536,i+=s-1+37*(s-1),r[0]=i,r[1]=a,r[2]=u,r[3]=c,r[4]=f,r[5]=h,r[6]=m,r[7]=g,r[8]=x,r[9]=v,r[10]=w,r[11]=S,r[12]=A,r[13]=T,r[14]=b,r[15]=E}o(Ir,"M")});var Lk=Z((Mde,kk)=>{"use strict";var si=$t();lr();bi();Z0();kk.exports=si.kem=si.kem||{};var Pk=si.jsbn.BigInteger;si.kem.rsa={};si.kem.rsa.create=function(r,e){e=e||{};var t=e.prng||si.random,n={};return n.encrypt=function(s,i){var a=Math.ceil(s.n.bitLength()/8),u;do u=new Pk(si.util.bytesToHex(t.getBytesSync(a)),16).mod(s.n);while(u.compareTo(Pk.ONE)<=0);u=si.util.hexToBytes(u.toString(16));var c=a-u.length;c>0&&(u=si.util.fillString("\0",c)+u);var f=s.encrypt(u,"NONE"),h=r.generate(u,i);return{encapsulation:f,key:h}},n.decrypt=function(s,i,a){var u=s.decrypt(i,"NONE");return r.generate(u,a)},n};si.kem.kdf1=function(r,e){Ok(this,r,0,e||r.digestLength)};si.kem.kdf2=function(r,e){Ok(this,r,1,e||r.digestLength)};function Ok(r,e,t,n){r.generate=function(s,i){for(var a=new si.util.ByteBuffer,u=Math.ceil(i/n)+t,c=new si.util.ByteBuffer,f=t;f<u;++f){c.putInt32(f),e.start(),e.update(s+c.getBytes());var h=e.digest();a.putBytes(h.getBytes(n))}return a.truncate(a.length()-i),a.getBytes()}}o(Ok,"_createKDF")});var Mk=Z((qde,jk)=>{"use strict";var rr=$t();lr();jk.exports=rr.log=rr.log||{};rr.log.levels=["none","error","warning","info","debug","verbose","max"];var Uw={},kN=[],ag=null;rr.log.LEVEL_LOCKED=2;rr.log.NO_LEVEL_CHECK=4;rr.log.INTERPOLATE=8;for(La=0;La<rr.log.levels.length;++La)PN=rr.log.levels[La],Uw[PN]={index:La,name:PN.toUpperCase()};var PN,La;rr.log.logMessage=function(r){for(var e=Uw[r.level].index,t=0;t<kN.length;++t){var n=kN[t];if(n.flags&rr.log.NO_LEVEL_CHECK)n.f(r);else{var s=Uw[n.level].index;e<=s&&n.f(n,r)}}};rr.log.prepareStandard=function(r){"standard"in r||(r.standard=Uw[r.level].name+" ["+r.category+"] "+r.message)};rr.log.prepareFull=function(r){if(!("full"in r)){var e=[r.message];e=e.concat([]),r.full=rr.util.format.apply(this,e)}};rr.log.prepareStandardFull=function(r){"standardFull"in r||(rr.log.prepareStandard(r),r.standardFull=r.standard)};for(ON=["error","warning","info","debug","verbose"],La=0;La<ON.length;++La)(function(e){rr.log[e]=function(t,n){var s=Array.prototype.slice.call(arguments).slice(2),i={timestamp:new Date,level:e,category:t,message:n,arguments:s};rr.log.logMessage(i)}})(ON[La]);var ON,La;rr.log.makeLogger=function(r){var e={flags:0,f:r};return rr.log.setLevel(e,"none"),e};rr.log.setLevel=function(r,e){var t=!1;if(r&&!(r.flags&rr.log.LEVEL_LOCKED))for(var n=0;n<rr.log.levels.length;++n){var s=rr.log.levels[n];if(e==s){r.level=e,t=!0;break}}return t};rr.log.lock=function(r,e){typeof e>"u"||e?r.flags|=rr.log.LEVEL_LOCKED:r.flags&=~rr.log.LEVEL_LOCKED};rr.log.addLogger=function(r){kN.push(r)};typeof console<"u"&&"log"in console?(console.error&&console.warn&&console.info&&console.debug?(Vk={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},og=o(function(r,e){rr.log.prepareStandard(e);var t=Vk[e.level],n=[e.standard];n=n.concat(e.arguments.slice()),t.apply(console,n)},"f"),vp=rr.log.makeLogger(og)):(og=o(function(e,t){rr.log.prepareStandardFull(t),console.log(t.standardFull)},"f"),vp=rr.log.makeLogger(og)),rr.log.setLevel(vp,"debug"),rr.log.addLogger(vp),ag=vp):console={log:o(function(){},"log")};var vp,Vk,og;ag!==null&&typeof window<"u"&&window.location&&(ig=new URL(window.location.href).searchParams,ig.has("console.level")&&rr.log.setLevel(ag,ig.get("console.level").slice(-1)[0]),ig.has("console.lock")&&(Uk=ig.get("console.lock").slice(-1)[0],Uk=="true"&&rr.log.lock(ag)));var ig,Uk;rr.log.consoleLogger=ag});var qk=Z((Kde,Fk)=>{"use strict";Fk.exports=Ia();vw();lp();W2();EN()});var $k=Z(($de,Kk)=>{"use strict";var ze=$t();Pu();ea();Y0();Ou();_l();uN();bi();lr();Dw();var te=ze.asn1,xs=Kk.exports=ze.pkcs7=ze.pkcs7||{};xs.messageFromPem=function(r){var e=ze.pem.decode(r)[0];if(e.type!=="PKCS7"){var t=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw t.headerType=e.type,t}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var n=te.fromDer(e.body);return xs.messageFromAsn1(n)};xs.messageToPem=function(r,e){var t={type:"PKCS7",body:te.toDer(r.toAsn1()).getBytes()};return ze.pem.encode(t,{maxline:e})};xs.messageFromAsn1=function(r){var e={},t=[];if(!te.validate(r,xs.asn1.contentInfoValidator,e,t)){var n=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw n.errors=t,n}var s=te.derToOid(e.contentType),i;switch(s){case ze.pki.oids.envelopedData:i=xs.createEnvelopedData();break;case ze.pki.oids.encryptedData:i=xs.createEncryptedData();break;case ze.pki.oids.signedData:i=xs.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+s+" is not (yet) supported.")}return i.fromAsn1(e.content.value[0]),i};xs.createSignedData=function(){var r=null;return r={type:ze.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:o(function(n){if(VN(r,n,xs.asn1.signedDataValidator),r.certificates=[],r.crls=[],r.digestAlgorithmIdentifiers=[],r.contentInfo=null,r.signerInfos=[],r.rawCapture.certificates)for(var s=r.rawCapture.certificates.value,i=0;i<s.length;++i)r.certificates.push(ze.pki.certificateFromAsn1(s[i]))},"fromAsn1"),toAsn1:o(function(){r.contentInfo||r.sign();for(var n=[],s=0;s<r.certificates.length;++s)n.push(ze.pki.certificateToAsn1(r.certificates[s]));var i=[],a=te.create(te.Class.CONTEXT_SPECIFIC,0,!0,[te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.INTEGER,!1,te.integerToDer(r.version).getBytes()),te.create(te.Class.UNIVERSAL,te.Type.SET,!0,r.digestAlgorithmIdentifiers),r.contentInfo])]);return n.length>0&&a.value[0].value.push(te.create(te.Class.CONTEXT_SPECIFIC,0,!0,n)),i.length>0&&a.value[0].value.push(te.create(te.Class.CONTEXT_SPECIFIC,1,!0,i)),a.value[0].value.push(te.create(te.Class.UNIVERSAL,te.Type.SET,!0,r.signerInfos)),te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(r.type).getBytes()),a])},"toAsn1"),addSigner:o(function(n){var s=n.issuer,i=n.serialNumber;if(n.certificate){var a=n.certificate;typeof a=="string"&&(a=ze.pki.certificateFromPem(a)),s=a.issuer.attributes,i=a.serialNumber}var u=n.key;if(!u)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof u=="string"&&(u=ze.pki.privateKeyFromPem(u));var c=n.digestAlgorithm||ze.pki.oids.sha1;switch(c){case ze.pki.oids.sha1:case ze.pki.oids.sha256:case ze.pki.oids.sha384:case ze.pki.oids.sha512:case ze.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+c)}var f=n.authenticatedAttributes||[];if(f.length>0){for(var h=!1,m=!1,g=0;g<f.length;++g){var x=f[g];if(!h&&x.type===ze.pki.oids.contentType){if(h=!0,m)break;continue}if(!m&&x.type===ze.pki.oids.messageDigest){if(m=!0,h)break;continue}}if(!h||!m)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.")}r.signers.push({key:u,version:1,issuer:s,serialNumber:i,digestAlgorithm:c,signatureAlgorithm:ze.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:f,unauthenticatedAttributes:[]})},"addSigner"),sign:o(function(n){if(n=n||{},(typeof r.content!="object"||r.contentInfo===null)&&(r.contentInfo=te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(ze.pki.oids.data).getBytes())]),"content"in r)){var s;r.content instanceof ze.util.ByteBuffer?s=r.content.bytes():typeof r.content=="string"&&(s=ze.util.encodeUtf8(r.content)),n.detached?r.detachedContent=te.create(te.Class.UNIVERSAL,te.Type.OCTETSTRING,!1,s):r.contentInfo.value.push(te.create(te.Class.CONTEXT_SPECIFIC,0,!0,[te.create(te.Class.UNIVERSAL,te.Type.OCTETSTRING,!1,s)]))}if(r.signers.length!==0){var i=e();t(i)}},"sign"),verify:o(function(){throw new Error("PKCS#7 signature verification not yet implemented.")},"verify"),addCertificate:o(function(n){typeof n=="string"&&(n=ze.pki.certificateFromPem(n)),r.certificates.push(n)},"addCertificate"),addCertificateRevokationList:o(function(n){throw new Error("PKCS#7 CRL support not yet implemented.")},"addCertificateRevokationList")},r;function e(){for(var n={},s=0;s<r.signers.length;++s){var i=r.signers[s],a=i.digestAlgorithm;a in n||(n[a]=ze.md[ze.pki.oids[a]].create()),i.authenticatedAttributes.length===0?i.md=n[a]:i.md=ze.md[ze.pki.oids[a]].create()}r.digestAlgorithmIdentifiers=[];for(var a in n)r.digestAlgorithmIdentifiers.push(te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(a).getBytes()),te.create(te.Class.UNIVERSAL,te.Type.NULL,!1,"")]));return n}o(e,"addDigestAlgorithmIds");function t(n){var s;if(r.detachedContent?s=r.detachedContent:(s=r.contentInfo.value[1],s=s.value[0]),!s)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var i=te.derToOid(r.contentInfo.value[0].value),a=te.toDer(s);a.getByte(),te.getBerValueLength(a),a=a.getBytes();for(var u in n)n[u].start().update(a);for(var c=new Date,f=0;f<r.signers.length;++f){var h=r.signers[f];if(h.authenticatedAttributes.length===0){if(i!==ze.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{h.authenticatedAttributesAsn1=te.create(te.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var m=te.create(te.Class.UNIVERSAL,te.Type.SET,!0,[]),g=0;g<h.authenticatedAttributes.length;++g){var x=h.authenticatedAttributes[g];x.type===ze.pki.oids.messageDigest?x.value=n[h.digestAlgorithm].digest():x.type===ze.pki.oids.signingTime&&(x.value||(x.value=c)),m.value.push(LN(x)),h.authenticatedAttributesAsn1.value.push(LN(x))}a=te.toDer(m).getBytes(),h.md.start().update(a)}h.signature=h.key.sign(h.md,"RSASSA-PKCS1-V1_5")}r.signerInfos=nZ(r.signers)}o(t,"addSignerInfos")};xs.createEncryptedData=function(){var r=null;return r={type:ze.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:ze.pki.oids["aes256-CBC"]},fromAsn1:o(function(e){VN(r,e,xs.asn1.encryptedDataValidator)},"fromAsn1"),decrypt:o(function(e){e!==void 0&&(r.encryptedContent.key=e),Hk(r)},"decrypt")},r};xs.createEnvelopedData=function(){var r=null;return r={type:ze.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:ze.pki.oids["aes256-CBC"]},fromAsn1:o(function(e){var t=VN(r,e,xs.asn1.envelopedDataValidator);r.recipients=eZ(t.recipientInfos.value)},"fromAsn1"),toAsn1:o(function(){return te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(r.type).getBytes()),te.create(te.Class.CONTEXT_SPECIFIC,0,!0,[te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.INTEGER,!1,te.integerToDer(r.version).getBytes()),te.create(te.Class.UNIVERSAL,te.Type.SET,!0,tZ(r.recipients)),te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,sZ(r.encryptedContent))])])])},"toAsn1"),findRecipient:o(function(e){for(var t=e.issuer.attributes,n=0;n<r.recipients.length;++n){var s=r.recipients[n],i=s.issuer;if(s.serialNumber===e.serialNumber&&i.length===t.length){for(var a=!0,u=0;u<t.length;++u)if(i[u].type!==t[u].type||i[u].value!==t[u].value){a=!1;break}if(a)return s}}return null},"findRecipient"),decrypt:o(function(e,t){if(r.encryptedContent.key===void 0&&e!==void 0&&t!==void 0)switch(e.encryptedContent.algorithm){case ze.pki.oids.rsaEncryption:case ze.pki.oids.desCBC:var n=t.decrypt(e.encryptedContent.content);r.encryptedContent.key=ze.util.createBuffer(n);break;default:throw new Error("Unsupported asymmetric cipher, OID "+e.encryptedContent.algorithm)}Hk(r)},"decrypt"),addRecipient:o(function(e){r.recipients.push({version:0,issuer:e.issuer.attributes,serialNumber:e.serialNumber,encryptedContent:{algorithm:ze.pki.oids.rsaEncryption,key:e.publicKey}})},"addRecipient"),encrypt:o(function(e,t){if(r.encryptedContent.content===void 0){t=t||r.encryptedContent.algorithm,e=e||r.encryptedContent.key;var n,s,i;switch(t){case ze.pki.oids["aes128-CBC"]:n=16,s=16,i=ze.aes.createEncryptionCipher;break;case ze.pki.oids["aes192-CBC"]:n=24,s=16,i=ze.aes.createEncryptionCipher;break;case ze.pki.oids["aes256-CBC"]:n=32,s=16,i=ze.aes.createEncryptionCipher;break;case ze.pki.oids["des-EDE3-CBC"]:n=24,s=8,i=ze.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+t)}if(e===void 0)e=ze.util.createBuffer(ze.random.getBytes(n));else if(e.length()!=n)throw new Error("Symmetric key has wrong length; got "+e.length()+" bytes, expected "+n+".");r.encryptedContent.algorithm=t,r.encryptedContent.key=e,r.encryptedContent.parameter=ze.util.createBuffer(ze.random.getBytes(s));var a=i(e);if(a.start(r.encryptedContent.parameter.copy()),a.update(r.content),!a.finish())throw new Error("Symmetric encryption failed.");r.encryptedContent.content=a.output}for(var u=0;u<r.recipients.length;++u){var c=r.recipients[u];if(c.encryptedContent.content===void 0)switch(c.encryptedContent.algorithm){case ze.pki.oids.rsaEncryption:c.encryptedContent.content=c.encryptedContent.key.encrypt(r.encryptedContent.key.data);break;default:throw new Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm)}}},"encrypt")},r};function QQ(r){var e={},t=[];if(!te.validate(r,xs.asn1.recipientInfoValidator,e,t)){var n=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw n.errors=t,n}return{version:e.version.charCodeAt(0),issuer:ze.pki.RDNAttributesAsArray(e.issuer),serialNumber:ze.util.createBuffer(e.serial).toHex(),encryptedContent:{algorithm:te.derToOid(e.encAlgorithm),parameter:e.encParameter?e.encParameter.value:void 0,content:e.encKey}}}o(QQ,"_recipientFromAsn1");function ZQ(r){return te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.INTEGER,!1,te.integerToDer(r.version).getBytes()),te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[ze.pki.distinguishedNameToAsn1({attributes:r.issuer}),te.create(te.Class.UNIVERSAL,te.Type.INTEGER,!1,ze.util.hexToBytes(r.serialNumber))]),te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(r.encryptedContent.algorithm).getBytes()),te.create(te.Class.UNIVERSAL,te.Type.NULL,!1,"")]),te.create(te.Class.UNIVERSAL,te.Type.OCTETSTRING,!1,r.encryptedContent.content)])}o(ZQ,"_recipientToAsn1");function eZ(r){for(var e=[],t=0;t<r.length;++t)e.push(QQ(r[t]));return e}o(eZ,"_recipientsFromAsn1");function tZ(r){for(var e=[],t=0;t<r.length;++t)e.push(ZQ(r[t]));return e}o(tZ,"_recipientsToAsn1");function rZ(r){var e=te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.INTEGER,!1,te.integerToDer(r.version).getBytes()),te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[ze.pki.distinguishedNameToAsn1({attributes:r.issuer}),te.create(te.Class.UNIVERSAL,te.Type.INTEGER,!1,ze.util.hexToBytes(r.serialNumber))]),te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(r.digestAlgorithm).getBytes()),te.create(te.Class.UNIVERSAL,te.Type.NULL,!1,"")])]);if(r.authenticatedAttributesAsn1&&e.value.push(r.authenticatedAttributesAsn1),e.value.push(te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(r.signatureAlgorithm).getBytes()),te.create(te.Class.UNIVERSAL,te.Type.NULL,!1,"")])),e.value.push(te.create(te.Class.UNIVERSAL,te.Type.OCTETSTRING,!1,r.signature)),r.unauthenticatedAttributes.length>0){for(var t=te.create(te.Class.CONTEXT_SPECIFIC,1,!0,[]),n=0;n<r.unauthenticatedAttributes.length;++n){var s=r.unauthenticatedAttributes[n];t.values.push(LN(s))}e.value.push(t)}return e}o(rZ,"_signerToAsn1");function nZ(r){for(var e=[],t=0;t<r.length;++t)e.push(rZ(r[t]));return e}o(nZ,"_signersToAsn1");function LN(r){var e;if(r.type===ze.pki.oids.contentType)e=te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(r.value).getBytes());else if(r.type===ze.pki.oids.messageDigest)e=te.create(te.Class.UNIVERSAL,te.Type.OCTETSTRING,!1,r.value.bytes());else if(r.type===ze.pki.oids.signingTime){var t=new Date("1950-01-01T00:00:00Z"),n=new Date("2050-01-01T00:00:00Z"),s=r.value;if(typeof s=="string"){var i=Date.parse(s);isNaN(i)?s.length===13?s=te.utcTimeToDate(s):s=te.generalizedTimeToDate(s):s=new Date(i)}s>=t&&s<n?e=te.create(te.Class.UNIVERSAL,te.Type.UTCTIME,!1,te.dateToUtcTime(s)):e=te.create(te.Class.UNIVERSAL,te.Type.GENERALIZEDTIME,!1,te.dateToGeneralizedTime(s))}return te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(r.type).getBytes()),te.create(te.Class.UNIVERSAL,te.Type.SET,!0,[e])])}o(LN,"_attributeToAsn1");function sZ(r){return[te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(ze.pki.oids.data).getBytes()),te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(r.algorithm).getBytes()),r.parameter?te.create(te.Class.UNIVERSAL,te.Type.OCTETSTRING,!1,r.parameter.getBytes()):void 0]),te.create(te.Class.CONTEXT_SPECIFIC,0,!0,[te.create(te.Class.UNIVERSAL,te.Type.OCTETSTRING,!1,r.content.getBytes())])]}o(sZ,"_encryptedContentToAsn1");function VN(r,e,t){var n={},s=[];if(!te.validate(e,t,n,s)){var i=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw i.errors=i,i}var a=te.derToOid(n.contentType);if(a!==ze.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(n.encryptedContent){var u="";if(ze.util.isArray(n.encryptedContent))for(var c=0;c<n.encryptedContent.length;++c){if(n.encryptedContent[c].type!==te.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");u+=n.encryptedContent[c].value}else u=n.encryptedContent;r.encryptedContent={algorithm:te.derToOid(n.encAlgorithm),parameter:ze.util.createBuffer(n.encParameter.value),content:ze.util.createBuffer(u)}}if(n.content){var u="";if(ze.util.isArray(n.content))for(var c=0;c<n.content.length;++c){if(n.content[c].type!==te.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");u+=n.content[c].value}else u=n.content;r.content=ze.util.createBuffer(u)}return r.version=n.version.charCodeAt(0),r.rawCapture=n,n}o(VN,"_fromAsn1");function Hk(r){if(r.encryptedContent.key===void 0)throw new Error("Symmetric key not available.");if(r.content===void 0){var e;switch(r.encryptedContent.algorithm){case ze.pki.oids["aes128-CBC"]:case ze.pki.oids["aes192-CBC"]:case ze.pki.oids["aes256-CBC"]:e=ze.aes.createDecryptionCipher(r.encryptedContent.key);break;case ze.pki.oids.desCBC:case ze.pki.oids["des-EDE3-CBC"]:e=ze.des.createDecryptionCipher(r.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+r.encryptedContent.algorithm)}if(e.start(r.encryptedContent.parameter),e.update(r.encryptedContent.content),!e.finish())throw new Error("Symmetric decryption failed.");r.content=e.output}}o(Hk,"_decryptContent")});var Xk=Z((Xde,Gk)=>{"use strict";var dn=$t();Pu();ap();vw();lp();lr();var Mw=Gk.exports=dn.ssh=dn.ssh||{};Mw.privateKeyToPutty=function(r,e,t){t=t||"",e=e||"";var n="ssh-rsa",s=e===""?"none":"aes256-cbc",i="PuTTY-User-Key-File-2: "+n+`\r
15
+ `;i+="Encryption: "+s+`\r
16
+ `,i+="Comment: "+t+`\r
17
+ `;var a=dn.util.createBuffer();yp(a,n),Va(a,r.e),Va(a,r.n);var u=dn.util.encode64(a.bytes(),64),c=Math.floor(u.length/66)+1;i+="Public-Lines: "+c+`\r
18
+ `,i+=u;var f=dn.util.createBuffer();Va(f,r.d),Va(f,r.p),Va(f,r.q),Va(f,r.qInv);var h;if(!e)h=dn.util.encode64(f.bytes(),64);else{var m=f.length()+16-1;m-=m%16;var g=jw(f.bytes());g.truncate(g.length()-m+f.length()),f.putBuffer(g);var x=dn.util.createBuffer();x.putBuffer(jw("\0\0\0\0",e)),x.putBuffer(jw("\0\0\0",e));var v=dn.aes.createEncryptionCipher(x.truncate(8),"CBC");v.start(dn.util.createBuffer().fillWithByte(0,16)),v.update(f.copy()),v.finish();var w=v.output;w.truncate(16),h=dn.util.encode64(w.bytes(),64)}c=Math.floor(h.length/66)+1,i+=`\r
19
+ Private-Lines: `+c+`\r
20
+ `,i+=h;var S=jw("putty-private-key-file-mac-key",e),A=dn.util.createBuffer();yp(A,n),yp(A,s),yp(A,t),A.putInt32(a.length()),A.putBuffer(a),A.putInt32(f.length()),A.putBuffer(f);var T=dn.hmac.create();return T.start("sha1",S),T.update(A.bytes()),i+=`\r
21
+ Private-MAC: `+T.digest().toHex()+`\r
22
+ `,i};Mw.publicKeyToOpenSSH=function(r,e){var t="ssh-rsa";e=e||"";var n=dn.util.createBuffer();return yp(n,t),Va(n,r.e),Va(n,r.n),t+" "+dn.util.encode64(n.bytes())+" "+e};Mw.privateKeyToOpenSSH=function(r,e){return e?dn.pki.encryptRsaPrivateKey(r,e,{legacy:!0,algorithm:"aes128"}):dn.pki.privateKeyToPem(r)};Mw.getPublicKeyFingerprint=function(r,e){e=e||{};var t=e.md||dn.md.md5.create(),n="ssh-rsa",s=dn.util.createBuffer();yp(s,n),Va(s,r.e),Va(s,r.n),t.start(),t.update(s.getBytes());var i=t.digest();if(e.encoding==="hex"){var a=i.toHex();return e.delimiter?a.match(/.{2}/g).join(e.delimiter):a}else{if(e.encoding==="binary")return i.getBytes();if(e.encoding)throw new Error('Unknown encoding "'+e.encoding+'".')}return i};function Va(r,e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var n=dn.util.hexToBytes(t);r.putInt32(n.length),r.putBytes(n)}o(Va,"_addBigIntegerToBuffer");function yp(r,e){r.putInt32(e.length),r.putString(e)}o(yp,"_addStringToBuffer");function jw(){for(var r=dn.md.sha1.create(),e=arguments.length,t=0;t<e;++t)r.update(arguments[t]);return r.digest()}o(jw,"_sha1")});var zk=Z((zde,Wk)=>{"use strict";Wk.exports=$t();Pu();dk();ea();lw();Y0();Rk();ap();Lk();Mk();qk();cN();Sw();_l();nN();hN();$k();dN();iN();z2();Iw();bi();Q2();Xk();wN();lr()});var Yk=Z((Jde,Jk)=>{"use strict";var xp=1e3,wp=xp*60,Sp=wp*60,Vl=Sp*24,iZ=Vl*7,aZ=Vl*365.25;Jk.exports=function(r,e){e=e||{};var t=typeof r;if(t==="string"&&r.length>0)return oZ(r);if(t==="number"&&isFinite(r))return e.long?cZ(r):uZ(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function oZ(r){if(r=String(r),!(r.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(e){var t=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return t*aZ;case"weeks":case"week":case"w":return t*iZ;case"days":case"day":case"d":return t*Vl;case"hours":case"hour":case"hrs":case"hr":case"h":return t*Sp;case"minutes":case"minute":case"mins":case"min":case"m":return t*wp;case"seconds":case"second":case"secs":case"sec":case"s":return t*xp;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}o(oZ,"parse");function uZ(r){var e=Math.abs(r);return e>=Vl?Math.round(r/Vl)+"d":e>=Sp?Math.round(r/Sp)+"h":e>=wp?Math.round(r/wp)+"m":e>=xp?Math.round(r/xp)+"s":r+"ms"}o(uZ,"fmtShort");function cZ(r){var e=Math.abs(r);return e>=Vl?Fw(r,e,Vl,"day"):e>=Sp?Fw(r,e,Sp,"hour"):e>=wp?Fw(r,e,wp,"minute"):e>=xp?Fw(r,e,xp,"second"):r+" ms"}o(cZ,"fmtLong");function Fw(r,e,t,n){var s=e>=t*1.5;return Math.round(r/t)+" "+n+(s?"s":"")}o(Fw,"plural")});var UN=Z((Qde,Qk)=>{"use strict";function lZ(r){t.debug=t,t.default=t,t.coerce=c,t.disable=a,t.enable=s,t.enabled=u,t.humanize=Yk(),t.destroy=f,Object.keys(r).forEach(h=>{t[h]=r[h]}),t.names=[],t.skips=[],t.formatters={};function e(h){let m=0;for(let g=0;g<h.length;g++)m=(m<<5)-m+h.charCodeAt(g),m|=0;return t.colors[Math.abs(m)%t.colors.length]}o(e,"selectColor"),t.selectColor=e;function t(h){let m,g=null,x,v;function w(...S){if(!w.enabled)return;let A=w,T=Number(new Date),b=T-(m||T);A.diff=b,A.prev=m,A.curr=T,m=T,S[0]=t.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let E=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(_,F)=>{if(_==="%%")return"%";E++;let R=t.formatters[F];if(typeof R=="function"){let q=S[E];_=R.call(A,q),S.splice(E,1),E--}return _}),t.formatArgs.call(A,S),(A.log||t.log).apply(A,S)}return o(w,"debug"),w.namespace=h,w.useColors=t.useColors(),w.color=t.selectColor(h),w.extend=n,w.destroy=t.destroy,Object.defineProperty(w,"enabled",{enumerable:!0,configurable:!1,get:o(()=>g!==null?g:(x!==t.namespaces&&(x=t.namespaces,v=t.enabled(h)),v),"get"),set:o(S=>{g=S},"set")}),typeof t.init=="function"&&t.init(w),w}o(t,"createDebug");function n(h,m){let g=t(this.namespace+(typeof m>"u"?":":m)+h);return g.log=this.log,g}o(n,"extend");function s(h){t.save(h),t.namespaces=h,t.names=[],t.skips=[];let m=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let g of m)g[0]==="-"?t.skips.push(g.slice(1)):t.names.push(g)}o(s,"enable");function i(h,m){let g=0,x=0,v=-1,w=0;for(;g<h.length;)if(x<m.length&&(m[x]===h[g]||m[x]==="*"))m[x]==="*"?(v=x,w=g,x++):(g++,x++);else if(v!==-1)x=v+1,w++,g=w;else return!1;for(;x<m.length&&m[x]==="*";)x++;return x===m.length}o(i,"matchesTemplate");function a(){let h=[...t.names,...t.skips.map(m=>"-"+m)].join(",");return t.enable(""),h}o(a,"disable");function u(h){for(let m of t.skips)if(i(h,m))return!1;for(let m of t.names)if(i(h,m))return!0;return!1}o(u,"enabled");function c(h){return h instanceof Error?h.stack||h.message:h}o(c,"coerce");function f(){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 o(f,"destroy"),t.enable(t.load()),t}o(lZ,"setup");Qk.exports=lZ});var Zk=Z((Ds,qw)=>{"use strict";Ds.formatArgs=hZ;Ds.save=pZ;Ds.load=dZ;Ds.useColors=fZ;Ds.storage=mZ();Ds.destroy=(()=>{let r=!1;return()=>{r||(r=!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`."))}})();Ds.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 fZ(){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 r;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&&(r=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(r[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}o(fZ,"useColors");function hZ(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+qw.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;r.splice(1,0,e,"color: inherit");let t=0,n=0;r[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(t++,s==="%c"&&(n=t))}),r.splice(n,0,e)}o(hZ,"formatArgs");Ds.log=console.debug||console.log||(()=>{});function pZ(r){try{r?Ds.storage.setItem("debug",r):Ds.storage.removeItem("debug")}catch{}}o(pZ,"save");function dZ(){let r;try{r=Ds.storage.getItem("debug")||Ds.storage.getItem("DEBUG")}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=process.env.DEBUG),r}o(dZ,"load");function mZ(){try{return localStorage}catch{}}o(mZ,"localstorage");qw.exports=UN()(Ds);var{formatters:gZ}=qw.exports;gZ.j=function(r){try{return JSON.stringify(r)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var t4=Z((tme,e4)=>{"use strict";e4.exports=(r,e=process.argv)=>{let t=r.startsWith("-")?"":r.length===1?"-":"--",n=e.indexOf(t+r),s=e.indexOf("--");return n!==-1&&(s===-1||n<s)}});var s4=Z((rme,n4)=>{"use strict";var vZ=Xe("os"),r4=Xe("tty"),Ii=t4(),{env:Dn}=process,qu;Ii("no-color")||Ii("no-colors")||Ii("color=false")||Ii("color=never")?qu=0:(Ii("color")||Ii("colors")||Ii("color=true")||Ii("color=always"))&&(qu=1);"FORCE_COLOR"in Dn&&(Dn.FORCE_COLOR==="true"?qu=1:Dn.FORCE_COLOR==="false"?qu=0:qu=Dn.FORCE_COLOR.length===0?1:Math.min(parseInt(Dn.FORCE_COLOR,10),3));function jN(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}o(jN,"translateLevel");function MN(r,e){if(qu===0)return 0;if(Ii("color=16m")||Ii("color=full")||Ii("color=truecolor"))return 3;if(Ii("color=256"))return 2;if(r&&!e&&qu===void 0)return 0;let t=qu||0;if(Dn.TERM==="dumb")return t;if(process.platform==="win32"){let n=vZ.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Dn)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Dn)||Dn.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in Dn)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Dn.TEAMCITY_VERSION)?1:0;if(Dn.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Dn){let n=parseInt((Dn.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Dn.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Dn.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Dn.TERM)||"COLORTERM"in Dn?1:t}o(MN,"supportsColor");function yZ(r){let e=MN(r,r&&r.isTTY);return jN(e)}o(yZ,"getSupportLevel");n4.exports={supportsColor:yZ,stdout:jN(MN(!0,r4.isatty(1))),stderr:jN(MN(!0,r4.isatty(2)))}});var a4=Z((Rn,Kw)=>{"use strict";var xZ=Xe("tty"),Hw=Xe("util");Rn.init=NZ;Rn.log=EZ;Rn.formatArgs=SZ;Rn.save=AZ;Rn.load=CZ;Rn.useColors=wZ;Rn.destroy=Hw.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Rn.colors=[6,2,3,4,5,1];try{let r=s4();r&&(r.stderr||r).level>=2&&(Rn.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{}Rn.inspectOpts=Object.keys(process.env).filter(r=>/^debug_/i.test(r)).reduce((r,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(s,i)=>i.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),r[t]=n,r},{});function wZ(){return"colors"in Rn.inspectOpts?!!Rn.inspectOpts.colors:xZ.isatty(process.stderr.fd)}o(wZ,"useColors");function SZ(r){let{namespace:e,useColors:t}=this;if(t){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),i=` ${s};1m${e} \x1B[0m`;r[0]=i+r[0].split(`
23
+ `).join(`
24
+ `+i),r.push(s+"m+"+Kw.exports.humanize(this.diff)+"\x1B[0m")}else r[0]=bZ()+e+" "+r[0]}o(SZ,"formatArgs");function bZ(){return Rn.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(bZ,"getDate");function EZ(...r){return process.stderr.write(Hw.formatWithOptions(Rn.inspectOpts,...r)+`
25
+ `)}o(EZ,"log");function AZ(r){r?process.env.DEBUG=r:delete process.env.DEBUG}o(AZ,"save");function CZ(){return process.env.DEBUG}o(CZ,"load");function NZ(r){r.inspectOpts={};let e=Object.keys(Rn.inspectOpts);for(let t=0;t<e.length;t++)r.inspectOpts[e[t]]=Rn.inspectOpts[e[t]]}o(NZ,"init");Kw.exports=UN()(Rn);var{formatters:i4}=Kw.exports;i4.o=function(r){return this.inspectOpts.colors=this.useColors,Hw.inspect(r,this.inspectOpts).split(`
26
+ `).map(e=>e.trim()).join(" ")};i4.O=function(r){return this.inspectOpts.colors=this.useColors,Hw.inspect(r,this.inspectOpts)}});var bp=Z((ime,FN)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?FN.exports=Zk():FN.exports=a4()});var u4=Z((ame,o4)=>{"use strict";var{PassThrough:TZ}=Xe("stream");o4.exports=r=>{r={...r};let{array:e}=r,{encoding:t}=r,n=t==="buffer",s=!1;e?s=!(t||n):t=t||"utf8",n&&(t=null);let i=new TZ({objectMode:s});t&&i.setEncoding(t);let a=0,u=[];return i.on("data",c=>{u.push(c),s?a=u.length:a+=c.length}),i.getBufferedValue=()=>e?u:n?Buffer.concat(u,a):u.join(""),i.getBufferedLength=()=>a,i}});var l4=Z((ume,ug)=>{"use strict";var{constants:IZ}=Xe("buffer"),_Z=Xe("stream"),{promisify:BZ}=Xe("util"),DZ=u4(),RZ=BZ(_Z.pipeline),c4=class extends Error{static{o(this,"MaxBufferError")}constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function qN(r,e){if(!r)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};let{maxBuffer:t}=e,n=DZ(e);return await new Promise((s,i)=>{let a=o(u=>{u&&n.getBufferedLength()<=IZ.MAX_LENGTH&&(u.bufferedData=n.getBufferedValue()),i(u)},"rejectPromise");(async()=>{try{await RZ(r,n),s()}catch(u){a(u)}})(),n.on("data",()=>{n.getBufferedLength()>t&&a(new c4)})}),n.getBufferedValue()}o(qN,"getStream");ug.exports=qN;ug.exports.buffer=(r,e)=>qN(r,{...e,encoding:"buffer"});ug.exports.array=(r,e)=>qN(r,{...e,array:!0});ug.exports.MaxBufferError=c4});var _o=Z((Ep,cg)=>{"use strict";(function(){var r,e="4.17.21",t=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",i="Invalid `variable` option passed into `_.template`",a="__lodash_hash_undefined__",u=500,c="__lodash_placeholder__",f=1,h=2,m=4,g=1,x=2,v=1,w=2,S=4,A=8,T=16,b=32,E=64,C=128,_=256,F=512,R=30,q="...",H=800,K=16,X=1,pe=2,le=3,ue=1/0,ee=9007199254740991,he=17976931348623157e292,we=NaN,Ke=4294967295,Ae=Ke-1,xe=Ke>>>1,je=[["ary",C],["bind",v],["bindKey",w],["curry",A],["curryRight",T],["flip",F],["partial",b],["partialRight",E],["rearg",_]],Je="[object Arguments]",Ze="[object Array]",lt="[object AsyncFunction]",O="[object Boolean]",D="[object Date]",se="[object DOMException]",z="[object Error]",Ge="[object Function]",Re="[object GeneratorFunction]",Ce="[object Map]",ft="[object Number]",nr="[object Null]",Me="[object Object]",sr="[object Promise]",Xs="[object Proxy]",We="[object RegExp]",Fr="[object Set]",hn="[object String]",Zn="[object Symbol]",Es="[object Undefined]",fs="[object WeakMap]",dt="[object WeakSet]",et="[object ArrayBuffer]",Un="[object DataView]",hs="[object Float32Array]",wa="[object Float64Array]",Sa="[object Int8Array]",Rt="[object Int16Array]",Uh="[object Int32Array]",jh="[object Uint8Array]",yl="[object Uint8ClampedArray]",T0="[object Uint16Array]",Ws="[object Uint32Array]",d=/\b__p \+= '';/g,I=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,re=/&(?:amp|lt|gt|quot|#39);/g,ae=/[&<>"']/g,G=RegExp(re.source),st=RegExp(ae.source),kt=/<%-([\s\S]+?)%>/g,Wt=/<%([\s\S]+?)%>/g,tt=/<%=([\s\S]+?)%>/g,Bt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jn=/^\w*$/,pi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cr=/[\\^$.*+?()[\]{}|]/g,ba=RegExp(cr.source),I0=/^\s+/,ux=/\s/,lC=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,fC=/\{\n\/\* \[wrapped with (.+)\] \*/,hC=/,? & /,pC=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,qe=/[()=,{}\[\]\/\s]/,er=/\\(\\)?/g,es=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Xi=/\w*$/,dC=/^[-+]0x[0-9a-f]+$/i,dq=/^0b[01]+$/i,mq=/^\[object .+?Constructor\]$/,gq=/^0o[0-7]+$/i,vq=/^(?:0|[1-9]\d*)$/,yq=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,cx=/($^)/,xq=/['\n\r\u2028\u2029\\]/g,lx="\\ud800-\\udfff",wq="\\u0300-\\u036f",Sq="\\ufe20-\\ufe2f",bq="\\u20d0-\\u20ff",FD=wq+Sq+bq,qD="\\u2700-\\u27bf",HD="a-z\\xdf-\\xf6\\xf8-\\xff",Eq="\\xac\\xb1\\xd7\\xf7",Aq="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Cq="\\u2000-\\u206f",Nq=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",KD="A-Z\\xc0-\\xd6\\xd8-\\xde",$D="\\ufe0e\\ufe0f",GD=Eq+Aq+Cq+Nq,mC="['\u2019]",Tq="["+lx+"]",XD="["+GD+"]",fx="["+FD+"]",WD="\\d+",Iq="["+qD+"]",zD="["+HD+"]",JD="[^"+lx+GD+WD+qD+HD+KD+"]",gC="\\ud83c[\\udffb-\\udfff]",_q="(?:"+fx+"|"+gC+")",YD="[^"+lx+"]",vC="(?:\\ud83c[\\udde6-\\uddff]){2}",yC="[\\ud800-\\udbff][\\udc00-\\udfff]",Mh="["+KD+"]",QD="\\u200d",ZD="(?:"+zD+"|"+JD+")",Bq="(?:"+Mh+"|"+JD+")",eR="(?:"+mC+"(?:d|ll|m|re|s|t|ve))?",tR="(?:"+mC+"(?:D|LL|M|RE|S|T|VE))?",rR=_q+"?",nR="["+$D+"]?",Dq="(?:"+QD+"(?:"+[YD,vC,yC].join("|")+")"+nR+rR+")*",Rq="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pq="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",sR=nR+rR+Dq,Oq="(?:"+[Iq,vC,yC].join("|")+")"+sR,kq="(?:"+[YD+fx+"?",fx,vC,yC,Tq].join("|")+")",Lq=RegExp(mC,"g"),Vq=RegExp(fx,"g"),xC=RegExp(gC+"(?="+gC+")|"+kq+sR,"g"),Uq=RegExp([Mh+"?"+zD+"+"+eR+"(?="+[XD,Mh,"$"].join("|")+")",Bq+"+"+tR+"(?="+[XD,Mh+ZD,"$"].join("|")+")",Mh+"?"+ZD+"+"+eR,Mh+"+"+tR,Pq,Rq,WD,Oq].join("|"),"g"),jq=RegExp("["+QD+lx+FD+$D+"]"),Mq=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fq=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],qq=-1,Ur={};Ur[hs]=Ur[wa]=Ur[Sa]=Ur[Rt]=Ur[Uh]=Ur[jh]=Ur[yl]=Ur[T0]=Ur[Ws]=!0,Ur[Je]=Ur[Ze]=Ur[et]=Ur[O]=Ur[Un]=Ur[D]=Ur[z]=Ur[Ge]=Ur[Ce]=Ur[ft]=Ur[Me]=Ur[We]=Ur[Fr]=Ur[hn]=Ur[fs]=!1;var Br={};Br[Je]=Br[Ze]=Br[et]=Br[Un]=Br[O]=Br[D]=Br[hs]=Br[wa]=Br[Sa]=Br[Rt]=Br[Uh]=Br[Ce]=Br[ft]=Br[Me]=Br[We]=Br[Fr]=Br[hn]=Br[Zn]=Br[jh]=Br[yl]=Br[T0]=Br[Ws]=!0,Br[z]=Br[Ge]=Br[fs]=!1;var Hq={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Kq={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},$q={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Gq={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Xq=parseFloat,Wq=parseInt,iR=typeof global=="object"&&global&&global.Object===Object&&global,zq=typeof self=="object"&&self&&self.Object===Object&&self,Cn=iR||zq||Function("return this")(),wC=typeof Ep=="object"&&Ep&&!Ep.nodeType&&Ep,xl=wC&&typeof cg=="object"&&cg&&!cg.nodeType&&cg,aR=xl&&xl.exports===wC,SC=aR&&iR.process,di=(function(){try{var ie=xl&&xl.require&&xl.require("util").types;return ie||SC&&SC.binding&&SC.binding("util")}catch{}})(),oR=di&&di.isArrayBuffer,uR=di&&di.isDate,cR=di&&di.isMap,lR=di&&di.isRegExp,fR=di&&di.isSet,hR=di&&di.isTypedArray;function zs(ie,Ee,ye){switch(ye.length){case 0:return ie.call(Ee);case 1:return ie.call(Ee,ye[0]);case 2:return ie.call(Ee,ye[0],ye[1]);case 3:return ie.call(Ee,ye[0],ye[1],ye[2])}return ie.apply(Ee,ye)}o(zs,"apply");function Jq(ie,Ee,ye,ct){for(var Pt=-1,vr=ie==null?0:ie.length;++Pt<vr;){var xn=ie[Pt];Ee(ct,xn,ye(xn),ie)}return ct}o(Jq,"arrayAggregator");function mi(ie,Ee){for(var ye=-1,ct=ie==null?0:ie.length;++ye<ct&&Ee(ie[ye],ye,ie)!==!1;);return ie}o(mi,"arrayEach");function Yq(ie,Ee){for(var ye=ie==null?0:ie.length;ye--&&Ee(ie[ye],ye,ie)!==!1;);return ie}o(Yq,"arrayEachRight");function pR(ie,Ee){for(var ye=-1,ct=ie==null?0:ie.length;++ye<ct;)if(!Ee(ie[ye],ye,ie))return!1;return!0}o(pR,"arrayEvery");function mu(ie,Ee){for(var ye=-1,ct=ie==null?0:ie.length,Pt=0,vr=[];++ye<ct;){var xn=ie[ye];Ee(xn,ye,ie)&&(vr[Pt++]=xn)}return vr}o(mu,"arrayFilter");function hx(ie,Ee){var ye=ie==null?0:ie.length;return!!ye&&Fh(ie,Ee,0)>-1}o(hx,"arrayIncludes");function bC(ie,Ee,ye){for(var ct=-1,Pt=ie==null?0:ie.length;++ct<Pt;)if(ye(Ee,ie[ct]))return!0;return!1}o(bC,"arrayIncludesWith");function qr(ie,Ee){for(var ye=-1,ct=ie==null?0:ie.length,Pt=Array(ct);++ye<ct;)Pt[ye]=Ee(ie[ye],ye,ie);return Pt}o(qr,"arrayMap");function gu(ie,Ee){for(var ye=-1,ct=Ee.length,Pt=ie.length;++ye<ct;)ie[Pt+ye]=Ee[ye];return ie}o(gu,"arrayPush");function EC(ie,Ee,ye,ct){var Pt=-1,vr=ie==null?0:ie.length;for(ct&&vr&&(ye=ie[++Pt]);++Pt<vr;)ye=Ee(ye,ie[Pt],Pt,ie);return ye}o(EC,"arrayReduce");function Qq(ie,Ee,ye,ct){var Pt=ie==null?0:ie.length;for(ct&&Pt&&(ye=ie[--Pt]);Pt--;)ye=Ee(ye,ie[Pt],Pt,ie);return ye}o(Qq,"arrayReduceRight");function AC(ie,Ee){for(var ye=-1,ct=ie==null?0:ie.length;++ye<ct;)if(Ee(ie[ye],ye,ie))return!0;return!1}o(AC,"arraySome");var Zq=CC("length");function e7(ie){return ie.split("")}o(e7,"asciiToArray");function t7(ie){return ie.match(pC)||[]}o(t7,"asciiWords");function dR(ie,Ee,ye){var ct;return ye(ie,function(Pt,vr,xn){if(Ee(Pt,vr,xn))return ct=vr,!1}),ct}o(dR,"baseFindKey");function px(ie,Ee,ye,ct){for(var Pt=ie.length,vr=ye+(ct?1:-1);ct?vr--:++vr<Pt;)if(Ee(ie[vr],vr,ie))return vr;return-1}o(px,"baseFindIndex");function Fh(ie,Ee,ye){return Ee===Ee?p7(ie,Ee,ye):px(ie,mR,ye)}o(Fh,"baseIndexOf");function r7(ie,Ee,ye,ct){for(var Pt=ye-1,vr=ie.length;++Pt<vr;)if(ct(ie[Pt],Ee))return Pt;return-1}o(r7,"baseIndexOfWith");function mR(ie){return ie!==ie}o(mR,"baseIsNaN");function gR(ie,Ee){var ye=ie==null?0:ie.length;return ye?TC(ie,Ee)/ye:we}o(gR,"baseMean");function CC(ie){return function(Ee){return Ee==null?r:Ee[ie]}}o(CC,"baseProperty");function NC(ie){return function(Ee){return ie==null?r:ie[Ee]}}o(NC,"basePropertyOf");function vR(ie,Ee,ye,ct,Pt){return Pt(ie,function(vr,xn,Nr){ye=ct?(ct=!1,vr):Ee(ye,vr,xn,Nr)}),ye}o(vR,"baseReduce");function n7(ie,Ee){var ye=ie.length;for(ie.sort(Ee);ye--;)ie[ye]=ie[ye].value;return ie}o(n7,"baseSortBy");function TC(ie,Ee){for(var ye,ct=-1,Pt=ie.length;++ct<Pt;){var vr=Ee(ie[ct]);vr!==r&&(ye=ye===r?vr:ye+vr)}return ye}o(TC,"baseSum");function IC(ie,Ee){for(var ye=-1,ct=Array(ie);++ye<ie;)ct[ye]=Ee(ye);return ct}o(IC,"baseTimes");function s7(ie,Ee){return qr(Ee,function(ye){return[ye,ie[ye]]})}o(s7,"baseToPairs");function yR(ie){return ie&&ie.slice(0,bR(ie)+1).replace(I0,"")}o(yR,"baseTrim");function Js(ie){return function(Ee){return ie(Ee)}}o(Js,"baseUnary");function _C(ie,Ee){return qr(Ee,function(ye){return ie[ye]})}o(_C,"baseValues");function _0(ie,Ee){return ie.has(Ee)}o(_0,"cacheHas");function xR(ie,Ee){for(var ye=-1,ct=ie.length;++ye<ct&&Fh(Ee,ie[ye],0)>-1;);return ye}o(xR,"charsStartIndex");function wR(ie,Ee){for(var ye=ie.length;ye--&&Fh(Ee,ie[ye],0)>-1;);return ye}o(wR,"charsEndIndex");function i7(ie,Ee){for(var ye=ie.length,ct=0;ye--;)ie[ye]===Ee&&++ct;return ct}o(i7,"countHolders");var a7=NC(Hq),o7=NC(Kq);function u7(ie){return"\\"+Gq[ie]}o(u7,"escapeStringChar");function c7(ie,Ee){return ie==null?r:ie[Ee]}o(c7,"getValue");function qh(ie){return jq.test(ie)}o(qh,"hasUnicode");function l7(ie){return Mq.test(ie)}o(l7,"hasUnicodeWord");function f7(ie){for(var Ee,ye=[];!(Ee=ie.next()).done;)ye.push(Ee.value);return ye}o(f7,"iteratorToArray");function BC(ie){var Ee=-1,ye=Array(ie.size);return ie.forEach(function(ct,Pt){ye[++Ee]=[Pt,ct]}),ye}o(BC,"mapToArray");function SR(ie,Ee){return function(ye){return ie(Ee(ye))}}o(SR,"overArg");function vu(ie,Ee){for(var ye=-1,ct=ie.length,Pt=0,vr=[];++ye<ct;){var xn=ie[ye];(xn===Ee||xn===c)&&(ie[ye]=c,vr[Pt++]=ye)}return vr}o(vu,"replaceHolders");function dx(ie){var Ee=-1,ye=Array(ie.size);return ie.forEach(function(ct){ye[++Ee]=ct}),ye}o(dx,"setToArray");function h7(ie){var Ee=-1,ye=Array(ie.size);return ie.forEach(function(ct){ye[++Ee]=[ct,ct]}),ye}o(h7,"setToPairs");function p7(ie,Ee,ye){for(var ct=ye-1,Pt=ie.length;++ct<Pt;)if(ie[ct]===Ee)return ct;return-1}o(p7,"strictIndexOf");function d7(ie,Ee,ye){for(var ct=ye+1;ct--;)if(ie[ct]===Ee)return ct;return ct}o(d7,"strictLastIndexOf");function Hh(ie){return qh(ie)?g7(ie):Zq(ie)}o(Hh,"stringSize");function Wi(ie){return qh(ie)?v7(ie):e7(ie)}o(Wi,"stringToArray");function bR(ie){for(var Ee=ie.length;Ee--&&ux.test(ie.charAt(Ee)););return Ee}o(bR,"trimmedEndIndex");var m7=NC($q);function g7(ie){for(var Ee=xC.lastIndex=0;xC.test(ie);)++Ee;return Ee}o(g7,"unicodeSize");function v7(ie){return ie.match(xC)||[]}o(v7,"unicodeToArray");function y7(ie){return ie.match(Uq)||[]}o(y7,"unicodeWords");var x7=o(function ie(Ee){Ee=Ee==null?Cn:yu.defaults(Cn.Object(),Ee,yu.pick(Cn,Fq));var ye=Ee.Array,ct=Ee.Date,Pt=Ee.Error,vr=Ee.Function,xn=Ee.Math,Nr=Ee.Object,DC=Ee.RegExp,w7=Ee.String,gi=Ee.TypeError,mx=ye.prototype,S7=vr.prototype,Kh=Nr.prototype,gx=Ee["__core-js_shared__"],vx=S7.toString,Sr=Kh.hasOwnProperty,b7=0,ER=(function(){var l=/[^.]+$/.exec(gx&&gx.keys&&gx.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),yx=Kh.toString,E7=vx.call(Nr),A7=Cn._,C7=DC("^"+vx.call(Sr).replace(cr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xx=aR?Ee.Buffer:r,xu=Ee.Symbol,wx=Ee.Uint8Array,AR=xx?xx.allocUnsafe:r,Sx=SR(Nr.getPrototypeOf,Nr),CR=Nr.create,NR=Kh.propertyIsEnumerable,bx=mx.splice,TR=xu?xu.isConcatSpreadable:r,B0=xu?xu.iterator:r,wl=xu?xu.toStringTag:r,Ex=(function(){try{var l=Cl(Nr,"defineProperty");return l({},"",{}),l}catch{}})(),N7=Ee.clearTimeout!==Cn.clearTimeout&&Ee.clearTimeout,T7=ct&&ct.now!==Cn.Date.now&&ct.now,I7=Ee.setTimeout!==Cn.setTimeout&&Ee.setTimeout,Ax=xn.ceil,Cx=xn.floor,RC=Nr.getOwnPropertySymbols,_7=xx?xx.isBuffer:r,IR=Ee.isFinite,B7=mx.join,D7=SR(Nr.keys,Nr),wn=xn.max,ts=xn.min,R7=ct.now,P7=Ee.parseInt,_R=xn.random,O7=mx.reverse,PC=Cl(Ee,"DataView"),D0=Cl(Ee,"Map"),OC=Cl(Ee,"Promise"),$h=Cl(Ee,"Set"),R0=Cl(Ee,"WeakMap"),P0=Cl(Nr,"create"),Nx=R0&&new R0,Gh={},k7=Nl(PC),L7=Nl(D0),V7=Nl(OC),U7=Nl($h),j7=Nl(R0),Tx=xu?xu.prototype:r,O0=Tx?Tx.valueOf:r,BR=Tx?Tx.toString:r;function j(l){if(Yr(l)&&!Lt(l)&&!(l instanceof tr)){if(l instanceof vi)return l;if(Sr.call(l,"__wrapped__"))return DP(l)}return new vi(l)}o(j,"lodash");var Xh=(function(){function l(){}return o(l,"object"),function(p){if(!$r(p))return{};if(CR)return CR(p);l.prototype=p;var y=new l;return l.prototype=r,y}})();function Ix(){}o(Ix,"baseLodash");function vi(l,p){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!p,this.__index__=0,this.__values__=r}o(vi,"LodashWrapper"),j.templateSettings={escape:kt,evaluate:Wt,interpolate:tt,variable:"",imports:{_:j}},j.prototype=Ix.prototype,j.prototype.constructor=j,vi.prototype=Xh(Ix.prototype),vi.prototype.constructor=vi;function tr(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ke,this.__views__=[]}o(tr,"LazyWrapper");function M7(){var l=new tr(this.__wrapped__);return l.__actions__=As(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=As(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=As(this.__views__),l}o(M7,"lazyClone");function F7(){if(this.__filtered__){var l=new tr(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}o(F7,"lazyReverse");function q7(){var l=this.__wrapped__.value(),p=this.__dir__,y=Lt(l),N=p<0,P=y?l.length:0,M=eK(0,P,this.__views__),J=M.start,Q=M.end,ce=Q-J,Ne=N?Q:J-1,Be=this.__iteratees__,Le=Be.length,Qe=0,pt=ts(ce,this.__takeCount__);if(!y||!N&&P==ce&&pt==ce)return eP(l,this.__actions__);var At=[];e:for(;ce--&&Qe<pt;){Ne+=p;for(var Kt=-1,Ct=l[Ne];++Kt<Le;){var zt=Be[Kt],ir=zt.iteratee,Zs=zt.type,ms=ir(Ct);if(Zs==pe)Ct=ms;else if(!ms){if(Zs==X)continue e;break e}}At[Qe++]=Ct}return At}o(q7,"lazyValue"),tr.prototype=Xh(Ix.prototype),tr.prototype.constructor=tr;function Sl(l){var p=-1,y=l==null?0:l.length;for(this.clear();++p<y;){var N=l[p];this.set(N[0],N[1])}}o(Sl,"Hash");function H7(){this.__data__=P0?P0(null):{},this.size=0}o(H7,"hashClear");function K7(l){var p=this.has(l)&&delete this.__data__[l];return this.size-=p?1:0,p}o(K7,"hashDelete");function $7(l){var p=this.__data__;if(P0){var y=p[l];return y===a?r:y}return Sr.call(p,l)?p[l]:r}o($7,"hashGet");function G7(l){var p=this.__data__;return P0?p[l]!==r:Sr.call(p,l)}o(G7,"hashHas");function X7(l,p){var y=this.__data__;return this.size+=this.has(l)?0:1,y[l]=P0&&p===r?a:p,this}o(X7,"hashSet"),Sl.prototype.clear=H7,Sl.prototype.delete=K7,Sl.prototype.get=$7,Sl.prototype.has=G7,Sl.prototype.set=X7;function mo(l){var p=-1,y=l==null?0:l.length;for(this.clear();++p<y;){var N=l[p];this.set(N[0],N[1])}}o(mo,"ListCache");function W7(){this.__data__=[],this.size=0}o(W7,"listCacheClear");function z7(l){var p=this.__data__,y=_x(p,l);if(y<0)return!1;var N=p.length-1;return y==N?p.pop():bx.call(p,y,1),--this.size,!0}o(z7,"listCacheDelete");function J7(l){var p=this.__data__,y=_x(p,l);return y<0?r:p[y][1]}o(J7,"listCacheGet");function Y7(l){return _x(this.__data__,l)>-1}o(Y7,"listCacheHas");function Q7(l,p){var y=this.__data__,N=_x(y,l);return N<0?(++this.size,y.push([l,p])):y[N][1]=p,this}o(Q7,"listCacheSet"),mo.prototype.clear=W7,mo.prototype.delete=z7,mo.prototype.get=J7,mo.prototype.has=Y7,mo.prototype.set=Q7;function go(l){var p=-1,y=l==null?0:l.length;for(this.clear();++p<y;){var N=l[p];this.set(N[0],N[1])}}o(go,"MapCache");function Z7(){this.size=0,this.__data__={hash:new Sl,map:new(D0||mo),string:new Sl}}o(Z7,"mapCacheClear");function eH(l){var p=Fx(this,l).delete(l);return this.size-=p?1:0,p}o(eH,"mapCacheDelete");function tH(l){return Fx(this,l).get(l)}o(tH,"mapCacheGet");function rH(l){return Fx(this,l).has(l)}o(rH,"mapCacheHas");function nH(l,p){var y=Fx(this,l),N=y.size;return y.set(l,p),this.size+=y.size==N?0:1,this}o(nH,"mapCacheSet"),go.prototype.clear=Z7,go.prototype.delete=eH,go.prototype.get=tH,go.prototype.has=rH,go.prototype.set=nH;function bl(l){var p=-1,y=l==null?0:l.length;for(this.__data__=new go;++p<y;)this.add(l[p])}o(bl,"SetCache");function sH(l){return this.__data__.set(l,a),this}o(sH,"setCacheAdd");function iH(l){return this.__data__.has(l)}o(iH,"setCacheHas"),bl.prototype.add=bl.prototype.push=sH,bl.prototype.has=iH;function zi(l){var p=this.__data__=new mo(l);this.size=p.size}o(zi,"Stack");function aH(){this.__data__=new mo,this.size=0}o(aH,"stackClear");function oH(l){var p=this.__data__,y=p.delete(l);return this.size=p.size,y}o(oH,"stackDelete");function uH(l){return this.__data__.get(l)}o(uH,"stackGet");function cH(l){return this.__data__.has(l)}o(cH,"stackHas");function lH(l,p){var y=this.__data__;if(y instanceof mo){var N=y.__data__;if(!D0||N.length<t-1)return N.push([l,p]),this.size=++y.size,this;y=this.__data__=new go(N)}return y.set(l,p),this.size=y.size,this}o(lH,"stackSet"),zi.prototype.clear=aH,zi.prototype.delete=oH,zi.prototype.get=uH,zi.prototype.has=cH,zi.prototype.set=lH;function DR(l,p){var y=Lt(l),N=!y&&Tl(l),P=!y&&!N&&Au(l),M=!y&&!N&&!P&&Yh(l),J=y||N||P||M,Q=J?IC(l.length,w7):[],ce=Q.length;for(var Ne in l)(p||Sr.call(l,Ne))&&!(J&&(Ne=="length"||P&&(Ne=="offset"||Ne=="parent")||M&&(Ne=="buffer"||Ne=="byteLength"||Ne=="byteOffset")||wo(Ne,ce)))&&Q.push(Ne);return Q}o(DR,"arrayLikeKeys");function RR(l){var p=l.length;return p?l[$C(0,p-1)]:r}o(RR,"arraySample");function fH(l,p){return qx(As(l),El(p,0,l.length))}o(fH,"arraySampleSize");function hH(l){return qx(As(l))}o(hH,"arrayShuffle");function kC(l,p,y){(y!==r&&!Ji(l[p],y)||y===r&&!(p in l))&&vo(l,p,y)}o(kC,"assignMergeValue");function k0(l,p,y){var N=l[p];(!(Sr.call(l,p)&&Ji(N,y))||y===r&&!(p in l))&&vo(l,p,y)}o(k0,"assignValue");function _x(l,p){for(var y=l.length;y--;)if(Ji(l[y][0],p))return y;return-1}o(_x,"assocIndexOf");function pH(l,p,y,N){return wu(l,function(P,M,J){p(N,P,y(P),J)}),N}o(pH,"baseAggregator");function PR(l,p){return l&&Aa(p,Nn(p),l)}o(PR,"baseAssign");function dH(l,p){return l&&Aa(p,Ns(p),l)}o(dH,"baseAssignIn");function vo(l,p,y){p=="__proto__"&&Ex?Ex(l,p,{configurable:!0,enumerable:!0,value:y,writable:!0}):l[p]=y}o(vo,"baseAssignValue");function LC(l,p){for(var y=-1,N=p.length,P=ye(N),M=l==null;++y<N;)P[y]=M?r:g2(l,p[y]);return P}o(LC,"baseAt");function El(l,p,y){return l===l&&(y!==r&&(l=l<=y?l:y),p!==r&&(l=l>=p?l:p)),l}o(El,"baseClamp");function yi(l,p,y,N,P,M){var J,Q=p&f,ce=p&h,Ne=p&m;if(y&&(J=P?y(l,N,P,M):y(l)),J!==r)return J;if(!$r(l))return l;var Be=Lt(l);if(Be){if(J=rK(l),!Q)return As(l,J)}else{var Le=rs(l),Qe=Le==Ge||Le==Re;if(Au(l))return nP(l,Q);if(Le==Me||Le==Je||Qe&&!P){if(J=ce||Qe?{}:bP(l),!Q)return ce?$H(l,dH(J,l)):KH(l,PR(J,l))}else{if(!Br[Le])return P?l:{};J=nK(l,Le,Q)}}M||(M=new zi);var pt=M.get(l);if(pt)return pt;M.set(l,J),YP(l)?l.forEach(function(Ct){J.add(yi(Ct,p,y,Ct,l,M))}):zP(l)&&l.forEach(function(Ct,zt){J.set(zt,yi(Ct,p,y,zt,l,M))});var At=Ne?ce?r2:t2:ce?Ns:Nn,Kt=Be?r:At(l);return mi(Kt||l,function(Ct,zt){Kt&&(zt=Ct,Ct=l[zt]),k0(J,zt,yi(Ct,p,y,zt,l,M))}),J}o(yi,"baseClone");function mH(l){var p=Nn(l);return function(y){return OR(y,l,p)}}o(mH,"baseConforms");function OR(l,p,y){var N=y.length;if(l==null)return!N;for(l=Nr(l);N--;){var P=y[N],M=p[P],J=l[P];if(J===r&&!(P in l)||!M(J))return!1}return!0}o(OR,"baseConformsTo");function kR(l,p,y){if(typeof l!="function")throw new gi(s);return q0(function(){l.apply(r,y)},p)}o(kR,"baseDelay");function L0(l,p,y,N){var P=-1,M=hx,J=!0,Q=l.length,ce=[],Ne=p.length;if(!Q)return ce;y&&(p=qr(p,Js(y))),N?(M=bC,J=!1):p.length>=t&&(M=_0,J=!1,p=new bl(p));e:for(;++P<Q;){var Be=l[P],Le=y==null?Be:y(Be);if(Be=N||Be!==0?Be:0,J&&Le===Le){for(var Qe=Ne;Qe--;)if(p[Qe]===Le)continue e;ce.push(Be)}else M(p,Le,N)||ce.push(Be)}return ce}o(L0,"baseDifference");var wu=uP(Ea),LR=uP(UC,!0);function gH(l,p){var y=!0;return wu(l,function(N,P,M){return y=!!p(N,P,M),y}),y}o(gH,"baseEvery");function Bx(l,p,y){for(var N=-1,P=l.length;++N<P;){var M=l[N],J=p(M);if(J!=null&&(Q===r?J===J&&!Qs(J):y(J,Q)))var Q=J,ce=M}return ce}o(Bx,"baseExtremum");function vH(l,p,y,N){var P=l.length;for(y=Mt(y),y<0&&(y=-y>P?0:P+y),N=N===r||N>P?P:Mt(N),N<0&&(N+=P),N=y>N?0:ZP(N);y<N;)l[y++]=p;return l}o(vH,"baseFill");function VR(l,p){var y=[];return wu(l,function(N,P,M){p(N,P,M)&&y.push(N)}),y}o(VR,"baseFilter");function Mn(l,p,y,N,P){var M=-1,J=l.length;for(y||(y=iK),P||(P=[]);++M<J;){var Q=l[M];p>0&&y(Q)?p>1?Mn(Q,p-1,y,N,P):gu(P,Q):N||(P[P.length]=Q)}return P}o(Mn,"baseFlatten");var VC=cP(),UR=cP(!0);function Ea(l,p){return l&&VC(l,p,Nn)}o(Ea,"baseForOwn");function UC(l,p){return l&&UR(l,p,Nn)}o(UC,"baseForOwnRight");function Dx(l,p){return mu(p,function(y){return So(l[y])})}o(Dx,"baseFunctions");function Al(l,p){p=bu(p,l);for(var y=0,N=p.length;l!=null&&y<N;)l=l[Ca(p[y++])];return y&&y==N?l:r}o(Al,"baseGet");function jR(l,p,y){var N=p(l);return Lt(l)?N:gu(N,y(l))}o(jR,"baseGetAllKeys");function ps(l){return l==null?l===r?Es:nr:wl&&wl in Nr(l)?ZH(l):hK(l)}o(ps,"baseGetTag");function jC(l,p){return l>p}o(jC,"baseGt");function yH(l,p){return l!=null&&Sr.call(l,p)}o(yH,"baseHas");function xH(l,p){return l!=null&&p in Nr(l)}o(xH,"baseHasIn");function wH(l,p,y){return l>=ts(p,y)&&l<wn(p,y)}o(wH,"baseInRange");function MC(l,p,y){for(var N=y?bC:hx,P=l[0].length,M=l.length,J=M,Q=ye(M),ce=1/0,Ne=[];J--;){var Be=l[J];J&&p&&(Be=qr(Be,Js(p))),ce=ts(Be.length,ce),Q[J]=!y&&(p||P>=120&&Be.length>=120)?new bl(J&&Be):r}Be=l[0];var Le=-1,Qe=Q[0];e:for(;++Le<P&&Ne.length<ce;){var pt=Be[Le],At=p?p(pt):pt;if(pt=y||pt!==0?pt:0,!(Qe?_0(Qe,At):N(Ne,At,y))){for(J=M;--J;){var Kt=Q[J];if(!(Kt?_0(Kt,At):N(l[J],At,y)))continue e}Qe&&Qe.push(At),Ne.push(pt)}}return Ne}o(MC,"baseIntersection");function SH(l,p,y,N){return Ea(l,function(P,M,J){p(N,y(P),M,J)}),N}o(SH,"baseInverter");function V0(l,p,y){p=bu(p,l),l=NP(l,p);var N=l==null?l:l[Ca(wi(p))];return N==null?r:zs(N,l,y)}o(V0,"baseInvoke");function MR(l){return Yr(l)&&ps(l)==Je}o(MR,"baseIsArguments");function bH(l){return Yr(l)&&ps(l)==et}o(bH,"baseIsArrayBuffer");function EH(l){return Yr(l)&&ps(l)==D}o(EH,"baseIsDate");function U0(l,p,y,N,P){return l===p?!0:l==null||p==null||!Yr(l)&&!Yr(p)?l!==l&&p!==p:AH(l,p,y,N,U0,P)}o(U0,"baseIsEqual");function AH(l,p,y,N,P,M){var J=Lt(l),Q=Lt(p),ce=J?Ze:rs(l),Ne=Q?Ze:rs(p);ce=ce==Je?Me:ce,Ne=Ne==Je?Me:Ne;var Be=ce==Me,Le=Ne==Me,Qe=ce==Ne;if(Qe&&Au(l)){if(!Au(p))return!1;J=!0,Be=!1}if(Qe&&!Be)return M||(M=new zi),J||Yh(l)?xP(l,p,y,N,P,M):YH(l,p,ce,y,N,P,M);if(!(y&g)){var pt=Be&&Sr.call(l,"__wrapped__"),At=Le&&Sr.call(p,"__wrapped__");if(pt||At){var Kt=pt?l.value():l,Ct=At?p.value():p;return M||(M=new zi),P(Kt,Ct,y,N,M)}}return Qe?(M||(M=new zi),QH(l,p,y,N,P,M)):!1}o(AH,"baseIsEqualDeep");function CH(l){return Yr(l)&&rs(l)==Ce}o(CH,"baseIsMap");function FC(l,p,y,N){var P=y.length,M=P,J=!N;if(l==null)return!M;for(l=Nr(l);P--;){var Q=y[P];if(J&&Q[2]?Q[1]!==l[Q[0]]:!(Q[0]in l))return!1}for(;++P<M;){Q=y[P];var ce=Q[0],Ne=l[ce],Be=Q[1];if(J&&Q[2]){if(Ne===r&&!(ce in l))return!1}else{var Le=new zi;if(N)var Qe=N(Ne,Be,ce,l,p,Le);if(!(Qe===r?U0(Be,Ne,g|x,N,Le):Qe))return!1}}return!0}o(FC,"baseIsMatch");function FR(l){if(!$r(l)||oK(l))return!1;var p=So(l)?C7:mq;return p.test(Nl(l))}o(FR,"baseIsNative");function NH(l){return Yr(l)&&ps(l)==We}o(NH,"baseIsRegExp");function TH(l){return Yr(l)&&rs(l)==Fr}o(TH,"baseIsSet");function IH(l){return Yr(l)&&Wx(l.length)&&!!Ur[ps(l)]}o(IH,"baseIsTypedArray");function qR(l){return typeof l=="function"?l:l==null?Ts:typeof l=="object"?Lt(l)?$R(l[0],l[1]):KR(l):lO(l)}o(qR,"baseIteratee");function qC(l){if(!F0(l))return D7(l);var p=[];for(var y in Nr(l))Sr.call(l,y)&&y!="constructor"&&p.push(y);return p}o(qC,"baseKeys");function _H(l){if(!$r(l))return fK(l);var p=F0(l),y=[];for(var N in l)N=="constructor"&&(p||!Sr.call(l,N))||y.push(N);return y}o(_H,"baseKeysIn");function HC(l,p){return l<p}o(HC,"baseLt");function HR(l,p){var y=-1,N=Cs(l)?ye(l.length):[];return wu(l,function(P,M,J){N[++y]=p(P,M,J)}),N}o(HR,"baseMap");function KR(l){var p=s2(l);return p.length==1&&p[0][2]?AP(p[0][0],p[0][1]):function(y){return y===l||FC(y,l,p)}}o(KR,"baseMatches");function $R(l,p){return a2(l)&&EP(p)?AP(Ca(l),p):function(y){var N=g2(y,l);return N===r&&N===p?v2(y,l):U0(p,N,g|x)}}o($R,"baseMatchesProperty");function Rx(l,p,y,N,P){l!==p&&VC(p,function(M,J){if(P||(P=new zi),$r(M))BH(l,p,J,y,Rx,N,P);else{var Q=N?N(u2(l,J),M,J+"",l,p,P):r;Q===r&&(Q=M),kC(l,J,Q)}},Ns)}o(Rx,"baseMerge");function BH(l,p,y,N,P,M,J){var Q=u2(l,y),ce=u2(p,y),Ne=J.get(ce);if(Ne){kC(l,y,Ne);return}var Be=M?M(Q,ce,y+"",l,p,J):r,Le=Be===r;if(Le){var Qe=Lt(ce),pt=!Qe&&Au(ce),At=!Qe&&!pt&&Yh(ce);Be=ce,Qe||pt||At?Lt(Q)?Be=Q:sn(Q)?Be=As(Q):pt?(Le=!1,Be=nP(ce,!0)):At?(Le=!1,Be=sP(ce,!0)):Be=[]:H0(ce)||Tl(ce)?(Be=Q,Tl(Q)?Be=eO(Q):(!$r(Q)||So(Q))&&(Be=bP(ce))):Le=!1}Le&&(J.set(ce,Be),P(Be,ce,N,M,J),J.delete(ce)),kC(l,y,Be)}o(BH,"baseMergeDeep");function GR(l,p){var y=l.length;if(y)return p+=p<0?y:0,wo(p,y)?l[p]:r}o(GR,"baseNth");function XR(l,p,y){p.length?p=qr(p,function(M){return Lt(M)?function(J){return Al(J,M.length===1?M[0]:M)}:M}):p=[Ts];var N=-1;p=qr(p,Js(St()));var P=HR(l,function(M,J,Q){var ce=qr(p,function(Ne){return Ne(M)});return{criteria:ce,index:++N,value:M}});return n7(P,function(M,J){return HH(M,J,y)})}o(XR,"baseOrderBy");function DH(l,p){return WR(l,p,function(y,N){return v2(l,N)})}o(DH,"basePick");function WR(l,p,y){for(var N=-1,P=p.length,M={};++N<P;){var J=p[N],Q=Al(l,J);y(Q,J)&&j0(M,bu(J,l),Q)}return M}o(WR,"basePickBy");function RH(l){return function(p){return Al(p,l)}}o(RH,"basePropertyDeep");function KC(l,p,y,N){var P=N?r7:Fh,M=-1,J=p.length,Q=l;for(l===p&&(p=As(p)),y&&(Q=qr(l,Js(y)));++M<J;)for(var ce=0,Ne=p[M],Be=y?y(Ne):Ne;(ce=P(Q,Be,ce,N))>-1;)Q!==l&&bx.call(Q,ce,1),bx.call(l,ce,1);return l}o(KC,"basePullAll");function zR(l,p){for(var y=l?p.length:0,N=y-1;y--;){var P=p[y];if(y==N||P!==M){var M=P;wo(P)?bx.call(l,P,1):WC(l,P)}}return l}o(zR,"basePullAt");function $C(l,p){return l+Cx(_R()*(p-l+1))}o($C,"baseRandom");function PH(l,p,y,N){for(var P=-1,M=wn(Ax((p-l)/(y||1)),0),J=ye(M);M--;)J[N?M:++P]=l,l+=y;return J}o(PH,"baseRange");function GC(l,p){var y="";if(!l||p<1||p>ee)return y;do p%2&&(y+=l),p=Cx(p/2),p&&(l+=l);while(p);return y}o(GC,"baseRepeat");function Xt(l,p){return c2(CP(l,p,Ts),l+"")}o(Xt,"baseRest");function OH(l){return RR(Qh(l))}o(OH,"baseSample");function kH(l,p){var y=Qh(l);return qx(y,El(p,0,y.length))}o(kH,"baseSampleSize");function j0(l,p,y,N){if(!$r(l))return l;p=bu(p,l);for(var P=-1,M=p.length,J=M-1,Q=l;Q!=null&&++P<M;){var ce=Ca(p[P]),Ne=y;if(ce==="__proto__"||ce==="constructor"||ce==="prototype")return l;if(P!=J){var Be=Q[ce];Ne=N?N(Be,ce,Q):r,Ne===r&&(Ne=$r(Be)?Be:wo(p[P+1])?[]:{})}k0(Q,ce,Ne),Q=Q[ce]}return l}o(j0,"baseSet");var JR=Nx?function(l,p){return Nx.set(l,p),l}:Ts,LH=Ex?function(l,p){return Ex(l,"toString",{configurable:!0,enumerable:!1,value:x2(p),writable:!0})}:Ts;function VH(l){return qx(Qh(l))}o(VH,"baseShuffle");function xi(l,p,y){var N=-1,P=l.length;p<0&&(p=-p>P?0:P+p),y=y>P?P:y,y<0&&(y+=P),P=p>y?0:y-p>>>0,p>>>=0;for(var M=ye(P);++N<P;)M[N]=l[N+p];return M}o(xi,"baseSlice");function UH(l,p){var y;return wu(l,function(N,P,M){return y=p(N,P,M),!y}),!!y}o(UH,"baseSome");function Px(l,p,y){var N=0,P=l==null?N:l.length;if(typeof p=="number"&&p===p&&P<=xe){for(;N<P;){var M=N+P>>>1,J=l[M];J!==null&&!Qs(J)&&(y?J<=p:J<p)?N=M+1:P=M}return P}return XC(l,p,Ts,y)}o(Px,"baseSortedIndex");function XC(l,p,y,N){var P=0,M=l==null?0:l.length;if(M===0)return 0;p=y(p);for(var J=p!==p,Q=p===null,ce=Qs(p),Ne=p===r;P<M;){var Be=Cx((P+M)/2),Le=y(l[Be]),Qe=Le!==r,pt=Le===null,At=Le===Le,Kt=Qs(Le);if(J)var Ct=N||At;else Ne?Ct=At&&(N||Qe):Q?Ct=At&&Qe&&(N||!pt):ce?Ct=At&&Qe&&!pt&&(N||!Kt):pt||Kt?Ct=!1:Ct=N?Le<=p:Le<p;Ct?P=Be+1:M=Be}return ts(M,Ae)}o(XC,"baseSortedIndexBy");function YR(l,p){for(var y=-1,N=l.length,P=0,M=[];++y<N;){var J=l[y],Q=p?p(J):J;if(!y||!Ji(Q,ce)){var ce=Q;M[P++]=J===0?0:J}}return M}o(YR,"baseSortedUniq");function QR(l){return typeof l=="number"?l:Qs(l)?we:+l}o(QR,"baseToNumber");function Ys(l){if(typeof l=="string")return l;if(Lt(l))return qr(l,Ys)+"";if(Qs(l))return BR?BR.call(l):"";var p=l+"";return p=="0"&&1/l==-ue?"-0":p}o(Ys,"baseToString");function Su(l,p,y){var N=-1,P=hx,M=l.length,J=!0,Q=[],ce=Q;if(y)J=!1,P=bC;else if(M>=t){var Ne=p?null:zH(l);if(Ne)return dx(Ne);J=!1,P=_0,ce=new bl}else ce=p?[]:Q;e:for(;++N<M;){var Be=l[N],Le=p?p(Be):Be;if(Be=y||Be!==0?Be:0,J&&Le===Le){for(var Qe=ce.length;Qe--;)if(ce[Qe]===Le)continue e;p&&ce.push(Le),Q.push(Be)}else P(ce,Le,y)||(ce!==Q&&ce.push(Le),Q.push(Be))}return Q}o(Su,"baseUniq");function WC(l,p){return p=bu(p,l),l=NP(l,p),l==null||delete l[Ca(wi(p))]}o(WC,"baseUnset");function ZR(l,p,y,N){return j0(l,p,y(Al(l,p)),N)}o(ZR,"baseUpdate");function Ox(l,p,y,N){for(var P=l.length,M=N?P:-1;(N?M--:++M<P)&&p(l[M],M,l););return y?xi(l,N?0:M,N?M+1:P):xi(l,N?M+1:0,N?P:M)}o(Ox,"baseWhile");function eP(l,p){var y=l;return y instanceof tr&&(y=y.value()),EC(p,function(N,P){return P.func.apply(P.thisArg,gu([N],P.args))},y)}o(eP,"baseWrapperValue");function zC(l,p,y){var N=l.length;if(N<2)return N?Su(l[0]):[];for(var P=-1,M=ye(N);++P<N;)for(var J=l[P],Q=-1;++Q<N;)Q!=P&&(M[P]=L0(M[P]||J,l[Q],p,y));return Su(Mn(M,1),p,y)}o(zC,"baseXor");function tP(l,p,y){for(var N=-1,P=l.length,M=p.length,J={};++N<P;){var Q=N<M?p[N]:r;y(J,l[N],Q)}return J}o(tP,"baseZipObject");function JC(l){return sn(l)?l:[]}o(JC,"castArrayLikeObject");function YC(l){return typeof l=="function"?l:Ts}o(YC,"castFunction");function bu(l,p){return Lt(l)?l:a2(l,p)?[l]:BP(yr(l))}o(bu,"castPath");var jH=Xt;function Eu(l,p,y){var N=l.length;return y=y===r?N:y,!p&&y>=N?l:xi(l,p,y)}o(Eu,"castSlice");var rP=N7||function(l){return Cn.clearTimeout(l)};function nP(l,p){if(p)return l.slice();var y=l.length,N=AR?AR(y):new l.constructor(y);return l.copy(N),N}o(nP,"cloneBuffer");function QC(l){var p=new l.constructor(l.byteLength);return new wx(p).set(new wx(l)),p}o(QC,"cloneArrayBuffer");function MH(l,p){var y=p?QC(l.buffer):l.buffer;return new l.constructor(y,l.byteOffset,l.byteLength)}o(MH,"cloneDataView");function FH(l){var p=new l.constructor(l.source,Xi.exec(l));return p.lastIndex=l.lastIndex,p}o(FH,"cloneRegExp");function qH(l){return O0?Nr(O0.call(l)):{}}o(qH,"cloneSymbol");function sP(l,p){var y=p?QC(l.buffer):l.buffer;return new l.constructor(y,l.byteOffset,l.length)}o(sP,"cloneTypedArray");function iP(l,p){if(l!==p){var y=l!==r,N=l===null,P=l===l,M=Qs(l),J=p!==r,Q=p===null,ce=p===p,Ne=Qs(p);if(!Q&&!Ne&&!M&&l>p||M&&J&&ce&&!Q&&!Ne||N&&J&&ce||!y&&ce||!P)return 1;if(!N&&!M&&!Ne&&l<p||Ne&&y&&P&&!N&&!M||Q&&y&&P||!J&&P||!ce)return-1}return 0}o(iP,"compareAscending");function HH(l,p,y){for(var N=-1,P=l.criteria,M=p.criteria,J=P.length,Q=y.length;++N<J;){var ce=iP(P[N],M[N]);if(ce){if(N>=Q)return ce;var Ne=y[N];return ce*(Ne=="desc"?-1:1)}}return l.index-p.index}o(HH,"compareMultiple");function aP(l,p,y,N){for(var P=-1,M=l.length,J=y.length,Q=-1,ce=p.length,Ne=wn(M-J,0),Be=ye(ce+Ne),Le=!N;++Q<ce;)Be[Q]=p[Q];for(;++P<J;)(Le||P<M)&&(Be[y[P]]=l[P]);for(;Ne--;)Be[Q++]=l[P++];return Be}o(aP,"composeArgs");function oP(l,p,y,N){for(var P=-1,M=l.length,J=-1,Q=y.length,ce=-1,Ne=p.length,Be=wn(M-Q,0),Le=ye(Be+Ne),Qe=!N;++P<Be;)Le[P]=l[P];for(var pt=P;++ce<Ne;)Le[pt+ce]=p[ce];for(;++J<Q;)(Qe||P<M)&&(Le[pt+y[J]]=l[P++]);return Le}o(oP,"composeArgsRight");function As(l,p){var y=-1,N=l.length;for(p||(p=ye(N));++y<N;)p[y]=l[y];return p}o(As,"copyArray");function Aa(l,p,y,N){var P=!y;y||(y={});for(var M=-1,J=p.length;++M<J;){var Q=p[M],ce=N?N(y[Q],l[Q],Q,y,l):r;ce===r&&(ce=l[Q]),P?vo(y,Q,ce):k0(y,Q,ce)}return y}o(Aa,"copyObject");function KH(l,p){return Aa(l,i2(l),p)}o(KH,"copySymbols");function $H(l,p){return Aa(l,wP(l),p)}o($H,"copySymbolsIn");function kx(l,p){return function(y,N){var P=Lt(y)?Jq:pH,M=p?p():{};return P(y,l,St(N,2),M)}}o(kx,"createAggregator");function Wh(l){return Xt(function(p,y){var N=-1,P=y.length,M=P>1?y[P-1]:r,J=P>2?y[2]:r;for(M=l.length>3&&typeof M=="function"?(P--,M):r,J&&ds(y[0],y[1],J)&&(M=P<3?r:M,P=1),p=Nr(p);++N<P;){var Q=y[N];Q&&l(p,Q,N,M)}return p})}o(Wh,"createAssigner");function uP(l,p){return function(y,N){if(y==null)return y;if(!Cs(y))return l(y,N);for(var P=y.length,M=p?P:-1,J=Nr(y);(p?M--:++M<P)&&N(J[M],M,J)!==!1;);return y}}o(uP,"createBaseEach");function cP(l){return function(p,y,N){for(var P=-1,M=Nr(p),J=N(p),Q=J.length;Q--;){var ce=J[l?Q:++P];if(y(M[ce],ce,M)===!1)break}return p}}o(cP,"createBaseFor");function GH(l,p,y){var N=p&v,P=M0(l);function M(){var J=this&&this!==Cn&&this instanceof M?P:l;return J.apply(N?y:this,arguments)}return o(M,"wrapper"),M}o(GH,"createBind");function lP(l){return function(p){p=yr(p);var y=qh(p)?Wi(p):r,N=y?y[0]:p.charAt(0),P=y?Eu(y,1).join(""):p.slice(1);return N[l]()+P}}o(lP,"createCaseFirst");function zh(l){return function(p){return EC(uO(oO(p).replace(Lq,"")),l,"")}}o(zh,"createCompounder");function M0(l){return function(){var p=arguments;switch(p.length){case 0:return new l;case 1:return new l(p[0]);case 2:return new l(p[0],p[1]);case 3:return new l(p[0],p[1],p[2]);case 4:return new l(p[0],p[1],p[2],p[3]);case 5:return new l(p[0],p[1],p[2],p[3],p[4]);case 6:return new l(p[0],p[1],p[2],p[3],p[4],p[5]);case 7:return new l(p[0],p[1],p[2],p[3],p[4],p[5],p[6])}var y=Xh(l.prototype),N=l.apply(y,p);return $r(N)?N:y}}o(M0,"createCtor");function XH(l,p,y){var N=M0(l);function P(){for(var M=arguments.length,J=ye(M),Q=M,ce=Jh(P);Q--;)J[Q]=arguments[Q];var Ne=M<3&&J[0]!==ce&&J[M-1]!==ce?[]:vu(J,ce);if(M-=Ne.length,M<y)return mP(l,p,Lx,P.placeholder,r,J,Ne,r,r,y-M);var Be=this&&this!==Cn&&this instanceof P?N:l;return zs(Be,this,J)}return o(P,"wrapper"),P}o(XH,"createCurry");function fP(l){return function(p,y,N){var P=Nr(p);if(!Cs(p)){var M=St(y,3);p=Nn(p),y=o(function(Q){return M(P[Q],Q,P)},"predicate")}var J=l(p,y,N);return J>-1?P[M?p[J]:J]:r}}o(fP,"createFind");function hP(l){return xo(function(p){var y=p.length,N=y,P=vi.prototype.thru;for(l&&p.reverse();N--;){var M=p[N];if(typeof M!="function")throw new gi(s);if(P&&!J&&Mx(M)=="wrapper")var J=new vi([],!0)}for(N=J?N:y;++N<y;){M=p[N];var Q=Mx(M),ce=Q=="wrapper"?n2(M):r;ce&&o2(ce[0])&&ce[1]==(C|A|b|_)&&!ce[4].length&&ce[9]==1?J=J[Mx(ce[0])].apply(J,ce[3]):J=M.length==1&&o2(M)?J[Q]():J.thru(M)}return function(){var Ne=arguments,Be=Ne[0];if(J&&Ne.length==1&&Lt(Be))return J.plant(Be).value();for(var Le=0,Qe=y?p[Le].apply(this,Ne):Be;++Le<y;)Qe=p[Le].call(this,Qe);return Qe}})}o(hP,"createFlow");function Lx(l,p,y,N,P,M,J,Q,ce,Ne){var Be=p&C,Le=p&v,Qe=p&w,pt=p&(A|T),At=p&F,Kt=Qe?r:M0(l);function Ct(){for(var zt=arguments.length,ir=ye(zt),Zs=zt;Zs--;)ir[Zs]=arguments[Zs];if(pt)var ms=Jh(Ct),ei=i7(ir,ms);if(N&&(ir=aP(ir,N,P,pt)),M&&(ir=oP(ir,M,J,pt)),zt-=ei,pt&&zt<Ne){var an=vu(ir,ms);return mP(l,p,Lx,Ct.placeholder,y,ir,an,Q,ce,Ne-zt)}var Yi=Le?y:this,Eo=Qe?Yi[l]:l;return zt=ir.length,Q?ir=pK(ir,Q):At&&zt>1&&ir.reverse(),Be&&ce<zt&&(ir.length=ce),this&&this!==Cn&&this instanceof Ct&&(Eo=Kt||M0(Eo)),Eo.apply(Yi,ir)}return o(Ct,"wrapper"),Ct}o(Lx,"createHybrid");function pP(l,p){return function(y,N){return SH(y,l,p(N),{})}}o(pP,"createInverter");function Vx(l,p){return function(y,N){var P;if(y===r&&N===r)return p;if(y!==r&&(P=y),N!==r){if(P===r)return N;typeof y=="string"||typeof N=="string"?(y=Ys(y),N=Ys(N)):(y=QR(y),N=QR(N)),P=l(y,N)}return P}}o(Vx,"createMathOperation");function ZC(l){return xo(function(p){return p=qr(p,Js(St())),Xt(function(y){var N=this;return l(p,function(P){return zs(P,N,y)})})})}o(ZC,"createOver");function Ux(l,p){p=p===r?" ":Ys(p);var y=p.length;if(y<2)return y?GC(p,l):p;var N=GC(p,Ax(l/Hh(p)));return qh(p)?Eu(Wi(N),0,l).join(""):N.slice(0,l)}o(Ux,"createPadding");function WH(l,p,y,N){var P=p&v,M=M0(l);function J(){for(var Q=-1,ce=arguments.length,Ne=-1,Be=N.length,Le=ye(Be+ce),Qe=this&&this!==Cn&&this instanceof J?M:l;++Ne<Be;)Le[Ne]=N[Ne];for(;ce--;)Le[Ne++]=arguments[++Q];return zs(Qe,P?y:this,Le)}return o(J,"wrapper"),J}o(WH,"createPartial");function dP(l){return function(p,y,N){return N&&typeof N!="number"&&ds(p,y,N)&&(y=N=r),p=bo(p),y===r?(y=p,p=0):y=bo(y),N=N===r?p<y?1:-1:bo(N),PH(p,y,N,l)}}o(dP,"createRange");function jx(l){return function(p,y){return typeof p=="string"&&typeof y=="string"||(p=Si(p),y=Si(y)),l(p,y)}}o(jx,"createRelationalOperation");function mP(l,p,y,N,P,M,J,Q,ce,Ne){var Be=p&A,Le=Be?J:r,Qe=Be?r:J,pt=Be?M:r,At=Be?r:M;p|=Be?b:E,p&=~(Be?E:b),p&S||(p&=~(v|w));var Kt=[l,p,P,pt,Le,At,Qe,Q,ce,Ne],Ct=y.apply(r,Kt);return o2(l)&&TP(Ct,Kt),Ct.placeholder=N,IP(Ct,l,p)}o(mP,"createRecurry");function e2(l){var p=xn[l];return function(y,N){if(y=Si(y),N=N==null?0:ts(Mt(N),292),N&&IR(y)){var P=(yr(y)+"e").split("e"),M=p(P[0]+"e"+(+P[1]+N));return P=(yr(M)+"e").split("e"),+(P[0]+"e"+(+P[1]-N))}return p(y)}}o(e2,"createRound");var zH=$h&&1/dx(new $h([,-0]))[1]==ue?function(l){return new $h(l)}:b2;function gP(l){return function(p){var y=rs(p);return y==Ce?BC(p):y==Fr?h7(p):s7(p,l(p))}}o(gP,"createToPairs");function yo(l,p,y,N,P,M,J,Q){var ce=p&w;if(!ce&&typeof l!="function")throw new gi(s);var Ne=N?N.length:0;if(Ne||(p&=~(b|E),N=P=r),J=J===r?J:wn(Mt(J),0),Q=Q===r?Q:Mt(Q),Ne-=P?P.length:0,p&E){var Be=N,Le=P;N=P=r}var Qe=ce?r:n2(l),pt=[l,p,y,N,P,Be,Le,M,J,Q];if(Qe&&lK(pt,Qe),l=pt[0],p=pt[1],y=pt[2],N=pt[3],P=pt[4],Q=pt[9]=pt[9]===r?ce?0:l.length:wn(pt[9]-Ne,0),!Q&&p&(A|T)&&(p&=~(A|T)),!p||p==v)var At=GH(l,p,y);else p==A||p==T?At=XH(l,p,Q):(p==b||p==(v|b))&&!P.length?At=WH(l,p,y,N):At=Lx.apply(r,pt);var Kt=Qe?JR:TP;return IP(Kt(At,pt),l,p)}o(yo,"createWrap");function vP(l,p,y,N){return l===r||Ji(l,Kh[y])&&!Sr.call(N,y)?p:l}o(vP,"customDefaultsAssignIn");function yP(l,p,y,N,P,M){return $r(l)&&$r(p)&&(M.set(p,l),Rx(l,p,r,yP,M),M.delete(p)),l}o(yP,"customDefaultsMerge");function JH(l){return H0(l)?r:l}o(JH,"customOmitClone");function xP(l,p,y,N,P,M){var J=y&g,Q=l.length,ce=p.length;if(Q!=ce&&!(J&&ce>Q))return!1;var Ne=M.get(l),Be=M.get(p);if(Ne&&Be)return Ne==p&&Be==l;var Le=-1,Qe=!0,pt=y&x?new bl:r;for(M.set(l,p),M.set(p,l);++Le<Q;){var At=l[Le],Kt=p[Le];if(N)var Ct=J?N(Kt,At,Le,p,l,M):N(At,Kt,Le,l,p,M);if(Ct!==r){if(Ct)continue;Qe=!1;break}if(pt){if(!AC(p,function(zt,ir){if(!_0(pt,ir)&&(At===zt||P(At,zt,y,N,M)))return pt.push(ir)})){Qe=!1;break}}else if(!(At===Kt||P(At,Kt,y,N,M))){Qe=!1;break}}return M.delete(l),M.delete(p),Qe}o(xP,"equalArrays");function YH(l,p,y,N,P,M,J){switch(y){case Un:if(l.byteLength!=p.byteLength||l.byteOffset!=p.byteOffset)return!1;l=l.buffer,p=p.buffer;case et:return!(l.byteLength!=p.byteLength||!M(new wx(l),new wx(p)));case O:case D:case ft:return Ji(+l,+p);case z:return l.name==p.name&&l.message==p.message;case We:case hn:return l==p+"";case Ce:var Q=BC;case Fr:var ce=N&g;if(Q||(Q=dx),l.size!=p.size&&!ce)return!1;var Ne=J.get(l);if(Ne)return Ne==p;N|=x,J.set(l,p);var Be=xP(Q(l),Q(p),N,P,M,J);return J.delete(l),Be;case Zn:if(O0)return O0.call(l)==O0.call(p)}return!1}o(YH,"equalByTag");function QH(l,p,y,N,P,M){var J=y&g,Q=t2(l),ce=Q.length,Ne=t2(p),Be=Ne.length;if(ce!=Be&&!J)return!1;for(var Le=ce;Le--;){var Qe=Q[Le];if(!(J?Qe in p:Sr.call(p,Qe)))return!1}var pt=M.get(l),At=M.get(p);if(pt&&At)return pt==p&&At==l;var Kt=!0;M.set(l,p),M.set(p,l);for(var Ct=J;++Le<ce;){Qe=Q[Le];var zt=l[Qe],ir=p[Qe];if(N)var Zs=J?N(ir,zt,Qe,p,l,M):N(zt,ir,Qe,l,p,M);if(!(Zs===r?zt===ir||P(zt,ir,y,N,M):Zs)){Kt=!1;break}Ct||(Ct=Qe=="constructor")}if(Kt&&!Ct){var ms=l.constructor,ei=p.constructor;ms!=ei&&"constructor"in l&&"constructor"in p&&!(typeof ms=="function"&&ms instanceof ms&&typeof ei=="function"&&ei instanceof ei)&&(Kt=!1)}return M.delete(l),M.delete(p),Kt}o(QH,"equalObjects");function xo(l){return c2(CP(l,r,OP),l+"")}o(xo,"flatRest");function t2(l){return jR(l,Nn,i2)}o(t2,"getAllKeys");function r2(l){return jR(l,Ns,wP)}o(r2,"getAllKeysIn");var n2=Nx?function(l){return Nx.get(l)}:b2;function Mx(l){for(var p=l.name+"",y=Gh[p],N=Sr.call(Gh,p)?y.length:0;N--;){var P=y[N],M=P.func;if(M==null||M==l)return P.name}return p}o(Mx,"getFuncName");function Jh(l){var p=Sr.call(j,"placeholder")?j:l;return p.placeholder}o(Jh,"getHolder");function St(){var l=j.iteratee||w2;return l=l===w2?qR:l,arguments.length?l(arguments[0],arguments[1]):l}o(St,"getIteratee");function Fx(l,p){var y=l.__data__;return aK(p)?y[typeof p=="string"?"string":"hash"]:y.map}o(Fx,"getMapData");function s2(l){for(var p=Nn(l),y=p.length;y--;){var N=p[y],P=l[N];p[y]=[N,P,EP(P)]}return p}o(s2,"getMatchData");function Cl(l,p){var y=c7(l,p);return FR(y)?y:r}o(Cl,"getNative");function ZH(l){var p=Sr.call(l,wl),y=l[wl];try{l[wl]=r;var N=!0}catch{}var P=yx.call(l);return N&&(p?l[wl]=y:delete l[wl]),P}o(ZH,"getRawTag");var i2=RC?function(l){return l==null?[]:(l=Nr(l),mu(RC(l),function(p){return NR.call(l,p)}))}:E2,wP=RC?function(l){for(var p=[];l;)gu(p,i2(l)),l=Sx(l);return p}:E2,rs=ps;(PC&&rs(new PC(new ArrayBuffer(1)))!=Un||D0&&rs(new D0)!=Ce||OC&&rs(OC.resolve())!=sr||$h&&rs(new $h)!=Fr||R0&&rs(new R0)!=fs)&&(rs=o(function(l){var p=ps(l),y=p==Me?l.constructor:r,N=y?Nl(y):"";if(N)switch(N){case k7:return Un;case L7:return Ce;case V7:return sr;case U7:return Fr;case j7:return fs}return p},"getTag"));function eK(l,p,y){for(var N=-1,P=y.length;++N<P;){var M=y[N],J=M.size;switch(M.type){case"drop":l+=J;break;case"dropRight":p-=J;break;case"take":p=ts(p,l+J);break;case"takeRight":l=wn(l,p-J);break}}return{start:l,end:p}}o(eK,"getView");function tK(l){var p=l.match(fC);return p?p[1].split(hC):[]}o(tK,"getWrapDetails");function SP(l,p,y){p=bu(p,l);for(var N=-1,P=p.length,M=!1;++N<P;){var J=Ca(p[N]);if(!(M=l!=null&&y(l,J)))break;l=l[J]}return M||++N!=P?M:(P=l==null?0:l.length,!!P&&Wx(P)&&wo(J,P)&&(Lt(l)||Tl(l)))}o(SP,"hasPath");function rK(l){var p=l.length,y=new l.constructor(p);return p&&typeof l[0]=="string"&&Sr.call(l,"index")&&(y.index=l.index,y.input=l.input),y}o(rK,"initCloneArray");function bP(l){return typeof l.constructor=="function"&&!F0(l)?Xh(Sx(l)):{}}o(bP,"initCloneObject");function nK(l,p,y){var N=l.constructor;switch(p){case et:return QC(l);case O:case D:return new N(+l);case Un:return MH(l,y);case hs:case wa:case Sa:case Rt:case Uh:case jh:case yl:case T0:case Ws:return sP(l,y);case Ce:return new N;case ft:case hn:return new N(l);case We:return FH(l);case Fr:return new N;case Zn:return qH(l)}}o(nK,"initCloneByTag");function sK(l,p){var y=p.length;if(!y)return l;var N=y-1;return p[N]=(y>1?"& ":"")+p[N],p=p.join(y>2?", ":" "),l.replace(lC,`{
27
+ /* [wrapped with `+p+`] */
28
+ `)}o(sK,"insertWrapDetails");function iK(l){return Lt(l)||Tl(l)||!!(TR&&l&&l[TR])}o(iK,"isFlattenable");function wo(l,p){var y=typeof l;return p=p??ee,!!p&&(y=="number"||y!="symbol"&&vq.test(l))&&l>-1&&l%1==0&&l<p}o(wo,"isIndex");function ds(l,p,y){if(!$r(y))return!1;var N=typeof p;return(N=="number"?Cs(y)&&wo(p,y.length):N=="string"&&p in y)?Ji(y[p],l):!1}o(ds,"isIterateeCall");function a2(l,p){if(Lt(l))return!1;var y=typeof l;return y=="number"||y=="symbol"||y=="boolean"||l==null||Qs(l)?!0:jn.test(l)||!Bt.test(l)||p!=null&&l in Nr(p)}o(a2,"isKey");function aK(l){var p=typeof l;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?l!=="__proto__":l===null}o(aK,"isKeyable");function o2(l){var p=Mx(l),y=j[p];if(typeof y!="function"||!(p in tr.prototype))return!1;if(l===y)return!0;var N=n2(y);return!!N&&l===N[0]}o(o2,"isLaziable");function oK(l){return!!ER&&ER in l}o(oK,"isMasked");var uK=gx?So:A2;function F0(l){var p=l&&l.constructor,y=typeof p=="function"&&p.prototype||Kh;return l===y}o(F0,"isPrototype");function EP(l){return l===l&&!$r(l)}o(EP,"isStrictComparable");function AP(l,p){return function(y){return y==null?!1:y[l]===p&&(p!==r||l in Nr(y))}}o(AP,"matchesStrictComparable");function cK(l){var p=Gx(l,function(N){return y.size===u&&y.clear(),N}),y=p.cache;return p}o(cK,"memoizeCapped");function lK(l,p){var y=l[1],N=p[1],P=y|N,M=P<(v|w|C),J=N==C&&y==A||N==C&&y==_&&l[7].length<=p[8]||N==(C|_)&&p[7].length<=p[8]&&y==A;if(!(M||J))return l;N&v&&(l[2]=p[2],P|=y&v?0:S);var Q=p[3];if(Q){var ce=l[3];l[3]=ce?aP(ce,Q,p[4]):Q,l[4]=ce?vu(l[3],c):p[4]}return Q=p[5],Q&&(ce=l[5],l[5]=ce?oP(ce,Q,p[6]):Q,l[6]=ce?vu(l[5],c):p[6]),Q=p[7],Q&&(l[7]=Q),N&C&&(l[8]=l[8]==null?p[8]:ts(l[8],p[8])),l[9]==null&&(l[9]=p[9]),l[0]=p[0],l[1]=P,l}o(lK,"mergeData");function fK(l){var p=[];if(l!=null)for(var y in Nr(l))p.push(y);return p}o(fK,"nativeKeysIn");function hK(l){return yx.call(l)}o(hK,"objectToString");function CP(l,p,y){return p=wn(p===r?l.length-1:p,0),function(){for(var N=arguments,P=-1,M=wn(N.length-p,0),J=ye(M);++P<M;)J[P]=N[p+P];P=-1;for(var Q=ye(p+1);++P<p;)Q[P]=N[P];return Q[p]=y(J),zs(l,this,Q)}}o(CP,"overRest");function NP(l,p){return p.length<2?l:Al(l,xi(p,0,-1))}o(NP,"parent");function pK(l,p){for(var y=l.length,N=ts(p.length,y),P=As(l);N--;){var M=p[N];l[N]=wo(M,y)?P[M]:r}return l}o(pK,"reorder");function u2(l,p){if(!(p==="constructor"&&typeof l[p]=="function")&&p!="__proto__")return l[p]}o(u2,"safeGet");var TP=_P(JR),q0=I7||function(l,p){return Cn.setTimeout(l,p)},c2=_P(LH);function IP(l,p,y){var N=p+"";return c2(l,sK(N,dK(tK(N),y)))}o(IP,"setWrapToString");function _P(l){var p=0,y=0;return function(){var N=R7(),P=K-(N-y);if(y=N,P>0){if(++p>=H)return arguments[0]}else p=0;return l.apply(r,arguments)}}o(_P,"shortOut");function qx(l,p){var y=-1,N=l.length,P=N-1;for(p=p===r?N:p;++y<p;){var M=$C(y,P),J=l[M];l[M]=l[y],l[y]=J}return l.length=p,l}o(qx,"shuffleSelf");var BP=cK(function(l){var p=[];return l.charCodeAt(0)===46&&p.push(""),l.replace(pi,function(y,N,P,M){p.push(P?M.replace(er,"$1"):N||y)}),p});function Ca(l){if(typeof l=="string"||Qs(l))return l;var p=l+"";return p=="0"&&1/l==-ue?"-0":p}o(Ca,"toKey");function Nl(l){if(l!=null){try{return vx.call(l)}catch{}try{return l+""}catch{}}return""}o(Nl,"toSource");function dK(l,p){return mi(je,function(y){var N="_."+y[0];p&y[1]&&!hx(l,N)&&l.push(N)}),l.sort()}o(dK,"updateWrapDetails");function DP(l){if(l instanceof tr)return l.clone();var p=new vi(l.__wrapped__,l.__chain__);return p.__actions__=As(l.__actions__),p.__index__=l.__index__,p.__values__=l.__values__,p}o(DP,"wrapperClone");function mK(l,p,y){(y?ds(l,p,y):p===r)?p=1:p=wn(Mt(p),0);var N=l==null?0:l.length;if(!N||p<1)return[];for(var P=0,M=0,J=ye(Ax(N/p));P<N;)J[M++]=xi(l,P,P+=p);return J}o(mK,"chunk");function gK(l){for(var p=-1,y=l==null?0:l.length,N=0,P=[];++p<y;){var M=l[p];M&&(P[N++]=M)}return P}o(gK,"compact");function vK(){var l=arguments.length;if(!l)return[];for(var p=ye(l-1),y=arguments[0],N=l;N--;)p[N-1]=arguments[N];return gu(Lt(y)?As(y):[y],Mn(p,1))}o(vK,"concat");var yK=Xt(function(l,p){return sn(l)?L0(l,Mn(p,1,sn,!0)):[]}),xK=Xt(function(l,p){var y=wi(p);return sn(y)&&(y=r),sn(l)?L0(l,Mn(p,1,sn,!0),St(y,2)):[]}),wK=Xt(function(l,p){var y=wi(p);return sn(y)&&(y=r),sn(l)?L0(l,Mn(p,1,sn,!0),r,y):[]});function SK(l,p,y){var N=l==null?0:l.length;return N?(p=y||p===r?1:Mt(p),xi(l,p<0?0:p,N)):[]}o(SK,"drop");function bK(l,p,y){var N=l==null?0:l.length;return N?(p=y||p===r?1:Mt(p),p=N-p,xi(l,0,p<0?0:p)):[]}o(bK,"dropRight");function EK(l,p){return l&&l.length?Ox(l,St(p,3),!0,!0):[]}o(EK,"dropRightWhile");function AK(l,p){return l&&l.length?Ox(l,St(p,3),!0):[]}o(AK,"dropWhile");function CK(l,p,y,N){var P=l==null?0:l.length;return P?(y&&typeof y!="number"&&ds(l,p,y)&&(y=0,N=P),vH(l,p,y,N)):[]}o(CK,"fill");function RP(l,p,y){var N=l==null?0:l.length;if(!N)return-1;var P=y==null?0:Mt(y);return P<0&&(P=wn(N+P,0)),px(l,St(p,3),P)}o(RP,"findIndex");function PP(l,p,y){var N=l==null?0:l.length;if(!N)return-1;var P=N-1;return y!==r&&(P=Mt(y),P=y<0?wn(N+P,0):ts(P,N-1)),px(l,St(p,3),P,!0)}o(PP,"findLastIndex");function OP(l){var p=l==null?0:l.length;return p?Mn(l,1):[]}o(OP,"flatten");function NK(l){var p=l==null?0:l.length;return p?Mn(l,ue):[]}o(NK,"flattenDeep");function TK(l,p){var y=l==null?0:l.length;return y?(p=p===r?1:Mt(p),Mn(l,p)):[]}o(TK,"flattenDepth");function IK(l){for(var p=-1,y=l==null?0:l.length,N={};++p<y;){var P=l[p];N[P[0]]=P[1]}return N}o(IK,"fromPairs");function kP(l){return l&&l.length?l[0]:r}o(kP,"head");function _K(l,p,y){var N=l==null?0:l.length;if(!N)return-1;var P=y==null?0:Mt(y);return P<0&&(P=wn(N+P,0)),Fh(l,p,P)}o(_K,"indexOf");function BK(l){var p=l==null?0:l.length;return p?xi(l,0,-1):[]}o(BK,"initial");var DK=Xt(function(l){var p=qr(l,JC);return p.length&&p[0]===l[0]?MC(p):[]}),RK=Xt(function(l){var p=wi(l),y=qr(l,JC);return p===wi(y)?p=r:y.pop(),y.length&&y[0]===l[0]?MC(y,St(p,2)):[]}),PK=Xt(function(l){var p=wi(l),y=qr(l,JC);return p=typeof p=="function"?p:r,p&&y.pop(),y.length&&y[0]===l[0]?MC(y,r,p):[]});function OK(l,p){return l==null?"":B7.call(l,p)}o(OK,"join");function wi(l){var p=l==null?0:l.length;return p?l[p-1]:r}o(wi,"last");function kK(l,p,y){var N=l==null?0:l.length;if(!N)return-1;var P=N;return y!==r&&(P=Mt(y),P=P<0?wn(N+P,0):ts(P,N-1)),p===p?d7(l,p,P):px(l,mR,P,!0)}o(kK,"lastIndexOf");function LK(l,p){return l&&l.length?GR(l,Mt(p)):r}o(LK,"nth");var VK=Xt(LP);function LP(l,p){return l&&l.length&&p&&p.length?KC(l,p):l}o(LP,"pullAll");function UK(l,p,y){return l&&l.length&&p&&p.length?KC(l,p,St(y,2)):l}o(UK,"pullAllBy");function jK(l,p,y){return l&&l.length&&p&&p.length?KC(l,p,r,y):l}o(jK,"pullAllWith");var MK=xo(function(l,p){var y=l==null?0:l.length,N=LC(l,p);return zR(l,qr(p,function(P){return wo(P,y)?+P:P}).sort(iP)),N});function FK(l,p){var y=[];if(!(l&&l.length))return y;var N=-1,P=[],M=l.length;for(p=St(p,3);++N<M;){var J=l[N];p(J,N,l)&&(y.push(J),P.push(N))}return zR(l,P),y}o(FK,"remove");function l2(l){return l==null?l:O7.call(l)}o(l2,"reverse");function qK(l,p,y){var N=l==null?0:l.length;return N?(y&&typeof y!="number"&&ds(l,p,y)?(p=0,y=N):(p=p==null?0:Mt(p),y=y===r?N:Mt(y)),xi(l,p,y)):[]}o(qK,"slice");function HK(l,p){return Px(l,p)}o(HK,"sortedIndex");function KK(l,p,y){return XC(l,p,St(y,2))}o(KK,"sortedIndexBy");function $K(l,p){var y=l==null?0:l.length;if(y){var N=Px(l,p);if(N<y&&Ji(l[N],p))return N}return-1}o($K,"sortedIndexOf");function GK(l,p){return Px(l,p,!0)}o(GK,"sortedLastIndex");function XK(l,p,y){return XC(l,p,St(y,2),!0)}o(XK,"sortedLastIndexBy");function WK(l,p){var y=l==null?0:l.length;if(y){var N=Px(l,p,!0)-1;if(Ji(l[N],p))return N}return-1}o(WK,"sortedLastIndexOf");function zK(l){return l&&l.length?YR(l):[]}o(zK,"sortedUniq");function JK(l,p){return l&&l.length?YR(l,St(p,2)):[]}o(JK,"sortedUniqBy");function YK(l){var p=l==null?0:l.length;return p?xi(l,1,p):[]}o(YK,"tail");function QK(l,p,y){return l&&l.length?(p=y||p===r?1:Mt(p),xi(l,0,p<0?0:p)):[]}o(QK,"take");function ZK(l,p,y){var N=l==null?0:l.length;return N?(p=y||p===r?1:Mt(p),p=N-p,xi(l,p<0?0:p,N)):[]}o(ZK,"takeRight");function e$(l,p){return l&&l.length?Ox(l,St(p,3),!1,!0):[]}o(e$,"takeRightWhile");function t$(l,p){return l&&l.length?Ox(l,St(p,3)):[]}o(t$,"takeWhile");var r$=Xt(function(l){return Su(Mn(l,1,sn,!0))}),n$=Xt(function(l){var p=wi(l);return sn(p)&&(p=r),Su(Mn(l,1,sn,!0),St(p,2))}),s$=Xt(function(l){var p=wi(l);return p=typeof p=="function"?p:r,Su(Mn(l,1,sn,!0),r,p)});function i$(l){return l&&l.length?Su(l):[]}o(i$,"uniq");function a$(l,p){return l&&l.length?Su(l,St(p,2)):[]}o(a$,"uniqBy");function o$(l,p){return p=typeof p=="function"?p:r,l&&l.length?Su(l,r,p):[]}o(o$,"uniqWith");function f2(l){if(!(l&&l.length))return[];var p=0;return l=mu(l,function(y){if(sn(y))return p=wn(y.length,p),!0}),IC(p,function(y){return qr(l,CC(y))})}o(f2,"unzip");function VP(l,p){if(!(l&&l.length))return[];var y=f2(l);return p==null?y:qr(y,function(N){return zs(p,r,N)})}o(VP,"unzipWith");var u$=Xt(function(l,p){return sn(l)?L0(l,p):[]}),c$=Xt(function(l){return zC(mu(l,sn))}),l$=Xt(function(l){var p=wi(l);return sn(p)&&(p=r),zC(mu(l,sn),St(p,2))}),f$=Xt(function(l){var p=wi(l);return p=typeof p=="function"?p:r,zC(mu(l,sn),r,p)}),h$=Xt(f2);function p$(l,p){return tP(l||[],p||[],k0)}o(p$,"zipObject");function d$(l,p){return tP(l||[],p||[],j0)}o(d$,"zipObjectDeep");var m$=Xt(function(l){var p=l.length,y=p>1?l[p-1]:r;return y=typeof y=="function"?(l.pop(),y):r,VP(l,y)});function UP(l){var p=j(l);return p.__chain__=!0,p}o(UP,"chain");function g$(l,p){return p(l),l}o(g$,"tap");function Hx(l,p){return p(l)}o(Hx,"thru");var v$=xo(function(l){var p=l.length,y=p?l[0]:0,N=this.__wrapped__,P=o(function(M){return LC(M,l)},"interceptor");return p>1||this.__actions__.length||!(N instanceof tr)||!wo(y)?this.thru(P):(N=N.slice(y,+y+(p?1:0)),N.__actions__.push({func:Hx,args:[P],thisArg:r}),new vi(N,this.__chain__).thru(function(M){return p&&!M.length&&M.push(r),M}))});function y$(){return UP(this)}o(y$,"wrapperChain");function x$(){return new vi(this.value(),this.__chain__)}o(x$,"wrapperCommit");function w$(){this.__values__===r&&(this.__values__=QP(this.value()));var l=this.__index__>=this.__values__.length,p=l?r:this.__values__[this.__index__++];return{done:l,value:p}}o(w$,"wrapperNext");function S$(){return this}o(S$,"wrapperToIterator");function b$(l){for(var p,y=this;y instanceof Ix;){var N=DP(y);N.__index__=0,N.__values__=r,p?P.__wrapped__=N:p=N;var P=N;y=y.__wrapped__}return P.__wrapped__=l,p}o(b$,"wrapperPlant");function E$(){var l=this.__wrapped__;if(l instanceof tr){var p=l;return this.__actions__.length&&(p=new tr(this)),p=p.reverse(),p.__actions__.push({func:Hx,args:[l2],thisArg:r}),new vi(p,this.__chain__)}return this.thru(l2)}o(E$,"wrapperReverse");function A$(){return eP(this.__wrapped__,this.__actions__)}o(A$,"wrapperValue");var C$=kx(function(l,p,y){Sr.call(l,y)?++l[y]:vo(l,y,1)});function N$(l,p,y){var N=Lt(l)?pR:gH;return y&&ds(l,p,y)&&(p=r),N(l,St(p,3))}o(N$,"every");function T$(l,p){var y=Lt(l)?mu:VR;return y(l,St(p,3))}o(T$,"filter");var I$=fP(RP),_$=fP(PP);function B$(l,p){return Mn(Kx(l,p),1)}o(B$,"flatMap");function D$(l,p){return Mn(Kx(l,p),ue)}o(D$,"flatMapDeep");function R$(l,p,y){return y=y===r?1:Mt(y),Mn(Kx(l,p),y)}o(R$,"flatMapDepth");function jP(l,p){var y=Lt(l)?mi:wu;return y(l,St(p,3))}o(jP,"forEach");function MP(l,p){var y=Lt(l)?Yq:LR;return y(l,St(p,3))}o(MP,"forEachRight");var P$=kx(function(l,p,y){Sr.call(l,y)?l[y].push(p):vo(l,y,[p])});function O$(l,p,y,N){l=Cs(l)?l:Qh(l),y=y&&!N?Mt(y):0;var P=l.length;return y<0&&(y=wn(P+y,0)),zx(l)?y<=P&&l.indexOf(p,y)>-1:!!P&&Fh(l,p,y)>-1}o(O$,"includes");var k$=Xt(function(l,p,y){var N=-1,P=typeof p=="function",M=Cs(l)?ye(l.length):[];return wu(l,function(J){M[++N]=P?zs(p,J,y):V0(J,p,y)}),M}),L$=kx(function(l,p,y){vo(l,y,p)});function Kx(l,p){var y=Lt(l)?qr:HR;return y(l,St(p,3))}o(Kx,"map");function V$(l,p,y,N){return l==null?[]:(Lt(p)||(p=p==null?[]:[p]),y=N?r:y,Lt(y)||(y=y==null?[]:[y]),XR(l,p,y))}o(V$,"orderBy");var U$=kx(function(l,p,y){l[y?0:1].push(p)},function(){return[[],[]]});function j$(l,p,y){var N=Lt(l)?EC:vR,P=arguments.length<3;return N(l,St(p,4),y,P,wu)}o(j$,"reduce");function M$(l,p,y){var N=Lt(l)?Qq:vR,P=arguments.length<3;return N(l,St(p,4),y,P,LR)}o(M$,"reduceRight");function F$(l,p){var y=Lt(l)?mu:VR;return y(l,Xx(St(p,3)))}o(F$,"reject");function q$(l){var p=Lt(l)?RR:OH;return p(l)}o(q$,"sample");function H$(l,p,y){(y?ds(l,p,y):p===r)?p=1:p=Mt(p);var N=Lt(l)?fH:kH;return N(l,p)}o(H$,"sampleSize");function K$(l){var p=Lt(l)?hH:VH;return p(l)}o(K$,"shuffle");function $$(l){if(l==null)return 0;if(Cs(l))return zx(l)?Hh(l):l.length;var p=rs(l);return p==Ce||p==Fr?l.size:qC(l).length}o($$,"size");function G$(l,p,y){var N=Lt(l)?AC:UH;return y&&ds(l,p,y)&&(p=r),N(l,St(p,3))}o(G$,"some");var X$=Xt(function(l,p){if(l==null)return[];var y=p.length;return y>1&&ds(l,p[0],p[1])?p=[]:y>2&&ds(p[0],p[1],p[2])&&(p=[p[0]]),XR(l,Mn(p,1),[])}),$x=T7||function(){return Cn.Date.now()};function W$(l,p){if(typeof p!="function")throw new gi(s);return l=Mt(l),function(){if(--l<1)return p.apply(this,arguments)}}o(W$,"after");function FP(l,p,y){return p=y?r:p,p=l&&p==null?l.length:p,yo(l,C,r,r,r,r,p)}o(FP,"ary");function qP(l,p){var y;if(typeof p!="function")throw new gi(s);return l=Mt(l),function(){return--l>0&&(y=p.apply(this,arguments)),l<=1&&(p=r),y}}o(qP,"before");var h2=Xt(function(l,p,y){var N=v;if(y.length){var P=vu(y,Jh(h2));N|=b}return yo(l,N,p,y,P)}),HP=Xt(function(l,p,y){var N=v|w;if(y.length){var P=vu(y,Jh(HP));N|=b}return yo(p,N,l,y,P)});function KP(l,p,y){p=y?r:p;var N=yo(l,A,r,r,r,r,r,p);return N.placeholder=KP.placeholder,N}o(KP,"curry");function $P(l,p,y){p=y?r:p;var N=yo(l,T,r,r,r,r,r,p);return N.placeholder=$P.placeholder,N}o($P,"curryRight");function GP(l,p,y){var N,P,M,J,Q,ce,Ne=0,Be=!1,Le=!1,Qe=!0;if(typeof l!="function")throw new gi(s);p=Si(p)||0,$r(y)&&(Be=!!y.leading,Le="maxWait"in y,M=Le?wn(Si(y.maxWait)||0,p):M,Qe="trailing"in y?!!y.trailing:Qe);function pt(an){var Yi=N,Eo=P;return N=P=r,Ne=an,J=l.apply(Eo,Yi),J}o(pt,"invokeFunc");function At(an){return Ne=an,Q=q0(zt,p),Be?pt(an):J}o(At,"leadingEdge");function Kt(an){var Yi=an-ce,Eo=an-Ne,fO=p-Yi;return Le?ts(fO,M-Eo):fO}o(Kt,"remainingWait");function Ct(an){var Yi=an-ce,Eo=an-Ne;return ce===r||Yi>=p||Yi<0||Le&&Eo>=M}o(Ct,"shouldInvoke");function zt(){var an=$x();if(Ct(an))return ir(an);Q=q0(zt,Kt(an))}o(zt,"timerExpired");function ir(an){return Q=r,Qe&&N?pt(an):(N=P=r,J)}o(ir,"trailingEdge");function Zs(){Q!==r&&rP(Q),Ne=0,N=ce=P=Q=r}o(Zs,"cancel");function ms(){return Q===r?J:ir($x())}o(ms,"flush");function ei(){var an=$x(),Yi=Ct(an);if(N=arguments,P=this,ce=an,Yi){if(Q===r)return At(ce);if(Le)return rP(Q),Q=q0(zt,p),pt(ce)}return Q===r&&(Q=q0(zt,p)),J}return o(ei,"debounced"),ei.cancel=Zs,ei.flush=ms,ei}o(GP,"debounce");var z$=Xt(function(l,p){return kR(l,1,p)}),J$=Xt(function(l,p,y){return kR(l,Si(p)||0,y)});function Y$(l){return yo(l,F)}o(Y$,"flip");function Gx(l,p){if(typeof l!="function"||p!=null&&typeof p!="function")throw new gi(s);var y=o(function(){var N=arguments,P=p?p.apply(this,N):N[0],M=y.cache;if(M.has(P))return M.get(P);var J=l.apply(this,N);return y.cache=M.set(P,J)||M,J},"memoized");return y.cache=new(Gx.Cache||go),y}o(Gx,"memoize"),Gx.Cache=go;function Xx(l){if(typeof l!="function")throw new gi(s);return function(){var p=arguments;switch(p.length){case 0:return!l.call(this);case 1:return!l.call(this,p[0]);case 2:return!l.call(this,p[0],p[1]);case 3:return!l.call(this,p[0],p[1],p[2])}return!l.apply(this,p)}}o(Xx,"negate");function Q$(l){return qP(2,l)}o(Q$,"once");var Z$=jH(function(l,p){p=p.length==1&&Lt(p[0])?qr(p[0],Js(St())):qr(Mn(p,1),Js(St()));var y=p.length;return Xt(function(N){for(var P=-1,M=ts(N.length,y);++P<M;)N[P]=p[P].call(this,N[P]);return zs(l,this,N)})}),p2=Xt(function(l,p){var y=vu(p,Jh(p2));return yo(l,b,r,p,y)}),XP=Xt(function(l,p){var y=vu(p,Jh(XP));return yo(l,E,r,p,y)}),eG=xo(function(l,p){return yo(l,_,r,r,r,p)});function tG(l,p){if(typeof l!="function")throw new gi(s);return p=p===r?p:Mt(p),Xt(l,p)}o(tG,"rest");function rG(l,p){if(typeof l!="function")throw new gi(s);return p=p==null?0:wn(Mt(p),0),Xt(function(y){var N=y[p],P=Eu(y,0,p);return N&&gu(P,N),zs(l,this,P)})}o(rG,"spread");function nG(l,p,y){var N=!0,P=!0;if(typeof l!="function")throw new gi(s);return $r(y)&&(N="leading"in y?!!y.leading:N,P="trailing"in y?!!y.trailing:P),GP(l,p,{leading:N,maxWait:p,trailing:P})}o(nG,"throttle");function sG(l){return FP(l,1)}o(sG,"unary");function iG(l,p){return p2(YC(p),l)}o(iG,"wrap");function aG(){if(!arguments.length)return[];var l=arguments[0];return Lt(l)?l:[l]}o(aG,"castArray");function oG(l){return yi(l,m)}o(oG,"clone");function uG(l,p){return p=typeof p=="function"?p:r,yi(l,m,p)}o(uG,"cloneWith");function cG(l){return yi(l,f|m)}o(cG,"cloneDeep");function lG(l,p){return p=typeof p=="function"?p:r,yi(l,f|m,p)}o(lG,"cloneDeepWith");function fG(l,p){return p==null||OR(l,p,Nn(p))}o(fG,"conformsTo");function Ji(l,p){return l===p||l!==l&&p!==p}o(Ji,"eq");var hG=jx(jC),pG=jx(function(l,p){return l>=p}),Tl=MR((function(){return arguments})())?MR:function(l){return Yr(l)&&Sr.call(l,"callee")&&!NR.call(l,"callee")},Lt=ye.isArray,dG=oR?Js(oR):bH;function Cs(l){return l!=null&&Wx(l.length)&&!So(l)}o(Cs,"isArrayLike");function sn(l){return Yr(l)&&Cs(l)}o(sn,"isArrayLikeObject");function mG(l){return l===!0||l===!1||Yr(l)&&ps(l)==O}o(mG,"isBoolean");var Au=_7||A2,gG=uR?Js(uR):EH;function vG(l){return Yr(l)&&l.nodeType===1&&!H0(l)}o(vG,"isElement");function yG(l){if(l==null)return!0;if(Cs(l)&&(Lt(l)||typeof l=="string"||typeof l.splice=="function"||Au(l)||Yh(l)||Tl(l)))return!l.length;var p=rs(l);if(p==Ce||p==Fr)return!l.size;if(F0(l))return!qC(l).length;for(var y in l)if(Sr.call(l,y))return!1;return!0}o(yG,"isEmpty");function xG(l,p){return U0(l,p)}o(xG,"isEqual");function wG(l,p,y){y=typeof y=="function"?y:r;var N=y?y(l,p):r;return N===r?U0(l,p,r,y):!!N}o(wG,"isEqualWith");function d2(l){if(!Yr(l))return!1;var p=ps(l);return p==z||p==se||typeof l.message=="string"&&typeof l.name=="string"&&!H0(l)}o(d2,"isError");function SG(l){return typeof l=="number"&&IR(l)}o(SG,"isFinite");function So(l){if(!$r(l))return!1;var p=ps(l);return p==Ge||p==Re||p==lt||p==Xs}o(So,"isFunction");function WP(l){return typeof l=="number"&&l==Mt(l)}o(WP,"isInteger");function Wx(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=ee}o(Wx,"isLength");function $r(l){var p=typeof l;return l!=null&&(p=="object"||p=="function")}o($r,"isObject");function Yr(l){return l!=null&&typeof l=="object"}o(Yr,"isObjectLike");var zP=cR?Js(cR):CH;function bG(l,p){return l===p||FC(l,p,s2(p))}o(bG,"isMatch");function EG(l,p,y){return y=typeof y=="function"?y:r,FC(l,p,s2(p),y)}o(EG,"isMatchWith");function AG(l){return JP(l)&&l!=+l}o(AG,"isNaN");function CG(l){if(uK(l))throw new Pt(n);return FR(l)}o(CG,"isNative");function NG(l){return l===null}o(NG,"isNull");function TG(l){return l==null}o(TG,"isNil");function JP(l){return typeof l=="number"||Yr(l)&&ps(l)==ft}o(JP,"isNumber");function H0(l){if(!Yr(l)||ps(l)!=Me)return!1;var p=Sx(l);if(p===null)return!0;var y=Sr.call(p,"constructor")&&p.constructor;return typeof y=="function"&&y instanceof y&&vx.call(y)==E7}o(H0,"isPlainObject");var m2=lR?Js(lR):NH;function IG(l){return WP(l)&&l>=-ee&&l<=ee}o(IG,"isSafeInteger");var YP=fR?Js(fR):TH;function zx(l){return typeof l=="string"||!Lt(l)&&Yr(l)&&ps(l)==hn}o(zx,"isString");function Qs(l){return typeof l=="symbol"||Yr(l)&&ps(l)==Zn}o(Qs,"isSymbol");var Yh=hR?Js(hR):IH;function _G(l){return l===r}o(_G,"isUndefined");function BG(l){return Yr(l)&&rs(l)==fs}o(BG,"isWeakMap");function DG(l){return Yr(l)&&ps(l)==dt}o(DG,"isWeakSet");var RG=jx(HC),PG=jx(function(l,p){return l<=p});function QP(l){if(!l)return[];if(Cs(l))return zx(l)?Wi(l):As(l);if(B0&&l[B0])return f7(l[B0]());var p=rs(l),y=p==Ce?BC:p==Fr?dx:Qh;return y(l)}o(QP,"toArray");function bo(l){if(!l)return l===0?l:0;if(l=Si(l),l===ue||l===-ue){var p=l<0?-1:1;return p*he}return l===l?l:0}o(bo,"toFinite");function Mt(l){var p=bo(l),y=p%1;return p===p?y?p-y:p:0}o(Mt,"toInteger");function ZP(l){return l?El(Mt(l),0,Ke):0}o(ZP,"toLength");function Si(l){if(typeof l=="number")return l;if(Qs(l))return we;if($r(l)){var p=typeof l.valueOf=="function"?l.valueOf():l;l=$r(p)?p+"":p}if(typeof l!="string")return l===0?l:+l;l=yR(l);var y=dq.test(l);return y||gq.test(l)?Wq(l.slice(2),y?2:8):dC.test(l)?we:+l}o(Si,"toNumber");function eO(l){return Aa(l,Ns(l))}o(eO,"toPlainObject");function OG(l){return l?El(Mt(l),-ee,ee):l===0?l:0}o(OG,"toSafeInteger");function yr(l){return l==null?"":Ys(l)}o(yr,"toString");var kG=Wh(function(l,p){if(F0(p)||Cs(p)){Aa(p,Nn(p),l);return}for(var y in p)Sr.call(p,y)&&k0(l,y,p[y])}),tO=Wh(function(l,p){Aa(p,Ns(p),l)}),Jx=Wh(function(l,p,y,N){Aa(p,Ns(p),l,N)}),LG=Wh(function(l,p,y,N){Aa(p,Nn(p),l,N)}),VG=xo(LC);function UG(l,p){var y=Xh(l);return p==null?y:PR(y,p)}o(UG,"create");var jG=Xt(function(l,p){l=Nr(l);var y=-1,N=p.length,P=N>2?p[2]:r;for(P&&ds(p[0],p[1],P)&&(N=1);++y<N;)for(var M=p[y],J=Ns(M),Q=-1,ce=J.length;++Q<ce;){var Ne=J[Q],Be=l[Ne];(Be===r||Ji(Be,Kh[Ne])&&!Sr.call(l,Ne))&&(l[Ne]=M[Ne])}return l}),MG=Xt(function(l){return l.push(r,yP),zs(rO,r,l)});function FG(l,p){return dR(l,St(p,3),Ea)}o(FG,"findKey");function qG(l,p){return dR(l,St(p,3),UC)}o(qG,"findLastKey");function HG(l,p){return l==null?l:VC(l,St(p,3),Ns)}o(HG,"forIn");function KG(l,p){return l==null?l:UR(l,St(p,3),Ns)}o(KG,"forInRight");function $G(l,p){return l&&Ea(l,St(p,3))}o($G,"forOwn");function GG(l,p){return l&&UC(l,St(p,3))}o(GG,"forOwnRight");function XG(l){return l==null?[]:Dx(l,Nn(l))}o(XG,"functions");function WG(l){return l==null?[]:Dx(l,Ns(l))}o(WG,"functionsIn");function g2(l,p,y){var N=l==null?r:Al(l,p);return N===r?y:N}o(g2,"get");function zG(l,p){return l!=null&&SP(l,p,yH)}o(zG,"has");function v2(l,p){return l!=null&&SP(l,p,xH)}o(v2,"hasIn");var JG=pP(function(l,p,y){p!=null&&typeof p.toString!="function"&&(p=yx.call(p)),l[p]=y},x2(Ts)),YG=pP(function(l,p,y){p!=null&&typeof p.toString!="function"&&(p=yx.call(p)),Sr.call(l,p)?l[p].push(y):l[p]=[y]},St),QG=Xt(V0);function Nn(l){return Cs(l)?DR(l):qC(l)}o(Nn,"keys");function Ns(l){return Cs(l)?DR(l,!0):_H(l)}o(Ns,"keysIn");function ZG(l,p){var y={};return p=St(p,3),Ea(l,function(N,P,M){vo(y,p(N,P,M),N)}),y}o(ZG,"mapKeys");function eX(l,p){var y={};return p=St(p,3),Ea(l,function(N,P,M){vo(y,P,p(N,P,M))}),y}o(eX,"mapValues");var tX=Wh(function(l,p,y){Rx(l,p,y)}),rO=Wh(function(l,p,y,N){Rx(l,p,y,N)}),rX=xo(function(l,p){var y={};if(l==null)return y;var N=!1;p=qr(p,function(M){return M=bu(M,l),N||(N=M.length>1),M}),Aa(l,r2(l),y),N&&(y=yi(y,f|h|m,JH));for(var P=p.length;P--;)WC(y,p[P]);return y});function nX(l,p){return nO(l,Xx(St(p)))}o(nX,"omitBy");var sX=xo(function(l,p){return l==null?{}:DH(l,p)});function nO(l,p){if(l==null)return{};var y=qr(r2(l),function(N){return[N]});return p=St(p),WR(l,y,function(N,P){return p(N,P[0])})}o(nO,"pickBy");function iX(l,p,y){p=bu(p,l);var N=-1,P=p.length;for(P||(P=1,l=r);++N<P;){var M=l==null?r:l[Ca(p[N])];M===r&&(N=P,M=y),l=So(M)?M.call(l):M}return l}o(iX,"result");function aX(l,p,y){return l==null?l:j0(l,p,y)}o(aX,"set");function oX(l,p,y,N){return N=typeof N=="function"?N:r,l==null?l:j0(l,p,y,N)}o(oX,"setWith");var sO=gP(Nn),iO=gP(Ns);function uX(l,p,y){var N=Lt(l),P=N||Au(l)||Yh(l);if(p=St(p,4),y==null){var M=l&&l.constructor;P?y=N?new M:[]:$r(l)?y=So(M)?Xh(Sx(l)):{}:y={}}return(P?mi:Ea)(l,function(J,Q,ce){return p(y,J,Q,ce)}),y}o(uX,"transform");function cX(l,p){return l==null?!0:WC(l,p)}o(cX,"unset");function lX(l,p,y){return l==null?l:ZR(l,p,YC(y))}o(lX,"update");function fX(l,p,y,N){return N=typeof N=="function"?N:r,l==null?l:ZR(l,p,YC(y),N)}o(fX,"updateWith");function Qh(l){return l==null?[]:_C(l,Nn(l))}o(Qh,"values");function hX(l){return l==null?[]:_C(l,Ns(l))}o(hX,"valuesIn");function pX(l,p,y){return y===r&&(y=p,p=r),y!==r&&(y=Si(y),y=y===y?y:0),p!==r&&(p=Si(p),p=p===p?p:0),El(Si(l),p,y)}o(pX,"clamp");function dX(l,p,y){return p=bo(p),y===r?(y=p,p=0):y=bo(y),l=Si(l),wH(l,p,y)}o(dX,"inRange");function mX(l,p,y){if(y&&typeof y!="boolean"&&ds(l,p,y)&&(p=y=r),y===r&&(typeof p=="boolean"?(y=p,p=r):typeof l=="boolean"&&(y=l,l=r)),l===r&&p===r?(l=0,p=1):(l=bo(l),p===r?(p=l,l=0):p=bo(p)),l>p){var N=l;l=p,p=N}if(y||l%1||p%1){var P=_R();return ts(l+P*(p-l+Xq("1e-"+((P+"").length-1))),p)}return $C(l,p)}o(mX,"random");var gX=zh(function(l,p,y){return p=p.toLowerCase(),l+(y?aO(p):p)});function aO(l){return y2(yr(l).toLowerCase())}o(aO,"capitalize");function oO(l){return l=yr(l),l&&l.replace(yq,a7).replace(Vq,"")}o(oO,"deburr");function vX(l,p,y){l=yr(l),p=Ys(p);var N=l.length;y=y===r?N:El(Mt(y),0,N);var P=y;return y-=p.length,y>=0&&l.slice(y,P)==p}o(vX,"endsWith");function yX(l){return l=yr(l),l&&st.test(l)?l.replace(ae,o7):l}o(yX,"escape");function xX(l){return l=yr(l),l&&ba.test(l)?l.replace(cr,"\\$&"):l}o(xX,"escapeRegExp");var wX=zh(function(l,p,y){return l+(y?"-":"")+p.toLowerCase()}),SX=zh(function(l,p,y){return l+(y?" ":"")+p.toLowerCase()}),bX=lP("toLowerCase");function EX(l,p,y){l=yr(l),p=Mt(p);var N=p?Hh(l):0;if(!p||N>=p)return l;var P=(p-N)/2;return Ux(Cx(P),y)+l+Ux(Ax(P),y)}o(EX,"pad");function AX(l,p,y){l=yr(l),p=Mt(p);var N=p?Hh(l):0;return p&&N<p?l+Ux(p-N,y):l}o(AX,"padEnd");function CX(l,p,y){l=yr(l),p=Mt(p);var N=p?Hh(l):0;return p&&N<p?Ux(p-N,y)+l:l}o(CX,"padStart");function NX(l,p,y){return y||p==null?p=0:p&&(p=+p),P7(yr(l).replace(I0,""),p||0)}o(NX,"parseInt1");function TX(l,p,y){return(y?ds(l,p,y):p===r)?p=1:p=Mt(p),GC(yr(l),p)}o(TX,"repeat");function IX(){var l=arguments,p=yr(l[0]);return l.length<3?p:p.replace(l[1],l[2])}o(IX,"replace");var _X=zh(function(l,p,y){return l+(y?"_":"")+p.toLowerCase()});function BX(l,p,y){return y&&typeof y!="number"&&ds(l,p,y)&&(p=y=r),y=y===r?Ke:y>>>0,y?(l=yr(l),l&&(typeof p=="string"||p!=null&&!m2(p))&&(p=Ys(p),!p&&qh(l))?Eu(Wi(l),0,y):l.split(p,y)):[]}o(BX,"split");var DX=zh(function(l,p,y){return l+(y?" ":"")+y2(p)});function RX(l,p,y){return l=yr(l),y=y==null?0:El(Mt(y),0,l.length),p=Ys(p),l.slice(y,y+p.length)==p}o(RX,"startsWith");function PX(l,p,y){var N=j.templateSettings;y&&ds(l,p,y)&&(p=r),l=yr(l),p=Jx({},p,N,vP);var P=Jx({},p.imports,N.imports,vP),M=Nn(P),J=_C(P,M),Q,ce,Ne=0,Be=p.interpolate||cx,Le="__p += '",Qe=DC((p.escape||cx).source+"|"+Be.source+"|"+(Be===tt?es:cx).source+"|"+(p.evaluate||cx).source+"|$","g"),pt="//# sourceURL="+(Sr.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++qq+"]")+`
29
+ `;l.replace(Qe,function(Ct,zt,ir,Zs,ms,ei){return ir||(ir=Zs),Le+=l.slice(Ne,ei).replace(xq,u7),zt&&(Q=!0,Le+=`' +
30
+ __e(`+zt+`) +
31
+ '`),ms&&(ce=!0,Le+=`';
32
+ `+ms+`;
33
+ __p += '`),ir&&(Le+=`' +
34
+ ((__t = (`+ir+`)) == null ? '' : __t) +
35
+ '`),Ne=ei+Ct.length,Ct}),Le+=`';
36
+ `;var At=Sr.call(p,"variable")&&p.variable;if(!At)Le=`with (obj) {
37
+ `+Le+`
38
+ }
39
+ `;else if(qe.test(At))throw new Pt(i);Le=(ce?Le.replace(d,""):Le).replace(I,"$1").replace($,"$1;"),Le="function("+(At||"obj")+`) {
40
+ `+(At?"":`obj || (obj = {});
41
+ `)+"var __t, __p = ''"+(Q?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join;
42
+ function print() { __p += __j.call(arguments, '') }
43
+ `:`;
44
+ `)+Le+`return __p
45
+ }`;var Kt=cO(function(){return vr(M,pt+"return "+Le).apply(r,J)});if(Kt.source=Le,d2(Kt))throw Kt;return Kt}o(PX,"template");function OX(l){return yr(l).toLowerCase()}o(OX,"toLower");function kX(l){return yr(l).toUpperCase()}o(kX,"toUpper");function LX(l,p,y){if(l=yr(l),l&&(y||p===r))return yR(l);if(!l||!(p=Ys(p)))return l;var N=Wi(l),P=Wi(p),M=xR(N,P),J=wR(N,P)+1;return Eu(N,M,J).join("")}o(LX,"trim");function VX(l,p,y){if(l=yr(l),l&&(y||p===r))return l.slice(0,bR(l)+1);if(!l||!(p=Ys(p)))return l;var N=Wi(l),P=wR(N,Wi(p))+1;return Eu(N,0,P).join("")}o(VX,"trimEnd");function UX(l,p,y){if(l=yr(l),l&&(y||p===r))return l.replace(I0,"");if(!l||!(p=Ys(p)))return l;var N=Wi(l),P=xR(N,Wi(p));return Eu(N,P).join("")}o(UX,"trimStart");function jX(l,p){var y=R,N=q;if($r(p)){var P="separator"in p?p.separator:P;y="length"in p?Mt(p.length):y,N="omission"in p?Ys(p.omission):N}l=yr(l);var M=l.length;if(qh(l)){var J=Wi(l);M=J.length}if(y>=M)return l;var Q=y-Hh(N);if(Q<1)return N;var ce=J?Eu(J,0,Q).join(""):l.slice(0,Q);if(P===r)return ce+N;if(J&&(Q+=ce.length-Q),m2(P)){if(l.slice(Q).search(P)){var Ne,Be=ce;for(P.global||(P=DC(P.source,yr(Xi.exec(P))+"g")),P.lastIndex=0;Ne=P.exec(Be);)var Le=Ne.index;ce=ce.slice(0,Le===r?Q:Le)}}else if(l.indexOf(Ys(P),Q)!=Q){var Qe=ce.lastIndexOf(P);Qe>-1&&(ce=ce.slice(0,Qe))}return ce+N}o(jX,"truncate");function MX(l){return l=yr(l),l&&G.test(l)?l.replace(re,m7):l}o(MX,"unescape");var FX=zh(function(l,p,y){return l+(y?" ":"")+p.toUpperCase()}),y2=lP("toUpperCase");function uO(l,p,y){return l=yr(l),p=y?r:p,p===r?l7(l)?y7(l):t7(l):l.match(p)||[]}o(uO,"words");var cO=Xt(function(l,p){try{return zs(l,r,p)}catch(y){return d2(y)?y:new Pt(y)}}),qX=xo(function(l,p){return mi(p,function(y){y=Ca(y),vo(l,y,h2(l[y],l))}),l});function HX(l){var p=l==null?0:l.length,y=St();return l=p?qr(l,function(N){if(typeof N[1]!="function")throw new gi(s);return[y(N[0]),N[1]]}):[],Xt(function(N){for(var P=-1;++P<p;){var M=l[P];if(zs(M[0],this,N))return zs(M[1],this,N)}})}o(HX,"cond");function KX(l){return mH(yi(l,f))}o(KX,"conforms");function x2(l){return function(){return l}}o(x2,"constant");function $X(l,p){return l==null||l!==l?p:l}o($X,"defaultTo");var GX=hP(),XX=hP(!0);function Ts(l){return l}o(Ts,"identity");function w2(l){return qR(typeof l=="function"?l:yi(l,f))}o(w2,"iteratee");function WX(l){return KR(yi(l,f))}o(WX,"matches");function zX(l,p){return $R(l,yi(p,f))}o(zX,"matchesProperty");var JX=Xt(function(l,p){return function(y){return V0(y,l,p)}}),YX=Xt(function(l,p){return function(y){return V0(l,y,p)}});function S2(l,p,y){var N=Nn(p),P=Dx(p,N);y==null&&!($r(p)&&(P.length||!N.length))&&(y=p,p=l,l=this,P=Dx(p,Nn(p)));var M=!($r(y)&&"chain"in y)||!!y.chain,J=So(l);return mi(P,function(Q){var ce=p[Q];l[Q]=ce,J&&(l.prototype[Q]=function(){var Ne=this.__chain__;if(M||Ne){var Be=l(this.__wrapped__),Le=Be.__actions__=As(this.__actions__);return Le.push({func:ce,args:arguments,thisArg:l}),Be.__chain__=Ne,Be}return ce.apply(l,gu([this.value()],arguments))})}),l}o(S2,"mixin");function QX(){return Cn._===this&&(Cn._=A7),this}o(QX,"noConflict");function b2(){}o(b2,"noop");function ZX(l){return l=Mt(l),Xt(function(p){return GR(p,l)})}o(ZX,"nthArg");var eW=ZC(qr),tW=ZC(pR),rW=ZC(AC);function lO(l){return a2(l)?CC(Ca(l)):RH(l)}o(lO,"property");function nW(l){return function(p){return l==null?r:Al(l,p)}}o(nW,"propertyOf");var sW=dP(),iW=dP(!0);function E2(){return[]}o(E2,"stubArray");function A2(){return!1}o(A2,"stubFalse");function aW(){return{}}o(aW,"stubObject");function oW(){return""}o(oW,"stubString");function uW(){return!0}o(uW,"stubTrue");function cW(l,p){if(l=Mt(l),l<1||l>ee)return[];var y=Ke,N=ts(l,Ke);p=St(p),l-=Ke;for(var P=IC(N,p);++y<l;)p(y);return P}o(cW,"times");function lW(l){return Lt(l)?qr(l,Ca):Qs(l)?[l]:As(BP(yr(l)))}o(lW,"toPath");function fW(l){var p=++b7;return yr(l)+p}o(fW,"uniqueId");var hW=Vx(function(l,p){return l+p},0),pW=e2("ceil"),dW=Vx(function(l,p){return l/p},1),mW=e2("floor");function gW(l){return l&&l.length?Bx(l,Ts,jC):r}o(gW,"max");function vW(l,p){return l&&l.length?Bx(l,St(p,2),jC):r}o(vW,"maxBy");function yW(l){return gR(l,Ts)}o(yW,"mean");function xW(l,p){return gR(l,St(p,2))}o(xW,"meanBy");function wW(l){return l&&l.length?Bx(l,Ts,HC):r}o(wW,"min");function SW(l,p){return l&&l.length?Bx(l,St(p,2),HC):r}o(SW,"minBy");var bW=Vx(function(l,p){return l*p},1),EW=e2("round"),AW=Vx(function(l,p){return l-p},0);function CW(l){return l&&l.length?TC(l,Ts):0}o(CW,"sum");function NW(l,p){return l&&l.length?TC(l,St(p,2)):0}return o(NW,"sumBy"),j.after=W$,j.ary=FP,j.assign=kG,j.assignIn=tO,j.assignInWith=Jx,j.assignWith=LG,j.at=VG,j.before=qP,j.bind=h2,j.bindAll=qX,j.bindKey=HP,j.castArray=aG,j.chain=UP,j.chunk=mK,j.compact=gK,j.concat=vK,j.cond=HX,j.conforms=KX,j.constant=x2,j.countBy=C$,j.create=UG,j.curry=KP,j.curryRight=$P,j.debounce=GP,j.defaults=jG,j.defaultsDeep=MG,j.defer=z$,j.delay=J$,j.difference=yK,j.differenceBy=xK,j.differenceWith=wK,j.drop=SK,j.dropRight=bK,j.dropRightWhile=EK,j.dropWhile=AK,j.fill=CK,j.filter=T$,j.flatMap=B$,j.flatMapDeep=D$,j.flatMapDepth=R$,j.flatten=OP,j.flattenDeep=NK,j.flattenDepth=TK,j.flip=Y$,j.flow=GX,j.flowRight=XX,j.fromPairs=IK,j.functions=XG,j.functionsIn=WG,j.groupBy=P$,j.initial=BK,j.intersection=DK,j.intersectionBy=RK,j.intersectionWith=PK,j.invert=JG,j.invertBy=YG,j.invokeMap=k$,j.iteratee=w2,j.keyBy=L$,j.keys=Nn,j.keysIn=Ns,j.map=Kx,j.mapKeys=ZG,j.mapValues=eX,j.matches=WX,j.matchesProperty=zX,j.memoize=Gx,j.merge=tX,j.mergeWith=rO,j.method=JX,j.methodOf=YX,j.mixin=S2,j.negate=Xx,j.nthArg=ZX,j.omit=rX,j.omitBy=nX,j.once=Q$,j.orderBy=V$,j.over=eW,j.overArgs=Z$,j.overEvery=tW,j.overSome=rW,j.partial=p2,j.partialRight=XP,j.partition=U$,j.pick=sX,j.pickBy=nO,j.property=lO,j.propertyOf=nW,j.pull=VK,j.pullAll=LP,j.pullAllBy=UK,j.pullAllWith=jK,j.pullAt=MK,j.range=sW,j.rangeRight=iW,j.rearg=eG,j.reject=F$,j.remove=FK,j.rest=tG,j.reverse=l2,j.sampleSize=H$,j.set=aX,j.setWith=oX,j.shuffle=K$,j.slice=qK,j.sortBy=X$,j.sortedUniq=zK,j.sortedUniqBy=JK,j.split=BX,j.spread=rG,j.tail=YK,j.take=QK,j.takeRight=ZK,j.takeRightWhile=e$,j.takeWhile=t$,j.tap=g$,j.throttle=nG,j.thru=Hx,j.toArray=QP,j.toPairs=sO,j.toPairsIn=iO,j.toPath=lW,j.toPlainObject=eO,j.transform=uX,j.unary=sG,j.union=r$,j.unionBy=n$,j.unionWith=s$,j.uniq=i$,j.uniqBy=a$,j.uniqWith=o$,j.unset=cX,j.unzip=f2,j.unzipWith=VP,j.update=lX,j.updateWith=fX,j.values=Qh,j.valuesIn=hX,j.without=u$,j.words=uO,j.wrap=iG,j.xor=c$,j.xorBy=l$,j.xorWith=f$,j.zip=h$,j.zipObject=p$,j.zipObjectDeep=d$,j.zipWith=m$,j.entries=sO,j.entriesIn=iO,j.extend=tO,j.extendWith=Jx,S2(j,j),j.add=hW,j.attempt=cO,j.camelCase=gX,j.capitalize=aO,j.ceil=pW,j.clamp=pX,j.clone=oG,j.cloneDeep=cG,j.cloneDeepWith=lG,j.cloneWith=uG,j.conformsTo=fG,j.deburr=oO,j.defaultTo=$X,j.divide=dW,j.endsWith=vX,j.eq=Ji,j.escape=yX,j.escapeRegExp=xX,j.every=N$,j.find=I$,j.findIndex=RP,j.findKey=FG,j.findLast=_$,j.findLastIndex=PP,j.findLastKey=qG,j.floor=mW,j.forEach=jP,j.forEachRight=MP,j.forIn=HG,j.forInRight=KG,j.forOwn=$G,j.forOwnRight=GG,j.get=g2,j.gt=hG,j.gte=pG,j.has=zG,j.hasIn=v2,j.head=kP,j.identity=Ts,j.includes=O$,j.indexOf=_K,j.inRange=dX,j.invoke=QG,j.isArguments=Tl,j.isArray=Lt,j.isArrayBuffer=dG,j.isArrayLike=Cs,j.isArrayLikeObject=sn,j.isBoolean=mG,j.isBuffer=Au,j.isDate=gG,j.isElement=vG,j.isEmpty=yG,j.isEqual=xG,j.isEqualWith=wG,j.isError=d2,j.isFinite=SG,j.isFunction=So,j.isInteger=WP,j.isLength=Wx,j.isMap=zP,j.isMatch=bG,j.isMatchWith=EG,j.isNaN=AG,j.isNative=CG,j.isNil=TG,j.isNull=NG,j.isNumber=JP,j.isObject=$r,j.isObjectLike=Yr,j.isPlainObject=H0,j.isRegExp=m2,j.isSafeInteger=IG,j.isSet=YP,j.isString=zx,j.isSymbol=Qs,j.isTypedArray=Yh,j.isUndefined=_G,j.isWeakMap=BG,j.isWeakSet=DG,j.join=OK,j.kebabCase=wX,j.last=wi,j.lastIndexOf=kK,j.lowerCase=SX,j.lowerFirst=bX,j.lt=RG,j.lte=PG,j.max=gW,j.maxBy=vW,j.mean=yW,j.meanBy=xW,j.min=wW,j.minBy=SW,j.stubArray=E2,j.stubFalse=A2,j.stubObject=aW,j.stubString=oW,j.stubTrue=uW,j.multiply=bW,j.nth=LK,j.noConflict=QX,j.noop=b2,j.now=$x,j.pad=EX,j.padEnd=AX,j.padStart=CX,j.parseInt=NX,j.random=mX,j.reduce=j$,j.reduceRight=M$,j.repeat=TX,j.replace=IX,j.result=iX,j.round=EW,j.runInContext=ie,j.sample=q$,j.size=$$,j.snakeCase=_X,j.some=G$,j.sortedIndex=HK,j.sortedIndexBy=KK,j.sortedIndexOf=$K,j.sortedLastIndex=GK,j.sortedLastIndexBy=XK,j.sortedLastIndexOf=WK,j.startCase=DX,j.startsWith=RX,j.subtract=AW,j.sum=CW,j.sumBy=NW,j.template=PX,j.times=cW,j.toFinite=bo,j.toInteger=Mt,j.toLength=ZP,j.toLower=OX,j.toNumber=Si,j.toSafeInteger=OG,j.toString=yr,j.toUpper=kX,j.trim=LX,j.trimEnd=VX,j.trimStart=UX,j.truncate=jX,j.unescape=MX,j.uniqueId=fW,j.upperCase=FX,j.upperFirst=y2,j.each=jP,j.eachRight=MP,j.first=kP,S2(j,(function(){var l={};return Ea(j,function(p,y){Sr.call(j.prototype,y)||(l[y]=p)}),l})(),{chain:!1}),j.VERSION=e,mi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){j[l].placeholder=j}),mi(["drop","take"],function(l,p){tr.prototype[l]=function(y){y=y===r?1:wn(Mt(y),0);var N=this.__filtered__&&!p?new tr(this):this.clone();return N.__filtered__?N.__takeCount__=ts(y,N.__takeCount__):N.__views__.push({size:ts(y,Ke),type:l+(N.__dir__<0?"Right":"")}),N},tr.prototype[l+"Right"]=function(y){return this.reverse()[l](y).reverse()}}),mi(["filter","map","takeWhile"],function(l,p){var y=p+1,N=y==X||y==le;tr.prototype[l]=function(P){var M=this.clone();return M.__iteratees__.push({iteratee:St(P,3),type:y}),M.__filtered__=M.__filtered__||N,M}}),mi(["head","last"],function(l,p){var y="take"+(p?"Right":"");tr.prototype[l]=function(){return this[y](1).value()[0]}}),mi(["initial","tail"],function(l,p){var y="drop"+(p?"":"Right");tr.prototype[l]=function(){return this.__filtered__?new tr(this):this[y](1)}}),tr.prototype.compact=function(){return this.filter(Ts)},tr.prototype.find=function(l){return this.filter(l).head()},tr.prototype.findLast=function(l){return this.reverse().find(l)},tr.prototype.invokeMap=Xt(function(l,p){return typeof l=="function"?new tr(this):this.map(function(y){return V0(y,l,p)})}),tr.prototype.reject=function(l){return this.filter(Xx(St(l)))},tr.prototype.slice=function(l,p){l=Mt(l);var y=this;return y.__filtered__&&(l>0||p<0)?new tr(y):(l<0?y=y.takeRight(-l):l&&(y=y.drop(l)),p!==r&&(p=Mt(p),y=p<0?y.dropRight(-p):y.take(p-l)),y)},tr.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},tr.prototype.toArray=function(){return this.take(Ke)},Ea(tr.prototype,function(l,p){var y=/^(?:filter|find|map|reject)|While$/.test(p),N=/^(?:head|last)$/.test(p),P=j[N?"take"+(p=="last"?"Right":""):p],M=N||/^find/.test(p);P&&(j.prototype[p]=function(){var J=this.__wrapped__,Q=N?[1]:arguments,ce=J instanceof tr,Ne=Q[0],Be=ce||Lt(J),Le=o(function(zt){var ir=P.apply(j,gu([zt],Q));return N&&Qe?ir[0]:ir},"interceptor");Be&&y&&typeof Ne=="function"&&Ne.length!=1&&(ce=Be=!1);var Qe=this.__chain__,pt=!!this.__actions__.length,At=M&&!Qe,Kt=ce&&!pt;if(!M&&Be){J=Kt?J:new tr(this);var Ct=l.apply(J,Q);return Ct.__actions__.push({func:Hx,args:[Le],thisArg:r}),new vi(Ct,Qe)}return At&&Kt?l.apply(this,Q):(Ct=this.thru(Le),At?N?Ct.value()[0]:Ct.value():Ct)})}),mi(["pop","push","shift","sort","splice","unshift"],function(l){var p=mx[l],y=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",N=/^(?:pop|shift)$/.test(l);j.prototype[l]=function(){var P=arguments;if(N&&!this.__chain__){var M=this.value();return p.apply(Lt(M)?M:[],P)}return this[y](function(J){return p.apply(Lt(J)?J:[],P)})}}),Ea(tr.prototype,function(l,p){var y=j[p];if(y){var N=y.name+"";Sr.call(Gh,N)||(Gh[N]=[]),Gh[N].push({name:p,func:y})}}),Gh[Lx(r,w).name]=[{name:"wrapper",func:r}],tr.prototype.clone=M7,tr.prototype.reverse=F7,tr.prototype.value=q7,j.prototype.at=v$,j.prototype.chain=y$,j.prototype.commit=x$,j.prototype.next=w$,j.prototype.plant=b$,j.prototype.reverse=E$,j.prototype.toJSON=j.prototype.valueOf=j.prototype.value=A$,j.prototype.first=j.prototype.head,B0&&(j.prototype[B0]=S$),j},"runInContext"),yu=x7();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Cn._=yu,define(function(){return yu})):xl?((xl.exports=yu)._=yu,wC._=yu):Cn._=yu}).call(Ep)});var p4=Z((fme,h4)=>{"use strict";var f4=Xe("stream").Stream,PZ=Xe("util");h4.exports=ra;function ra(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(ra,"DelayedStream");PZ.inherits(ra,f4);ra.create=function(r,e){var t=new this;e=e||{};for(var n in e)t[n]=e[n];t.source=r;var s=r.emit;return r.emit=function(){return t._handleEmit(arguments),s.apply(r,arguments)},r.on("error",function(){}),t.pauseStream&&r.pause(),t};Object.defineProperty(ra.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});ra.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};ra.prototype.resume=function(){this._released||this.release(),this.source.resume()};ra.prototype.pause=function(){this.source.pause()};ra.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach((function(r){this.emit.apply(this,r)}).bind(this)),this._bufferedEvents=[]};ra.prototype.pipe=function(){var r=f4.prototype.pipe.apply(this,arguments);return this.resume(),r};ra.prototype._handleEmit=function(r){if(this._released){this.emit.apply(this,r);return}r[0]==="data"&&(this.dataSize+=r[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(r)};ra.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var r="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(r))}}});var v4=Z((pme,g4)=>{"use strict";var OZ=Xe("util"),m4=Xe("stream").Stream,d4=p4();g4.exports=Zr;function Zr(){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}o(Zr,"CombinedStream");OZ.inherits(Zr,m4);Zr.create=function(r){var e=new this;r=r||{};for(var t in r)e[t]=r[t];return e};Zr.isStreamLike=function(r){return typeof r!="function"&&typeof r!="string"&&typeof r!="boolean"&&typeof r!="number"&&!Buffer.isBuffer(r)};Zr.prototype.append=function(r){var e=Zr.isStreamLike(r);if(e){if(!(r instanceof d4)){var t=d4.create(r,{maxDataSize:1/0,pauseStream:this.pauseStreams});r.on("data",this._checkDataSize.bind(this)),r=t}this._handleErrors(r),this.pauseStreams&&r.pause()}return this._streams.push(r),this};Zr.prototype.pipe=function(r,e){return m4.prototype.pipe.call(this,r,e),this.resume(),r};Zr.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}};Zr.prototype._realGetNext=function(){var r=this._streams.shift();if(typeof r>"u"){this.end();return}if(typeof r!="function"){this._pipeNext(r);return}var e=r;e((function(t){var n=Zr.isStreamLike(t);n&&(t.on("data",this._checkDataSize.bind(this)),this._handleErrors(t)),this._pipeNext(t)}).bind(this))};Zr.prototype._pipeNext=function(r){this._currentStream=r;var e=Zr.isStreamLike(r);if(e){r.on("end",this._getNext.bind(this)),r.pipe(this,{end:!1});return}var t=r;this.write(t),this._getNext()};Zr.prototype._handleErrors=function(r){var e=this;r.on("error",function(t){e._emitError(t)})};Zr.prototype.write=function(r){this.emit("data",r)};Zr.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};Zr.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")};Zr.prototype.end=function(){this._reset(),this.emit("end")};Zr.prototype.destroy=function(){this._reset(),this.emit("close")};Zr.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};Zr.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var r="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(r))}};Zr.prototype._updateDataSize=function(){this.dataSize=0;var r=this;this._streams.forEach(function(e){e.dataSize&&(r.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};Zr.prototype._emitError=function(r){this._reset(),this.emit("error",r)}});var y4=Z((mme,kZ)=>{kZ.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 w4=Z((gme,x4)=>{"use strict";x4.exports=y4()});var E4=Z(Rs=>{"use strict";var $w=w4(),LZ=Xe("path").extname,S4=/^\s*([^;\s]*)(?:;|\s|$)/,VZ=/^text\//i;Rs.charset=b4;Rs.charsets={lookup:b4};Rs.contentType=UZ;Rs.extension=jZ;Rs.extensions=Object.create(null);Rs.lookup=MZ;Rs.types=Object.create(null);FZ(Rs.extensions,Rs.types);function b4(r){if(!r||typeof r!="string")return!1;var e=S4.exec(r),t=e&&$w[e[1].toLowerCase()];return t&&t.charset?t.charset:e&&VZ.test(e[1])?"UTF-8":!1}o(b4,"charset");function UZ(r){if(!r||typeof r!="string")return!1;var e=r.indexOf("/")===-1?Rs.lookup(r):r;if(!e)return!1;if(e.indexOf("charset")===-1){var t=Rs.charset(e);t&&(e+="; charset="+t.toLowerCase())}return e}o(UZ,"contentType");function jZ(r){if(!r||typeof r!="string")return!1;var e=S4.exec(r),t=e&&Rs.extensions[e[1].toLowerCase()];return!t||!t.length?!1:t[0]}o(jZ,"extension");function MZ(r){if(!r||typeof r!="string")return!1;var e=LZ("x."+r).toLowerCase().substr(1);return e&&Rs.types[e]||!1}o(MZ,"lookup");function FZ(r,e){var t=["nginx","apache",void 0,"iana"];Object.keys($w).forEach(o(function(s){var i=$w[s],a=i.extensions;if(!(!a||!a.length)){r[s]=a;for(var u=0;u<a.length;u++){var c=a[u];if(e[c]){var f=t.indexOf($w[e[c]].source),h=t.indexOf(i.source);if(e[c]!=="application/octet-stream"&&(f>h||f===h&&e[c].substr(0,12)==="application/"))continue}e[c]=s}}},"forEachMimeType"))}o(FZ,"populateMaps")});var C4=Z((xme,A4)=>{"use strict";A4.exports=qZ;function qZ(r){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(r):setTimeout(r,0)}o(qZ,"defer")});var HN=Z((Sme,T4)=>{"use strict";var N4=C4();T4.exports=HZ;function HZ(r){var e=!1;return N4(function(){e=!0}),o(function(n,s){e?r(n,s):N4(o(function(){r(n,s)},"nextTick_callback"))},"async_callback")}o(HZ,"async")});var KN=Z((Eme,I4)=>{"use strict";I4.exports=KZ;function KZ(r){Object.keys(r.jobs).forEach($Z.bind(r)),r.jobs={}}o(KZ,"abort");function $Z(r){typeof this.jobs[r]=="function"&&this.jobs[r]()}o($Z,"clean")});var $N=Z((Cme,B4)=>{"use strict";var _4=HN(),GZ=KN();B4.exports=XZ;function XZ(r,e,t,n){var s=t.keyedList?t.keyedList[t.index]:t.index;t.jobs[s]=WZ(e,s,r[s],function(i,a){s in t.jobs&&(delete t.jobs[s],i?GZ(t):t.results[s]=a,n(i,t.results))})}o(XZ,"iterate");function WZ(r,e,t,n){var s;return r.length==2?s=r(t,_4(n)):s=r(t,e,_4(n)),s}o(WZ,"runJob")});var GN=Z((Tme,D4)=>{"use strict";D4.exports=zZ;function zZ(r,e){var t=!Array.isArray(r),n={index:0,keyedList:t||e?Object.keys(r):null,jobs:{},results:t?{}:[],size:t?Object.keys(r).length:r.length};return e&&n.keyedList.sort(t?e:function(s,i){return e(r[s],r[i])}),n}o(zZ,"state")});var XN=Z((_me,R4)=>{"use strict";var JZ=KN(),YZ=HN();R4.exports=QZ;function QZ(r){Object.keys(this.jobs).length&&(this.index=this.size,JZ(this),YZ(r)(null,this.results))}o(QZ,"terminator")});var O4=Z((Dme,P4)=>{"use strict";var ZZ=$N(),eee=GN(),tee=XN();P4.exports=ree;function ree(r,e,t){for(var n=eee(r);n.index<(n.keyedList||r).length;)ZZ(r,e,n,function(s,i){if(s){t(s,i);return}if(Object.keys(n.jobs).length===0){t(null,n.results);return}}),n.index++;return tee.bind(n,t)}o(ree,"parallel")});var WN=Z((Pme,Gw)=>{"use strict";var k4=$N(),nee=GN(),see=XN();Gw.exports=iee;Gw.exports.ascending=L4;Gw.exports.descending=aee;function iee(r,e,t,n){var s=nee(r,t);return k4(r,e,s,o(function i(a,u){if(a){n(a,u);return}if(s.index++,s.index<(s.keyedList||r).length){k4(r,e,s,i);return}n(null,s.results)},"iteratorHandler")),see.bind(s,n)}o(iee,"serialOrdered");function L4(r,e){return r<e?-1:r>e?1:0}o(L4,"ascending");function aee(r,e){return-1*L4(r,e)}o(aee,"descending")});var U4=Z((kme,V4)=>{"use strict";var oee=WN();V4.exports=uee;function uee(r,e,t){return oee(r,e,null,t)}o(uee,"serial")});var M4=Z((Vme,j4)=>{"use strict";j4.exports={parallel:O4(),serial:U4(),serialOrdered:WN()}});var zN=Z((Ume,F4)=>{"use strict";F4.exports=Object});var H4=Z((jme,q4)=>{"use strict";q4.exports=Error});var $4=Z((Mme,K4)=>{"use strict";K4.exports=EvalError});var X4=Z((Fme,G4)=>{"use strict";G4.exports=RangeError});var z4=Z((qme,W4)=>{"use strict";W4.exports=ReferenceError});var Y4=Z((Hme,J4)=>{"use strict";J4.exports=SyntaxError});var Xw=Z((Kme,Q4)=>{"use strict";Q4.exports=TypeError});var eL=Z(($me,Z4)=>{"use strict";Z4.exports=URIError});var rL=Z((Gme,tL)=>{"use strict";tL.exports=Math.abs});var sL=Z((Xme,nL)=>{"use strict";nL.exports=Math.floor});var aL=Z((Wme,iL)=>{"use strict";iL.exports=Math.max});var uL=Z((zme,oL)=>{"use strict";oL.exports=Math.min});var lL=Z((Jme,cL)=>{"use strict";cL.exports=Math.pow});var hL=Z((Yme,fL)=>{"use strict";fL.exports=Math.round});var dL=Z((Qme,pL)=>{"use strict";pL.exports=Number.isNaN||o(function(e){return e!==e},"isNaN")});var gL=Z((e0e,mL)=>{"use strict";var cee=dL();mL.exports=o(function(e){return cee(e)||e===0?e:e<0?-1:1},"sign")});var yL=Z((r0e,vL)=>{"use strict";vL.exports=Object.getOwnPropertyDescriptor});var JN=Z((n0e,xL)=>{"use strict";var Ww=yL();if(Ww)try{Ww([],"length")}catch{Ww=null}xL.exports=Ww});var SL=Z((s0e,wL)=>{"use strict";var zw=Object.defineProperty||!1;if(zw)try{zw({},"a",{value:1})}catch{zw=!1}wL.exports=zw});var YN=Z((i0e,bL)=>{"use strict";bL.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var s=42;e[t]=s;for(var i in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(e,t);if(u.value!==s||u.enumerable!==!0)return!1}return!0},"hasSymbols")});var CL=Z((o0e,AL)=>{"use strict";var EL=typeof Symbol<"u"&&Symbol,lee=YN();AL.exports=o(function(){return typeof EL!="function"||typeof Symbol!="function"||typeof EL("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:lee()},"hasNativeSymbols")});var QN=Z((c0e,NL)=>{"use strict";NL.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var ZN=Z((l0e,TL)=>{"use strict";var fee=zN();TL.exports=fee.getPrototypeOf||null});var BL=Z((f0e,_L)=>{"use strict";var hee="Function.prototype.bind called on incompatible ",pee=Object.prototype.toString,dee=Math.max,mee="[object Function]",IL=o(function(e,t){for(var n=[],s=0;s<e.length;s+=1)n[s]=e[s];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},"concatty"),gee=o(function(e,t){for(var n=[],s=t||0,i=0;s<e.length;s+=1,i+=1)n[i]=e[s];return n},"slicy"),vee=o(function(r,e){for(var t="",n=0;n<r.length;n+=1)t+=r[n],n+1<r.length&&(t+=e);return t},"joiny");_L.exports=o(function(e){var t=this;if(typeof t!="function"||pee.apply(t)!==mee)throw new TypeError(hee+t);for(var n=gee(arguments,1),s,i=o(function(){if(this instanceof s){var h=t.apply(this,IL(n,arguments));return Object(h)===h?h:this}return t.apply(e,IL(n,arguments))},"binder"),a=dee(0,t.length-n.length),u=[],c=0;c<a;c++)u[c]="$"+c;if(s=Function("binder","return function ("+vee(u,",")+"){ return binder.apply(this,arguments); }")(i),t.prototype){var f=o(function(){},"Empty");f.prototype=t.prototype,s.prototype=new f,f.prototype=null}return s},"bind")});var lg=Z((p0e,DL)=>{"use strict";var yee=BL();DL.exports=Function.prototype.bind||yee});var Jw=Z((d0e,RL)=>{"use strict";RL.exports=Function.prototype.call});var eT=Z((m0e,PL)=>{"use strict";PL.exports=Function.prototype.apply});var kL=Z((g0e,OL)=>{"use strict";OL.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var VL=Z((v0e,LL)=>{"use strict";var xee=lg(),wee=eT(),See=Jw(),bee=kL();LL.exports=bee||xee.call(See,wee)});var jL=Z((y0e,UL)=>{"use strict";var Eee=lg(),Aee=Xw(),Cee=Jw(),Nee=VL();UL.exports=o(function(e){if(e.length<1||typeof e[0]!="function")throw new Aee("a function is required");return Nee(Eee,Cee,e)},"callBindBasic")});var $L=Z((w0e,KL)=>{"use strict";var Tee=jL(),ML=JN(),qL;try{qL=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var tT=!!qL&&ML&&ML(Object.prototype,"__proto__"),HL=Object,FL=HL.getPrototypeOf;KL.exports=tT&&typeof tT.get=="function"?Tee([tT.get]):typeof FL=="function"?o(function(e){return FL(e==null?e:HL(e))},"getDunder"):!1});var JL=Z((b0e,zL)=>{"use strict";var GL=QN(),XL=ZN(),WL=$L();zL.exports=GL?o(function(e){return GL(e)},"getProto"):XL?o(function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return XL(e)},"getProto"):WL?o(function(e){return WL(e)},"getProto"):null});var Yw=Z((A0e,YL)=>{"use strict";var Iee=Function.prototype.call,_ee=Object.prototype.hasOwnProperty,Bee=lg();YL.exports=Bee.call(Iee,_ee)});var s8=Z((C0e,n8)=>{"use strict";var Zt,Dee=zN(),Ree=H4(),Pee=$4(),Oee=X4(),kee=z4(),Tp=Y4(),Np=Xw(),Lee=eL(),Vee=rL(),Uee=sL(),jee=aL(),Mee=uL(),Fee=lL(),qee=hL(),Hee=gL(),t8=Function,rT=o(function(r){try{return t8('"use strict"; return ('+r+").constructor;")()}catch{}},"getEvalledConstructor"),fg=JN(),Kee=SL(),nT=o(function(){throw new Np},"throwTypeError"),$ee=fg?(function(){try{return arguments.callee,nT}catch{try{return fg(arguments,"callee").get}catch{return nT}}})():nT,Ap=CL()(),Pn=JL(),Gee=ZN(),Xee=QN(),r8=eT(),hg=Jw(),Cp={},Wee=typeof Uint8Array>"u"||!Pn?Zt:Pn(Uint8Array),Ul={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Zt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Zt:ArrayBuffer,"%ArrayIteratorPrototype%":Ap&&Pn?Pn([][Symbol.iterator]()):Zt,"%AsyncFromSyncIteratorPrototype%":Zt,"%AsyncFunction%":Cp,"%AsyncGenerator%":Cp,"%AsyncGeneratorFunction%":Cp,"%AsyncIteratorPrototype%":Cp,"%Atomics%":typeof Atomics>"u"?Zt:Atomics,"%BigInt%":typeof BigInt>"u"?Zt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Zt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Zt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Zt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Ree,"%eval%":eval,"%EvalError%":Pee,"%Float16Array%":typeof Float16Array>"u"?Zt:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Zt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Zt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Zt:FinalizationRegistry,"%Function%":t8,"%GeneratorFunction%":Cp,"%Int8Array%":typeof Int8Array>"u"?Zt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Zt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Zt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ap&&Pn?Pn(Pn([][Symbol.iterator]())):Zt,"%JSON%":typeof JSON=="object"?JSON:Zt,"%Map%":typeof Map>"u"?Zt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ap||!Pn?Zt:Pn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Dee,"%Object.getOwnPropertyDescriptor%":fg,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Zt:Promise,"%Proxy%":typeof Proxy>"u"?Zt:Proxy,"%RangeError%":Oee,"%ReferenceError%":kee,"%Reflect%":typeof Reflect>"u"?Zt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Zt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ap||!Pn?Zt:Pn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Zt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ap&&Pn?Pn(""[Symbol.iterator]()):Zt,"%Symbol%":Ap?Symbol:Zt,"%SyntaxError%":Tp,"%ThrowTypeError%":$ee,"%TypedArray%":Wee,"%TypeError%":Np,"%Uint8Array%":typeof Uint8Array>"u"?Zt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Zt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Zt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Zt:Uint32Array,"%URIError%":Lee,"%WeakMap%":typeof WeakMap>"u"?Zt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Zt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Zt:WeakSet,"%Function.prototype.call%":hg,"%Function.prototype.apply%":r8,"%Object.defineProperty%":Kee,"%Object.getPrototypeOf%":Gee,"%Math.abs%":Vee,"%Math.floor%":Uee,"%Math.max%":jee,"%Math.min%":Mee,"%Math.pow%":Fee,"%Math.round%":qee,"%Math.sign%":Hee,"%Reflect.getPrototypeOf%":Xee};if(Pn)try{null.error}catch(r){QL=Pn(Pn(r)),Ul["%Error.prototype%"]=QL}var QL,zee=o(function r(e){var t;if(e==="%AsyncFunction%")t=rT("async function () {}");else if(e==="%GeneratorFunction%")t=rT("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=rT("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var s=r("%AsyncGenerator%");s&&Pn&&(t=Pn(s.prototype))}return Ul[e]=t,t},"doEval"),ZL={__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"]},pg=lg(),Qw=Yw(),Jee=pg.call(hg,Array.prototype.concat),Yee=pg.call(r8,Array.prototype.splice),e8=pg.call(hg,String.prototype.replace),Zw=pg.call(hg,String.prototype.slice),Qee=pg.call(hg,RegExp.prototype.exec),Zee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ete=/\\(\\)?/g,tte=o(function(e){var t=Zw(e,0,1),n=Zw(e,-1);if(t==="%"&&n!=="%")throw new Tp("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Tp("invalid intrinsic syntax, expected opening `%`");var s=[];return e8(e,Zee,function(i,a,u,c){s[s.length]=u?e8(c,ete,"$1"):a||i}),s},"stringToPath"),rte=o(function(e,t){var n=e,s;if(Qw(ZL,n)&&(s=ZL[n],n="%"+s[0]+"%"),Qw(Ul,n)){var i=Ul[n];if(i===Cp&&(i=zee(n)),typeof i>"u"&&!t)throw new Np("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:s,name:n,value:i}}throw new Tp("intrinsic "+e+" does not exist!")},"getBaseIntrinsic");n8.exports=o(function(e,t){if(typeof e!="string"||e.length===0)throw new Np("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Np('"allowMissing" argument must be a boolean');if(Qee(/^%?[^%]*%?$/,e)===null)throw new Tp("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=tte(e),s=n.length>0?n[0]:"",i=rte("%"+s+"%",t),a=i.name,u=i.value,c=!1,f=i.alias;f&&(s=f[0],Yee(n,Jee([0,1],f)));for(var h=1,m=!0;h<n.length;h+=1){var g=n[h],x=Zw(g,0,1),v=Zw(g,-1);if((x==='"'||x==="'"||x==="`"||v==='"'||v==="'"||v==="`")&&x!==v)throw new Tp("property names with quotes must have matching quotes");if((g==="constructor"||!m)&&(c=!0),s+="."+g,a="%"+s+"%",Qw(Ul,a))u=Ul[a];else if(u!=null){if(!(g in u)){if(!t)throw new Np("base intrinsic for "+e+" exists, but the property is not available.");return}if(fg&&h+1>=n.length){var w=fg(u,g);m=!!w,m&&"get"in w&&!("originalValue"in w.get)?u=w.get:u=u[g]}else m=Qw(u,g),u=u[g];m&&!c&&(Ul[a]=u)}}return u},"GetIntrinsic")});var a8=Z((T0e,i8)=>{"use strict";var nte=YN();i8.exports=o(function(){return nte()&&!!Symbol.toStringTag},"hasToStringTagShams")});var c8=Z((_0e,u8)=>{"use strict";var ste=s8(),o8=ste("%Object.defineProperty%",!0),ite=a8()(),ate=Yw(),ote=Xw(),eS=ite?Symbol.toStringTag:null;u8.exports=o(function(e,t){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,s=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof s<"u"&&typeof s!="boolean")throw new ote("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");eS&&(n||!ate(e,eS))&&(o8?o8(e,eS,{configurable:!s,enumerable:!1,value:t,writable:!1}):e[eS]=t)},"setToStringTag")});var f8=Z((D0e,l8)=>{"use strict";l8.exports=function(r,e){return Object.keys(e).forEach(function(t){r[t]=r[t]||e[t]}),r}});var p8=Z((R0e,h8)=>{"use strict";var oT=v4(),ute=Xe("util"),sT=Xe("path"),cte=Xe("http"),lte=Xe("https"),fte=Xe("url").parse,hte=Xe("fs"),pte=Xe("stream").Stream,dte=Xe("crypto"),iT=E4(),mte=M4(),gte=c8(),Hu=Yw(),aT=f8();function ur(r){if(!(this instanceof ur))return new ur(r);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],oT.call(this),r=r||{};for(var e in r)this[e]=r[e]}o(ur,"FormData");ute.inherits(ur,oT);ur.LINE_BREAK=`\r
46
+ `;ur.DEFAULT_CONTENT_TYPE="application/octet-stream";ur.prototype.append=function(r,e,t){t=t||{},typeof t=="string"&&(t={filename:t});var n=oT.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var s=this._multiPartHeader(r,e,t),i=this._multiPartFooter();n(s),n(e),n(i),this._trackLength(s,e,t)};ur.prototype._trackLength=function(r,e,t){var n=0;t.knownLength!=null?n+=Number(t.knownLength):Buffer.isBuffer(e)?n=e.length:typeof e=="string"&&(n=Buffer.byteLength(e)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(r)+ur.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&Hu(e,"httpVersion"))&&!(e instanceof pte))&&(t.knownLength||this._valuesToMeasure.push(e))};ur.prototype._lengthRetriever=function(r,e){Hu(r,"fd")?r.end!=null&&r.end!=1/0&&r.start!=null?e(null,r.end+1-(r.start?r.start:0)):hte.stat(r.path,function(t,n){if(t){e(t);return}var s=n.size-(r.start?r.start:0);e(null,s)}):Hu(r,"httpVersion")?e(null,Number(r.headers["content-length"])):Hu(r,"httpModule")?(r.on("response",function(t){r.pause(),e(null,Number(t.headers["content-length"]))}),r.resume()):e("Unknown stream")};ur.prototype._multiPartHeader=function(r,e,t){if(typeof t.header=="string")return t.header;var n=this._getContentDisposition(e,t),s=this._getContentType(e,t),i="",a={"Content-Disposition":["form-data",'name="'+r+'"'].concat(n||[]),"Content-Type":[].concat(s||[])};typeof t.header=="object"&&aT(a,t.header);var u;for(var c in a)if(Hu(a,c)){if(u=a[c],u==null)continue;Array.isArray(u)||(u=[u]),u.length&&(i+=c+": "+u.join("; ")+ur.LINE_BREAK)}return"--"+this.getBoundary()+ur.LINE_BREAK+i+ur.LINE_BREAK};ur.prototype._getContentDisposition=function(r,e){var t;if(typeof e.filepath=="string"?t=sT.normalize(e.filepath).replace(/\\/g,"/"):e.filename||r&&(r.name||r.path)?t=sT.basename(e.filename||r&&(r.name||r.path)):r&&r.readable&&Hu(r,"httpVersion")&&(t=sT.basename(r.client._httpMessage.path||"")),t)return'filename="'+t+'"'};ur.prototype._getContentType=function(r,e){var t=e.contentType;return!t&&r&&r.name&&(t=iT.lookup(r.name)),!t&&r&&r.path&&(t=iT.lookup(r.path)),!t&&r&&r.readable&&Hu(r,"httpVersion")&&(t=r.headers["content-type"]),!t&&(e.filepath||e.filename)&&(t=iT.lookup(e.filepath||e.filename)),!t&&r&&typeof r=="object"&&(t=ur.DEFAULT_CONTENT_TYPE),t};ur.prototype._multiPartFooter=function(){return(function(r){var e=ur.LINE_BREAK,t=this._streams.length===0;t&&(e+=this._lastBoundary()),r(e)}).bind(this)};ur.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+ur.LINE_BREAK};ur.prototype.getHeaders=function(r){var e,t={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in r)Hu(r,e)&&(t[e.toLowerCase()]=r[e]);return t};ur.prototype.setBoundary=function(r){if(typeof r!="string")throw new TypeError("FormData boundary must be a string");this._boundary=r};ur.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};ur.prototype.getBuffer=function(){for(var r=new Buffer.alloc(0),e=this.getBoundary(),t=0,n=this._streams.length;t<n;t++)typeof this._streams[t]!="function"&&(Buffer.isBuffer(this._streams[t])?r=Buffer.concat([r,this._streams[t]]):r=Buffer.concat([r,Buffer.from(this._streams[t])]),(typeof this._streams[t]!="string"||this._streams[t].substring(2,e.length+2)!==e)&&(r=Buffer.concat([r,Buffer.from(ur.LINE_BREAK)])));return Buffer.concat([r,Buffer.from(this._lastBoundary())])};ur.prototype._generateBoundary=function(){this._boundary="--------------------------"+dte.randomBytes(12).toString("hex")};ur.prototype.getLengthSync=function(){var r=this._overheadLength+this._valueLength;return this._streams.length&&(r+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),r};ur.prototype.hasKnownLength=function(){var r=!0;return this._valuesToMeasure.length&&(r=!1),r};ur.prototype.getLength=function(r){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(r.bind(this,null,e));return}mte.parallel(this._valuesToMeasure,this._lengthRetriever,function(t,n){if(t){r(t);return}n.forEach(function(s){e+=s}),r(null,e)})};ur.prototype.submit=function(r,e){var t,n,s={method:"post"};return typeof r=="string"?(r=fte(r),n=aT({port:r.port,path:r.pathname,host:r.hostname,protocol:r.protocol},s)):(n=aT(r,s),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(r.headers),n.protocol==="https:"?t=lte.request(n):t=cte.request(n),this.getLength((function(i,a){if(i&&i!=="Unknown stream"){this._error(i);return}if(a&&t.setHeader("Content-Length",a),this.pipe(t),e){var u,c=o(function(f,h){return t.removeListener("error",c),t.removeListener("response",u),e.call(this,f,h)},"callback");u=c.bind(this,null),t.on("error",c),t.on("response",u)}}).bind(this)),t};ur.prototype._error=function(r){this.error||(this.error=r,this.pause(),this.emit("error",r))};ur.prototype.toString=function(){return"[object FormData]"};gte(ur,"FormData");h8.exports=ur});var m8=Z(d8=>{"use strict";var vte=Xe("url").parse,yte={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},xte=String.prototype.endsWith||function(r){return r.length<=this.length&&this.indexOf(r,this.length-r.length)!==-1};function wte(r){var e=typeof r=="string"?vte(r):r||{},t=e.protocol,n=e.host,s=e.port;if(typeof n!="string"||!n||typeof t!="string"||(t=t.split(":",1)[0],n=n.replace(/:\d*$/,""),s=parseInt(s)||yte[t]||0,!Ste(n,s)))return"";var i=Ip("npm_config_"+t+"_proxy")||Ip(t+"_proxy")||Ip("npm_config_proxy")||Ip("all_proxy");return i&&i.indexOf("://")===-1&&(i=t+"://"+i),i}o(wte,"getProxyForUrl");function Ste(r,e){var t=(Ip("npm_config_no_proxy")||Ip("no_proxy")).toLowerCase();return t?t==="*"?!1:t.split(/[,\s]/).every(function(n){if(!n)return!0;var s=n.match(/^(.+):(\d+)$/),i=s?s[1]:n,a=s?parseInt(s[2]):0;return a&&a!==e?!0:/^[.*]/.test(i)?(i.charAt(0)==="*"&&(i=i.slice(1)),!xte.call(r,i)):r!==i}):!0}o(Ste,"shouldProxy");function Ip(r){return process.env[r.toLowerCase()]||process.env[r.toUpperCase()]||""}o(Ip,"getEnv");d8.getProxyForUrl=wte});var v8=Z((L0e,g8)=>{"use strict";var dg;g8.exports=function(){if(!dg){try{dg=bp()("follow-redirects")}catch{}typeof dg!="function"&&(dg=o(function(){},"debug"))}dg.apply(null,arguments)}});var b8=Z((U0e,xT)=>{"use strict";var gg=Xe("url"),mg=gg.URL,bte=Xe("http"),Ete=Xe("https"),hT=Xe("stream").Writable,pT=Xe("assert"),y8=v8();o((function(){var e=typeof process<"u",t=typeof window<"u"&&typeof document<"u",n=Ml(Error.captureStackTrace);!e&&(t||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")}),"detectUnsupportedEnvironment")();var dT=!1;try{pT(new mg(""))}catch(r){dT=r.code==="ERR_INVALID_URL"}var Ate=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],mT=["abort","aborted","connect","error","socket","timeout"],gT=Object.create(null);mT.forEach(function(r){gT[r]=function(e,t,n){this._redirectable.emit(r,e,t,n)}});var cT=vg("ERR_INVALID_URL","Invalid URL",TypeError),lT=vg("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Cte=vg("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",lT),Nte=vg("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Tte=vg("ERR_STREAM_WRITE_AFTER_END","write after end"),Ite=hT.prototype.destroy||w8;function Ps(r,e){hT.call(this),this._sanitizeOptions(r),this._options=r,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var t=this;this._onNativeResponse=function(n){try{t._processResponse(n)}catch(s){t.emit("error",s instanceof lT?s:new lT({cause:s}))}},this._performRequest()}o(Ps,"RedirectableRequest");Ps.prototype=Object.create(hT.prototype);Ps.prototype.abort=function(){yT(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Ps.prototype.destroy=function(r){return yT(this._currentRequest,r),Ite.call(this,r),this};Ps.prototype.write=function(r,e,t){if(this._ending)throw new Tte;if(!jl(r)&&!Dte(r))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Ml(e)&&(t=e,e=null),r.length===0){t&&t();return}this._requestBodyLength+r.length<=this._options.maxBodyLength?(this._requestBodyLength+=r.length,this._requestBodyBuffers.push({data:r,encoding:e}),this._currentRequest.write(r,e,t)):(this.emit("error",new Nte),this.abort())};Ps.prototype.end=function(r,e,t){if(Ml(r)?(t=r,r=e=null):Ml(e)&&(t=e,e=null),!r)this._ended=this._ending=!0,this._currentRequest.end(null,null,t);else{var n=this,s=this._currentRequest;this.write(r,e,function(){n._ended=!0,s.end(null,null,t)}),this._ending=!0}};Ps.prototype.setHeader=function(r,e){this._options.headers[r]=e,this._currentRequest.setHeader(r,e)};Ps.prototype.removeHeader=function(r){delete this._options.headers[r],this._currentRequest.removeHeader(r)};Ps.prototype.setTimeout=function(r,e){var t=this;function n(a){a.setTimeout(r),a.removeListener("timeout",a.destroy),a.addListener("timeout",a.destroy)}o(n,"destroyOnTimeout");function s(a){t._timeout&&clearTimeout(t._timeout),t._timeout=setTimeout(function(){t.emit("timeout"),i()},r),n(a)}o(s,"startTimer");function i(){t._timeout&&(clearTimeout(t._timeout),t._timeout=null),t.removeListener("abort",i),t.removeListener("error",i),t.removeListener("response",i),t.removeListener("close",i),e&&t.removeListener("timeout",e),t.socket||t._currentRequest.removeListener("socket",s)}return o(i,"clearTimer"),e&&this.on("timeout",e),this.socket?s(this.socket):this._currentRequest.once("socket",s),this.on("socket",n),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(r){Ps.prototype[r]=function(e,t){return this._currentRequest[r](e,t)}});["aborted","connection","socket"].forEach(function(r){Object.defineProperty(Ps.prototype,r,{get:o(function(){return this._currentRequest[r]},"get")})});Ps.prototype._sanitizeOptions=function(r){if(r.headers||(r.headers={}),r.host&&(r.hostname||(r.hostname=r.host),delete r.host),!r.pathname&&r.path){var e=r.path.indexOf("?");e<0?r.pathname=r.path:(r.pathname=r.path.substring(0,e),r.search=r.path.substring(e))}};Ps.prototype._performRequest=function(){var r=this._options.protocol,e=this._options.nativeProtocols[r];if(!e)throw new TypeError("Unsupported protocol "+r);if(this._options.agents){var t=r.slice(0,-1);this._options.agent=this._options.agents[t]}var n=this._currentRequest=e.request(this._options,this._onNativeResponse);n._redirectable=this;for(var s of mT)n.on(s,gT[s]);if(this._currentUrl=/^\//.test(this._options.path)?gg.format(this._options):this._options.path,this._isRedirect){var i=0,a=this,u=this._requestBodyBuffers;o((function c(f){if(n===a._currentRequest)if(f)a.emit("error",f);else if(i<u.length){var h=u[i++];n.finished||n.write(h.data,h.encoding,c)}else a._ended&&n.end()}),"writeNext")()}};Ps.prototype._processResponse=function(r){var e=r.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:r.headers,statusCode:e});var t=r.headers.location;if(!t||this._options.followRedirects===!1||e<300||e>=400){r.responseUrl=this._currentUrl,r.redirects=this._redirects,this.emit("response",r),this._requestBodyBuffers=[];return}if(yT(this._currentRequest),r.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Cte;var n,s=this._options.beforeRedirect;s&&(n=Object.assign({Host:r.req.getHeader("host")},this._options.headers));var i=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],uT(/^content-/i,this._options.headers));var a=uT(/^host$/i,this._options.headers),u=vT(this._currentUrl),c=a||u.host,f=/^\w+:/.test(t)?this._currentUrl:gg.format(Object.assign(u,{host:c})),h=_te(t,f);if(y8("redirecting to",h.href),this._isRedirect=!0,fT(h,this._options),(h.protocol!==u.protocol&&h.protocol!=="https:"||h.host!==c&&!Bte(h.host,c))&&uT(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Ml(s)){var m={headers:r.headers,statusCode:e},g={url:f,method:i,headers:n};s(this._options,m,g),this._sanitizeOptions(this._options)}this._performRequest()};function x8(r){var e={maxRedirects:21,maxBodyLength:10485760},t={};return Object.keys(r).forEach(function(n){var s=n+":",i=t[s]=r[n],a=e[n]=Object.create(i);function u(f,h,m){return Rte(f)?f=fT(f):jl(f)?f=fT(vT(f)):(m=h,h=S8(f),f={protocol:s}),Ml(h)&&(m=h,h=null),h=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},f,h),h.nativeProtocols=t,!jl(h.host)&&!jl(h.hostname)&&(h.hostname="::1"),pT.equal(h.protocol,s,"protocol mismatch"),y8("options",h),new Ps(h,m)}o(u,"request");function c(f,h,m){var g=a.request(f,h,m);return g.end(),g}o(c,"get"),Object.defineProperties(a,{request:{value:u,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}o(x8,"wrap");function w8(){}o(w8,"noop");function vT(r){var e;if(dT)e=new mg(r);else if(e=S8(gg.parse(r)),!jl(e.protocol))throw new cT({input:r});return e}o(vT,"parseUrl");function _te(r,e){return dT?new mg(r,e):vT(gg.resolve(e,r))}o(_te,"resolveUrl");function S8(r){if(/^\[/.test(r.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(r.hostname))throw new cT({input:r.href||r});if(/^\[/.test(r.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(r.host))throw new cT({input:r.href||r});return r}o(S8,"validateUrl");function fT(r,e){var t=e||{};for(var n of Ate)t[n]=r[n];return t.hostname.startsWith("[")&&(t.hostname=t.hostname.slice(1,-1)),t.port!==""&&(t.port=Number(t.port)),t.path=t.search?t.pathname+t.search:t.pathname,t}o(fT,"spreadUrlObject");function uT(r,e){var t;for(var n in e)r.test(n)&&(t=e[n],delete e[n]);return t===null||typeof t>"u"?void 0:String(t).trim()}o(uT,"removeMatchingHeaders");function vg(r,e,t){function n(s){Ml(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,s||{}),this.code=r,this.message=this.cause?e+": "+this.cause.message:e}return o(n,"CustomError"),n.prototype=new(t||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+r+"]",enumerable:!1}}),n}o(vg,"createErrorType");function yT(r,e){for(var t of mT)r.removeListener(t,gT[t]);r.on("error",w8),r.destroy(e)}o(yT,"destroyRequest");function Bte(r,e){pT(jl(r)&&jl(e));var t=r.length-e.length-1;return t>0&&r[t]==="."&&r.endsWith(e)}o(Bte,"isSubdomain");function jl(r){return typeof r=="string"||r instanceof String}o(jl,"isString");function Ml(r){return typeof r=="function"}o(Ml,"isFunction");function Dte(r){return typeof r=="object"&&"length"in r}o(Dte,"isBuffer");function Rte(r){return mg&&r instanceof mg}o(Rte,"isURL");xT.exports=x8({http:bte,https:Ete});xT.exports.wrap=x8});var qT=Z((M0e,v5)=>{"use strict";var Pte=p8(),Ote=Xe("crypto"),kte=Xe("url"),Lte=m8(),Vte=Xe("http"),Ute=Xe("https"),jte=Xe("util"),Mte=b8(),Fte=Xe("zlib"),$8=Xe("stream"),qte=Xe("events");function ja(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}o(ja,"_interopDefaultLegacy");var G8=ja(Pte),Hte=ja(Ote),Kte=ja(kte),$te=ja(Lte),Gte=ja(Vte),Xte=ja(Ute),X8=ja(jte),Wte=ja(Mte),$u=ja(Fte),Ku=ja($8);function W8(r,e){return o(function(){return r.apply(e,arguments)},"wrap")}o(W8,"bind");var{toString:zte}=Object.prototype,{getPrototypeOf:kT}=Object,{iterator:cS,toStringTag:z8}=Symbol,lS=(r=>e=>{let t=zte.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),na=o(r=>(r=r.toLowerCase(),e=>lS(e)===r),"kindOfTest"),fS=o(r=>e=>typeof e===r,"typeOfTest"),{isArray:Op}=Array,Bp=fS("undefined");function wg(r){return r!==null&&!Bp(r)&&r.constructor!==null&&!Bp(r.constructor)&&Os(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}o(wg,"isBuffer");var J8=na("ArrayBuffer");function Jte(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&J8(r.buffer),e}o(Jte,"isArrayBufferView");var Yte=fS("string"),Os=fS("function"),Y8=fS("number"),Sg=o(r=>r!==null&&typeof r=="object","isObject"),Qte=o(r=>r===!0||r===!1,"isBoolean"),rS=o(r=>{if(lS(r)!=="object")return!1;let e=kT(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(z8 in r)&&!(cS in r)},"isPlainObject"),Zte=o(r=>{if(!Sg(r)||wg(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},"isEmptyObject"),ere=na("Date"),tre=na("File"),rre=na("Blob"),nre=na("FileList"),sre=o(r=>Sg(r)&&Os(r.pipe),"isStream"),ire=o(r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||Os(r.append)&&((e=lS(r))==="formdata"||e==="object"&&Os(r.toString)&&r.toString()==="[object FormData]"))},"isFormData"),are=na("URLSearchParams"),[ore,ure,cre,lre]=["ReadableStream","Request","Response","Headers"].map(na),fre=o(r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function bg(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,s;if(typeof r!="object"&&(r=[r]),Op(r))for(n=0,s=r.length;n<s;n++)e.call(null,r[n],n,r);else{if(wg(r))return;let i=t?Object.getOwnPropertyNames(r):Object.keys(r),a=i.length,u;for(n=0;n<a;n++)u=i[n],e.call(null,r[u],u,r)}}o(bg,"forEach");function Q8(r,e){if(wg(r))return null;e=e.toLowerCase();let t=Object.keys(r),n=t.length,s;for(;n-- >0;)if(s=t[n],e===s.toLowerCase())return s;return null}o(Q8,"findKey");var Fl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Z8=o(r=>!Bp(r)&&r!==Fl,"isContextDefined");function CT(){let{caseless:r,skipUndefined:e}=Z8(this)&&this||{},t={},n=o((s,i)=>{let a=r&&Q8(t,i)||i;rS(t[a])&&rS(s)?t[a]=CT(t[a],s):rS(s)?t[a]=CT({},s):Op(s)?t[a]=s.slice():(!e||!Bp(s))&&(t[a]=s)},"assignValue");for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&bg(arguments[s],n);return t}o(CT,"merge");var hre=o((r,e,t,{allOwnKeys:n}={})=>(bg(e,(s,i)=>{t&&Os(s)?r[i]=W8(s,t):r[i]=s},{allOwnKeys:n}),r),"extend"),pre=o(r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),"stripBOM"),dre=o((r,e,t,n)=>{r.prototype=Object.create(e.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},"inherits"),mre=o((r,e,t,n)=>{let s,i,a,u={};if(e=e||{},r==null)return e;do{for(s=Object.getOwnPropertyNames(r),i=s.length;i-- >0;)a=s[i],(!n||n(a,r,e))&&!u[a]&&(e[a]=r[a],u[a]=!0);r=t!==!1&&kT(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},"toFlatObject"),gre=o((r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;let n=r.indexOf(e,t);return n!==-1&&n===t},"endsWith"),vre=o(r=>{if(!r)return null;if(Op(r))return r;let e=r.length;if(!Y8(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},"toArray"),yre=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&kT(Uint8Array)),xre=o((r,e)=>{let n=(r&&r[cS]).call(r),s;for(;(s=n.next())&&!s.done;){let i=s.value;e.call(r,i[0],i[1])}},"forEachEntry"),wre=o((r,e)=>{let t,n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},"matchAll"),Sre=na("HTMLFormElement"),bre=o(r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,o(function(t,n,s){return n.toUpperCase()+s},"replacer")),"toCamelCase"),E8=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),Ere=na("RegExp"),e5=o((r,e)=>{let t=Object.getOwnPropertyDescriptors(r),n={};bg(t,(s,i)=>{let a;(a=e(s,i,r))!==!1&&(n[i]=a||s)}),Object.defineProperties(r,n)},"reduceDescriptors"),Are=o(r=>{e5(r,(e,t)=>{if(Os(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let n=r[t];if(Os(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},"freezeMethods"),Cre=o((r,e)=>{let t={},n=o(s=>{s.forEach(i=>{t[i]=!0})},"define");return Op(r)?n(r):n(String(r).split(e)),t},"toObjectSet"),Nre=o(()=>{},"noop"),Tre=o((r,e)=>r!=null&&Number.isFinite(r=+r)?r:e,"toFiniteNumber");function Ire(r){return!!(r&&Os(r.append)&&r[z8]==="FormData"&&r[cS])}o(Ire,"isSpecCompliantForm");var _re=o(r=>{let e=new Array(10),t=o((n,s)=>{if(Sg(n)){if(e.indexOf(n)>=0)return;if(wg(n))return n;if(!("toJSON"in n)){e[s]=n;let i=Op(n)?[]:{};return bg(n,(a,u)=>{let c=t(a,s+1);!Bp(c)&&(i[u]=c)}),e[s]=void 0,i}}return n},"visit");return t(r,0)},"toJSONObject"),Bre=na("AsyncFunction"),Dre=o(r=>r&&(Sg(r)||Os(r))&&Os(r.then)&&Os(r.catch),"isThenable"),t5=((r,e)=>r?setImmediate:e?((t,n)=>(Fl.addEventListener("message",({source:s,data:i})=>{s===Fl&&i===t&&n.length&&n.shift()()},!1),s=>{n.push(s),Fl.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Os(Fl.postMessage)),Rre=typeof queueMicrotask<"u"?queueMicrotask.bind(Fl):typeof process<"u"&&process.nextTick||t5,Pre=o(r=>r!=null&&Os(r[cS]),"isIterable"),fe={isArray:Op,isArrayBuffer:J8,isBuffer:wg,isFormData:ire,isArrayBufferView:Jte,isString:Yte,isNumber:Y8,isBoolean:Qte,isObject:Sg,isPlainObject:rS,isEmptyObject:Zte,isReadableStream:ore,isRequest:ure,isResponse:cre,isHeaders:lre,isUndefined:Bp,isDate:ere,isFile:tre,isBlob:rre,isRegExp:Ere,isFunction:Os,isStream:sre,isURLSearchParams:are,isTypedArray:yre,isFileList:nre,forEach:bg,merge:CT,extend:hre,trim:fre,stripBOM:pre,inherits:dre,toFlatObject:mre,kindOf:lS,kindOfTest:na,endsWith:gre,toArray:vre,forEachEntry:xre,matchAll:wre,isHTMLForm:Sre,hasOwnProperty:E8,hasOwnProp:E8,reduceDescriptors:e5,freezeMethods:Are,toObjectSet:Cre,toCamelCase:bre,noop:Nre,toFiniteNumber:Tre,findKey:Q8,global:Fl,isContextDefined:Z8,isSpecCompliantForm:Ire,toJSONObject:_re,isAsyncFn:Bre,isThenable:Dre,setImmediate:t5,asap:Rre,isIterable:Pre};function at(r,e,t,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}o(at,"AxiosError");fe.inherits(at,Error,{toJSON:o(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:fe.toJSONObject(this.config),code:this.code,status:this.status}},"toJSON")});var r5=at.prototype,n5={};["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(r=>{n5[r]={value:r}});Object.defineProperties(at,n5);Object.defineProperty(r5,"isAxiosError",{value:!0});at.from=(r,e,t,n,s,i)=>{let a=Object.create(r5);fe.toFlatObject(r,a,o(function(h){return h!==Error.prototype},"filter"),f=>f!=="isAxiosError");let u=r&&r.message?r.message:"Error",c=e==null&&r?r.code:e;return at.call(a,u,c,t,n,s),r&&a.cause==null&&Object.defineProperty(a,"cause",{value:r,configurable:!0}),a.name=r&&r.name||"Error",i&&Object.assign(a,i),a};function NT(r){return fe.isPlainObject(r)||fe.isArray(r)}o(NT,"isVisitable");function s5(r){return fe.endsWith(r,"[]")?r.slice(0,-2):r}o(s5,"removeBrackets");function A8(r,e,t){return r?r.concat(e).map(o(function(s,i){return s=s5(s),!t&&i?"["+s+"]":s},"each")).join(t?".":""):e}o(A8,"renderKey");function Ore(r){return fe.isArray(r)&&!r.some(NT)}o(Ore,"isFlatArray");var kre=fe.toFlatObject(fe,{},null,o(function(e){return/^is[A-Z]/.test(e)},"filter"));function hS(r,e,t){if(!fe.isObject(r))throw new TypeError("target must be an object");e=e||new(G8.default||FormData),t=fe.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,o(function(w,S){return!fe.isUndefined(S[w])},"defined"));let n=t.metaTokens,s=t.visitor||h,i=t.dots,a=t.indexes,c=(t.Blob||typeof Blob<"u"&&Blob)&&fe.isSpecCompliantForm(e);if(!fe.isFunction(s))throw new TypeError("visitor must be a function");function f(v){if(v===null)return"";if(fe.isDate(v))return v.toISOString();if(fe.isBoolean(v))return v.toString();if(!c&&fe.isBlob(v))throw new at("Blob is not supported. Use a Buffer instead.");return fe.isArrayBuffer(v)||fe.isTypedArray(v)?c&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}o(f,"convertValue");function h(v,w,S){let A=v;if(v&&!S&&typeof v=="object"){if(fe.endsWith(w,"{}"))w=n?w:w.slice(0,-2),v=JSON.stringify(v);else if(fe.isArray(v)&&Ore(v)||(fe.isFileList(v)||fe.endsWith(w,"[]"))&&(A=fe.toArray(v)))return w=s5(w),A.forEach(o(function(b,E){!(fe.isUndefined(b)||b===null)&&e.append(a===!0?A8([w],E,i):a===null?w:w+"[]",f(b))},"each")),!1}return NT(v)?!0:(e.append(A8(S,w,i),f(v)),!1)}o(h,"defaultVisitor");let m=[],g=Object.assign(kre,{defaultVisitor:h,convertValue:f,isVisitable:NT});function x(v,w){if(!fe.isUndefined(v)){if(m.indexOf(v)!==-1)throw Error("Circular reference detected in "+w.join("."));m.push(v),fe.forEach(v,o(function(A,T){(!(fe.isUndefined(A)||A===null)&&s.call(e,A,fe.isString(T)?T.trim():T,w,g))===!0&&x(A,w?w.concat(T):[T])},"each")),m.pop()}}if(o(x,"build"),!fe.isObject(r))throw new TypeError("data must be an object");return x(r),e}o(hS,"toFormData");function C8(r){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,o(function(n){return e[n]},"replacer"))}o(C8,"encode$1");function i5(r,e){this._pairs=[],r&&hS(r,this,e)}o(i5,"AxiosURLSearchParams");var a5=i5.prototype;a5.append=o(function(e,t){this._pairs.push([e,t])},"append");a5.toString=o(function(e){let t=e?function(n){return e.call(this,n,C8)}:C8;return this._pairs.map(o(function(s){return t(s[0])+"="+t(s[1])},"each"),"").join("&")},"toString");function Lre(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}o(Lre,"encode");function LT(r,e,t){if(!e)return r;let n=t&&t.encode||Lre;fe.isFunction(t)&&(t={serialize:t});let s=t&&t.serialize,i;if(s?i=s(e,t):i=fe.isURLSearchParams(e)?e.toString():new i5(e,t).toString(n),i){let a=r.indexOf("#");a!==-1&&(r=r.slice(0,a)),r+=(r.indexOf("?")===-1?"?":"&")+i}return r}o(LT,"buildURL");var TT=class{static{o(this,"InterceptorManager")}constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){fe.forEach(this.handlers,o(function(n){n!==null&&e(n)},"forEachHandler"))}},N8=TT,VT={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Vre=Kte.default.URLSearchParams,wT="abcdefghijklmnopqrstuvwxyz",T8="0123456789",o5={DIGIT:T8,ALPHA:wT,ALPHA_DIGIT:wT+wT.toUpperCase()+T8},Ure=o((r=16,e=o5.ALPHA_DIGIT)=>{let t="",{length:n}=e,s=new Uint32Array(r);Hte.default.randomFillSync(s);for(let i=0;i<r;i++)t+=e[s[i]%n];return t},"generateString"),jre={isNode:!0,classes:{URLSearchParams:Vre,FormData:G8.default,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:o5,generateString:Ure,protocols:["http","https","file","data"]},UT=typeof window<"u"&&typeof document<"u",IT=typeof navigator=="object"&&navigator||void 0,Mre=UT&&(!IT||["ReactNative","NativeScript","NS"].indexOf(IT.product)<0),Fre=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qre=UT&&window.location.href||"http://localhost",Hre=Object.freeze({__proto__:null,hasBrowserEnv:UT,hasStandardBrowserWebWorkerEnv:Fre,hasStandardBrowserEnv:Mre,navigator:IT,origin:qre}),en={...Hre,...jre};function Kre(r,e){return hS(r,new en.classes.URLSearchParams,{visitor:o(function(t,n,s,i){return en.isNode&&fe.isBuffer(t)?(this.append(n,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},"visitor"),...e})}o(Kre,"toURLEncodedForm");function $re(r){return fe.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}o($re,"parsePropPath");function Gre(r){let e={},t=Object.keys(r),n,s=t.length,i;for(n=0;n<s;n++)i=t[n],e[i]=r[i];return e}o(Gre,"arrayToObject");function u5(r){function e(t,n,s,i){let a=t[i++];if(a==="__proto__")return!0;let u=Number.isFinite(+a),c=i>=t.length;return a=!a&&fe.isArray(s)?s.length:a,c?(fe.hasOwnProp(s,a)?s[a]=[s[a],n]:s[a]=n,!u):((!s[a]||!fe.isObject(s[a]))&&(s[a]=[]),e(t,n,s[a],i)&&fe.isArray(s[a])&&(s[a]=Gre(s[a])),!u)}if(o(e,"buildPath"),fe.isFormData(r)&&fe.isFunction(r.entries)){let t={};return fe.forEachEntry(r,(n,s)=>{e($re(n),s,t,0)}),t}return null}o(u5,"formDataToJSON");function Xre(r,e,t){if(fe.isString(r))try{return(e||JSON.parse)(r),fe.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}o(Xre,"stringifySafely");var jT={transitional:VT,adapter:["xhr","http","fetch"],transformRequest:[o(function(e,t){let n=t.getContentType()||"",s=n.indexOf("application/json")>-1,i=fe.isObject(e);if(i&&fe.isHTMLForm(e)&&(e=new FormData(e)),fe.isFormData(e))return s?JSON.stringify(u5(e)):e;if(fe.isArrayBuffer(e)||fe.isBuffer(e)||fe.isStream(e)||fe.isFile(e)||fe.isBlob(e)||fe.isReadableStream(e))return e;if(fe.isArrayBufferView(e))return e.buffer;if(fe.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let u;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Kre(e,this.formSerializer).toString();if((u=fe.isFileList(e))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return hS(u?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||s?(t.setContentType("application/json",!1),Xre(e)):e},"transformRequest")],transformResponse:[o(function(e){let t=this.transitional||jT.transitional,n=t&&t.forcedJSONParsing,s=this.responseType==="json";if(fe.isResponse(e)||fe.isReadableStream(e))return e;if(e&&fe.isString(e)&&(n&&!this.responseType||s)){let a=!(t&&t.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(u){if(a)throw u.name==="SyntaxError"?at.from(u,at.ERR_BAD_RESPONSE,this,null,this.response):u}}return e},"transformResponse")],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:en.classes.FormData,Blob:en.classes.Blob},validateStatus:o(function(e){return e>=200&&e<300},"validateStatus"),headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};fe.forEach(["delete","get","head","post","put","patch"],r=>{jT.headers[r]={}});var MT=jT,Wre=fe.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"]),zre=o(r=>{let e={},t,n,s;return r&&r.split(`
47
+ `).forEach(o(function(a){s=a.indexOf(":"),t=a.substring(0,s).trim().toLowerCase(),n=a.substring(s+1).trim(),!(!t||e[t]&&Wre[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)},"parser")),e},"parseHeaders"),I8=Symbol("internals");function yg(r){return r&&String(r).trim().toLowerCase()}o(yg,"normalizeHeader");function nS(r){return r===!1||r==null?r:fe.isArray(r)?r.map(nS):String(r)}o(nS,"normalizeValue");function Jre(r){let e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=t.exec(r);)e[n[1]]=n[2];return e}o(Jre,"parseTokens");var Yre=o(r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim()),"isValidHeaderName");function ST(r,e,t,n,s){if(fe.isFunction(n))return n.call(this,e,t);if(s&&(e=t),!!fe.isString(e)){if(fe.isString(n))return e.indexOf(n)!==-1;if(fe.isRegExp(n))return n.test(e)}}o(ST,"matchHeaderValue");function Qre(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}o(Qre,"formatHeader");function Zre(r,e){let t=fe.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(r,n+t,{value:o(function(s,i,a){return this[n].call(this,e,s,i,a)},"value"),configurable:!0})})}o(Zre,"buildAccessors");var Dp=class{static{o(this,"AxiosHeaders")}constructor(e){e&&this.set(e)}set(e,t,n){let s=this;function i(u,c,f){let h=yg(c);if(!h)throw new Error("header name must be a non-empty string");let m=fe.findKey(s,h);(!m||s[m]===void 0||f===!0||f===void 0&&s[m]!==!1)&&(s[m||c]=nS(u))}o(i,"setHeader");let a=o((u,c)=>fe.forEach(u,(f,h)=>i(f,h,c)),"setHeaders");if(fe.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(fe.isString(e)&&(e=e.trim())&&!Yre(e))a(zre(e),t);else if(fe.isObject(e)&&fe.isIterable(e)){let u={},c,f;for(let h of e){if(!fe.isArray(h))throw TypeError("Object iterator must return a key-value pair");u[f=h[0]]=(c=u[f])?fe.isArray(c)?[...c,h[1]]:[c,h[1]]:h[1]}a(u,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=yg(e),e){let n=fe.findKey(this,e);if(n){let s=this[n];if(!t)return s;if(t===!0)return Jre(s);if(fe.isFunction(t))return t.call(this,s,n);if(fe.isRegExp(t))return t.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=yg(e),e){let n=fe.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||ST(this,this[n],n,t)))}return!1}delete(e,t){let n=this,s=!1;function i(a){if(a=yg(a),a){let u=fe.findKey(n,a);u&&(!t||ST(n,n[u],u,t))&&(delete n[u],s=!0)}}return o(i,"deleteHeader"),fe.isArray(e)?e.forEach(i):i(e),s}clear(e){let t=Object.keys(this),n=t.length,s=!1;for(;n--;){let i=t[n];(!e||ST(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){let t=this,n={};return fe.forEach(this,(s,i)=>{let a=fe.findKey(n,i);if(a){t[a]=nS(s),delete t[i];return}let u=e?Qre(i):String(i).trim();u!==i&&delete t[i],t[u]=nS(s),n[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return fe.forEach(this,(n,s)=>{n!=null&&n!==!1&&(t[s]=e&&fe.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
48
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(s=>n.set(s)),n}static accessor(e){let n=(this[I8]=this[I8]={accessors:{}}).accessors,s=this.prototype;function i(a){let u=yg(a);n[u]||(Zre(s,a),n[u]=!0)}return o(i,"defineAccessor"),fe.isArray(e)?e.forEach(i):i(e),this}};Dp.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);fe.reduceDescriptors(Dp.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:o(()=>r,"get"),set(n){this[t]=n}}});fe.freezeMethods(Dp);var ks=Dp;function bT(r,e){let t=this||MT,n=e||t,s=ks.from(n.headers),i=n.data;return fe.forEach(r,o(function(u){i=u.call(t,i,s.normalize(),e?e.status:void 0)},"transform")),s.normalize(),i}o(bT,"transformData");function c5(r){return!!(r&&r.__CANCEL__)}o(c5,"isCancel");function Gu(r,e,t){at.call(this,r??"canceled",at.ERR_CANCELED,e,t),this.name="CanceledError"}o(Gu,"CanceledError");fe.inherits(Gu,at,{__CANCEL__:!0});function _p(r,e,t){let n=t.config.validateStatus;!t.status||!n||n(t.status)?r(t):e(new at("Request failed with status code "+t.status,[at.ERR_BAD_REQUEST,at.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}o(_p,"settle");function ene(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}o(ene,"isAbsoluteURL");function tne(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}o(tne,"combineURLs");function FT(r,e,t){let n=!ene(e);return r&&(n||t==!1)?tne(r,e):e}o(FT,"buildFullPath");var aS="1.12.2";function l5(r){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}o(l5,"parseProtocol");var rne=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function nne(r,e,t){let n=t&&t.Blob||en.classes.Blob,s=l5(r);if(e===void 0&&n&&(e=!0),s==="data"){r=s.length?r.slice(s.length+1):r;let i=rne.exec(r);if(!i)throw new at("Invalid URL",at.ERR_INVALID_URL);let a=i[1],u=i[2],c=i[3],f=Buffer.from(decodeURIComponent(c),u?"base64":"utf8");if(e){if(!n)throw new at("Blob is not supported",at.ERR_NOT_SUPPORT);return new n([f],{type:a})}return f}throw new at("Unsupported protocol "+s,at.ERR_NOT_SUPPORT)}o(nne,"fromDataURI");var ET=Symbol("internals"),_T=class extends Ku.default.Transform{static{o(this,"AxiosTransformStream")}constructor(e){e=fe.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,s)=>!fe.isUndefined(s[n])),super({readableHighWaterMark:e.chunkSize});let t=this[ET]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",n=>{n==="progress"&&(t.isCaptured||(t.isCaptured=!0))})}_read(e){let t=this[ET];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,n){let s=this[ET],i=s.maxRate,a=this.readableHighWaterMark,u=s.timeWindow,c=1e3/u,f=i/c,h=s.minChunkSize!==!1?Math.max(s.minChunkSize,f*.01):0,m=o((x,v)=>{let w=Buffer.byteLength(x);s.bytesSeen+=w,s.bytes+=w,s.isCaptured&&this.emit("progress",s.bytesSeen),this.push(x)?process.nextTick(v):s.onReadCallback=()=>{s.onReadCallback=null,process.nextTick(v)}},"pushChunk"),g=o((x,v)=>{let w=Buffer.byteLength(x),S=null,A=a,T,b=0;if(i){let E=Date.now();(!s.ts||(b=E-s.ts)>=u)&&(s.ts=E,T=f-s.bytes,s.bytes=T<0?-T:0,b=0),T=f-s.bytes}if(i){if(T<=0)return setTimeout(()=>{v(null,x)},u-b);T<A&&(A=T)}A&&w>A&&w-A>h&&(S=x.subarray(A),x=x.subarray(0,A)),m(x,S?()=>{process.nextTick(v,null,S)}:v)},"transformChunk");g(e,o(function x(v,w){if(v)return n(v);w?g(w,x):n(null)},"transformNextChunk"))}},_8=_T,{asyncIterator:B8}=Symbol,sne=o(async function*(r){r.stream?yield*r.stream():r.arrayBuffer?yield await r.arrayBuffer():r[B8]?yield*r[B8]():yield r},"readBlob"),f5=sne,ine=en.ALPHABET.ALPHA_DIGIT+"-_",xg=typeof TextEncoder=="function"?new TextEncoder:new X8.default.TextEncoder,ql=`\r
49
+ `,ane=xg.encode(ql),one=2,BT=class{static{o(this,"FormDataPart")}constructor(e,t){let{escapeName:n}=this.constructor,s=fe.isString(t),i=`Content-Disposition: form-data; name="${n(e)}"${!s&&t.name?`; filename="${n(t.name)}"`:""}${ql}`;s?t=xg.encode(String(t).replace(/\r?\n|\r\n?/g,ql)):i+=`Content-Type: ${t.type||"application/octet-stream"}${ql}`,this.headers=xg.encode(i+ql),this.contentLength=s?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+one,this.name=e,this.value=t}async*encode(){yield this.headers;let{value:e}=this;fe.isTypedArray(e)?yield e:yield*f5(e),yield ane}static escapeName(e){return String(e).replace(/[\r\n"]/g,t=>({"\r":"%0D","\n":"%0A",'"':"%22"})[t])}},une=o((r,e,t)=>{let{tag:n="form-data-boundary",size:s=25,boundary:i=n+"-"+en.generateString(s,ine)}=t||{};if(!fe.isFormData(r))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let a=xg.encode("--"+i+ql),u=xg.encode("--"+i+"--"+ql),c=u.byteLength,f=Array.from(r.entries()).map(([m,g])=>{let x=new BT(m,g);return c+=x.size,x});c+=a.byteLength*f.length,c=fe.toFiniteNumber(c);let h={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(c)&&(h["Content-Length"]=c),e&&e(h),$8.Readable.from((async function*(){for(let m of f)yield a,yield*m.encode();yield u})())},"formDataToStream"),cne=une,DT=class extends Ku.default.Transform{static{o(this,"ZlibHeaderTransformStream")}__transform(e,t,n){this.push(e),n()}_transform(e,t,n){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let s=Buffer.alloc(2);s[0]=120,s[1]=156,this.push(s,t)}this.__transform(e,t,n)}},lne=DT,fne=o((r,e)=>fe.isAsyncFn(r)?function(...t){let n=t.pop();r.apply(this,t).then(s=>{try{e?n(null,...e(s)):n(null,s)}catch(i){n(i)}},n)}:r,"callbackify"),hne=fne;function pne(r,e){r=r||10;let t=new Array(r),n=new Array(r),s=0,i=0,a;return e=e!==void 0?e:1e3,o(function(c){let f=Date.now(),h=n[i];a||(a=f),t[s]=c,n[s]=f;let m=i,g=0;for(;m!==s;)g+=t[m++],m=m%r;if(s=(s+1)%r,s===i&&(i=(i+1)%r),f-a<e)return;let x=h&&f-h;return x?Math.round(g*1e3/x):void 0},"push")}o(pne,"speedometer");function dne(r,e){let t=0,n=1e3/e,s,i,a=o((f,h=Date.now())=>{t=h,s=null,i&&(clearTimeout(i),i=null),r(...f)},"invoke");return[o((...f)=>{let h=Date.now(),m=h-t;m>=n?a(f,h):(s=f,i||(i=setTimeout(()=>{i=null,a(s)},n-m)))},"throttled"),o(()=>s&&a(s),"flush")]}o(dne,"throttle");var Rp=o((r,e,t=3)=>{let n=0,s=pne(50,250);return dne(i=>{let a=i.loaded,u=i.lengthComputable?i.total:void 0,c=a-n,f=s(c),h=a<=u;n=a;let m={loaded:a,total:u,progress:u?a/u:void 0,bytes:c,rate:f||void 0,estimated:f&&u&&h?(u-a)/f:void 0,event:i,lengthComputable:u!=null,[e?"download":"upload"]:!0};r(m)},t)},"progressEventReducer"),oS=o((r,e)=>{let t=r!=null;return[n=>e[0]({lengthComputable:t,total:r,loaded:n}),e[1]]},"progressEventDecorator"),uS=o(r=>(...e)=>fe.asap(()=>r(...e)),"asyncDecorator");function mne(r){if(!r||typeof r!="string"||!r.startsWith("data:"))return 0;let e=r.indexOf(",");if(e<0)return 0;let t=r.slice(5,e),n=r.slice(e+1);if(/;base64/i.test(t)){let i=n.length,a=n.length;for(let g=0;g<a;g++)if(n.charCodeAt(g)===37&&g+2<a){let x=n.charCodeAt(g+1),v=n.charCodeAt(g+2);(x>=48&&x<=57||x>=65&&x<=70||x>=97&&x<=102)&&(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102)&&(i-=2,g+=2)}let u=0,c=a-1,f=o(g=>g>=2&&n.charCodeAt(g-2)===37&&n.charCodeAt(g-1)===51&&(n.charCodeAt(g)===68||n.charCodeAt(g)===100),"tailIsPct3D");c>=0&&(n.charCodeAt(c)===61?(u++,c--):f(c)&&(u++,c-=3)),u===1&&c>=0&&(n.charCodeAt(c)===61||f(c))&&u++;let m=Math.floor(i/4)*3-(u||0);return m>0?m:0}return Buffer.byteLength(n,"utf8")}o(mne,"estimateDataURLDecodedBytes");var D8={flush:$u.default.constants.Z_SYNC_FLUSH,finishFlush:$u.default.constants.Z_SYNC_FLUSH},gne={flush:$u.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:$u.default.constants.BROTLI_OPERATION_FLUSH},R8=fe.isFunction($u.default.createBrotliDecompress),{http:vne,https:yne}=Wte.default,xne=/https:?/,P8=en.protocols.map(r=>r+":"),O8=o((r,[e,t])=>(r.on("end",t).on("error",t),e),"flushOnFinish");function wne(r,e){r.beforeRedirects.proxy&&r.beforeRedirects.proxy(r),r.beforeRedirects.config&&r.beforeRedirects.config(r,e)}o(wne,"dispatchBeforeRedirect");function h5(r,e,t){let n=e;if(!n&&n!==!1){let s=$te.default.getProxyForUrl(t);s&&(n=new URL(s))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){(n.auth.username||n.auth.password)&&(n.auth=(n.auth.username||"")+":"+(n.auth.password||""));let i=Buffer.from(n.auth,"utf8").toString("base64");r.headers["Proxy-Authorization"]="Basic "+i}r.headers.host=r.hostname+(r.port?":"+r.port:"");let s=n.hostname||n.host;r.hostname=s,r.host=s,r.port=n.port,r.path=t,n.protocol&&(r.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}r.beforeRedirects.proxy=o(function(i){h5(i,e,i.href)},"beforeRedirect")}o(h5,"setProxy");var Sne=typeof process<"u"&&fe.kindOf(process)==="process",bne=o(r=>new Promise((e,t)=>{let n,s,i=o((c,f)=>{s||(s=!0,n&&n(c,f))},"done"),a=o(c=>{i(c),e(c)},"_resolve"),u=o(c=>{i(c,!0),t(c)},"_reject");r(a,u,c=>n=c).catch(u)}),"wrapAsync"),Ene=o(({address:r,family:e})=>{if(!fe.isString(r))throw TypeError("address must be a string");return{address:r,family:e||(r.indexOf(".")<0?6:4)}},"resolveFamily"),k8=o((r,e)=>Ene(fe.isObject(r)?r:{address:r,family:e}),"buildAddressEntry"),Ane=Sne&&o(function(e){return bne(o(async function(n,s,i){let{data:a,lookup:u,family:c}=e,{responseType:f,responseEncoding:h}=e,m=e.method.toUpperCase(),g,x=!1,v;if(u){let he=hne(u,we=>fe.isArray(we)?we:[we]);u=o((we,Ke,Ae)=>{he(we,Ke,(xe,je,Je)=>{if(xe)return Ae(xe);let Ze=fe.isArray(je)?je.map(lt=>k8(lt)):[k8(je,Je)];Ke.all?Ae(xe,Ze):Ae(xe,Ze[0].address,Ze[0].family)})},"lookup")}let w=new qte.EventEmitter,S=o(()=>{e.cancelToken&&e.cancelToken.unsubscribe(A),e.signal&&e.signal.removeEventListener("abort",A),w.removeAllListeners()},"onFinished");i((he,we)=>{g=!0,we&&(x=!0,S())});function A(he){w.emit("abort",!he||he.type?new Gu(null,e,v):he)}o(A,"abort"),w.once("abort",s),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(A),e.signal&&(e.signal.aborted?A():e.signal.addEventListener("abort",A)));let T=FT(e.baseURL,e.url,e.allowAbsoluteUrls),b=new URL(T,en.hasBrowserEnv?en.origin:void 0),E=b.protocol||P8[0];if(E==="data:"){if(e.maxContentLength>-1){let we=String(e.url||T||"");if(mne(we)>e.maxContentLength)return s(new at("maxContentLength size of "+e.maxContentLength+" exceeded",at.ERR_BAD_RESPONSE,e))}let he;if(m!=="GET")return _p(n,s,{status:405,statusText:"method not allowed",headers:{},config:e});try{he=nne(e.url,f==="blob",{Blob:e.env&&e.env.Blob})}catch(we){throw at.from(we,at.ERR_BAD_REQUEST,e)}return f==="text"?(he=he.toString(h),(!h||h==="utf8")&&(he=fe.stripBOM(he))):f==="stream"&&(he=Ku.default.Readable.from(he)),_p(n,s,{data:he,status:200,statusText:"OK",headers:new ks,config:e})}if(P8.indexOf(E)===-1)return s(new at("Unsupported protocol "+E,at.ERR_BAD_REQUEST,e));let C=ks.from(e.headers).normalize();C.set("User-Agent","axios/"+aS,!1);let{onUploadProgress:_,onDownloadProgress:F}=e,R=e.maxRate,q,H;if(fe.isSpecCompliantForm(a)){let he=C.getContentType(/boundary=([-_\w\d]{10,70})/i);a=cne(a,we=>{C.set(we)},{tag:`axios-${aS}-boundary`,boundary:he&&he[1]||void 0})}else if(fe.isFormData(a)&&fe.isFunction(a.getHeaders)){if(C.set(a.getHeaders()),!C.hasContentLength())try{let he=await X8.default.promisify(a.getLength).call(a);Number.isFinite(he)&&he>=0&&C.setContentLength(he)}catch{}}else if(fe.isBlob(a)||fe.isFile(a))a.size&&C.setContentType(a.type||"application/octet-stream"),C.setContentLength(a.size||0),a=Ku.default.Readable.from(f5(a));else if(a&&!fe.isStream(a)){if(!Buffer.isBuffer(a))if(fe.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(fe.isString(a))a=Buffer.from(a,"utf-8");else return s(new at("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",at.ERR_BAD_REQUEST,e));if(C.setContentLength(a.length,!1),e.maxBodyLength>-1&&a.length>e.maxBodyLength)return s(new at("Request body larger than maxBodyLength limit",at.ERR_BAD_REQUEST,e))}let K=fe.toFiniteNumber(C.getContentLength());fe.isArray(R)?(q=R[0],H=R[1]):q=H=R,a&&(_||q)&&(fe.isStream(a)||(a=Ku.default.Readable.from(a,{objectMode:!1})),a=Ku.default.pipeline([a,new _8({maxRate:fe.toFiniteNumber(q)})],fe.noop),_&&a.on("progress",O8(a,oS(K,Rp(uS(_),!1,3)))));let X;if(e.auth){let he=e.auth.username||"",we=e.auth.password||"";X=he+":"+we}if(!X&&b.username){let he=b.username,we=b.password;X=he+":"+we}X&&C.delete("authorization");let pe;try{pe=LT(b.pathname+b.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(he){let we=new Error(he.message);return we.config=e,we.url=e.url,we.exists=!0,s(we)}C.set("Accept-Encoding","gzip, compress, deflate"+(R8?", br":""),!1);let le={path:pe,method:m,headers:C.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:X,protocol:E,family:c,beforeRedirect:wne,beforeRedirects:{}};!fe.isUndefined(u)&&(le.lookup=u),e.socketPath?le.socketPath=e.socketPath:(le.hostname=b.hostname.startsWith("[")?b.hostname.slice(1,-1):b.hostname,le.port=b.port,h5(le,e.proxy,E+"//"+b.hostname+(b.port?":"+b.port:"")+le.path));let ue,ee=xne.test(le.protocol);if(le.agent=ee?e.httpsAgent:e.httpAgent,e.transport?ue=e.transport:e.maxRedirects===0?ue=ee?Xte.default:Gte.default:(e.maxRedirects&&(le.maxRedirects=e.maxRedirects),e.beforeRedirect&&(le.beforeRedirects.config=e.beforeRedirect),ue=ee?yne:vne),e.maxBodyLength>-1?le.maxBodyLength=e.maxBodyLength:le.maxBodyLength=1/0,e.insecureHTTPParser&&(le.insecureHTTPParser=e.insecureHTTPParser),v=ue.request(le,o(function(we){if(v.destroyed)return;let Ke=[we],Ae=+we.headers["content-length"];if(F||H){let lt=new _8({maxRate:fe.toFiniteNumber(H)});F&&lt.on("progress",O8(lt,oS(Ae,Rp(uS(F),!0,3)))),Ke.push(lt)}let xe=we,je=we.req||v;if(e.decompress!==!1&&we.headers["content-encoding"])switch((m==="HEAD"||we.statusCode===204)&&delete we.headers["content-encoding"],(we.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Ke.push($u.default.createUnzip(D8)),delete we.headers["content-encoding"];break;case"deflate":Ke.push(new lne),Ke.push($u.default.createUnzip(D8)),delete we.headers["content-encoding"];break;case"br":R8&&(Ke.push($u.default.createBrotliDecompress(gne)),delete we.headers["content-encoding"])}xe=Ke.length>1?Ku.default.pipeline(Ke,fe.noop):Ke[0];let Je=Ku.default.finished(xe,()=>{Je(),S()}),Ze={status:we.statusCode,statusText:we.statusMessage,headers:new ks(we.headers),config:e,request:je};if(f==="stream")Ze.data=xe,_p(n,s,Ze);else{let lt=[],O=0;xe.on("data",o(function(se){lt.push(se),O+=se.length,e.maxContentLength>-1&&O>e.maxContentLength&&(x=!0,xe.destroy(),s(new at("maxContentLength size of "+e.maxContentLength+" exceeded",at.ERR_BAD_RESPONSE,e,je)))},"handleStreamData")),xe.on("aborted",o(function(){if(x)return;let se=new at("stream has been aborted",at.ERR_BAD_RESPONSE,e,je);xe.destroy(se),s(se)},"handlerStreamAborted")),xe.on("error",o(function(se){v.destroyed||s(at.from(se,null,e,je))},"handleStreamError")),xe.on("end",o(function(){try{let se=lt.length===1?lt[0]:Buffer.concat(lt);f!=="arraybuffer"&&(se=se.toString(h),(!h||h==="utf8")&&(se=fe.stripBOM(se))),Ze.data=se}catch(se){return s(at.from(se,null,e,Ze.request,Ze))}_p(n,s,Ze)},"handleStreamEnd"))}w.once("abort",lt=>{xe.destroyed||(xe.emit("error",lt),xe.destroy())})},"handleResponse")),w.once("abort",he=>{s(he),v.destroy(he)}),v.on("error",o(function(we){s(at.from(we,null,e,v))},"handleRequestError")),v.on("socket",o(function(we){we.setKeepAlive(!0,1e3*60)},"handleRequestSocket")),e.timeout){let he=parseInt(e.timeout,10);if(Number.isNaN(he)){s(new at("error trying to parse `config.timeout` to int",at.ERR_BAD_OPTION_VALUE,e,v));return}v.setTimeout(he,o(function(){if(g)return;let Ke=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",Ae=e.transitional||VT;e.timeoutErrorMessage&&(Ke=e.timeoutErrorMessage),s(new at(Ke,Ae.clarifyTimeoutError?at.ETIMEDOUT:at.ECONNABORTED,e,v)),A()},"handleRequestTimeout"))}if(fe.isStream(a)){let he=!1,we=!1;a.on("end",()=>{he=!0}),a.once("error",Ke=>{we=!0,v.destroy(Ke)}),a.on("close",()=>{!he&&!we&&A(new Gu("Request stream has been aborted",e,v))}),a.pipe(v)}else v.end(a)},"dispatchHttpRequest"))},"httpAdapter"),Cne=en.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,en.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(en.origin),en.navigator&&/(msie|trident)/i.test(en.navigator.userAgent)):()=>!0,Nne=en.hasStandardBrowserEnv?{write(r,e,t,n,s,i){let a=[r+"="+encodeURIComponent(e)];fe.isNumber(t)&&a.push("expires="+new Date(t).toGMTString()),fe.isString(n)&&a.push("path="+n),fe.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(r){let e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}},L8=o(r=>r instanceof ks?{...r}:r,"headersToObject");function Hl(r,e){e=e||{};let t={};function n(f,h,m,g){return fe.isPlainObject(f)&&fe.isPlainObject(h)?fe.merge.call({caseless:g},f,h):fe.isPlainObject(h)?fe.merge({},h):fe.isArray(h)?h.slice():h}o(n,"getMergedValue");function s(f,h,m,g){if(fe.isUndefined(h)){if(!fe.isUndefined(f))return n(void 0,f,m,g)}else return n(f,h,m,g)}o(s,"mergeDeepProperties");function i(f,h){if(!fe.isUndefined(h))return n(void 0,h)}o(i,"valueFromConfig2");function a(f,h){if(fe.isUndefined(h)){if(!fe.isUndefined(f))return n(void 0,f)}else return n(void 0,h)}o(a,"defaultToConfig2");function u(f,h,m){if(m in e)return n(f,h);if(m in r)return n(void 0,f)}o(u,"mergeDirectKeys");let c={url:i,method:i,data:i,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:u,headers:o((f,h,m)=>s(L8(f),L8(h),m,!0),"headers")};return fe.forEach(Object.keys({...r,...e}),o(function(h){let m=c[h]||s,g=m(r[h],e[h],h);fe.isUndefined(g)&&m!==u||(t[h]=g)},"computeConfigValue")),t}o(Hl,"mergeConfig");var p5=o(r=>{let e=Hl({},r),{data:t,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:u}=e;if(e.headers=a=ks.from(a),e.url=LT(FT(e.baseURL,e.url,e.allowAbsoluteUrls),r.params,r.paramsSerializer),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),fe.isFormData(t)){if(en.hasStandardBrowserEnv||en.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(fe.isFunction(t.getHeaders)){let c=t.getHeaders(),f=["content-type","content-length"];Object.entries(c).forEach(([h,m])=>{f.includes(h.toLowerCase())&&a.set(h,m)})}}if(en.hasStandardBrowserEnv&&(n&&fe.isFunction(n)&&(n=n(e)),n||n!==!1&&Cne(e.url))){let c=s&&i&&Nne.read(i);c&&a.set(s,c)}return e},"resolveConfig"),Tne=typeof XMLHttpRequest<"u",Ine=Tne&&function(r){return new Promise(o(function(t,n){let s=p5(r),i=s.data,a=ks.from(s.headers).normalize(),{responseType:u,onUploadProgress:c,onDownloadProgress:f}=s,h,m,g,x,v;function w(){x&&x(),v&&v(),s.cancelToken&&s.cancelToken.unsubscribe(h),s.signal&&s.signal.removeEventListener("abort",h)}o(w,"done");let S=new XMLHttpRequest;S.open(s.method.toUpperCase(),s.url,!0),S.timeout=s.timeout;function A(){if(!S)return;let b=ks.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),C={data:!u||u==="text"||u==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:b,config:r,request:S};_p(o(function(F){t(F),w()},"_resolve"),o(function(F){n(F),w()},"_reject"),C),S=null}o(A,"onloadend"),"onloadend"in S?S.onloadend=A:S.onreadystatechange=o(function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout(A)},"handleLoad"),S.onabort=o(function(){S&&(n(new at("Request aborted",at.ECONNABORTED,r,S)),S=null)},"handleAbort"),S.onerror=o(function(E){let C=E&&E.message?E.message:"Network Error",_=new at(C,at.ERR_NETWORK,r,S);_.event=E||null,n(_),S=null},"handleError"),S.ontimeout=o(function(){let E=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded",C=s.transitional||VT;s.timeoutErrorMessage&&(E=s.timeoutErrorMessage),n(new at(E,C.clarifyTimeoutError?at.ETIMEDOUT:at.ECONNABORTED,r,S)),S=null},"handleTimeout"),i===void 0&&a.setContentType(null),"setRequestHeader"in S&&fe.forEach(a.toJSON(),o(function(E,C){S.setRequestHeader(C,E)},"setRequestHeader")),fe.isUndefined(s.withCredentials)||(S.withCredentials=!!s.withCredentials),u&&u!=="json"&&(S.responseType=s.responseType),f&&([g,v]=Rp(f,!0),S.addEventListener("progress",g)),c&&S.upload&&([m,x]=Rp(c),S.upload.addEventListener("progress",m),S.upload.addEventListener("loadend",x)),(s.cancelToken||s.signal)&&(h=o(b=>{S&&(n(!b||b.type?new Gu(null,r,S):b),S.abort(),S=null)},"onCanceled"),s.cancelToken&&s.cancelToken.subscribe(h),s.signal&&(s.signal.aborted?h():s.signal.addEventListener("abort",h)));let T=l5(s.url);if(T&&en.protocols.indexOf(T)===-1){n(new at("Unsupported protocol "+T+":",at.ERR_BAD_REQUEST,r));return}S.send(i||null)},"dispatchXhrRequest"))},_ne=o((r,e)=>{let{length:t}=r=r?r.filter(Boolean):[];if(e||t){let n=new AbortController,s,i=o(function(f){if(!s){s=!0,u();let h=f instanceof Error?f:this.reason;n.abort(h instanceof at?h:new Gu(h instanceof Error?h.message:h))}},"onabort"),a=e&&setTimeout(()=>{a=null,i(new at(`timeout ${e} of ms exceeded`,at.ETIMEDOUT))},e),u=o(()=>{r&&(a&&clearTimeout(a),a=null,r.forEach(f=>{f.unsubscribe?f.unsubscribe(i):f.removeEventListener("abort",i)}),r=null)},"unsubscribe");r.forEach(f=>f.addEventListener("abort",i));let{signal:c}=n;return c.unsubscribe=()=>fe.asap(u),c}},"composeSignals"),Bne=_ne,Dne=o(function*(r,e){let t=r.byteLength;if(!e||t<e){yield r;return}let n=0,s;for(;n<t;)s=n+e,yield r.slice(n,s),n=s},"streamChunk"),Rne=o(async function*(r,e){for await(let t of Pne(r))yield*Dne(t,e)},"readBytes"),Pne=o(async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}let e=r.getReader();try{for(;;){let{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},"readStream"),V8=o((r,e,t,n)=>{let s=Rne(r,e),i=0,a,u=o(c=>{a||(a=!0,n&&n(c))},"_onFinish");return new ReadableStream({async pull(c){try{let{done:f,value:h}=await s.next();if(f){u(),c.close();return}let m=h.byteLength;if(t){let g=i+=m;t(g)}c.enqueue(new Uint8Array(h))}catch(f){throw u(f),f}},cancel(c){return u(c),s.return()}},{highWaterMark:2})},"trackStream"),U8=64*1024,{isFunction:tS}=fe,One=(({Request:r,Response:e})=>({Request:r,Response:e}))(fe.global),{ReadableStream:j8,TextEncoder:M8}=fe.global,F8=o((r,...e)=>{try{return!!r(...e)}catch{return!1}},"test"),kne=o(r=>{r=fe.merge.call({skipUndefined:!0},One,r);let{fetch:e,Request:t,Response:n}=r,s=e?tS(e):typeof fetch=="function",i=tS(t),a=tS(n);if(!s)return!1;let u=s&&tS(j8),c=s&&(typeof M8=="function"?(v=>w=>v.encode(w))(new M8):async v=>new Uint8Array(await new t(v).arrayBuffer())),f=i&&u&&F8(()=>{let v=!1,w=new t(en.origin,{body:new j8,method:"POST",get duplex(){return v=!0,"half"}}).headers.has("Content-Type");return v&&!w}),h=a&&u&&F8(()=>fe.isReadableStream(new n("").body)),m={stream:h&&(v=>v.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!m[v]&&(m[v]=(w,S)=>{let A=w&&w[v];if(A)return A.call(w);throw new at(`Response type '${v}' is not supported`,at.ERR_NOT_SUPPORT,S)})});let g=o(async v=>{if(v==null)return 0;if(fe.isBlob(v))return v.size;if(fe.isSpecCompliantForm(v))return(await new t(en.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(fe.isArrayBufferView(v)||fe.isArrayBuffer(v))return v.byteLength;if(fe.isURLSearchParams(v)&&(v=v+""),fe.isString(v))return(await c(v)).byteLength},"getBodyLength"),x=o(async(v,w)=>{let S=fe.toFiniteNumber(v.getContentLength());return S??g(w)},"resolveBodyLength");return async v=>{let{url:w,method:S,data:A,signal:T,cancelToken:b,timeout:E,onDownloadProgress:C,onUploadProgress:_,responseType:F,headers:R,withCredentials:q="same-origin",fetchOptions:H}=p5(v),K=e||fetch;F=F?(F+"").toLowerCase():"text";let X=Bne([T,b&&b.toAbortSignal()],E),pe=null,le=X&&X.unsubscribe&&(()=>{X.unsubscribe()}),ue;try{if(_&&f&&S!=="get"&&S!=="head"&&(ue=await x(R,A))!==0){let xe=new t(w,{method:"POST",body:A,duplex:"half"}),je;if(fe.isFormData(A)&&(je=xe.headers.get("content-type"))&&R.setContentType(je),xe.body){let[Je,Ze]=oS(ue,Rp(uS(_)));A=V8(xe.body,U8,Je,Ze)}}fe.isString(q)||(q=q?"include":"omit");let ee=i&&"credentials"in t.prototype,he={...H,signal:X,method:S.toUpperCase(),headers:R.normalize().toJSON(),body:A,duplex:"half",credentials:ee?q:void 0};pe=i&&new t(w,he);let we=await(i?K(pe,H):K(w,he)),Ke=h&&(F==="stream"||F==="response");if(h&&(C||Ke&&le)){let xe={};["status","statusText","headers"].forEach(lt=>{xe[lt]=we[lt]});let je=fe.toFiniteNumber(we.headers.get("content-length")),[Je,Ze]=C&&oS(je,Rp(uS(C),!0))||[];we=new n(V8(we.body,U8,Je,()=>{Ze&&Ze(),le&&le()}),xe)}F=F||"text";let Ae=await m[fe.findKey(m,F)||"text"](we,v);return!Ke&&le&&le(),await new Promise((xe,je)=>{_p(xe,je,{data:Ae,headers:ks.from(we.headers),status:we.status,statusText:we.statusText,config:v,request:pe})})}catch(ee){throw le&&le(),ee&&ee.name==="TypeError"&&/Load failed|fetch/i.test(ee.message)?Object.assign(new at("Network Error",at.ERR_NETWORK,v,pe),{cause:ee.cause||ee}):at.from(ee,ee&&ee.code,v,pe)}}},"factory"),Lne=new Map,d5=o(r=>{let e=r?r.env:{},{fetch:t,Request:n,Response:s}=e,i=[n,s,t],a=i.length,u=a,c,f,h=Lne;for(;u--;)c=i[u],f=h.get(c),f===void 0&&h.set(c,f=u?new Map:kne(e)),h=f;return f},"getFetch");d5();var RT={http:Ane,xhr:Ine,fetch:{get:d5}};fe.forEach(RT,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});var q8=o(r=>`- ${r}`,"renderReason"),Vne=o(r=>fe.isFunction(r)||r===null||r===!1,"isResolvedHandle"),m5={getAdapter:o((r,e)=>{r=fe.isArray(r)?r:[r];let{length:t}=r,n,s,i={};for(let a=0;a<t;a++){n=r[a];let u;if(s=n,!Vne(n)&&(s=RT[(u=String(n)).toLowerCase()],s===void 0))throw new at(`Unknown adapter '${u}'`);if(s&&(fe.isFunction(s)||(s=s.get(e))))break;i[u||"#"+a]=s}if(!s){let a=Object.entries(i).map(([c,f])=>`adapter ${c} `+(f===!1?"is not supported by the environment":"is not available in the build")),u=t?a.length>1?`since :
50
+ `+a.map(q8).join(`
51
+ `):" "+q8(a[0]):"as no adapter specified";throw new at("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return s},"getAdapter"),adapters:RT};function AT(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Gu(null,r)}o(AT,"throwIfCancellationRequested");function H8(r){return AT(r),r.headers=ks.from(r.headers),r.data=bT.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),m5.getAdapter(r.adapter||MT.adapter,r)(r).then(o(function(n){return AT(r),n.data=bT.call(r,r.transformResponse,n),n.headers=ks.from(n.headers),n},"onAdapterResolution"),o(function(n){return c5(n)||(AT(r),n&&n.response&&(n.response.data=bT.call(r,r.transformResponse,n.response),n.response.headers=ks.from(n.response.headers))),Promise.reject(n)},"onAdapterRejection"))}o(H8,"dispatchRequest");var pS={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{pS[r]=o(function(n){return typeof n===r||"a"+(e<1?"n ":" ")+r},"validator")});var K8={};pS.transitional=o(function(e,t,n){function s(i,a){return"[Axios v"+aS+"] Transitional option '"+i+"'"+a+(n?". "+n:"")}return o(s,"formatMessage"),(i,a,u)=>{if(e===!1)throw new at(s(a," has been removed"+(t?" in "+t:"")),at.ERR_DEPRECATED);return t&&!K8[a]&&(K8[a]=!0,console.warn(s(a," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(i,a,u):!0}},"transitional");pS.spelling=o(function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)},"spelling");function Une(r,e,t){if(typeof r!="object")throw new at("options must be an object",at.ERR_BAD_OPTION_VALUE);let n=Object.keys(r),s=n.length;for(;s-- >0;){let i=n[s],a=e[i];if(a){let u=r[i],c=u===void 0||a(u,i,r);if(c!==!0)throw new at("option "+i+" must be "+c,at.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new at("Unknown option "+i,at.ERR_BAD_OPTION)}}o(Une,"assertOptions");var sS={assertOptions:Une,validators:pS},Ua=sS.validators,Pp=class{static{o(this,"Axios")}constructor(e){this.defaults=e||{},this.interceptors={request:new N8,response:new N8}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;let i=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
52
+ `+i):n.stack=i}catch{}}throw n}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Hl(this.defaults,t);let{transitional:n,paramsSerializer:s,headers:i}=t;n!==void 0&&sS.assertOptions(n,{silentJSONParsing:Ua.transitional(Ua.boolean),forcedJSONParsing:Ua.transitional(Ua.boolean),clarifyTimeoutError:Ua.transitional(Ua.boolean)},!1),s!=null&&(fe.isFunction(s)?t.paramsSerializer={serialize:s}:sS.assertOptions(s,{encode:Ua.function,serialize:Ua.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),sS.assertOptions(t,{baseUrl:Ua.spelling("baseURL"),withXsrfToken:Ua.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=i&&fe.merge(i.common,i[t.method]);i&&fe.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),t.headers=ks.concat(a,i);let u=[],c=!0;this.interceptors.request.forEach(o(function(w){typeof w.runWhen=="function"&&w.runWhen(t)===!1||(c=c&&w.synchronous,u.unshift(w.fulfilled,w.rejected))},"unshiftRequestInterceptors"));let f=[];this.interceptors.response.forEach(o(function(w){f.push(w.fulfilled,w.rejected)},"pushResponseInterceptors"));let h,m=0,g;if(!c){let v=[H8.bind(this),void 0];for(v.unshift(...u),v.push(...f),g=v.length,h=Promise.resolve(t);m<g;)h=h.then(v[m++],v[m++]);return h}g=u.length;let x=t;for(;m<g;){let v=u[m++],w=u[m++];try{x=v(x)}catch(S){w.call(this,S);break}}try{h=H8.call(this,x)}catch(v){return Promise.reject(v)}for(m=0,g=f.length;m<g;)h=h.then(f[m++],f[m++]);return h}getUri(e){e=Hl(this.defaults,e);let t=FT(e.baseURL,e.url,e.allowAbsoluteUrls);return LT(t,e.params,e.paramsSerializer)}};fe.forEach(["delete","get","head","options"],o(function(e){Pp.prototype[e]=function(t,n){return this.request(Hl(n||{},{method:e,url:t,data:(n||{}).data}))}},"forEachMethodNoData"));fe.forEach(["post","put","patch"],o(function(e){function t(n){return o(function(i,a,u){return this.request(Hl(u||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))},"httpMethod")}o(t,"generateHTTPMethod"),Pp.prototype[e]=t(),Pp.prototype[e+"Form"]=t(!0)},"forEachMethodWithData"));var iS=Pp,PT=class r{static{o(this,"CancelToken")}constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(o(function(i){t=i},"promiseExecutor"));let n=this;this.promise.then(s=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](s);n._listeners=null}),this.promise.then=s=>{let i,a=new Promise(u=>{n.subscribe(u),i=u}).then(s);return a.cancel=o(function(){n.unsubscribe(i)},"reject"),a},e(o(function(i,a,u){n.reason||(n.reason=new Gu(i,a,u),t(n.reason))},"cancel"))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=o(n=>{e.abort(n)},"abort");return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new r(o(function(s){e=s},"executor")),cancel:e}}},jne=PT;function Mne(r){return o(function(t){return r.apply(null,t)},"wrap")}o(Mne,"spread");function Fne(r){return fe.isObject(r)&&r.isAxiosError===!0}o(Fne,"isAxiosError");var OT={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(OT).forEach(([r,e])=>{OT[e]=r});var qne=OT;function g5(r){let e=new iS(r),t=W8(iS.prototype.request,e);return fe.extend(t,iS.prototype,e,{allOwnKeys:!0}),fe.extend(t,e,null,{allOwnKeys:!0}),t.create=o(function(s){return g5(Hl(r,s))},"create"),t}o(g5,"createInstance");var mn=g5(MT);mn.Axios=iS;mn.CanceledError=Gu;mn.CancelToken=jne;mn.isCancel=c5;mn.VERSION=aS;mn.toFormData=hS;mn.AxiosError=at;mn.Cancel=mn.CanceledError;mn.all=o(function(e){return Promise.all(e)},"all");mn.spread=Mne;mn.isAxiosError=Fne;mn.mergeConfig=Hl;mn.AxiosHeaders=ks;mn.formToJSON=r=>u5(fe.isHTMLForm(r)?new FormData(r):r);mn.getAdapter=m5.getAdapter;mn.HttpStatusCode=qne;mn.default=mn;v5.exports=mn});var y5=Z((q0e,Pr)=>{"use strict";Pr.exports.NTLMFLAG_NEGOTIATE_UNICODE=1;Pr.exports.NTLMFLAG_NEGOTIATE_OEM=2;Pr.exports.NTLMFLAG_REQUEST_TARGET=4;Pr.exports.NTLMFLAG_NEGOTIATE_SIGN=16;Pr.exports.NTLMFLAG_NEGOTIATE_SEAL=32;Pr.exports.NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE=64;Pr.exports.NTLMFLAG_NEGOTIATE_LM_KEY=128;Pr.exports.NTLMFLAG_NEGOTIATE_NETWARE=256;Pr.exports.NTLMFLAG_NEGOTIATE_NTLM_KEY=512;Pr.exports.NTLMFLAG_NEGOTIATE_ANONYMOUS=2048;Pr.exports.NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED=4096;Pr.exports.NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED=8192;Pr.exports.NTLMFLAG_NEGOTIATE_LOCAL_CALL=16384;Pr.exports.NTLMFLAG_NEGOTIATE_ALWAYS_SIGN=32768;Pr.exports.NTLMFLAG_TARGET_TYPE_DOMAIN=65536;Pr.exports.NTLMFLAG_TARGET_TYPE_SERVER=1<<17;Pr.exports.NTLMFLAG_TARGET_TYPE_SHARE=1<<18;Pr.exports.NTLMFLAG_NEGOTIATE_NTLM2_KEY=1<<19;Pr.exports.NTLMFLAG_REQUEST_INIT_RESPONSE=1<<20;Pr.exports.NTLMFLAG_REQUEST_ACCEPT_RESPONSE=1<<21;Pr.exports.NTLMFLAG_REQUEST_NONNT_SESSION_KEY=1<<22;Pr.exports.NTLMFLAG_NEGOTIATE_TARGET_INFO=1<<23;Pr.exports.NTLMFLAG_NEGOTIATE_128=1<<29;Pr.exports.NTLMFLAG_NEGOTIATE_KEY_EXCHANGE=1<<30;Pr.exports.NTLMFLAG_NEGOTIATE_56=1<<31});var HT=Z(_i=>{"use strict";_i.readUInt32BE=o(function(e,t){var n=e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t];return n>>>0},"readUInt32BE");_i.writeUInt32BE=o(function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=t&255},"writeUInt32BE");_i.ip=o(function(e,t,n,s){for(var i=0,a=0,u=6;u>=0;u-=2){for(var c=0;c<=24;c+=8)i<<=1,i|=t>>>c+u&1;for(var c=0;c<=24;c+=8)i<<=1,i|=e>>>c+u&1}for(var u=6;u>=0;u-=2){for(var c=1;c<=25;c+=8)a<<=1,a|=t>>>c+u&1;for(var c=1;c<=25;c+=8)a<<=1,a|=e>>>c+u&1}n[s+0]=i>>>0,n[s+1]=a>>>0},"ip");_i.rip=o(function(e,t,n,s){for(var i=0,a=0,u=0;u<4;u++)for(var c=24;c>=0;c-=8)i<<=1,i|=t>>>c+u&1,i<<=1,i|=e>>>c+u&1;for(var u=4;u<8;u++)for(var c=24;c>=0;c-=8)a<<=1,a|=t>>>c+u&1,a<<=1,a|=e>>>c+u&1;n[s+0]=i>>>0,n[s+1]=a>>>0},"rip");_i.pc1=o(function(e,t,n,s){for(var i=0,a=0,u=7;u>=5;u--){for(var c=0;c<=24;c+=8)i<<=1,i|=t>>c+u&1;for(var c=0;c<=24;c+=8)i<<=1,i|=e>>c+u&1}for(var c=0;c<=24;c+=8)i<<=1,i|=t>>c+u&1;for(var u=1;u<=3;u++){for(var c=0;c<=24;c+=8)a<<=1,a|=t>>c+u&1;for(var c=0;c<=24;c+=8)a<<=1,a|=e>>c+u&1}for(var c=0;c<=24;c+=8)a<<=1,a|=e>>c+u&1;n[s+0]=i>>>0,n[s+1]=a>>>0},"pc1");_i.r28shl=o(function(e,t){return e<<t&268435455|e>>>28-t},"r28shl");var dS=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];_i.pc2=o(function(e,t,n,s){for(var i=0,a=0,u=dS.length>>>1,c=0;c<u;c++)i<<=1,i|=e>>>dS[c]&1;for(var c=u;c<dS.length;c++)a<<=1,a|=t>>>dS[c]&1;n[s+0]=i>>>0,n[s+1]=a>>>0},"pc2");_i.expand=o(function(e,t,n){var s=0,i=0;s=(e&1)<<5|e>>>27;for(var a=23;a>=15;a-=4)s<<=6,s|=e>>>a&63;for(var a=11;a>=3;a-=4)i|=e>>>a&63,i<<=6;i|=(e&31)<<1|e>>>31,t[n+0]=s>>>0,t[n+1]=i>>>0},"expand");var x5=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];_i.substitute=o(function(e,t){for(var n=0,s=0;s<4;s++){var i=e>>>18-s*6&63,a=x5[s*64+i];n<<=4,n|=a}for(var s=0;s<4;s++){var i=t>>>18-s*6&63,a=x5[256+s*64+i];n<<=4,n|=a}return n>>>0},"substitute");var w5=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];_i.permute=o(function(e){for(var t=0,n=0;n<w5.length;n++)t<<=1,t|=e>>>w5[n]&1;return t>>>0},"permute");_i.padSplit=o(function(e,t,n){for(var s=e.toString(2);s.length<t;)s="0"+s;for(var i=[],a=0;a<t;a+=n)i.push(s.slice(a,a+n));return i.join(" ")},"padSplit")});var Eg=Z(($0e,b5)=>{"use strict";b5.exports=S5;function S5(r,e){if(!r)throw new Error(e||"Assertion failed")}o(S5,"assert");S5.equal=o(function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)},"assertEqual")});var mS=Z((X0e,E5)=>{"use strict";var Hne=Eg();function Bi(r){this.options=r,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=r.padding!==!1}o(Bi,"Cipher");E5.exports=Bi;Bi.prototype._init=o(function(){},"_init");Bi.prototype.update=o(function(e){return e.length===0?[]:this.type==="decrypt"?this._updateDecrypt(e):this._updateEncrypt(e)},"update");Bi.prototype._buffer=o(function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),s=0;s<n;s++)this.buffer[this.bufferOff+s]=e[t+s];return this.bufferOff+=n,n},"_buffer");Bi.prototype._flushBuffer=o(function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},"_flushBuffer");Bi.prototype._updateEncrypt=o(function(e){var t=0,n=0,s=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(s*this.blockSize);this.bufferOff!==0&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(i,n)));for(var a=e.length-(e.length-t)%this.blockSize;t<a;t+=this.blockSize)this._update(e,t,i,n),n+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},"_updateEncrypt");Bi.prototype._updateDecrypt=o(function(e){for(var t=0,n=0,s=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(s*this.blockSize);s>0;s--)t+=this._buffer(e,t),n+=this._flushBuffer(i,n);return t+=this._buffer(e,t),i},"_updateDecrypt");Bi.prototype.final=o(function(e){var t;e&&(t=this.update(e));var n;return this.type==="encrypt"?n=this._finalEncrypt():n=this._finalDecrypt(),t?t.concat(n):n},"final");Bi.prototype._pad=o(function(e,t){if(t===0)return!1;for(;t<e.length;)e[t++]=0;return!0},"_pad");Bi.prototype._finalEncrypt=o(function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},"_finalEncrypt");Bi.prototype._unpad=o(function(e){return e},"_unpad");Bi.prototype._finalDecrypt=o(function(){Hne.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)},"_finalDecrypt")});var A5=Z((z0e,KT)=>{"use strict";typeof Object.create=="function"?KT.exports=o(function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))},"inherits"):KT.exports=o(function(e,t){if(t){e.super_=t;var n=o(function(){},"TempCtor");n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},"inherits")});var gS=Z((Y0e,GT)=>{"use strict";try{if($T=Xe("util"),typeof $T.inherits!="function")throw"";GT.exports=$T.inherits}catch{GT.exports=A5()}var $T});var XT=Z((Q0e,T5)=>{"use strict";var C5=Eg(),Kne=gS(),bn=HT(),N5=mS();function $ne(){this.tmp=new Array(2),this.keys=null}o($ne,"DESState");function Ma(r){N5.call(this,r);var e=new $ne;this._desState=e,this.deriveKeys(e,r.key)}o(Ma,"DES");Kne(Ma,N5);T5.exports=Ma;Ma.create=o(function(e){return new Ma(e)},"create");var Gne=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Ma.prototype.deriveKeys=o(function(e,t){e.keys=new Array(32),C5.equal(t.length,this.blockSize,"Invalid key length");var n=bn.readUInt32BE(t,0),s=bn.readUInt32BE(t,4);bn.pc1(n,s,e.tmp,0),n=e.tmp[0],s=e.tmp[1];for(var i=0;i<e.keys.length;i+=2){var a=Gne[i>>>1];n=bn.r28shl(n,a),s=bn.r28shl(s,a),bn.pc2(n,s,e.keys,i)}},"deriveKeys");Ma.prototype._update=o(function(e,t,n,s){var i=this._desState,a=bn.readUInt32BE(e,t),u=bn.readUInt32BE(e,t+4);bn.ip(a,u,i.tmp,0),a=i.tmp[0],u=i.tmp[1],this.type==="encrypt"?this._encrypt(i,a,u,i.tmp,0):this._decrypt(i,a,u,i.tmp,0),a=i.tmp[0],u=i.tmp[1],bn.writeUInt32BE(n,a,s),bn.writeUInt32BE(n,u,s+4)},"_update");Ma.prototype._pad=o(function(e,t){if(this.padding===!1)return!1;for(var n=e.length-t,s=t;s<e.length;s++)e[s]=n;return!0},"_pad");Ma.prototype._unpad=o(function(e){if(this.padding===!1)return e;for(var t=e[e.length-1],n=e.length-t;n<e.length;n++)C5.equal(e[n],t);return e.slice(0,e.length-t)},"_unpad");Ma.prototype._encrypt=o(function(e,t,n,s,i){for(var a=t,u=n,c=0;c<e.keys.length;c+=2){var f=e.keys[c],h=e.keys[c+1];bn.expand(u,e.tmp,0),f^=e.tmp[0],h^=e.tmp[1];var m=bn.substitute(f,h),g=bn.permute(m),x=u;u=(a^g)>>>0,a=x}bn.rip(u,a,s,i)},"_encrypt");Ma.prototype._decrypt=o(function(e,t,n,s,i){for(var a=n,u=t,c=e.keys.length-2;c>=0;c-=2){var f=e.keys[c],h=e.keys[c+1];bn.expand(a,e.tmp,0),f^=e.tmp[0],h^=e.tmp[1];var m=bn.substitute(f,h),g=bn.permute(m),x=a;a=(u^g)>>>0,u=x}bn.rip(a,u,s,i)},"_decrypt")});var _5=Z(I5=>{"use strict";var Xne=Eg(),Wne=gS(),vS={};function zne(r){Xne.equal(r.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=r[e]}o(zne,"CBCState");function Jne(r){function e(i){r.call(this,i),this._cbcInit()}o(e,"CBC"),Wne(e,r);for(var t=Object.keys(vS),n=0;n<t.length;n++){var s=t[n];e.prototype[s]=vS[s]}return e.create=o(function(a){return new e(a)},"create"),e}o(Jne,"instantiate");I5.instantiate=Jne;vS._cbcInit=o(function(){var e=new zne(this.options.iv);this._cbcState=e},"_cbcInit");vS._update=o(function(e,t,n,s){var i=this._cbcState,a=this.constructor.super_.prototype,u=i.iv;if(this.type==="encrypt"){for(var c=0;c<this.blockSize;c++)u[c]^=e[t+c];a._update.call(this,u,0,n,s);for(var c=0;c<this.blockSize;c++)u[c]=n[s+c]}else{a._update.call(this,e,t,n,s);for(var c=0;c<this.blockSize;c++)n[s+c]^=u[c];for(var c=0;c<this.blockSize;c++)u[c]=e[t+c]}},"_update")});var R5=Z((rge,D5)=>{"use strict";var Yne=Eg(),Qne=gS(),B5=mS(),Xu=XT();function Zne(r,e){Yne.equal(e.length,24,"Invalid key length");var t=e.slice(0,8),n=e.slice(8,16),s=e.slice(16,24);r==="encrypt"?this.ciphers=[Xu.create({type:"encrypt",key:t}),Xu.create({type:"decrypt",key:n}),Xu.create({type:"encrypt",key:s})]:this.ciphers=[Xu.create({type:"decrypt",key:s}),Xu.create({type:"encrypt",key:n}),Xu.create({type:"decrypt",key:t})]}o(Zne,"EDEState");function Kl(r){B5.call(this,r);var e=new Zne(this.type,this.options.key);this._edeState=e}o(Kl,"EDE");Qne(Kl,B5);D5.exports=Kl;Kl.create=o(function(e){return new Kl(e)},"create");Kl.prototype._update=o(function(e,t,n,s){var i=this._edeState;i.ciphers[0]._update(e,t,n,s),i.ciphers[1]._update(n,s,n,s),i.ciphers[2]._update(n,s,n,s)},"_update");Kl.prototype._pad=Xu.prototype._pad;Kl.prototype._unpad=Xu.prototype._unpad});var P5=Z(kp=>{"use strict";kp.utils=HT();kp.Cipher=mS();kp.DES=XT();kp.CBC=_5();kp.EDE=R5()});var O5=Z((ige,yS)=>{"use strict";(function(){"use strict";var r=typeof window=="object"?window:{},e=!r.JS_MD4_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;e&&(r=global);var t=!r.JS_MD4_NO_COMMON_JS&&typeof yS=="object"&&yS.exports,n=typeof define=="function"&&define.amd,s=!r.JS_MD4_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",i="0123456789abcdef".split(""),a=[128,32768,8388608,-2147483648],u=[0,8,16,24],c=["hex","array","digest","buffer","arrayBuffer"],f=[],h;if(s){var m=new ArrayBuffer(68);h=new Uint8Array(m),f=new Uint32Array(m)}var g=o(function(A){return function(T){return new w(!0).update(T)[A]()}},"createOutputMethod"),x=o(function(){var A=g("hex");e&&(A=v(A)),A.create=function(){return new w},A.update=function(E){return A.create().update(E)};for(var T=0;T<c.length;++T){var b=c[T];A[b]=g(b)}return A},"createMethod"),v=o(function(A){var T=Xe("crypto"),b=Xe("buffer").Buffer,E=o(function(C){if(typeof C=="string")return T.createHash("md4").update(C,"utf8").digest("hex");if(s&&C instanceof ArrayBuffer)C=new Uint8Array(C);else if(C.length===void 0)return A(C);return T.createHash("md4").update(new b(C)).digest("hex")},"nodeMethod");return E},"nodeWrap");function w(A){if(A)f[0]=f[16]=f[1]=f[2]=f[3]=f[4]=f[5]=f[6]=f[7]=f[8]=f[9]=f[10]=f[11]=f[12]=f[13]=f[14]=f[15]=0,this.blocks=f,this.buffer8=h;else if(s){var T=new ArrayBuffer(68);this.buffer8=new Uint8Array(T),this.blocks=new Uint32Array(T)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=0,this.finalized=this.hashed=!1,this.first=!0}o(w,"Md4"),w.prototype.update=function(A){if(!this.finalized){var T=typeof A!="string";T&&s&&A instanceof ArrayBuffer&&(A=new Uint8Array(A));for(var b,E=0,C,_=A.length||0,F=this.blocks,R=this.buffer8;E<_;){if(this.hashed&&(this.hashed=!1,F[0]=F[16],F[16]=F[1]=F[2]=F[3]=F[4]=F[5]=F[6]=F[7]=F[8]=F[9]=F[10]=F[11]=F[12]=F[13]=F[14]=F[15]=0),T)if(s)for(C=this.start;E<_&&C<64;++E)R[C++]=A[E];else for(C=this.start;E<_&&C<64;++E)F[C>>2]|=A[E]<<u[C++&3];else if(s)for(C=this.start;E<_&&C<64;++E)b=A.charCodeAt(E),b<128?R[C++]=b:b<2048?(R[C++]=192|b>>6,R[C++]=128|b&63):b<55296||b>=57344?(R[C++]=224|b>>12,R[C++]=128|b>>6&63,R[C++]=128|b&63):(b=65536+((b&1023)<<10|A.charCodeAt(++E)&1023),R[C++]=240|b>>18,R[C++]=128|b>>12&63,R[C++]=128|b>>6&63,R[C++]=128|b&63);else for(C=this.start;E<_&&C<64;++E)b=A.charCodeAt(E),b<128?F[C>>2]|=b<<u[C++&3]:b<2048?(F[C>>2]|=(192|b>>6)<<u[C++&3],F[C>>2]|=(128|b&63)<<u[C++&3]):b<55296||b>=57344?(F[C>>2]|=(224|b>>12)<<u[C++&3],F[C>>2]|=(128|b>>6&63)<<u[C++&3],F[C>>2]|=(128|b&63)<<u[C++&3]):(b=65536+((b&1023)<<10|A.charCodeAt(++E)&1023),F[C>>2]|=(240|b>>18)<<u[C++&3],F[C>>2]|=(128|b>>12&63)<<u[C++&3],F[C>>2]|=(128|b>>6&63)<<u[C++&3],F[C>>2]|=(128|b&63)<<u[C++&3]);this.lastByteIndex=C,this.bytes+=C-this.start,C>=64?(this.start=C-64,this.hash(),this.hashed=!0):this.start=C}return this}},w.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var A=this.blocks,T=this.lastByteIndex;A[T>>2]|=a[T&3],T>=56&&(this.hashed||this.hash(),A[0]=A[16],A[16]=A[1]=A[2]=A[3]=A[4]=A[5]=A[6]=A[7]=A[8]=A[9]=A[10]=A[11]=A[12]=A[13]=A[14]=A[15]=0),A[14]=this.bytes<<3,this.hash()}},w.prototype.hash=function(){var A,T,b,E,C,_,F,R,q=this.blocks;this.first?(A=q[0]-1,A=A<<3|A>>>29,E=(A&4023233417|~A&2562383102)+q[1]+271733878,E=E<<7|E>>>25,b=(E&A|~E&4023233417)+q[2]-1732584194,b=b<<11|b>>>21,T=(b&E|~b&A)+q[3]-271733879,T=T<<19|T>>>13):(A=this.h0,T=this.h1,b=this.h2,E=this.h3,A+=(T&b|~T&E)+q[0],A=A<<3|A>>>29,E+=(A&T|~A&b)+q[1],E=E<<7|E>>>25,b+=(E&A|~E&T)+q[2],b=b<<11|b>>>21,T+=(b&E|~b&A)+q[3],T=T<<19|T>>>13),A+=(T&b|~T&E)+q[4],A=A<<3|A>>>29,E+=(A&T|~A&b)+q[5],E=E<<7|E>>>25,b+=(E&A|~E&T)+q[6],b=b<<11|b>>>21,T+=(b&E|~b&A)+q[7],T=T<<19|T>>>13,A+=(T&b|~T&E)+q[8],A=A<<3|A>>>29,E+=(A&T|~A&b)+q[9],E=E<<7|E>>>25,b+=(E&A|~E&T)+q[10],b=b<<11|b>>>21,T+=(b&E|~b&A)+q[11],T=T<<19|T>>>13,A+=(T&b|~T&E)+q[12],A=A<<3|A>>>29,E+=(A&T|~A&b)+q[13],E=E<<7|E>>>25,b+=(E&A|~E&T)+q[14],b=b<<11|b>>>21,T+=(b&E|~b&A)+q[15],T=T<<19|T>>>13,_=T&b,A+=(_|T&E|b&E)+q[0]+1518500249,A=A<<3|A>>>29,C=A&T,E+=(C|A&b|_)+q[4]+1518500249,E=E<<5|E>>>27,R=E&A,b+=(R|E&T|C)+q[8]+1518500249,b=b<<9|b>>>23,F=b&E,T+=(F|b&A|R)+q[12]+1518500249,T=T<<13|T>>>19,_=T&b,A+=(_|T&E|F)+q[1]+1518500249,A=A<<3|A>>>29,C=A&T,E+=(C|A&b|_)+q[5]+1518500249,E=E<<5|E>>>27,R=E&A,b+=(R|E&T|C)+q[9]+1518500249,b=b<<9|b>>>23,F=b&E,T+=(F|b&A|R)+q[13]+1518500249,T=T<<13|T>>>19,_=T&b,A+=(_|T&E|F)+q[2]+1518500249,A=A<<3|A>>>29,C=A&T,E+=(C|A&b|_)+q[6]+1518500249,E=E<<5|E>>>27,R=E&A,b+=(R|E&T|C)+q[10]+1518500249,b=b<<9|b>>>23,F=b&E,T+=(F|b&A|R)+q[14]+1518500249,T=T<<13|T>>>19,_=T&b,A+=(_|T&E|F)+q[3]+1518500249,A=A<<3|A>>>29,C=A&T,E+=(C|A&b|_)+q[7]+1518500249,E=E<<5|E>>>27,R=E&A,b+=(R|E&T|C)+q[11]+1518500249,b=b<<9|b>>>23,T+=(b&E|b&A|R)+q[15]+1518500249,T=T<<13|T>>>19,_=T^b,A+=(_^E)+q[0]+1859775393,A=A<<3|A>>>29,E+=(_^A)+q[8]+1859775393,E=E<<9|E>>>23,R=E^A,b+=(R^T)+q[4]+1859775393,b=b<<11|b>>>21,T+=(R^b)+q[12]+1859775393,T=T<<15|T>>>17,_=T^b,A+=(_^E)+q[2]+1859775393,A=A<<3|A>>>29,E+=(_^A)+q[10]+1859775393,E=E<<9|E>>>23,R=E^A,b+=(R^T)+q[6]+1859775393,b=b<<11|b>>>21,T+=(R^b)+q[14]+1859775393,T=T<<15|T>>>17,_=T^b,A+=(_^E)+q[1]+1859775393,A=A<<3|A>>>29,E+=(_^A)+q[9]+1859775393,E=E<<9|E>>>23,R=E^A,b+=(R^T)+q[5]+1859775393,b=b<<11|b>>>21,T+=(R^b)+q[13]+1859775393,T=T<<15|T>>>17,_=T^b,A+=(_^E)+q[3]+1859775393,A=A<<3|A>>>29,E+=(_^A)+q[11]+1859775393,E=E<<9|E>>>23,R=E^A,b+=(R^T)+q[7]+1859775393,b=b<<11|b>>>21,T+=(R^b)+q[15]+1859775393,T=T<<15|T>>>17,this.first?(this.h0=A+1732584193<<0,this.h1=T-271733879<<0,this.h2=b-1732584194<<0,this.h3=E+271733878<<0,this.first=!1):(this.h0=this.h0+A<<0,this.h1=this.h1+T<<0,this.h2=this.h2+b<<0,this.h3=this.h3+E<<0)},w.prototype.hex=function(){this.finalize();var A=this.h0,T=this.h1,b=this.h2,E=this.h3;return i[A>>4&15]+i[A&15]+i[A>>12&15]+i[A>>8&15]+i[A>>20&15]+i[A>>16&15]+i[A>>28&15]+i[A>>24&15]+i[T>>4&15]+i[T&15]+i[T>>12&15]+i[T>>8&15]+i[T>>20&15]+i[T>>16&15]+i[T>>28&15]+i[T>>24&15]+i[b>>4&15]+i[b&15]+i[b>>12&15]+i[b>>8&15]+i[b>>20&15]+i[b>>16&15]+i[b>>28&15]+i[b>>24&15]+i[E>>4&15]+i[E&15]+i[E>>12&15]+i[E>>8&15]+i[E>>20&15]+i[E>>16&15]+i[E>>28&15]+i[E>>24&15]},w.prototype.toString=w.prototype.hex,w.prototype.digest=function(){this.finalize();var A=this.h0,T=this.h1,b=this.h2,E=this.h3;return[A&255,A>>8&255,A>>16&255,A>>24&255,T&255,T>>8&255,T>>16&255,T>>24&255,b&255,b>>8&255,b>>16&255,b>>24&255,E&255,E>>8&255,E>>16&255,E>>24&255]},w.prototype.array=w.prototype.digest,w.prototype.arrayBuffer=function(){this.finalize();var A=new ArrayBuffer(16),T=new Uint32Array(A);return T[0]=this.h0,T[1]=this.h1,T[2]=this.h2,T[3]=this.h3,A},w.prototype.buffer=w.prototype.arrayBuffer;var S=x();t?yS.exports=S:(r.md4=S,n&&define(function(){return S}))})()});var V5=Z((uge,L5)=>{"use strict";var WT=Xe("crypto"),oge=P5(),ese=O5();function tse(r,e){var t=new Buffer.alloc(24),n=new Buffer.alloc(21).fill(0);return e.copy(n),Wu(n.slice(0,7),r).copy(t),Wu(n.slice(7,14),r).copy(t,8),Wu(n.slice(14),r).copy(t,16),t}o(tse,"createLMResponse");function rse(r){var e=new Buffer.alloc(16),t=new Buffer.alloc(14),n=new Buffer.from("KGS!@#$%","ascii");return r.length>14?(e.fill(0),e):(t.fill(0),t.write(r.toUpperCase(),0,"ascii"),Buffer.concat([Wu(t.slice(0,7),n),Wu(t.slice(7),n)]))}o(rse,"createLMHash");function Wu(r,e){var t=new Buffer.alloc(8);t[0]=r[0]&254,t[1]=r[0]<<7&255|r[1]>>1,t[2]=r[1]<<6&255|r[2]>>2,t[3]=r[2]<<5&255|r[3]>>3,t[4]=r[3]<<4&255|r[4]>>4,t[5]=r[4]<<3&255|r[5]>>5,t[6]=r[5]<<2&255|r[6]>>6,t[7]=r[6]<<1&255;for(var n=0;n<8;n++){for(var s=0,i=1;i<8;i++)s+=(t[n]>>i)%2;t[n]|=s%2===0?1:0}var a=a.DES.create({type:"encrypt",ley:t});return a.update(e)}o(Wu,"calculateDES");function nse(r,e){var t=new Buffer.alloc(24),n=new Buffer.alloc(21).fill(0);return e.copy(n),Wu(n.slice(0,7),r).copy(t),Wu(n.slice(7,14),r).copy(t,8),Wu(n.slice(14),r).copy(t,16),t}o(nse,"createNTLMResponse");function sse(r){var e=ese.create();return e.update(new Buffer.from(r,"ucs2")),e.buffer()}o(sse,"createNTLMHash");function k5(r,e,t){var n=WT.createHmac("md5",r);return n.update(new Buffer.from(e.toUpperCase()+t,"ucs2")),n.digest()}o(k5,"createNTLMv2Hash");function ise(r,e,t,n,s){var i=new Buffer.alloc(24),a=k5(t,e,s),u=WT.createHmac("md5",a);r.challenge.copy(i,8),i.write(n||zT(16),16,"hex"),u.update(i.slice(8));var c=u.digest();return c.copy(i),i}o(ise,"createLMv2Response");function ase(r,e,t,n,s){var i=new Buffer.alloc(48+r.targetInfo.buffer.length),a=k5(t,e,s),u=WT.createHmac("md5",a);r.challenge.copy(i,8),i.writeUInt32BE(16842752,16),i.writeUInt32LE(0,20);var c=((Date.now()+116444736e5)*1e4).toString(16),f=+("0x"+c.substring(Math.max(0,c.length-8))),h=+("0x"+c.substring(0,Math.max(0,c.length-8)));i.writeUInt32LE(f,24,!1),i.writeUInt32LE(h,28,!1),i.write(n||zT(16),32,"hex"),i.writeUInt32LE(0,40),r.targetInfo.buffer.copy(i,44),i.writeUInt32LE(0,44+r.targetInfo.buffer.length),u.update(i.slice(8));var m=u.digest();return m.copy(i),i}o(ase,"createNTLMv2Response");function zT(r){for(var e="";e.length<r;)e+=Math.floor(Math.random()*16).toString(16);return e}o(zT,"createPseudoRandomValue");L5.exports={createLMHash:rse,createNTLMHash:sse,createLMResponse:tse,createNTLMResponse:nse,createLMv2Response:ise,createNTLMv2Response:ase,createPseudoRandomValue:zT}});var M5=Z((lge,j5)=>{"use strict";var U5=Xe("os"),Ju=y5(),zu=V5(),Yu="NTLMSSP\0";function ose(r,e){var t=32,n=0,s=new Buffer.alloc(1024);return r=r===void 0?U5.hostname():r,e=e===void 0?"":e,s.write(Yu,n,Yu.length,"ascii"),n+=Yu.length,s.writeUInt32LE(1,n),n+=4,s.writeUInt32LE(Ju.NTLMFLAG_NEGOTIATE_OEM|Ju.NTLMFLAG_REQUEST_TARGET|Ju.NTLMFLAG_NEGOTIATE_NTLM_KEY|Ju.NTLMFLAG_NEGOTIATE_NTLM2_KEY|Ju.NTLMFLAG_NEGOTIATE_ALWAYS_SIGN,n),n+=4,s.writeUInt16LE(e.length,n),n+=2,s.writeUInt16LE(e.length,n),n+=2,s.writeUInt32LE(e.length===0?0:t,n),n+=4,e.length>0&&(t+=s.write(e,t,"ascii")),s.writeUInt16LE(r.length,n),n+=2,s.writeUInt16LE(r.length,n),n+=2,s.writeUInt32LE(r.length===0?0:t,n),n+=4,r.length>0&&(t+=s.write(r,t,"ascii")),"NTLM "+s.toString("base64",0,t)}o(ose,"createType1Message");function use(r){if(r===void 0)throw new Error("Invalid argument");if(Object.prototype.toString.call(r)!=="[object String]")if(r.hasOwnProperty("headers")&&r.headers.hasOwnProperty("www-authenticate"))r=r.headers["www-authenticate"];else throw new Error("Invalid argument");var e=/^NTLM ([^,\s]+)/.exec(r);e&&(r=e[1]);var t=new Buffer.from(r,"base64"),n={};if(t.toString("ascii",0,Yu.length)!==Yu)throw new Error("Invalid message signature: "+r);if(t.readUInt32LE(Yu.length)!==2)throw new Error("Invalid message type (no type 2)");return n.flags=t.readUInt32LE(20),n.encoding=n.flags&Ju.NTLMFLAG_NEGOTIATE_OEM?"ascii":"ucs2",n.version=n.flags&Ju.NTLMFLAG_NEGOTIATE_NTLM2_KEY?2:1,n.challenge=t.slice(24,32),n.targetName=(function(){var s=t.readUInt16LE(12),i=t.readUInt32LE(16);if(s===0)return"";if(i+s>t.length||i<32)throw new Error("Bad type 2 message");return t.toString(n.encoding,i,i+s)})(),n.flags&Ju.NTLMFLAG_NEGOTIATE_TARGET_INFO&&(n.targetInfo=(function(){var s={},i=t.readUInt16LE(40),a=t.readUInt32LE(44),u=new Buffer.alloc(i);if(t.copy(u,0,a,a+i),i===0)return s;if(a+i>t.length||a<32)throw new Error("Bad type 2 message");for(var c=a;c<a+i;){var f=t.readUInt16LE(c);c+=2;var h=t.readUInt16LE(c);if(c+=2,f===0)break;var m=void 0;switch(f){case 1:m="SERVER";break;case 2:m="DOMAIN";break;case 3:m="FQDN";break;case 4:m="DNS";break;case 5:m="PARENT_DNS";break;default:m="";break}m&&(s[m]=t.toString("ucs2",c,c+h)),c+=h}return{parsed:s,buffer:u}})()),n}o(use,"decodeType2Message");function cse(r,e,t,n,s){var i=52,a=new Buffer.alloc(1024);if(n===void 0&&(n=U5.hostname()),s===void 0&&(s=r.targetName),a.write(Yu,0,Yu.length,"ascii"),a.writeUInt32LE(3,8),r.version===2){i=64;var u=zu.createNTLMHash(t),c=zu.createPseudoRandomValue(16),f=zu.createLMv2Response(r,e,u,c,s),h=zu.createNTLMv2Response(r,e,u,c,s);a.writeUInt16LE(f.length,12),a.writeUInt16LE(f.length,14),a.writeUInt32LE(i,16),f.copy(a,i),i+=f.length,a.writeUInt16LE(h.length,20),a.writeUInt16LE(h.length,22),a.writeUInt32LE(i,24),h.copy(a,i),i+=h.length}else{var m=zu.createLMHash(t),u=zu.createNTLMHash(t),g=zu.createLMResponse(r.challenge,m),x=zu.createNTLMResponse(r.challenge,u);a.writeUInt16LE(g.length,12),a.writeUInt16LE(g.length,14),a.writeUInt32LE(i,16),g.copy(a,i),i+=g.length,a.writeUInt16LE(x.length,20),a.writeUInt16LE(x.length,22),a.writeUInt32LE(i,24),x.copy(a,i),i+=x.length}return a.writeUInt16LE(r.encoding==="ascii"?s.length:s.length*2,28),a.writeUInt16LE(r.encoding==="ascii"?s.length:s.length*2,30),a.writeUInt32LE(i,32),i+=a.write(s,i,r.encoding),a.writeUInt16LE(r.encoding==="ascii"?e.length:e.length*2,36),a.writeUInt16LE(r.encoding==="ascii"?e.length:e.length*2,38),a.writeUInt32LE(i,40),i+=a.write(e,i,r.encoding),a.writeUInt16LE(r.encoding==="ascii"?n.length:n.length*2,44),a.writeUInt16LE(r.encoding==="ascii"?n.length:n.length*2,46),a.writeUInt32LE(i,48),i+=a.write(n,i,r.encoding),r.version===2&&(a.writeUInt16LE(0,52),a.writeUInt16LE(0,54),a.writeUInt32LE(0,56),a.writeUInt32LE(r.flags,60)),"NTLM "+a.toString("base64",0,i)}o(cse,"createType3Message");j5.exports={createType1Message:ose,decodeType2Message:use,createType3Message:cse}});var K5=Z((hge,H5)=>{"use strict";var lse=Xe("util"),fse=Xe("stream"),F5=fse.Writable,q5=q5||function(r){setTimeout(r,0)};H5.exports=Ag;lse.inherits(Ag,F5);function Ag(r){if(!(this instanceof Ag))return new Ag(r);r=r||{},F5.call(this,r)}o(Ag,"DevNull");Ag.prototype._write=function(r,e,t){q5(t)}});var G5=Z($n=>{"use strict";var hse=$n&&$n.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),pse=$n&&$n.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),xS=$n&&$n.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&hse(t,e,n[s]);return pse(t,e),t}})(),dse=$n&&$n.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return o(s,"adopt"),new(t||(t=Promise))(function(i,a){function u(h){try{f(n.next(h))}catch(m){a(m)}}o(u,"fulfilled");function c(h){try{f(n.throw(h))}catch(m){a(m)}}o(c,"rejected");function f(h){h.done?i(h.value):s(h.value).then(u,c)}o(f,"step"),f((n=n.apply(r,e||[])).next())})},mse=$n&&$n.__generator||function(r,e){var t={label:0,sent:o(function(){if(i[0]&1)throw i[1];return i[1]},"sent"),trys:[],ops:[]},n,s,i,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(f){return function(h){return c([f,h])}}function c(f){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,f[0]&&(t=0)),t;)try{if(n=1,s&&(i=f[0]&2?s.return:f[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,f[1])).done)return i;switch(s=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return t.label++,{value:f[1],done:!1};case 5:t.label++,s=f[1],f=[0];continue;case 7:f=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){t=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]<i[3])){t.label=f[1];break}if(f[0]===6&&t.label<i[1]){t.label=i[1],i=f;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(f);break}i[2]&&t.ops.pop(),t.trys.pop();continue}f=e.call(r,t)}catch(h){f=[6,h],s=0}finally{n=i=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},gse=$n&&$n.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($n,"__esModule",{value:!0});$n.AxiosError=void 0;$n.NtlmClient=wse;var $5=xS(qT());Object.defineProperty($n,"AxiosError",{enumerable:!0,get:o(function(){return $5.AxiosError},"get")});var JT=xS(M5()),vse=xS(Xe("https")),yse=xS(Xe("http")),xse=gse(K5());function wse(r,e){var t=this,n=e??{};n.httpAgent||(n.httpAgent=new yse.Agent({keepAlive:!0})),n.httpsAgent||(n.httpsAgent=new vse.Agent({keepAlive:!0}));var s=$5.default.create(n);return s.interceptors.response.use(function(i){return i},function(i){return dse(t,void 0,void 0,function(){var a,u,c,f,h,m,g,x;return mse(this,function(v){switch(v.label){case 0:return a=i.response,a&&a.status===401&&a.headers["www-authenticate"]&&a.headers["www-authenticate"].includes("NTLM")&&(!a.config.headers["X-retry"]||a.config.headers["X-retry"]!=="false")?(u=((g=a.headers["www-authenticate"].split(",").find(function(w){return w.match(/ *NTLM/)}))===null||g===void 0?void 0:g.trim())||"",a.config.headers||(a.config.headers={}),u.length<50?(c=JT.createType1Message(r.workstation,r.domain),a.config.headers.Authorization=c):(f=JT.decodeType2Message((u.match(/^NTLM\s+(.+?)(,|\s+|$)/)||[])[1]),h=JT.createType3Message(f,r.username,r.password,r.workstation,r.domain),a.config.headers["X-retry"]="false",a.config.headers.Authorization=h),a.config.responseType!=="stream"?[3,2]:(m=(x=i.response)===null||x===void 0?void 0:x.data,m&&!m.readableEnded?[4,new Promise(function(w){m.pipe((0,xse.default)()),m.once("close",w)})]:[3,2])):[3,3];case 1:v.sent(),v.label=2;case 2:return[2,s(a.config)];case 3:throw i}})})}),s}o(wse,"NtlmClient")});var Cg=Z(Qu=>{"use strict";Qu.removeLeadingAndTrailingHTTPWhitespace=r=>r.replace(/^[ \t\n\r]+/u,"").replace(/[ \t\n\r]+$/u,"");Qu.removeTrailingHTTPWhitespace=r=>r.replace(/[ \t\n\r]+$/u,"");Qu.isHTTPWhitespaceChar=r=>r===" "||r===" "||r===`
53
+ `||r==="\r";Qu.solelyContainsHTTPTokenCodePoints=r=>/^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/u.test(r);Qu.soleyContainsHTTPQuotedStringTokenCodePoints=r=>/^[\t\u0020-\u007E\u0080-\u00FF]*$/u.test(r);Qu.asciiLowercase=r=>r.replace(/[A-Z]/ug,e=>e.toLowerCase());Qu.collectAnHTTPQuotedString=(r,e)=>{let t="";for(e++;;){for(;e<r.length&&r[e]!=='"'&&r[e]!=="\\";)t+=r[e],++e;if(e>=r.length)break;let n=r[e];if(++e,n==="\\"){if(e>=r.length){t+="\\";break}t+=r[e],++e}else break}return[t,e]}});var W5=Z((yge,X5)=>{"use strict";var{asciiLowercase:wS,solelyContainsHTTPTokenCodePoints:Sse,soleyContainsHTTPQuotedStringTokenCodePoints:bse}=Cg();X5.exports=class{static{o(this,"MIMETypeParameters")}constructor(e){this._map=e}get size(){return this._map.size}get(e){return e=wS(String(e)),this._map.get(e)}has(e){return e=wS(String(e)),this._map.has(e)}set(e,t){if(e=wS(String(e)),t=String(t),!Sse(e))throw new Error(`Invalid MIME type parameter name "${e}": only HTTP token code points are valid.`);if(!bse(t))throw new Error(`Invalid MIME type parameter value "${t}": only HTTP quoted-string token code points are valid.`);return this._map.set(e,t)}clear(){this._map.clear()}delete(e){return e=wS(String(e)),this._map.delete(e)}forEach(e,t){this._map.forEach(e,t)}keys(){return this._map.keys()}values(){return this._map.values()}entries(){return this._map.entries()}[Symbol.iterator](){return this._map[Symbol.iterator]()}}});var Y5=Z((wge,J5)=>{"use strict";var{removeLeadingAndTrailingHTTPWhitespace:Ese,removeTrailingHTTPWhitespace:z5,isHTTPWhitespaceChar:Ase,solelyContainsHTTPTokenCodePoints:YT,soleyContainsHTTPQuotedStringTokenCodePoints:Cse,asciiLowercase:QT,collectAnHTTPQuotedString:Nse}=Cg();J5.exports=r=>{r=Ese(r);let e=0,t="";for(;e<r.length&&r[e]!=="/";)t+=r[e],++e;if(t.length===0||!YT(t)||e>=r.length)return null;++e;let n="";for(;e<r.length&&r[e]!==";";)n+=r[e],++e;if(n=z5(n),n.length===0||!YT(n))return null;let s={type:QT(t),subtype:QT(n),parameters:new Map};for(;e<r.length;){for(++e;Ase(r[e]);)++e;let i="";for(;e<r.length&&r[e]!==";"&&r[e]!=="=";)i+=r[e],++e;if(i=QT(i),e<r.length){if(r[e]===";")continue;++e}let a=null;if(r[e]==='"')for([a,e]=Nse(r,e);e<r.length&&r[e]!==";";)++e;else{for(a="";e<r.length&&r[e]!==";";)a+=r[e],++e;if(a=z5(a),a==="")continue}i.length>0&&YT(i)&&Cse(a)&&!s.parameters.has(i)&&s.parameters.set(i,a)}return s}});var Z5=Z((Sge,Q5)=>{"use strict";var{solelyContainsHTTPTokenCodePoints:Tse}=Cg();Q5.exports=r=>{let e=`${r.type}/${r.subtype}`;if(r.parameters.size===0)return e;for(let[t,n]of r.parameters)e+=";",e+=t,e+="=",(!Tse(n)||n.length===0)&&(n=n.replace(/(["\\])/ug,"\\$1"),n=`"${n}"`),e+=n;return e}});var nV=Z((Ege,rV)=>{"use strict";var Ise=W5(),_se=Y5(),Bse=Z5(),{asciiLowercase:eV,solelyContainsHTTPTokenCodePoints:tV}=Cg();rV.exports=class{static{o(this,"MIMEType")}constructor(e){e=String(e);let t=_se(e);if(t===null)throw new Error(`Could not parse MIME type string "${e}"`);this._type=t.type,this._subtype=t.subtype,this._parameters=new Ise(t.parameters)}static parse(e){try{return new this(e)}catch{return null}}get essence(){return`${this.type}/${this.subtype}`}get type(){return this._type}set type(e){if(e=eV(String(e)),e.length===0)throw new Error("Invalid type: must be a non-empty string");if(!tV(e))throw new Error(`Invalid type ${e}: must contain only HTTP token code points`);this._type=e}get subtype(){return this._subtype}set subtype(e){if(e=eV(String(e)),e.length===0)throw new Error("Invalid subtype: must be a non-empty string");if(!tV(e))throw new Error(`Invalid subtype ${e}: must contain only HTTP token code points`);this._subtype=e}get parameters(){return this._parameters}toString(){return Bse(this)}isJavaScript({prohibitParameters:e=!1}={}){switch(this._type){case"text":switch(this._subtype){case"ecmascript":case"javascript":case"javascript1.0":case"javascript1.1":case"javascript1.2":case"javascript1.3":case"javascript1.4":case"javascript1.5":case"jscript":case"livescript":case"x-ecmascript":case"x-javascript":return!e||this._parameters.size===0;default:return!1}case"application":switch(this._subtype){case"ecmascript":case"javascript":case"x-ecmascript":case"x-javascript":return!e||this._parameters.size===0;default:return!1}default:return!1}}isXML(){return this._subtype==="xml"&&(this._type==="text"||this._type==="application")||this._subtype.endsWith("+xml")}isHTML(){return this._subtype==="html"&&this._type==="text"}}});var Zu=Z(gn=>{"use strict";var Dse=gn&&gn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Rse=gn&&gn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Pse=gn&&gn.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&Dse(t,e,n[s]);return Rse(t,e),t}})();Object.defineProperty(gn,"__esModule",{value:!0});gn.wsdlCacheSingleton=gn.TNS_PREFIX=void 0;gn.passwordDigest=kse;gn.findPrefix=Lse;gn.splitQName=Vse;gn.xmlEscape=Use;gn.parseMTOMResp=jse;var Ose=Pse(Xe("crypto"));function kse(r,e,t){let n=Ose.createHash("sha1"),s=Buffer.from(r||"","base64"),i=Buffer.from(e||"","utf8"),a=Buffer.from(t||"","utf8"),u=Buffer.concat([s,i,a]);return n.update(u),n.digest("base64")}o(kse,"passwordDigest");gn.TNS_PREFIX="__tns__";function Lse(r,e){for(let t in r)if(t!==gn.TNS_PREFIX&&r[t]===e)return t}o(Lse,"findPrefix");function Vse(r){if(typeof r!="string")return{prefix:gn.TNS_PREFIX,name:r};let[e]=r.split("|",1),t=e.indexOf(":");return{prefix:e.substring(0,t)||gn.TNS_PREFIX,name:e.substring(t+1)}}o(Vse,"splitQName");function Use(r){return typeof r=="string"?r.substr(0,9)==="<![CDATA["&&r.substr(-3)==="]]>"?r:r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;"):r}o(Use,"xmlEscape");function jse(r,e,t){return import("./src-NRIPS2N7.mjs").then(({MultipartParser:n})=>{let s={parts:[]},i="",a="",u,c=0,f=new n;return f.initWithBoundary(e),f.on("data",({name:h,buffer:m,start:g,end:x})=>{switch(h){case"partBegin":s.parts[c]={body:null,headers:{}},u=Buffer.from("");break;case"headerField":i=m.slice(g,x).toString();break;case"headerValue":a=m.slice(g,x).toString();break;case"headerEnd":s.parts[c].headers[i.toLowerCase()]=a;break;case"partData":u=Buffer.concat([u,m.slice(g,x)]);break;case"partEnd":s.parts[c].body=u,c++;break}}),f.write(r),t(null,s)}).catch(t)}o(jse,"parseMTOMResp");var Mse=class{static{o(this,"DefaultWSDLCache")}constructor(){this.cache={}}has(e){return!!this.cache[e]}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}clear(){this.cache={}}};gn.wsdlCacheSingleton=new Mse});var sV=Z((Ige,Fse)=>{Fse.exports={name:"soap",version:"1.6.0",description:"A minimal node SOAP client",engines:{node:">=14.17.0"},author:"Vinay Pulim <v@pulim.com>",dependencies:{axios:"^1.12.2","axios-ntlm":"^1.4.6",debug:"^4.4.3",formidable:"^3.5.4","get-stream":"^6.0.1",lodash:"^4.17.21",sax:"^1.4.1","strip-bom":"^3.0.0","whatwg-mimetype":"4.0.0","xml-crypto":"^6.1.2"},repository:{type:"git",url:"https://github.com/vpulim/node-soap.git"},main:"./lib/soap.js",types:"./lib/soap.d.ts",directories:{lib:"./lib",test:"./test"},scripts:{build:"tsc -p .",watch:"tsc -w -p .",lint:"eslint .",format:"prettier --write .","format:check":"prettier --check .",toc:"./node_modules/.bin/doctoc Readme.md --github --maxlevel 3",cover:"OPENSSL_ENABLE_SHA1_SIGNATURES=1 nyc --extension=.ts --reporter=lcov --reporter=html --reporter=text mocha --no-parallel --timeout 30000 --exit test/*-test.js test/security/*.js",coveralls:"cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js -v",docs:"typedoc --out docs",test:"mocha --timeout 15000 --bail --exit test/*-test.js test/security/*.js"},keywords:["soap"],license:"MIT",devDependencies:{"@eslint/js":"^9.38.0","@types/debug":"^4.1.12","@types/formidable":"^3.4.6","@types/lodash":"^4.17.20","@types/node":"^14.0.0","@types/sax":"^1.2.7","@types/whatwg-mimetype":"^3.0.2","body-parser":"^2.2.0",colors:"^1.4.0",diff:"^8.0.2",doctoc:"^2.2.1",duplexer:"~0.1.2",eslint:"^9.38.0",express:"^5.1.0",finalhandler:"^2.1.0",glob:"^11.0.3",mocha:"^11.7.4",nyc:"^17.1.0",prettier:"^3.6.2","readable-stream":"^4.7.0",semver:"^7.7.3","serve-static":"^2.2.0",should:"^13.2.3",sinon:"^21.0.0","source-map-support":"^0.5.21",timekeeper:"^2.3.1",typedoc:"^0.28.14",typescript:"^5.9.3","typescript-eslint":"^8.46.1"}}});var SS=Z(Di=>{"use strict";var qse=Di&&Di.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Hse=Di&&Di.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),oV=Di&&Di.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&qse(t,e,n[s]);return Hse(t,e),t}})(),uV=Di&&Di.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Di,"__esModule",{value:!0});Di.HttpClient=void 0;var Kse=oV(qT()),$se=G5(),iV=Xe("crypto"),Gse=uV(bp()),Xse=oV(Xe("url")),Wse=uV(nV()),zse=Xe("zlib"),Jse=Zu(),aV=(0,Gse.default)("node-soap"),Yse=sV(),Qse=class{static{o(this,"HttpClient")}constructor(e){e=e||{},this.options=e,this._request=e.request||Kse.create()}buildRequest(e,t,n,s={}){let i=Xse.parse(e),a=t?"POST":"GET",u=i.hostname,c=parseInt(i.port,10),f={"User-Agent":"node-soap/"+Yse.version,Accept:"text/html,application/xhtml+xml,application/xml,text/xml;q=0.9,*/*;q=0.8","Accept-Encoding":"none","Accept-Charset":"utf-8",...s.forever&&{Connection:"keep-alive"},Host:u+(isNaN(c)?"":":"+c)},h=["headers"],{attachments:m,...g}=s,x=m||[];typeof t=="string"&&x.length===0&&!s.forceMTOM&&(f["Content-Length"]=Buffer.byteLength(t,"utf8"),f["Content-Type"]="application/x-www-form-urlencoded"),n=n||{};for(let w in n)f[w]=n[w];let v={url:i.href,method:a,headers:f,transformResponse:o(w=>w,"transformResponse")};if(s.ntlm||(v.validateStatus=null),s.forceMTOM||x.length>0){let w=(0,iV.randomUUID)(),S=null;if(f["Content-Type"].indexOf("action")>-1)for(let E of f["Content-Type"].split("; "))E.indexOf("action")>-1&&(S=E);let A=(0,iV.randomUUID)();f["Content-Type"]='multipart/related; type="application/xop+xml"; start="<'+w+'>"; start-info="text/xml"; boundary='+A,S&&(f["Content-Type"]=f["Content-Type"]+"; "+S);let T=[{"Content-Type":'application/xop+xml; charset=UTF-8; type="text/xml"',"Content-ID":"<"+w+">",body:t}];x.forEach(E=>{T.push({"Content-Type":E.mimetype,"Content-Transfer-Encoding":"binary","Content-ID":"<"+E.contentId+">","Content-Disposition":'attachment; filename="'+E.name+'"',body:E.body})}),v.data=[Buffer.from(`--${A}\r
54
+ `)];let b=0;T.forEach(E=>{Object.keys(E).forEach(C=>{C!=="body"&&v.data.push(Buffer.from(`${C}: ${E[C]}\r
55
+ `))}),v.data.push(Buffer.from(`\r
56
+ `),Buffer.from(E.body),Buffer.from(`\r
57
+ --${A}${b===T.length-1?"--":""}\r
58
+ `)),b++}),v.data=Buffer.concat(v.data)}else v.data=t;s.forceGzip&&(v.decompress=!0,v.data=(0,zse.gzipSync)(v.data),v.headers["Accept-Encoding"]="gzip,deflate",v.headers["Content-Encoding"]="gzip");for(let w in g)if(h.indexOf(w)!==-1)for(let S in s[w])v[w][S]=s[w][S];else v[w]=s[w];return aV("Http request: %j",v),v}handleResponse(e,t,n){if(aV("Http response body: %j",n),typeof n=="string"){let s=/(?:<\?[^?]*\?>[\s]*)?<([^:]*):Envelope([\S\s]*)<\/\1:Envelope>/i,i=n.replace(/<!--[\s\S]*?-->/,"").match(s);i&&(n=i[0])}return n}request(e,t,n,s,i){let a=this.buildRequest(e,t,s,i),u;i!==void 0&&i.ntlm?u=(0,$se.NtlmClient)({username:i.username,password:i.password,workstation:i.workstation||"",domain:i.domain||""})(a):(this.options.parseReponseAttachments&&(a.responseType="arraybuffer",a.responseEncoding="binary"),u=this._request(a));let c=this;return u.then(f=>{let h=o(m=>(f.data=this.handleResponse(u,f,m||f.data),n(null,f,f.data),f),"handleBody");if(c.options.parseReponseAttachments)if(f.headers["content-type"]&&f.headers["content-type"].toLowerCase().indexOf("multipart/related")>-1){let g,x=Wse.default.parse(f.headers["content-type"]);return x&&(g=x.parameters.get("boundary")),g?(0,Jse.parseMTOMResp)(f.data,g,(v,w)=>{if(v)return n(v);let S=w.parts.shift();return!S||!S.body?n(new Error("Cannot parse multipart response")):(f.mtomResponseAttachments=w,h(S.body.toString(c.options.encoding||"utf8")))}):n(new Error("Missing boundary from content-type"))}else return h(f.data.toString(c.options.encoding||"utf8"));else return h()},f=>n(f)),u}requestStream(e,t,n,s){let i=this.buildRequest(e,t,n,s);i.responseType="stream";let a=this._request(i).then(u=>(u.data=this.handleResponse(a,u,u.data),u));return a}};Di.HttpClient=Qse});var ZT=Z(Ri=>{"use strict";var Zse=Ri&&Ri.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),eie=Ri&&Ri.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),hV=Ri&&Ri.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&Zse(t,e,n[s]);return eie(t,e),t}})(),pV=Ri&&Ri.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ri,"__esModule",{value:!0});Ri.Client=void 0;var cV=hV(Xe("assert")),tie=Xe("crypto"),rie=pV(bp()),nie=Xe("events"),sie=pV(l4()),lV=hV(_o()),iie=SS(),aie=Zu(),oie=(0,rie.default)("node-soap"),fV=/[^a-z$_0-9]/i,uie=class extends nie.EventEmitter{static{o(this,"Client")}constructor(e,t,n){super(),n=n||{},this.wsdl=e,this._initializeOptions(n),this._initializeServices(t),this.httpClient=n.httpClient||new iie.HttpClient(n)}addSoapHeader(e,t,n,s){return this.soapHeaders||(this.soapHeaders=[]),e=this._processSoapHeader(e,t,n,s),this.soapHeaders.push(e)-1}changeSoapHeader(e,t,n,s,i){this.soapHeaders||(this.soapHeaders=[]),t=this._processSoapHeader(t,n,s,i),this.soapHeaders[e]=t}getSoapHeaders(){return this.soapHeaders}clearSoapHeaders(){this.soapHeaders=null}addHttpHeader(e,t){this.httpHeaders||(this.httpHeaders={}),this.httpHeaders[e]=t}getHttpHeaders(){return this.httpHeaders}clearHttpHeaders(){this.httpHeaders=null}addBodyAttribute(e){if(this.bodyAttributes||(this.bodyAttributes=[]),typeof e=="object"){let t="";Object.getOwnPropertyNames(e).forEach(n=>{t+=" "+n+'="'+e[n]+'"'}),e=t}e.substr(0,1)!==" "&&(e=" "+e),this.bodyAttributes.push(e)}getBodyAttributes(){return this.bodyAttributes}clearBodyAttributes(){this.bodyAttributes=null}setEndpoint(e){this.endpoint=e,this._initializeServices(e)}describe(){return this.wsdl.describeServices()}setSecurity(e){this.security=e}setSOAPAction(e){this.SOAPAction=e}_initializeServices(e){let n=this.wsdl.definitions.services;for(let s in n)this[s]=this._defineService(n[s],e)}_initializeOptions(e){this.streamAllowed=e.stream,this.returnSaxStream=e.returnSaxStream,this.normalizeNames=e.normalizeNames,this.overridePromiseSuffix=e.overridePromiseSuffix||"Async",this.wsdl.options.attributesKey=e.attributesKey||"attributes",this.wsdl.options.envelopeKey=e.envelopeKey||"soap",this.wsdl.options.envelopeSoapUrl=e.envelopeSoapUrl||"http://schemas.xmlsoap.org/soap/envelope/",this.wsdl.options.preserveWhitespace=!!e.preserveWhitespace,this.wsdl.options.forceUseSchemaXmlns=!!e.forceUseSchemaXmlns;let t=e.ignoredNamespaces;t!==void 0&&typeof t=="object"&&"override"in t&&t.override===!0&&t.namespaces!==void 0&&(this.wsdl.options.ignoredNamespaces=t.namespaces),e.overrideElementKey!==void 0&&(this.wsdl.options.overrideElementKey=e.overrideElementKey),e.overrideRootElement!==void 0&&(this.wsdl.options.overrideRootElement=e.overrideRootElement),this.wsdl.options.forceSoap12Headers=!!e.forceSoap12Headers}_defineService(e,t){let n=e.ports,s={};for(let i in n)s[i]=this._definePort(n[i],t||n[i].location);return s}_definePort(e,t){let n=t,i=e.binding.methods,a={};for(let u in i){a[u]=this._defineMethod(i[u],n);let c=this.normalizeNames?u.replace(fV,"_"):u;if(this[c]=a[u],!fV.test(c)){let f=this.overridePromiseSuffix;this[c+f]=this._promisifyMethod(a[u])}}return a}_promisifyMethod(e){return(t,n,s)=>new Promise((i,a)=>{e(t,o((c,f,h,m,g,x)=>{c?a(c):i([f,h,m,g,x])},"callback"),n,s)})}_defineMethod(e,t){let n;return(s,i,a,u)=>{typeof s=="function"?(i=s,s={}):typeof a=="function"?(n=i,i=a,a=n):typeof u=="function"&&(n=i,i=u,u=a,a=n),this._invoke(e,s,t,(c,f,h,m,g,x)=>{i(c,f,h,m,g,x)},a,u)}}_processSoapHeader(e,t,n,s){switch(typeof e){case"object":return this.wsdl.objectToXML(e,t,n,s,!0);case"function":{let i=this;return(...a)=>{let u=e.apply(null,[...a]);return typeof u=="object"?i.wsdl.objectToXML(u,t,n,s,!0):u}}default:return e}}_invoke(e,t,n,s,i,a){let u=e.$name,c=e.input,f=e.output,h=e.style,m=this.wsdl.definitions,g=this.wsdl.options.envelopeKey,x=this.wsdl.options.envelopeSoapUrl,v=m.$targetNamespace,w="",S="",A=null,T,b=(0,aie.findPrefix)(m.xmlns,v),E={"Content-Type":"text/xml; charset=utf-8"},C="xmlns:"+g+'="'+x+'"',_=o((X,pe,le)=>{let ue;if(!f)return s(null,null,pe,X.Header,A,le.mtomResponseAttachments);if(!X.html&&!X.Body){if(le.status>=400){let ee=new Error("Error http status codes");return ee.response=le,ee.body=pe,this.emit("soapError",ee,q),s(ee,X,pe,X.Header)}return s(null,X,pe,X.Header)}if(typeof X.Body!="object"){let ee=new Error("Cannot parse response");return ee.response=le,ee.body=pe,s(ee,X,pe,void 0,A)}ue=X.Body[f.$name],ue||(ue=X.Body[f.$name.replace(/(?:Out(?:put)?|Response)$/,"")]),ue||["Response","Out","Output"].forEach(ee=>{if(Object.hasOwnProperty.call(X.Body,u+ee))return ue=X.Body[u+ee]}),s(null,ue,pe,X.Header,A,le.mtomResponseAttachments)},"finish"),F=o((X,pe)=>{let le;try{le=this.wsdl.xmlToObject(X)}catch(ue){if(!f||!f.$lookupTypes){oie("Response element is not present. Unable to convert response xml to json.");let ee=lV.isObject(X)?X:H(X);if(ee)return s(null,pe,ee,void 0,A)}return ue.response=pe,ue.body=X,this.emit("soapError",ue,q),s(ue,pe,X,void 0,A,pe.mtomResponseAttachments)}return _(le,X,pe)},"parseSync");this.SOAPAction?T=this.SOAPAction:e.soapAction!==void 0&&e.soapAction!==null?T=e.soapAction:T=(v.lastIndexOf("/")!==v.length-1?v+"/":v)+u,this.wsdl.options.forceSoap12Headers?(E["Content-Type"]=`application/soap+xml; charset=utf-8; action="${T}"`,C="xmlns:"+g+'="http://www.w3.org/2003/05/soap-envelope"'):E.SOAPAction='"'+T+'"',i=i||{},this.security&&this.security.addHeaders&&this.security.addHeaders(E),this.security&&this.security.addOptions&&this.security.addOptions(i),h==="rpc"&&(c.parts||c.name==="element"||t===null)?(cV.ok(!h||h==="rpc","invalid message definition for document style binding"),S=this.wsdl.objectToRpcXML(u,t,b,v,c.name!=="element"),e.inputSoap==="encoded"&&(w='soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" ')):(cV.ok(!h||h==="document","invalid message definition for rpc style binding"),S=this.wsdl.objectToDocumentXML(c.$name,t,c.targetNSAlias,c.targetNamespace,c.$type||c.$lookupType));let R;this.soapHeaders&&(R=this.soapHeaders.map(X=>typeof X=="function"?X(e,n,T,t):X).join(" ")),A='<?xml version="1.0" encoding="utf-8"?><'+g+":Envelope "+C+' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '+w+this.wsdl.xmlnsInEnvelope+">"+(R||this.security?"<"+g+":Header"+(this.wsdl.xmlnsInHeader?" "+this.wsdl.xmlnsInHeader:"")+">"+(R||"")+(this.security&&!this.security.postProcess?this.security.toXML():"")+"</"+g+":Header>":"")+"<"+g+":Body"+(this.bodyAttributes?this.bodyAttributes.join(" "):"")+">"+S+"</"+g+":Body></"+g+":Envelope>",this.security&&this.security.postProcess&&(A=this.security.postProcess(A,g)),i&&i.postProcess&&(A=i.postProcess(A)),this.lastMessage=S,this.lastRequest=A,this.lastEndpoint=n;let q=i.exchangeId||(0,tie.randomUUID)();if(this.emit("message",S,q),this.emit("request",A,q),this.httpHeaders===null)E={};else{for(let X in this.httpHeaders)E[X]=this.httpHeaders[X];for(let X in a)E[X]=a[X]}let H=o(X=>{try{return JSON.parse(X)}catch{return}},"tryJSONparse");if(this.streamAllowed&&typeof this.httpClient.requestStream=="function"){s=lV.once(s);let X=Date.now(),pe=o(le=>{this.lastResponse=null,this.lastResponseHeaders=null,this.lastElapsedTime=null,this.lastRequestHeaders=le.config&&le.config.headers,this.emit("response",null,null,q),this.returnSaxStream||!le.response||!le.response.data?s(le,void 0,void 0,void 0,A):(le.response.data.on("close",()=>{s(le,void 0,void 0,void 0,A)}),le.response.data.on("data",ue=>{le.response.data=ue.toString()}))},"onError");this.httpClient.requestStream(n,A,E,i,this).then(le=>{if(this.lastRequestHeaders=le.headers,le.data.on&&le.data.on("error",ue=>pe(ue)),le.status!==200||!f||!f.$lookupTypes){(0,sie.default)(le.data).then(ue=>(this.lastResponse=ue,this.lastElapsedTime=Date.now()-X,this.lastResponseHeaders=le&&le.headers,this.lastRequestHeaders=le.config&&le.config.headers||le.headers,this.emit("response",ue,le,q),F(ue,le)));return}if(this.returnSaxStream){let ue=this.wsdl.getSaxStream(le.data);return _({saxStream:ue},"<stream>",le.data)}else this.wsdl.xmlToObject(le.data,(ue,ee)=>(this.lastResponse=le,this.lastElapsedTime=Date.now()-X,this.lastResponseHeaders=le&&le.headers,this.lastRequestHeaders=le.config.headers,this.emit("response","<stream>",le.data,q),ue?(ue.response=le,ue.body="<stream>",this.emit("soapError",ue,q),s(ue,le,void 0,void 0,A)):_(ee,"<stream>",le)))},pe);return}let K=Date.now();return this.httpClient.request(n,A,(X,pe,le)=>{if(this.lastResponse=le,pe&&(this.lastResponseHeaders=pe.headers,this.lastElapsedTime=Date.now()-K,this.lastResponseAttachments=pe.mtomResponseAttachments,this.lastRequestHeaders=pe.config&&pe.config.headers),this.emit("response",le,pe,q),X){this.lastRequestHeaders=X.config&&X.config.headers;try{X.response&&X.response.data&&this.wsdl.xmlToObject(X.response.data)}catch(ue){X.root=ue.root||ue}s(X,void 0,void 0,void 0,A)}else return F(le,pe)},E,i,this)}};Ri.Client=uie});var mV=Z(Fa=>{"use strict";var cie=Fa&&Fa.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),lie=Fa&&Fa.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),fie=Fa&&Fa.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&cie(t,e,n[s]);return lie(t,e),t}})();Object.defineProperty(Fa,"__esModule",{value:!0});Fa.BasicAuthSecurity=void 0;var dV=fie(_o()),hie=class{static{o(this,"BasicAuthSecurity")}constructor(e,t,n){this._username=e,this._password=t,this.defaults={},dV.merge(this.defaults,n)}addHeaders(e){e.Authorization="Basic "+Buffer.from(this._username+":"+this._password||"").toString("base64")}toXML(){return""}addOptions(e){dV.merge(e,this.defaults)}};Fa.BasicAuthSecurity=hie});var vV=Z(qa=>{"use strict";var pie=qa&&qa.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),die=qa&&qa.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),mie=qa&&qa.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&pie(t,e,n[s]);return die(t,e),t}})();Object.defineProperty(qa,"__esModule",{value:!0});qa.BearerSecurity=void 0;var gV=mie(_o()),gie=class{static{o(this,"BearerSecurity")}constructor(e,t){this._token=e,this.defaults={},gV.merge(this.defaults,t)}addHeaders(e){e.Authorization="Bearer "+this._token}toXML(){return""}addOptions(e){gV.merge(e,this.defaults)}};qa.BearerSecurity=gie});var wV=Z(Ha=>{"use strict";var vie=Ha&&Ha.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),yie=Ha&&Ha.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),tI=Ha&&Ha.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&vie(t,e,n[s]);return yie(t,e),t}})();Object.defineProperty(Ha,"__esModule",{value:!0});Ha.ClientSSLSecurity=void 0;var eI=tI(Xe("fs")),yV=tI(Xe("https")),xV=tI(_o()),xie=class{static{o(this,"ClientSSLSecurity")}constructor(e,t,n,s){if(e)if(Buffer.isBuffer(e))this.key=e;else if(typeof e=="string")this.key=eI.readFileSync(e);else throw new Error("key should be a buffer or a string!");if(t)if(Buffer.isBuffer(t))this.cert=t;else if(typeof t=="string")this.cert=eI.readFileSync(t);else throw new Error("cert should be a buffer or a string!");n&&(Buffer.isBuffer(n)||Array.isArray(n)?this.ca=n:typeof n=="string"?this.ca=eI.readFileSync(n):(s=n,this.ca=null)),this.defaults={},xV.merge(this.defaults,s),this.agent=null}toXML(){return""}addOptions(e){let t=null;e.key=this.key,e.cert=this.cert,e.ca=this.ca,xV.merge(e,this.defaults),e.forever?(this.agent||(e.keepAlive=!0,this.agent=new yV.Agent(e)),t=this.agent):t=new yV.Agent(e),e.httpsAgent=t}};Ha.ClientSSLSecurity=xie});var bV=Z(Ka=>{"use strict";var wie=Ka&&Ka.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Sie=Ka&&Ka.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),rI=Ka&&Ka.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&wie(t,e,n[s]);return Sie(t,e),t}})();Object.defineProperty(Ka,"__esModule",{value:!0});Ka.ClientSSLSecurityPFX=void 0;var bie=rI(Xe("fs")),Eie=rI(Xe("https")),SV=rI(_o()),Aie=class{static{o(this,"ClientSSLSecurityPFX")}constructor(e,t,n){if(typeof t=="object"&&(n=t),e)if(Buffer.isBuffer(e))this.pfx=e;else if(typeof e=="string")this.pfx=bie.readFileSync(e);else throw new Error("supplied pfx file should be a buffer or a file location");t&&typeof t=="string"&&(this.passphrase=t),this.defaults={},SV.merge(this.defaults,n)}toXML(){return""}addOptions(e){e.pfx=this.pfx,this.passphrase&&(e.passphrase=this.passphrase),SV.merge(e,this.defaults),e.httpsAgent=new Eie.Agent(e)}};Ka.ClientSSLSecurityPFX=Aie});var EV=Z($a=>{"use strict";var Cie=$a&&$a.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Nie=$a&&$a.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Tie=$a&&$a.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&Cie(t,e,n[s]);return Nie(t,e),t}})();Object.defineProperty($a,"__esModule",{value:!0});$a.NTLMSecurity=void 0;var Iie=Tie(_o()),_ie=class{static{o(this,"NTLMSecurity")}constructor(e,t,n,s){typeof e=="object"?(this.defaults=e,this.defaults.ntlm=!0):this.defaults={ntlm:!0,username:e,password:t,domain:n,workstation:s}}addHeaders(e){e.Connection="keep-alive"}toXML(){return""}addOptions(e){Iie.merge(e,this.defaults)}};$a.NTLMSecurity=_ie});var AV=Z(Ga=>{"use strict";var Bie=Ga&&Ga.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Die=Ga&&Ga.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Rie=Ga&&Ga.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&Bie(t,e,n[s]);return Die(t,e),t}})();Object.defineProperty(Ga,"__esModule",{value:!0});Ga.WSSecurity=void 0;var Pie=Rie(Xe("crypto")),nI=Zu(),Oie=["PasswordDigest","PasswordText"],kie=class{static{o(this,"WSSecurity")}constructor(e,t,n){n=n||{},this._username=e,this._password=t,this._envelopeKey="soap",typeof n=="string"?(this._passwordType=n||"PasswordText",n={}):this._passwordType=n.passwordType?n.passwordType:"PasswordText",Oie.indexOf(this._passwordType)===-1&&(this._passwordType="PasswordText"),this._hasTimeStamp=n.hasTimeStamp||typeof n.hasTimeStamp=="boolean"?!!n.hasTimeStamp:!0,n.hasNonce!=null&&(this._hasNonce=!!n.hasNonce),this._hasTokenCreated=n.hasTokenCreated||typeof n.hasTokenCreated=="boolean"?!!n.hasTokenCreated:!0,n.actor!=null&&(this._actor=n.actor),n.mustUnderstand!=null&&(this._mustUnderstand=!!n.mustUnderstand),n.envelopeKey&&(this._envelopeKey=n.envelopeKey)}toXML(){function e(u){function c(f){return f<10?"0"+f:f}return o(c,"pad"),u.getUTCFullYear()+"-"+c(u.getUTCMonth()+1)+"-"+c(u.getUTCDate())+"T"+c(u.getUTCHours())+":"+c(u.getUTCMinutes())+":"+c(u.getUTCSeconds())+"Z"}o(e,"getDate");let t=new Date,n=e(t),s="";if(this._hasTimeStamp){let u=e(new Date(t.getTime()+6e5));s='<wsu:Timestamp wsu:Id="Timestamp-'+n+'"><wsu:Created>'+n+"</wsu:Created><wsu:Expires>"+u+"</wsu:Expires></wsu:Timestamp>"}let i,a;if(this._hasNonce||this._passwordType!=="PasswordText"){let u=Pie.createHash("sha1");u.update(n+Math.random()),a=u.digest("base64")}return this._passwordType==="PasswordText"?(i='<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">'+(0,nI.xmlEscape)(this._password)+"</wsse:Password>",a&&(i+='<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">'+a+"</wsse:Nonce>")):i='<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">'+(0,nI.passwordDigest)(a,n,this._password)+'</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">'+a+"</wsse:Nonce>","<wsse:Security "+(this._actor?`${this._envelopeKey}:actor="${this._actor}" `:"")+(this._mustUnderstand?`${this._envelopeKey}:mustUnderstand="1" `:"")+'xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">'+s+'<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SecurityToken-'+n+'"><wsse:Username>'+(0,nI.xmlEscape)(this._username)+"</wsse:Username>"+i+(this._hasTokenCreated?"<wsu:Created>"+n+"</wsu:Created>":"")+"</wsse:UsernameToken></wsse:Security>"}};Ga.WSSecurity=kie});var bS=Z(sI=>{"use strict";var Lie=typeof sI>"u"?{}:sI;(function(r){"use strict";function e(d){var I=Array.prototype.slice,$=d.length,re=o(function(G,st){return function(){return st.apply(this,G.concat(I.call(arguments)))}},"partial"),ae=o(function(){var G=I.call(arguments);return G.length<$?re(G,ae):d.apply(this,I.apply(arguments,[0,$]))},"fn1");return ae}o(e,"curry");var t=o(function(d,I){for(var $=0;$<I.length;$+=1)d(I[$],$,I)},"forEach"),n=o(function(d,I,$){var re=I;return t(function(ae,G){re=d(re,ae,G)},$),re},"reduce"),s=o(function(d,I){var $=new Array(I.length);return t(function(re,ae){$[ae]=d(re)},I),$},"map"),i=o(function(d,I){var $=[];return t(function(re,ae){d(re,ae)&&$.push(re)},I),$},"filter"),a=o(function(d,I){for(var $=0;$<d.length;$+=1)if(d[$]===I)return!0;return!1},"includes");function u(d){return function(){return d}}o(u,"always");function c(d){return d.toString()}o(c,"toString");var f=o(function(d,I){return I.join(d)},"join"),h=o(function(d,I,$){return d+$+I},"wrap"),m=Array.prototype.concat,g=32767;function x(d){for(var I=[],$=0;$<d.length;$+=g){var re=d.slice($,$+g);I=m.apply(I,re)}return I}o(x,"flatten");function v(d,I){for(var $=Object(d),re=1;re<arguments.length;re++){var ae=arguments[re];if(ae!=null)for(var G in ae)Object.prototype.hasOwnProperty.call(ae,G)&&($[G]=ae[G])}return $}o(v,"assign");var w={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11};S.prototype=new Object,S.prototype.constructor=S,S.superclass=Object.prototype;function S(){this.init()}o(S,"XPathParser"),S.prototype.init=function(){this.reduceActions=[],this.reduceActions[3]=function(d){return new F(d[0],d[2])},this.reduceActions[5]=function(d){return new R(d[0],d[2])},this.reduceActions[7]=function(d){return new q(d[0],d[2])},this.reduceActions[8]=function(d){return new H(d[0],d[2])},this.reduceActions[10]=function(d){return new K(d[0],d[2])},this.reduceActions[11]=function(d){return new X(d[0],d[2])},this.reduceActions[12]=function(d){return new pe(d[0],d[2])},this.reduceActions[13]=function(d){return new le(d[0],d[2])},this.reduceActions[15]=function(d){return new ue(d[0],d[2])},this.reduceActions[16]=function(d){return new ee(d[0],d[2])},this.reduceActions[18]=function(d){return new he(d[0],d[2])},this.reduceActions[19]=function(d){return new we(d[0],d[2])},this.reduceActions[20]=function(d){return new Ke(d[0],d[2])},this.reduceActions[22]=function(d){return new C(d[1])},this.reduceActions[24]=function(d){return new Ae(d[0],d[2])},this.reduceActions[25]=function(d){return new xe(void 0,void 0,d[0])},this.reduceActions[27]=function(d){return d[0].locationPath=d[2],d[0]},this.reduceActions[28]=function(d){return d[0].locationPath=d[2],d[0].locationPath.steps.unshift(new O(O.DESCENDANTORSELF,D.nodeTest,[])),d[0]},this.reduceActions[29]=function(d){return new xe(d[0],[],void 0)},this.reduceActions[30]=function(d){return et.instance_of(d[0],xe)?(d[0].filterPredicates==null&&(d[0].filterPredicates=[]),d[0].filterPredicates.push(d[1]),d[0]):new xe(d[0],[d[1]],void 0)},this.reduceActions[32]=function(d){return d[1]},this.reduceActions[33]=function(d){return new Re(d[0])},this.reduceActions[34]=function(d){return new Ce(d[0])},this.reduceActions[36]=function(d){return new z(d[0],[])},this.reduceActions[37]=function(d){return new z(d[0],d[2])},this.reduceActions[38]=function(d){return[d[0]]},this.reduceActions[39]=function(d){return d[2].unshift(d[0]),d[2]},this.reduceActions[43]=function(d){return new lt(!0,[])},this.reduceActions[44]=function(d){return d[1].absolute=!0,d[1]},this.reduceActions[46]=function(d){return new lt(!1,[d[0]])},this.reduceActions[47]=function(d){return d[0].steps.push(d[2]),d[0]},this.reduceActions[49]=function(d){return new O(d[0],d[1],[])},this.reduceActions[50]=function(d){return new O(O.CHILD,d[0],[])},this.reduceActions[51]=function(d){return new O(d[0],d[1],d[2])},this.reduceActions[52]=function(d){return new O(O.CHILD,d[0],d[1])},this.reduceActions[54]=function(d){return[d[0]]},this.reduceActions[55]=function(d){return d[1].unshift(d[0]),d[1]},this.reduceActions[56]=function(d){return d[0]=="ancestor"?O.ANCESTOR:d[0]=="ancestor-or-self"?O.ANCESTORORSELF:d[0]=="attribute"?O.ATTRIBUTE:d[0]=="child"?O.CHILD:d[0]=="descendant"?O.DESCENDANT:d[0]=="descendant-or-self"?O.DESCENDANTORSELF:d[0]=="following"?O.FOLLOWING:d[0]=="following-sibling"?O.FOLLOWINGSIBLING:d[0]=="namespace"?O.NAMESPACE:d[0]=="parent"?O.PARENT:d[0]=="preceding"?O.PRECEDING:d[0]=="preceding-sibling"?O.PRECEDINGSIBLING:d[0]=="self"?O.SELF:-1},this.reduceActions[57]=function(d){return O.ATTRIBUTE},this.reduceActions[59]=function(d){return d[0]=="comment"?D.commentTest:d[0]=="text"?D.textTest:d[0]=="processing-instruction"?D.anyPiTest:d[0]=="node"?D.nodeTest:new D(-1,void 0)},this.reduceActions[60]=function(d){return new D.PITest(d[2])},this.reduceActions[61]=function(d){return d[1]},this.reduceActions[63]=function(d){return d[1].absolute=!0,d[1].steps.unshift(new O(O.DESCENDANTORSELF,D.nodeTest,[])),d[1]},this.reduceActions[64]=function(d){return d[0].steps.push(new O(O.DESCENDANTORSELF,D.nodeTest,[])),d[0].steps.push(d[2]),d[0]},this.reduceActions[65]=function(d){return new O(O.SELF,D.nodeTest,[])},this.reduceActions[66]=function(d){return new O(O.PARENT,D.nodeTest,[])},this.reduceActions[67]=function(d){return new se(d[1])},this.reduceActions[68]=function(d){return D.nameTestAny},this.reduceActions[69]=function(d){return new D.NameTestPrefixAny(d[0].split(":")[0])},this.reduceActions[70]=function(d){return new D.NameTestQName(d[0])}},S.actionTable=[" s s sssssssss s ss s ss"," s ","r rrrrrrrrr rrrrrrr rr r "," rrrrr "," s s sssssssss s ss s ss","rs rrrrrrrr s sssssrrrrrr rrs rs "," s s sssssssss s ss s ss"," s "," s ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s "," s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr r ","a ","r s rr r ","r sr rr r ","r s rr s rr r ","r rssrr rss rr r ","r rrrrr rrrss rr r ","r rrrrrsss rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrrs rr r ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrr rrrrrr rr r ","r srrrrrrrr rrrrrrs rr sr ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r "," sssss ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrr rrrrr rr r "," s "," s "," rrrrr "," s s sssssssss s sss s ss","r srrrrrrrr rrrrrrs rr r "," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss ss s ss"," s s sssssssss s ss s ss"," s s sssss s s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr rr "," s s sssss s s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr "," s ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," rr "," s "," rs ","r sr rr r ","r s rr s rr r ","r rssrr rss rr r ","r rssrr rss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrrsss rrrrr rr r ","r rrrrrsss rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrrr rr r "," r "," s ","r srrrrrrrr rrrrrrs rr r ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s s sssssssss s ss s ss","r rrrrrrrrr rrrrrrr rr rr "," r "],S.actionTableNumber=[` 1 0 /.-,+*)(' & %$ # "!`," J ","a aaaaaaaaa aaaaaaa aa a "," YYYYY ",` 1 0 /.-,+*)(' & %$ # "!`,`K1 KKKKKKKK . +*)('KKKKKK KK# K" `,` 1 0 /.-,+*)(' & %$ # "!`," N "," O ","e eeeeeeeee eeeeeee ee ee ","f fffffffff fffffff ff ff ","d ddddddddd ddddddd dd dd ","B BBBBBBBBB BBBBBBB BB BB ","A AAAAAAAAA AAAAAAA AA AA "," P "," Q ",` 1 . +*)(' # " `,"b bbbbbbbbb bbbbbbb bb b "," ","! S !! ! ",'" T" "" " ',"$ V $$ U $$ $ ","& &ZY&& &XW && & ",") ))))) )))\\[ )) ) ",". ....._^] ..... .. . ","1 11111111 11111 11 1 ","5 55555555 55555` 55 5 ","7 77777777 777777 77 7 ","9 99999999 999999 99 9 ",": c:::::::: ::::::b :: a: ","I fIIIIIIII IIIIIIe II I ","= ========= ======= == == ","? ????????? ??????? ?? ?? ","C CCCCCCCCC CCCCCCC CC CC ","J JJJJJJJJ JJJJJJ JJ J ","M MMMMMMMM MMMMMM MM M ","N NNNNNNNNN NNNNNNN NN N ","P PPPPPPPPP PPPPPPP PP P "," +*)(' ","R RRRRRRRRR RRRRRRR RR aR ","U UUUUUUUUU UUUUUUU UU U ","Z ZZZZZZZZZ ZZZZZZZ ZZ ZZ ","c ccccccccc ccccccc cc cc "," j ","L fLLLLLLLL LLLLLLe LL L ","6 66666666 66666 66 6 "," k "," l "," XXXXX ",` 1 0 /.-,+*)(' & %$m # "!`,"_ f________ ______e __ _ ",` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 . +*)(' # " `,` 1 . +*)(' # " `,"> >>>>>>>>> >>>>>>> >> >> ",` 1 . +*)(' # " `,` 1 . +*)(' # " `,"Q QQQQQQQQQ QQQQQQQ QQ aQ ","V VVVVVVVVV VVVVVVV VV aV ","T TTTTTTTTT TTTTTTT TT T ","@ @@@@@@@@@ @@@@@@@ @@ @@ "," \x87 ","[ [[[[[[[[[ [[[[[[[ [[ [[ ","D DDDDDDDDD DDDDDDD DD DD "," HH "," \x88 "," F\x89 ","# T# ## # ","% V %% U %% % ","' 'ZY'' 'XW '' ' ","( (ZY(( (XW (( ( ","+ +++++ +++\\[ ++ + ","* ***** ***\\[ ** * ","- ----- ---\\[ -- - ",", ,,,,, ,,,\\[ ,, , ","0 00000_^] 00000 00 0 ","/ /////_^] ///// // / ","2 22222222 22222 22 2 ","3 33333333 33333 33 3 ","4 44444444 44444 44 4 ","8 88888888 888888 88 8 "," ^ "," \x8A ","; f;;;;;;;; ;;;;;;e ;; ; ","< f<<<<<<<< <<<<<<e << < ","O OOOOOOOOO OOOOOOO OO O ","` ````````` ``````` `` ` ","S SSSSSSSSS SSSSSSS SS S ","W WWWWWWWWW WWWWWWW WW W ","\\ \\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\ \\\\ \\\\ ","E EEEEEEEEE EEEEEEE EE EE ",` 1 0 /.-,+*)(' & %$ # "!`,"] ]]]]]]]]] ]]]]]]] ]] ]] "," G "],S.gotoTable=["3456789:;<=>?@ AB CDEFGH IJ "," "," "," ","L456789:;<=>?@ AB CDEFGH IJ "," M EFGH IJ "," N;<=>?@ AB CDEFGH IJ "," "," "," "," "," "," "," "," "," "," S EFGH IJ "," "," "," "," "," "," "," "," "," "," "," "," "," e "," "," "," "," "," "," "," "," "," h J "," i j "," "," "," "," "," "," "," "," "," ","o456789:;<=>?@ ABpqCDEFGH IJ "," "," r6789:;<=>?@ AB CDEFGH IJ "," s789:;<=>?@ AB CDEFGH IJ "," t89:;<=>?@ AB CDEFGH IJ "," u89:;<=>?@ AB CDEFGH IJ "," v9:;<=>?@ AB CDEFGH IJ "," w9:;<=>?@ AB CDEFGH IJ "," x9:;<=>?@ AB CDEFGH IJ "," y9:;<=>?@ AB CDEFGH IJ "," z:;<=>?@ AB CDEFGH IJ "," {:;<=>?@ AB CDEFGH IJ "," |;<=>?@ AB CDEFGH IJ "," };<=>?@ AB CDEFGH IJ "," ~;<=>?@ AB CDEFGH IJ "," \x7F=>?@ AB CDEFGH IJ ","\x80456789:;<=>?@ AB CDEFGH IJ\x81"," \x82 EFGH IJ "," \x83 EFGH IJ "," "," \x84 GH IJ "," \x85 GH IJ "," i \x86 "," i \x87 "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","o456789:;<=>?@ AB\x8CqCDEFGH IJ "," "," "],S.productions=[[1,1,2],[2,1,3],[3,1,4],[3,3,3,-9,4],[4,1,5],[4,3,4,-8,5],[5,1,6],[5,3,5,-22,6],[5,3,5,-5,6],[6,1,7],[6,3,6,-23,7],[6,3,6,-24,7],[6,3,6,-6,7],[6,3,6,-7,7],[7,1,8],[7,3,7,-25,8],[7,3,7,-26,8],[8,1,9],[8,3,8,-12,9],[8,3,8,-11,9],[8,3,8,-10,9],[9,1,10],[9,2,-26,9],[10,1,11],[10,3,10,-27,11],[11,1,12],[11,1,13],[11,3,13,-28,14],[11,3,13,-4,14],[13,1,15],[13,2,13,16],[15,1,17],[15,3,-29,2,-30],[15,1,-15],[15,1,-16],[15,1,18],[18,3,-13,-29,-30],[18,4,-13,-29,19,-30],[19,1,20],[19,3,20,-31,19],[20,1,2],[12,1,14],[12,1,21],[21,1,-28],[21,2,-28,14],[21,1,22],[14,1,23],[14,3,14,-28,23],[14,1,24],[23,2,25,26],[23,1,26],[23,3,25,26,27],[23,2,26,27],[23,1,28],[27,1,16],[27,2,16,27],[25,2,-14,-3],[25,1,-32],[26,1,29],[26,3,-20,-29,-30],[26,4,-21,-29,-15,-30],[16,3,-33,30,-34],[30,1,2],[22,2,-4,14],[24,3,14,-4,23],[28,1,-35],[28,1,-2],[17,2,-36,-18],[29,1,-17],[29,1,-19],[29,1,-18]],S.DOUBLEDOT=2,S.DOUBLECOLON=3,S.DOUBLESLASH=4,S.NOTEQUAL=5,S.LESSTHANOREQUAL=6,S.GREATERTHANOREQUAL=7,S.AND=8,S.OR=9,S.MOD=10,S.DIV=11,S.MULTIPLYOPERATOR=12,S.FUNCTIONNAME=13,S.AXISNAME=14,S.LITERAL=15,S.NUMBER=16,S.ASTERISKNAMETEST=17,S.QNAME=18,S.NCNAMECOLONASTERISK=19,S.NODETYPE=20,S.PROCESSINGINSTRUCTIONWITHLITERAL=21,S.EQUALS=22,S.LESSTHAN=23,S.GREATERTHAN=24,S.PLUS=25,S.MINUS=26,S.BAR=27,S.SLASH=28,S.LEFTPARENTHESIS=29,S.RIGHTPARENTHESIS=30,S.COMMA=31,S.AT=32,S.LEFTBRACKET=33,S.RIGHTBRACKET=34,S.DOT=35,S.DOLLAR=36,S.prototype.tokenize=function(d){for(var I=[],$=[],re=d+"\0",ae=0,G=re.charAt(ae++);;){for(;G==" "||G==" "||G=="\r"||G==`
59
+ `;)G=re.charAt(ae++);if(G=="\0"||ae>=re.length)break;if(G=="("){I.push(S.LEFTPARENTHESIS),$.push(G),G=re.charAt(ae++);continue}if(G==")"){I.push(S.RIGHTPARENTHESIS),$.push(G),G=re.charAt(ae++);continue}if(G=="["){I.push(S.LEFTBRACKET),$.push(G),G=re.charAt(ae++);continue}if(G=="]"){I.push(S.RIGHTBRACKET),$.push(G),G=re.charAt(ae++);continue}if(G=="@"){I.push(S.AT),$.push(G),G=re.charAt(ae++);continue}if(G==","){I.push(S.COMMA),$.push(G),G=re.charAt(ae++);continue}if(G=="|"){I.push(S.BAR),$.push(G),G=re.charAt(ae++);continue}if(G=="+"){I.push(S.PLUS),$.push(G),G=re.charAt(ae++);continue}if(G=="-"){I.push(S.MINUS),$.push(G),G=re.charAt(ae++);continue}if(G=="="){I.push(S.EQUALS),$.push(G),G=re.charAt(ae++);continue}if(G=="$"){I.push(S.DOLLAR),$.push(G),G=re.charAt(ae++);continue}if(G=="."){if(G=re.charAt(ae++),G=="."){I.push(S.DOUBLEDOT),$.push(".."),G=re.charAt(ae++);continue}if(G>="0"&&G<="9"){var st="."+G;for(G=re.charAt(ae++);G>="0"&&G<="9";)st+=G,G=re.charAt(ae++);I.push(S.NUMBER),$.push(st);continue}I.push(S.DOT),$.push(".");continue}if(G=="'"||G=='"'){for(var kt=G,Wt="";ae<re.length&&(G=re.charAt(ae))!==kt;)Wt+=G,ae+=1;if(G!==kt)throw Un.fromMessage("Unterminated string literal: "+kt+Wt);ae+=1,I.push(S.LITERAL),$.push(Wt),G=re.charAt(ae++);continue}if(G>="0"&&G<="9"){var st=G;for(G=re.charAt(ae++);G>="0"&&G<="9";)st+=G,G=re.charAt(ae++);if(G=="."&&re.charAt(ae)>="0"&&re.charAt(ae)<="9")for(st+=G,st+=re.charAt(ae++),G=re.charAt(ae++);G>="0"&&G<="9";)st+=G,G=re.charAt(ae++);I.push(S.NUMBER),$.push(st);continue}if(G=="*"){if(I.length>0){var tt=I[I.length-1];if(tt!=S.AT&&tt!=S.DOUBLECOLON&&tt!=S.LEFTPARENTHESIS&&tt!=S.LEFTBRACKET&&tt!=S.AND&&tt!=S.OR&&tt!=S.MOD&&tt!=S.DIV&&tt!=S.MULTIPLYOPERATOR&&tt!=S.SLASH&&tt!=S.DOUBLESLASH&&tt!=S.BAR&&tt!=S.PLUS&&tt!=S.MINUS&&tt!=S.EQUALS&&tt!=S.NOTEQUAL&&tt!=S.LESSTHAN&&tt!=S.LESSTHANOREQUAL&&tt!=S.GREATERTHAN&&tt!=S.GREATERTHANOREQUAL){I.push(S.MULTIPLYOPERATOR),$.push(G),G=re.charAt(ae++);continue}}I.push(S.ASTERISKNAMETEST),$.push(G),G=re.charAt(ae++);continue}if(G==":"&&re.charAt(ae)==":"){I.push(S.DOUBLECOLON),$.push("::"),ae++,G=re.charAt(ae++);continue}if(G=="/"){if(G=re.charAt(ae++),G=="/"){I.push(S.DOUBLESLASH),$.push("//"),G=re.charAt(ae++);continue}I.push(S.SLASH),$.push("/");continue}if(G=="!"&&re.charAt(ae)=="="){I.push(S.NOTEQUAL),$.push("!="),ae++,G=re.charAt(ae++);continue}if(G=="<"){if(re.charAt(ae)=="="){I.push(S.LESSTHANOREQUAL),$.push("<="),ae++,G=re.charAt(ae++);continue}I.push(S.LESSTHAN),$.push("<"),G=re.charAt(ae++);continue}if(G==">"){if(re.charAt(ae)=="="){I.push(S.GREATERTHANOREQUAL),$.push(">="),ae++,G=re.charAt(ae++);continue}I.push(S.GREATERTHAN),$.push(">"),G=re.charAt(ae++);continue}if(G=="_"||et.isLetter(G.charCodeAt(0))){var Bt=G;for(G=re.charAt(ae++);et.isNCNameChar(G.charCodeAt(0));)Bt+=G,G=re.charAt(ae++);if(I.length>0){var tt=I[I.length-1];if(tt!=S.AT&&tt!=S.DOUBLECOLON&&tt!=S.LEFTPARENTHESIS&&tt!=S.LEFTBRACKET&&tt!=S.AND&&tt!=S.OR&&tt!=S.MOD&&tt!=S.DIV&&tt!=S.MULTIPLYOPERATOR&&tt!=S.SLASH&&tt!=S.DOUBLESLASH&&tt!=S.BAR&&tt!=S.PLUS&&tt!=S.MINUS&&tt!=S.EQUALS&&tt!=S.NOTEQUAL&&tt!=S.LESSTHAN&&tt!=S.LESSTHANOREQUAL&&tt!=S.GREATERTHAN&&tt!=S.GREATERTHANOREQUAL){if(Bt=="and"){I.push(S.AND),$.push(Bt);continue}if(Bt=="or"){I.push(S.OR),$.push(Bt);continue}if(Bt=="mod"){I.push(S.MOD),$.push(Bt);continue}if(Bt=="div"){I.push(S.DIV),$.push(Bt);continue}}}if(G==":"){if(re.charAt(ae)=="*"){I.push(S.NCNAMECOLONASTERISK),$.push(Bt+":*"),ae++,G=re.charAt(ae++);continue}if(re.charAt(ae)=="_"||et.isLetter(re.charCodeAt(ae))){for(Bt+=":",G=re.charAt(ae++);et.isNCNameChar(G.charCodeAt(0));)Bt+=G,G=re.charAt(ae++);if(G=="("){I.push(S.FUNCTIONNAME),$.push(Bt);continue}I.push(S.QNAME),$.push(Bt);continue}if(re.charAt(ae)==":"){I.push(S.AXISNAME),$.push(Bt);continue}}if(G=="("){if(Bt=="comment"||Bt=="text"||Bt=="node"){I.push(S.NODETYPE),$.push(Bt);continue}if(Bt=="processing-instruction"){re.charAt(ae)==")"?I.push(S.NODETYPE):I.push(S.PROCESSINGINSTRUCTIONWITHLITERAL),$.push(Bt);continue}I.push(S.FUNCTIONNAME),$.push(Bt);continue}I.push(S.QNAME),$.push(Bt);continue}throw new Error("Unexpected character "+G)}return I.push(1),$.push("[EOF]"),[I,$]},S.SHIFT="s",S.REDUCE="r",S.ACCEPT="a",S.prototype.parse=function(Wt){var I,$,re=this.tokenize(Wt);if(re!=null){I=re[0],$=re[1];var ae=0,G=[],st=[],kt=[],Wt,tt,Bt;for(G.push(0),st.push(1),kt.push("_S"),tt=I[ae],Bt=$[ae++];;)switch(Wt=G[G.length-1],S.actionTable[Wt].charAt(tt-1)){case S.SHIFT:st.push(-tt),kt.push(Bt),G.push(S.actionTableNumber[Wt].charCodeAt(tt-1)-32),tt=I[ae],Bt=$[ae++];break;case S.REDUCE:for(var jn=S.productions[S.actionTableNumber[Wt].charCodeAt(tt-1)-32][1],pi=[],cr=0;cr<jn;cr++)st.pop(),pi.unshift(kt.pop()),G.pop();var ba=G[G.length-1];st.push(S.productions[S.actionTableNumber[Wt].charCodeAt(tt-1)-32][0]),this.reduceActions[S.actionTableNumber[Wt].charCodeAt(tt-1)-32]==null?kt.push(pi[0]):kt.push(this.reduceActions[S.actionTableNumber[Wt].charCodeAt(tt-1)-32](pi)),G.push(S.gotoTable[ba].charCodeAt(S.productions[S.actionTableNumber[Wt].charCodeAt(tt-1)-32][0]-2)-33);break;case S.ACCEPT:return new A(kt.pop());default:throw new Error("XPath parse error")}}},A.prototype=new Object,A.prototype.constructor=A,A.superclass=Object.prototype;function A(d){this.expression=d}o(A,"XPath"),A.prototype.toString=function(){return this.expression.toString()};function T(d,I,$){I in d||(d[I]=$)}o(T,"setIfUnset"),A.prototype.evaluate=function(d){return d.contextNode=d.expressionContextNode,d.contextSize=1,d.contextPosition=1,d.isHtml&&(T(d,"caseInsensitive",!0),T(d,"allowAnyNamespaceForNoPrefix",!0)),T(d,"caseInsensitive",!1),this.expression.evaluate(d)},A.XML_NAMESPACE_URI="http://www.w3.org/XML/1998/namespace",A.XMLNS_NAMESPACE_URI="http://www.w3.org/2000/xmlns/",b.prototype=new Object,b.prototype.constructor=b,b.superclass=Object.prototype;function b(){}o(b,"Expression"),b.prototype.init=function(){},b.prototype.toString=function(){return"<Expression>"},b.prototype.evaluate=function(d){throw new Error("Could not evaluate expression.")},E.prototype=new b,E.prototype.constructor=E,E.superclass=b.prototype;function E(d){arguments.length>0&&this.init(d)}o(E,"UnaryOperation"),E.prototype.init=function(d){this.rhs=d},C.prototype=new E,C.prototype.constructor=C,C.superclass=E.prototype;function C(d){arguments.length>0&&this.init(d)}o(C,"UnaryMinusOperation"),C.prototype.init=function(d){C.superclass.init.call(this,d)},C.prototype.evaluate=function(d){return this.rhs.evaluate(d).number().negate()},C.prototype.toString=function(){return"-"+this.rhs.toString()},_.prototype=new b,_.prototype.constructor=_,_.superclass=b.prototype;function _(d,I){arguments.length>0&&this.init(d,I)}o(_,"BinaryOperation"),_.prototype.init=function(d,I){this.lhs=d,this.rhs=I},F.prototype=new _,F.prototype.constructor=F,F.superclass=_.prototype;function F(d,I){arguments.length>0&&this.init(d,I)}o(F,"OrOperation"),F.prototype.init=function(d,I){F.superclass.init.call(this,d,I)},F.prototype.toString=function(){return"("+this.lhs.toString()+" or "+this.rhs.toString()+")"},F.prototype.evaluate=function(d){var I=this.lhs.evaluate(d).bool();return I.booleanValue()?I:this.rhs.evaluate(d).bool()},R.prototype=new _,R.prototype.constructor=R,R.superclass=_.prototype;function R(d,I){arguments.length>0&&this.init(d,I)}o(R,"AndOperation"),R.prototype.init=function(d,I){R.superclass.init.call(this,d,I)},R.prototype.toString=function(){return"("+this.lhs.toString()+" and "+this.rhs.toString()+")"},R.prototype.evaluate=function(d){var I=this.lhs.evaluate(d).bool();return I.booleanValue()?this.rhs.evaluate(d).bool():I},q.prototype=new _,q.prototype.constructor=q,q.superclass=_.prototype;function q(d,I){arguments.length>0&&this.init(d,I)}o(q,"EqualsOperation"),q.prototype.init=function(d,I){q.superclass.init.call(this,d,I)},q.prototype.toString=function(){return"("+this.lhs.toString()+" = "+this.rhs.toString()+")"},q.prototype.evaluate=function(d){return this.lhs.evaluate(d).equals(this.rhs.evaluate(d))},H.prototype=new _,H.prototype.constructor=H,H.superclass=_.prototype;function H(d,I){arguments.length>0&&this.init(d,I)}o(H,"NotEqualOperation"),H.prototype.init=function(d,I){H.superclass.init.call(this,d,I)},H.prototype.toString=function(){return"("+this.lhs.toString()+" != "+this.rhs.toString()+")"},H.prototype.evaluate=function(d){return this.lhs.evaluate(d).notequal(this.rhs.evaluate(d))},K.prototype=new _,K.prototype.constructor=K,K.superclass=_.prototype;function K(d,I){arguments.length>0&&this.init(d,I)}o(K,"LessThanOperation"),K.prototype.init=function(d,I){K.superclass.init.call(this,d,I)},K.prototype.evaluate=function(d){return this.lhs.evaluate(d).lessthan(this.rhs.evaluate(d))},K.prototype.toString=function(){return"("+this.lhs.toString()+" < "+this.rhs.toString()+")"},X.prototype=new _,X.prototype.constructor=X,X.superclass=_.prototype;function X(d,I){arguments.length>0&&this.init(d,I)}o(X,"GreaterThanOperation"),X.prototype.init=function(d,I){X.superclass.init.call(this,d,I)},X.prototype.evaluate=function(d){return this.lhs.evaluate(d).greaterthan(this.rhs.evaluate(d))},X.prototype.toString=function(){return"("+this.lhs.toString()+" > "+this.rhs.toString()+")"},pe.prototype=new _,pe.prototype.constructor=pe,pe.superclass=_.prototype;function pe(d,I){arguments.length>0&&this.init(d,I)}o(pe,"LessThanOrEqualOperation"),pe.prototype.init=function(d,I){pe.superclass.init.call(this,d,I)},pe.prototype.evaluate=function(d){return this.lhs.evaluate(d).lessthanorequal(this.rhs.evaluate(d))},pe.prototype.toString=function(){return"("+this.lhs.toString()+" <= "+this.rhs.toString()+")"},le.prototype=new _,le.prototype.constructor=le,le.superclass=_.prototype;function le(d,I){arguments.length>0&&this.init(d,I)}o(le,"GreaterThanOrEqualOperation"),le.prototype.init=function(d,I){le.superclass.init.call(this,d,I)},le.prototype.evaluate=function(d){return this.lhs.evaluate(d).greaterthanorequal(this.rhs.evaluate(d))},le.prototype.toString=function(){return"("+this.lhs.toString()+" >= "+this.rhs.toString()+")"},ue.prototype=new _,ue.prototype.constructor=ue,ue.superclass=_.prototype;function ue(d,I){arguments.length>0&&this.init(d,I)}o(ue,"PlusOperation"),ue.prototype.init=function(d,I){ue.superclass.init.call(this,d,I)},ue.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().plus(this.rhs.evaluate(d).number())},ue.prototype.toString=function(){return"("+this.lhs.toString()+" + "+this.rhs.toString()+")"},ee.prototype=new _,ee.prototype.constructor=ee,ee.superclass=_.prototype;function ee(d,I){arguments.length>0&&this.init(d,I)}o(ee,"MinusOperation"),ee.prototype.init=function(d,I){ee.superclass.init.call(this,d,I)},ee.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().minus(this.rhs.evaluate(d).number())},ee.prototype.toString=function(){return"("+this.lhs.toString()+" - "+this.rhs.toString()+")"},he.prototype=new _,he.prototype.constructor=he,he.superclass=_.prototype;function he(d,I){arguments.length>0&&this.init(d,I)}o(he,"MultiplyOperation"),he.prototype.init=function(d,I){he.superclass.init.call(this,d,I)},he.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().multiply(this.rhs.evaluate(d).number())},he.prototype.toString=function(){return"("+this.lhs.toString()+" * "+this.rhs.toString()+")"},we.prototype=new _,we.prototype.constructor=we,we.superclass=_.prototype;function we(d,I){arguments.length>0&&this.init(d,I)}o(we,"DivOperation"),we.prototype.init=function(d,I){we.superclass.init.call(this,d,I)},we.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().div(this.rhs.evaluate(d).number())},we.prototype.toString=function(){return"("+this.lhs.toString()+" div "+this.rhs.toString()+")"},Ke.prototype=new _,Ke.prototype.constructor=Ke,Ke.superclass=_.prototype;function Ke(d,I){arguments.length>0&&this.init(d,I)}o(Ke,"ModOperation"),Ke.prototype.init=function(d,I){Ke.superclass.init.call(this,d,I)},Ke.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().mod(this.rhs.evaluate(d).number())},Ke.prototype.toString=function(){return"("+this.lhs.toString()+" mod "+this.rhs.toString()+")"},Ae.prototype=new _,Ae.prototype.constructor=Ae,Ae.superclass=_.prototype;function Ae(d,I){arguments.length>0&&this.init(d,I)}o(Ae,"BarOperation"),Ae.prototype.init=function(d,I){Ae.superclass.init.call(this,d,I)},Ae.prototype.evaluate=function(d){return this.lhs.evaluate(d).nodeset().union(this.rhs.evaluate(d).nodeset())},Ae.prototype.toString=function(){return s(c,[this.lhs,this.rhs]).join(" | ")},xe.prototype=new b,xe.prototype.constructor=xe,xe.superclass=b.prototype;function xe(d,I,$){arguments.length>0&&this.init(d,I,$)}o(xe,"PathExpr"),xe.prototype.init=function(d,I,$){xe.superclass.init.call(this),this.filter=d,this.filterPredicates=I,this.locationPath=$};function je(d){for(;d&&d.parentNode;)d=d.parentNode;return d}o(je,"findRoot"),xe.applyPredicates=function(d,I,$){if(d.length===0)return $;var re=I.extend({});return n(function(ae,G){return re.contextSize=ae.length,i(function(st,kt){return re.contextNode=st,re.contextPosition=kt+1,xe.predicateMatches(G,re)},ae)},$,d)},xe.getRoot=function(d,I){var $=I[0];if($.nodeType===w.DOCUMENT_NODE)return $;if(d.virtualRoot)return d.virtualRoot;var re=$.ownerDocument;if(re)return re;for(var ae=$;ae.parentNode!=null;)ae=ae.parentNode;return ae},xe.applyStep=function(d,I,$){var re=this,ae=[];switch(I.contextNode=$,d.axis){case O.ANCESTOR:if(I.contextNode===I.virtualRoot)break;var G;for(I.contextNode.nodeType==w.ATTRIBUTE_NODE?G=xe.getOwnerElement(I.contextNode):G=I.contextNode.parentNode;G!=null&&(d.nodeTest.matches(G,I)&&ae.push(G),G!==I.virtualRoot);)G=G.parentNode;break;case O.ANCESTORORSELF:for(var G=I.contextNode;G!=null&&(d.nodeTest.matches(G,I)&&ae.push(G),G!==I.virtualRoot);G=G.nodeType==w.ATTRIBUTE_NODE?xe.getOwnerElement(G):G.parentNode);break;case O.ATTRIBUTE:var st=I.contextNode.attributes;if(st!=null)for(var kt=0;kt<st.length;kt++){var G=st.item(kt);d.nodeTest.matches(G,I)&&ae.push(G)}break;case O.CHILD:for(var G=I.contextNode.firstChild;G!=null;G=G.nextSibling)d.nodeTest.matches(G,I)&&ae.push(G);break;case O.DESCENDANT:for(var cr=[I.contextNode.firstChild];cr.length>0;)for(var G=cr.pop();G!=null;)d.nodeTest.matches(G,I)&&ae.push(G),G.firstChild!=null?(cr.push(G.nextSibling),G=G.firstChild):G=G.nextSibling;break;case O.DESCENDANTORSELF:d.nodeTest.matches(I.contextNode,I)&&ae.push(I.contextNode);for(var cr=[I.contextNode.firstChild];cr.length>0;)for(var G=cr.pop();G!=null;)d.nodeTest.matches(G,I)&&ae.push(G),G.firstChild!=null?(cr.push(G.nextSibling),G=G.firstChild):G=G.nextSibling;break;case O.FOLLOWING:if(I.contextNode===I.virtualRoot)break;var cr=[];I.contextNode.firstChild!=null?cr.unshift(I.contextNode.firstChild):cr.unshift(I.contextNode.nextSibling);for(var G=I.contextNode.parentNode;G!=null&&G.nodeType!=w.DOCUMENT_NODE&&G!==I.virtualRoot;G=G.parentNode)cr.unshift(G.nextSibling);do for(var G=cr.pop();G!=null;)d.nodeTest.matches(G,I)&&ae.push(G),G.firstChild!=null?(cr.push(G.nextSibling),G=G.firstChild):G=G.nextSibling;while(cr.length>0);break;case O.FOLLOWINGSIBLING:if(I.contextNode===I.virtualRoot)break;for(var G=I.contextNode.nextSibling;G!=null;G=G.nextSibling)d.nodeTest.matches(G,I)&&ae.push(G);break;case O.NAMESPACE:var Wt={};if(I.contextNode.nodeType==w.ELEMENT_NODE){Wt.xml=A.XML_NAMESPACE_URI,Wt.xmlns=A.XMLNS_NAMESPACE_URI;for(var G=I.contextNode;G!=null&&G.nodeType==w.ELEMENT_NODE;G=G.parentNode)for(var kt=0;kt<G.attributes.length;kt++){var tt=G.attributes.item(kt),Bt=String(tt.name);if(Bt=="xmlns")Wt[""]==null&&(Wt[""]=tt.value);else if(Bt.length>6&&Bt.substring(0,6)=="xmlns:"){var jn=Bt.substring(6,Bt.length);Wt[jn]==null&&(Wt[jn]=tt.value)}}for(var jn in Wt){var pi=new Fr(jn,Wt[jn],I.contextNode);d.nodeTest.matches(pi,I)&&ae.push(pi)}}break;case O.PARENT:G=null,I.contextNode!==I.virtualRoot&&(I.contextNode.nodeType==w.ATTRIBUTE_NODE?G=xe.getOwnerElement(I.contextNode):G=I.contextNode.parentNode),G!=null&&d.nodeTest.matches(G,I)&&ae.push(G);break;case O.PRECEDING:var cr;I.virtualRoot!=null?cr=[I.virtualRoot]:cr=[je(I.contextNode)];e:for(;cr.length>0;)for(var G=cr.pop();G!=null;){if(G==I.contextNode)break e;d.nodeTest.matches(G,I)&&ae.unshift(G),G.firstChild!=null?(cr.push(G.nextSibling),G=G.firstChild):G=G.nextSibling}break;case O.PRECEDINGSIBLING:if(I.contextNode===I.virtualRoot)break;for(var G=I.contextNode.previousSibling;G!=null;G=G.previousSibling)d.nodeTest.matches(G,I)&&ae.push(G);break;case O.SELF:d.nodeTest.matches(I.contextNode,I)&&ae.push(I.contextNode);break;default:}return ae};function Je(d,I,$){return xe.applyPredicates(d.predicates,I,xe.applyStep(d,I,$))}o(Je,"applyStepWithPredicates");function Ze(d,I,$){return x(s(Je.bind(null,$,d),I))}o(Ze,"applyStepToNodes"),xe.applySteps=function(d,I,$){return n(Ze.bind(null,I),$,d)},xe.prototype.applyFilter=function(d,I){if(!this.filter)return{nodes:[d.contextNode]};var $=this.filter.evaluate(d);if(!et.instance_of($,We)){if(this.filterPredicates!=null&&this.filterPredicates.length>0||this.locationPath!=null)throw new Error("Path expression filter must evaluate to a nodeset if predicates or location path are used");return{nonNodes:$}}return{nodes:xe.applyPredicates(this.filterPredicates||[],I,$.toUnsortedArray())}},xe.applyLocationPath=function(d,I,$){if(!d)return $;var re=d.absolute?[xe.getRoot(I,$)]:$;return xe.applySteps(d.steps,I,re)},xe.prototype.evaluate=function(d){var I=v(new hn,d),$=this.applyFilter(d,I);if("nonNodes"in $)return $.nonNodes;var re=new We;return re.addArray(xe.applyLocationPath(this.locationPath,I,$.nodes)),re},xe.predicateMatches=function(d,I){var $=d.evaluate(I);return et.instance_of($,Ce)?I.contextPosition===$.numberValue():$.booleanValue()},xe.predicateString=function(d){return h("[","]",d.toString())},xe.predicatesString=function(d){return f("",s(xe.predicateString,d))},xe.prototype.toString=function(){if(this.filter!=null){var d=c(this.filter);return et.instance_of(this.filter,Re)?h("'","'",d):this.filterPredicates!=null&&this.filterPredicates.length?h("(",")",d)+xe.predicatesString(this.filterPredicates):this.locationPath!=null?d+(this.locationPath.absolute?"":"/")+c(this.locationPath):d}return c(this.locationPath)},xe.getOwnerElement=function(d){if(d.ownerElement)return d.ownerElement;try{if(d.selectSingleNode)return d.selectSingleNode("..")}catch{}for(var I=d.nodeType==w.DOCUMENT_NODE?d:d.ownerDocument,$=I.getElementsByTagName("*"),re=0;re<$.length;re++)for(var ae=$.item(re),G=ae.attributes,st=0;st<G.length;st++){var kt=G.item(st);if(kt===d)return ae}return null},lt.prototype=new Object,lt.prototype.constructor=lt,lt.superclass=Object.prototype;function lt(d,I){arguments.length>0&&this.init(d,I)}o(lt,"LocationPath"),lt.prototype.init=function(d,I){this.absolute=d,this.steps=I},lt.prototype.toString=function(){return(this.absolute?"/":"")+s(c,this.steps).join("/")},O.prototype=new Object,O.prototype.constructor=O,O.superclass=Object.prototype;function O(d,I,$){arguments.length>0&&this.init(d,I,$)}o(O,"Step"),O.prototype.init=function(d,I,$){this.axis=d,this.nodeTest=I,this.predicates=$},O.prototype.toString=function(){return O.STEPNAMES[this.axis]+"::"+this.nodeTest.toString()+xe.predicatesString(this.predicates)},O.ANCESTOR=0,O.ANCESTORORSELF=1,O.ATTRIBUTE=2,O.CHILD=3,O.DESCENDANT=4,O.DESCENDANTORSELF=5,O.FOLLOWING=6,O.FOLLOWINGSIBLING=7,O.NAMESPACE=8,O.PARENT=9,O.PRECEDING=10,O.PRECEDINGSIBLING=11,O.SELF=12,O.STEPNAMES=n(function(d,I){return d[I[0]]=I[1],d},{},[[O.ANCESTOR,"ancestor"],[O.ANCESTORORSELF,"ancestor-or-self"],[O.ATTRIBUTE,"attribute"],[O.CHILD,"child"],[O.DESCENDANT,"descendant"],[O.DESCENDANTORSELF,"descendant-or-self"],[O.FOLLOWING,"following"],[O.FOLLOWINGSIBLING,"following-sibling"],[O.NAMESPACE,"namespace"],[O.PARENT,"parent"],[O.PRECEDING,"preceding"],[O.PRECEDINGSIBLING,"preceding-sibling"],[O.SELF,"self"]]),D.prototype=new Object,D.prototype.constructor=D,D.superclass=Object.prototype;function D(d,I){arguments.length>0&&this.init(d,I)}o(D,"NodeTest"),D.prototype.init=function(d,I){this.type=d,this.value=I},D.prototype.toString=function(){return"<unknown nodetest type>"},D.prototype.matches=function(d,I){console.warn("unknown node test type")},D.NAMETESTANY=0,D.NAMETESTPREFIXANY=1,D.NAMETESTQNAME=2,D.COMMENT=3,D.TEXT=4,D.PI=5,D.NODE=6,D.isNodeType=function(d){return function(I){return a(d,I.nodeType)}},D.makeNodeTestType=function(d,I,$){var re=$||function(){};return re.prototype=new D(d),re.prototype.constructor=re,v(re.prototype,I),re},D.makeNodeTypeTest=function(d,I,$){return new(D.makeNodeTestType(d,{matches:D.isNodeType(I),toString:u($)}))},D.hasPrefix=function(d){return d.prefix||(d.nodeName||d.tagName).indexOf(":")!==-1},D.isElementOrAttribute=D.isNodeType([1,2]),D.nameSpaceMatches=function(d,I,$){var re=$.namespaceURI||"";if(!d)return!re||I.allowAnyNamespaceForNoPrefix&&!D.hasPrefix($);var ae=I.namespaceResolver.getNamespace(d,I.expressionContextNode);if(ae==null)throw new Error("Cannot resolve QName "+d);return ae===re},D.localNameMatches=function(d,I,$){var re=$.localName||$.nodeName;return I.caseInsensitive?d.toLowerCase()===re.toLowerCase():d===re},D.NameTestPrefixAny=D.makeNodeTestType(D.NAMETESTPREFIXANY,{matches:o(function(d,I){return D.isElementOrAttribute(d)&&D.nameSpaceMatches(this.prefix,I,d)},"matches"),toString:o(function(){return this.prefix+":*"},"toString")},o(function(I){this.prefix=I},"NameTestPrefixAny")),D.NameTestQName=D.makeNodeTestType(D.NAMETESTQNAME,{matches:o(function(d,I){return D.isNodeType([w.ELEMENT_NODE,w.ATTRIBUTE_NODE,Fr.XPATH_NAMESPACE_NODE])(d)&&D.nameSpaceMatches(this.prefix,I,d)&&D.localNameMatches(this.localName,I,d)},"matches"),toString:o(function(){return this.name},"toString")},o(function(I){var $=I.split(":");this.name=I,this.prefix=$.length>1?$[0]:null,this.localName=$[$.length>1?1:0]},"NameTestQName")),D.PITest=D.makeNodeTestType(D.PI,{matches:o(function(d,I){return D.isNodeType([w.PROCESSING_INSTRUCTION_NODE])(d)&&(d.target||d.nodeName)===this.name},"matches"),toString:o(function(){return h('processing-instruction("','")',this.name)},"toString")},function(d){this.name=d}),D.nameTestAny=D.makeNodeTypeTest(D.NAMETESTANY,[w.ELEMENT_NODE,w.ATTRIBUTE_NODE,Fr.XPATH_NAMESPACE_NODE],"*"),D.textTest=D.makeNodeTypeTest(D.TEXT,[w.TEXT_NODE,w.CDATA_SECTION_NODE],"text()"),D.commentTest=D.makeNodeTypeTest(D.COMMENT,[w.COMMENT_NODE],"comment()"),D.nodeTest=D.makeNodeTypeTest(D.NODE,[w.ELEMENT_NODE,w.ATTRIBUTE_NODE,w.TEXT_NODE,w.CDATA_SECTION_NODE,w.PROCESSING_INSTRUCTION_NODE,w.COMMENT_NODE,w.DOCUMENT_NODE],"node()"),D.anyPiTest=D.makeNodeTypeTest(D.PI,[w.PROCESSING_INSTRUCTION_NODE],"processing-instruction()"),se.prototype=new b,se.prototype.constructor=se,se.superclass=b.prototype;function se(d){arguments.length>0&&this.init(d)}o(se,"VariableReference"),se.prototype.init=function(d){this.variable=d},se.prototype.toString=function(){return"$"+this.variable},se.prototype.evaluate=function(d){var I=et.resolveQName(this.variable,d.namespaceResolver,d.contextNode,!1);if(I[0]==null)throw new Error("Cannot resolve QName "+fn);var $=d.variableResolver.getVariable(I[1],I[0]);if(!$)throw Un.fromMessage("Undeclared variable: "+this.toString());return $},z.prototype=new b,z.prototype.constructor=z,z.superclass=b.prototype;function z(d,I){arguments.length>0&&this.init(d,I)}o(z,"FunctionCall"),z.prototype.init=function(d,I){this.functionName=d,this.arguments=I},z.prototype.toString=function(){for(var d=this.functionName+"(",I=0;I<this.arguments.length;I++)I>0&&(d+=", "),d+=this.arguments[I].toString();return d+")"},z.prototype.evaluate=function(d){var I=Es.getFunctionFromContext(this.functionName,d);if(!I)throw new Error("Unknown function "+this.functionName);var $=[d].concat(this.arguments);return I.apply(d.functionResolver.thisArg,$)};var Ge=new Object;Ge.equals=function(d,I){return d.equals(I)},Ge.notequal=function(d,I){return d.notequal(I)},Ge.lessthan=function(d,I){return d.lessthan(I)},Ge.greaterthan=function(d,I){return d.greaterthan(I)},Ge.lessthanorequal=function(d,I){return d.lessthanorequal(I)},Ge.greaterthanorequal=function(d,I){return d.greaterthanorequal(I)},Re.prototype=new b,Re.prototype.constructor=Re,Re.superclass=b.prototype;function Re(d){arguments.length>0&&this.init(d)}o(Re,"XString"),Re.prototype.init=function(d){this.str=String(d)},Re.prototype.toString=function(){return this.str},Re.prototype.evaluate=function(d){return this},Re.prototype.string=function(){return this},Re.prototype.number=function(){return new Ce(this.str)},Re.prototype.bool=function(){return new Me(this.str)},Re.prototype.nodeset=function(){throw new Error("Cannot convert string to nodeset")},Re.prototype.stringValue=function(){return this.str},Re.prototype.numberValue=function(){return this.number().numberValue()},Re.prototype.booleanValue=function(){return this.bool().booleanValue()},Re.prototype.equals=function(d){return et.instance_of(d,Me)?this.bool().equals(d):et.instance_of(d,Ce)?this.number().equals(d):et.instance_of(d,We)?d.compareWithString(this,Ge.equals):new Me(this.str==d.str)},Re.prototype.notequal=function(d){return et.instance_of(d,Me)?this.bool().notequal(d):et.instance_of(d,Ce)?this.number().notequal(d):et.instance_of(d,We)?d.compareWithString(this,Ge.notequal):new Me(this.str!=d.str)},Re.prototype.lessthan=function(d){return this.number().lessthan(d)},Re.prototype.greaterthan=function(d){return this.number().greaterthan(d)},Re.prototype.lessthanorequal=function(d){return this.number().lessthanorequal(d)},Re.prototype.greaterthanorequal=function(d){return this.number().greaterthanorequal(d)},Ce.prototype=new b,Ce.prototype.constructor=Ce,Ce.superclass=b.prototype;function Ce(d){arguments.length>0&&this.init(d)}o(Ce,"XNumber"),Ce.prototype.init=function(d){this.num=typeof d=="string"?this.parse(d):Number(d)},Ce.prototype.numberFormat=/^\s*-?[0-9]*\.?[0-9]+\s*$/,Ce.prototype.parse=function(d){return this.numberFormat.test(d)?parseFloat(d):Number.NaN};function ft(d){for(var I=d.split("e-"),$=I[0].replace(".",""),re=Number(I[1]),ae=0;ae<re-1;ae+=1)$="0"+$;return"0."+$}o(ft,"padSmallNumber");function nr(d){for(var I=d.split("e"),$=I[0].replace(".",""),re=Number(I[1]),ae=re+1-$.length,G=0;G<ae;G+=1)$+="0";return $}o(nr,"padLargeNumber"),Ce.prototype.toString=function(){var d=this.num.toString();return d.indexOf("e-")!==-1?ft(d):d.indexOf("e")!==-1?nr(d):d},Ce.prototype.evaluate=function(d){return this},Ce.prototype.string=function(){return new Re(this.toString())},Ce.prototype.number=function(){return this},Ce.prototype.bool=function(){return new Me(this.num)},Ce.prototype.nodeset=function(){throw new Error("Cannot convert number to nodeset")},Ce.prototype.stringValue=function(){return this.string().stringValue()},Ce.prototype.numberValue=function(){return this.num},Ce.prototype.booleanValue=function(){return this.bool().booleanValue()},Ce.prototype.negate=function(){return new Ce(-this.num)},Ce.prototype.equals=function(d){return et.instance_of(d,Me)?this.bool().equals(d):et.instance_of(d,Re)?this.equals(d.number()):et.instance_of(d,We)?d.compareWithNumber(this,Ge.equals):new Me(this.num==d.num)},Ce.prototype.notequal=function(d){return et.instance_of(d,Me)?this.bool().notequal(d):et.instance_of(d,Re)?this.notequal(d.number()):et.instance_of(d,We)?d.compareWithNumber(this,Ge.notequal):new Me(this.num!=d.num)},Ce.prototype.lessthan=function(d){return et.instance_of(d,We)?d.compareWithNumber(this,Ge.greaterthan):et.instance_of(d,Me)||et.instance_of(d,Re)?this.lessthan(d.number()):new Me(this.num<d.num)},Ce.prototype.greaterthan=function(d){return et.instance_of(d,We)?d.compareWithNumber(this,Ge.lessthan):et.instance_of(d,Me)||et.instance_of(d,Re)?this.greaterthan(d.number()):new Me(this.num>d.num)},Ce.prototype.lessthanorequal=function(d){return et.instance_of(d,We)?d.compareWithNumber(this,Ge.greaterthanorequal):et.instance_of(d,Me)||et.instance_of(d,Re)?this.lessthanorequal(d.number()):new Me(this.num<=d.num)},Ce.prototype.greaterthanorequal=function(d){return et.instance_of(d,We)?d.compareWithNumber(this,Ge.lessthanorequal):et.instance_of(d,Me)||et.instance_of(d,Re)?this.greaterthanorequal(d.number()):new Me(this.num>=d.num)},Ce.prototype.plus=function(d){return new Ce(this.num+d.num)},Ce.prototype.minus=function(d){return new Ce(this.num-d.num)},Ce.prototype.multiply=function(d){return new Ce(this.num*d.num)},Ce.prototype.div=function(d){return new Ce(this.num/d.num)},Ce.prototype.mod=function(d){return new Ce(this.num%d.num)},Me.prototype=new b,Me.prototype.constructor=Me,Me.superclass=b.prototype;function Me(d){arguments.length>0&&this.init(d)}o(Me,"XBoolean"),Me.prototype.init=function(d){this.b=!!d},Me.prototype.toString=function(){return this.b.toString()},Me.prototype.evaluate=function(d){return this},Me.prototype.string=function(){return new Re(this.b)},Me.prototype.number=function(){return new Ce(this.b)},Me.prototype.bool=function(){return this},Me.prototype.nodeset=function(){throw new Error("Cannot convert boolean to nodeset")},Me.prototype.stringValue=function(){return this.string().stringValue()},Me.prototype.numberValue=function(){return this.number().numberValue()},Me.prototype.booleanValue=function(){return this.b},Me.prototype.not=function(){return new Me(!this.b)},Me.prototype.equals=function(d){return et.instance_of(d,Re)||et.instance_of(d,Ce)?this.equals(d.bool()):et.instance_of(d,We)?d.compareWithBoolean(this,Ge.equals):new Me(this.b==d.b)},Me.prototype.notequal=function(d){return et.instance_of(d,Re)||et.instance_of(d,Ce)?this.notequal(d.bool()):et.instance_of(d,We)?d.compareWithBoolean(this,Ge.notequal):new Me(this.b!=d.b)},Me.prototype.lessthan=function(d){return this.number().lessthan(d)},Me.prototype.greaterthan=function(d){return this.number().greaterthan(d)},Me.prototype.lessthanorequal=function(d){return this.number().lessthanorequal(d)},Me.prototype.greaterthanorequal=function(d){return this.number().greaterthanorequal(d)},Me.true_=new Me(!0),Me.false_=new Me(!1),sr.prototype=new Object,sr.prototype.constructor=sr,sr.superclass=Object.prototype;function sr(d){this.init(d)}o(sr,"AVLTree"),sr.prototype.init=function(d){this.left=null,this.right=null,this.node=d,this.depth=1},sr.prototype.balance=function(){var d=this.left==null?0:this.left.depth,I=this.right==null?0:this.right.depth;if(d>I+1){var $=this.left.left==null?0:this.left.left.depth,re=this.left.right==null?0:this.left.right.depth;$<re&&this.left.rotateRR(),this.rotateLL()}else if(d+1<I){var ae=this.right.right==null?0:this.right.right.depth,G=this.right.left==null?0:this.right.left.depth;G>ae&&this.right.rotateLL(),this.rotateRR()}},sr.prototype.rotateLL=function(){var d=this.node,I=this.right;this.node=this.left.node,this.right=this.left,this.left=this.left.left,this.right.left=this.right.right,this.right.right=I,this.right.node=d,this.right.updateInNewLocation(),this.updateInNewLocation()},sr.prototype.rotateRR=function(){var d=this.node,I=this.left;this.node=this.right.node,this.left=this.right,this.right=this.right.right,this.left.right=this.left.left,this.left.left=I,this.left.node=d,this.left.updateInNewLocation(),this.updateInNewLocation()},sr.prototype.updateInNewLocation=function(){this.getDepthFromChildren()},sr.prototype.getDepthFromChildren=function(){this.depth=this.node==null?0:1,this.left!=null&&(this.depth=this.left.depth+1),this.right!=null&&this.depth<=this.right.depth&&(this.depth=this.right.depth+1)};function Xs(d,I){if(d===I)return 0;if(d.compareDocumentPosition){var $=d.compareDocumentPosition(I);return $&1||$&10?1:$&20?-1:0}for(var re=0,ae=0,G=d;G!=null;G=G.parentNode||G.ownerElement)re++;for(var st=I;st!=null;st=st.parentNode||st.ownerElement)ae++;if(re>ae){for(;re>ae;)d=d.parentNode||d.ownerElement,re--;if(d===I)return 1}else if(ae>re){for(;ae>re;)I=I.parentNode||I.ownerElement,ae--;if(d===I)return-1}for(var kt=d.parentNode||d.ownerElement,Wt=I.parentNode||I.ownerElement;kt!==Wt;)d=kt,I=Wt,kt=d.parentNode||d.ownerElement,Wt=I.parentNode||I.ownerElement;var tt=et.isAttribute(d),Bt=et.isAttribute(I);if(tt&&!Bt)return-1;if(!tt&&Bt)return 1;if(kt)for(var jn=tt?kt.attributes:kt.childNodes,pi=jn.length,cr=0;cr<pi;cr+=1){var ba=jn[cr];if(ba===d)return-1;if(ba===I)return 1}throw new Error("Unexpected: could not determine node order")}o(Xs,"nodeOrder"),sr.prototype.add=function(d){if(d===this.node)return!1;var I=Xs(d,this.node),$=!1;return I==-1?this.left==null?(this.left=new sr(d),$=!0):($=this.left.add(d),$&&this.balance()):I==1&&(this.right==null?(this.right=new sr(d),$=!0):($=this.right.add(d),$&&this.balance())),$&&this.getDepthFromChildren(),$},We.prototype=new b,We.prototype.constructor=We,We.superclass=b.prototype;function We(){this.init()}o(We,"XNodeSet"),We.prototype.init=function(){this.tree=null,this.nodes=[],this.size=0},We.prototype.toString=function(){var d=this.first();return d==null?"":this.stringForNode(d)},We.prototype.evaluate=function(d){return this},We.prototype.string=function(){return new Re(this.toString())},We.prototype.stringValue=function(){return this.toString()},We.prototype.number=function(){return new Ce(this.string())},We.prototype.numberValue=function(){return Number(this.string())},We.prototype.bool=function(){return new Me(this.booleanValue())},We.prototype.booleanValue=function(){return!!this.size},We.prototype.nodeset=function(){return this},We.prototype.stringForNode=function(d){return d.nodeType==w.DOCUMENT_NODE||d.nodeType==w.ELEMENT_NODE||d.nodeType===w.DOCUMENT_FRAGMENT_NODE?this.stringForContainerNode(d):d.nodeType===w.ATTRIBUTE_NODE?d.value||d.nodeValue:d.isNamespaceNode?d.namespace:d.nodeValue},We.prototype.stringForContainerNode=function(d){for(var I="",$=d.firstChild;$!=null;$=$.nextSibling){var re=$.nodeType;(re===1||re===3||re===4||re===9||re===11)&&(I+=this.stringForNode($))}return I},We.prototype.buildTree=function(){if(!this.tree&&this.nodes.length){this.tree=new sr(this.nodes[0]);for(var d=1;d<this.nodes.length;d+=1)this.tree.add(this.nodes[d])}return this.tree},We.prototype.first=function(){var d=this.buildTree();if(d==null)return null;for(;d.left!=null;)d=d.left;return d.node},We.prototype.add=function(d){for(var I=0;I<this.nodes.length;I+=1)if(d===this.nodes[I])return;this.tree=null,this.nodes.push(d),this.size+=1},We.prototype.addArray=function(d){var I=this;t(function($){I.add($)},d)},We.prototype.toArray=function(){var d=[];return this.toArrayRec(this.buildTree(),d),d},We.prototype.toArrayRec=function(d,I){d!=null&&(this.toArrayRec(d.left,I),I.push(d.node),this.toArrayRec(d.right,I))},We.prototype.toUnsortedArray=function(){return this.nodes.slice()},We.prototype.compareWithString=function(d,I){for(var $=this.toUnsortedArray(),re=0;re<$.length;re++){var ae=$[re],G=new Re(this.stringForNode(ae)),st=I(G,d);if(st.booleanValue())return st}return new Me(!1)},We.prototype.compareWithNumber=function(d,I){for(var $=this.toUnsortedArray(),re=0;re<$.length;re++){var ae=$[re],G=new Ce(this.stringForNode(ae)),st=I(G,d);if(st.booleanValue())return st}return new Me(!1)},We.prototype.compareWithBoolean=function(d,I){return I(this.bool(),d)},We.prototype.compareWithNodeSet=function(d,I){for(var $=this.toUnsortedArray(),re=o(function(kt,Wt){return I(Wt,kt)},"oInvert"),ae=0;ae<$.length;ae++){var G=new Re(this.stringForNode($[ae])),st=d.compareWithString(G,re);if(st.booleanValue())return st}return new Me(!1)},We.compareWith=e(function(d,I){return et.instance_of(I,Re)?this.compareWithString(I,d):et.instance_of(I,Ce)?this.compareWithNumber(I,d):et.instance_of(I,Me)?this.compareWithBoolean(I,d):this.compareWithNodeSet(I,d)}),We.prototype.equals=We.compareWith(Ge.equals),We.prototype.notequal=We.compareWith(Ge.notequal),We.prototype.lessthan=We.compareWith(Ge.lessthan),We.prototype.greaterthan=We.compareWith(Ge.greaterthan),We.prototype.lessthanorequal=We.compareWith(Ge.lessthanorequal),We.prototype.greaterthanorequal=We.compareWith(Ge.greaterthanorequal),We.prototype.union=function(d){var I=new We;return I.addArray(this.toUnsortedArray()),I.addArray(d.toUnsortedArray()),I},Fr.prototype=new Object,Fr.prototype.constructor=Fr,Fr.superclass=Object.prototype;function Fr(d,I,$){this.isXPathNamespace=!0,this.ownerDocument=$.ownerDocument,this.nodeName="#namespace",this.prefix=d,this.localName=d,this.namespaceURI=I,this.nodeValue=I,this.ownerElement=$,this.nodeType=Fr.XPATH_NAMESPACE_NODE}o(Fr,"XPathNamespace"),Fr.prototype.toString=function(){return'{ "'+this.prefix+'", "'+this.namespaceURI+'" }'},hn.prototype=new Object,hn.prototype.constructor=hn,hn.superclass=Object.prototype;function hn(d,I,$){this.variableResolver=d??new Zn,this.namespaceResolver=I??new fs,this.functionResolver=$??new Es}o(hn,"XPathContext"),hn.prototype.extend=function(d){return v(new hn,this,d)},Zn.prototype=new Object,Zn.prototype.constructor=Zn,Zn.superclass=Object.prototype;function Zn(){}o(Zn,"VariableResolver"),Zn.prototype.getVariable=function(d,I){return null},Es.prototype=new Object,Es.prototype.constructor=Es,Es.superclass=Object.prototype;function Es(d){this.thisArg=d??dt,this.functions=new Object,this.addStandardFunctions()}o(Es,"FunctionResolver"),Es.prototype.addStandardFunctions=function(){this.functions["{}last"]=dt.last,this.functions["{}position"]=dt.position,this.functions["{}count"]=dt.count,this.functions["{}id"]=dt.id,this.functions["{}local-name"]=dt.localName,this.functions["{}namespace-uri"]=dt.namespaceURI,this.functions["{}name"]=dt.name,this.functions["{}string"]=dt.string,this.functions["{}concat"]=dt.concat,this.functions["{}starts-with"]=dt.startsWith,this.functions["{}contains"]=dt.contains,this.functions["{}substring-before"]=dt.substringBefore,this.functions["{}substring-after"]=dt.substringAfter,this.functions["{}substring"]=dt.substring,this.functions["{}string-length"]=dt.stringLength,this.functions["{}normalize-space"]=dt.normalizeSpace,this.functions["{}translate"]=dt.translate,this.functions["{}boolean"]=dt.boolean_,this.functions["{}not"]=dt.not,this.functions["{}true"]=dt.true_,this.functions["{}false"]=dt.false_,this.functions["{}lang"]=dt.lang,this.functions["{}number"]=dt.number,this.functions["{}sum"]=dt.sum,this.functions["{}floor"]=dt.floor,this.functions["{}ceiling"]=dt.ceiling,this.functions["{}round"]=dt.round},Es.prototype.addFunction=function(d,I,$){this.functions["{"+d+"}"+I]=$},Es.getFunctionFromContext=function(d,I){var $=et.resolveQName(d,I.namespaceResolver,I.contextNode,!1);if($[0]===null)throw new Error("Cannot resolve QName "+name);return I.functionResolver.getFunction($[1],$[0])},Es.prototype.getFunction=function(d,I){return this.functions["{"+I+"}"+d]},fs.prototype=new Object,fs.prototype.constructor=fs,fs.superclass=Object.prototype;function fs(){}o(fs,"NamespaceResolver"),fs.prototype.getNamespace=function(d,I){if(d=="xml")return A.XML_NAMESPACE_URI;if(d=="xmlns")return A.XMLNS_NAMESPACE_URI;for(I.nodeType==w.DOCUMENT_NODE?I=I.documentElement:I.nodeType==w.ATTRIBUTE_NODE?I=xe.getOwnerElement(I):I.nodeType!=w.ELEMENT_NODE&&(I=I.parentNode);I!=null&&I.nodeType==w.ELEMENT_NODE;){for(var $=I.attributes,re=0;re<$.length;re++){var ae=$.item(re),G=ae.name||ae.nodeName;if(G==="xmlns"&&d===""||G==="xmlns:"+d)return String(ae.value||ae.nodeValue)}I=I.parentNode}return null};var dt=new Object;dt.last=function(d){if(arguments.length!=1)throw new Error("Function last expects ()");return new Ce(d.contextSize)},dt.position=function(d){if(arguments.length!=1)throw new Error("Function position expects ()");return new Ce(d.contextPosition)},dt.count=function(){var d=arguments[0],I;if(arguments.length!=2||!et.instance_of(I=arguments[1].evaluate(d),We))throw new Error("Function count expects (node-set)");return new Ce(I.size)},dt.id=function(){var d=arguments[0],I;if(arguments.length!=2)throw new Error("Function id expects (object)");I=arguments[1].evaluate(d),et.instance_of(I,We)?I=I.toArray().join(" "):I=I.stringValue();for(var $=I.split(/[\x0d\x0a\x09\x20]+/),re=0,ae=new We,G=d.contextNode.nodeType==w.DOCUMENT_NODE?d.contextNode:d.contextNode.ownerDocument,st=0;st<$.length;st++){var kt;G.getElementById?kt=G.getElementById($[st]):kt=et.getElementById(G,$[st]),kt!=null&&(ae.add(kt),re++)}return ae},dt.localName=function(d,I){var $;if(arguments.length==1)$=d.contextNode;else if(arguments.length==2)$=I.evaluate(d).first();else throw new Error("Function local-name expects (node-set?)");return $==null?new Re(""):new Re($.localName||$.baseName||$.target||$.nodeName||"")},dt.namespaceURI=function(){var d=arguments[0],I;if(arguments.length==1)I=d.contextNode;else if(arguments.length==2)I=arguments[1].evaluate(d).first();else throw new Error("Function namespace-uri expects (node-set?)");return I==null?new Re(""):new Re(I.namespaceURI)},dt.name=function(){var d=arguments[0],I;if(arguments.length==1)I=d.contextNode;else if(arguments.length==2)I=arguments[1].evaluate(d).first();else throw new Error("Function name expects (node-set?)");return I==null?new Re(""):I.nodeType==w.ELEMENT_NODE?new Re(I.nodeName):I.nodeType==w.ATTRIBUTE_NODE?new Re(I.name||I.nodeName):I.nodeType===w.PROCESSING_INSTRUCTION_NODE?new Re(I.target||I.nodeName):I.localName==null?new Re(""):new Re(I.localName)},dt.string=function(){var d=arguments[0];if(arguments.length==1)return new Re(We.prototype.stringForNode(d.contextNode));if(arguments.length==2)return arguments[1].evaluate(d).string();throw new Error("Function string expects (object?)")},dt.concat=function(d){if(arguments.length<3)throw new Error("Function concat expects (string, string[, string]*)");for(var I="",$=1;$<arguments.length;$++)I+=arguments[$].evaluate(d).stringValue();return new Re(I)},dt.startsWith=function(){var d=arguments[0];if(arguments.length!=3)throw new Error("Function startsWith expects (string, string)");var I=arguments[1].evaluate(d).stringValue(),$=arguments[2].evaluate(d).stringValue();return new Me(I.substring(0,$.length)==$)},dt.contains=function(){var d=arguments[0];if(arguments.length!=3)throw new Error("Function contains expects (string, string)");var I=arguments[1].evaluate(d).stringValue(),$=arguments[2].evaluate(d).stringValue();return new Me(I.indexOf($)!==-1)},dt.substringBefore=function(){var d=arguments[0];if(arguments.length!=3)throw new Error("Function substring-before expects (string, string)");var I=arguments[1].evaluate(d).stringValue(),$=arguments[2].evaluate(d).stringValue();return new Re(I.substring(0,I.indexOf($)))},dt.substringAfter=function(){var d=arguments[0];if(arguments.length!=3)throw new Error("Function substring-after expects (string, string)");var I=arguments[1].evaluate(d).stringValue(),$=arguments[2].evaluate(d).stringValue();if($.length==0)return new Re(I);var re=I.indexOf($);return re==-1?new Re(""):new Re(I.substring(re+$.length))},dt.substring=function(){var d=arguments[0];if(!(arguments.length==3||arguments.length==4))throw new Error("Function substring expects (string, number, number?)");var I=arguments[1].evaluate(d).stringValue(),$=Math.round(arguments[2].evaluate(d).numberValue())-1,re=arguments.length==4?$+Math.round(arguments[3].evaluate(d).numberValue()):void 0;return new Re(I.substring($,re))},dt.stringLength=function(){var d=arguments[0],I;if(arguments.length==1)I=We.prototype.stringForNode(d.contextNode);else if(arguments.length==2)I=arguments[1].evaluate(d).stringValue();else throw new Error("Function string-length expects (string?)");return new Ce(I.length)},dt.normalizeSpace=function(){var d=arguments[0],I;if(arguments.length==1)I=We.prototype.stringForNode(d.contextNode);else if(arguments.length==2)I=arguments[1].evaluate(d).stringValue();else throw new Error("Function normalize-space expects (string?)");for(var $=0,re=I.length-1;et.isSpace(I.charCodeAt(re));)re--;for(var ae="";$<=re&&et.isSpace(I.charCodeAt($));)$++;for(;$<=re;)if(et.isSpace(I.charCodeAt($)))for(ae+=" ";$<=re&&et.isSpace(I.charCodeAt($));)$++;else ae+=I.charAt($),$++;return new Re(ae)},dt.translate=function(d,I,$,re){if(arguments.length!=4)throw new Error("Function translate expects (string, string, string)");var ae=I.evaluate(d).stringValue(),G=$.evaluate(d).stringValue(),st=re.evaluate(d).stringValue(),kt=n(function(tt,Bt,jn){return Bt in tt||(tt[Bt]=jn>st.length?"":st[jn]),tt},{},G),Wt=f("",s(function(tt){return tt in kt?kt[tt]:tt},ae));return new Re(Wt)},dt.boolean_=function(){var d=arguments[0];if(arguments.length!=2)throw new Error("Function boolean expects (object)");return arguments[1].evaluate(d).bool()},dt.not=function(d,I){if(arguments.length!=2)throw new Error("Function not expects (object)");return I.evaluate(d).bool().not()},dt.true_=function(){if(arguments.length!=1)throw new Error("Function true expects ()");return Me.true_},dt.false_=function(){if(arguments.length!=1)throw new Error("Function false expects ()");return Me.false_},dt.lang=function(){var d=arguments[0];if(arguments.length!=2)throw new Error("Function lang expects (string)");for(var I,$=d.contextNode;$!=null&&$.nodeType!=w.DOCUMENT_NODE;$=$.parentNode){var re=$.getAttributeNS(A.XML_NAMESPACE_URI,"lang");if(re!=null){I=String(re);break}}if(I==null)return Me.false_;var ae=arguments[1].evaluate(d).stringValue();return new Me(I.substring(0,ae.length)==ae&&(I.length==ae.length||I.charAt(ae.length)=="-"))},dt.number=function(){var d=arguments[0];if(!(arguments.length==1||arguments.length==2))throw new Error("Function number expects (object?)");return arguments.length==1?new Ce(We.prototype.stringForNode(d.contextNode)):arguments[1].evaluate(d).number()},dt.sum=function(){var d=arguments[0],I;if(arguments.length!=2||!et.instance_of(I=arguments[1].evaluate(d),We))throw new Error("Function sum expects (node-set)");I=I.toUnsortedArray();for(var $=0,re=0;re<I.length;re++)$+=new Ce(We.prototype.stringForNode(I[re])).numberValue();return new Ce($)},dt.floor=function(){var d=arguments[0];if(arguments.length!=2)throw new Error("Function floor expects (number)");return new Ce(Math.floor(arguments[1].evaluate(d).numberValue()))},dt.ceiling=function(){var d=arguments[0];if(arguments.length!=2)throw new Error("Function ceiling expects (number)");return new Ce(Math.ceil(arguments[1].evaluate(d).numberValue()))},dt.round=function(){var d=arguments[0];if(arguments.length!=2)throw new Error("Function round expects (number)");return new Ce(Math.round(arguments[1].evaluate(d).numberValue()))};var et=new Object;et.isAttribute=function(d){return d&&(d.nodeType===w.ATTRIBUTE_NODE||d.ownerElement)},et.splitQName=function(d){var I=d.indexOf(":");return I==-1?[null,d]:[d.substring(0,I),d.substring(I+1)]},et.resolveQName=function(d,I,$,re){var ae=et.splitQName(d);return ae[0]!=null?ae[0]=I.getNamespace(ae[0],$):re?(ae[0]=I.getNamespace("",$),ae[0]==null&&(ae[0]="")):ae[0]="",ae},et.isSpace=function(d){return d==9||d==13||d==10||d==32},et.isLetter=function(d){return d>=65&&d<=90||d>=97&&d<=122||d>=192&&d<=214||d>=216&&d<=246||d>=248&&d<=255||d>=256&&d<=305||d>=308&&d<=318||d>=321&&d<=328||d>=330&&d<=382||d>=384&&d<=451||d>=461&&d<=496||d>=500&&d<=501||d>=506&&d<=535||d>=592&&d<=680||d>=699&&d<=705||d==902||d>=904&&d<=906||d==908||d>=910&&d<=929||d>=931&&d<=974||d>=976&&d<=982||d==986||d==988||d==990||d==992||d>=994&&d<=1011||d>=1025&&d<=1036||d>=1038&&d<=1103||d>=1105&&d<=1116||d>=1118&&d<=1153||d>=1168&&d<=1220||d>=1223&&d<=1224||d>=1227&&d<=1228||d>=1232&&d<=1259||d>=1262&&d<=1269||d>=1272&&d<=1273||d>=1329&&d<=1366||d==1369||d>=1377&&d<=1414||d>=1488&&d<=1514||d>=1520&&d<=1522||d>=1569&&d<=1594||d>=1601&&d<=1610||d>=1649&&d<=1719||d>=1722&&d<=1726||d>=1728&&d<=1742||d>=1744&&d<=1747||d==1749||d>=1765&&d<=1766||d>=2309&&d<=2361||d==2365||d>=2392&&d<=2401||d>=2437&&d<=2444||d>=2447&&d<=2448||d>=2451&&d<=2472||d>=2474&&d<=2480||d==2482||d>=2486&&d<=2489||d>=2524&&d<=2525||d>=2527&&d<=2529||d>=2544&&d<=2545||d>=2565&&d<=2570||d>=2575&&d<=2576||d>=2579&&d<=2600||d>=2602&&d<=2608||d>=2610&&d<=2611||d>=2613&&d<=2614||d>=2616&&d<=2617||d>=2649&&d<=2652||d==2654||d>=2674&&d<=2676||d>=2693&&d<=2699||d==2701||d>=2703&&d<=2705||d>=2707&&d<=2728||d>=2730&&d<=2736||d>=2738&&d<=2739||d>=2741&&d<=2745||d==2749||d==2784||d>=2821&&d<=2828||d>=2831&&d<=2832||d>=2835&&d<=2856||d>=2858&&d<=2864||d>=2866&&d<=2867||d>=2870&&d<=2873||d==2877||d>=2908&&d<=2909||d>=2911&&d<=2913||d>=2949&&d<=2954||d>=2958&&d<=2960||d>=2962&&d<=2965||d>=2969&&d<=2970||d==2972||d>=2974&&d<=2975||d>=2979&&d<=2980||d>=2984&&d<=2986||d>=2990&&d<=2997||d>=2999&&d<=3001||d>=3077&&d<=3084||d>=3086&&d<=3088||d>=3090&&d<=3112||d>=3114&&d<=3123||d>=3125&&d<=3129||d>=3168&&d<=3169||d>=3205&&d<=3212||d>=3214&&d<=3216||d>=3218&&d<=3240||d>=3242&&d<=3251||d>=3253&&d<=3257||d==3294||d>=3296&&d<=3297||d>=3333&&d<=3340||d>=3342&&d<=3344||d>=3346&&d<=3368||d>=3370&&d<=3385||d>=3424&&d<=3425||d>=3585&&d<=3630||d==3632||d>=3634&&d<=3635||d>=3648&&d<=3653||d>=3713&&d<=3714||d==3716||d>=3719&&d<=3720||d==3722||d==3725||d>=3732&&d<=3735||d>=3737&&d<=3743||d>=3745&&d<=3747||d==3749||d==3751||d>=3754&&d<=3755||d>=3757&&d<=3758||d==3760||d>=3762&&d<=3763||d==3773||d>=3776&&d<=3780||d>=3904&&d<=3911||d>=3913&&d<=3945||d>=4256&&d<=4293||d>=4304&&d<=4342||d==4352||d>=4354&&d<=4355||d>=4357&&d<=4359||d==4361||d>=4363&&d<=4364||d>=4366&&d<=4370||d==4412||d==4414||d==4416||d==4428||d==4430||d==4432||d>=4436&&d<=4437||d==4441||d>=4447&&d<=4449||d==4451||d==4453||d==4455||d==4457||d>=4461&&d<=4462||d>=4466&&d<=4467||d==4469||d==4510||d==4520||d==4523||d>=4526&&d<=4527||d>=4535&&d<=4536||d==4538||d>=4540&&d<=4546||d==4587||d==4592||d==4601||d>=7680&&d<=7835||d>=7840&&d<=7929||d>=7936&&d<=7957||d>=7960&&d<=7965||d>=7968&&d<=8005||d>=8008&&d<=8013||d>=8016&&d<=8023||d==8025||d==8027||d==8029||d>=8031&&d<=8061||d>=8064&&d<=8116||d>=8118&&d<=8124||d==8126||d>=8130&&d<=8132||d>=8134&&d<=8140||d>=8144&&d<=8147||d>=8150&&d<=8155||d>=8160&&d<=8172||d>=8178&&d<=8180||d>=8182&&d<=8188||d==8486||d>=8490&&d<=8491||d==8494||d>=8576&&d<=8578||d>=12353&&d<=12436||d>=12449&&d<=12538||d>=12549&&d<=12588||d>=44032&&d<=55203||d>=19968&&d<=40869||d==12295||d>=12321&&d<=12329},et.isNCNameChar=function(d){return d>=48&&d<=57||d>=1632&&d<=1641||d>=1776&&d<=1785||d>=2406&&d<=2415||d>=2534&&d<=2543||d>=2662&&d<=2671||d>=2790&&d<=2799||d>=2918&&d<=2927||d>=3047&&d<=3055||d>=3174&&d<=3183||d>=3302&&d<=3311||d>=3430&&d<=3439||d>=3664&&d<=3673||d>=3792&&d<=3801||d>=3872&&d<=3881||d==46||d==45||d==95||et.isLetter(d)||d>=768&&d<=837||d>=864&&d<=865||d>=1155&&d<=1158||d>=1425&&d<=1441||d>=1443&&d<=1465||d>=1467&&d<=1469||d==1471||d>=1473&&d<=1474||d==1476||d>=1611&&d<=1618||d==1648||d>=1750&&d<=1756||d>=1757&&d<=1759||d>=1760&&d<=1764||d>=1767&&d<=1768||d>=1770&&d<=1773||d>=2305&&d<=2307||d==2364||d>=2366&&d<=2380||d==2381||d>=2385&&d<=2388||d>=2402&&d<=2403||d>=2433&&d<=2435||d==2492||d==2494||d==2495||d>=2496&&d<=2500||d>=2503&&d<=2504||d>=2507&&d<=2509||d==2519||d>=2530&&d<=2531||d==2562||d==2620||d==2622||d==2623||d>=2624&&d<=2626||d>=2631&&d<=2632||d>=2635&&d<=2637||d>=2672&&d<=2673||d>=2689&&d<=2691||d==2748||d>=2750&&d<=2757||d>=2759&&d<=2761||d>=2763&&d<=2765||d>=2817&&d<=2819||d==2876||d>=2878&&d<=2883||d>=2887&&d<=2888||d>=2891&&d<=2893||d>=2902&&d<=2903||d>=2946&&d<=2947||d>=3006&&d<=3010||d>=3014&&d<=3016||d>=3018&&d<=3021||d==3031||d>=3073&&d<=3075||d>=3134&&d<=3140||d>=3142&&d<=3144||d>=3146&&d<=3149||d>=3157&&d<=3158||d>=3202&&d<=3203||d>=3262&&d<=3268||d>=3270&&d<=3272||d>=3274&&d<=3277||d>=3285&&d<=3286||d>=3330&&d<=3331||d>=3390&&d<=3395||d>=3398&&d<=3400||d>=3402&&d<=3405||d==3415||d==3633||d>=3636&&d<=3642||d>=3655&&d<=3662||d==3761||d>=3764&&d<=3769||d>=3771&&d<=3772||d>=3784&&d<=3789||d>=3864&&d<=3865||d==3893||d==3895||d==3897||d==3902||d==3903||d>=3953&&d<=3972||d>=3974&&d<=3979||d>=3984&&d<=3989||d==3991||d>=3993&&d<=4013||d>=4017&&d<=4023||d==4025||d>=8400&&d<=8412||d==8417||d>=12330&&d<=12335||d==12441||d==12442||d==183||d==720||d==721||d==903||d==1600||d==3654||d==3782||d==12293||d>=12337&&d<=12341||d>=12445&&d<=12446||d>=12540&&d<=12542},et.coalesceText=function(d){for(var I=d.firstChild;I!=null;I=I.nextSibling)if(I.nodeType==w.TEXT_NODE||I.nodeType==w.CDATA_SECTION_NODE){var $=I.nodeValue,re=I;for(I=I.nextSibling;I!=null&&(I.nodeType==w.TEXT_NODE||I.nodeType==w.CDATA_SECTION_NODE);){$+=I.nodeValue;var ae=I;I=I.nextSibling,ae.parentNode.removeChild(ae)}if(re.nodeType==w.CDATA_SECTION_NODE){var G=re.parentNode;if(re.nextSibling==null)G.removeChild(re),G.appendChild(G.ownerDocument.createTextNode($));else{var st=re.nextSibling;G.removeChild(re),G.insertBefore(G.ownerDocument.createTextNode($),st)}}else re.nodeValue=$;if(I==null)break}else I.nodeType==w.ELEMENT_NODE&&et.coalesceText(I)},et.instance_of=function(d,I){for(;d!=null;){if(d.constructor===I)return!0;if(d===Object)return!1;d=d.constructor.superclass}return!1},et.getElementById=function(d,I){if(d.nodeType==w.ELEMENT_NODE&&(d.getAttribute("id")==I||d.getAttributeNS(null,"id")==I))return d;for(var $=d.firstChild;$!=null;$=$.nextSibling){var re=et.getElementById($,I);if(re!=null)return re}return null};var Un=(function(){function d($,re){var ae=re?": "+re.toString():"";switch($){case I.INVALID_EXPRESSION_ERR:return"Invalid expression"+ae;case I.TYPE_ERR:return"Type error"+ae}return null}o(d,"getMessage");function I($,re,ae){var G=Error.call(this,d($,re)||ae);return G.code=$,G.exception=re,G}return o(I,"XPathException"),I.prototype=Object.create(Error.prototype),I.prototype.constructor=I,I.superclass=Error,I.prototype.toString=function(){return this.message},I.fromMessage=function($,re){return new I(null,re,$)},I.INVALID_EXPRESSION_ERR=51,I.TYPE_ERR=52,I})();hs.prototype={},hs.prototype.constructor=hs,hs.superclass=Object.prototype;function hs(d,I,$){this.xpath=$.parse(d),this.context=new hn,this.context.namespaceResolver=new wa(I)}o(hs,"XPathExpression"),hs.getOwnerDocument=function(d){return d.nodeType===w.DOCUMENT_NODE?d:d.ownerDocument},hs.detectHtmlDom=function(d){if(!d)return!1;var I=hs.getOwnerDocument(d);try{return I.implementation.hasFeature("HTML","2.0")}catch{return!0}},hs.prototype.evaluate=function(d,I,$){this.context.expressionContextNode=d,this.context.caseInsensitive=hs.detectHtmlDom(d);var re=this.xpath.evaluate(this.context);return new Rt(re,I)},wa.prototype={},wa.prototype.constructor=wa,wa.superclass=Object.prototype;function wa(d){this.xpathNSResolver=d}o(wa,"XPathNSResolverWrapper"),wa.prototype.getNamespace=function(d,I){return this.xpathNSResolver==null?null:this.xpathNSResolver.lookupNamespaceURI(d)},Sa.prototype={},Sa.prototype.constructor=Sa,Sa.superclass=Object.prototype;function Sa(d){this.node=d,this.namespaceResolver=new fs}o(Sa,"NodeXPathNSResolver"),Sa.prototype.lookupNamespaceURI=function(d){return this.namespaceResolver.getNamespace(d,this.node)},Rt.prototype={},Rt.prototype.constructor=Rt,Rt.superclass=Object.prototype;function Rt(d,I){switch(I==Rt.ANY_TYPE&&(d.constructor===Re?I=Rt.STRING_TYPE:d.constructor===Ce?I=Rt.NUMBER_TYPE:d.constructor===Me?I=Rt.BOOLEAN_TYPE:d.constructor===We&&(I=Rt.UNORDERED_NODE_ITERATOR_TYPE)),this.resultType=I,I){case Rt.NUMBER_TYPE:this.numberValue=d.numberValue();return;case Rt.STRING_TYPE:this.stringValue=d.stringValue();return;case Rt.BOOLEAN_TYPE:this.booleanValue=d.booleanValue();return;case Rt.ANY_UNORDERED_NODE_TYPE:case Rt.FIRST_ORDERED_NODE_TYPE:if(d.constructor===We){this.singleNodeValue=d.first();return}break;case Rt.UNORDERED_NODE_ITERATOR_TYPE:case Rt.ORDERED_NODE_ITERATOR_TYPE:if(d.constructor===We){this.invalidIteratorState=!1,this.nodes=d.toArray(),this.iteratorIndex=0;return}break;case Rt.UNORDERED_NODE_SNAPSHOT_TYPE:case Rt.ORDERED_NODE_SNAPSHOT_TYPE:if(d.constructor===We){this.nodes=d.toArray(),this.snapshotLength=this.nodes.length;return}break}throw new Un(Un.TYPE_ERR)}o(Rt,"XPathResult"),Rt.prototype.iterateNext=function(){if(this.resultType!=Rt.UNORDERED_NODE_ITERATOR_TYPE&&this.resultType!=Rt.ORDERED_NODE_ITERATOR_TYPE)throw new Un(Un.TYPE_ERR);return this.nodes[this.iteratorIndex++]},Rt.prototype.snapshotItem=function(d){if(this.resultType!=Rt.UNORDERED_NODE_SNAPSHOT_TYPE&&this.resultType!=Rt.ORDERED_NODE_SNAPSHOT_TYPE)throw new Un(Un.TYPE_ERR);return this.nodes[d]},Rt.ANY_TYPE=0,Rt.NUMBER_TYPE=1,Rt.STRING_TYPE=2,Rt.BOOLEAN_TYPE=3,Rt.UNORDERED_NODE_ITERATOR_TYPE=4,Rt.ORDERED_NODE_ITERATOR_TYPE=5,Rt.UNORDERED_NODE_SNAPSHOT_TYPE=6,Rt.ORDERED_NODE_SNAPSHOT_TYPE=7,Rt.ANY_UNORDERED_NODE_TYPE=8,Rt.FIRST_ORDERED_NODE_TYPE=9;function Uh(d,I){d.createExpression=function($,re){try{return new hs($,re,I)}catch(ae){throw new Un(Un.INVALID_EXPRESSION_ERR,ae)}},d.createNSResolver=function($){return new Sa($)},d.evaluate=function($,re,ae,G,st){if(G<0||G>9)throw{code:0,toString:o(function(){return"Request type not supported"},"toString")};return d.createExpression($,ae,I).evaluate(re,G,st)}}o(Uh,"installDOM3XPathSupport");try{var jh=!0;try{document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("XPath",null)&&(jh=!1)}catch{}jh&&Uh(document,new S)}catch{}Uh(r,new S),(function(){var d=new S,I=new fs,$=new Es,re=new Zn;function ae(qe){return{getNamespace:o(function(er,es){var Xi=qe(er,es);return Xi||I.getNamespace(er,es)},"getNamespace")}}o(ae,"makeNSResolverFromFunction");function G(qe){return ae(qe.getNamespace.bind(qe))}o(G,"makeNSResolverFromObject");function st(qe){return ae(function(er){return qe[er]})}o(st,"makeNSResolverFromMap");function kt(qe){return qe&&typeof qe.getNamespace=="function"?G(qe):typeof qe=="function"?ae(qe):typeof qe=="object"?st(qe):I}o(kt,"makeNSResolver");function Wt(qe){if(qe===null||typeof qe>"u"||qe instanceof Re||qe instanceof Me||qe instanceof Ce||qe instanceof We)return qe;switch(typeof qe){case"string":return new Re(qe);case"boolean":return new Me(qe);case"number":return new Ce(qe)}var er=new We;return er.addArray([].concat(qe)),er}o(Wt,"convertValue");function tt(qe){return function(er){var es=Array.prototype.slice.call(arguments,1).map(function(dC){return dC.evaluate(er)}),Xi=qe.apply(this,[].concat(er,es));return Wt(Xi)}}o(tt,"makeEvaluator");function Bt(qe){return{getFunction:o(function(er,es){var Xi=qe(er,es);return Xi?tt(Xi):$.getFunction(er,es)},"getFunction")}}o(Bt,"makeFunctionResolverFromFunction");function jn(qe){return Bt(qe.getFunction.bind(qe))}o(jn,"makeFunctionResolverFromObject");function pi(qe){return Bt(function(er){return qe[er]})}o(pi,"makeFunctionResolverFromMap");function cr(qe){return qe&&typeof qe.getFunction=="function"?jn(qe):typeof qe=="function"?Bt(qe):typeof qe=="object"?pi(qe):$}o(cr,"makeFunctionResolver");function ba(qe){return{getVariable:o(function(er,es){var Xi=qe(er,es);return Wt(Xi)},"getVariable")}}o(ba,"makeVariableResolverFromFunction");function I0(qe){if(qe){if(typeof qe.getVariable=="function")return ba(qe.getVariable.bind(qe));if(typeof qe=="function")return ba(qe);if(typeof qe=="object")return ba(function(er){return qe[er]})}return re}o(I0,"makeVariableResolver");function ux(qe,er,es){qe in es&&(er[qe]=es[qe])}o(ux,"copyIfPresent");function lC(qe){var er=new hn;return qe?(er.namespaceResolver=kt(qe.namespaces),er.functionResolver=cr(qe.functions),er.variableResolver=I0(qe.variables),er.expressionContextNode=qe.node,ux("allowAnyNamespaceForNoPrefix",er,qe),ux("isHtml",er,qe)):er.namespaceResolver=I,er}o(lC,"makeContext");function fC(qe,er){var es=lC(er);return qe.evaluate(es)}o(fC,"evaluate");var hC={evaluate:o(function(qe){return fC(this.expression,qe)},"evaluate"),evaluateNumber:o(function(qe){return this.evaluate(qe).numberValue()},"evaluateNumber"),evaluateString:o(function(qe){return this.evaluate(qe).stringValue()},"evaluateString"),evaluateBoolean:o(function(qe){return this.evaluate(qe).booleanValue()},"evaluateBoolean"),evaluateNodeSet:o(function(qe){return this.evaluate(qe).nodeset()},"evaluateNodeSet"),select:o(function(qe){return this.evaluateNodeSet(qe).toArray()},"select"),select1:o(function(qe){return this.select(qe)[0]},"select1")};function pC(qe){var er=d.parse(qe);return Object.create(hC,{expression:{value:er}})}o(pC,"parse"),r.parse=pC})(),v(r,{XPath:A,XPathParser:S,XPathResult:Rt,Step:O,PathExpr:xe,NodeTest:D,LocationPath:lt,OrOperation:F,AndOperation:R,BarOperation:Ae,EqualsOperation:q,NotEqualOperation:H,LessThanOperation:K,GreaterThanOperation:X,LessThanOrEqualOperation:pe,GreaterThanOrEqualOperation:le,PlusOperation:ue,MinusOperation:ee,MultiplyOperation:he,DivOperation:we,ModOperation:Ke,UnaryMinusOperation:C,FunctionCall:z,VariableReference:se,XPathContext:hn,XNodeSet:We,XBoolean:Me,XString:Re,XNumber:Ce,NamespaceResolver:fs,FunctionResolver:Es,VariableResolver:Zn,Utilities:et}),r.select=function(d,I,$){return r.selectWithResolver(d,I,null,$)},r.useNamespaces=function(d){var I={mappings:d||{},lookupNamespaceURI:o(function($){return this.mappings[$]},"lookupNamespaceURI")};return function($,re,ae){return r.selectWithResolver($,re,I,ae)}},r.selectWithResolver=function(d,I,$,re){var ae=new hs(d,$,new S),G=Rt.ANY_TYPE,st=ae.evaluate(I,G,null);return st.resultType==Rt.STRING_TYPE?st=st.stringValue:st.resultType==Rt.NUMBER_TYPE?st=st.numberValue:st.resultType==Rt.BOOLEAN_TYPE?st=st.booleanValue:(st=st.nodes,re&&(st=st[0])),st},r.select1=function(d,I){return r.select(d,I,!0)};var yl=o(function(d){return d&&typeof d.nodeType=="number"&&Number.isInteger(d.nodeType)&&d.nodeType>=1&&d.nodeType<=11&&typeof d.nodeName=="string"},"isNodeLike"),T0=o(function(d){return Array.isArray(d)&&d.every(yl)},"isArrayOfNodes"),Ws=o(function(d){return function(I){return yl(I)&&I.nodeType===d}},"isNodeOfType");v(r,{isNodeLike:yl,isArrayOfNodes:T0,isElement:Ws(w.ELEMENT_NODE),isAttribute:Ws(w.ATTRIBUTE_NODE),isTextNode:Ws(w.TEXT_NODE),isCDATASection:Ws(w.CDATA_SECTION_NODE),isProcessingInstruction:Ws(w.PROCESSING_INSTRUCTION_NODE),isComment:Ws(w.COMMENT_NODE),isDocumentNode:Ws(w.DOCUMENT_NODE),isDocumentTypeNode:Ws(w.DOCUMENT_TYPE_NODE),isDocumentFragment:Ws(w.DOCUMENT_FRAGMENT_NODE)})})(Lie)});var Lp=Z(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.assertIsDocumentFragmentNode=It.assertIsDocumentTypeNode=It.assertIsDocumentNode=It.assertIsCommentNode=It.assertIsProcessingInstructionNode=It.assertIsCDATASectionNode=It.assertIsTextNode=It.assertIsAttributeNode=It.assertIsElementNode=It.isDocumentFragmentNode=It.isDocumentTypeNode=It.isDocumentNode=It.isCommentNode=It.isProcessingInstructionNode=It.isCDATASectionNode=It.isTextNode=It.isAttributeNode=It.isElementNode=It.assertIsArrayOfNodes=It.isArrayOfNodes=It.assertIsNodeLike=It.isNodeLike=It.NodeTypes=void 0;var tn;(function(r){r[r.ELEMENT_NODE=1]="ELEMENT_NODE",r[r.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",r[r.TEXT_NODE=3]="TEXT_NODE",r[r.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",r[r.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",r[r.COMMENT_NODE=8]="COMMENT_NODE",r[r.DOCUMENT_NODE=9]="DOCUMENT_NODE",r[r.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",r[r.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(tn||(It.NodeTypes=tn={}));function ES(r){return r&&typeof r=="object"&&Number.isInteger(r.nodeType)&&r.nodeType>=1&&r.nodeType<=11&&typeof r.nodeName=="string"&&typeof r.appendChild=="function"&&typeof r.removeChild=="function"}o(ES,"isNodeLike");It.isNodeLike=ES;function Vie(r){if(!ES(r))throw new Error(`Value is not a Node-like object. Received: ${r}`)}o(Vie,"assertIsNodeLike");It.assertIsNodeLike=Vie;function CV(r){return Array.isArray(r)&&r.every(ES)}o(CV,"isArrayOfNodes");It.isArrayOfNodes=CV;function Uie(r){if(!CV(r))throw new Error("Value is not an array of Nodes")}o(Uie,"assertIsArrayOfNodes");It.assertIsArrayOfNodes=Uie;function Xa(r,e){return ES(e)&&e.nodeType===r}o(Xa,"isNodeOfType");function Bo(r,e){let t=Object.keys(tn).find(n=>tn[n]===r);if(!Xa(r,e))throw new Error(`Value is not of type ${t}`)}o(Bo,"assertIsNodeOfType");var jie=o(r=>Xa(tn.ELEMENT_NODE,r),"isElementNode");It.isElementNode=jie;var Mie=o(r=>Xa(tn.ATTRIBUTE_NODE,r),"isAttributeNode");It.isAttributeNode=Mie;var Fie=o(r=>Xa(tn.TEXT_NODE,r),"isTextNode");It.isTextNode=Fie;var qie=o(r=>Xa(tn.CDATA_SECTION_NODE,r),"isCDATASectionNode");It.isCDATASectionNode=qie;var Hie=o(r=>Xa(tn.PROCESSING_INSTRUCTION_NODE,r),"isProcessingInstructionNode");It.isProcessingInstructionNode=Hie;var Kie=o(r=>Xa(tn.COMMENT_NODE,r),"isCommentNode");It.isCommentNode=Kie;var $ie=o(r=>Xa(tn.DOCUMENT_NODE,r),"isDocumentNode");It.isDocumentNode=$ie;var Gie=o(r=>Xa(tn.DOCUMENT_TYPE_NODE,r),"isDocumentTypeNode");It.isDocumentTypeNode=Gie;var Xie=o(r=>Xa(tn.DOCUMENT_FRAGMENT_NODE,r),"isDocumentFragmentNode");It.isDocumentFragmentNode=Xie;var Wie=o(r=>{Bo(tn.ELEMENT_NODE,r)},"assertIsElementNode");It.assertIsElementNode=Wie;var zie=o(r=>Bo(tn.ATTRIBUTE_NODE,r),"assertIsAttributeNode");It.assertIsAttributeNode=zie;var Jie=o(r=>Bo(tn.TEXT_NODE,r),"assertIsTextNode");It.assertIsTextNode=Jie;var Yie=o(r=>Bo(tn.CDATA_SECTION_NODE,r),"assertIsCDATASectionNode");It.assertIsCDATASectionNode=Yie;var Qie=o(r=>Bo(tn.PROCESSING_INSTRUCTION_NODE,r),"assertIsProcessingInstructionNode");It.assertIsProcessingInstructionNode=Qie;var Zie=o(r=>Bo(tn.COMMENT_NODE,r),"assertIsCommentNode");It.assertIsCommentNode=Zie;var eae=o(r=>Bo(tn.DOCUMENT_NODE,r),"assertIsDocumentNode");It.assertIsDocumentNode=eae;var tae=o(r=>Bo(tn.DOCUMENT_TYPE_NODE,r),"assertIsDocumentTypeNode");It.assertIsDocumentTypeNode=tae;var rae=o(r=>Bo(tn.DOCUMENT_FRAGMENT_NODE,r),"assertIsDocumentFragmentNode");It.assertIsDocumentFragmentNode=rae});var Ng=Z(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.validateDigestValue=hr.findAncestorNs=hr.derToPem=hr.pemToDer=hr.normalizePem=hr.BASE64_REGEX=hr.EXTRACT_X509_CERTS=hr.PEM_FORMAT_REGEX=hr.encodeSpecialCharactersInText=hr.encodeSpecialCharactersInAttribute=hr.findChilds=hr.findChildren=hr.findAttr=hr.isArrayHasLength=void 0;var nae=bS(),aI=Lp();function NV(r){return Array.isArray(r)&&r.length>0}o(NV,"isArrayHasLength");hr.isArrayHasLength=NV;function sae(r,e,t){return r.localName===e&&(r.namespaceURI===t||t==null)}o(sae,"attrEqualsExplicitly");function iae(r,e,t,n){return r.localName===e&&(!r.namespaceURI&&n?.namespaceURI===t||t==null)}o(iae,"attrEqualsImplicitly");function aae(r,e,t){for(let n=0;n<r.attributes.length;n++){let s=r.attributes[n];if(sae(s,e,t)||iae(s,e,t,r))return s}return null}o(aae,"findAttr");hr.findAttr=aae;function TV(r,e,t){let n=r.documentElement??r,s=[];for(let i=0;i<n.childNodes.length;i++){let a=n.childNodes[i];aI.isElementNode(a)&&a.localName===e&&(a.namespaceURI===t||t==null)&&s.push(a)}return s}o(TV,"findChildren");hr.findChildren=TV;function oae(r,e,t){return TV(r,e,t)}o(oae,"findChilds");hr.findChilds=oae;var uae={"&":"&amp;","<":"&lt;",'"':"&quot;","\r":"&#xD;","\n":"&#xA;"," ":"&#x9;"},cae={"&":"&amp;","<":"&lt;",">":"&gt;","\r":"&#xD;"};function lae(r){return r.replace(/([&<"\r\n\t])/g,function(e,t){return uae[t]})}o(lae,"encodeSpecialCharactersInAttribute");hr.encodeSpecialCharactersInAttribute=lae;function fae(r){return r.replace(/([&<>\r])/g,function(e,t){return cae[t]})}o(fae,"encodeSpecialCharactersInText");hr.encodeSpecialCharactersInText=fae;hr.PEM_FORMAT_REGEX=new RegExp("^-----BEGIN [A-Z ]{1,48}-----([^-]*)-----END [A-Z ]{1,48}-----$","s");hr.EXTRACT_X509_CERTS=new RegExp("-----BEGIN CERTIFICATE-----[^-]*-----END CERTIFICATE-----","g");hr.BASE64_REGEX=new RegExp("^(?:[A-Za-z0-9\\+\\/]{4}\\n{0,1})*(?:[A-Za-z0-9\\+\\/]{2}==|[A-Za-z0-9\\+\\/]{3}=)?$","s");function iI(r){return`${(r.trim().replace(/(\r\n|\r)/g,`
60
+ `).match(/.{1,64}/g)??[]).join(`
61
+ `)}
62
+ `}o(iI,"normalizePem");hr.normalizePem=iI;function hae(r){if(!hr.PEM_FORMAT_REGEX.test(r.trim()))throw new Error("Invalid PEM format.");return Buffer.from(r.replace(/(\r\n|\r)/g,"").replace(/-----BEGIN [A-Z\x20]{1,48}-----\n?/,"").replace(/-----END [A-Z\x20]{1,48}-----\n?/,""),"base64")}o(hae,"pemToDer");hr.pemToDer=hae;function pae(r,e){let t=Buffer.isBuffer(r)?r.toString("base64").trim():r.replace(/(\r\n|\r)/g,"").trim();if(hr.PEM_FORMAT_REGEX.test(t))return iI(t);if(hr.BASE64_REGEX.test(t.replace(/ /g,""))){if(e==null)throw new Error("PEM label is required when DER is given.");let n=`-----BEGIN ${e}-----
63
+ ${t.replace(/ /g,"")}
64
+ -----END ${e}-----`;return iI(n)}throw new Error("Unknown DER format.")}o(pae,"derToPem");hr.derToPem=pae;function IV(r,e=[]){if(!aI.isElementNode(r.parentNode))return e;let t=r.parentNode;if(!t)return e;if(t.attributes&&t.attributes.length>0)for(let n=0;n<t.attributes.length;n++){let s=t.attributes[n];s&&s.nodeName&&s.nodeName.search(/^xmlns:?/)!==-1&&e.push({prefix:s.nodeName.replace(/^xmlns:?/,""),namespaceURI:s.nodeValue||""})}return IV(t,e)}o(IV,"collectAncestorNamespaces");function dae(r){let e=r.attributes;for(let t=0;t<e.length;t++){let n=e[t].nodeName;if(n.search(/^xmlns:?/)!==-1)return n.replace(/^xmlns:?/,"")}return r.prefix||""}o(dae,"findNSPrefix");function mae(r){return r.every(e=>aI.isElementNode(e))}o(mae,"isElementSubset");function gae(r,e,t){if(e==null)return[];let n=nae.selectWithResolver(e,r,t);if(!NV(n))return[];if(!mae(n))throw new Error("Document subset must be list of elements");let s=IV(n[0]),i=[];for(let c=0;c<s.length;c++){let f=!0;for(let h in i)if(i[h].prefix===s[c].prefix){f=!1;break}f&&i.push(s[c])}let a=[],u=dae(n[0]);for(let c of i)c.prefix!==u&&a.push(c);return a}o(gae,"findAncestorNs");hr.findAncestorNs=gae;function vae(r,e){let t=Buffer.from(r,"base64"),n=Buffer.from(e,"base64");if(typeof t.equals=="function")return t.equals(n);if(t.length!==n.length)return!1;for(let s=0;s<t.length;s++)if(t[s]!==n[s])return!1;return!0}o(vae,"validateDigestValue");hr.validateDigestValue=vae});var uI=Z(Vp=>{"use strict";Object.defineProperty(Vp,"__esModule",{value:!0});Vp.C14nCanonicalizationWithComments=Vp.C14nCanonicalization=void 0;var AS=Ng(),oI=Lp(),_V=class{static{o(this,"C14nCanonicalization")}constructor(){this.includeComments=!1,this.includeComments=!1}attrCompare(e,t){if(!e.namespaceURI&&t.namespaceURI)return-1;if(!t.namespaceURI&&e.namespaceURI)return 1;let n=e.namespaceURI+e.localName,s=t.namespaceURI+t.localName;return n===s?0:n<s?-1:1}nsCompare(e,t){let n=e.prefix,s=t.prefix;return n===s?0:n.localeCompare(s)}renderAttrs(e){let t,n,s=[];if(oI.isCommentNode(e))return this.renderComment(e);if(e.attributes)for(t=0;t<e.attributes.length;++t)n=e.attributes[t],n.name.indexOf("xmlns")!==0&&s.push(n);return s.sort(this.attrCompare),s.map(a=>` ${a.name}="${AS.encodeSpecialCharactersInAttribute(a.value)}"`).join("")}renderNs(e,t,n,s,i){let a,u,c=[],f=n,h=[],m=e.namespaceURI||"";if(e.prefix?t.indexOf(e.prefix)===-1&&(h.push({prefix:e.prefix,namespaceURI:e.namespaceURI||s[e.prefix]}),t.push(e.prefix)):n!==m&&(f=e.namespaceURI||"",c.push(' xmlns="',f,'"')),e.attributes)for(a=0;a<e.attributes.length;++a)u=e.attributes[a],u.prefix==="xmlns"&&t.indexOf(u.localName)===-1&&(h.push({prefix:u.localName,namespaceURI:u.value}),t.push(u.localName)),u.prefix&&t.indexOf(u.prefix)===-1&&u.prefix!=="xmlns"&&u.prefix!=="xml"&&(h.push({prefix:u.prefix,namespaceURI:u.namespaceURI}),t.push(u.prefix));if(AS.isArrayHasLength(i))for(let g of i){let x=!1;for(let v of h)v.prefix===g.prefix&&v.namespaceURI===g.namespaceURI&&(x=!0);x||h.push(g)}return h.sort(this.nsCompare),c.push(...h.map(g=>g.prefix?` xmlns:${g.prefix}="${g.namespaceURI}"`:` xmlns="${g.namespaceURI}"`)),{rendered:c.join(""),newDefaultNs:f}}processInner(e,t,n,s,i){if(oI.isCommentNode(e))return this.renderComment(e);if(e.data)return AS.encodeSpecialCharactersInText(e.data);if(oI.isElementNode(e)){let a,u,c=this.renderNs(e,t,n,s,i),f=["<",e.tagName,c.rendered,this.renderAttrs(e),">"];for(a=0;a<e.childNodes.length;++a)u=t.slice(0),f.push(this.processInner(e.childNodes[a],u,c.newDefaultNs,s,[]));return f.push("</",e.tagName,">"),f.join("")}throw new Error(`Unable to canonicalize node type: ${e.nodeType}`)}renderComment(e){if(!this.includeComments)return"";let t=e.ownerDocument===e.parentNode,n=!1,s=!1;if(t){let c=e,f=e;for(;c!==null;){if(c===e.ownerDocument.documentElement){n=!0;break}c=c.nextSibling}for(;f!==null;){if(f===e.ownerDocument.documentElement){s=!0;break}f=f.previousSibling}}let i=s?`
65
+ `:"",a=n?`
66
+ `:"",u=AS.encodeSpecialCharactersInText(e.data);return`${i}<!--${u}-->${a}`}process(e,t){t=t||{};let n=t.defaultNs||"",s=t.defaultNsForPrefix||{},i=t.ancestorNamespaces||[],a=[];for(let c=0;c<i.length;c++)a.push(i[c].prefix);return this.processInner(e,a,n,s,i)}getAlgorithmName(){return"http://www.w3.org/TR/2001/REC-xml-c14n-20010315"}};Vp.C14nCanonicalization=_V;var yae=class extends _V{static{o(this,"C14nCanonicalizationWithComments")}constructor(){super(),this.includeComments=!0}getAlgorithmName(){return"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"}};Vp.C14nCanonicalizationWithComments=yae});var fI=Z(Up=>{"use strict";Object.defineProperty(Up,"__esModule",{value:!0});Up.ExclusiveCanonicalizationWithComments=Up.ExclusiveCanonicalization=void 0;var $l=Ng(),cI=Lp();function lI(r,e,t){let n=!1;return r.forEach(function(s){s.prefix===e&&s.namespaceURI===t&&(n=!0)}),n}o(lI,"isPrefixInScope");var BV=class{static{o(this,"ExclusiveCanonicalization")}constructor(){this.includeComments=!1,this.includeComments=!1}attrCompare(e,t){if(!e.namespaceURI&&t.namespaceURI)return-1;if(!t.namespaceURI&&e.namespaceURI)return 1;let n=e.namespaceURI+e.localName,s=t.namespaceURI+t.localName;return n===s?0:n<s?-1:1}nsCompare(e,t){let n=e.prefix,s=t.prefix;return n===s?0:n.localeCompare(s)}renderAttrs(e){let t,n,s=[],i=[];if(cI.isCommentNode(e))return this.renderComment(e);if(e.attributes)for(t=0;t<e.attributes.length;++t)n=e.attributes[t],n.name.indexOf("xmlns")!==0&&i.push(n);i.sort(this.attrCompare);for(n of i)s.push(" ",n.name,'="',$l.encodeSpecialCharactersInAttribute(n.value),'"');return s.join("")}renderNs(e,t,n,s,i){let a,u,c=[],f=n,h=[],m=e.namespaceURI||"";if(e.prefix?lI(t,e.prefix,e.namespaceURI||s[e.prefix])||(h.push({prefix:e.prefix,namespaceURI:e.namespaceURI||s[e.prefix]}),t.push({prefix:e.prefix,namespaceURI:e.namespaceURI||s[e.prefix]})):n!==m&&(f=e.namespaceURI,c.push(' xmlns="',f,'"')),e.attributes)for(a=0;a<e.attributes.length;++a)u=e.attributes[a],u.prefix&&!lI(t,u.localName,u.value)&&i.indexOf(u.localName)>=0&&(h.push({prefix:u.localName,namespaceURI:u.value}),t.push({prefix:u.localName,namespaceURI:u.value})),u.prefix&&!lI(t,u.prefix,u.namespaceURI)&&u.prefix!=="xmlns"&&u.prefix!=="xml"&&(h.push({prefix:u.prefix,namespaceURI:u.namespaceURI}),t.push({prefix:u.prefix,namespaceURI:u.namespaceURI}));h.sort(this.nsCompare);for(let g of h)c.push(" xmlns:",g.prefix,'="',g.namespaceURI,'"');return{rendered:c.join(""),newDefaultNs:f}}processInner(e,t,n,s,i){if(cI.isCommentNode(e))return this.renderComment(e);if(e.data)return $l.encodeSpecialCharactersInText(e.data);if(cI.isElementNode(e)){let a,u,c=this.renderNs(e,t,n,s,i),f=["<",e.tagName,c.rendered,this.renderAttrs(e),">"];for(a=0;a<e.childNodes.length;++a)u=t.slice(0),f.push(this.processInner(e.childNodes[a],u,c.newDefaultNs,s,i));return f.push("</",e.tagName,">"),f.join("")}throw new Error(`Unable to exclusive canonicalize node type: ${e.nodeType}`)}renderComment(e){if(!this.includeComments)return"";let t=e.ownerDocument===e.parentNode,n=!1,s=!1;if(t){let c=e,f=e;for(;c!=null;){if(c===e.ownerDocument.documentElement){n=!0;break}c=c.nextSibling}for(;f!=null;){if(f===e.ownerDocument.documentElement){s=!0;break}f=f.previousSibling}}let i=s?`
67
+ `:"",a=n?`
68
+ `:"",u=$l.encodeSpecialCharactersInText(e.data);return`${i}<!--${u}-->${a}`}process(e,t){t=t||{};let n=t.inclusiveNamespacesPrefixList||[],s=t.defaultNs||"",i=t.defaultNsForPrefix||{},a=t.ancestorNamespaces||[];if(!$l.isArrayHasLength(n)){let c=$l.findChildren(e,"CanonicalizationMethod");if(c.length!==0){let f=$l.findChildren(c[0],"InclusiveNamespaces");f.length!==0&&(n=(f[0].getAttribute("PrefixList")||"").split(" "))}}return $l.isArrayHasLength(n)&&n.forEach(function(c){a&&a.forEach(function(f){c===f.prefix&&e.setAttributeNS("http://www.w3.org/2000/xmlns/",`xmlns:${c}`,f.namespaceURI)})}),this.processInner(e,[],s,i,n)}getAlgorithmName(){return"http://www.w3.org/2001/10/xml-exc-c14n#"}};Up.ExclusiveCanonicalization=BV;var xae=class extends BV{static{o(this,"ExclusiveCanonicalizationWithComments")}constructor(){super(),this.includeComments=!0}getAlgorithmName(){return"http://www.w3.org/2001/10/xml-exc-c14n#WithComments"}};Up.ExclusiveCanonicalizationWithComments=xae});var Tg=Z(jp=>{"use strict";function wae(r,e,t){if(t===void 0&&(t=Array.prototype),r&&typeof t.find=="function")return t.find.call(r,e);for(var n=0;n<r.length;n++)if(Object.prototype.hasOwnProperty.call(r,n)){var s=r[n];if(e.call(void 0,s,n,r))return s}}o(wae,"find");function hI(r,e){return e===void 0&&(e=Object),e&&typeof e.freeze=="function"?e.freeze(r):r}o(hI,"freeze");function Sae(r,e){if(r===null||typeof r!="object")throw new TypeError("target is not an object");for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r}o(Sae,"assign");var DV=hI({HTML:"text/html",isHTML:o(function(r){return r===DV.HTML},"isHTML"),XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),RV=hI({HTML:"http://www.w3.org/1999/xhtml",isHTML:o(function(r){return r===RV.HTML},"isHTML"),SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});jp.assign=Sae;jp.find=wae;jp.freeze=hI;jp.MIME_TYPE=DV;jp.NAMESPACE=RV});var EI=Z(ec=>{"use strict";var MV=Tg(),Wa=MV.find,Ig=MV.NAMESPACE;function bae(r){return r!==""}o(bae,"notEmptyString");function Eae(r){return r?r.split(/[\t\n\f\r ]+/).filter(bae):[]}o(Eae,"splitOnASCIIWhitespace");function Aae(r,e){return r.hasOwnProperty(e)||(r[e]=!0),r}o(Aae,"orderedSetReducer");function PV(r){if(!r)return[];var e=Eae(r);return Object.keys(e.reduce(Aae,{}))}o(PV,"toOrderedSet");function Cae(r){return function(e){return r&&r.indexOf(e)!==-1}}o(Cae,"arrayIncludes");function Dg(r,e){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}o(Dg,"copy");function Vs(r,e){var t=r.prototype;if(!(t instanceof e)){let s=function(){};var n=s;o(s,"t"),s.prototype=e.prototype,s=new s,Dg(t,s),r.prototype=t=s}t.constructor!=r&&(typeof r!="function"&&console.error("unknown Class:"+r),t.constructor=r)}o(Vs,"_extends");var Us={},Pi=Us.ELEMENT_NODE=1,Fp=Us.ATTRIBUTE_NODE=2,CS=Us.TEXT_NODE=3,FV=Us.CDATA_SECTION_NODE=4,qV=Us.ENTITY_REFERENCE_NODE=5,Nae=Us.ENTITY_NODE=6,HV=Us.PROCESSING_INSTRUCTION_NODE=7,KV=Us.COMMENT_NODE=8,$V=Us.DOCUMENT_NODE=9,GV=Us.DOCUMENT_TYPE_NODE=10,Ro=Us.DOCUMENT_FRAGMENT_NODE=11,Tae=Us.NOTATION_NODE=12,ss={},On={},mve=ss.INDEX_SIZE_ERR=(On[1]="Index size error",1),gve=ss.DOMSTRING_SIZE_ERR=(On[2]="DOMString size error",2),Ls=ss.HIERARCHY_REQUEST_ERR=(On[3]="Hierarchy request error",3),vve=ss.WRONG_DOCUMENT_ERR=(On[4]="Wrong document",4),yve=ss.INVALID_CHARACTER_ERR=(On[5]="Invalid character",5),xve=ss.NO_DATA_ALLOWED_ERR=(On[6]="No data allowed",6),wve=ss.NO_MODIFICATION_ALLOWED_ERR=(On[7]="No modification allowed",7),XV=ss.NOT_FOUND_ERR=(On[8]="Not found",8),Sve=ss.NOT_SUPPORTED_ERR=(On[9]="Not supported",9),OV=ss.INUSE_ATTRIBUTE_ERR=(On[10]="Attribute in use",10),bve=ss.INVALID_STATE_ERR=(On[11]="Invalid state",11),Eve=ss.SYNTAX_ERR=(On[12]="Syntax error",12),Ave=ss.INVALID_MODIFICATION_ERR=(On[13]="Invalid modification",13),Cve=ss.NAMESPACE_ERR=(On[14]="Invalid namespace",14),Nve=ss.INVALID_ACCESS_ERR=(On[15]="Invalid access",15);function on(r,e){if(e instanceof Error)var t=e;else t=this,Error.call(this,On[r]),this.message=On[r],Error.captureStackTrace&&Error.captureStackTrace(this,on);return t.code=r,e&&(this.message=this.message+": "+e),t}o(on,"DOMException");on.prototype=Error.prototype;Dg(ss,on);function Do(){}o(Do,"NodeList");Do.prototype={length:0,item:o(function(r){return r>=0&&r<this.length?this[r]:null},"item"),toString:o(function(r,e){for(var t=[],n=0;n<this.length;n++)Mp(this[n],t,r,e);return t.join("")},"toString"),filter:o(function(r){return Array.prototype.filter.call(this,r)},"filter"),indexOf:o(function(r){return Array.prototype.indexOf.call(this,r)},"indexOf")};function qp(r,e){this._node=r,this._refresh=e,mI(this)}o(qp,"LiveNodeList");function mI(r){var e=r._node._inc||r._node.ownerDocument._inc;if(r._inc!==e){var t=r._refresh(r._node);if(i6(r,"length",t.length),!r.$$length||t.length<r.$$length)for(var n=t.length;n in r;n++)Object.prototype.hasOwnProperty.call(r,n)&&delete r[n];Dg(t,r),r._inc=e}}o(mI,"_updateLiveList");qp.prototype.item=function(r){return mI(this),this[r]||null};Vs(qp,Do);function NS(){}o(NS,"NamedNodeMap");function WV(r,e){for(var t=r.length;t--;)if(r[t]===e)return t}o(WV,"_findNodeIndex");function kV(r,e,t,n){if(n?e[WV(e,n)]=t:e[e.length++]=t,r){t.ownerElement=r;var s=r.ownerDocument;s&&(n&&YV(s,r,n),Iae(s,r,t))}}o(kV,"_addNamedNode");function LV(r,e,t){var n=WV(e,t);if(n>=0){for(var s=e.length-1;n<s;)e[n]=e[++n];if(e.length=s,r){var i=r.ownerDocument;i&&(YV(i,r,t),t.ownerElement=null)}}else throw new on(XV,new Error(r.tagName+"@"+t))}o(LV,"_removeNamedNode");NS.prototype={length:0,item:Do.prototype.item,getNamedItem:o(function(r){for(var e=this.length;e--;){var t=this[e];if(t.nodeName==r)return t}},"getNamedItem"),setNamedItem:o(function(r){var e=r.ownerElement;if(e&&e!=this._ownerElement)throw new on(OV);var t=this.getNamedItem(r.nodeName);return kV(this._ownerElement,this,r,t),t},"setNamedItem"),setNamedItemNS:o(function(r){var e=r.ownerElement,t;if(e&&e!=this._ownerElement)throw new on(OV);return t=this.getNamedItemNS(r.namespaceURI,r.localName),kV(this._ownerElement,this,r,t),t},"setNamedItemNS"),removeNamedItem:o(function(r){var e=this.getNamedItem(r);return LV(this._ownerElement,this,e),e},"removeNamedItem"),removeNamedItemNS:o(function(r,e){var t=this.getNamedItemNS(r,e);return LV(this._ownerElement,this,t),t},"removeNamedItemNS"),getNamedItemNS:o(function(r,e){for(var t=this.length;t--;){var n=this[t];if(n.localName==e&&n.namespaceURI==r)return n}return null},"getNamedItemNS")};function zV(){}o(zV,"DOMImplementation");zV.prototype={hasFeature:o(function(r,e){return!0},"hasFeature"),createDocument:o(function(r,e,t){var n=new Rg;if(n.implementation=this,n.childNodes=new Do,n.doctype=t||null,t&&n.appendChild(t),e){var s=n.createElementNS(r,e);n.appendChild(s)}return n},"createDocument"),createDocumentType:o(function(r,e,t){var n=new _S;return n.name=r,n.nodeName=r,n.publicId=e||"",n.systemId=t||"",n},"createDocumentType")};function Er(){}o(Er,"Node");Er.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:o(function(r,e){return TS(this,r,e)},"insertBefore"),replaceChild:o(function(r,e){TS(this,r,e,ZV),e&&this.removeChild(e)},"replaceChild"),removeChild:o(function(r){return QV(this,r)},"removeChild"),appendChild:o(function(r){return this.insertBefore(r,null)},"appendChild"),hasChildNodes:o(function(){return this.firstChild!=null},"hasChildNodes"),cloneNode:o(function(r){return dI(this.ownerDocument||this,this,r)},"cloneNode"),normalize:o(function(){for(var r=this.firstChild;r;){var e=r.nextSibling;e&&e.nodeType==CS&&r.nodeType==CS?(this.removeChild(e),r.appendData(e.data)):(r.normalize(),r=e)}},"normalize"),isSupported:o(function(r,e){return this.ownerDocument.implementation.hasFeature(r,e)},"isSupported"),hasAttributes:o(function(){return this.attributes.length>0},"hasAttributes"),lookupPrefix:o(function(r){for(var e=this;e;){var t=e._nsMap;if(t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&t[n]===r)return n}e=e.nodeType==Fp?e.ownerDocument:e.parentNode}return null},"lookupPrefix"),lookupNamespaceURI:o(function(r){for(var e=this;e;){var t=e._nsMap;if(t&&Object.prototype.hasOwnProperty.call(t,r))return t[r];e=e.nodeType==Fp?e.ownerDocument:e.parentNode}return null},"lookupNamespaceURI"),isDefaultNamespace:o(function(r){var e=this.lookupPrefix(r);return e==null},"isDefaultNamespace")};function JV(r){return r=="<"&&"&lt;"||r==">"&&"&gt;"||r=="&"&&"&amp;"||r=='"'&&"&quot;"||"&#"+r.charCodeAt()+";"}o(JV,"_xmlEncoder");Dg(Us,Er);Dg(Us,Er.prototype);function _g(r,e){if(e(r))return!0;if(r=r.firstChild)do if(_g(r,e))return!0;while(r=r.nextSibling)}o(_g,"_visitNode");function Rg(){this.ownerDocument=this}o(Rg,"Document");function Iae(r,e,t){r&&r._inc++;var n=t.namespaceURI;n===Ig.XMLNS&&(e._nsMap[t.prefix?t.localName:""]=t.value)}o(Iae,"_onAddAttribute");function YV(r,e,t,n){r&&r._inc++;var s=t.namespaceURI;s===Ig.XMLNS&&delete e._nsMap[t.prefix?t.localName:""]}o(YV,"_onRemoveAttribute");function gI(r,e,t){if(r&&r._inc){r._inc++;var n=e.childNodes;if(t)n[n.length++]=t;else{for(var s=e.firstChild,i=0;s;)n[i++]=s,s=s.nextSibling;n.length=i,delete n[n.length]}}}o(gI,"_onUpdateChild");function QV(r,e){var t=e.previousSibling,n=e.nextSibling;return t?t.nextSibling=n:r.firstChild=n,n?n.previousSibling=t:r.lastChild=t,e.parentNode=null,e.previousSibling=null,e.nextSibling=null,gI(r.ownerDocument,r),e}o(QV,"_removeChild");function _ae(r){return r&&(r.nodeType===Er.DOCUMENT_NODE||r.nodeType===Er.DOCUMENT_FRAGMENT_NODE||r.nodeType===Er.ELEMENT_NODE)}o(_ae,"hasValidParentNodeType");function Bae(r){return r&&(za(r)||vI(r)||Po(r)||r.nodeType===Er.DOCUMENT_FRAGMENT_NODE||r.nodeType===Er.COMMENT_NODE||r.nodeType===Er.PROCESSING_INSTRUCTION_NODE)}o(Bae,"hasInsertableNodeType");function Po(r){return r&&r.nodeType===Er.DOCUMENT_TYPE_NODE}o(Po,"isDocTypeNode");function za(r){return r&&r.nodeType===Er.ELEMENT_NODE}o(za,"isElementNode");function vI(r){return r&&r.nodeType===Er.TEXT_NODE}o(vI,"isTextNode");function VV(r,e){var t=r.childNodes||[];if(Wa(t,za)||Po(e))return!1;var n=Wa(t,Po);return!(e&&n&&t.indexOf(n)>t.indexOf(e))}o(VV,"isElementInsertionPossible");function UV(r,e){var t=r.childNodes||[];function n(i){return za(i)&&i!==e}if(o(n,"hasElementChildThatIsNotChild"),Wa(t,n))return!1;var s=Wa(t,Po);return!(e&&s&&t.indexOf(s)>t.indexOf(e))}o(UV,"isElementReplacementPossible");function Dae(r,e,t){if(!_ae(r))throw new on(Ls,"Unexpected parent node type "+r.nodeType);if(t&&t.parentNode!==r)throw new on(XV,"child not in parent");if(!Bae(e)||Po(e)&&r.nodeType!==Er.DOCUMENT_NODE)throw new on(Ls,"Unexpected node type "+e.nodeType+" for parent node type "+r.nodeType)}o(Dae,"assertPreInsertionValidity1to5");function Rae(r,e,t){var n=r.childNodes||[],s=e.childNodes||[];if(e.nodeType===Er.DOCUMENT_FRAGMENT_NODE){var i=s.filter(za);if(i.length>1||Wa(s,vI))throw new on(Ls,"More than one element or text in fragment");if(i.length===1&&!VV(r,t))throw new on(Ls,"Element in fragment can not be inserted before doctype")}if(za(e)&&!VV(r,t))throw new on(Ls,"Only one element can be added and only after doctype");if(Po(e)){if(Wa(n,Po))throw new on(Ls,"Only one doctype is allowed");var a=Wa(n,za);if(t&&n.indexOf(a)<n.indexOf(t))throw new on(Ls,"Doctype can only be inserted before an element");if(!t&&a)throw new on(Ls,"Doctype can not be appended since element is present")}}o(Rae,"assertPreInsertionValidityInDocument");function ZV(r,e,t){var n=r.childNodes||[],s=e.childNodes||[];if(e.nodeType===Er.DOCUMENT_FRAGMENT_NODE){var i=s.filter(za);if(i.length>1||Wa(s,vI))throw new on(Ls,"More than one element or text in fragment");if(i.length===1&&!UV(r,t))throw new on(Ls,"Element in fragment can not be inserted before doctype")}if(za(e)&&!UV(r,t))throw new on(Ls,"Only one element can be added and only after doctype");if(Po(e)){let c=function(f){return Po(f)&&f!==t};var u=c;if(o(c,"hasDoctypeChildThatIsNotChild"),Wa(n,c))throw new on(Ls,"Only one doctype is allowed");var a=Wa(n,za);if(t&&n.indexOf(a)<n.indexOf(t))throw new on(Ls,"Doctype can only be inserted before an element")}}o(ZV,"assertPreReplacementValidityInDocument");function TS(r,e,t,n){Dae(r,e,t),r.nodeType===Er.DOCUMENT_NODE&&(n||Rae)(r,e,t);var s=e.parentNode;if(s&&s.removeChild(e),e.nodeType===Ro){var i=e.firstChild;if(i==null)return e;var a=e.lastChild}else i=a=e;var u=t?t.previousSibling:r.lastChild;i.previousSibling=u,a.nextSibling=t,u?u.nextSibling=i:r.firstChild=i,t==null?r.lastChild=a:t.previousSibling=a;do{i.parentNode=r;var c=r.ownerDocument||r;Bg(i,c)}while(i!==a&&(i=i.nextSibling));return gI(r.ownerDocument||r,r),e.nodeType==Ro&&(e.firstChild=e.lastChild=null),e}o(TS,"_insertBefore");function Bg(r,e){if(r.ownerDocument!==e){if(r.ownerDocument=e,r.nodeType===Pi&&r.attributes)for(var t=0;t<r.attributes.length;t++){var n=r.attributes.item(t);n&&(n.ownerDocument=e)}for(var s=r.firstChild;s;)Bg(s,e),s=s.nextSibling}}o(Bg,"_updateOwnerDocument");function Pae(r,e){e.parentNode&&e.parentNode.removeChild(e),e.parentNode=r,e.previousSibling=r.lastChild,e.nextSibling=null,e.previousSibling?e.previousSibling.nextSibling=e:r.firstChild=e,r.lastChild=e,gI(r.ownerDocument,r,e);var t=r.ownerDocument||r;return Bg(e,t),e}o(Pae,"_appendSingleChild");Rg.prototype={nodeName:"#document",nodeType:$V,doctype:null,documentElement:null,_inc:1,insertBefore:o(function(r,e){if(r.nodeType==Ro){for(var t=r.firstChild;t;){var n=t.nextSibling;this.insertBefore(t,e),t=n}return r}return TS(this,r,e),Bg(r,this),this.documentElement===null&&r.nodeType===Pi&&(this.documentElement=r),r},"insertBefore"),removeChild:o(function(r){return this.documentElement==r&&(this.documentElement=null),QV(this,r)},"removeChild"),replaceChild:o(function(r,e){TS(this,r,e,ZV),Bg(r,this),e&&this.removeChild(e),za(r)&&(this.documentElement=r)},"replaceChild"),importNode:o(function(r,e){return s6(this,r,e)},"importNode"),getElementById:o(function(r){var e=null;return _g(this.documentElement,function(t){if(t.nodeType==Pi&&t.getAttribute("id")==r)return e=t,!0}),e},"getElementById"),getElementsByClassName:o(function(r){var e=PV(r);return new qp(this,function(t){var n=[];return e.length>0&&_g(t.documentElement,function(s){if(s!==t&&s.nodeType===Pi){var i=s.getAttribute("class");if(i){var a=r===i;if(!a){var u=PV(i);a=e.every(Cae(u))}a&&n.push(s)}}}),n})},"getElementsByClassName"),createElement:o(function(r){var e=new Gl;e.ownerDocument=this,e.nodeName=r,e.tagName=r,e.localName=r,e.childNodes=new Do;var t=e.attributes=new NS;return t._ownerElement=e,e},"createElement"),createDocumentFragment:o(function(){var r=new BS;return r.ownerDocument=this,r.childNodes=new Do,r},"createDocumentFragment"),createTextNode:o(function(r){var e=new yI;return e.ownerDocument=this,e.appendData(r),e},"createTextNode"),createComment:o(function(r){var e=new xI;return e.ownerDocument=this,e.appendData(r),e},"createComment"),createCDATASection:o(function(r){var e=new wI;return e.ownerDocument=this,e.appendData(r),e},"createCDATASection"),createProcessingInstruction:o(function(r,e){var t=new bI;return t.ownerDocument=this,t.tagName=t.nodeName=t.target=r,t.nodeValue=t.data=e,t},"createProcessingInstruction"),createAttribute:o(function(r){var e=new IS;return e.ownerDocument=this,e.name=r,e.nodeName=r,e.localName=r,e.specified=!0,e},"createAttribute"),createEntityReference:o(function(r){var e=new SI;return e.ownerDocument=this,e.nodeName=r,e},"createEntityReference"),createElementNS:o(function(r,e){var t=new Gl,n=e.split(":"),s=t.attributes=new NS;return t.childNodes=new Do,t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.namespaceURI=r,n.length==2?(t.prefix=n[0],t.localName=n[1]):t.localName=e,s._ownerElement=t,t},"createElementNS"),createAttributeNS:o(function(r,e){var t=new IS,n=e.split(":");return t.ownerDocument=this,t.nodeName=e,t.name=e,t.namespaceURI=r,t.specified=!0,n.length==2?(t.prefix=n[0],t.localName=n[1]):t.localName=e,t},"createAttributeNS")};Vs(Rg,Er);function Gl(){this._nsMap={}}o(Gl,"Element");Gl.prototype={nodeType:Pi,hasAttribute:o(function(r){return this.getAttributeNode(r)!=null},"hasAttribute"),getAttribute:o(function(r){var e=this.getAttributeNode(r);return e&&e.value||""},"getAttribute"),getAttributeNode:o(function(r){return this.attributes.getNamedItem(r)},"getAttributeNode"),setAttribute:o(function(r,e){var t=this.ownerDocument.createAttribute(r);t.value=t.nodeValue=""+e,this.setAttributeNode(t)},"setAttribute"),removeAttribute:o(function(r){var e=this.getAttributeNode(r);e&&this.removeAttributeNode(e)},"removeAttribute"),appendChild:o(function(r){return r.nodeType===Ro?this.insertBefore(r,null):Pae(this,r)},"appendChild"),setAttributeNode:o(function(r){return this.attributes.setNamedItem(r)},"setAttributeNode"),setAttributeNodeNS:o(function(r){return this.attributes.setNamedItemNS(r)},"setAttributeNodeNS"),removeAttributeNode:o(function(r){return this.attributes.removeNamedItem(r.nodeName)},"removeAttributeNode"),removeAttributeNS:o(function(r,e){var t=this.getAttributeNodeNS(r,e);t&&this.removeAttributeNode(t)},"removeAttributeNS"),hasAttributeNS:o(function(r,e){return this.getAttributeNodeNS(r,e)!=null},"hasAttributeNS"),getAttributeNS:o(function(r,e){var t=this.getAttributeNodeNS(r,e);return t&&t.value||""},"getAttributeNS"),setAttributeNS:o(function(r,e,t){var n=this.ownerDocument.createAttributeNS(r,e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},"setAttributeNS"),getAttributeNodeNS:o(function(r,e){return this.attributes.getNamedItemNS(r,e)},"getAttributeNodeNS"),getElementsByTagName:o(function(r){return new qp(this,function(e){var t=[];return _g(e,function(n){n!==e&&n.nodeType==Pi&&(r==="*"||n.tagName==r)&&t.push(n)}),t})},"getElementsByTagName"),getElementsByTagNameNS:o(function(r,e){return new qp(this,function(t){var n=[];return _g(t,function(s){s!==t&&s.nodeType===Pi&&(r==="*"||s.namespaceURI===r)&&(e==="*"||s.localName==e)&&n.push(s)}),n})},"getElementsByTagNameNS")};Rg.prototype.getElementsByTagName=Gl.prototype.getElementsByTagName;Rg.prototype.getElementsByTagNameNS=Gl.prototype.getElementsByTagNameNS;Vs(Gl,Er);function IS(){}o(IS,"Attr");IS.prototype.nodeType=Fp;Vs(IS,Er);function Pg(){}o(Pg,"CharacterData");Pg.prototype={data:"",substringData:o(function(r,e){return this.data.substring(r,r+e)},"substringData"),appendData:o(function(r){r=this.data+r,this.nodeValue=this.data=r,this.length=r.length},"appendData"),insertData:o(function(r,e){this.replaceData(r,0,e)},"insertData"),appendChild:o(function(r){throw new Error(On[Ls])},"appendChild"),deleteData:o(function(r,e){this.replaceData(r,e,"")},"deleteData"),replaceData:o(function(r,e,t){var n=this.data.substring(0,r),s=this.data.substring(r+e);t=n+t+s,this.nodeValue=this.data=t,this.length=t.length},"replaceData")};Vs(Pg,Er);function yI(){}o(yI,"Text");yI.prototype={nodeName:"#text",nodeType:CS,splitText:o(function(r){var e=this.data,t=e.substring(r);e=e.substring(0,r),this.data=this.nodeValue=e,this.length=e.length;var n=this.ownerDocument.createTextNode(t);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n},"splitText")};Vs(yI,Pg);function xI(){}o(xI,"Comment");xI.prototype={nodeName:"#comment",nodeType:KV};Vs(xI,Pg);function wI(){}o(wI,"CDATASection");wI.prototype={nodeName:"#cdata-section",nodeType:FV};Vs(wI,Pg);function _S(){}o(_S,"DocumentType");_S.prototype.nodeType=GV;Vs(_S,Er);function e6(){}o(e6,"Notation");e6.prototype.nodeType=Tae;Vs(e6,Er);function t6(){}o(t6,"Entity");t6.prototype.nodeType=Nae;Vs(t6,Er);function SI(){}o(SI,"EntityReference");SI.prototype.nodeType=qV;Vs(SI,Er);function BS(){}o(BS,"DocumentFragment");BS.prototype.nodeName="#document-fragment";BS.prototype.nodeType=Ro;Vs(BS,Er);function bI(){}o(bI,"ProcessingInstruction");bI.prototype.nodeType=HV;Vs(bI,Er);function r6(){}o(r6,"XMLSerializer");r6.prototype.serializeToString=function(r,e,t){return n6.call(r,e,t)};Er.prototype.toString=n6;function n6(r,e){var t=[],n=this.nodeType==9&&this.documentElement||this,s=n.prefix,i=n.namespaceURI;if(i&&s==null){var s=n.lookupPrefix(i);if(s==null)var a=[{namespace:i,prefix:null}]}return Mp(this,t,r,e,a),t.join("")}o(n6,"nodeSerializeToString");function jV(r,e,t){var n=r.prefix||"",s=r.namespaceURI;if(!s||n==="xml"&&s===Ig.XML||s===Ig.XMLNS)return!1;for(var i=t.length;i--;){var a=t[i];if(a.prefix===n)return a.namespace!==s}return!0}o(jV,"needNamespaceDefine");function pI(r,e,t){r.push(" ",e,'="',t.replace(/[<>&"\t\n\r]/g,JV),'"')}o(pI,"addSerializedAttribute");function Mp(r,e,t,n,s){if(s||(s=[]),n)if(r=n(r),r){if(typeof r=="string"){e.push(r);return}}else return;switch(r.nodeType){case Pi:var i=r.attributes,a=i.length,A=r.firstChild,u=r.tagName;t=Ig.isHTML(r.namespaceURI)||t;var c=u;if(!t&&!r.prefix&&r.namespaceURI){for(var f,h=0;h<i.length;h++)if(i.item(h).name==="xmlns"){f=i.item(h).value;break}if(!f)for(var m=s.length-1;m>=0;m--){var g=s[m];if(g.prefix===""&&g.namespace===r.namespaceURI){f=g.namespace;break}}if(f!==r.namespaceURI)for(var m=s.length-1;m>=0;m--){var g=s[m];if(g.namespace===r.namespaceURI){g.prefix&&(c=g.prefix+":"+u);break}}}e.push("<",c);for(var x=0;x<a;x++){var v=i.item(x);v.prefix=="xmlns"?s.push({prefix:v.localName,namespace:v.value}):v.nodeName=="xmlns"&&s.push({prefix:"",namespace:v.value})}for(var x=0;x<a;x++){var v=i.item(x);if(jV(v,t,s)){var w=v.prefix||"",S=v.namespaceURI;pI(e,w?"xmlns:"+w:"xmlns",S),s.push({prefix:w,namespace:S})}Mp(v,e,t,n,s)}if(u===c&&jV(r,t,s)){var w=r.prefix||"",S=r.namespaceURI;pI(e,w?"xmlns:"+w:"xmlns",S),s.push({prefix:w,namespace:S})}if(A||t&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(e.push(">"),t&&/^script$/i.test(u))for(;A;)A.data?e.push(A.data):Mp(A,e,t,n,s.slice()),A=A.nextSibling;else for(;A;)Mp(A,e,t,n,s.slice()),A=A.nextSibling;e.push("</",c,">")}else e.push("/>");return;case $V:case Ro:for(var A=r.firstChild;A;)Mp(A,e,t,n,s.slice()),A=A.nextSibling;return;case Fp:return pI(e,r.name,r.value);case CS:return e.push(r.data.replace(/[<&>]/g,JV));case FV:return e.push("<![CDATA[",r.data,"]]>");case KV:return e.push("<!--",r.data,"-->");case GV:var T=r.publicId,b=r.systemId;if(e.push("<!DOCTYPE ",r.name),T)e.push(" PUBLIC ",T),b&&b!="."&&e.push(" ",b),e.push(">");else if(b&&b!=".")e.push(" SYSTEM ",b,">");else{var E=r.internalSubset;E&&e.push(" [",E,"]"),e.push(">")}return;case HV:return e.push("<?",r.target," ",r.data,"?>");case qV:return e.push("&",r.nodeName,";");default:e.push("??",r.nodeName)}}o(Mp,"serializeToString");function s6(r,e,t){var n;switch(e.nodeType){case Pi:n=e.cloneNode(!1),n.ownerDocument=r;case Ro:break;case Fp:t=!0;break}if(n||(n=e.cloneNode(!1)),n.ownerDocument=r,n.parentNode=null,t)for(var s=e.firstChild;s;)n.appendChild(s6(r,s,t)),s=s.nextSibling;return n}o(s6,"importNode");function dI(r,e,t){var n=new e.constructor;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var i=e[s];typeof i!="object"&&i!=n[s]&&(n[s]=i)}switch(e.childNodes&&(n.childNodes=new Do),n.ownerDocument=r,n.nodeType){case Pi:var a=e.attributes,u=n.attributes=new NS,c=a.length;u._ownerElement=n;for(var f=0;f<c;f++)n.setAttributeNode(dI(r,a.item(f),!0));break;case Fp:t=!0}if(t)for(var h=e.firstChild;h;)n.appendChild(dI(r,h,t)),h=h.nextSibling;return n}o(dI,"cloneNode");function i6(r,e,t){r[e]=t}o(i6,"__set__");try{if(Object.defineProperty){let r=function(e){switch(e.nodeType){case Pi:case Ro:var t=[];for(e=e.firstChild;e;)e.nodeType!==7&&e.nodeType!==8&&t.push(r(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}};Oae=r,o(r,"getTextContent"),Object.defineProperty(qp.prototype,"length",{get:o(function(){return mI(this),this.$$length},"get")}),Object.defineProperty(Er.prototype,"textContent",{get:o(function(){return r(this)},"get"),set:o(function(e){switch(this.nodeType){case Pi:case Ro:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}},"set")}),i6=o(function(e,t,n){e["$$"+t]=n},"__set__")}}catch{}var Oae;ec.DocumentType=_S;ec.DOMException=on;ec.DOMImplementation=zV;ec.Element=Gl;ec.Node=Er;ec.NodeList=Do;ec.XMLSerializer=r6});var o6=Z(Og=>{"use strict";var a6=Tg().freeze;Og.XML_ENTITIES=a6({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});Og.HTML_ENTITIES=a6({Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",AMP:"&",amp:"&",And:"\u2A53",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",ap:"\u2248",apacir:"\u2A6F",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250C",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252C",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxUL:"\u255D",boxUl:"\u255C",boxuL:"\u255B",boxul:"\u2518",boxUR:"\u255A",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256C",boxVh:"\u256B",boxvH:"\u256A",boxvh:"\u253C",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255F",boxvR:"\u255E",boxvr:"\u251C",bprime:"\u2035",Breve:"\u02D8",breve:"\u02D8",brvbar:"\xA6",Bscr:"\u212C",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22D2",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",CenterDot:"\xB7",centerdot:"\xB7",Cfr:"\u212D",cfr:"\u{1D520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",Conint:"\u222F",conint:"\u222E",ContourIntegral:"\u222E",Copf:"\u2102",copf:"\u{1D554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xA9",copy:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",Cross:"\u2A2F",cross:"\u2717",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",Cup:"\u22D3",cup:"\u222A",cupbrcap:"\u2A48",CupCap:"\u224D",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21A1",dArr:"\u21D3",darr:"\u2193",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",Diamond:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21D3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",ecir:"\u2256",Ecirc:"\xCA",ecirc:"\xEA",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212F",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1D4BB}",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",Gg:"\u22D9",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gnE:"\u2269",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",Gt:"\u226B",GT:">",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",hArr:"\u21D4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",Hfr:"\u210C",hfr:"\u{1D525}",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",Hopf:"\u210D",hopf:"\u{1D559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210B",hscr:"\u{1D4BD}",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",Ifr:"\u2111",ifr:"\u{1D526}",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",Int:"\u222C",int:"\u222B",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",Iscr:"\u2110",iscr:"\u{1D4BE}",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",Lang:"\u27EA",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",Larr:"\u219E",lArr:"\u21D0",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",lAtail:"\u291B",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lBarr:"\u290E",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",Leftarrow:"\u21D0",leftarrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22D8",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lnE:"\u2268",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftarrow:"\u27F5",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1D4C1}",Lsh:"\u21B0",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226A",LT:"<",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1D4C2}",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21D7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
69
+ `,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlArr:"\u21CD",nlarr:"\u219A",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21CD",nleftarrow:"\u219A",nLeftrightarrow:"\u21CE",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",nopf:"\u{1D55F}",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nRightarrow:"\u21CF",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nVDash:"\u22AF",nVdash:"\u22AE",nvDash:"\u22AD",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwArr:"\u21D6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",Ocirc:"\xD4",ocirc:"\xF4",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",Or:"\u2A54",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",Otimes:"\u2A37",otimes:"\u2297",otimesas:"\u2A36",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",Popf:"\u2119",popf:"\u{1D561}",pound:"\xA3",Pr:"\u2ABB",pr:"\u227A",prap:"\u2AB7",prcue:"\u227C",prE:"\u2AB3",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",Qopf:"\u211A",qopf:"\u{1D562}",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",QUOT:'"',quot:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",Rang:"\u27EB",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",Rarr:"\u21A0",rArr:"\u21D2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",rAtail:"\u291C",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",RBarr:"\u2910",rBarr:"\u290F",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",REG:"\xAE",reg:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",Rfr:"\u211C",rfr:"\u{1D52F}",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",Rightarrow:"\u21D2",rightarrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",Ropf:"\u211D",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",Rscr:"\u211B",rscr:"\u{1D4C7}",Rsh:"\u21B1",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",Sc:"\u2ABC",sc:"\u227B",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227D",scE:"\u2AB4",sce:"\u2AB0",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",seArr:"\u21D8",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",Square:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",Sub:"\u22D0",sub:"\u2282",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",Subset:"\u22D0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",Sum:"\u2211",sum:"\u2211",sung:"\u266A",Sup:"\u22D1",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",Supset:"\u22D1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swArr:"\u21D9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",Tilde:"\u223C",tilde:"\u02DC",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",Uarr:"\u219F",uArr:"\u21D1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrow:"\u2191",Uparrow:"\u21D1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",Updownarrow:"\u21D5",updownarrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",upsi:"\u03C5",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",vArr:"\u21D5",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",Vbar:"\u2AEB",vBar:"\u2AE8",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22AB",Vdash:"\u22A9",vDash:"\u22A8",vdash:"\u22A2",Vdashl:"\u2AE6",Vee:"\u22C1",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",Wedge:"\u22C0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",Xi:"\u039E",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",Yuml:"\u0178",yuml:"\xFF",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",Zfr:"\u2128",zfr:"\u{1D537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",Zopf:"\u2124",zopf:"\u{1D56B}",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"});Og.entityMap=Og.HTML_ENTITIES});var m6=Z(CI=>{"use strict";var Ug=Tg().NAMESPACE,AI=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,u6=new RegExp("[\\-\\.0-9"+AI.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),c6=new RegExp("^"+AI.source+u6.source+"*(?::"+AI.source+u6.source+"*)?$"),kg=0,tc=1,Hp=2,Lg=3,Kp=4,$p=5,Vg=6,DS=7;function Gp(r,e){this.message=r,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,Gp)}o(Gp,"ParseError");Gp.prototype=new Error;Gp.prototype.name=Gp.name;function h6(){}o(h6,"XMLReader");h6.prototype={parse:o(function(r,e,t){var n=this.domBuilder;n.startDocument(),p6(e,e={}),kae(r,e,t,n,this.errorHandler),n.endDocument()},"parse")};function kae(r,e,t,n,s){function i(ee){if(ee>65535){ee-=65536;var he=55296+(ee>>10),we=56320+(ee&1023);return String.fromCharCode(he,we)}else return String.fromCharCode(ee)}o(i,"fixedFromCharCode");function a(ee){var he=ee.slice(1,-1);return Object.hasOwnProperty.call(t,he)?t[he]:he.charAt(0)==="#"?i(parseInt(he.substr(1).replace("x","0x"))):(s.error("entity not found:"+ee),ee)}o(a,"entityReplacer");function u(ee){if(ee>w){var he=r.substring(w,ee).replace(/&#?\w+;/g,a);g&&c(w),n.characters(he,0,ee-w),w=ee}}o(u,"appendText");function c(ee,he){for(;ee>=h&&(he=m.exec(r));)f=he.index,h=f+he[0].length,g.lineNumber++;g.columnNumber=ee-f+1}o(c,"position");for(var f=0,h=0,m=/.*(?:\r\n?|\n)|.*$/g,g=n.locator,x=[{currentNSMap:e}],v={},w=0;;){try{var S=r.indexOf("<",w);if(S<0){if(!r.substr(w).match(/^\s*$/)){var A=n.doc,T=A.createTextNode(r.substr(w));A.appendChild(T),n.currentElement=T}return}switch(S>w&&u(S),r.charAt(S+1)){case"/":var K=r.indexOf(">",S+3),b=r.substring(S+2,K).replace(/[ \t\n\r]+$/g,""),E=x.pop();K<0?(b=r.substring(S+2).replace(/[\s<].*/,""),s.error("end tag name: "+b+" is not complete:"+E.tagName),K=S+1+b.length):b.match(/\s</)&&(b=b.replace(/[\s<].*/,""),s.error("end tag name: "+b+" maybe not complete"),K=S+1+b.length);var C=E.localNSMap,_=E.tagName==b,F=_||E.tagName&&E.tagName.toLowerCase()==b.toLowerCase();if(F){if(n.endElement(E.uri,E.localName,b),C)for(var R in C)Object.prototype.hasOwnProperty.call(C,R)&&n.endPrefixMapping(R);_||s.fatalError("end tag name: "+b+" is not match the current start tagName:"+E.tagName)}else x.push(E);K++;break;case"?":g&&c(S),K=Mae(r,S,n);break;case"!":g&&c(S),K=jae(r,S,n,s);break;default:g&&c(S);var q=new d6,H=x[x.length-1].currentNSMap,K=Lae(r,S,q,H,a,s),X=q.length;if(!q.closed&&Uae(r,K,q.tagName,v)&&(q.closed=!0,t.nbsp||s.warning("unclosed xml attribute")),g&&X){for(var pe=l6(g,{}),le=0;le<X;le++){var ue=q[le];c(ue.offset),ue.locator=l6(g,{})}n.locator=pe,f6(q,n,H)&&x.push(q),n.locator=g}else f6(q,n,H)&&x.push(q);Ug.isHTML(q.uri)&&!q.closed?K=Vae(r,K,q.tagName,a,n):K++}}catch(ee){if(ee instanceof Gp)throw ee;s.error("element parse error: "+ee),K=-1}K>w?w=K:u(Math.max(S,w)+1)}}o(kae,"parse");function l6(r,e){return e.lineNumber=r.lineNumber,e.columnNumber=r.columnNumber,e}o(l6,"copyLocator");function Lae(r,e,t,n,s,i){function a(x,v,w){t.attributeNames.hasOwnProperty(x)&&i.fatalError("Attribute "+x+" redefined"),t.addValue(x,v.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,s),w)}o(a,"addAttribute");for(var u,c,f=++e,h=kg;;){var m=r.charAt(f);switch(m){case"=":if(h===tc)u=r.slice(e,f),h=Lg;else if(h===Hp)h=Lg;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(h===Lg||h===tc)if(h===tc&&(i.warning('attribute value must after "="'),u=r.slice(e,f)),e=f+1,f=r.indexOf(m,e),f>0)c=r.slice(e,f),a(u,c,e-1),h=$p;else throw new Error("attribute value no end '"+m+"' match");else if(h==Kp)c=r.slice(e,f),a(u,c,e),i.warning('attribute "'+u+'" missed start quot('+m+")!!"),e=f+1,h=$p;else throw new Error('attribute value must after "="');break;case"/":switch(h){case kg:t.setTagName(r.slice(e,f));case $p:case Vg:case DS:h=DS,t.closed=!0;case Kp:case tc:break;case Hp:t.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return i.error("unexpected end of input"),h==kg&&t.setTagName(r.slice(e,f)),f;case">":switch(h){case kg:t.setTagName(r.slice(e,f));case $p:case Vg:case DS:break;case Kp:case tc:c=r.slice(e,f),c.slice(-1)==="/"&&(t.closed=!0,c=c.slice(0,-1));case Hp:h===Hp&&(c=u),h==Kp?(i.warning('attribute "'+c+'" missed quot(")!'),a(u,c,e)):((!Ug.isHTML(n[""])||!c.match(/^(?:disabled|checked|selected)$/i))&&i.warning('attribute "'+c+'" missed value!! "'+c+'" instead!!'),a(c,c,e));break;case Lg:throw new Error("attribute value missed!!")}return f;case"\x80":m=" ";default:if(m<=" ")switch(h){case kg:t.setTagName(r.slice(e,f)),h=Vg;break;case tc:u=r.slice(e,f),h=Hp;break;case Kp:var c=r.slice(e,f);i.warning('attribute "'+c+'" missed quot(")!!'),a(u,c,e);case $p:h=Vg;break}else switch(h){case Hp:var g=t.tagName;(!Ug.isHTML(n[""])||!u.match(/^(?:disabled|checked|selected)$/i))&&i.warning('attribute "'+u+'" missed value!! "'+u+'" instead2!!'),a(u,u,e),e=f,h=tc;break;case $p:i.warning('attribute space is required"'+u+'"!!');case Vg:h=tc,e=f;break;case Lg:h=Kp,e=f;break;case DS:throw new Error("elements closed character '/' and '>' must be connected to")}}f++}}o(Lae,"parseElementStartPart");function f6(r,e,t){for(var n=r.tagName,s=null,m=r.length;m--;){var i=r[m],a=i.qName,u=i.value,g=a.indexOf(":");if(g>0)var c=i.prefix=a.slice(0,g),f=a.slice(g+1),h=c==="xmlns"&&f;else f=a,c=null,h=a==="xmlns"&&"";i.localName=f,h!==!1&&(s==null&&(s={},p6(t,t={})),t[h]=s[h]=u,i.uri=Ug.XMLNS,e.startPrefixMapping(h,u))}for(var m=r.length;m--;){i=r[m];var c=i.prefix;c&&(c==="xml"&&(i.uri=Ug.XML),c!=="xmlns"&&(i.uri=t[c||""]))}var g=n.indexOf(":");g>0?(c=r.prefix=n.slice(0,g),f=r.localName=n.slice(g+1)):(c=null,f=r.localName=n);var x=r.uri=t[c||""];if(e.startElement(x,f,n,r),r.closed){if(e.endElement(x,f,n),s)for(c in s)Object.prototype.hasOwnProperty.call(s,c)&&e.endPrefixMapping(c)}else return r.currentNSMap=t,r.localNSMap=s,!0}o(f6,"appendElement");function Vae(r,e,t,n,s){if(/^(?:script|textarea)$/i.test(t)){var i=r.indexOf("</"+t+">",e),a=r.substring(e+1,i);if(/[&<]/.test(a))return/^script$/i.test(t)?(s.characters(a,0,a.length),i):(a=a.replace(/&#?\w+;/g,n),s.characters(a,0,a.length),i)}return e+1}o(Vae,"parseHtmlSpecialContent");function Uae(r,e,t,n){var s=n[t];return s==null&&(s=r.lastIndexOf("</"+t+">"),s<e&&(s=r.lastIndexOf("</"+t)),n[t]=s),s<e}o(Uae,"fixSelfClosed");function p6(r,e){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}o(p6,"_copy");function jae(r,e,t,n){var s=r.charAt(e+2);switch(s){case"-":if(r.charAt(e+3)==="-"){var i=r.indexOf("-->",e+4);return i>e?(t.comment(r,e+4,i-e-4),i+3):(n.error("Unclosed comment"),-1)}else return-1;default:if(r.substr(e+3,6)=="CDATA["){var i=r.indexOf("]]>",e+9);return t.startCDATA(),t.characters(r,e+9,i-e-9),t.endCDATA(),i+3}var a=Fae(r,e),u=a.length;if(u>1&&/!doctype/i.test(a[0][0])){var c=a[1][0],f=!1,h=!1;u>3&&(/^public$/i.test(a[2][0])?(f=a[3][0],h=u>4&&a[4][0]):/^system$/i.test(a[2][0])&&(h=a[3][0]));var m=a[u-1];return t.startDTD(c,f,h),t.endDTD(),m.index+m[0].length}}return-1}o(jae,"parseDCC");function Mae(r,e,t){var n=r.indexOf("?>",e);if(n){var s=r.substring(e,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(s){var i=s[0].length;return t.processingInstruction(s[1],s[2]),n+2}else return-1}return-1}o(Mae,"parseInstruction");function d6(){this.attributeNames={}}o(d6,"ElementAttributes");d6.prototype={setTagName:o(function(r){if(!c6.test(r))throw new Error("invalid tagName:"+r);this.tagName=r},"setTagName"),addValue:o(function(r,e,t){if(!c6.test(r))throw new Error("invalid attribute:"+r);this.attributeNames[r]=this.length,this[this.length++]={qName:r,value:e,offset:t}},"addValue"),length:0,getLocalName:o(function(r){return this[r].localName},"getLocalName"),getLocator:o(function(r){return this[r].locator},"getLocator"),getQName:o(function(r){return this[r].qName},"getQName"),getURI:o(function(r){return this[r].uri},"getURI"),getValue:o(function(r){return this[r].value},"getValue")};function Fae(r,e){var t,n=[],s=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(s.lastIndex=e,s.exec(r);t=s.exec(r);)if(n.push(t),t[1])return n}o(Fae,"split");CI.XMLReader=h6;CI.ParseError=Gp});var b6=Z(PS=>{"use strict";var qae=Tg(),Hae=EI(),g6=o6(),x6=m6(),Kae=Hae.DOMImplementation,v6=qae.NAMESPACE,$ae=x6.ParseError,Gae=x6.XMLReader;function w6(r){return r.replace(/\r[\n\u0085]/g,`
70
+ `).replace(/[\r\u0085\u2028]/g,`
71
+ `)}o(w6,"normalizeLineEndings");function S6(r){this.options=r||{locator:{}}}o(S6,"DOMParser");S6.prototype.parseFromString=function(r,e){var t=this.options,n=new Gae,s=t.domBuilder||new jg,i=t.errorHandler,a=t.locator,u=t.xmlns||{},c=/\/x?html?$/.test(e),f=c?g6.HTML_ENTITIES:g6.XML_ENTITIES;a&&s.setDocumentLocator(a),n.errorHandler=Xae(i,s,a),n.domBuilder=t.domBuilder||s,c&&(u[""]=v6.HTML),u.xml=u.xml||v6.XML;var h=t.normalizeLineEndings||w6;return r&&typeof r=="string"?n.parse(h(r),u,f):n.errorHandler.error("invalid doc source"),s.doc};function Xae(r,e,t){if(!r){if(e instanceof jg)return e;r=e}var n={},s=r instanceof Function;t=t||{};function i(a){var u=r[a];!u&&s&&(u=r.length==2?function(c){r(a,c)}:r),n[a]=u&&function(c){u("[xmldom "+a+"] "+c+NI(t))}||function(){}}return o(i,"build"),i("warning"),i("error"),i("fatalError"),n}o(Xae,"buildErrorHandler");function jg(){this.cdata=!1}o(jg,"DOMHandler");function Xp(r,e){e.lineNumber=r.lineNumber,e.columnNumber=r.columnNumber}o(Xp,"position");jg.prototype={startDocument:o(function(){this.doc=new Kae().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},"startDocument"),startElement:o(function(r,e,t,n){var s=this.doc,i=s.createElementNS(r,t||e),a=n.length;RS(this,i),this.currentElement=i,this.locator&&Xp(this.locator,i);for(var u=0;u<a;u++){var r=n.getURI(u),c=n.getValue(u),t=n.getQName(u),f=s.createAttributeNS(r,t);this.locator&&Xp(n.getLocator(u),f),f.value=f.nodeValue=c,i.setAttributeNode(f)}},"startElement"),endElement:o(function(r,e,t){var n=this.currentElement,s=n.tagName;this.currentElement=n.parentNode},"endElement"),startPrefixMapping:o(function(r,e){},"startPrefixMapping"),endPrefixMapping:o(function(r){},"endPrefixMapping"),processingInstruction:o(function(r,e){var t=this.doc.createProcessingInstruction(r,e);this.locator&&Xp(this.locator,t),RS(this,t)},"processingInstruction"),ignorableWhitespace:o(function(r,e,t){},"ignorableWhitespace"),characters:o(function(r,e,t){if(r=y6.apply(this,arguments),r){if(this.cdata)var n=this.doc.createCDATASection(r);else var n=this.doc.createTextNode(r);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(r)&&this.doc.appendChild(n),this.locator&&Xp(this.locator,n)}},"characters"),skippedEntity:o(function(r){},"skippedEntity"),endDocument:o(function(){this.doc.normalize()},"endDocument"),setDocumentLocator:o(function(r){(this.locator=r)&&(r.lineNumber=0)},"setDocumentLocator"),comment:o(function(r,e,t){r=y6.apply(this,arguments);var n=this.doc.createComment(r);this.locator&&Xp(this.locator,n),RS(this,n)},"comment"),startCDATA:o(function(){this.cdata=!0},"startCDATA"),endCDATA:o(function(){this.cdata=!1},"endCDATA"),startDTD:o(function(r,e,t){var n=this.doc.implementation;if(n&&n.createDocumentType){var s=n.createDocumentType(r,e,t);this.locator&&Xp(this.locator,s),RS(this,s),this.doc.doctype=s}},"startDTD"),warning:o(function(r){console.warn("[xmldom warning] "+r,NI(this.locator))},"warning"),error:o(function(r){console.error("[xmldom error] "+r,NI(this.locator))},"error"),fatalError:o(function(r){throw new $ae(r,this.locator)},"fatalError")};function NI(r){if(r)return`
72
+ @`+(r.systemId||"")+"#[line:"+r.lineNumber+",col:"+r.columnNumber+"]"}o(NI,"_locator");function y6(r,e,t){return typeof r=="string"?r.substr(e,t):r.length>=e+t||e?new java.lang.String(r,e,t)+"":r}o(y6,"_toString");"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(r){jg.prototype[r]=function(){return null}});function RS(r,e){r.currentElement?r.currentElement.appendChild(e):r.doc.appendChild(e)}o(RS,"appendElement");PS.__DOMHandler=jg;PS.normalizeLineEndings=w6;PS.DOMParser=S6});var TI=Z(OS=>{"use strict";var E6=EI();OS.DOMImplementation=E6.DOMImplementation;OS.XMLSerializer=E6.XMLSerializer;OS.DOMParser=b6().DOMParser});var A6=Z(LS=>{"use strict";Object.defineProperty(LS,"__esModule",{value:!0});LS.EnvelopedSignature=void 0;var kS=bS(),II=Lp(),Wae=class{static{o(this,"EnvelopedSignature")}constructor(){this.includeComments=!1,this.includeComments=!1}process(e,t){if(t.signatureNode==null){let i=kS.select1("./*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']",e);return II.isNodeLike(i)&&i.parentNode&&i.parentNode.removeChild(i),e}let n=t.signatureNode,s=kS.select1(".//*[local-name(.)='SignatureValue']/text()",n);if(II.isTextNode(s)){let i=s.data,a=kS.select(".//*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']",e);for(let u of Array.isArray(a)?a:[]){let c=kS.select1(".//*[local-name(.)='SignatureValue']/text()",u);if(II.isTextNode(c)){let f=c.data;i===f&&u.parentNode&&u.parentNode.removeChild(u)}}}return e}getAlgorithmName(){return"http://www.w3.org/2000/09/xmldsig#enveloped-signature"}};LS.EnvelopedSignature=Wae});var C6=Z(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});rc.Sha512=rc.Sha256=rc.Sha1=void 0;var _I=Xe("crypto"),zae=class{static{o(this,"Sha1")}constructor(){this.getHash=function(e){let t=_I.createHash("sha1");return t.update(e,"utf8"),t.digest("base64")},this.getAlgorithmName=function(){return"http://www.w3.org/2000/09/xmldsig#sha1"}}};rc.Sha1=zae;var Jae=class{static{o(this,"Sha256")}constructor(){this.getHash=function(e){let t=_I.createHash("sha256");return t.update(e,"utf8"),t.digest("base64")},this.getAlgorithmName=function(){return"http://www.w3.org/2001/04/xmlenc#sha256"}}};rc.Sha256=Jae;var Yae=class{static{o(this,"Sha512")}constructor(){this.getHash=function(e){let t=_I.createHash("sha512");return t.update(e,"utf8"),t.digest("base64")},this.getAlgorithmName=function(){return"http://www.w3.org/2001/04/xmlenc#sha512"}}};rc.Sha512=Yae});var BI=Z(VS=>{"use strict";Object.defineProperty(VS,"__esModule",{value:!0});VS.createOptionalCallbackFunction=void 0;function Qae(r){return typeof r=="function"}o(Qae,"isErrorFirstCallback");function Zae(r){return(...e)=>{let t=e[e.length-1];if(Qae(t))try{let n=r(...e.slice(0,-1));t(null,n)}catch(n){t(n instanceof Error?n:new Error("Unknown error"))}else return r(...e)}}o(Zae,"createOptionalCallbackFunction");VS.createOptionalCallbackFunction=Zae});var N6=Z(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.HmacSha1=Ja.RsaSha512=Ja.RsaSha256=Ja.RsaSha1=void 0;var nc=Xe("crypto"),sc=BI(),eoe=class{static{o(this,"RsaSha1")}constructor(){this.getSignature=(0,sc.createOptionalCallbackFunction)((e,t)=>{let n=nc.createSign("RSA-SHA1");return n.update(e),n.sign(t,"base64")}),this.verifySignature=(0,sc.createOptionalCallbackFunction)((e,t,n)=>{let s=nc.createVerify("RSA-SHA1");return s.update(e),s.verify(t,n,"base64")}),this.getAlgorithmName=()=>"http://www.w3.org/2000/09/xmldsig#rsa-sha1"}};Ja.RsaSha1=eoe;var toe=class{static{o(this,"RsaSha256")}constructor(){this.getSignature=(0,sc.createOptionalCallbackFunction)((e,t)=>{let n=nc.createSign("RSA-SHA256");return n.update(e),n.sign(t,"base64")}),this.verifySignature=(0,sc.createOptionalCallbackFunction)((e,t,n)=>{let s=nc.createVerify("RSA-SHA256");return s.update(e),s.verify(t,n,"base64")}),this.getAlgorithmName=()=>"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"}};Ja.RsaSha256=toe;var roe=class{static{o(this,"RsaSha512")}constructor(){this.getSignature=(0,sc.createOptionalCallbackFunction)((e,t)=>{let n=nc.createSign("RSA-SHA512");return n.update(e),n.sign(t,"base64")}),this.verifySignature=(0,sc.createOptionalCallbackFunction)((e,t,n)=>{let s=nc.createVerify("RSA-SHA512");return s.update(e),s.verify(t,n,"base64")}),this.getAlgorithmName=()=>"http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"}};Ja.RsaSha512=roe;var noe=class{static{o(this,"HmacSha1")}constructor(){this.getSignature=(0,sc.createOptionalCallbackFunction)((e,t)=>{let n=nc.createHmac("SHA1",t);return n.update(e),n.digest("base64")}),this.verifySignature=(0,sc.createOptionalCallbackFunction)((e,t,n)=>{let s=nc.createHmac("SHA1",t);return s.update(e),s.digest("base64")===n}),this.getAlgorithmName=()=>"http://www.w3.org/2000/09/xmldsig#hmac-sha1"}};Ja.HmacSha1=noe});var _6=Z(jS=>{"use strict";Object.defineProperty(jS,"__esModule",{value:!0});jS.SignedXml=void 0;var ii=Lp(),Xl=TI(),soe=Xe("util"),Oi=bS(),T6=uI(),ioe=A6(),I6=fI(),DI=C6(),US=N6(),mr=Ng(),RI=class Wp{static{o(this,"SignedXml")}constructor(e={}){this.signatureAlgorithm=void 0,this.canonicalizationAlgorithm=void 0,this.inclusiveNamespacesPrefixList=[],this.namespaceResolver={lookupNamespaceURI:o(function(){throw new Error("Not implemented")},"lookupNamespaceURI")},this.implicitTransforms=[],this.keyInfoAttributes={},this.getKeyInfoContent=Wp.getKeyInfoContent,this.getCertFromKeyInfo=Wp.getCertFromKeyInfo,this.id=0,this.signedXml="",this.signatureXml="",this.signatureNode=null,this.signatureValue="",this.originalXmlWithIds="",this.keyInfo=null,this.references=[],this.signedReferences=[],this.CanonicalizationAlgorithms={"http://www.w3.org/TR/2001/REC-xml-c14n-20010315":T6.C14nCanonicalization,"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments":T6.C14nCanonicalizationWithComments,"http://www.w3.org/2001/10/xml-exc-c14n#":I6.ExclusiveCanonicalization,"http://www.w3.org/2001/10/xml-exc-c14n#WithComments":I6.ExclusiveCanonicalizationWithComments,"http://www.w3.org/2000/09/xmldsig#enveloped-signature":ioe.EnvelopedSignature},this.HashAlgorithms={"http://www.w3.org/2000/09/xmldsig#sha1":DI.Sha1,"http://www.w3.org/2001/04/xmlenc#sha256":DI.Sha256,"http://www.w3.org/2001/04/xmlenc#sha512":DI.Sha512},this.SignatureAlgorithms={"http://www.w3.org/2000/09/xmldsig#rsa-sha1":US.RsaSha1,"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256":US.RsaSha256,"http://www.w3.org/2001/04/xmldsig-more#rsa-sha512":US.RsaSha512};let{idMode:t,idAttribute:n,privateKey:s,publicCert:i,signatureAlgorithm:a,canonicalizationAlgorithm:u,inclusiveNamespacesPrefixList:c,implicitTransforms:f,keyInfoAttributes:h,getKeyInfoContent:m,getCertFromKeyInfo:g}=e;this.idMode=t,this.idAttributes=["Id","ID","id"],n&&this.idAttributes.unshift(n),this.privateKey=s,this.publicCert=i,this.signatureAlgorithm=a??this.signatureAlgorithm,this.canonicalizationAlgorithm=u,typeof c=="string"?this.inclusiveNamespacesPrefixList=c.split(" "):mr.isArrayHasLength(c)&&(this.inclusiveNamespacesPrefixList=c),this.implicitTransforms=f??this.implicitTransforms,this.keyInfoAttributes=h??this.keyInfoAttributes,this.getKeyInfoContent=m??this.getKeyInfoContent,this.getCertFromKeyInfo=g??Wp.noop,this.CanonicalizationAlgorithms,this.HashAlgorithms,this.SignatureAlgorithms}enableHMAC(){this.SignatureAlgorithms={"http://www.w3.org/2000/09/xmldsig#hmac-sha1":US.HmacSha1},this.getKeyInfoContent=Wp.noop}static getKeyInfoContent({publicCert:e,prefix:t}){if(e==null)return null;t=t?`${t}:`:"";let n="";Buffer.isBuffer(e)&&(e=e.toString("latin1"));let s=[];return typeof e=="string"&&(s=e.match(mr.EXTRACT_X509_CERTS)||[]),s.length>0&&(n=s.map(i=>`<${t}X509Certificate>${mr.pemToDer(i).toString("base64")}</${t}X509Certificate>`).join("")),`<${t}X509Data>${n}</${t}X509Data>`}static getCertFromKeyInfo(e){if(e!=null){let t=Oi.select1(".//*[local-name(.)='X509Certificate']",e);if(ii.isNodeLike(t))return mr.derToPem(t.textContent??"","CERTIFICATE")}return null}checkSignature(e,t){if(t!=null&&typeof t!="function")throw new Error("Last parameter must be a callback function");this.signedXml=e;let n=new Xl.DOMParser().parseFromString(e);this.references=[];let s=this.getCanonSignedInfoXml(n);if(!s){if(t){t(new Error("Canonical signed info cannot be empty"),!1);return}throw new Error("Canonical signed info cannot be empty")}let a=new Xl.DOMParser().parseFromString(s,"text/xml").documentElement;if(!a){if(t){t(new Error("Could not parse unverifiedSignedInfoCanon into a document"),!1);return}throw new Error("Could not parse unverifiedSignedInfoCanon into a document")}let u=mr.findChildren(a,"Reference");if(!mr.isArrayHasLength(u)){if(t){t(new Error("could not find any Reference elements"),!1);return}throw new Error("could not find any Reference elements")}for(let m of u)this.loadReference(m);if(!this.getReferences().every(m=>this.validateReference(m,n))){if(this.signedReferences=[],this.references.forEach(m=>{m.signedReference=void 0}),t){t(new Error("Could not validate all references"),!1);return}return!1}let c=this.findSignatureAlgorithm(this.signatureAlgorithm),f=this.getCertFromKeyInfo(this.keyInfo)||this.publicCert||this.privateKey;if(f==null)throw new Error("KeyInfo or publicCert or privateKey is required to validate signature");if(c.verifySignature(s,f,this.signatureValue)===!0)if(t)t(null,!0);else return!0;else if(this.signedReferences=[],this.references.forEach(m=>{m.signedReference=void 0}),t){t(new Error(`invalid signature: the signature value ${this.signatureValue} is incorrect`));return}else throw new Error(`invalid signature: the signature value ${this.signatureValue} is incorrect`)}getCanonSignedInfoXml(e){if(this.signatureNode==null)throw new Error("No signature found.");if(typeof this.canonicalizationAlgorithm!="string")throw new Error("Missing canonicalizationAlgorithm when trying to get signed info for XML");let t=mr.findChildren(this.signatureNode,"SignedInfo");if(t.length===0)throw new Error("could not find SignedInfo element in the message");if(t.length>1)throw new Error("could not get canonicalized signed info for a signature that contains multiple SignedInfo nodes");if((this.canonicalizationAlgorithm==="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"||this.canonicalizationAlgorithm==="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments")&&(!e||typeof e!="object"))throw new Error("When canonicalization method is non-exclusive, whole xml dom must be provided as an argument");let s={ancestorNamespaces:mr.findAncestorNs(e,"//*[local-name()='SignedInfo']")};return this.getCanonXml([this.canonicalizationAlgorithm],t[0],s)}getCanonReferenceXml(e,t,n){Array.isArray(t.transforms)&&(t.ancestorNamespaces=mr.findAncestorNs(e,t.xpath,this.namespaceResolver));let s={inclusiveNamespacesPrefixList:t.inclusiveNamespacesPrefixList,ancestorNamespaces:t.ancestorNamespaces};return this.getCanonXml(t.transforms,n,s)}calculateSignatureValue(e,t){let n=this.getCanonSignedInfoXml(e),s=this.findSignatureAlgorithm(this.signatureAlgorithm);if(this.privateKey==null)throw new Error("Private key is required to compute signature");typeof t=="function"?s.getSignature(n,this.privateKey,t):this.signatureValue=s.getSignature(n,this.privateKey)}findSignatureAlgorithm(e){if(e==null)throw new Error("signatureAlgorithm is required");let t=this.SignatureAlgorithms[e];if(t)return new t;throw new Error(`signature algorithm '${e}' is not supported`)}findCanonicalizationAlgorithm(e){if(e!=null){let t=this.CanonicalizationAlgorithms[e];if(t)return new t}throw new Error(`canonicalization algorithm '${e}' is not supported`)}findHashAlgorithm(e){let t=this.HashAlgorithms[e];if(t)return new t;throw new Error(`hash algorithm '${e}' is not supported`)}validateElementAgainstReferences(e,t){let n;if(typeof e=="string"){let s=Oi.select1(e,t);ii.assertIsElementNode(s),n=s}else n=e;for(let s of this.getReferences()){let i=s.uri?.[0]==="#"?s.uri.substring(1):s.uri;for(let f of this.idAttributes){let h=n.getAttribute(f);if(i===h){s.xpath=`//*[@*[local-name(.)='${f}']='${i}']`;break}}let a=this.getCanonReferenceXml(t,s,n),c=this.findHashAlgorithm(s.digestAlgorithm).getHash(a);if(mr.validateDigestValue(c,s.digestValue))return s}throw new Error("No references passed validation")}validateReference(e,t){let n=e.uri?.[0]==="#"?e.uri.substring(1):e.uri,s=null;if(n==="")s=Oi.select1("//*",t);else{if(n?.indexOf("'")!==-1)throw new Error("Cannot validate a uri with quotes inside it");{let c=0;for(let f of this.idAttributes){let h=`//*[@*[local-name(.)='${f}']='${n}']`,m=Oi.select(h,t);if(mr.isArrayHasLength(m)){if(c+=m.length,c>1)throw new Error("Cannot validate a document which contains multiple elements with the same value for the ID / Id / Id attributes, in order to prevent signature wrapping attack.");s=m[0],e.xpath=h}}}}if(e.getValidatedNode=(0,soe.deprecate)(c=>{if(c=c||e.xpath,typeof c!="string"||e.validationError!=null)return null;let f=Oi.select1(c,t);return ii.isNodeLike(f)?f:null},"`ref.getValidatedNode()` is deprecated and insecure. Use `ref.signedReference` or `this.getSignedReferences()` instead."),!ii.isNodeLike(s)){let c=new Error(`invalid signature: the signature references an element with uri ${e.uri} but could not find such element in the xml`);return e.validationError=c,!1}let i=this.getCanonReferenceXml(t,e,s),u=this.findHashAlgorithm(e.digestAlgorithm).getHash(i);if(!mr.validateDigestValue(u,e.digestValue)){let c=new Error(`invalid signature: for uri ${e.uri} calculated digest is ${u} but the xml to validate supplies digest ${e.digestValue}`);return e.validationError=c,!1}return this.signedReferences.push(i),e.signedReference=i,!0}findSignatures(e){let t=Oi.select("//*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']",e);return ii.isArrayOfNodes(t)?t:[]}loadSignature(e){typeof e=="string"?this.signatureNode=e=new Xl.DOMParser().parseFromString(e):this.signatureNode=e,this.signatureXml=e.toString();let t=Oi.select1(".//*[local-name(.)='CanonicalizationMethod']/@Algorithm",e);if(!ii.isNodeLike(t))throw new Error("could not find CanonicalizationMethod/@Algorithm element");ii.isAttributeNode(t)&&(this.canonicalizationAlgorithm=t.value);let n=Oi.select1(".//*[local-name(.)='SignatureMethod']/@Algorithm",e);ii.isAttributeNode(n)&&(this.signatureAlgorithm=n.value);let s=mr.findChildren(this.signatureNode,"SignedInfo");if(!mr.isArrayHasLength(s))throw new Error("no signed info node found");if(s.length>1)throw new Error("could not load signature that contains multiple SignedInfo nodes");let i=this.canonicalizationAlgorithm;(!i||i==="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"||i==="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments")&&(i="http://www.w3.org/2001/10/xml-exc-c14n#");let a=this.getCanonXml([i],s[0]),c=new Xl.DOMParser().parseFromString(a,"text/xml").documentElement;this.references=[];let f=mr.findChildren(c,"Reference");if(!mr.isArrayHasLength(f))throw new Error("could not find any Reference elements");for(let g of f)this.loadReference(g);let h=Oi.select1(".//*[local-name(.)='SignatureValue']/text()",e);ii.isTextNode(h)&&(this.signatureValue=h.data.replace(/\r?\n/g,""));let m=Oi.select1(".//*[local-name(.)='KeyInfo']",e);ii.isNodeLike(m)&&(this.keyInfo=m)}loadReference(e){let t=mr.findChildren(e,"DigestMethod");if(t.length===0)throw new Error(`could not find DigestMethod in reference ${e.toString()}`);let n=t[0],s=mr.findAttr(n,"Algorithm");if(!s)throw new Error(`could not find Algorithm attribute in node ${n.toString()}`);let i=s.value;if(t=mr.findChildren(e,"DigestValue"),t.length===0)throw new Error(`could not find DigestValue node in reference ${e.toString()}`);if(t.length>1)throw new Error(`could not load reference for a node that contains multiple DigestValue nodes: ${e.toString()}`);let a=t[0].textContent;if(!a)throw new Error(`could not find the value of DigestValue in ${e.toString()}`);let u=[],c=[];if(t=mr.findChildren(e,"Transforms"),t.length!==0){let h=t[0],m=mr.findChildren(h,"Transform");for(let x of m){let v=mr.findAttr(x,"Algorithm");v&&u.push(v.value)}let g=mr.findChildren(m[m.length-1],"InclusiveNamespaces");mr.isArrayHasLength(g)&&(c=g.flatMap(x=>(x.getAttribute("PrefixList")??"").split(" ")).filter(x=>x.length>0))}mr.isArrayHasLength(this.implicitTransforms)&&this.implicitTransforms.forEach(function(h){u.push(h)}),(u.length===0||u[u.length-1]==="http://www.w3.org/2000/09/xmldsig#enveloped-signature")&&u.push("http://www.w3.org/TR/2001/REC-xml-c14n-20010315");let f=ii.isElementNode(e)&&e.getAttribute("URI")||void 0;this.addReference({transforms:u,digestAlgorithm:i,uri:f,digestValue:a,inclusiveNamespacesPrefixList:c,isEmptyUri:!1})}addReference({xpath:e,transforms:t,digestAlgorithm:n,uri:s="",digestValue:i,inclusiveNamespacesPrefixList:a=[],isEmptyUri:u=!1}){if(n==null)throw new Error("digestAlgorithm is required");if(!mr.isArrayHasLength(t))throw new Error("transforms must contain at least one transform algorithm");this.references.push({xpath:e,transforms:t,digestAlgorithm:n,uri:s,digestValue:i,inclusiveNamespacesPrefixList:a,isEmptyUri:u,getValidatedNode:o(()=>{throw new Error("Reference has not been validated yet; Did you call `sig.checkSignature()`?")},"getValidatedNode")})}getReferences(){return this.references}getSignedReferences(){return[...this.signedReferences]}computeSignature(e,t,n){let s;typeof t=="function"&&n==null?(s=t,t={}):(s=n,t=t??{});let i=new Xl.DOMParser().parseFromString(e),a="xmlns",u=[],c,f=["append","prepend","before","after"],h=t.prefix,m=t.attrs||{},g=t.location||{},x=t.existingPrefixes||{};if(this.namespaceResolver={lookupNamespaceURI:o(function(_){return _?x[_]:null},"lookupNamespaceURI")},g.reference=g.reference||"/*",g.action=g.action||"append",f.indexOf(g.action)===-1){let _=new Error(`location.action option has an invalid action: ${g.action}, must be any of the following values: ${f.join(", ")}`);if(s){s(_);return}else throw _}h?(a+=`:${h}`,c=`${h}:`):c="",Object.keys(m).forEach(function(_){_!=="xmlns"&&_!==a&&u.push(`${_}="${m[_]}"`)}),u.push(`${a}="http://www.w3.org/2000/09/xmldsig#"`);let v=`<${c}Signature ${u.join(" ")}>`;v+=this.createSignedInfo(i,h),v+=this.getKeyInfo(h),v+=`</${c}Signature>`,this.originalXmlWithIds=i.toString();let w="";Object.keys(x).forEach(function(_){w+=`xmlns:${_}="${x[_]}" `});let S=`<Dummy ${w}>${v}</Dummy>`,T=new Xl.DOMParser().parseFromString(S).documentElement.firstChild,b=Oi.select1(g.reference,i);if(!ii.isNodeLike(b)){let _=new Error(`the following xpath cannot be used because it was not found: ${g.reference}`);if(s){s(_);return}else throw _}if(g.action==="append")b.appendChild(T);else if(g.action==="prepend")b.insertBefore(T,b.firstChild);else if(g.action==="before"){if(b.parentNode==null)throw new Error("`location.reference` refers to the root node (by default), so we can't insert `before`");b.parentNode.insertBefore(T,b)}else if(g.action==="after"){if(b.parentNode==null)throw new Error("`location.reference` refers to the root node (by default), so we can't insert `after`");b.parentNode.insertBefore(T,b.nextSibling)}this.signatureNode=T;let E=mr.findChildren(this.signatureNode,"SignedInfo");if(E.length===0){let _=new Error("could not find SignedInfo element in the message");if(s){s(_);return}else throw _}let C=E[0];typeof s=="function"?this.calculateSignatureValue(i,(_,F)=>{_?s(_):(this.signatureValue=F||"",T.insertBefore(this.createSignature(h),C.nextSibling),this.signatureXml=T.toString(),this.signedXml=i.toString(),s(null,this))}):(this.calculateSignatureValue(i),T.insertBefore(this.createSignature(h),C.nextSibling),this.signatureXml=T.toString(),this.signedXml=i.toString())}getKeyInfo(e){let t=e?`${e}:`:"",n="";this.keyInfoAttributes&&Object.keys(this.keyInfoAttributes).forEach(i=>{n+=` ${i}="${this.keyInfoAttributes[i]}"`});let s=this.getKeyInfoContent({publicCert:this.publicCert,prefix:e});return n||s?`<${t}KeyInfo${n}>${s}</${t}KeyInfo>`:""}createReferences(e,t){let n="";t=t||"",t=t&&`${t}:`;for(let s of this.getReferences()){let i=Oi.selectWithResolver(s.xpath??"",e,this.namespaceResolver);if(!mr.isArrayHasLength(i))throw new Error(`the following xpath cannot be signed because it was not found: ${s.xpath}`);for(let a of i){if(s.isEmptyUri)n+=`<${t}Reference URI="">`;else{let f=this.ensureHasId(a);s.uri=f,n+=`<${t}Reference URI="#${f}">`}n+=`<${t}Transforms>`;for(let f of s.transforms||[]){let h=this.findCanonicalizationAlgorithm(f);n+=`<${t}Transform Algorithm="${h.getAlgorithmName()}"`,mr.isArrayHasLength(s.inclusiveNamespacesPrefixList)?(n+=">",n+=`<InclusiveNamespaces PrefixList="${s.inclusiveNamespacesPrefixList.join(" ")}" xmlns="${h.getAlgorithmName()}"/>`,n+=`</${t}Transform>`):n+=" />"}let u=this.getCanonReferenceXml(e,s,a),c=this.findHashAlgorithm(s.digestAlgorithm);n+=`</${t}Transforms><${t}DigestMethod Algorithm="${c.getAlgorithmName()}" /><${t}DigestValue>${c.getHash(u)}</${t}DigestValue></${t}Reference>`}}return n}getCanonXml(e,t,n={}){n.defaultNsForPrefix=n.defaultNsForPrefix??Wp.defaultNsForPrefix,n.signatureNode=this.signatureNode;let i=t.cloneNode(!0);return e.forEach(a=>{ii.isNodeLike(i)&&(i=this.findCanonicalizationAlgorithm(a).process(i,n))}),i.toString()}ensureHasId(e){let t;if(this.idMode==="wssecurity"?t=mr.findAttr(e,"Id","http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"):this.idAttributes.some(s=>(t=mr.findAttr(e,s),!!t)),t)return t.value;let n=`_${this.id++}`;return this.idMode==="wssecurity"?(e.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:wsu","http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"),e.setAttributeNS("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd","wsu:Id",n)):e.setAttribute("Id",n),n}createSignedInfo(e,t){if(typeof this.canonicalizationAlgorithm!="string")throw new Error("Missing canonicalizationAlgorithm when trying to create signed info for XML");let n=this.findCanonicalizationAlgorithm(this.canonicalizationAlgorithm),s=this.findSignatureAlgorithm(this.signatureAlgorithm),i;i=t||"",i=i&&`${i}:`;let a=`<${i}SignedInfo>`;return a+=`<${i}CanonicalizationMethod Algorithm="${n.getAlgorithmName()}"`,mr.isArrayHasLength(this.inclusiveNamespacesPrefixList)?(a+=">",a+=`<InclusiveNamespaces PrefixList="${this.inclusiveNamespacesPrefixList.join(" ")}" xmlns="${n.getAlgorithmName()}"/>`,a+=`</${i}CanonicalizationMethod>`):a+=" />",a+=`<${i}SignatureMethod Algorithm="${s.getAlgorithmName()}" />`,a+=this.createReferences(e,t),a+=`</${i}SignedInfo>`,a}createSignature(e){let t="xmlns";e?(t+=`:${e}`,e+=":"):e="";let n=`<${e}SignatureValue>${this.signatureValue}</${e}SignatureValue>`,s=`<${e}Signature ${t}="http://www.w3.org/2000/09/xmldsig#">${n}</${e}Signature>`;return new Xl.DOMParser().parseFromString(s).documentElement.firstChild}getSignatureXml(){return this.signatureXml}getOriginalXmlWithIds(){return this.originalXmlWithIds}getSignedXml(){return this.signedXml}};jS.SignedXml=RI;RI.defaultNsForPrefix={ds:"http://www.w3.org/2000/09/xmldsig#"};RI.noop=()=>null});var PI=Z(kn=>{"use strict";var aoe=kn&&kn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),B6=kn&&kn.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&aoe(e,r,t)};Object.defineProperty(kn,"__esModule",{value:!0});kn.SignedXml=kn.ExclusiveCanonicalizationWithComments=kn.ExclusiveCanonicalization=kn.C14nCanonicalizationWithComments=kn.C14nCanonicalization=void 0;var D6=uI();Object.defineProperty(kn,"C14nCanonicalization",{enumerable:!0,get:o(function(){return D6.C14nCanonicalization},"get")});Object.defineProperty(kn,"C14nCanonicalizationWithComments",{enumerable:!0,get:o(function(){return D6.C14nCanonicalizationWithComments},"get")});var R6=fI();Object.defineProperty(kn,"ExclusiveCanonicalization",{enumerable:!0,get:o(function(){return R6.ExclusiveCanonicalization},"get")});Object.defineProperty(kn,"ExclusiveCanonicalizationWithComments",{enumerable:!0,get:o(function(){return R6.ExclusiveCanonicalizationWithComments},"get")});var ooe=_6();Object.defineProperty(kn,"SignedXml",{enumerable:!0,get:o(function(){return ooe.SignedXml},"get")});B6(BI(),kn);B6(Ng(),kn)});var k6=Z(FS=>{"use strict";Object.defineProperty(FS,"__esModule",{value:!0});FS.WSSecurityCert=void 0;var uoe=Xe("crypto"),coe=PI();function loe(r,e){return new Date(r.getTime()+e*6e4)}o(loe,"addMinutes");function P6(r){return r.getUTCFullYear()+"-"+("0"+(r.getUTCMonth()+1)).slice(-2)+"-"+("0"+r.getUTCDate()).slice(-2)+"T"+("0"+r.getUTCHours()).slice(-2)+":"+("0"+r.getUTCMinutes()).slice(-2)+":"+("0"+r.getUTCSeconds()).slice(-2)+"Z"}o(P6,"dateStringForSOAP");function foe(){return P6(new Date)}o(foe,"generateCreated");function hoe(){return P6(loe(new Date,10))}o(hoe,"generateExpires");function MS(r,e,t){return[e.slice(0,t),r,e.slice(t)].join("")}o(MS,"insertStr");function poe(){return(0,uoe.randomUUID)().replace(/-/gm,"")}o(poe,"generateId");function doe(r,e){for(let t of r)t.xpath===O6&&(t.xpath=e)}o(doe,"resolvePlaceholderInReferences");var ic="http://docs.oasis-open.org/wss/2004/01",O6="[[bodyXpath]]",moe=class{static{o(this,"WSSecurityCert")}constructor(e,t,n,s={}){if(this.signerOptions={},this.additionalReferences=[],this.excludeReferencesFromSigning=[],this.publicP12PEM=t.toString().replace("-----BEGIN CERTIFICATE-----","").replace("-----END CERTIFICATE-----","").replace(/(\r\n|\n|\r)/gm,""),this.signer=new coe.SignedXml({idMode:s?.signerOptions?.idMode,signatureAlgorithm:s?.signatureAlgorithm}),this.signer.digestAlgorithm=s.digestAlgorithm??"http://www.w3.org/2001/04/xmlenc#sha256",s.signatureAlgorithm==="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"&&(this.signer.signatureAlgorithm=s.signatureAlgorithm,this.signer.addReference({xpath:O6,transforms:["http://www.w3.org/2001/10/xml-exc-c14n#"],digestAlgorithm:"http://www.w3.org/2001/04/xmlenc#sha256"})),s.signatureAlgorithm||(this.signer.signatureAlgorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"),this.signer.canonicalizationAlgorithm="http://www.w3.org/2001/10/xml-exc-c14n#",s.additionalReferences&&s.additionalReferences.length>0&&(this.additionalReferences=s.additionalReferences),s.excludeReferencesFromSigning&&s.excludeReferencesFromSigning.length>0&&(this.excludeReferencesFromSigning=s.excludeReferencesFromSigning),s.signerOptions){let{signerOptions:i}=s;this.signerOptions=i,this.signerOptions.existingPrefixes||(this.signerOptions.existingPrefixes={}),this.signerOptions.existingPrefixes&&!this.signerOptions.existingPrefixes.wsse&&(this.signerOptions.existingPrefixes.wsse=`${ic}/oasis-200401-wss-wssecurity-secext-1.0.xsd`)}else this.signerOptions={existingPrefixes:{wsse:`${ic}/oasis-200401-wss-wssecurity-secext-1.0.xsd`}};this.signer.privateKey={key:e,passphrase:n},this.x509Id=`x509-${poe()}`,this.hasTimeStamp=typeof s.hasTimeStamp>"u"?!0:!!s.hasTimeStamp,this.signatureTransformations=Array.isArray(s.signatureTransformations)?s.signatureTransformations:["http://www.w3.org/2000/09/xmldsig#enveloped-signature","http://www.w3.org/2001/10/xml-exc-c14n#"],this.signer.getKeyInfoContent=()=>`<wsse:SecurityTokenReference><wsse:Reference URI="#${this.x509Id}" ValueType="${ic}/oasis-200401-wss-x509-token-profile-1.0#X509v3"/></wsse:SecurityTokenReference>`}postProcess(e,t){this.created=foe(),this.expires=hoe();let n="";this.hasTimeStamp&&(n=`<Timestamp xmlns="${ic}/oasis-200401-wss-wssecurity-utility-1.0.xsd"><Created>${this.created}</Created><Expires>${this.expires}</Expires></Timestamp>`);let s=`<wsse:BinarySecurityToken EncodingType="${ic}/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="${ic}/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="${this.x509Id}">${this.publicP12PEM}</wsse:BinarySecurityToken>`+n,i,a=`xmlns:wsse="${ic}/oasis-200401-wss-wssecurity-secext-1.0.xsd"`,u=`xmlns:wsu="${ic}/oasis-200401-wss-wssecurity-utility-1.0.xsd"`,c=e.indexOf("</wsse:Security>");if(c>-1){let v=/<wsse:Security( [^>]*)?>/,w=e.match(v),S="";w[0].includes(` ${t}:mustUnderstand="`)||(S+=`${t}:mustUnderstand="1" `),w[0].includes(a.substring(0,a.indexOf("=")))||(S+=`${a} `),w[0].includes(u.substring(0,a.indexOf("=")))||(S+=`${u} `);let A="<wsse:Security ",T=e.indexOf(A);e=MS(s,e,c),i=MS(S,e,T+A.length)}else{let v=`<wsse:Security ${a} ${u} ${t}:mustUnderstand="1">`+s+"</wsse:Security>";i=MS(v,e,e.indexOf(`</${t}:Header>`))}let f=this.signatureTransformations,h=`//*[name(.)='${t}:Body']`;doe(this.signer.references,h),!this.excludeReferencesFromSigning.some(v=>v==="Body")&&!(this.signer.references.filter(v=>v.xpath===h).length>0)&&this.signer.addReference({xpath:h,transforms:f,digestAlgorithm:this.signer.digestAlgorithm});for(let v of this.additionalReferences){let w=`//*[name(.)='${v}']`;!this.excludeReferencesFromSigning.some(S=>S===v)&&!(this.signer.references.filter(S=>S.xpath===w).length>0)&&this.signer.addReference({xpath:w,transforms:f,digestAlgorithm:this.signer.digestAlgorithm})}let m="//*[name(.)='wsse:Security']/*[local-name(.)='Timestamp']";!this.excludeReferencesFromSigning.some(v=>v==="Timestamp")&&this.hasTimeStamp&&!(this.signer.references.filter(v=>v.xpath===m).length>0)&&this.signer.addReference({xpath:m,transforms:f,digestAlgorithm:this.signer.digestAlgorithm}),this.signer.computeSignature(i,this.signerOptions);let g=this.signer.getOriginalXmlWithIds(),x=this.signer.getSignatureXml();return MS(x,g,g.indexOf("</wsse:Security>"))}};FS.WSSecurityCert=moe});var j6=Z(qS=>{"use strict";Object.defineProperty(qS,"__esModule",{value:!0});qS.WSSecurityCertWithToken=void 0;var goe=Xe("crypto"),voe=PI();function yoe(r,e){return new Date(r.getTime()+e*6e4)}o(yoe,"addMinutes");function V6(r){return r.getUTCFullYear()+"-"+("0"+(r.getUTCMonth()+1)).slice(-2)+"-"+("0"+r.getUTCDate()).slice(-2)+"T"+("0"+r.getUTCHours()).slice(-2)+":"+("0"+r.getUTCMinutes()).slice(-2)+":"+("0"+r.getUTCSeconds()).slice(-2)+"Z"}o(V6,"dateStringForSOAP");function xoe(){return V6(new Date)}o(xoe,"generateCreated");function woe(){return V6(yoe(new Date,10))}o(woe,"generateExpires");function L6(r,e,t){return[e.slice(0,t),r,e.slice(t)].join("")}o(L6,"insertStr");function Soe(){return(0,goe.randomUUID)().replace(/-/gm,"")}o(Soe,"generateId");function boe(r,e){for(let t of r)t.xpath===U6&&(t.xpath=e)}o(boe,"resolvePlaceholderInReferences");var ac="http://docs.oasis-open.org/wss/2004/01",U6="[[bodyXpath]]",Eoe=class{static{o(this,"WSSecurityCertWithToken")}constructor(e){this.signerOptions={},this.additionalReferences=[],this.publicP12PEM=e.publicKey.toString().replace("-----BEGIN CERTIFICATE-----","").replace("-----END CERTIFICATE-----","").replace(/(\r\n|\n|\r)/gm,""),this.username=e.username,this.password=e.password,this.signer=new voe.SignedXml;let t=e.options||{};if(t.signatureAlgorithm==="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"&&(this.signer.signatureAlgorithm=t.signatureAlgorithm,this.signer.addReference({xpath:U6,transforms:["http://www.w3.org/2001/10/xml-exc-c14n#"],digestAlgorithm:"http://www.w3.org/2001/04/xmlenc#sha256"})),t.signatureAlgorithm||(this.signer.signatureAlgorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"),this.signer.canonicalizationAlgorithm="http://www.w3.org/2001/10/xml-exc-c14n#",t.additionalReferences&&t.additionalReferences.length>0&&(this.additionalReferences=t.additionalReferences),t.signerOptions){let{signerOptions:n}=e.options;this.signerOptions=n,this.signerOptions.existingPrefixes||(this.signerOptions.existingPrefixes={}),this.signerOptions.existingPrefixes&&!this.signerOptions.existingPrefixes.wsse&&(this.signerOptions.existingPrefixes.wsse=`${ac}/oasis-200401-wss-wssecurity-secext-1.0.xsd`)}else this.signerOptions={existingPrefixes:{wsse:`${ac}/oasis-200401-wss-wssecurity-secext-1.0.xsd`}};this.signer.privateKey={key:e.privateKey,passphrase:e.keyPassword},this.x509Id=`x509-${Soe()}`,this.hasTimeStamp=typeof t.hasTimeStamp>"u"?!0:!!t.hasTimeStamp,this.signatureTransformations=Array.isArray(t.signatureTransformations)?t.signatureTransformations:["http://www.w3.org/2000/09/xmldsig#enveloped-signature","http://www.w3.org/2001/10/xml-exc-c14n#"],this.signer.keyInfoProvider={},this.signer.getKeyInfo=()=>`<wsse:SecurityTokenReference><wsse:Reference URI="#${this.x509Id}" ValueType="${ac}/oasis-200401-wss-x509-token-profile-1.0#X509v3"/></wsse:SecurityTokenReference>`}postProcess(e,t){this.created=xoe(),this.expires=woe();let n="";this.hasTimeStamp&&(n=`<Timestamp xmlns="${ac}/oasis-200401-wss-wssecurity-utility-1.0.xsd" Id="_1"><Created>${this.created}</Created><Expires>${this.expires}</Expires></Timestamp>`);let s="";this.username&&(s=`<wsse:UsernameToken wsu:Id="SecurityToken-${this.created}" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsse:Username>${this.username}</wsse:Username> <wsse:Password>${this.password}</wsse:Password> </wsse:UsernameToken>`);let i=`<wsse:Security xmlns:wsse="${ac}/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="${ac}/oasis-200401-wss-wssecurity-utility-1.0.xsd" ${t}:mustUnderstand="1"><wsse:BinarySecurityToken EncodingType="${ac}/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="${ac}/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="${this.x509Id}">${this.publicP12PEM}</wsse:BinarySecurityToken>`+s+n+"</wsse:Security>",a=L6(i,e,e.indexOf(`</${t}:Header>`)),u=this.signatureTransformations,c=`//*[name(.)='${t}:Body']`;boe(this.signer.references,c),this.signer.references.filter(h=>h.xpath===c).length>0||this.signer.addReference({xpath:c,transforms:u,digestAlgorithm:"http://www.w3.org/2001/04/xmlenc#sha256"});for(let h of this.additionalReferences){let m=`//*[name(.)='${h}']`;this.signer.references.filter(g=>g.xpath===m).length>0||this.signer.addReference({xpath:m,transforms:u,digestAlgorithm:"http://www.w3.org/2001/04/xmlenc#sha256"})}let f="//*[name(.)='wsse:Security']/*[local-name(.)='Timestamp']";return this.hasTimeStamp&&!(this.signer.references.filter(h=>h.xpath===f).length>0)&&this.signer.addReference({xpath:f,transforms:u,digestAlgorithm:"http://www.w3.org/2001/04/xmlenc#sha256"}),this.signer.computeSignature(a,this.signerOptions),L6(this.signer.getSignatureXml(),a,a.indexOf("</wsse:Security>"))}};qS.WSSecurityCertWithToken=Eoe});var M6=Z(HS=>{"use strict";Object.defineProperty(HS,"__esModule",{value:!0});HS.WSSecurityPlusCert=void 0;var Aoe=class{static{o(this,"WSSecurityPlusCert")}constructor(e,t){this.wsSecurity=e,this.wsSecurityCert=t}postProcess(e,t){let n=this.wsSecurity.toXML(),s=e.indexOf(`</${t}:Header>`);return e=[e.slice(0,s),n,e.slice(s)].join(""),this.wsSecurityCert.postProcess(e,t)}};HS.WSSecurityPlusCert=Aoe});var OI=Z(ws=>{"use strict";var Coe=ws&&ws.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Oo=ws&&ws.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Coe(e,r,t)};Object.defineProperty(ws,"__esModule",{value:!0});Oo(mV(),ws);Oo(vV(),ws);Oo(wV(),ws);Oo(bV(),ws);Oo(EV(),ws);Oo(AV(),ws);Oo(k6(),ws);Oo(j6(),ws);Oo(M6(),ws)});var kI=Z(ki=>{"use strict";var Noe=ki&&ki.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Toe=ki&&ki.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Ioe=ki&&ki.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&Noe(t,e,n[s]);return Toe(t,e),t}})(),_oe=ki&&ki.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ki,"__esModule",{value:!0});ki.Server=void 0;var Boe=Xe("events"),KS=Ioe(Xe("url")),Doe=_oe(Xe("zlib"));function Roe(r){return typeof r.route=="function"&&typeof r.use=="function"}o(Roe,"isExpress");function F6(r){return!!r&&typeof r.then=="function"}o(F6,"isPromiseLike");function q6(r){function e(t){return t<10?"0"+t:t}return o(e,"pad"),r.getUTCFullYear()+"-"+e(r.getUTCMonth()+1)+"-"+e(r.getUTCDate())+"T"+e(r.getUTCHours())+":"+e(r.getUTCMinutes())+":"+e(r.getUTCSeconds())+"Z"}o(q6,"getDateString");var Poe=class extends Boe.EventEmitter{static{o(this,"Server")}constructor(e,t,n,s,i){super(),i=i||{path:t,services:n},this.path=t,this.services=n,this.wsdl=s,this.suppressStack=i&&i.suppressStack,this.returnFault=i&&i.returnFault,this.onewayOptions=i&&i.oneWay||{},this.enableChunkedEncoding=i.enableChunkedEncoding===void 0?!0:!!i.enableChunkedEncoding,this.callback=i.callback?i.callback:()=>{},typeof t=="string"&&t[t.length-1]!=="/"?t+="/":t instanceof RegExp&&t.source[t.source.length-1]!=="/"&&(t=new RegExp(t.source+"(?:\\/|)")),s.onReady(a=>{if(Roe(e))e.route(t).all((u,c)=>{if(typeof this.authorizeConnection=="function"&&!this.authorizeConnection(u,c)){c.end();return}this._requestListener(u,c)}),this.callback(a,this);else{let u=e.listeners("request").slice();e.removeAllListeners("request"),e.addListener("request",(c,f)=>{if(typeof this.authorizeConnection=="function"&&!this.authorizeConnection(c,f)){f.end();return}let h=KS.parse(c.url).pathname;if(h[h.length-1]!=="/"&&(h+="/"),t===h||t instanceof RegExp&&h.match(t))this._requestListener(c,f);else for(let m=0,g=u.length;m<g;m++)u[m].call(this,c,f)}),this.callback(a,this)}}),this._initializeOptions(i)}addSoapHeader(e,t,n,s){return this.soapHeaders||(this.soapHeaders=[]),e=this._processSoapHeader(e,t,n,s),this.soapHeaders.push(e)-1}changeSoapHeader(e,t,n,s,i){this.soapHeaders||(this.soapHeaders=[]),t=this._processSoapHeader(t,n,s,i),this.soapHeaders[e]=t}getSoapHeaders(){return this.soapHeaders}clearSoapHeaders(){this.soapHeaders=null}_processSoapHeader(e,t,n,s){switch(typeof e){case"object":return this.wsdl.objectToXML(e,t,n,s,!0);case"function":{let i=this;return(...a)=>{let u=e.apply(null,[...a]);return typeof u=="object"?i.wsdl.objectToXML(u,t,n,s,!0):u}}default:return e}}_initializeOptions(e){this.wsdl.options.attributesKey=e.attributesKey||"attributes",this.onewayOptions.statusCode=this.onewayOptions.responseCode||200,this.onewayOptions.emptyBody=!!this.onewayOptions.emptyBody}_processRequestXml(e,t,n){let s;try{typeof this.log=="function"&&this.log("received",n,e),this._process(n,e,t,(i,a)=>{this._sendHttpResponse(t,a,i),typeof this.log=="function"&&this.log("replied",i,e)})}catch(i){if(i.Fault!==void 0)return this._sendError(i.Fault,(a,u)=>{this._sendHttpResponse(t,u||500,a),typeof this.log=="function"&&this.log("error",i,e)},new Date().toISOString());s=i.stack?this.suppressStack===!0?i.message:i.stack:i,this._sendHttpResponse(t,500,s),typeof this.log=="function"&&this.log("error",i,e)}}_requestListener(e,t){let s=KS.parse(e.url).search;if(typeof this.log=="function"&&this.log("info","Handling "+e.method+" on "+e.url,e),e.method==="GET")s&&s.toLowerCase().startsWith("?wsdl")&&(typeof this.log=="function"&&this.log("info","Wants the WSDL",e),t.setHeader("Content-Type","application/xml"),t.write(this.wsdl.toXML())),t.end();else if(e.method==="POST"){if(typeof e.headers["content-type"]<"u"?t.setHeader("Content-Type",e.headers["content-type"]):t.setHeader("Content-Type","application/xml"),e.body&&e.body.length>0)return this._processRequestXml(e,t,e.body.toString());let i=[],a,u=e;e.headers["content-encoding"]==="gzip"&&(a=Doe.default.createGunzip(),e.pipe(a),u=a),u.on("data",c=>{i.push(c)}),u.on("end",()=>{let c=Buffer.concat(i).toString();this._processRequestXml(e,t,c)})}else t.end()}_getSoapAction(e){if(typeof e.headers.soapaction>"u")return;let t=e.headers.soapaction;return t.indexOf('"')===0?t.slice(1,-1):t}_process(e,t,n,s){let i=KS.parse(t.url).pathname.replace(/\/$/,""),a=this.wsdl.xmlToObject(e),u=a.Body,c=a.Header,f,h,m,g,x=a.Header&&a.Header.Security&&a.Header.Security.Timestamp,v=this.authenticate||o(function(){return!0},"defaultAuthenticate"),w=o((A,T)=>{let b={result:A};this.emit("response",b,h),s(b.result,T)},"callback"),S=o(()=>{if(typeof this.log=="function"&&this.log("info","Attempting to bind to "+i,t),!u)throw new Error("Failed to parse the SOAP Message body");if(f=(()=>{let A=this.wsdl.definitions.services,T,b;for(b in A){m=b;let C=A[m].ports;for(b in C){g=b;let _=C[g],F=KS.parse(_.location).pathname.replace(/\/$/,"");if(typeof this.log=="function"&&this.log("info","Trying "+g+" from path "+F,t),F===i)return _.binding;T||(T=_)}}return T?T.binding:void 0})(),!f)throw new Error("Failed to bind to WSDL");try{let A=this._getSoapAction(t),T=Object.keys(u)[0]==="attributes"?Object.keys(u)[1]:Object.keys(u)[0],b=f.topElements[T];A?h=this._getMethodNameBySoapAction(f,A):h=b?b.methodName:T;let E=f.methods[h].style||f.style;this.emit("request",a,h),c&&this.emit("headers",c,h),E==="rpc"?this._executeMethod({serviceName:m,portName:g,methodName:h,outputName:T+"Response",args:u[T],headers:c,style:"rpc"},t,n,w):this._executeMethod({serviceName:m,portName:g,methodName:h,outputName:b.outputName,args:u[T],headers:c,style:"document"},t,n,w,x)}catch(A){if(A.Fault!==void 0)return this._sendError(A.Fault,w,x);throw A}},"process");if(typeof v=="function"){let A=!1,T=o(E=>{if(!A){if(A=!0,E instanceof Error)return this._sendError({Code:{Value:"SOAP-ENV:Server",Subcode:{Value:"InternalServerError"}},Reason:{Text:E.toString()},statusCode:500},w,x);if(typeof E=="boolean")if(E===!0)try{S()}catch(C){return C.Fault!==void 0?this._sendError(C.Fault,w,x):this._sendError({Code:{Value:"SOAP-ENV:Server",Subcode:{Value:"InternalServerError"}},Reason:{Text:C.toString()},statusCode:500},w,x)}else return this._sendError({Code:{Value:"SOAP-ENV:Client",Subcode:{Value:"AuthenticationFailure"}},Reason:{Text:"Invalid username or password"},statusCode:401},w,x)}},"processAuthResult"),b=v(a.Header&&a.Header.Security,T,t,a);F6(b)&&b.then(E=>{T(E)},E=>{T(E)}),typeof b=="boolean"&&T(b)}else throw new Error("Invalid authenticate function (not a function)")}_getMethodNameBySoapAction(e,t){for(let n in e.methods)if(e.methods[n].soapAction===t)return n}_executeMethod(e,t,n,s,i){e=e||{};let a,u,c,f=e.serviceName,h=e.portName,m=this.wsdl.definitions.services[f].ports[h].binding,g=e.methodName,x=e.outputName,v=e.args,w=e.style;this.soapHeaders&&(c=this.soapHeaders.map(E=>typeof E=="function"?E(g,v,e.headers,t,n,this):E).join(`
73
+ `));try{a=this.services[f][h][g]}catch{return s(this._envelope("",c,i))}let S=!1,A=o((E,C)=>{if(!S){if(S=!0,E)return E.Fault!==void 0?this._sendError(E.Fault,s,i):this._sendError({Code:{Value:"SOAP-ENV:Server",Subcode:{Value:"InternalServerError"}},Reason:{Text:E.toString()},statusCode:500},s,i);if(w==="rpc")u=this.wsdl.objectToRpcXML(x,C,"",this.wsdl.definitions.$targetNamespace);else if(w==="document"){let _=m.methods[g].output;u=this.wsdl.objectToDocumentXML(x,C,_.targetNSAlias,_.targetNamespace)}else{let _=m.methods[g].output,F=_.$targetNamespace,R=x;F&&(R=`${F}:${R}`),u=this.wsdl.objectToDocumentXML(R,C,_.targetNSAlias,_.targetNamespace)}s(this._envelope(u,c,i))}},"handleResult");m.methods[g].output||(S=!0,u="",this.onewayOptions.emptyBody&&(u=this._envelope("",c,i)),s(u,this.onewayOptions.responseCode));let T=o((E,C)=>{E&&E.Fault!==void 0||C===void 0&&(C=E,E=null),A(E,C)},"methodCallback"),b=a.apply(this,[v,T,e.headers,t,n]);typeof b<"u"&&(F6(b)?b.then(E=>{A(null,E)},E=>{A(E)}):A(null,b))}_envelope(e,t,n){let a='<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="'+(this.wsdl.options.forceSoap12Headers?"http://www.w3.org/2003/05/soap-envelope":"http://schemas.xmlsoap.org/soap/envelope/")+'" '+this.wsdl.xmlnsInEnvelope+">";if(t=t||"",n){let u=new Date,c=q6(u),f=q6(new Date(u.getTime()+1e3*600));t+='<o:Security soap:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <u:Timestamp u:Id="_0"> <u:Created>'+c+"</u:Created> <u:Expires>"+f+`</u:Expires> </u:Timestamp> </o:Security>
74
+ `}return t!==""&&(a+="<soap:Header>"+t+"</soap:Header>"),a+=e?"<soap:Body>"+e+"</soap:Body>":"<soap:Body/>",a+="</soap:Envelope>",a}_sendError(e,t,n){let s,i;return e.statusCode&&(i=e.statusCode,e.statusCode=void 0),"faultcode"in e?s=this.wsdl.objectToDocumentXML("soap:Fault",e,void 0):s=this.wsdl.objectToDocumentXML("Fault",e,"soap"),t(this._envelope(s,"",n),i)}_sendHttpResponse(e,t,n){t&&(e.statusCode=t),this.enableChunkedEncoding?(e.write(n),e.end()):e.end(n)}};ki.Server=Poe});var LI=Z($S=>{"use strict";(function(r){r.parser=function(O,D){return new t(O,D)},r.SAXParser=t,r.SAXStream=f,r.createStream=c,r.MAX_BUFFER_LENGTH=64*1024;var e=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];r.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function t(O,D){if(!(this instanceof t))return new t(O,D);var se=this;s(se),se.q=se.c="",se.bufferCheckPosition=r.MAX_BUFFER_LENGTH,se.opt=D||{},se.opt.lowercase=se.opt.lowercase||se.opt.lowercasetags,se.looseCase=se.opt.lowercase?"toLowerCase":"toUpperCase",se.tags=[],se.closed=se.closedRoot=se.sawRoot=!1,se.tag=se.error=null,se.strict=!!O,se.noscript=!!(O||se.opt.noscript),se.state=R.BEGIN,se.strictEntities=se.opt.strictEntities,se.ENTITIES=se.strictEntities?Object.create(r.XML_ENTITIES):Object.create(r.ENTITIES),se.attribList=[],se.opt.xmlns&&(se.ns=Object.create(v)),se.opt.unquotedAttributeValues===void 0&&(se.opt.unquotedAttributeValues=!O),se.trackPosition=se.opt.position!==!1,se.trackPosition&&(se.position=se.line=se.column=0),H(se,"onready")}o(t,"SAXParser"),Object.create||(Object.create=function(O){function D(){}o(D,"F"),D.prototype=O;var se=new D;return se}),Object.keys||(Object.keys=function(O){var D=[];for(var se in O)O.hasOwnProperty(se)&&D.push(se);return D});function n(O){for(var D=Math.max(r.MAX_BUFFER_LENGTH,10),se=0,z=0,Ge=e.length;z<Ge;z++){var Re=O[e[z]].length;if(Re>D)switch(e[z]){case"textNode":X(O);break;case"cdata":K(O,"oncdata",O.cdata),O.cdata="";break;case"script":K(O,"onscript",O.script),O.script="";break;default:le(O,"Max buffer length exceeded: "+e[z])}se=Math.max(se,Re)}var Ce=r.MAX_BUFFER_LENGTH-se;O.bufferCheckPosition=Ce+O.position}o(n,"checkBufferLength");function s(O){for(var D=0,se=e.length;D<se;D++)O[e[D]]=""}o(s,"clearBuffers");function i(O){X(O),O.cdata!==""&&(K(O,"oncdata",O.cdata),O.cdata=""),O.script!==""&&(K(O,"onscript",O.script),O.script="")}o(i,"flushBuffers"),t.prototype={end:o(function(){ue(this)},"end"),write:lt,resume:o(function(){return this.error=null,this},"resume"),close:o(function(){return this.write(null)},"close"),flush:o(function(){i(this)},"flush")};var a;try{a=Xe("stream").Stream}catch{a=o(function(){},"Stream")}a||(a=o(function(){},"Stream"));var u=r.EVENTS.filter(function(O){return O!=="error"&&O!=="end"});function c(O,D){return new f(O,D)}o(c,"createStream");function f(O,D){if(!(this instanceof f))return new f(O,D);a.apply(this),this._parser=new t(O,D),this.writable=!0,this.readable=!0;var se=this;this._parser.onend=function(){se.emit("end")},this._parser.onerror=function(z){se.emit("error",z),se._parser.error=null},this._decoder=null,u.forEach(function(z){Object.defineProperty(se,"on"+z,{get:o(function(){return se._parser["on"+z]},"get"),set:o(function(Ge){if(!Ge)return se.removeAllListeners(z),se._parser["on"+z]=Ge,Ge;se.on(z,Ge)},"set"),enumerable:!0,configurable:!1})})}o(f,"SAXStream"),f.prototype=Object.create(a.prototype,{constructor:{value:f}}),f.prototype.write=function(O){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(O)){if(!this._decoder){var D=Xe("string_decoder").StringDecoder;this._decoder=new D("utf8")}O=this._decoder.write(O)}return this._parser.write(O.toString()),this.emit("data",O),!0},f.prototype.end=function(O){return O&&O.length&&this.write(O),this._parser.end(),!0},f.prototype.on=function(O,D){var se=this;return!se._parser["on"+O]&&u.indexOf(O)!==-1&&(se._parser["on"+O]=function(){var z=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);z.splice(0,0,O),se.emit.apply(se,z)}),a.prototype.on.call(se,O,D)};var h="[CDATA[",m="DOCTYPE",g="http://www.w3.org/XML/1998/namespace",x="http://www.w3.org/2000/xmlns/",v={xml:g,xmlns:x},w=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,S=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,A=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,T=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function b(O){return O===" "||O===`
75
+ `||O==="\r"||O===" "}o(b,"isWhitespace");function E(O){return O==='"'||O==="'"}o(E,"isQuote");function C(O){return O===">"||b(O)}o(C,"isAttribEnd");function _(O,D){return O.test(D)}o(_,"isMatch");function F(O,D){return!_(O,D)}o(F,"notMatch");var R=0;r.STATE={BEGIN:R++,BEGIN_WHITESPACE:R++,TEXT:R++,TEXT_ENTITY:R++,OPEN_WAKA:R++,SGML_DECL:R++,SGML_DECL_QUOTED:R++,DOCTYPE:R++,DOCTYPE_QUOTED:R++,DOCTYPE_DTD:R++,DOCTYPE_DTD_QUOTED:R++,COMMENT_STARTING:R++,COMMENT:R++,COMMENT_ENDING:R++,COMMENT_ENDED:R++,CDATA:R++,CDATA_ENDING:R++,CDATA_ENDING_2:R++,PROC_INST:R++,PROC_INST_BODY:R++,PROC_INST_ENDING:R++,OPEN_TAG:R++,OPEN_TAG_SLASH:R++,ATTRIB:R++,ATTRIB_NAME:R++,ATTRIB_NAME_SAW_WHITE:R++,ATTRIB_VALUE:R++,ATTRIB_VALUE_QUOTED:R++,ATTRIB_VALUE_CLOSED:R++,ATTRIB_VALUE_UNQUOTED:R++,ATTRIB_VALUE_ENTITY_Q:R++,ATTRIB_VALUE_ENTITY_U:R++,CLOSE_TAG:R++,CLOSE_TAG_SAW_WHITE:R++,SCRIPT:R++,SCRIPT_ENDING:R++},r.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},r.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(r.ENTITIES).forEach(function(O){var D=r.ENTITIES[O],se=typeof D=="number"?String.fromCharCode(D):D;r.ENTITIES[O]=se});for(var q in r.STATE)r.STATE[r.STATE[q]]=q;R=r.STATE;function H(O,D,se){O[D]&&O[D](se)}o(H,"emit");function K(O,D,se){O.textNode&&X(O),H(O,D,se)}o(K,"emitNode");function X(O){O.textNode=pe(O.opt,O.textNode),O.textNode&&H(O,"ontext",O.textNode),O.textNode=""}o(X,"closeText");function pe(O,D){return O.trim&&(D=D.trim()),O.normalize&&(D=D.replace(/\s+/g," ")),D}o(pe,"textopts");function le(O,D){return X(O),O.trackPosition&&(D+=`
76
+ Line: `+O.line+`
77
+ Column: `+O.column+`
78
+ Char: `+O.c),D=new Error(D),O.error=D,H(O,"onerror",D),O}o(le,"error");function ue(O){return O.sawRoot&&!O.closedRoot&&ee(O,"Unclosed root tag"),O.state!==R.BEGIN&&O.state!==R.BEGIN_WHITESPACE&&O.state!==R.TEXT&&le(O,"Unexpected end"),X(O),O.c="",O.closed=!0,H(O,"onend"),t.call(O,O.strict,O.opt),O}o(ue,"end");function ee(O,D){if(typeof O!="object"||!(O instanceof t))throw new Error("bad call to strictFail");O.strict&&le(O,D)}o(ee,"strictFail");function he(O){O.strict||(O.tagName=O.tagName[O.looseCase]());var D=O.tags[O.tags.length-1]||O,se=O.tag={name:O.tagName,attributes:{}};O.opt.xmlns&&(se.ns=D.ns),O.attribList.length=0,K(O,"onopentagstart",se)}o(he,"newTag");function we(O,D){var se=O.indexOf(":"),z=se<0?["",O]:O.split(":"),Ge=z[0],Re=z[1];return D&&O==="xmlns"&&(Ge="xmlns",Re=""),{prefix:Ge,local:Re}}o(we,"qname");function Ke(O){if(O.strict||(O.attribName=O.attribName[O.looseCase]()),O.attribList.indexOf(O.attribName)!==-1||O.tag.attributes.hasOwnProperty(O.attribName)){O.attribName=O.attribValue="";return}if(O.opt.xmlns){var D=we(O.attribName,!0),se=D.prefix,z=D.local;if(se==="xmlns")if(z==="xml"&&O.attribValue!==g)ee(O,"xml: prefix must be bound to "+g+`
79
+ Actual: `+O.attribValue);else if(z==="xmlns"&&O.attribValue!==x)ee(O,"xmlns: prefix must be bound to "+x+`
80
+ Actual: `+O.attribValue);else{var Ge=O.tag,Re=O.tags[O.tags.length-1]||O;Ge.ns===Re.ns&&(Ge.ns=Object.create(Re.ns)),Ge.ns[z]=O.attribValue}O.attribList.push([O.attribName,O.attribValue])}else O.tag.attributes[O.attribName]=O.attribValue,K(O,"onattribute",{name:O.attribName,value:O.attribValue});O.attribName=O.attribValue=""}o(Ke,"attrib");function Ae(O,D){if(O.opt.xmlns){var se=O.tag,z=we(O.tagName);se.prefix=z.prefix,se.local=z.local,se.uri=se.ns[z.prefix]||"",se.prefix&&!se.uri&&(ee(O,"Unbound namespace prefix: "+JSON.stringify(O.tagName)),se.uri=z.prefix);var Ge=O.tags[O.tags.length-1]||O;se.ns&&Ge.ns!==se.ns&&Object.keys(se.ns).forEach(function(Zn){K(O,"onopennamespace",{prefix:Zn,uri:se.ns[Zn]})});for(var Re=0,Ce=O.attribList.length;Re<Ce;Re++){var ft=O.attribList[Re],nr=ft[0],Me=ft[1],sr=we(nr,!0),Xs=sr.prefix,We=sr.local,Fr=Xs===""?"":se.ns[Xs]||"",hn={name:nr,value:Me,prefix:Xs,local:We,uri:Fr};Xs&&Xs!=="xmlns"&&!Fr&&(ee(O,"Unbound namespace prefix: "+JSON.stringify(Xs)),hn.uri=Xs),O.tag.attributes[nr]=hn,K(O,"onattribute",hn)}O.attribList.length=0}O.tag.isSelfClosing=!!D,O.sawRoot=!0,O.tags.push(O.tag),K(O,"onopentag",O.tag),D||(!O.noscript&&O.tagName.toLowerCase()==="script"?O.state=R.SCRIPT:O.state=R.TEXT,O.tag=null,O.tagName=""),O.attribName=O.attribValue="",O.attribList.length=0}o(Ae,"openTag");function xe(O){if(!O.tagName){ee(O,"Weird empty close tag."),O.textNode+="</>",O.state=R.TEXT;return}if(O.script){if(O.tagName!=="script"){O.script+="</"+O.tagName+">",O.tagName="",O.state=R.SCRIPT;return}K(O,"onscript",O.script),O.script=""}var D=O.tags.length,se=O.tagName;O.strict||(se=se[O.looseCase]());for(var z=se;D--;){var Ge=O.tags[D];if(Ge.name!==z)ee(O,"Unexpected close tag");else break}if(D<0){ee(O,"Unmatched closing tag: "+O.tagName),O.textNode+="</"+O.tagName+">",O.state=R.TEXT;return}O.tagName=se;for(var Re=O.tags.length;Re-- >D;){var Ce=O.tag=O.tags.pop();O.tagName=O.tag.name,K(O,"onclosetag",O.tagName);var ft={};for(var nr in Ce.ns)ft[nr]=Ce.ns[nr];var Me=O.tags[O.tags.length-1]||O;O.opt.xmlns&&Ce.ns!==Me.ns&&Object.keys(Ce.ns).forEach(function(sr){var Xs=Ce.ns[sr];K(O,"onclosenamespace",{prefix:sr,uri:Xs})})}D===0&&(O.closedRoot=!0),O.tagName=O.attribValue=O.attribName="",O.attribList.length=0,O.state=R.TEXT}o(xe,"closeTag");function je(O){var D=O.entity,se=D.toLowerCase(),z,Ge="";return O.ENTITIES[D]?O.ENTITIES[D]:O.ENTITIES[se]?O.ENTITIES[se]:(D=se,D.charAt(0)==="#"&&(D.charAt(1)==="x"?(D=D.slice(2),z=parseInt(D,16),Ge=z.toString(16)):(D=D.slice(1),z=parseInt(D,10),Ge=z.toString(10))),D=D.replace(/^0+/,""),isNaN(z)||Ge.toLowerCase()!==D?(ee(O,"Invalid character entity"),"&"+O.entity+";"):String.fromCodePoint(z))}o(je,"parseEntity");function Je(O,D){D==="<"?(O.state=R.OPEN_WAKA,O.startTagPosition=O.position):b(D)||(ee(O,"Non-whitespace before first tag."),O.textNode=D,O.state=R.TEXT)}o(Je,"beginWhiteSpace");function Ze(O,D){var se="";return D<O.length&&(se=O.charAt(D)),se}o(Ze,"charAt");function lt(O){var D=this;if(this.error)throw this.error;if(D.closed)return le(D,"Cannot write after close. Assign an onready handler.");if(O===null)return ue(D);typeof O=="object"&&(O=O.toString());for(var se=0,z="";z=Ze(O,se++),D.c=z,!!z;)switch(D.trackPosition&&(D.position++,z===`
81
+ `?(D.line++,D.column=0):D.column++),D.state){case R.BEGIN:if(D.state=R.BEGIN_WHITESPACE,z==="\uFEFF")continue;Je(D,z);continue;case R.BEGIN_WHITESPACE:Je(D,z);continue;case R.TEXT:if(D.sawRoot&&!D.closedRoot){for(var Ge=se-1;z&&z!=="<"&&z!=="&";)z=Ze(O,se++),z&&D.trackPosition&&(D.position++,z===`
82
+ `?(D.line++,D.column=0):D.column++);D.textNode+=O.substring(Ge,se-1)}z==="<"&&!(D.sawRoot&&D.closedRoot&&!D.strict)?(D.state=R.OPEN_WAKA,D.startTagPosition=D.position):(!b(z)&&(!D.sawRoot||D.closedRoot)&&ee(D,"Text data outside of root node."),z==="&"?D.state=R.TEXT_ENTITY:D.textNode+=z);continue;case R.SCRIPT:z==="<"?D.state=R.SCRIPT_ENDING:D.script+=z;continue;case R.SCRIPT_ENDING:z==="/"?D.state=R.CLOSE_TAG:(D.script+="<"+z,D.state=R.SCRIPT);continue;case R.OPEN_WAKA:if(z==="!")D.state=R.SGML_DECL,D.sgmlDecl="";else if(!b(z))if(_(w,z))D.state=R.OPEN_TAG,D.tagName=z;else if(z==="/")D.state=R.CLOSE_TAG,D.tagName="";else if(z==="?")D.state=R.PROC_INST,D.procInstName=D.procInstBody="";else{if(ee(D,"Unencoded <"),D.startTagPosition+1<D.position){var Re=D.position-D.startTagPosition;z=new Array(Re).join(" ")+z}D.textNode+="<"+z,D.state=R.TEXT}continue;case R.SGML_DECL:if(D.sgmlDecl+z==="--"){D.state=R.COMMENT,D.comment="",D.sgmlDecl="";continue}D.doctype&&D.doctype!==!0&&D.sgmlDecl?(D.state=R.DOCTYPE_DTD,D.doctype+="<!"+D.sgmlDecl+z,D.sgmlDecl=""):(D.sgmlDecl+z).toUpperCase()===h?(K(D,"onopencdata"),D.state=R.CDATA,D.sgmlDecl="",D.cdata=""):(D.sgmlDecl+z).toUpperCase()===m?(D.state=R.DOCTYPE,(D.doctype||D.sawRoot)&&ee(D,"Inappropriately located doctype declaration"),D.doctype="",D.sgmlDecl=""):z===">"?(K(D,"onsgmldeclaration",D.sgmlDecl),D.sgmlDecl="",D.state=R.TEXT):(E(z)&&(D.state=R.SGML_DECL_QUOTED),D.sgmlDecl+=z);continue;case R.SGML_DECL_QUOTED:z===D.q&&(D.state=R.SGML_DECL,D.q=""),D.sgmlDecl+=z;continue;case R.DOCTYPE:z===">"?(D.state=R.TEXT,K(D,"ondoctype",D.doctype),D.doctype=!0):(D.doctype+=z,z==="["?D.state=R.DOCTYPE_DTD:E(z)&&(D.state=R.DOCTYPE_QUOTED,D.q=z));continue;case R.DOCTYPE_QUOTED:D.doctype+=z,z===D.q&&(D.q="",D.state=R.DOCTYPE);continue;case R.DOCTYPE_DTD:z==="]"?(D.doctype+=z,D.state=R.DOCTYPE):z==="<"?(D.state=R.OPEN_WAKA,D.startTagPosition=D.position):E(z)?(D.doctype+=z,D.state=R.DOCTYPE_DTD_QUOTED,D.q=z):D.doctype+=z;continue;case R.DOCTYPE_DTD_QUOTED:D.doctype+=z,z===D.q&&(D.state=R.DOCTYPE_DTD,D.q="");continue;case R.COMMENT:z==="-"?D.state=R.COMMENT_ENDING:D.comment+=z;continue;case R.COMMENT_ENDING:z==="-"?(D.state=R.COMMENT_ENDED,D.comment=pe(D.opt,D.comment),D.comment&&K(D,"oncomment",D.comment),D.comment=""):(D.comment+="-"+z,D.state=R.COMMENT);continue;case R.COMMENT_ENDED:z!==">"?(ee(D,"Malformed comment"),D.comment+="--"+z,D.state=R.COMMENT):D.doctype&&D.doctype!==!0?D.state=R.DOCTYPE_DTD:D.state=R.TEXT;continue;case R.CDATA:z==="]"?D.state=R.CDATA_ENDING:D.cdata+=z;continue;case R.CDATA_ENDING:z==="]"?D.state=R.CDATA_ENDING_2:(D.cdata+="]"+z,D.state=R.CDATA);continue;case R.CDATA_ENDING_2:z===">"?(D.cdata&&K(D,"oncdata",D.cdata),K(D,"onclosecdata"),D.cdata="",D.state=R.TEXT):z==="]"?D.cdata+="]":(D.cdata+="]]"+z,D.state=R.CDATA);continue;case R.PROC_INST:z==="?"?D.state=R.PROC_INST_ENDING:b(z)?D.state=R.PROC_INST_BODY:D.procInstName+=z;continue;case R.PROC_INST_BODY:if(!D.procInstBody&&b(z))continue;z==="?"?D.state=R.PROC_INST_ENDING:D.procInstBody+=z;continue;case R.PROC_INST_ENDING:z===">"?(K(D,"onprocessinginstruction",{name:D.procInstName,body:D.procInstBody}),D.procInstName=D.procInstBody="",D.state=R.TEXT):(D.procInstBody+="?"+z,D.state=R.PROC_INST_BODY);continue;case R.OPEN_TAG:_(S,z)?D.tagName+=z:(he(D),z===">"?Ae(D):z==="/"?D.state=R.OPEN_TAG_SLASH:(b(z)||ee(D,"Invalid character in tag name"),D.state=R.ATTRIB));continue;case R.OPEN_TAG_SLASH:z===">"?(Ae(D,!0),xe(D)):(ee(D,"Forward-slash in opening tag not followed by >"),D.state=R.ATTRIB);continue;case R.ATTRIB:if(b(z))continue;z===">"?Ae(D):z==="/"?D.state=R.OPEN_TAG_SLASH:_(w,z)?(D.attribName=z,D.attribValue="",D.state=R.ATTRIB_NAME):ee(D,"Invalid attribute name");continue;case R.ATTRIB_NAME:z==="="?D.state=R.ATTRIB_VALUE:z===">"?(ee(D,"Attribute without value"),D.attribValue=D.attribName,Ke(D),Ae(D)):b(z)?D.state=R.ATTRIB_NAME_SAW_WHITE:_(S,z)?D.attribName+=z:ee(D,"Invalid attribute name");continue;case R.ATTRIB_NAME_SAW_WHITE:if(z==="=")D.state=R.ATTRIB_VALUE;else{if(b(z))continue;ee(D,"Attribute without value"),D.tag.attributes[D.attribName]="",D.attribValue="",K(D,"onattribute",{name:D.attribName,value:""}),D.attribName="",z===">"?Ae(D):_(w,z)?(D.attribName=z,D.state=R.ATTRIB_NAME):(ee(D,"Invalid attribute name"),D.state=R.ATTRIB)}continue;case R.ATTRIB_VALUE:if(b(z))continue;E(z)?(D.q=z,D.state=R.ATTRIB_VALUE_QUOTED):(D.opt.unquotedAttributeValues||le(D,"Unquoted attribute value"),D.state=R.ATTRIB_VALUE_UNQUOTED,D.attribValue=z);continue;case R.ATTRIB_VALUE_QUOTED:if(z!==D.q){z==="&"?D.state=R.ATTRIB_VALUE_ENTITY_Q:D.attribValue+=z;continue}Ke(D),D.q="",D.state=R.ATTRIB_VALUE_CLOSED;continue;case R.ATTRIB_VALUE_CLOSED:b(z)?D.state=R.ATTRIB:z===">"?Ae(D):z==="/"?D.state=R.OPEN_TAG_SLASH:_(w,z)?(ee(D,"No whitespace between attributes"),D.attribName=z,D.attribValue="",D.state=R.ATTRIB_NAME):ee(D,"Invalid attribute name");continue;case R.ATTRIB_VALUE_UNQUOTED:if(!C(z)){z==="&"?D.state=R.ATTRIB_VALUE_ENTITY_U:D.attribValue+=z;continue}Ke(D),z===">"?Ae(D):D.state=R.ATTRIB;continue;case R.CLOSE_TAG:if(D.tagName)z===">"?xe(D):_(S,z)?D.tagName+=z:D.script?(D.script+="</"+D.tagName,D.tagName="",D.state=R.SCRIPT):(b(z)||ee(D,"Invalid tagname in closing tag"),D.state=R.CLOSE_TAG_SAW_WHITE);else{if(b(z))continue;F(w,z)?D.script?(D.script+="</"+z,D.state=R.SCRIPT):ee(D,"Invalid tagname in closing tag."):D.tagName=z}continue;case R.CLOSE_TAG_SAW_WHITE:if(b(z))continue;z===">"?xe(D):ee(D,"Invalid characters in closing tag");continue;case R.TEXT_ENTITY:case R.ATTRIB_VALUE_ENTITY_Q:case R.ATTRIB_VALUE_ENTITY_U:var Ce,ft;switch(D.state){case R.TEXT_ENTITY:Ce=R.TEXT,ft="textNode";break;case R.ATTRIB_VALUE_ENTITY_Q:Ce=R.ATTRIB_VALUE_QUOTED,ft="attribValue";break;case R.ATTRIB_VALUE_ENTITY_U:Ce=R.ATTRIB_VALUE_UNQUOTED,ft="attribValue";break}if(z===";"){var nr=je(D);D.opt.unparsedEntities&&!Object.values(r.XML_ENTITIES).includes(nr)?(D.entity="",D.state=Ce,D.write(nr)):(D[ft]+=nr,D.entity="",D.state=Ce)}else _(D.entity.length?T:A,z)?D.entity+=z:(ee(D,"Invalid character in entity name"),D[ft]+="&"+D.entity+z,D.entity="",D.state=Ce);continue;default:throw new Error(D,"Unknown state: "+D.state)}return D.position>=D.bufferCheckPosition&&n(D),D}o(lt,"write");String.fromCodePoint||(function(){var O=String.fromCharCode,D=Math.floor,se=o(function(){var z=16384,Ge=[],Re,Ce,ft=-1,nr=arguments.length;if(!nr)return"";for(var Me="";++ft<nr;){var sr=Number(arguments[ft]);if(!isFinite(sr)||sr<0||sr>1114111||D(sr)!==sr)throw RangeError("Invalid code point: "+sr);sr<=65535?Ge.push(sr):(sr-=65536,Re=(sr>>10)+55296,Ce=sr%1024+56320,Ge.push(Re,Ce)),(ft+1===nr||Ge.length>z)&&(Me+=O.apply(null,Ge),Ge.length=0)}return Me},"fromCodePoint");Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:se,configurable:!0,writable:!0}):String.fromCodePoint=se})()})(typeof $S>"u"?$S.sax={}:$S)});var K6=Z((v1e,H6)=>{"use strict";H6.exports=r=>{if(typeof r!="string")throw new TypeError("Expected a string, got "+typeof r);return r.charCodeAt(0)===65279?r.slice(1):r}});var $6=Z(GS=>{"use strict";Object.defineProperty(GS,"__esModule",{value:!0});GS.NamespaceContext=void 0;var Ooe=class{static{o(this,"NamespaceScope")}constructor(e){this.parent=e,this.namespaces={}}getNamespaceURI(e,t){switch(e){case"xml":return"http://www.w3.org/XML/1998/namespace";case"xmlns":return"http://www.w3.org/2000/xmlns/";default:{let n=this.namespaces[e];return n!=null?n.uri:!t&&this.parent?this.parent.getNamespaceURI(e):null}}}getNamespaceMapping(e){switch(e){case"xml":return{uri:"http://www.w3.org/XML/1998/namespace",prefix:"xml",declared:!0};case"xmlns":return{uri:"http://www.w3.org/2000/xmlns/",prefix:"xmlns",declared:!0};default:{let t=this.namespaces[e];return t??(this.parent?this.parent.getNamespaceMapping(e):null)}}}getPrefix(e,t){switch(e){case"http://www.w3.org/XML/1998/namespace":return"xml";case"http://www.w3.org/2000/xmlns/":return"xmlns";default:for(let n in this.namespaces)if(this.namespaces[n].uri===e)return n;return!t&&this.parent?this.parent.getPrefix(e):null}}},koe=class{static{o(this,"NamespaceContext")}constructor(){this.scopes=[],this.pushContext(),this.prefixCount=0}addNamespace(e,t,n){return this.getNamespaceURI(e,n)===t?!1:this.currentScope?(this.currentScope.namespaces[e]={uri:t,prefix:e,declared:!1},!0):!1}pushContext(){let e=new Ooe(this.currentScope);return this.scopes.push(e),this.currentScope=e,e}popContext(){let e=this.scopes.pop();return e?this.currentScope=e.parent:this.currentScope=null,e}getNamespaceURI(e,t){return this.currentScope&&this.currentScope.getNamespaceURI(e,t)}getPrefix(e,t){return this.currentScope&&this.currentScope.getPrefix(e,t)}registerNamespace(e){let t=this.getPrefix(e);if(t)return t;for(;t="ns"+ ++this.prefixCount,!!this.getNamespaceURI(t););return this.addNamespace(t,e,!0),t}declareNamespace(e,t){if(this.currentScope){let n=this.currentScope.getNamespaceMapping(e);return n&&n.uri===t&&n.declared?!1:(this.currentScope.namespaces[e]={uri:t,prefix:e,declared:!0},!0)}return!1}};GS.NamespaceContext=koe});var rU=Z(ot=>{"use strict";var Loe=ot&&ot.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Voe=ot&&ot.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Uoe=ot&&ot.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&Loe(t,e,n[s]);return Voe(t,e),t}})(),joe=ot&&ot.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ot,"__esModule",{value:!0});ot.ImportElement=ot.IncludeElement=ot.BodyElement=ot.DefinitionsElement=ot.ServiceElement=ot.PortElement=ot.BindingElement=ot.PortTypeElement=ot.OperationElement=ot.TypesElement=ot.SchemaElement=ot.DocumentationElement=ot.MessageElement=ot.AllElement=ot.AttributeElement=ot.SequenceElement=ot.SimpleContentElement=ot.ComplexContentElement=ot.ComplexTypeElement=ot.EnumerationElement=ot.ChoiceElement=ot.ExtensionElement=ot.RestrictionElement=ot.SimpleTypeElement=ot.OutputElement=ot.InputElement=ot.AnyElement=ot.ElementElement=ot.UnexpectedElement=ot.Element=void 0;var VI=Xe("assert"),Moe=joe(bp()),sa=Uoe(_o()),is=Zu(),Foe=(0,Moe.default)("node-soap"),XS={string:1,boolean:1,decimal:1,float:1,double:1,anyType:1,byte:1,int:1,long:1,short:1,negativeInteger:1,nonNegativeInteger:1,positiveInteger:1,nonPositiveInteger:1,unsignedByte:1,unsignedInt:1,unsignedLong:1,unsignedShort:1,duration:0,dateTime:0,time:0,date:0,gYearMonth:0,gYear:0,gMonthDay:0,gDay:0,gMonth:0,hexBinary:0,base64Binary:0,anyURI:0,QName:0,NOTATION:0},gr=class{static{o(this,"Element")}constructor(e,t,n,s){this.allowedChildren={},this.children=[];let i=(0,is.splitQName)(e);this.nsName=e,this.prefix=i.prefix,this.name=i.name,this.children=[],this.xmlns={},this.schemaXmlns={},this._initializeOptions(n);for(let a in t){let u=/^xmlns:?(.*)$/.exec(a);u?this.xmlns[u[1]?u[1]:is.TNS_PREFIX]=t[a]:a==="value"?this[this.valueKey]=t[a]:this["$"+a]=t[a]}for(let a in s){let u=/^xmlns:?(.*)$/.exec(a);u&&u[1]&&(this.schemaXmlns[u[1]]=s[a])}this.$targetNamespace!==void 0&&(this.xmlns[is.TNS_PREFIX]=this.$targetNamespace),this.init()}deleteFixedAttrs(){this.children&&this.children.length===0&&delete this.children,this.xmlns&&Object.keys(this.xmlns).length===0&&delete this.xmlns,delete this.nsName,delete this.prefix,delete this.name}startElement(e,t,n,s,i){if(!this.allowedChildren)return;let a=this.allowedChildren[(0,is.splitQName)(t).name];if(a==null&&!this.strict&&(a=G6),a){let u=new a(t,n,s,i);u.init();let c=e[0];c instanceof XI&&(u.definitionsXmlns=c.xmlns),e.push(u)}else this.unexpected(t)}endElement(e,t){if(this.nsName===t){if(e.length<2)return;let n=e[e.length-2];this!==e[0]&&(sa.defaultsDeep(e[0].xmlns,this.xmlns),n.children.push(this),n.addChild(this)),e.pop()}}addChild(e){}unexpected(e){throw new Error("Found unexpected element ("+e+") inside "+this.nsName)}description(e,t){return this.$name||this.name}init(){}_initializeOptions(e){e?(this.valueKey=e.valueKey||"$value",this.xmlKey=e.xmlKey||"$xml",this.ignoredNamespaces=e.ignoredNamespaces||[],this.strict=e.strict||!1,this.forceUseSchemaXmlns=e.forceUseSchemaXmlns||!1):(this.valueKey="$value",this.xmlKey="$xml",this.ignoredNamespaces=[],this.strict=!1,this.forceUseSchemaXmlns=!1)}};ot.Element=gr;var G6=class X6 extends gr{static{o(this,"UnexpectedElement")}startElement(e,t,n,s,i){let a=new X6(t,n,s,i);a.init(),e.push(a)}};ot.UnexpectedElement=G6;var UI=class extends gr{static{o(this,"ElementElement")}constructor(){super(...arguments),this.allowedChildren=un(["annotation","complexType","simpleType"])}description(e,t){let n={},s=this.$name,i=1,a=1;this.$maxOccurs==="unbounded"?a=1/0:this.$maxOccurs&&(a=parseInt(this.$maxOccurs,10)),this.$minOccurs&&(i=parseInt(this.$minOccurs,10));let u=a>1;u&&s&&(s+="[]"),t&&t[is.TNS_PREFIX]&&(this.$targetNamespace=t[is.TNS_PREFIX]);let c=this.$type||this.$ref;if(c){c=(0,is.splitQName)(c);let f=c.name,h=!!oc(c.prefix,this.definitionsXmlns,e.xmlns)||!!oc(this.targetNSAlias,this.definitionsXmlns,e.xmlns)||this.forceUseSchemaXmlns,m=oc(c.prefix,t,this.xmlns,h?this.schemaXmlns:void 0,this.definitionsXmlns,e.xmlns),g=e.schemas[m],x=g&&(this.$type?g.complexTypes[f]||g.types[f]:g.elements[f]),v=this.$type?e.descriptions.types:e.descriptions.elements;if(m&&e.schemas[m]&&(t=e.schemas[m].xmlns),x&&!(f in XS))if(f in v)if(this.$ref)if(u){let w=f+"[]";v[w]=v[f],n[w]=v[w]}else n=v[f];else n[s]=v[f];else{let w={};v[f]=w,u&&"maxOccurs"in x&&(x.maxOccurs=this.$maxOccurs),this.$minOccurs&&"minOccurs"in x&&(x.minOccurs=this.$minOccurs);let S=x.description(e,t);if(typeof S=="string")w=S;else{Object.keys(S).forEach(T=>{w[T]=S[T]});let A=S[ia.Symbol];A&&(w[ia.Symbol]=A)}this.$ref?n=w:n[s]=w,typeof w=="object"&&(w.targetNSAlias=c.prefix,w.targetNamespace=m),v[f]=w}else n[s]=this.$type}else{let f=this.children;n[s]={};for(let h of f)(h instanceof QS||h instanceof zS)&&(n[s]=h.description(e,t))}return n}};ot.ElementElement=UI;var WS=class extends gr{static{o(this,"AnyElement")}};ot.AnyElement=WS;var W6=class extends gr{static{o(this,"InputElement")}constructor(){super(...arguments),this.allowedChildren=un(["body","documentation","header","SecuritySpecRef"])}addChild(e){e instanceof ZS&&(this.use=e.$use,this.use==="encoded"&&(this.encodingStyle=e.$encodingStyle),this.children.pop())}};ot.InputElement=W6;var z6=class extends gr{static{o(this,"OutputElement")}constructor(){super(...arguments),this.allowedChildren=un(["body","documentation","header","SecuritySpecRef"])}addChild(e){e instanceof ZS&&(this.use=e.$use,this.use==="encoded"&&(this.encodingStyle=e.$encodingStyle),this.children.pop())}};ot.OutputElement=z6;var zS=class extends gr{static{o(this,"SimpleTypeElement")}constructor(){super(...arguments),this.allowedChildren=un(["restriction"])}description(e){for(let t of this.children)if(t instanceof JS)return[this.$name,t.description()].filter(Boolean).join("|");return{}}};ot.SimpleTypeElement=zS;var JS=class extends gr{static{o(this,"RestrictionElement")}constructor(){super(...arguments),this.allowedChildren=un(["all","choice","enumeration","sequence","attribute"])}description(e,t){let n=this.children,s,i=!1,a={};for(let c of n){if(c instanceof ia){a[c.$name]=c.description(e);continue}!i&&(c instanceof qg||c instanceof Fg)&&(i=!0,s=c.description(e,t))}if(Object.keys(a).length>0&&(s=s??{},s[ia.Symbol]=a),s&&this.$base){let c=(0,is.splitQName)(this.$base),f=c.name,h=oc(c.prefix,t,this.definitionsXmlns,e.xmlns),m=e.schemas[h],g=m&&(m.complexTypes[f]||m.types[f]||m.elements[f]);if(s.getBase=()=>g.description(e,m.xmlns),g){let x=g.description(e,m.xmlns);x[ia.Symbol]&&sa.defaults(a,x[ia.Symbol]),s=sa.defaults(s,x)}return s}let u=this.children.map(c=>c.description()).join(",");return[this.$base,u].filter(Boolean).join("|")}};ot.RestrictionElement=JS;var YS=class extends gr{static{o(this,"ExtensionElement")}constructor(){super(...arguments),this.allowedChildren=un(["all","choice","sequence"])}description(e,t){let n={};for(let s of this.children)(s instanceof qg||s instanceof Fg)&&(n=s.description(e,t));if(this.$base){let s=(0,is.splitQName)(this.$base),i=s.name,a=oc(s.prefix,t,this.definitionsXmlns,e.xmlns),u=e.schemas[a];if(i in XS)return this.$base;{let c=u&&(u.complexTypes[i]||u.types[i]||u.elements[i]);if(c){let f=c.description(e,u.xmlns);n=typeof f=="string"?f:sa.defaults(f,n)}}}return n}};ot.ExtensionElement=YS;var Fg=class extends gr{static{o(this,"ChoiceElement")}constructor(){super(...arguments),this.allowedChildren=un(["any","choice","element","sequence"])}description(e,t){let n={};for(let s of this.children){let i=s.description(e,t);for(let a in i)n[a]=i[a]}return n}};ot.ChoiceElement=Fg;var J6=class extends gr{static{o(this,"EnumerationElement")}description(){return this[this.valueKey]}};ot.EnumerationElement=J6;var QS=class extends gr{static{o(this,"ComplexTypeElement")}constructor(){super(...arguments),this.allowedChildren=un(["all","annotation","choice","complexContent","sequence","simpleContent","attribute"])}description(e,t){let n={},s=!1,i={},a=this.children||[];for(let u of a){if(u instanceof ia){i[u.$name]=u.description(e);continue}!s&&(u instanceof Fg||u instanceof qg||u instanceof FI||u instanceof MI||u instanceof jI)&&(s=!0,n=u.description(e,t))}return Object.keys(i).length>0&&(n[ia.Symbol]=i),n}};ot.ComplexTypeElement=QS;var jI=class extends gr{static{o(this,"ComplexContentElement")}constructor(){super(...arguments),this.allowedChildren=un(["extension","restriction"])}description(e,t){for(let n of this.children)if(n instanceof YS||n instanceof JS)return n.description(e,t);return{}}};ot.ComplexContentElement=jI;var MI=class extends gr{static{o(this,"SimpleContentElement")}constructor(){super(...arguments),this.allowedChildren=un(["extension"])}description(e,t){for(let n of this.children)if(n instanceof YS)return n.description(e,t);return{}}};ot.SimpleContentElement=MI;var qg=class extends gr{static{o(this,"SequenceElement")}constructor(){super(...arguments),this.allowedChildren=un(["any","choice","element","sequence"])}description(e,t){let n={};for(let s of this.children){if(s instanceof WS)continue;let i=s.description(e,t);for(let a in i)n[a]=i[a]}return n}};ot.SequenceElement=qg;var ia=class extends gr{static{o(this,"AttributeElement")}description(e){return{type:this.$type,required:this.$use==="required"}}};ot.AttributeElement=ia;ia.Symbol=Symbol("$attributes");var FI=class extends gr{static{o(this,"AllElement")}constructor(){super(...arguments),this.allowedChildren=un(["choice","element"])}description(e,t){let n={};for(let s of this.children){if(s instanceof WS)continue;let i=s.description(e,t);for(let a in i)n[a]=i[a]}return n}};ot.AllElement=FI;var qI=class extends gr{static{o(this,"MessageElement")}constructor(){super(...arguments),this.allowedChildren=un(["part","documentation"]),this.element=null,this.parts=null}postProcess(e){let t=null,n=this.children||[];for(let s of n)if(s.name==="part"){t=s;break}if(t){if(t.$element){let s=[];delete this.parts;let i=(0,is.splitQName)(t.$element),a=oc(i.prefix,this.definitionsXmlns,e.xmlns),u=e.schemas[a];if(this.element=u.elements[i.name],!this.element){Foe(i.name+" is not present in wsdl and cannot be processed correctly.");return}this.element.targetNSAlias=i.prefix,this.element.targetNamespace=a,this.element.$lookupType=t.$element;let c=this.element.children;if(c.length>0)for(let f of c)s.push(this._getNestedLookupTypeString(f));if(s.length>0){s=s.join("_").split("_").filter(o(function(m){return m!=="^"},"removeEmptyLookupTypes"));let f=e.schemas[this.element.targetNamespace].xmlns;for(let h=0;h<s.length;h++)s[h]=this._createLookupTypeObject(s[h],f)}if(this.element.$lookupTypes=s,this.element.$type){let f=(0,is.splitQName)(this.element.$type),h=oc(f.prefix,u.xmlns,this.definitionsXmlns,e.xmlns);if(h&&!(f.name in XS)){u=e.schemas[h];let m=u.complexTypes[f.name]||u.types[f.name]||u.elements[f.name];m&&(this.parts=m.description(e,u.xmlns))}}else{let f=this.element.description(e,u.xmlns);this.parts=f[i.name]}this.children.splice(0,1)}else{this.parts={},delete this.element;for(let s=0;s<this.children.length;s++){let i=this.children[s];if(i.name==="documentation")continue;(0,VI.ok)(i.name==="part","Expected part element");let a=(0,is.splitQName)(i.$type),u=oc(a.prefix,this.definitionsXmlns,e.xmlns),c=a.name;typeof e.schemas[u]<"u"?this.parts[i.$name]=e.schemas[u].types[c]||e.schemas[u].complexTypes[c]:this.parts[i.$name]=i.$type,typeof this.parts[i.$name]=="object"&&(this.parts[i.$name].prefix=a.prefix,this.parts[i.$name].xmlns=u),this.children.splice(s--,1)}}this.deleteFixedAttrs()}}description(e){if(this.element)return this.element&&this.element.description(e);let t={};return t[this.$name]=this.parts,t}_createLookupTypeObject(e,t){let n=(0,is.splitQName)(e),s=n.prefix,i=n.name.split("#"),a=i[0],u=i[1];return{$namespace:t[s],$type:s+":"+a,$name:u}}_getNestedLookupTypeString(e){let t="^",n=this.ignoredNamespaces.concat("xs");return Object.hasOwnProperty.call(e,"$type")&&typeof e.$type=="string"&&n.indexOf(e.$type.split(":")[0])===-1&&(t+="_"+e.$type+"#"+e.$name),e.children.length>0&&e.children.forEach(s=>{let i=this._getNestedLookupTypeString(s).replace(/\^_/,"");i&&typeof i=="string"&&(t+="_"+i)}),t}};ot.MessageElement=qI;var Y6=class extends gr{static{o(this,"DocumentationElement")}};ot.DocumentationElement=Y6;var Mg=class Q6 extends gr{static{o(this,"SchemaElement")}constructor(){super(...arguments),this.allowedChildren=un(["complexType","element","import","include","simpleType"]),this.complexTypes={},this.types={},this.elements={},this.includes=[]}merge(e){return(0,VI.ok)(e instanceof Q6),sa.merge(this.complexTypes,e.complexTypes),sa.merge(this.types,e.types),sa.merge(this.elements,e.elements),sa.merge(this.xmlns,e.xmlns),sa.merge(this,sa.pickBy(e,(t,n)=>n.startsWith("$")&&!Object.hasOwnProperty.call(this,n))),this}addChild(e){if(!(e.$name in XS)){if(e instanceof WI||e instanceof zI){let t=e.$schemaLocation||e.$location;t&&this.includes.push({namespace:e.$namespace||e.$targetNamespace||this.$targetNamespace,location:t})}else e instanceof QS?this.complexTypes[e.$name]=e:e instanceof UI?this.elements[e.$name]=e:e instanceof zS&&(this.types[e.$name]=e);this.children.pop()}}};ot.SchemaElement=Mg;var HI=class extends gr{static{o(this,"TypesElement")}constructor(){super(...arguments),this.allowedChildren=un(["documentation","schema"]),this.schemas={}}addChild(e){(0,VI.ok)(e instanceof Mg);let t=e.includes.find(i=>Object.hasOwnProperty.call(i,"namespace")),n=typeof t<"u"&&Object.hasOwnProperty.call(t,"namespace")&&e instanceof Mg?t.namespace:void 0,s=e.$targetNamespace||e.includes[0]?.namespace||n;Object.hasOwnProperty.call(this.schemas,s)?s===e.$targetNamespace?this.schemas[s]=e:console.error('Target-Namespace "'+s+'" already in use by another Schema!'):this.schemas[s]=e}};ot.TypesElement=HI;var Z6=class eU extends gr{static{o(this,"OperationElement")}constructor(){super(...arguments),this.allowedChildren=un(["documentation","fault","input","operation","output"]),this.input=null,this.output=null,this.inputSoap=null,this.outputSoap=null,this.style="",this.soapAction=""}addChild(e){e instanceof eU&&(this.soapAction=e.$soapAction||"",this.style=e.$style||"",this.children.pop())}postProcess(e,t){let n=this.children;for(let s=0;s<n.length;s++){let i=n[s];if(i.name!=="input"&&i.name!=="output")continue;if(t==="binding"){this[i.name]=i,n.splice(s--,1);continue}let a=(0,is.splitQName)(i.$message).name,u=e.messages[a];u&&(u.postProcess(e),u.element?(e.messages[u.element.$name]=u,this[i.name]=u.element):this[i.name]=u,n.splice(s--,1))}this.deleteFixedAttrs()}description(e){let t=this.input?this.input.description(e):null,n=this.output?this.output.description(e):null;return{input:t&&t[Object.keys(t)[0]],output:n&&n[Object.keys(n)[0]]}}};ot.OperationElement=Z6;var KI=class extends gr{static{o(this,"PortTypeElement")}constructor(){super(...arguments),this.allowedChildren=un(["documentation","operation"]),this.methods={}}postProcess(e){let t=this.children;if(!(typeof t>"u")){for(let n=0;n<t.length;n++){let s=t[n];s.name==="operation"&&(s.postProcess(e,"portType"),this.methods[s.$name]=s,t.splice(n--,1))}delete this.$name,this.deleteFixedAttrs()}}description(e){let t={};for(let n in this.methods){let s=this.methods[n];t[n]=s.description(e)}return t}};ot.PortTypeElement=KI;var $I=class extends gr{static{o(this,"BindingElement")}constructor(){super(...arguments),this.allowedChildren=un(["binding","documentation","operation","SecuritySpec"]),this.transport="",this.style="",this.methods={}}addChild(e){e.name==="binding"&&(this.transport=e.$transport,this.style=e.$style,this.children.pop())}postProcess(e){let t=(0,is.splitQName)(this.$type).name,n=e.portTypes[t],s=this.style,i=this.children;if(n){n.postProcess(e),this.methods=n.methods;for(let a=0;a<i.length;a++){let u=i[a];if(u.name!=="operation")continue;u.postProcess(e,"binding"),i.splice(a--,1),u.style||(u.style=s);let c=this.methods[u.$name];c&&(c.style=u.style,c.soapAction=u.soapAction,c.inputSoap=u.input||null,c.outputSoap=u.output||null,c.inputSoap&&c.inputSoap.deleteFixedAttrs(),c.outputSoap&&c.outputSoap.deleteFixedAttrs())}}delete this.$name,delete this.$type,this.deleteFixedAttrs()}description(e){let t={};for(let n in this.methods){let s=this.methods[n];t[n]=s.description(e)}return t}};ot.BindingElement=$I;var tU=class extends gr{static{o(this,"PortElement")}constructor(){super(...arguments),this.allowedChildren=un(["address","documentation"]),this.location=null}addChild(e){e.name==="address"&&typeof e.$location<"u"&&(this.location=e.$location)}};ot.PortElement=tU;var GI=class extends gr{static{o(this,"ServiceElement")}constructor(){super(...arguments),this.allowedChildren=un(["documentation","port"]),this.ports={}}postProcess(e){let t=this.children,n=e.bindings;if(t&&t.length>0)for(let s=0;s<t.length;s++){let i=t[s];if(i.name!=="port")continue;let a=(0,is.splitQName)(i.$binding).name,u=n[a];u&&(u.postProcess(e),this.ports[i.$name]={location:i.location,binding:u},t.splice(s--,1))}delete this.$name,this.deleteFixedAttrs()}description(e){let t={};for(let n in this.ports){let s=this.ports[n];t[n]=s.binding.description(e)}return t}};ot.ServiceElement=GI;var XI=class extends gr{static{o(this,"DefinitionsElement")}constructor(){super(...arguments),this.allowedChildren=un(["binding","documentation","import","message","portType","service","types"]),this.messages={},this.portTypes={},this.bindings={},this.services={},this.schemas={},this.descriptions={types:{},elements:{}}}init(){this.name!=="definitions"&&this.unexpected(this.nsName)}addChild(e){if(e instanceof HI)sa.merge(this.schemas,e.schemas);else if(e instanceof qI)this.messages[e.$name]=e;else if(e.name==="import"){let t=new Mg(e.$namespace,{});t.init(),this.schemas[e.$namespace]=t,this.schemas[e.$namespace].addChild(e)}else e instanceof KI?this.portTypes[e.$name]=e:e instanceof $I?(e.transport==="http://schemas.xmlsoap.org/soap/http"||e.transport==="http://www.w3.org/2003/05/soap/bindings/HTTP/")&&(this.bindings[e.$name]=e):e instanceof GI&&(this.services[e.$name]=e);this.children.pop()}};ot.DefinitionsElement=XI;var ZS=class extends gr{static{o(this,"BodyElement")}};ot.BodyElement=ZS;var WI=class extends gr{static{o(this,"IncludeElement")}};ot.IncludeElement=WI;var zI=class extends gr{static{o(this,"ImportElement")}};ot.ImportElement=zI;var qoe={all:FI,any:WS,binding:$I,body:ZS,choice:Fg,complexContent:jI,complexType:QS,definitions:XI,documentation:Y6,element:UI,enumeration:J6,extension:YS,fault:gr,import:zI,include:WI,input:W6,message:qI,operation:Z6,output:z6,port:tU,portType:KI,restriction:JS,schema:Mg,sequence:qg,service:GI,simpleContent:MI,simpleType:zS,types:HI,attribute:ia};function un(r){let e={};for(let t of r)e[t.replace(/^_/,"")]=qoe[t]||gr;return e}o(un,"buildAllowedChildren");function oc(r,...e){for(let t of e)if(t?.[r])return t[r]}o(oc,"findNs")});var QI=Z(js=>{"use strict";var Hoe=js&&js.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Koe=js&&js.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),zp=js&&js.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&Hoe(t,e,n[s]);return Koe(t,e),t}})(),aU=js&&js.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(js,"__esModule",{value:!0});js.WSDL=void 0;js.trim=YI;js.open_wsdl=oU;var $oe=Xe("assert"),Goe=aU(bp()),Xoe=zp(Xe("fs")),nU=zp(_o()),Hg=zp(Xe("path")),eb=zp(LI()),Woe=aU(K6()),zoe=zp(Xe("url")),Joe=SS(),Yoe=$6(),_r=Zu(),Wl=zp(rU()),sU=(0,Goe.default)("node-soap"),iU="http://www.w3.org/2001/XMLSchema-instance",Qoe="http://schemas.xmlsoap.org/soap/envelope/";function YI(r){return r.trim()}o(YI,"trim");function tb(r){return r&&r.charAt(r.length-1)!==":"?r+":":r}o(tb,"appendColon");function JI(r){return r&&r.charAt(r.length-1)===":"?r.substring(0,r.length-1):r}o(JI,"noColonNameSpace");var rb=class{static{o(this,"WSDL")}constructor(e,t,n){this.ignoredNamespaces=["tns","targetNamespace","typedNamespace"],this.ignoreBaseNameSpaces=!1,this.valueKey="$value",this.xmlKey="$xml";let s;if(this.uri=t,this.callback=()=>{},this._includesWsdl=[],this.WSDL_CACHE={},n&&n.WSDL_CACHE&&(this.WSDL_CACHE=n.WSDL_CACHE),this._initializeOptions(n),typeof e=="string")e=(0,Woe.default)(e),s=this._fromXML;else if(typeof e=="object")s=this._fromServices;else throw new Error("WSDL constructor takes either an XML string or service definition");process.nextTick(()=>{try{s.call(this,e)}catch(i){return this.callback(i)}this.processIncludes(i=>{let a;if(i)return this.callback(i);try{this.definitions.deleteFixedAttrs();let u=this.services=this.definitions.services;if(u)for(a in u)u[a].postProcess(this.definitions);let c=this.definitions.complexTypes;if(c)for(a in c)c[a].deleteFixedAttrs();let f=this.definitions.bindings;for(let h in f){let m=f[h];typeof m.style>"u"&&(m.style="document");let g=m.methods,x=m.topElements={};for(let v in g)if((g[v].style||m.style)==="document"&&g[v].input){let w=g[v].input.$name,S="";g[v].output&&(S=g[v].output.$name),x[w]={methodName:v,outputName:S}}}this.xmlnsInEnvelope=this._xmlnsMap(),this.callback(i,this)}catch(u){this.callback(u)}})})}onReady(e){e&&(this.callback=e)}processIncludes(e){let t=this.definitions.schemas,n=[];for(let s in t){let i=t[s];n=n.concat(i.includes||[])}this._processNextInclude(n,e)}describeServices(){let e={};for(let t in this.services){let n=this.services[t];e[t]=n.description(this.definitions)}return e}toXML(){return this.xml||""}getSaxStream(e){let t=eb.createStream(!0,null);return e.pipe(t),t}xmlToObject(e,t){let n=typeof t=="function"?{}:eb.parser(!0,null),s=null,i={},u=[{name:null,object:i,schema:{Envelope:{Header:{Security:{UsernameToken:{Username:"string",Password:"string"}}},Body:{Fault:{faultcode:"string",faultstring:"string",detail:"string"}}}}}],c=new Map,f="soap",h={},m={};if(n.onopentag=x=>{let v=x.name,w=x.attributes,S=(0,_r.splitQName)(v).name,A,T=u[u.length-1],b=T.schema,E={},C=!1,_=!1,F={},R=S;if(w.href){let K=w.href.substr(1);m[K]||(m[K]={hrefs:[],obj:null}),m[K].hrefs.push({par:T.object,key:S,obj:F})}w.id&&(m[w.id]||(m[w.id]={hrefs:[],obj:null}));for(A in w){let K=w[A];if(/^xmlns:|^xmlns$/.test(A)){let X=(0,_r.splitQName)(A).name;h[X]=K,K===iU&&c.set(X,K),K===Qoe&&(f=X);continue}C=!0,E[A]=K}for(A in E){let K=(0,_r.splitQName)(A);if(K.name==="nil"&&h[K.prefix]===iU&&E[A]&&(E[A].toLowerCase()==="true"||E[A]==="1")){_=!0;break}}if(C&&(F[this.options.attributesKey]=E),!s&&h[f]&&T.name==="Body"&&S!=="Fault"){let K=this.definitions.messages[S];if(!K)try{let X=!1;/Response$/.test(S)?S=S.replace(/Response$/,""):/Request$/.test(S)?(X=!0,S=S.replace(/Request$/,"")):/Solicit$/.test(S)&&(X=!0,S=S.replace(/Solicit$/,""));let pe=this.definitions.portTypes,le=Object.keys(pe),ue=pe[le[0]];X?S=ue.methods[S].input.$name:S=ue.methods[S].output.$name,K=this.definitions.messages[S],this.definitions.messages[R]=this.definitions.messages[S]}catch(X){this.options.returnFault&&n.onerror(X)}b=K.description(this.definitions),s=R}let q,H;for(let K of c.keys())if(`${K}:type`in E){H=E[`${K}:type`];break}if(H){let K=(0,_r.splitQName)(H),X;K.prefix===_r.TNS_PREFIX?X=h[K.prefix]||h.xmlns:X=h[K.prefix];let pe=this.findSchemaObject(X,K.name);pe&&(q=pe.description(this.definitions))}b&&b[S+"[]"]&&(S=S+"[]"),u.push({name:R,object:F,schema:q||b&&b[S],id:w.id,nil:_})},n.onclosetag=x=>{let v=u.pop(),w=v.object,S=u[u.length-1],A=S.object,T=S.schema,b=(0,_r.splitQName)(x).name;if(typeof v.schema=="string"&&(v.schema==="string"||v.schema.split(":")[1]==="string")&&typeof w=="object"&&Object.keys(w).length===0&&(w=v.object=this.options.preserveWhitespace&&v.text||""),v.nil===!0)if(this.options.handleNilAsNull)w=null;else return;nU.isPlainObject(w)&&!Object.keys(w).length&&(w=null),T&&T[b+"[]"]?(A[b]||(A[b]=[]),A[b].push(w)):b in A?(Array.isArray(A[b])||(A[b]=[A[b]]),A[b].push(w)):A[b]=w,v.id&&(m[v.id].obj=w)},n.oncdata=x=>{let v=x;if(x=YI(x),!!x.length)if(/<\?xml[\s\S]+\?>/.test(x)){let w=u[u.length-1],S=this.xmlToObject(x);w.object[this.options.attributesKey]?w.object[this.options.valueKey]=S:w.object=S}else n.ontext(v)},n.onerror=x=>{throw n.resume(),{Fault:{faultcode:500,faultstring:"Invalid XML",detail:new Error(x).message,statusCode:500}}},n.ontext=x=>{let v=u[u.length-1],w=x;if(x=YI(x),!x.length){this.options.preserveWhitespace&&(v.text=(v.text||"")+w);return}let S=(0,_r.splitQName)(v.schema).name,A;this.options&&this.options.customDeserializer&&this.options.customDeserializer[S]?A=this.options.customDeserializer[S](x,v):S==="int"||S==="integer"||S==="short"||S==="long"?A=parseInt(x,10):S==="double"||S==="float"||S==="decimal"?A=Number(x):S==="bool"||S==="boolean"?A=x.toLowerCase()==="true"||x==="1":S==="dateTime"||S==="date"?A=new Date(x):(this.options.preserveWhitespace&&(x=w),typeof v.object!="string"?A=x:A=v.object+x),v.object[this.options.attributesKey]?v.object[this.options.valueKey]=A:v.object=A},typeof t=="function"){let x=eb.createStream(!0,null);x.on("opentag",n.onopentag),x.on("closetag",n.onclosetag),x.on("cdata",n.oncdata),x.on("text",n.ontext),e.pipe(x).on("error",v=>{t(v)}).on("end",()=>{let v;try{v=g()}catch(w){return t(w)}t(null,v)});return}return n.write(e).close(),g();function g(){for(let x in m){let v=m[x];for(let w of v.hrefs)Object.assign(w.obj,v.obj)}if(i.Envelope){let x=i.Envelope.Body;if(x&&x.Fault){let v=x.Fault,w=v.faultcode&&v.faultcode.$value,S=v.faultstring&&v.faultstring.$value,A=v.detail&&v.detail.$value;w=w||v.faultcode,S=S||v.faultstring,A=A||v.detail,w=w||v.Code&&`${v.Code.Value}: ${v.Code.Subcode&&v.Code.Subcode.Value}`,S=S||v.Reason&&v.Reason.Text.$value,S=S||v.Reason&&v.Reason.Text,A=A||v.Detail;let T=new Error(w+": "+S+(A?": "+JSON.stringify(A):""));throw T.root=i,T}return i.Envelope}return i}o(g,"finish")}findSchemaObject(e,t){if(!e||!t)return null;let n=null;if(this.definitions.schemas){let s=this.definitions.schemas[e];s&&(t.indexOf(":")!==-1&&(t=t.substring(t.indexOf(":")+1,t.length)),n=s.complexTypes[t]||s.types[t]||s.elements[t])}return n}objectToDocumentXML(e,t,n,s,i){if(t&&t._xml)return t._xml;let a={};a[e]=t;let u=i?this.findSchemaObject(s,i):null;return this.objectToXML(a,null,n,s,!0,null,u)}objectToRpcXML(e,t,n,s,i){let a=[],u=this.definitions,c="_xmlns";n=n||(0,_r.findPrefix)(u.xmlns,s),s=s||u.xmlns[n],n=n===_r.TNS_PREFIX?"":n+":",a.push(["<",n,e,">"].join(""));for(let f in t)if(Object.prototype.hasOwnProperty.call(t,f)&&f!==c){let h=t[f];if(f===this.options.xmlKey)a.push(this.objectToXML({[f]:h},null,n,s));else{let m=(i?"":n)+f,g=[];if(typeof h=="object"&&Object.prototype.hasOwnProperty.call(h,this.options.attributesKey)){let x=h[this.options.attributesKey];for(let v in x)g.push(" "+v+'="'+x[v]+'"')}a.push(["<",m].concat(g).concat(">").join("")),a.push(typeof h=="object"?this.objectToXML(h,f,n,s):(0,_r.xmlEscape)(h)),a.push(["</",m,">"].join(""))}}return a.push(["</",n,e,">"].join("")),a.join("")}isIgnoredNameSpace(e){return this.options.ignoredNamespaces.indexOf(e)>-1}filterOutIgnoredNameSpace(e){let t=JI(e);return this.isIgnoredNameSpace(t)?"":t}objectToXML(e,t,n,s,i,a,u,c){let f=this.definitions.schemas[s];if(this.options.overrideElementKey&&Object.keys(this.options.overrideElementKey).length>0)for(let b in this.options.overrideElementKey){let E=this.options.overrideElementKey[b];e&&e[b]&&(Object.defineProperty(e,E,Object.getOwnPropertyDescriptor(e,b)),delete e[b])}let h=n?n.parent:void 0;typeof h<"u"&&(n=n.current),h=JI(h),this.isIgnoredNameSpace(h)&&(h="");let m=!f,g=f&&f.$elementFormDefault==="qualified",x=[],v=(n||g)&&n!==_r.TNS_PREFIX,w="";s&&i&&(this.options.overrideRootElement&&this.options.overrideRootElement.xmlnsAttributes?this.options.overrideRootElement.xmlnsAttributes.forEach(b=>{w+=" "+b.name+'="'+b.value+'"'}):(v&&!this.isIgnoredNameSpace(n)&&(w+=" xmlns:"+n+'="'+s+'"'),(g||m)&&(w+=' xmlns="'+s+'"'))),c?c.pushContext():(c=new Yoe.NamespaceContext,c.declareNamespace(n,s)),a&&!(this.options.overrideRootElement&&this.options.overrideRootElement.xmlnsAttributes)&&(w=a);let S="";this.options.overrideRootElement&&i?S=this.options.overrideRootElement.namespace:v&&(g||i||m)&&!this.isIgnoredNameSpace(n)&&(S=n);let A,T;if(Array.isArray(e)){let b="",E=!1,C=/^([^:]+):([^:]+)$/.exec(t);for(C?(b=C[1],t=C[2]):t[0]===":"&&(E=!0,t=t.substr(1)),A=0,T=e.length;A<T;A++){let _=e[A],F=this.processAttributes(_,c),R=b||h||S,q=this.objectToXML(_,t,n,s,!1,null,u,c),H=["<",t,F,w];E||(H=["<",tb(R),t,F,w]),q===""&&this.options.useEmptyTag?(H.push(" />"),x.push(H.join(""))):(H.push(">"),(this.options.namespaceArrayElements||A===0)&&x.push(H.join("")),x.push(q),(this.options.namespaceArrayElements||A===T-1)&&(E?x.push(["</",t,">"].join("")):x.push(["</",tb(R),t,">"].join(""))))}}else if(typeof e=="object"){let b="";for(t in e){if(e.hasOwnProperty||(e=Object.assign({},e)),!Object.prototype.hasOwnProperty.call(e,t)||t===this.options.attributesKey)continue;if(t===this.options.xmlKey)return c.popContext(),e[t];if(t===this.options.valueKey)return c.popContext(),(0,_r.xmlEscape)(e[t]);let E=e[t];if(typeof E>"u")continue;let C=this.processAttributes(E,c),_="",F="",R=!1,q=/^([^:]+):([^:]+)$/.exec(t);if(q?(F=q[1]+":",t=q[2]):t[0]===":"&&(R=!0,t=t.substr(1)),i)_=this.objectToXML(E,t,n,s,!1,null,u,c);else if(this.definitions.schemas)if(f){let K=this.findChildSchemaObject(u,t);if(K&&(K.$type&&K.$type.indexOf("xsd:")===-1||K.$ref||K.$name)){let X="",pe="",le,ue="",ee=K.$ref||K.$name;if(ee){ee=(0,_r.splitQName)(ee),pe=ee.name,ee.prefix===_r.TNS_PREFIX?(le=K.$targetNamespace,X=c.registerNamespace(le),this.isIgnoredNameSpace(X)&&(X=n)):(X=ee.prefix,this.isIgnoredNameSpace(X)&&(X=n),le=f.xmlns[X]||this.definitions.xmlns[X]);let we=!1;K.$name&&K.targetNamespace===void 0&&(K.$form==="unqualified"?we=!0:K.$form==="qualified"?we=!1:we=f.$elementFormDefault!=="qualified"),we&&(X=""),le&&X&&c.declareNamespace(X,le)&&(ue=" xmlns:"+X+'="'+le+'"',w.includes(X)||(b=ue,w+=ue))}let he;if(K.$type){let we=(0,_r.splitQName)(K.$type),Ke=K.$baseNameSpace||we.prefix,Ae=f.xmlns[Ke]||this.definitions.xmlns[Ke];le=Ae,Ae!=="http://www.w3.org/2001/XMLSchema"&&Ke!==_r.TNS_PREFIX&&c.addNamespace(Ke,Ae),he=this.findSchemaType(we.name,Ae)||K}else he=this.findSchemaObject(le,pe)||K;K.$baseNameSpace&&this.options.ignoreBaseNameSpaces&&(X=n,le=s),this.options.ignoreBaseNameSpaces&&(X="",le=""),S=X,Array.isArray(E)?(X={current:X,parent:S},ue=ue&&ue.length?ue:b):ue=null,_=this.objectToXML(E,t,X,le,!1,ue,he,c)}else e[this.options.attributesKey]&&e[this.options.attributesKey].xsi_type?(F=e[this.options.attributesKey].xsi_type.prefix,c.addNamespace(e[this.options.attributesKey].xsi_type.prefix,e[this.options.attributesKey].xsi_type.xmlns),_=this.objectToXML(E,t,e[this.options.attributesKey].xsi_type.prefix,e[this.options.attributesKey].xsi_type.xmlns,!1,null,null,c)):(Array.isArray(E)&&(R?t=":"+t:t=F+t),_=this.objectToXML(E,t,n,s,!1,null,null,c))}else _=this.objectToXML(E,t,n,s,!1,null,null,c);S=JI(S),v&&!g&&i&&!this.options.overrideRootElement?S=n:this.isIgnoredNameSpace(S)&&(S="");let H=!_&&this.options.useEmptyTag;Array.isArray(E)||x.push(["<",R?"":tb(F||S),t,C,w,E===null?' xsi:nil="true"':"",H?" />":">"].join("")),H||(x.push(_),Array.isArray(E)||x.push(["</",R?"":tb(F||S),t,">"].join("")))}}else e!==void 0&&x.push(this.options.escapeXML?(0,_r.xmlEscape)(e):e);return c.popContext(),x.join("")}processAttributes(e,t){let n="";e==null&&(e=[]);let s=e[this.options.attributesKey]||{};if(s&&s.xsi_type){let i=s.xsi_type,a=i.prefix||i.namespace;i.xmlns&&(a?t.declareNamespace(a,i.xmlns):a=t.registerNamespace(i.xmlns),i.prefix=a)}return Object.keys(s).forEach(i=>{let a=s[i];if(i==="xsi_type"){let u=a.type;a.prefix&&(u=`${a.prefix}:${u}`),n+=` xsi:type="${u}"`,a.xmlns&&(n+=` xmlns:${a.prefix}="${a.xmlns}"`)}else n+=` ${i}="${(0,_r.xmlEscape)(a)}"`}),n}findSchemaType(e,t){if(!this.definitions.schemas||!e||!t)return null;let n=this.definitions.schemas[t];return!n||!n.complexTypes?null:n.complexTypes[e]}findChildSchemaObject(e,t,n){if(!e||!t||(n||(n=[]),n.indexOf(e)>=0))return null;n=n.concat([e]);let s=null,i=0,a;if(Array.isArray(e.$lookupTypes)&&e.$lookupTypes.length){let f=e.$lookupTypes;for(i=0;i<f.length;i++){let h=f[i];if(h.$name===t){s=h;break}}}let u=e;if(u.$name===t&&u.name==="element"||u.$ref&&(a=(0,_r.splitQName)(u.$ref),a.name===t))return u;let c;if(u.$type&&n.length===1){let f=(0,_r.splitQName)(u.$type);f.prefix===_r.TNS_PREFIX?c=e.$targetNamespace:c=this.definitions.xmlns[f.prefix];let h=this.findSchemaType(f.name,c);if(h)return this.findChildSchemaObject(h,t,n)}if(u.$base&&(!Array.isArray(u.children)||!u.children.length)){let f=(0,_r.splitQName)(u.$base);c=e.$targetNamespace,f.prefix!==_r.TNS_PREFIX&&(c=this.definitions.xmlns[f.prefix]);let h=this.findSchemaType(f.name,c);if(h)return this.findChildSchemaObject(h,t,n)}if(Array.isArray(u.children)&&u.children.length>0)for(let f of u.children){if(s=this.findChildSchemaObject(f,t,n),s)break;if(f.$base){let h=(0,_r.splitQName)(f.$base),m=h.prefix===_r.TNS_PREFIX?"":h.prefix;c=f.xmlns[h.prefix]||f.schemaXmlns[h.prefix];let g=this.findSchemaType(h.name,c);if(g&&(s=this.findChildSchemaObject(g,t,n),s)){s.$baseNameSpace=m;break}}}return!s&&u.$name===t?u:s}_initializeOptions(e){this._originalIgnoredNamespaces=(e||{}).ignoredNamespaces,this.options={};let t=e?e.ignoredNamespaces:null;t&&(Array.isArray(t.namespaces)||typeof t.namespaces=="string")?t.override?this.options.ignoredNamespaces=t.namespaces:this.options.ignoredNamespaces=this.ignoredNamespaces.concat(t.namespaces):this.options.ignoredNamespaces=this.ignoredNamespaces,this.options.valueKey=e.valueKey||this.valueKey,this.options.xmlKey=e.xmlKey||this.xmlKey,e.escapeXML!==void 0?this.options.escapeXML=e.escapeXML:this.options.escapeXML=!0,e.returnFault!==void 0?this.options.returnFault=e.returnFault:this.options.returnFault=!1,this.options.handleNilAsNull=!!e.handleNilAsNull,e.namespaceArrayElements!==void 0?this.options.namespaceArrayElements=e.namespaceArrayElements:this.options.namespaceArrayElements=!0,this.options.wsdl_headers=e.wsdl_headers,this.options.wsdl_options=e.wsdl_options,e.httpClient&&(this.options.httpClient=e.httpClient),e.request&&(this.options.request=e.request);let n=e?e.ignoreBaseNameSpaces:null;n!==null&&typeof n<"u"?this.options.ignoreBaseNameSpaces=n:this.options.ignoreBaseNameSpaces=this.ignoreBaseNameSpaces,this.options.forceSoap12Headers=e.forceSoap12Headers,this.options.customDeserializer=e.customDeserializer,this.options.forceUseSchemaXmlns=e.forceUseSchemaXmlns,e.overrideElementKey!==void 0&&(this.options.overrideElementKey=e.overrideElementKey),e.overrideRootElement!==void 0&&(this.options.overrideRootElement=e.overrideRootElement),this.options.useEmptyTag=!!e.useEmptyTag}_processNextInclude(e,t){let n=e.shift();if(!n)return t();let s;!/^https?:/i.test(this.uri)&&!/^https?:/i.test(n.location)?(this.options.wsdl_options!==void 0&&Object.prototype.hasOwnProperty.call(this.options.wsdl_options,"fixedPath")?this.options.wsdl_options.fixedPath:!1)?s=Hg.resolve(Hg.dirname(this.uri),Hg.parse(n.location).base):s=Hg.resolve(Hg.dirname(this.uri),n.location):s=zoe.resolve(this.uri||"",n.location);let i=Object.assign({},this.options);if(i.ignoredNamespaces=this._originalIgnoredNamespaces||this.options.ignoredNamespaces,i.WSDL_CACHE=this.WSDL_CACHE,this.options.wsdl_options!==void 0&&typeof this.options.wsdl_options.overrideImportLocation=="function")try{s=this.options.wsdl_options.overrideImportLocation(s,this.uri,n.location,i)}catch(a){return t(a)}Zoe(s,i,(a,u)=>{if(a)return t(a);if(this._includesWsdl.push(u),u.definitions instanceof Wl.DefinitionsElement)nU.mergeWith(this.definitions,u.definitions,(c,f)=>c instanceof Wl.SchemaElement?c.merge(f):void 0);else return t(new Error("wsdl.defintions is not an instance of elements.DefinitionsElement"));this._processNextInclude(e,c=>{t(c)})})}_parse(e){let t=eb.parser(!0,null),n=[],s=null,i=null,a=null,u=null,c=this.options;return t.onopentag=f=>{let h=f.name,m=f.attributes,g=n[n.length-1],x=(0,_r.splitQName)(h).name;if(x==="schema"&&(u=m),g)try{g.startElement(n,h,m,c,u)}catch(v){if(this.options.strict)throw v;n.push(new Wl.Element(h,m,c,u))}else if(x==="definitions")s=new Wl.DefinitionsElement(h,m,c),n.push(s);else if(x==="schema")s=new Wl.DefinitionsElement("definitions",{},{}),i=new Wl.TypesElement("types",{},{}),a=new Wl.SchemaElement(h,m,c),i.addChild(a),s.addChild(i),n.push(a);else throw x==="html"?new Error("Root element of WSDL was <html>. This is likely an authentication issue."):new Error("Unexpected root element of WSDL or include")},t.onclosetag=f=>{let h=n[n.length-1];(0,$oe.ok)(h,"Unmatched close tag: "+f),h.endElement(n,f)},t.write(e).close(),s}_fromXML(e){this.definitions=this._parse(e),this.definitions.descriptions={types:{},elements:{}},this.xml=e}_fromServices(e){}_xmlnsMap(){let e=this.definitions.xmlns,t="";for(let n in e){if(n===""||n===_r.TNS_PREFIX)continue;let s=e[n];switch(s){case"http://xml.apache.org/xml-soap":case"http://schemas.xmlsoap.org/wsdl/":case"http://schemas.xmlsoap.org/wsdl/soap/":case"http://schemas.xmlsoap.org/wsdl/soap12/":case"http://schemas.xmlsoap.org/soap/encoding/":case"http://www.w3.org/2001/XMLSchema":continue}~s.indexOf("http://schemas.xmlsoap.org/")||~s.indexOf("http://www.w3.org/")||~s.indexOf("http://xml.apache.org/")||(t+=" xmlns:"+n+'="'+s+'"')}return t}};js.WSDL=rb;function Zoe(r,e,t){let n,s;typeof e=="function"?(n={},s=e):(n=e,s=t);let i=n.WSDL_CACHE[r];return i?s.call(i,null,i):oU(r,n,s)}o(Zoe,"open_wsdl_recursive");function oU(r,e,t){let n,s;typeof e=="function"?(n={},s=e):typeof t=="function"&&(n=e,s=t);let i=n.WSDL_CACHE||{},a=n.wsdl_headers,u=n.wsdl_options,c;return/^<\?xml[^>]*?>/i.test(r)?(c=new rb(r,r,n),i[r]=c,c.WSDL_CACHE=i,c.onReady(s)):/^https?:/i.test(r)?(sU("Reading url: %s",r),(n.httpClient||new Joe.HttpClient(n)).request(r,null,(h,m,g)=>{h?s(h):m&&m.status===200?(c=new rb(g,r,n),i[r]=c,c.WSDL_CACHE=i,c.onReady(s)):s(new Error("Invalid WSDL URL: "+r+`
83
+
84
+ \r Code: `+m.status+`
85
+
86
+ \r Response Body: `+m.data))},a,u)):(sU("Reading file: %s",r),Xoe.readFile(r,"utf8",(f,h)=>{f?s(f):(c=new rb(h,r,n),i[r]=c,c.WSDL_CACHE=i,c.onReady(s))})),c}o(oU,"open_wsdl")});var cU=Z(uU=>{"use strict";Object.defineProperty(uU,"__esModule",{value:!0})});var pU=Z(Ot=>{"use strict";var lU=Ot&&Ot.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),eue=Ot&&Ot.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),tue=Ot&&Ot.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&lU(t,e,n[s]);return eue(t,e),t}})(),rue=Ot&&Ot.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&lU(e,r,t)};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.WSDL=Ot.passwordDigest=Ot.Server=Ot.WSSecurityCertWithToken=Ot.WSSecurityPlusCert=Ot.WSSecurityCert=Ot.WSSecurity=Ot.NTLMSecurity=Ot.ClientSSLSecurityPFX=Ot.ClientSSLSecurity=Ot.BearerSecurity=Ot.BasicAuthSecurity=Ot.HttpClient=Ot.Client=Ot.security=void 0;Ot.createClient=hU;Ot.createClientAsync=due;Ot.listen=mue;var nue=ZT(),sue=tue(OI()),iue=kI(),aue=Zu(),fU=QI();Ot.security=sue;var oue=ZT();Object.defineProperty(Ot,"Client",{enumerable:!0,get:o(function(){return oue.Client},"get")});var uue=SS();Object.defineProperty(Ot,"HttpClient",{enumerable:!0,get:o(function(){return uue.HttpClient},"get")});var ko=OI();Object.defineProperty(Ot,"BasicAuthSecurity",{enumerable:!0,get:o(function(){return ko.BasicAuthSecurity},"get")});Object.defineProperty(Ot,"BearerSecurity",{enumerable:!0,get:o(function(){return ko.BearerSecurity},"get")});Object.defineProperty(Ot,"ClientSSLSecurity",{enumerable:!0,get:o(function(){return ko.ClientSSLSecurity},"get")});Object.defineProperty(Ot,"ClientSSLSecurityPFX",{enumerable:!0,get:o(function(){return ko.ClientSSLSecurityPFX},"get")});Object.defineProperty(Ot,"NTLMSecurity",{enumerable:!0,get:o(function(){return ko.NTLMSecurity},"get")});Object.defineProperty(Ot,"WSSecurity",{enumerable:!0,get:o(function(){return ko.WSSecurity},"get")});Object.defineProperty(Ot,"WSSecurityCert",{enumerable:!0,get:o(function(){return ko.WSSecurityCert},"get")});Object.defineProperty(Ot,"WSSecurityPlusCert",{enumerable:!0,get:o(function(){return ko.WSSecurityPlusCert},"get")});Object.defineProperty(Ot,"WSSecurityCertWithToken",{enumerable:!0,get:o(function(){return ko.WSSecurityCertWithToken},"get")});var cue=kI();Object.defineProperty(Ot,"Server",{enumerable:!0,get:o(function(){return cue.Server},"get")});var lue=Zu();Object.defineProperty(Ot,"passwordDigest",{enumerable:!0,get:o(function(){return lue.passwordDigest},"get")});rue(cU(),Ot);var fue=QI();Object.defineProperty(Ot,"WSDL",{enumerable:!0,get:o(function(){return fue.WSDL},"get")});function hue(r,e,t,n){e.has(r)?process.nextTick(()=>{n(null,e.get(r))}):t((s,i)=>{if(s)return n(s);e.set(r,i),n(null,i)})}o(hue,"getFromCache");function pue(r,e,t){typeof e=="function"&&(t=e,e={});let n=o(s=>{(0,fU.open_wsdl)(r,e,s)},"openWsdl");if(e.disableCache===!0)n(t);else{let s;e.wsdlCache?s=e.wsdlCache:s=aue.wsdlCacheSingleton,hue(r,s,n,t)}}o(pue,"_requestWSDL");function hU(r,e,t,n){let s=n,i,a;typeof e=="function"?(i=e,s=t,a={}):typeof t=="function"&&(a=e,i=t,s=n),s=a.endpoint||s,pue(r,a,(u,c)=>{i(u,c&&new nue.Client(c,s,a))})}o(hU,"createClient");function due(r,e,t){return typeof e>"u"&&(e={}),new Promise((n,s)=>{hU(r,e,(i,a)=>{i&&s(i),n(a)},t)})}o(due,"createClientAsync");function mue(r,e,t,n,s){let i,a,u="";typeof e=="object"&&!(e instanceof RegExp)?(i=e,a=i.path,t=i.services,n=i.xml,u=i.uri):(a=e,i={path:e,services:t,callback:s});let c=new fU.WSDL(n||t,u,i);return new iue.Server(r,a,t,c,i)}o(mue,"listen")});var nb=Z(t_=>{"use strict";(function(){t_.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
87
+ `},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(t_)});var Ya=Z((CU,uc)=>{"use strict";(function(){var r,e,t,n,s,i,a,u=[].slice,c={}.hasOwnProperty;r=o(function(){var f,h,m,g,x,v;if(v=arguments[0],x=2<=arguments.length?u.call(arguments,1):[],s(Object.assign))Object.assign.apply(null,arguments);else for(f=0,m=x.length;f<m;f++)if(g=x[f],g!=null)for(h in g)c.call(g,h)&&(v[h]=g[h]);return v},"assign"),s=o(function(f){return!!f&&Object.prototype.toString.call(f)==="[object Function]"},"isFunction"),i=o(function(f){var h;return!!f&&((h=typeof f)=="function"||h==="object")},"isObject"),t=o(function(f){return s(Array.isArray)?Array.isArray(f):Object.prototype.toString.call(f)==="[object Array]"},"isArray"),n=o(function(f){var h;if(t(f))return!f.length;for(h in f)if(c.call(f,h))return!1;return!0},"isEmpty"),a=o(function(f){var h,m;return i(f)&&(m=Object.getPrototypeOf(f))&&(h=m.constructor)&&typeof h=="function"&&h instanceof h&&Function.prototype.toString.call(h)===Function.prototype.toString.call(Object)},"isPlainObject"),e=o(function(f){return s(f.valueOf)?f.valueOf():f},"getValue"),uc.exports.assign=r,uc.exports.isFunction=s,uc.exports.isObject=i,uc.exports.isArray=t,uc.exports.isEmpty=n,uc.exports.isPlainObject=a,uc.exports.getValue=e}).call(CU)});var r_=Z((NU,TU)=>{"use strict";(function(){var r;TU.exports=r=(function(){function e(){}return o(e,"XMLDOMImplementation"),e.prototype.hasFeature=function(t,n){return!0},e.prototype.createDocumentType=function(t,n,s){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(t,n,s){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(t){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(t,n){throw new Error("This DOM method is not implemented.")},e})()}).call(NU)});var BU=Z((IU,_U)=>{"use strict";(function(){var r;_U.exports=r=(function(){function e(){}return o(e,"XMLDOMErrorHandler"),e.prototype.handleError=function(t){throw new Error(t)},e})()}).call(IU)});var PU=Z((DU,RU)=>{"use strict";(function(){var r;RU.exports=r=(function(){function e(t){this.arr=t||[]}return o(e,"XMLDOMStringList"),Object.defineProperty(e.prototype,"length",{get:o(function(){return this.arr.length},"get")}),e.prototype.item=function(t){return this.arr[t]||null},e.prototype.contains=function(t){return this.arr.indexOf(t)!==-1},e})()}).call(DU)});var LU=Z((OU,kU)=>{"use strict";(function(){var r,e,t;e=BU(),t=PU(),kU.exports=r=(function(){function n(){var s;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=s=Object.create(this.defaultParams)}return o(n,"XMLDOMConfiguration"),Object.defineProperty(n.prototype,"parameterNames",{get:o(function(){return new t(Object.keys(this.defaultParams))},"get")}),n.prototype.getParameter=function(s){return this.params.hasOwnProperty(s)?this.params[s]:null},n.prototype.canSetParameter=function(s,i){return!0},n.prototype.setParameter=function(s,i){return i!=null?this.params[s]=i:delete this.params[s]},n})()}).call(OU)});var cn=Z((VU,UU)=>{"use strict";(function(){UU.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(VU)});var n_=Z((jU,MU)=>{"use strict";(function(){var r,e,t;r=cn(),t=ai(),MU.exports=e=(function(){function n(s,i,a){if(this.parent=s,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),i==null)throw new Error("Missing attribute name. "+this.debugInfo(i));this.name=this.stringify.name(i),this.value=this.stringify.attValue(a),this.type=r.Attribute,this.isId=!1,this.schemaTypeInfo=null}return o(n,"XMLAttribute"),Object.defineProperty(n.prototype,"nodeType",{get:o(function(){return this.type},"get")}),Object.defineProperty(n.prototype,"ownerElement",{get:o(function(){return this.parent},"get")}),Object.defineProperty(n.prototype,"textContent",{get:o(function(){return this.value},"get"),set:o(function(s){return this.value=s||""},"set")}),Object.defineProperty(n.prototype,"namespaceURI",{get:o(function(){return""},"get")}),Object.defineProperty(n.prototype,"prefix",{get:o(function(){return""},"get")}),Object.defineProperty(n.prototype,"localName",{get:o(function(){return this.name},"get")}),Object.defineProperty(n.prototype,"specified",{get:o(function(){return!0},"get")}),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(s){return this.options.writer.attribute(this,this.options.writer.filterOptions(s))},n.prototype.debugInfo=function(s){return s=s||this.name,s==null?"parent: <"+this.parent.name+">":"attribute: {"+s+"}, parent: <"+this.parent.name+">"},n.prototype.isEqualNode=function(s){return!(s.namespaceURI!==this.namespaceURI||s.prefix!==this.prefix||s.localName!==this.localName||s.value!==this.value)},n})()}).call(jU)});var sb=Z((FU,qU)=>{"use strict";(function(){var r;qU.exports=r=(function(){function e(t){this.nodes=t}return o(e,"XMLNamedNodeMap"),Object.defineProperty(e.prototype,"length",{get:o(function(){return Object.keys(this.nodes).length||0},"get")}),e.prototype.clone=function(){return this.nodes=null},e.prototype.getNamedItem=function(t){return this.nodes[t]},e.prototype.setNamedItem=function(t){var n;return n=this.nodes[t.nodeName],this.nodes[t.nodeName]=t,n||null},e.prototype.removeNamedItem=function(t){var n;return n=this.nodes[t],delete this.nodes[t],n||null},e.prototype.item=function(t){return this.nodes[Object.keys(this.nodes)[t]]||null},e.prototype.getNamedItemNS=function(t,n){throw new Error("This DOM method is not implemented.")},e.prototype.setNamedItemNS=function(t){throw new Error("This DOM method is not implemented.")},e.prototype.removeNamedItemNS=function(t,n){throw new Error("This DOM method is not implemented.")},e})()}).call(FU)});var ib=Z((HU,KU)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,f=o(function(m,g){for(var x in g)h.call(g,x)&&(m[x]=g[x]);function v(){this.constructor=m}return o(v,"ctor"),v.prototype=g.prototype,m.prototype=new v,m.__super__=g.prototype,m},"extend"),h={}.hasOwnProperty;c=Ya(),u=c.isObject,a=c.isFunction,i=c.getValue,s=ai(),r=cn(),e=n_(),n=sb(),KU.exports=t=(function(m){f(g,m);function g(x,v,w){var S,A,T,b;if(g.__super__.constructor.call(this,x),v==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(v),this.type=r.Element,this.attribs={},this.schemaTypeInfo=null,w!=null&&this.attribute(w),x.type===r.Document&&(this.isRoot=!0,this.documentObject=x,x.rootObject=this,x.children)){for(b=x.children,A=0,T=b.length;A<T;A++)if(S=b[A],S.type===r.DocType){S.name=this.name;break}}}return o(g,"XMLElement"),Object.defineProperty(g.prototype,"tagName",{get:o(function(){return this.name},"get")}),Object.defineProperty(g.prototype,"namespaceURI",{get:o(function(){return""},"get")}),Object.defineProperty(g.prototype,"prefix",{get:o(function(){return""},"get")}),Object.defineProperty(g.prototype,"localName",{get:o(function(){return this.name},"get")}),Object.defineProperty(g.prototype,"id",{get:o(function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},"get")}),Object.defineProperty(g.prototype,"className",{get:o(function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},"get")}),Object.defineProperty(g.prototype,"classList",{get:o(function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},"get")}),Object.defineProperty(g.prototype,"attributes",{get:o(function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new n(this.attribs)),this.attributeMap},"get")}),g.prototype.clone=function(){var x,v,w,S;w=Object.create(this),w.isRoot&&(w.documentObject=null),w.attribs={},S=this.attribs;for(v in S)h.call(S,v)&&(x=S[v],w.attribs[v]=x.clone());return w.children=[],this.children.forEach(function(A){var T;return T=A.clone(),T.parent=w,w.children.push(T)}),w},g.prototype.attribute=function(x,v){var w,S;if(x!=null&&(x=i(x)),u(x))for(w in x)h.call(x,w)&&(S=x[w],this.attribute(w,S));else a(v)&&(v=v.apply()),this.options.keepNullAttributes&&v==null?this.attribs[x]=new e(this,x,""):v!=null&&(this.attribs[x]=new e(this,x,v));return this},g.prototype.removeAttribute=function(x){var v,w,S;if(x==null)throw new Error("Missing attribute name. "+this.debugInfo());if(x=i(x),Array.isArray(x))for(w=0,S=x.length;w<S;w++)v=x[w],delete this.attribs[v];else delete this.attribs[x];return this},g.prototype.toString=function(x){return this.options.writer.element(this,this.options.writer.filterOptions(x))},g.prototype.att=function(x,v){return this.attribute(x,v)},g.prototype.a=function(x,v){return this.attribute(x,v)},g.prototype.getAttribute=function(x){return this.attribs.hasOwnProperty(x)?this.attribs[x].value:null},g.prototype.setAttribute=function(x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNode=function(x){return this.attribs.hasOwnProperty(x)?this.attribs[x]:null},g.prototype.setAttributeNode=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.removeAttributeNode=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagName=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNS=function(x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setAttributeNS=function(x,v,w){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.removeAttributeNS=function(x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNodeNS=function(x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setAttributeNodeNS=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagNameNS=function(x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.hasAttribute=function(x){return this.attribs.hasOwnProperty(x)},g.prototype.hasAttributeNS=function(x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setIdAttribute=function(x,v){return this.attribs.hasOwnProperty(x)?this.attribs[x].isId:v},g.prototype.setIdAttributeNS=function(x,v,w){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setIdAttributeNode=function(x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagName=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagNameNS=function(x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByClassName=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.isEqualNode=function(x){var v,w,S;if(!g.__super__.isEqualNode.apply(this,arguments).isEqualNode(x)||x.namespaceURI!==this.namespaceURI||x.prefix!==this.prefix||x.localName!==this.localName||x.attribs.length!==this.attribs.length)return!1;for(v=w=0,S=this.attribs.length-1;0<=S?w<=S:w>=S;v=0<=S?++w:--w)if(!this.attribs[v].isEqualNode(x.attribs[v]))return!1;return!0},g})(s)}).call(HU)});var Kg=Z(($U,GU)=>{"use strict";(function(){var r,e,t=o(function(s,i){for(var a in i)n.call(i,a)&&(s[a]=i[a]);function u(){this.constructor=s}return o(u,"ctor"),u.prototype=i.prototype,s.prototype=new u,s.__super__=i.prototype,s},"extend"),n={}.hasOwnProperty;e=ai(),GU.exports=r=(function(s){t(i,s);function i(a){i.__super__.constructor.call(this,a),this.value=""}return o(i,"XMLCharacterData"),Object.defineProperty(i.prototype,"data",{get:o(function(){return this.value},"get"),set:o(function(a){return this.value=a||""},"set")}),Object.defineProperty(i.prototype,"length",{get:o(function(){return this.value.length},"get")}),Object.defineProperty(i.prototype,"textContent",{get:o(function(){return this.value},"get"),set:o(function(a){return this.value=a||""},"set")}),i.prototype.clone=function(){return Object.create(this)},i.prototype.substringData=function(a,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.appendData=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.insertData=function(a,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.deleteData=function(a,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.replaceData=function(a,u,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.isEqualNode=function(a){return!(!i.__super__.isEqualNode.apply(this,arguments).isEqualNode(a)||a.data!==this.data)},i})(e)}).call($U)});var ab=Z((XU,WU)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;r=cn(),t=Kg(),WU.exports=e=(function(i){n(a,i);function a(u,c){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=r.CData,this.value=this.stringify.cdata(c)}return o(a,"XMLCData"),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(u){return this.options.writer.cdata(this,this.options.writer.filterOptions(u))},a})(t)}).call(XU)});var ob=Z((zU,JU)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;r=cn(),e=Kg(),JU.exports=t=(function(i){n(a,i);function a(u,c){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=r.Comment,this.value=this.stringify.comment(c)}return o(a,"XMLComment"),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(u){return this.options.writer.comment(this,this.options.writer.filterOptions(u))},a})(e)}).call(zU)});var ub=Z((YU,QU)=>{"use strict";(function(){var r,e,t,n,s=o(function(a,u){for(var c in u)i.call(u,c)&&(a[c]=u[c]);function f(){this.constructor=a}return o(f,"ctor"),f.prototype=u.prototype,a.prototype=new f,a.__super__=u.prototype,a},"extend"),i={}.hasOwnProperty;n=Ya().isObject,t=ai(),r=cn(),QU.exports=e=(function(a){s(u,a);function u(c,f,h,m){var g;u.__super__.constructor.call(this,c),n(f)&&(g=f,f=g.version,h=g.encoding,m=g.standalone),f||(f="1.0"),this.type=r.Declaration,this.version=this.stringify.xmlVersion(f),h!=null&&(this.encoding=this.stringify.xmlEncoding(h)),m!=null&&(this.standalone=this.stringify.xmlStandalone(m))}return o(u,"XMLDeclaration"),u.prototype.toString=function(c){return this.options.writer.declaration(this,this.options.writer.filterOptions(c))},u})(t)}).call(YU)});var cb=Z((ZU,ej)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;t=ai(),r=cn(),ej.exports=e=(function(i){n(a,i);function a(u,c,f,h,m,g){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(f==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(c));if(!h)throw new Error("Missing DTD attribute type. "+this.debugInfo(c));if(!m)throw new Error("Missing DTD attribute default. "+this.debugInfo(c));if(m.indexOf("#")!==0&&(m="#"+m),!m.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(c));if(g&&!m.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(c));this.elementName=this.stringify.name(c),this.type=r.AttributeDeclaration,this.attributeName=this.stringify.name(f),this.attributeType=this.stringify.dtdAttType(h),g&&(this.defaultValue=this.stringify.dtdAttDefault(g)),this.defaultValueType=m}return o(a,"XMLDTDAttList"),a.prototype.toString=function(u){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(u))},a})(t)}).call(ZU)});var lb=Z((tj,rj)=>{"use strict";(function(){var r,e,t,n,s=o(function(a,u){for(var c in u)i.call(u,c)&&(a[c]=u[c]);function f(){this.constructor=a}return o(f,"ctor"),f.prototype=u.prototype,a.prototype=new f,a.__super__=u.prototype,a},"extend"),i={}.hasOwnProperty;n=Ya().isObject,t=ai(),r=cn(),rj.exports=e=(function(a){s(u,a);function u(c,f,h,m){if(u.__super__.constructor.call(this,c),h==null)throw new Error("Missing DTD entity name. "+this.debugInfo(h));if(m==null)throw new Error("Missing DTD entity value. "+this.debugInfo(h));if(this.pe=!!f,this.name=this.stringify.name(h),this.type=r.EntityDeclaration,!n(m))this.value=this.stringify.dtdEntityValue(m),this.internal=!0;else{if(!m.pubID&&!m.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(h));if(m.pubID&&!m.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(h));if(this.internal=!1,m.pubID!=null&&(this.pubID=this.stringify.dtdPubID(m.pubID)),m.sysID!=null&&(this.sysID=this.stringify.dtdSysID(m.sysID)),m.nData!=null&&(this.nData=this.stringify.dtdNData(m.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(h))}}return o(u,"XMLDTDEntity"),Object.defineProperty(u.prototype,"publicId",{get:o(function(){return this.pubID},"get")}),Object.defineProperty(u.prototype,"systemId",{get:o(function(){return this.sysID},"get")}),Object.defineProperty(u.prototype,"notationName",{get:o(function(){return this.nData||null},"get")}),Object.defineProperty(u.prototype,"inputEncoding",{get:o(function(){return null},"get")}),Object.defineProperty(u.prototype,"xmlEncoding",{get:o(function(){return null},"get")}),Object.defineProperty(u.prototype,"xmlVersion",{get:o(function(){return null},"get")}),u.prototype.toString=function(c){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(c))},u})(t)}).call(tj)});var fb=Z((nj,sj)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;t=ai(),r=cn(),sj.exports=e=(function(i){n(a,i);function a(u,c,f){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing DTD element name. "+this.debugInfo());f||(f="(#PCDATA)"),Array.isArray(f)&&(f="("+f.join(",")+")"),this.name=this.stringify.name(c),this.type=r.ElementDeclaration,this.value=this.stringify.dtdElementValue(f)}return o(a,"XMLDTDElement"),a.prototype.toString=function(u){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(u))},a})(t)}).call(nj)});var hb=Z((ij,aj)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;t=ai(),r=cn(),aj.exports=e=(function(i){n(a,i);function a(u,c,f){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing DTD notation name. "+this.debugInfo(c));if(!f.pubID&&!f.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(c));this.name=this.stringify.name(c),this.type=r.NotationDeclaration,f.pubID!=null&&(this.pubID=this.stringify.dtdPubID(f.pubID)),f.sysID!=null&&(this.sysID=this.stringify.dtdSysID(f.sysID))}return o(a,"XMLDTDNotation"),Object.defineProperty(a.prototype,"publicId",{get:o(function(){return this.pubID},"get")}),Object.defineProperty(a.prototype,"systemId",{get:o(function(){return this.sysID},"get")}),a.prototype.toString=function(u){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(u))},a})(t)}).call(ij)});var pb=Z((oj,uj)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,f=o(function(m,g){for(var x in g)h.call(g,x)&&(m[x]=g[x]);function v(){this.constructor=m}return o(v,"ctor"),v.prototype=g.prototype,m.prototype=new v,m.__super__=g.prototype,m},"extend"),h={}.hasOwnProperty;c=Ya().isObject,u=ai(),r=cn(),e=cb(),n=lb(),t=fb(),s=hb(),a=sb(),uj.exports=i=(function(m){f(g,m);function g(x,v,w){var S,A,T,b,E,C;if(g.__super__.constructor.call(this,x),this.type=r.DocType,x.children){for(b=x.children,A=0,T=b.length;A<T;A++)if(S=b[A],S.type===r.Element){this.name=S.name;break}}this.documentObject=x,c(v)&&(E=v,v=E.pubID,w=E.sysID),w==null&&(C=[v,w],w=C[0],v=C[1]),v!=null&&(this.pubID=this.stringify.dtdPubID(v)),w!=null&&(this.sysID=this.stringify.dtdSysID(w))}return o(g,"XMLDocType"),Object.defineProperty(g.prototype,"entities",{get:o(function(){var x,v,w,S,A;for(S={},A=this.children,v=0,w=A.length;v<w;v++)x=A[v],x.type===r.EntityDeclaration&&!x.pe&&(S[x.name]=x);return new a(S)},"get")}),Object.defineProperty(g.prototype,"notations",{get:o(function(){var x,v,w,S,A;for(S={},A=this.children,v=0,w=A.length;v<w;v++)x=A[v],x.type===r.NotationDeclaration&&(S[x.name]=x);return new a(S)},"get")}),Object.defineProperty(g.prototype,"publicId",{get:o(function(){return this.pubID},"get")}),Object.defineProperty(g.prototype,"systemId",{get:o(function(){return this.sysID},"get")}),Object.defineProperty(g.prototype,"internalSubset",{get:o(function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},"get")}),g.prototype.element=function(x,v){var w;return w=new t(this,x,v),this.children.push(w),this},g.prototype.attList=function(x,v,w,S,A){var T;return T=new e(this,x,v,w,S,A),this.children.push(T),this},g.prototype.entity=function(x,v){var w;return w=new n(this,!1,x,v),this.children.push(w),this},g.prototype.pEntity=function(x,v){var w;return w=new n(this,!0,x,v),this.children.push(w),this},g.prototype.notation=function(x,v){var w;return w=new s(this,x,v),this.children.push(w),this},g.prototype.toString=function(x){return this.options.writer.docType(this,this.options.writer.filterOptions(x))},g.prototype.ele=function(x,v){return this.element(x,v)},g.prototype.att=function(x,v,w,S,A){return this.attList(x,v,w,S,A)},g.prototype.ent=function(x,v){return this.entity(x,v)},g.prototype.pent=function(x,v){return this.pEntity(x,v)},g.prototype.not=function(x,v){return this.notation(x,v)},g.prototype.up=function(){return this.root()||this.documentObject},g.prototype.isEqualNode=function(x){return!(!g.__super__.isEqualNode.apply(this,arguments).isEqualNode(x)||x.name!==this.name||x.publicId!==this.publicId||x.systemId!==this.systemId)},g})(u)}).call(oj)});var db=Z((cj,lj)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;r=cn(),e=ai(),lj.exports=t=(function(i){n(a,i);function a(u,c){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=r.Raw,this.value=this.stringify.raw(c)}return o(a,"XMLRaw"),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(u){return this.options.writer.raw(this,this.options.writer.filterOptions(u))},a})(e)}).call(cj)});var mb=Z((fj,hj)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;r=cn(),e=Kg(),hj.exports=t=(function(i){n(a,i);function a(u,c){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=r.Text,this.value=this.stringify.text(c)}return o(a,"XMLText"),Object.defineProperty(a.prototype,"isElementContentWhitespace",{get:o(function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},"get")}),Object.defineProperty(a.prototype,"wholeText",{get:o(function(){var u,c,f;for(f="",c=this.previousSibling;c;)f=c.data+f,c=c.previousSibling;for(f+=this.data,u=this.nextSibling;u;)f=f+u.data,u=u.nextSibling;return f},"get")}),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(u){return this.options.writer.text(this,this.options.writer.filterOptions(u))},a.prototype.splitText=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.replaceWholeText=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},a})(e)}).call(fj)});var gb=Z((pj,dj)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;r=cn(),e=Kg(),dj.exports=t=(function(i){n(a,i);function a(u,c,f){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=r.ProcessingInstruction,this.target=this.stringify.insTarget(c),this.name=this.target,f&&(this.value=this.stringify.insValue(f))}return o(a,"XMLProcessingInstruction"),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(u){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(u))},a.prototype.isEqualNode=function(u){return!(!a.__super__.isEqualNode.apply(this,arguments).isEqualNode(u)||u.target!==this.target)},a})(e)}).call(pj)});var s_=Z((mj,gj)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;t=ai(),r=cn(),gj.exports=e=(function(i){n(a,i);function a(u){a.__super__.constructor.call(this,u),this.type=r.Dummy}return o(a,"XMLDummy"),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(u){return""},a})(t)}).call(mj)});var xj=Z((vj,yj)=>{"use strict";(function(){var r;yj.exports=r=(function(){function e(t){this.nodes=t}return o(e,"XMLNodeList"),Object.defineProperty(e.prototype,"length",{get:o(function(){return this.nodes.length||0},"get")}),e.prototype.clone=function(){return this.nodes=null},e.prototype.item=function(t){return this.nodes[t]||null},e})()}).call(vj)});var bj=Z((wj,Sj)=>{"use strict";(function(){Sj.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(wj)});var ai=Z((Ej,Aj)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,f,h,m,g,x,v,w,S,A,T,b={}.hasOwnProperty;T=Ya(),A=T.isObject,S=T.isFunction,w=T.isEmpty,v=T.getValue,u=null,t=null,n=null,s=null,i=null,g=null,x=null,m=null,a=null,e=null,h=null,c=null,r=null,Aj.exports=f=(function(){function E(C){this.parent=C,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,u||(u=ib(),t=ab(),n=ob(),s=ub(),i=pb(),g=db(),x=mb(),m=gb(),a=s_(),e=cn(),h=xj(),c=sb(),r=bj())}return o(E,"XMLNode"),Object.defineProperty(E.prototype,"nodeName",{get:o(function(){return this.name},"get")}),Object.defineProperty(E.prototype,"nodeType",{get:o(function(){return this.type},"get")}),Object.defineProperty(E.prototype,"nodeValue",{get:o(function(){return this.value},"get")}),Object.defineProperty(E.prototype,"parentNode",{get:o(function(){return this.parent},"get")}),Object.defineProperty(E.prototype,"childNodes",{get:o(function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new h(this.children)),this.childNodeList},"get")}),Object.defineProperty(E.prototype,"firstChild",{get:o(function(){return this.children[0]||null},"get")}),Object.defineProperty(E.prototype,"lastChild",{get:o(function(){return this.children[this.children.length-1]||null},"get")}),Object.defineProperty(E.prototype,"previousSibling",{get:o(function(){var C;return C=this.parent.children.indexOf(this),this.parent.children[C-1]||null},"get")}),Object.defineProperty(E.prototype,"nextSibling",{get:o(function(){var C;return C=this.parent.children.indexOf(this),this.parent.children[C+1]||null},"get")}),Object.defineProperty(E.prototype,"ownerDocument",{get:o(function(){return this.document()||null},"get")}),Object.defineProperty(E.prototype,"textContent",{get:o(function(){var C,_,F,R,q;if(this.nodeType===e.Element||this.nodeType===e.DocumentFragment){for(q="",R=this.children,_=0,F=R.length;_<F;_++)C=R[_],C.textContent&&(q+=C.textContent);return q}else return null},"get"),set:o(function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},"set")}),E.prototype.setParent=function(C){var _,F,R,q,H;for(this.parent=C,C&&(this.options=C.options,this.stringify=C.stringify),q=this.children,H=[],F=0,R=q.length;F<R;F++)_=q[F],H.push(_.setParent(this));return H},E.prototype.element=function(C,_,F){var R,q,H,K,X,pe,le,ue,ee,he,we;if(pe=null,_===null&&F==null&&(ee=[{},null],_=ee[0],F=ee[1]),_==null&&(_={}),_=v(_),A(_)||(he=[_,F],F=he[0],_=he[1]),C!=null&&(C=v(C)),Array.isArray(C))for(H=0,le=C.length;H<le;H++)q=C[H],pe=this.element(q);else if(S(C))pe=this.element(C.apply());else if(A(C)){for(X in C)if(b.call(C,X))if(we=C[X],S(we)&&(we=we.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&X.indexOf(this.stringify.convertAttKey)===0)pe=this.attribute(X.substr(this.stringify.convertAttKey.length),we);else if(!this.options.separateArrayItems&&Array.isArray(we)&&w(we))pe=this.dummy();else if(A(we)&&w(we))pe=this.element(X);else if(!this.options.keepNullNodes&&we==null)pe=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(we))for(K=0,ue=we.length;K<ue;K++)q=we[K],R={},R[X]=q,pe=this.element(R);else A(we)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&X.indexOf(this.stringify.convertTextKey)===0?pe=this.element(we):(pe=this.element(X),pe.element(we)):pe=this.element(X,we)}else!this.options.keepNullNodes&&F===null?pe=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&C.indexOf(this.stringify.convertTextKey)===0?pe=this.text(F):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&C.indexOf(this.stringify.convertCDataKey)===0?pe=this.cdata(F):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&C.indexOf(this.stringify.convertCommentKey)===0?pe=this.comment(F):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&C.indexOf(this.stringify.convertRawKey)===0?pe=this.raw(F):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&C.indexOf(this.stringify.convertPIKey)===0?pe=this.instruction(C.substr(this.stringify.convertPIKey.length),F):pe=this.node(C,_,F);if(pe==null)throw new Error("Could not create any elements with: "+C+". "+this.debugInfo());return pe},E.prototype.insertBefore=function(C,_,F){var R,q,H,K,X;if(C?.type)return H=C,K=_,H.setParent(this),K?(q=children.indexOf(K),X=children.splice(q),children.push(H),Array.prototype.push.apply(children,X)):children.push(H),H;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(C));return q=this.parent.children.indexOf(this),X=this.parent.children.splice(q),R=this.parent.element(C,_,F),Array.prototype.push.apply(this.parent.children,X),R},E.prototype.insertAfter=function(C,_,F){var R,q,H;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(C));return q=this.parent.children.indexOf(this),H=this.parent.children.splice(q+1),R=this.parent.element(C,_,F),Array.prototype.push.apply(this.parent.children,H),R},E.prototype.remove=function(){var C,_;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return C=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[C,C-C+1].concat(_=[])),this.parent},E.prototype.node=function(C,_,F){var R,q;return C!=null&&(C=v(C)),_||(_={}),_=v(_),A(_)||(q=[_,F],F=q[0],_=q[1]),R=new u(this,C,_),F!=null&&R.text(F),this.children.push(R),R},E.prototype.text=function(C){var _;return A(C)&&this.element(C),_=new x(this,C),this.children.push(_),this},E.prototype.cdata=function(C){var _;return _=new t(this,C),this.children.push(_),this},E.prototype.comment=function(C){var _;return _=new n(this,C),this.children.push(_),this},E.prototype.commentBefore=function(C){var _,F,R;return F=this.parent.children.indexOf(this),R=this.parent.children.splice(F),_=this.parent.comment(C),Array.prototype.push.apply(this.parent.children,R),this},E.prototype.commentAfter=function(C){var _,F,R;return F=this.parent.children.indexOf(this),R=this.parent.children.splice(F+1),_=this.parent.comment(C),Array.prototype.push.apply(this.parent.children,R),this},E.prototype.raw=function(C){var _;return _=new g(this,C),this.children.push(_),this},E.prototype.dummy=function(){var C;return C=new a(this),C},E.prototype.instruction=function(C,_){var F,R,q,H,K;if(C!=null&&(C=v(C)),_!=null&&(_=v(_)),Array.isArray(C))for(H=0,K=C.length;H<K;H++)F=C[H],this.instruction(F);else if(A(C))for(F in C)b.call(C,F)&&(R=C[F],this.instruction(F,R));else S(_)&&(_=_.apply()),q=new m(this,C,_),this.children.push(q);return this},E.prototype.instructionBefore=function(C,_){var F,R,q;return R=this.parent.children.indexOf(this),q=this.parent.children.splice(R),F=this.parent.instruction(C,_),Array.prototype.push.apply(this.parent.children,q),this},E.prototype.instructionAfter=function(C,_){var F,R,q;return R=this.parent.children.indexOf(this),q=this.parent.children.splice(R+1),F=this.parent.instruction(C,_),Array.prototype.push.apply(this.parent.children,q),this},E.prototype.declaration=function(C,_,F){var R,q;return R=this.document(),q=new s(R,C,_,F),R.children.length===0?R.children.unshift(q):R.children[0].type===e.Declaration?R.children[0]=q:R.children.unshift(q),R.root()||R},E.prototype.dtd=function(C,_){var F,R,q,H,K,X,pe,le,ue,ee;for(R=this.document(),q=new i(R,C,_),ue=R.children,H=K=0,pe=ue.length;K<pe;H=++K)if(F=ue[H],F.type===e.DocType)return R.children[H]=q,q;for(ee=R.children,H=X=0,le=ee.length;X<le;H=++X)if(F=ee[H],F.isRoot)return R.children.splice(H,0,q),q;return R.children.push(q),q},E.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},E.prototype.root=function(){var C;for(C=this;C;){if(C.type===e.Document)return C.rootObject;if(C.isRoot)return C;C=C.parent}},E.prototype.document=function(){var C;for(C=this;C;){if(C.type===e.Document)return C;C=C.parent}},E.prototype.end=function(C){return this.document().end(C)},E.prototype.prev=function(){var C;if(C=this.parent.children.indexOf(this),C<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[C-1]},E.prototype.next=function(){var C;if(C=this.parent.children.indexOf(this),C===-1||C===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[C+1]},E.prototype.importDocument=function(C){var _;return _=C.root().clone(),_.parent=this,_.isRoot=!1,this.children.push(_),this},E.prototype.debugInfo=function(C){var _,F;return C=C||this.name,C==null&&!((_=this.parent)!=null&&_.name)?"":C==null?"parent: <"+this.parent.name+">":(F=this.parent)!=null&&F.name?"node: <"+C+">, parent: <"+this.parent.name+">":"node: <"+C+">"},E.prototype.ele=function(C,_,F){return this.element(C,_,F)},E.prototype.nod=function(C,_,F){return this.node(C,_,F)},E.prototype.txt=function(C){return this.text(C)},E.prototype.dat=function(C){return this.cdata(C)},E.prototype.com=function(C){return this.comment(C)},E.prototype.ins=function(C,_){return this.instruction(C,_)},E.prototype.doc=function(){return this.document()},E.prototype.dec=function(C,_,F){return this.declaration(C,_,F)},E.prototype.e=function(C,_,F){return this.element(C,_,F)},E.prototype.n=function(C,_,F){return this.node(C,_,F)},E.prototype.t=function(C){return this.text(C)},E.prototype.d=function(C){return this.cdata(C)},E.prototype.c=function(C){return this.comment(C)},E.prototype.r=function(C){return this.raw(C)},E.prototype.i=function(C,_){return this.instruction(C,_)},E.prototype.u=function(){return this.up()},E.prototype.importXMLBuilder=function(C){return this.importDocument(C)},E.prototype.replaceChild=function(C,_){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.removeChild=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.appendChild=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.hasChildNodes=function(){return this.children.length!==0},E.prototype.cloneNode=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isSupported=function(C,_){return!0},E.prototype.hasAttributes=function(){return this.attribs.length!==0},E.prototype.compareDocumentPosition=function(C){var _,F;return _=this,_===C?0:this.document()!==C.document()?(F=r.Disconnected|r.ImplementationSpecific,Math.random()<.5?F|=r.Preceding:F|=r.Following,F):_.isAncestor(C)?r.Contains|r.Preceding:_.isDescendant(C)?r.Contains|r.Following:_.isPreceding(C)?r.Preceding:r.Following},E.prototype.isSameNode=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.lookupPrefix=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isDefaultNamespace=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.lookupNamespaceURI=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isEqualNode=function(C){var _,F,R;if(C.nodeType!==this.nodeType||C.children.length!==this.children.length)return!1;for(_=F=0,R=this.children.length-1;0<=R?F<=R:F>=R;_=0<=R?++F:--F)if(!this.children[_].isEqualNode(C.children[_]))return!1;return!0},E.prototype.getFeature=function(C,_){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setUserData=function(C,_,F){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getUserData=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.contains=function(C){return C?C===this||this.isDescendant(C):!1},E.prototype.isDescendant=function(C){var _,F,R,q,H;for(H=this.children,R=0,q=H.length;R<q;R++)if(_=H[R],C===_||(F=_.isDescendant(C),F))return!0;return!1},E.prototype.isAncestor=function(C){return C.isDescendant(this)},E.prototype.isPreceding=function(C){var _,F;return _=this.treePosition(C),F=this.treePosition(this),_===-1||F===-1?!1:_<F},E.prototype.isFollowing=function(C){var _,F;return _=this.treePosition(C),F=this.treePosition(this),_===-1||F===-1?!1:_>F},E.prototype.treePosition=function(C){var _,F;return F=0,_=!1,this.foreachTreeNode(this.document(),function(R){if(F++,!_&&R===C)return _=!0}),_?F:-1},E.prototype.foreachTreeNode=function(C,_){var F,R,q,H,K;for(C||(C=this.document()),H=C.children,R=0,q=H.length;R<q;R++){if(F=H[R],K=_(F))return K;if(K=this.foreachTreeNode(F,_),K)return K}},E})()}).call(Ej)});var i_=Z((Cj,Nj)=>{"use strict";(function(){var r,e=o(function(n,s){return function(){return n.apply(s,arguments)}},"bind"),t={}.hasOwnProperty;Nj.exports=r=(function(){function n(s){this.assertLegalName=e(this.assertLegalName,this),this.assertLegalChar=e(this.assertLegalChar,this);var i,a,u;s||(s={}),this.options=s,this.options.version||(this.options.version="1.0"),a=s.stringify||{};for(i in a)t.call(a,i)&&(u=a[i],this[i]=u)}return o(n,"XMLStringifier"),n.prototype.name=function(s){return this.options.noValidation?s:this.assertLegalName(""+s||"")},n.prototype.text=function(s){return this.options.noValidation?s:this.assertLegalChar(this.textEscape(""+s||""))},n.prototype.cdata=function(s){return this.options.noValidation?s:(s=""+s||"",s=s.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(s))},n.prototype.comment=function(s){if(this.options.noValidation)return s;if(s=""+s||"",s.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+s);return this.assertLegalChar(s)},n.prototype.raw=function(s){return this.options.noValidation?s:""+s||""},n.prototype.attValue=function(s){return this.options.noValidation?s:this.assertLegalChar(this.attEscape(s=""+s||""))},n.prototype.insTarget=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.insValue=function(s){if(this.options.noValidation)return s;if(s=""+s||"",s.match(/\?>/))throw new Error("Invalid processing instruction value: "+s);return this.assertLegalChar(s)},n.prototype.xmlVersion=function(s){if(this.options.noValidation)return s;if(s=""+s||"",!s.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+s);return s},n.prototype.xmlEncoding=function(s){if(this.options.noValidation)return s;if(s=""+s||"",!s.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+s);return this.assertLegalChar(s)},n.prototype.xmlStandalone=function(s){return this.options.noValidation?s:s?"yes":"no"},n.prototype.dtdPubID=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.dtdSysID=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.dtdElementValue=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.dtdAttType=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.dtdAttDefault=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.dtdEntityValue=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.dtdNData=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.convertAttKey="@",n.prototype.convertPIKey="?",n.prototype.convertTextKey="#text",n.prototype.convertCDataKey="#cdata",n.prototype.convertCommentKey="#comment",n.prototype.convertRawKey="#raw",n.prototype.assertLegalChar=function(s){var i,a;if(this.options.noValidation)return s;if(i="",this.options.version==="1.0"){if(i=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,a=s.match(i))throw new Error("Invalid character in string: "+s+" at index "+a.index)}else if(this.options.version==="1.1"&&(i=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,a=s.match(i)))throw new Error("Invalid character in string: "+s+" at index "+a.index);return s},n.prototype.assertLegalName=function(s){var i;if(this.options.noValidation)return s;if(this.assertLegalChar(s),i=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!s.match(i))throw new Error("Invalid character in name");return s},n.prototype.textEscape=function(s){var i;return this.options.noValidation?s:(i=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,s.replace(i,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},n.prototype.attEscape=function(s){var i;return this.options.noValidation?s:(i=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,s.replace(i,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},n})()}).call(Cj)});var $g=Z((Tj,Ij)=>{"use strict";(function(){Ij.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(Tj)});var a_=Z((_j,Bj)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,f,h,m,g,x,v,w,S,A={}.hasOwnProperty;S=Ya().assign,r=cn(),c=ub(),f=pb(),t=ab(),n=ob(),m=ib(),x=db(),v=mb(),g=gb(),h=s_(),s=cb(),i=fb(),a=lb(),u=hb(),e=$g(),Bj.exports=w=(function(){function T(b){var E,C,_;b||(b={}),this.options=b,C=b.writer||{};for(E in C)A.call(C,E)&&(_=C[E],this["_"+E]=this[E],this[E]=_)}return o(T,"XMLWriterBase"),T.prototype.filterOptions=function(b){var E,C,_,F,R,q,H,K;return b||(b={}),b=S({},this.options,b),E={writer:this},E.pretty=b.pretty||!1,E.allowEmpty=b.allowEmpty||!1,E.indent=(C=b.indent)!=null?C:" ",E.newline=(_=b.newline)!=null?_:`
88
+ `,E.offset=(F=b.offset)!=null?F:0,E.dontPrettyTextNodes=(R=(q=b.dontPrettyTextNodes)!=null?q:b.dontprettytextnodes)!=null?R:0,E.spaceBeforeSlash=(H=(K=b.spaceBeforeSlash)!=null?K:b.spacebeforeslash)!=null?H:"",E.spaceBeforeSlash===!0&&(E.spaceBeforeSlash=" "),E.suppressPrettyCount=0,E.user={},E.state=e.None,E},T.prototype.indent=function(b,E,C){var _;return!E.pretty||E.suppressPrettyCount?"":E.pretty&&(_=(C||0)+E.offset+1,_>0)?new Array(_).join(E.indent):""},T.prototype.endline=function(b,E,C){return!E.pretty||E.suppressPrettyCount?"":E.newline},T.prototype.attribute=function(b,E,C){var _;return this.openAttribute(b,E,C),_=" "+b.name+'="'+b.value+'"',this.closeAttribute(b,E,C),_},T.prototype.cdata=function(b,E,C){var _;return this.openNode(b,E,C),E.state=e.OpenTag,_=this.indent(b,E,C)+"<![CDATA[",E.state=e.InsideTag,_+=b.value,E.state=e.CloseTag,_+="]]>"+this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),_},T.prototype.comment=function(b,E,C){var _;return this.openNode(b,E,C),E.state=e.OpenTag,_=this.indent(b,E,C)+"<!-- ",E.state=e.InsideTag,_+=b.value,E.state=e.CloseTag,_+=" -->"+this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),_},T.prototype.declaration=function(b,E,C){var _;return this.openNode(b,E,C),E.state=e.OpenTag,_=this.indent(b,E,C)+"<?xml",E.state=e.InsideTag,_+=' version="'+b.version+'"',b.encoding!=null&&(_+=' encoding="'+b.encoding+'"'),b.standalone!=null&&(_+=' standalone="'+b.standalone+'"'),E.state=e.CloseTag,_+=E.spaceBeforeSlash+"?>",_+=this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),_},T.prototype.docType=function(b,E,C){var _,F,R,q,H;if(C||(C=0),this.openNode(b,E,C),E.state=e.OpenTag,q=this.indent(b,E,C),q+="<!DOCTYPE "+b.root().name,b.pubID&&b.sysID?q+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.sysID&&(q+=' SYSTEM "'+b.sysID+'"'),b.children.length>0){for(q+=" [",q+=this.endline(b,E,C),E.state=e.InsideTag,H=b.children,F=0,R=H.length;F<R;F++)_=H[F],q+=this.writeChildNode(_,E,C+1);E.state=e.CloseTag,q+="]"}return E.state=e.CloseTag,q+=E.spaceBeforeSlash+">",q+=this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),q},T.prototype.element=function(b,E,C){var _,F,R,q,H,K,X,pe,le,ue,ee,he,we,Ke;C||(C=0),ue=!1,ee="",this.openNode(b,E,C),E.state=e.OpenTag,ee+=this.indent(b,E,C)+"<"+b.name,he=b.attribs;for(le in he)A.call(he,le)&&(_=he[le],ee+=this.attribute(_,E,C));if(R=b.children.length,q=R===0?null:b.children[0],R===0||b.children.every(function(Ae){return(Ae.type===r.Text||Ae.type===r.Raw)&&Ae.value===""}))E.allowEmpty?(ee+=">",E.state=e.CloseTag,ee+="</"+b.name+">"+this.endline(b,E,C)):(E.state=e.CloseTag,ee+=E.spaceBeforeSlash+"/>"+this.endline(b,E,C));else if(E.pretty&&R===1&&(q.type===r.Text||q.type===r.Raw)&&q.value!=null)ee+=">",E.state=e.InsideTag,E.suppressPrettyCount++,ue=!0,ee+=this.writeChildNode(q,E,C+1),E.suppressPrettyCount--,ue=!1,E.state=e.CloseTag,ee+="</"+b.name+">"+this.endline(b,E,C);else{if(E.dontPrettyTextNodes){for(we=b.children,H=0,X=we.length;H<X;H++)if(F=we[H],(F.type===r.Text||F.type===r.Raw)&&F.value!=null){E.suppressPrettyCount++,ue=!0;break}}for(ee+=">"+this.endline(b,E,C),E.state=e.InsideTag,Ke=b.children,K=0,pe=Ke.length;K<pe;K++)F=Ke[K],ee+=this.writeChildNode(F,E,C+1);E.state=e.CloseTag,ee+=this.indent(b,E,C)+"</"+b.name+">",ue&&E.suppressPrettyCount--,ee+=this.endline(b,E,C),E.state=e.None}return this.closeNode(b,E,C),ee},T.prototype.writeChildNode=function(b,E,C){switch(b.type){case r.CData:return this.cdata(b,E,C);case r.Comment:return this.comment(b,E,C);case r.Element:return this.element(b,E,C);case r.Raw:return this.raw(b,E,C);case r.Text:return this.text(b,E,C);case r.ProcessingInstruction:return this.processingInstruction(b,E,C);case r.Dummy:return"";case r.Declaration:return this.declaration(b,E,C);case r.DocType:return this.docType(b,E,C);case r.AttributeDeclaration:return this.dtdAttList(b,E,C);case r.ElementDeclaration:return this.dtdElement(b,E,C);case r.EntityDeclaration:return this.dtdEntity(b,E,C);case r.NotationDeclaration:return this.dtdNotation(b,E,C);default:throw new Error("Unknown XML node type: "+b.constructor.name)}},T.prototype.processingInstruction=function(b,E,C){var _;return this.openNode(b,E,C),E.state=e.OpenTag,_=this.indent(b,E,C)+"<?",E.state=e.InsideTag,_+=b.target,b.value&&(_+=" "+b.value),E.state=e.CloseTag,_+=E.spaceBeforeSlash+"?>",_+=this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),_},T.prototype.raw=function(b,E,C){var _;return this.openNode(b,E,C),E.state=e.OpenTag,_=this.indent(b,E,C),E.state=e.InsideTag,_+=b.value,E.state=e.CloseTag,_+=this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),_},T.prototype.text=function(b,E,C){var _;return this.openNode(b,E,C),E.state=e.OpenTag,_=this.indent(b,E,C),E.state=e.InsideTag,_+=b.value,E.state=e.CloseTag,_+=this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),_},T.prototype.dtdAttList=function(b,E,C){var _;return this.openNode(b,E,C),E.state=e.OpenTag,_=this.indent(b,E,C)+"<!ATTLIST",E.state=e.InsideTag,_+=" "+b.elementName+" "+b.attributeName+" "+b.attributeType,b.defaultValueType!=="#DEFAULT"&&(_+=" "+b.defaultValueType),b.defaultValue&&(_+=' "'+b.defaultValue+'"'),E.state=e.CloseTag,_+=E.spaceBeforeSlash+">"+this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),_},T.prototype.dtdElement=function(b,E,C){var _;return this.openNode(b,E,C),E.state=e.OpenTag,_=this.indent(b,E,C)+"<!ELEMENT",E.state=e.InsideTag,_+=" "+b.name+" "+b.value,E.state=e.CloseTag,_+=E.spaceBeforeSlash+">"+this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),_},T.prototype.dtdEntity=function(b,E,C){var _;return this.openNode(b,E,C),E.state=e.OpenTag,_=this.indent(b,E,C)+"<!ENTITY",E.state=e.InsideTag,b.pe&&(_+=" %"),_+=" "+b.name,b.value?_+=' "'+b.value+'"':(b.pubID&&b.sysID?_+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.sysID&&(_+=' SYSTEM "'+b.sysID+'"'),b.nData&&(_+=" NDATA "+b.nData)),E.state=e.CloseTag,_+=E.spaceBeforeSlash+">"+this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),_},T.prototype.dtdNotation=function(b,E,C){var _;return this.openNode(b,E,C),E.state=e.OpenTag,_=this.indent(b,E,C)+"<!NOTATION",E.state=e.InsideTag,_+=" "+b.name,b.pubID&&b.sysID?_+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.pubID?_+=' PUBLIC "'+b.pubID+'"':b.sysID&&(_+=' SYSTEM "'+b.sysID+'"'),E.state=e.CloseTag,_+=E.spaceBeforeSlash+">"+this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),_},T.prototype.openNode=function(b,E,C){},T.prototype.closeNode=function(b,E,C){},T.prototype.openAttribute=function(b,E,C){},T.prototype.closeAttribute=function(b,E,C){},T})()}).call(_j)});var vb=Z((Dj,Rj)=>{"use strict";(function(){var r,e,t=o(function(s,i){for(var a in i)n.call(i,a)&&(s[a]=i[a]);function u(){this.constructor=s}return o(u,"ctor"),u.prototype=i.prototype,s.prototype=new u,s.__super__=i.prototype,s},"extend"),n={}.hasOwnProperty;e=a_(),Rj.exports=r=(function(s){t(i,s);function i(a){i.__super__.constructor.call(this,a)}return o(i,"XMLStringWriter"),i.prototype.document=function(a,u){var c,f,h,m,g;for(u=this.filterOptions(u),m="",g=a.children,f=0,h=g.length;f<h;f++)c=g[f],m+=this.writeChildNode(c,u,0);return u.pretty&&m.slice(-u.newline.length)===u.newline&&(m=m.slice(0,-u.newline.length)),m},i})(e)}).call(Dj)});var o_=Z((Pj,Oj)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c=o(function(h,m){for(var g in m)f.call(m,g)&&(h[g]=m[g]);function x(){this.constructor=h}return o(x,"ctor"),x.prototype=m.prototype,h.prototype=new x,h.__super__=m.prototype,h},"extend"),f={}.hasOwnProperty;u=Ya().isPlainObject,t=r_(),e=LU(),s=ai(),r=cn(),a=i_(),i=vb(),Oj.exports=n=(function(h){c(m,h);function m(g){m.__super__.constructor.call(this,null),this.name="#document",this.type=r.Document,this.documentURI=null,this.domConfig=new e,g||(g={}),g.writer||(g.writer=new i),this.options=g,this.stringify=new a(g)}return o(m,"XMLDocument"),Object.defineProperty(m.prototype,"implementation",{value:new t}),Object.defineProperty(m.prototype,"doctype",{get:o(function(){var g,x,v,w;for(w=this.children,x=0,v=w.length;x<v;x++)if(g=w[x],g.type===r.DocType)return g;return null},"get")}),Object.defineProperty(m.prototype,"documentElement",{get:o(function(){return this.rootObject||null},"get")}),Object.defineProperty(m.prototype,"inputEncoding",{get:o(function(){return null},"get")}),Object.defineProperty(m.prototype,"strictErrorChecking",{get:o(function(){return!1},"get")}),Object.defineProperty(m.prototype,"xmlEncoding",{get:o(function(){return this.children.length!==0&&this.children[0].type===r.Declaration?this.children[0].encoding:null},"get")}),Object.defineProperty(m.prototype,"xmlStandalone",{get:o(function(){return this.children.length!==0&&this.children[0].type===r.Declaration?this.children[0].standalone==="yes":!1},"get")}),Object.defineProperty(m.prototype,"xmlVersion",{get:o(function(){return this.children.length!==0&&this.children[0].type===r.Declaration?this.children[0].version:"1.0"},"get")}),Object.defineProperty(m.prototype,"URL",{get:o(function(){return this.documentURI},"get")}),Object.defineProperty(m.prototype,"origin",{get:o(function(){return null},"get")}),Object.defineProperty(m.prototype,"compatMode",{get:o(function(){return null},"get")}),Object.defineProperty(m.prototype,"characterSet",{get:o(function(){return null},"get")}),Object.defineProperty(m.prototype,"contentType",{get:o(function(){return null},"get")}),m.prototype.end=function(g){var x;return x={},g?u(g)&&(x=g,g=this.options.writer):g=this.options.writer,g.document(this,g.filterOptions(x))},m.prototype.toString=function(g){return this.options.writer.document(this,this.options.writer.filterOptions(g))},m.prototype.createElement=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createTextNode=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createComment=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createCDATASection=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createProcessingInstruction=function(g,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createAttribute=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createEntityReference=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByTagName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.importNode=function(g,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createElementNS=function(g,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createAttributeNS=function(g,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByTagNameNS=function(g,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementById=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.adoptNode=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.renameNode=function(g,x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByClassName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createEvent=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createNodeIterator=function(g,x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createTreeWalker=function(g,x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},m})(s)}).call(Pj)});var Vj=Z((kj,Lj)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,f,h,m,g,x,v,w,S,A,T,b,E,C,_,F,R={}.hasOwnProperty;F=Ya(),C=F.isObject,E=F.isFunction,_=F.isPlainObject,b=F.getValue,r=cn(),m=o_(),x=ib(),n=ab(),s=ob(),w=db(),T=mb(),v=gb(),f=ub(),h=pb(),i=cb(),u=lb(),a=fb(),c=hb(),t=n_(),A=i_(),S=vb(),e=$g(),Lj.exports=g=(function(){function q(H,K,X){var pe;this.name="?xml",this.type=r.Document,H||(H={}),pe={},H.writer?_(H.writer)&&(pe=H.writer,H.writer=new S):H.writer=new S,this.options=H,this.writer=H.writer,this.writerOptions=this.writer.filterOptions(pe),this.stringify=new A(H),this.onDataCallback=K||function(){},this.onEndCallback=X||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return o(q,"XMLDocumentCB"),q.prototype.createChildNode=function(H){var K,X,pe,le,ue,ee,he,we;switch(H.type){case r.CData:this.cdata(H.value);break;case r.Comment:this.comment(H.value);break;case r.Element:pe={},he=H.attribs;for(X in he)R.call(he,X)&&(K=he[X],pe[X]=K.value);this.node(H.name,pe);break;case r.Dummy:this.dummy();break;case r.Raw:this.raw(H.value);break;case r.Text:this.text(H.value);break;case r.ProcessingInstruction:this.instruction(H.target,H.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+H.constructor.name)}for(we=H.children,ue=0,ee=we.length;ue<ee;ue++)le=we[ue],this.createChildNode(le),le.type===r.Element&&this.up();return this},q.prototype.dummy=function(){return this},q.prototype.node=function(H,K,X){var pe;if(H==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(H));return this.openCurrent(),H=b(H),K==null&&(K={}),K=b(K),C(K)||(pe=[K,X],X=pe[0],K=pe[1]),this.currentNode=new x(this,H,K),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,X!=null&&this.text(X),this},q.prototype.element=function(H,K,X){var pe,le,ue,ee,he,we;if(this.currentNode&&this.currentNode.type===r.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(H)||C(H)||E(H))for(ee=this.options.noValidation,this.options.noValidation=!0,we=new m(this.options).element("TEMP_ROOT"),we.element(H),this.options.noValidation=ee,he=we.children,le=0,ue=he.length;le<ue;le++)pe=he[le],this.createChildNode(pe),pe.type===r.Element&&this.up();else this.node(H,K,X);return this},q.prototype.attribute=function(H,K){var X,pe;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(H));if(H!=null&&(H=b(H)),C(H))for(X in H)R.call(H,X)&&(pe=H[X],this.attribute(X,pe));else E(K)&&(K=K.apply()),this.options.keepNullAttributes&&K==null?this.currentNode.attribs[H]=new t(this,H,""):K!=null&&(this.currentNode.attribs[H]=new t(this,H,K));return this},q.prototype.text=function(H){var K;return this.openCurrent(),K=new T(this,H),this.onData(this.writer.text(K,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},q.prototype.cdata=function(H){var K;return this.openCurrent(),K=new n(this,H),this.onData(this.writer.cdata(K,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},q.prototype.comment=function(H){var K;return this.openCurrent(),K=new s(this,H),this.onData(this.writer.comment(K,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},q.prototype.raw=function(H){var K;return this.openCurrent(),K=new w(this,H),this.onData(this.writer.raw(K,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},q.prototype.instruction=function(H,K){var X,pe,le,ue,ee;if(this.openCurrent(),H!=null&&(H=b(H)),K!=null&&(K=b(K)),Array.isArray(H))for(X=0,ue=H.length;X<ue;X++)pe=H[X],this.instruction(pe);else if(C(H))for(pe in H)R.call(H,pe)&&(le=H[pe],this.instruction(pe,le));else E(K)&&(K=K.apply()),ee=new v(this,H,K),this.onData(this.writer.processingInstruction(ee,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},q.prototype.declaration=function(H,K,X){var pe;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return pe=new f(this,H,K,X),this.onData(this.writer.declaration(pe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},q.prototype.doctype=function(H,K,X){if(this.openCurrent(),H==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new h(this,K,X),this.currentNode.rootNodeName=H,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},q.prototype.dtdElement=function(H,K){var X;return this.openCurrent(),X=new a(this,H,K),this.onData(this.writer.dtdElement(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},q.prototype.attList=function(H,K,X,pe,le){var ue;return this.openCurrent(),ue=new i(this,H,K,X,pe,le),this.onData(this.writer.dtdAttList(ue,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},q.prototype.entity=function(H,K){var X;return this.openCurrent(),X=new u(this,!1,H,K),this.onData(this.writer.dtdEntity(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},q.prototype.pEntity=function(H,K){var X;return this.openCurrent(),X=new u(this,!0,H,K),this.onData(this.writer.dtdEntity(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},q.prototype.notation=function(H,K){var X;return this.openCurrent(),X=new c(this,H,K),this.onData(this.writer.dtdNotation(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},q.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},q.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},q.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},q.prototype.openNode=function(H){var K,X,pe,le;if(!H.isOpen){if(!this.root&&this.currentLevel===0&&H.type===r.Element&&(this.root=H),X="",H.type===r.Element){this.writerOptions.state=e.OpenTag,X=this.writer.indent(H,this.writerOptions,this.currentLevel)+"<"+H.name,le=H.attribs;for(pe in le)R.call(le,pe)&&(K=le[pe],X+=this.writer.attribute(K,this.writerOptions,this.currentLevel));X+=(H.children?">":"/>")+this.writer.endline(H,this.writerOptions,this.currentLevel),this.writerOptions.state=e.InsideTag}else this.writerOptions.state=e.OpenTag,X=this.writer.indent(H,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+H.rootNodeName,H.pubID&&H.sysID?X+=' PUBLIC "'+H.pubID+'" "'+H.sysID+'"':H.sysID&&(X+=' SYSTEM "'+H.sysID+'"'),H.children?(X+=" [",this.writerOptions.state=e.InsideTag):(this.writerOptions.state=e.CloseTag,X+=">"),X+=this.writer.endline(H,this.writerOptions,this.currentLevel);return this.onData(X,this.currentLevel),H.isOpen=!0}},q.prototype.closeNode=function(H){var K;if(!H.isClosed)return K="",this.writerOptions.state=e.CloseTag,H.type===r.Element?K=this.writer.indent(H,this.writerOptions,this.currentLevel)+"</"+H.name+">"+this.writer.endline(H,this.writerOptions,this.currentLevel):K=this.writer.indent(H,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(H,this.writerOptions,this.currentLevel),this.writerOptions.state=e.None,this.onData(K,this.currentLevel),H.isClosed=!0},q.prototype.onData=function(H,K){return this.documentStarted=!0,this.onDataCallback(H,K+1)},q.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},q.prototype.debugInfo=function(H){return H==null?"":"node: <"+H+">"},q.prototype.ele=function(){return this.element.apply(this,arguments)},q.prototype.nod=function(H,K,X){return this.node(H,K,X)},q.prototype.txt=function(H){return this.text(H)},q.prototype.dat=function(H){return this.cdata(H)},q.prototype.com=function(H){return this.comment(H)},q.prototype.ins=function(H,K){return this.instruction(H,K)},q.prototype.dec=function(H,K,X){return this.declaration(H,K,X)},q.prototype.dtd=function(H,K,X){return this.doctype(H,K,X)},q.prototype.e=function(H,K,X){return this.element(H,K,X)},q.prototype.n=function(H,K,X){return this.node(H,K,X)},q.prototype.t=function(H){return this.text(H)},q.prototype.d=function(H){return this.cdata(H)},q.prototype.c=function(H){return this.comment(H)},q.prototype.r=function(H){return this.raw(H)},q.prototype.i=function(H,K){return this.instruction(H,K)},q.prototype.att=function(){return this.currentNode&&this.currentNode.type===r.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},q.prototype.a=function(){return this.currentNode&&this.currentNode.type===r.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},q.prototype.ent=function(H,K){return this.entity(H,K)},q.prototype.pent=function(H,K){return this.pEntity(H,K)},q.prototype.not=function(H,K){return this.notation(H,K)},q})()}).call(kj)});var Mj=Z((Uj,jj)=>{"use strict";(function(){var r,e,t,n,s=o(function(a,u){for(var c in u)i.call(u,c)&&(a[c]=u[c]);function f(){this.constructor=a}return o(f,"ctor"),f.prototype=u.prototype,a.prototype=new f,a.__super__=u.prototype,a},"extend"),i={}.hasOwnProperty;r=cn(),n=a_(),e=$g(),jj.exports=t=(function(a){s(u,a);function u(c,f){this.stream=c,u.__super__.constructor.call(this,f)}return o(u,"XMLStreamWriter"),u.prototype.endline=function(c,f,h){return c.isLastRootNode&&f.state===e.CloseTag?"":u.__super__.endline.call(this,c,f,h)},u.prototype.document=function(c,f){var h,m,g,x,v,w,S,A,T;for(S=c.children,m=g=0,v=S.length;g<v;m=++g)h=S[m],h.isLastRootNode=m===c.children.length-1;for(f=this.filterOptions(f),A=c.children,T=[],x=0,w=A.length;x<w;x++)h=A[x],T.push(this.writeChildNode(h,f,0));return T},u.prototype.attribute=function(c,f,h){return this.stream.write(u.__super__.attribute.call(this,c,f,h))},u.prototype.cdata=function(c,f,h){return this.stream.write(u.__super__.cdata.call(this,c,f,h))},u.prototype.comment=function(c,f,h){return this.stream.write(u.__super__.comment.call(this,c,f,h))},u.prototype.declaration=function(c,f,h){return this.stream.write(u.__super__.declaration.call(this,c,f,h))},u.prototype.docType=function(c,f,h){var m,g,x,v;if(h||(h=0),this.openNode(c,f,h),f.state=e.OpenTag,this.stream.write(this.indent(c,f,h)),this.stream.write("<!DOCTYPE "+c.root().name),c.pubID&&c.sysID?this.stream.write(' PUBLIC "'+c.pubID+'" "'+c.sysID+'"'):c.sysID&&this.stream.write(' SYSTEM "'+c.sysID+'"'),c.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(c,f,h)),f.state=e.InsideTag,v=c.children,g=0,x=v.length;g<x;g++)m=v[g],this.writeChildNode(m,f,h+1);f.state=e.CloseTag,this.stream.write("]")}return f.state=e.CloseTag,this.stream.write(f.spaceBeforeSlash+">"),this.stream.write(this.endline(c,f,h)),f.state=e.None,this.closeNode(c,f,h)},u.prototype.element=function(c,f,h){var m,g,x,v,w,S,A,T,b,E;h||(h=0),this.openNode(c,f,h),f.state=e.OpenTag,this.stream.write(this.indent(c,f,h)+"<"+c.name),b=c.attribs;for(A in b)i.call(b,A)&&(m=b[A],this.attribute(m,f,h));if(x=c.children.length,v=x===0?null:c.children[0],x===0||c.children.every(function(C){return(C.type===r.Text||C.type===r.Raw)&&C.value===""}))f.allowEmpty?(this.stream.write(">"),f.state=e.CloseTag,this.stream.write("</"+c.name+">")):(f.state=e.CloseTag,this.stream.write(f.spaceBeforeSlash+"/>"));else if(f.pretty&&x===1&&(v.type===r.Text||v.type===r.Raw)&&v.value!=null)this.stream.write(">"),f.state=e.InsideTag,f.suppressPrettyCount++,T=!0,this.writeChildNode(v,f,h+1),f.suppressPrettyCount--,T=!1,f.state=e.CloseTag,this.stream.write("</"+c.name+">");else{for(this.stream.write(">"+this.endline(c,f,h)),f.state=e.InsideTag,E=c.children,w=0,S=E.length;w<S;w++)g=E[w],this.writeChildNode(g,f,h+1);f.state=e.CloseTag,this.stream.write(this.indent(c,f,h)+"</"+c.name+">")}return this.stream.write(this.endline(c,f,h)),f.state=e.None,this.closeNode(c,f,h)},u.prototype.processingInstruction=function(c,f,h){return this.stream.write(u.__super__.processingInstruction.call(this,c,f,h))},u.prototype.raw=function(c,f,h){return this.stream.write(u.__super__.raw.call(this,c,f,h))},u.prototype.text=function(c,f,h){return this.stream.write(u.__super__.text.call(this,c,f,h))},u.prototype.dtdAttList=function(c,f,h){return this.stream.write(u.__super__.dtdAttList.call(this,c,f,h))},u.prototype.dtdElement=function(c,f,h){return this.stream.write(u.__super__.dtdElement.call(this,c,f,h))},u.prototype.dtdEntity=function(c,f,h){return this.stream.write(u.__super__.dtdEntity.call(this,c,f,h))},u.prototype.dtdNotation=function(c,f,h){return this.stream.write(u.__super__.dtdNotation.call(this,c,f,h))},u})(n)}).call(Uj)});var qj=Z((Fj,cc)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,f;f=Ya(),u=f.assign,c=f.isFunction,t=r_(),n=o_(),s=Vj(),a=vb(),i=Mj(),r=cn(),e=$g(),cc.exports.create=function(h,m,g,x){var v,w;if(h==null)throw new Error("Root element needs a name.");return x=u({},m,g,x),v=new n(x),w=v.element(h),x.headless||(v.declaration(x),(x.pubID!=null||x.sysID!=null)&&v.dtd(x)),w},cc.exports.begin=function(h,m,g){var x;return c(h)&&(x=[h,m],m=x[0],g=x[1],h={}),m?new s(h,m,g):new n(h)},cc.exports.stringWriter=function(h){return new a(h)},cc.exports.streamWriter=function(h,m){return new i(h,m)},cc.exports.implementation=new t,cc.exports.nodeType=r,cc.exports.writerState=e}).call(Fj)});var Hj=Z(u_=>{"use strict";(function(){"use strict";var r,e,t,n,s,i={}.hasOwnProperty;r=qj(),e=nb().defaults,n=o(function(a){return typeof a=="string"&&(a.indexOf("&")>=0||a.indexOf(">")>=0||a.indexOf("<")>=0)},"requiresCDATA"),s=o(function(a){return"<![CDATA["+t(a)+"]]>"},"wrapCDATA"),t=o(function(a){return a.replace("]]>","]]]]><![CDATA[>")},"escapeCDATA"),u_.Builder=(function(){function a(u){var c,f,h;this.options={},f=e["0.2"];for(c in f)i.call(f,c)&&(h=f[c],this.options[c]=h);for(c in u)i.call(u,c)&&(h=u[c],this.options[c]=h)}return o(a,"Builder"),a.prototype.buildObject=function(u){var c,f,h,m,g;return c=this.options.attrkey,f=this.options.charkey,Object.keys(u).length===1&&this.options.rootName===e["0.2"].rootName?(g=Object.keys(u)[0],u=u[g]):g=this.options.rootName,h=(function(x){return function(v,w){var S,A,T,b,E,C;if(typeof w!="object")x.options.cdata&&n(w)?v.raw(s(w)):v.txt(w);else if(Array.isArray(w)){for(b in w)if(i.call(w,b)){A=w[b];for(E in A)T=A[E],v=h(v.ele(E),T).up()}}else for(E in w)if(i.call(w,E))if(A=w[E],E===c){if(typeof A=="object")for(S in A)C=A[S],v=v.att(S,C)}else if(E===f)x.options.cdata&&n(A)?v=v.raw(s(A)):v=v.txt(A);else if(Array.isArray(A))for(b in A)i.call(A,b)&&(T=A[b],typeof T=="string"?x.options.cdata&&n(T)?v=v.ele(E).raw(s(T)).up():v=v.ele(E,T).up():v=h(v.ele(E),T).up());else typeof A=="object"?v=h(v.ele(E),A).up():typeof A=="string"&&x.options.cdata&&n(A)?v=v.ele(E).raw(s(A)).up():(A==null&&(A=""),v=v.ele(E,A.toString()).up());return v}})(this),m=r.create(g,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),h(m,u).end(this.options.renderOpts)},a})()}).call(u_)});var Kj=Z(c_=>{"use strict";(function(){"use strict";c_.stripBOM=function(r){return r[0]==="\uFEFF"?r.substring(1):r}}).call(c_)});var l_=Z(zl=>{"use strict";(function(){"use strict";var r;r=new RegExp(/(?!xmlns)^.*:/),zl.normalize=function(e){return e.toLowerCase()},zl.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},zl.stripPrefix=function(e){return e.replace(r,"")},zl.parseNumbers=function(e){return isNaN(e)||(e=e%1===0?parseInt(e,10):parseFloat(e)),e},zl.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e=e.toLowerCase()==="true"),e}}).call(zl)});var $j=Z(Lo=>{"use strict";(function(){"use strict";var r,e,t,n,s,i,a,u,c,f=o(function(g,x){return function(){return g.apply(x,arguments)}},"bind"),h=o(function(g,x){for(var v in x)m.call(x,v)&&(g[v]=x[v]);function w(){this.constructor=g}return o(w,"ctor"),w.prototype=x.prototype,g.prototype=new w,g.__super__=x.prototype,g},"extend"),m={}.hasOwnProperty;u=LI(),n=Xe("events"),r=Kj(),a=l_(),c=Xe("timers").setImmediate,e=nb().defaults,s=o(function(g){return typeof g=="object"&&g!=null&&Object.keys(g).length===0},"isEmpty"),i=o(function(g,x,v){var w,S,A;for(w=0,S=g.length;w<S;w++)A=g[w],x=A(x,v);return x},"processItem"),t=o(function(g,x,v){var w;return w=Object.create(null),w.value=v,w.writable=!0,w.enumerable=!0,w.configurable=!0,Object.defineProperty(g,x,w)},"defineProperty"),Lo.Parser=(function(g){h(x,g);function x(v){this.parseStringPromise=f(this.parseStringPromise,this),this.parseString=f(this.parseString,this),this.reset=f(this.reset,this),this.assignOrPush=f(this.assignOrPush,this),this.processAsync=f(this.processAsync,this);var w,S,A;if(!(this instanceof Lo.Parser))return new Lo.Parser(v);this.options={},S=e["0.2"];for(w in S)m.call(S,w)&&(A=S[w],this.options[w]=A);for(w in v)m.call(v,w)&&(A=v[w],this.options[w]=A);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(a.normalize)),this.reset()}return o(x,"Parser"),x.prototype.processAsync=function(){var v,w;try{return this.remaining.length<=this.options.chunkSize?(v=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(v),this.saxParser.close()):(v=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(v),c(this.processAsync))}catch(S){if(w=S,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(w)}},x.prototype.assignOrPush=function(v,w,S){return w in v?(v[w]instanceof Array||t(v,w,[v[w]]),v[w].push(S)):this.options.explicitArray?t(v,w,[S]):t(v,w,S)},x.prototype.reset=function(){var v,w,S,A;return this.removeAllListeners(),this.saxParser=u.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=(function(T){return function(b){if(T.saxParser.resume(),!T.saxParser.errThrown)return T.saxParser.errThrown=!0,T.emit("error",b)}})(this),this.saxParser.onend=(function(T){return function(){if(!T.saxParser.ended)return T.saxParser.ended=!0,T.emit("end",T.resultObject)}})(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,A=[],v=this.options.attrkey,w=this.options.charkey,this.saxParser.onopentag=(function(T){return function(b){var E,C,_,F,R;if(_={},_[w]="",!T.options.ignoreAttrs){R=b.attributes;for(E in R)m.call(R,E)&&(!(v in _)&&!T.options.mergeAttrs&&(_[v]={}),C=T.options.attrValueProcessors?i(T.options.attrValueProcessors,b.attributes[E],E):b.attributes[E],F=T.options.attrNameProcessors?i(T.options.attrNameProcessors,E):E,T.options.mergeAttrs?T.assignOrPush(_,F,C):t(_[v],F,C))}return _["#name"]=T.options.tagNameProcessors?i(T.options.tagNameProcessors,b.name):b.name,T.options.xmlns&&(_[T.options.xmlnskey]={uri:b.uri,local:b.local}),A.push(_)}})(this),this.saxParser.onclosetag=(function(T){return function(){var b,E,C,_,F,R,q,H,K,X;if(R=A.pop(),F=R["#name"],(!T.options.explicitChildren||!T.options.preserveChildrenOrder)&&delete R["#name"],R.cdata===!0&&(b=R.cdata,delete R.cdata),K=A[A.length-1],R[w].match(/^\s*$/)&&!b?(E=R[w],delete R[w]):(T.options.trim&&(R[w]=R[w].trim()),T.options.normalize&&(R[w]=R[w].replace(/\s{2,}/g," ").trim()),R[w]=T.options.valueProcessors?i(T.options.valueProcessors,R[w],F):R[w],Object.keys(R).length===1&&w in R&&!T.EXPLICIT_CHARKEY&&(R=R[w])),s(R)&&(typeof T.options.emptyTag=="function"?R=T.options.emptyTag():R=T.options.emptyTag!==""?T.options.emptyTag:E),T.options.validator!=null&&(X="/"+(function(){var pe,le,ue;for(ue=[],pe=0,le=A.length;pe<le;pe++)_=A[pe],ue.push(_["#name"]);return ue})().concat(F).join("/"),(function(){var pe;try{return R=T.options.validator(X,K&&K[F],R)}catch(le){return pe=le,T.emit("error",pe)}})()),T.options.explicitChildren&&!T.options.mergeAttrs&&typeof R=="object"){if(!T.options.preserveChildrenOrder)_={},T.options.attrkey in R&&(_[T.options.attrkey]=R[T.options.attrkey],delete R[T.options.attrkey]),!T.options.charsAsChildren&&T.options.charkey in R&&(_[T.options.charkey]=R[T.options.charkey],delete R[T.options.charkey]),Object.getOwnPropertyNames(R).length>0&&(_[T.options.childkey]=R),R=_;else if(K){K[T.options.childkey]=K[T.options.childkey]||[],q={};for(C in R)m.call(R,C)&&t(q,C,R[C]);K[T.options.childkey].push(q),delete R["#name"],Object.keys(R).length===1&&w in R&&!T.EXPLICIT_CHARKEY&&(R=R[w])}}return A.length>0?T.assignOrPush(K,F,R):(T.options.explicitRoot&&(H=R,R={},t(R,F,H)),T.resultObject=R,T.saxParser.ended=!0,T.emit("end",T.resultObject))}})(this),S=(function(T){return function(b){var E,C;if(C=A[A.length-1],C)return C[w]+=b,T.options.explicitChildren&&T.options.preserveChildrenOrder&&T.options.charsAsChildren&&(T.options.includeWhiteChars||b.replace(/\\n/g,"").trim()!=="")&&(C[T.options.childkey]=C[T.options.childkey]||[],E={"#name":"__text__"},E[w]=b,T.options.normalize&&(E[w]=E[w].replace(/\s{2,}/g," ").trim()),C[T.options.childkey].push(E)),C}})(this),this.saxParser.ontext=S,this.saxParser.oncdata=(function(T){return function(b){var E;if(E=S(b),E)return E.cdata=!0}})(this)},x.prototype.parseString=function(v,w){var S;w!=null&&typeof w=="function"&&(this.on("end",function(A){return this.reset(),w(null,A)}),this.on("error",function(A){return this.reset(),w(A)}));try{return v=v.toString(),v.trim()===""?(this.emit("end",null),!0):(v=r.stripBOM(v),this.options.async?(this.remaining=v,c(this.processAsync),this.saxParser):this.saxParser.write(v).close())}catch(A){if(S=A,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw S}else return this.emit("error",S),this.saxParser.errThrown=!0}},x.prototype.parseStringPromise=function(v){return new Promise((function(w){return function(S,A){return w.parseString(v,function(T,b){return T?A(T):S(b)})}})(this))},x})(n),Lo.parseString=function(g,x,v){var w,S,A;return v!=null?(typeof v=="function"&&(w=v),typeof x=="object"&&(S=x)):(typeof x=="function"&&(w=x),S={}),A=new Lo.Parser(S),A.parseString(g,w)},Lo.parseStringPromise=function(g,x){var v,w;return typeof x=="object"&&(v=x),w=new Lo.Parser(v),w.parseStringPromise(g)}}).call(Lo)});var Gj=Z(Vo=>{"use strict";(function(){"use strict";var r,e,t,n,s=o(function(a,u){for(var c in u)i.call(u,c)&&(a[c]=u[c]);function f(){this.constructor=a}return o(f,"ctor"),f.prototype=u.prototype,a.prototype=new f,a.__super__=u.prototype,a},"extend"),i={}.hasOwnProperty;e=nb(),r=Hj(),t=$j(),n=l_(),Vo.defaults=e.defaults,Vo.processors=n,Vo.ValidationError=(function(a){s(u,a);function u(c){this.message=c}return o(u,"ValidationError"),u})(Error),Vo.Builder=r.Builder,Vo.Parser=t.Parser,Vo.parseString=t.parseString,Vo.parseStringPromise=t.parseStringPromise}).call(Vo)});var C2="http://www.w3.org/2000/09/xmldsig#",hO="http://www.w3.org/TR/2001/REC-xml-c14n-20010315",N2=(function(r){return r.RSA_SHA1="http://www.w3.org/2000/09/xmldsig#rsa-sha1",r.RSA_SHA256="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",r})({}),Cu=(function(r){return r.SHA1="sha1",r.SHA256="sha256",r})({}),T2=(function(r){return r.SHA1="http://www.w3.org/2000/09/xmldsig#sha1",r.SHA256="http://www.w3.org/2001/04/xmlenc#sha256",r})({});var br={AC:"12",AL:"27",AM:"13",AP:"16",BA:"29",CE:"23",DF:"53",ES:"32",GO:"52",MA:"21",MG:"31",MS:"50",MT:"51",PA:"15",PB:"25",PE:"26",PI:"22",PR:"41",RJ:"33",RN:"24",RO:"11",RR:"14",RS:"43",SC:"42",SE:"28",SP:"35",TO:"17"},The=Object.keys(br);var _he={Production:"1",Homolog:"2"};var pn=class extends Error{static{o(this,"NFeTsError")}};var pO=class extends pn{static{o(this,"ValidationError")}};var I2=o(r=>{throw new pn("Didn't expect to get here")},"unreachable");var K0={includeComments:!1,exclusive:!0};var Zh=class{static{o(this,"Signer")}toolkit;certificateRepository;algorithm;canonical;constructor(e,t,n=Cu.SHA1,s=K0){this.toolkit=e,this.certificateRepository=t,this.algorithm=n,this.canonical=s}assemble(e,t,n){let s=this.certificateRepository.getStringCertificate(n);return{$:{xmlns:C2},SignedInfo:e,SignatureValue:t,KeyInfo:{X509Data:{X509Certificate:s}}}}signedInfo(e,t){return{CanonicalizationMethod:{$:{Algorithm:hO}},SignatureMethod:{$:{Algorithm:this.signatureMethod}},Reference:{$:{URI:`#${this.toolkit.getAttribute(e,t)}`},Transforms:this.transforms,DigestMethod:{$:{Algorithm:this.digestAlgorithm}},DigestValue:this.digest(e)}}}digest(e){return this.toolkit.digest(e,this.algorithm,this.canonical)}async signOrLeft(e,t){let n=this.toolkit.canonicalize(await this.toolkit.build({$:{xmlns:C2},...e},{rootName:"SignedInfo"}),this.canonical);return await this.certificateRepository.sign(n,t,this.algorithm)}get transforms(){return{Transform:[{$:{Algorithm:"http://www.w3.org/2000/09/xmldsig#enveloped-signature"}},{$:{Algorithm:"http://www.w3.org/TR/2001/REC-xml-c14n-20010315"}}]}}get digestAlgorithm(){switch(this.algorithm){case Cu.SHA256:return T2.SHA256;case Cu.SHA1:return T2.SHA1;default:return I2(this.algorithm)}}get signatureMethod(){switch(this.algorithm){case Cu.SHA256:return N2.RSA_SHA256;case Cu.SHA1:return N2.RSA_SHA1;default:return I2(this.algorithm)}}};var _2=class{static{o(this,"Left")}value;constructor(e){this.value=e}isLeft(){return!0}isRight(){return!1}},Qx=class{static{o(this,"Right")}value;constructor(e){this.value=e}isLeft(){return!1}isRight(){return!0}},ti=o(r=>new _2(r),"left"),ri=o(r=>r===void 0?new Qx(void 0):new Qx(r),"right");var dO=class extends Zh{static{o(this,"EntitySigner")}async sign(e,t,n){let{tag:s,mark:i}=t,{privateKey:a,certificate:u}=n;if(!e[s])return ti(new pn(`Node ${String(s)} not found`));let c=await this.toolkit.build(this.ns(e,s),{headless:!0,rootName:String(s),renderOpts:{pretty:!1}}),f=this.signedInfo(c,i),h=await this.signOrLeft(f,a);if(h.isLeft())return h;let m=e;return m.Signature=this.assemble(f,h.value,u),ri(m)}ns(e,t){let n=e.$?.xmlns,{$:s,...i}=e[t],{xmlns:a,...u}=s??{};return{$:{xmlns:n,...u},...i}}};var mO=class extends Zh{static{o(this,"XmlSigner")}async sign(e,t,n){let{tag:s,mark:i}=t,{privateKey:a,certificate:u}=n,c=this.toolkit.getNode(e,s);if(!c)return ti(new pn(`Node ${s} not found`));let f=this.signedInfo(c,i),h=await this.signOrLeft(f,a);if(h.isLeft())return h;let m=await this.toolkit.build(this.assemble(f,h.value,u),{rootName:"Signature"});return ri(this.toolkit.appendNode(e,m))}};import"reflect-metadata";var $0="__SkipValidation__",spe=o(()=>(r,e)=>{Reflect.defineMetadata($0,!0,r,e.toString())},"SkipValidation"),ipe=o(()=>r=>{Reflect.defineMetadata($0,!0,r)},"SkipAllValidations");import{plainToInstance as TW}from"class-transformer";var Zx=o(r=>{for(let[e,t]of Object.entries(r))typeof t>"u"&&delete r[e],t===""&&delete r[e],t&&typeof t=="object"&&Zx(t)},"clearEmptyValues"),gO=o((r,e,t={})=>{let n=TW(e,r);return t.clearEmptyValues&&Zx(n),n},"plainToInstance");import"reflect-metadata";import{validateSync as IW}from"class-validator";var vO="__ValidateErrors__",yO=o((r,e)=>r.reduce((t,n)=>{if(n.children?.length)return t.concat(yO(n.children,e?`${e}.${n.property}`:n.property));let s=Object.values(n.constraints??{}).map(i=>e?`${e}.${i}`:i).join(", ");return s?t.concat(s):t},[]),"mapConstraintsToErrors"),mpe=o(r=>(e,t,n)=>{let s=n.value;n.value=function(...i){let a=Reflect.getMetadata($0,this.constructor);if(Reflect.getMetadata($0,this.constructor.prototype,t.toString())===!0||a===!0)return s?.apply(this,i);let[c,...f]=i,h=gO(c,r),m=IW(h,{whitelist:!0});if(Zx(h),m.length){let g=Reflect.getMetadata(vO,this)??[];Reflect.defineMetadata(vO,g.concat(yO(m,s?.name)),this)}return s?.apply(this,[h,...f])}},"Validates");var ep=9e15,_u=1e9,B2="0123456789abcdef",rw="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",nw="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",D2={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ep,maxE:ep,crypto:!1},bO,Ao,_t=!0,iw="[DecimalError] ",Iu=iw+"Invalid argument: ",EO=iw+"Precision limit exceeded",AO=iw+"crypto unavailable",CO="[object Decimal]",ns=Math.floor,Sn=Math.pow,_W=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,BW=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,DW=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,NO=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Qi=1e7,bt=7,RW=9007199254740991,PW=rw.length-1,R2=nw.length-1,Pe={toStringTag:CO};Pe.absoluteValue=Pe.abs=function(){var r=new this.constructor(this);return r.s<0&&(r.s=1),gt(r)};Pe.ceil=function(){return gt(new this.constructor(this),this.e+1,2)};Pe.clampedTo=Pe.clamp=function(r,e){var t,n=this,s=n.constructor;if(r=new s(r),e=new s(e),!r.s||!e.s)return new s(NaN);if(r.gt(e))throw Error(Iu+e);return t=n.cmp(r),t<0?r:n.cmp(e)>0?e:new s(n)};Pe.comparedTo=Pe.cmp=function(r){var e,t,n,s,i=this,a=i.d,u=(r=new i.constructor(r)).d,c=i.s,f=r.s;if(!a||!u)return!c||!f?NaN:c!==f?c:a===u?0:!a^c<0?1:-1;if(!a[0]||!u[0])return a[0]?c:u[0]?-f:0;if(c!==f)return c;if(i.e!==r.e)return i.e>r.e^c<0?1:-1;for(n=a.length,s=u.length,e=0,t=n<s?n:s;e<t;++e)if(a[e]!==u[e])return a[e]>u[e]^c<0?1:-1;return n===s?0:n>s^c<0?1:-1};Pe.cosine=Pe.cos=function(){var r,e,t=this,n=t.constructor;return t.d?t.d[0]?(r=n.precision,e=n.rounding,n.precision=r+Math.max(t.e,t.sd())+bt,n.rounding=1,t=OW(n,DO(n,t)),n.precision=r,n.rounding=e,gt(Ao==2||Ao==3?t.neg():t,r,e,!0)):new n(1):new n(NaN)};Pe.cubeRoot=Pe.cbrt=function(){var r,e,t,n,s,i,a,u,c,f,h=this,m=h.constructor;if(!h.isFinite()||h.isZero())return new m(h);for(_t=!1,i=h.s*Sn(h.s*h,1/3),!i||Math.abs(i)==1/0?(t=Fn(h.d),r=h.e,(i=(r-t.length+1)%3)&&(t+=i==1||i==-2?"0":"00"),i=Sn(t,1/3),r=ns((r+1)/3)-(r%3==(r<0?-1:2)),i==1/0?t="5e"+r:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+r),n=new m(t),n.s=h.s):n=new m(i.toString()),a=(r=m.precision)+3;;)if(u=n,c=u.times(u).times(u),f=c.plus(h),n=Tr(f.plus(h).times(u),f.plus(c),a+2,1),Fn(u.d).slice(0,a)===(t=Fn(n.d)).slice(0,a))if(t=t.slice(a-3,a+1),t=="9999"||!s&&t=="4999"){if(!s&&(gt(u,r+1,0),u.times(u).times(u).eq(h))){n=u;break}a+=4,s=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(gt(n,r+1,1),e=!n.times(n).times(n).eq(h));break}return _t=!0,gt(n,r,m.rounding,e)};Pe.decimalPlaces=Pe.dp=function(){var r,e=this.d,t=NaN;if(e){if(r=e.length-1,t=(r-ns(this.e/bt))*bt,r=e[r],r)for(;r%10==0;r/=10)t--;t<0&&(t=0)}return t};Pe.dividedBy=Pe.div=function(r){return Tr(this,new this.constructor(r))};Pe.dividedToIntegerBy=Pe.divToInt=function(r){var e=this,t=e.constructor;return gt(Tr(e,new t(r),0,1,1),t.precision,t.rounding)};Pe.equals=Pe.eq=function(r){return this.cmp(r)===0};Pe.floor=function(){return gt(new this.constructor(this),this.e+1,3)};Pe.greaterThan=Pe.gt=function(r){return this.cmp(r)>0};Pe.greaterThanOrEqualTo=Pe.gte=function(r){var e=this.cmp(r);return e==1||e===0};Pe.hyperbolicCosine=Pe.cosh=function(){var r,e,t,n,s,i=this,a=i.constructor,u=new a(1);if(!i.isFinite())return new a(i.s?1/0:NaN);if(i.isZero())return u;t=a.precision,n=a.rounding,a.precision=t+Math.max(i.e,i.sd())+4,a.rounding=1,s=i.d.length,s<32?(r=Math.ceil(s/3),e=(1/ow(4,r)).toString()):(r=16,e="2.3283064365386962890625e-10"),i=tp(a,1,i.times(e),new a(1),!0);for(var c,f=r,h=new a(8);f--;)c=i.times(i),i=u.minus(c.times(h.minus(c.times(h))));return gt(i,a.precision=t,a.rounding=n,!0)};Pe.hyperbolicSine=Pe.sinh=function(){var r,e,t,n,s=this,i=s.constructor;if(!s.isFinite()||s.isZero())return new i(s);if(e=i.precision,t=i.rounding,i.precision=e+Math.max(s.e,s.sd())+4,i.rounding=1,n=s.d.length,n<3)s=tp(i,2,s,s,!0);else{r=1.4*Math.sqrt(n),r=r>16?16:r|0,s=s.times(1/ow(5,r)),s=tp(i,2,s,s,!0);for(var a,u=new i(5),c=new i(16),f=new i(20);r--;)a=s.times(s),s=s.times(u.plus(a.times(c.times(a).plus(f))))}return i.precision=e,i.rounding=t,gt(s,e,t,!0)};Pe.hyperbolicTangent=Pe.tanh=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+7,n.rounding=1,Tr(t.sinh(),t.cosh(),n.precision=r,n.rounding=e)):new n(t.s)};Pe.inverseCosine=Pe.acos=function(){var r=this,e=r.constructor,t=r.abs().cmp(1),n=e.precision,s=e.rounding;return t!==-1?t===0?r.isNeg()?Na(e,n,s):new e(0):new e(NaN):r.isZero()?Na(e,n+4,s).times(.5):(e.precision=n+6,e.rounding=1,r=new e(1).minus(r).div(r.plus(1)).sqrt().atan(),e.precision=n,e.rounding=s,r.times(2))};Pe.inverseHyperbolicCosine=Pe.acosh=function(){var r,e,t=this,n=t.constructor;return t.lte(1)?new n(t.eq(1)?0:NaN):t.isFinite()?(r=n.precision,e=n.rounding,n.precision=r+Math.max(Math.abs(t.e),t.sd())+4,n.rounding=1,_t=!1,t=t.times(t).minus(1).sqrt().plus(t),_t=!0,n.precision=r,n.rounding=e,t.ln()):new n(t)};Pe.inverseHyperbolicSine=Pe.asinh=function(){var r,e,t=this,n=t.constructor;return!t.isFinite()||t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+2*Math.max(Math.abs(t.e),t.sd())+6,n.rounding=1,_t=!1,t=t.times(t).plus(1).sqrt().plus(t),_t=!0,n.precision=r,n.rounding=e,t.ln())};Pe.inverseHyperbolicTangent=Pe.atanh=function(){var r,e,t,n,s=this,i=s.constructor;return s.isFinite()?s.e>=0?new i(s.abs().eq(1)?s.s/0:s.isZero()?s:NaN):(r=i.precision,e=i.rounding,n=s.sd(),Math.max(n,r)<2*-s.e-1?gt(new i(s),r,e,!0):(i.precision=t=n-s.e,s=Tr(s.plus(1),new i(1).minus(s),t+r,1),i.precision=r+4,i.rounding=1,s=s.ln(),i.precision=r,i.rounding=e,s.times(.5))):new i(NaN)};Pe.inverseSine=Pe.asin=function(){var r,e,t,n,s=this,i=s.constructor;return s.isZero()?new i(s):(e=s.abs().cmp(1),t=i.precision,n=i.rounding,e!==-1?e===0?(r=Na(i,t+4,n).times(.5),r.s=s.s,r):new i(NaN):(i.precision=t+6,i.rounding=1,s=s.div(new i(1).minus(s.times(s)).sqrt().plus(1)).atan(),i.precision=t,i.rounding=n,s.times(2)))};Pe.inverseTangent=Pe.atan=function(){var r,e,t,n,s,i,a,u,c,f=this,h=f.constructor,m=h.precision,g=h.rounding;if(f.isFinite()){if(f.isZero())return new h(f);if(f.abs().eq(1)&&m+4<=R2)return a=Na(h,m+4,g).times(.25),a.s=f.s,a}else{if(!f.s)return new h(NaN);if(m+4<=R2)return a=Na(h,m+4,g).times(.5),a.s=f.s,a}for(h.precision=u=m+10,h.rounding=1,t=Math.min(28,u/bt+2|0),r=t;r;--r)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(_t=!1,e=Math.ceil(u/bt),n=1,c=f.times(f),a=new h(f),s=f;r!==-1;)if(s=s.times(c),i=a.minus(s.div(n+=2)),s=s.times(c),a=i.plus(s.div(n+=2)),a.d[e]!==void 0)for(r=e;a.d[r]===i.d[r]&&r--;);return t&&(a=a.times(2<<t-1)),_t=!0,gt(a,h.precision=m,h.rounding=g,!0)};Pe.isFinite=function(){return!!this.d};Pe.isInteger=Pe.isInt=function(){return!!this.d&&ns(this.e/bt)>this.d.length-2};Pe.isNaN=function(){return!this.s};Pe.isNegative=Pe.isNeg=function(){return this.s<0};Pe.isPositive=Pe.isPos=function(){return this.s>0};Pe.isZero=function(){return!!this.d&&this.d[0]===0};Pe.lessThan=Pe.lt=function(r){return this.cmp(r)<0};Pe.lessThanOrEqualTo=Pe.lte=function(r){return this.cmp(r)<1};Pe.logarithm=Pe.log=function(r){var e,t,n,s,i,a,u,c,f=this,h=f.constructor,m=h.precision,g=h.rounding,x=5;if(r==null)r=new h(10),e=!0;else{if(r=new h(r),t=r.d,r.s<0||!t||!t[0]||r.eq(1))return new h(NaN);e=r.eq(10)}if(t=f.d,f.s<0||!t||!t[0]||f.eq(1))return new h(t&&!t[0]?-1/0:f.s!=1?NaN:t?0:1/0);if(e)if(t.length>1)i=!0;else{for(s=t[0];s%10===0;)s/=10;i=s!==1}if(_t=!1,u=m+x,a=Tu(f,u),n=e?sw(h,u+10):Tu(r,u),c=Tr(a,n,u,1),G0(c.d,s=m,g))do if(u+=10,a=Tu(f,u),n=e?sw(h,u+10):Tu(r,u),c=Tr(a,n,u,1),!i){+Fn(c.d).slice(s+1,s+15)+1==1e14&&(c=gt(c,m+1,0));break}while(G0(c.d,s+=10,g));return _t=!0,gt(c,m,g)};Pe.minus=Pe.sub=function(r){var e,t,n,s,i,a,u,c,f,h,m,g,x=this,v=x.constructor;if(r=new v(r),!x.d||!r.d)return!x.s||!r.s?r=new v(NaN):x.d?r.s=-r.s:r=new v(r.d||x.s!==r.s?x:NaN),r;if(x.s!=r.s)return r.s=-r.s,x.plus(r);if(f=x.d,g=r.d,u=v.precision,c=v.rounding,!f[0]||!g[0]){if(g[0])r.s=-r.s;else if(f[0])r=new v(x);else return new v(c===3?-0:0);return _t?gt(r,u,c):r}if(t=ns(r.e/bt),h=ns(x.e/bt),f=f.slice(),i=h-t,i){for(m=i<0,m?(e=f,i=-i,a=g.length):(e=g,t=h,a=f.length),n=Math.max(Math.ceil(u/bt),a)+2,i>n&&(i=n,e.length=1),e.reverse(),n=i;n--;)e.push(0);e.reverse()}else{for(n=f.length,a=g.length,m=n<a,m&&(a=n),n=0;n<a;n++)if(f[n]!=g[n]){m=f[n]<g[n];break}i=0}for(m&&(e=f,f=g,g=e,r.s=-r.s),a=f.length,n=g.length-a;n>0;--n)f[a++]=0;for(n=g.length;n>i;){if(f[--n]<g[n]){for(s=n;s&&f[--s]===0;)f[s]=Qi-1;--f[s],f[n]+=Qi}f[n]-=g[n]}for(;f[--a]===0;)f.pop();for(;f[0]===0;f.shift())--t;return f[0]?(r.d=f,r.e=aw(f,t),_t?gt(r,u,c):r):new v(c===3?-0:0)};Pe.modulo=Pe.mod=function(r){var e,t=this,n=t.constructor;return r=new n(r),!t.d||!r.s||r.d&&!r.d[0]?new n(NaN):!r.d||t.d&&!t.d[0]?gt(new n(t),n.precision,n.rounding):(_t=!1,n.modulo==9?(e=Tr(t,r.abs(),0,3,1),e.s*=r.s):e=Tr(t,r,0,n.modulo,1),e=e.times(r),_t=!0,t.minus(e))};Pe.naturalExponential=Pe.exp=function(){return P2(this)};Pe.naturalLogarithm=Pe.ln=function(){return Tu(this)};Pe.negated=Pe.neg=function(){var r=new this.constructor(this);return r.s=-r.s,gt(r)};Pe.plus=Pe.add=function(r){var e,t,n,s,i,a,u,c,f,h,m=this,g=m.constructor;if(r=new g(r),!m.d||!r.d)return!m.s||!r.s?r=new g(NaN):m.d||(r=new g(r.d||m.s===r.s?m:NaN)),r;if(m.s!=r.s)return r.s=-r.s,m.minus(r);if(f=m.d,h=r.d,u=g.precision,c=g.rounding,!f[0]||!h[0])return h[0]||(r=new g(m)),_t?gt(r,u,c):r;if(i=ns(m.e/bt),n=ns(r.e/bt),f=f.slice(),s=i-n,s){for(s<0?(t=f,s=-s,a=h.length):(t=h,n=i,a=f.length),i=Math.ceil(u/bt),a=i>a?i+1:a+1,s>a&&(s=a,t.length=1),t.reverse();s--;)t.push(0);t.reverse()}for(a=f.length,s=h.length,a-s<0&&(s=a,t=h,h=f,f=t),e=0;s;)e=(f[--s]=f[s]+h[s]+e)/Qi|0,f[s]%=Qi;for(e&&(f.unshift(e),++n),a=f.length;f[--a]==0;)f.pop();return r.d=f,r.e=aw(f,n),_t?gt(r,u,c):r};Pe.precision=Pe.sd=function(r){var e,t=this;if(r!==void 0&&r!==!!r&&r!==1&&r!==0)throw Error(Iu+r);return t.d?(e=TO(t.d),r&&t.e+1>e&&(e=t.e+1)):e=NaN,e};Pe.round=function(){var r=this,e=r.constructor;return gt(new e(r),r.e+1,e.rounding)};Pe.sine=Pe.sin=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+Math.max(t.e,t.sd())+bt,n.rounding=1,t=LW(n,DO(n,t)),n.precision=r,n.rounding=e,gt(Ao>2?t.neg():t,r,e,!0)):new n(NaN)};Pe.squareRoot=Pe.sqrt=function(){var r,e,t,n,s,i,a=this,u=a.d,c=a.e,f=a.s,h=a.constructor;if(f!==1||!u||!u[0])return new h(!f||f<0&&(!u||u[0])?NaN:u?a:1/0);for(_t=!1,f=Math.sqrt(+a),f==0||f==1/0?(e=Fn(u),(e.length+c)%2==0&&(e+="0"),f=Math.sqrt(e),c=ns((c+1)/2)-(c<0||c%2),f==1/0?e="5e"+c:(e=f.toExponential(),e=e.slice(0,e.indexOf("e")+1)+c),n=new h(e)):n=new h(f.toString()),t=(c=h.precision)+3;;)if(i=n,n=i.plus(Tr(a,i,t+2,1)).times(.5),Fn(i.d).slice(0,t)===(e=Fn(n.d)).slice(0,t))if(e=e.slice(t-3,t+1),e=="9999"||!s&&e=="4999"){if(!s&&(gt(i,c+1,0),i.times(i).eq(a))){n=i;break}t+=4,s=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(gt(n,c+1,1),r=!n.times(n).eq(a));break}return _t=!0,gt(n,c,h.rounding,r)};Pe.tangent=Pe.tan=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+10,n.rounding=1,t=t.sin(),t.s=1,t=Tr(t,new n(1).minus(t.times(t)).sqrt(),r+10,0),n.precision=r,n.rounding=e,gt(Ao==2||Ao==4?t.neg():t,r,e,!0)):new n(NaN)};Pe.times=Pe.mul=function(r){var e,t,n,s,i,a,u,c,f,h=this,m=h.constructor,g=h.d,x=(r=new m(r)).d;if(r.s*=h.s,!g||!g[0]||!x||!x[0])return new m(!r.s||g&&!g[0]&&!x||x&&!x[0]&&!g?NaN:!g||!x?r.s/0:r.s*0);for(t=ns(h.e/bt)+ns(r.e/bt),c=g.length,f=x.length,c<f&&(i=g,g=x,x=i,a=c,c=f,f=a),i=[],a=c+f,n=a;n--;)i.push(0);for(n=f;--n>=0;){for(e=0,s=c+n;s>n;)u=i[s]+x[n]*g[s-n-1]+e,i[s--]=u%Qi|0,e=u/Qi|0;i[s]=(i[s]+e)%Qi|0}for(;!i[--a];)i.pop();return e?++t:i.shift(),r.d=i,r.e=aw(i,t),_t?gt(r,m.precision,m.rounding):r};Pe.toBinary=function(r,e){return O2(this,2,r,e)};Pe.toDecimalPlaces=Pe.toDP=function(r,e){var t=this,n=t.constructor;return t=new n(t),r===void 0?t:(Is(r,0,_u),e===void 0?e=n.rounding:Is(e,0,8),gt(t,r+t.e+1,e))};Pe.toExponential=function(r,e){var t,n=this,s=n.constructor;return r===void 0?t=Ta(n,!0):(Is(r,0,_u),e===void 0?e=s.rounding:Is(e,0,8),n=gt(new s(n),r+1,e),t=Ta(n,!0,r+1)),n.isNeg()&&!n.isZero()?"-"+t:t};Pe.toFixed=function(r,e){var t,n,s=this,i=s.constructor;return r===void 0?t=Ta(s):(Is(r,0,_u),e===void 0?e=i.rounding:Is(e,0,8),n=gt(new i(s),r+s.e+1,e),t=Ta(n,!1,r+n.e+1)),s.isNeg()&&!s.isZero()?"-"+t:t};Pe.toFraction=function(r){var e,t,n,s,i,a,u,c,f,h,m,g,x=this,v=x.d,w=x.constructor;if(!v)return new w(x);if(f=t=new w(1),n=c=new w(0),e=new w(n),i=e.e=TO(v)-x.e-1,a=i%bt,e.d[0]=Sn(10,a<0?bt+a:a),r==null)r=i>0?e:f;else{if(u=new w(r),!u.isInt()||u.lt(f))throw Error(Iu+u);r=u.gt(e)?i>0?e:f:u}for(_t=!1,u=new w(Fn(v)),h=w.precision,w.precision=i=v.length*bt*2;m=Tr(u,e,0,1,1),s=t.plus(m.times(n)),s.cmp(r)!=1;)t=n,n=s,s=f,f=c.plus(m.times(s)),c=s,s=e,e=u.minus(m.times(s)),u=s;return s=Tr(r.minus(t),n,0,1,1),c=c.plus(s.times(f)),t=t.plus(s.times(n)),c.s=f.s=x.s,g=Tr(f,n,i,1).minus(x).abs().cmp(Tr(c,t,i,1).minus(x).abs())<1?[f,n]:[c,t],w.precision=h,_t=!0,g};Pe.toHexadecimal=Pe.toHex=function(r,e){return O2(this,16,r,e)};Pe.toNearest=function(r,e){var t=this,n=t.constructor;if(t=new n(t),r==null){if(!t.d)return t;r=new n(1),e=n.rounding}else{if(r=new n(r),e===void 0?e=n.rounding:Is(e,0,8),!t.d)return r.s?t:r;if(!r.d)return r.s&&(r.s=t.s),r}return r.d[0]?(_t=!1,t=Tr(t,r,0,e,1).times(r),_t=!0,gt(t)):(r.s=t.s,t=r),t};Pe.toNumber=function(){return+this};Pe.toOctal=function(r,e){return O2(this,8,r,e)};Pe.toPower=Pe.pow=function(r){var e,t,n,s,i,a,u=this,c=u.constructor,f=+(r=new c(r));if(!u.d||!r.d||!u.d[0]||!r.d[0])return new c(Sn(+u,f));if(u=new c(u),u.eq(1))return u;if(n=c.precision,i=c.rounding,r.eq(1))return gt(u,n,i);if(e=ns(r.e/bt),e>=r.d.length-1&&(t=f<0?-f:f)<=RW)return s=IO(c,u,t,n),r.s<0?new c(1).div(s):gt(s,n,i);if(a=u.s,a<0){if(e<r.d.length-1)return new c(NaN);if((r.d[e]&1)==0&&(a=1),u.e==0&&u.d[0]==1&&u.d.length==1)return u.s=a,u}return t=Sn(+u,f),e=t==0||!isFinite(t)?ns(f*(Math.log("0."+Fn(u.d))/Math.LN10+u.e+1)):new c(t+"").e,e>c.maxE+1||e<c.minE-1?new c(e>0?a/0:0):(_t=!1,c.rounding=u.s=1,t=Math.min(12,(e+"").length),s=P2(r.times(Tu(u,n+t)),n),s.d&&(s=gt(s,n+5,1),G0(s.d,n,i)&&(e=n+10,s=gt(P2(r.times(Tu(u,e+t)),e),e+5,1),+Fn(s.d).slice(n+1,n+15)+1==1e14&&(s=gt(s,n+1,0)))),s.s=a,_t=!0,c.rounding=i,gt(s,n,i))};Pe.toPrecision=function(r,e){var t,n=this,s=n.constructor;return r===void 0?t=Ta(n,n.e<=s.toExpNeg||n.e>=s.toExpPos):(Is(r,1,_u),e===void 0?e=s.rounding:Is(e,0,8),n=gt(new s(n),r,e),t=Ta(n,r<=n.e||n.e<=s.toExpNeg,r)),n.isNeg()&&!n.isZero()?"-"+t:t};Pe.toSignificantDigits=Pe.toSD=function(r,e){var t=this,n=t.constructor;return r===void 0?(r=n.precision,e=n.rounding):(Is(r,1,_u),e===void 0?e=n.rounding:Is(e,0,8)),gt(new n(t),r,e)};Pe.toString=function(){var r=this,e=r.constructor,t=Ta(r,r.e<=e.toExpNeg||r.e>=e.toExpPos);return r.isNeg()&&!r.isZero()?"-"+t:t};Pe.truncated=Pe.trunc=function(){return gt(new this.constructor(this),this.e+1,1)};Pe.valueOf=Pe.toJSON=function(){var r=this,e=r.constructor,t=Ta(r,r.e<=e.toExpNeg||r.e>=e.toExpPos);return r.isNeg()?"-"+t:t};function Fn(r){var e,t,n,s=r.length-1,i="",a=r[0];if(s>0){for(i+=a,e=1;e<s;e++)n=r[e]+"",t=bt-n.length,t&&(i+=Nu(t)),i+=n;a=r[e],n=a+"",t=bt-n.length,t&&(i+=Nu(t))}else if(a===0)return"0";for(;a%10===0;)a/=10;return i+a}o(Fn,"digitsToString");function Is(r,e,t){if(r!==~~r||r<e||r>t)throw Error(Iu+r)}o(Is,"checkInt32");function G0(r,e,t,n){var s,i,a,u;for(i=r[0];i>=10;i/=10)--e;return--e<0?(e+=bt,s=0):(s=Math.ceil((e+1)/bt),e%=bt),i=Sn(10,bt-e),u=r[s]%i|0,n==null?e<3?(e==0?u=u/100|0:e==1&&(u=u/10|0),a=t<4&&u==99999||t>3&&u==49999||u==5e4||u==0):a=(t<4&&u+1==i||t>3&&u+1==i/2)&&(r[s+1]/i/100|0)==Sn(10,e-2)-1||(u==i/2||u==0)&&(r[s+1]/i/100|0)==0:e<4?(e==0?u=u/1e3|0:e==1?u=u/100|0:e==2&&(u=u/10|0),a=(n||t<4)&&u==9999||!n&&t>3&&u==4999):a=((n||t<4)&&u+1==i||!n&&t>3&&u+1==i/2)&&(r[s+1]/i/1e3|0)==Sn(10,e-3)-1,a}o(G0,"checkRoundingDigits");function ew(r,e,t){for(var n,s=[0],i,a=0,u=r.length;a<u;){for(i=s.length;i--;)s[i]*=e;for(s[0]+=B2.indexOf(r.charAt(a++)),n=0;n<s.length;n++)s[n]>t-1&&(s[n+1]===void 0&&(s[n+1]=0),s[n+1]+=s[n]/t|0,s[n]%=t)}return s.reverse()}o(ew,"convertBase");function OW(r,e){var t,n,s;if(e.isZero())return e;n=e.d.length,n<32?(t=Math.ceil(n/3),s=(1/ow(4,t)).toString()):(t=16,s="2.3283064365386962890625e-10"),r.precision+=t,e=tp(r,1,e.times(s),new r(1));for(var i=t;i--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return r.precision-=t,e}o(OW,"cosine");var Tr=(function(){function r(n,s,i){var a,u=0,c=n.length;for(n=n.slice();c--;)a=n[c]*s+u,n[c]=a%i|0,u=a/i|0;return u&&n.unshift(u),n}o(r,"multiplyInteger");function e(n,s,i,a){var u,c;if(i!=a)c=i>a?1:-1;else for(u=c=0;u<i;u++)if(n[u]!=s[u]){c=n[u]>s[u]?1:-1;break}return c}o(e,"compare");function t(n,s,i,a){for(var u=0;i--;)n[i]-=u,u=n[i]<s[i]?1:0,n[i]=u*a+n[i]-s[i];for(;!n[0]&&n.length>1;)n.shift()}return o(t,"subtract"),function(n,s,i,a,u,c){var f,h,m,g,x,v,w,S,A,T,b,E,C,_,F,R,q,H,K,X,pe=n.constructor,le=n.s==s.s?1:-1,ue=n.d,ee=s.d;if(!ue||!ue[0]||!ee||!ee[0])return new pe(!n.s||!s.s||(ue?ee&&ue[0]==ee[0]:!ee)?NaN:ue&&ue[0]==0||!ee?le*0:le/0);for(c?(x=1,h=n.e-s.e):(c=Qi,x=bt,h=ns(n.e/x)-ns(s.e/x)),K=ee.length,q=ue.length,A=new pe(le),T=A.d=[],m=0;ee[m]==(ue[m]||0);m++);if(ee[m]>(ue[m]||0)&&h--,i==null?(_=i=pe.precision,a=pe.rounding):u?_=i+(n.e-s.e)+1:_=i,_<0)T.push(1),v=!0;else{if(_=_/x+2|0,m=0,K==1){for(g=0,ee=ee[0],_++;(m<q||g)&&_--;m++)F=g*c+(ue[m]||0),T[m]=F/ee|0,g=F%ee|0;v=g||m<q}else{for(g=c/(ee[0]+1)|0,g>1&&(ee=r(ee,g,c),ue=r(ue,g,c),K=ee.length,q=ue.length),R=K,b=ue.slice(0,K),E=b.length;E<K;)b[E++]=0;X=ee.slice(),X.unshift(0),H=ee[0],ee[1]>=c/2&&++H;do g=0,f=e(ee,b,K,E),f<0?(C=b[0],K!=E&&(C=C*c+(b[1]||0)),g=C/H|0,g>1?(g>=c&&(g=c-1),w=r(ee,g,c),S=w.length,E=b.length,f=e(w,b,S,E),f==1&&(g--,t(w,K<S?X:ee,S,c))):(g==0&&(f=g=1),w=ee.slice()),S=w.length,S<E&&w.unshift(0),t(b,w,E,c),f==-1&&(E=b.length,f=e(ee,b,K,E),f<1&&(g++,t(b,K<E?X:ee,E,c))),E=b.length):f===0&&(g++,b=[0]),T[m++]=g,f&&b[0]?b[E++]=ue[R]||0:(b=[ue[R]],E=1);while((R++<q||b[0]!==void 0)&&_--);v=b[0]!==void 0}T[0]||T.shift()}if(x==1)A.e=h,bO=v;else{for(m=1,g=T[0];g>=10;g/=10)m++;A.e=m+h*x-1,gt(A,u?i+A.e+1:i,a,v)}return A}})();function gt(r,e,t,n){var s,i,a,u,c,f,h,m,g,x=r.constructor;e:if(e!=null){if(m=r.d,!m)return r;for(s=1,u=m[0];u>=10;u/=10)s++;if(i=e-s,i<0)i+=bt,a=e,h=m[g=0],c=h/Sn(10,s-a-1)%10|0;else if(g=Math.ceil((i+1)/bt),u=m.length,g>=u)if(n){for(;u++<=g;)m.push(0);h=c=0,s=1,i%=bt,a=i-bt+1}else break e;else{for(h=u=m[g],s=1;u>=10;u/=10)s++;i%=bt,a=i-bt+s,c=a<0?0:h/Sn(10,s-a-1)%10|0}if(n=n||e<0||m[g+1]!==void 0||(a<0?h:h%Sn(10,s-a-1)),f=t<4?(c||n)&&(t==0||t==(r.s<0?3:2)):c>5||c==5&&(t==4||n||t==6&&(i>0?a>0?h/Sn(10,s-a):0:m[g-1])%10&1||t==(r.s<0?8:7)),e<1||!m[0])return m.length=0,f?(e-=r.e+1,m[0]=Sn(10,(bt-e%bt)%bt),r.e=-e||0):m[0]=r.e=0,r;if(i==0?(m.length=g,u=1,g--):(m.length=g+1,u=Sn(10,bt-i),m[g]=a>0?(h/Sn(10,s-a)%Sn(10,a)|0)*u:0),f)for(;;)if(g==0){for(i=1,a=m[0];a>=10;a/=10)i++;for(a=m[0]+=u,u=1;a>=10;a/=10)u++;i!=u&&(r.e++,m[0]==Qi&&(m[0]=1));break}else{if(m[g]+=u,m[g]!=Qi)break;m[g--]=0,u=1}for(i=m.length;m[--i]===0;)m.pop()}return _t&&(r.e>x.maxE?(r.d=null,r.e=NaN):r.e<x.minE&&(r.e=0,r.d=[0])),r}o(gt,"finalise");function Ta(r,e,t){if(!r.isFinite())return BO(r);var n,s=r.e,i=Fn(r.d),a=i.length;return e?(t&&(n=t-a)>0?i=i.charAt(0)+"."+i.slice(1)+Nu(n):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(r.e<0?"e":"e+")+r.e):s<0?(i="0."+Nu(-s-1)+i,t&&(n=t-a)>0&&(i+=Nu(n))):s>=a?(i+=Nu(s+1-a),t&&(n=t-s-1)>0&&(i=i+"."+Nu(n))):((n=s+1)<a&&(i=i.slice(0,n)+"."+i.slice(n)),t&&(n=t-a)>0&&(s+1===a&&(i+="."),i+=Nu(n))),i}o(Ta,"finiteToString");function aw(r,e){var t=r[0];for(e*=bt;t>=10;t/=10)e++;return e}o(aw,"getBase10Exponent");function sw(r,e,t){if(e>PW)throw _t=!0,t&&(r.precision=t),Error(EO);return gt(new r(rw),e,1,!0)}o(sw,"getLn10");function Na(r,e,t){if(e>R2)throw Error(EO);return gt(new r(nw),e,t,!0)}o(Na,"getPi");function TO(r){var e=r.length-1,t=e*bt+1;if(e=r[e],e){for(;e%10==0;e/=10)t--;for(e=r[0];e>=10;e/=10)t++}return t}o(TO,"getPrecision");function Nu(r){for(var e="";r--;)e+="0";return e}o(Nu,"getZeroString");function IO(r,e,t,n){var s,i=new r(1),a=Math.ceil(n/bt+4);for(_t=!1;;){if(t%2&&(i=i.times(e),wO(i.d,a)&&(s=!0)),t=ns(t/2),t===0){t=i.d.length-1,s&&i.d[t]===0&&++i.d[t];break}e=e.times(e),wO(e.d,a)}return _t=!0,i}o(IO,"intPow");function xO(r){return r.d[r.d.length-1]&1}o(xO,"isOdd");function _O(r,e,t){for(var n,s,i=new r(e[0]),a=0;++a<e.length;){if(s=new r(e[a]),!s.s){i=s;break}n=i.cmp(s),(n===t||n===0&&i.s===t)&&(i=s)}return i}o(_O,"maxOrMin");function P2(r,e){var t,n,s,i,a,u,c,f=0,h=0,m=0,g=r.constructor,x=g.rounding,v=g.precision;if(!r.d||!r.d[0]||r.e>17)return new g(r.d?r.d[0]?r.s<0?0:1/0:1:r.s?r.s<0?0:r:NaN);for(e==null?(_t=!1,c=v):c=e,u=new g(.03125);r.e>-2;)r=r.times(u),m+=5;for(n=Math.log(Sn(2,m))/Math.LN10*2+5|0,c+=n,t=i=a=new g(1),g.precision=c;;){if(i=gt(i.times(r),c,1),t=t.times(++h),u=a.plus(Tr(i,t,c,1)),Fn(u.d).slice(0,c)===Fn(a.d).slice(0,c)){for(s=m;s--;)a=gt(a.times(a),c,1);if(e==null)if(f<3&&G0(a.d,c-n,x,f))g.precision=c+=10,t=i=u=new g(1),h=0,f++;else return gt(a,g.precision=v,x,_t=!0);else return g.precision=v,a}a=u}}o(P2,"naturalExponential");function Tu(r,e){var t,n,s,i,a,u,c,f,h,m,g,x=1,v=10,w=r,S=w.d,A=w.constructor,T=A.rounding,b=A.precision;if(w.s<0||!S||!S[0]||!w.e&&S[0]==1&&S.length==1)return new A(S&&!S[0]?-1/0:w.s!=1?NaN:S?0:w);if(e==null?(_t=!1,h=b):h=e,A.precision=h+=v,t=Fn(S),n=t.charAt(0),Math.abs(i=w.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)w=w.times(r),t=Fn(w.d),n=t.charAt(0),x++;i=w.e,n>1?(w=new A("0."+t),i++):w=new A(n+"."+t.slice(1))}else return f=sw(A,h+2,b).times(i+""),w=Tu(new A(n+"."+t.slice(1)),h-v).plus(f),A.precision=b,e==null?gt(w,b,T,_t=!0):w;for(m=w,c=a=w=Tr(w.minus(1),w.plus(1),h,1),g=gt(w.times(w),h,1),s=3;;){if(a=gt(a.times(g),h,1),f=c.plus(Tr(a,new A(s),h,1)),Fn(f.d).slice(0,h)===Fn(c.d).slice(0,h))if(c=c.times(2),i!==0&&(c=c.plus(sw(A,h+2,b).times(i+""))),c=Tr(c,new A(x),h,1),e==null)if(G0(c.d,h-v,T,u))A.precision=h+=v,f=a=w=Tr(m.minus(1),m.plus(1),h,1),g=gt(w.times(w),h,1),s=u=1;else return gt(c,A.precision=b,T,_t=!0);else return A.precision=b,c;c=f,s+=2}}o(Tu,"naturalLogarithm");function BO(r){return String(r.s*r.s/0)}o(BO,"nonFiniteToString");function tw(r,e){var t,n,s;for((t=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(t<0&&(t=n),t+=+e.slice(n+1),e=e.substring(0,n)):t<0&&(t=e.length),n=0;e.charCodeAt(n)===48;n++);for(s=e.length;e.charCodeAt(s-1)===48;--s);if(e=e.slice(n,s),e){if(s-=n,r.e=t=t-n-1,r.d=[],n=(t+1)%bt,t<0&&(n+=bt),n<s){for(n&&r.d.push(+e.slice(0,n)),s-=bt;n<s;)r.d.push(+e.slice(n,n+=bt));e=e.slice(n),n=bt-e.length}else n-=s;for(;n--;)e+="0";r.d.push(+e),_t&&(r.e>r.constructor.maxE?(r.d=null,r.e=NaN):r.e<r.constructor.minE&&(r.e=0,r.d=[0]))}else r.e=0,r.d=[0];return r}o(tw,"parseDecimal");function kW(r,e){var t,n,s,i,a,u,c,f,h;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),NO.test(e))return tw(r,e)}else if(e==="Infinity"||e==="NaN")return+e||(r.s=NaN),r.e=NaN,r.d=null,r;if(BW.test(e))t=16,e=e.toLowerCase();else if(_W.test(e))t=2;else if(DW.test(e))t=8;else throw Error(Iu+e);for(i=e.search(/p/i),i>0?(c=+e.slice(i+1),e=e.substring(2,i)):e=e.slice(2),i=e.indexOf("."),a=i>=0,n=r.constructor,a&&(e=e.replace(".",""),u=e.length,i=u-i,s=IO(n,new n(t),i,i*2)),f=ew(e,t,Qi),h=f.length-1,i=h;f[i]===0;--i)f.pop();return i<0?new n(r.s*0):(r.e=aw(f,h),r.d=f,_t=!1,a&&(r=Tr(r,s,u*4)),c&&(r=r.times(Math.abs(c)<54?Sn(2,c):rp.pow(2,c))),_t=!0,r)}o(kW,"parseOther");function LW(r,e){var t,n=e.d.length;if(n<3)return e.isZero()?e:tp(r,2,e,e);t=1.4*Math.sqrt(n),t=t>16?16:t|0,e=e.times(1/ow(5,t)),e=tp(r,2,e,e);for(var s,i=new r(5),a=new r(16),u=new r(20);t--;)s=e.times(e),e=e.times(i.plus(s.times(a.times(s).minus(u))));return e}o(LW,"sine");function tp(r,e,t,n,s){var i,a,u,c,f=1,h=r.precision,m=Math.ceil(h/bt);for(_t=!1,c=t.times(t),u=new r(n);;){if(a=Tr(u.times(c),new r(e++*e++),h,1),u=s?n.plus(a):n.minus(a),n=Tr(a.times(c),new r(e++*e++),h,1),a=u.plus(n),a.d[m]!==void 0){for(i=m;a.d[i]===u.d[i]&&i--;);if(i==-1)break}i=u,u=n,n=a,a=i,f++}return _t=!0,a.d.length=m+1,a}o(tp,"taylorSeries");function ow(r,e){for(var t=r;--e;)t*=r;return t}o(ow,"tinyPow");function DO(r,e){var t,n=e.s<0,s=Na(r,r.precision,1),i=s.times(.5);if(e=e.abs(),e.lte(i))return Ao=n?4:1,e;if(t=e.divToInt(s),t.isZero())Ao=n?3:2;else{if(e=e.minus(t.times(s)),e.lte(i))return Ao=xO(t)?n?2:3:n?4:1,e;Ao=xO(t)?n?1:4:n?3:2}return e.minus(s).abs()}o(DO,"toLessThanHalfPi");function O2(r,e,t,n){var s,i,a,u,c,f,h,m,g,x=r.constructor,v=t!==void 0;if(v?(Is(t,1,_u),n===void 0?n=x.rounding:Is(n,0,8)):(t=x.precision,n=x.rounding),!r.isFinite())h=BO(r);else{for(h=Ta(r),a=h.indexOf("."),v?(s=2,e==16?t=t*4-3:e==8&&(t=t*3-2)):s=e,a>=0&&(h=h.replace(".",""),g=new x(1),g.e=h.length-a,g.d=ew(Ta(g),10,s),g.e=g.d.length),m=ew(h,10,s),i=c=m.length;m[--c]==0;)m.pop();if(!m[0])h=v?"0p+0":"0";else{if(a<0?i--:(r=new x(r),r.d=m,r.e=i,r=Tr(r,g,t,n,0,s),m=r.d,i=r.e,f=bO),a=m[t],u=s/2,f=f||m[t+1]!==void 0,f=n<4?(a!==void 0||f)&&(n===0||n===(r.s<0?3:2)):a>u||a===u&&(n===4||f||n===6&&m[t-1]&1||n===(r.s<0?8:7)),m.length=t,f)for(;++m[--t]>s-1;)m[t]=0,t||(++i,m.unshift(1));for(c=m.length;!m[c-1];--c);for(a=0,h="";a<c;a++)h+=B2.charAt(m[a]);if(v){if(c>1)if(e==16||e==8){for(a=e==16?4:3,--c;c%a;c++)h+="0";for(m=ew(h,s,e),c=m.length;!m[c-1];--c);for(a=1,h="1.";a<c;a++)h+=B2.charAt(m[a])}else h=h.charAt(0)+"."+h.slice(1);h=h+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)h="0"+h;h="0."+h}else if(++i>c)for(i-=c;i--;)h+="0";else i<c&&(h=h.slice(0,i)+"."+h.slice(i))}h=(e==16?"0x":e==2?"0b":e==8?"0o":"")+h}return r.s<0?"-"+h:h}o(O2,"toStringBinary");function wO(r,e){if(r.length>e)return r.length=e,!0}o(wO,"truncate");function VW(r){return new this(r).abs()}o(VW,"abs");function UW(r){return new this(r).acos()}o(UW,"acos");function jW(r){return new this(r).acosh()}o(jW,"acosh");function MW(r,e){return new this(r).plus(e)}o(MW,"add");function FW(r){return new this(r).asin()}o(FW,"asin");function qW(r){return new this(r).asinh()}o(qW,"asinh");function HW(r){return new this(r).atan()}o(HW,"atan");function KW(r){return new this(r).atanh()}o(KW,"atanh");function $W(r,e){r=new this(r),e=new this(e);var t,n=this.precision,s=this.rounding,i=n+4;return!r.s||!e.s?t=new this(NaN):!r.d&&!e.d?(t=Na(this,i,1).times(e.s>0?.25:.75),t.s=r.s):!e.d||r.isZero()?(t=e.s<0?Na(this,n,s):new this(0),t.s=r.s):!r.d||e.isZero()?(t=Na(this,i,1).times(.5),t.s=r.s):e.s<0?(this.precision=i,this.rounding=1,t=this.atan(Tr(r,e,i,1)),e=Na(this,i,1),this.precision=n,this.rounding=s,t=r.s<0?t.minus(e):t.plus(e)):t=this.atan(Tr(r,e,i,1)),t}o($W,"atan2");function GW(r){return new this(r).cbrt()}o(GW,"cbrt");function XW(r){return gt(r=new this(r),r.e+1,2)}o(XW,"ceil");function WW(r,e,t){return new this(r).clamp(e,t)}o(WW,"clamp");function zW(r){if(!r||typeof r!="object")throw Error(iw+"Object expected");var e,t,n,s=r.defaults===!0,i=["precision",1,_u,"rounding",0,8,"toExpNeg",-ep,0,"toExpPos",0,ep,"maxE",0,ep,"minE",-ep,0,"modulo",0,9];for(e=0;e<i.length;e+=3)if(t=i[e],s&&(this[t]=D2[t]),(n=r[t])!==void 0)if(ns(n)===n&&n>=i[e+1]&&n<=i[e+2])this[t]=n;else throw Error(Iu+t+": "+n);if(t="crypto",s&&(this[t]=D2[t]),(n=r[t])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(AO);else this[t]=!1;else throw Error(Iu+t+": "+n);return this}o(zW,"config");function JW(r){return new this(r).cos()}o(JW,"cos");function YW(r){return new this(r).cosh()}o(YW,"cosh");function RO(r){var e,t,n;function s(i){var a,u,c,f=this;if(!(f instanceof s))return new s(i);if(f.constructor=s,SO(i)){f.s=i.s,_t?!i.d||i.e>s.maxE?(f.e=NaN,f.d=null):i.e<s.minE?(f.e=0,f.d=[0]):(f.e=i.e,f.d=i.d.slice()):(f.e=i.e,f.d=i.d?i.d.slice():i.d);return}if(c=typeof i,c==="number"){if(i===0){f.s=1/i<0?-1:1,f.e=0,f.d=[0];return}if(i<0?(i=-i,f.s=-1):f.s=1,i===~~i&&i<1e7){for(a=0,u=i;u>=10;u/=10)a++;_t?a>s.maxE?(f.e=NaN,f.d=null):a<s.minE?(f.e=0,f.d=[0]):(f.e=a,f.d=[i]):(f.e=a,f.d=[i]);return}if(i*0!==0){i||(f.s=NaN),f.e=NaN,f.d=null;return}return tw(f,i.toString())}if(c==="string")return(u=i.charCodeAt(0))===45?(i=i.slice(1),f.s=-1):(u===43&&(i=i.slice(1)),f.s=1),NO.test(i)?tw(f,i):kW(f,i);if(c==="bigint")return i<0?(i=-i,f.s=-1):f.s=1,tw(f,i.toString());throw Error(Iu+i)}if(o(s,"Decimal"),s.prototype=Pe,s.ROUND_UP=0,s.ROUND_DOWN=1,s.ROUND_CEIL=2,s.ROUND_FLOOR=3,s.ROUND_HALF_UP=4,s.ROUND_HALF_DOWN=5,s.ROUND_HALF_EVEN=6,s.ROUND_HALF_CEIL=7,s.ROUND_HALF_FLOOR=8,s.EUCLID=9,s.config=s.set=zW,s.clone=RO,s.isDecimal=SO,s.abs=VW,s.acos=UW,s.acosh=jW,s.add=MW,s.asin=FW,s.asinh=qW,s.atan=HW,s.atanh=KW,s.atan2=$W,s.cbrt=GW,s.ceil=XW,s.clamp=WW,s.cos=JW,s.cosh=YW,s.div=QW,s.exp=ZW,s.floor=ez,s.hypot=tz,s.ln=rz,s.log=nz,s.log10=iz,s.log2=sz,s.max=az,s.min=oz,s.mod=uz,s.mul=cz,s.pow=lz,s.random=fz,s.round=hz,s.sign=pz,s.sin=dz,s.sinh=mz,s.sqrt=gz,s.sub=vz,s.sum=yz,s.tan=xz,s.tanh=wz,s.trunc=Sz,r===void 0&&(r={}),r&&r.defaults!==!0)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],e=0;e<n.length;)r.hasOwnProperty(t=n[e++])||(r[t]=this[t]);return s.config(r),s}o(RO,"clone");function QW(r,e){return new this(r).div(e)}o(QW,"div");function ZW(r){return new this(r).exp()}o(ZW,"exp");function ez(r){return gt(r=new this(r),r.e+1,3)}o(ez,"floor");function tz(){var r,e,t=new this(0);for(_t=!1,r=0;r<arguments.length;)if(e=new this(arguments[r++]),e.d)t.d&&(t=t.plus(e.times(e)));else{if(e.s)return _t=!0,new this(1/0);t=e}return _t=!0,t.sqrt()}o(tz,"hypot");function SO(r){return r instanceof rp||r&&r.toStringTag===CO||!1}o(SO,"isDecimalInstance");function rz(r){return new this(r).ln()}o(rz,"ln");function nz(r,e){return new this(r).log(e)}o(nz,"log");function sz(r){return new this(r).log(2)}o(sz,"log2");function iz(r){return new this(r).log(10)}o(iz,"log10");function az(){return _O(this,arguments,-1)}o(az,"max");function oz(){return _O(this,arguments,1)}o(oz,"min");function uz(r,e){return new this(r).mod(e)}o(uz,"mod");function cz(r,e){return new this(r).mul(e)}o(cz,"mul");function lz(r,e){return new this(r).pow(e)}o(lz,"pow");function fz(r){var e,t,n,s,i=0,a=new this(1),u=[];if(r===void 0?r=this.precision:Is(r,1,_u),n=Math.ceil(r/bt),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(n));i<n;)s=e[i],s>=429e7?e[i]=crypto.getRandomValues(new Uint32Array(1))[0]:u[i++]=s%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(n*=4);i<n;)s=e[i]+(e[i+1]<<8)+(e[i+2]<<16)+((e[i+3]&127)<<24),s>=214e7?crypto.randomBytes(4).copy(e,i):(u.push(s%1e7),i+=4);i=n/4}else throw Error(AO);else for(;i<n;)u[i++]=Math.random()*1e7|0;for(n=u[--i],r%=bt,n&&r&&(s=Sn(10,bt-r),u[i]=(n/s|0)*s);u[i]===0;i--)u.pop();if(i<0)t=0,u=[0];else{for(t=-1;u[0]===0;t-=bt)u.shift();for(n=1,s=u[0];s>=10;s/=10)n++;n<bt&&(t-=bt-n)}return a.e=t,a.d=u,a}o(fz,"random");function hz(r){return gt(r=new this(r),r.e+1,this.rounding)}o(hz,"round");function pz(r){return r=new this(r),r.d?r.d[0]?r.s:0*r.s:r.s||NaN}o(pz,"sign");function dz(r){return new this(r).sin()}o(dz,"sin");function mz(r){return new this(r).sinh()}o(mz,"sinh");function gz(r){return new this(r).sqrt()}o(gz,"sqrt");function vz(r,e){return new this(r).sub(e)}o(vz,"sub");function yz(){var r=0,e=arguments,t=new this(e[r]);for(_t=!1;t.s&&++r<e.length;)t=t.plus(e[r]);return _t=!0,gt(t,this.precision,this.rounding)}o(yz,"sum");function xz(r){return new this(r).tan()}o(xz,"tan");function wz(r){return new this(r).tanh()}o(wz,"tanh");function Sz(r){return gt(r=new this(r),r.e+1,1)}o(Sz,"trunc");Pe[Symbol.for("nodejs.util.inspect.custom")]=Pe.toString;Pe[Symbol.toStringTag]="Decimal";var rp=Pe.constructor=RO(D2);rw=new rp(rw);nw=new rp(nw);var np=class r extends rp{static{o(this,"Decimal")}static from(e){return new r(e)}static newOrZero(e){return e===void 0?r.from(0):r.from(e)}static newOrUndefined(e){if(e!==void 0)return r.from(e)}};var PO=class{static{o(this,"MemoryCacheAdapter")}cache=new Map;async get(e){return Promise.resolve(this.cache.get(e)??null)}has(e){return Promise.resolve(this.cache.has(e))}set(e,t){return this.cache.set(e,t),Promise.resolve(!0)}};var bz=o(r=>!!r&&typeof r=="object"&&"message"in r,"hasMessageInRecord"),Bu=o(r=>typeof r=="string"?ti(new pn(r)):r instanceof Error?ti(new pn(r.message,{cause:r.cause})):bz(r)?ti(new pn(r.message)):ti(new pn("unexpected error")),"leftFromError");var uw=class{static{o(this,"NullCacheAdapter")}async get(e){return Promise.resolve(null)}has(e){return Promise.resolve(!1)}set(e,t){return Promise.resolve(!0)}};var Vh=Yx(zk(),1);import hq from"fs";import Che from"path";import N0 from"crypto";import"reflect-metadata";var gU=Yx(pU(),1);import{constants as gue}from"crypto";import{Agent as dU}from"https";var mU=class{static{o(this,"SoapRemoteTransmissionRepository")}toolkit;certificateRepository;constructor(e,t){this.toolkit=e,this.certificateRepository=t}setCertificate(e){return this.certificate=e,this}get httpsAgent(){let e={rejectUnauthorized:!1,secureOptions:gue.SSL_OP_LEGACY_SERVER_CONNECT};if(!this.certificate)return new dU({...e});let{ca:t,password:n,certificate:s,privateKey:i}=this.certificate;return new dU({passphrase:n,cert:s.toString(),ca:t.map(a=>a.toString()),key:this.certificateRepository.getStringPrivateKey(i),...e})}get defaultSoapHeaders(){return{"Content-Type":"application/soap+xml; charset=utf-8"}}async send(e){try{let t=this.httpsAgent,n=await(0,gU.createClientAsync)(`${e.url}?wsdl`,{attributesKey:"$",wsdl_options:{httpsAgent:t}});e.payload.$={xmlns:n.wsdl.definitions.$targetNamespace,...e.payload.$};let s=await this.toolkit.build(e.payload,{headless:!0,renderOpts:{pretty:!1},rootName:e.root}),i=this.toolkit.getFirstNode(s)??"",a=e.xsd,u=await this.toolkit.validate(i,a);if(u.isLeft())return u;let[c]=await n[`${e.method}Async`]({_xml:s},{httpsAgent:t});return ri(c)}catch(t){return Bu(t)}}};import{join as ZI,dirname as wue,resolve as Sue}from"path";import{existsSync as bU}from"fs";import{resolve as yU}from"path";import{createRequire as vU}from"module";import{fileURLToPath as vue,pathToFileURL as yue}from"url";var xue=typeof jest<"u"||process.env.JEST_WORKER_ID!==void 0,Jp,xU=o(()=>{if(Jp!==void 0)return Jp;if(xue){Jp=void 0;return}try{Jp=new Function("try { return import.meta.url; } catch { return undefined; }")()}catch{Jp=void 0}return Jp},"getImportMetaUrl"),wU=o(()=>{if(typeof Xe<"u")return Xe;let r=xU();if(r)return vU(r);let e=yue(yU(process.cwd(),"package.json")).href;return vU(e)},"getRequireFn"),SU=o(()=>{if(typeof __filename<"u")return __filename;let r=xU();return r?vue(r):yU(process.cwd())},"getCurrentFile");var e_=o(r=>wU()(r),"exportRequireModule"),EU=o(r=>{if(process.env.NFETS_ADDONS_DIR)return e_(ZI(process.env.NFETS_ADDONS_DIR,r));let e=SU(),t=Sue(e,"../../../../"),n=ZI(t,"build","Release",r);if(bU(n))return e_(n);let s=e;for(let i=0;i<10;i++){let a=ZI(s,"build","Release",r);if(bU(a))return e_(a);let u=wue(s);if(u===s)break;s=u}throw new Error(`Addon ${r} not found`)},"addon");var bue=EU("xml_validator.node"),AU=bue;var yhe=Yx(Gj(),1);import vhe from"crypto";var Xj="application/xml";var Ut;(function(r){r[r.None=0]="None",r[r.Element=1]="Element",r[r.Attribute=2]="Attribute",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.EntityReference=5]="EntityReference",r[r.Entity=6]="Entity",r[r.ProcessingInstruction=7]="ProcessingInstruction",r[r.Comment=8]="Comment",r[r.Document=9]="Document",r[r.DocumentType=10]="DocumentType",r[r.DocumentFragment=11]="DocumentFragment",r[r.Notation=12]="Notation",r[r.Whitespace=13]="Whitespace",r[r.SignificantWhitespace=14]="SignificantWhitespace",r[r.EndElement=15]="EndElement",r[r.EndEntity=16]="EndEntity",r[r.XmlDeclaration=17]="XmlDeclaration"})(Ut||(Ut={}));function Eue(r,e){let t=r.ownerDocument==null?r:r.ownerDocument,n=document.createNSResolver(r.ownerDocument==null?r.documentElement:r.ownerDocument.documentElement),s=t.evaluate(e,r,n,XPathResult.ANY_TYPE,null),i=[],a;for(;a=s.iterateNext();)i.push(a);return i}o(Eue,"SelectNodesEx");function Aue(r,e){let t=Yp("xpath").select;return t(e,r)}o(Aue,"SelectNodesNode");var Wj=typeof self<"u"?Eue:Aue;function Li(r){r=r.replace(/\r\n/g,`
89
+ `).replace(/\r/g,`
90
+ `);let e;return typeof DOMParser<"u"?e=DOMParser:e=Yp("DOMParser"),new e().parseFromString(r,Xj)}o(Li,"Parse");function Qa(r){let e;return typeof XMLSerializer<"u"?e=XMLSerializer:e=Yp("XMLSerializer"),new e().serializeToString(r)}o(Qa,"Stringify");function yb(r,e){let t=Wj(r,e);return t&&t.length>0?t[0]:null}o(yb,"SelectSingleNode");function zj(r,e){return r&&r.nodeType===e}o(zj,"isNodeType");function oi(r){return zj(r,Ut.Element)}o(oi,"isElement");function Jl(r){return zj(r,Ut.Document)}o(Jl,"isDocument");var Jj=new Map;function Yj(r){for(let e in r)Jj.set(e,r[e])}o(Yj,"setNodeDependencies");function Yp(r){let e=Jj.get(r);if(!e)throw new Error(`Node dependency not found: ${r}. Please use 'setNodeDependencies' to register it.`);return e}o(Yp,"getNodeDependency");var Gg="element",Xg="attribute",xb="content";var Cue=1e9;function f_(r,...e){let t=r;for(let n=0;n<e.length;n++){let s=e[n];for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(t[i]=s[i])}return t}o(f_,"assign");function jt(r){return e=>{let t=e;t.localName=r.localName||t.name,t.namespaceURI=r.namespaceURI||t.namespaceURI||null,t.prefix=r.prefix||t.prefix||null,t.parser=r.parser||t.parser,t.target!==t&&(t.items=f_({},t.items)),t.target=e}}o(jt,"XmlElement");function Gt(r={}){return(e,t)=>{let n=e.constructor,s=t;n.items||(n.items={}),n.target!==n&&(n.items=f_({},n.items)),n.target=e;let i;r.parser?i={parser:r.parser,required:r.required||!1,maxOccurs:r.maxOccurs||Cue,minOccurs:r.minOccurs===void 0?0:r.minOccurs,noRoot:r.noRoot||!1}:i={namespaceURI:r.namespaceURI||null,required:r.required||!1,prefix:r.prefix||null,defaultValue:r.defaultValue,converter:r.converter,noRoot:r.noRoot||!1},r.localName=r.localName||r.parser&&r.parser.localName||s;let a=n.items,u=r.parser&&r.parser.namespaceURI;a[s]={...i,namespaceURI:r.namespaceURI||u||null,prefix:r.prefix||r.parser&&r.parser.prefix||null,localName:r.localName,type:Gg},Zj(e,s,r)}}o(Gt,"XmlChildElement");function Or(r={required:!1,namespaceURI:null}){return(e,t)=>{let n=e.constructor,s=t;r.localName||(r.localName=t),n.items||(n.items={}),n.target!==n&&(n.items=f_({},n.items)),n.target=e;let i=n.items;i[t]=r,i[t].type=Xg,Zj(e,s,r)}}o(Or,"XmlAttribute");function Zj(r,e,t){let n=`_${e}`,s={set:o(function(i){this[n]!==i&&(this.element=null,this[n]=i)},"set"),get:o(function(){if(this[n]===void 0){let i=t.defaultValue;t.parser&&(i=new t.parser,i.localName=t.localName),this[n]=i}return this[n]},"get")};Object.defineProperty(r,n,{writable:!0,enumerable:!1}),Object.defineProperty(r,e,s)}o(Zj,"defineProperty");var lc=class r{static{o(this,"Collection")}constructor(e){this.items=[],e&&(this.items=e)}get Count(){return this.items.length}Item(e){return this.items[e]||null}Add(e){this.items.push(e)}Pop(){return this.items.pop()}RemoveAt(e){this.items=this.items.filter((t,n)=>n!==e)}Clear(){this.items=[]}GetIterator(){return this.items}ForEach(e){this.GetIterator().forEach(e)}Map(e){return new r(this.GetIterator().map(e))}Filter(e){return new r(this.GetIterator().filter(e))}Sort(e){return new r(this.GetIterator().sort(e))}Every(e){return this.GetIterator().every(e)}Some(e){return this.GetIterator().some(e)}IsEmpty(){return this.Count===0}};function Nue(r,...e){let t=r.replace(/%([1-9]\d*)/g,(n,s)=>{let i=parseInt(s,10)-1;return e[i]!==void 0?e[i]:""});return t=t.replace(/%%/g,"%"),t}o(Nue,"printf");function Tue(r,e){let t=r+"";for(;t.length<e;)t="0"+t;return t}o(Tue,"padNum");var Fe=class{static{o(this,"XmlError")}constructor(e,...t){this.prefix="XMLJS",this.code=e,this.name=this.constructor.name;let n=Nue(ln[e],...t);this.message=`${this.prefix}${Tue(e,4)}: ${n}`,this.stack=new Error(this.message).stack}},Te;(function(r){r[r.NONE=0]="NONE",r[r.NULL_REFERENCE=1]="NULL_REFERENCE",r[r.NULL_PARAM=2]="NULL_PARAM",r[r.DECORATOR_NULL_PARAM=3]="DECORATOR_NULL_PARAM",r[r.COLLECTION_LIMIT=4]="COLLECTION_LIMIT",r[r.METHOD_NOT_IMPLEMENTED=5]="METHOD_NOT_IMPLEMENTED",r[r.METHOD_NOT_SUPPORTED=6]="METHOD_NOT_SUPPORTED",r[r.PARAM_REQUIRED=7]="PARAM_REQUIRED",r[r.CONVERTER_UNSUPPORTED=8]="CONVERTER_UNSUPPORTED",r[r.ELEMENT_MALFORMED=9]="ELEMENT_MALFORMED",r[r.ELEMENT_MISSING=10]="ELEMENT_MISSING",r[r.ATTRIBUTE_MISSING=11]="ATTRIBUTE_MISSING",r[r.CONTENT_MISSING=12]="CONTENT_MISSING",r[r.CRYPTOGRAPHIC=13]="CRYPTOGRAPHIC",r[r.CRYPTOGRAPHIC_NO_MODULE=14]="CRYPTOGRAPHIC_NO_MODULE",r[r.CRYPTOGRAPHIC_UNKNOWN_TRANSFORM=15]="CRYPTOGRAPHIC_UNKNOWN_TRANSFORM",r[r.ALGORITHM_NOT_SUPPORTED=16]="ALGORITHM_NOT_SUPPORTED",r[r.ALGORITHM_WRONG_NAME=17]="ALGORITHM_WRONG_NAME",r[r.XML_EXCEPTION=18]="XML_EXCEPTION",r[r.KEY_INFO_CLAUSE_NOT_SUPPORTED=19]="KEY_INFO_CLAUSE_NOT_SUPPORTED"})(Te||(Te={}));var ln={};ln[Te.NONE]="No description";ln[Te.NULL_REFERENCE]="Null reference";ln[Te.NULL_PARAM]="'%1' has empty '%2' object";ln[Te.DECORATOR_NULL_PARAM]="Decorator '%1' has empty '%2' parameter";ln[Te.COLLECTION_LIMIT]="Collection of '%1' in element '%2' has wrong amount of items";ln[Te.METHOD_NOT_IMPLEMENTED]="Method is not implemented";ln[Te.METHOD_NOT_SUPPORTED]="Method is not supported";ln[Te.PARAM_REQUIRED]="Required parameter is missing '%1'";ln[Te.CONVERTER_UNSUPPORTED]="Converter is not supported";ln[Te.ELEMENT_MALFORMED]="Malformed element '%1'";ln[Te.ELEMENT_MISSING]="Element '%1' is missing in '%2'";ln[Te.ATTRIBUTE_MISSING]="Attribute '%1' is missing in '%2'";ln[Te.CONTENT_MISSING]="Content is missing in '%1'";ln[Te.CRYPTOGRAPHIC]="Cryptographic error: %1";ln[Te.CRYPTOGRAPHIC_NO_MODULE]="WebCrypto module is not found";ln[Te.CRYPTOGRAPHIC_UNKNOWN_TRANSFORM]="Unknown transform %1";ln[Te.ALGORITHM_NOT_SUPPORTED]="Algorithm is not supported '%1'";ln[Te.ALGORITHM_WRONG_NAME]="Algorithm wrong name in use '%1'";ln[Te.XML_EXCEPTION]="XML exception: %1";ln[Te.KEY_INFO_CLAUSE_NOT_SUPPORTED]="KeyInfoClause type '%1' is not supported";var wr=class{static{o(this,"Convert")}static ToString(e,t="utf8"){let n=new Uint8Array(e);switch(t.toLowerCase()){case"utf8":return this.ToUtf8String(n);case"binary":return this.ToBinary(n);case"hex":return this.ToHex(n);case"base64":return this.ToBase64(n);case"base64url":return this.ToBase64Url(n);default:throw new Fe(Te.CONVERTER_UNSUPPORTED)}}static FromString(e,t="utf8"){switch(t.toLowerCase()){case"utf8":return this.FromUtf8String(e);case"binary":return this.FromBinary(e);case"hex":return this.FromHex(e);case"base64":return this.FromBase64(e);case"base64url":return this.FromBase64Url(e);default:throw new Fe(Te.CONVERTER_UNSUPPORTED)}}static ToBase64(e){if(typeof btoa<"u"){let t=this.ToString(e,"binary");return btoa(t)}else{if(typeof Buffer<"u")return Buffer.from(e).toString("base64");throw new Fe(Te.CONVERTER_UNSUPPORTED)}}static FromBase64(e){if(e=e.replace(/\n/g,"").replace(/\r/g,"").replace(/\t/g,"").replace(/\s/g,""),typeof atob<"u")return this.FromBinary(atob(e));if(typeof Buffer<"u")return new Uint8Array(Buffer.from(e,"base64"));throw new Fe(Te.CONVERTER_UNSUPPORTED)}static FromBase64Url(e){return this.FromBase64(this.Base64Padding(e.replace(/-/g,"+").replace(/_/g,"/")))}static ToBase64Url(e){return this.ToBase64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}static FromUtf8String(e){let t=unescape(encodeURIComponent(e)),n=new Uint8Array(t.length);for(let s=0;s<t.length;s++)n[s]=t.charCodeAt(s);return n}static ToUtf8String(e){let t=String.fromCharCode.apply(null,e);return decodeURIComponent(escape(t))}static FromBinary(e){let t=e.length,n=new Uint8Array(t);for(let s=0;s<t;s++)n[s]=e.charCodeAt(s);return n}static ToBinary(e){let t="";for(let n=0;n<e.length;n++)t=t+String.fromCharCode(e[n]);return t}static ToHex(e){let n=[];for(let s=0;s<e.length;s++){let i=e[s].toString(16);n.push(i.length===1?"0"+i:i)}return n.join("")}static FromHex(e){let t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n=n+2){let s=e.slice(n,n+2);t[n/2]=parseInt(s,16)}return t}static ToDateTime(e){return new Date(e)}static FromDateTime(e){return e.toISOString()}static Base64Padding(e){let t=4-e.length%4;if(t<4)for(let n=0;n<t;n++)e+="=";return e}};var Vi={get:o(r=>{if(r)return wr.ToBase64(r)},"get"),set:o(r=>wr.FromBase64(r),"set")},Wg={get:o(r=>r?r.toString():"0","get"),set:o(r=>Number(r),"set")};var Iue="xml_root",Ms=class r{static{o(this,"XmlObject")}static LoadXml(e){let t=new this;return t.LoadXml(e),t}static GetElement(e,t,n=!0){let s=e.getElementsByTagName(t);if(n&&s.length===0)throw new Fe(Te.ELEMENT_MISSING,t,e.localName);return s[0]||null}static GetAttribute(e,t,n,s=!0){if(e.hasAttribute(t))return e.getAttribute(t);if(s)throw new Fe(Te.ATTRIBUTE_MISSING,t,e.localName);return n}static GetElementById(e,t){if(e==null||t==null)return null;let n=null;return Jl(e)&&(n=e.getElementById(t)),n==null&&(n=yb(e,`//*[@*[local-name()='Id']='${t}']`),n==null&&(n=yb(e,`//*[@*[local-name()='ID']='${t}']`),n==null&&(n=yb(e,`//*[@*[local-name()='id']='${t}']`)))),n}static CreateDocument(e=Iue,t=null,n=null){if(n&&!t)throw new Fe(Te.PARAM_REQUIRED,"namespaceUri",`Prefix '${n}' requires namespaceUri`);let s="",i="",a="";n&&(s=n+":",i=":"+n),t&&(a=` xmlns${i}="${t}"`);let u=`${s}${e}`;return Li(`<${u}${a}></${u}>`)}static GetChildren(e,t,n){e=Jl(e)?e.documentElement:e;let s=[];for(let i=0;i<e.childNodes.length;i++){let a=e.childNodes[i];oi(a)&&a.localName===t&&(a.namespaceURI===n||!n)&&s.push(a)}return s}static GetFirstChild(e,t,n){e=Jl(e)?e.documentElement:e;for(let s=0;s<e.childNodes.length;s++){let i=e.childNodes[s];if(oi(i)&&i.localName===t&&(i.namespaceURI===n||!n))return i}return null}static GetChild(e,t,n,s=!0){for(let i=0;i<e.childNodes.length;i++){let a=e.childNodes[i];if(oi(a)&&a.localName===t&&(a.namespaceURI===n||!n))return a}if(s)throw new Fe(Te.ELEMENT_MISSING,t,e.localName);return null}constructor(e={}){if(this.prefix=this.GetStatic().prefix||null,this.localName=this.GetStatic().localName,this.namespaceURI=this.GetStatic().namespaceURI,e)for(let[t,n]of Object.entries(e))n!==void 0&&(this[t]=n)}get Element(){return this.element}get Prefix(){return this.prefix}set Prefix(e){this.prefix=e}get LocalName(){return this.localName||""}get NamespaceURI(){return this.namespaceURI||null}HasChanged(){let e=this.GetStatic();if(e.items)for(let t in e.items){if(!Object.prototype.hasOwnProperty.call(e.items,t))continue;let n=e.items[t],s=this[t];if(n.parser&&s&&s.HasChanged())return!0}return this.element===null}GetXml(e){if(!(e||this.HasChanged()))return this.element||null;let t=this,n=this.CreateDocument(),s=this.CreateElement(),i=this.GetStatic(),a=this.localName||"";if(i.items)for(let u in i.items){if(!Object.prototype.hasOwnProperty.call(i.items,u))continue;let c=t[u],f=i.items[u];switch(f.type){case xb:{let h=f,m=h.converter?h.converter.get(c):c;if(h.required&&m==null)throw new Fe(Te.CONTENT_MISSING,a);(h.defaultValue!==c||h.required)&&(s.textContent=m);break}case Xg:{let h=f,m=h.converter?h.converter.get(c):c;if(h.required&&m==null)throw new Fe(Te.ATTRIBUTE_MISSING,h.localName,a);(h.defaultValue!==c||h.required)&&(h.namespaceURI?s.setAttributeNS(h.namespaceURI,h.localName||"",m):s.setAttribute(h.localName||"",m));break}case Gg:{let h=f,m=null;if(h.parser){if(h.required&&!c||h.minOccurs&&!c.Count){let g=c?.localName||h.localName;throw new Fe(Te.ELEMENT_MISSING,g,a)}c&&(m=c.GetXml(c.element===void 0&&(h.required||c.Count)))}else{let g=h.converter?h.converter.get(c):c;if(h.required&&g===void 0)throw new Fe(Te.ELEMENT_MISSING,h.localName,a);if(c!==h.defaultValue||h.required)if(h.namespaceURI?m=n.createElementNS(h.namespaceURI,`${h.prefix?h.prefix+":":""}${h.localName}`):m=n.createElement(`${h.prefix?h.prefix+":":""}${h.localName}`),Array.isArray(g))for(let x of g){let v=x instanceof r?x.GetXml(!0):x;v!==null&&m&&m.appendChild(v)}else if(g instanceof r){let x=g.GetXml(!0);x&&m&&m.appendChild(x)}else m&&(m.textContent=g)}if(m)if(h.noRoot){let g=[];for(let w=0;w<m.childNodes.length;w++){let S=m.childNodes.item(w);oi(S)&&g.push(S)}let x=h.minOccurs||0,v=h.maxOccurs||1/0;if(g.length<x||g.length>v)throw new Fe(Te.COLLECTION_LIMIT,c.localName,i.localName);g.forEach(w=>s.appendChild(w.cloneNode(!0)))}else{if(m.childNodes.length<(h.minOccurs||0)||m.childNodes.length>(h.maxOccurs||1/0))throw new Fe(Te.COLLECTION_LIMIT,c.localName,i.localName);s.appendChild(m)}break}}}return this.OnGetXml(s),this.element=s,s}LoadXml(e){let t,n=this;if(typeof e=="string"?t=Li(e).documentElement:t=e,!t)throw new Fe(Te.PARAM_REQUIRED,"element");let s=this.GetStatic(),i=this.localName||"";if(!(t.localName===i&&t.namespaceURI==this.NamespaceURI))throw new Fe(Te.ELEMENT_MALFORMED,i);if(s.items)for(let a in s.items){if(!Object.prototype.hasOwnProperty.call(s.items,a))continue;let u=s.items[a];switch(u.type){case xb:{let c=u;if(c.required&&!t.textContent)throw new Fe(Te.CONTENT_MISSING,i);if(!t.textContent)n[a]=c.defaultValue;else{let f=c.converter?c.converter.set(t.textContent):t.textContent;n[a]=f}break}case Xg:{let c=u,f,h;if(!c.localName)throw new Fe(Te.PARAM_REQUIRED,"localName");if(c.namespaceURI?(f=t.hasAttributeNS.bind(t,c.namespaceURI,c.localName),h=t.getAttributeNS.bind(t,c.namespaceURI,c.localName)):(f=t.hasAttribute.bind(t,c.localName),h=t.getAttribute.bind(t,c.localName)),c.required&&!f())throw new Fe(Te.ATTRIBUTE_MISSING,c.localName,i);if(!f())n[a]=c.defaultValue;else{let m=h(),g=c.converter&&m?c.converter.set(m):m;n[a]=g}break}case Gg:{let c=u;if(c.noRoot){if(!c.parser)throw new Fe(Te.XML_EXCEPTION,`Schema for '${c.localName}' with flag noRoot must have 'parser'`);let h=new c.parser;if(!(h instanceof Qp))throw new Fe(Te.XML_EXCEPTION,`Schema for '${c.localName}' with flag noRoot must have 'parser' like instance of XmlCollection`);h.OnLoadXml(t),delete h.element;let m=c.minOccurs||0,g=c.maxOccurs||1/0;if(h.Count<m||h.Count>g)throw new Fe(Te.COLLECTION_LIMIT,c.parser.localName,i);n[a]=h;continue}let f=null;for(let h=0;h<t.childNodes.length;h++){let m=t.childNodes.item(h);if(!oi(m))continue;let g=m;if(g.localName===c.localName&&g.namespaceURI==c.namespaceURI){f=g;break}}if(c.required&&!f)throw new Fe(Te.ELEMENT_MISSING,c.parser?c.parser.localName:c.localName,i);if(c.parser){if(f){let h=new c.parser;h.localName=c.localName,h.namespaceURI=c.namespaceURI,n[a]=h,h.LoadXml(f)}}else if(!f)n[a]=c.defaultValue;else{let h=f.textContent||"",m=c.converter?c.converter.set(h):h;n[a]=m}break}}}this.OnLoadXml(t),this.prefix=t.prefix||"",this.element=t}toString(){let e=this.GetXml();return e?Qa(e):""}GetElement(e,t=!0){if(!this.element)throw new Fe(Te.NULL_PARAM,this.localName);return r.GetElement(this.element,e,t)}GetChildren(e,t){if(!this.element)throw new Fe(Te.NULL_PARAM,this.localName);return r.GetChildren(this.element,e,t||this.NamespaceURI||void 0)}GetChild(e,t=!0){if(!this.element)throw new Fe(Te.NULL_PARAM,this.localName);return r.GetChild(this.element,e,this.NamespaceURI||void 0,t)}GetFirstChild(e,t){if(!this.element)throw new Fe(Te.NULL_PARAM,this.localName);return r.GetFirstChild(this.element,e,t)}GetAttribute(e,t,n=!0){if(!this.element)throw new Fe(Te.NULL_PARAM,this.localName);return r.GetAttribute(this.element,e,t,n)}IsEmpty(){return this.Element===void 0}OnLoadXml(e){}GetStatic(){return this.constructor}GetPrefix(){return this.Prefix?this.prefix+":":""}OnGetXml(e){}CreateElement(e,t,n=null,s=null){if(!e){let u=this.CreateDocument();if(u)e=u;else throw new Fe(Te.XML_EXCEPTION,"Document not created")}t=t||this.localName,n=n||this.NamespaceURI,s=s||this.prefix;let i=(s?`${s}:`:"")+t,a=n&&e?e.createElementNS(n,i):e?.createElement(i);return e&&a&&e.importNode(a,!0),a}CreateDocument(){return r.CreateDocument(this.localName,this.NamespaceURI,this.Prefix)}};var Qp=class extends Ms{static{o(this,"XmlCollection")}constructor(){super(...arguments),this.MaxOccurs=Number.MAX_VALUE,this.MinOccurs=0,this.items=[]}HasChanged(){let e=super.HasChanged(),t=this.Some(n=>n.HasChanged());return e||t}get Count(){return this.items.length}Item(e){return this.items[e]||null}Add(e){this.items.push(e),this.element=null}Pop(){return this.element=null,this.items.pop()}RemoveAt(e){this.items=this.items.filter((t,n)=>n!==e),this.element=null}Clear(){this.items=[],this.element=null}GetIterator(){return this.items}ForEach(e){this.GetIterator().forEach(e)}Map(e){return new lc(this.GetIterator().map(e))}Filter(e){return new lc(this.GetIterator().filter(e))}Sort(e){return new lc(this.GetIterator().sort(e))}Every(e){return this.GetIterator().every(e)}Some(e){return this.GetIterator().some(e)}IsEmpty(){return this.Count===0}OnGetXml(e){for(let t of this.GetIterator()){let n=t.GetXml();n&&e.appendChild(n)}}OnLoadXml(e){let t=this.GetStatic();if(!t.parser)throw new Fe(Te.XML_EXCEPTION,`${t.localName} doesn't have required 'parser' in @XmlElement`);for(let n=0;n<e.childNodes.length;n++){let s=e.childNodes.item(n);if(!(oi(s)&&s.localName===t.parser.localName&&s.namespaceURI==t.namespaceURI))continue;let i=s,a=new t.parser;a.LoadXml(i),this.Add(a)}}};var Zp=class extends lc{static{o(this,"NamespaceManager")}Add(e){e.prefix=e.prefix||"",e.namespace=e.namespace||"",super.Add(e)}GetPrefix(e,t=this.Count-1){let n=this.Count-1;e=e||"",t>n&&(t=n);for(let s=t;s>=0;s--){let i=this.items[s];if(i.prefix===e)return i}return null}GetNamespace(e,t=this.Count-1){let n=this.Count-1;e=e||"",t>n&&(t=n);for(let s=t;s>=0;s--){let i=this.items[s];if(i.namespace===e)return i}return null}};var _ue="[object ArrayBuffer]",mt=class d_{static{o(this,"BufferSourceConverter")}static isArrayBuffer(e){return Object.prototype.toString.call(e)===_ue}static toArrayBuffer(e){return this.isArrayBuffer(e)?e:e.byteLength===e.buffer.byteLength||e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:this.toUint8Array(e.buffer).slice(e.byteOffset,e.byteOffset+e.byteLength).buffer}static toUint8Array(e){return this.toView(e,Uint8Array)}static toView(e,t){if(e.constructor===t)return e;if(this.isArrayBuffer(e))return new t(e);if(this.isArrayBufferView(e))return new t(e.buffer,e.byteOffset,e.byteLength);throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'")}static isBufferSource(e){return this.isArrayBufferView(e)||this.isArrayBuffer(e)}static isArrayBufferView(e){return ArrayBuffer.isView(e)||e&&this.isArrayBuffer(e.buffer)}static isEqual(e,t){let n=d_.toUint8Array(e),s=d_.toUint8Array(t);if(n.length!==s.byteLength)return!1;for(let i=0;i<n.length;i++)if(n[i]!==s[i])return!1;return!0}static concat(...e){let t;Array.isArray(e[0])&&!(e[1]instanceof Function)||Array.isArray(e[0])&&e[1]instanceof Function?t=e[0]:e[e.length-1]instanceof Function?t=e.slice(0,e.length-1):t=e;let n=0;for(let a of t)n+=a.byteLength;let s=new Uint8Array(n),i=0;for(let a of t){let u=this.toUint8Array(a);s.set(u,i),i+=u.length}return e[e.length-1]instanceof Function?this.toView(s,e[e.length-1]):s.buffer}},p_="string",Bue=/^[0-9a-f\s]+$/i,Due=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,Rue=/^[a-zA-Z0-9-_]+$/,eM=class{static{o(this,"Utf8Converter")}static fromString(e){let t=unescape(encodeURIComponent(e)),n=new Uint8Array(t.length);for(let s=0;s<t.length;s++)n[s]=t.charCodeAt(s);return n.buffer}static toString(e){let t=mt.toUint8Array(e),n="";for(let i=0;i<t.length;i++)n+=String.fromCharCode(t[i]);return decodeURIComponent(escape(n))}},Za=class{static{o(this,"Utf16Converter")}static toString(e,t=!1){let n=mt.toArrayBuffer(e),s=new DataView(n),i="";for(let a=0;a<n.byteLength;a+=2){let u=s.getUint16(a,t);i+=String.fromCharCode(u)}return i}static fromString(e,t=!1){let n=new ArrayBuffer(e.length*2),s=new DataView(n);for(let i=0;i<e.length;i++)s.setUint16(i*2,e.charCodeAt(i),t);return n}},Et=class ed{static{o(this,"Convert")}static isHex(e){return typeof e===p_&&Bue.test(e)}static isBase64(e){return typeof e===p_&&Due.test(e)}static isBase64Url(e){return typeof e===p_&&Rue.test(e)}static ToString(e,t="utf8"){let n=mt.toUint8Array(e);switch(t.toLowerCase()){case"utf8":return this.ToUtf8String(n);case"binary":return this.ToBinary(n);case"hex":return this.ToHex(n);case"base64":return this.ToBase64(n);case"base64url":return this.ToBase64Url(n);case"utf16le":return Za.toString(n,!0);case"utf16":case"utf16be":return Za.toString(n);default:throw new Error(`Unknown type of encoding '${t}'`)}}static FromString(e,t="utf8"){if(!e)return new ArrayBuffer(0);switch(t.toLowerCase()){case"utf8":return this.FromUtf8String(e);case"binary":return this.FromBinary(e);case"hex":return this.FromHex(e);case"base64":return this.FromBase64(e);case"base64url":return this.FromBase64Url(e);case"utf16le":return Za.fromString(e,!0);case"utf16":case"utf16be":return Za.fromString(e);default:throw new Error(`Unknown type of encoding '${t}'`)}}static ToBase64(e){let t=mt.toUint8Array(e);if(typeof btoa<"u"){let n=this.ToString(t,"binary");return btoa(n)}else return Buffer.from(t).toString("base64")}static FromBase64(e){let t=this.formatString(e);if(!t)return new ArrayBuffer(0);if(!ed.isBase64(t))throw new TypeError("Argument 'base64Text' is not Base64 encoded");return typeof atob<"u"?this.FromBinary(atob(t)):new Uint8Array(Buffer.from(t,"base64")).buffer}static FromBase64Url(e){let t=this.formatString(e);if(!t)return new ArrayBuffer(0);if(!ed.isBase64Url(t))throw new TypeError("Argument 'base64url' is not Base64Url encoded");return this.FromBase64(this.Base64Padding(t.replace(/\-/g,"+").replace(/\_/g,"/")))}static ToBase64Url(e){return this.ToBase64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}static FromUtf8String(e,t=ed.DEFAULT_UTF8_ENCODING){switch(t){case"ascii":return this.FromBinary(e);case"utf8":return eM.fromString(e);case"utf16":case"utf16be":return Za.fromString(e);case"utf16le":case"usc2":return Za.fromString(e,!0);default:throw new Error(`Unknown type of encoding '${t}'`)}}static ToUtf8String(e,t=ed.DEFAULT_UTF8_ENCODING){switch(t){case"ascii":return this.ToBinary(e);case"utf8":return eM.toString(e);case"utf16":case"utf16be":return Za.toString(e);case"utf16le":case"usc2":return Za.toString(e,!0);default:throw new Error(`Unknown type of encoding '${t}'`)}}static FromBinary(e){let t=e.length,n=new Uint8Array(t);for(let s=0;s<t;s++)n[s]=e.charCodeAt(s);return n.buffer}static ToBinary(e){let t=mt.toUint8Array(e),n="";for(let s=0;s<t.length;s++)n+=String.fromCharCode(t[s]);return n}static ToHex(e){let t=mt.toUint8Array(e),n="",s=t.length;for(let i=0;i<s;i++){let a=t[i];a<16&&(n+="0"),n+=a.toString(16)}return n}static FromHex(e){let t=this.formatString(e);if(!t)return new ArrayBuffer(0);if(!ed.isHex(t))throw new TypeError("Argument 'hexString' is not HEX encoded");t.length%2&&(t=`0${t}`);let n=new Uint8Array(t.length/2);for(let s=0;s<t.length;s=s+2){let i=t.slice(s,s+2);n[s/2]=parseInt(i,16)}return n.buffer}static ToUtf16String(e,t=!1){return Za.toString(e,t)}static FromUtf16String(e,t=!1){return Za.fromString(e,t)}static Base64Padding(e){let t=4-e.length%4;if(t<4)for(let n=0;n<t;n++)e+="=";return e}static formatString(e){return e?.replace(/[\n\r\t ]/g,"")||""}};Et.DEFAULT_UTF8_ENCODING="utf8";function B(r,e,t){var n;return r instanceof Object&&(n=r[e])!==null&&n!==void 0?n:t}o(B,"getParametersValue");function wb(r,e=0,t=r.byteLength-e,n=!1){let s="";for(let i of new Uint8Array(r,e,t)){let a=i.toString(16).toUpperCase();a.length===1&&(s+="0"),s+=a,n&&(s+=" ")}return s.trim()}o(wb,"bufferToHexCodes");function Uo(r,e){let t=0;if(r.length===1)return r[0];for(let n=r.length-1;n>=0;n--)t+=r[r.length-1-n]*Math.pow(2,e*n);return t}o(Uo,"utilFromBase");function aa(r,e,t=-1){let n=t,s=r,i=0,a=Math.pow(2,e);for(let u=1;u<8;u++){if(r<a){let c;if(n<0)c=new ArrayBuffer(u),i=u;else{if(n<u)return new ArrayBuffer(0);c=new ArrayBuffer(n),i=n}let f=new Uint8Array(c);for(let h=u-1;h>=0;h--){let m=Math.pow(2,h*e);f[i-h-1]=Math.floor(s/m),s-=f[i-h-1]*m}return c}a*=Math.pow(2,e)}return new ArrayBuffer(0)}o(aa,"utilToBase");function Yl(...r){let e=0,t=0;for(let i of r)e+=i.byteLength;let n=new ArrayBuffer(e),s=new Uint8Array(n);for(let i of r)s.set(new Uint8Array(i),t),t+=i.byteLength;return n}o(Yl,"utilConcatBuf");function Sb(...r){let e=0,t=0;for(let i of r)e+=i.length;let n=new ArrayBuffer(e),s=new Uint8Array(n);for(let i of r)s.set(i,t),t+=i.length;return s}o(Sb,"utilConcatView");function m_(){let r=new Uint8Array(this.valueHex);if(this.valueHex.byteLength>=2){let u=r[0]===255&&r[1]&128,c=r[0]===0&&(r[1]&128)===0;(u||c)&&this.warnings.push("Needlessly long format")}let e=new ArrayBuffer(this.valueHex.byteLength),t=new Uint8Array(e);for(let u=0;u<this.valueHex.byteLength;u++)t[u]=0;t[0]=r[0]&128;let n=Uo(t,8),s=new ArrayBuffer(this.valueHex.byteLength),i=new Uint8Array(s);for(let u=0;u<this.valueHex.byteLength;u++)i[u]=r[u];return i[0]&=127,Uo(i,8)-n}o(m_,"utilDecodeTC");function rM(r){let e=r<0?r*-1:r,t=128;for(let n=1;n<8;n++){if(e<=t){if(r<0){let a=t-e,u=aa(a,8,n),c=new Uint8Array(u);return c[0]|=128,u}let s=aa(e,8,n),i=new Uint8Array(s);if(i[0]&128){let a=s.slice(0),u=new Uint8Array(a);s=new ArrayBuffer(s.byteLength+1),i=new Uint8Array(s);for(let c=0;c<a.byteLength;c++)i[c+1]=u[c];i[0]=0}return s}t*=Math.pow(2,8)}return new ArrayBuffer(0)}o(rM,"utilEncodeTC");function fc(r,e){if(r.byteLength!==e.byteLength)return!1;let t=new Uint8Array(r),n=new Uint8Array(e);for(let s=0;s<t.length;s++)if(t[s]!==n[s])return!1;return!0}o(fc,"isEqualBuffer");function Fs(r,e){let t=r.toString(10);if(e<t.length)return"";let n=e-t.length,s=new Array(n);for(let a=0;a<n;a++)s[a]="0";return s.join("").concat(t)}o(Fs,"padNumber");var nM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",sM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=";function bb(r,e=!1,t=!1,n=!1){let s=0,i=0,a=0,u="",c=e?sM:nM;if(n){let f=0;for(let h=0;h<r.length;h++)if(r.charCodeAt(h)!==0){f=h;break}r=r.slice(f)}for(;s<r.length;){let f=r.charCodeAt(s++);s>=r.length&&(i=1);let h=r.charCodeAt(s++);s>=r.length&&(a=1);let m=r.charCodeAt(s++),g=f>>2,x=(f&3)<<4|h>>4,v=(h&15)<<2|m>>6,w=m&63;i===1?v=w=64:a===1&&(w=64),t?v===64?u+=`${c.charAt(g)}${c.charAt(x)}`:w===64?u+=`${c.charAt(g)}${c.charAt(x)}${c.charAt(v)}`:u+=`${c.charAt(g)}${c.charAt(x)}${c.charAt(v)}${c.charAt(w)}`:u+=`${c.charAt(g)}${c.charAt(x)}${c.charAt(v)}${c.charAt(w)}`}return u}o(bb,"toBase64");function td(r,e=!1,t=!1){let n=e?sM:nM;function s(c){for(let f=0;f<64;f++)if(n.charAt(f)===c)return f;return 64}o(s,"indexOf");function i(c){return c===64?0:c}o(i,"test");let a=0,u="";for(;a<r.length;){let c=s(r.charAt(a++)),f=a>=r.length?0:s(r.charAt(a++)),h=a>=r.length?0:s(r.charAt(a++)),m=a>=r.length?0:s(r.charAt(a++)),g=i(c)<<2|i(f)>>4,x=(i(f)&15)<<4|i(h)>>2,v=(i(h)&3)<<6|i(m);u+=String.fromCharCode(g),h!==64&&(u+=String.fromCharCode(x)),m!==64&&(u+=String.fromCharCode(v))}if(t){let c=u.length,f=-1;for(let h=c-1;h>=0;h--)if(u.charCodeAt(h)!==0){f=h;break}f!==-1?u=u.slice(0,f+1):u=""}return u}o(td,"fromBase64");function zg(r){let e="",t=new Uint8Array(r);for(let n of t)e+=String.fromCharCode(n);return e}o(zg,"arrayBufferToString");function Ql(r){let e=r.length,t=new ArrayBuffer(e),n=new Uint8Array(t);for(let s=0;s<e;s++)n[s]=r.charCodeAt(s);return t}o(Ql,"stringToArrayBuffer");var Pue=Math.log(2);function iM(r){let e=Math.log(r)/Pue,t=Math.floor(e),n=Math.round(e);return t===n?t:n}o(iM,"nearestPowerOf2");function De(r,e){for(let t of e)delete r[t]}o(De,"clearProps");function Eb(){if(typeof BigInt>"u")throw new Error("BigInt is not defined. Your environment doesn't implement BigInt.")}o(Eb,"assertBigInt");function x_(r){let e=0,t=0;for(let s=0;s<r.length;s++){let i=r[s];e+=i.byteLength}let n=new Uint8Array(e);for(let s=0;s<r.length;s++){let i=r[s];n.set(new Uint8Array(i),t),t+=i.byteLength}return n.buffer}o(x_,"concat");function jo(r,e,t,n){return e instanceof Uint8Array?e.byteLength?t<0?(r.error="Wrong parameter: inputOffset less than zero",!1):n<0?(r.error="Wrong parameter: inputLength less than zero",!1):e.byteLength-t-n<0?(r.error="End of input reached before message was fully decoded (inconsistent offset and length values)",!1):!0:(r.error="Wrong parameter: inputBuffer has zero length",!1):(r.error="Wrong parameter: inputBuffer must be 'Uint8Array'",!1)}o(jo,"checkBufferParams");var w_=class{static{o(this,"ViewWriter")}constructor(){this.items=[]}write(e){this.items.push(e)}final(){return x_(this.items)}},Jg=[new Uint8Array([1])],oM="0123456789",g_="name",uM="valueHexView",Oue="isHexOnly",kue="idBlock",Lue="tagClass",Vue="tagNumber",Uue="isConstructed",jue="fromBER",Mue="toBER",Fue="local",qs="",oa=new ArrayBuffer(0),Ab=new Uint8Array(0),Qg="EndOfContent",lM="OCTET STRING",fM="BIT STRING";function Mo(r){var e;return e=class extends r{static{o(this,"Some")}get valueHex(){return this.valueHexView.slice().buffer}set valueHex(n){this.valueHexView=new Uint8Array(n)}constructor(...n){var s;super(...n);let i=n[0]||{};this.isHexOnly=(s=i.isHexOnly)!==null&&s!==void 0?s:!1,this.valueHexView=i.valueHex?mt.toUint8Array(i.valueHex):Ab}fromBER(n,s,i){let a=n instanceof ArrayBuffer?new Uint8Array(n):n;if(!jo(this,a,s,i))return-1;let u=s+i;return this.valueHexView=a.subarray(s,u),this.valueHexView.length?(this.blockLength=i,u):(this.warnings.push("Zero buffer length"),s)}toBER(n=!1){return this.isHexOnly?n?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",oa)}toJSON(){return{...super.toJSON(),isHexOnly:this.isHexOnly,valueHex:Et.ToHex(this.valueHexView)}}},e.NAME="hexBlock",e}o(Mo,"HexBlock");var Zl=class{static{o(this,"LocalBaseBlock")}static blockName(){return this.NAME}get valueBeforeDecode(){return this.valueBeforeDecodeView.slice().buffer}set valueBeforeDecode(e){this.valueBeforeDecodeView=new Uint8Array(e)}constructor({blockLength:e=0,error:t=qs,warnings:n=[],valueBeforeDecode:s=Ab}={}){this.blockLength=e,this.error=t,this.warnings=n,this.valueBeforeDecodeView=mt.toUint8Array(s)}toJSON(){return{blockName:this.constructor.NAME,blockLength:this.blockLength,error:this.error,warnings:this.warnings,valueBeforeDecode:Et.ToHex(this.valueBeforeDecodeView)}}};Zl.NAME="baseBlock";var Hs=class extends Zl{static{o(this,"ValueBlock")}fromBER(e,t,n){throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'")}toBER(e,t){throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'")}};Hs.NAME="valueBlock";var hM=class extends Mo(Zl){static{o(this,"LocalIdentificationBlock")}constructor({idBlock:e={}}={}){var t,n,s,i;super(),e?(this.isHexOnly=(t=e.isHexOnly)!==null&&t!==void 0?t:!1,this.valueHexView=e.valueHex?mt.toUint8Array(e.valueHex):Ab,this.tagClass=(n=e.tagClass)!==null&&n!==void 0?n:-1,this.tagNumber=(s=e.tagNumber)!==null&&s!==void 0?s:-1,this.isConstructed=(i=e.isConstructed)!==null&&i!==void 0?i:!1):(this.tagClass=-1,this.tagNumber=-1,this.isConstructed=!1)}toBER(e=!1){let t=0;switch(this.tagClass){case 1:t|=0;break;case 2:t|=64;break;case 3:t|=128;break;case 4:t|=192;break;default:return this.error="Unknown tag class",oa}if(this.isConstructed&&(t|=32),this.tagNumber<31&&!this.isHexOnly){let s=new Uint8Array(1);if(!e){let i=this.tagNumber;i&=31,t|=i,s[0]=t}return s.buffer}if(!this.isHexOnly){let s=aa(this.tagNumber,7),i=new Uint8Array(s),a=s.byteLength,u=new Uint8Array(a+1);if(u[0]=t|31,!e){for(let c=0;c<a-1;c++)u[c+1]=i[c]|128;u[a]=i[a-1]}return u.buffer}let n=new Uint8Array(this.valueHexView.byteLength+1);if(n[0]=t|31,!e){let s=this.valueHexView;for(let i=0;i<s.length-1;i++)n[i+1]=s[i]|128;n[this.valueHexView.byteLength]=s[s.length-1]}return n.buffer}fromBER(e,t,n){let s=mt.toUint8Array(e);if(!jo(this,s,t,n))return-1;let i=s.subarray(t,t+n);if(i.length===0)return this.error="Zero buffer length",-1;switch(i[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=(i[0]&32)===32,this.isHexOnly=!1;let u=i[0]&31;if(u!==31)this.tagNumber=u,this.blockLength=1;else{let c=1,f=this.valueHexView=new Uint8Array(255),h=255;for(;i[c]&128;){if(f[c-1]=i[c]&127,c++,c>=i.length)return this.error="End of input reached before message was fully decoded",-1;if(c===h){h+=255;let g=new Uint8Array(h);for(let x=0;x<f.length;x++)g[x]=f[x];f=this.valueHexView=new Uint8Array(h)}}this.blockLength=c+1,f[c-1]=i[c]&127;let m=new Uint8Array(c);for(let g=0;g<c;g++)m[g]=f[g];f=this.valueHexView=new Uint8Array(c),f.set(m),this.blockLength<=9?this.tagNumber=Uo(f,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 t+this.blockLength}toJSON(){return{...super.toJSON(),tagClass:this.tagClass,tagNumber:this.tagNumber,isConstructed:this.isConstructed}}};hM.NAME="identificationBlock";var pM=class extends Zl{static{o(this,"LocalLengthBlock")}constructor({lenBlock:e={}}={}){var t,n,s;super(),this.isIndefiniteForm=(t=e.isIndefiniteForm)!==null&&t!==void 0?t:!1,this.longFormUsed=(n=e.longFormUsed)!==null&&n!==void 0?n:!1,this.length=(s=e.length)!==null&&s!==void 0?s:0}fromBER(e,t,n){let s=mt.toUint8Array(e);if(!jo(this,s,t,n))return-1;let i=s.subarray(t,t+n);if(i.length===0)return this.error="Zero buffer length",-1;if(i[0]===255)return this.error="Length block 0xFF is reserved by standard",-1;if(this.isIndefiniteForm=i[0]===128,this.isIndefiniteForm)return this.blockLength=1,t+this.blockLength;if(this.longFormUsed=!!(i[0]&128),this.longFormUsed===!1)return this.length=i[0],this.blockLength=1,t+this.blockLength;let a=i[0]&127;if(a>8)return this.error="Too big integer",-1;if(a+1>i.length)return this.error="End of input reached before message was fully decoded",-1;let u=t+1,c=s.subarray(u,u+a);return c[a-1]===0&&this.warnings.push("Needlessly long encoded length"),this.length=Uo(c,8),this.longFormUsed&&this.length<=127&&this.warnings.push("Unnecessary usage of long length form"),this.blockLength=a+1,t+this.blockLength}toBER(e=!1){let t,n;if(this.length>127&&(this.longFormUsed=!0),this.isIndefiniteForm)return t=new ArrayBuffer(1),e===!1&&(n=new Uint8Array(t),n[0]=128),t;if(this.longFormUsed){let s=aa(this.length,8);if(s.byteLength>127)return this.error="Too big length",oa;if(t=new ArrayBuffer(s.byteLength+1),e)return t;let i=new Uint8Array(s);n=new Uint8Array(t),n[0]=s.byteLength|128;for(let a=0;a<s.byteLength;a++)n[a+1]=i[a];return t}return t=new ArrayBuffer(1),e===!1&&(n=new Uint8Array(t),n[0]=this.length),t}toJSON(){return{...super.toJSON(),isIndefiniteForm:this.isIndefiniteForm,longFormUsed:this.longFormUsed,length:this.length}}};pM.NAME="lengthBlock";var ut={},Ss=class extends Zl{static{o(this,"BaseBlock")}constructor({name:e=qs,optional:t=!1,primitiveSchema:n,...s}={},i){super(s),this.name=e,this.optional=t,n&&(this.primitiveSchema=n),this.idBlock=new hM(s),this.lenBlock=new pM(s),this.valueBlock=i?new i(s):new Hs(s)}fromBER(e,t,n){let s=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?n:this.lenBlock.length);return s===-1?(this.error=this.valueBlock.error,s):(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),s)}toBER(e,t){let n=t||new w_;t||dM(this);let s=this.idBlock.toBER(e);if(n.write(s),this.lenBlock.isIndefiniteForm)n.write(new Uint8Array([128]).buffer),this.valueBlock.toBER(e,n),n.write(new ArrayBuffer(2));else{let i=this.valueBlock.toBER(e);this.lenBlock.length=i.byteLength;let a=this.lenBlock.toBER(e);n.write(a),n.write(i)}return t?oa:n.final()}toJSON(){let e={...super.toJSON(),idBlock:this.idBlock.toJSON(),lenBlock:this.lenBlock.toJSON(),valueBlock:this.valueBlock.toJSON(),name:this.name,optional:this.optional};return this.primitiveSchema&&(e.primitiveSchema=this.primitiveSchema.toJSON()),e}toString(e="ascii"){return e==="ascii"?this.onAsciiEncoding():Et.ToHex(this.toBER())}onAsciiEncoding(){let e=this.constructor.NAME,t=Et.ToHex(this.valueBlock.valueBeforeDecodeView);return`${e} : ${t}`}isEqual(e){if(this===e)return!0;if(!(e instanceof this.constructor))return!1;let t=this.toBER(),n=e.toBER();return fc(t,n)}};Ss.NAME="BaseBlock";function dM(r){var e;if(r instanceof ut.Constructed)for(let t of r.valueBlock.value)dM(t)&&(r.lenBlock.isIndefiniteForm=!0);return!!(!((e=r.lenBlock)===null||e===void 0)&&e.isIndefiniteForm)}o(dM,"prepareIndefiniteForm");var mM=class extends Ss{static{o(this,"BaseStringBlock")}getValue(){return this.valueBlock.value}setValue(e){this.valueBlock.value=e}constructor({value:e=qs,...t}={},n){super(t,n),e&&this.fromString(e)}fromBER(e,t,n){let s=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?n:this.lenBlock.length);return s===-1?(this.error=this.valueBlock.error,s):(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),s)}onAsciiEncoding(){return`${this.constructor.NAME} : '${this.valueBlock.value}'`}};mM.NAME="BaseStringBlock";var gM=class extends Mo(Hs){static{o(this,"LocalPrimitiveValueBlock")}constructor({isHexOnly:e=!0,...t}={}){super(t),this.isHexOnly=e}};gM.NAME="PrimitiveValueBlock";var vM,vt=class extends Ss{static{o(this,"Primitive")}constructor(e={}){super(e,gM),this.idBlock.isConstructed=!1}};vM=vt;ut.Primitive=vM;vt.NAME="PRIMITIVE";function que(r,e){if(r instanceof e)return r;let t=new e;return t.idBlock=r.idBlock,t.lenBlock=r.lenBlock,t.warnings=r.warnings,t.valueBeforeDecodeView=r.valueBeforeDecodeView,t}o(que,"localChangeType");function Zg(r,e=0,t=r.length){let n=e,s=new Ss({},Hs),i=new Zl;if(!jo(i,r,e,t))return s.error=i.error,{offset:-1,result:s};if(!r.subarray(e,e+t).length)return s.error="Zero buffer length",{offset:-1,result:s};let u=s.idBlock.fromBER(r,e,t);if(s.idBlock.warnings.length&&s.warnings.concat(s.idBlock.warnings),u===-1)return s.error=s.idBlock.error,{offset:-1,result:s};if(e=u,t-=s.idBlock.blockLength,u=s.lenBlock.fromBER(r,e,t),s.lenBlock.warnings.length&&s.warnings.concat(s.lenBlock.warnings),u===-1)return s.error=s.lenBlock.error,{offset:-1,result:s};if(e=u,t-=s.lenBlock.blockLength,!s.idBlock.isConstructed&&s.lenBlock.isIndefiniteForm)return s.error="Indefinite length form used for primitive encoding form",{offset:-1,result:s};let c=Ss;switch(s.idBlock.tagClass){case 1:if(s.idBlock.tagNumber>=37&&s.idBlock.isHexOnly===!1)return s.error="UNIVERSAL 37 and upper tags are reserved by ASN.1 standard",{offset:-1,result:s};switch(s.idBlock.tagNumber){case 0:if(s.idBlock.isConstructed&&s.lenBlock.length>0)return s.error="Type [UNIVERSAL 0] is reserved",{offset:-1,result:s};c=ut.EndOfContent;break;case 1:c=ut.Boolean;break;case 2:c=ut.Integer;break;case 3:c=ut.BitString;break;case 4:c=ut.OctetString;break;case 5:c=ut.Null;break;case 6:c=ut.ObjectIdentifier;break;case 10:c=ut.Enumerated;break;case 12:c=ut.Utf8String;break;case 13:c=ut.RelativeObjectIdentifier;break;case 14:c=ut.TIME;break;case 15:return s.error="[UNIVERSAL 15] is reserved by ASN.1 standard",{offset:-1,result:s};case 16:c=ut.Sequence;break;case 17:c=ut.Set;break;case 18:c=ut.NumericString;break;case 19:c=ut.PrintableString;break;case 20:c=ut.TeletexString;break;case 21:c=ut.VideotexString;break;case 22:c=ut.IA5String;break;case 23:c=ut.UTCTime;break;case 24:c=ut.GeneralizedTime;break;case 25:c=ut.GraphicString;break;case 26:c=ut.VisibleString;break;case 27:c=ut.GeneralString;break;case 28:c=ut.UniversalString;break;case 29:c=ut.CharacterString;break;case 30:c=ut.BmpString;break;case 31:c=ut.DATE;break;case 32:c=ut.TimeOfDay;break;case 33:c=ut.DateTime;break;case 34:c=ut.Duration;break;default:{let f=s.idBlock.isConstructed?new ut.Constructed:new ut.Primitive;f.idBlock=s.idBlock,f.lenBlock=s.lenBlock,f.warnings=s.warnings,s=f}}break;case 2:case 3:case 4:default:c=s.idBlock.isConstructed?ut.Constructed:ut.Primitive}return s=que(s,c),u=s.fromBER(r,e,s.lenBlock.isIndefiniteForm?t:s.lenBlock.length),s.valueBeforeDecodeView=r.subarray(n,n+s.blockLength),{offset:u,result:s}}o(Zg,"localFromBER");function Gr(r){if(!r.byteLength){let e=new Ss({},Hs);return e.error="Input buffer has zero length",{offset:-1,result:e}}return Zg(mt.toUint8Array(r).slice(),0,r.byteLength)}o(Gr,"fromBER");function Hue(r,e){return r?1:e}o(Hue,"checkLen");var hc=class extends Hs{static{o(this,"LocalConstructedValueBlock")}constructor({value:e=[],isIndefiniteForm:t=!1,...n}={}){super(n),this.value=e,this.isIndefiniteForm=t}fromBER(e,t,n){let s=mt.toUint8Array(e);if(!jo(this,s,t,n))return-1;if(this.valueBeforeDecodeView=s.subarray(t,t+n),this.valueBeforeDecodeView.length===0)return this.warnings.push("Zero buffer length"),t;let i=t;for(;Hue(this.isIndefiniteForm,n)>0;){let a=Zg(s,i,n);if(a.offset===-1)return this.error=a.result.error,this.warnings.concat(a.result.warnings),-1;if(i=a.offset,this.blockLength+=a.result.blockLength,n-=a.result.blockLength,this.value.push(a.result),this.isIndefiniteForm&&a.result.constructor.NAME===Qg)break}return this.isIndefiniteForm&&(this.value[this.value.length-1].constructor.NAME===Qg?this.value.pop():this.warnings.push("No EndOfContent block encoded")),i}toBER(e,t){let n=t||new w_;for(let s=0;s<this.value.length;s++)this.value[s].toBER(e,n);return t?oa:n.final()}toJSON(){let e={...super.toJSON(),isIndefiniteForm:this.isIndefiniteForm,value:[]};for(let t of this.value)e.value.push(t.toJSON());return e}};hc.NAME="ConstructedValueBlock";var yM,oe=class extends Ss{static{o(this,"Constructed")}constructor(e={}){super(e,hc),this.idBlock.isConstructed=!0}fromBER(e,t,n){this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm;let s=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?n:this.lenBlock.length);return s===-1?(this.error=this.valueBlock.error,s):(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),s)}onAsciiEncoding(){let e=[];for(let n of this.valueBlock.value)e.push(n.toString("ascii").split(`
91
+ `).map(s=>` ${s}`).join(`
92
+ `));let t=this.idBlock.tagClass===3?`[${this.idBlock.tagNumber}]`:this.constructor.NAME;return e.length?`${t} :
93
+ ${e.join(`
94
+ `)}`:`${t} :`}};yM=oe;ut.Constructed=yM;oe.NAME="CONSTRUCTED";var xM=class extends Hs{static{o(this,"LocalEndOfContentValueBlock")}fromBER(e,t,n){return t}toBER(e){return oa}};xM.override="EndOfContentValueBlock";var wM,SM=class extends Ss{static{o(this,"EndOfContent")}constructor(e={}){super(e,xM),this.idBlock.tagClass=1,this.idBlock.tagNumber=0}};wM=SM;ut.EndOfContent=wM;SM.NAME=Qg;var bM,Xr=class extends Ss{static{o(this,"Null")}constructor(e={}){super(e,Hs),this.idBlock.tagClass=1,this.idBlock.tagNumber=5}fromBER(e,t,n){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+=n,t+n>e.byteLength?(this.error="End of input reached before message was fully decoded (inconsistent offset and length values)",-1):t+n}toBER(e,t){let n=new ArrayBuffer(2);if(!e){let s=new Uint8Array(n);s[0]=5,s[1]=0}return t&&t.write(n),n}onAsciiEncoding(){return`${this.constructor.NAME}`}};bM=Xr;ut.Null=bM;Xr.NAME="NULL";var EM=class extends Mo(Hs){static{o(this,"LocalBooleanValueBlock")}get value(){for(let e of this.valueHexView)if(e>0)return!0;return!1}set value(e){this.valueHexView[0]=e?255:0}constructor({value:e,...t}={}){super(t),t.valueHex?this.valueHexView=mt.toUint8Array(t.valueHex):this.valueHexView=new Uint8Array(1),e&&(this.value=e)}fromBER(e,t,n){let s=mt.toUint8Array(e);return jo(this,s,t,n)?(this.valueHexView=s.subarray(t,t+n),n>1&&this.warnings.push("Boolean value encoded in more then 1 octet"),this.isHexOnly=!0,m_.call(this),this.blockLength=n,t+n):-1}toBER(){return this.valueHexView.slice()}toJSON(){return{...super.toJSON(),value:this.value}}};EM.NAME="BooleanValueBlock";var AM,ua=class extends Ss{static{o(this,"Boolean")}getValue(){return this.valueBlock.value}setValue(e){this.valueBlock.value=e}constructor(e={}){super(e,EM),this.idBlock.tagClass=1,this.idBlock.tagNumber=1}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.getValue}`}};AM=ua;ut.Boolean=AM;ua.NAME="BOOLEAN";var CM=class extends Mo(hc){static{o(this,"LocalOctetStringValueBlock")}constructor({isConstructed:e=!1,...t}={}){super(t),this.isConstructed=e}fromBER(e,t,n){let s=0;if(this.isConstructed){if(this.isHexOnly=!1,s=hc.prototype.fromBER.call(this,e,t,n),s===-1)return s;for(let i=0;i<this.value.length;i++){let a=this.value[i].constructor.NAME;if(a===Qg){if(this.isIndefiniteForm)break;return this.error="EndOfContent is unexpected, OCTET STRING may consists of OCTET STRINGs only",-1}if(a!==lM)return this.error="OCTET STRING may consists of OCTET STRINGs only",-1}}else this.isHexOnly=!0,s=super.fromBER(e,t,n),this.blockLength=n;return s}toBER(e,t){return this.isConstructed?hc.prototype.toBER.call(this,e,t):e?new ArrayBuffer(this.valueHexView.byteLength):this.valueHexView.slice().buffer}toJSON(){return{...super.toJSON(),isConstructed:this.isConstructed}}};CM.NAME="OctetStringValueBlock";var S_,Ve=class extends Ss{static{o(this,"OctetString")}constructor({idBlock:e={},lenBlock:t={},...n}={}){var s,i;(s=n.isConstructed)!==null&&s!==void 0||(n.isConstructed=!!(!((i=n.value)===null||i===void 0)&&i.length)),super({idBlock:{isConstructed:n.isConstructed,...e},lenBlock:{...t,isIndefiniteForm:!!n.isIndefiniteForm},...n},CM),this.idBlock.tagClass=1,this.idBlock.tagNumber=4}fromBER(e,t,n){if(this.valueBlock.isConstructed=this.idBlock.isConstructed,this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm,n===0)return this.idBlock.error.length===0&&(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length===0&&(this.blockLength+=this.lenBlock.blockLength),t;if(!this.valueBlock.isConstructed){let i=(e instanceof ArrayBuffer?new Uint8Array(e):e).subarray(t,t+n);try{if(i.byteLength){let a=Zg(i,0,i.byteLength);a.offset!==-1&&a.offset===n&&(this.valueBlock.value=[a.result])}}catch{}}return super.fromBER(e,t,n)}onAsciiEncoding(){if(this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length)return oe.prototype.onAsciiEncoding.call(this);let e=this.constructor.NAME,t=Et.ToHex(this.valueBlock.valueHexView);return`${e} : ${t}`}getValue(){if(!this.idBlock.isConstructed)return this.valueBlock.valueHexView.slice().buffer;let e=[];for(let t of this.valueBlock.value)t instanceof S_&&e.push(t.valueBlock.valueHexView);return mt.concat(e)}};S_=Ve;ut.OctetString=S_;Ve.NAME=lM;var NM=class extends Mo(hc){static{o(this,"LocalBitStringValueBlock")}constructor({unusedBits:e=0,isConstructed:t=!1,...n}={}){super(n),this.unusedBits=e,this.isConstructed=t,this.blockLength=this.valueHexView.byteLength}fromBER(e,t,n){if(!n)return t;let s=-1;if(this.isConstructed){if(s=hc.prototype.fromBER.call(this,e,t,n),s===-1)return s;for(let u of this.value){let c=u.constructor.NAME;if(c===Qg){if(this.isIndefiniteForm)break;return this.error="EndOfContent is unexpected, BIT STRING may consists of BIT STRINGs only",-1}if(c!==fM)return this.error="BIT STRING may consists of BIT STRINGs only",-1;let f=u.valueBlock;if(this.unusedBits>0&&f.unusedBits>0)return this.error='Using of "unused bits" inside constructive BIT STRING allowed for least one only',-1;this.unusedBits=f.unusedBits}return s}let i=mt.toUint8Array(e);if(!jo(this,i,t,n))return-1;let a=i.subarray(t,t+n);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 u=a.subarray(1);try{if(u.byteLength){let c=Zg(u,0,u.byteLength);c.offset!==-1&&c.offset===n-1&&(this.value=[c.result])}}catch{}}return this.valueHexView=a.subarray(1),this.blockLength=a.length,t+n}toBER(e,t){if(this.isConstructed)return hc.prototype.toBER.call(this,e,t);if(e)return new ArrayBuffer(this.valueHexView.byteLength+1);if(!this.valueHexView.byteLength)return oa;let n=new Uint8Array(this.valueHexView.length+1);return n[0]=this.unusedBits,n.set(this.valueHexView,1),n.buffer}toJSON(){return{...super.toJSON(),unusedBits:this.unusedBits,isConstructed:this.isConstructed}}};NM.NAME="BitStringValueBlock";var TM,qt=class extends Ss{static{o(this,"BitString")}constructor({idBlock:e={},lenBlock:t={},...n}={}){var s,i;(s=n.isConstructed)!==null&&s!==void 0||(n.isConstructed=!!(!((i=n.value)===null||i===void 0)&&i.length)),super({idBlock:{isConstructed:n.isConstructed,...e},lenBlock:{...t,isIndefiniteForm:!!n.isIndefiniteForm},...n},NM),this.idBlock.tagClass=1,this.idBlock.tagNumber=3}fromBER(e,t,n){return this.valueBlock.isConstructed=this.idBlock.isConstructed,this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm,super.fromBER(e,t,n)}onAsciiEncoding(){if(this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length)return oe.prototype.onAsciiEncoding.call(this);{let e=[],t=this.valueBlock.valueHexView;for(let a of t)e.push(a.toString(2).padStart(8,"0"));let n=e.join(""),s=this.constructor.NAME,i=n.substring(0,n.length-this.valueBlock.unusedBits);return`${s} : ${i}`}}};TM=qt;ut.BitString=TM;qt.NAME=fM;var IM;function Kue(r,e){let t=new Uint8Array([0]),n=new Uint8Array(r),s=new Uint8Array(e),i=n.slice(0),a=i.length-1,u=s.slice(0),c=u.length-1,f=0,h=c<a?a:c,m=0;for(let g=h;g>=0;g--,m++){switch(!0){case m<u.length:f=i[a-m]+u[c-m]+t[0];break;default:f=i[a-m]+t[0]}switch(t[0]=f/10,!0){case m>=i.length:i=Sb(new Uint8Array([f%10]),i);break;default:i[a-m]=f%10}}return t[0]>0&&(i=Sb(t,i)),i}o(Kue,"viewAdd");function cM(r){if(r>=Jg.length)for(let e=Jg.length;e<=r;e++){let t=new Uint8Array([0]),n=Jg[e-1].slice(0);for(let s=n.length-1;s>=0;s--){let i=new Uint8Array([(n[s]<<1)+t[0]]);t[0]=i[0]/10,n[s]=i[0]%10}t[0]>0&&(n=Sb(t,n)),Jg.push(n)}return Jg[r]}o(cM,"power2");function $ue(r,e){let t=0,n=new Uint8Array(r),s=new Uint8Array(e),i=n.slice(0),a=i.length-1,u=s.slice(0),c=u.length-1,f,h=0;for(let m=c;m>=0;m--,h++)switch(f=i[a-h]-u[c-h]-t,!0){case f<0:t=1,i[a-h]=f+10;break;default:t=0,i[a-h]=f}if(t>0)for(let m=a-c+1;m>=0;m--,h++)if(f=i[a-h]-t,f<0)t=1,i[a-h]=f+10;else{t=0,i[a-h]=f;break}return i.slice()}o($ue,"viewSub");var b_=class extends Mo(Hs){static{o(this,"LocalIntegerValueBlock")}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=m_.call(this)))}constructor({value:e,...t}={}){super(t),this._valueDec=0,t.valueHex&&this.setValueHex(),e!==void 0&&(this.valueDec=e)}set valueDec(e){this._valueDec=e,this.isHexOnly=!1,this.valueHexView=new Uint8Array(rM(e))}get valueDec(){return this._valueDec}fromDER(e,t,n,s=0){let i=this.fromBER(e,t,n);if(i===-1)return i;let a=this.valueHexView;return a[0]===0&&(a[1]&128)!==0?this.valueHexView=a.subarray(1):s!==0&&a.length<s&&(s-a.length>1&&(s=a.length+1),this.valueHexView=a.subarray(s-a.length)),i}toDER(e=!1){let t=this.valueHexView;switch(!0){case(t[0]&128)!==0:{let n=new Uint8Array(this.valueHexView.length+1);n[0]=0,n.set(t,1),this.valueHexView=n}break;case(t[0]===0&&(t[1]&128)===0):this.valueHexView=this.valueHexView.subarray(1);break}return this.toBER(e)}fromBER(e,t,n){let s=super.fromBER(e,t,n);return s===-1||this.setValueHex(),s}toBER(e){return e?new ArrayBuffer(this.valueHexView.length):this.valueHexView.slice().buffer}toJSON(){return{...super.toJSON(),valueDec:this.valueDec}}toString(){let e=this.valueHexView.length*8-1,t=new Uint8Array(this.valueHexView.length*8/3),n=0,s,i=this.valueHexView,a="",u=!1;for(let c=i.byteLength-1;c>=0;c--){s=i[c];for(let f=0;f<8;f++){if((s&1)===1)switch(n){case e:t=$ue(cM(n),t),a="-";break;default:t=Kue(t,cM(n))}n++,s>>=1}}for(let c=0;c<t.length;c++)t[c]&&(u=!0),u&&(a+=oM.charAt(t[c]));return u===!1&&(a+=oM.charAt(0)),a}};IM=b_;b_.NAME="IntegerValueBlock";Object.defineProperty(IM.prototype,"valueHex",{set:o(function(r){this.valueHexView=new Uint8Array(r),this.setValueHex()},"set"),get:o(function(){return this.valueHexView.slice().buffer},"get")});var Yg,ge=class extends Ss{static{o(this,"Integer")}constructor(e={}){super(e,b_),this.idBlock.tagClass=1,this.idBlock.tagNumber=2}toBigInt(){return Eb(),BigInt(this.valueBlock.toString())}static fromBigInt(e){Eb();let t=BigInt(e),n=new w_,s=t.toString(16).replace(/^-/,""),i=new Uint8Array(Et.FromHex(s));if(t<0){let u=new Uint8Array(i.length+(i[0]&128?1:0));u[0]|=128;let f=BigInt(`0x${Et.ToHex(u)}`)+t,h=mt.toUint8Array(Et.FromHex(f.toString(16)));h[0]|=128,n.write(h)}else i[0]&128&&n.write(new Uint8Array([0])),n.write(i);return new Yg({valueHex:n.final()})}convertToDER(){let e=new Yg({valueHex:this.valueBlock.valueHexView});return e.valueBlock.toDER(),e}convertFromDER(){return new Yg({valueHex:this.valueBlock.valueHexView[0]===0?this.valueBlock.valueHexView.subarray(1):this.valueBlock.valueHexView})}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()}`}};Yg=ge;ut.Integer=Yg;ge.NAME="INTEGER";var _M,pc=class extends ge{static{o(this,"Enumerated")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=10}};_M=pc;ut.Enumerated=_M;pc.NAME="ENUMERATED";var v_=class extends Mo(Hs){static{o(this,"LocalSidValueBlock")}constructor({valueDec:e=-1,isFirstSid:t=!1,...n}={}){super(n),this.valueDec=e,this.isFirstSid=t}fromBER(e,t,n){if(!n)return t;let s=mt.toUint8Array(e);if(!jo(this,s,t,n))return-1;let i=s.subarray(t,t+n);this.valueHexView=new Uint8Array(n);for(let u=0;u<n&&(this.valueHexView[u]=i[u]&127,this.blockLength++,(i[u]&128)!==0);u++);let a=new Uint8Array(this.blockLength);for(let u=0;u<this.blockLength;u++)a[u]=this.valueHexView[u];return this.valueHexView=a,(i[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=Uo(this.valueHexView,7):(this.isHexOnly=!0,this.warnings.push("Too big SID for decoding, hex only")),t+this.blockLength)}set valueBigInt(e){Eb();let t=BigInt(e).toString(2);for(;t.length%7;)t="0"+t;let n=new Uint8Array(t.length/7);for(let s=0;s<n.length;s++)n[s]=parseInt(t.slice(s*7,s*7+7),2)+(s+1<n.length?128:0);this.fromBER(n.buffer,0,n.length)}toBER(e){if(this.isHexOnly){if(e)return new ArrayBuffer(this.valueHexView.byteLength);let s=this.valueHexView,i=new Uint8Array(this.blockLength);for(let a=0;a<this.blockLength-1;a++)i[a]=s[a]|128;return i[this.blockLength-1]=s[this.blockLength-1],i.buffer}let t=aa(this.valueDec,7);if(t.byteLength===0)return this.error="Error during encoding SID value",oa;let n=new Uint8Array(t.byteLength);if(!e){let s=new Uint8Array(t),i=t.byteLength-1;for(let a=0;a<i;a++)n[a]=s[a]|128;n[i]=s[i]}return n}toString(){let e="";if(this.isHexOnly)e=Et.ToHex(this.valueHexView);else if(this.isFirstSid){let t=this.valueDec;this.valueDec<=39?e="0.":this.valueDec<=79?(e="1.",t-=40):(e="2.",t-=80),e+=t.toString()}else e=this.valueDec.toString();return e}toJSON(){return{...super.toJSON(),valueDec:this.valueDec,isFirstSid:this.isFirstSid}}};v_.NAME="sidBlock";var BM=class extends Hs{static{o(this,"LocalObjectIdentifierValueBlock")}constructor({value:e=qs,...t}={}){super(t),this.value=[],e&&this.fromString(e)}fromBER(e,t,n){let s=t;for(;n>0;){let i=new v_;if(s=i.fromBER(e,s,n),s===-1)return this.blockLength=0,this.error=i.error,s;this.value.length===0&&(i.isFirstSid=!0),this.blockLength+=i.blockLength,n-=i.blockLength,this.value.push(i)}return s}toBER(e){let t=[];for(let n=0;n<this.value.length;n++){let s=this.value[n].toBER(e);if(s.byteLength===0)return this.error=this.value[n].error,oa;t.push(s)}return x_(t)}fromString(e){this.value=[];let t=0,n=0,s="",i=!1;do if(n=e.indexOf(".",t),n===-1?s=e.substring(t):s=e.substring(t,n),t=n+1,i){let a=this.value[0],u=0;switch(a.valueDec){case 0:break;case 1:u=40;break;case 2:u=80;break;default:this.value=[];return}let c=parseInt(s,10);if(isNaN(c))return;a.valueDec=c+u,i=!1}else{let a=new v_;if(s>Number.MAX_SAFE_INTEGER){Eb();let u=BigInt(s);a.valueBigInt=u}else if(a.valueDec=parseInt(s,10),isNaN(a.valueDec))return;this.value.length||(a.isFirstSid=!0,i=!0),this.value.push(a)}while(n!==-1)}toString(){let e="",t=!1;for(let n=0;n<this.value.length;n++){t=this.value[n].isHexOnly;let s=this.value[n].toString();n!==0&&(e=`${e}.`),t?(s=`{${s}}`,this.value[n].isFirstSid?e=`2.{${s} - 80}`:e+=s):e+=s}return e}toJSON(){let e={...super.toJSON(),value:this.toString(),sidArray:[]};for(let t=0;t<this.value.length;t++)e.sidArray.push(this.value[t].toJSON());return e}};BM.NAME="ObjectIdentifierValueBlock";var DM,nt=class extends Ss{static{o(this,"ObjectIdentifier")}getValue(){return this.valueBlock.toString()}setValue(e){this.valueBlock.fromString(e)}constructor(e={}){super(e,BM),this.idBlock.tagClass=1,this.idBlock.tagNumber=6}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()||"empty"}`}toJSON(){return{...super.toJSON(),value:this.getValue()}}};DM=nt;ut.ObjectIdentifier=DM;nt.NAME="OBJECT IDENTIFIER";var y_=class extends Mo(Zl){static{o(this,"LocalRelativeSidValueBlock")}constructor({valueDec:e=0,...t}={}){super(t),this.valueDec=e}fromBER(e,t,n){if(n===0)return t;let s=mt.toUint8Array(e);if(!jo(this,s,t,n))return-1;let i=s.subarray(t,t+n);this.valueHexView=new Uint8Array(n);for(let u=0;u<n&&(this.valueHexView[u]=i[u]&127,this.blockLength++,(i[u]&128)!==0);u++);let a=new Uint8Array(this.blockLength);for(let u=0;u<this.blockLength;u++)a[u]=this.valueHexView[u];return this.valueHexView=a,(i[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=Uo(this.valueHexView,7):(this.isHexOnly=!0,this.warnings.push("Too big SID for decoding, hex only")),t+this.blockLength)}toBER(e){if(this.isHexOnly){if(e)return new ArrayBuffer(this.valueHexView.byteLength);let s=this.valueHexView,i=new Uint8Array(this.blockLength);for(let a=0;a<this.blockLength-1;a++)i[a]=s[a]|128;return i[this.blockLength-1]=s[this.blockLength-1],i.buffer}let t=aa(this.valueDec,7);if(t.byteLength===0)return this.error="Error during encoding SID value",oa;let n=new Uint8Array(t.byteLength);if(!e){let s=new Uint8Array(t),i=t.byteLength-1;for(let a=0;a<i;a++)n[a]=s[a]|128;n[i]=s[i]}return n.buffer}toString(){let e="";return this.isHexOnly?e=Et.ToHex(this.valueHexView):e=this.valueDec.toString(),e}toJSON(){return{...super.toJSON(),valueDec:this.valueDec}}};y_.NAME="relativeSidBlock";var RM=class extends Hs{static{o(this,"LocalRelativeObjectIdentifierValueBlock")}constructor({value:e=qs,...t}={}){super(t),this.value=[],e&&this.fromString(e)}fromBER(e,t,n){let s=t;for(;n>0;){let i=new y_;if(s=i.fromBER(e,s,n),s===-1)return this.blockLength=0,this.error=i.error,s;this.blockLength+=i.blockLength,n-=i.blockLength,this.value.push(i)}return s}toBER(e,t){let n=[];for(let s=0;s<this.value.length;s++){let i=this.value[s].toBER(e);if(i.byteLength===0)return this.error=this.value[s].error,oa;n.push(i)}return x_(n)}fromString(e){this.value=[];let t=0,n=0,s="";do{n=e.indexOf(".",t),n===-1?s=e.substring(t):s=e.substring(t,n),t=n+1;let i=new y_;if(i.valueDec=parseInt(s,10),isNaN(i.valueDec))return!0;this.value.push(i)}while(n!==-1);return!0}toString(){let e="",t=!1;for(let n=0;n<this.value.length;n++){t=this.value[n].isHexOnly;let s=this.value[n].toString();n!==0&&(e=`${e}.`),t&&(s=`{${s}}`),e+=s}return e}toJSON(){let e={...super.toJSON(),value:this.toString(),sidArray:[]};for(let t=0;t<this.value.length;t++)e.sidArray.push(this.value[t].toJSON());return e}};RM.NAME="RelativeObjectIdentifierValueBlock";var PM,OM=class extends Ss{static{o(this,"RelativeObjectIdentifier")}getValue(){return this.valueBlock.toString()}setValue(e){this.valueBlock.fromString(e)}constructor(e={}){super(e,RM),this.idBlock.tagClass=1,this.idBlock.tagNumber=13}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()||"empty"}`}toJSON(){return{...super.toJSON(),value:this.getValue()}}};PM=OM;ut.RelativeObjectIdentifier=PM;OM.NAME="RelativeObjectIdentifier";var kM,W=class extends oe{static{o(this,"Sequence")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=16}};kM=W;ut.Sequence=kM;W.NAME="SEQUENCE";var LM,Wr=class extends oe{static{o(this,"Set")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=17}};LM=Wr;ut.Set=LM;Wr.NAME="SET";var VM=class extends Mo(Hs){static{o(this,"LocalStringValueBlock")}constructor({...e}={}){super(e),this.isHexOnly=!0,this.value=qs}toJSON(){return{...super.toJSON(),value:this.value}}};VM.NAME="StringValueBlock";var UM=class extends VM{static{o(this,"LocalSimpleStringValueBlock")}};UM.NAME="SimpleStringValueBlock";var ui=class extends mM{static{o(this,"LocalSimpleStringBlock")}constructor({...e}={}){super(e,UM)}fromBuffer(e){this.valueBlock.value=String.fromCharCode.apply(null,mt.toUint8Array(e))}fromString(e){let t=e.length,n=this.valueBlock.valueHexView=new Uint8Array(t);for(let s=0;s<t;s++)n[s]=e.charCodeAt(s);this.valueBlock.value=e}};ui.NAME="SIMPLE STRING";var jM=class extends ui{static{o(this,"LocalUtf8StringValueBlock")}fromBuffer(e){this.valueBlock.valueHexView=mt.toUint8Array(e);try{this.valueBlock.value=Et.ToUtf8String(e)}catch(t){this.warnings.push(`Error during "decodeURIComponent": ${t}, using raw string`),this.valueBlock.value=Et.ToBinary(e)}}fromString(e){this.valueBlock.valueHexView=new Uint8Array(Et.FromUtf8String(e)),this.valueBlock.value=e}};jM.NAME="Utf8StringValueBlock";var MM,Ui=class extends jM{static{o(this,"Utf8String")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=12}};MM=Ui;ut.Utf8String=MM;Ui.NAME="UTF8String";var FM=class extends ui{static{o(this,"LocalBmpStringValueBlock")}fromBuffer(e){this.valueBlock.value=Et.ToUtf16String(e),this.valueBlock.valueHexView=mt.toUint8Array(e)}fromString(e){this.valueBlock.value=e,this.valueBlock.valueHexView=new Uint8Array(Et.FromUtf16String(e))}};FM.NAME="BmpStringValueBlock";var qM,rd=class extends FM{static{o(this,"BmpString")}constructor({...e}={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=30}};qM=rd;ut.BmpString=qM;rd.NAME="BMPString";var HM=class extends ui{static{o(this,"LocalUniversalStringValueBlock")}fromBuffer(e){let t=ArrayBuffer.isView(e)?e.slice().buffer:e.slice(0),n=new Uint8Array(t);for(let s=0;s<n.length;s+=4)n[s]=n[s+3],n[s+1]=n[s+2],n[s+2]=0,n[s+3]=0;this.valueBlock.value=String.fromCharCode.apply(null,new Uint32Array(t))}fromString(e){let t=e.length,n=this.valueBlock.valueHexView=new Uint8Array(t*4);for(let s=0;s<t;s++){let i=aa(e.charCodeAt(s),8),a=new Uint8Array(i);if(a.length>4)continue;let u=4-a.length;for(let c=a.length-1;c>=0;c--)n[s*4+c+u]=a[c]}this.valueBlock.value=e}};HM.NAME="UniversalStringValueBlock";var KM,nd=class extends HM{static{o(this,"UniversalString")}constructor({...e}={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=28}};KM=nd;ut.UniversalString=KM;nd.NAME="UniversalString";var $M,ef=class extends ui{static{o(this,"NumericString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=18}};$M=ef;ut.NumericString=$M;ef.NAME="NumericString";var GM,ji=class extends ui{static{o(this,"PrintableString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=19}};GM=ji;ut.PrintableString=GM;ji.NAME="PrintableString";var XM,sd=class extends ui{static{o(this,"TeletexString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=20}};XM=sd;ut.TeletexString=XM;sd.NAME="TeletexString";var WM,Cb=class extends ui{static{o(this,"VideotexString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=21}};WM=Cb;ut.VideotexString=WM;Cb.NAME="VideotexString";var zM,ev=class extends ui{static{o(this,"IA5String")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=22}};zM=ev;ut.IA5String=zM;ev.NAME="IA5String";var JM,Nb=class extends ui{static{o(this,"GraphicString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=25}};JM=Nb;ut.GraphicString=JM;Nb.NAME="GraphicString";var YM,tv=class extends ui{static{o(this,"VisibleString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=26}};YM=tv;ut.VisibleString=YM;tv.NAME="VisibleString";var QM,Tb=class extends ui{static{o(this,"GeneralString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=27}};QM=Tb;ut.GeneralString=QM;Tb.NAME="GeneralString";var ZM,Ib=class extends ui{static{o(this,"CharacterString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=29}};ZM=Ib;ut.CharacterString=ZM;Ib.NAME="CharacterString";var eF,tf=class extends tv{static{o(this,"UTCTime")}constructor({value:e,valueDate:t,...n}={}){if(super(n),this.year=0,this.month=0,this.day=0,this.hour=0,this.minute=0,this.second=0,e){this.fromString(e),this.valueBlock.valueHexView=new Uint8Array(e.length);for(let s=0;s<e.length;s++)this.valueBlock.valueHexView[s]=e.charCodeAt(s)}t&&(this.fromDate(t),this.valueBlock.valueHexView=new Uint8Array(this.toBuffer())),this.idBlock.tagClass=1,this.idBlock.tagNumber=23}fromBuffer(e){this.fromString(String.fromCharCode.apply(null,mt.toUint8Array(e)))}toBuffer(){let e=this.toString(),t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let s=0;s<e.length;s++)n[s]=e.charCodeAt(s);return t}fromDate(e){this.year=e.getUTCFullYear(),this.month=e.getUTCMonth()+1,this.day=e.getUTCDate(),this.hour=e.getUTCHours(),this.minute=e.getUTCMinutes(),this.second=e.getUTCSeconds()}toDate(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second))}fromString(e){let n=/(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})Z/ig.exec(e);if(n===null){this.error="Wrong input string for conversion";return}let s=parseInt(n[1],10);s>=50?this.year=1900+s:this.year=2e3+s,this.month=parseInt(n[2],10),this.day=parseInt(n[3],10),this.hour=parseInt(n[4],10),this.minute=parseInt(n[5],10),this.second=parseInt(n[6],10)}toString(e="iso"){if(e==="iso"){let t=new Array(7);return t[0]=Fs(this.year<2e3?this.year-1900:this.year-2e3,2),t[1]=Fs(this.month,2),t[2]=Fs(this.day,2),t[3]=Fs(this.hour,2),t[4]=Fs(this.minute,2),t[5]=Fs(this.second,2),t[6]="Z",t.join("")}return super.toString(e)}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}}};eF=tf;ut.UTCTime=eF;tf.NAME="UTCTime";var tF,kr=class extends tf{static{o(this,"GeneralizedTime")}constructor(e={}){var t;super(e),(t=this.millisecond)!==null&&t!==void 0||(this.millisecond=0),this.idBlock.tagClass=1,this.idBlock.tagNumber=24}fromDate(e){super.fromDate(e),this.millisecond=e.getUTCMilliseconds()}toDate(){let e=Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond);return new Date(e)}fromString(e){let t=!1,n="",s="",i=0,a,u=0,c=0;if(e[e.length-1]==="Z")n=e.substring(0,e.length-1),t=!0;else{let m=new Number(e[e.length-1]);if(isNaN(m.valueOf()))throw new Error("Wrong input string for conversion");n=e}if(t){if(n.indexOf("+")!==-1)throw new Error("Wrong input string for conversion");if(n.indexOf("-")!==-1)throw new Error("Wrong input string for conversion")}else{let m=1,g=n.indexOf("+"),x="";if(g===-1&&(g=n.indexOf("-"),m=-1),g!==-1){if(x=n.substring(g+1),n=n.substring(0,g),x.length!==2&&x.length!==4)throw new Error("Wrong input string for conversion");let v=parseInt(x.substring(0,2),10);if(isNaN(v.valueOf()))throw new Error("Wrong input string for conversion");if(u=m*v,x.length===4){if(v=parseInt(x.substring(2,4),10),isNaN(v.valueOf()))throw new Error("Wrong input string for conversion");c=m*v}}}let f=n.indexOf(".");if(f===-1&&(f=n.indexOf(",")),f!==-1){let m=new Number(`0${n.substring(f)}`);if(isNaN(m.valueOf()))throw new Error("Wrong input string for conversion");i=m.valueOf(),s=n.substring(0,f)}else s=n;switch(!0){case s.length===8:if(a=/(\d{4})(\d{2})(\d{2})/ig,f!==-1)throw new Error("Wrong input string for conversion");break;case s.length===10:if(a=/(\d{4})(\d{2})(\d{2})(\d{2})/ig,f!==-1){let m=60*i;this.minute=Math.floor(m),m=60*(m-this.minute),this.second=Math.floor(m),m=1e3*(m-this.second),this.millisecond=Math.floor(m)}break;case s.length===12:if(a=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/ig,f!==-1){let m=60*i;this.second=Math.floor(m),m=1e3*(m-this.second),this.millisecond=Math.floor(m)}break;case s.length===14:if(a=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/ig,f!==-1){let m=1e3*i;this.millisecond=Math.floor(m)}break;default:throw new Error("Wrong input string for conversion")}let h=a.exec(s);if(h===null)throw new Error("Wrong input string for conversion");for(let m=1;m<h.length;m++)switch(m){case 1:this.year=parseInt(h[m],10);break;case 2:this.month=parseInt(h[m],10);break;case 3:this.day=parseInt(h[m],10);break;case 4:this.hour=parseInt(h[m],10)+u;break;case 5:this.minute=parseInt(h[m],10)+c;break;case 6:this.second=parseInt(h[m],10);break;default:throw new Error("Wrong input string for conversion")}if(t===!1){let m=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond);this.year=m.getUTCFullYear(),this.month=m.getUTCMonth(),this.day=m.getUTCDay(),this.hour=m.getUTCHours(),this.minute=m.getUTCMinutes(),this.second=m.getUTCSeconds(),this.millisecond=m.getUTCMilliseconds()}}toString(e="iso"){if(e==="iso"){let t=[];return t.push(Fs(this.year,4)),t.push(Fs(this.month,2)),t.push(Fs(this.day,2)),t.push(Fs(this.hour,2)),t.push(Fs(this.minute,2)),t.push(Fs(this.second,2)),this.millisecond!==0&&(t.push("."),t.push(Fs(this.millisecond,3))),t.push("Z"),t.join("")}return super.toString(e)}toJSON(){return{...super.toJSON(),millisecond:this.millisecond}}};tF=kr;ut.GeneralizedTime=tF;kr.NAME="GeneralizedTime";var rF,nF=class extends Ui{static{o(this,"DATE")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=31}};rF=nF;ut.DATE=rF;nF.NAME="DATE";var sF,iF=class extends Ui{static{o(this,"TimeOfDay")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=32}};sF=iF;ut.TimeOfDay=sF;iF.NAME="TimeOfDay";var aF,oF=class extends Ui{static{o(this,"DateTime")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=33}};aF=oF;ut.DateTime=aF;oF.NAME="DateTime";var uF,cF=class extends Ui{static{o(this,"Duration")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=34}};uF=cF;ut.Duration=uF;cF.NAME="Duration";var lF,fF=class extends Ui{static{o(this,"TIME")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=14}};lF=fF;ut.TIME=lF;fF.NAME="TIME";var wt=class{static{o(this,"Any")}constructor({name:e=qs,optional:t=!1}={}){this.name=e,this.optional=t}},Lr=class extends wt{static{o(this,"Choice")}constructor({value:e=[],...t}={}){super(t),this.value=e}},Tt=class extends wt{static{o(this,"Repeated")}constructor({value:e=new wt,local:t=!1,...n}={}){super(n),this.value=e,this.local=t}},rv=class{static{o(this,"RawData")}get data(){return this.dataView.slice().buffer}set data(e){this.dataView=mt.toUint8Array(e)}constructor({data:e=Ab}={}){this.dataView=mt.toUint8Array(e)}fromBER(e,t,n){let s=t+n;return this.dataView=mt.toUint8Array(e).subarray(t,s),s}toBER(e){return this.dataView.slice().buffer}};function Ie(r,e,t){if(t instanceof Lr){for(let i of t.value)if(Ie(r,e,i).verified)return{verified:!0,result:r};{let i={verified:!1,result:{error:"Wrong values for Choice type"}};return t.hasOwnProperty(g_)&&(i.name=t.name),i}}if(t instanceof wt)return t.hasOwnProperty(g_)&&(r[t.name]=e),{verified:!0,result:r};if(!(r instanceof Object))return{verified:!1,result:{error:"Wrong root object"}};if(!(e instanceof Object))return{verified:!1,result:{error:"Wrong ASN.1 data"}};if(!(t instanceof Object))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(kue in t))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(jue in t.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(Mue in t.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};let n=t.idBlock.toBER(!1);if(n.byteLength===0)return{verified:!1,result:{error:"Error encoding idBlock for ASN.1 schema"}};if(t.idBlock.fromBER(n,0,n.byteLength)===-1)return{verified:!1,result:{error:"Error decoding idBlock for ASN.1 schema"}};if(t.idBlock.hasOwnProperty(Lue)===!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(t.idBlock.tagClass!==e.idBlock.tagClass)return{verified:!1,result:r};if(t.idBlock.hasOwnProperty(Vue)===!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(t.idBlock.tagNumber!==e.idBlock.tagNumber)return{verified:!1,result:r};if(t.idBlock.hasOwnProperty(Uue)===!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(t.idBlock.isConstructed!==e.idBlock.isConstructed)return{verified:!1,result:r};if(!(Oue in t.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(t.idBlock.isHexOnly!==e.idBlock.isHexOnly)return{verified:!1,result:r};if(t.idBlock.isHexOnly){if(!(uM in t.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};let i=t.idBlock.valueHexView,a=e.idBlock.valueHexView;if(i.length!==a.length)return{verified:!1,result:r};for(let u=0;u<i.length;u++)if(i[u]!==a[1])return{verified:!1,result:r}}if(t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,qs),t.name&&(r[t.name]=e)),t instanceof ut.Constructed){let i=0,a={verified:!1,result:{error:"Unknown error"}},u=t.valueBlock.value.length;if(u>0&&t.valueBlock.value[0]instanceof Tt&&(u=e.valueBlock.value.length),u===0)return{verified:!0,result:r};if(e.valueBlock.value.length===0&&t.valueBlock.value.length!==0){let c=!0;for(let f=0;f<t.valueBlock.value.length;f++)c=c&&(t.valueBlock.value[f].optional||!1);return c?{verified:!0,result:r}:(t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,qs),t.name&&delete r[t.name]),r.error="Inconsistent object length",{verified:!1,result:r})}for(let c=0;c<u;c++)if(c-i>=e.valueBlock.value.length){if(t.valueBlock.value[c].optional===!1){let f={verified:!1,result:r};return r.error="Inconsistent length between ASN.1 data and schema",t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,qs),t.name&&(delete r[t.name],f.name=t.name)),f}}else if(t.valueBlock.value[0]instanceof Tt){if(a=Ie(r,e.valueBlock.value[c],t.valueBlock.value[0].value),a.verified===!1)if(t.valueBlock.value[0].optional)i++;else return t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,qs),t.name&&delete r[t.name]),a;if(g_ in t.valueBlock.value[0]&&t.valueBlock.value[0].name.length>0){let f={};Fue in t.valueBlock.value[0]&&t.valueBlock.value[0].local?f=e:f=r,typeof f[t.valueBlock.value[0].name]>"u"&&(f[t.valueBlock.value[0].name]=[]),f[t.valueBlock.value[0].name].push(e.valueBlock.value[c])}}else if(a=Ie(r,e.valueBlock.value[c-i],t.valueBlock.value[c]),a.verified===!1)if(t.valueBlock.value[c].optional)i++;else return t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,qs),t.name&&delete r[t.name]),a;if(a.verified===!1){let c={verified:!1,result:r};return t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,qs),t.name&&(delete r[t.name],c.name=t.name)),c}return{verified:!0,result:r}}if(t.primitiveSchema&&uM in e.valueBlock){let i=Zg(e.valueBlock.valueHexView);if(i.offset===-1){let a={verified:!1,result:i.result};return t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,qs),t.name&&(delete r[t.name],a.name=t.name)),a}return Ie(r,i.result,t.primitiveSchema)}return{verified:!0,result:r}}o(Ie,"compareSchema");var Gn=class r{static{o(this,"ByteStream")}constructor(e={}){if("view"in e)this.fromUint8Array(e.view);else if("buffer"in e)this.fromArrayBuffer(e.buffer);else if("string"in e)this.fromString(e.string);else if("hexstring"in e)this.fromHexString(e.hexstring);else if("length"in e&&e.length>0){if(this.length=e.length,e.stub)for(let t=0;t<this._view.length;t++)this._view[t]=e.stub}else this.length=0}set buffer(e){this._buffer=e,this._view=new Uint8Array(this._buffer)}get buffer(){return this._buffer}set view(e){this._buffer=new ArrayBuffer(e.length),this._view=new Uint8Array(this._buffer),this._view.set(e)}get view(){return this._view}get length(){return this.view.byteLength}set length(e){this._buffer=new ArrayBuffer(e),this._view=new Uint8Array(this._buffer)}clear(){this._buffer=new ArrayBuffer(0),this._view=new Uint8Array(this._buffer)}fromArrayBuffer(e){this._buffer=e,this._view=new Uint8Array(this._buffer)}fromUint8Array(e){this.fromArrayBuffer(new Uint8Array(e).buffer)}fromString(e){let t=e.length;this.length=t;for(let n=0;n<t;n++)this.view[n]=e.charCodeAt(n)}toString(e=0,t=this.view.length-e){let n="";(e>=this.view.length||e<0)&&(e=0),(t>=this.view.length||t<0)&&(t=this.view.length-e);for(let s=e;s<e+t;s++)n+=String.fromCharCode(this.view[s]);return n}fromHexString(e){let t=e.length;this.buffer=new ArrayBuffer(t>>1),this.view=new Uint8Array(this.buffer);let n=new Map;n.set("0",0),n.set("1",1),n.set("2",2),n.set("3",3),n.set("4",4),n.set("5",5),n.set("6",6),n.set("7",7),n.set("8",8),n.set("9",9),n.set("A",10),n.set("a",10),n.set("B",11),n.set("b",11),n.set("C",12),n.set("c",12),n.set("D",13),n.set("d",13),n.set("E",14),n.set("e",14),n.set("F",15),n.set("f",15);let s=0,i=0;for(let a=0;a<t;a++)a%2?(i|=n.get(e.charAt(a)),this.view[s]=i,s++):i=n.get(e.charAt(a))<<4}toHexString(e=0,t=this.view.length-e){let n="";(e>=this.view.length||e<0)&&(e=0),(t>=this.view.length||t<0)&&(t=this.view.length-e);for(let s=e;s<e+t;s++){let i=this.view[s].toString(16).toUpperCase();n=n+(i.length==1?"0":"")+i}return n}copy(e=0,t=this.length-e){if(!e&&!this.length)return new r;if(e<0||e>this.length-1)throw new Error(`Wrong start position: ${e}`);return new r({buffer:this._buffer.slice(e,e+t)})}slice(e=0,t=this.length){if(!e&&!this.length)return new r;if(e<0||e>this.length-1)throw new Error(`Wrong start position: ${e}`);return new r({buffer:this._buffer.slice(e,t)})}realloc(e){let t=new ArrayBuffer(e),n=new Uint8Array(t);e>this._view.length?n.set(this._view):n.set(new Uint8Array(this._buffer,0,e)),this._buffer=t,this._view=new Uint8Array(this._buffer)}append(e){let t=this.length,n=e.length,s=e._view.subarray();this.realloc(t+n),this._view.set(s,t)}insert(e,t=0,n=this.length-t){return t>this.length-1?!1:(n>this.length-t&&(n=this.length-t),n>e.length&&(n=e.length),n==e.length?this._view.set(e._view,t):this._view.set(e._view.subarray(0,n),t),!0)}isEqual(e){if(this.length!=e.length)return!1;for(let t=0;t<e.length;t++)if(this.view[t]!=e.view[t])return!1;return!0}isEqualView(e){if(e.length!=this.view.length)return!1;for(let t=0;t<e.length;t++)if(this.view[t]!=e[t])return!1;return!0}findPattern(e,t,n,s){let{start:i,length:a,backward:u}=this.prepareFindParameters(t,n,s),c=e.length;if(c>a)return-1;let f=[];for(let h=0;h<c;h++)f.push(e.view[h]);for(let h=0;h<=a-c;h++){let m=!0,g=u?i-c-h:i+h;for(let x=0;x<c;x++)if(this.view[x+g]!=f[x]){m=!1;break}if(m)return u?i-c-h:i+c+h}return-1}findFirstIn(e,t,n,s){let{start:i,length:a,backward:u}=this.prepareFindParameters(t,n,s),c={id:-1,position:u?0:i+a,length:0};for(let f=0;f<e.length;f++){let h=this.findPattern(e[f],i,a,u);if(h!=-1){let m=!1,g=e[f].length;u?h-g>=c.position-c.length&&(m=!0):h-g<=c.position-c.length&&(m=!0),m&&(c.position=h,c.id=f,c.length=g)}}return c}findAllIn(e,t,n){let{start:s,length:i}=this.prepareFindParameters(t,n),a=[],u={id:-1,position:s};do{let c=u.position;if(u=this.findFirstIn(e,u.position,i),u.id==-1)break;i-=u.position-c,a.push({id:u.id,position:u.position})}while(!0);return a}findAllPatternIn(e,t,n){let{start:s,length:i}=this.prepareFindParameters(t,n),a=[],u=e.length;if(u>i)return-1;let c=Array.from(e.view);for(let f=0;f<=i-u;f++){let h=!0,m=s+f;for(let g=0;g<u;g++)if(this.view[g+m]!=c[g]){h=!1;break}h&&(a.push(s+u+f),f+=u-1)}return a}findFirstNotIn(e,t,n,s){let{start:i,length:a,backward:u}=this.prepareFindParameters(t,n,s),c={left:{id:-1,position:i},right:{id:-1,position:0},value:new r},f=a;for(;f>0;){if(c.right=this.findFirstIn(e,u?i-a+f:i+a-f,f,u),c.right.id==-1){a=f,u?i-=a:i=c.left.position,c.value=new r({buffer:this._buffer.slice(i,i+a)});break}if(c.right.position!=(u?c.left.position-e[c.right.id].length:c.left.position+e[c.right.id].length)){u?(i=c.right.position+e[c.right.id].length,a=c.left.position-c.right.position-e[c.right.id].length):(i=c.left.position,a=c.right.position-c.left.position-e[c.right.id].length),c.value=new r({buffer:this._buffer.slice(i,i+a)});break}c.left=c.right,f-=e[c.right.id].length}if(u){let h=c.right;c.right=c.left,c.left=h}return c}findAllNotIn(e,t,n){let{start:s,length:i}=this.prepareFindParameters(t,n),a=[],u={left:{id:-1,position:s},right:{id:-1,position:s},value:new r};do{let c=u.right.position;u=this.findFirstNotIn(e,u.right.position,i),i-=u.right.position-c,a.push({left:{id:u.left.id,position:u.left.position},right:{id:u.right.id,position:u.right.position},value:u.value})}while(u.right.id!=-1);return a}findFirstSequence(e,t,n,s){let{start:i,length:a,backward:u}=this.prepareFindParameters(t,n,s),c=this.skipNotPatterns(e,i,a,u);if(c==-1)return{position:-1,value:new r};let f=this.skipPatterns(e,c,a-(u?i-c:c-i),u);u?(i=f,a=c-f):(i=c,a=f-c);let h=new r({buffer:this._buffer.slice(i,i+a)});return{position:f,value:h}}findAllSequences(e,t,n){let{start:s,length:i}=this.prepareFindParameters(t,n),a=[],u={position:s,value:new r};do{let c=u.position;u=this.findFirstSequence(e,u.position,i),u.position!=-1&&(i-=u.position-c,a.push({position:u.position,value:u.value}))}while(u.position!=-1);return a}findPairedPatterns(e,t,n,s){let i=[];if(e.isEqual(t))return i;let{start:a,length:u}=this.prepareFindParameters(n,s),c=0,f=this.findAllPatternIn(e,a,u);if(!Array.isArray(f)||f.length==0)return i;let h=this.findAllPatternIn(t,a,u);if(!Array.isArray(h)||h.length==0)return i;for(;c<f.length&&h.length!=0;){if(f[0]==h[0]){i.push({left:f[0],right:h[0]}),f.splice(0,1),h.splice(0,1);continue}if(f[c]>h[0])break;for(;f[c]<h[0]&&(c++,!(c>=f.length)););i.push({left:f[c-1],right:h[0]}),f.splice(c-1,1),h.splice(0,1),c=0}return i.sort((m,g)=>m.left-g.left),i}findPairedArrays(e,t,n,s){let{start:i,length:a}=this.prepareFindParameters(n,s),u=[],c=0,f=this.findAllIn(e,i,a);if(f.length==0)return u;let h=this.findAllIn(t,i,a);if(h.length==0)return u;for(;c<f.length&&h.length!=0;){if(f[0].position==h[0].position){u.push({left:f[0],right:h[0]}),f.splice(0,1),h.splice(0,1);continue}if(f[c].position>h[0].position)break;for(;f[c].position<h[0].position&&(c++,!(c>=f.length)););u.push({left:f[c-1],right:h[0]}),f.splice(c-1,1),h.splice(0,1),c=0}return u.sort((m,g)=>m.left.position-g.left.position),u}replacePattern(e,t,n,s,i=null){let a=[],u,c={status:-1,searchPatternPositions:[],replacePatternPositions:[]},{start:f,length:h}=this.prepareFindParameters(n,s);if(i==null){if(a=this.findAllIn([e],f,h),a.length==0)return c}else a=i;c.searchPatternPositions.push(...Array.from(a,v=>v.position));let m=e.length-t.length,g=new ArrayBuffer(this.view.length-a.length*m),x=new Uint8Array(g);for(x.set(new Uint8Array(this.buffer,0,f)),u=0;u<a.length;u++){let v=u==0?f:a[u-1].position;x.set(new Uint8Array(this.buffer,v,a[u].position-e.length-v),v-u*m),x.set(t.view,a[u].position-e.length-u*m),c.replacePatternPositions.push(a[u].position-e.length-u*m)}return u--,x.set(new Uint8Array(this.buffer,a[u].position,this.length-a[u].position),a[u].position-e.length+t.length-u*m),this.buffer=g,this.view=new Uint8Array(this.buffer),c.status=1,c}skipPatterns(e,t,n,s){let{start:i,length:a,backward:u}=this.prepareFindParameters(t,n,s),c=i;for(let f=0;f<e.length;f++){let h=e[f].length,m=u?c-h:c,g=!0;for(let x=0;x<h;x++)if(this.view[x+m]!=e[f].view[x]){g=!1;break}if(g){if(f=-1,u){if(c-=h,c<=0)return c}else if(c+=h,c>=i+a)return c}}return c}skipNotPatterns(e,t,n,s){let{start:i,length:a,backward:u}=this.prepareFindParameters(t,n,s),c=-1;for(let f=0;f<a;f++){for(let h=0;h<e.length;h++){let m=e[h].length,g=u?i-f-m:i+f,x=!0;for(let v=0;v<m;v++)if(this.view[v+g]!=e[h].view[v]){x=!1;break}if(x){c=u?i-f:i+f;break}}if(c!=-1)break}return c}prepareFindParameters(e=null,t=null,n=!1){return e===null&&(e=n?this.length:0),e>this.length&&(e=this.length),n?(t===null&&(t=e),t>e&&(t=e)):(t===null&&(t=this.length-e),t>this.length-e&&(t=this.length-e)),{start:e,length:t,backward:n}}};var Gue=16777216,Fo=class r{static{o(this,"SeqStream")}constructor(e={}){this._stream=new Gn,this._length=0,this._start=0,this.backward=!1,this.appendBlock=0,this.prevLength=0,this.prevStart=0,"view"in e?this.stream=new Gn({view:e.view}):"buffer"in e?this.stream=new Gn({buffer:e.buffer}):"string"in e?this.stream=new Gn({string:e.string}):"hexstring"in e?this.stream=new Gn({hexstring:e.hexstring}):"stream"in e?this.stream=e.stream.slice():this.stream=new Gn,"backward"in e&&e.backward&&(this.backward=e.backward,this._start=this.stream.length),"length"in e&&e.length>0&&(this._length=e.length),"start"in e&&e.start&&e.start>0&&(this._start=e.start),"appendBlock"in e&&e.appendBlock&&e.appendBlock>0&&(this.appendBlock=e.appendBlock)}set stream(e){this._stream=e,this.prevLength=this._length,this._length=e.length,this.prevStart=this._start,this._start=0}get stream(){return this._stream}set length(e){this.prevLength=this._length,this._length=e}get length(){return this.appendBlock?this.start:this._length}set start(e){e>this.stream.length||(this.prevStart=this._start,this.prevLength=this._length,this._length-=this.backward?this._start-e:e-this._start,this._start=e)}get start(){return this._start}get buffer(){return this._stream.buffer.slice(0,this._length)}resetPosition(){this._start=this.prevStart,this._length=this.prevLength}findPattern(e,t=null){(t==null||t>this.length)&&(t=this.length);let n=this.stream.findPattern(e,this.start,this.length,this.backward);if(n==-1)return n;if(this.backward){if(n<this.start-e.length-t)return-1}else if(n>this.start+e.length+t)return-1;return this.start=n,n}findFirstIn(e,t=null){(t==null||t>this.length)&&(t=this.length);let n=this.stream.findFirstIn(e,this.start,this.length,this.backward);if(n.id==-1)return n;if(this.backward){if(n.position<this.start-e[n.id].length-t)return{id:-1,position:this.backward?0:this.start+this.length}}else if(n.position>this.start+e[n.id].length+t)return{id:-1,position:this.backward?0:this.start+this.length};return this.start=n.position,n}findAllIn(e){let t=this.backward?this.start-this.length:this.start;return this.stream.findAllIn(e,t,this.length)}findFirstNotIn(e,t=null){(t==null||t>this._length)&&(t=this._length);let n=this._stream.findFirstNotIn(e,this._start,this._length,this.backward);if(n.left.id==-1&&n.right.id==-1)return n;if(this.backward){if(n.right.id!=-1&&n.right.position<this._start-e[n.right.id].length-t)return{left:{id:-1,position:this._start},right:{id:-1,position:0},value:new Gn}}else if(n.left.id!=-1&&n.left.position>this._start+e[n.left.id].length+t)return{left:{id:-1,position:this._start},right:{id:-1,position:0},value:new Gn};return this.backward?n.left.id==-1?this.start=0:this.start=n.left.position:n.right.id==-1?this.start=this._start+this._length:this.start=n.right.position,n}findAllNotIn(e){let t=this.backward?this._start-this._length:this._start;return this._stream.findAllNotIn(e,t,this._length)}findFirstSequence(e,t=null,n=null){(t==null||t>this._length)&&(t=this._length),(n==null||n>t)&&(n=t);let s=this._stream.findFirstSequence(e,this._start,t,this.backward);if(s.value.length==0)return s;if(this.backward){if(s.position<this._start-s.value.length-n)return{position:-1,value:new Gn}}else if(s.position>this._start+s.value.length+n)return{position:-1,value:new Gn};return this.start=s.position,s}findAllSequences(e){let t=this.backward?this.start-this.length:this.start;return this.stream.findAllSequences(e,t,this.length)}findPairedPatterns(e,t,n=null){(n==null||n>this.length)&&(n=this.length);let s=this.backward?this.start-this.length:this.start,i=this.stream.findPairedPatterns(e,t,s,this.length);if(i.length){if(this.backward){if(i[0].right<this.start-t.length-n)return[]}else if(i[0].left>this.start+e.length+n)return[]}return i}findPairedArrays(e,t,n=null){(n==null||n>this.length)&&(n=this.length);let s=this.backward?this.start-this.length:this.start,i=this.stream.findPairedArrays(e,t,s,this.length);if(i.length){if(this.backward){if(i[0].right.position<this.start-t[i[0].right.id].length-n)return[]}else if(i[0].left.position>this.start+e[i[0].left.id].length+n)return[]}return i}replacePattern(e,t){let n=this.backward?this.start-this.length:this.start;return this.stream.replacePattern(e,t,n,this.length)}skipPatterns(e){let t=this.stream.skipPatterns(e,this.start,this.length,this.backward);return this.start=t,t}skipNotPatterns(e){let t=this.stream.skipNotPatterns(e,this.start,this.length,this.backward);return t==-1?-1:(this.start=t,t)}append(e){this.beforeAppend(e.length),this._stream.view.set(e.view,this._start),this._length+=e.length*2,this.start=this._start+e.length,this.prevLength-=e.length*2}appendView(e){this.beforeAppend(e.length),this._stream.view.set(e,this._start),this._length+=e.length*2,this.start=this._start+e.length,this.prevLength-=e.length*2}appendChar(e){this.beforeAppend(1),this._stream.view[this._start]=e,this._length+=2,this.start=this._start+1,this.prevLength-=2}appendUint16(e){this.beforeAppend(2);let t=new Uint16Array([e]),n=new Uint8Array(t.buffer);this.stream.view[this._start]=n[1],this._stream.view[this._start+1]=n[0],this._length+=4,this.start=this._start+2,this.prevLength-=4}appendUint24(e){this.beforeAppend(3);let t=new Uint32Array([e]),n=new Uint8Array(t.buffer);this._stream.view[this._start]=n[2],this._stream.view[this._start+1]=n[1],this._stream.view[this._start+2]=n[0],this._length+=6,this.start=this._start+3,this.prevLength-=6}appendUint32(e){this.beforeAppend(4);let t=new Uint32Array([e]),n=new Uint8Array(t.buffer);this._stream.view[this._start]=n[3],this._stream.view[this._start+1]=n[2],this._stream.view[this._start+2]=n[1],this._stream.view[this._start+3]=n[0],this._length+=8,this.start=this._start+4,this.prevLength-=8}appendInt16(e){this.beforeAppend(2);let t=new Int16Array([e]),n=new Uint8Array(t.buffer);this._stream.view[this._start]=n[1],this._stream.view[this._start+1]=n[0],this._length+=4,this.start=this._start+2,this.prevLength-=4}appendInt32(e){this.beforeAppend(4);let t=new Int32Array([e]),n=new Uint8Array(t.buffer);this._stream.view[this._start]=n[3],this._stream.view[this._start+1]=n[2],this._stream.view[this._start+2]=n[1],this._stream.view[this._start+3]=n[0],this._length+=8,this.start=this._start+4,this.prevLength-=8}getBlock(e,t=!0){if(this._length<=0)return new Uint8Array(0);this._length<e&&(e=this._length);let n;if(this.backward){let s=this._stream.view.subarray(this._length-e,this._length);n=new Uint8Array(e);for(let i=0;i<e;i++)n[e-1-i]=s[i]}else n=this._stream.view.subarray(this._start,this._start+e);return t&&(this.start+=this.backward?-1*e:e),n}getUint16(e=!0){let t=this.getBlock(2,e);return t.length<2?0:t[0]<<8|t[1]}getInt16(e=!0){let t=this.getUint16(e),n=32768;return t&n?-(n-(t^n)):t}getUint24(e=!0){let t=this.getBlock(4,e);return t.length<3?0:t[0]<<16|t[1]<<8|t[2]}getUint32(e=!0){let t=this.getBlock(4,e);return t.length<4?0:t[0]*Gue+(t[1]<<16)+(t[2]<<8)+t[3]}getInt32(e=!0){let t=this.getUint32(e),n=2147483648;return t&n?-(n-(t^n)):t}beforeAppend(e){this._start+e>this._stream.length&&(e>this.appendBlock&&(this.appendBlock=e+r.APPEND_BLOCK),this._stream.realloc(this._stream.length+this.appendBlock))}};Fo.APPEND_BLOCK=1e3;function Wue(r){return r instanceof Uint8Array||r!=null&&typeof r=="object"&&r.constructor.name==="Uint8Array"}o(Wue,"isBytes");function E_(r,...e){if(!Wue(r))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(r.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${r.length}`)}o(E_,"bytes");function A_(r,e=!0){if(r.destroyed)throw new Error("Hash instance has been destroyed");if(e&&r.finished)throw new Error("Hash#digest() has already been called")}o(A_,"exists");function pF(r,e){E_(r);let t=e.outputLen;if(r.length<t)throw new Error(`digestInto() expects output buffer of length at least ${t}`)}o(pF,"output");var Bb=o(r=>new DataView(r.buffer,r.byteOffset,r.byteLength),"createView"),ca=o((r,e)=>r<<32-e|r>>>e,"rotr"),Db=o((r,e)=>r<<e|r>>>32-e>>>0,"rotl"),_Se=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function zue(r){if(typeof r!="string")throw new Error(`utf8ToBytes expected string, got ${typeof r}`);return new Uint8Array(new TextEncoder().encode(r))}o(zue,"utf8ToBytes");function C_(r){return typeof r=="string"&&(r=zue(r)),E_(r),r}o(C_,"toBytes");var _b=class{static{o(this,"Hash")}clone(){return this._cloneInto()}},BSe={}.toString;function rf(r){let e=o(n=>r().update(C_(n)).digest(),"hashC"),t=r();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>r(),e}o(rf,"wrapConstructor");function Jue(r,e,t,n){if(typeof r.setBigUint64=="function")return r.setBigUint64(e,t,n);let s=BigInt(32),i=BigInt(4294967295),a=Number(t>>s&i),u=Number(t&i),c=n?4:0,f=n?0:4;r.setUint32(e+c,a,n),r.setUint32(e+f,u,n)}o(Jue,"setBigUint64");var Rb=o((r,e,t)=>r&e^~r&t,"Chi"),Pb=o((r,e,t)=>r&e^r&t^e&t,"Maj"),dc=class extends _b{static{o(this,"HashMD")}constructor(e,t,n,s){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Bb(this.buffer)}update(e){A_(this);let{view:t,buffer:n,blockLen:s}=this;e=C_(e);let i=e.length;for(let a=0;a<i;){let u=Math.min(s-this.pos,i-a);if(u===s){let c=Bb(e);for(;s<=i-a;a+=s)this.process(c,a);continue}n.set(e.subarray(a,a+u),this.pos),this.pos+=u,a+=u,this.pos===s&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){A_(this),pF(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:s,isLE:i}=this,{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>s-a&&(this.process(n,0),a=0);for(let m=a;m<s;m++)t[m]=0;Jue(n,s-8,BigInt(this.length*8),i),this.process(n,0);let u=Bb(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let f=c/4,h=this.get();if(f>h.length)throw new Error("_sha2: outputLen bigger than state");for(let m=0;m<f;m++)u.setUint32(4*m,h[m],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:n,length:s,finished:i,destroyed:a,pos:u}=this;return e.length=s,e.pos=u,e.finished=i,e.destroyed=a,s%t&&e.buffer.set(n),e}};var nv=new Uint32Array([1732584193,4023233417,2562383102,271733878,3285377520]),mc=new Uint32Array(80),Yue=class extends dc{static{o(this,"SHA1")}constructor(){super(64,20,8,!1),this.A=nv[0]|0,this.B=nv[1]|0,this.C=nv[2]|0,this.D=nv[3]|0,this.E=nv[4]|0}get(){let{A:e,B:t,C:n,D:s,E:i}=this;return[e,t,n,s,i]}set(e,t,n,s,i){this.A=e|0,this.B=t|0,this.C=n|0,this.D=s|0,this.E=i|0}process(e,t){for(let c=0;c<16;c++,t+=4)mc[c]=e.getUint32(t,!1);for(let c=16;c<80;c++)mc[c]=Db(mc[c-3]^mc[c-8]^mc[c-14]^mc[c-16],1);let{A:n,B:s,C:i,D:a,E:u}=this;for(let c=0;c<80;c++){let f,h;c<20?(f=Rb(s,i,a),h=1518500249):c<40?(f=s^i^a,h=1859775393):c<60?(f=Pb(s,i,a),h=2400959708):(f=s^i^a,h=3395469782);let m=Db(n,5)+f+u+h+mc[c]|0;u=a,a=i,i=Db(s,30),s=n,n=m}n=n+this.A|0,s=s+this.B|0,i=i+this.C|0,a=a+this.D|0,u=u+this.E|0,this.set(n,s,i,a,u)}roundClean(){mc.fill(0)}destroy(){this.set(0,0,0,0,0),this.buffer.fill(0)}},dF=rf(()=>new Yue);var Que=new Uint32Array([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]),gc=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),vc=new Uint32Array(64),Zue=class extends dc{static{o(this,"SHA256")}constructor(){super(64,32,8,!1),this.A=gc[0]|0,this.B=gc[1]|0,this.C=gc[2]|0,this.D=gc[3]|0,this.E=gc[4]|0,this.F=gc[5]|0,this.G=gc[6]|0,this.H=gc[7]|0}get(){let{A:e,B:t,C:n,D:s,E:i,F:a,G:u,H:c}=this;return[e,t,n,s,i,a,u,c]}set(e,t,n,s,i,a,u,c){this.A=e|0,this.B=t|0,this.C=n|0,this.D=s|0,this.E=i|0,this.F=a|0,this.G=u|0,this.H=c|0}process(e,t){for(let m=0;m<16;m++,t+=4)vc[m]=e.getUint32(t,!1);for(let m=16;m<64;m++){let g=vc[m-15],x=vc[m-2],v=ca(g,7)^ca(g,18)^g>>>3,w=ca(x,17)^ca(x,19)^x>>>10;vc[m]=w+vc[m-7]+v+vc[m-16]|0}let{A:n,B:s,C:i,D:a,E:u,F:c,G:f,H:h}=this;for(let m=0;m<64;m++){let g=ca(u,6)^ca(u,11)^ca(u,25),x=h+g+Rb(u,c,f)+Que[m]+vc[m]|0,w=(ca(n,2)^ca(n,13)^ca(n,22))+Pb(n,s,i)|0;h=f,f=c,c=u,u=a+x|0,a=i,i=s,s=n,n=x+w|0}n=n+this.A|0,s=s+this.B|0,i=i+this.C|0,a=a+this.D|0,u=u+this.E|0,c=c+this.F|0,f=f+this.G|0,h=h+this.H|0,this.set(n,s,i,a,u,c,f,h)}roundClean(){vc.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};var N_=rf(()=>new Zue);var Ob=BigInt(4294967295),T_=BigInt(32);function mF(r,e=!1){return e?{h:Number(r&Ob),l:Number(r>>T_&Ob)}:{h:Number(r>>T_&Ob)|0,l:Number(r&Ob)|0}}o(mF,"fromBig");function ece(r,e=!1){let t=new Uint32Array(r.length),n=new Uint32Array(r.length);for(let s=0;s<r.length;s++){let{h:i,l:a}=mF(r[s],e);[t[s],n[s]]=[i,a]}return[t,n]}o(ece,"split");var tce=o((r,e)=>BigInt(r>>>0)<<T_|BigInt(e>>>0),"toBig"),rce=o((r,e,t)=>r>>>t,"shrSH"),nce=o((r,e,t)=>r<<32-t|e>>>t,"shrSL"),sce=o((r,e,t)=>r>>>t|e<<32-t,"rotrSH"),ice=o((r,e,t)=>r<<32-t|e>>>t,"rotrSL"),ace=o((r,e,t)=>r<<64-t|e>>>t-32,"rotrBH"),oce=o((r,e,t)=>r>>>t-32|e<<64-t,"rotrBL"),uce=o((r,e)=>e,"rotr32H"),cce=o((r,e)=>r,"rotr32L"),lce=o((r,e,t)=>r<<t|e>>>32-t,"rotlSH"),fce=o((r,e,t)=>e<<t|r>>>32-t,"rotlSL"),hce=o((r,e,t)=>e<<t-32|r>>>64-t,"rotlBH"),pce=o((r,e,t)=>r<<t-32|e>>>64-t,"rotlBL");function dce(r,e,t,n){let s=(e>>>0)+(n>>>0);return{h:r+t+(s/2**32|0)|0,l:s|0}}o(dce,"add");var mce=o((r,e,t)=>(r>>>0)+(e>>>0)+(t>>>0),"add3L"),gce=o((r,e,t,n)=>e+t+n+(r/2**32|0)|0,"add3H"),vce=o((r,e,t,n)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0),"add4L"),yce=o((r,e,t,n,s)=>e+t+n+s+(r/2**32|0)|0,"add4H"),xce=o((r,e,t,n,s)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0)+(s>>>0),"add5L"),wce=o((r,e,t,n,s,i)=>e+t+n+s+i+(r/2**32|0)|0,"add5H");var Sce={fromBig:mF,split:ece,toBig:tce,shrSH:rce,shrSL:nce,rotrSH:sce,rotrSL:ice,rotrBH:ace,rotrBL:oce,rotr32H:uce,rotr32L:cce,rotlSH:lce,rotlSL:fce,rotlBH:hce,rotlBL:pce,add:dce,add3L:mce,add3H:gce,add4L:vce,add4H:yce,add5H:wce,add5L:xce},Ht=Sce;var[bce,Ece]=Ht.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(r=>BigInt(r))),yc=new Uint32Array(80),xc=new Uint32Array(80),kb=class extends dc{static{o(this,"SHA512")}constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:e,Al:t,Bh:n,Bl:s,Ch:i,Cl:a,Dh:u,Dl:c,Eh:f,El:h,Fh:m,Fl:g,Gh:x,Gl:v,Hh:w,Hl:S}=this;return[e,t,n,s,i,a,u,c,f,h,m,g,x,v,w,S]}set(e,t,n,s,i,a,u,c,f,h,m,g,x,v,w,S){this.Ah=e|0,this.Al=t|0,this.Bh=n|0,this.Bl=s|0,this.Ch=i|0,this.Cl=a|0,this.Dh=u|0,this.Dl=c|0,this.Eh=f|0,this.El=h|0,this.Fh=m|0,this.Fl=g|0,this.Gh=x|0,this.Gl=v|0,this.Hh=w|0,this.Hl=S|0}process(e,t){for(let b=0;b<16;b++,t+=4)yc[b]=e.getUint32(t),xc[b]=e.getUint32(t+=4);for(let b=16;b<80;b++){let E=yc[b-15]|0,C=xc[b-15]|0,_=Ht.rotrSH(E,C,1)^Ht.rotrSH(E,C,8)^Ht.shrSH(E,C,7),F=Ht.rotrSL(E,C,1)^Ht.rotrSL(E,C,8)^Ht.shrSL(E,C,7),R=yc[b-2]|0,q=xc[b-2]|0,H=Ht.rotrSH(R,q,19)^Ht.rotrBH(R,q,61)^Ht.shrSH(R,q,6),K=Ht.rotrSL(R,q,19)^Ht.rotrBL(R,q,61)^Ht.shrSL(R,q,6),X=Ht.add4L(F,K,xc[b-7],xc[b-16]),pe=Ht.add4H(X,_,H,yc[b-7],yc[b-16]);yc[b]=pe|0,xc[b]=X|0}let{Ah:n,Al:s,Bh:i,Bl:a,Ch:u,Cl:c,Dh:f,Dl:h,Eh:m,El:g,Fh:x,Fl:v,Gh:w,Gl:S,Hh:A,Hl:T}=this;for(let b=0;b<80;b++){let E=Ht.rotrSH(m,g,14)^Ht.rotrSH(m,g,18)^Ht.rotrBH(m,g,41),C=Ht.rotrSL(m,g,14)^Ht.rotrSL(m,g,18)^Ht.rotrBL(m,g,41),_=m&x^~m&w,F=g&v^~g&S,R=Ht.add5L(T,C,F,Ece[b],xc[b]),q=Ht.add5H(R,A,E,_,bce[b],yc[b]),H=R|0,K=Ht.rotrSH(n,s,28)^Ht.rotrBH(n,s,34)^Ht.rotrBH(n,s,39),X=Ht.rotrSL(n,s,28)^Ht.rotrBL(n,s,34)^Ht.rotrBL(n,s,39),pe=n&i^n&u^i&u,le=s&a^s&c^a&c;A=w|0,T=S|0,w=x|0,S=v|0,x=m|0,v=g|0,{h:m,l:g}=Ht.add(f|0,h|0,q|0,H|0),f=u|0,h=c|0,u=i|0,c=a|0,i=n|0,a=s|0;let ue=Ht.add3L(H,X,le);n=Ht.add3H(ue,q,K,pe),s=ue|0}({h:n,l:s}=Ht.add(this.Ah|0,this.Al|0,n|0,s|0)),{h:i,l:a}=Ht.add(this.Bh|0,this.Bl|0,i|0,a|0),{h:u,l:c}=Ht.add(this.Ch|0,this.Cl|0,u|0,c|0),{h:f,l:h}=Ht.add(this.Dh|0,this.Dl|0,f|0,h|0),{h:m,l:g}=Ht.add(this.Eh|0,this.El|0,m|0,g|0),{h:x,l:v}=Ht.add(this.Fh|0,this.Fl|0,x|0,v|0),{h:w,l:S}=Ht.add(this.Gh|0,this.Gl|0,w|0,S|0),{h:A,l:T}=Ht.add(this.Hh|0,this.Hl|0,A|0,T|0),this.set(n,s,i,a,u,c,f,h,m,g,x,v,w,S,A,T)}roundClean(){yc.fill(0),xc.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};var Ace=class extends kb{static{o(this,"SHA384")}constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}},I_=rf(()=>new kb);var __=rf(()=>new Ace);var rn=new ArrayBuffer(0),L="",Ar=class iB extends TypeError{static{o(this,"ArgumentError")}constructor(){super(...arguments),this.name=iB.NAME}static isType(e,t){if(typeof t=="string"){if(t==="Array"&&Array.isArray(e))return!0;if(t==="ArrayBuffer"&&e instanceof ArrayBuffer)return!0;if(t==="ArrayBufferView"&&ArrayBuffer.isView(e))return!0;if(typeof e===t)return!0}else if(e instanceof t)return!0;return!1}static assert(e,t,...n){for(let i of n)if(this.isType(e,i))return;let s=n.map(i=>i instanceof Function&&"name"in i?i.name:`${i}`);throw new iB(`Parameter '${t}' is not of type ${s.length>1?`(${s.join(" or ")})`:s[0]}`)}};Ar.NAME="ArgumentError";var pr=class uE extends TypeError{static{o(this,"ParameterError")}static assert(...e){let t=null,n,s;typeof e[0]=="string"?(t=e[0],n=e[1],s=e.slice(2)):(n=e[0],s=e.slice(1)),Ar.assert(n,"parameters","object");for(let i of s){let a=n[i];if(a==null)throw new uE(i,t)}}static assertEmpty(e,t,n){if(e==null)throw new uE(t,n)}constructor(e,t=null,n){super(),this.name=uE.NAME,this.field=e,t&&(this.target=t),n?this.message=n:this.message=`Absent mandatory parameter '${e}' ${t?` in '${t}'`:L}`}};pr.NAME="ParameterError";var be=class MF extends Error{static{o(this,"AsnError")}static assertSchema(e,t){if(!e.verified)throw new Error(`Object's schema was not verified against input data for ${t}`)}static assert(e,t){if(e.offset===-1)throw new MF(`Error during parsing of ASN.1 data. Data is not correct for '${t}'.`)}constructor(e){super(e),this.name="AsnError"}},_e=class{static{o(this,"PkiObject")}static blockName(){return this.CLASS_NAME}static fromBER(e){let t=Gr(e);be.assert(t,this.name);try{return new this({schema:t.result})}catch{throw new be(`Cannot create '${this.CLASS_NAME}' from ASN.1 object`)}}static defaultValues(e){throw new Error(`Invalid member name for ${this.CLASS_NAME} class: ${e}`)}static schema(e={}){throw new Error(`Method '${this.CLASS_NAME}.schema' should be overridden`)}get className(){return this.constructor.CLASS_NAME}toString(e="hex"){let t;try{t=this.toSchema()}catch{t=this.toSchema(!0)}return Et.ToString(t.toBER(),e)}};_e.CLASS_NAME="PkiObject";function hl(r){let e=!1,t=L,n=r.trim();for(let s=0;s<n.length;s++)n.charCodeAt(s)===32?e===!1&&(e=!0):(e&&(t+=" ",e=!1),t+=n[s]);return t.toLowerCase()}o(hl,"stringPrep");var sv="type",B_="value",aB=class vv extends _e{static{o(this,"AttributeTypeAndValue")}constructor(e={}){super(),this.type=B(e,sv,vv.defaultValues(sv)),this.value=B(e,B_,vv.defaultValues(B_)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case sv:return L;case B_:return{};default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new nt({name:t.type||L}),new wt({name:t.value||L})]})}fromSchema(e){De(e,[sv,"typeValue"]);let t=Ie(e,e,vv.schema({names:{type:sv,value:"typeValue"}}));be.assertSchema(t,this.className),this.type=t.result.type.valueBlock.toString(),this.value=t.result.typeValue}toSchema(){return new W({value:[new nt({value:this.type}),this.value]})}toJSON(){let e={type:this.type};return Object.keys(this.value).length!==0?e.value=this.value.toJSON():e.value=this.value,e}isEqual(e){let t=[Ui.blockName(),rd.blockName(),nd.blockName(),ef.blockName(),ji.blockName(),sd.blockName(),Cb.blockName(),ev.blockName(),Nb.blockName(),tv.blockName(),Tb.blockName(),Ib.blockName()];if(e instanceof ArrayBuffer)return mt.isEqual(this.value.valueBeforeDecodeView,e);if(e.constructor.blockName()===vv.blockName()){if(this.type!==e.type)return!1;let n=[!1,!1],s=this.value.constructor.blockName();for(let a of t)s===a&&(n[0]=!0),e.value.constructor.blockName()===a&&(n[1]=!0);if(n[0]!==n[1])return!1;if(n[0]&&n[1]){let a=hl(this.value.valueBlock.value),u=hl(e.value.valueBlock.value);if(a.localeCompare(u)!==0)return!1}else if(!mt.isEqual(this.value.valueBeforeDecodeView,e.value.valueBeforeDecodeView))return!1;return!0}return!1}};aB.CLASS_NAME="AttributeTypeAndValue";var nf="typesAndValues",Lb="valueBeforeDecode",gF="RDN",Vr=class yv extends _e{static{o(this,"RelativeDistinguishedNames")}constructor(e={}){super(),this.typesAndValues=B(e,nf,yv.defaultValues(nf)),this.valueBeforeDecode=B(e,Lb,yv.defaultValues(Lb)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case nf:return[];case Lb:return rn;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case nf:return t.length===0;case Lb:return t.byteLength===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.repeatedSequence||L,value:new Wr({value:[new Tt({name:t.repeatedSet||L,value:aB.schema(t.typeAndValue||{})})]})})]})}fromSchema(e){De(e,[gF,nf]);let t=Ie(e,e,yv.schema({names:{blockName:gF,repeatedSet:nf}}));be.assertSchema(t,this.className),nf in t.result&&(this.typesAndValues=Array.from(t.result.typesAndValues,n=>new aB({schema:n}))),this.valueBeforeDecode=t.result.RDN.valueBeforeDecodeView.slice().buffer}toSchema(){if(this.valueBeforeDecode.byteLength===0)return new W({value:[new Wr({value:Array.from(this.typesAndValues,t=>t.toSchema())})]});let e=Gr(this.valueBeforeDecode);if(be.assert(e,"RelativeDistinguishedNames"),!(e.result instanceof W))throw new Error("ASN.1 result should be SEQUENCE");return e.result}toJSON(){return{typesAndValues:Array.from(this.typesAndValues,e=>e.toJSON())}}isEqual(e){if(e instanceof yv){if(this.typesAndValues.length!==e.typesAndValues.length)return!1;for(let[t,n]of this.typesAndValues.entries())if(n.isEqual(e.typesAndValues[t])===!1)return!1;return!0}return e instanceof ArrayBuffer?fc(this.valueBeforeDecode,e):!1}};Vr.CLASS_NAME="RelativeDistinguishedNames";var xv="type",wv="value";function Cce(r={},e=!1){let t=B(r,"names",{});return new W({optional:e,value:[new oe({optional:!0,idBlock:{tagClass:2,tagNumber:1},name:t.country_name||L,value:[new Lr({value:[new ef,new ji]})]}),new oe({optional:!0,idBlock:{tagClass:2,tagNumber:2},name:t.administration_domain_name||L,value:[new Lr({value:[new ef,new ji]})]}),new vt({optional:!0,idBlock:{tagClass:3,tagNumber:0},name:t.network_address||L,isHexOnly:!0}),new vt({optional:!0,idBlock:{tagClass:3,tagNumber:1},name:t.terminal_identifier||L,isHexOnly:!0}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:2},name:t.private_domain_name||L,value:[new Lr({value:[new ef,new ji]})]}),new vt({optional:!0,idBlock:{tagClass:3,tagNumber:3},name:t.organization_name||L,isHexOnly:!0}),new vt({optional:!0,name:t.numeric_user_identifier||L,idBlock:{tagClass:3,tagNumber:4},isHexOnly:!0}),new oe({optional:!0,name:t.personal_name||L,idBlock:{tagClass:3,tagNumber:5},value:[new vt({idBlock:{tagClass:3,tagNumber:0},isHexOnly:!0}),new vt({optional:!0,idBlock:{tagClass:3,tagNumber:1},isHexOnly:!0}),new vt({optional:!0,idBlock:{tagClass:3,tagNumber:2},isHexOnly:!0}),new vt({optional:!0,idBlock:{tagClass:3,tagNumber:3},isHexOnly:!0})]}),new oe({optional:!0,name:t.organizational_unit_names||L,idBlock:{tagClass:3,tagNumber:6},value:[new Tt({value:new ji})]})]})}o(Cce,"builtInStandardAttributes");function Nce(r=!1){return new W({optional:r,value:[new ji,new ji]})}o(Nce,"builtInDomainDefinedAttributes");function Tce(r=!1){return new Wr({optional:r,value:[new vt({optional:!0,idBlock:{tagClass:3,tagNumber:0},isHexOnly:!0}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new wt]})]})}o(Tce,"extensionAttributes");var Cr=class hd extends _e{static{o(this,"GeneralName")}constructor(e={}){super(),this.type=B(e,xv,hd.defaultValues(xv)),this.value=B(e,wv,hd.defaultValues(wv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case xv:return 9;case wv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case xv:return t===hd.defaultValues(e);case wv:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new Lr({value:[new oe({idBlock:{tagClass:3,tagNumber:0},name:t.blockName||L,value:[new nt,new oe({idBlock:{tagClass:3,tagNumber:0},value:[new wt]})]}),new vt({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:1}}),new vt({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:2}}),new oe({idBlock:{tagClass:3,tagNumber:3},name:t.blockName||L,value:[Cce(t.builtInStandardAttributes||{},!1),Nce(!0),Tce(!0)]}),new oe({idBlock:{tagClass:3,tagNumber:4},name:t.blockName||L,value:[Vr.schema(t.directoryName||{})]}),new oe({idBlock:{tagClass:3,tagNumber:5},name:t.blockName||L,value:[new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Lr({value:[new sd,new ji,new nd,new Ui,new rd]})]}),new oe({idBlock:{tagClass:3,tagNumber:1},value:[new Lr({value:[new sd,new ji,new nd,new Ui,new rd]})]})]}),new vt({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:6}}),new vt({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:7}}),new vt({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:8}})]})}fromSchema(e){De(e,["blockName","otherName","rfc822Name","dNSName","x400Address","directoryName","ediPartyName","uniformResourceIdentifier","iPAddress","registeredID"]);let t=Ie(e,e,hd.schema({names:{blockName:"blockName",otherName:"otherName",rfc822Name:"rfc822Name",dNSName:"dNSName",x400Address:"x400Address",directoryName:{names:{blockName:"directoryName"}},ediPartyName:"ediPartyName",uniformResourceIdentifier:"uniformResourceIdentifier",iPAddress:"iPAddress",registeredID:"registeredID"}}));switch(be.assertSchema(t,this.className),this.type=t.result.blockName.idBlock.tagNumber,this.type){case 0:this.value=t.result.blockName;break;case 1:case 2:case 6:{let n=t.result.blockName;n.idBlock.tagClass=1,n.idBlock.tagNumber=22;let s=n.toBER(!1),i=Gr(s);be.assert(i,"GeneralName value"),this.value=i.result.valueBlock.value}break;case 3:this.value=t.result.blockName;break;case 4:this.value=new Vr({schema:t.result.directoryName});break;case 5:this.value=t.result.ediPartyName;break;case 7:this.value=new Ve({valueHex:t.result.blockName.valueBlock.valueHex});break;case 8:{let n=t.result.blockName;n.idBlock.tagClass=1,n.idBlock.tagNumber=6;let s=n.toBER(!1),i=Gr(s);be.assert(i,"GeneralName registeredID"),this.value=i.result.valueBlock.toString()}break}}toSchema(){switch(this.type){case 0:case 3:case 5:return new oe({idBlock:{tagClass:3,tagNumber:this.type},value:[this.value]});case 1:case 2:case 6:{let e=new ev({value:this.value});return e.idBlock.tagClass=3,e.idBlock.tagNumber=this.type,e}case 4:return new oe({idBlock:{tagClass:3,tagNumber:4},value:[this.value.toSchema()]});case 7:{let e=this.value;return e.idBlock.tagClass=3,e.idBlock.tagNumber=this.type,e}case 8:{let e=new nt({value:this.value});return e.idBlock.tagClass=3,e.idBlock.tagNumber=this.type,e}default:return hd.schema()}}toJSON(){let e={type:this.type,value:L};if(typeof this.value=="string")e.value=this.value;else try{e.value=this.value.toJSON()}catch{}return e}};Cr.CLASS_NAME="GeneralName";var Sv="accessMethod",bv="accessLocation",Ice=[Sv,bv],oB=class cE extends _e{static{o(this,"AccessDescription")}constructor(e={}){super(),this.accessMethod=B(e,Sv,cE.defaultValues(Sv)),this.accessLocation=B(e,bv,cE.defaultValues(bv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Sv:return L;case bv:return new Cr;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new nt({name:t.accessMethod||L}),Cr.schema(t.accessLocation||{})]})}fromSchema(e){De(e,Ice);let t=Ie(e,e,cE.schema({names:{accessMethod:Sv,accessLocation:{names:{blockName:bv}}}}));be.assertSchema(t,this.className),this.accessMethod=t.result.accessMethod.valueBlock.toString(),this.accessLocation=new Cr({schema:t.result.accessLocation})}toSchema(){return new W({value:[new nt({value:this.accessMethod}),this.accessLocation.toSchema()]})}toJSON(){return{accessMethod:this.accessMethod,accessLocation:this.accessLocation.toJSON()}}};oB.CLASS_NAME="AccessDescription";var Sc="seconds",bc="millis",Ec="micros",uf=class pd extends _e{static{o(this,"Accuracy")}constructor(e={}){super(),Sc in e&&(this.seconds=B(e,Sc,pd.defaultValues(Sc))),bc in e&&(this.millis=B(e,bc,pd.defaultValues(bc))),Ec in e&&(this.micros=B(e,Ec,pd.defaultValues(Ec))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Sc:case bc:case Ec:return 0;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Sc:case bc:case Ec:return t===pd.defaultValues(e);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,optional:!0,value:[new ge({optional:!0,name:t.seconds||L}),new vt({name:t.millis||L,optional:!0,idBlock:{tagClass:3,tagNumber:0}}),new vt({name:t.micros||L,optional:!0,idBlock:{tagClass:3,tagNumber:1}})]})}fromSchema(e){De(e,[Sc,bc,Ec]);let t=Ie(e,e,pd.schema({names:{seconds:Sc,millis:bc,micros:Ec}}));if(be.assertSchema(t,this.className),"seconds"in t.result&&(this.seconds=t.result.seconds.valueBlock.valueDec),"millis"in t.result){let n=new ge({valueHex:t.result.millis.valueBlock.valueHex});this.millis=n.valueBlock.valueDec}if("micros"in t.result){let n=new ge({valueHex:t.result.micros.valueBlock.valueHex});this.micros=n.valueBlock.valueDec}}toSchema(){let e=[];if(this.seconds!==void 0&&e.push(new ge({value:this.seconds})),this.millis!==void 0){let t=new ge({value:this.millis});e.push(new vt({idBlock:{tagClass:3,tagNumber:0},valueHex:t.valueBlock.valueHexView}))}if(this.micros!==void 0){let t=new ge({value:this.micros});e.push(new vt({idBlock:{tagClass:3,tagNumber:1},valueHex:t.valueBlock.valueHexView}))}return new W({value:e})}toJSON(){let e={};return this.seconds!==void 0&&(e.seconds=this.seconds),this.millis!==void 0&&(e.millis=this.millis),this.micros!==void 0&&(e.micros=this.micros),e}};uf.CLASS_NAME="Accuracy";var Vb="algorithmId",iv="algorithmParams",FF="algorithm",uB="params",_ce=[FF,uB],ve=class Ev extends _e{static{o(this,"AlgorithmIdentifier")}constructor(e={}){super(),this.algorithmId=B(e,Vb,Ev.defaultValues(Vb)),iv in e&&(this.algorithmParams=B(e,iv,Ev.defaultValues(iv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Vb:return L;case iv:return new wt;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Vb:return t===L;case iv:return t instanceof wt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,optional:t.optional||!1,value:[new nt({name:t.algorithmIdentifier||L}),new wt({name:t.algorithmParams||L,optional:!0})]})}fromSchema(e){De(e,_ce);let t=Ie(e,e,Ev.schema({names:{algorithmIdentifier:FF,algorithmParams:uB}}));be.assertSchema(t,this.className),this.algorithmId=t.result.algorithm.valueBlock.toString(),uB in t.result&&(this.algorithmParams=t.result.params)}toSchema(){let e=[];return e.push(new nt({value:this.algorithmId})),this.algorithmParams&&!(this.algorithmParams instanceof wt)&&e.push(this.algorithmParams),new W({value:e})}toJSON(){let e={algorithmId:this.algorithmId};return this.algorithmParams&&!(this.algorithmParams instanceof wt)&&(e.algorithmParams=this.algorithmParams.toJSON()),e}isEqual(e){return!(e instanceof Ev)||this.algorithmId!==e.algorithmId?!1:this.algorithmParams?e.algorithmParams?JSON.stringify(this.algorithmParams)===JSON.stringify(e.algorithmParams):!1:!e.algorithmParams}};ve.CLASS_NAME="AlgorithmIdentifier";var dd="altNames",Bce=[dd],cB=class lB extends _e{static{o(this,"AltName")}constructor(e={}){super(),this.altNames=B(e,dd,lB.defaultValues(dd)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case dd:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.altNames||L,value:Cr.schema()})]})}fromSchema(e){De(e,Bce);let t=Ie(e,e,lB.schema({names:{altNames:dd}}));be.assertSchema(t,this.className),dd in t.result&&(this.altNames=Array.from(t.result.altNames,n=>new Cr({schema:n})))}toSchema(){return new W({value:Array.from(this.altNames,e=>e.toSchema())})}toJSON(){return{altNames:Array.from(this.altNames,e=>e.toJSON())}}};cB.CLASS_NAME="AltName";var md="type",gd="values",Dce=[md,gd],nn=class lE extends _e{static{o(this,"Attribute")}constructor(e={}){super(),this.type=B(e,md,lE.defaultValues(md)),this.values=B(e,gd,lE.defaultValues(gd)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case md:return L;case gd:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case md:return t===L;case gd:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new nt({name:t.type||L}),new Wr({name:t.setName||L,value:[new Tt({name:t.values||L,value:new wt})]})]})}fromSchema(e){De(e,Dce);let t=Ie(e,e,lE.schema({names:{type:md,values:gd}}));be.assertSchema(t,this.className),this.type=t.result.type.valueBlock.toString(),this.values=t.result.values}toSchema(){return new W({value:[new nt({value:this.type}),new Wr({value:this.values})]})}toJSON(){return{type:this.type,values:Array.from(this.values,e=>e.toJSON())}}};nn.CLASS_NAME="Attribute";var Av="notBeforeTime",Cv="notAfterTime",Rce=[Av,Cv],Eh=class fE extends _e{static{o(this,"AttCertValidityPeriod")}constructor(e={}){super(),this.notBeforeTime=B(e,Av,fE.defaultValues(Av)),this.notAfterTime=B(e,Cv,fE.defaultValues(Cv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Av:case Cv:return new Date(0,0,0);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new kr({name:t.notBeforeTime||L}),new kr({name:t.notAfterTime||L})]})}fromSchema(e){De(e,Rce);let t=Ie(e,e,fE.schema({names:{notBeforeTime:Av,notAfterTime:Cv}}));be.assertSchema(t,this.className),this.notBeforeTime=t.result.notBeforeTime.toDate(),this.notAfterTime=t.result.notAfterTime.toDate()}toSchema(){return new W({value:[new kr({valueDate:this.notBeforeTime}),new kr({valueDate:this.notAfterTime})]})}toJSON(){return{notBeforeTime:this.notBeforeTime,notAfterTime:this.notAfterTime}}};Eh.CLASS_NAME="AttCertValidityPeriod";var av="names",vF="generalNames",Xn=class fB extends _e{static{o(this,"GeneralNames")}constructor(e={}){super(),this.names=B(e,av,fB.defaultValues(av)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case"names":return[];default:return super.defaultValues(e)}}static schema(e={},t=!1){let n=B(e,av,{});return new W({optional:t,name:n.blockName||L,value:[new Tt({name:n.generalNames||L,value:Cr.schema()})]})}fromSchema(e){De(e,[av,vF]);let t=Ie(e,e,fB.schema({names:{blockName:av,generalNames:vF}}));be.assertSchema(t,this.className),this.names=Array.from(t.result.generalNames,n=>new Cr({schema:n}))}toSchema(){return new W({value:Array.from(this.names,e=>e.toSchema())})}toJSON(){return{names:Array.from(this.names,e=>e.toJSON())}}};Xn.CLASS_NAME="GeneralNames";var Pce="2.5.29.9",Oce="2.5.29.14",kce="2.5.29.15",Lce="2.5.29.16",qF="2.5.29.17",HF="2.5.29.18",hD="2.5.29.19",Vce="2.5.29.20",Uce="2.5.29.27",jce="2.5.29.21",Mce="2.5.29.24",KF="2.5.29.28",$F="2.5.29.29",GF="2.5.29.30",XF="2.5.29.31",pD="2.5.29.46",WF="2.5.29.32",Mi="2.5.29.32.0",Fce="1.3.6.1.4.1.311.21.10",zF="2.5.29.33",dD="2.5.29.35",JF="2.5.29.36",qce="2.5.29.37",Hce="2.5.29.54",mD="1.3.6.1.5.5.7.1.1",Kce="1.3.6.1.5.5.7.1.11",$ce="1.3.6.1.4.1.11129.2.4.2";var Gce="1.3.6.1.4.1.311.21.7",Xce="1.3.6.1.4.1.311.21.1",Wce="1.3.6.1.5.5.7.1.3",gD="1.2.840.113549.1.7.1",YF="1.2.840.113549.1.7.2",QF="1.2.840.113549.1.7.3",ZF="1.2.840.113549.1.7.6",zce="1.2.840.113549.1.9.16.1.4",yF="1.2.840.113549.1.9.22.1",Jce="1.2.840.113549.1.9.22.2",xF="1.2.840.113549.1.9.22.3",wF="1.2.840.113549.1.9.23.1",Yce="1.3.6.1.5.5.7",vD=`${Yce}.48`,hE=`${vD}.1.1`,fbe=`${vD}.2`,hbe=`${vD}.1`;var cf="keyIdentifier",lf="authorityCertIssuer",ff="authorityCertSerialNumber",Qce=[cf,lf,ff],yD=class Nv extends _e{static{o(this,"AuthorityKeyIdentifier")}constructor(e={}){super(),cf in e&&(this.keyIdentifier=B(e,cf,Nv.defaultValues(cf))),lf in e&&(this.authorityCertIssuer=B(e,lf,Nv.defaultValues(lf))),ff in e&&(this.authorityCertSerialNumber=B(e,ff,Nv.defaultValues(ff))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case cf:return new Ve;case lf:return[];case ff:return new ge;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new vt({name:t.keyIdentifier||L,optional:!0,idBlock:{tagClass:3,tagNumber:0}}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Tt({name:t.authorityCertIssuer||L,value:Cr.schema()})]}),new vt({name:t.authorityCertSerialNumber||L,optional:!0,idBlock:{tagClass:3,tagNumber:2}})]})}fromSchema(e){De(e,Qce);let t=Ie(e,e,Nv.schema({names:{keyIdentifier:cf,authorityCertIssuer:lf,authorityCertSerialNumber:ff}}));be.assertSchema(t,this.className),cf in t.result&&(this.keyIdentifier=new Ve({valueHex:t.result.keyIdentifier.valueBlock.valueHex})),lf in t.result&&(this.authorityCertIssuer=Array.from(t.result.authorityCertIssuer,n=>new Cr({schema:n}))),ff in t.result&&(this.authorityCertSerialNumber=new ge({valueHex:t.result.authorityCertSerialNumber.valueBlock.valueHex}))}toSchema(){let e=[];return this.keyIdentifier&&e.push(new vt({idBlock:{tagClass:3,tagNumber:0},valueHex:this.keyIdentifier.valueBlock.valueHexView})),this.authorityCertIssuer&&e.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.authorityCertIssuer,t=>t.toSchema())})),this.authorityCertSerialNumber&&e.push(new vt({idBlock:{tagClass:3,tagNumber:2},valueHex:this.authorityCertSerialNumber.valueBlock.valueHexView})),new W({value:e})}toJSON(){let e={};return this.keyIdentifier&&(e.keyIdentifier=this.keyIdentifier.toJSON()),this.authorityCertIssuer&&(e.authorityCertIssuer=Array.from(this.authorityCertIssuer,t=>t.toJSON())),this.authorityCertSerialNumber&&(e.authorityCertSerialNumber=this.authorityCertSerialNumber.toJSON()),e}};yD.CLASS_NAME="AuthorityKeyIdentifier";var sf="pathLenConstraint",af="cA",xD=class pE extends _e{static{o(this,"BasicConstraints")}constructor(e={}){super(),this.cA=B(e,af,!1),sf in e&&(this.pathLenConstraint=B(e,sf,0)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case af:return!1;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ua({optional:!0,name:t.cA||L}),new ge({optional:!0,name:t.pathLenConstraint||L})]})}fromSchema(e){De(e,[af,sf]);let t=Ie(e,e,pE.schema({names:{cA:af,pathLenConstraint:sf}}));be.assertSchema(t,this.className),af in t.result&&(this.cA=t.result.cA.valueBlock.value),sf in t.result&&(t.result.pathLenConstraint.valueBlock.isHexOnly?this.pathLenConstraint=t.result.pathLenConstraint:this.pathLenConstraint=t.result.pathLenConstraint.valueBlock.valueDec)}toSchema(){let e=[];return this.cA!==pE.defaultValues(af)&&e.push(new ua({value:this.cA})),sf in this&&(this.pathLenConstraint instanceof ge?e.push(this.pathLenConstraint):e.push(new ge({value:this.pathLenConstraint}))),new W({value:e})}toJSON(){let e={};return this.cA!==pE.defaultValues(af)&&(e.cA=this.cA),sf in this&&(this.pathLenConstraint instanceof ge?e.pathLenConstraint=this.pathLenConstraint.toJSON():e.pathLenConstraint=this.pathLenConstraint),e}};xD.CLASS_NAME="BasicConstraints";var D_="certificateIndex",R_="keyIndex",e9=class hB extends _e{static{o(this,"CAVersion")}constructor(e={}){super(),this.certificateIndex=B(e,D_,hB.defaultValues(D_)),this.keyIndex=B(e,R_,hB.defaultValues(R_)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case D_:case R_:return 0;default:return super.defaultValues(e)}}static schema(){return new ge}fromSchema(e){if(e.constructor.blockName()!==ge.blockName())throw new Error("Object's schema was not verified against input data for CAVersion");let t=e.valueBlock.valueHex.slice(0),n=new Uint8Array(t);switch(!0){case t.byteLength<4:{let m=new ArrayBuffer(4);new Uint8Array(m).set(n,4-t.byteLength),t=m.slice(0)}break;case t.byteLength>4:{let m=new ArrayBuffer(4);new Uint8Array(m).set(n.slice(0,4)),t=m.slice(0)}break}let s=t.slice(0,2),i=new Uint8Array(s),a=i[0];i[0]=i[1],i[1]=a;let u=new Uint16Array(s);this.keyIndex=u[0];let c=t.slice(2),f=new Uint8Array(c);a=f[0],f[0]=f[1],f[1]=a;let h=new Uint16Array(c);this.certificateIndex=h[0]}toSchema(){let e=new ArrayBuffer(2),t=new Uint16Array(e);t[0]=this.certificateIndex;let n=new Uint8Array(e),s=n[0];n[0]=n[1],n[1]=s;let i=new ArrayBuffer(2),a=new Uint16Array(i);a[0]=this.keyIndex;let u=new Uint8Array(i);return s=u[0],u[0]=u[1],u[1]=s,new ge({valueHex:Yl(i,e)})}toJSON(){return{certificateIndex:this.certificateIndex,keyIndex:this.keyIndex}}};e9.CLASS_NAME="CAVersion";var Tv="policyQualifierId",Iv="qualifier",Zce=[Tv,Iv],pB=class dE extends _e{static{o(this,"PolicyQualifierInfo")}constructor(e={}){super(),this.policyQualifierId=B(e,Tv,dE.defaultValues(Tv)),this.qualifier=B(e,Iv,dE.defaultValues(Iv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Tv:return L;case Iv:return new wt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new nt({name:t.policyQualifierId||L}),new wt({name:t.qualifier||L})]})}fromSchema(e){De(e,Zce);let t=Ie(e,e,dE.schema({names:{policyQualifierId:Tv,qualifier:Iv}}));be.assertSchema(t,this.className),this.policyQualifierId=t.result.policyQualifierId.valueBlock.toString(),this.qualifier=t.result.qualifier}toSchema(){return new W({value:[new nt({value:this.policyQualifierId}),this.qualifier]})}toJSON(){return{policyQualifierId:this.policyQualifierId,qualifier:this.qualifier.toJSON()}}};pB.CLASS_NAME="PolicyQualifierInfo";var _v="policyIdentifier",hf="policyQualifiers",ele=[_v,hf],dB=class mE extends _e{static{o(this,"PolicyInformation")}constructor(e={}){super(),this.policyIdentifier=B(e,_v,mE.defaultValues(_v)),hf in e&&(this.policyQualifiers=B(e,hf,mE.defaultValues(hf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case _v:return L;case hf:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new nt({name:t.policyIdentifier||L}),new W({optional:!0,value:[new Tt({name:t.policyQualifiers||L,value:pB.schema()})]})]})}fromSchema(e){De(e,ele);let t=Ie(e,e,mE.schema({names:{policyIdentifier:_v,policyQualifiers:hf}}));be.assertSchema(t,this.className),this.policyIdentifier=t.result.policyIdentifier.valueBlock.toString(),hf in t.result&&(this.policyQualifiers=Array.from(t.result.policyQualifiers,n=>new pB({schema:n})))}toSchema(){let e=[];return e.push(new nt({value:this.policyIdentifier})),this.policyQualifiers&&e.push(new W({value:Array.from(this.policyQualifiers,t=>t.toSchema())})),new W({value:e})}toJSON(){let e={policyIdentifier:this.policyIdentifier};return this.policyQualifiers&&(e.policyQualifiers=Array.from(this.policyQualifiers,t=>t.toJSON())),e}};dB.CLASS_NAME="PolicyInformation";var Bv="certificatePolicies",tle=[Bv],mB=class gB extends _e{static{o(this,"CertificatePolicies")}constructor(e={}){super(),this.certificatePolicies=B(e,Bv,gB.defaultValues(Bv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Bv:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.certificatePolicies||L,value:dB.schema()})]})}fromSchema(e){De(e,tle);let t=Ie(e,e,gB.schema({names:{certificatePolicies:Bv}}));be.assertSchema(t,this.className),this.certificatePolicies=Array.from(t.result.certificatePolicies,n=>new dB({schema:n}))}toSchema(){return new W({value:Array.from(this.certificatePolicies,e=>e.toSchema())})}toJSON(){return{certificatePolicies:Array.from(this.certificatePolicies,e=>e.toJSON())}}};mB.CLASS_NAME="CertificatePolicies";var Dv="templateID",Ho="templateMajorVersion",Ko="templateMinorVersion",rle=[Dv,Ho,Ko],nle=class Rv extends _e{static{o(this,"CertificateTemplate")}constructor(e={}){super(),this.templateID=B(e,Dv,Rv.defaultValues(Dv)),Ho in e&&(this.templateMajorVersion=B(e,Ho,Rv.defaultValues(Ho))),Ko in e&&(this.templateMinorVersion=B(e,Ko,Rv.defaultValues(Ko))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Dv:return L;case Ho:case Ko:return 0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new nt({name:t.templateID||L}),new ge({name:t.templateMajorVersion||L,optional:!0}),new ge({name:t.templateMinorVersion||L,optional:!0})]})}fromSchema(e){De(e,rle);let t=Ie(e,e,Rv.schema({names:{templateID:Dv,templateMajorVersion:Ho,templateMinorVersion:Ko}}));be.assertSchema(t,this.className),this.templateID=t.result.templateID.valueBlock.toString(),Ho in t.result&&(this.templateMajorVersion=t.result.templateMajorVersion.valueBlock.valueDec),Ko in t.result&&(this.templateMinorVersion=t.result.templateMinorVersion.valueBlock.valueDec)}toSchema(){let e=[];return e.push(new nt({value:this.templateID})),Ho in this&&e.push(new ge({value:this.templateMajorVersion})),Ko in this&&e.push(new ge({value:this.templateMinorVersion})),new W({value:e})}toJSON(){let e={templateID:this.templateID};return Ho in this&&(e.templateMajorVersion=this.templateMajorVersion),Ko in this&&(e.templateMinorVersion=this.templateMinorVersion),e}},pf="distributionPoint",t9="distributionPointNames",df="reasons",mf="cRLIssuer",r9="cRLIssuerNames",sle=[pf,t9,df,mf,r9],vB=class Pv extends _e{static{o(this,"DistributionPoint")}constructor(e={}){super(),pf in e&&(this.distributionPoint=B(e,pf,Pv.defaultValues(pf))),df in e&&(this.reasons=B(e,df,Pv.defaultValues(df))),mf in e&&(this.cRLIssuer=B(e,mf,Pv.defaultValues(mf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case pf:return[];case df:return new qt;case mf:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Lr({value:[new oe({name:t.distributionPoint||L,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Tt({name:t.distributionPointNames||L,value:Cr.schema()})]}),new oe({name:t.distributionPoint||L,optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Vr.schema().valueBlock.value})]})]}),new vt({name:t.reasons||L,optional:!0,idBlock:{tagClass:3,tagNumber:1}}),new oe({name:t.cRLIssuer||L,optional:!0,idBlock:{tagClass:3,tagNumber:2},value:[new Tt({name:t.cRLIssuerNames||L,value:Cr.schema()})]})]})}fromSchema(e){De(e,sle);let t=Ie(e,e,Pv.schema({names:{distributionPoint:pf,distributionPointNames:t9,reasons:df,cRLIssuer:mf,cRLIssuerNames:r9}}));be.assertSchema(t,this.className),pf in t.result&&(t.result.distributionPoint.idBlock.tagNumber===0&&(this.distributionPoint=Array.from(t.result.distributionPointNames,n=>new Cr({schema:n}))),t.result.distributionPoint.idBlock.tagNumber===1&&(this.distributionPoint=new Vr({schema:new W({value:t.result.distributionPoint.valueBlock.value})}))),df in t.result&&(this.reasons=new qt({valueHex:t.result.reasons.valueBlock.valueHex})),mf in t.result&&(this.cRLIssuer=Array.from(t.result.cRLIssuerNames,n=>new Cr({schema:n})))}toSchema(){let e=[];if(this.distributionPoint){let t;this.distributionPoint instanceof Array?t=new oe({idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.distributionPoint,n=>n.toSchema())}):t=new oe({idBlock:{tagClass:3,tagNumber:1},value:[this.distributionPoint.toSchema()]}),e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[t]}))}return this.reasons&&e.push(new vt({idBlock:{tagClass:3,tagNumber:1},valueHex:this.reasons.valueBlock.valueHexView})),this.cRLIssuer&&e.push(new oe({idBlock:{tagClass:3,tagNumber:2},value:Array.from(this.cRLIssuer,t=>t.toSchema())})),new W({value:e})}toJSON(){let e={};return this.distributionPoint&&(this.distributionPoint instanceof Array?e.distributionPoint=Array.from(this.distributionPoint,t=>t.toJSON()):e.distributionPoint=this.distributionPoint.toJSON()),this.reasons&&(e.reasons=this.reasons.toJSON()),this.cRLIssuer&&(e.cRLIssuer=Array.from(this.cRLIssuer,t=>t.toJSON())),e}};vB.CLASS_NAME="DistributionPoint";var Ov="distributionPoints",ile=[Ov],yB=class xB extends _e{static{o(this,"CRLDistributionPoints")}constructor(e={}){super(),this.distributionPoints=B(e,Ov,xB.defaultValues(Ov)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Ov:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.distributionPoints||L,value:vB.schema()})]})}fromSchema(e){De(e,ile);let t=Ie(e,e,xB.schema({names:{distributionPoints:Ov}}));be.assertSchema(t,this.className),this.distributionPoints=Array.from(t.result.distributionPoints,n=>new vB({schema:n}))}toSchema(){return new W({value:Array.from(this.distributionPoints,e=>e.toSchema())})}toJSON(){return{distributionPoints:Array.from(this.distributionPoints,e=>e.toJSON())}}};yB.CLASS_NAME="CRLDistributionPoints";var kv="keyPurposes",ale=[kv],n9=class wB extends _e{static{o(this,"ExtKeyUsage")}constructor(e={}){super(),this.keyPurposes=B(e,kv,wB.defaultValues(kv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case kv:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.keyPurposes||L,value:new nt})]})}fromSchema(e){De(e,ale);let t=Ie(e,e,wB.schema({names:{keyPurposes:kv}}));be.assertSchema(t,this.className),this.keyPurposes=Array.from(t.result.keyPurposes,n=>n.valueBlock.toString())}toSchema(){return new W({value:Array.from(this.keyPurposes,e=>new nt({value:e}))})}toJSON(){return{keyPurposes:Array.from(this.keyPurposes)}}};n9.CLASS_NAME="ExtKeyUsage";var ov="accessDescriptions",SB=class bB extends _e{static{o(this,"InfoAccess")}constructor(e={}){super(),this.accessDescriptions=B(e,ov,bB.defaultValues(ov)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ov:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.accessDescriptions||L,value:oB.schema()})]})}fromSchema(e){De(e,[ov]);let t=Ie(e,e,bB.schema({names:{accessDescriptions:ov}}));be.assertSchema(t,this.className),this.accessDescriptions=Array.from(t.result.accessDescriptions,n=>new oB({schema:n}))}toSchema(){return new W({value:Array.from(this.accessDescriptions,e=>e.toSchema())})}toJSON(){return{accessDescriptions:Array.from(this.accessDescriptions,e=>e.toJSON())}}};SB.CLASS_NAME="InfoAccess";var gf="distributionPoint",s9="distributionPointNames",Ac="onlyContainsUserCerts",Cc="onlyContainsCACerts",Nc="onlySomeReasons",Tc="indirectCRL",Ic="onlyContainsAttributeCerts",ole=[gf,s9,Ac,Cc,Nc,Tc,Ic],i9=class os extends _e{static{o(this,"IssuingDistributionPoint")}constructor(e={}){super(),gf in e&&(this.distributionPoint=B(e,gf,os.defaultValues(gf))),this.onlyContainsUserCerts=B(e,Ac,os.defaultValues(Ac)),this.onlyContainsCACerts=B(e,Cc,os.defaultValues(Cc)),Nc in e&&(this.onlySomeReasons=B(e,Nc,os.defaultValues(Nc))),this.indirectCRL=B(e,Tc,os.defaultValues(Tc)),this.onlyContainsAttributeCerts=B(e,Ic,os.defaultValues(Ic)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case gf:return[];case Ac:return!1;case Cc:return!1;case Nc:return 0;case Tc:return!1;case Ic:return!1;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Lr({value:[new oe({name:t.distributionPoint||L,idBlock:{tagClass:3,tagNumber:0},value:[new Tt({name:t.distributionPointNames||L,value:Cr.schema()})]}),new oe({name:t.distributionPoint||L,idBlock:{tagClass:3,tagNumber:1},value:Vr.schema().valueBlock.value})]})]}),new vt({name:t.onlyContainsUserCerts||L,optional:!0,idBlock:{tagClass:3,tagNumber:1}}),new vt({name:t.onlyContainsCACerts||L,optional:!0,idBlock:{tagClass:3,tagNumber:2}}),new vt({name:t.onlySomeReasons||L,optional:!0,idBlock:{tagClass:3,tagNumber:3}}),new vt({name:t.indirectCRL||L,optional:!0,idBlock:{tagClass:3,tagNumber:4}}),new vt({name:t.onlyContainsAttributeCerts||L,optional:!0,idBlock:{tagClass:3,tagNumber:5}})]})}fromSchema(e){De(e,ole);let t=Ie(e,e,os.schema({names:{distributionPoint:gf,distributionPointNames:s9,onlyContainsUserCerts:Ac,onlyContainsCACerts:Cc,onlySomeReasons:Nc,indirectCRL:Tc,onlyContainsAttributeCerts:Ic}}));if(be.assertSchema(t,this.className),gf in t.result)switch(!0){case t.result.distributionPoint.idBlock.tagNumber===0:this.distributionPoint=Array.from(t.result.distributionPointNames,n=>new Cr({schema:n}));break;case t.result.distributionPoint.idBlock.tagNumber===1:this.distributionPoint=new Vr({schema:new W({value:t.result.distributionPoint.valueBlock.value})});break;default:throw new Error("Unknown tagNumber for distributionPoint: {$asn1.result.distributionPoint.idBlock.tagNumber}")}if(Ac in t.result){let n=new Uint8Array(t.result.onlyContainsUserCerts.valueBlock.valueHex);this.onlyContainsUserCerts=n[0]!==0}if(Cc in t.result){let n=new Uint8Array(t.result.onlyContainsCACerts.valueBlock.valueHex);this.onlyContainsCACerts=n[0]!==0}if(Nc in t.result){let n=new Uint8Array(t.result.onlySomeReasons.valueBlock.valueHex);this.onlySomeReasons=n[0]}if(Tc in t.result){let n=new Uint8Array(t.result.indirectCRL.valueBlock.valueHex);this.indirectCRL=n[0]!==0}if(Ic in t.result){let n=new Uint8Array(t.result.onlyContainsAttributeCerts.valueBlock.valueHex);this.onlyContainsAttributeCerts=n[0]!==0}}toSchema(){let e=[];if(this.distributionPoint){let t;this.distributionPoint instanceof Array?t=new oe({idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.distributionPoint,n=>n.toSchema())}):(t=this.distributionPoint.toSchema(),t.idBlock.tagClass=3,t.idBlock.tagNumber=1),e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[t]}))}if(this.onlyContainsUserCerts!==os.defaultValues(Ac)&&e.push(new vt({idBlock:{tagClass:3,tagNumber:1},valueHex:new Uint8Array([255]).buffer})),this.onlyContainsCACerts!==os.defaultValues(Cc)&&e.push(new vt({idBlock:{tagClass:3,tagNumber:2},valueHex:new Uint8Array([255]).buffer})),this.onlySomeReasons!==void 0){let t=new ArrayBuffer(1),n=new Uint8Array(t);n[0]=this.onlySomeReasons,e.push(new vt({idBlock:{tagClass:3,tagNumber:3},valueHex:t}))}return this.indirectCRL!==os.defaultValues(Tc)&&e.push(new vt({idBlock:{tagClass:3,tagNumber:4},valueHex:new Uint8Array([255]).buffer})),this.onlyContainsAttributeCerts!==os.defaultValues(Ic)&&e.push(new vt({idBlock:{tagClass:3,tagNumber:5},valueHex:new Uint8Array([255]).buffer})),new W({value:e})}toJSON(){let e={};return this.distributionPoint&&(this.distributionPoint instanceof Array?e.distributionPoint=Array.from(this.distributionPoint,t=>t.toJSON()):e.distributionPoint=this.distributionPoint.toJSON()),this.onlyContainsUserCerts!==os.defaultValues(Ac)&&(e.onlyContainsUserCerts=this.onlyContainsUserCerts),this.onlyContainsCACerts!==os.defaultValues(Cc)&&(e.onlyContainsCACerts=this.onlyContainsCACerts),Nc in this&&(e.onlySomeReasons=this.onlySomeReasons),this.indirectCRL!==os.defaultValues(Tc)&&(e.indirectCRL=this.indirectCRL),this.onlyContainsAttributeCerts!==os.defaultValues(Ic)&&(e.onlyContainsAttributeCerts=this.onlyContainsAttributeCerts),e}};i9.CLASS_NAME="IssuingDistributionPoint";var Lv="base",vd="minimum",_c="maximum",ule=[Lv,vd,_c],Vv=class Uv extends _e{static{o(this,"GeneralSubtree")}constructor(e={}){super(),this.base=B(e,Lv,Uv.defaultValues(Lv)),this.minimum=B(e,vd,Uv.defaultValues(vd)),_c in e&&(this.maximum=B(e,_c,Uv.defaultValues(_c))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Lv:return new Cr;case vd:return 0;case _c:return 0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[Cr.schema(t.base||{}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new ge({name:t.minimum||L})]}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new ge({name:t.maximum||L})]})]})}fromSchema(e){De(e,ule);let t=Ie(e,e,Uv.schema({names:{base:{names:{blockName:Lv}},minimum:vd,maximum:_c}}));be.assertSchema(t,this.className),this.base=new Cr({schema:t.result.base}),vd in t.result&&(t.result.minimum.valueBlock.isHexOnly?this.minimum=t.result.minimum:this.minimum=t.result.minimum.valueBlock.valueDec),_c in t.result&&(t.result.maximum.valueBlock.isHexOnly?this.maximum=t.result.maximum:this.maximum=t.result.maximum.valueBlock.valueDec)}toSchema(){let e=[];if(e.push(this.base.toSchema()),this.minimum!==0){let t=0;this.minimum instanceof ge?t=this.minimum:t=new ge({value:this.minimum}),e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[t]}))}if(_c in this){let t=0;this.maximum instanceof ge?t=this.maximum:t=new ge({value:this.maximum}),e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[t]}))}return new W({value:e})}toJSON(){let e={base:this.base.toJSON()};return this.minimum!==0&&(typeof this.minimum=="number"?e.minimum=this.minimum:e.minimum=this.minimum.toJSON()),this.maximum!==void 0&&(typeof this.maximum=="number"?e.maximum=this.maximum:e.maximum=this.maximum.toJSON()),e}};Vv.CLASS_NAME="GeneralSubtree";var vf="permittedSubtrees",yf="excludedSubtrees",cle=[vf,yf],a9=class gE extends _e{static{o(this,"NameConstraints")}constructor(e={}){super(),vf in e&&(this.permittedSubtrees=B(e,vf,gE.defaultValues(vf))),yf in e&&(this.excludedSubtrees=B(e,yf,gE.defaultValues(yf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case vf:case yf:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Tt({name:t.permittedSubtrees||L,value:Vv.schema()})]}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Tt({name:t.excludedSubtrees||L,value:Vv.schema()})]})]})}fromSchema(e){De(e,cle);let t=Ie(e,e,gE.schema({names:{permittedSubtrees:vf,excludedSubtrees:yf}}));be.assertSchema(t,this.className),vf in t.result&&(this.permittedSubtrees=Array.from(t.result.permittedSubtrees,n=>new Vv({schema:n}))),yf in t.result&&(this.excludedSubtrees=Array.from(t.result.excludedSubtrees,n=>new Vv({schema:n})))}toSchema(){let e=[];return this.permittedSubtrees&&e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.permittedSubtrees,t=>t.toSchema())})),this.excludedSubtrees&&e.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.excludedSubtrees,t=>t.toSchema())})),new W({value:e})}toJSON(){let e={};return this.permittedSubtrees&&(e.permittedSubtrees=Array.from(this.permittedSubtrees,t=>t.toJSON())),this.excludedSubtrees&&(e.excludedSubtrees=Array.from(this.excludedSubtrees,t=>t.toJSON())),e}};a9.CLASS_NAME="NameConstraints";var $o="requireExplicitPolicy",Go="inhibitPolicyMapping",lle=[$o,Go],o9=class vE extends _e{static{o(this,"PolicyConstraints")}constructor(e={}){super(),$o in e&&(this.requireExplicitPolicy=B(e,$o,vE.defaultValues($o))),Go in e&&(this.inhibitPolicyMapping=B(e,Go,vE.defaultValues(Go))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case $o:return 0;case Go:return 0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new vt({name:t.requireExplicitPolicy||L,optional:!0,idBlock:{tagClass:3,tagNumber:0}}),new vt({name:t.inhibitPolicyMapping||L,optional:!0,idBlock:{tagClass:3,tagNumber:1}})]})}fromSchema(e){De(e,lle);let t=Ie(e,e,vE.schema({names:{requireExplicitPolicy:$o,inhibitPolicyMapping:Go}}));if(be.assertSchema(t,this.className),$o in t.result){let n=t.result.requireExplicitPolicy;n.idBlock.tagClass=1,n.idBlock.tagNumber=2;let s=n.toBER(!1),i=Gr(s);be.assert(i,"Integer"),this.requireExplicitPolicy=i.result.valueBlock.valueDec}if(Go in t.result){let n=t.result.inhibitPolicyMapping;n.idBlock.tagClass=1,n.idBlock.tagNumber=2;let s=n.toBER(!1),i=Gr(s);be.assert(i,"Integer"),this.inhibitPolicyMapping=i.result.valueBlock.valueDec}}toSchema(){let e=[];if($o in this){let t=new ge({value:this.requireExplicitPolicy});t.idBlock.tagClass=3,t.idBlock.tagNumber=0,e.push(t)}if(Go in this){let t=new ge({value:this.inhibitPolicyMapping});t.idBlock.tagClass=3,t.idBlock.tagNumber=1,e.push(t)}return new W({value:e})}toJSON(){let e={};return $o in this&&(e.requireExplicitPolicy=this.requireExplicitPolicy),Go in this&&(e.inhibitPolicyMapping=this.inhibitPolicyMapping),e}};o9.CLASS_NAME="PolicyConstraints";var jv="issuerDomainPolicy",Mv="subjectDomainPolicy",fle=[jv,Mv],EB=class yE extends _e{static{o(this,"PolicyMapping")}constructor(e={}){super(),this.issuerDomainPolicy=B(e,jv,yE.defaultValues(jv)),this.subjectDomainPolicy=B(e,Mv,yE.defaultValues(Mv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case jv:return L;case Mv:return L;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new nt({name:t.issuerDomainPolicy||L}),new nt({name:t.subjectDomainPolicy||L})]})}fromSchema(e){De(e,fle);let t=Ie(e,e,yE.schema({names:{issuerDomainPolicy:jv,subjectDomainPolicy:Mv}}));be.assertSchema(t,this.className),this.issuerDomainPolicy=t.result.issuerDomainPolicy.valueBlock.toString(),this.subjectDomainPolicy=t.result.subjectDomainPolicy.valueBlock.toString()}toSchema(){return new W({value:[new nt({value:this.issuerDomainPolicy}),new nt({value:this.subjectDomainPolicy})]})}toJSON(){return{issuerDomainPolicy:this.issuerDomainPolicy,subjectDomainPolicy:this.subjectDomainPolicy}}};EB.CLASS_NAME="PolicyMapping";var Fv="mappings",hle=[Fv],u9=class AB extends _e{static{o(this,"PolicyMappings")}constructor(e={}){super(),this.mappings=B(e,Fv,AB.defaultValues(Fv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Fv:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.mappings||L,value:EB.schema()})]})}fromSchema(e){De(e,hle);let t=Ie(e,e,AB.schema({names:{mappings:Fv}}));be.assertSchema(t,this.className),this.mappings=Array.from(t.result.mappings,n=>new EB({schema:n}))}toSchema(){return new W({value:Array.from(this.mappings,e=>e.toSchema())})}toJSON(){return{mappings:Array.from(this.mappings,e=>e.toJSON())}}};u9.CLASS_NAME="PolicyMappings";var Bc="notBefore",Dc="notAfter",ple=[Bc,Dc],c9=class xE extends _e{static{o(this,"PrivateKeyUsagePeriod")}constructor(e={}){super(),Bc in e&&(this.notBefore=B(e,Bc,xE.defaultValues(Bc))),Dc in e&&(this.notAfter=B(e,Dc,xE.defaultValues(Dc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Bc:return new Date;case Dc:return new Date;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new vt({name:t.notBefore||L,optional:!0,idBlock:{tagClass:3,tagNumber:0}}),new vt({name:t.notAfter||L,optional:!0,idBlock:{tagClass:3,tagNumber:1}})]})}fromSchema(e){De(e,ple);let t=Ie(e,e,xE.schema({names:{notBefore:Bc,notAfter:Dc}}));if(be.assertSchema(t,this.className),Bc in t.result){let n=new kr;n.fromBuffer(t.result.notBefore.valueBlock.valueHex),this.notBefore=n.toDate()}if(Dc in t.result){let n=new kr({valueHex:t.result.notAfter.valueBlock.valueHex});n.fromBuffer(t.result.notAfter.valueBlock.valueHex),this.notAfter=n.toDate()}}toSchema(){let e=[];return Bc in this&&e.push(new vt({idBlock:{tagClass:3,tagNumber:0},valueHex:new kr({valueDate:this.notBefore}).valueBlock.valueHexView})),Dc in this&&e.push(new vt({idBlock:{tagClass:3,tagNumber:1},valueHex:new kr({valueDate:this.notAfter}).valueBlock.valueHexView})),new W({value:e})}toJSON(){let e={};return this.notBefore&&(e.notBefore=this.notBefore),this.notAfter&&(e.notAfter=this.notAfter),e}};c9.CLASS_NAME="PrivateKeyUsagePeriod";var yd="id",Xo="type",xd="values",dle=[yd,Xo],mle=[xd],CB=class wE extends _e{static{o(this,"QCStatement")}constructor(e={}){super(),this.id=B(e,yd,wE.defaultValues(yd)),Xo in e&&(this.type=B(e,Xo,wE.defaultValues(Xo))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case yd:return L;case Xo:return new Xr;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case yd:return t===L;case Xo:return t instanceof Xr;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new nt({name:t.id||L}),new wt({name:t.type||L,optional:!0})]})}fromSchema(e){De(e,dle);let t=Ie(e,e,wE.schema({names:{id:yd,type:Xo}}));be.assertSchema(t,this.className),this.id=t.result.id.valueBlock.toString(),Xo in t.result&&(this.type=t.result.type)}toSchema(){let e=[new nt({value:this.id})];return Xo in this&&e.push(this.type),new W({value:e})}toJSON(){let e={id:this.id};return this.type&&(e.type=this.type.toJSON()),e}};CB.CLASS_NAME="QCStatement";var l9=class NB extends _e{static{o(this,"QCStatements")}constructor(e={}){super(),this.values=B(e,xd,NB.defaultValues(xd)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case xd:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case xd:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.values||L,value:CB.schema(t.value||{})})]})}fromSchema(e){De(e,mle);let t=Ie(e,e,NB.schema({names:{values:xd}}));be.assertSchema(t,this.className),this.values=Array.from(t.result.values,n=>new CB({schema:n}))}toSchema(){return new W({value:Array.from(this.values,e=>e.toSchema())})}toJSON(){return{values:Array.from(this.values,e=>e.toJSON())}}};l9.CLASS_NAME="QCStatements";var xf,dl=class{static{o(this,"ECNamedCurves")}static register(e,t,n){this.namedCurves[e.toLowerCase()]=this.namedCurves[t]={name:e,id:t,size:n}}static find(e){return this.namedCurves[e.toLowerCase()]||null}};xf=dl;dl.namedCurves={};xf.register("P-256","1.2.840.10045.3.1.7",32),xf.register("P-384","1.3.132.0.34",48),xf.register("P-521","1.3.132.0.35",66),xf.register("brainpoolP256r1","1.3.36.3.3.2.8.1.1.7",32),xf.register("brainpoolP384r1","1.3.36.3.3.2.8.1.1.11",48),xf.register("brainpoolP512r1","1.3.36.3.3.2.8.1.1.13",64);var Ub="x",jb="y",Mb="namedCurve",ou=class wd extends _e{static{o(this,"ECPublicKey")}constructor(e={}){super(),this.x=B(e,Ub,wd.defaultValues(Ub)),this.y=B(e,jb,wd.defaultValues(jb)),this.namedCurve=B(e,Mb,wd.defaultValues(Mb)),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Ub:case jb:return rn;case Mb:return L;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Ub:case jb:return t instanceof ArrayBuffer&&fc(t,wd.defaultValues(e));case Mb:return typeof t=="string"&&t===wd.defaultValues(e);default:return super.defaultValues(e)}}static schema(){return new rv}fromSchema(e){let t=mt.toUint8Array(e);if(t[0]!==4)throw new Error("Object's schema was not verified against input data for ECPublicKey");let n=dl.find(this.namedCurve);if(!n)throw new Error(`Incorrect curve OID: ${this.namedCurve}`);let s=n.size;if(t.byteLength!==s*2+1)throw new Error("Object's schema was not verified against input data for ECPublicKey");this.namedCurve=n.name,this.x=t.slice(1,s+1).buffer,this.y=t.slice(1+s,s*2+1).buffer}toSchema(){return new rv({data:Yl(new Uint8Array([4]).buffer,this.x,this.y)})}toJSON(){let e=dl.find(this.namedCurve);return{crv:e?e.name:this.namedCurve,x:bb(zg(this.x),!0,!0,!1),y:bb(zg(this.y),!0,!0,!1)}}fromJSON(e){pr.assert("json",e,"crv","x","y");let t=0,n=dl.find(e.crv);n&&(this.namedCurve=n.id,t=n.size);let s=Ql(td(e.x,!0));if(s.byteLength<t){this.x=new ArrayBuffer(t);let a=new Uint8Array(this.x),u=new Uint8Array(s);a.set(u,1)}else this.x=s.slice(0,t);let i=Ql(td(e.y,!0));if(i.byteLength<t){this.y=new ArrayBuffer(t);let a=new Uint8Array(this.y),u=new Uint8Array(i);a.set(u,1)}else this.y=i.slice(0,t)}};ou.CLASS_NAME="ECPublicKey";var qv="modulus",Hv="publicExponent",gle=[qv,Hv],TB=class SE extends _e{static{o(this,"RSAPublicKey")}constructor(e={}){super(),this.modulus=B(e,qv,SE.defaultValues(qv)),this.publicExponent=B(e,Hv,SE.defaultValues(Hv)),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case qv:return new ge;case Hv:return new ge;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.modulus||L}),new ge({name:t.publicExponent||L})]})}fromSchema(e){De(e,gle);let t=Ie(e,e,SE.schema({names:{modulus:qv,publicExponent:Hv}}));be.assertSchema(t,this.className),this.modulus=t.result.modulus.convertFromDER(256),this.publicExponent=t.result.publicExponent}toSchema(){return new W({value:[this.modulus.convertToDER(),this.publicExponent]})}toJSON(){return{n:Et.ToBase64Url(this.modulus.valueBlock.valueHexView),e:Et.ToBase64Url(this.publicExponent.valueBlock.valueHexView)}}fromJSON(e){pr.assert("json",e,"n","e");let t=Ql(td(e.n,!0));this.modulus=new ge({valueHex:t.slice(0,Math.pow(2,iM(t.byteLength)))}),this.publicExponent=new ge({valueHex:Ql(td(e.e,!0)).slice(0,3)})}};TB.CLASS_NAME="RSAPublicKey";var Kv="algorithm",$v="subjectPublicKey",vle=[Kv,$v],va=class bE extends _e{static{o(this,"PublicKeyInfo")}get parsedKey(){if(this._parsedKey===void 0){switch(this.algorithm.algorithmId){case"1.2.840.10045.2.1":if("algorithmParams"in this.algorithm&&this.algorithm.algorithmParams.constructor.blockName()===nt.blockName())try{this._parsedKey=new ou({namedCurve:this.algorithm.algorithmParams.valueBlock.toString(),schema:this.subjectPublicKey.valueBlock.valueHexView})}catch{}break;case"1.2.840.113549.1.1.1":{let e=Gr(this.subjectPublicKey.valueBlock.valueHexView);if(e.offset!==-1)try{this._parsedKey=new TB({schema:e.result})}catch{}}break}this._parsedKey||(this._parsedKey=null)}return this._parsedKey||void 0}set parsedKey(e){this._parsedKey=e}constructor(e={}){super(),this.algorithm=B(e,Kv,bE.defaultValues(Kv)),this.subjectPublicKey=B(e,$v,bE.defaultValues($v));let t=B(e,"parsedKey",null);t&&(this.parsedKey=t),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Kv:return new ve;case $v:return new qt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[ve.schema(t.algorithm||{}),new qt({name:t.subjectPublicKey||L})]})}fromSchema(e){De(e,vle);let t=Ie(e,e,bE.schema({names:{algorithm:{names:{blockName:Kv}},subjectPublicKey:$v}}));be.assertSchema(t,this.className),this.algorithm=new ve({schema:t.result.algorithm}),this.subjectPublicKey=t.result.subjectPublicKey}toSchema(){return new W({value:[this.algorithm.toSchema(),this.subjectPublicKey]})}toJSON(){if(!this.parsedKey)return{algorithm:this.algorithm.toJSON(),subjectPublicKey:this.subjectPublicKey.toJSON()};let e={};switch(this.algorithm.algorithmId){case"1.2.840.10045.2.1":e.kty="EC";break;case"1.2.840.113549.1.1.1":e.kty="RSA";break}let t=this.parsedKey.toJSON();return Object.assign(e,t),e}fromJSON(e){if("kty"in e){switch(e.kty.toUpperCase()){case"EC":this.parsedKey=new ou({json:e}),this.algorithm=new ve({algorithmId:"1.2.840.10045.2.1",algorithmParams:new nt({value:this.parsedKey.namedCurve})});break;case"RSA":this.parsedKey=new TB({json:e}),this.algorithm=new ve({algorithmId:"1.2.840.113549.1.1.1",algorithmParams:new Xr});break;default:throw new Error(`Invalid value for "kty" parameter: ${e.kty}`)}this.subjectPublicKey=new qt({valueHex:this.parsedKey.toSchema().toBER(!1)})}}async importKey(e,t=Dt(!0)){try{if(!e)throw new Error("Need to provide publicKey input parameter");let n=await t.exportKey("spki",e),s=Gr(n);try{this.fromSchema(s.result)}catch{throw new Error("Error during initializing object from schema")}}catch(n){let s=n instanceof Error?n.message:`${n}`;throw new Error(`Error during exporting public key: ${s}`)}}};va.CLASS_NAME="PublicKeyInfo";var Sd="version",bd="privateKey",la="namedCurve",Rc="publicKey",yle=[Sd,bd,la,Rc],IB=class Wo extends _e{static{o(this,"ECPrivateKey")}constructor(e={}){super(),this.version=B(e,Sd,Wo.defaultValues(Sd)),this.privateKey=B(e,bd,Wo.defaultValues(bd)),la in e&&(this.namedCurve=B(e,la,Wo.defaultValues(la))),Rc in e&&(this.publicKey=B(e,Rc,Wo.defaultValues(Rc))),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Sd:return 1;case bd:return new Ve;case la:return L;case Rc:return new ou;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Sd:return t===Wo.defaultValues(e);case bd:return t.isEqual(Wo.defaultValues(e));case la:return t===L;case Rc:return ou.compareWithDefault(la,t.namedCurve)&&ou.compareWithDefault("x",t.x)&&ou.compareWithDefault("y",t.y);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),new Ve({name:t.privateKey||L}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new nt({name:t.namedCurve||L})]}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new qt({name:t.publicKey||L})]})]})}fromSchema(e){De(e,yle);let t=Ie(e,e,Wo.schema({names:{version:Sd,privateKey:bd,namedCurve:la,publicKey:Rc}}));if(be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.privateKey=t.result.privateKey,la in t.result&&(this.namedCurve=t.result.namedCurve.valueBlock.toString()),Rc in t.result){let n={schema:t.result.publicKey.valueBlock.valueHex};la in this&&(n.namedCurve=this.namedCurve),this.publicKey=new ou(n)}}toSchema(){let e=[new ge({value:this.version}),this.privateKey];return this.namedCurve&&e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[new nt({value:this.namedCurve})]})),this.publicKey&&e.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:[new qt({valueHex:this.publicKey.toSchema().toBER(!1)})]})),new W({value:e})}toJSON(){if(!this.namedCurve||Wo.compareWithDefault(la,this.namedCurve))throw new Error('Not enough information for making JSON: absent "namedCurve" value');let e=dl.find(this.namedCurve),t={crv:e?e.name:this.namedCurve,d:Et.ToBase64Url(this.privateKey.valueBlock.valueHexView)};if(this.publicKey){let n=this.publicKey.toJSON();t.x=n.x,t.y=n.y}return t}fromJSON(e){pr.assert("json",e,"crv","d");let t=0,n=dl.find(e.crv);n&&(this.namedCurve=n.id,t=n.size);let s=Et.FromBase64Url(e.d);if(s.byteLength<t){let i=new ArrayBuffer(t),a=new Uint8Array(i),u=new Uint8Array(s);a.set(u,1),this.privateKey=new Ve({valueHex:i})}else this.privateKey=new Ve({valueHex:s.slice(0,t)});e.x&&e.y&&(this.publicKey=new ou({json:e}))}};IB.CLASS_NAME="ECPrivateKey";var Gv="prime",Xv="exponent",Wv="coefficient",xle=[Gv,Xv,Wv],EE=class zv extends _e{static{o(this,"OtherPrimeInfo")}constructor(e={}){super(),this.prime=B(e,Gv,zv.defaultValues(Gv)),this.exponent=B(e,Xv,zv.defaultValues(Xv)),this.coefficient=B(e,Wv,zv.defaultValues(Wv)),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Gv:return new ge;case Xv:return new ge;case Wv:return new ge;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.prime||L}),new ge({name:t.exponent||L}),new ge({name:t.coefficient||L})]})}fromSchema(e){De(e,xle);let t=Ie(e,e,zv.schema({names:{prime:Gv,exponent:Xv,coefficient:Wv}}));be.assertSchema(t,this.className),this.prime=t.result.prime.convertFromDER(),this.exponent=t.result.exponent.convertFromDER(),this.coefficient=t.result.coefficient.convertFromDER()}toSchema(){return new W({value:[this.prime.convertToDER(),this.exponent.convertToDER(),this.coefficient.convertToDER()]})}toJSON(){return{r:Et.ToBase64Url(this.prime.valueBlock.valueHexView),d:Et.ToBase64Url(this.exponent.valueBlock.valueHexView),t:Et.ToBase64Url(this.coefficient.valueBlock.valueHexView)}}fromJSON(e){pr.assert("json",e,"r","d","r"),this.prime=new ge({valueHex:Et.FromBase64Url(e.r)}),this.exponent=new ge({valueHex:Et.FromBase64Url(e.d)}),this.coefficient=new ge({valueHex:Et.FromBase64Url(e.t)})}};EE.CLASS_NAME="OtherPrimeInfo";var Jv="version",Yv="modulus",Qv="publicExponent",Zv="privateExponent",e1="prime1",t1="prime2",r1="exponent1",n1="exponent2",s1="coefficient",wf="otherPrimeInfos",wle=[Jv,Yv,Qv,Zv,e1,t1,r1,n1,s1,wf],_B=class Fi extends _e{static{o(this,"RSAPrivateKey")}constructor(e={}){super(),this.version=B(e,Jv,Fi.defaultValues(Jv)),this.modulus=B(e,Yv,Fi.defaultValues(Yv)),this.publicExponent=B(e,Qv,Fi.defaultValues(Qv)),this.privateExponent=B(e,Zv,Fi.defaultValues(Zv)),this.prime1=B(e,e1,Fi.defaultValues(e1)),this.prime2=B(e,t1,Fi.defaultValues(t1)),this.exponent1=B(e,r1,Fi.defaultValues(r1)),this.exponent2=B(e,n1,Fi.defaultValues(n1)),this.coefficient=B(e,s1,Fi.defaultValues(s1)),wf in e&&(this.otherPrimeInfos=B(e,wf,Fi.defaultValues(wf))),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Jv:return 0;case Yv:return new ge;case Qv:return new ge;case Zv:return new ge;case e1:return new ge;case t1:return new ge;case r1:return new ge;case n1:return new ge;case s1:return new ge;case wf:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),new ge({name:t.modulus||L}),new ge({name:t.publicExponent||L}),new ge({name:t.privateExponent||L}),new ge({name:t.prime1||L}),new ge({name:t.prime2||L}),new ge({name:t.exponent1||L}),new ge({name:t.exponent2||L}),new ge({name:t.coefficient||L}),new W({optional:!0,value:[new Tt({name:t.otherPrimeInfosName||L,value:EE.schema(t.otherPrimeInfo||{})})]})]})}fromSchema(e){De(e,wle);let t=Ie(e,e,Fi.schema({names:{version:Jv,modulus:Yv,publicExponent:Qv,privateExponent:Zv,prime1:e1,prime2:t1,exponent1:r1,exponent2:n1,coefficient:s1,otherPrimeInfo:{names:{blockName:wf}}}}));be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.modulus=t.result.modulus.convertFromDER(256),this.publicExponent=t.result.publicExponent,this.privateExponent=t.result.privateExponent.convertFromDER(256),this.prime1=t.result.prime1.convertFromDER(128),this.prime2=t.result.prime2.convertFromDER(128),this.exponent1=t.result.exponent1.convertFromDER(128),this.exponent2=t.result.exponent2.convertFromDER(128),this.coefficient=t.result.coefficient.convertFromDER(128),wf in t.result&&(this.otherPrimeInfos=Array.from(t.result.otherPrimeInfos,n=>new EE({schema:n})))}toSchema(){let e=[];return e.push(new ge({value:this.version})),e.push(this.modulus.convertToDER()),e.push(this.publicExponent),e.push(this.privateExponent.convertToDER()),e.push(this.prime1.convertToDER()),e.push(this.prime2.convertToDER()),e.push(this.exponent1.convertToDER()),e.push(this.exponent2.convertToDER()),e.push(this.coefficient.convertToDER()),this.otherPrimeInfos&&e.push(new W({value:Array.from(this.otherPrimeInfos,t=>t.toSchema())})),new W({value:e})}toJSON(){let e={n:Et.ToBase64Url(this.modulus.valueBlock.valueHexView),e:Et.ToBase64Url(this.publicExponent.valueBlock.valueHexView),d:Et.ToBase64Url(this.privateExponent.valueBlock.valueHexView),p:Et.ToBase64Url(this.prime1.valueBlock.valueHexView),q:Et.ToBase64Url(this.prime2.valueBlock.valueHexView),dp:Et.ToBase64Url(this.exponent1.valueBlock.valueHexView),dq:Et.ToBase64Url(this.exponent2.valueBlock.valueHexView),qi:Et.ToBase64Url(this.coefficient.valueBlock.valueHexView)};return this.otherPrimeInfos&&(e.oth=Array.from(this.otherPrimeInfos,t=>t.toJSON())),e}fromJSON(e){pr.assert("json",e,"n","e","d","p","q","dp","dq","qi"),this.modulus=new ge({valueHex:Et.FromBase64Url(e.n)}),this.publicExponent=new ge({valueHex:Et.FromBase64Url(e.e)}),this.privateExponent=new ge({valueHex:Et.FromBase64Url(e.d)}),this.prime1=new ge({valueHex:Et.FromBase64Url(e.p)}),this.prime2=new ge({valueHex:Et.FromBase64Url(e.q)}),this.exponent1=new ge({valueHex:Et.FromBase64Url(e.dp)}),this.exponent2=new ge({valueHex:Et.FromBase64Url(e.dq)}),this.coefficient=new ge({valueHex:Et.FromBase64Url(e.qi)}),e.oth&&(this.otherPrimeInfos=Array.from(e.oth,t=>new EE({json:t})))}};_B.CLASS_NAME="RSAPrivateKey";var i1="version",a1="privateKeyAlgorithm",o1="privateKey",Sf="attributes",Fb="parsedKey",Sle=[i1,a1,o1,Sf],Wy=class bf extends _e{static{o(this,"PrivateKeyInfo")}constructor(e={}){super(),this.version=B(e,i1,bf.defaultValues(i1)),this.privateKeyAlgorithm=B(e,a1,bf.defaultValues(a1)),this.privateKey=B(e,o1,bf.defaultValues(o1)),Sf in e&&(this.attributes=B(e,Sf,bf.defaultValues(Sf))),Fb in e&&(this.parsedKey=B(e,Fb,bf.defaultValues(Fb))),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case i1:return 0;case a1:return new ve;case o1:return new Ve;case Sf:return[];case Fb:return{};default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),ve.schema(t.privateKeyAlgorithm||{}),new Ve({name:t.privateKey||L}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Tt({name:t.attributes||L,value:nn.schema()})]})]})}fromSchema(e){De(e,Sle);let t=Ie(e,e,bf.schema({names:{version:i1,privateKeyAlgorithm:{names:{blockName:a1}},privateKey:o1,attributes:Sf}}));switch(be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.privateKeyAlgorithm=new ve({schema:t.result.privateKeyAlgorithm}),this.privateKey=t.result.privateKey,Sf in t.result&&(this.attributes=Array.from(t.result.attributes,n=>new nn({schema:n}))),this.privateKeyAlgorithm.algorithmId){case"1.2.840.113549.1.1.1":{let n=Gr(this.privateKey.valueBlock.valueHexView);n.offset!==-1&&(this.parsedKey=new _B({schema:n.result}))}break;case"1.2.840.10045.2.1":if("algorithmParams"in this.privateKeyAlgorithm&&this.privateKeyAlgorithm.algorithmParams instanceof nt){let n=Gr(this.privateKey.valueBlock.valueHexView);n.offset!==-1&&(this.parsedKey=new IB({namedCurve:this.privateKeyAlgorithm.algorithmParams.valueBlock.toString(),schema:n.result}))}break}}toSchema(){let e=[new ge({value:this.version}),this.privateKeyAlgorithm.toSchema(),this.privateKey];return this.attributes&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.attributes,t=>t.toSchema())})),new W({value:e})}toJSON(){if(!this.parsedKey){let n={version:this.version,privateKeyAlgorithm:this.privateKeyAlgorithm.toJSON(),privateKey:this.privateKey.toJSON()};return this.attributes&&(n.attributes=Array.from(this.attributes,s=>s.toJSON())),n}let e={};switch(this.privateKeyAlgorithm.algorithmId){case"1.2.840.10045.2.1":e.kty="EC";break;case"1.2.840.113549.1.1.1":e.kty="RSA";break}let t=this.parsedKey.toJSON();return Object.assign(e,t),e}fromJSON(e){if("kty"in e){switch(e.kty.toUpperCase()){case"EC":this.parsedKey=new IB({json:e}),this.privateKeyAlgorithm=new ve({algorithmId:"1.2.840.10045.2.1",algorithmParams:new nt({value:this.parsedKey.namedCurve})});break;case"RSA":this.parsedKey=new _B({json:e}),this.privateKeyAlgorithm=new ve({algorithmId:"1.2.840.113549.1.1.1",algorithmParams:new Xr});break;default:throw new Error(`Invalid value for "kty" parameter: ${e.kty}`)}this.privateKey=new Ve({valueHex:this.parsedKey.toSchema().toBER(!1)})}}};Wy.CLASS_NAME="PrivateKeyInfo";var Ed="contentType",Ad="contentEncryptionAlgorithm",Ef="encryptedContent",ble=[Ed,Ad,Ef],SF=1024,us=class u1 extends _e{static{o(this,"EncryptedContentInfo")}constructor(e={}){if(super(),this.contentType=B(e,Ed,u1.defaultValues(Ed)),this.contentEncryptionAlgorithm=B(e,Ad,u1.defaultValues(Ad)),Ef in e&&e.encryptedContent&&(this.encryptedContent=e.encryptedContent,this.encryptedContent.idBlock.tagClass===1&&this.encryptedContent.idBlock.tagNumber===4&&this.encryptedContent.idBlock.isConstructed===!1&&!e.disableSplit)){let t=new Ve({idBlock:{isConstructed:!0},isConstructed:!0}),n=0,s=this.encryptedContent.valueBlock.valueHexView.slice().buffer,i=s.byteLength;for(;i>0;){let a=new Uint8Array(s,n,n+SF>s.byteLength?s.byteLength-n:SF),u=new ArrayBuffer(a.length),c=new Uint8Array(u);for(let f=0;f<c.length;f++)c[f]=a[f];t.valueBlock.value.push(new Ve({valueHex:u})),i-=a.length,n+=a.length}this.encryptedContent=t}e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Ed:return L;case Ad:return new ve;case Ef:return new Ve;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Ed:return t===L;case Ad:return t.algorithmId===L&&!("algorithmParams"in t);case Ef:return t.isEqual(u1.defaultValues(Ef));default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new nt({name:t.contentType||L}),ve.schema(t.contentEncryptionAlgorithm||{}),new Lr({value:[new oe({name:t.encryptedContent||L,idBlock:{tagClass:3,tagNumber:0},value:[new Tt({value:new Ve})]}),new vt({name:t.encryptedContent||L,idBlock:{tagClass:3,tagNumber:0}})]})]})}fromSchema(e){De(e,ble);let t=Ie(e,e,u1.schema({names:{contentType:Ed,contentEncryptionAlgorithm:{names:{blockName:Ad}},encryptedContent:Ef}}));be.assertSchema(t,this.className),this.contentType=t.result.contentType.valueBlock.toString(),this.contentEncryptionAlgorithm=new ve({schema:t.result.contentEncryptionAlgorithm}),Ef in t.result&&(this.encryptedContent=t.result.encryptedContent,this.encryptedContent.idBlock.tagClass=1,this.encryptedContent.idBlock.tagNumber=4)}toSchema(){let e={isIndefiniteForm:!1},t=[];if(t.push(new nt({value:this.contentType})),t.push(this.contentEncryptionAlgorithm.toSchema()),this.encryptedContent){e.isIndefiniteForm=this.encryptedContent.idBlock.isConstructed;let n=this.encryptedContent;n.idBlock.tagClass=3,n.idBlock.tagNumber=0,n.lenBlock.isIndefiniteForm=this.encryptedContent.idBlock.isConstructed,t.push(n)}return new W({lenBlock:e,value:t})}toJSON(){let e={contentType:this.contentType,contentEncryptionAlgorithm:this.contentEncryptionAlgorithm.toJSON()};return this.encryptedContent&&(e.encryptedContent=this.encryptedContent.toJSON()),e}getEncryptedContent(){if(!this.encryptedContent)throw new Error("Parameter 'encryptedContent' is undefined");return Ve.prototype.getValue.call(this.encryptedContent)}};us.CLASS_NAME="EncryptedContentInfo";var Pc="hashAlgorithm",Oc="maskGenAlgorithm",kc="saltLength",Lc="trailerField",Ele=[Pc,Oc,kc,Lc],AE=class Ks extends _e{static{o(this,"RSASSAPSSParams")}constructor(e={}){super(),this.hashAlgorithm=B(e,Pc,Ks.defaultValues(Pc)),this.maskGenAlgorithm=B(e,Oc,Ks.defaultValues(Oc)),this.saltLength=B(e,kc,Ks.defaultValues(kc)),this.trailerField=B(e,Lc,Ks.defaultValues(Lc)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Pc:return new ve({algorithmId:"1.3.14.3.2.26",algorithmParams:new Xr});case Oc:return new ve({algorithmId:"1.2.840.113549.1.1.8",algorithmParams:new ve({algorithmId:"1.3.14.3.2.26",algorithmParams:new Xr}).toSchema()});case kc:return 20;case Lc:return 1;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new oe({idBlock:{tagClass:3,tagNumber:0},optional:!0,value:[ve.schema(t.hashAlgorithm||{})]}),new oe({idBlock:{tagClass:3,tagNumber:1},optional:!0,value:[ve.schema(t.maskGenAlgorithm||{})]}),new oe({idBlock:{tagClass:3,tagNumber:2},optional:!0,value:[new ge({name:t.saltLength||L})]}),new oe({idBlock:{tagClass:3,tagNumber:3},optional:!0,value:[new ge({name:t.trailerField||L})]})]})}fromSchema(e){De(e,Ele);let t=Ie(e,e,Ks.schema({names:{hashAlgorithm:{names:{blockName:Pc}},maskGenAlgorithm:{names:{blockName:Oc}},saltLength:kc,trailerField:Lc}}));be.assertSchema(t,this.className),Pc in t.result&&(this.hashAlgorithm=new ve({schema:t.result.hashAlgorithm})),Oc in t.result&&(this.maskGenAlgorithm=new ve({schema:t.result.maskGenAlgorithm})),kc in t.result&&(this.saltLength=t.result.saltLength.valueBlock.valueDec),Lc in t.result&&(this.trailerField=t.result.trailerField.valueBlock.valueDec)}toSchema(){let e=[];return this.hashAlgorithm.isEqual(Ks.defaultValues(Pc))||e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[this.hashAlgorithm.toSchema()]})),this.maskGenAlgorithm.isEqual(Ks.defaultValues(Oc))||e.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:[this.maskGenAlgorithm.toSchema()]})),this.saltLength!==Ks.defaultValues(kc)&&e.push(new oe({idBlock:{tagClass:3,tagNumber:2},value:[new ge({value:this.saltLength})]})),this.trailerField!==Ks.defaultValues(Lc)&&e.push(new oe({idBlock:{tagClass:3,tagNumber:3},value:[new ge({value:this.trailerField})]})),new W({value:e})}toJSON(){let e={};return this.hashAlgorithm.isEqual(Ks.defaultValues(Pc))||(e.hashAlgorithm=this.hashAlgorithm.toJSON()),this.maskGenAlgorithm.isEqual(Ks.defaultValues(Oc))||(e.maskGenAlgorithm=this.maskGenAlgorithm.toJSON()),this.saltLength!==Ks.defaultValues(kc)&&(e.saltLength=this.saltLength),this.trailerField!==Ks.defaultValues(Lc)&&(e.trailerField=this.trailerField),e}};AE.CLASS_NAME="RSASSAPSSParams";var Cd="salt",c1="iterationCount",fa="keyLength",zo="prf",Ale=[Cd,c1,fa,zo],$m=class eo extends _e{static{o(this,"PBKDF2Params")}constructor(e={}){super(),this.salt=B(e,Cd,eo.defaultValues(Cd)),this.iterationCount=B(e,c1,eo.defaultValues(c1)),fa in e&&(this.keyLength=B(e,fa,eo.defaultValues(fa))),zo in e&&(this.prf=B(e,zo,eo.defaultValues(zo))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Cd:return{};case c1:return-1;case fa:return 0;case zo:return new ve({algorithmId:"1.3.14.3.2.26",algorithmParams:new Xr});default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Lr({value:[new Ve({name:t.saltPrimitive||L}),ve.schema(t.saltConstructed||{})]}),new ge({name:t.iterationCount||L}),new ge({name:t.keyLength||L,optional:!0}),ve.schema(t.prf||{names:{optional:!0}})]})}fromSchema(e){De(e,Ale);let t=Ie(e,e,eo.schema({names:{saltPrimitive:Cd,saltConstructed:{names:{blockName:Cd}},iterationCount:c1,keyLength:fa,prf:{names:{blockName:zo,optional:!0}}}}));be.assertSchema(t,this.className),this.salt=t.result.salt,this.iterationCount=t.result.iterationCount.valueBlock.valueDec,fa in t.result&&(this.keyLength=t.result.keyLength.valueBlock.valueDec),zo in t.result&&(this.prf=new ve({schema:t.result.prf}))}toSchema(){let e=[];return e.push(this.salt),e.push(new ge({value:this.iterationCount})),fa in this&&eo.defaultValues(fa)!==this.keyLength&&e.push(new ge({value:this.keyLength})),this.prf&&eo.defaultValues(zo).isEqual(this.prf)===!1&&e.push(this.prf.toSchema()),new W({value:e})}toJSON(){let e={salt:this.salt.toJSON(),iterationCount:this.iterationCount};return fa in this&&eo.defaultValues(fa)!==this.keyLength&&(e.keyLength=this.keyLength),this.prf&&eo.defaultValues(zo).isEqual(this.prf)===!1&&(e.prf=this.prf.toJSON()),e}};$m.CLASS_NAME="PBKDF2Params";var l1="keyDerivationFunc",f1="encryptionScheme",Cle=[l1,f1],BB=class CE extends _e{static{o(this,"PBES2Params")}constructor(e={}){super(),this.keyDerivationFunc=B(e,l1,CE.defaultValues(l1)),this.encryptionScheme=B(e,f1,CE.defaultValues(f1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case l1:return new ve;case f1:return new ve;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[ve.schema(t.keyDerivationFunc||{}),ve.schema(t.encryptionScheme||{})]})}fromSchema(e){De(e,Cle);let t=Ie(e,e,CE.schema({names:{keyDerivationFunc:{names:{blockName:l1}},encryptionScheme:{names:{blockName:f1}}}}));be.assertSchema(t,this.className),this.keyDerivationFunc=new ve({schema:t.result.keyDerivationFunc}),this.encryptionScheme=new ve({schema:t.result.encryptionScheme})}toSchema(){return new W({value:[this.keyDerivationFunc.toSchema(),this.encryptionScheme.toSchema()]})}toJSON(){return{keyDerivationFunc:this.keyDerivationFunc.toJSON(),encryptionScheme:this.encryptionScheme.toJSON()}}};BB.CLASS_NAME="PBES2Params";var Nle=class{static{o(this,"AbstractCryptoEngine")}constructor(e){this.crypto=e.crypto,this.subtle="webkitSubtle"in e.crypto?e.crypto.webkitSubtle:e.crypto.subtle,this.name=B(e,"name",L)}async encrypt(...e){return this.subtle.encrypt(...e)}async decrypt(...e){return this.subtle.decrypt(...e)}sign(...e){return this.subtle.sign(...e)}async verify(...e){return this.subtle.verify(...e)}async digest(...e){return this.subtle.digest(...e)}async generateKey(...e){return this.subtle.generateKey(...e)}async deriveKey(...e){return this.subtle.deriveKey(...e)}async deriveBits(...e){return this.subtle.deriveBits(...e)}async wrapKey(...e){return this.subtle.wrapKey(...e)}async unwrapKey(...e){return this.subtle.unwrapKey(...e)}exportKey(...e){return this.subtle.exportKey(...e)}importKey(...e){return this.subtle.importKey(...e)}getRandomValues(e){if(e===null)throw new Error('Argument "array" must not be null');return this.crypto.getRandomValues(e)}};async function bF(r,e,t,n,s){let i,a,u;switch(r.toUpperCase()){case"SHA-1":i=20,a=64,u=dF;break;case"SHA-256":i=32,a=64,u=N_;break;case"SHA-384":i=48,a=128,u=__;break;case"SHA-512":i=64,a=128,u=I_;break;default:throw new Error("Unsupported hashing algorithm")}let c=new Uint8Array(t),f=new TextDecoder().decode(t);new TextEncoder().encode(f).some((E,C)=>E!==c[C])&&(f=String.fromCharCode(...c));let m=new Uint8Array(f.length*2+2),g=new DataView(m.buffer);for(let E=0;E<f.length;E++)g.setUint16(E*2,f.charCodeAt(E),!1);g.setUint16(f.length*2,0,!1);let x=new Uint8Array(a).fill(3),v=new Uint8Array(n),w=new Uint8Array(a*Math.ceil(v.length/a)).map((E,C)=>v[C%v.length]),S=new Uint8Array(a*Math.ceil(m.length/a)).map((E,C)=>m[C%m.length]),A=new Uint8Array(w.length+S.length);A.set(w),A.set(S,w.length);let T=Math.ceil((e>>3)/i),b=[];for(let E=0;E<T;E++){let C=new Uint8Array(x.length+A.length);C.set(x),C.set(A,x.length);for(let q=0;q<s;q++)C=u(C);let _=new Uint8Array(a).map((q,H)=>C[H%C.length]),F=Math.ceil(v.length/a)+Math.ceil(m.length/a),R=[];for(let q=0;q<F;q++){let H=Array.from(A.slice(q*a,(q+1)*a)),K=511;for(let X=_.length-1;X>=0;X--)K>>=8,K+=_[X]+(H[X]||0),H[X]=K&255;R.push(...H)}A=new Uint8Array(R),b.push(...C)}return new Uint8Array(b.slice(0,e>>3)).buffer}o(bF,"makePKCS12B2Key");function f9(r){let e=typeof r=="string"?{name:r}:r;return"hash"in e?{...e,hash:f9(e.hash)}:e}o(f9,"prepareAlgorithm");var Xm=class extends Nle{static{o(this,"CryptoEngine")}async importKey(e,t,n,s,i){var a,u,c,f,h,m;let g={},x=f9(n);switch(e.toLowerCase()){case"raw":return this.subtle.importKey("raw",t,n,s,i);case"spki":{let v=Gr(mt.toArrayBuffer(t));be.assert(v,"keyData");let w=new va;try{w.fromSchema(v.result)}catch{throw new Ar("Incorrect keyData")}switch(x.name.toUpperCase()){case"RSA-PSS":{if(!x.hash)throw new pr("hash","algorithm.hash","Incorrect hash algorithm: Hash algorithm is missed");switch(x.hash.name.toUpperCase()){case"SHA-1":g.alg="PS1";break;case"SHA-256":g.alg="PS256";break;case"SHA-384":g.alg="PS384";break;case"SHA-512":g.alg="PS512";break;default:throw new Error(`Incorrect hash algorithm: ${x.hash.name.toUpperCase()}`)}}case"RSASSA-PKCS1-V1_5":{if(i=["verify"],g.kty="RSA",g.ext=s,g.key_ops=i,w.algorithm.algorithmId!=="1.2.840.113549.1.1.1")throw new Error(`Incorrect public key algorithm: ${w.algorithm.algorithmId}`);if(!g.alg){if(!x.hash)throw new pr("hash","algorithm.hash","Incorrect hash algorithm: Hash algorithm is missed");switch(x.hash.name.toUpperCase()){case"SHA-1":g.alg="RS1";break;case"SHA-256":g.alg="RS256";break;case"SHA-384":g.alg="RS384";break;case"SHA-512":g.alg="RS512";break;default:throw new Error(`Incorrect hash algorithm: ${x.hash.name.toUpperCase()}`)}}let S=w.toJSON();Object.assign(g,S)}break;case"ECDSA":i=["verify"];case"ECDH":{if(g={kty:"EC",ext:s,key_ops:i},w.algorithm.algorithmId!=="1.2.840.10045.2.1")throw new Error(`Incorrect public key algorithm: ${w.algorithm.algorithmId}`);let S=w.toJSON();Object.assign(g,S)}break;case"RSA-OAEP":{if(g.kty="RSA",g.ext=s,g.key_ops=i,this.name.toLowerCase()==="safari")g.alg="RSA-OAEP";else{if(!x.hash)throw new pr("hash","algorithm.hash","Incorrect hash algorithm: Hash algorithm is missed");switch(x.hash.name.toUpperCase()){case"SHA-1":g.alg="RSA-OAEP";break;case"SHA-256":g.alg="RSA-OAEP-256";break;case"SHA-384":g.alg="RSA-OAEP-384";break;case"SHA-512":g.alg="RSA-OAEP-512";break;default:throw new Error(`Incorrect hash algorithm: ${x.hash.name.toUpperCase()}`)}}let S=w.toJSON();Object.assign(g,S)}break;case"RSAES-PKCS1-V1_5":{g.kty="RSA",g.ext=s,g.key_ops=i,g.alg="PS1";let S=w.toJSON();Object.assign(g,S)}break;default:throw new Error(`Incorrect algorithm name: ${x.name.toUpperCase()}`)}}break;case"pkcs8":{let v=new Wy,w=Gr(mt.toArrayBuffer(t));be.assert(w,"keyData");try{v.fromSchema(w.result)}catch{throw new Error("Incorrect keyData")}if(!v.parsedKey)throw new Error("Incorrect keyData");switch(x.name.toUpperCase()){case"RSA-PSS":switch((a=x.hash)===null||a===void 0?void 0:a.name.toUpperCase()){case"SHA-1":g.alg="PS1";break;case"SHA-256":g.alg="PS256";break;case"SHA-384":g.alg="PS384";break;case"SHA-512":g.alg="PS512";break;default:throw new Error(`Incorrect hash algorithm: ${(u=x.hash)===null||u===void 0?void 0:u.name.toUpperCase()}`)}case"RSASSA-PKCS1-V1_5":{if(i=["sign"],g.kty="RSA",g.ext=s,g.key_ops=i,v.privateKeyAlgorithm.algorithmId!=="1.2.840.113549.1.1.1")throw new Error(`Incorrect private key algorithm: ${v.privateKeyAlgorithm.algorithmId}`);if(!("alg"in g))switch((c=x.hash)===null||c===void 0?void 0:c.name.toUpperCase()){case"SHA-1":g.alg="RS1";break;case"SHA-256":g.alg="RS256";break;case"SHA-384":g.alg="RS384";break;case"SHA-512":g.alg="RS512";break;default:throw new Error(`Incorrect hash algorithm: ${(f=x.hash)===null||f===void 0?void 0:f.name.toUpperCase()}`)}let S=v.toJSON();Object.assign(g,S)}break;case"ECDSA":i=["sign"];case"ECDH":{if(g={kty:"EC",ext:s,key_ops:i},v.privateKeyAlgorithm.algorithmId!=="1.2.840.10045.2.1")throw new Error(`Incorrect algorithm: ${v.privateKeyAlgorithm.algorithmId}`);let S=v.toJSON();Object.assign(g,S)}break;case"RSA-OAEP":{if(g.kty="RSA",g.ext=s,g.key_ops=i,this.name.toLowerCase()==="safari")g.alg="RSA-OAEP";else switch((h=x.hash)===null||h===void 0?void 0:h.name.toUpperCase()){case"SHA-1":g.alg="RSA-OAEP";break;case"SHA-256":g.alg="RSA-OAEP-256";break;case"SHA-384":g.alg="RSA-OAEP-384";break;case"SHA-512":g.alg="RSA-OAEP-512";break;default:throw new Error(`Incorrect hash algorithm: ${(m=x.hash)===null||m===void 0?void 0:m.name.toUpperCase()}`)}let S=v.toJSON();Object.assign(g,S)}break;case"RSAES-PKCS1-V1_5":{i=["decrypt"],g.kty="RSA",g.ext=s,g.key_ops=i,g.alg="PS1";let S=v.toJSON();Object.assign(g,S)}break;default:throw new Error(`Incorrect algorithm name: ${x.name.toUpperCase()}`)}}break;case"jwk":g=t;break;default:throw new Error(`Incorrect format: ${e}`)}if(this.name.toLowerCase()==="safari")try{return this.subtle.importKey("jwk",Ql(JSON.stringify(g)),n,s,i)}catch{return this.subtle.importKey("jwk",g,n,s,i)}return this.subtle.importKey("jwk",g,n,s,i)}async exportKey(e,t){let n=await this.subtle.exportKey("jwk",t);switch(this.name.toLowerCase()==="safari"&&n instanceof ArrayBuffer&&(n=JSON.parse(zg(n))),e.toLowerCase()){case"raw":return this.subtle.exportKey("raw",t);case"spki":{let s=new va;try{s.fromJSON(n)}catch{throw new Error("Incorrect key data")}return s.toSchema().toBER(!1)}case"pkcs8":{let s=new Wy;try{s.fromJSON(n)}catch{throw new Error("Incorrect key data")}return s.toSchema().toBER(!1)}case"jwk":return n;default:throw new Error(`Incorrect format: ${e}`)}}async convert(e,t,n,s,i,a){if(e.toLowerCase()===t.toLowerCase())return n;let u=await this.importKey(e,n,s,i,a);return this.exportKey(t,u)}getAlgorithmByOID(e,t=!1,n){switch(e){case"1.2.840.113549.1.1.1":return{name:"RSAES-PKCS1-v1_5"};case"1.2.840.113549.1.1.5":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-1"}};case"1.2.840.113549.1.1.11":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"1.2.840.113549.1.1.12":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}};case"1.2.840.113549.1.1.13":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}};case"1.2.840.113549.1.1.10":return{name:"RSA-PSS"};case"1.2.840.113549.1.1.7":return{name:"RSA-OAEP"};case"1.2.840.10045.2.1":case"1.2.840.10045.4.1":return{name:"ECDSA",hash:{name:"SHA-1"}};case"1.2.840.10045.4.3.2":return{name:"ECDSA",hash:{name:"SHA-256"}};case"1.2.840.10045.4.3.3":return{name:"ECDSA",hash:{name:"SHA-384"}};case"1.2.840.10045.4.3.4":return{name:"ECDSA",hash:{name:"SHA-512"}};case"1.3.133.16.840.63.0.2":return{name:"ECDH",kdf:"SHA-1"};case"1.3.132.1.11.1":return{name:"ECDH",kdf:"SHA-256"};case"1.3.132.1.11.2":return{name:"ECDH",kdf:"SHA-384"};case"1.3.132.1.11.3":return{name:"ECDH",kdf:"SHA-512"};case"2.16.840.1.101.3.4.1.2":return{name:"AES-CBC",length:128};case"2.16.840.1.101.3.4.1.22":return{name:"AES-CBC",length:192};case"2.16.840.1.101.3.4.1.42":return{name:"AES-CBC",length:256};case"2.16.840.1.101.3.4.1.6":return{name:"AES-GCM",length:128};case"2.16.840.1.101.3.4.1.26":return{name:"AES-GCM",length:192};case"2.16.840.1.101.3.4.1.46":return{name:"AES-GCM",length:256};case"2.16.840.1.101.3.4.1.4":return{name:"AES-CFB",length:128};case"2.16.840.1.101.3.4.1.24":return{name:"AES-CFB",length:192};case"2.16.840.1.101.3.4.1.44":return{name:"AES-CFB",length:256};case"2.16.840.1.101.3.4.1.5":return{name:"AES-KW",length:128};case"2.16.840.1.101.3.4.1.25":return{name:"AES-KW",length:192};case"2.16.840.1.101.3.4.1.45":return{name:"AES-KW",length:256};case"1.2.840.113549.2.7":return{name:"HMAC",hash:{name:"SHA-1"}};case"1.2.840.113549.2.9":return{name:"HMAC",hash:{name:"SHA-256"}};case"1.2.840.113549.2.10":return{name:"HMAC",hash:{name:"SHA-384"}};case"1.2.840.113549.2.11":return{name:"HMAC",hash:{name:"SHA-512"}};case"1.2.840.113549.1.9.16.3.5":return{name:"DH"};case"1.3.14.3.2.26":return{name:"SHA-1"};case"2.16.840.1.101.3.4.2.1":return{name:"SHA-256"};case"2.16.840.1.101.3.4.2.2":return{name:"SHA-384"};case"2.16.840.1.101.3.4.2.3":return{name:"SHA-512"};case"1.2.840.113549.1.5.12":return{name:"PBKDF2"};case"1.2.840.10045.3.1.7":return{name:"P-256"};case"1.3.132.0.34":return{name:"P-384"};case"1.3.132.0.35":return{name:"P-521"}}if(t)throw new Error(`Unsupported algorithm identifier ${n?`for ${n} `:L}: ${e}`);return{}}getOIDByAlgorithm(e,t=!1,n){let s=L;switch(e.name.toUpperCase()){case"RSAES-PKCS1-V1_5":s="1.2.840.113549.1.1.1";break;case"RSASSA-PKCS1-V1_5":switch(e.hash.name.toUpperCase()){case"SHA-1":s="1.2.840.113549.1.1.5";break;case"SHA-256":s="1.2.840.113549.1.1.11";break;case"SHA-384":s="1.2.840.113549.1.1.12";break;case"SHA-512":s="1.2.840.113549.1.1.13";break}break;case"RSA-PSS":s="1.2.840.113549.1.1.10";break;case"RSA-OAEP":s="1.2.840.113549.1.1.7";break;case"ECDSA":switch(e.hash.name.toUpperCase()){case"SHA-1":s="1.2.840.10045.4.1";break;case"SHA-256":s="1.2.840.10045.4.3.2";break;case"SHA-384":s="1.2.840.10045.4.3.3";break;case"SHA-512":s="1.2.840.10045.4.3.4";break}break;case"ECDH":switch(e.kdf.toUpperCase()){case"SHA-1":s="1.3.133.16.840.63.0.2";break;case"SHA-256":s="1.3.132.1.11.1";break;case"SHA-384":s="1.3.132.1.11.2";break;case"SHA-512":s="1.3.132.1.11.3";break}break;case"AES-CTR":break;case"AES-CBC":switch(e.length){case 128:s="2.16.840.1.101.3.4.1.2";break;case 192:s="2.16.840.1.101.3.4.1.22";break;case 256:s="2.16.840.1.101.3.4.1.42";break}break;case"AES-CMAC":break;case"AES-GCM":switch(e.length){case 128:s="2.16.840.1.101.3.4.1.6";break;case 192:s="2.16.840.1.101.3.4.1.26";break;case 256:s="2.16.840.1.101.3.4.1.46";break}break;case"AES-CFB":switch(e.length){case 128:s="2.16.840.1.101.3.4.1.4";break;case 192:s="2.16.840.1.101.3.4.1.24";break;case 256:s="2.16.840.1.101.3.4.1.44";break}break;case"AES-KW":switch(e.length){case 128:s="2.16.840.1.101.3.4.1.5";break;case 192:s="2.16.840.1.101.3.4.1.25";break;case 256:s="2.16.840.1.101.3.4.1.45";break}break;case"HMAC":switch(e.hash.name.toUpperCase()){case"SHA-1":s="1.2.840.113549.2.7";break;case"SHA-256":s="1.2.840.113549.2.9";break;case"SHA-384":s="1.2.840.113549.2.10";break;case"SHA-512":s="1.2.840.113549.2.11";break}break;case"DH":s="1.2.840.113549.1.9.16.3.5";break;case"SHA-1":s="1.3.14.3.2.26";break;case"SHA-256":s="2.16.840.1.101.3.4.2.1";break;case"SHA-384":s="2.16.840.1.101.3.4.2.2";break;case"SHA-512":s="2.16.840.1.101.3.4.2.3";break;case"CONCAT":break;case"HKDF":break;case"PBKDF2":s="1.2.840.113549.1.5.12";break;case"P-256":s="1.2.840.10045.3.1.7";break;case"P-384":s="1.3.132.0.34";break;case"P-521":s="1.3.132.0.35";break}if(!s&&t)throw new Error(`Unsupported algorithm ${n?`for ${n} `:L}: ${e.name}`);return s}getAlgorithmParameters(e,t){let n={algorithm:{},usages:[]};switch(e.toUpperCase()){case"RSAES-PKCS1-V1_5":case"RSASSA-PKCS1-V1_5":switch(t.toLowerCase()){case"generatekey":n={algorithm:{name:"RSASSA-PKCS1-v1_5",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},usages:["sign","verify"]};break;case"verify":case"sign":case"importkey":n={algorithm:{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},usages:["verify"]};break;case"exportkey":default:return{algorithm:{name:"RSASSA-PKCS1-v1_5"},usages:[]}}break;case"RSA-PSS":switch(t.toLowerCase()){case"sign":case"verify":n={algorithm:{name:"RSA-PSS",hash:{name:"SHA-1"},saltLength:20},usages:["sign","verify"]};break;case"generatekey":n={algorithm:{name:"RSA-PSS",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-1"}},usages:["sign","verify"]};break;case"importkey":n={algorithm:{name:"RSA-PSS",hash:{name:"SHA-1"}},usages:["verify"]};break;case"exportkey":default:return{algorithm:{name:"RSA-PSS"},usages:[]}}break;case"RSA-OAEP":switch(t.toLowerCase()){case"encrypt":case"decrypt":n={algorithm:{name:"RSA-OAEP"},usages:["encrypt","decrypt"]};break;case"generatekey":n={algorithm:{name:"RSA-OAEP",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;case"importkey":n={algorithm:{name:"RSA-OAEP",hash:{name:"SHA-256"}},usages:["encrypt"]};break;case"exportkey":default:return{algorithm:{name:"RSA-OAEP"},usages:[]}}break;case"ECDSA":switch(t.toLowerCase()){case"generatekey":n={algorithm:{name:"ECDSA",namedCurve:"P-256"},usages:["sign","verify"]};break;case"importkey":n={algorithm:{name:"ECDSA",namedCurve:"P-256"},usages:["verify"]};break;case"verify":case"sign":n={algorithm:{name:"ECDSA",hash:{name:"SHA-256"}},usages:["sign"]};break;default:return{algorithm:{name:"ECDSA"},usages:[]}}break;case"ECDH":switch(t.toLowerCase()){case"exportkey":case"importkey":case"generatekey":n={algorithm:{name:"ECDH",namedCurve:"P-256"},usages:["deriveKey","deriveBits"]};break;case"derivekey":case"derivebits":n={algorithm:{name:"ECDH",namedCurve:"P-256",public:[]},usages:["encrypt","decrypt"]};break;default:return{algorithm:{name:"ECDH"},usages:[]}}break;case"AES-CTR":switch(t.toLowerCase()){case"importkey":case"exportkey":case"generatekey":n={algorithm:{name:"AES-CTR",length:256},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;case"decrypt":case"encrypt":n={algorithm:{name:"AES-CTR",counter:new Uint8Array(16),length:10},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;default:return{algorithm:{name:"AES-CTR"},usages:[]}}break;case"AES-CBC":switch(t.toLowerCase()){case"importkey":case"exportkey":case"generatekey":n={algorithm:{name:"AES-CBC",length:256},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;case"decrypt":case"encrypt":n={algorithm:{name:"AES-CBC",iv:this.getRandomValues(new Uint8Array(16))},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;default:return{algorithm:{name:"AES-CBC"},usages:[]}}break;case"AES-GCM":switch(t.toLowerCase()){case"importkey":case"exportkey":case"generatekey":n={algorithm:{name:"AES-GCM",length:256},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;case"decrypt":case"encrypt":n={algorithm:{name:"AES-GCM",iv:this.getRandomValues(new Uint8Array(16))},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;default:return{algorithm:{name:"AES-GCM"},usages:[]}}break;case"AES-KW":switch(t.toLowerCase()){case"importkey":case"exportkey":case"generatekey":case"wrapkey":case"unwrapkey":n={algorithm:{name:"AES-KW",length:256},usages:["wrapKey","unwrapKey"]};break;default:return{algorithm:{name:"AES-KW"},usages:[]}}break;case"HMAC":switch(t.toLowerCase()){case"sign":case"verify":n={algorithm:{name:"HMAC"},usages:["sign","verify"]};break;case"importkey":case"exportkey":case"generatekey":n={algorithm:{name:"HMAC",length:32,hash:{name:"SHA-256"}},usages:["sign","verify"]};break;default:return{algorithm:{name:"HMAC"},usages:[]}}break;case"HKDF":switch(t.toLowerCase()){case"derivekey":n={algorithm:{name:"HKDF",hash:"SHA-256",salt:new Uint8Array([]),info:new Uint8Array([])},usages:["encrypt","decrypt"]};break;default:return{algorithm:{name:"HKDF"},usages:[]}}break;case"PBKDF2":switch(t.toLowerCase()){case"derivekey":n={algorithm:{name:"PBKDF2",hash:{name:"SHA-256"},salt:new Uint8Array([]),iterations:1e4},usages:["encrypt","decrypt"]};break;default:return{algorithm:{name:"PBKDF2"},usages:[]}}break}return n}getHashAlgorithm(e){let t=L;switch(e.algorithmId){case"1.2.840.10045.4.1":case"1.2.840.113549.1.1.5":t="SHA-1";break;case"1.2.840.10045.4.3.2":case"1.2.840.113549.1.1.11":t="SHA-256";break;case"1.2.840.10045.4.3.3":case"1.2.840.113549.1.1.12":t="SHA-384";break;case"1.2.840.10045.4.3.4":case"1.2.840.113549.1.1.13":t="SHA-512";break;case"1.2.840.113549.1.1.10":try{let n=new AE({schema:e.algorithmParams});if(n.hashAlgorithm){let s=this.getAlgorithmByOID(n.hashAlgorithm.algorithmId);if("name"in s)t=s.name;else return L}else t="SHA-1"}catch{}break}return t}async encryptEncryptedContentInfo(e){pr.assert(e,"password","contentEncryptionAlgorithm","hmacHashAlgorithm","iterationCount","contentToEncrypt","contentToEncrypt","contentType");let t=this.getOIDByAlgorithm(e.contentEncryptionAlgorithm,!0,"contentEncryptionAlgorithm"),n=this.getOIDByAlgorithm({name:"PBKDF2"},!0,"PBKDF2"),s=this.getOIDByAlgorithm({name:"HMAC",hash:{name:e.hmacHashAlgorithm}},!0,"hmacHashAlgorithm"),i=new ArrayBuffer(16),a=new Uint8Array(i);this.getRandomValues(a);let u=new ArrayBuffer(64),c=new Uint8Array(u);this.getRandomValues(c);let f=new Uint8Array(e.contentToEncrypt),h=new $m({salt:new Ve({valueHex:u}),iterationCount:e.iterationCount,prf:new ve({algorithmId:s,algorithmParams:new Xr})}),m=new Uint8Array(e.password),g=await this.importKey("raw",m,"PBKDF2",!1,["deriveKey"]),x=await this.deriveKey({name:"PBKDF2",hash:{name:e.hmacHashAlgorithm},salt:c,iterations:e.iterationCount},g,e.contentEncryptionAlgorithm,!1,["encrypt"]),v=await this.encrypt({name:e.contentEncryptionAlgorithm.name,iv:a},x,f),w=new BB({keyDerivationFunc:new ve({algorithmId:n,algorithmParams:h.toSchema()}),encryptionScheme:new ve({algorithmId:t,algorithmParams:new Ve({valueHex:i})})});return new us({contentType:e.contentType,contentEncryptionAlgorithm:new ve({algorithmId:"1.2.840.113549.1.5.13",algorithmParams:w.toSchema()}),encryptedContent:new Ve({valueHex:v})})}async decryptEncryptedContentInfo(e){if(pr.assert(e,"password","encryptedContentInfo"),e.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId!=="1.2.840.113549.1.5.13")throw new Error(`Unknown "contentEncryptionAlgorithm": ${e.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId}`);let t;try{t=new BB({schema:e.encryptedContentInfo.contentEncryptionAlgorithm.algorithmParams})}catch{throw new Error('Incorrectly encoded "pbes2Parameters"')}let n;try{n=new $m({schema:t.keyDerivationFunc.algorithmParams})}catch{throw new Error('Incorrectly encoded "pbkdf2Params"')}let s=this.getAlgorithmByOID(t.encryptionScheme.algorithmId,!0),i=t.encryptionScheme.algorithmParams.valueBlock.valueHex,a=new Uint8Array(i),u=n.salt.valueBlock.valueHex,c=new Uint8Array(u),f=n.iterationCount,h="SHA-1";n.prf&&(h=this.getAlgorithmByOID(n.prf.algorithmId,!0).hash.name);let m=await this.importKey("raw",e.password,"PBKDF2",!1,["deriveKey"]),g=await this.deriveKey({name:"PBKDF2",hash:{name:h},salt:c,iterations:f},m,s,!1,["decrypt"]),x=e.encryptedContentInfo.getEncryptedContent();return this.decrypt({name:s.name,iv:a},g,x)}async stampDataWithPassword(e){if(!(e instanceof Object))throw new Error('Parameters must have type "Object"');pr.assert(e,"password","hashAlgorithm","iterationCount","salt","contentToStamp");let t;switch(e.hashAlgorithm.toLowerCase()){case"sha-1":t=160;break;case"sha-256":t=256;break;case"sha-384":t=384;break;case"sha-512":t=512;break;default:throw new Error(`Incorrect "parameters.hashAlgorithm" parameter: ${e.hashAlgorithm}`)}let n={name:"HMAC",length:t,hash:{name:e.hashAlgorithm}},s=await bF(e.hashAlgorithm,t,e.password,e.salt,e.iterationCount),i=await this.importKey("raw",new Uint8Array(s),n,!1,["sign"]);return this.sign(n,i,new Uint8Array(e.contentToStamp))}async verifyDataStampedWithPassword(e){pr.assert(e,"password","hashAlgorithm","salt","iterationCount","contentToVerify","signatureToVerify");let t=0;switch(e.hashAlgorithm.toLowerCase()){case"sha-1":t=160;break;case"sha-256":t=256;break;case"sha-384":t=384;break;case"sha-512":t=512;break;default:throw new Error(`Incorrect "parameters.hashAlgorithm" parameter: ${e.hashAlgorithm}`)}let n={name:"HMAC",length:t,hash:{name:e.hashAlgorithm}},s=await bF(e.hashAlgorithm,t,e.password,e.salt,e.iterationCount),i=await this.importKey("raw",new Uint8Array(s),n,!1,["verify"]);return this.verify(n,i,new Uint8Array(e.signatureToVerify),new Uint8Array(e.contentToVerify))}async getSignatureParameters(e,t="SHA-1"){this.getOIDByAlgorithm({name:t},!0,"hashAlgorithm");let n=new ve,s=this.getAlgorithmParameters(e.algorithm.name,"sign");if(!Object.keys(s.algorithm).length)throw new Error("Parameter 'algorithm' is empty");let i=s.algorithm;switch("hash"in e.algorithm&&e.algorithm.hash&&e.algorithm.hash.name?i.hash.name=e.algorithm.hash.name:i.hash.name=t,e.algorithm.name.toUpperCase()){case"RSASSA-PKCS1-V1_5":case"ECDSA":n.algorithmId=this.getOIDByAlgorithm(i,!0);break;case"RSA-PSS":{switch(i.hash.name.toUpperCase()){case"SHA-256":i.saltLength=32;break;case"SHA-384":i.saltLength=48;break;case"SHA-512":i.saltLength=64;break}let a={};if(i.hash.name.toUpperCase()!=="SHA-1"){let c=this.getOIDByAlgorithm({name:i.hash.name},!0,"hashAlgorithm");a.hashAlgorithm=new ve({algorithmId:c,algorithmParams:new Xr}),a.maskGenAlgorithm=new ve({algorithmId:"1.2.840.113549.1.1.8",algorithmParams:a.hashAlgorithm.toSchema()})}i.saltLength!==20&&(a.saltLength=i.saltLength);let u=new AE(a);n.algorithmId="1.2.840.113549.1.1.10",n.algorithmParams=u.toSchema()}break;default:throw new Error(`Unsupported signature algorithm: ${e.algorithm.name}`)}return{signatureAlgorithm:n,parameters:s}}async signWithPrivateKey(e,t,n){let s=await this.sign(n.algorithm,t,e);return n.algorithm.name==="ECDSA"?Ile(s):s}fillPublicKeyParameters(e,t){let n={},s=this.getHashAlgorithm(t);if(s===L)throw new Error(`Unsupported signature algorithm: ${t.algorithmId}`);let i;t.algorithmId==="1.2.840.113549.1.1.10"?i=t.algorithmId:i=e.algorithm.algorithmId;let a=this.getAlgorithmByOID(i,!0);if(n.algorithm=this.getAlgorithmParameters(a.name,"importKey"),"hash"in n.algorithm.algorithm&&(n.algorithm.algorithm.hash.name=s),a.name==="ECDSA"){let u=e.algorithm;if(!u.algorithmParams)throw new Error("Algorithm parameters for ECDSA public key are missed");let c=u.algorithmParams;if("idBlock"in u.algorithmParams&&!(c.idBlock.tagClass===1&&c.idBlock.tagNumber===6))throw new Error("Incorrect type for ECDSA public key parameters");let f=this.getAlgorithmByOID(c.valueBlock.toString(),!0);n.algorithm.algorithm.namedCurve=f.name}return n}async getPublicKey(e,t,n){n||(n=this.fillPublicKeyParameters(e,t));let s=e.toSchema().toBER(!1);return this.importKey("spki",s,n.algorithm.algorithm,!0,n.algorithm.usages)}async verifyWithPublicKey(e,t,n,s,i){let a;if(i){let f={},h;s.algorithmId==="1.2.840.113549.1.1.10"?h=s.algorithmId:h=n.algorithm.algorithmId;let m=this.getAlgorithmByOID(h,!0);if(f.algorithm=this.getAlgorithmParameters(m.name,"importKey"),"hash"in f.algorithm.algorithm&&(f.algorithm.algorithm.hash.name=i),m.name==="ECDSA"){let g=!1;if("algorithmParams"in n.algorithm&&"idBlock"in n.algorithm.algorithmParams&&n.algorithm.algorithmParams.idBlock.tagClass===1&&n.algorithm.algorithmParams.idBlock.tagNumber===6&&(g=!0),g===!1)throw new Error("Incorrect type for ECDSA public key parameters");let x=this.getAlgorithmByOID(n.algorithm.algorithmParams.valueBlock.toString(),!0);f.algorithm.algorithm.namedCurve=x.name}a=await this.getPublicKey(n,null,f)}else{if(i=this.getHashAlgorithm(s),!i)throw new Error(`Unsupported signature algorithm: ${s.algorithmId}`);a=await this.getPublicKey(n,s)}let u=this.getAlgorithmParameters(a.algorithm.name,"verify");"hash"in u.algorithm&&(u.algorithm.hash.name=i);let c=t.valueBlock.valueHexView;if(a.algorithm.name==="ECDSA"){let f=dl.find(a.algorithm.namedCurve);if(!f)throw new Error("Unsupported named curve in use");let h=Gr(c);be.assert(h,"Signature value"),c=_le(h.result,f.size)}if(a.algorithm.name==="RSA-PSS"){let f=new AE({schema:s.algorithmParams});"saltLength"in f?u.algorithm.saltLength=f.saltLength:u.algorithm.saltLength=20;let h="SHA-1";"hashAlgorithm"in f&&(h=this.getAlgorithmByOID(f.hashAlgorithm.algorithmId,!0).name),u.algorithm.hash.name=h}return this.verify(u.algorithm,a,c,e)}},h9={name:"none",crypto:null};function EF(r){return!!(r&&typeof r=="object"&&"crypto"in r)}o(EF,"isCryptoEngine");function bA(r,...e){let t=null;if(e.length<2)e.length?t=e[0]:t=typeof self<"u"&&self.crypto?new Xm({name:"browser",crypto:self.crypto}):null;else{let n=e[0],s=e[1];EF(s)?t=s:EF(n)?t=n:"subtle"in n&&"getRandomValues"in n&&(t=new Xm({crypto:n}))}if(typeof process<"u"&&"pid"in process&&typeof global<"u"&&typeof window>"u"){if(typeof global[process.pid]>"u")global[process.pid]={};else if(typeof global[process.pid]!="object")throw new Error(`Name global.${process.pid} already exists and it is not an object`);if(typeof global[process.pid].pkijs>"u")global[process.pid].pkijs={};else if(typeof global[process.pid].pkijs!="object")throw new Error(`Name global.${process.pid}.pkijs already exists and it is not an object`);global[process.pid].pkijs.engine={name:r,crypto:t}}else h9={name:r,crypto:t}}o(bA,"setEngine");function Tle(){if(typeof process<"u"&&"pid"in process&&typeof global<"u"&&typeof window>"u"){let r;try{r=global[process.pid].pkijs.engine}catch{throw new Error("Please call 'setEngine' before call to 'getEngine'")}return r}return h9}o(Tle,"getEngine");function Dt(r=!1){let e=Tle();if(!e.crypto&&r)throw new Error("Unable to create WebCrypto object");return e.crypto}o(Dt,"getCrypto");function Ile(r){if(r.byteLength%2!==0)return rn;let e=r.byteLength/2,t=new ArrayBuffer(e);new Uint8Array(t).set(new Uint8Array(r,0,e));let s=new ge({valueHex:t}),i=new ArrayBuffer(e);new Uint8Array(i).set(new Uint8Array(r,e,e));let u=new ge({valueHex:i});return new W({value:[s.convertToDER(),u.convertToDER()]}).toBER(!1)}o(Ile,"createCMSECDSASignature");function _le(r,e){if(!(r instanceof W&&r.valueBlock.value.length===2&&r.valueBlock.value[0]instanceof ge&&r.valueBlock.value[1]instanceof ge))return rn;let t=r.valueBlock.value[0].convertFromDER().valueBlock.valueHexView,n=r.valueBlock.value[1].convertFromDER().valueBlock.valueHexView,s=new Uint8Array(e*2);return s.set(t,e-t.byteLength),s.set(n,2*e-n.byteLength),s.buffer}o(_le,"createECDSASignatureFromCMS");async function Ble(r,e,t,n,s){switch(r.toUpperCase()){case"SHA-1":case"SHA-256":case"SHA-384":case"SHA-512":break;default:throw new Ar(`Unknown hash function: ${r}`)}if(Ar.assert(e,"zBuffer","ArrayBuffer"),e.byteLength===0)throw new Ar("'zBuffer' has zero length, error");if(Ar.assert(n,"SharedInfo","ArrayBuffer"),t>255)throw new Ar("Please set 'Counter' argument to value less or equal to 255");let i=new ArrayBuffer(4),a=new Uint8Array(i);a[0]=0,a[1]=0,a[2]=0,a[3]=t;let u=rn;u=Yl(u,e),u=Yl(u,i),u=Yl(u,n);let c=await s.digest({name:r},u);return{counter:t,result:c}}o(Ble,"kdfWithCounter");async function AF(r,e,t,n,s=Dt(!0)){let i=0,a=1;switch(r.toUpperCase()){case"SHA-1":i=160;break;case"SHA-256":i=256;break;case"SHA-384":i=384;break;case"SHA-512":i=512;break;default:throw new Ar(`Unknown hash function: ${r}`)}if(Ar.assert(e,"Zbuffer","ArrayBuffer"),e.byteLength===0)throw new Ar("'Zbuffer' has zero length, error");Ar.assert(n,"SharedInfo","ArrayBuffer");let u=t/i;Math.floor(u)>0&&(a=Math.floor(u),u-a>0&&a++);let c=[];for(let g=1;g<=a;g++)c.push(await Ble(r,e,g,n,s));let f=rn,h=1,m=!0;for(;m;){m=!1;for(let g of c)if(g.counter===h){f=Yl(f,g.result),m=!0;break}h++}if(t>>=3,f.byteLength>t){let g=new ArrayBuffer(t),x=new Uint8Array(g),v=new Uint8Array(f);for(let w=0;w<t;w++)x[w]=v[w];return g}return f}o(AF,"kdf");var P_="version",O_="logID",k_="extensions",L_="timestamp",V_="hashAlgorithm",U_="signatureAlgorithm",j_="signature",CF="none",NF="md5",TF="sha1",IF="sha224",_F="sha256",BF="sha384",DF="sha512",RF="anonymous",PF="rsa",OF="dsa",kF="ecdsa",p9=class Vc extends _e{static{o(this,"SignedCertificateTimestamp")}constructor(e={}){super(),this.version=B(e,P_,Vc.defaultValues(P_)),this.logID=B(e,O_,Vc.defaultValues(O_)),this.timestamp=B(e,L_,Vc.defaultValues(L_)),this.extensions=B(e,k_,Vc.defaultValues(k_)),this.hashAlgorithm=B(e,V_,Vc.defaultValues(V_)),this.signatureAlgorithm=B(e,U_,Vc.defaultValues(U_)),this.signature=B(e,j_,Vc.defaultValues(j_)),"stream"in e&&e.stream&&this.fromStream(e.stream),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case P_:return 0;case O_:case k_:return rn;case L_:return new Date(0);case V_:case U_:return L;case j_:return rn;default:return super.defaultValues(e)}}fromSchema(e){if(!(e instanceof rv))throw new Error("Object's schema was not verified against input data for SignedCertificateTimestamp");let t=new Fo({stream:new Gn({buffer:e.data})});this.fromStream(t)}fromStream(e){let t=e.getUint16();if(this.version=e.getBlock(1)[0],this.version===0){this.logID=new Uint8Array(e.getBlock(32)).buffer.slice(0),this.timestamp=new Date(Uo(new Uint8Array(e.getBlock(8)),8));let n=e.getUint16();switch(this.extensions=new Uint8Array(e.getBlock(n)).buffer.slice(0),e.getBlock(1)[0]){case 0:this.hashAlgorithm=CF;break;case 1:this.hashAlgorithm=NF;break;case 2:this.hashAlgorithm=TF;break;case 3:this.hashAlgorithm=IF;break;case 4:this.hashAlgorithm=_F;break;case 5:this.hashAlgorithm=BF;break;case 6:this.hashAlgorithm=DF;break;default:throw new Error("Object's stream was not correct for SignedCertificateTimestamp")}switch(e.getBlock(1)[0]){case 0:this.signatureAlgorithm=RF;break;case 1:this.signatureAlgorithm=PF;break;case 2:this.signatureAlgorithm=OF;break;case 3:this.signatureAlgorithm=kF;break;default:throw new Error("Object's stream was not correct for SignedCertificateTimestamp")}let s=e.getUint16();if(this.signature=new Uint8Array(e.getBlock(s)).buffer.slice(0),t!==47+n+s)throw new Error("Object's stream was not correct for SignedCertificateTimestamp")}}toSchema(){let e=this.toStream();return new rv({data:e.stream.buffer})}toStream(){let e=new Fo;e.appendUint16(47+this.extensions.byteLength+this.signature.byteLength),e.appendChar(this.version),e.appendView(new Uint8Array(this.logID));let t=new ArrayBuffer(8),n=new Uint8Array(t),s=aa(this.timestamp.valueOf(),8);n.set(new Uint8Array(s),8-s.byteLength),e.appendView(n),e.appendUint16(this.extensions.byteLength),this.extensions.byteLength&&e.appendView(new Uint8Array(this.extensions));let i;switch(this.hashAlgorithm.toLowerCase()){case CF:i=0;break;case NF:i=1;break;case TF:i=2;break;case IF:i=3;break;case _F:i=4;break;case BF:i=5;break;case DF:i=6;break;default:throw new Error(`Incorrect data for hashAlgorithm: ${this.hashAlgorithm}`)}e.appendChar(i);let a;switch(this.signatureAlgorithm.toLowerCase()){case RF:a=0;break;case PF:a=1;break;case OF:a=2;break;case kF:a=3;break;default:throw new Error(`Incorrect data for signatureAlgorithm: ${this.signatureAlgorithm}`)}return e.appendChar(a),e.appendUint16(this.signature.byteLength),e.appendView(new Uint8Array(this.signature)),e}toJSON(){return{version:this.version,logID:wb(this.logID),timestamp:this.timestamp,extensions:wb(this.extensions),hashAlgorithm:this.hashAlgorithm,signatureAlgorithm:this.signatureAlgorithm,signature:wb(this.signature)}}async verify(e,t,n=0,s=Dt(!0)){let i=bb(zg(this.logID)),a=null,u=new Fo;for(let x of e)if(x.log_id===i){a=x.key;break}if(!a)throw new Error(`Public key not found for CT with logId: ${i}`);let c=Ql(td(a)),f=va.fromBER(c);u.appendChar(0),u.appendChar(0);let h=new ArrayBuffer(8),m=new Uint8Array(h),g=aa(this.timestamp.valueOf(),8);return m.set(new Uint8Array(g),8-g.byteLength),u.appendView(m),u.appendUint16(n),n===0&&u.appendUint24(t.byteLength),u.appendView(new Uint8Array(t)),u.appendUint16(this.extensions.byteLength),this.extensions.byteLength!==0&&u.appendView(new Uint8Array(this.extensions)),s.verifyWithPublicKey(u.buffer.slice(0,u.length),new Ve({valueHex:this.signature}),f,{algorithmId:L},"SHA-256")}};p9.CLASS_NAME="SignedCertificateTimestamp";var qb="timestamps",d9=class m9 extends _e{static{o(this,"SignedCertificateTimestampList")}constructor(e={}){super(),this.timestamps=B(e,qb,m9.defaultValues(qb)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case qb:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case qb:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){var t;let n=B(e,"names",{});return(t=n.optional)!==null&&t!==void 0||(n.optional=!1),new Ve({name:n.blockName||"SignedCertificateTimestampList",optional:n.optional})}fromSchema(e){if(!(e instanceof Ve))throw new Error("Object's schema was not verified against input data for SignedCertificateTimestampList");let t=new Fo({stream:new Gn({buffer:e.valueBlock.valueHex})});if(t.getUint16()!==t.length)throw new Error("Object's schema was not verified against input data for SignedCertificateTimestampList");for(;t.length;)this.timestamps.push(new p9({stream:t}))}toSchema(){let e=new Fo,t=0,n=[];for(let s of this.timestamps){let i=s.toStream();n.push(i),t+=i.stream.buffer.byteLength}e.appendUint16(t);for(let s of n)e.appendView(s.stream.view);return new Ve({valueHex:e.stream.buffer.slice(0)})}toJSON(){return{timestamps:Array.from(this.timestamps,e=>e.toJSON())}}};d9.CLASS_NAME="SignedCertificateTimestampList";var h1="attributes",Dle=[h1],g9=class DB extends _e{static{o(this,"SubjectDirectoryAttributes")}constructor(e={}){super(),this.attributes=B(e,h1,DB.defaultValues(h1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case h1:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.attributes||L,value:nn.schema()})]})}fromSchema(e){De(e,Dle);let t=Ie(e,e,DB.schema({names:{attributes:h1}}));be.assertSchema(t,this.className),this.attributes=Array.from(t.result.attributes,n=>new nn({schema:n}))}toSchema(){return new W({value:Array.from(this.attributes,e=>e.toSchema())})}toJSON(){return{attributes:Array.from(this.attributes,e=>e.toJSON())}}};g9.CLASS_NAME="SubjectDirectoryAttributes";var Rle=class zr{static{o(this,"ExtensionValueFactory")}static getItems(){return this.types||(this.types={},zr.register(qF,"SubjectAltName",cB),zr.register(HF,"IssuerAltName",cB),zr.register(dD,"AuthorityKeyIdentifier",yD),zr.register(hD,"BasicConstraints",xD),zr.register(Xce,"MicrosoftCaVersion",e9),zr.register(WF,"CertificatePolicies",mB),zr.register(Fce,"CertificatePoliciesMicrosoft",mB),zr.register(Gce,"MicrosoftCertTemplateV2",nle),zr.register(XF,"CRLDistributionPoints",yB),zr.register(pD,"FreshestCRL",yB),zr.register(qce,"ExtKeyUsage",n9),zr.register($F,"CertificateIssuer",Xn),zr.register(mD,"AuthorityInfoAccess",SB),zr.register(Kce,"SubjectInfoAccess",SB),zr.register(KF,"IssuingDistributionPoint",i9),zr.register(GF,"NameConstraints",a9),zr.register(JF,"PolicyConstraints",o9),zr.register(zF,"PolicyMappings",u9),zr.register(Lce,"PrivateKeyUsagePeriod",c9),zr.register(Wce,"QCStatements",l9),zr.register($ce,"SignedCertificateTimestampList",d9),zr.register(Pce,"SubjectDirectoryAttributes",g9)),this.types}static fromBER(e,t){let n=Gr(t);if(n.offset===-1)return null;let s=this.find(e);if(s)try{return new s.type({schema:n.result})}catch{let i=new s.type;return i.parsingError=`Incorrectly formatted value of extension ${s.name} (${e})`,i}return n.result}static find(e){return this.getItems()[e]||null}static register(e,t,n){this.getItems()[e]={name:t,type:n}}},p1="extnID",Uc="critical",d1="extnValue",Hb="parsedValue",Ple=[p1,Uc,d1],Ki=class jc extends _e{static{o(this,"Extension")}get parsedValue(){if(this._parsedValue===void 0){let e=Rle.fromBER(this.extnID,this.extnValue.valueBlock.valueHexView);this._parsedValue=e}return this._parsedValue||void 0}set parsedValue(e){this._parsedValue=e}constructor(e={}){super(),this.extnID=B(e,p1,jc.defaultValues(p1)),this.critical=B(e,Uc,jc.defaultValues(Uc)),d1 in e?this.extnValue=new Ve({valueHex:e.extnValue}):this.extnValue=jc.defaultValues(d1),Hb in e&&(this.parsedValue=B(e,Hb,jc.defaultValues(Hb))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case p1:return L;case Uc:return!1;case d1:return new Ve;case Hb:return{};default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new nt({name:t.extnID||L}),new ua({name:t.critical||L,optional:!0}),new Ve({name:t.extnValue||L})]})}fromSchema(e){De(e,Ple);let t=Ie(e,e,jc.schema({names:{extnID:p1,critical:Uc,extnValue:d1}}));be.assertSchema(t,this.className),this.extnID=t.result.extnID.valueBlock.toString(),Uc in t.result&&(this.critical=t.result.critical.valueBlock.value),this.extnValue=t.result.extnValue}toSchema(){let e=[];return e.push(new nt({value:this.extnID})),this.critical!==jc.defaultValues(Uc)&&e.push(new ua({value:this.critical})),e.push(this.extnValue),new W({value:e})}toJSON(){let e={extnID:this.extnID,extnValue:this.extnValue.toJSON()};return this.critical!==jc.defaultValues(Uc)&&(e.critical=this.critical),this.parsedValue&&this.parsedValue.toJSON&&(e.parsedValue=this.parsedValue.toJSON()),e}};Ki.CLASS_NAME="Extension";var m1="extensions",Ole=[m1],An=class RB extends _e{static{o(this,"Extensions")}constructor(e={}){super(),this.extensions=B(e,m1,RB.defaultValues(m1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case m1:return[];default:return super.defaultValues(e)}}static schema(e={},t=!1){let n=B(e,"names",{});return new W({optional:t,name:n.blockName||L,value:[new Tt({name:n.extensions||L,value:Ki.schema(n.extension||{})})]})}fromSchema(e){De(e,Ole);let t=Ie(e,e,RB.schema({names:{extensions:m1}}));be.assertSchema(t,this.className),this.extensions=Array.from(t.result.extensions,n=>new Ki({schema:n}))}toSchema(){return new W({value:Array.from(this.extensions,e=>e.toSchema())})}toJSON(){return{extensions:this.extensions.map(e=>e.toJSON())}}};An.CLASS_NAME="Extensions";var g1="issuer",v1="serialNumber",Af="issuerUID",kle=[g1,v1,Af],ao=class y1 extends _e{static{o(this,"IssuerSerial")}constructor(e={}){super(),this.issuer=B(e,g1,y1.defaultValues(g1)),this.serialNumber=B(e,v1,y1.defaultValues(v1)),Af in e&&(this.issuerUID=B(e,Af,y1.defaultValues(Af))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case g1:return new Xn;case v1:return new ge;case Af:return new qt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[Xn.schema(t.issuer||{}),new ge({name:t.serialNumber||L}),new qt({optional:!0,name:t.issuerUID||L})]})}fromSchema(e){De(e,kle);let t=Ie(e,e,y1.schema({names:{issuer:{names:{blockName:g1}},serialNumber:v1,issuerUID:Af}}));be.assertSchema(t,this.className),this.issuer=new Xn({schema:t.result.issuer}),this.serialNumber=t.result.serialNumber,Af in t.result&&(this.issuerUID=t.result.issuerUID)}toSchema(){let e=new W({value:[this.issuer.toSchema(),this.serialNumber]});return this.issuerUID&&e.valueBlock.value.push(this.issuerUID),e}toJSON(){let e={issuer:this.issuer.toJSON(),serialNumber:this.serialNumber.toJSON()};return this.issuerUID&&(e.issuerUID=this.issuerUID.toJSON()),e}};ao.CLASS_NAME="IssuerSerial";var x1="version",Cf="baseCertificateID",Nf="subjectName",w1="issuer",S1="signature",b1="serialNumber",E1="attrCertValidityPeriod",A1="attributes",Tf="issuerUniqueID",If="extensions",Lle=[x1,Cf,Nf,w1,S1,b1,E1,A1,Tf,If],NE=class qi extends _e{static{o(this,"AttributeCertificateInfoV1")}constructor(e={}){super(),this.version=B(e,x1,qi.defaultValues(x1)),Cf in e&&(this.baseCertificateID=B(e,Cf,qi.defaultValues(Cf))),Nf in e&&(this.subjectName=B(e,Nf,qi.defaultValues(Nf))),this.issuer=B(e,w1,qi.defaultValues(w1)),this.signature=B(e,S1,qi.defaultValues(S1)),this.serialNumber=B(e,b1,qi.defaultValues(b1)),this.attrCertValidityPeriod=B(e,E1,qi.defaultValues(E1)),this.attributes=B(e,A1,qi.defaultValues(A1)),Tf in e&&(this.issuerUniqueID=B(e,Tf,qi.defaultValues(Tf))),If in e&&(this.extensions=B(e,If,qi.defaultValues(If))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case x1:return 0;case Cf:return new ao;case Nf:return new Xn;case w1:return new Xn;case S1:return new ve;case b1:return new ge;case E1:return new Eh;case A1:return[];case Tf:return new qt;case If:return new An;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),new Lr({value:[new oe({name:t.baseCertificateID||L,idBlock:{tagClass:3,tagNumber:0},value:ao.schema().valueBlock.value}),new oe({name:t.subjectName||L,idBlock:{tagClass:3,tagNumber:1},value:Xn.schema().valueBlock.value})]}),Xn.schema({names:{blockName:t.issuer||L}}),ve.schema(t.signature||{}),new ge({name:t.serialNumber||L}),Eh.schema(t.attrCertValidityPeriod||{}),new W({name:t.attributes||L,value:[new Tt({value:nn.schema()})]}),new qt({optional:!0,name:t.issuerUniqueID||L}),An.schema(t.extensions||{},!0)]})}fromSchema(e){De(e,Lle);let t=Ie(e,e,qi.schema({names:{version:x1,baseCertificateID:Cf,subjectName:Nf,issuer:w1,signature:{names:{blockName:S1}},serialNumber:b1,attrCertValidityPeriod:{names:{blockName:E1}},attributes:A1,issuerUniqueID:Tf,extensions:{names:{blockName:If}}}}));be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,Cf in t.result&&(this.baseCertificateID=new ao({schema:new W({value:t.result.baseCertificateID.valueBlock.value})})),Nf in t.result&&(this.subjectName=new Xn({schema:new W({value:t.result.subjectName.valueBlock.value})})),this.issuer=t.result.issuer,this.signature=new ve({schema:t.result.signature}),this.serialNumber=t.result.serialNumber,this.attrCertValidityPeriod=new Eh({schema:t.result.attrCertValidityPeriod}),this.attributes=Array.from(t.result.attributes.valueBlock.value,n=>new nn({schema:n})),Tf in t.result&&(this.issuerUniqueID=t.result.issuerUniqueID),If in t.result&&(this.extensions=new An({schema:t.result.extensions}))}toSchema(){let e=new W({value:[new ge({value:this.version})]});return this.baseCertificateID&&e.valueBlock.value.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:this.baseCertificateID.toSchema().valueBlock.value})),this.subjectName&&e.valueBlock.value.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:this.subjectName.toSchema().valueBlock.value})),e.valueBlock.value.push(this.issuer.toSchema()),e.valueBlock.value.push(this.signature.toSchema()),e.valueBlock.value.push(this.serialNumber),e.valueBlock.value.push(this.attrCertValidityPeriod.toSchema()),e.valueBlock.value.push(new W({value:Array.from(this.attributes,t=>t.toSchema())})),this.issuerUniqueID&&e.valueBlock.value.push(this.issuerUniqueID),this.extensions&&e.valueBlock.value.push(this.extensions.toSchema()),e}toJSON(){let e={version:this.version};return this.baseCertificateID&&(e.baseCertificateID=this.baseCertificateID.toJSON()),this.subjectName&&(e.subjectName=this.subjectName.toJSON()),e.issuer=this.issuer.toJSON(),e.signature=this.signature.toJSON(),e.serialNumber=this.serialNumber.toJSON(),e.attrCertValidityPeriod=this.attrCertValidityPeriod.toJSON(),e.attributes=Array.from(this.attributes,t=>t.toJSON()),this.issuerUniqueID&&(e.issuerUniqueID=this.issuerUniqueID.toJSON()),this.extensions&&(e.extensions=this.extensions.toJSON()),e}};NE.CLASS_NAME="AttributeCertificateInfoV1";var C1="acinfo",N1="signatureAlgorithm",T1="signatureValue",Vle=[C1,T1,N1],EA=class I1 extends _e{static{o(this,"AttributeCertificateV1")}constructor(e={}){super(),this.acinfo=B(e,C1,I1.defaultValues(C1)),this.signatureAlgorithm=B(e,N1,I1.defaultValues(N1)),this.signatureValue=B(e,T1,I1.defaultValues(T1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case C1:return new NE;case N1:return new ve;case T1:return new qt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[NE.schema(t.acinfo||{}),ve.schema(t.signatureAlgorithm||{}),new qt({name:t.signatureValue||L})]})}fromSchema(e){De(e,Vle);let t=Ie(e,e,I1.schema({names:{acinfo:{names:{blockName:C1}},signatureAlgorithm:{names:{blockName:N1}},signatureValue:T1}}));be.assertSchema(t,this.className),this.acinfo=new NE({schema:t.result.acinfo}),this.signatureAlgorithm=new ve({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}toSchema(){return new W({value:[this.acinfo.toSchema(),this.signatureAlgorithm.toSchema(),this.signatureValue]})}toJSON(){return{acinfo:this.acinfo.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signatureValue:this.signatureValue.toJSON()}}};EA.CLASS_NAME="AttributeCertificateV1";var _1="digestedObjectType",_f="otherObjectTypeID",B1="digestAlgorithm",D1="objectDigest",Ule=[_1,_f,B1,D1],Ah=class Nd extends _e{static{o(this,"ObjectDigestInfo")}constructor(e={}){super(),this.digestedObjectType=B(e,_1,Nd.defaultValues(_1)),_f in e&&(this.otherObjectTypeID=B(e,_f,Nd.defaultValues(_f))),this.digestAlgorithm=B(e,B1,Nd.defaultValues(B1)),this.objectDigest=B(e,D1,Nd.defaultValues(D1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case _1:return new pc;case _f:return new nt;case B1:return new ve;case D1:return new qt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new pc({name:t.digestedObjectType||L}),new nt({optional:!0,name:t.otherObjectTypeID||L}),ve.schema(t.digestAlgorithm||{}),new qt({name:t.objectDigest||L})]})}fromSchema(e){De(e,Ule);let t=Ie(e,e,Nd.schema({names:{digestedObjectType:_1,otherObjectTypeID:_f,digestAlgorithm:{names:{blockName:B1}},objectDigest:D1}}));be.assertSchema(t,this.className),this.digestedObjectType=t.result.digestedObjectType,_f in t.result&&(this.otherObjectTypeID=t.result.otherObjectTypeID),this.digestAlgorithm=new ve({schema:t.result.digestAlgorithm}),this.objectDigest=t.result.objectDigest}toSchema(){let e=new W({value:[this.digestedObjectType]});return this.otherObjectTypeID&&e.valueBlock.value.push(this.otherObjectTypeID),e.valueBlock.value.push(this.digestAlgorithm.toSchema()),e.valueBlock.value.push(this.objectDigest),e}toJSON(){let e={digestedObjectType:this.digestedObjectType.toJSON(),digestAlgorithm:this.digestAlgorithm.toJSON(),objectDigest:this.objectDigest.toJSON()};return this.otherObjectTypeID&&(e.otherObjectTypeID=this.otherObjectTypeID.toJSON()),e}};Ah.CLASS_NAME="ObjectDigestInfo";var Bf="issuerName",Df="baseCertificateID",Rf="objectDigestInfo",jle=[Bf,Df,Rf],PB=class R1 extends _e{static{o(this,"V2Form")}constructor(e={}){super(),Bf in e&&(this.issuerName=B(e,Bf,R1.defaultValues(Bf))),Df in e&&(this.baseCertificateID=B(e,Df,R1.defaultValues(Df))),Rf in e&&(this.objectDigestInfo=B(e,Rf,R1.defaultValues(Rf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Bf:return new Xn;case Df:return new ao;case Rf:return new Ah;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[Xn.schema({names:{blockName:t.issuerName}},!0),new oe({optional:!0,name:t.baseCertificateID||L,idBlock:{tagClass:3,tagNumber:0},value:ao.schema().valueBlock.value}),new oe({optional:!0,name:t.objectDigestInfo||L,idBlock:{tagClass:3,tagNumber:1},value:Ah.schema().valueBlock.value})]})}fromSchema(e){De(e,jle);let t=Ie(e,e,R1.schema({names:{issuerName:Bf,baseCertificateID:Df,objectDigestInfo:Rf}}));be.assertSchema(t,this.className),Bf in t.result&&(this.issuerName=new Xn({schema:t.result.issuerName})),Df in t.result&&(this.baseCertificateID=new ao({schema:new W({value:t.result.baseCertificateID.valueBlock.value})})),Rf in t.result&&(this.objectDigestInfo=new Ah({schema:new W({value:t.result.objectDigestInfo.valueBlock.value})}))}toSchema(){let e=new W;return this.issuerName&&e.valueBlock.value.push(this.issuerName.toSchema()),this.baseCertificateID&&e.valueBlock.value.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:this.baseCertificateID.toSchema().valueBlock.value})),this.objectDigestInfo&&e.valueBlock.value.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:this.objectDigestInfo.toSchema().valueBlock.value})),e}toJSON(){let e={};return this.issuerName&&(e.issuerName=this.issuerName.toJSON()),this.baseCertificateID&&(e.baseCertificateID=this.baseCertificateID.toJSON()),this.objectDigestInfo&&(e.objectDigestInfo=this.objectDigestInfo.toJSON()),e}};PB.CLASS_NAME="V2Form";var Pf="baseCertificateID",Of="entityName",kf="objectDigestInfo",Mle=[Pf,Of,kf],TE=class P1 extends _e{static{o(this,"Holder")}constructor(e={}){super(),Pf in e&&(this.baseCertificateID=B(e,Pf,P1.defaultValues(Pf))),Of in e&&(this.entityName=B(e,Of,P1.defaultValues(Of))),kf in e&&(this.objectDigestInfo=B(e,kf,P1.defaultValues(kf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Pf:return new ao;case Of:return new Xn;case kf:return new Ah;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new oe({optional:!0,name:t.baseCertificateID||L,idBlock:{tagClass:3,tagNumber:0},value:ao.schema().valueBlock.value}),new oe({optional:!0,name:t.entityName||L,idBlock:{tagClass:3,tagNumber:1},value:Xn.schema().valueBlock.value}),new oe({optional:!0,name:t.objectDigestInfo||L,idBlock:{tagClass:3,tagNumber:2},value:Ah.schema().valueBlock.value})]})}fromSchema(e){De(e,Mle);let t=Ie(e,e,P1.schema({names:{baseCertificateID:Pf,entityName:Of,objectDigestInfo:kf}}));be.assertSchema(t,this.className),Pf in t.result&&(this.baseCertificateID=new ao({schema:new W({value:t.result.baseCertificateID.valueBlock.value})})),Of in t.result&&(this.entityName=new Xn({schema:new W({value:t.result.entityName.valueBlock.value})})),kf in t.result&&(this.objectDigestInfo=new Ah({schema:new W({value:t.result.objectDigestInfo.valueBlock.value})}))}toSchema(){let e=new W;return this.baseCertificateID&&e.valueBlock.value.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:this.baseCertificateID.toSchema().valueBlock.value})),this.entityName&&e.valueBlock.value.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:this.entityName.toSchema().valueBlock.value})),this.objectDigestInfo&&e.valueBlock.value.push(new oe({idBlock:{tagClass:3,tagNumber:2},value:this.objectDigestInfo.toSchema().valueBlock.value})),e}toJSON(){let e={};return this.baseCertificateID&&(e.baseCertificateID=this.baseCertificateID.toJSON()),this.entityName&&(e.entityName=this.entityName.toJSON()),this.objectDigestInfo&&(e.objectDigestInfo=this.objectDigestInfo.toJSON()),e}};TE.CLASS_NAME="Holder";var O1="version",k1="holder",L1="issuer",V1="signature",U1="serialNumber",j1="attrCertValidityPeriod",M1="attributes",Lf="issuerUniqueID",Vf="extensions",Fle=[O1,k1,L1,V1,U1,j1,M1,Lf,Vf],IE=class ha extends _e{static{o(this,"AttributeCertificateInfoV2")}constructor(e={}){super(),this.version=B(e,O1,ha.defaultValues(O1)),this.holder=B(e,k1,ha.defaultValues(k1)),this.issuer=B(e,L1,ha.defaultValues(L1)),this.signature=B(e,V1,ha.defaultValues(V1)),this.serialNumber=B(e,U1,ha.defaultValues(U1)),this.attrCertValidityPeriod=B(e,j1,ha.defaultValues(j1)),this.attributes=B(e,M1,ha.defaultValues(M1)),Lf in e&&(this.issuerUniqueID=B(e,Lf,ha.defaultValues(Lf))),Vf in e&&(this.extensions=B(e,Vf,ha.defaultValues(Vf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case O1:return 1;case k1:return new TE;case L1:return{};case V1:return new ve;case U1:return new ge;case j1:return new Eh;case M1:return[];case Lf:return new qt;case Vf:return new An;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),TE.schema(t.holder||{}),new Lr({value:[Xn.schema({names:{blockName:t.issuer||L}}),new oe({name:t.issuer||L,idBlock:{tagClass:3,tagNumber:0},value:PB.schema().valueBlock.value})]}),ve.schema(t.signature||{}),new ge({name:t.serialNumber||L}),Eh.schema(t.attrCertValidityPeriod||{}),new W({name:t.attributes||L,value:[new Tt({value:nn.schema()})]}),new qt({optional:!0,name:t.issuerUniqueID||L}),An.schema(t.extensions||{},!0)]})}fromSchema(e){De(e,Fle);let t=Ie(e,e,ha.schema({names:{version:O1,holder:{names:{blockName:k1}},issuer:L1,signature:{names:{blockName:V1}},serialNumber:U1,attrCertValidityPeriod:{names:{blockName:j1}},attributes:M1,issuerUniqueID:Lf,extensions:{names:{blockName:Vf}}}}));switch(be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.holder=new TE({schema:t.result.holder}),t.result.issuer.idBlock.tagClass){case 3:this.issuer=new PB({schema:new W({value:t.result.issuer.valueBlock.value})});break;case 1:default:throw new Error("Incorrect value for 'issuer' in AttributeCertificateInfoV2")}this.signature=new ve({schema:t.result.signature}),this.serialNumber=t.result.serialNumber,this.attrCertValidityPeriod=new Eh({schema:t.result.attrCertValidityPeriod}),this.attributes=Array.from(t.result.attributes.valueBlock.value,n=>new nn({schema:n})),Lf in t.result&&(this.issuerUniqueID=t.result.issuerUniqueID),Vf in t.result&&(this.extensions=new An({schema:t.result.extensions}))}toSchema(){let e=new W({value:[new ge({value:this.version}),this.holder.toSchema(),new oe({idBlock:{tagClass:3,tagNumber:0},value:this.issuer.toSchema().valueBlock.value}),this.signature.toSchema(),this.serialNumber,this.attrCertValidityPeriod.toSchema(),new W({value:Array.from(this.attributes,t=>t.toSchema())})]});return this.issuerUniqueID&&e.valueBlock.value.push(this.issuerUniqueID),this.extensions&&e.valueBlock.value.push(this.extensions.toSchema()),e}toJSON(){let e={version:this.version,holder:this.holder.toJSON(),issuer:this.issuer.toJSON(),signature:this.signature.toJSON(),serialNumber:this.serialNumber.toJSON(),attrCertValidityPeriod:this.attrCertValidityPeriod.toJSON(),attributes:Array.from(this.attributes,t=>t.toJSON())};return this.issuerUniqueID&&(e.issuerUniqueID=this.issuerUniqueID.toJSON()),this.extensions&&(e.extensions=this.extensions.toJSON()),e}};IE.CLASS_NAME="AttributeCertificateInfoV2";var F1="acinfo",q1="signatureAlgorithm",H1="signatureValue",qle=[F1,q1,H1],pl=class K1 extends _e{static{o(this,"AttributeCertificateV2")}constructor(e={}){super(),this.acinfo=B(e,F1,K1.defaultValues(F1)),this.signatureAlgorithm=B(e,q1,K1.defaultValues(q1)),this.signatureValue=B(e,H1,K1.defaultValues(H1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case F1:return new IE;case q1:return new ve;case H1:return new qt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[IE.schema(t.acinfo||{}),ve.schema(t.signatureAlgorithm||{}),new qt({name:t.signatureValue||L})]})}fromSchema(e){De(e,qle);let t=Ie(e,e,K1.schema({names:{acinfo:{names:{blockName:F1}},signatureAlgorithm:{names:{blockName:q1}},signatureValue:H1}}));be.assertSchema(t,this.className),this.acinfo=new IE({schema:t.result.acinfo}),this.signatureAlgorithm=new ve({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}toSchema(){return new W({value:[this.acinfo.toSchema(),this.signatureAlgorithm.toSchema(),this.signatureValue]})}toJSON(){return{acinfo:this.acinfo.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signatureValue:this.signatureValue.toJSON()}}};pl.CLASS_NAME="AttributeCertificateV2";var Uf="contentType",Td="content",Hle=[Uf,Td],Jr=class _E extends _e{static{o(this,"ContentInfo")}constructor(e={}){super(),this.contentType=B(e,Uf,_E.defaultValues(Uf)),this.content=B(e,Td,_E.defaultValues(Td)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Uf:return L;case Td:return new wt;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Uf:return typeof t=="string"&&t===this.defaultValues(Uf);case Td:return t instanceof wt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return"optional"in t||(t.optional=!1),new W({name:t.blockName||"ContentInfo",optional:t.optional,value:[new nt({name:t.contentType||Uf}),new oe({idBlock:{tagClass:3,tagNumber:0},value:[new wt({name:t.content||Td})]})]})}fromSchema(e){De(e,Hle);let t=Ie(e,e,_E.schema());be.assertSchema(t,this.className),this.contentType=t.result.contentType.valueBlock.toString(),this.content=t.result.content}toSchema(){return new W({value:[new nt({value:this.contentType}),new oe({idBlock:{tagClass:3,tagNumber:0},value:[this.content]})]})}toJSON(){let e={contentType:this.contentType};return this.content instanceof wt||(e.content=this.content.toJSON()),e}};Jr.CLASS_NAME="ContentInfo";Jr.DATA=gD;Jr.SIGNED_DATA=YF;Jr.ENVELOPED_DATA=QF;Jr.ENCRYPTED_DATA=ZF;var M_="type",F_="value",OB="utcTimeName",kB="generalTimeName",Kle=[OB,kB],LF;(function(r){r[r.UTCTime=0]="UTCTime",r[r.GeneralizedTime=1]="GeneralizedTime",r[r.empty=2]="empty"})(LF||(LF={}));var Wn=class BE extends _e{static{o(this,"Time")}constructor(e={}){super(),this.type=B(e,M_,BE.defaultValues(M_)),this.value=B(e,F_,BE.defaultValues(F_)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case M_:return 0;case F_:return new Date(0,0,0);default:return super.defaultValues(e)}}static schema(e={},t=!1){let n=B(e,"names",{});return new Lr({optional:t,value:[new tf({name:n.utcTimeName||L}),new kr({name:n.generalTimeName||L})]})}fromSchema(e){De(e,Kle);let t=Ie(e,e,BE.schema({names:{utcTimeName:OB,generalTimeName:kB}}));be.assertSchema(t,this.className),OB in t.result&&(this.type=0,this.value=t.result.utcTimeName.toDate()),kB in t.result&&(this.type=1,this.value=t.result.generalTimeName.toDate())}toSchema(){return this.type===0?new tf({valueDate:this.value}):this.type===1?new kr({valueDate:this.value}):{}}toJSON(){return{type:this.type,value:this.value}}};Wn.CLASS_NAME="Time";var q_="tbs",Mc="version",DE="serialNumber",RE="signature",PE="issuer",OE="notBefore",kE="notAfter",LE="subject",VE="subjectPublicKeyInfo",$1="issuerUniqueID",G1="subjectUniqueID",X1="extensions",W1="signatureAlgorithm",z1="signatureValue",li="tbsCertificate",AA=`${li}.${Mc}`,wD=`${li}.${DE}`,SD=`${li}.${RE}`,bD=`${li}.${PE}`,CA=`${li}.${OE}`,NA=`${li}.${kE}`,ED=`${li}.${LE}`,AD=`${li}.${VE}`,TA=`${li}.${$1}`,IA=`${li}.${G1}`,Fy=`${li}.${X1}`,$le=[li,AA,wD,SD,bD,CA,NA,ED,AD,TA,IA,Fy,W1,z1];function Gle(r={}){let e=B(r,"names",{});return new W({name:e.blockName||li,value:[new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new ge({name:e.tbsCertificateVersion||AA})]}),new ge({name:e.tbsCertificateSerialNumber||wD}),ve.schema(e.signature||{names:{blockName:SD}}),Vr.schema(e.issuer||{names:{blockName:bD}}),new W({name:e.tbsCertificateValidity||"tbsCertificate.validity",value:[Wn.schema(e.notBefore||{names:{utcTimeName:CA,generalTimeName:CA}}),Wn.schema(e.notAfter||{names:{utcTimeName:NA,generalTimeName:NA}})]}),Vr.schema(e.subject||{names:{blockName:ED}}),va.schema(e.subjectPublicKeyInfo||{names:{blockName:AD}}),new vt({name:e.tbsCertificateIssuerUniqueID||TA,optional:!0,idBlock:{tagClass:3,tagNumber:1}}),new vt({name:e.tbsCertificateSubjectUniqueID||IA,optional:!0,idBlock:{tagClass:3,tagNumber:2}}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:3},value:[An.schema(e.extensions||{names:{blockName:Fy}})]})]})}o(Gle,"tbsCertificate");var cs=class En extends _e{static{o(this,"Certificate")}get tbs(){return mt.toArrayBuffer(this.tbsView)}set tbs(e){this.tbsView=new Uint8Array(e)}constructor(e={}){super(),this.tbsView=new Uint8Array(B(e,q_,En.defaultValues(q_))),this.version=B(e,Mc,En.defaultValues(Mc)),this.serialNumber=B(e,DE,En.defaultValues(DE)),this.signature=B(e,RE,En.defaultValues(RE)),this.issuer=B(e,PE,En.defaultValues(PE)),this.notBefore=B(e,OE,En.defaultValues(OE)),this.notAfter=B(e,kE,En.defaultValues(kE)),this.subject=B(e,LE,En.defaultValues(LE)),this.subjectPublicKeyInfo=B(e,VE,En.defaultValues(VE)),$1 in e&&(this.issuerUniqueID=B(e,$1,En.defaultValues($1))),G1 in e&&(this.subjectUniqueID=B(e,G1,En.defaultValues(G1))),X1 in e&&(this.extensions=B(e,X1,En.defaultValues(X1))),this.signatureAlgorithm=B(e,W1,En.defaultValues(W1)),this.signatureValue=B(e,z1,En.defaultValues(z1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case q_:return rn;case Mc:return 0;case DE:return new ge;case RE:return new ve;case PE:return new Vr;case OE:return new Wn;case kE:return new Wn;case LE:return new Vr;case VE:return new va;case $1:return rn;case G1:return rn;case X1:return[];case W1:return new ve;case z1:return new qt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[Gle(t.tbsCertificate),ve.schema(t.signatureAlgorithm||{names:{blockName:W1}}),new qt({name:t.signatureValue||z1})]})}fromSchema(e){De(e,$le);let t=Ie(e,e,En.schema({names:{tbsCertificate:{names:{extensions:{names:{extensions:Fy}}}}}}));be.assertSchema(t,this.className),this.tbsView=t.result.tbsCertificate.valueBeforeDecodeView,AA in t.result&&(this.version=t.result[AA].valueBlock.valueDec),this.serialNumber=t.result[wD],this.signature=new ve({schema:t.result[SD]}),this.issuer=new Vr({schema:t.result[bD]}),this.notBefore=new Wn({schema:t.result[CA]}),this.notAfter=new Wn({schema:t.result[NA]}),this.subject=new Vr({schema:t.result[ED]}),this.subjectPublicKeyInfo=new va({schema:t.result[AD]}),TA in t.result&&(this.issuerUniqueID=t.result[TA].valueBlock.valueHex),IA in t.result&&(this.subjectUniqueID=t.result[IA].valueBlock.valueHex),Fy in t.result&&(this.extensions=Array.from(t.result[Fy],n=>new Ki({schema:n}))),this.signatureAlgorithm=new ve({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}encodeTBS(){let e=[];return Mc in this&&this.version!==En.defaultValues(Mc)&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new ge({value:this.version})]})),e.push(this.serialNumber),e.push(this.signature.toSchema()),e.push(this.issuer.toSchema()),e.push(new W({value:[this.notBefore.toSchema(),this.notAfter.toSchema()]})),e.push(this.subject.toSchema()),e.push(this.subjectPublicKeyInfo.toSchema()),this.issuerUniqueID&&e.push(new vt({optional:!0,idBlock:{tagClass:3,tagNumber:1},valueHex:this.issuerUniqueID})),this.subjectUniqueID&&e.push(new vt({optional:!0,idBlock:{tagClass:3,tagNumber:2},valueHex:this.subjectUniqueID})),this.extensions&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:3},value:[new W({value:Array.from(this.extensions,t=>t.toSchema())})]})),new W({value:e})}toSchema(e=!1){let t;if(e===!1){if(!this.tbsView.byteLength)return En.schema().value[0];let n=Gr(this.tbsView);be.assert(n,"TBS Certificate"),t=n.result}else t=this.encodeTBS();return new W({value:[t,this.signatureAlgorithm.toSchema(),this.signatureValue]})}toJSON(){let e={tbs:Et.ToHex(this.tbsView),version:this.version,serialNumber:this.serialNumber.toJSON(),signature:this.signature.toJSON(),issuer:this.issuer.toJSON(),notBefore:this.notBefore.toJSON(),notAfter:this.notAfter.toJSON(),subject:this.subject.toJSON(),subjectPublicKeyInfo:this.subjectPublicKeyInfo.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signatureValue:this.signatureValue.toJSON()};return Mc in this&&this.version!==En.defaultValues(Mc)&&(e.version=this.version),this.issuerUniqueID&&(e.issuerUniqueID=Et.ToHex(this.issuerUniqueID)),this.subjectUniqueID&&(e.subjectUniqueID=Et.ToHex(this.subjectUniqueID)),this.extensions&&(e.extensions=Array.from(this.extensions,t=>t.toJSON())),e}async getPublicKey(e,t=Dt(!0)){return t.getPublicKey(this.subjectPublicKeyInfo,this.signatureAlgorithm,e)}async getKeyHash(e="SHA-1",t=Dt(!0)){return t.digest({name:e},this.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView)}async sign(e,t="SHA-1",n=Dt(!0)){if(!e)throw new Error("Need to provide a private key for signing");let s=await n.getSignatureParameters(e,t),i=s.parameters;this.signature=s.signatureAlgorithm,this.signatureAlgorithm=s.signatureAlgorithm,this.tbsView=new Uint8Array(this.encodeTBS().toBER());let a=await n.signWithPrivateKey(this.tbsView,e,i);this.signatureValue=new qt({valueHex:a})}async verify(e,t=Dt(!0)){let n;if(e?n=e.subjectPublicKeyInfo:this.issuer.isEqual(this.subject)&&(n=this.subjectPublicKeyInfo),!(n instanceof va))throw new Error("Please provide issuer certificate as a parameter");return t.verifyWithPublicKey(this.tbsView,this.signatureValue,n,this.signatureAlgorithm)}};cs.CLASS_NAME="Certificate";function v9(r,e=null){if(e&&r.issuer.isEqual(e.issuer)&&r.serialNumber.isEqual(e.serialNumber))return null;let t=!1;if(r.extensions){for(let n of r.extensions)if(n.extnID===hD&&n.parsedValue instanceof xD&&n.parsedValue.cA){t=!0;break}}return t?r:null}o(v9,"checkCA");var Id="certId",_d="certValue",id="parsedValue",Xle=[Id,_d],y9=class J1 extends _e{static{o(this,"CertBag")}constructor(e={}){super(),this.certId=B(e,Id,J1.defaultValues(Id)),this.certValue=B(e,_d,J1.defaultValues(_d)),id in e&&(this.parsedValue=B(e,id,J1.defaultValues(id))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Id:return L;case _d:return new wt;case id:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Id:return t===L;case _d:return t instanceof wt;case id:return t instanceof Object&&Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new nt({name:t.id||"id"}),new oe({idBlock:{tagClass:3,tagNumber:0},value:[new wt({name:t.value||"value"})]})]})}fromSchema(e){De(e,Xle);let t=Ie(e,e,J1.schema({names:{id:Id,value:_d}}));be.assertSchema(t,this.className),this.certId=t.result.certId.valueBlock.toString(),this.certValue=t.result.certValue;let n=this.certValue.valueBlock.valueHexView;switch(this.certId){case yF:try{this.parsedValue=cs.fromBER(n)}catch{pl.fromBER(n)}break;case xF:this.parsedValue=pl.fromBER(n);break;case Jce:default:throw new Error(`Incorrect CERT_ID value in CertBag: ${this.certId}`)}}toSchema(){return id in this&&("acinfo"in this.parsedValue?this.certId=xF:this.certId=yF,this.certValue=new Ve({valueHex:this.parsedValue.toSchema().toBER(!1)})),new W({value:[new nt({value:this.certId}),new oe({idBlock:{tagClass:3,tagNumber:0},value:["toSchema"in this.certValue?this.certValue.toSchema():this.certValue]})]})}toJSON(){return{certId:this.certId,certValue:this.certValue.toJSON()}}};y9.CLASS_NAME="CertBag";var Y1="userCertificate",Bd="revocationDate",jf="crlEntryExtensions",Wle=[Y1,Bd,jf],x9=class Q1 extends _e{static{o(this,"RevokedCertificate")}constructor(e={}){super(),this.userCertificate=B(e,Y1,Q1.defaultValues(Y1)),this.revocationDate=B(e,Bd,Q1.defaultValues(Bd)),jf in e&&(this.crlEntryExtensions=B(e,jf,Q1.defaultValues(jf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Y1:return new ge;case Bd:return new Wn;case jf:return new An;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.userCertificate||Y1}),Wn.schema({names:{utcTimeName:t.revocationDate||Bd,generalTimeName:t.revocationDate||Bd}}),An.schema({names:{blockName:t.crlEntryExtensions||jf}},!0)]})}fromSchema(e){De(e,Wle);let t=Ie(e,e,Q1.schema());be.assertSchema(t,this.className),this.userCertificate=t.result.userCertificate,this.revocationDate=new Wn({schema:t.result.revocationDate}),jf in t.result&&(this.crlEntryExtensions=new An({schema:t.result.crlEntryExtensions}))}toSchema(){let e=[this.userCertificate,this.revocationDate.toSchema()];return this.crlEntryExtensions&&e.push(this.crlEntryExtensions.toSchema()),new W({value:e})}toJSON(){let e={userCertificate:this.userCertificate.toJSON(),revocationDate:this.revocationDate.toJSON()};return this.crlEntryExtensions&&(e.crlEntryExtensions=this.crlEntryExtensions.toJSON()),e}};x9.CLASS_NAME="RevokedCertificate";var H_="tbs",uv="version",K_="signature",$_="issuer",G_="thisUpdate",Kb="nextUpdate",$b="revokedCertificates",Gb="crlExtensions",Z1="signatureAlgorithm",ey="signatureValue",uu="tbsCertList",_A=`${uu}.version`,CD=`${uu}.signature`,ND=`${uu}.issuer`,BA=`${uu}.thisUpdate`,zy=`${uu}.nextUpdate`,DA=`${uu}.revokedCertificates`,RA=`${uu}.extensions`,zle=[uu,_A,CD,ND,BA,zy,DA,RA,Z1,ey];function Jle(r={}){let e=B(r,"names",{});return new W({name:e.blockName||uu,value:[new ge({optional:!0,name:e.tbsCertListVersion||_A,value:2}),ve.schema(e.signature||{names:{blockName:CD}}),Vr.schema(e.issuer||{names:{blockName:ND}}),Wn.schema(e.tbsCertListThisUpdate||{names:{utcTimeName:BA,generalTimeName:BA}}),Wn.schema(e.tbsCertListNextUpdate||{names:{utcTimeName:zy,generalTimeName:zy}},!0),new W({optional:!0,value:[new Tt({name:e.tbsCertListRevokedCertificates||DA,value:new W({value:[new ge,Wn.schema(),An.schema({},!0)]})})]}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[An.schema(e.crlExtensions||{names:{blockName:RA}})]})]})}o(Jle,"tbsCertList");var Yle=[dD,HF,Vce,Uce,KF,pD,mD,jce,Mce,$F],Jy=class bs extends _e{static{o(this,"CertificateRevocationList")}get tbs(){return mt.toArrayBuffer(this.tbsView)}set tbs(e){this.tbsView=new Uint8Array(e)}constructor(e={}){super(),this.tbsView=new Uint8Array(B(e,H_,bs.defaultValues(H_))),this.version=B(e,uv,bs.defaultValues(uv)),this.signature=B(e,K_,bs.defaultValues(K_)),this.issuer=B(e,$_,bs.defaultValues($_)),this.thisUpdate=B(e,G_,bs.defaultValues(G_)),Kb in e&&(this.nextUpdate=B(e,Kb,bs.defaultValues(Kb))),$b in e&&(this.revokedCertificates=B(e,$b,bs.defaultValues($b))),Gb in e&&(this.crlExtensions=B(e,Gb,bs.defaultValues(Gb))),this.signatureAlgorithm=B(e,Z1,bs.defaultValues(Z1)),this.signatureValue=B(e,ey,bs.defaultValues(ey)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case H_:return rn;case uv:return 0;case K_:return new ve;case $_:return new Vr;case G_:return new Wn;case Kb:return new Wn;case $b:return[];case Gb:return new An;case Z1:return new ve;case ey:return new qt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||"CertificateList",value:[Jle(e),ve.schema(t.signatureAlgorithm||{names:{blockName:Z1}}),new qt({name:t.signatureValue||ey})]})}fromSchema(e){De(e,zle);let t=Ie(e,e,bs.schema());be.assertSchema(t,this.className),this.tbsView=t.result.tbsCertList.valueBeforeDecodeView,_A in t.result&&(this.version=t.result[_A].valueBlock.valueDec),this.signature=new ve({schema:t.result[CD]}),this.issuer=new Vr({schema:t.result[ND]}),this.thisUpdate=new Wn({schema:t.result[BA]}),zy in t.result&&(this.nextUpdate=new Wn({schema:t.result[zy]})),DA in t.result&&(this.revokedCertificates=Array.from(t.result[DA],n=>new x9({schema:n}))),RA in t.result&&(this.crlExtensions=new An({schema:t.result[RA]})),this.signatureAlgorithm=new ve({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}encodeTBS(){let e=[];return this.version!==bs.defaultValues(uv)&&e.push(new ge({value:this.version})),e.push(this.signature.toSchema()),e.push(this.issuer.toSchema()),e.push(this.thisUpdate.toSchema()),this.nextUpdate&&e.push(this.nextUpdate.toSchema()),this.revokedCertificates&&e.push(new W({value:Array.from(this.revokedCertificates,t=>t.toSchema())})),this.crlExtensions&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[this.crlExtensions.toSchema()]})),new W({value:e})}toSchema(e=!1){let t;if(e)t=this.encodeTBS();else{if(!this.tbsView.byteLength)return bs.schema();let n=Gr(this.tbsView);be.assert(n,"TBS Certificate Revocation List"),t=n.result}return new W({value:[t,this.signatureAlgorithm.toSchema(),this.signatureValue]})}toJSON(){let e={tbs:Et.ToHex(this.tbsView),version:this.version,signature:this.signature.toJSON(),issuer:this.issuer.toJSON(),thisUpdate:this.thisUpdate.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signatureValue:this.signatureValue.toJSON()};return this.version!==bs.defaultValues(uv)&&(e.version=this.version),this.nextUpdate&&(e.nextUpdate=this.nextUpdate.toJSON()),this.revokedCertificates&&(e.revokedCertificates=Array.from(this.revokedCertificates,t=>t.toJSON())),this.crlExtensions&&(e.crlExtensions=this.crlExtensions.toJSON()),e}isCertificateRevoked(e){if(!this.issuer.isEqual(e.issuer)||!this.revokedCertificates)return!1;for(let t of this.revokedCertificates)if(t.userCertificate.isEqual(e.serialNumber))return!0;return!1}async sign(e,t="SHA-1",n=Dt(!0)){if(!e)throw new Error("Need to provide a private key for signing");let s=await n.getSignatureParameters(e,t),{parameters:i}=s;this.signature=s.signatureAlgorithm,this.signatureAlgorithm=s.signatureAlgorithm,this.tbsView=new Uint8Array(this.encodeTBS().toBER());let a=await n.signWithPrivateKey(this.tbsView,e,i);this.signatureValue=new qt({valueHex:a})}async verify(e={},t=Dt(!0)){let n;if(e.issuerCertificate&&(n=e.issuerCertificate.subjectPublicKeyInfo,!this.issuer.isEqual(e.issuerCertificate.subject)))return!1;if(e.publicKeyInfo&&(n=e.publicKeyInfo),!n)throw new Error("Issuer's certificate must be provided as an input parameter");if(this.crlExtensions){for(let s of this.crlExtensions.extensions)if(s.critical&&!Yle.includes(s.extnID))return!1}return t.verifyWithPublicKey(this.tbsView,this.signatureValue,n,this.signatureAlgorithm)}};Jy.CLASS_NAME="CertificateRevocationList";var Dd="crlId",Rd="crlValue",cv="parsedValue",Qle=[Dd,Rd],w9=class ty extends _e{static{o(this,"CRLBag")}constructor(e={}){super(),this.crlId=B(e,Dd,ty.defaultValues(Dd)),this.crlValue=B(e,Rd,ty.defaultValues(Rd)),cv in e&&(this.parsedValue=B(e,cv,ty.defaultValues(cv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Dd:return L;case Rd:return new wt;case cv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Dd:return t===L;case Rd:return t instanceof wt;case cv:return t instanceof Object&&Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new nt({name:t.id||"id"}),new oe({idBlock:{tagClass:3,tagNumber:0},value:[new wt({name:t.value||"value"})]})]})}fromSchema(e){De(e,Qle);let t=Ie(e,e,ty.schema({names:{id:Dd,value:Rd}}));switch(be.assertSchema(t,this.className),this.crlId=t.result.crlId.valueBlock.toString(),this.crlValue=t.result.crlValue,this.crlId){case wF:this.parsedValue=Jy.fromBER(this.certValue.valueBlock.valueHex);break;default:throw new Error(`Incorrect CRL_ID value in CRLBag: ${this.crlId}`)}}toSchema(){return this.parsedValue&&(this.crlId=wF,this.crlValue=new Ve({valueHex:this.parsedValue.toSchema().toBER(!1)})),new W({value:[new nt({value:this.crlId}),new oe({idBlock:{tagClass:3,tagNumber:0},value:[this.crlValue.toSchema()]})]})}toJSON(){return{crlId:this.crlId,crlValue:this.crlValue.toJSON()}}};w9.CLASS_NAME="CRLBag";var Pd="version",Od="encryptedContentInfo",Fc="unprotectedAttrs",Zle=[Pd,Od,Fc],Yy=class ry extends _e{static{o(this,"EncryptedData")}constructor(e={}){super(),this.version=B(e,Pd,ry.defaultValues(Pd)),this.encryptedContentInfo=B(e,Od,ry.defaultValues(Od)),Fc in e&&(this.unprotectedAttrs=B(e,Fc,ry.defaultValues(Fc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Pd:return 0;case Od:return new us;case Fc:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Pd:return t===0;case Od:return us.compareWithDefault("contentType",t.contentType)&&us.compareWithDefault("contentEncryptionAlgorithm",t.contentEncryptionAlgorithm)&&us.compareWithDefault("encryptedContent",t.encryptedContent);case Fc:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),us.schema(t.encryptedContentInfo||{}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Tt({name:t.unprotectedAttrs||L,value:nn.schema()})]})]})}fromSchema(e){De(e,Zle);let t=Ie(e,e,ry.schema({names:{version:Pd,encryptedContentInfo:{names:{blockName:Od}},unprotectedAttrs:Fc}}));be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.encryptedContentInfo=new us({schema:t.result.encryptedContentInfo}),Fc in t.result&&(this.unprotectedAttrs=Array.from(t.result.unprotectedAttrs,n=>new nn({schema:n})))}toSchema(){let e=[];return e.push(new ge({value:this.version})),e.push(this.encryptedContentInfo.toSchema()),this.unprotectedAttrs&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.unprotectedAttrs,t=>t.toSchema())})),new W({value:e})}toJSON(){let e={version:this.version,encryptedContentInfo:this.encryptedContentInfo.toJSON()};return this.unprotectedAttrs&&(e.unprotectedAttrs=Array.from(this.unprotectedAttrs,t=>t.toJSON())),e}async encrypt(e,t=Dt(!0)){Ar.assert(e,"parameters","object");let n={...e,contentType:"1.2.840.113549.1.7.1"};this.encryptedContentInfo=await t.encryptEncryptedContentInfo(n)}async decrypt(e,t=Dt(!0)){Ar.assert(e,"parameters","object");let n={...e,encryptedContentInfo:this.encryptedContentInfo};return t.decryptEncryptedContentInfo(n)}};Yy.CLASS_NAME="EncryptedData";var Mf="encryptionAlgorithm",qc="encryptedData",lv="parsedValue",efe=[Mf,qc],S9=class kd extends _e{static{o(this,"PKCS8ShroudedKeyBag")}constructor(e={}){super(),this.encryptionAlgorithm=B(e,Mf,kd.defaultValues(Mf)),this.encryptedData=B(e,qc,kd.defaultValues(qc)),lv in e&&(this.parsedValue=B(e,lv,kd.defaultValues(lv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Mf:return new ve;case qc:return new Ve;case lv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Mf:return ve.compareWithDefault("algorithmId",t.algorithmId)&&!("algorithmParams"in t);case qc:return t.isEqual(kd.defaultValues(e));case lv:return t instanceof Object&&Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[ve.schema(t.encryptionAlgorithm||{names:{blockName:Mf}}),new Lr({value:[new Ve({name:t.encryptedData||qc}),new Ve({idBlock:{isConstructed:!0},name:t.encryptedData||qc})]})]})}fromSchema(e){De(e,efe);let t=Ie(e,e,kd.schema({names:{encryptionAlgorithm:{names:{blockName:Mf}},encryptedData:qc}}));be.assertSchema(t,this.className),this.encryptionAlgorithm=new ve({schema:t.result.encryptionAlgorithm}),this.encryptedData=t.result.encryptedData}toSchema(){return new W({value:[this.encryptionAlgorithm.toSchema(),this.encryptedData]})}toJSON(){return{encryptionAlgorithm:this.encryptionAlgorithm.toJSON(),encryptedData:this.encryptedData.toJSON()}}async parseInternalValues(e,t=Dt(!0)){let s=await new Yy({encryptedContentInfo:new us({contentEncryptionAlgorithm:this.encryptionAlgorithm,encryptedContent:this.encryptedData})}).decrypt(e,t);this.parsedValue=Wy.fromBER(s)}async makeInternalValues(e,t=Dt(!0)){if(!this.parsedValue)throw new Error('Please initialize "parsedValue" first');let n=new Yy,s={...e,contentToEncrypt:this.parsedValue.toSchema().toBER(!1)};if(await n.encrypt(s,t),!n.encryptedContentInfo.encryptedContent)throw new Error("The filed `encryptedContent` in EncryptedContentInfo is empty");this.encryptionAlgorithm=n.encryptedContentInfo.contentEncryptionAlgorithm,this.encryptedData=n.encryptedContentInfo.encryptedContent}};S9.CLASS_NAME="PKCS8ShroudedKeyBag";var Ld="secretTypeId",Vd="secretValue",tfe=[Ld,Vd],b9=class UE extends _e{static{o(this,"SecretBag")}constructor(e={}){super(),this.secretTypeId=B(e,Ld,UE.defaultValues(Ld)),this.secretValue=B(e,Vd,UE.defaultValues(Vd)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Ld:return L;case Vd:return new wt;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Ld:return t===L;case Vd:return t instanceof wt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new nt({name:t.id||"id"}),new oe({idBlock:{tagClass:3,tagNumber:0},value:[new wt({name:t.value||"value"})]})]})}fromSchema(e){De(e,tfe);let t=Ie(e,e,UE.schema({names:{id:Ld,value:Vd}}));be.assertSchema(t,this.className),this.secretTypeId=t.result.secretTypeId.valueBlock.toString(),this.secretValue=t.result.secretValue}toSchema(){return new W({value:[new nt({value:this.secretTypeId}),new oe({idBlock:{tagClass:3,tagNumber:0},value:[this.secretValue.toSchema()]})]})}toJSON(){return{secretTypeId:this.secretTypeId,secretValue:this.secretValue.toJSON()}}};b9.CLASS_NAME="SecretBag";var rfe=class Ff{static{o(this,"SafeBagValueFactory")}static getItems(){return this.items||(this.items={},Ff.register("1.2.840.113549.1.12.10.1.1",Wy),Ff.register("1.2.840.113549.1.12.10.1.2",S9),Ff.register("1.2.840.113549.1.12.10.1.3",y9),Ff.register("1.2.840.113549.1.12.10.1.4",w9),Ff.register("1.2.840.113549.1.12.10.1.5",b9),Ff.register("1.2.840.113549.1.12.10.1.6",Km)),this.items}static register(e,t){this.getItems()[e]=t}static find(e){return this.getItems()[e]||null}},qf="bagId",Hf="bagValue",Jo="bagAttributes",nfe=[qf,Hf,Jo],LB=class ny extends _e{static{o(this,"SafeBag")}constructor(e={}){super(),this.bagId=B(e,qf,ny.defaultValues(qf)),this.bagValue=B(e,Hf,ny.defaultValues(Hf)),Jo in e&&(this.bagAttributes=B(e,Jo,ny.defaultValues(Jo))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case qf:return L;case Hf:return new wt;case Jo:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case qf:return t===L;case Hf:return t instanceof wt;case Jo:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new nt({name:t.bagId||qf}),new oe({idBlock:{tagClass:3,tagNumber:0},value:[new wt({name:t.bagValue||Hf})]}),new Wr({optional:!0,value:[new Tt({name:t.bagAttributes||Jo,value:nn.schema()})]})]})}fromSchema(e){De(e,nfe);let t=Ie(e,e,ny.schema({names:{bagId:qf,bagValue:Hf,bagAttributes:Jo}}));be.assertSchema(t,this.className),this.bagId=t.result.bagId.valueBlock.toString();let n=rfe.find(this.bagId);if(!n)throw new Error(`Invalid BAG_ID for SafeBag: ${this.bagId}`);this.bagValue=new n({schema:t.result.bagValue}),Jo in t.result&&(this.bagAttributes=Array.from(t.result.bagAttributes,s=>new nn({schema:s})))}toSchema(){let e=[new nt({value:this.bagId}),new oe({idBlock:{tagClass:3,tagNumber:0},value:[this.bagValue.toSchema()]})];return this.bagAttributes&&e.push(new Wr({value:Array.from(this.bagAttributes,t=>t.toSchema())})),new W({value:e})}toJSON(){let e={bagId:this.bagId,bagValue:this.bagValue.toJSON()};return this.bagAttributes&&(e.bagAttributes=Array.from(this.bagAttributes,t=>t.toJSON())),e}};LB.CLASS_NAME="SafeBag";var ad="safeBags",Km=class VB extends _e{static{o(this,"SafeContents")}constructor(e={}){super(),this.safeBags=B(e,ad,VB.defaultValues(ad)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ad:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case ad:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.safeBags||L,value:LB.schema()})]})}fromSchema(e){De(e,[ad]);let t=Ie(e,e,VB.schema({names:{safeBags:ad}}));be.assertSchema(t,this.className),this.safeBags=Array.from(t.result.safeBags,n=>new LB({schema:n}))}toSchema(){return new W({value:Array.from(this.safeBags,e=>e.toSchema())})}toJSON(){return{safeBags:Array.from(this.safeBags,e=>e.toJSON())}}};Km.CLASS_NAME="SafeContents";var sy="otherCertFormat",iy="otherCert",sfe=[sy,iy],jE=class ME extends _e{static{o(this,"OtherCertificateFormat")}constructor(e={}){super(),this.otherCertFormat=B(e,sy,ME.defaultValues(sy)),this.otherCert=B(e,iy,ME.defaultValues(iy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case sy:return L;case iy:return new wt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new nt({name:t.otherCertFormat||sy}),new wt({name:t.otherCert||iy})]})}fromSchema(e){De(e,sfe);let t=Ie(e,e,ME.schema());be.assertSchema(t,this.className),this.otherCertFormat=t.result.otherCertFormat.valueBlock.toString(),this.otherCert=t.result.otherCert}toSchema(){return new W({value:[new nt({value:this.otherCertFormat}),this.otherCert]})}toJSON(){let e={otherCertFormat:this.otherCertFormat};return this.otherCert instanceof wt||(e.otherCert=this.otherCert.toJSON()),e}},ay="certificates",ife=[ay],Ch=class UB extends _e{static{o(this,"CertificateSet")}constructor(e={}){super(),this.certificates=B(e,ay,UB.defaultValues(ay)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ay:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new Wr({name:t.blockName||L,value:[new Tt({name:t.certificates||ay,value:new Lr({value:[cs.schema(),new oe({idBlock:{tagClass:3,tagNumber:0},value:[new wt]}),new oe({idBlock:{tagClass:3,tagNumber:1},value:[new W]}),new oe({idBlock:{tagClass:3,tagNumber:2},value:pl.schema().valueBlock.value}),new oe({idBlock:{tagClass:3,tagNumber:3},value:jE.schema().valueBlock.value})]})})]})}fromSchema(e){De(e,ife);let t=Ie(e,e,UB.schema());be.assertSchema(t,this.className),this.certificates=Array.from(t.result.certificates||[],n=>{let s=n.idBlock.tagNumber;if(n.idBlock.tagClass===1)return new cs({schema:n});let i=new W({value:n.valueBlock.value});switch(s){case 1:return i.valueBlock.value[0].valueBlock.value[0].valueBlock.valueDec===1?new pl({schema:i}):new EA({schema:i});case 2:return new pl({schema:i});case 3:return new jE({schema:i})}return n})}toSchema(){return new Wr({value:Array.from(this.certificates,e=>{switch(!0){case e instanceof cs:return e.toSchema();case e instanceof EA:return new oe({idBlock:{tagClass:3,tagNumber:1},value:e.toSchema().valueBlock.value});case e instanceof pl:return new oe({idBlock:{tagClass:3,tagNumber:2},value:e.toSchema().valueBlock.value});case e instanceof jE:return new oe({idBlock:{tagClass:3,tagNumber:3},value:e.toSchema().valueBlock.value})}return e.toSchema()})})}toJSON(){return{certificates:Array.from(this.certificates,e=>e.toJSON())}}};Ch.CLASS_NAME="CertificateSet";var oy="otherRevInfoFormat",uy="otherRevInfo",afe=[oy,uy],qy=class FE extends _e{static{o(this,"OtherRevocationInfoFormat")}constructor(e={}){super(),this.otherRevInfoFormat=B(e,oy,FE.defaultValues(oy)),this.otherRevInfo=B(e,uy,FE.defaultValues(uy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case oy:return L;case uy:return new wt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new nt({name:t.otherRevInfoFormat||oy}),new wt({name:t.otherRevInfo||uy})]})}fromSchema(e){De(e,afe);let t=Ie(e,e,FE.schema());be.assertSchema(t,this.className),this.otherRevInfoFormat=t.result.otherRevInfoFormat.valueBlock.toString(),this.otherRevInfo=t.result.otherRevInfo}toSchema(){return new W({value:[new nt({value:this.otherRevInfoFormat}),this.otherRevInfo]})}toJSON(){let e={otherRevInfoFormat:this.otherRevInfoFormat};return this.otherRevInfo instanceof wt||(e.otherRevInfo=this.otherRevInfo.toJSON()),e}};qy.CLASS_NAME="OtherRevocationInfoFormat";var cy="crls",X_="otherRevocationInfos",ofe=[cy],Hy=class qE extends _e{static{o(this,"RevocationInfoChoices")}constructor(e={}){super(),this.crls=B(e,cy,qE.defaultValues(cy)),this.otherRevocationInfos=B(e,X_,qE.defaultValues(X_)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case cy:return[];case X_:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new Wr({name:t.blockName||L,value:[new Tt({name:t.crls||L,value:new Lr({value:[Jy.schema(),new oe({idBlock:{tagClass:3,tagNumber:1},value:[new nt,new wt]})]})})]})}fromSchema(e){De(e,ofe);let t=Ie(e,e,qE.schema({names:{crls:cy}}));if(be.assertSchema(t,this.className),t.result.crls)for(let n of t.result.crls)n.idBlock.tagClass===1?this.crls.push(new Jy({schema:n})):this.otherRevocationInfos.push(new qy({schema:n}))}toSchema(){let e=[];return e.push(...Array.from(this.crls,t=>t.toSchema())),e.push(...Array.from(this.otherRevocationInfos,t=>{let n=t.toSchema();return n.idBlock.tagClass=3,n.idBlock.tagNumber=1,n})),new Wr({value:e})}toJSON(){return{crls:Array.from(this.crls,e=>e.toJSON()),otherRevocationInfos:Array.from(this.otherRevocationInfos,e=>e.toJSON())}}};Hy.CLASS_NAME="RevocationInfoChoices";var ly="certs",Kf="crls",ufe=[ly,Kf],HE=class jB extends _e{static{o(this,"OriginatorInfo")}constructor(e={}){super(),this.crls=B(e,Kf,jB.defaultValues(Kf)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ly:return new Ch;case Kf:return new Hy;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case ly:return t.certificates.length===0;case Kf:return t.crls.length===0&&t.otherRevocationInfos.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new oe({name:t.certs||L,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:Ch.schema().valueBlock.value}),new oe({name:t.crls||L,optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Hy.schema().valueBlock.value})]})}fromSchema(e){De(e,ufe);let t=Ie(e,e,jB.schema({names:{certs:ly,crls:Kf}}));be.assertSchema(t,this.className),ly in t.result&&(this.certs=new Ch({schema:new Wr({value:t.result.certs.valueBlock.value})})),Kf in t.result&&(this.crls=new Hy({schema:new Wr({value:t.result.crls.valueBlock.value})}))}toSchema(){let e=[];return this.certs&&e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:this.certs.toSchema().valueBlock.value})),this.crls&&e.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:this.crls.toSchema().valueBlock.value})),new W({value:e})}toJSON(){let e={};return this.certs&&(e.certs=this.certs.toJSON()),this.crls&&(e.crls=this.crls.toJSON()),e}};HE.CLASS_NAME="OriginatorInfo";var fy="issuer",hy="serialNumber",cfe=[fy,hy],zn=class KE extends _e{static{o(this,"IssuerAndSerialNumber")}constructor(e={}){super(),this.issuer=B(e,fy,KE.defaultValues(fy)),this.serialNumber=B(e,hy,KE.defaultValues(hy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case fy:return new Vr;case hy:return new ge;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[Vr.schema(t.issuer||{}),new ge({name:t.serialNumber||L})]})}fromSchema(e){De(e,cfe);let t=Ie(e,e,KE.schema({names:{issuer:{names:{blockName:fy}},serialNumber:hy}}));be.assertSchema(t,this.className),this.issuer=new Vr({schema:t.result.issuer}),this.serialNumber=t.result.serialNumber}toSchema(){return new W({value:[this.issuer.toSchema(),this.serialNumber]})}toJSON(){return{issuer:this.issuer.toJSON(),serialNumber:this.serialNumber.toJSON()}}};zn.CLASS_NAME="IssuerAndSerialNumber";var Xb="variant",fv="value",lfe=["blockName"],E9=class $E extends _e{static{o(this,"RecipientIdentifier")}constructor(e={}){super(),this.variant=B(e,Xb,$E.defaultValues(Xb)),fv in e&&(this.value=B(e,fv,$E.defaultValues(fv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Xb:return-1;case fv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Xb:return t===-1;case fv:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new Lr({value:[zn.schema({names:{blockName:t.blockName||L}}),new vt({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:0}})]})}fromSchema(e){De(e,lfe);let t=Ie(e,e,$E.schema({names:{blockName:"blockName"}}));be.assertSchema(t,this.className),t.result.blockName.idBlock.tagClass===1?(this.variant=1,this.value=new zn({schema:t.result.blockName})):(this.variant=2,this.value=new Ve({valueHex:t.result.blockName.valueBlock.valueHex}))}toSchema(){switch(this.variant){case 1:if(!(this.value instanceof zn))throw new Error("Incorrect type of RecipientIdentifier.value. It should be IssuerAndSerialNumber.");return this.value.toSchema();case 2:if(!(this.value instanceof Ve))throw new Error("Incorrect type of RecipientIdentifier.value. It should be ASN.1 OctetString.");return new vt({idBlock:{tagClass:3,tagNumber:0},valueHex:this.value.valueBlock.valueHexView});default:return new wt}}toJSON(){let e={variant:this.variant};return(this.variant===1||this.variant===2)&&this.value&&(e.value=this.value.toJSON()),e}};E9.CLASS_NAME="RecipientIdentifier";var $f="version",Ud="rid",jd="keyEncryptionAlgorithm",Md="encryptedKey",Wb="recipientCertificate",ffe=[$f,Ud,jd,Md],PA=class Yo extends _e{static{o(this,"KeyTransRecipientInfo")}constructor(e={}){super(),this.version=B(e,$f,Yo.defaultValues($f)),this.rid=B(e,Ud,Yo.defaultValues(Ud)),this.keyEncryptionAlgorithm=B(e,jd,Yo.defaultValues(jd)),this.encryptedKey=B(e,Md,Yo.defaultValues(Md)),this.recipientCertificate=B(e,Wb,Yo.defaultValues(Wb)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case $f:return-1;case Ud:return{};case jd:return new ve;case Md:return new Ve;case Wb:return new cs;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case $f:return t===Yo.defaultValues($f);case Ud:return Object.keys(t).length===0;case jd:case Md:return t.isEqual(Yo.defaultValues(e));case Wb:return!1;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),E9.schema(t.rid||{}),ve.schema(t.keyEncryptionAlgorithm||{}),new Ve({name:t.encryptedKey||L})]})}fromSchema(e){De(e,ffe);let t=Ie(e,e,Yo.schema({names:{version:$f,rid:{names:{blockName:Ud}},keyEncryptionAlgorithm:{names:{blockName:jd}},encryptedKey:Md}}));be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,t.result.rid.idBlock.tagClass===3?this.rid=new Ve({valueHex:t.result.rid.valueBlock.valueHex}):this.rid=new zn({schema:t.result.rid}),this.keyEncryptionAlgorithm=new ve({schema:t.result.keyEncryptionAlgorithm}),this.encryptedKey=t.result.encryptedKey}toSchema(){let e=[];return this.rid instanceof zn?(this.version=0,e.push(new ge({value:this.version})),e.push(this.rid.toSchema())):(this.version=2,e.push(new ge({value:this.version})),e.push(new vt({idBlock:{tagClass:3,tagNumber:0},valueHex:this.rid.valueBlock.valueHexView}))),e.push(this.keyEncryptionAlgorithm.toSchema()),e.push(this.encryptedKey),new W({value:e})}toJSON(){return{version:this.version,rid:this.rid.toJSON(),keyEncryptionAlgorithm:this.keyEncryptionAlgorithm.toJSON(),encryptedKey:this.encryptedKey.toJSON()}}};PA.CLASS_NAME="KeyTransRecipientInfo";var Fd="algorithm",qd="publicKey",hfe=[Fd,qd],OA=class py extends _e{static{o(this,"OriginatorPublicKey")}constructor(e={}){super(),this.algorithm=B(e,Fd,py.defaultValues(Fd)),this.publicKey=B(e,qd,py.defaultValues(qd)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Fd:return new ve;case qd:return new qt;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Fd:case qd:return t.isEqual(py.defaultValues(e));default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[ve.schema(t.algorithm||{}),new qt({name:t.publicKey||L})]})}fromSchema(e){De(e,hfe);let t=Ie(e,e,py.schema({names:{algorithm:{names:{blockName:Fd}},publicKey:qd}}));be.assertSchema(t,this.className),this.algorithm=new ve({schema:t.result.algorithm}),this.publicKey=t.result.publicKey}toSchema(){return new W({value:[this.algorithm.toSchema(),this.publicKey]})}toJSON(){return{algorithm:this.algorithm.toJSON(),publicKey:this.publicKey.toJSON()}}};OA.CLASS_NAME="OriginatorPublicKey";var zb="variant",hv="value",pfe=["blockName"],Ky=class GE extends _e{static{o(this,"OriginatorIdentifierOrKey")}constructor(e={}){super(),this.variant=B(e,zb,GE.defaultValues(zb)),hv in e&&(this.value=B(e,hv,GE.defaultValues(hv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case zb:return-1;case hv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case zb:return t===-1;case hv:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new Lr({value:[zn.schema({names:{blockName:t.blockName||L}}),new vt({idBlock:{tagClass:3,tagNumber:0},name:t.blockName||L}),new oe({idBlock:{tagClass:3,tagNumber:1},name:t.blockName||L,value:OA.schema().valueBlock.value})]})}fromSchema(e){De(e,pfe);let t=Ie(e,e,GE.schema({names:{blockName:"blockName"}}));be.assertSchema(t,this.className),t.result.blockName.idBlock.tagClass===1?(this.variant=1,this.value=new zn({schema:t.result.blockName})):t.result.blockName.idBlock.tagNumber===0?(t.result.blockName.idBlock.tagClass=1,t.result.blockName.idBlock.tagNumber=4,this.variant=2,this.value=t.result.blockName):(this.variant=3,this.value=new OA({schema:new W({value:t.result.blockName.valueBlock.value})}))}toSchema(){switch(this.variant){case 1:return this.value.toSchema();case 2:return this.value.idBlock.tagClass=3,this.value.idBlock.tagNumber=0,this.value;case 3:{let e=this.value.toSchema();return e.idBlock.tagClass=3,e.idBlock.tagNumber=1,e}default:return new wt}}toJSON(){let e={variant:this.variant};return(this.variant===1||this.variant===2||this.variant===3)&&(e.value=this.value.toJSON()),e}};Ky.CLASS_NAME="OriginatorIdentifierOrKey";var Hd="keyAttrId",to="keyAttr",dfe=[Hd,to],Nh=class XE extends _e{static{o(this,"OtherKeyAttribute")}constructor(e={}){super(),this.keyAttrId=B(e,Hd,XE.defaultValues(Hd)),to in e&&(this.keyAttr=B(e,to,XE.defaultValues(to))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Hd:return L;case to:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Hd:return typeof t=="string"&&t===L;case to:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({optional:t.optional||!0,name:t.blockName||L,value:[new nt({name:t.keyAttrId||L}),new wt({optional:!0,name:t.keyAttr||L})]})}fromSchema(e){De(e,dfe);let t=Ie(e,e,XE.schema({names:{keyAttrId:Hd,keyAttr:to}}));be.assertSchema(t,this.className),this.keyAttrId=t.result.keyAttrId.valueBlock.toString(),to in t.result&&(this.keyAttr=t.result.keyAttr)}toSchema(){let e=[];return e.push(new nt({value:this.keyAttrId})),to in this&&e.push(this.keyAttr),new W({value:e})}toJSON(){let e={keyAttrId:this.keyAttrId};return to in this&&(e.keyAttr=this.keyAttr.toJSON()),e}};Nh.CLASS_NAME="OtherKeyAttribute";var Gf="subjectKeyIdentifier",Hc="date",Kc="other",mfe=[Gf,Hc,Kc],kA=class Kd extends _e{static{o(this,"RecipientKeyIdentifier")}constructor(e={}){super(),this.subjectKeyIdentifier=B(e,Gf,Kd.defaultValues(Gf)),Hc in e&&(this.date=B(e,Hc,Kd.defaultValues(Hc))),Kc in e&&(this.other=B(e,Kc,Kd.defaultValues(Kc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Gf:return new Ve;case Hc:return new kr;case Kc:return new Nh;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Gf:return t.isEqual(Kd.defaultValues(Gf));case Hc:return t.year===0&&t.month===0&&t.day===0&&t.hour===0&&t.minute===0&&t.second===0&&t.millisecond===0;case Kc:return t.keyAttrId===L&&!("keyAttr"in t);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Ve({name:t.subjectKeyIdentifier||L}),new kr({optional:!0,name:t.date||L}),Nh.schema(t.other||{})]})}fromSchema(e){De(e,mfe);let t=Ie(e,e,Kd.schema({names:{subjectKeyIdentifier:Gf,date:Hc,other:{names:{blockName:Kc}}}}));be.assertSchema(t,this.className),this.subjectKeyIdentifier=t.result.subjectKeyIdentifier,Hc in t.result&&(this.date=t.result.date),Kc in t.result&&(this.other=new Nh({schema:t.result.other}))}toSchema(){let e=[];return e.push(this.subjectKeyIdentifier),this.date&&e.push(this.date),this.other&&e.push(this.other.toSchema()),new W({value:e})}toJSON(){let e={subjectKeyIdentifier:this.subjectKeyIdentifier.toJSON()};return this.date&&(e.date=this.date.toJSON()),this.other&&(e.other=this.other.toJSON()),e}};kA.CLASS_NAME="RecipientKeyIdentifier";var Jb="variant",Yb="value",gfe=["blockName"],Gm=class WE extends _e{static{o(this,"KeyAgreeRecipientIdentifier")}constructor(e={}){super(),this.variant=B(e,Jb,WE.defaultValues(Jb)),this.value=B(e,Yb,WE.defaultValues(Yb)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Jb:return-1;case Yb:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Jb:return t===-1;case Yb:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new Lr({value:[zn.schema(t.issuerAndSerialNumber||{names:{blockName:t.blockName||L}}),new oe({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:0},value:kA.schema(t.rKeyId||{names:{blockName:t.blockName||L}}).valueBlock.value})]})}fromSchema(e){De(e,gfe);let t=Ie(e,e,WE.schema({names:{blockName:"blockName"}}));be.assertSchema(t,this.className),t.result.blockName.idBlock.tagClass===1?(this.variant=1,this.value=new zn({schema:t.result.blockName})):(this.variant=2,this.value=new kA({schema:new W({value:t.result.blockName.valueBlock.value})}))}toSchema(){switch(this.variant){case 1:return this.value.toSchema();case 2:return new oe({idBlock:{tagClass:3,tagNumber:0},value:this.value.toSchema().valueBlock.value});default:return new wt}}toJSON(){let e={variant:this.variant};return(this.variant===1||this.variant===2)&&(e.value=this.value.toJSON()),e}};Gm.CLASS_NAME="KeyAgreeRecipientIdentifier";var $d="rid",Xf="encryptedKey",vfe=[$d,Xf],LA=class dy extends _e{static{o(this,"RecipientEncryptedKey")}constructor(e={}){super(),this.rid=B(e,$d,dy.defaultValues($d)),this.encryptedKey=B(e,Xf,dy.defaultValues(Xf)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case $d:return new Gm;case Xf:return new Ve;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case $d:return t.variant===-1&&!("value"in t);case Xf:return t.isEqual(dy.defaultValues(Xf));default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[Gm.schema(t.rid||{}),new Ve({name:t.encryptedKey||L})]})}fromSchema(e){De(e,vfe);let t=Ie(e,e,dy.schema({names:{rid:{names:{blockName:$d}},encryptedKey:Xf}}));be.assertSchema(t,this.className),this.rid=new Gm({schema:t.result.rid}),this.encryptedKey=t.result.encryptedKey}toSchema(){return new W({value:[this.rid.toSchema(),this.encryptedKey]})}toJSON(){return{rid:this.rid.toJSON(),encryptedKey:this.encryptedKey.toJSON()}}};LA.CLASS_NAME="RecipientEncryptedKey";var Qb="encryptedKeys",A9="RecipientEncryptedKeys",yfe=[A9],$y=class MB extends _e{static{o(this,"RecipientEncryptedKeys")}constructor(e={}){super(),this.encryptedKeys=B(e,Qb,MB.defaultValues(Qb)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Qb:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Qb:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.RecipientEncryptedKeys||L,value:LA.schema()})]})}fromSchema(e){De(e,yfe);let t=Ie(e,e,MB.schema({names:{RecipientEncryptedKeys:A9}}));be.assertSchema(t,this.className),this.encryptedKeys=Array.from(t.result.RecipientEncryptedKeys,n=>new LA({schema:n}))}toSchema(){return new W({value:Array.from(this.encryptedKeys,e=>e.toSchema())})}toJSON(){return{encryptedKeys:Array.from(this.encryptedKeys,e=>e.toJSON())}}};$y.CLASS_NAME="RecipientEncryptedKeys";var Gd="version",Xd="originator",Qo="ukm",Wd="keyEncryptionAlgorithm",zd="recipientEncryptedKeys",Zb="recipientCertificate",eE="recipientPublicKey",xfe=[Gd,Xd,Qo,Wd,zd],VA=class ro extends _e{static{o(this,"KeyAgreeRecipientInfo")}constructor(e={}){super(),this.version=B(e,Gd,ro.defaultValues(Gd)),this.originator=B(e,Xd,ro.defaultValues(Xd)),Qo in e&&(this.ukm=B(e,Qo,ro.defaultValues(Qo))),this.keyEncryptionAlgorithm=B(e,Wd,ro.defaultValues(Wd)),this.recipientEncryptedKeys=B(e,zd,ro.defaultValues(zd)),this.recipientCertificate=B(e,Zb,ro.defaultValues(Zb)),this.recipientPublicKey=B(e,eE,ro.defaultValues(eE)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Gd:return 0;case Xd:return new Ky;case Qo:return new Ve;case Wd:return new ve;case zd:return new $y;case Zb:return new cs;case eE:return null;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Gd:return t===0;case Xd:return t.variant===-1&&!("value"in t);case Qo:return t.isEqual(ro.defaultValues(Qo));case Wd:return t.algorithmId===L&&!("algorithmParams"in t);case zd:return t.encryptedKeys.length===0;case Zb:return!1;case eE:return!1;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),new oe({idBlock:{tagClass:3,tagNumber:0},value:[Ky.schema(t.originator||{})]}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Ve({name:t.ukm||L})]}),ve.schema(t.keyEncryptionAlgorithm||{}),$y.schema(t.recipientEncryptedKeys||{})]})}fromSchema(e){De(e,xfe);let t=Ie(e,e,ro.schema({names:{version:Gd,originator:{names:{blockName:Xd}},ukm:Qo,keyEncryptionAlgorithm:{names:{blockName:Wd}},recipientEncryptedKeys:{names:{blockName:zd}}}}));be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.originator=new Ky({schema:t.result.originator}),Qo in t.result&&(this.ukm=t.result.ukm),this.keyEncryptionAlgorithm=new ve({schema:t.result.keyEncryptionAlgorithm}),this.recipientEncryptedKeys=new $y({schema:t.result.recipientEncryptedKeys})}toSchema(){let e=[];return e.push(new ge({value:this.version})),e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[this.originator.toSchema()]})),this.ukm&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[this.ukm]})),e.push(this.keyEncryptionAlgorithm.toSchema()),e.push(this.recipientEncryptedKeys.toSchema()),new W({value:e})}toJSON(){let e={version:this.version,originator:this.originator.toJSON(),keyEncryptionAlgorithm:this.keyEncryptionAlgorithm.toJSON(),recipientEncryptedKeys:this.recipientEncryptedKeys.toJSON()};return this.ukm&&(e.ukm=this.ukm.toJSON()),e}};VA.CLASS_NAME="KeyAgreeRecipientInfo";var Wf="keyIdentifier",$c="date",Gc="other",wfe=[Wf,$c,Gc],Gy=class Jd extends _e{static{o(this,"KEKIdentifier")}constructor(e={}){super(),this.keyIdentifier=B(e,Wf,Jd.defaultValues(Wf)),$c in e&&(this.date=B(e,$c,Jd.defaultValues($c))),Gc in e&&(this.other=B(e,Gc,Jd.defaultValues(Gc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Wf:return new Ve;case $c:return new kr;case Gc:return new Nh;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Wf:return t.isEqual(Jd.defaultValues(Wf));case $c:return t.year===0&&t.month===0&&t.day===0&&t.hour===0&&t.minute===0&&t.second===0&&t.millisecond===0;case Gc:return t.compareWithDefault("keyAttrId",t.keyAttrId)&&!("keyAttr"in t);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Ve({name:t.keyIdentifier||L}),new kr({optional:!0,name:t.date||L}),Nh.schema(t.other||{})]})}fromSchema(e){De(e,wfe);let t=Ie(e,e,Jd.schema({names:{keyIdentifier:Wf,date:$c,other:{names:{blockName:Gc}}}}));be.assertSchema(t,this.className),this.keyIdentifier=t.result.keyIdentifier,$c in t.result&&(this.date=t.result.date),Gc in t.result&&(this.other=new Nh({schema:t.result.other}))}toSchema(){let e=[];return e.push(this.keyIdentifier),this.date&&e.push(this.date),this.other&&e.push(this.other.toSchema()),new W({value:e})}toJSON(){let e={keyIdentifier:this.keyIdentifier.toJSON()};return this.date&&(e.date=this.date),this.other&&(e.other=this.other.toJSON()),e}};Gy.CLASS_NAME="KEKIdentifier";var Yd="version",Qd="kekid",Zd="keyEncryptionAlgorithm",zf="encryptedKey",tE="preDefinedKEK",Sfe=[Yd,Qd,Zd,zf],UA=class Zo extends _e{static{o(this,"KEKRecipientInfo")}constructor(e={}){super(),this.version=B(e,Yd,Zo.defaultValues(Yd)),this.kekid=B(e,Qd,Zo.defaultValues(Qd)),this.keyEncryptionAlgorithm=B(e,Zd,Zo.defaultValues(Zd)),this.encryptedKey=B(e,zf,Zo.defaultValues(zf)),this.preDefinedKEK=B(e,tE,Zo.defaultValues(tE)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Yd:return 0;case Qd:return new Gy;case Zd:return new ve;case zf:return new Ve;case tE:return rn;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case"KEKRecipientInfo":return t===Zo.defaultValues(Yd);case Qd:return t.compareWithDefault("keyIdentifier",t.keyIdentifier)&&!("date"in t)&&!("other"in t);case Zd:return t.algorithmId===L&&!("algorithmParams"in t);case zf:return t.isEqual(Zo.defaultValues(zf));case tE:return t.byteLength===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),Gy.schema(t.kekid||{}),ve.schema(t.keyEncryptionAlgorithm||{}),new Ve({name:t.encryptedKey||L})]})}fromSchema(e){De(e,Sfe);let t=Ie(e,e,Zo.schema({names:{version:Yd,kekid:{names:{blockName:Qd}},keyEncryptionAlgorithm:{names:{blockName:Zd}},encryptedKey:zf}}));be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.kekid=new Gy({schema:t.result.kekid}),this.keyEncryptionAlgorithm=new ve({schema:t.result.keyEncryptionAlgorithm}),this.encryptedKey=t.result.encryptedKey}toSchema(){return new W({value:[new ge({value:this.version}),this.kekid.toSchema(),this.keyEncryptionAlgorithm.toSchema(),this.encryptedKey]})}toJSON(){return{version:this.version,kekid:this.kekid.toJSON(),keyEncryptionAlgorithm:this.keyEncryptionAlgorithm.toJSON(),encryptedKey:this.encryptedKey.toJSON()}}};UA.CLASS_NAME="KEKRecipientInfo";var em="version",Xc="keyDerivationAlgorithm",tm="keyEncryptionAlgorithm",Jf="encryptedKey",rE="password",bfe=[em,Xc,tm,Jf],jA=class Wc extends _e{static{o(this,"PasswordRecipientinfo")}constructor(e={}){super(),this.version=B(e,em,Wc.defaultValues(em)),Xc in e&&(this.keyDerivationAlgorithm=B(e,Xc,Wc.defaultValues(Xc))),this.keyEncryptionAlgorithm=B(e,tm,Wc.defaultValues(tm)),this.encryptedKey=B(e,Jf,Wc.defaultValues(Jf)),this.password=B(e,rE,Wc.defaultValues(rE)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case em:return-1;case Xc:return new ve;case tm:return new ve;case Jf:return new Ve;case rE:return rn;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case em:return t===-1;case Xc:case tm:return t.algorithmId===L&&!("algorithmParams"in t);case Jf:return t.isEqual(Wc.defaultValues(Jf));case rE:return t.byteLength===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),new oe({name:t.keyDerivationAlgorithm||L,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:ve.schema().valueBlock.value}),ve.schema(t.keyEncryptionAlgorithm||{}),new Ve({name:t.encryptedKey||L})]})}fromSchema(e){De(e,bfe);let t=Ie(e,e,Wc.schema({names:{version:em,keyDerivationAlgorithm:Xc,keyEncryptionAlgorithm:{names:{blockName:tm}},encryptedKey:Jf}}));be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,Xc in t.result&&(this.keyDerivationAlgorithm=new ve({schema:new W({value:t.result.keyDerivationAlgorithm.valueBlock.value})})),this.keyEncryptionAlgorithm=new ve({schema:t.result.keyEncryptionAlgorithm}),this.encryptedKey=t.result.encryptedKey}toSchema(){let e=[];return e.push(new ge({value:this.version})),this.keyDerivationAlgorithm&&e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:this.keyDerivationAlgorithm.toSchema().valueBlock.value})),e.push(this.keyEncryptionAlgorithm.toSchema()),e.push(this.encryptedKey),new W({value:e})}toJSON(){let e={version:this.version,keyEncryptionAlgorithm:this.keyEncryptionAlgorithm.toJSON(),encryptedKey:this.encryptedKey.toJSON()};return this.keyDerivationAlgorithm&&(e.keyDerivationAlgorithm=this.keyDerivationAlgorithm.toJSON()),e}};jA.CLASS_NAME="PasswordRecipientInfo";var rm="oriType",Yf="oriValue",Efe=[rm,Yf],FB=class my extends _e{static{o(this,"OtherRecipientInfo")}constructor(e={}){super(),this.oriType=B(e,rm,my.defaultValues(rm)),this.oriValue=B(e,Yf,my.defaultValues(Yf)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case rm:return L;case Yf:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case rm:return t===L;case Yf:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new nt({name:t.oriType||L}),new wt({name:t.oriValue||L})]})}fromSchema(e){De(e,Efe);let t=Ie(e,e,my.schema({names:{oriType:rm,oriValue:Yf}}));be.assertSchema(t,this.className),this.oriType=t.result.oriType.valueBlock.toString(),this.oriValue=t.result.oriValue}toSchema(){return new W({value:[new nt({value:this.oriType}),this.oriValue]})}toJSON(){let e={oriType:this.oriType};return my.compareWithDefault(Yf,this.oriValue)||(e.oriValue=this.oriValue.toJSON()),e}};FB.CLASS_NAME="OtherRecipientInfo";var nE="variant",pv="value",Afe=["blockName"],Qf=class gy extends _e{static{o(this,"RecipientInfo")}constructor(e={}){super(),this.variant=B(e,nE,gy.defaultValues(nE)),pv in e&&(this.value=B(e,pv,gy.defaultValues(pv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case nE:return-1;case pv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case nE:return t===gy.defaultValues(e);case pv:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new Lr({value:[PA.schema({names:{blockName:t.blockName||L}}),new oe({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:1},value:VA.schema().valueBlock.value}),new oe({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:2},value:UA.schema().valueBlock.value}),new oe({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:3},value:jA.schema().valueBlock.value}),new oe({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:4},value:FB.schema().valueBlock.value})]})}fromSchema(e){De(e,Afe);let t=Ie(e,e,gy.schema({names:{blockName:"blockName"}}));if(be.assertSchema(t,this.className),t.result.blockName.idBlock.tagClass===1)this.variant=1,this.value=new PA({schema:t.result.blockName});else{let n=new W({value:t.result.blockName.valueBlock.value});switch(t.result.blockName.idBlock.tagNumber){case 1:this.variant=2,this.value=new VA({schema:n});break;case 2:this.variant=3,this.value=new UA({schema:n});break;case 3:this.variant=4,this.value=new jA({schema:n});break;case 4:this.variant=5,this.value=new FB({schema:n});break;default:throw new Error("Incorrect structure of RecipientInfo block")}}}toSchema(){pr.assertEmpty(this.value,"value","RecipientInfo");let e=this.value.toSchema();switch(this.variant){case 1:return e;case 2:case 3:case 4:return e.idBlock.tagClass=3,e.idBlock.tagNumber=this.variant-1,e;default:return new wt}}toJSON(){let e={variant:this.variant};return this.value&&this.variant>=1&&this.variant<=4&&(e.value=this.value.toJSON()),e}};Qf.CLASS_NAME="RecipientInfo";var zc="hashAlgorithm",Jc="maskGenAlgorithm",Yc="pSourceAlgorithm",Cfe=[zc,Jc,Yc],zE=class pa extends _e{static{o(this,"RSAESOAEPParams")}constructor(e={}){super(),this.hashAlgorithm=B(e,zc,pa.defaultValues(zc)),this.maskGenAlgorithm=B(e,Jc,pa.defaultValues(Jc)),this.pSourceAlgorithm=B(e,Yc,pa.defaultValues(Yc)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case zc:return new ve({algorithmId:"1.3.14.3.2.26",algorithmParams:new Xr});case Jc:return new ve({algorithmId:"1.2.840.113549.1.1.8",algorithmParams:new ve({algorithmId:"1.3.14.3.2.26",algorithmParams:new Xr}).toSchema()});case Yc:return new ve({algorithmId:"1.2.840.113549.1.1.9",algorithmParams:new Ve({valueHex:new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]).buffer})});default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new oe({idBlock:{tagClass:3,tagNumber:0},optional:!0,value:[ve.schema(t.hashAlgorithm||{})]}),new oe({idBlock:{tagClass:3,tagNumber:1},optional:!0,value:[ve.schema(t.maskGenAlgorithm||{})]}),new oe({idBlock:{tagClass:3,tagNumber:2},optional:!0,value:[ve.schema(t.pSourceAlgorithm||{})]})]})}fromSchema(e){De(e,Cfe);let t=Ie(e,e,pa.schema({names:{hashAlgorithm:{names:{blockName:zc}},maskGenAlgorithm:{names:{blockName:Jc}},pSourceAlgorithm:{names:{blockName:Yc}}}}));be.assertSchema(t,this.className),zc in t.result&&(this.hashAlgorithm=new ve({schema:t.result.hashAlgorithm})),Jc in t.result&&(this.maskGenAlgorithm=new ve({schema:t.result.maskGenAlgorithm})),Yc in t.result&&(this.pSourceAlgorithm=new ve({schema:t.result.pSourceAlgorithm}))}toSchema(){let e=[];return this.hashAlgorithm.isEqual(pa.defaultValues(zc))||e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[this.hashAlgorithm.toSchema()]})),this.maskGenAlgorithm.isEqual(pa.defaultValues(Jc))||e.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:[this.maskGenAlgorithm.toSchema()]})),this.pSourceAlgorithm.isEqual(pa.defaultValues(Yc))||e.push(new oe({idBlock:{tagClass:3,tagNumber:2},value:[this.pSourceAlgorithm.toSchema()]})),new W({value:e})}toJSON(){let e={};return this.hashAlgorithm.isEqual(pa.defaultValues(zc))||(e.hashAlgorithm=this.hashAlgorithm.toJSON()),this.maskGenAlgorithm.isEqual(pa.defaultValues(Jc))||(e.maskGenAlgorithm=this.maskGenAlgorithm.toJSON()),this.pSourceAlgorithm.isEqual(pa.defaultValues(Yc))||(e.pSourceAlgorithm=this.pSourceAlgorithm.toJSON()),e}};zE.CLASS_NAME="RSAESOAEPParams";var nm="keyInfo",Qc="entityUInfo",sm="suppPubInfo",Nfe=[nm,Qc,sm],qB=class im extends _e{static{o(this,"ECCCMSSharedInfo")}constructor(e={}){super(),this.keyInfo=B(e,nm,im.defaultValues(nm)),Qc in e&&(this.entityUInfo=B(e,Qc,im.defaultValues(Qc))),this.suppPubInfo=B(e,sm,im.defaultValues(sm)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case nm:return new ve;case Qc:return new Ve;case sm:return new Ve;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case nm:case Qc:case sm:return t.isEqual(im.defaultValues(e));default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[ve.schema(t.keyInfo||{}),new oe({name:t.entityUInfo||L,idBlock:{tagClass:3,tagNumber:0},optional:!0,value:[new Ve]}),new oe({name:t.suppPubInfo||L,idBlock:{tagClass:3,tagNumber:2},value:[new Ve]})]})}fromSchema(e){De(e,Nfe);let t=Ie(e,e,im.schema({names:{keyInfo:{names:{blockName:nm}},entityUInfo:Qc,suppPubInfo:sm}}));be.assertSchema(t,this.className),this.keyInfo=new ve({schema:t.result.keyInfo}),Qc in t.result&&(this.entityUInfo=t.result.entityUInfo.valueBlock.value[0]),this.suppPubInfo=t.result.suppPubInfo.valueBlock.value[0]}toSchema(){let e=[];return e.push(this.keyInfo.toSchema()),this.entityUInfo&&e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[this.entityUInfo]})),e.push(new oe({idBlock:{tagClass:3,tagNumber:2},value:[this.suppPubInfo]})),new W({value:e})}toJSON(){let e={keyInfo:this.keyInfo.toJSON(),suppPubInfo:this.suppPubInfo.toJSON()};return this.entityUInfo&&(e.entityUInfo=this.entityUInfo.toJSON()),e}};qB.CLASS_NAME="ECCCMSSharedInfo";var am="version",Zc="originatorInfo",om="recipientInfos",um="encryptedContentInfo",el="unprotectedAttrs",Tfe=[am,Zc,om,um,el],VF={kdfAlgorithm:"SHA-512",kekEncryptionLength:256},Ife={"P-256":256,"P-384":384,"P-521":528},HB=class tl extends _e{static{o(this,"EnvelopedData")}constructor(e={}){super(),this.version=B(e,am,tl.defaultValues(am)),Zc in e&&(this.originatorInfo=B(e,Zc,tl.defaultValues(Zc))),this.recipientInfos=B(e,om,tl.defaultValues(om)),this.encryptedContentInfo=B(e,um,tl.defaultValues(um)),el in e&&(this.unprotectedAttrs=B(e,el,tl.defaultValues(el))),this.policy={disableSplit:!!e.disableSplit},e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case am:return 0;case Zc:return new HE;case om:return[];case um:return new us;case el:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case am:return t===tl.defaultValues(e);case Zc:return t.certs.certificates.length===0&&t.crls.crls.length===0;case om:case el:return t.length===0;case um:return us.compareWithDefault("contentType",t.contentType)&&us.compareWithDefault("contentEncryptionAlgorithm",t.contentEncryptionAlgorithm)&&us.compareWithDefault("encryptedContent",t.encryptedContent);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),new oe({name:t.originatorInfo||L,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:HE.schema().valueBlock.value}),new Wr({value:[new Tt({name:t.recipientInfos||L,value:Qf.schema()})]}),us.schema(t.encryptedContentInfo||{}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Tt({name:t.unprotectedAttrs||L,value:nn.schema()})]})]})}fromSchema(e){De(e,Tfe);let t=Ie(e,e,tl.schema({names:{version:am,originatorInfo:Zc,recipientInfos:om,encryptedContentInfo:{names:{blockName:um}},unprotectedAttrs:el}}));be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,Zc in t.result&&(this.originatorInfo=new HE({schema:new W({value:t.result.originatorInfo.valueBlock.value})})),this.recipientInfos=Array.from(t.result.recipientInfos,n=>new Qf({schema:n})),this.encryptedContentInfo=new us({schema:t.result.encryptedContentInfo}),el in t.result&&(this.unprotectedAttrs=Array.from(t.result.unprotectedAttrs,n=>new nn({schema:n})))}toSchema(){let e=[];return e.push(new ge({value:this.version})),this.originatorInfo&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:this.originatorInfo.toSchema().valueBlock.value})),e.push(new Wr({value:Array.from(this.recipientInfos,t=>t.toSchema())})),e.push(this.encryptedContentInfo.toSchema()),this.unprotectedAttrs&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.unprotectedAttrs,t=>t.toSchema())})),new W({value:e})}toJSON(){let e={version:this.version,recipientInfos:Array.from(this.recipientInfos,t=>t.toJSON()),encryptedContentInfo:this.encryptedContentInfo.toJSON()};return this.originatorInfo&&(e.originatorInfo=this.originatorInfo.toJSON()),this.unprotectedAttrs&&(e.unprotectedAttrs=Array.from(this.unprotectedAttrs,t=>t.toJSON())),e}addRecipientByCertificate(e,t,n,s=Dt(!0)){let i=Object.assign({useOAEP:!0,oaepHashAlgorithm:"SHA-512"},VF,t||{});if(e.subjectPublicKeyInfo.algorithm.algorithmId.indexOf("1.2.840.113549")!==-1)n=1;else if(e.subjectPublicKeyInfo.algorithm.algorithmId.indexOf("1.2.840.10045")!==-1)n=2;else throw new Error(`Unknown type of certificate's public key: ${e.subjectPublicKeyInfo.algorithm.algorithmId}`);switch(n){case 1:{let a,u;if(i.useOAEP===!0){a=s.getOIDByAlgorithm({name:"RSA-OAEP"},!0,"keyEncryptionAlgorithm");let f=s.getOIDByAlgorithm({name:i.oaepHashAlgorithm},!0,"RSAES-OAEP-params"),h=new ve({algorithmId:f,algorithmParams:new Xr});u=new zE({hashAlgorithm:h,maskGenAlgorithm:new ve({algorithmId:"1.2.840.113549.1.1.8",algorithmParams:h.toSchema()})}).toSchema()}else{if(a=s.getOIDByAlgorithm({name:"RSAES-PKCS1-v1_5"}),a===L)throw new Error("Can not find OID for RSAES-PKCS1-v1_5");u=new Xr}let c=new PA({version:0,rid:new zn({issuer:e.issuer,serialNumber:e.serialNumber}),keyEncryptionAlgorithm:new ve({algorithmId:a,algorithmParams:u}),recipientCertificate:e});this.recipientInfos.push(new Qf({variant:1,value:c}))}break;case 2:{let a=new Gm({variant:1,value:new zn({issuer:e.issuer,serialNumber:e.serialNumber})});this._addKeyAgreeRecipientInfo(a,i,{recipientCertificate:e},s)}break;default:throw new Error(`Unknown "variant" value: ${n}`)}return!0}addRecipientByPreDefinedData(e,t={},n,s=Dt(!0)){if(Ar.assert(e,"preDefinedData","ArrayBuffer"),!e.byteLength)throw new Error("Pre-defined data could have zero length");if(!t.keyIdentifier){let i=new ArrayBuffer(16),a=new Uint8Array(i);s.getRandomValues(a),t.keyIdentifier=i}switch(t.hmacHashAlgorithm||(t.hmacHashAlgorithm="SHA-512"),t.iterationCount===void 0&&(t.iterationCount=2048),t.keyEncryptionAlgorithm||(t.keyEncryptionAlgorithm={name:"AES-KW",length:256}),t.keyEncryptionAlgorithmParams||(t.keyEncryptionAlgorithmParams=new Xr),n){case 1:{let i=s.getOIDByAlgorithm(t.keyEncryptionAlgorithm,!0,"keyEncryptionAlgorithm"),a=new UA({version:4,kekid:new Gy({keyIdentifier:new Ve({valueHex:t.keyIdentifier})}),keyEncryptionAlgorithm:new ve({algorithmId:i,algorithmParams:t.keyEncryptionAlgorithmParams}),preDefinedKEK:e});this.recipientInfos.push(new Qf({variant:3,value:a}))}break;case 2:{let i=s.getOIDByAlgorithm({name:"PBKDF2"},!0,"keyDerivationAlgorithm"),a=new ArrayBuffer(64),u=new Uint8Array(a);s.getRandomValues(u);let c=s.getOIDByAlgorithm({name:"HMAC",hash:{name:t.hmacHashAlgorithm}},!0,"hmacHashAlgorithm"),f=new $m({salt:new Ve({valueHex:a}),iterationCount:t.iterationCount,prf:new ve({algorithmId:c,algorithmParams:new Xr})}),h=s.getOIDByAlgorithm(t.keyEncryptionAlgorithm,!0,"keyEncryptionAlgorithm"),m=new jA({version:0,keyDerivationAlgorithm:new ve({algorithmId:i,algorithmParams:f.toSchema()}),keyEncryptionAlgorithm:new ve({algorithmId:h,algorithmParams:t.keyEncryptionAlgorithmParams}),password:e});this.recipientInfos.push(new Qf({variant:4,value:m}))}break;default:throw new Error(`Unknown value for "variant": ${n}`)}}addRecipientByKeyIdentifier(e,t,n,s=Dt(!0)){let i=Object.assign({},VF,n||{}),a=new Gm({variant:2,value:new kA({subjectKeyIdentifier:new Ve({valueHex:t})})});this._addKeyAgreeRecipientInfo(a,i,{recipientPublicKey:e},s)}_addKeyAgreeRecipientInfo(e,t,n,s=Dt(!0)){let i=new LA({rid:e}),a=s.getOIDByAlgorithm({name:"AES-KW",length:t.kekEncryptionLength},!0,"keyEncryptionAlgorithm"),u=new ve({algorithmId:a}),c=s.getOIDByAlgorithm({name:"ECDH",kdf:t.kdfAlgorithm},!0,"KeyAgreeRecipientInfo"),f=new ArrayBuffer(64),h=new Uint8Array(f);s.getRandomValues(h);let m={version:3,ukm:new Ve({valueHex:f}),keyEncryptionAlgorithm:new ve({algorithmId:c,algorithmParams:u.toSchema()}),recipientEncryptedKeys:new $y({encryptedKeys:[i]})},g=new VA(Object.assign(m,n));this.recipientInfos.push(new Qf({variant:2,value:g}))}async encrypt(e,t,n=Dt(!0)){let s=new ArrayBuffer(16),i=new Uint8Array(s);n.getRandomValues(i);let a=new Uint8Array(t),u=n.getOIDByAlgorithm(e,!0,"contentEncryptionAlgorithm"),c=await n.generateKey(e,!0,["encrypt"]),f=await n.encrypt({name:e.name,iv:i},c,a),h=await n.exportKey("raw",c);this.version=2,this.encryptedContentInfo=new us({disableSplit:this.policy.disableSplit,contentType:"1.2.840.113549.1.7.1",contentEncryptionAlgorithm:new ve({algorithmId:u,algorithmParams:new Ve({valueHex:s})}),encryptedContent:new Ve({valueHex:f})});let m=o(async S=>{let A=this.recipientInfos[S].value,T,b;if(A.recipientPublicKey)T=A.recipientPublicKey.algorithm.namedCurve,b=A.recipientPublicKey;else if(A.recipientCertificate){let Ae=A.recipientCertificate.subjectPublicKeyInfo.algorithm.algorithmParams;if(Ae.constructor.blockName()!==nt.blockName())throw new Error(`Incorrect "recipientCertificate" for index ${S}`);switch(Ae.valueBlock.toString()){case"1.2.840.10045.3.1.7":T="P-256";break;case"1.3.132.0.34":T="P-384";break;case"1.3.132.0.35":T="P-521";break;default:throw new Error(`Incorrect curve OID for index ${S}`)}b=await A.recipientCertificate.getPublicKey({algorithm:{algorithm:{name:"ECDH",namedCurve:T},usages:[]}},n)}else throw new Error("Unsupported RecipientInfo");let E=Ife[T],C=await n.generateKey({name:"ECDH",namedCurve:T},!0,["deriveBits"]),_=await n.exportKey("spki",C.publicKey),F=await n.deriveBits({name:"ECDH",public:b},C.privateKey,E),R=new ve({schema:A.keyEncryptionAlgorithm.algorithmParams}),q=n.getAlgorithmByOID(R.algorithmId,!0,"aesKWAlgorithm"),H=q.length,K=new ArrayBuffer(4),X=new Uint8Array(K);for(let Ae=3;Ae>=0;Ae--)X[Ae]=H,H>>=8;let le=new qB({keyInfo:new ve({algorithmId:R.algorithmId}),entityUInfo:A.ukm,suppPubInfo:new Ve({valueHex:K})}).toSchema().toBER(!1),ue=n.getAlgorithmByOID(A.keyEncryptionAlgorithm.algorithmId,!0,"ecdhAlgorithm"),ee=await AF(ue.kdf,F,q.length,le,n),he=await n.importKey("raw",ee,{name:"AES-KW"},!0,["wrapKey"]),we=await n.wrapKey("raw",c,he,{name:"AES-KW"}),Ke=new Ky;return Ke.variant=3,Ke.value=OA.fromBER(_),A.originator=Ke,A.recipientEncryptedKeys.encryptedKeys[0].encryptedKey=new Ve({valueHex:we}),{ecdhPrivateKey:C.privateKey}},"SubKeyAgreeRecipientInfo"),g=o(async S=>{let A=this.recipientInfos[S].value,T=n.getAlgorithmByOID(A.keyEncryptionAlgorithm.algorithmId,!0,"keyEncryptionAlgorithm");if(T.name==="RSA-OAEP"){let b=A.keyEncryptionAlgorithm.algorithmParams,E=new zE({schema:b});if(T.hash=n.getAlgorithmByOID(E.hashAlgorithm.algorithmId),!("name"in T.hash))throw new Error(`Incorrect OID for hash algorithm: ${E.hashAlgorithm.algorithmId}`)}try{let b=await A.recipientCertificate.getPublicKey({algorithm:{algorithm:T,usages:["encrypt","wrapKey"]}},n),E=await n.encrypt(b.algorithm,b,h);A.encryptedKey=new Ve({valueHex:E})}catch{}},"SubKeyTransRecipientInfo"),x=o(async S=>{let A=this.recipientInfos[S].value,T=n.getAlgorithmByOID(A.keyEncryptionAlgorithm.algorithmId,!0,"kekAlgorithm"),b=await n.importKey("raw",new Uint8Array(A.preDefinedKEK),T,!0,["wrapKey"]),E=await n.wrapKey("raw",c,b,T);A.encryptedKey=new Ve({valueHex:E})},"SubKEKRecipientInfo"),v=o(async S=>{let A=this.recipientInfos[S].value,T;if(!A.keyDerivationAlgorithm)throw new Error('Please append encoded "keyDerivationAlgorithm"');if(!A.keyDerivationAlgorithm.algorithmParams)throw new Error('Incorrectly encoded "keyDerivationAlgorithm"');try{T=new $m({schema:A.keyDerivationAlgorithm.algorithmParams})}catch{throw new Error('Incorrectly encoded "keyDerivationAlgorithm"')}let b=new Uint8Array(A.password),E=await n.importKey("raw",b,"PBKDF2",!1,["deriveKey"]),C=n.getAlgorithmByOID(A.keyEncryptionAlgorithm.algorithmId,!0,"kekAlgorithm"),_="SHA-1";T.prf&&(_=n.getAlgorithmByOID(T.prf.algorithmId,!0,"prfAlgorithm").hash.name);let F=new Uint8Array(T.salt.valueBlock.valueHex),R=T.iterationCount,q=await n.deriveKey({name:"PBKDF2",hash:{name:_},salt:F,iterations:R},E,C,!0,["wrapKey"]),H=await n.wrapKey("raw",c,q,C);A.encryptedKey=new Ve({valueHex:H})},"SubPasswordRecipientinfo"),w=[];for(let S=0;S<this.recipientInfos.length;S++)switch(this.recipientInfos[S].variant){case 1:w.push(await g(S));break;case 2:w.push(await m(S));break;case 3:w.push(await x(S));break;case 4:w.push(await v(S));break;default:throw new Error(`Unknown recipient type in array with index ${S}`)}return w}async decrypt(e,t,n=Dt(!0)){let s=t||{};if(e+1>this.recipientInfos.length)throw new Error(`Maximum value for "index" is: ${this.recipientInfos.length-1}`);let i=o(async w=>{let S=this.recipientInfos[w].value,A,T,b,E=S.originator;if(s.recipientCertificate){let ue=s.recipientCertificate.subjectPublicKeyInfo.algorithm.algorithmParams;if(ue.constructor.blockName()!==nt.blockName())throw new Error(`Incorrect "recipientCertificate" for index ${w}`);A=ue.valueBlock.toString()}else if(E.value.algorithm.algorithmParams){let ue=E.value.algorithm.algorithmParams;if(ue.constructor.blockName()!==nt.blockName())throw new Error(`Incorrect originator for index ${w}`);A=ue.valueBlock.toString()}else throw new Error('Parameter "recipientCertificate" is mandatory for "KeyAgreeRecipientInfo" if algorithm params are missing from originator');if(!s.recipientPrivateKey)throw new Error('Parameter "recipientPrivateKey" is mandatory for "KeyAgreeRecipientInfo"');switch(A){case"1.2.840.10045.3.1.7":T="P-256",b=256;break;case"1.3.132.0.34":T="P-384",b=384;break;case"1.3.132.0.35":T="P-521",b=528;break;default:throw new Error(`Incorrect curve OID for index ${w}`)}let C,_=n;mt.isBufferSource(s.recipientPrivateKey)?C=await n.importKey("pkcs8",s.recipientPrivateKey,{name:"ECDH",namedCurve:T},!0,["deriveBits"]):(C=s.recipientPrivateKey,"crypto"in s&&s.crypto&&(_=s.crypto.subtle)),"algorithmParams"in E.value.algorithm||(E.value.algorithm.algorithmParams=new nt({value:A}));let F=E.value.toSchema().toBER(!1),R=await n.importKey("spki",F,{name:"ECDH",namedCurve:T},!0,[]),q=await _.deriveBits({name:"ECDH",public:R},C,b);async function H(ue){ue=ue||!1;let ee=new ve({schema:S.keyEncryptionAlgorithm.algorithmParams}),he=n.getAlgorithmByOID(ee.algorithmId,!0,"kwAlgorithm"),we=he.length,Ke=new ArrayBuffer(4),Ae=new Uint8Array(Ke);for(let lt=3;lt>=0;lt--)Ae[lt]=we,we>>=8;let xe={algorithmId:ee.algorithmId};ue&&(xe.algorithmParams=new Xr);let Je=new qB({keyInfo:new ve(xe),entityUInfo:S.ukm,suppPubInfo:new Ve({valueHex:Ke})}).toSchema().toBER(!1),Ze=n.getAlgorithmByOID(S.keyEncryptionAlgorithm.algorithmId,!0,"ecdhAlgorithm");if(!Ze.name)throw new Error(`Incorrect OID for key encryption algorithm: ${S.keyEncryptionAlgorithm.algorithmId}`);return AF(Ze.kdf,q,he.length,Je,n)}o(H,"applyKDF");let K=await H(),X=o(async ue=>n.importKey("raw",ue,{name:"AES-KW"},!0,["unwrapKey"]),"importAesKwKey"),pe=await X(K),le=o(async ue=>{let ee=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId,he=n.getAlgorithmByOID(ee,!0,"contentEncryptionAlgorithm");return n.unwrapKey("raw",S.recipientEncryptedKeys.encryptedKeys[0].encryptedKey.valueBlock.valueHexView,ue,{name:"AES-KW"},he,!0,["decrypt"])},"unwrapSessionKey");try{return await le(pe)}catch{let ue=await H(!0),ee=await X(ue);return le(ee)}},"SubKeyAgreeRecipientInfo"),a=o(async w=>{let S=this.recipientInfos[w].value;if(!s.recipientPrivateKey)throw new Error('Parameter "recipientPrivateKey" is mandatory for "KeyTransRecipientInfo"');let A=n.getAlgorithmByOID(S.keyEncryptionAlgorithm.algorithmId,!0,"keyEncryptionAlgorithm");if(A.name==="RSA-OAEP"){let F=S.keyEncryptionAlgorithm.algorithmParams,R=new zE({schema:F});if(A.hash=n.getAlgorithmByOID(R.hashAlgorithm.algorithmId),!("name"in A.hash))throw new Error(`Incorrect OID for hash algorithm: ${R.hashAlgorithm.algorithmId}`)}let T,b=n;mt.isBufferSource(s.recipientPrivateKey)?T=await n.importKey("pkcs8",s.recipientPrivateKey,A,!0,["decrypt"]):(T=s.recipientPrivateKey,"crypto"in s&&s.crypto&&(b=s.crypto.subtle));let E=await b.decrypt(T.algorithm,T,S.encryptedKey.valueBlock.valueHexView),C=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId,_=n.getAlgorithmByOID(C,!0,"contentEncryptionAlgorithm");if(!("name"in _))throw new Error(`Incorrect "contentEncryptionAlgorithm": ${C}`);return n.importKey("raw",E,_,!0,["decrypt"])},"SubKeyTransRecipientInfo"),u=o(async w=>{let S=this.recipientInfos[w].value;if(!s.preDefinedData)throw new Error('Parameter "preDefinedData" is mandatory for "KEKRecipientInfo"');let A=n.getAlgorithmByOID(S.keyEncryptionAlgorithm.algorithmId,!0,"kekAlgorithm"),T=await n.importKey("raw",s.preDefinedData,A,!0,["unwrapKey"]),b=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId,E=n.getAlgorithmByOID(b,!0,"contentEncryptionAlgorithm");if(!E.name)throw new Error(`Incorrect "contentEncryptionAlgorithm": ${b}`);return n.unwrapKey("raw",S.encryptedKey.valueBlock.valueHexView,T,A,E,!0,["decrypt"])},"SubKEKRecipientInfo"),c=o(async w=>{let S=this.recipientInfos[w].value,A;if(!s.preDefinedData)throw new Error('Parameter "preDefinedData" is mandatory for "KEKRecipientInfo"');if(!S.keyDerivationAlgorithm)throw new Error('Please append encoded "keyDerivationAlgorithm"');if(!S.keyDerivationAlgorithm.algorithmParams)throw new Error('Incorrectly encoded "keyDerivationAlgorithm"');try{A=new $m({schema:S.keyDerivationAlgorithm.algorithmParams})}catch{throw new Error('Incorrectly encoded "keyDerivationAlgorithm"')}let T=await n.importKey("raw",s.preDefinedData,"PBKDF2",!1,["deriveKey"]),b=n.getAlgorithmByOID(S.keyEncryptionAlgorithm.algorithmId,!0,"keyEncryptionAlgorithm"),E=A.prf?n.getAlgorithmByOID(A.prf.algorithmId,!0,"prfAlgorithm").hash.name:"SHA-1",C=new Uint8Array(A.salt.valueBlock.valueHex),_=A.iterationCount,F=await n.deriveKey({name:"PBKDF2",hash:{name:E},salt:C,iterations:_},T,b,!0,["unwrapKey"]),R=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId,q=n.getAlgorithmByOID(R,!0,"contentEncryptionAlgorithm");return n.unwrapKey("raw",S.encryptedKey.valueBlock.valueHexView,F,b,q,!0,["decrypt"])},"SubPasswordRecipientinfo"),f;switch(this.recipientInfos[e].variant){case 1:f=await a(e);break;case 2:f=await i(e);break;case 3:f=await u(e);break;case 4:f=await c(e);break;default:throw new Error(`Unknown recipient type in array with index ${e}`)}let h=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId,m=n.getAlgorithmByOID(h,!0,"contentEncryptionAlgorithm"),g=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmParams.valueBlock.valueHex,x=new Uint8Array(g);if(!this.encryptedContentInfo.encryptedContent)throw new Error("Required property `encryptedContent` is empty");let v=this.encryptedContentInfo.getEncryptedContent();return n.decrypt({name:m.name,iv:x},f,v)}};HB.CLASS_NAME="EnvelopedData";var od="safeContents",dv="parsedValue",UF="contentInfos",KB=class JE extends _e{static{o(this,"AuthenticatedSafe")}constructor(e={}){super(),this.safeContents=B(e,od,JE.defaultValues(od)),dv in e&&(this.parsedValue=B(e,dv,JE.defaultValues(dv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case od:return[];case dv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case od:return t.length===0;case dv:return t instanceof Object&&Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.contentInfos||L,value:Jr.schema()})]})}fromSchema(e){De(e,[UF]);let t=Ie(e,e,JE.schema({names:{contentInfos:UF}}));be.assertSchema(t,this.className),this.safeContents=Array.from(t.result.contentInfos,n=>new Jr({schema:n}))}toSchema(){return new W({value:Array.from(this.safeContents,e=>e.toSchema())})}toJSON(){return{safeContents:Array.from(this.safeContents,e=>e.toJSON())}}async parseInternalValues(e,t=Dt(!0)){if(pr.assert(e,od),Ar.assert(e.safeContents,od,"Array"),e.safeContents.length!==this.safeContents.length)throw new Ar('Length of "parameters.safeContents" must be equal to "this.safeContents.length"');this.parsedValue={safeContents:[]};for(let[n,s]of this.safeContents.entries()){let i=e.safeContents[n],a=`parameters.safeContents[${n}]`;switch(s.contentType){case gD:{Ar.assert(s.content,"this.safeContents[j].content",Ve);let u=s.content.getValue();this.parsedValue.safeContents.push({privacyMode:0,value:Km.fromBER(u)})}break;case QF:{let u=new HB({schema:s.content});pr.assert(a,i,"recipientCertificate","recipientKey");let c=i,f=c.recipientCertificate,h=c.recipientKey,m=await u.decrypt(0,{recipientCertificate:f,recipientPrivateKey:h},t);this.parsedValue.safeContents.push({privacyMode:2,value:Km.fromBER(m)})}break;case ZF:{let u=new Yy({schema:s.content});pr.assert(a,i,"password");let c=i.password,f=await u.decrypt({password:c},t);this.parsedValue.safeContents.push({privacyMode:1,value:Km.fromBER(f)})}break;default:throw new Error(`Unknown "contentType" for AuthenticatedSafe: " ${s.contentType}`)}}}async makeInternalValues(e,t=Dt(!0)){if(!this.parsedValue)throw new Error('Please run "parseValues" first or add "parsedValue" manually');if(Ar.assert(this.parsedValue,"this.parsedValue","object"),Ar.assert(this.parsedValue.safeContents,"this.parsedValue.safeContents","Array"),Ar.assert(e,"parameters","object"),pr.assert(e,"safeContents"),Ar.assert(e.safeContents,"parameters.safeContents","Array"),e.safeContents.length!==this.parsedValue.safeContents.length)throw new Ar('Length of "parameters.safeContents" must be equal to "this.parsedValue.safeContents"');this.safeContents=[];for(let[n,s]of this.parsedValue.safeContents.entries())switch(pr.assert("content",s,"privacyMode","value"),Ar.assert(s.value,"content.value",Km),s.privacyMode){case 0:{let i=s.value.toSchema().toBER(!1);this.safeContents.push(new Jr({contentType:"1.2.840.113549.1.7.1",content:new Ve({valueHex:i})}))}break;case 1:{let i=new Yy,a=e.safeContents[n];a.contentToEncrypt=s.value.toSchema().toBER(!1),await i.encrypt(a,t),this.safeContents.push(new Jr({contentType:"1.2.840.113549.1.7.6",content:i.toSchema()}))}break;case 2:{let i=new HB,a=s.value.toSchema().toBER(!1),u=e.safeContents[n];switch(pr.assert(`parameters.safeContents[${n}]`,u,"encryptingCertificate","encryptionAlgorithm"),!0){case u.encryptionAlgorithm.name.toLowerCase()==="aes-cbc":case u.encryptionAlgorithm.name.toLowerCase()==="aes-gcm":break;default:throw new Error(`Incorrect parameter "encryptionAlgorithm" in "parameters.safeContents[i]": ${u.encryptionAlgorithm}`)}switch(!0){case u.encryptionAlgorithm.length===128:case u.encryptionAlgorithm.length===192:case u.encryptionAlgorithm.length===256:break;default:throw new Error(`Incorrect parameter "encryptionAlgorithm.length" in "parameters.safeContents[i]": ${u.encryptionAlgorithm.length}`)}let c=u.encryptionAlgorithm;i.addRecipientByCertificate(u.encryptingCertificate,{},void 0,t),await i.encrypt(c,a,t),this.safeContents.push(new Jr({contentType:"1.2.840.113549.1.7.3",content:i.toSchema()}))}break;default:throw new Error(`Incorrect value for "content.privacyMode": ${s.privacyMode}`)}return this}};KB.CLASS_NAME="AuthenticatedSafe";var Zf="hashAlgorithm",cm="issuerNameHash",lm="issuerKeyHash",eh="serialNumber",_fe=[Zf,cm,lm,eh],ci=class rl extends _e{static{o(this,"CertID")}static async create(e,t,n=Dt(!0)){let s=new rl;return await s.createForCertificate(e,t,n),s}constructor(e={}){super(),this.hashAlgorithm=B(e,Zf,rl.defaultValues(Zf)),this.issuerNameHash=B(e,cm,rl.defaultValues(cm)),this.issuerKeyHash=B(e,lm,rl.defaultValues(lm)),this.serialNumber=B(e,eh,rl.defaultValues(eh)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Zf:return new ve;case cm:case lm:return new Ve;case eh:return new ge;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Zf:return t.algorithmId===L&&!("algorithmParams"in t);case cm:case lm:case eh:return t.isEqual(rl.defaultValues(eh));default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[ve.schema(t.hashAlgorithmObject||{names:{blockName:t.hashAlgorithm||L}}),new Ve({name:t.issuerNameHash||L}),new Ve({name:t.issuerKeyHash||L}),new ge({name:t.serialNumber||L})]})}fromSchema(e){De(e,_fe);let t=Ie(e,e,rl.schema({names:{hashAlgorithm:Zf,issuerNameHash:cm,issuerKeyHash:lm,serialNumber:eh}}));be.assertSchema(t,this.className),this.hashAlgorithm=new ve({schema:t.result.hashAlgorithm}),this.issuerNameHash=t.result.issuerNameHash,this.issuerKeyHash=t.result.issuerKeyHash,this.serialNumber=t.result.serialNumber}toSchema(){return new W({value:[this.hashAlgorithm.toSchema(),this.issuerNameHash,this.issuerKeyHash,this.serialNumber]})}toJSON(){return{hashAlgorithm:this.hashAlgorithm.toJSON(),issuerNameHash:this.issuerNameHash.toJSON(),issuerKeyHash:this.issuerKeyHash.toJSON(),serialNumber:this.serialNumber.toJSON()}}isEqual(e){return!(this.hashAlgorithm.algorithmId!==e.hashAlgorithm.algorithmId||!mt.isEqual(this.issuerNameHash.valueBlock.valueHexView,e.issuerNameHash.valueBlock.valueHexView)||!mt.isEqual(this.issuerKeyHash.valueBlock.valueHexView,e.issuerKeyHash.valueBlock.valueHexView)||!this.serialNumber.isEqual(e.serialNumber))}async createForCertificate(e,t,n=Dt(!0)){pr.assert(t,Zf,"issuerCertificate");let s=n.getOIDByAlgorithm({name:t.hashAlgorithm},!0,"hashAlgorithm");this.hashAlgorithm=new ve({algorithmId:s,algorithmParams:new Xr});let i=t.issuerCertificate;this.serialNumber=e.serialNumber;let a=await n.digest({name:t.hashAlgorithm},i.subject.toSchema().toBER(!1));this.issuerNameHash=new Ve({valueHex:a});let u=i.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView,c=await n.digest({name:t.hashAlgorithm},u);this.issuerKeyHash=new Ve({valueHex:c})}};ci.CLASS_NAME="CertID";var fm="certID",hm="certStatus",pm="thisUpdate",nl="nextUpdate",th="singleExtensions",Bfe=[fm,hm,pm,nl,th],$B=class sl extends _e{static{o(this,"SingleResponse")}constructor(e={}){super(),this.certID=B(e,fm,sl.defaultValues(fm)),this.certStatus=B(e,hm,sl.defaultValues(hm)),this.thisUpdate=B(e,pm,sl.defaultValues(pm)),nl in e&&(this.nextUpdate=B(e,nl,sl.defaultValues(nl))),th in e&&(this.singleExtensions=B(e,th,sl.defaultValues(th))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case fm:return new ci;case hm:return{};case pm:case nl:return new Date(0,0,0);case th:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case fm:return ci.compareWithDefault("hashAlgorithm",t.hashAlgorithm)&&ci.compareWithDefault("issuerNameHash",t.issuerNameHash)&&ci.compareWithDefault("issuerKeyHash",t.issuerKeyHash)&&ci.compareWithDefault("serialNumber",t.serialNumber);case hm:return Object.keys(t).length===0;case pm:case nl:return t===sl.defaultValues(e);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[ci.schema(t.certID||{}),new Lr({value:[new vt({name:t.certStatus||L,idBlock:{tagClass:3,tagNumber:0}}),new oe({name:t.certStatus||L,idBlock:{tagClass:3,tagNumber:1},value:[new kr,new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new pc]})]}),new vt({name:t.certStatus||L,idBlock:{tagClass:3,tagNumber:2},lenBlock:{length:1}})]}),new kr({name:t.thisUpdate||L}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new kr({name:t.nextUpdate||L})]}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[An.schema(t.singleExtensions||{})]})]})}fromSchema(e){De(e,Bfe);let t=Ie(e,e,sl.schema({names:{certID:{names:{blockName:fm}},certStatus:hm,thisUpdate:pm,nextUpdate:nl,singleExtensions:{names:{blockName:th}}}}));be.assertSchema(t,this.className),this.certID=new ci({schema:t.result.certID}),this.certStatus=t.result.certStatus,this.thisUpdate=t.result.thisUpdate.toDate(),nl in t.result&&(this.nextUpdate=t.result.nextUpdate.toDate()),th in t.result&&(this.singleExtensions=Array.from(t.result.singleExtensions.valueBlock.value,n=>new Ki({schema:n})))}toSchema(){let e=[];return e.push(this.certID.toSchema()),e.push(this.certStatus),e.push(new kr({valueDate:this.thisUpdate})),this.nextUpdate&&e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[new kr({valueDate:this.nextUpdate})]})),this.singleExtensions&&e.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:[new W({value:Array.from(this.singleExtensions,t=>t.toSchema())})]})),new W({value:e})}toJSON(){let e={certID:this.certID.toJSON(),certStatus:this.certStatus.toJSON(),thisUpdate:this.thisUpdate};return this.nextUpdate&&(e.nextUpdate=this.nextUpdate),this.singleExtensions&&(e.singleExtensions=Array.from(this.singleExtensions,t=>t.toJSON())),e}};$B.CLASS_NAME="SingleResponse";var sE="tbs",rh="version",vy="responderID",yy="producedAt",xy="responses",dm="responseExtensions",Th="ResponseData",YE=`${Th}.${rh}`,mm=`${Th}.${vy}`,GB=`${Th}.${yy}`,XB=`${Th}.${xy}`,QE=`${Th}.${dm}`,Dfe=[Th,YE,mm,GB,XB,QE],eu=class no extends _e{static{o(this,"ResponseData")}get tbs(){return mt.toArrayBuffer(this.tbsView)}set tbs(e){this.tbsView=new Uint8Array(e)}constructor(e={}){super(),this.tbsView=new Uint8Array(B(e,sE,no.defaultValues(sE))),rh in e&&(this.version=B(e,rh,no.defaultValues(rh))),this.responderID=B(e,vy,no.defaultValues(vy)),this.producedAt=B(e,yy,no.defaultValues(yy)),this.responses=B(e,xy,no.defaultValues(xy)),dm in e&&(this.responseExtensions=B(e,dm,no.defaultValues(dm))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case rh:return 0;case sE:return rn;case vy:return{};case yy:return new Date(0,0,0);case xy:case dm:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case sE:return t.byteLength===0;case vy:return Object.keys(t).length===0;case yy:return t===no.defaultValues(e);case xy:case dm:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||Th,value:[new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new ge({name:t.version||YE})]}),new Lr({value:[new oe({name:t.responderID||mm,idBlock:{tagClass:3,tagNumber:1},value:[Vr.schema(t.ResponseDataByName||{names:{blockName:"ResponseData.byName"}})]}),new oe({name:t.responderID||mm,idBlock:{tagClass:3,tagNumber:2},value:[new Ve({name:t.ResponseDataByKey||"ResponseData.byKey"})]})]}),new kr({name:t.producedAt||GB}),new W({value:[new Tt({name:XB,value:$B.schema(t.response||{})})]}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[An.schema(t.extensions||{names:{blockName:QE}})]})]})}fromSchema(e){De(e,Dfe);let t=Ie(e,e,no.schema());be.assertSchema(t,this.className),this.tbsView=t.result.ResponseData.valueBeforeDecodeView,YE in t.result&&(this.version=t.result[YE].valueBlock.valueDec),t.result[mm].idBlock.tagNumber===1?this.responderID=new Vr({schema:t.result[mm].valueBlock.value[0]}):this.responderID=t.result[mm].valueBlock.value[0],this.producedAt=t.result[GB].toDate(),this.responses=Array.from(t.result[XB],n=>new $B({schema:n})),QE in t.result&&(this.responseExtensions=Array.from(t.result[QE].valueBlock.value,n=>new Ki({schema:n})))}toSchema(e=!1){let t;if(e===!1){if(!this.tbsView.byteLength)return no.schema();let n=Gr(this.tbsView);be.assert(n,"TBS Response Data"),t=n.result}else{let n=[];rh in this&&n.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[new ge({value:this.version})]})),this.responderID instanceof Vr?n.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:[this.responderID.toSchema()]})):n.push(new oe({idBlock:{tagClass:3,tagNumber:2},value:[this.responderID]})),n.push(new kr({valueDate:this.producedAt})),n.push(new W({value:Array.from(this.responses,s=>s.toSchema())})),this.responseExtensions&&n.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:[new W({value:Array.from(this.responseExtensions,s=>s.toSchema())})]})),t=new W({value:n})}return t}toJSON(){let e={};return rh in this&&(e.version=this.version),this.responderID&&(e.responderID=this.responderID),this.producedAt&&(e.producedAt=this.producedAt),this.responses&&(e.responses=Array.from(this.responses,t=>t.toJSON())),this.responseExtensions&&(e.responseExtensions=Array.from(this.responseExtensions,t=>t.toJSON())),e}};eu.CLASS_NAME="ResponseData";var W_="trustedCerts",z_="certs",J_="crls",Y_="ocsps",Q_="checkDate",Z_="findOrigin",eB="findIssuer",yh;(function(r){r[r.unknown=-1]="unknown",r[r.success=0]="success",r[r.noRevocation=11]="noRevocation",r[r.noPath=60]="noPath",r[r.noValidPath=97]="noValidPath"})(yh||(yh={}));var gm=class C9 extends Error{static{o(this,"ChainValidationError")}constructor(e,t){super(t),this.name=C9.NAME,this.code=e,this.message=t}};gm.NAME="ChainValidationError";function Rfe(r,e){for(let t=0;t<e.length;t++)if(mt.isEqual(r.tbsView,e[t].tbsView))return!0;return!1}o(Rfe,"isTrusted");var N9=class T9{static{o(this,"CertificateChainValidationEngine")}constructor(e={}){this.trustedCerts=B(e,W_,this.defaultValues(W_)),this.certs=B(e,z_,this.defaultValues(z_)),this.crls=B(e,J_,this.defaultValues(J_)),this.ocsps=B(e,Y_,this.defaultValues(Y_)),this.checkDate=B(e,Q_,this.defaultValues(Q_)),this.findOrigin=B(e,Z_,this.defaultValues(Z_)),this.findIssuer=B(e,eB,this.defaultValues(eB))}static defaultFindOrigin(e,t){e.tbsView.byteLength===0&&(e.tbsView=new Uint8Array(e.encodeTBS().toBER()));for(let n of t.certs)if(n.tbsView.byteLength===0&&(n.tbsView=new Uint8Array(n.encodeTBS().toBER())),mt.isEqual(e.tbsView,n.tbsView))return"Intermediate Certificates";for(let n of t.trustedCerts)if(n.tbsView.byteLength===0&&(n.tbsView=new Uint8Array(n.encodeTBS().toBER())),mt.isEqual(e.tbsView,n.tbsView))return"Trusted Certificates";return"Unknown"}async defaultFindIssuer(e,t,n=Dt(!0)){let s=[],i=null,a=null,u=null;if(e.subject.isEqual(e.issuer))try{if(await e.verify(void 0,n))return[e]}catch{}if(e.extensions){for(let f of e.extensions)if(f.extnID===dD&&f.parsedValue instanceof yD){f.parsedValue.keyIdentifier?i=f.parsedValue.keyIdentifier:(f.parsedValue.authorityCertIssuer&&(a=f.parsedValue.authorityCertIssuer),f.parsedValue.authorityCertSerialNumber&&(u=f.parsedValue.authorityCertSerialNumber));break}}function c(f){if(i!==null&&f.extensions){let m=!1;for(let g of f.extensions)if(g.extnID===Oce&&g.parsedValue){m=!0,mt.isEqual(g.parsedValue.valueBlock.valueHex,i.valueBlock.valueHexView)&&s.push(f);break}if(m)return}let h=!1;u!==null&&(h=f.serialNumber.isEqual(u)),a!==null?f.subject.isEqual(a)&&h&&s.push(f):e.issuer.isEqual(f.subject)&&s.push(f)}o(c,"checkCertificate");for(let f of t.trustedCerts)c(f);for(let f of t.certs)c(f);for(let f=s.length-1;f>=0;f--)try{await e.verify(s[f],n)===!1&&s.splice(f,1)}catch{s.splice(f,1)}return s}defaultValues(e){switch(e){case W_:return[];case z_:return[];case J_:return[];case Y_:return[];case Q_:return new Date;case Z_:return T9.defaultFindOrigin;case eB:return this.defaultFindIssuer;default:throw new Error(`Invalid member name for CertificateChainValidationEngine class: ${e}`)}}async sort(e=!1,t=Dt(!0)){let n=[],s=o(async(v,w)=>{let S=[];function A(b){let E=!0;for(let C=0;C<b.length;C++){for(let _=0;_<b.length;_++)if(_!==C&&b[C]===b[_]){E=!1;break}if(!E)break}return E}if(o(A,"checkUnique"),Rfe(v,this.trustedCerts))return[[v]];let T=await this.findIssuer(v,this,w);if(T.length===0)throw new Error("No valid certificate paths found");for(let b=0;b<T.length;b++){if(mt.isEqual(T[b].tbsView,v.tbsView)){S.push([T[b]]);continue}let E=await s(T[b],w);for(let C=0;C<E.length;C++){let _=E[C].slice();_.splice(0,0,T[b]),A(_)?S.push(_):S.push(E[C])}}return S},"buildPath"),i=o(async v=>{let w=[],S=[],A=[];if(w.push(...n.filter(T=>v.issuer.isEqual(T.subject))),w.length===0)return{status:1,statusMessage:"No certificate's issuers"};if(S.push(...this.crls.filter(T=>T.issuer.isEqual(v.issuer))),S.length===0)return{status:2,statusMessage:"No CRLs for specific certificate issuer"};for(let T=0;T<S.length;T++){let b=S[T];if(!(b.nextUpdate&&b.nextUpdate.value<this.checkDate))for(let E=0;E<w.length;E++)try{if(await S[T].verify({issuerCertificate:w[E]},t)){A.push({crl:S[T],certificate:w[E]});break}}catch{}}return A.length?{status:0,statusMessage:L,result:A}:{status:3,statusMessage:"No valid CRLs found"}},"findCRL"),a=o(async(v,w)=>{let S=t.getAlgorithmByOID(v.signatureAlgorithm.algorithmId);if(!S.name||!S.hash)return 1;for(let A=0;A<this.ocsps.length;A++){let b=await this.ocsps[A].getCertificateStatus(v,w,t);if(b.isForCertificate)return b.status===0?0:1}return 2},"findOCSP");async function u(v,w=!1){let S=!1,A=!1,T=!1,b=!1;if(v.extensions){for(let E=0;E<v.extensions.length;E++){let C=v.extensions[E];if(C.critical&&!C.parsedValue)return{result:!1,resultCode:6,resultMessage:`Unable to parse critical certificate extension: ${C.extnID}`};if(C.extnID===kce){T=!0;let _=new Uint8Array(C.parsedValue.valueBlock.valueHex);(_[0]&4)===4&&(A=!0),(_[0]&2)===2&&(b=!0)}C.extnID===hD&&"cA"in C.parsedValue&&C.parsedValue.cA===!0&&(S=!0)}if(A===!0&&S===!1)return{result:!1,resultCode:3,resultMessage:'Unable to build certificate chain - using "keyCertSign" flag set without BasicConstraints'};if(T===!0&&S===!0&&A===!1)return{result:!1,resultCode:4,resultMessage:'Unable to build certificate chain - "keyCertSign" flag was not set'};if(S===!0&&T===!0&&w&&b===!1)return{result:!1,resultCode:5,resultMessage:'Unable to build certificate chain - intermediate certificate must have "cRLSign" key usage flag'}}return S===!1?{result:!1,resultCode:7,resultMessage:"Unable to build certificate chain - more than one possible end-user certificate"}:{result:!0,resultCode:0,resultMessage:L}}o(u,"checkForCA");let c=o(async(v,w)=>{for(let S=0;S<v.length;S++)if(v[S].notBefore.value>w||v[S].notAfter.value<w)return{result:!1,resultCode:8,resultMessage:"The certificate is either not yet valid or expired"};if(v.length<2)return{result:!1,resultCode:9,resultMessage:"Too short certificate path"};for(let S=v.length-2;S>=0;S--)if(v[S].issuer.isEqual(v[S].subject)===!1&&v[S].issuer.isEqual(v[S+1].subject)===!1)return{result:!1,resultCode:10,resultMessage:"Incorrect name chaining"};if(this.crls.length!==0||this.ocsps.length!==0)for(let S=0;S<v.length-1;S++){let A=2,T={status:0,statusMessage:L};if(this.ocsps.length!==0)switch(A=await a(v[S],v[S+1]),A){case 0:continue;case 1:return{result:!1,resultCode:12,resultMessage:"One of certificates was revoked via OCSP response"}}if(this.crls.length!==0){if(T=await i(v[S]),T.status===0&&T.result)for(let b=0;b<T.result.length;b++){if(T.result[b].crl.isCertificateRevoked(v[S]))return{result:!1,resultCode:12,resultMessage:"One of certificates had been revoked"};if((await u(T.result[b].certificate,!0)).result===!1)return{result:!1,resultCode:13,resultMessage:"CRL issuer certificate is not a CA certificate or does not have crlSign flag"}}else if(e===!1)throw new gm(yh.noRevocation,`No revocation values found for one of certificates: ${T.statusMessage}`)}else if(A===2)return{result:!1,resultCode:11,resultMessage:"No revocation values found for one of certificates"};if(A===2&&T.status===2&&e){let b=v[S+1],E=!1;if(b.extensions)for(let C of b.extensions)switch(C.extnID){case XF:case pD:case mD:E=!0;break}if(E)throw new gm(yh.noRevocation,`No revocation values found for one of certificates: ${T.statusMessage}`)}}for(let[S,A]of v.entries()){if(!S)continue;if(!(await u(A)).result)return{result:!1,resultCode:14,resultMessage:"One of intermediate certificates is not a CA certificate"}}return{result:!0}},"basicCheck");n.push(...this.trustedCerts),n.push(...this.certs);for(let v=0;v<n.length;v++)for(let w=0;w<n.length;w++)if(v!==w&&mt.isEqual(n[v].tbsView,n[w].tbsView)){n.splice(w,1),v=0;break}let f=n[n.length-1],h,m=[f];if(h=await s(f,t),h.length===0)throw new gm(yh.noPath,"Unable to find certificate path");for(let v=h.length-1;v>=0;v--){let w=!1;for(let S=0;S<h[v].length;S++){let A=h[v][S];for(let T=0;T<this.trustedCerts.length;T++)if(mt.isEqual(A.tbsView,this.trustedCerts[T].tbsView)){w=!0;break}if(w)break}w||h.splice(v,1)}if(h.length===0)throw new gm(yh.noValidPath,"No valid certificate paths found");let g=h[0].length,x=0;for(let v=0;v<h.length;v++)h[v].length<g&&(g=h[v].length,x=v);for(let v=0;v<h[x].length;v++)m.push(h[x][v]);if(h=await c(m,this.checkDate),h.result===!1)throw h;return m}async verify(e={},t=Dt(!0)){function n(c,f){let h=hl(c),m=hl(f),g=h.split("."),x=m.split("."),v=g.length,w=x.length;if(v===0||w===0||v<w)return!1;for(let S=0;S<v;S++)if(g[S].length===0)return!1;for(let S=0;S<w;S++)if(x[S].length===0){if(S===0){if(w===1)return!1;continue}return!1}for(let S=0;S<w;S++)if(x[w-1-S].length!==0&&g[v-1-S].localeCompare(x[w-1-S])!==0)return!1;return!0}o(n,"compareDNSName");function s(c,f){let h=hl(c),m=hl(f),g=h.split("@"),x=m.split("@");if(g.length===0||x.length===0||g.length<x.length)return!1;if(x.length===1){if(n(g[1],x[0])){let w=g[1].split("."),S=x[0].split(".");return S[0].length===0?!0:w.length===S.length}return!1}return h.localeCompare(m)===0}o(s,"compareRFC822Name");function i(c,f){let h=hl(c),m=hl(f),g=h.split("/");if(m.split("/").length>1)return!1;if(g.length>1){for(let w=0;w<g.length;w++)if(g[w].length>0&&g[w].charAt(g[w].length-1)!==":"){h=g[w].split(":")[0];break}}if(n(h,m)){let w=h.split("."),S=m.split(".");return S[0].length===0?!0:w.length===S.length}return!1}o(i,"compareUniformResourceIdentifier");function a(c,f){let h=c.valueBlock.valueHexView,m=f.valueBlock.valueHexView;if(h.length===4&&m.length===8){for(let g=0;g<4;g++)if((h[g]^m[g])&m[g+4])return!1;return!0}if(h.length===16&&m.length===32){for(let g=0;g<16;g++)if((h[g]^m[g])&m[g+16])return!1;return!0}return!1}o(a,"compareIPAddress");function u(c,f){if(c.typesAndValues.length===0||f.typesAndValues.length===0)return!0;if(c.typesAndValues.length<f.typesAndValues.length)return!1;let h=!0,m=0;for(let g=0;g<f.typesAndValues.length;g++){let x=!1;for(let v=m;v<c.typesAndValues.length;v++)if(x=c.typesAndValues[v].isEqual(f.typesAndValues[g]),c.typesAndValues[v].type===f.typesAndValues[g].type&&(h=h&&x),x===!0)if(m===0||m===v){m=v+1;break}else return!1;if(x===!1)return!1}return m===0?!1:h}o(u,"compareDirectoryName");try{if(this.certs.length===0)throw new Error("Empty certificate array");let c=e.passedWhenNotRevValues||!1,f=e.initialPolicySet||[Mi],h=e.initialExplicitPolicy||!1,m=e.initialPolicyMappingInhibit||!1,g=e.initialInhibitPolicy||!1,x=e.initialPermittedSubtreesSet||[],v=e.initialExcludedSubtreesSet||[],w=e.initialRequiredNameForms||[],S=h,A=m,T=g,b=[!1,!1,!1],E=0,C=0,_=0,F=x,R=v,q=w,H=1;this.certs=await this.sort(c,t);let K=[];K.push(Mi);let X=[],pe=new Array(this.certs.length-1);for(let Ae=0;Ae<this.certs.length-1;Ae++)pe[Ae]=!0;X.push(pe);let le=new Array(this.certs.length-1),ue=new Array(this.certs.length-1),ee=S?this.certs.length-1:-1;for(let Ae=this.certs.length-2;Ae>=0;Ae--,H++){let xe=this.certs[Ae];if(xe.extensions){for(let je=0;je<xe.extensions.length;je++){let Je=xe.extensions[je];if(Je.extnID===WF){ue[Ae]=Je.parsedValue;for(let Ze=0;Ze<K.length;Ze++)if(K[Ze]===Mi){delete X[Ze][Ae];break}for(let Ze=0;Ze<Je.parsedValue.certificatePolicies.length;Ze++){let lt=-1,O=Je.parsedValue.certificatePolicies[Ze].policyIdentifier;for(let D=0;D<K.length;D++)if(O===K[D]){lt=D;break}if(lt===-1){K.push(O);let D=new Array(this.certs.length-1);D[Ae]=!0,X.push(D)}else X[lt][Ae]=!0}}if(Je.extnID===zF){if(A)return{result:!1,resultCode:98,resultMessage:"Policy mapping prohibited"};le[Ae]=Je.parsedValue}Je.extnID===JF&&S===!1&&(Je.parsedValue.requireExplicitPolicy===0?(S=!0,ee=Ae):b[0]===!1?(b[0]=!0,E=Je.parsedValue.requireExplicitPolicy):E=E>Je.parsedValue.requireExplicitPolicy?Je.parsedValue.requireExplicitPolicy:E,Je.parsedValue.inhibitPolicyMapping===0?A=!0:b[1]===!1?(b[1]=!0,C=Je.parsedValue.inhibitPolicyMapping+1):C=C>Je.parsedValue.inhibitPolicyMapping+1?Je.parsedValue.inhibitPolicyMapping+1:C),Je.extnID===Hce&&T===!1&&(Je.parsedValue.valueBlock.valueDec===0?T=!0:b[2]===!1?(b[2]=!0,_=Je.parsedValue.valueBlock.valueDec):_=_>Je.parsedValue.valueBlock.valueDec?Je.parsedValue.valueBlock.valueDec:_)}if(T===!0){let je=-1;for(let Je=0;Je<K.length;Je++)if(K[Je]===Mi){je=Je;break}je!==-1&&delete X[0][Ae]}S===!1&&b[0]===!0&&(E--,E===0&&(S=!0,ee=Ae,b[0]=!1)),A===!1&&b[1]===!0&&(C--,C===0&&(A=!0,b[1]=!1)),T===!1&&b[2]===!0&&(_--,_===0&&(T=!0,b[2]=!1))}}for(let Ae=0;Ae<this.certs.length-1;Ae++)if(Ae<this.certs.length-2&&typeof le[Ae+1]<"u")for(let xe=0;xe<le[Ae+1].mappings.length;xe++){if(le[Ae+1].mappings[xe].issuerDomainPolicy===Mi||le[Ae+1].mappings[xe].subjectDomainPolicy===Mi)return{result:!1,resultCode:99,resultMessage:'The "anyPolicy" should not be a part of policy mapping scheme'};let je=-1,Je=-1;for(let Ze=0;Ze<K.length;Ze++)K[Ze]===le[Ae+1].mappings[xe].issuerDomainPolicy&&(je=Ze),K[Ze]===le[Ae+1].mappings[xe].subjectDomainPolicy&&(Je=Ze);typeof X[je][Ae]<"u"&&delete X[je][Ae];for(let Ze=0;Ze<ue[Ae].certificatePolicies.length;Ze++)if(le[Ae+1].mappings[xe].subjectDomainPolicy===ue[Ae].certificatePolicies[Ze].policyIdentifier&&je!==-1&&Je!==-1)for(let lt=0;lt<=Ae;lt++)typeof X[Je][lt]<"u"&&(X[je][lt]=!0,delete X[Je][lt])}for(let Ae=0;Ae<K.length;Ae++)if(K[Ae]===Mi)for(let xe=0;xe<ee;xe++)delete X[Ae][xe];let he=[];for(let Ae=0;Ae<X.length;Ae++){let xe=!0;for(let je=0;je<this.certs.length-1;je++){let Je=!1;if(je<ee&&K[Ae]===Mi&&K.length>1){xe=!1;break}if(typeof X[Ae][je]>"u"){if(je>=ee){for(let Ze=0;Ze<K.length;Ze++)if(K[Ze]===Mi){X[Ze][je]===!0&&(Je=!0);break}}if(!Je){xe=!1;break}}}xe===!0&&he.push(K[Ae])}let we=[];if(f.length===1&&f[0]===Mi&&S===!1)we=f;else if(he.length===1&&he[0]===Mi)we=f;else for(let Ae=0;Ae<he.length;Ae++)for(let xe=0;xe<f.length;xe++)if(f[xe]===he[Ae]||f[xe]===Mi){we.push(he[Ae]);break}let Ke={result:we.length>0,resultCode:0,resultMessage:we.length>0?L:'Zero "userConstrPolicies" array, no intersections with "authConstrPolicies"',authConstrPolicies:he,userConstrPolicies:we,explicitPolicyIndicator:S,policyMappings:le,certificatePath:this.certs};if(we.length===0||Ke.result===!1)return Ke;H=1;for(let Ae=this.certs.length-2;Ae>=0;Ae--,H++){let xe=this.certs[Ae],je=[],Je=[],Ze=[];if(xe.extensions)for(let se=0;se<xe.extensions.length;se++){let z=xe.extensions[se];z.extnID===GF&&("permittedSubtrees"in z.parsedValue&&(Je=Je.concat(z.parsedValue.permittedSubtrees)),"excludedSubtrees"in z.parsedValue&&(Ze=Ze.concat(z.parsedValue.excludedSubtrees))),z.extnID===qF&&(je=je.concat(z.parsedValue.altNames))}let lt=q.length<=0;for(let se=0;se<q.length;se++)switch(q[se].base.type){case 4:{if(q[se].base.value.typesAndValues.length!==xe.subject.typesAndValues.length)continue;lt=!0;for(let z=0;z<xe.subject.typesAndValues.length;z++)if(xe.subject.typesAndValues[z].type!==q[se].base.value.typesAndValues[z].type){lt=!1;break}if(lt===!0)break}break;default:}if(lt===!1)throw Ke.result=!1,Ke.resultCode=21,Ke.resultMessage="No necessary name form found",Ke;let O=[[],[],[],[],[]];for(let se=0;se<F.length;se++)switch(F[se].base.type){case 1:O[0].push(F[se]);break;case 2:O[1].push(F[se]);break;case 4:O[2].push(F[se]);break;case 6:O[3].push(F[se]);break;case 7:O[4].push(F[se]);break;default:}for(let se=0;se<5;se++){let z=!1,Ge=!1,Re=O[se];for(let Ce=0;Ce<Re.length;Ce++){switch(se){case 0:if(je.length>0)for(let ft=0;ft<je.length;ft++)je[ft].type===1&&(Ge=!0,z=z||s(je[ft].value,Re[Ce].base.value));else for(let ft=0;ft<xe.subject.typesAndValues.length;ft++)(xe.subject.typesAndValues[ft].type==="1.2.840.113549.1.9.1"||xe.subject.typesAndValues[ft].type==="0.9.2342.19200300.100.1.3")&&(Ge=!0,z=z||s(xe.subject.typesAndValues[ft].value.valueBlock.value,Re[Ce].base.value));break;case 1:if(je.length>0)for(let ft=0;ft<je.length;ft++)je[ft].type===2&&(Ge=!0,z=z||n(je[ft].value,Re[Ce].base.value));break;case 2:Ge=!0,z=u(xe.subject,Re[Ce].base.value);break;case 3:if(je.length>0)for(let ft=0;ft<je.length;ft++)je[ft].type===6&&(Ge=!0,z=z||i(je[ft].value,Re[Ce].base.value));break;case 4:if(je.length>0)for(let ft=0;ft<je.length;ft++)je[ft].type===7&&(Ge=!0,z=z||a(je[ft].value,Re[Ce].base.value));break;default:}if(z)break}if(z===!1&&Re.length>0&&Ge)throw Ke.result=!1,Ke.resultCode=41,Ke.resultMessage='Failed to meet "permitted sub-trees" name constraint',Ke}let D=!1;for(let se=0;se<R.length;se++){switch(R[se].base.type){case 1:if(je.length>=0)for(let z=0;z<je.length;z++)je[z].type===1&&(D=D||s(je[z].value,R[se].base.value));else for(let z=0;z<xe.subject.typesAndValues.length;z++)(xe.subject.typesAndValues[z].type==="1.2.840.113549.1.9.1"||xe.subject.typesAndValues[z].type==="0.9.2342.19200300.100.1.3")&&(D=D||s(xe.subject.typesAndValues[z].value.valueBlock.value,R[se].base.value));break;case 2:if(je.length>0)for(let z=0;z<je.length;z++)je[z].type===2&&(D=D||n(je[z].value,R[se].base.value));break;case 4:D=D||u(xe.subject,R[se].base.value);break;case 6:if(je.length>0)for(let z=0;z<je.length;z++)je[z].type===6&&(D=D||i(je[z].value,R[se].base.value));break;case 7:if(je.length>0)for(let z=0;z<je.length;z++)je[z].type===7&&(D=D||a(je[z].value,R[se].base.value));break;default:}if(D)break}if(D===!0)throw Ke.result=!1,Ke.resultCode=42,Ke.resultMessage='Failed to meet "excluded sub-trees" name constraint',Ke;F=F.concat(Je),R=R.concat(Ze)}return Ke}catch(c){return c instanceof Error?c instanceof gm?{result:!1,resultCode:c.code,resultMessage:c.message,error:c}:{result:!1,resultCode:yh.unknown,resultMessage:c.message,error:c}:c&&typeof c=="object"&&"resultMessage"in c?c:{result:!1,resultCode:-1,resultMessage:`${c}`}}}},ZE="tbsResponseData",wy="signatureAlgorithm",Sy="signature",vm="certs",Qy="BasicOCSPResponse",WB=`${Qy}.${ZE}`,zB=`${Qy}.${wy}`,JB=`${Qy}.${Sy}`,eA=`${Qy}.${vm}`,Pfe=[WB,zB,JB,eA],Xy=class nh extends _e{static{o(this,"BasicOCSPResponse")}constructor(e={}){super(),this.tbsResponseData=B(e,ZE,nh.defaultValues(ZE)),this.signatureAlgorithm=B(e,wy,nh.defaultValues(wy)),this.signature=B(e,Sy,nh.defaultValues(Sy)),vm in e&&(this.certs=B(e,vm,nh.defaultValues(vm))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ZE:return new eu;case wy:return new ve;case Sy:return new qt;case vm:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case"type":{let n=eu.compareWithDefault("tbs",t.tbs)&&eu.compareWithDefault("responderID",t.responderID)&&eu.compareWithDefault("producedAt",t.producedAt)&&eu.compareWithDefault("responses",t.responses);return"responseExtensions"in t&&(n=n&&eu.compareWithDefault("responseExtensions",t.responseExtensions)),n}case wy:return t.algorithmId===L&&!("algorithmParams"in t);case Sy:return t.isEqual(nh.defaultValues(e));case vm:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||Qy,value:[eu.schema(t.tbsResponseData||{names:{blockName:WB}}),ve.schema(t.signatureAlgorithm||{names:{blockName:zB}}),new qt({name:t.signature||JB}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new W({value:[new Tt({name:eA,value:cs.schema(t.certs||{})})]})]})]})}fromSchema(e){De(e,Pfe);let t=Ie(e,e,nh.schema());be.assertSchema(t,this.className),this.tbsResponseData=new eu({schema:t.result[WB]}),this.signatureAlgorithm=new ve({schema:t.result[zB]}),this.signature=t.result[JB],eA in t.result&&(this.certs=Array.from(t.result[eA],n=>new cs({schema:n})))}toSchema(){let e=[];return e.push(this.tbsResponseData.toSchema()),e.push(this.signatureAlgorithm.toSchema()),e.push(this.signature),this.certs&&e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[new W({value:Array.from(this.certs,t=>t.toSchema())})]})),new W({value:e})}toJSON(){let e={tbsResponseData:this.tbsResponseData.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signature:this.signature.toJSON()};return this.certs&&(e.certs=Array.from(this.certs,t=>t.toJSON())),e}async getCertificateStatus(e,t,n=Dt(!0)){let s={isForCertificate:!1,status:2},i={},a=[];for(let u of this.tbsResponseData.responses){let c=n.getAlgorithmByOID(u.certID.hashAlgorithm.algorithmId,!0,"CertID.hashAlgorithm");if(!i[c.name]){i[c.name]=1;let f=new ci;a.push(f),await f.createForCertificate(e,{hashAlgorithm:c.name,issuerCertificate:t},n)}}for(let u of this.tbsResponseData.responses)for(let c of a)if(u.certID.isEqual(c)){s.isForCertificate=!0;try{switch(u.certStatus.idBlock.isConstructed){case!0:u.certStatus.idBlock.tagNumber===1&&(s.status=1);break;case!1:switch(u.certStatus.idBlock.tagNumber){case 0:s.status=0;break;case 2:s.status=2;break;default:}break;default:}}catch{}return s}return s}async sign(e,t="SHA-1",n=Dt(!0)){if(!e)throw new Error("Need to provide a private key for signing");let s=await n.getSignatureParameters(e,t),i=s.parameters.algorithm;if(!("name"in i))throw new Error("Empty algorithm");this.signatureAlgorithm=s.signatureAlgorithm,this.tbsResponseData.tbsView=new Uint8Array(this.tbsResponseData.toSchema(!0).toBER());let a=await n.signWithPrivateKey(this.tbsResponseData.tbsView,e,{algorithm:i});this.signature=new qt({valueHex:a})}async verify(e={},t=Dt(!0)){let n=null,s=-1,i=e.trustedCerts||[];if(!this.certs)throw new Error("No certificates attached to the BasicOCSPResponse");switch(!0){case this.tbsResponseData.responderID instanceof Vr:for(let[f,h]of this.certs.entries())if(h.subject.isEqual(this.tbsResponseData.responderID)){s=f;break}break;case this.tbsResponseData.responderID instanceof Ve:for(let[f,h]of this.certs.entries()){let m=await t.digest({name:"sha-1"},h.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView);if(fc(m,this.tbsResponseData.responderID.valueBlock.valueHex)){s=f;break}}break;default:throw new Error("Wrong value for responderID")}if(s===-1)throw new Error("Correct certificate was not found in OCSP response");n=this.certs[s];let a=[n];for(let f of this.certs){let h=await v9(f,n);h&&a.push(h)}if(!(await new N9({certs:a,trustedCerts:i}).verify({},t)).result)throw new Error("Validation of signer's certificate failed");return t.verifyWithPublicKey(this.tbsResponseData.tbsView,this.signature,this.certs[s].subjectPublicKeyInfo,this.signatureAlgorithm)}};Xy.CLASS_NAME="BasicOCSPResponse";var tB="tbs",rB="version",nB="subject",sB="subjectPublicKeyInfo",ud="attributes",by="signatureAlgorithm",Ey="signatureValue",zm="CertificationRequestInfo",TD=`${zm}.version`,ID=`${zm}.subject`,_D=`${zm}.subjectPublicKeyInfo`,MA=`${zm}.attributes`,Ofe=[zm,TD,ID,_D,MA,by,Ey];function kfe(r={}){let e=B(r,"names",{});return new W({name:e.CertificationRequestInfo||zm,value:[new ge({name:e.CertificationRequestInfoVersion||TD}),Vr.schema(e.subject||{names:{blockName:ID}}),va.schema({names:{blockName:_D}}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Tt({optional:!0,name:e.CertificationRequestInfoAttributes||MA,value:nn.schema(e.attributes||{})})]})]})}o(kfe,"CertificationRequestInfo");var Lfe=class so extends _e{static{o(this,"CertificationRequest")}get tbs(){return mt.toArrayBuffer(this.tbsView)}set tbs(e){this.tbsView=new Uint8Array(e)}constructor(e={}){super(),this.tbsView=new Uint8Array(B(e,tB,so.defaultValues(tB))),this.version=B(e,rB,so.defaultValues(rB)),this.subject=B(e,nB,so.defaultValues(nB)),this.subjectPublicKeyInfo=B(e,sB,so.defaultValues(sB)),ud in e&&(this.attributes=B(e,ud,so.defaultValues(ud))),this.signatureAlgorithm=B(e,by,so.defaultValues(by)),this.signatureValue=B(e,Ey,so.defaultValues(Ey)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case tB:return rn;case rB:return 0;case nB:return new Vr;case sB:return new va;case ud:return[];case by:return new ve;case Ey:return new qt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({value:[kfe(t.certificationRequestInfo||{}),new W({name:t.signatureAlgorithm||by,value:[new nt,new wt({optional:!0})]}),new qt({name:t.signatureValue||Ey})]})}fromSchema(e){De(e,Ofe);let t=Ie(e,e,so.schema());be.assertSchema(t,this.className),this.tbsView=t.result.CertificationRequestInfo.valueBeforeDecodeView,this.version=t.result[TD].valueBlock.valueDec,this.subject=new Vr({schema:t.result[ID]}),this.subjectPublicKeyInfo=new va({schema:t.result[_D]}),MA in t.result&&(this.attributes=Array.from(t.result[MA],n=>new nn({schema:n}))),this.signatureAlgorithm=new ve({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}encodeTBS(){let e=[new ge({value:this.version}),this.subject.toSchema(),this.subjectPublicKeyInfo.toSchema()];return ud in this&&e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.attributes||[],t=>t.toSchema())})),new W({value:e})}toSchema(e=!1){let t;if(e===!1){if(this.tbsView.byteLength===0)return so.schema();let n=Gr(this.tbsView);be.assert(n,"PKCS#10 Certificate Request"),t=n.result}else t=this.encodeTBS();return new W({value:[t,this.signatureAlgorithm.toSchema(),this.signatureValue]})}toJSON(){let e={tbs:Et.ToHex(this.tbsView),version:this.version,subject:this.subject.toJSON(),subjectPublicKeyInfo:this.subjectPublicKeyInfo.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signatureValue:this.signatureValue.toJSON()};return ud in this&&(e.attributes=Array.from(this.attributes||[],t=>t.toJSON())),e}async sign(e,t="SHA-1",n=Dt(!0)){if(!e)throw new Error("Need to provide a private key for signing");let s=await n.getSignatureParameters(e,t),i=s.parameters;this.signatureAlgorithm=s.signatureAlgorithm,this.tbsView=new Uint8Array(this.encodeTBS().toBER());let a=await n.signWithPrivateKey(this.tbsView,e,i);this.signatureValue=new qt({valueHex:a})}async verify(e=Dt(!0)){return e.verifyWithPublicKey(this.tbsView,this.signatureValue,this.subjectPublicKeyInfo,this.signatureAlgorithm)}async getPublicKey(e,t=Dt(!0)){return t.getPublicKey(this.subjectPublicKeyInfo,this.signatureAlgorithm,e)}};Lfe.CLASS_NAME="CertificationRequest";var sh="digestAlgorithm",ih="digest",Vfe=[sh,ih],xh=class Ay extends _e{static{o(this,"DigestInfo")}constructor(e={}){super(),this.digestAlgorithm=B(e,sh,Ay.defaultValues(sh)),this.digest=B(e,ih,Ay.defaultValues(ih)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case sh:return new ve;case ih:return new Ve;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case sh:return ve.compareWithDefault("algorithmId",t.algorithmId)&&!("algorithmParams"in t);case ih:return t.isEqual(Ay.defaultValues(e));default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[ve.schema(t.digestAlgorithm||{names:{blockName:sh}}),new Ve({name:t.digest||ih})]})}fromSchema(e){De(e,Vfe);let t=Ie(e,e,Ay.schema({names:{digestAlgorithm:{names:{blockName:sh}},digest:ih}}));be.assertSchema(t,this.className),this.digestAlgorithm=new ve({schema:t.result.digestAlgorithm}),this.digest=t.result.digest}toSchema(){return new W({value:[this.digestAlgorithm.toSchema(),this.digest]})}toJSON(){return{digestAlgorithm:this.digestAlgorithm.toJSON(),digest:this.digest.toJSON()}}};xh.CLASS_NAME="DigestInfo";var ym="eContentType",da="eContent",Ufe=[ym,da],wh=class ah extends _e{static{o(this,"EncapsulatedContentInfo")}constructor(e={}){if(super(),this.eContentType=B(e,ym,ah.defaultValues(ym)),da in e&&(this.eContent=B(e,da,ah.defaultValues(da)),this.eContent.idBlock.tagClass===1&&this.eContent.idBlock.tagNumber===4&&this.eContent.idBlock.isConstructed===!1)){let t=new Ve({idBlock:{isConstructed:!0},isConstructed:!0}),n=0,s=this.eContent.valueBlock.valueHexView.slice().buffer,i=s.byteLength;for(;i>0;){let a=new Uint8Array(s,n,n+65536>s.byteLength?s.byteLength-n:65536),u=new ArrayBuffer(a.length),c=new Uint8Array(u);for(let f=0;f<c.length;f++)c[f]=a[f];t.valueBlock.value.push(new Ve({valueHex:u})),i-=a.length,n+=a.length}this.eContent=t}e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ym:return L;case da:return new Ve;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case ym:return t===L;case da:return t.idBlock.tagClass===1&&t.idBlock.tagNumber===4?t.isEqual(ah.defaultValues(da)):!1;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new nt({name:t.eContentType||L}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new wt({name:t.eContent||L})]})]})}fromSchema(e){De(e,Ufe);let t=Ie(e,e,ah.schema({names:{eContentType:ym,eContent:da}}));be.assertSchema(t,this.className),this.eContentType=t.result.eContentType.valueBlock.toString(),da in t.result&&(this.eContent=t.result.eContent)}toSchema(){let e=[];return e.push(new nt({value:this.eContentType})),this.eContent&&ah.compareWithDefault(da,this.eContent)===!1&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[this.eContent]})),new W({value:e})}toJSON(){let e={eContentType:this.eContentType};return this.eContent&&ah.compareWithDefault(da,this.eContent)===!1&&(e.eContent=this.eContent.toJSON()),e}};wh.CLASS_NAME="EncapsulatedContentInfo";var oh="mac",uh="macSalt",tu="iterations",jfe=[oh,uh,tu],il=class ch extends _e{static{o(this,"MacData")}constructor(e={}){super(),this.mac=B(e,oh,ch.defaultValues(oh)),this.macSalt=B(e,uh,ch.defaultValues(uh)),tu in e&&(this.iterations=B(e,tu,ch.defaultValues(tu))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case oh:return new xh;case uh:return new Ve;case tu:return 1;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case oh:return xh.compareWithDefault("digestAlgorithm",t.digestAlgorithm)&&xh.compareWithDefault("digest",t.digest);case uh:return t.isEqual(ch.defaultValues(e));case tu:return t===ch.defaultValues(e);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,optional:t.optional||!0,value:[xh.schema(t.mac||{names:{blockName:oh}}),new Ve({name:t.macSalt||uh}),new ge({optional:!0,name:t.iterations||tu})]})}fromSchema(e){De(e,jfe);let t=Ie(e,e,ch.schema({names:{mac:{names:{blockName:oh}},macSalt:uh,iterations:tu}}));be.assertSchema(t,this.className),this.mac=new xh({schema:t.result.mac}),this.macSalt=t.result.macSalt,tu in t.result&&(this.iterations=t.result.iterations.valueBlock.valueDec)}toSchema(){let e=[this.mac.toSchema(),this.macSalt];return this.iterations!==void 0&&e.push(new ge({value:this.iterations})),new W({value:e})}toJSON(){let e={mac:this.mac.toJSON(),macSalt:this.macSalt.toJSON()};return this.iterations!==void 0&&(e.iterations=this.iterations),e}};il.CLASS_NAME="MacData";var Sh="hashAlgorithm",bh="hashedMessage",Mfe=[Sh,bh],ga=class xm extends _e{static{o(this,"MessageImprint")}static async create(e,t,n=Dt(!0)){let s=n.getOIDByAlgorithm({name:e},!0,"hashAlgorithm"),i=await n.digest(e,t);return new xm({hashAlgorithm:new ve({algorithmId:s,algorithmParams:new Xr}),hashedMessage:new Ve({valueHex:i})})}constructor(e={}){super(),this.hashAlgorithm=B(e,Sh,xm.defaultValues(Sh)),this.hashedMessage=B(e,bh,xm.defaultValues(bh)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Sh:return new ve;case bh:return new Ve;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Sh:return t.algorithmId===L&&!("algorithmParams"in t);case bh:return t.isEqual(xm.defaultValues(e))===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[ve.schema(t.hashAlgorithm||{}),new Ve({name:t.hashedMessage||L})]})}fromSchema(e){De(e,Mfe);let t=Ie(e,e,xm.schema({names:{hashAlgorithm:{names:{blockName:Sh}},hashedMessage:bh}}));be.assertSchema(t,this.className),this.hashAlgorithm=new ve({schema:t.result.hashAlgorithm}),this.hashedMessage=t.result.hashedMessage}toSchema(){return new W({value:[this.hashAlgorithm.toSchema(),this.hashedMessage]})}toJSON(){return{hashAlgorithm:this.hashAlgorithm.toJSON(),hashedMessage:this.hashedMessage.toJSON()}}};ga.CLASS_NAME="MessageImprint";var wm="reqCert",al="singleRequestExtensions",Ffe=[wm,al],FA=class Cy extends _e{static{o(this,"Request")}constructor(e={}){super(),this.reqCert=B(e,wm,Cy.defaultValues(wm)),al in e&&(this.singleRequestExtensions=B(e,al,Cy.defaultValues(al))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case wm:return new ci;case al:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case wm:return t.isEqual(Cy.defaultValues(e));case al:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[ci.schema(t.reqCert||{}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[An.schema(t.extensions||{names:{blockName:t.singleRequestExtensions||L}})]})]})}fromSchema(e){De(e,Ffe);let t=Ie(e,e,Cy.schema({names:{reqCert:{names:{blockName:wm}},extensions:{names:{blockName:al}}}}));be.assertSchema(t,this.className),this.reqCert=new ci({schema:t.result.reqCert}),al in t.result&&(this.singleRequestExtensions=Array.from(t.result.singleRequestExtensions.valueBlock.value,n=>new Ki({schema:n})))}toSchema(){let e=[];return e.push(this.reqCert.toSchema()),this.singleRequestExtensions&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new W({value:Array.from(this.singleRequestExtensions,t=>t.toSchema())})]})),new W({value:e})}toJSON(){let e={reqCert:this.reqCert.toJSON()};return this.singleRequestExtensions&&(e.singleRequestExtensions=Array.from(this.singleRequestExtensions,t=>t.toJSON())),e}};FA.CLASS_NAME="Request";var iE="tbs",Sm="version",bm="requestorName",aE="requestList",Em="requestExtensions",Jm="TBSRequest",tA=`${Jm}.${Sm}`,rA=`${Jm}.${bm}`,YB=`${Jm}.requests`,nA=`${Jm}.${Em}`,qfe=[Jm,tA,rA,YB,nA],ru=class nu extends _e{static{o(this,"TBSRequest")}get tbs(){return mt.toArrayBuffer(this.tbsView)}set tbs(e){this.tbsView=new Uint8Array(e)}constructor(e={}){super(),this.tbsView=new Uint8Array(B(e,iE,nu.defaultValues(iE))),Sm in e&&(this.version=B(e,Sm,nu.defaultValues(Sm))),bm in e&&(this.requestorName=B(e,bm,nu.defaultValues(bm))),this.requestList=B(e,aE,nu.defaultValues(aE)),Em in e&&(this.requestExtensions=B(e,Em,nu.defaultValues(Em))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case iE:return rn;case Sm:return 0;case bm:return new Cr;case aE:case Em:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case iE:return t.byteLength===0;case Sm:return t===nu.defaultValues(e);case bm:return t.type===Cr.defaultValues("type")&&Object.keys(t.value).length===0;case aE:case Em:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||Jm,value:[new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new ge({name:t.TBSRequestVersion||tA})]}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[Cr.schema(t.requestorName||{names:{blockName:rA}})]}),new W({name:t.requestList||"TBSRequest.requestList",value:[new Tt({name:t.requests||YB,value:FA.schema(t.requestNames||{})})]}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:2},value:[An.schema(t.extensions||{names:{blockName:t.requestExtensions||nA}})]})]})}fromSchema(e){De(e,qfe);let t=Ie(e,e,nu.schema());be.assertSchema(t,this.className),this.tbsView=t.result.TBSRequest.valueBeforeDecodeView,tA in t.result&&(this.version=t.result[tA].valueBlock.valueDec),rA in t.result&&(this.requestorName=new Cr({schema:t.result[rA]})),this.requestList=Array.from(t.result[YB],n=>new FA({schema:n})),nA in t.result&&(this.requestExtensions=Array.from(t.result[nA].valueBlock.value,n=>new Ki({schema:n})))}toSchema(e=!1){let t;if(e===!1){if(this.tbsView.byteLength===0)return nu.schema();let n=Gr(this.tbsView);if(be.assert(n,"TBS Request"),!(n.result instanceof W))throw new Error("ASN.1 result should be SEQUENCE");t=n.result}else{let n=[];this.version!==void 0&&n.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[new ge({value:this.version})]})),this.requestorName&&n.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:[this.requestorName.toSchema()]})),n.push(new W({value:Array.from(this.requestList,s=>s.toSchema())})),this.requestExtensions&&n.push(new oe({idBlock:{tagClass:3,tagNumber:2},value:[new W({value:Array.from(this.requestExtensions,s=>s.toSchema())})]})),t=new W({value:n})}return t}toJSON(){let e={};return this.version!=null&&(e.version=this.version),this.requestorName&&(e.requestorName=this.requestorName.toJSON()),e.requestList=Array.from(this.requestList,t=>t.toJSON()),this.requestExtensions&&(e.requestExtensions=Array.from(this.requestExtensions,t=>t.toJSON())),e}};ru.CLASS_NAME="TBSRequest";var cd="signatureAlgorithm",ld="signature",wc="certs",lh=class Am extends _e{static{o(this,"Signature")}constructor(e={}){super(),this.signatureAlgorithm=B(e,cd,Am.defaultValues(cd)),this.signature=B(e,ld,Am.defaultValues(ld)),wc in e&&(this.certs=B(e,wc,Am.defaultValues(wc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case cd:return new ve;case ld:return new qt;case wc:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case cd:return t.algorithmId===L&&!("algorithmParams"in t);case ld:return t.isEqual(Am.defaultValues(e));case wc:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[ve.schema(t.signatureAlgorithm||{}),new qt({name:t.signature||L}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new W({value:[new Tt({name:t.certs||L,value:cs.schema({})})]})]})]})}fromSchema(e){De(e,[cd,ld,wc]);let t=Ie(e,e,Am.schema({names:{signatureAlgorithm:{names:{blockName:cd}},signature:ld,certs:wc}}));be.assertSchema(t,this.className),this.signatureAlgorithm=new ve({schema:t.result.signatureAlgorithm}),this.signature=t.result.signature,wc in t.result&&(this.certs=Array.from(t.result.certs,n=>new cs({schema:n})))}toSchema(){let e=[];return e.push(this.signatureAlgorithm.toSchema()),e.push(this.signature),this.certs&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new W({value:Array.from(this.certs,t=>t.toSchema())})]})),new W({value:e})}toJSON(){let e={signatureAlgorithm:this.signatureAlgorithm.toJSON(),signature:this.signature.toJSON()};return this.certs&&(e.certs=Array.from(this.certs,t=>t.toJSON())),e}};lh.CLASS_NAME="Signature";var Cm="tbsRequest",ol="optionalSignature",Hfe=[Cm,ol],Kfe=class sA extends _e{static{o(this,"OCSPRequest")}constructor(e={}){super(),this.tbsRequest=B(e,Cm,sA.defaultValues(Cm)),ol in e&&(this.optionalSignature=B(e,ol,sA.defaultValues(ol))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Cm:return new ru;case ol:return new lh;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Cm:return ru.compareWithDefault("tbs",t.tbs)&&ru.compareWithDefault("version",t.version)&&ru.compareWithDefault("requestorName",t.requestorName)&&ru.compareWithDefault("requestList",t.requestList)&&ru.compareWithDefault("requestExtensions",t.requestExtensions);case ol:return lh.compareWithDefault("signatureAlgorithm",t.signatureAlgorithm)&&lh.compareWithDefault("signature",t.signature)&&lh.compareWithDefault("certs",t.certs);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||"OCSPRequest",value:[ru.schema(t.tbsRequest||{names:{blockName:Cm}}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[lh.schema(t.optionalSignature||{names:{blockName:ol}})]})]})}fromSchema(e){De(e,Hfe);let t=Ie(e,e,sA.schema());be.assertSchema(t,this.className),this.tbsRequest=new ru({schema:t.result.tbsRequest}),ol in t.result&&(this.optionalSignature=new lh({schema:t.result.optionalSignature}))}toSchema(e=!1){let t=[];return t.push(this.tbsRequest.toSchema(e)),this.optionalSignature&&t.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[this.optionalSignature.toSchema()]})),new W({value:t})}toJSON(){let e={tbsRequest:this.tbsRequest.toJSON()};return this.optionalSignature&&(e.optionalSignature=this.optionalSignature.toJSON()),e}async createForCertificate(e,t,n=Dt(!0)){let s=new ci;await s.createForCertificate(e,t,n),this.tbsRequest.requestList.push(new FA({reqCert:s}))}async sign(e,t="SHA-1",n=Dt(!0)){if(pr.assertEmpty(e,"privateKey","OCSPRequest.sign method"),!this.optionalSignature)throw new Error('Need to create "optionalSignature" field before signing');let s=await n.getSignatureParameters(e,t),i=s.parameters;this.optionalSignature.signatureAlgorithm=s.signatureAlgorithm;let a=this.tbsRequest.toSchema(!0).toBER(!1),u=await n.signWithPrivateKey(a,e,i);this.optionalSignature.signature=new qt({valueHex:u})}verify(){}};Kfe.CLASS_NAME="OCSPRequest";var Nm="responseType",Tm="response",$fe=[Nm,Tm],Im=class Ny extends _e{static{o(this,"ResponseBytes")}constructor(e={}){super(),this.responseType=B(e,Nm,Ny.defaultValues(Nm)),this.response=B(e,Tm,Ny.defaultValues(Tm)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Nm:return L;case Tm:return new Ve;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Nm:return t===L;case Tm:return t.isEqual(Ny.defaultValues(e));default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new nt({name:t.responseType||L}),new Ve({name:t.response||L})]})}fromSchema(e){De(e,$fe);let t=Ie(e,e,Ny.schema({names:{responseType:Nm,response:Tm}}));be.assertSchema(t,this.className),this.responseType=t.result.responseType.valueBlock.toString(),this.response=t.result.response}toSchema(){return new W({value:[new nt({value:this.responseType}),this.response]})}toJSON(){return{responseType:this.responseType,response:this.response.toJSON()}}};Im.CLASS_NAME="ResponseBytes";var fd="responseStatus",qo="responseBytes",Gfe=class Ty extends _e{static{o(this,"OCSPResponse")}constructor(e={}){super(),this.responseStatus=B(e,fd,Ty.defaultValues(fd)),qo in e&&(this.responseBytes=B(e,qo,Ty.defaultValues(qo))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case fd:return new pc;case qo:return new Im;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case fd:return t.isEqual(Ty.defaultValues(e));case qo:return Im.compareWithDefault("responseType",t.responseType)&&Im.compareWithDefault("response",t.response);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||"OCSPResponse",value:[new pc({name:t.responseStatus||fd}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[Im.schema(t.responseBytes||{names:{blockName:qo}})]})]})}fromSchema(e){De(e,[fd,qo]);let t=Ie(e,e,Ty.schema());be.assertSchema(t,this.className),this.responseStatus=t.result.responseStatus,qo in t.result&&(this.responseBytes=new Im({schema:t.result.responseBytes}))}toSchema(){let e=[];return e.push(this.responseStatus),this.responseBytes&&e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[this.responseBytes.toSchema()]})),new W({value:e})}toJSON(){let e={responseStatus:this.responseStatus.toJSON()};return this.responseBytes&&(e.responseBytes=this.responseBytes.toJSON()),e}async getCertificateStatus(e,t,n=Dt(!0)){let s,i={isForCertificate:!1,status:2};if(!this.responseBytes||this.responseBytes.responseType!==hE)return i;try{let a=Gr(this.responseBytes.response.valueBlock.valueHexView);be.assert(a,"Basic OCSP response"),s=new Xy({schema:a.result})}catch{return i}return s.getCertificateStatus(e,t,n)}async sign(e,t,n=Dt(!0)){var s;if(this.responseBytes&&this.responseBytes.responseType===hE)return Xy.fromBER(this.responseBytes.response.valueBlock.valueHexView).sign(e,t,n);throw new Error(`Unknown ResponseBytes type: ${((s=this.responseBytes)===null||s===void 0?void 0:s.responseType)||"Unknown"}`)}async verify(e=null,t=Dt(!0)){var n;if(!(qo in this))throw new Error("Empty ResponseBytes field");if(this.responseBytes&&this.responseBytes.responseType===hE){let s=Xy.fromBER(this.responseBytes.response.valueBlock.valueHexView);return e!==null&&(s.certs||(s.certs=[]),s.certs.push(e)),s.verify({},t)}throw new Error(`Unknown ResponseBytes type: ${((n=this.responseBytes)===null||n===void 0?void 0:n.responseType)||"Unknown"}`)}};Gfe.CLASS_NAME="OCSPResponse";var of="type",su="attributes",oE="encodedValue",Xfe=[su],Gs=class io extends _e{static{o(this,"SignedAndUnsignedAttributes")}constructor(e={}){super(),this.type=B(e,of,io.defaultValues(of)),this.attributes=B(e,su,io.defaultValues(su)),this.encodedValue=B(e,oE,io.defaultValues(oE)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case of:return-1;case su:return[];case oE:return rn;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case of:return t===io.defaultValues(of);case su:return t.length===0;case oE:return t.byteLength===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new oe({name:t.blockName||L,optional:!0,idBlock:{tagClass:3,tagNumber:t.tagNumber||0},value:[new Tt({name:t.attributes||L,value:nn.schema()})]})}fromSchema(e){De(e,Xfe);let t=Ie(e,e,io.schema({names:{tagNumber:this.type,attributes:su}}));be.assertSchema(t,this.className),this.type=t.result.idBlock.tagNumber,this.encodedValue=mt.toArrayBuffer(t.result.valueBeforeDecodeView);let n=new Uint8Array(this.encodedValue);if(n[0]=49,!(su in t.result)){if(this.type===0)throw new Error("Wrong structure of SignedUnsignedAttributes");return}this.attributes=Array.from(t.result.attributes,s=>new nn({schema:s}))}toSchema(){if(io.compareWithDefault(of,this.type)||io.compareWithDefault(su,this.attributes))throw new Error('Incorrectly initialized "SignedAndUnsignedAttributes" class');return new oe({optional:!0,idBlock:{tagClass:3,tagNumber:this.type},value:Array.from(this.attributes,e=>e.toSchema())})}toJSON(){if(io.compareWithDefault(of,this.type)||io.compareWithDefault(su,this.attributes))throw new Error('Incorrectly initialized "SignedAndUnsignedAttributes" class');return{type:this.type,attributes:Array.from(this.attributes,e=>e.toJSON())}}};Gs.CLASS_NAME="SignedAndUnsignedAttributes";var _m="version",fh="sid",Bm="digestAlgorithm",ul="signedAttrs",Dm="signatureAlgorithm",Iy="signature",cl="unsignedAttrs",ml="SignerInfo",QB=`${ml}.${_m}`,_y=`${ml}.${fh}`,ZB=`${ml}.${Bm}`,iA=`${ml}.${ul}`,eD=`${ml}.${Dm}`,tD=`${ml}.${Iy}`,aA=`${ml}.${cl}`,Wfe=[QB,_y,ZB,iA,eD,tD,aA],qA=class Ln extends _e{static{o(this,"SignerInfo")}constructor(e={}){super(),this.version=B(e,_m,Ln.defaultValues(_m)),this.sid=B(e,fh,Ln.defaultValues(fh)),this.digestAlgorithm=B(e,Bm,Ln.defaultValues(Bm)),ul in e&&(this.signedAttrs=B(e,ul,Ln.defaultValues(ul))),this.signatureAlgorithm=B(e,Dm,Ln.defaultValues(Dm)),this.signature=B(e,Iy,Ln.defaultValues(Iy)),cl in e&&(this.unsignedAttrs=B(e,cl,Ln.defaultValues(cl))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case _m:return 0;case fh:return new wt;case Bm:return new ve;case ul:return new Gs({type:0});case Dm:return new ve;case Iy:return new Ve;case cl:return new Gs({type:1});default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case _m:return Ln.defaultValues(_m)===t;case fh:return t instanceof wt;case Bm:return t instanceof ve?t.isEqual(Ln.defaultValues(Bm)):!1;case ul:return Gs.compareWithDefault("type",t.type)&&Gs.compareWithDefault("attributes",t.attributes)&&Gs.compareWithDefault("encodedValue",t.encodedValue);case Dm:return t instanceof ve?t.isEqual(Ln.defaultValues(Dm)):!1;case Iy:case cl:return Gs.compareWithDefault("type",t.type)&&Gs.compareWithDefault("attributes",t.attributes)&&Gs.compareWithDefault("encodedValue",t.encodedValue);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:ml,value:[new ge({name:t.version||QB}),new Lr({value:[zn.schema(t.sidSchema||{names:{blockName:_y}}),new Lr({value:[new oe({optional:!0,name:t.sid||_y,idBlock:{tagClass:3,tagNumber:0},value:[new Ve]}),new vt({optional:!0,name:t.sid||_y,idBlock:{tagClass:3,tagNumber:0}})]})]}),ve.schema(t.digestAlgorithm||{names:{blockName:ZB}}),Gs.schema(t.signedAttrs||{names:{blockName:iA,tagNumber:0}}),ve.schema(t.signatureAlgorithm||{names:{blockName:eD}}),new Ve({name:t.signature||tD}),Gs.schema(t.unsignedAttrs||{names:{blockName:aA,tagNumber:1}})]})}fromSchema(e){De(e,Wfe);let t=Ie(e,e,Ln.schema());be.assertSchema(t,this.className),this.version=t.result[QB].valueBlock.valueDec;let n=t.result[_y];n.idBlock.tagClass===1?this.sid=new zn({schema:n}):this.sid=n,this.digestAlgorithm=new ve({schema:t.result[ZB]}),iA in t.result&&(this.signedAttrs=new Gs({type:0,schema:t.result[iA]})),this.signatureAlgorithm=new ve({schema:t.result[eD]}),this.signature=t.result[tD],aA in t.result&&(this.unsignedAttrs=new Gs({type:1,schema:t.result[aA]}))}toSchema(){if(Ln.compareWithDefault(fh,this.sid))throw new Error('Incorrectly initialized "SignerInfo" class');let e=[];return e.push(new ge({value:this.version})),this.sid instanceof zn?e.push(this.sid.toSchema()):e.push(this.sid),e.push(this.digestAlgorithm.toSchema()),this.signedAttrs&&Ln.compareWithDefault(ul,this.signedAttrs)===!1&&e.push(this.signedAttrs.toSchema()),e.push(this.signatureAlgorithm.toSchema()),e.push(this.signature),this.unsignedAttrs&&Ln.compareWithDefault(cl,this.unsignedAttrs)===!1&&e.push(this.unsignedAttrs.toSchema()),new W({value:e})}toJSON(){if(Ln.compareWithDefault(fh,this.sid))throw new Error('Incorrectly initialized "SignerInfo" class');let e={version:this.version,digestAlgorithm:this.digestAlgorithm.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signature:this.signature.toJSON()};return this.sid instanceof wt||(e.sid=this.sid.toJSON()),this.signedAttrs&&Ln.compareWithDefault(ul,this.signedAttrs)===!1&&(e.signedAttrs=this.signedAttrs.toJSON()),this.unsignedAttrs&&Ln.compareWithDefault(cl,this.unsignedAttrs)===!1&&(e.unsignedAttrs=this.unsignedAttrs.toJSON()),e}};qA.CLASS_NAME="SignerInfo";var By="version",Dy="policy",Ry="messageImprint",Py="serialNumber",Oy="genTime",hh="ordering",ph="nonce",Rm="accuracy",Pm="tsa",Om="extensions",ya="TSTInfo",rD=`${ya}.${By}`,nD=`${ya}.${Dy}`,sD=`${ya}.${Ry}`,iD=`${ya}.${Py}`,aD=`${ya}.${Oy}`,oA=`${ya}.${Rm}`,uA=`${ya}.${hh}`,cA=`${ya}.${ph}`,lA=`${ya}.${Pm}`,fA=`${ya}.${Om}`,zfe=[rD,nD,sD,iD,aD,oA,uA,cA,lA,fA],I9=class $s extends _e{static{o(this,"TSTInfo")}constructor(e={}){super(),this.version=B(e,By,$s.defaultValues(By)),this.policy=B(e,Dy,$s.defaultValues(Dy)),this.messageImprint=B(e,Ry,$s.defaultValues(Ry)),this.serialNumber=B(e,Py,$s.defaultValues(Py)),this.genTime=B(e,Oy,$s.defaultValues(Oy)),Rm in e&&(this.accuracy=B(e,Rm,$s.defaultValues(Rm))),hh in e&&(this.ordering=B(e,hh,$s.defaultValues(hh))),ph in e&&(this.nonce=B(e,ph,$s.defaultValues(ph))),Pm in e&&(this.tsa=B(e,Pm,$s.defaultValues(Pm))),Om in e&&(this.extensions=B(e,Om,$s.defaultValues(Om))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case By:return 0;case Dy:return L;case Ry:return new ga;case Py:return new ge;case Oy:return new Date(0,0,0);case Rm:return new uf;case hh:return!1;case ph:return new ge;case Pm:return new Cr;case Om:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case By:case Dy:case Oy:case hh:return t===$s.defaultValues(hh);case Ry:return ga.compareWithDefault(Sh,t.hashAlgorithm)&&ga.compareWithDefault(bh,t.hashedMessage);case Py:case ph:return t.isEqual($s.defaultValues(ph));case Rm:return uf.compareWithDefault(Sc,t.seconds)&&uf.compareWithDefault(bc,t.millis)&&uf.compareWithDefault(Ec,t.micros);case Pm:return Cr.compareWithDefault(xv,t.type)&&Cr.compareWithDefault(wv,t.value);case Om:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||ya,value:[new ge({name:t.version||rD}),new nt({name:t.policy||nD}),ga.schema(t.messageImprint||{names:{blockName:sD}}),new ge({name:t.serialNumber||iD}),new kr({name:t.genTime||aD}),uf.schema(t.accuracy||{names:{blockName:oA}}),new ua({name:t.ordering||uA,optional:!0}),new ge({name:t.nonce||cA,optional:!0}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[Cr.schema(t.tsa||{names:{blockName:lA}})]}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Tt({name:t.extensions||fA,value:Ki.schema(t.extension||{})})]})]})}fromSchema(e){De(e,zfe);let t=Ie(e,e,$s.schema());be.assertSchema(t,this.className),this.version=t.result[rD].valueBlock.valueDec,this.policy=t.result[nD].valueBlock.toString(),this.messageImprint=new ga({schema:t.result[sD]}),this.serialNumber=t.result[iD],this.genTime=t.result[aD].toDate(),oA in t.result&&(this.accuracy=new uf({schema:t.result[oA]})),uA in t.result&&(this.ordering=t.result[uA].valueBlock.value),cA in t.result&&(this.nonce=t.result[cA]),lA in t.result&&(this.tsa=new Cr({schema:t.result[lA]})),fA in t.result&&(this.extensions=Array.from(t.result[fA],n=>new Ki({schema:n})))}toSchema(){let e=[];return e.push(new ge({value:this.version})),e.push(new nt({value:this.policy})),e.push(this.messageImprint.toSchema()),e.push(this.serialNumber),e.push(new kr({valueDate:this.genTime})),this.accuracy&&e.push(this.accuracy.toSchema()),this.ordering!==void 0&&e.push(new ua({value:this.ordering})),this.nonce&&e.push(this.nonce),this.tsa&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[this.tsa.toSchema()]})),this.extensions&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.extensions,t=>t.toSchema())})),new W({value:e})}toJSON(){let e={version:this.version,policy:this.policy,messageImprint:this.messageImprint.toJSON(),serialNumber:this.serialNumber.toJSON(),genTime:this.genTime};return this.accuracy&&(e.accuracy=this.accuracy.toJSON()),this.ordering!==void 0&&(e.ordering=this.ordering),this.nonce&&(e.nonce=this.nonce.toJSON()),this.tsa&&(e.tsa=this.tsa.toJSON()),this.extensions&&(e.extensions=Array.from(this.extensions,t=>t.toJSON())),e}async verify(e,t=Dt(!0)){if(!e.data)throw new Error('"data" is a mandatory attribute for TST_INFO verification');let n=e.data;if(e.notBefore&&this.genTime<e.notBefore)throw new Error("Generation time for TSTInfo object is less than notBefore value");if(e.notAfter&&this.genTime>e.notAfter)throw new Error("Generation time for TSTInfo object is more than notAfter value");let s=t.getAlgorithmByOID(this.messageImprint.hashAlgorithm.algorithmId,!0,"MessageImprint.hashAlgorithm"),i=await t.digest(s.name,new Uint8Array(n));return mt.isEqual(i,this.messageImprint.hashedMessage.valueBlock.valueHexView)}};I9.CLASS_NAME="TSTInfo";var km="version",ky="digestAlgorithms",Ly="encapContentInfo",Lm="certificates",Vm="crls",Vy="signerInfos",mv="ocsps",Ih="SignedData",oD=`${Ih}.${km}`,hA=`${Ih}.${ky}`,uD=`${Ih}.${Ly}`,pA=`${Ih}.${Lm}`,dA=`${Ih}.${Vm}`,mA=`${Ih}.${Vy}`,Jfe=[oD,hA,uD,pA,dA,mA],as=class extends Error{static{o(this,"SignedDataVerifyError")}constructor({message:e,code:t=0,date:n=new Date,signatureVerified:s=null,signerCertificate:i=null,signerCertificateVerified:a=null,timestampSerial:u=null,certificatePath:c=[]}){super(e),this.name="SignedDataVerifyError",this.date=n,this.code=t,this.timestampSerial=u,this.signatureVerified=s,this.signerCertificate=i,this.signerCertificateVerified=a,this.certificatePath=c}},Wm=class ma extends _e{static{o(this,"SignedData")}constructor(e={}){super(),this.version=B(e,km,ma.defaultValues(km)),this.digestAlgorithms=B(e,ky,ma.defaultValues(ky)),this.encapContentInfo=B(e,Ly,ma.defaultValues(Ly)),Lm in e&&(this.certificates=B(e,Lm,ma.defaultValues(Lm))),Vm in e&&(this.crls=B(e,Vm,ma.defaultValues(Vm))),mv in e&&(this.ocsps=B(e,mv,ma.defaultValues(mv))),this.signerInfos=B(e,Vy,ma.defaultValues(Vy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case km:return 0;case ky:return[];case Ly:return new wh;case Lm:return[];case Vm:return[];case mv:return[];case Vy:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case km:return t===ma.defaultValues(km);case Ly:return wh.compareWithDefault("eContentType",t.eContentType)&&wh.compareWithDefault("eContent",t.eContent);case ky:case Lm:case Vm:case mv:case Vy:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return t.optional===void 0&&(t.optional=!1),new W({name:t.blockName||Ih,optional:t.optional,value:[new ge({name:t.version||oD}),new Wr({value:[new Tt({name:t.digestAlgorithms||hA,value:ve.schema()})]}),wh.schema(t.encapContentInfo||{names:{blockName:uD}}),new oe({name:t.certificates||pA,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:Ch.schema().valueBlock.value}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Hy.schema(t.crls||{names:{crls:dA}}).valueBlock.value}),new Wr({value:[new Tt({name:t.signerInfos||mA,value:qA.schema()})]})]})}fromSchema(e){De(e,Jfe);let t=Ie(e,e,ma.schema());if(be.assertSchema(t,this.className),this.version=t.result[oD].valueBlock.valueDec,hA in t.result&&(this.digestAlgorithms=Array.from(t.result[hA],n=>new ve({schema:n}))),this.encapContentInfo=new wh({schema:t.result[uD]}),pA in t.result){let n=new Ch({schema:new Wr({value:t.result[pA].valueBlock.value})});this.certificates=n.certificates.slice(0)}dA in t.result&&(this.crls=Array.from(t.result[dA],n=>n.idBlock.tagClass===1?new Jy({schema:n}):(n.idBlock.tagClass=1,n.idBlock.tagNumber=16,new qy({schema:n})))),mA in t.result&&(this.signerInfos=Array.from(t.result[mA],n=>new qA({schema:n})))}toSchema(e=!1){let t=[];if(this.certificates&&this.certificates.length&&this.certificates.some(n=>n instanceof jE)||this.crls&&this.crls.length&&this.crls.some(n=>n instanceof qy)?this.version=5:this.certificates&&this.certificates.length&&this.certificates.some(n=>n instanceof pl)?this.version=4:this.certificates&&this.certificates.length&&this.certificates.some(n=>n instanceof EA)||this.signerInfos.some(n=>n.version===3)||this.encapContentInfo.eContentType!==ma.ID_DATA?this.version=3:this.version=1,t.push(new ge({value:this.version})),t.push(new Wr({value:Array.from(this.digestAlgorithms,n=>n.toSchema())})),t.push(this.encapContentInfo.toSchema()),this.certificates){let s=new Ch({certificates:this.certificates}).toSchema();t.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:s.valueBlock.value}))}return this.crls&&t.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.crls,n=>{if(n instanceof qy){let s=n.toSchema();return s.idBlock.tagClass=3,s.idBlock.tagNumber=1,s}return n.toSchema(e)})})),t.push(new Wr({value:Array.from(this.signerInfos,n=>n.toSchema())})),new W({value:t})}toJSON(){let e={version:this.version,digestAlgorithms:Array.from(this.digestAlgorithms,t=>t.toJSON()),encapContentInfo:this.encapContentInfo.toJSON(),signerInfos:Array.from(this.signerInfos,t=>t.toJSON())};return this.certificates&&(e.certificates=Array.from(this.certificates,t=>t.toJSON())),this.crls&&(e.crls=Array.from(this.crls,t=>t.toJSON())),e}async verify({signer:e=-1,data:t=rn,trustedCerts:n=[],checkDate:s=new Date,checkChain:i=!1,passedWhenNotRevValues:a=!1,extendedMode:u=!1,findOrigin:c=null,findIssuer:f=null}={},h=Dt(!0)){let m=null,g=null;try{let x=rn,v=L,w=[],S=this.signerInfos[e];if(!S)throw new as({date:s,code:1,message:"Unable to get signer by supplied index"});if(!this.certificates)throw new as({date:s,code:2,message:"No certificates attached to this signed data"});if(S.sid instanceof zn){for(let E of this.certificates)if(E instanceof cs&&E.issuer.isEqual(S.sid.issuer)&&E.serialNumber.isEqual(S.sid.serialNumber)){m=E;break}}else{let E=S.sid,C=E.idBlock.isConstructed?E.valueBlock.value[0].valueBlock.valueHex:E.valueBlock.valueHex;for(let _ of this.certificates){if(!(_ instanceof cs))continue;let F=await h.digest({name:"sha-1"},_.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView);if(fc(F,C)){m=_;break}}}if(!m)throw new as({date:s,code:3,message:"Unable to find signer certificate"});if(this.encapContentInfo.eContentType===zce){if(!this.encapContentInfo.eContent)throw new as({date:s,code:15,message:"Error during verification: TSTInfo eContent is empty",signatureVerified:null,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0});let E;try{E=I9.fromBER(this.encapContentInfo.eContent.valueBlock.valueHexView)}catch{throw new as({date:s,code:15,message:"Error during verification: TSTInfo wrong ASN.1 schema ",signatureVerified:null,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0})}if(s=E.genTime,g=E.serialNumber.valueBlock.valueHexView.slice().buffer,t.byteLength===0)throw new as({date:s,code:4,message:"Missed detached data input array"});if(!await E.verify({data:t},h))throw new as({date:s,code:15,message:"Error during verification: TSTInfo verification is failed",signatureVerified:!1,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0})}if(i){let E=this.certificates.filter(R=>R instanceof cs&&!!v9(R,m)),C={checkDate:s,certs:E,trustedCerts:n};f&&(C.findIssuer=f),c&&(C.findOrigin=c);let _=new N9(C);if(_.certs.push(m),this.crls)for(let R of this.crls)"thisUpdate"in R?_.crls.push(R):R.otherRevInfoFormat===hE&&_.ocsps.push(new Xy({schema:R.otherRevInfo}));this.ocsps&&_.ocsps.push(...this.ocsps);let F=await _.verify({passedWhenNotRevValues:a},h).catch(R=>{throw new as({date:s,code:5,message:`Validation of signer's certificate failed with error: ${R instanceof Object?R.resultMessage:R}`,signerCertificate:m,signerCertificateVerified:!1})});if(F.certificatePath&&(w=F.certificatePath),!F.result)throw new as({date:s,code:5,message:`Validation of signer's certificate failed: ${F.resultMessage}`,signerCertificate:m,signerCertificateVerified:!1})}let A=h.getAlgorithmByOID(S.digestAlgorithm.algorithmId);if(!("name"in A))throw new as({date:s,code:7,message:`Unsupported signature algorithm: ${S.digestAlgorithm.algorithmId}`,signerCertificate:m,signerCertificateVerified:!0});v=A.name;let T=this.encapContentInfo.eContent;if(T)T.idBlock.tagClass===1&&T.idBlock.tagNumber===4?t=T.getValue():t=T.valueBlock.valueBeforeDecodeView.slice().buffer;else if(t.byteLength===0)throw new as({date:s,code:8,message:"Missed detached data input array",signerCertificate:m,signerCertificateVerified:!0});if(S.signedAttrs){let E=!1,C=!1;for(let _ of S.signedAttrs.attributes)if(_.type==="1.2.840.113549.1.9.3"&&(E=!0),_.type==="1.2.840.113549.1.9.4"&&(C=!0,x=_.values[0].valueBlock.valueHex),E&&C)break;if(E===!1)throw new as({date:s,code:9,message:'Attribute "content-type" is a mandatory attribute for "signed attributes"',signerCertificate:m,signerCertificateVerified:!0});if(C===!1)throw new as({date:s,code:10,message:'Attribute "message-digest" is a mandatory attribute for "signed attributes"',signatureVerified:null,signerCertificate:m,signerCertificateVerified:!0})}if(S.signedAttrs){let E=await h.digest(v,new Uint8Array(t));if(!fc(E,x))throw new as({date:s,code:15,message:"Error during verification: Message digest doesn't match",signatureVerified:null,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0});t=S.signedAttrs.encodedValue}let b=S.signatureAlgorithm.algorithmId==="1.2.840.113549.1.1.1"?await h.verifyWithPublicKey(t,S.signature,m.subjectPublicKeyInfo,S.signatureAlgorithm,v):await h.verifyWithPublicKey(t,S.signature,m.subjectPublicKeyInfo,S.signatureAlgorithm);return u?{date:s,code:14,message:L,signatureVerified:b,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0,certificatePath:w}:b}catch(x){throw x instanceof as?x:new as({date:s,code:15,message:`Error during verification: ${x instanceof Error?x.message:x}`,signatureVerified:null,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0})}}async sign(e,t,n="SHA-1",s=rn,i=Dt(!0)){var a;if(!e)throw new Error("Need to provide a private key for signing");let u=this.signerInfos[t];if(!u)throw new RangeError("SignerInfo index is out of range");!(!((a=u.signedAttrs)===null||a===void 0)&&a.attributes.length)&&"hash"in e.algorithm&&"hash"in e.algorithm&&e.algorithm.hash&&(n=e.algorithm.hash.name);let c=i.getOIDByAlgorithm({name:n},!0,"hashAlgorithm");this.digestAlgorithms.filter(g=>g.algorithmId===c).length===0&&this.digestAlgorithms.push(new ve({algorithmId:c,algorithmParams:new Xr})),u.digestAlgorithm=new ve({algorithmId:c,algorithmParams:new Xr});let f=await i.getSignatureParameters(e,n),h=f.parameters;if(u.signatureAlgorithm=f.signatureAlgorithm,u.signedAttrs)if(u.signedAttrs.encodedValue.byteLength!==0)s=u.signedAttrs.encodedValue;else{s=u.signedAttrs.toSchema().toBER();let g=mt.toUint8Array(s);g[0]=49}else{let g=this.encapContentInfo.eContent;if(g)g.idBlock.tagClass===1&&g.idBlock.tagNumber===4?s=g.getValue():s=g.valueBlock.valueBeforeDecodeView.slice().buffer;else if(s.byteLength===0)throw new Error("Missed detached data input array")}let m=await i.signWithPrivateKey(s,e,h);u.signature=new Ve({valueHex:m})}};Wm.CLASS_NAME="SignedData";Wm.ID_DATA=gD;var dh="version",mh="authSafe",iu="macData",gv="parsedValue",Yfe=[dh,mh,iu],Qfe=class gh extends _e{static{o(this,"PFX")}constructor(e={}){super(),this.version=B(e,dh,gh.defaultValues(dh)),this.authSafe=B(e,mh,gh.defaultValues(mh)),iu in e&&(this.macData=B(e,iu,gh.defaultValues(iu))),gv in e&&(this.parsedValue=B(e,gv,gh.defaultValues(gv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case dh:return 3;case mh:return new Jr;case iu:return new il;case gv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case dh:return t===gh.defaultValues(e);case mh:return Jr.compareWithDefault("contentType",t.contentType)&&Jr.compareWithDefault("content",t.content);case iu:return il.compareWithDefault("mac",t.mac)&&il.compareWithDefault("macSalt",t.macSalt)&&il.compareWithDefault("iterations",t.iterations);case gv:return t instanceof Object&&Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||dh}),Jr.schema(t.authSafe||{names:{blockName:mh}}),il.schema(t.macData||{names:{blockName:iu,optional:!0}})]})}fromSchema(e){De(e,Yfe);let t=Ie(e,e,gh.schema({names:{version:dh,authSafe:{names:{blockName:mh}},macData:{names:{blockName:iu}}}}));be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.authSafe=new Jr({schema:t.result.authSafe}),iu in t.result&&(this.macData=new il({schema:t.result.macData}))}toSchema(){let e=[new ge({value:this.version}),this.authSafe.toSchema()];return this.macData&&e.push(this.macData.toSchema()),new W({value:e})}toJSON(){let e={version:this.version,authSafe:this.authSafe.toJSON()};return this.macData&&(e.macData=this.macData.toJSON()),e}async makeInternalValues(e={},t=Dt(!0)){if(Ar.assert(e,"parameters","object"),!this.parsedValue)throw new Error('Please call "parseValues" function first in order to make "parsedValue" data');switch(pr.assertEmpty(this.parsedValue.integrityMode,"integrityMode","parsedValue"),pr.assertEmpty(this.parsedValue.authenticatedSafe,"authenticatedSafe","parsedValue"),this.parsedValue.integrityMode){case 0:{if(!("iterations"in e))throw new pr("iterations");pr.assertEmpty(e.pbkdf2HashAlgorithm,"pbkdf2HashAlgorithm"),pr.assertEmpty(e.hmacHashAlgorithm,"hmacHashAlgorithm"),pr.assertEmpty(e.password,"password");let n=new ArrayBuffer(64),s=new Uint8Array(n);t.getRandomValues(s);let i=this.parsedValue.authenticatedSafe.toSchema().toBER(!1);this.authSafe=new Jr({contentType:Jr.DATA,content:new Ve({valueHex:i})});let a=await t.stampDataWithPassword({password:e.password,hashAlgorithm:e.hmacHashAlgorithm,salt:n,iterationCount:e.iterations,contentToStamp:i});this.macData=new il({mac:new xh({digestAlgorithm:new ve({algorithmId:t.getOIDByAlgorithm({name:e.hmacHashAlgorithm},!0,"hmacHashAlgorithm")}),digest:new Ve({valueHex:a})}),macSalt:new Ve({valueHex:n}),iterations:e.iterations})}break;case 1:{if(!("signingCertificate"in e))throw new pr("signingCertificate");pr.assertEmpty(e.privateKey,"privateKey"),pr.assertEmpty(e.hashAlgorithm,"hashAlgorithm");let n=this.parsedValue.authenticatedSafe.toSchema().toBER(!1),s=new Wm({version:1,encapContentInfo:new wh({eContentType:"1.2.840.113549.1.7.1",eContent:new Ve({valueHex:n})}),certificates:[e.signingCertificate]}),i=await t.digest({name:e.hashAlgorithm},new Uint8Array(n)),a=[];a.push(new nn({type:"1.2.840.113549.1.9.3",values:[new nt({value:"1.2.840.113549.1.7.1"})]})),a.push(new nn({type:"1.2.840.113549.1.9.5",values:[new tf({valueDate:new Date})]})),a.push(new nn({type:"1.2.840.113549.1.9.4",values:[new Ve({valueHex:i})]})),s.signerInfos.push(new qA({version:1,sid:new zn({issuer:e.signingCertificate.issuer,serialNumber:e.signingCertificate.serialNumber}),signedAttrs:new Gs({type:0,attributes:a})})),await s.sign(e.privateKey,0,e.hashAlgorithm,void 0,t),this.authSafe=new Jr({contentType:"1.2.840.113549.1.7.2",content:s.toSchema(!0)})}break;default:throw new Error(`Parameter "integrityMode" has unknown value: ${this.parsedValue.integrityMode}`)}}async parseInternalValues(e,t=Dt(!0)){switch(Ar.assert(e,"parameters","object"),e.checkIntegrity===void 0&&(e.checkIntegrity=!0),this.parsedValue={},this.authSafe.contentType){case Jr.DATA:{pr.assertEmpty(e.password,"password"),this.parsedValue.integrityMode=0,Ar.assert(this.authSafe.content,"authSafe.content",Ve);let n=this.authSafe.content.getValue();if(this.parsedValue.authenticatedSafe=KB.fromBER(n),e.checkIntegrity){if(!this.macData)throw new Error('Absent "macData" value, can not check PKCS#12 data integrity');let s=t.getAlgorithmByOID(this.macData.mac.digestAlgorithm.algorithmId,!0,"digestAlgorithm");if(!await t.verifyDataStampedWithPassword({password:e.password,hashAlgorithm:s.name,salt:mt.toArrayBuffer(this.macData.macSalt.valueBlock.valueHexView),iterationCount:this.macData.iterations||1,contentToVerify:n,signatureToVerify:mt.toArrayBuffer(this.macData.mac.digest.valueBlock.valueHexView)}))throw new Error("Integrity for the PKCS#12 data is broken!")}}break;case Jr.SIGNED_DATA:{this.parsedValue.integrityMode=1;let n=new Wm({schema:this.authSafe.content}),s=n.encapContentInfo.eContent;pr.assert(s,"eContent","cmsSigned.encapContentInfo"),Ar.assert(s,"eContent",Ve);let i=s.getValue();if(this.parsedValue.authenticatedSafe=KB.fromBER(i),!await n.verify({signer:0,checkChain:!1},t))throw new Error("Integrity for the PKCS#12 data is broken!")}break;default:throw new Error(`Incorrect value for "this.authSafe.contentType": ${this.authSafe.contentType}`)}}};Qfe.CLASS_NAME="PFX";var Um="status",ll="statusStrings",fl="failInfo",Zfe=[Um,ll,fl],jF;(function(r){r[r.granted=0]="granted",r[r.grantedWithMods=1]="grantedWithMods",r[r.rejection=2]="rejection",r[r.waiting=3]="waiting",r[r.revocationWarning=4]="revocationWarning",r[r.revocationNotification=5]="revocationNotification"})(jF||(jF={}));var Uy=class vh extends _e{static{o(this,"PKIStatusInfo")}constructor(e={}){super(),this.status=B(e,Um,vh.defaultValues(Um)),ll in e&&(this.statusStrings=B(e,ll,vh.defaultValues(ll))),fl in e&&(this.failInfo=B(e,fl,vh.defaultValues(fl))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Um:return 2;case ll:return[];case fl:return new qt;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Um:return t===vh.defaultValues(e);case ll:return t.length===0;case fl:return t.isEqual(vh.defaultValues(e));default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.status||L}),new W({optional:!0,value:[new Tt({name:t.statusStrings||L,value:new Ui})]}),new qt({name:t.failInfo||L,optional:!0})]})}fromSchema(e){De(e,Zfe);let t=Ie(e,e,vh.schema({names:{status:Um,statusStrings:ll,failInfo:fl}}));be.assertSchema(t,this.className);let n=t.result.status;if(n.valueBlock.isHexOnly===!0||n.valueBlock.valueDec<0||n.valueBlock.valueDec>5)throw new Error('PKIStatusInfo "status" has invalid value');this.status=n.valueBlock.valueDec,ll in t.result&&(this.statusStrings=t.result.statusStrings),fl in t.result&&(this.failInfo=t.result.failInfo)}toSchema(){let e=[];return e.push(new ge({value:this.status})),this.statusStrings&&e.push(new W({optional:!0,value:this.statusStrings})),this.failInfo&&e.push(this.failInfo),new W({value:e})}toJSON(){let e={status:this.status};return this.statusStrings&&(e.statusStrings=Array.from(this.statusStrings,t=>t.toJSON())),this.failInfo&&(e.failInfo=this.failInfo.toJSON()),e}};Uy.CLASS_NAME="PKIStatusInfo";var jy="version",My="messageImprint",jm="reqPolicy",Mm="nonce",au="certReq",Fm="extensions",_h="TimeStampReq",cD=`${_h}.${jy}`,lD=`${_h}.${My}`,gA=`${_h}.${jm}`,vA=`${_h}.${Mm}`,yA=`${_h}.${au}`,xA=`${_h}.${Fm}`,ehe=[cD,lD,gA,vA,yA,xA],the=class Hi extends _e{static{o(this,"TimeStampReq")}constructor(e={}){super(),this.version=B(e,jy,Hi.defaultValues(jy)),this.messageImprint=B(e,My,Hi.defaultValues(My)),jm in e&&(this.reqPolicy=B(e,jm,Hi.defaultValues(jm))),Mm in e&&(this.nonce=B(e,Mm,Hi.defaultValues(Mm))),au in e&&(this.certReq=B(e,au,Hi.defaultValues(au))),Fm in e&&(this.extensions=B(e,Fm,Hi.defaultValues(Fm))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case jy:return 0;case My:return new ga;case jm:return L;case Mm:return new ge;case au:return!1;case Fm:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case jy:case jm:case au:return t===Hi.defaultValues(e);case My:return ga.compareWithDefault("hashAlgorithm",t.hashAlgorithm)&&ga.compareWithDefault("hashedMessage",t.hashedMessage);case Mm:return t.isEqual(Hi.defaultValues(e));case Fm:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||_h,value:[new ge({name:t.version||cD}),ga.schema(t.messageImprint||{names:{blockName:lD}}),new nt({name:t.reqPolicy||gA,optional:!0}),new ge({name:t.nonce||vA,optional:!0}),new ua({name:t.certReq||yA,optional:!0}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Tt({name:t.extensions||xA,value:Ki.schema()})]})]})}fromSchema(e){De(e,ehe);let t=Ie(e,e,Hi.schema());be.assertSchema(t,this.className),this.version=t.result[cD].valueBlock.valueDec,this.messageImprint=new ga({schema:t.result[lD]}),gA in t.result&&(this.reqPolicy=t.result[gA].valueBlock.toString()),vA in t.result&&(this.nonce=t.result[vA]),yA in t.result&&(this.certReq=t.result[yA].valueBlock.value),xA in t.result&&(this.extensions=Array.from(t.result[xA],n=>new Ki({schema:n})))}toSchema(){let e=[];return e.push(new ge({value:this.version})),e.push(this.messageImprint.toSchema()),this.reqPolicy&&e.push(new nt({value:this.reqPolicy})),this.nonce&&e.push(this.nonce),au in this&&Hi.compareWithDefault(au,this.certReq)===!1&&e.push(new ua({value:this.certReq})),this.extensions&&e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.extensions,t=>t.toSchema())})),new W({value:e})}toJSON(){let e={version:this.version,messageImprint:this.messageImprint.toJSON()};return this.reqPolicy!==void 0&&(e.reqPolicy=this.reqPolicy),this.nonce!==void 0&&(e.nonce=this.nonce.toJSON()),this.certReq!==void 0&&Hi.compareWithDefault(au,this.certReq)===!1&&(e.certReq=this.certReq),this.extensions&&(e.extensions=Array.from(this.extensions,t=>t.toJSON())),e}};the.CLASS_NAME="TimeStampReq";var qm="status",Hm="timeStampToken",BD="TimeStampResp",fD=`${BD}.${qm}`,wA=`${BD}.${Hm}`,rhe=[fD,wA],nhe=class SA extends _e{static{o(this,"TimeStampResp")}constructor(e={}){super(),this.status=B(e,qm,SA.defaultValues(qm)),Hm in e&&(this.timeStampToken=B(e,Hm,SA.defaultValues(Hm))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case qm:return new Uy;case Hm:return new Jr;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case qm:return Uy.compareWithDefault(qm,t.status)&&!("statusStrings"in t)&&!("failInfo"in t);case Hm:return t.contentType===L&&t.content instanceof wt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||BD,value:[Uy.schema(t.status||{names:{blockName:fD}}),Jr.schema(t.timeStampToken||{names:{blockName:wA,optional:!0}})]})}fromSchema(e){De(e,rhe);let t=Ie(e,e,SA.schema());be.assertSchema(t,this.className),this.status=new Uy({schema:t.result[fD]}),wA in t.result&&(this.timeStampToken=new Jr({schema:t.result[wA]}))}toSchema(){let e=[];return e.push(this.status.toSchema()),this.timeStampToken&&e.push(this.timeStampToken.toSchema()),new W({value:e})}toJSON(){let e={status:this.status.toJSON()};return this.timeStampToken&&(e.timeStampToken=this.timeStampToken.toJSON()),e}async sign(e,t,n=Dt(!0)){return this.assertContentType(),new Wm({schema:this.timeStampToken.content}).sign(e,0,t,void 0,n)}async verify(e={signer:0,trustedCerts:[],data:rn},t=Dt(!0)){return this.assertContentType(),new Wm({schema:this.timeStampToken.content}).verify(e,t)}assertContentType(){if(!this.timeStampToken)throw new Error("timeStampToken is absent in TSP response");if(this.timeStampToken.contentType!==YF)throw new Error(`Wrong format of timeStampToken: ${this.timeStampToken.contentType}`)}};nhe.CLASS_NAME="TimeStampResp";function she(){if(typeof globalThis<"u"&&"crypto"in globalThis){let r="webcrypto";"webkitSubtle"in globalThis.crypto&&(r="safari"),bA(r,new Xm({name:r,crypto:globalThis.crypto}))}else if(typeof crypto<"u"&&"webcrypto"in crypto){let r="NodeJS ^15",e=crypto.webcrypto;bA(r,new Xm({name:r,crypto:e}))}}o(she,"initCryptoEngine");she();var DD=null,vn=class{static{o(this,"Application")}static setEngine(e,t){DD=Object.assign(t,{name:e}),bA(e,new Xm({name:e,crypto:t}))}static get crypto(){if(!DD)throw new Fe(Te.CRYPTOGRAPHIC_NO_MODULE);return DD}static isNodePlugin(){return typeof self>"u"&&typeof window>"u"}};function ihe(){vn.isNodePlugin()||vn.setEngine("W3 WebCrypto module",self.crypto)}o(ihe,"init");ihe();var HA=class{static{o(this,"XmlAlgorithm")}getAlgorithmName(){return this.namespaceURI}},Bh=class extends HA{static{o(this,"HashAlgorithm")}async Digest(e){let t;if(typeof e=="string")t=wr.FromString(e,"utf8");else if(ArrayBuffer.isView(e))t=new Uint8Array(e.buffer);else if(e instanceof ArrayBuffer)t=new Uint8Array(e);else{let s=Qa(e);t=wr.FromString(s,"utf8")}let n=await vn.crypto.subtle.digest(this.algorithm,t);return new Uint8Array(n)}},yn=class extends HA{static{o(this,"SignatureAlgorithm")}async Sign(e,t,n){let s=wr.FromString(e,"utf8");return vn.crypto.subtle.sign(n,t,s)}async Verify(e,t,n){let s=this.algorithm,i=wr.FromString(e,"utf8");return vn.crypto.subtle.verify(s,t,n,i)}};var Vn="SHA-1",Jn="SHA-256",Yn="SHA-384",Qn="SHA-512",Ym="http://www.w3.org/2000/09/xmldsig#sha1",Qm="http://www.w3.org/2001/04/xmlenc#sha256",Zm="http://www.w3.org/2001/04/xmldsig-more#sha384",e0="http://www.w3.org/2001/04/xmlenc#sha512",KA=class extends Bh{static{o(this,"Sha1")}constructor(){super(...arguments),this.algorithm={name:Vn},this.namespaceURI=Ym}},Zy=class extends Bh{static{o(this,"Sha256")}constructor(){super(...arguments),this.algorithm={name:Jn},this.namespaceURI=Qm}},$A=class extends Bh{static{o(this,"Sha384")}constructor(){super(...arguments),this.algorithm={name:Yn},this.namespaceURI=Zm}},GA=class extends Bh{static{o(this,"Sha512")}constructor(){super(...arguments),this.algorithm={name:Qn},this.namespaceURI=e0}};var cu="ECDSA",XA="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1",WA="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256",zA="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384",JA="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512";function YA(r){if(r.name.toUpperCase()===cu.toUpperCase())switch(r.hash.name.toUpperCase()){case Vn:return new t0;case Jn:return new r0;case Yn:return new n0;case Qn:return new s0}return null}o(YA,"fromAlgorithm");var t0=class extends yn{static{o(this,"EcdsaSha1")}constructor(){super(...arguments),this.algorithm={name:cu,hash:{name:Vn}},this.namespaceURI=XA}static fromAlgorithm(e){return YA(e)}},r0=class extends yn{static{o(this,"EcdsaSha256")}constructor(){super(...arguments),this.algorithm={name:cu,hash:{name:Jn}},this.namespaceURI=WA}static fromAlgorithm(e){return YA(e)}},n0=class extends yn{static{o(this,"EcdsaSha384")}constructor(){super(...arguments),this.algorithm={name:cu,hash:{name:Yn}},this.namespaceURI=zA}static fromAlgorithm(e){return YA(e)}},s0=class extends yn{static{o(this,"EcdsaSha512")}constructor(){super(...arguments),this.algorithm={name:cu,hash:{name:Qn}},this.namespaceURI=JA}static fromAlgorithm(e){return YA(e)}};var i0="HMAC",RD="http://www.w3.org/2000/09/xmldsig#hmac-sha1",PD="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256",OD="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384",kD="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512";function QA(r){if(r.name.toUpperCase()===i0.toUpperCase())switch(r.hash.name.toUpperCase()){case Vn:return new ex;case Jn:return new tx;case Yn:return new rx;case Qn:return new nx}return null}o(QA,"fromAlgorithm");var ex=class extends yn{static{o(this,"HmacSha1")}constructor(){super(...arguments),this.algorithm={name:i0,hash:{name:Vn}},this.namespaceURI=RD}static fromAlgorithm(e){return QA(e)}},tx=class extends yn{static{o(this,"HmacSha256")}constructor(){super(...arguments),this.algorithm={name:i0,hash:{name:Jn}},this.namespaceURI=PD}static fromAlgorithm(e){return QA(e)}},rx=class extends yn{static{o(this,"HmacSha384")}constructor(){super(...arguments),this.algorithm={name:i0,hash:{name:Yn}},this.namespaceURI=OD}static fromAlgorithm(e){return QA(e)}},nx=class extends yn{static{o(this,"HmacSha512")}constructor(){super(...arguments),this.algorithm={name:i0,hash:{name:Qn}},this.namespaceURI=kD}static fromAlgorithm(e){return QA(e)}};var lu="RSASSA-PKCS1-v1_5",ZA="http://www.w3.org/2000/09/xmldsig#rsa-sha1",eC="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",tC="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384",rC="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512";function nC(r){if(r.name.toUpperCase()===lu.toUpperCase())switch(r.hash.name.toUpperCase()){case Vn:return new a0;case Jn:return new o0;case Yn:return new u0;case Qn:return new c0}return null}o(nC,"fromAlgorithm");var a0=class extends yn{static{o(this,"RsaPkcs1Sha1")}constructor(){super(...arguments),this.algorithm={name:lu,hash:{name:Vn}},this.namespaceURI=ZA}static fromAlgorithm(e){return nC(e)}},o0=class extends yn{static{o(this,"RsaPkcs1Sha256")}constructor(){super(...arguments),this.algorithm={name:lu,hash:{name:Jn}},this.namespaceURI=eC}static fromAlgorithm(e){return nC(e)}},u0=class extends yn{static{o(this,"RsaPkcs1Sha384")}constructor(){super(...arguments),this.algorithm={name:lu,hash:{name:Yn}},this.namespaceURI=tC}static fromAlgorithm(e){return nC(e)}},c0=class extends yn{static{o(this,"RsaPkcs1Sha512")}constructor(){super(...arguments),this.algorithm={name:lu,hash:{name:Qn}},this.namespaceURI=rC}static fromAlgorithm(e){return nC(e)}};function He(r,e,t,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var u=r.length-1;u>=0;u--)(a=r[u])&&(i=(s<3?a(i):s>3?a(e,t,i):a(e,t))||i);return s>3&&i&&Object.defineProperty(e,t,i),i}o(He,"__decorate");function ht(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)}o(ht,"__metadata");var me={DefaultCanonMethod:"http://www.w3.org/TR/2001/REC-xml-c14n-20010315",DefaultDigestMethod:"http://www.w3.org/2001/04/xmlenc#sha256",DefaultPrefix:"ds",ElementNames:{CanonicalizationMethod:"CanonicalizationMethod",DigestMethod:"DigestMethod",DigestValue:"DigestValue",DSAKeyValue:"DSAKeyValue",DomainParameters:"DomainParameters",EncryptedKey:"EncryptedKey",HMACOutputLength:"HMACOutputLength",RSAPSSParams:"RSAPSSParams",MaskGenerationFunction:"MaskGenerationFunction",SaltLength:"SaltLength",KeyInfo:"KeyInfo",KeyName:"KeyName",KeyValue:"KeyValue",Modulus:"Modulus",Exponent:"Exponent",Manifest:"Manifest",Object:"Object",Reference:"Reference",RetrievalMethod:"RetrievalMethod",RSAKeyValue:"RSAKeyValue",ECDSAKeyValue:"ECDSAKeyValue",NamedCurve:"NamedCurve",PublicKey:"PublicKey",Signature:"Signature",SignatureMethod:"SignatureMethod",SignatureValue:"SignatureValue",SignedInfo:"SignedInfo",Transform:"Transform",Transforms:"Transforms",X509Data:"X509Data",PGPData:"PGPData",SPKIData:"SPKIData",SPKIexp:"SPKIexp",MgmtData:"MgmtData",X509IssuerSerial:"X509IssuerSerial",X509IssuerName:"X509IssuerName",X509SerialNumber:"X509SerialNumber",X509SKI:"X509SKI",X509SubjectName:"X509SubjectName",X509Certificate:"X509Certificate",X509CRL:"X509CRL",XPath:"XPath",X:"X",Y:"Y"},AttributeNames:{Algorithm:"Algorithm",Encoding:"Encoding",Id:"Id",MimeType:"MimeType",Type:"Type",URI:"URI"},AlgorithmNamespaces:{XmlDsigBase64Transform:"http://www.w3.org/2000/09/xmldsig#base64",XmlDsigC14NTransform:"http://www.w3.org/TR/2001/REC-xml-c14n-20010315",XmlDsigC14NWithCommentsTransform:"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments",XmlDsigEnvelopedSignatureTransform:"http://www.w3.org/2000/09/xmldsig#enveloped-signature",XmlDsigXPathTransform:"http://www.w3.org/TR/1999/REC-xpath-19991116",XmlDsigXsltTransform:"http://www.w3.org/TR/1999/REC-xslt-19991116",XmlDsigExcC14NTransform:"http://www.w3.org/2001/10/xml-exc-c14n#",XmlDsigExcC14NWithCommentsTransform:"http://www.w3.org/2001/10/xml-exc-c14n#WithComments",XmlDecryptionTransform:"http://www.w3.org/2002/07/decrypt#XML",XmlLicenseTransform:"urn:mpeg:mpeg21:2003:01-REL-R-NS:licenseTransform"},Uri:{Manifest:"http://www.w3.org/2000/09/xmldsig#Manifest"},NamespaceURI:"http://www.w3.org/2000/09/xmldsig#",NamespaceURIMore:"http://www.w3.org/2007/05/xmldsig-more#",NamespaceURIPss:"http://www.example.org/xmldsig-pss/#"};var Kr=class extends Ms{static{o(this,"XmlSignatureObject")}};Kr=He([jt({localName:"xmldsig",namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix})],Kr);var $i=class extends Qp{static{o(this,"XmlSignatureCollection")}};$i=He([jt({localName:"xmldsig_collection",namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix})],$i);var Gi=class extends Kr{static{o(this,"DigestMethod")}constructor(e){super(),e&&(this.Algorithm=e)}};He([Or({localName:me.AttributeNames.Algorithm,required:!0,defaultValue:me.DefaultDigestMethod}),ht("design:type",String)],Gi.prototype,"Algorithm",void 0);Gi=He([jt({localName:me.ElementNames.DigestMethod}),ht("design:paramtypes",[String])],Gi);var fi=class extends Kr{static{o(this,"KeyInfoClause")}static canImportCryptoKey(e){return!1}};var ahe={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},l0=class extends fi{static{o(this,"RsaKeyValue")}constructor(){super(...arguments),this.key=null,this.jwk=null,this.keyUsage=[]}static canImportCryptoKey(e){let t=e.algorithm.name.toUpperCase();return t===lu.toUpperCase()||t===Dh.toUpperCase()}async importKey(e){let t=e.algorithm.name?e.algorithm.name.toUpperCase():"";if(t!==lu.toUpperCase()&&t!==Dh.toUpperCase())throw new Fe(Te.ALGORITHM_WRONG_NAME,e.algorithm.name);this.key=e;let n=await vn.crypto.subtle.exportKey("jwk",e);return this.jwk=n,this.Modulus=wr.FromBase64Url(n.n||""),this.Exponent=wr.FromBase64Url(n.e||""),this.keyUsage=e.usages,this}async exportKey(e=ahe){if(this.key)return this.key;if(!this.Modulus)throw new Fe(Te.CRYPTOGRAPHIC,"RsaKeyValue has no Modulus");let t=wr.ToBase64Url(this.Modulus);if(!this.Exponent)throw new Fe(Te.CRYPTOGRAPHIC,"RsaKeyValue has no Exponent");let n=wr.ToBase64Url(this.Exponent),s;switch(e.name.toUpperCase()){case lu.toUpperCase():s="R";break;case Dh.toUpperCase():s="P";break;default:throw new Fe(Te.ALGORITHM_NOT_SUPPORTED,e.name)}switch(e.hash.name.toUpperCase()){case Vn:s+="S1";break;case Jn:s+="S256";break;case Yn:s+="S384";break;case Qn:s+="S512";break}let i={kty:"RSA",alg:s,n:t,e:n,ext:!0};return vn.crypto.subtle.importKey("jwk",i,e,!0,this.keyUsage)}LoadXml(e){super.LoadXml(e),this.keyUsage=["verify"]}};He([Gt({localName:me.ElementNames.Modulus,prefix:me.DefaultPrefix,namespaceURI:me.NamespaceURI,required:!0,converter:Vi}),ht("design:type",Object)],l0.prototype,"Modulus",void 0);He([Gt({localName:me.ElementNames.Exponent,prefix:me.DefaultPrefix,namespaceURI:me.NamespaceURI,required:!0,converter:Vi}),ht("design:type",Object)],l0.prototype,"Exponent",void 0);l0=He([jt({localName:me.ElementNames.RSAKeyValue})],l0);var LD="http://www.w3.org/2007/05/xmldsig-more#",VD="pss",f0=class extends Ms{static{o(this,"MaskGenerationFunction")}};He([Gt({parser:Gi}),ht("design:type",Gi)],f0.prototype,"DigestMethod",void 0);He([Or({localName:me.AttributeNames.Algorithm,defaultValue:"http://www.w3.org/2007/05/xmldsig-more#MGF1"}),ht("design:type",String)],f0.prototype,"Algorithm",void 0);f0=He([jt({localName:me.ElementNames.MaskGenerationFunction,prefix:VD,namespaceURI:LD})],f0);var xa=class extends Ms{static{o(this,"PssAlgorithmParams")}};He([Gt({parser:Gi}),ht("design:type",Gi)],xa.prototype,"DigestMethod",void 0);He([Gt({parser:f0}),ht("design:type",f0)],xa.prototype,"MGF",void 0);He([Gt({converter:Wg,prefix:VD,namespaceURI:LD}),ht("design:type",Number)],xa.prototype,"SaltLength",void 0);He([Gt({converter:Wg}),ht("design:type",Number)],xa.prototype,"TrailerField",void 0);xa=He([jt({localName:me.ElementNames.RSAPSSParams,prefix:VD,namespaceURI:LD})],xa);var Dh="RSA-PSS",UD="http://www.w3.org/2007/05/xmldsig-more#rsa-pss",sC=class r extends yn{static{o(this,"RsaPssWithParams")}constructor(){super(...arguments),this.algorithm={name:Dh,hash:{name:Vn}},this.namespaceURI=UD}static fromAlgorithm(e){let t=null;if(e.name.toUpperCase()===Dh.toUpperCase()){switch(e.hash.name.toUpperCase()){case Vn:t=new r;break;case Jn:t=new r;break;case Yn:t=new r;break;case Qn:t=new r;break}if(t)return t.algorithm.hash.name=e.hash.name,e.saltLength&&(t.algorithm.saltLength=e.saltLength),t}return null}fromMethod(e){if(!e.Any.Some(t=>{if(t instanceof xa){switch(t.DigestMethod.Algorithm.toLowerCase()){case Ym:this.algorithm.hash.name=Vn;break;case Qm:this.algorithm.hash.name=Jn;break;case Zm:this.algorithm.hash.name=Yn;break;case e0:this.algorithm.hash.name=Qn;break;default:throw new Fe(Te.CRYPTOGRAPHIC,`Unsupported hash algorithm: ${t.DigestMethod.Algorithm}`)}return t.SaltLength&&(this.algorithm.saltLength=t.SaltLength),!0}return!1}))throw new Fe(Te.CRYPTOGRAPHIC,"RSA-PSS parameters not found in SignatureMethod")}toMethod(e){let t=new xa;switch(this.algorithm.hash.name.toUpperCase()){case Vn:t.DigestMethod.Algorithm=Ym;break;case Jn:t.DigestMethod.Algorithm=Qm;break;case Yn:t.DigestMethod.Algorithm=Zm;break;case Qn:t.DigestMethod.Algorithm=e0;break;default:throw new Fe(Te.CRYPTOGRAPHIC,`Unsupported hash algorithm: ${this.algorithm.hash.name}`)}this.algorithm.saltLength&&(t.SaltLength=this.algorithm.saltLength),e.Any.Add(t)}};var hi;(function(r){r[r.BeforeDocElement=0]="BeforeDocElement",r[r.InsideDocElement=1]="InsideDocElement",r[r.AfterDocElement=2]="AfterDocElement"})(hi||(hi={}));var oo=class{static{o(this,"XmlCanonicalizer")}constructor(e,t,n=new Zp){this.propagatedNamespaces=new Zp,this.result=[],this.visibleNamespaces=new Zp,this.inclusiveNamespacesPrefixList=[],this.state=hi.BeforeDocElement,this.withComments=e,this.exclusive=t,this.propagatedNamespaces=n}get InclusiveNamespacesPrefixList(){return this.inclusiveNamespacesPrefixList.join(" ")}set InclusiveNamespacesPrefixList(e){this.inclusiveNamespacesPrefixList=e.split(" ")}Canonicalize(e){if(!e)throw new Fe(Te.CRYPTOGRAPHIC,"Parameter 1 is not Node");return this.WriteNode(e),this.result.join("")}WriteNode(e){switch(e.nodeType){case Ut.Document:case Ut.DocumentFragment:this.WriteDocumentNode(e);break;case Ut.Element:this.WriteElementNode(e);break;case Ut.CDATA:case Ut.SignificantWhitespace:case Ut.Text:Jl(e.parentNode)||this.WriteTextNode(e);break;case Ut.Whitespace:this.state===hi.InsideDocElement&&this.WriteTextNode(e);break;case Ut.Comment:this.WriteCommentNode(e);break;case Ut.ProcessingInstruction:this.WriteProcessingInstructionNode(e);break;case Ut.EntityReference:for(let t=0;t<e.childNodes.length;t++)this.WriteNode(e.childNodes[t]);break;case Ut.Attribute:throw new Fe(Te.CRYPTOGRAPHIC,"Attribute node is impossible here");case Ut.EndElement:throw new Fe(Te.CRYPTOGRAPHIC,"Attribute node is impossible here");case Ut.EndEntity:throw new Fe(Te.CRYPTOGRAPHIC,"Attribute node is impossible here");case Ut.DocumentType:case Ut.Entity:case Ut.Notation:case Ut.XmlDeclaration:break}}WriteDocumentNode(e){this.state=hi.BeforeDocElement;for(let t=e.firstChild;t!=null;t=t.nextSibling)this.WriteNode(t)}WriteCommentNode(e){this.withComments&&(this.state===hi.AfterDocElement?this.result.push(`
95
+ <!--`):this.result.push("<!--"),this.result.push(this.NormalizeString(e.nodeValue,Ut.Comment)),this.state===hi.BeforeDocElement?this.result.push(`-->
96
+ `):this.result.push("-->"))}WriteTextNode(e){this.result.push(this.NormalizeString(e.nodeValue,e.nodeType))}WriteProcessingInstructionNode(e){let t=e.nodeName||e.tagName;t!=="xml"&&(this.state===hi.AfterDocElement?this.result.push(`
97
+ <?`):this.result.push("<?"),this.result.push(t),e.nodeValue&&(this.result.push(" "),this.result.push(this.NormalizeString(e.nodeValue,Ut.ProcessingInstruction))),this.state===hi.BeforeDocElement?this.result.push(`?>
98
+ `):this.result.push("?>"))}WriteElementNode(e){let t=this.state;this.state===hi.BeforeDocElement&&(this.state=hi.InsideDocElement),this.result.push("<"),this.result.push(e.nodeName);let n=this.WriteNamespacesAxis(e);this.WriteAttributesAxis(e),this.result.push(">");for(let s=e.firstChild;s!=null;s=s.nextSibling)this.WriteNode(s);for(this.result.push("</"),this.result.push(e.nodeName),this.result.push(">"),t===hi.BeforeDocElement&&(this.state=hi.AfterDocElement);n--;)this.visibleNamespaces.Pop()}WriteNamespacesAxis(e){let t=[],n=0;for(let i=0;i<e.attributes.length;i++){let a=e.attributes[i];if(!jD(a)){if(a.prefix&&!this.IsNamespaceRendered(a.prefix,a.namespaceURI)){let h={prefix:a.prefix,namespace:a.namespaceURI};t.push(h),this.visibleNamespaces.Add(h),n++}continue}if(a.localName==="xmlns"&&!a.prefix&&!a.nodeValue){let h={prefix:a.prefix,namespace:a.nodeValue};t.push(h),this.visibleNamespaces.Add(h),n++}let u=null,c;(c=/xmlns:([\w.-]+)/.exec(a.nodeName))&&(u=c[1]);let f=!0;if(this.exclusive&&!this.IsNamespaceInclusive(e,u)){let h=_9(e,u);if(h>1)f=!1;else if(h===0)continue}if(!this.IsNamespaceRendered(u,a.nodeValue)&&f){let h={prefix:u,namespace:a.nodeValue};t.push(h),this.visibleNamespaces.Add(h),n++}}if(!this.IsNamespaceRendered(e.prefix,e.namespaceURI)&&e.namespaceURI!=="http://www.w3.org/2000/xmlns/"){let i={prefix:e.prefix,namespace:e.namespaceURI};t.push(i),this.visibleNamespaces.Add(i),n++}t.sort(uhe);let s=null;return t.forEach(i=>{i.prefix!==s&&(s=i.prefix,this.result.push(" xmlns"),i.prefix&&this.result.push(":"+i.prefix),this.result.push('="'),this.result.push(i.namespace||""),this.result.push('"'))}),n}WriteAttributesAxis(e){let t=[];for(let n=0;n<e.attributes.length;n++){let s=e.attributes[n];jD(s)||t.push(s)}t.sort(che),t.forEach(n=>{n!=null&&(this.result.push(" "),this.result.push(n.nodeName),this.result.push('="'),this.result.push(this.NormalizeString(n.nodeValue,Ut.Attribute)),this.result.push('"'))})}NormalizeString(e,t){let n=[];if(e)for(let s=0;s<e.length;s++){let i=e[s];i==="<"&&(t===Ut.Attribute||this.IsTextNode(t))?n.push("&lt;"):i===">"&&this.IsTextNode(t)?n.push("&gt;"):i==="&"&&(t===Ut.Attribute||this.IsTextNode(t))?n.push("&amp;"):i==='"'&&t===Ut.Attribute?n.push("&quot;"):i===" "&&t===Ut.Attribute?n.push("&#x9;"):i===`
99
+ `&&t===Ut.Attribute?n.push("&#xA;"):i==="\r"?n.push("&#xD;"):n.push(i)}return n.join("")}IsTextNode(e){switch(e){case Ut.Text:case Ut.CDATA:case Ut.SignificantWhitespace:case Ut.Whitespace:return!0}return!1}IsNamespaceInclusive(e,t){let n=t||null;return e.prefix===n?!1:this.inclusiveNamespacesPrefixList.indexOf(n||"")!==-1}IsNamespaceRendered(e,t){if(e=e||"",t=t||"",!e&&!t||e==="xml"&&t==="http://www.w3.org/XML/1998/namespace")return!0;let n=this.visibleNamespaces.GetPrefix(e);return n?n.namespace===t:!1}};function uhe(r,e){return r==e?0:r?e?r.prefix?e.prefix?r.prefix<e.prefix?-1:r.prefix>e.prefix?1:0:1:-1:1:-1}o(uhe,"XmlDsigC14NTransformNamespacesComparer");function che(r,e){if(!r.namespaceURI&&e.namespaceURI)return-1;if(!e.namespaceURI&&r.namespaceURI)return 1;let t=(r.namespaceURI||"")+r.localName,n=(e.namespaceURI||"")+e.localName;return t===n?0:t<n?-1:1}o(che,"XmlDsigC14NTransformAttributesComparer");function _9(r,e,t=0){let n=e||null;if(r.prefix===n)return++t;if(r.attributes)for(let s=0;s<r.attributes.length;s++){let i=r.attributes[s];if(!jD(i)&&e&&r.attributes[s].prefix===e)return++t}for(let s=r.firstChild;s;s=s.nextSibling)if(s.nodeType===Ut.Element){let a=_9(s,e,t);if(s.nodeType===Ut.Element&&a)return++t+a}return t}o(_9,"IsNamespaceUsed");function jD(r){let e=/xmlns:/;return!!(r!==null&&r.nodeType===Ut.Attribute&&(r.nodeName==="xmlns"||e.test(r.nodeName)))}o(jD,"IsNamespaceNode");var iC=class extends $i{static{o(this,"SignatureMethodOther")}OnLoadXml(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes.item(t);if(n.nodeType!==Ut.Element||n.nodeName===me.ElementNames.HMACOutputLength)continue;let s;switch(n.localName){case me.ElementNames.RSAPSSParams:s=xa;break;default:break}if(s){let i=new s;i.LoadXml(n),this.Add(i)}}}};iC=He([jt({localName:"Other"})],iC);var uo=class extends Kr{static{o(this,"SignatureMethod")}};He([Or({localName:me.AttributeNames.Algorithm,required:!0,defaultValue:""}),ht("design:type",String)],uo.prototype,"Algorithm",void 0);He([Gt({localName:me.ElementNames.HMACOutputLength,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,converter:Wg}),ht("design:type",Number)],uo.prototype,"HMACOutputLength",void 0);He([Gt({parser:iC,noRoot:!0,minOccurs:0}),ht("design:type",iC)],uo.prototype,"Any",void 0);uo=He([jt({localName:me.ElementNames.SignatureMethod})],uo);var h0=class extends Kr{static{o(this,"CanonicalizationMethod")}};He([Or({localName:me.AttributeNames.Algorithm,required:!0,defaultValue:me.DefaultCanonMethod}),ht("design:type",String)],h0.prototype,"Algorithm",void 0);h0=He([jt({localName:me.ElementNames.CanonicalizationMethod})],h0);var p0=class extends Kr{static{o(this,"DataObject")}};He([Or({localName:me.AttributeNames.Id,defaultValue:""}),ht("design:type",String)],p0.prototype,"Id",void 0);He([Or({localName:me.AttributeNames.MimeType,defaultValue:""}),ht("design:type",String)],p0.prototype,"MimeType",void 0);He([Or({localName:me.AttributeNames.Encoding,defaultValue:""}),ht("design:type",String)],p0.prototype,"Encoding",void 0);p0=He([jt({localName:me.ElementNames.Object})],p0);var sx=class extends $i{static{o(this,"DataObjects")}};sx=He([jt({localName:"xmldsig_objects",parser:p0})],sx);var ls=class extends Kr{static{o(this,"Transform")}constructor(){super(...arguments),this.innerXml=null}GetOutput(){throw new Fe(Te.METHOD_NOT_IMPLEMENTED)}LoadInnerXml(e){if(!e)throw new Fe(Te.PARAM_REQUIRED,"node");this.innerXml=e}GetInnerXml(){return this.innerXml}};He([Or({localName:me.AttributeNames.Algorithm,defaultValue:""}),ht("design:type",String)],ls.prototype,"Algorithm",void 0);He([Gt({localName:me.ElementNames.XPath,defaultValue:""}),ht("design:type",String)],ls.prototype,"XPath",void 0);ls=He([jt({localName:me.ElementNames.Transform})],ls);var fu=class extends ls{static{o(this,"XmlDsigBase64Transform")}constructor(){super(...arguments),this.Algorithm=me.AlgorithmNamespaces.XmlDsigBase64Transform}GetOutput(){if(!this.innerXml)throw new Fe(Te.PARAM_REQUIRED,"innerXml");return wr.FromString(this.innerXml.textContent||"","base64")}};var co=class extends ls{static{o(this,"XmlDsigC14NTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315",this.xmlCanonicalizer=new oo(!1,!1)}GetOutput(){if(!this.innerXml)throw new Fe(Te.PARAM_REQUIRED,"innerXml");return this.xmlCanonicalizer.Canonicalize(this.innerXml)}},lo=class extends co{static{o(this,"XmlDsigC14NWithCommentsTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments",this.xmlCanonicalizer=new oo(!0,!1)}};var hu=class extends ls{static{o(this,"XmlDsigEnvelopedSignatureTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"}GetOutput(){if(!this.innerXml)throw new Fe(Te.PARAM_REQUIRED,"innerXml");let e=this.innerXml.firstChild,t=[];for(;e;)oi(e)&&e.localName===me.ElementNames.Signature&&e.namespaceURI===me.NamespaceURI&&t.push(e),e=e.nextSibling;for(let n of t)n.parentNode?.removeChild(n);return this.innerXml}};var fo=class extends ls{static{o(this,"XmlDsigExcC14NTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#",this.xmlCanonicalizer=new oo(!1,!0)}get InclusiveNamespacesPrefixList(){return this.xmlCanonicalizer.InclusiveNamespacesPrefixList}set InclusiveNamespacesPrefixList(e){this.xmlCanonicalizer.InclusiveNamespacesPrefixList=e}LoadXml(e){if(super.LoadXml(e),this.Element&&this.Element.childNodes)for(let t=0;t<this.Element.childNodes.length;t++){let n=this.Element.childNodes[t];if(n&&n.nodeType===1)switch(n.localName){case"InclusiveNamespaces":this.setInclusiveNamespacesElement(n);break}}}GetOutput(){if(!this.innerXml)throw new Fe(Te.PARAM_REQUIRED,"innerXml");return this.xmlCanonicalizer.Canonicalize(this.innerXml)}setInclusiveNamespacesElement(e){let t=e.getAttribute("PrefixList");t&&t.length>0&&(this.xmlCanonicalizer.InclusiveNamespacesPrefixList=t)}},ho=class extends fo{static{o(this,"XmlDsigExcC14NWithCommentsTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments",this.xmlCanonicalizer=new oo(!0,!0)}};function B9(r){return r.parentNode?B9(r.parentNode):r}o(B9,"lookupParentNode");var d0=class extends ls{static{o(this,"XmlDsigXPathTransform")}constructor(){super(...arguments),this.Algorithm=me.AlgorithmNamespaces.XmlDsigXPathTransform}GetOutput(){if(!this.innerXml)throw new Fe(Te.PARAM_REQUIRED,"innerXml");this.Filter(B9(this.innerXml),this.XPath)}Filter(e,t){let n=e.childNodes,s=[];for(let i=0;n&&i<n.length;i++){let a=n.item(i);s.push(a)}s.forEach(i=>{this.Evaluate(i,t)?i.parentNode&&i.parentNode.removeChild(i):this.Filter(i,t)})}GetEvaluator(e){return typeof self<"u"?e.ownerDocument==null?e:e.ownerDocument:Yp("xpath")}Evaluate(e,t){try{let n=this.GetEvaluator(e),s=this.GetXml();if(!s||!s.firstChild)throw new Error("XML element or firstChild is not defined");let i=s.firstChild,a=`boolean(${t})`,u=typeof self>"u"?Yp("xpath"):self;return!n.evaluate(a,e,{lookupNamespaceURI:o(f=>i.lookupNamespaceURI(f),"lookupNamespaceURI")},u.XPathResult.ANY_TYPE,null).booleanValue}catch{return!1}}};He([Gt({localName:me.ElementNames.XPath,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,required:!0}),ht("design:type",String)],d0.prototype,"XPath",void 0);var m0=class extends $i{static{o(this,"Transforms")}OnLoadXml(e){super.OnLoadXml(e),this.items=this.GetIterator().map(t=>{switch(t.Algorithm){case me.AlgorithmNamespaces.XmlDsigEnvelopedSignatureTransform:return Rh(t,hu);case me.AlgorithmNamespaces.XmlDsigC14NTransform:return Rh(t,co);case me.AlgorithmNamespaces.XmlDsigC14NWithCommentsTransform:return Rh(t,lo);case me.AlgorithmNamespaces.XmlDsigExcC14NTransform:return Rh(t,fo);case me.AlgorithmNamespaces.XmlDsigExcC14NWithCommentsTransform:return Rh(t,ho);case me.AlgorithmNamespaces.XmlDsigBase64Transform:return Rh(t,fu);case me.AlgorithmNamespaces.XmlDsigXPathTransform:return Rh(t,d0);default:try{let n=ix.CreateFromName(t.Algorithm);if(!t.Element)throw new Error("Transform element is not defined");return n.LoadXml(t.Element),n}catch{throw new Fe(Te.CRYPTOGRAPHIC_UNKNOWN_TRANSFORM,t.Algorithm)}}})}};m0=He([jt({localName:me.ElementNames.Transforms,parser:ls})],m0);function Rh(r,e){let t=new e;if(!r.Element)throw new Error("Transform element is not defined");return t.LoadXml(r.Element),t}o(Rh,"ChangeTransform");var po=class extends Kr{static{o(this,"Reference")}constructor(e){super(),this.DigestMethod=new Gi,e&&(this.Uri=e)}};He([Or({defaultValue:""}),ht("design:type",String)],po.prototype,"Id",void 0);He([Or({localName:me.AttributeNames.URI}),ht("design:type",String)],po.prototype,"Uri",void 0);He([Or({localName:me.AttributeNames.Type,defaultValue:""}),ht("design:type",String)],po.prototype,"Type",void 0);He([Gt({parser:m0}),ht("design:type",m0)],po.prototype,"Transforms",void 0);He([Gt({required:!0,parser:Gi}),ht("design:type",Gi)],po.prototype,"DigestMethod",void 0);He([Gt({required:!0,localName:me.ElementNames.DigestValue,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,converter:Vi}),ht("design:type",Uint8Array)],po.prototype,"DigestValue",void 0);po=He([jt({localName:me.ElementNames.Reference}),ht("design:paramtypes",[String])],po);var g0=class extends $i{static{o(this,"References")}};g0=He([jt({localName:"References",parser:po})],g0);var pu=class extends Kr{static{o(this,"SignedInfo")}};He([Or({localName:me.AttributeNames.Id,defaultValue:""}),ht("design:type",String)],pu.prototype,"Id",void 0);He([Gt({parser:h0,required:!0}),ht("design:type",h0)],pu.prototype,"CanonicalizationMethod",void 0);He([Gt({parser:uo,required:!0}),ht("design:type",uo)],pu.prototype,"SignatureMethod",void 0);He([Gt({parser:g0,minOccurs:1,noRoot:!0}),ht("design:type",g0)],pu.prototype,"References",void 0);pu=He([jt({localName:me.ElementNames.SignedInfo})],pu);var w0="http://www.w3.org/2001/04/xmldsig-more#",S0="ecdsa",Ph=class extends Ms{static{o(this,"EcdsaPublicKey")}};He([Gt({localName:me.ElementNames.X,namespaceURI:w0,prefix:S0,required:!0,converter:Vi}),ht("design:type",Uint8Array)],Ph.prototype,"X",void 0);He([Gt({localName:me.ElementNames.Y,namespaceURI:w0,prefix:S0,required:!0,converter:Vi}),ht("design:type",Uint8Array)],Ph.prototype,"Y",void 0);Ph=He([jt({localName:me.ElementNames.PublicKey,namespaceURI:w0,prefix:S0})],Ph);var v0=class extends Ms{static{o(this,"NamedCurve")}};He([Or({localName:me.AttributeNames.URI,required:!0}),ht("design:type",String)],v0.prototype,"Uri",void 0);v0=He([jt({localName:me.ElementNames.NamedCurve,namespaceURI:w0,prefix:S0})],v0);var y0=class extends Ms{static{o(this,"DomainParameters")}};He([Gt({parser:v0}),ht("design:type",v0)],y0.prototype,"NamedCurve",void 0);y0=He([jt({localName:me.ElementNames.DomainParameters,namespaceURI:w0,prefix:S0})],y0);var x0=class extends fi{static{o(this,"EcdsaKeyValue")}constructor(){super(...arguments),this.name=me.ElementNames.ECDSAKeyValue,this.key=null,this.jwk=null,this.keyUsage=null}static canImportCryptoKey(e){return e.algorithm.name.toUpperCase()===cu.toUpperCase()}get NamedCurve(){return R9(this.DomainParameters.NamedCurve.Uri)}async importKey(e){if(!e.algorithm.name||e.algorithm.name.toUpperCase()!=="ECDSA")throw new Fe(Te.ALGORITHM_WRONG_NAME,e.algorithm.name);let t=await vn.crypto.subtle.exportKey("jwk",e);return this.key=e,this.jwk=t,this.PublicKey=new Ph,this.PublicKey.X=wr.FromString(t.x||"","base64url"),this.PublicKey.Y=wr.FromString(t.y||"","base64url"),this.DomainParameters||(this.DomainParameters=new y0),this.DomainParameters.NamedCurve||(this.DomainParameters.NamedCurve=new v0),this.DomainParameters.NamedCurve.Uri=R9(t.crv||""),this.keyUsage=e.usages,this}async exportKey(e){if(this.key)return this.key;let t=wr.ToBase64Url(this.PublicKey.X),n=wr.ToBase64Url(this.PublicKey.Y),s=lhe(this.DomainParameters.NamedCurve.Uri),i={kty:"EC",crv:s,x:t,y:n,ext:!0};this.keyUsage=["verify"];let a=await vn.crypto.subtle.importKey("jwk",i,{name:"ECDSA",namedCurve:s},!0,this.keyUsage);return this.key=a,this.key}};He([Gt({parser:y0}),ht("design:type",y0)],x0.prototype,"DomainParameters",void 0);He([Gt({parser:Ph,required:!0}),ht("design:type",Ph)],x0.prototype,"PublicKey",void 0);x0=He([jt({localName:me.ElementNames.ECDSAKeyValue,namespaceURI:w0,prefix:S0})],x0);function R9(r){switch(r){case"P-256":return"urn:oid:1.2.840.10045.3.1.7";case"P-384":return"urn:oid:1.3.132.0.34";case"P-521":return"urn:oid:1.3.132.0.35"}throw new Fe(Te.CRYPTOGRAPHIC,"Unknown NamedCurve")}o(R9,"GetNamedCurveOid");function lhe(r){switch(r){case"urn:oid:1.2.840.10045.3.1.7":return"P-256";case"urn:oid:1.3.132.0.34":return"P-384";case"urn:oid:1.3.132.0.35":return"P-521"}throw new Fe(Te.CRYPTOGRAPHIC,"Unknown NamedCurve OID")}o(lhe,"GetNamedCurveFromOid");var fhe=class extends Map{static{o(this,"KeyInfoClauseRegistry")}},gl=new fhe;gl.set(me.ElementNames.RSAKeyValue,l0);gl.set(me.ElementNames.ECDSAKeyValue,x0);var aC=class{static{o(this,"KeyInfoClauseFactory")}static create(e){let t=gl.get(e);if(!t)throw new Fe(Te.KEY_INFO_CLAUSE_NOT_SUPPORTED,e);return new t}};var ax=class extends fi{static{o(this,"KeyValue")}set Value(e){this.element=null,this.value=e}get Value(){return this.value}constructor(e){super(),e&&(this.Value=e)}async importKey(e){for(let[,t]of gl)if(t.canImportCryptoKey(e)){let n=new t;return await n.importKey(e),this.Value=n,this}throw new Fe(Te.ALGORITHM_NOT_SUPPORTED,e.algorithm.name)}async exportKey(e){if(!this.Value)throw new Fe(Te.NULL_REFERENCE);return this.Value.exportKey(e)}OnGetXml(e){if(!this.Value)throw new Fe(Te.CRYPTOGRAPHIC,"KeyValue has empty value");let t=this.Value.GetXml();t&&e.appendChild(t)}OnLoadXml(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes.item(t);if(oi(n))try{let s=n.localName,i=aC.create(s);i.LoadXml(n),this.value=i;return}catch{}}throw new Fe(Te.CRYPTOGRAPHIC,"Unsupported KeyValue in use")}};ax=He([jt({localName:me.ElementNames.KeyValue}),ht("design:paramtypes",[fi])],ax);var hhe={"2.5.4.3":{short:"CN",long:"CommonName"},"2.5.4.6":{short:"C",long:"Country"},"2.5.4.5":{long:"DeviceSerialNumber"},"0.9.2342.19200300.100.1.25":{short:"DC",long:"DomainComponent"},"1.2.840.113549.1.9.1":{short:"E",long:"EMail"},"2.5.4.42":{short:"G",long:"GivenName"},"2.5.4.43":{short:"I",long:"Initials"},"2.5.4.7":{short:"L",long:"Locality"},"2.5.4.10":{short:"O",long:"Organization"},"2.5.4.11":{short:"OU",long:"OrganizationUnit"},"2.5.4.8":{short:"ST",long:"State"},"2.5.4.9":{short:"Street",long:"StreetAddress"},"2.5.4.4":{short:"SN",long:"SurName"},"2.5.4.12":{short:"T",long:"Title"},"1.2.840.113549.1.9.8":{long:"UnstructuredAddress"},"1.2.840.113549.1.9.2":{long:"UnstructuredName"}},b0=class{static{o(this,"X509Certificate")}constructor(e){if(this.publicKey=null,e){let t=new Uint8Array(e);this.LoadRaw(t),this.raw=t}}get SerialNumber(){return this.simpl.serialNumber.valueBlock.toString()}get Issuer(){return this.NameToString(this.simpl.issuer)}get Subject(){return this.NameToString(this.simpl.subject)}async Thumbprint(e="SHA-1"){return vn.crypto.subtle.digest(e,this.raw)}get PublicKey(){return this.publicKey}GetRaw(){return this.raw}async exportKey(e){if(e){let t={algorithm:e,usages:["verify"]};if(t.algorithm.name.toUpperCase()===cu){let s=this.simpl.subjectPublicKeyInfo.toJSON();if("crv"in s&&s.crv)t.algorithm.namedCurve=s.crv;else throw new Error("Cannot get Curved name from the ECDSA public key")}this.isHashedAlgorithm(t.algorithm)&&typeof t.algorithm.hash=="string"&&(t.algorithm.hash={name:t.algorithm.hash});let n=await this.simpl.getPublicKey({algorithm:t});return this.publicKey=n,n}return this.simpl.subjectPublicKeyInfo.algorithm.algorithmId==="1.2.840.113549.1.1.1"?this.publicKey=await this.simpl.getPublicKey({algorithm:{algorithm:{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},usages:["verify"]}}):this.publicKey=await this.simpl.getPublicKey(),this.publicKey}NameToString(e,t=","){let n=[];return e.typesAndValues.forEach(s=>{let i=s.type,a=hhe[i.toString()],u=a?a.short:null;n.push(`${u||i}=${s.value.valueBlock.value}`)}),n.join(t+" ")}LoadRaw(e){this.raw=new Uint8Array(e);let t=Gr(this.raw.buffer);this.simpl=new cs({schema:t.result})}isHashedAlgorithm(e){return!!e.hash}};var oC=class extends Kr{static{o(this,"X509IssuerSerial")}};He([Gt({localName:me.ElementNames.X509IssuerName,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,required:!0}),ht("design:type",String)],oC.prototype,"X509IssuerName",void 0);He([Gt({localName:me.ElementNames.X509SerialNumber,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,required:!0}),ht("design:type",String)],oC.prototype,"X509SerialNumber",void 0);oC=He([jt({localName:me.ElementNames.X509IssuerSerial})],oC);var Oh;(function(r){r[r.None=0]="None",r[r.EndCertOnly=1]="EndCertOnly",r[r.ExcludeRoot=2]="ExcludeRoot",r[r.WholeChain=3]="WholeChain"})(Oh||(Oh={}));var E0=class extends fi{static{o(this,"KeyInfoX509Data")}constructor(e,t=Oh.None){if(super(),this.x509crl=null,this.SubjectKeyIdList=[],e){if(e instanceof Uint8Array)this.AddCertificate(new b0(e));else if(e instanceof b0)switch(t){case Oh.None:case Oh.EndCertOnly:this.AddCertificate(e);break;case Oh.ExcludeRoot:this.AddCertificatesChainFrom(e,!1);break;case Oh.WholeChain:this.AddCertificatesChainFrom(e,!0);break}}}async importKey(e){throw new Fe(Te.METHOD_NOT_SUPPORTED)}async exportKey(e){if(!this.Certificates.length)throw new Fe(Te.NULL_REFERENCE);return this.Key=await this.Certificates[0].exportKey(e),this.Key}get Certificates(){return this.X509CertificateList}get CRL(){return this.x509crl}set CRL(e){this.x509crl=e}get IssuerSerials(){return this.IssuerSerialList}get SubjectKeyIds(){return this.SubjectKeyIdList}get SubjectNames(){return this.SubjectNameList}AddCertificate(e){if(!e)throw new Fe(Te.PARAM_REQUIRED,"certificate");this.X509CertificateList||(this.X509CertificateList=[]),this.X509CertificateList.push(e)}AddIssuerSerial(e,t){if(e==null)throw new Fe(Te.PARAM_REQUIRED,"issuerName");this.IssuerSerialList==null&&(this.IssuerSerialList=[]);let n={issuerName:e,serialNumber:t};this.IssuerSerialList.push(n)}AddSubjectKeyId(e){if(this.SubjectKeyIdList&&(this.SubjectKeyIdList=[]),typeof e=="string"){if(e!=null){let t=wr.FromBase64(e);this.SubjectKeyIdList.push(t)}}else this.SubjectKeyIdList.push(e)}AddSubjectName(e){this.SubjectNameList==null&&(this.SubjectNameList=[]),this.SubjectNameList.push(e)}GetXml(){let e=this.CreateDocument(),t=this.CreateElement(e),n=this.GetPrefix();if(this.IssuerSerialList!=null&&this.IssuerSerialList.length>0&&this.IssuerSerialList.forEach(s=>{let i=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509IssuerSerial),a=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509IssuerName);a.textContent=s.issuerName,i.appendChild(a);let u=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509SerialNumber);u.textContent=s.serialNumber,i.appendChild(u),t.appendChild(i)}),this.SubjectKeyIdList!=null&&this.SubjectKeyIdList.length>0&&this.SubjectKeyIdList.forEach(s=>{let i=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509SKI);i.textContent=wr.ToBase64(s),t.appendChild(i)}),this.SubjectNameList!=null&&this.SubjectNameList.length>0&&this.SubjectNameList.forEach(s=>{let i=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509SubjectName);i.textContent=s,t.appendChild(i)}),this.X509CertificateList!=null&&this.X509CertificateList.length>0&&this.X509CertificateList.forEach(s=>{let i=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509Certificate);i.textContent=wr.ToBase64(s.GetRaw()),t.appendChild(i)}),this.x509crl!=null){let s=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509CRL);s.textContent=wr.ToBase64(this.x509crl),t.appendChild(s)}return t}LoadXml(e){super.LoadXml(e),this.IssuerSerialList&&(this.IssuerSerialList=[]),this.SubjectKeyIdList&&(this.SubjectKeyIdList=[]),this.SubjectNameList&&(this.SubjectNameList=[]),this.X509CertificateList&&(this.X509CertificateList=[]),this.x509crl=null;let t=this.GetChildren(me.ElementNames.X509IssuerSerial);t&&t.forEach(s=>{let i=Kr.GetChild(s,me.ElementNames.X509IssuerName,me.NamespaceURI,!0),a=Kr.GetChild(s,me.ElementNames.X509SerialNumber,me.NamespaceURI,!0);i&&i.textContent&&a&&a.textContent&&this.AddIssuerSerial(i.textContent,a.textContent)}),t=this.GetChildren(me.ElementNames.X509SKI),t&&t.forEach(s=>{if(s.textContent){let i=wr.FromBase64(s.textContent);this.AddSubjectKeyId(i)}}),t=this.GetChildren(me.ElementNames.X509SubjectName),t?.forEach(s=>{s.textContent&&this.AddSubjectName(s.textContent)}),t=this.GetChildren(me.ElementNames.X509Certificate),t&&t.forEach(s=>{if(s.textContent){let i=wr.FromBase64(s.textContent);this.AddCertificate(new b0(i))}});let n=this.GetChild(me.ElementNames.X509CRL,!1);n&&n.textContent&&(this.x509crl=wr.FromBase64(n.textContent))}AddCertificatesChainFrom(e,t){}};E0=He([jt({localName:me.ElementNames.X509Data}),ht("design:paramtypes",[Object,Object])],E0);var ox=class extends fi{static{o(this,"SPKIData")}async importKey(e){let t=await vn.crypto.subtle.exportKey("spki",e);return this.SPKIexp=new Uint8Array(t),this.Key=e,this}async exportKey(e){if(!this.SPKIexp)throw new Error("SPKI data is not defined");let t=await vn.crypto.subtle.importKey("spki",this.SPKIexp,e,!0,["verify"]);return this.Key=t,t}};He([Gt({localName:me.ElementNames.SPKIexp,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,required:!0,converter:Vi}),ht("design:type",Object)],ox.prototype,"SPKIexp",void 0);ox=He([jt({localName:me.ElementNames.SPKIData})],ox);var kh=class extends $i{static{o(this,"KeyInfo")}OnLoadXml(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes.item(t);if(n.nodeType!==Ut.Element)continue;let s=null;switch(n.localName){case me.ElementNames.KeyValue:s=ax;break;case me.ElementNames.X509Data:s=E0;break;case me.ElementNames.SPKIData:s=ox;break;case me.ElementNames.KeyName:case me.ElementNames.RetrievalMethod:case me.ElementNames.PGPData:case me.ElementNames.MgmtData:}if(s){let i=new s;i.LoadXml(n),this.Add(i)}}}};He([Or({localName:me.AttributeNames.Id,defaultValue:""}),ht("design:type",String)],kh.prototype,"Id",void 0);kh=He([jt({localName:me.ElementNames.KeyInfo})],kh);var vl=class extends Kr{static{o(this,"Signature")}};He([Or({localName:me.AttributeNames.Id,defaultValue:""}),ht("design:type",String)],vl.prototype,"Id",void 0);He([Gt({parser:pu,required:!0}),ht("design:type",pu)],vl.prototype,"SignedInfo",void 0);He([Gt({localName:me.ElementNames.SignatureValue,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,required:!0,converter:Vi,defaultValue:null}),ht("design:type",Object)],vl.prototype,"SignatureValue",void 0);He([Gt({parser:kh}),ht("design:type",kh)],vl.prototype,"KeyInfo",void 0);He([Gt({parser:sx,noRoot:!0}),ht("design:type",sx)],vl.prototype,"ObjectList",void 0);vl=He([jt({localName:me.ElementNames.Signature})],vl);var dhe=class extends Map{static{o(this,"AlgorithmRegistry")}},dr=new dhe;dr.set(ZA,{type:"signature",algorithm:a0});dr.set(eC,{type:"signature",algorithm:o0});dr.set(tC,{type:"signature",algorithm:u0});dr.set(rC,{type:"signature",algorithm:c0});dr.set(ZA,{type:"signature",algorithm:a0});dr.set(eC,{type:"signature",algorithm:o0});dr.set(tC,{type:"signature",algorithm:u0});dr.set(rC,{type:"signature",algorithm:c0});dr.set(UD,{type:"signature",algorithm:sC});dr.set(XA,{type:"signature",algorithm:t0});dr.set(WA,{type:"signature",algorithm:r0});dr.set(zA,{type:"signature",algorithm:n0});dr.set(JA,{type:"signature",algorithm:s0});dr.set(XA.toUpperCase(),{type:"signature",algorithm:t0});dr.set(WA.toUpperCase(),{type:"signature",algorithm:r0});dr.set(zA.toUpperCase(),{type:"signature",algorithm:n0});dr.set(JA.toUpperCase(),{type:"signature",algorithm:s0});dr.set(RD,{type:"signature",algorithm:ex});dr.set(PD,{type:"signature",algorithm:tx});dr.set(OD,{type:"signature",algorithm:rx});dr.set(kD,{type:"signature",algorithm:nx});dr.set(Ym,{type:"hash",algorithm:KA});dr.set(Qm,{type:"hash",algorithm:Zy});dr.set(Zm,{type:"hash",algorithm:$A});dr.set(e0,{type:"hash",algorithm:GA});var Lh=class{static{o(this,"AlgorithmFactory")}static createHashAlgorithmFromNamespace(e){for(let[t,{type:n,algorithm:s}]of dr)if(n==="hash"&&t===e)return new s;throw new Fe(Te.ALGORITHM_NOT_SUPPORTED,e)}static createSignatureAlgorithmFromMethod(e){for(let[t,{type:n,algorithm:s}]of dr)if(n==="signature"&&e.Algorithm===t){let i=new s;return i.fromMethod&&i.fromMethod(e),i}throw new Fe(Te.ALGORITHM_NOT_SUPPORTED,e.Algorithm)}static createHashAlgorithmFromAlgorithm(e){for(let[,{type:t,algorithm:n}]of dr)if(t==="hash"){let s=new n;if(s.algorithm.name.toUpperCase()===e.name.toUpperCase())return s}throw new Fe(Te.ALGORITHM_NOT_SUPPORTED,e.name)}static createSignatureAlgorithmFromAlgorithm(e){for(let[,{type:t,algorithm:n}]of dr)if(t==="signature"){let s=n.fromAlgorithm(e);if(s)return s}throw new Fe(Te.ALGORITHM_NOT_SUPPORTED,e.name)}};var mhe=class extends Map{static{o(this,"TransformRegistry")}},du=new mhe;du.set(me.AlgorithmNamespaces.XmlDsigBase64Transform,fu);du.set(me.AlgorithmNamespaces.XmlDsigC14NTransform,co);du.set(me.AlgorithmNamespaces.XmlDsigC14NWithCommentsTransform,lo);du.set(me.AlgorithmNamespaces.XmlDsigEnvelopedSignatureTransform,hu);du.set(me.AlgorithmNamespaces.XmlDsigExcC14NTransform,fo);du.set(me.AlgorithmNamespaces.XmlDsigExcC14NWithCommentsTransform,ho);var ix=class{static{o(this,"CryptoConfig")}static CreateFromName(e){if(!e)throw new Fe(Te.PARAM_REQUIRED,"name");let t=du.get(e);if(t)return new t;let n;switch(e){case me.AlgorithmNamespaces.XmlDsigBase64Transform:n=new fu;break;case me.AlgorithmNamespaces.XmlDsigC14NTransform:n=new co;break;case me.AlgorithmNamespaces.XmlDsigC14NWithCommentsTransform:n=new lo;break;case me.AlgorithmNamespaces.XmlDsigEnvelopedSignatureTransform:n=new hu;break;case me.AlgorithmNamespaces.XmlDsigXPathTransform:throw new Fe(Te.ALGORITHM_NOT_SUPPORTED,e);case me.AlgorithmNamespaces.XmlDsigXsltTransform:throw new Fe(Te.ALGORITHM_NOT_SUPPORTED,e);case me.AlgorithmNamespaces.XmlDsigExcC14NTransform:n=new fo;break;case me.AlgorithmNamespaces.XmlDsigExcC14NWithCommentsTransform:n=new ho;break;case me.AlgorithmNamespaces.XmlDecryptionTransform:throw new Fe(Te.ALGORITHM_NOT_SUPPORTED,e);default:throw new Fe(Te.ALGORITHM_NOT_SUPPORTED,e)}return n}static CreateSignatureAlgorithm(e){return Lh.createSignatureAlgorithmFromMethod(e)}static CreateHashAlgorithm(e){return Lh.createHashAlgorithmFromNamespace(e)}static GetHashAlgorithm(e){let t=typeof e=="string"?{name:e}:e;return Lh.createHashAlgorithmFromAlgorithm(t)}static GetSignatureAlgorithm(e){let t=typeof e=="string"?{name:e}:e;return"hash"in t&&typeof t.hash=="string"&&(t.hash={name:t.hash}),Lh.createSignatureAlgorithmFromAlgorithm(t)}static CreateSignatureMethod(e){let t=new uo;return t.Algorithm=e.namespaceURI,e.toMethod&&e.toMethod(t),t}static RegisterSignatureAlgorithm(e,t){dr.set(e,{type:"signature",algorithm:t})}static RegisterHashAlgorithm(e,t){dr.set(e,{type:"hash",algorithm:t})}static RegisterKeyInfoClause(e,t){gl.set(e,t)}static RegisterTransform(e,t){du.set(e,t)}};var uC=Yx(TI(),1);var P9={xmldec:{version:"1.0",encoding:"UTF-8",standalone:void 0}};var O9={explicitArray:!1,explicitRoot:!1,preserveChildrenOrder:!0};var k9=class{static{o(this,"Xml2JsToolkit")}xml2js;constructor(e=yhe){this.xml2js=e,Yj({XMLSerializer:uC.default.XMLSerializer,DOMParser:uC.default.DOMParser,DOMImplementation:uC.default.DOMImplementation})}async validate(e,t){try{return await AU.validate(e,t),ri()}catch(n){return Bu(n)}}parse(e,t){return new Promise((n,s)=>new this.xml2js.Parser({...O9,...t}).parseString(e,(i,a)=>i?s(i):n(a)))}build(e,t){return Promise.resolve(new this.xml2js.Builder({...P9,...t}).buildObject(e))}digest(e,t,n=K0){return this.hash(this.canonicalize(e,n),t)}canonicalize(e,t=K0){let n=Li(this.clear(e));return new oo(t.includeComments,t.exclusive).Canonicalize(n)}getNode(e,t){let s=Li(e).documentElement.getElementsByTagName(t).item(0);return s?this.clear(Qa(s)):null}getFirstNode(e){let n=Li(e).documentElement.firstChild;return n?this.clear(Qa(n)):null}getAttribute(e,t){return Li(e).documentElement.getAttribute(t)}appendNode(e,t){let n=Li(e),{documentElement:s}=Li(t);return n.documentElement.appendChild(s),this.clear(Qa(n))}hash(e,t){return vhe.createHash(t).update(e,"utf8").digest().toString("base64")}clear(e){return['xmlns:default="http://www.w3.org/2000/09/xmldsig#"',' standalone="no"',"default:",":default",`
100
+ `,"\r"," "].reduce((n,s)=>n.replace(s,""),e.replace(/(>)\s*(<)/gm,"$1$2"))}};import{registerDecorator as xhe}from"class-validator";var L9=o(r=>(e,t)=>{xhe({name:"isDecimal",target:e.constructor,propertyName:t,options:r,validator:{validate(n){return n instanceof np?!0:typeof n=="string"||typeof n=="number"||typeof n=="bigint"},defaultMessage(n){return`${n.property} is not a valid Decimal value`}}})},"IsDecimal");import"reflect-metadata";import{registerDecorator as V9}from"class-validator";var A0=Symbol("choice"),C0=o(r=>r==null||r==="","isEmpty"),ATe=o(r=>e=>{let{properties:t,required:n=!1,...s}=r,i=Reflect.getMetadata(A0,e)??[],a={properties:t,required:n};i.push(a),Reflect.defineMetadata(A0,i,e);for(let u of t)V9({name:"choice",target:e,propertyName:u,options:s,validator:{validate(c,f){let h=f.object,m=f.property,g=Reflect.getMetadata(A0,e);if(!g)return!0;let x=g.find(v=>v.properties.includes(m));if(!x||C0(c))return!0;for(let v of x.properties){if(v===m)continue;let w=h[v];if(!C0(w))return!1}for(let v of g)if(v!==x)for(let w of v.properties){let S=h[w];if(!C0(S))return!1}return!0},defaultMessage(c){let f=Reflect.getMetadata(A0,e);if(!f)return`${c.property} validation error`;let h=f.find(g=>g.properties.includes(c.property));if(!h)return`${c.property} validation error`;let m=c.object;for(let g of h.properties){let x=m[g];if(!C0(x)&&g!==c.property)return`${c.property} cannot be set because ${g} is already set. Only one property from this choice group is allowed.`}for(let g of f)if(g!==h)for(let x of g.properties){let v=m[x];if(!C0(v))return`${c.property} cannot be set because ${x} from a different choice group is already set.`}return`${c.property} validation error`}}});if(n)for(let u of t)V9({name:"choiceGroupRequired",target:e,propertyName:u,options:{...s,always:!0},validator:{validate(c,f){let h=f.object,m=Reflect.getMetadata(A0,e);if(!m)return!0;let g=m.find(x=>x.properties.includes(f.property));if(!g?.required)return!0;for(let x of g.properties){let v=h[x];if(!C0(v))return!0}return f.property!==g.properties[0]},defaultMessage(c){let f=Reflect.getMetadata(A0,e);if(!f)return"At least one property from a choice group must be provided";let h=f.find(m=>m.properties.includes(c.property));return h?`You must provide a value for one of the following properties: ${h.properties.join(", ")}`:"At least one property from a choice group must be provided"}}})},"Choice");import"reflect-metadata";import{Transform as whe}from"class-transformer";var DTe=o(({fixed:r,...e}={fixed:2})=>(t,n)=>{L9(e)(t,n),whe(({value:s})=>np.newOrUndefined(s)?.toFixed(r))(t,n)},"TransformDecimal");import{Transform as Ehe}from"class-transformer";import{IsDateString as Ahe}from"class-validator";import MD from"dayjs";import She from"dayjs/plugin/utc";import bhe from"dayjs/plugin/timezone";MD.extend(She);MD.extend(bhe);var U9=MD;var FTe=o((r={})=>(e,t)=>{Ehe(({value:n})=>{let s=n instanceof Date?n.toISOString():n;return s?U9(s).tz("America/Sao_Paulo").format(r.format):void 0})(e,t),Ahe()(e,t)},"TransformDateString");var j9=class{static{o(this,"StateCodeAcValidator")}execute(e){if(e=e.replace(/\D/g,""),!/^01\d{11}$/.test(e))return!1;let t=e.split("").map(Number),n=t.slice(0,11),s=t[11],i=t[12],a=[4,3,2,9,8,7,6,5,4,3,2],c=n.reduce((v,w,S)=>v+w*a[S],0)%11,f=c===0||c===1?0:11-c,h=[5,4,3,2,9,8,7,6,5,4,3,2],g=[...n,f].reduce((v,w,S)=>v+w*h[S],0)%11,x=g===0||g===1?0:11-g;return s===f&&i===x}};var M9=class{static{o(this,"StateCodeAlValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9||!t.startsWith("24"))return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let c=0;c<8;c++)s+=parseInt(t[c],10)*n[c];let a=s*10%11;return(a===10?0:a)===parseInt(t[8],10)}};var F9=class{static{o(this,"StateCodeAmValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let a=0;a<8;a++)s+=parseInt(t[a],10)*n[a];let i;if(s<11)i=11-s;else{let a=s%11;i=a<=1?0:11-a}return i===parseInt(t[8],10)}};var q9=class{static{o(this,"StateCodeApValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9||!t.startsWith("03"))return!1;let n=t.substring(0,8),s=parseInt(n,10),i,a;s>=3017001&&s<=3019022?(i=9,a=1):s>=3000001&&s<=3017e3?(i=5,a=0):(i=0,a=0);let u=[9,8,7,6,5,4,3,2],c=i;for(let m=0;m<8;m++)c+=parseInt(t[m],10)*u[m];let h=11-c%11;return h===10?h=0:h===11&&(h=a),h===parseInt(t[8],10)}};var H9=class{static{o(this,"StateCodeBaValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==8&&t.length!==9)return!1;let n=t.split("").map(w=>parseInt(w,10)),s=(t.length===8?n[0]:n[1])<=5||n[0]===8?10:11,i=t.length===8?[7,6,5,4,3,2]:[8,7,6,5,4,3,2],a=0;for(let w=0;w<i.length;w++)a+=n[w]*i[w];let u=a%s,c=s-u;(s===11&&u<=1||s===10&&u===0)&&(c=0);let h=(t.slice(0,t.length-2)+c.toString()).split("").map(w=>parseInt(w,10)),m=t.length===8?[8,7,6,5,4,3,2]:[9,8,7,6,5,4,3,2],g=0;for(let w=0;w<m.length;w++)g+=h[w]*m[w];let x=g%s,v=s-x;return(s===11&&x<=1||s===10&&x===0)&&(v=0),v===n[t.length-2]&&c===n[t.length-1]}};var K9=class{static{o(this,"StateCodeCeValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u],10)*n[u];let a=11-s%11;return(a===10||a===11)&&(a=0),a===parseInt(t[8],10)}};var $9=class{static{o(this,"StateCodeDfValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==13||!t.startsWith("07"))return!1;let n=t.slice(0,11).split("").map(Number),s=t.slice(11).split("").map(Number),i=[2,3,4,5,6,7,8,9],a=0;for(let m=10,g=0;m>=0;m--,g=(g+1)%i.length)a+=n[m]*i[g];let u=11-a%11;(u===10||u===11)&&(u=0);let c=n.concat([u]),f=0;for(let m=11,g=0;m>=0;m--,g=(g+1)%i.length)f+=c[m]*i[g];let h=11-f%11;return(h===10||h===11)&&(h=0),u===s[0]&&h===s[1]}};var G9=class{static{o(this,"StateCodeEsValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u],10)*n[u];let i=s%11;return(i<2?0:11-i)===parseInt(t[8],10)}};var X9=class{static{o(this,"StateCodeGoValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=parseInt(t.substring(0,2));if(!(n===10||n===11||n>=20&&n<=29))return!1;let s=[9,8,7,6,5,4,3,2],i=0;for(let c=0;c<8;c++)i+=parseInt(t[c],10)*s[c];let a=i%11;return(a===0||a===1?0:11-a)===parseInt(t[8],10)}};var W9=class{static{o(this,"StateCodeMaValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9||!t.startsWith("12"))return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u],10)*n[u];let i=s%11;return(i===0||i===1?0:11-i)===parseInt(t[8],10)}};var z9=class{static{o(this,"StateCodeMgValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==13)return!1;let n=t.slice(0,11),s=n.slice(0,3)+"0"+n.slice(3),i=0;for(let x=0;x<12;x++){let v=x%2===0?1:2,w=(parseInt(s[x])*v).toString();i+=w.split("").reduce((S,A)=>S+parseInt(A),0)}let u=Math.ceil(i/10)*10-i,c=n+u.toString(),f=[3,2,11,10,9,8,7,6,5,4,3,2],h=0;for(let x=0;x<12;x++)h+=parseInt(c[x])*f[x];let m=h%11,g=m<2?0:11-m;return parseInt(t[11])===u&&parseInt(t[12])===g}};var J9=class{static{o(this,"StateCodeMsValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9||!(t.startsWith("28")||t.startsWith("50")))return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let c=0;c<8;c++)s+=parseInt(t[c],10)*n[c];let i=s%11,a=11-i;return(i===0||a>9?0:a)===parseInt(t[8],10)}};var Y9=class{static{o(this,"StateCodeMtValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==11)return!1;let n=[3,2,9,8,7,6,5,4,3,2],s=0;for(let u=0;u<10;u++)s+=parseInt(t[u],10)*n[u];let i=s%11;return(i===0||i===1?0:11-i)===parseInt(t[10],10)}};var Q9=class{static{o(this,"StateCodePaValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u])*n[u];let i=s%11;return(i===0||i===1?0:11-i)===parseInt(t[8])}};var Z9=class{static{o(this,"StateCodePbValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u])*n[u];let a=11-s%11;return(a===10||a===11)&&(a=0),a===parseInt(t[8])}};var eq=class{static{o(this,"StateCodePeValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=t.slice(0,7).split("").map(Number),s=[8,7,6,5,4,3,2],i=0;for(let x=0;x<7;x++)i+=n[x]*s[x];let a=i%11,u=a===0||a===1?0:11-a,c=[...n,u],f=[9,8,7,6,5,4,3,2],h=0;for(let x=0;x<8;x++)h+=c[x]*f[x];let m=h%11,g=m===0||m===1?0:11-m;return u===parseInt(t[7])&&g===parseInt(t[8])}};var tq=class{static{o(this,"StateCodePiValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u],10)*n[u];let a=11-s%11;return(a===10||a===11)&&(a=0),a===parseInt(t[8],10)}};var rq=class{static{o(this,"StateCodePrValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==10)return!1;let n=t.slice(0,8).split("").map(Number),s=[3,2,7,6,5,4,3,2],i=[4,3,2,7,6,5,4,3,2],a=0;for(let m=0;m<8;m++)a+=n[m]*s[m];let u=11-a%11;u>=10&&(u=0);let c=[...n,u],f=0;for(let m=0;m<9;m++)f+=c[m]*i[m];let h=11-f%11;return h>=10&&(h=0),u===parseInt(t[8])&&h===parseInt(t[9])}};var nq=class{static{o(this,"StateCodeRjValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==8)return!1;let n=[2,7,6,5,4,3,2],s=0;for(let u=0;u<7;u++)s+=parseInt(t[u],10)*n[u];let i=s%11;return(i<=1?0:11-i)===parseInt(t[7],10)}};var sq=class{static{o(this,"StateCodeRnValidator")}execute(e){let t=e.replace(/\D/g,"");if(!(t.length===9||t.length===10)||!t.startsWith("20"))return!1;let n=t.length===9?[9,8,7,6,5,4,3,2]:[10,9,8,7,6,5,4,3,2],s=t.slice(0,n.length).split("").map(Number),i=0;for(let f=0;f<n.length;f++)i+=s[f]*n[f];let u=i*10%11;return(u===10?0:u)===parseInt(t[t.length-1])}};var iq=class{static{o(this,"StateCodeRoValidator")}execute(e){let t=e.replace(/\D/g,""),n,s;if(t.length===9)n=t.slice(3,8).split("").map(Number),s=[6,5,4,3,2];else if(t.length===14)n=t.slice(0,13).split("").map(Number),s=[6,5,4,3,2,9,8,7,6,5,4,3,2];else return!1;let i=0;for(let c=0;c<s.length;c++)i+=n[c]*s[c];let u=11-i%11;return(u===10||u===11)&&(u-=10),u===parseInt(t[t.length-1])}};var aq=class{static{o(this,"StateCodeRrValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9||!t.startsWith("24"))return!1;let n=0;for(let i=0;i<8;i++)n+=(i+1)*parseInt(t[i],10);return n%9===parseInt(t[8],10)}};var oq=class{static{o(this,"StateCodeRsValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==10)return!1;let n=[2,9,8,7,6,5,4,3,2],s=0;for(let a=0;a<9;a++)s+=parseInt(t[a],10)*n[a];let i=11-s%11;return(i===10||i===11)&&(i=0),i===parseInt(t[9],10)}};var uq=class{static{o(this,"StateCodeScValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u],10)*n[u];let a=11-s%11;return(a===10||a===11)&&(a=0),a===parseInt(t[8],10)}};var cq=class{static{o(this,"StateCodeSeValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u])*n[u];let a=11-s%11;return(a===10||a===11)&&(a=0),a===parseInt(t[8],10)}};var lq=class{static{o(this,"StateCodeSpValidator")}execute(e){let t=e;if(t.length!==12)return!1;let n=t.split("").map(Number),s=[1,3,4,5,6,7,8,10],i=0;for(let h=0;h<8;h++)i+=n[h]*s[h];let a=i%11%10,u=[3,2,10,9,8,7,6,5,4,3,2],c=0;for(let h=0;h<11;h++)c+=n[h]*u[h];let f=c%11%10;return a===n[8]&&f===n[11]}};var fq=class{static{o(this,"StateCodeToValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==11)return!1;let n=t.split(""),s=n.slice(0,2).concat(n.slice(4,10)).map(Number),i=[9,8,7,6,5,4,3,2],a=0;for(let f=0;f<i.length;f++)a+=s[f]*i[f];let u=a%11;return(u<2?0:11-u)===parseInt(t[10])}};var cC=class{static{o(this,"ASN1")}extractCertificateInfo(e){let n=e.subject.split(`
101
+ `).reduce((i,a)=>{let[u,c]=a.split("=").map(f=>f.trim());return!u||!c?i:i.set(u,c)},new Map),s=this.oid("2.16.76.1.3.1",e.raw);return{CNPJ:this.oid("2.16.76.1.3.3",e.raw),CPF:s,CN:n.get("CN")?.replace(/:.*$/g,""),O:n.get("O"),OU:n.get("OU"),ST:n.get("ST"),L:n.get("L"),C:n.get("C")}}oid(e,t){let n=this.marker(e),s=t.indexOf(n);if(s===-1)return;let i=[t.subarray(0,s),t.subarray(s)];if(i.length<=1)return;let u=i[0].subarray(-4),c=u.subarray(-2);u[0]===48?c=u:u[1]===48&&(c=u.subarray(-3));let f=Buffer.concat([c,n,i[1]]),h=this.length(f),m=n.length,g=f.subarray(2+m,2+m+h),x=g.length-c.length-2;if(x<=0||x>g.length)return;let w=g.subarray(-x).toString("utf8");return w.substring(Buffer.from(w).findIndex((S,A)=>w.charCodeAt(A)>=32&&w.charCodeAt(A)<=126))}length(e){return e.length<2?0:e[1]<=127?e[1]:Buffer.from([e[1]&15]).reduce((t,n)=>t<<8|n,0)}marker(e){let t=e.split("."),n=t.slice(2).reduce((s,i)=>{let a=this.base128(s,Number.parseInt(i,10),!0);return s.length=0,s.push(...a),s},[]);return Buffer.from([6,n.length+1,40*Number.parseInt(t[0],10)+Number.parseInt(t[1],10),...n])}base128(e,t,n){let s=[...e];if(t>127){let a=this.base128(e,Math.floor(t/128),!1);a.length=0,s.push(...a)}let i=t%128;return n?s.push(i):s.push(128|i),s}};var pq=class{static{o(this,"NativeCertificateRepository")}httpClient;cache;constructor(e,t=new uw){this.httpClient=e,this.cache=t}async read(e){try{let{password:t}=e,n=await this.getPfxBuffer(e);if(n.isLeft())return n;let s=Vh.default.asn1.fromDer(n.value.toString("binary")),i=Vh.default.pkcs12.pkcs12FromAsn1(s,t),{certBag:a,pkcs8ShroudedKeyBag:u}=Vh.default.pki.oids,c=i.getBags({bagType:a}),f=i.getBags({bagType:u}),h=c[a];if(!h?.length)return ti(new pn("Cannot read certificate"));let[{cert:m},...g]=h;if(!m)return ti(new pn("Issuer Certificate not found"));let x=f[u]?.[0].key;if(!x)return ti(new pn("Certificate Private Key not found"));let v=g.reduce((b,{cert:E})=>(E&&b.push(new N0.X509Certificate(Vh.default.pki.certificateToPem(E))),b),[]),w=Vh.default.pki.privateKeyToPem(x),S=Vh.default.pki.certificateToPem(m),A=N0.createPrivateKey(w),T=new N0.X509Certificate(S);return ri({ca:v,password:t,privateKey:A,certificate:T})}catch(t){return Bu(t)}}async sign(e,t,n=Cu.SHA1){try{let i=N0.sign(n,Buffer.from(e),{key:t,padding:N0.constants.RSA_PKCS1_PADDING}).toString("base64");return await Promise.resolve(ri(i))}catch(s){return Promise.resolve(Bu(s))}}getCertificateInfo(e){return new cC().extractCertificateInfo(e)}getStringCertificate(e){return e.raw.toString("base64")}getStringPrivateKey(e){try{return e.export({type:"pkcs8",format:"pem"}).toString()}catch{throw new pn("Cannot extract private key")}}async getPfxBuffer(e){let{pfxPathOrBase64:t,password:n}=e,s=this.getCacheKey(t,n),i=await this.cache.get(s);if(i)return ri(i);if(Che.isAbsolute(t)||hq.existsSync(t))return this.hitBufferOnCache(s,hq.readFileSync(t));if(this.isValidRemoteUrl(t))try{let a=await this.httpClient.get(t,{responseType:"arraybuffer"});return await this.hitBufferOnCache(s,Buffer.from(a.data))}catch(a){return Bu(a)}return this.hitBufferOnCache(s,Buffer.from(t,"base64"))}getCacheKey(e,t){return N0.createHash("sha256").update(`${e}.${t}`).digest("hex")}async hitBufferOnCache(e,t){return await this.cache.set(e,t),ri(t)}isValidRemoteUrl(e){try{return new URL(e),!0}catch{return!1}}};var X_e={[br.AC]:"America/Rio_Branco",[br.AL]:"America/Maceio",[br.AM]:"America/Manaus",[br.AP]:"America/Belem",[br.BA]:"America/Bahia",[br.CE]:"America/Fortaleza",[br.DF]:"America/Sao_Paulo",[br.ES]:"America/Sao_Paulo",[br.GO]:"America/Sao_Paulo",[br.MA]:"America/Fortaleza",[br.MG]:"America/Sao_Paulo",[br.MS]:"America/Campo_Grande",[br.MT]:"America/Cuiaba",[br.PA]:"America/Belem",[br.PB]:"America/Fortaleza",[br.PE]:"America/Recife",[br.PI]:"America/Fortaleza",[br.PR]:"America/Sao_Paulo",[br.RJ]:"America/Sao_Paulo",[br.RN]:"America/Fortaleza",[br.RO]:"America/Porto_Velho",[br.RR]:"America/Boa_Vista",[br.RS]:"America/Sao_Paulo",[br.SC]:"America/Sao_Paulo",[br.SE]:"America/Maceio",[br.SP]:"America/Sao_Paulo",[br.TO]:"America/Araguaina"};export{C2 as a,hO as b,N2 as c,Cu as d,T2 as e,br as f,The as g,_he as h,pn as i,pO as j,I2 as k,Zh as l,_2 as m,Qx as n,ti as o,ri as p,dO as q,mO as r,$0 as s,spe as t,ipe as u,Zx as v,gO as w,vO as x,yO as y,mpe as z,np as A,PO as B,Bu as C,uw as D,pq as E,p8 as F,m8 as G,b8 as H,mU as I,k9 as J,L9 as K,ATe as L,DTe as M,FTe as N,j9 as O,M9 as P,F9 as Q,q9 as R,H9 as S,K9 as T,$9 as U,G9 as V,X9 as W,W9 as X,z9 as Y,J9 as Z,Y9 as _,Q9 as $,Z9 as aa,eq as ba,tq as ca,rq as da,nq as ea,sq as fa,iq as ga,aq as ha,oq as ia,uq as ja,cq as ka,lq as la,fq as ma,cC as na};
102
+ /*! Bundled license information:
103
+
104
+ lodash/lodash.js:
105
+ (**
106
+ * @license
107
+ * Lodash <https://lodash.com/>
108
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
109
+ * Released under MIT license <https://lodash.com/license>
110
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
111
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
112
+ *)
113
+
114
+ mime-db/index.js:
115
+ (*!
116
+ * mime-db
117
+ * Copyright(c) 2014 Jonathan Ong
118
+ * Copyright(c) 2015-2022 Douglas Christopher Wilson
119
+ * MIT Licensed
120
+ *)
121
+
122
+ mime-types/index.js:
123
+ (*!
124
+ * mime-types
125
+ * Copyright(c) 2014 Jonathan Ong
126
+ * Copyright(c) 2015 Douglas Christopher Wilson
127
+ * MIT Licensed
128
+ *)
129
+
130
+ axios/dist/node/axios.cjs:
131
+ (*! Axios v1.12.2 Copyright (c) 2025 Matt Zabriskie and contributors *)
132
+
133
+ js-md4/src/md4.js:
134
+ (**
135
+ * [js-md4]{@link https://github.com/emn178/js-md4}
136
+ *
137
+ * @namespace md4
138
+ * @version 0.3.2
139
+ * @author Yi-Cyuan Chen [emn178@gmail.com]
140
+ * @copyright Yi-Cyuan Chen 2015-2027
141
+ * @license MIT
142
+ *)
143
+
144
+ sax/lib/sax.js:
145
+ (*! http://mths.be/fromcodepoint v0.1.0 by @mathias *)
146
+
147
+ decimal.js/decimal.mjs:
148
+ (*!
149
+ * decimal.js v10.6.0
150
+ * An arbitrary-precision Decimal type for JavaScript.
151
+ * https://github.com/MikeMcl/decimal.js
152
+ * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
153
+ * MIT Licence
154
+ *)
155
+
156
+ pvtsutils/build/index.es.js:
157
+ (*!
158
+ * MIT License
159
+ *
160
+ * Copyright (c) 2017-2024 Peculiar Ventures, LLC
161
+ *
162
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
163
+ * of this software and associated documentation files (the "Software"), to deal
164
+ * in the Software without restriction, including without limitation the rights
165
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
166
+ * copies of the Software, and to permit persons to whom the Software is
167
+ * furnished to do so, subject to the following conditions:
168
+ *
169
+ * The above copyright notice and this permission notice shall be included in all
170
+ * copies or substantial portions of the Software.
171
+ *
172
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
173
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
174
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
175
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
176
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
177
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
178
+ * SOFTWARE.
179
+ *
180
+ *)
181
+
182
+ pvutils/build/utils.es.js:
183
+ (*!
184
+ Copyright (c) Peculiar Ventures, LLC
185
+ *)
186
+
187
+ asn1js/build/index.es.js:
188
+ (*!
189
+ * Copyright (c) 2014, GMO GlobalSign
190
+ * Copyright (c) 2015-2022, Peculiar Ventures
191
+ * All rights reserved.
192
+ *
193
+ * Author 2014-2019, Yury Strozhevsky
194
+ *
195
+ * Redistribution and use in source and binary forms, with or without modification,
196
+ * are permitted provided that the following conditions are met:
197
+ *
198
+ * * Redistributions of source code must retain the above copyright notice, this
199
+ * list of conditions and the following disclaimer.
200
+ *
201
+ * * Redistributions in binary form must reproduce the above copyright notice, this
202
+ * list of conditions and the following disclaimer in the documentation and/or
203
+ * other materials provided with the distribution.
204
+ *
205
+ * * Neither the name of the copyright holder nor the names of its
206
+ * contributors may be used to endorse or promote products derived from
207
+ * this software without specific prior written permission.
208
+ *
209
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
210
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
211
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
212
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
213
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
214
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
215
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
216
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
217
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
218
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
219
+ *
220
+ *)
221
+
222
+ @noble/hashes/esm/utils.js:
223
+ (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
224
+
225
+ pkijs/build/index.es.js:
226
+ (*!
227
+ * Copyright (c) 2014, GlobalSign
228
+ * Copyright (c) 2015-2019, Peculiar Ventures
229
+ * All rights reserved.
230
+ *
231
+ * Author 2014-2019, Yury Strozhevsky
232
+ *
233
+ * Redistribution and use in source and binary forms, with or without modification,
234
+ * are permitted provided that the following conditions are met:
235
+ *
236
+ * * Redistributions of source code must retain the above copyright notice, this
237
+ * list of conditions and the following disclaimer.
238
+ *
239
+ * * Redistributions in binary form must reproduce the above copyright notice, this
240
+ * list of conditions and the following disclaimer in the documentation and/or
241
+ * other materials provided with the distribution.
242
+ *
243
+ * * Neither the name of the {organization} nor the names of its
244
+ * contributors may be used to endorse or promote products derived from
245
+ * this software without specific prior written permission.
246
+ *
247
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
248
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
249
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
250
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
251
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
252
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
253
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
254
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
255
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
256
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
257
+ *
258
+ *)
259
+ */