nfets 0.0.42 → 0.0.44

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,270 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a as o,b as We,d as te,f as Zx}from"./chunk-W6MRGYXP.mjs";var Xt=te((Vpe,UP)=>{"use strict";UP.exports={options:{usePureJavaScript:!1}}});var FP=te((Upe,MP)=>{"use strict";var jC={};MP.exports=jC;var jP={};jC.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=Tz(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
3
+ `)}return n};jC.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=jP[e];if(!t){t=jP[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 Tz(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(Tz,"_encodeWithByteBuffer")});var lr=te((Mpe,$P)=>{"use strict";var qP=Xt(),HP=FP(),se=$P.exports=qP.util=qP.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){se.nextTick=process.nextTick,typeof setImmediate=="function"?se.setImmediate=setImmediate:se.setImmediate=se.nextTick;return}if(typeof setImmediate=="function"){se.setImmediate=function(){return setImmediate.apply(void 0,arguments)},se.nextTick=function(u){return setImmediate(u)};return}if(se.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=[];se.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=se.setImmediate;se.setImmediate=function(c){Date.now()-t>15?(t=Date.now(),i(c)):(e.push(c),e.length===1&&s.setAttribute("a",n=!n))}}se.nextTick=se.setImmediate})();se.isNodejs=typeof process<"u"&&process.versions&&process.versions.node;se.globalScope=(function(){return se.isNodejs?global:typeof self>"u"?window:self})();se.isArray=Array.isArray||function(r){return Object.prototype.toString.call(r)==="[object Array]"};se.isArrayBuffer=function(r){return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer};se.isArrayBufferView=function(r){return r&&se.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");se.ByteBuffer=MC;function MC(r){if(this.data="",this.read=0,typeof r=="string")this.data=r;else if(se.isArrayBuffer(r)||se.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 MC||typeof r=="object"&&typeof r.data=="string"&&typeof r.read=="number")&&(this.data=r.data,this.read=r.read);this._constructedStringLength=0}o(MC,"ByteStringBuffer");se.ByteStringBuffer=MC;var Iz=4096;se.ByteStringBuffer.prototype._optimizeConstructedString=function(r){this._constructedStringLength+=r,this._constructedStringLength>Iz&&(this.data.substr(0,1),this._constructedStringLength=0)};se.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};se.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};se.ByteStringBuffer.prototype.putByte=function(r){return this.putBytes(String.fromCharCode(r))};se.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};se.ByteStringBuffer.prototype.putBytes=function(r){return this.data+=r,this._optimizeConstructedString(r.length),this};se.ByteStringBuffer.prototype.putString=function(r){return this.putBytes(se.encodeUtf8(r))};se.ByteStringBuffer.prototype.putInt16=function(r){return this.putBytes(String.fromCharCode(r>>8&255)+String.fromCharCode(r&255))};se.ByteStringBuffer.prototype.putInt24=function(r){return this.putBytes(String.fromCharCode(r>>16&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(r&255))};se.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))};se.ByteStringBuffer.prototype.putInt16Le=function(r){return this.putBytes(String.fromCharCode(r&255)+String.fromCharCode(r>>8&255))};se.ByteStringBuffer.prototype.putInt24Le=function(r){return this.putBytes(String.fromCharCode(r&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(r>>16&255))};se.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))};se.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)};se.ByteStringBuffer.prototype.putSignedInt=function(r,e){return r<0&&(r+=2<<e-1),this.putInt(r,e)};se.ByteStringBuffer.prototype.putBuffer=function(r){return this.putBytes(r.getBytes())};se.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};se.ByteStringBuffer.prototype.getInt16=function(){var r=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,r};se.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};se.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};se.ByteStringBuffer.prototype.getInt16Le=function(){var r=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,r};se.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};se.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};se.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};se.ByteStringBuffer.prototype.getSignedInt=function(r){var e=this.getInt(r),t=2<<r-2;return e>=t&&(e-=t<<1),e};se.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};se.ByteStringBuffer.prototype.bytes=function(r){return typeof r>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+r)};se.ByteStringBuffer.prototype.at=function(r){return this.data.charCodeAt(this.read+r)};se.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};se.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};se.ByteStringBuffer.prototype.copy=function(){var r=se.createBuffer(this.data);return r.read=this.read,r};se.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this};se.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};se.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};se.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};se.ByteStringBuffer.prototype.toString=function(){return se.decodeUtf8(this.bytes())};function _z(r,e){e=e||{},this.read=e.readOffset||0,this.growSize=e.growSize||1024;var t=se.isArrayBuffer(r),n=se.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(_z,"DataBuffer");se.DataBuffer=_z;se.DataBuffer.prototype.length=function(){return this.write-this.read};se.DataBuffer.prototype.isEmpty=function(){return this.length()<=0};se.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};se.DataBuffer.prototype.putByte=function(r){return this.accommodate(1),this.data.setUint8(this.write++,r),this};se.DataBuffer.prototype.fillWithByte=function(r,e){this.accommodate(e);for(var t=0;t<e;++t)this.data.setUint8(r);return this};se.DataBuffer.prototype.putBytes=function(r,e){if(se.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(se.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 se.DataBuffer||typeof r=="object"&&typeof r.read=="number"&&typeof r.write=="number"&&se.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 se.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+=se.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+=se.binary.base64.decode(r,i,this.write),this;if(e==="utf8"&&(r=se.encodeUtf8(r),e="binary"),e==="binary"||e==="raw")return this.accommodate(r.length),i=new Uint8Array(this.data.buffer,this.write),this.write+=se.binary.raw.decode(i),this;if(e==="utf16")return this.accommodate(r.length*2),i=new Uint16Array(this.data.buffer,this.write),this.write+=se.text.utf16.encode(i),this;throw new Error("Invalid encoding: "+e)}throw Error("Invalid parameter: "+r)};se.DataBuffer.prototype.putBuffer=function(r){return this.putBytes(r),r.clear(),this};se.DataBuffer.prototype.putString=function(r){return this.putBytes(r,"utf16")};se.DataBuffer.prototype.putInt16=function(r){return this.accommodate(2),this.data.setInt16(this.write,r),this.write+=2,this};se.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};se.DataBuffer.prototype.putInt32=function(r){return this.accommodate(4),this.data.setInt32(this.write,r),this.write+=4,this};se.DataBuffer.prototype.putInt16Le=function(r){return this.accommodate(2),this.data.setInt16(this.write,r,!0),this.write+=2,this};se.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};se.DataBuffer.prototype.putInt32Le=function(r){return this.accommodate(4),this.data.setInt32(this.write,r,!0),this.write+=4,this};se.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};se.DataBuffer.prototype.putSignedInt=function(r,e){return X0(e),this.accommodate(e/8),r<0&&(r+=2<<e-1),this.putInt(r,e)};se.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};se.DataBuffer.prototype.getInt16=function(){var r=this.data.getInt16(this.read);return this.read+=2,r};se.DataBuffer.prototype.getInt24=function(){var r=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,r};se.DataBuffer.prototype.getInt32=function(){var r=this.data.getInt32(this.read);return this.read+=4,r};se.DataBuffer.prototype.getInt16Le=function(){var r=this.data.getInt16(this.read,!0);return this.read+=2,r};se.DataBuffer.prototype.getInt24Le=function(){var r=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,r};se.DataBuffer.prototype.getInt32Le=function(){var r=this.data.getInt32(this.read,!0);return this.read+=4,r};se.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};se.DataBuffer.prototype.getSignedInt=function(r){var e=this.getInt(r),t=2<<r-2;return e>=t&&(e-=t<<1),e};se.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};se.DataBuffer.prototype.bytes=function(r){return typeof r>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+r)};se.DataBuffer.prototype.at=function(r){return this.data.getUint8(this.read+r)};se.DataBuffer.prototype.setAt=function(r,e){return this.data.setUint8(r,e),this};se.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};se.DataBuffer.prototype.copy=function(){return new se.DataBuffer(this)};se.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};se.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this};se.DataBuffer.prototype.truncate=function(r){return this.write=Math.max(0,this.length()-r),this.read=Math.min(this.read,this.write),this};se.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};se.DataBuffer.prototype.toString=function(r){var e=new Uint8Array(this.data,this.read,this.length());if(r=r||"utf8",r==="binary"||r==="raw")return se.binary.raw.encode(e);if(r==="hex")return se.binary.hex.encode(e);if(r==="base64")return se.binary.base64.encode(e);if(r==="utf8")return se.text.utf8.decode(e);if(r==="utf16")return se.text.utf16.decode(e);throw new Error("Invalid encoding: "+r)};se.createBuffer=function(r,e){return e=e||"raw",r!==void 0&&e==="utf8"&&(r=se.encodeUtf8(r)),new se.ByteBuffer(r)};se.fillString=function(r,e){for(var t="";e>0;)e&1&&(t+=r),e>>>=1,e>0&&(r+=r);return t};se.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};se.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};se.bytesToHex=function(r){return se.createBuffer(r).toHex()};se.int32ToBytes=function(r){return String.fromCharCode(r>>24&255)+String.fromCharCode(r>>16&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(r&255)};var Bu="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],KP="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";se.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+=Bu.charAt(s>>2),t+=Bu.charAt((s&3)<<4|i>>4),isNaN(i)?t+="==":(t+=Bu.charAt((i&15)<<2|a>>6),t+=isNaN(a)?"=":Bu.charAt(a&63)),e&&t.length>e&&(n+=t.substr(0,e)+`\r
4
+ `,t=t.substr(e));return n+=t,n};se.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};se.encodeUtf8=function(r){return unescape(encodeURIComponent(r))};se.decodeUtf8=function(r){return decodeURIComponent(escape(r))};se.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:HP.encode,decode:HP.decode}};se.binary.raw.encode=function(r){return String.fromCharCode.apply(null,r)};se.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};se.binary.hex.encode=se.bytesToHex;se.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};se.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+=Bu.charAt(s>>2),t+=Bu.charAt((s&3)<<4|i>>4),isNaN(i)?t+="==":(t+=Bu.charAt((i&15)<<2|a>>6),t+=isNaN(a)?"=":Bu.charAt(a&63)),e&&t.length>e&&(n+=t.substr(0,e)+`\r
5
+ `,t=t.substr(e));return n+=t,n};se.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)};se.binary.base58.encode=function(r,e){return se.binary.baseN.encode(r,KP,e)};se.binary.base58.decode=function(r,e){return se.binary.baseN.decode(r,KP,e)};se.text={utf8:{},utf16:{}};se.text.utf8.encode=function(r,e,t){r=se.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};se.text.utf8.decode=function(r){return se.decodeUtf8(String.fromCharCode.apply(null,r))};se.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};se.text.utf16.decode=function(r){return String.fromCharCode.apply(null,new Uint16Array(r.buffer))};se.deflate=function(r,e,t){if(e=se.decode64(r.deflate(se.encode64(e)).rval),t){var n=2,s=e.charCodeAt(1);s&32&&(n=6),e=e.substring(n,e.length-4)}return e};se.inflate=function(r,e,t){var n=r.inflate(se.encode64(e)).rval;return n===null?null:se.decode64(n)};var FC=o(function(r,e,t){if(!r)throw new Error("WebStorage not available.");var n;if(t===null?n=r.removeItem(e):(t=se.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"),qC=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(se.decode64(t))),t},"_getStorageObject"),Dz=o(function(r,e,t,n){var s=qC(r,e);s===null&&(s={}),s[t]=n,FC(r,e,s)},"_setItem"),Bz=o(function(r,e,t){var n=qC(r,e);return n!==null&&(n=t in n?n[t]:null),n},"_getItem"),Rz=o(function(r,e,t){var n=qC(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),FC(r,e,n)}},"_removeItem"),Oz=o(function(r,e){FC(r,e,null)},"_clearItems"),fw=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");se.setItem=function(r,e,t,n,s){fw(Dz,arguments,s)};se.getItem=function(r,e,t,n){return fw(Bz,arguments,n)};se.removeItem=function(r,e,t,n){fw(Rz,arguments,n)};se.clearItems=function(r,e,t){fw(Oz,arguments,t)};se.isEmpty=function(r){for(var e in r)if(r.hasOwnProperty(e))return!1;return!0};se.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("")};se.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):"")};se.formatSize=function(r){return r>=1073741824?r=se.formatNumber(r/1073741824,2,".","")+" GiB":r>=1048576?r=se.formatNumber(r/1048576,2,".","")+" MiB":r>=1024?r=se.formatNumber(r/1024,0)+" KiB":r=se.formatNumber(r,0)+" bytes",r};se.bytesFromIP=function(r){return r.indexOf(".")!==-1?se.bytesFromIPv4(r):r.indexOf(":")!==-1?se.bytesFromIPv6(r):null};se.bytesFromIPv4=function(r){if(r=r.split("."),r.length!==4)return null;for(var e=se.createBuffer(),t=0;t<r.length;++t){var n=parseInt(r[t],10);if(isNaN(n))return null;e.putByte(n)}return e.getBytes()};se.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=se.createBuffer(),s=0;s<8;++s){if(!r[s]||r[s].length===0){n.fillWithByte(0,t),t=0;continue}var i=se.hexToBytes(r[s]);i.length<2&&n.putByte(0),n.putBytes(i)}return n.getBytes()};se.bytesToIP=function(r){return r.length===4?se.bytesToIPv4(r):r.length===16?se.bytesToIPv6(r):null};se.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(".")};se.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=se.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(":")};se.estimateCores=function(r,e){if(typeof r=="function"&&(e=r,r={}),r=r||{},"cores"in se&&!r.update)return e(null,se.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return se.cores=navigator.hardwareConcurrency,e(null,se.cores);if(typeof Worker>"u")return se.cores=1,e(null,se.cores);if(typeof Blob>"u")return se.cores=2,e(null,se.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 se.cores=Math.max(1,f),URL.revokeObjectURL(t),e(null,se.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,S){return Math.max(v,S.length)},0)}o(i,"reduce")}});var hw=te((qpe,GP)=>{"use strict";var _n=Xt();lr();GP.exports=_n.cipher=_n.cipher||{};_n.cipher.algorithms=_n.cipher.algorithms||{};_n.cipher.createCipher=function(r,e){var t=r;if(typeof t=="string"&&(t=_n.cipher.getAlgorithm(t),t&&(t=t())),!t)throw new Error("Unsupported algorithm: "+r);return new _n.cipher.BlockCipher({algorithm:t,key:e,decrypt:!1})};_n.cipher.createDecipher=function(r,e){var t=r;if(typeof t=="string"&&(t=_n.cipher.getAlgorithm(t),t&&(t=t())),!t)throw new Error("Unsupported algorithm: "+r);return new _n.cipher.BlockCipher({algorithm:t,key:e,decrypt:!0})};_n.cipher.registerAlgorithm=function(r,e){r=r.toUpperCase(),_n.cipher.algorithms[r]=e};_n.cipher.getAlgorithm=function(r){return r=r.toUpperCase(),r in _n.cipher.algorithms?_n.cipher.algorithms[r]:null};var HC=_n.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)};HC.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=_n.util.createBuffer(),this.output=r.output||_n.util.createBuffer(),this.mode.start(e)};HC.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()};HC.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 $C=te((Hpe,XP)=>{"use strict";var Dn=Xt();lr();Dn.cipher=Dn.cipher||{};var Qt=XP.exports=Dn.cipher.modes=Dn.cipher.modes||{};Qt.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)};Qt.ecb.prototype.start=function(r){};Qt.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])};Qt.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])};Qt.ecb.prototype.pad=function(r,e){var t=r.length()===this.blockSize?this.blockSize:this.blockSize-r.length();return r.fillWithByte(t,t),!0};Qt.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)};Qt.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)};Qt.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=pw(r.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")};Qt.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};Qt.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)};Qt.cbc.prototype.pad=function(r,e){var t=r.length()===this.blockSize?this.blockSize:this.blockSize-r.length();return r.fillWithByte(t,t),!0};Qt.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)};Qt.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=Dn.util.createBuffer(),this._partialBytes=0};Qt.cfb.prototype.start=function(r){if(!("iv"in r))throw new Error("Invalid IV parameter.");this._iv=pw(r.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Qt.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};Qt.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};Qt.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=Dn.util.createBuffer(),this._partialBytes=0};Qt.ofb.prototype.start=function(r){if(!("iv"in r))throw new Error("Invalid IV parameter.");this._iv=pw(r.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Qt.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};Qt.ofb.prototype.decrypt=Qt.ofb.prototype.encrypt;Qt.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=Dn.util.createBuffer(),this._partialBytes=0};Qt.ctr.prototype.start=function(r){if(!("iv"in r))throw new Error("Invalid IV parameter.");this._iv=pw(r.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Qt.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}dw(this._inBlock)};Qt.ctr.prototype.decrypt=Qt.ctr.prototype.encrypt;Qt.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=Dn.util.createBuffer(),this._partialBytes=0,this._R=3774873600};Qt.gcm.prototype.start=function(r){if(!("iv"in r))throw new Error("Invalid IV parameter.");var e=Dn.util.createBuffer(r.iv);this._cipherLength=0;var t;if("additionalData"in r?t=Dn.util.createBuffer(r.additionalData):t=Dn.util.createBuffer(),"tagLength"in r?this._tagLength=r.tagLength:this._tagLength=128,this._tag=null,r.decrypt&&(this._tag=Dn.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(KC(n*8)))}this._inBlock=this._j0.slice(0),dw(this._inBlock),this._partialBytes=0,t=Dn.util.createBuffer(t),this._aDataLength=KC(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()])};Qt.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),dw(this._inBlock)};Qt.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),dw(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};Qt.gcm.prototype.afterFinish=function(r,e){var t=!0;e.decrypt&&e.overflow&&r.truncate(this.blockSize-e.overflow),this.tag=Dn.util.createBuffer();var n=this._aDataLength.concat(KC(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};Qt.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};Qt.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)};Qt.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};Qt.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)};Qt.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};Qt.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 pw(r,e){if(typeof r=="string"&&(r=Dn.util.createBuffer(r)),Dn.util.isArray(r)&&r.length>4){var t=r;r=Dn.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(!Dn.util.isArray(r)){for(var s=[],i=e/4,n=0;n<i;++n)s.push(r.getInt32());r=s}return r}o(pw,"transformIV");function dw(r){r[r.length-1]=r[r.length-1]+1&4294967295}o(dw,"inc32");function KC(r){return[r/4294967296|0,r&4294967295]}o(KC,"from64To32")});var Ou=te(($pe,YP)=>{"use strict";var Rr=Xt();hw();$C();lr();YP.exports=Rr.aes=Rr.aes||{};Rr.aes.startEncrypting=function(r,e,t,n){var s=mw({key:r,output:t,decrypt:!1,mode:n});return s.start(e),s};Rr.aes.createEncryptionCipher=function(r,e){return mw({key:r,output:null,decrypt:!1,mode:e})};Rr.aes.startDecrypting=function(r,e,t,n){var s=mw({key:r,output:t,decrypt:!0,mode:n});return s.start(e),s};Rr.aes.createDecryptionCipher=function(r,e){return mw({key:r,output:null,decrypt:!0,mode:e})};Rr.aes.Algorithm=function(r,e){WC||zP();var t=this;t.name=r,t.mode=new e({blockSize:16,cipher:{encrypt:o(function(n,s){return XC(t._w,n,s,!1)},"encrypt"),decrypt:o(function(n,s){return XC(t._w,n,s,!0)},"decrypt")}}),t._init=!1};Rr.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=Rr.util.createBuffer(e);else if(Rr.util.isArray(e)&&(e.length===16||e.length===24||e.length===32)){t=e,e=Rr.util.createBuffer();for(var n=0;n<t.length;++n)e.putByte(t[n])}if(!Rr.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(!Rr.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=JP(e,r.decrypt&&!a),this._init=!0}};Rr.aes._expandKey=function(r,e){return WC||zP(),JP(r,e)};Rr.aes._updateBlock=XC;ip("AES-ECB",Rr.cipher.modes.ecb);ip("AES-CBC",Rr.cipher.modes.cbc);ip("AES-CFB",Rr.cipher.modes.cfb);ip("AES-OFB",Rr.cipher.modes.ofb);ip("AES-CTR",Rr.cipher.modes.ctr);ip("AES-GCM",Rr.cipher.modes.gcm);function ip(r,e){var t=o(function(){return new Rr.aes.Algorithm(r,e)},"factory");Rr.cipher.registerAlgorithm(r,t)}o(ip,"registerAlgorithm");var WC=!1,sp=4,vs,GC,WP,Il,Zi;function zP(){WC=!0,WP=[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;vs=new Array(256),GC=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,vs[t]=u,GC[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(zP,"initialize");function JP(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=vs[n>>>16&255]<<24^vs[n>>>8&255]<<16^vs[n&255]<<8^vs[n>>>24]^WP[s]<<24,s++):i>6&&c%i===4&&(n=vs[n>>>24]<<24^vs[n>>>16&255]<<16^vs[n>>>8&255]<<8^vs[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,S=u-sp;c<u;c+=sp,S-=sp)if(c===0||c===u-sp)v[c]=t[S],v[c+1]=t[S+3],v[c+2]=t[S+2],v[c+3]=t[S+1];else for(var E=0;E<sp;++E)f=t[S+E],v[c+(3&-E)]=h[vs[f>>>24]]^m[vs[f>>>16&255]]^g[vs[f>>>8&255]]^x[vs[f&255]];t=v}return t}o(JP,"_expandKey");function XC(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=GC):(i=Il[0],a=Il[1],u=Il[2],c=Il[3],f=vs);var h,m,g,x,v,S,E;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 C=3,_=1;_<s;++_)v=i[h>>>24]^a[m>>>16&255]^u[g>>>8&255]^c[x&255]^r[++C],S=i[m>>>24]^a[g>>>16&255]^u[x>>>8&255]^c[h&255]^r[++C],E=i[g>>>24]^a[x>>>16&255]^u[h>>>8&255]^c[m&255]^r[++C],x=i[x>>>24]^a[h>>>16&255]^u[m>>>8&255]^c[g&255]^r[++C],h=v,m=S,g=E;t[0]=f[h>>>24]<<24^f[m>>>16&255]<<16^f[g>>>8&255]<<8^f[x&255]^r[++C],t[n?3:1]=f[m>>>24]<<24^f[g>>>16&255]<<16^f[x>>>8&255]<<8^f[h&255]^r[++C],t[2]=f[g>>>24]<<24^f[x>>>16&255]<<16^f[h>>>8&255]<<8^f[m&255]^r[++C],t[n?1:3]=f[x>>>24]<<24^f[h>>>16&255]<<16^f[m>>>8&255]<<8^f[g&255]^r[++C]}o(XC,"_updateBlock");function mw(r){r=r||{};var e=(r.mode||"CBC").toUpperCase(),t="AES-"+e,n;r.decrypt?n=Rr.cipher.createDecipher(t,r.key):n=Rr.cipher.createCipher(t,r.key);var s=n.start;return n.start=function(i,a){var u=null;a instanceof Rr.util.ByteBuffer&&(u=a,a={}),a=a||{},a.output=u,a.iv=i,s.call(n,a)},n}o(mw,"_createCipher")});var Pu=te((Xpe,QP)=>{"use strict";var W0=Xt();W0.pki=W0.pki||{};var zC=QP.exports=W0.pki.oids=W0.oids=W0.oids||{};function Fe(r,e){zC[r]=e,zC[e]=r}o(Fe,"_IN");function xr(r,e){zC[r]=e}o(xr,"_I_");Fe("1.2.840.113549.1.1.1","rsaEncryption");Fe("1.2.840.113549.1.1.4","md5WithRSAEncryption");Fe("1.2.840.113549.1.1.5","sha1WithRSAEncryption");Fe("1.2.840.113549.1.1.7","RSAES-OAEP");Fe("1.2.840.113549.1.1.8","mgf1");Fe("1.2.840.113549.1.1.9","pSpecified");Fe("1.2.840.113549.1.1.10","RSASSA-PSS");Fe("1.2.840.113549.1.1.11","sha256WithRSAEncryption");Fe("1.2.840.113549.1.1.12","sha384WithRSAEncryption");Fe("1.2.840.113549.1.1.13","sha512WithRSAEncryption");Fe("1.3.101.112","EdDSA25519");Fe("1.2.840.10040.4.3","dsa-with-sha1");Fe("1.3.14.3.2.7","desCBC");Fe("1.3.14.3.2.26","sha1");Fe("1.3.14.3.2.29","sha1WithRSASignature");Fe("2.16.840.1.101.3.4.2.1","sha256");Fe("2.16.840.1.101.3.4.2.2","sha384");Fe("2.16.840.1.101.3.4.2.3","sha512");Fe("2.16.840.1.101.3.4.2.4","sha224");Fe("2.16.840.1.101.3.4.2.5","sha512-224");Fe("2.16.840.1.101.3.4.2.6","sha512-256");Fe("1.2.840.113549.2.2","md2");Fe("1.2.840.113549.2.5","md5");Fe("1.2.840.113549.1.7.1","data");Fe("1.2.840.113549.1.7.2","signedData");Fe("1.2.840.113549.1.7.3","envelopedData");Fe("1.2.840.113549.1.7.4","signedAndEnvelopedData");Fe("1.2.840.113549.1.7.5","digestedData");Fe("1.2.840.113549.1.7.6","encryptedData");Fe("1.2.840.113549.1.9.1","emailAddress");Fe("1.2.840.113549.1.9.2","unstructuredName");Fe("1.2.840.113549.1.9.3","contentType");Fe("1.2.840.113549.1.9.4","messageDigest");Fe("1.2.840.113549.1.9.5","signingTime");Fe("1.2.840.113549.1.9.6","counterSignature");Fe("1.2.840.113549.1.9.7","challengePassword");Fe("1.2.840.113549.1.9.8","unstructuredAddress");Fe("1.2.840.113549.1.9.14","extensionRequest");Fe("1.2.840.113549.1.9.20","friendlyName");Fe("1.2.840.113549.1.9.21","localKeyId");Fe("1.2.840.113549.1.9.22.1","x509Certificate");Fe("1.2.840.113549.1.12.10.1.1","keyBag");Fe("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag");Fe("1.2.840.113549.1.12.10.1.3","certBag");Fe("1.2.840.113549.1.12.10.1.4","crlBag");Fe("1.2.840.113549.1.12.10.1.5","secretBag");Fe("1.2.840.113549.1.12.10.1.6","safeContentsBag");Fe("1.2.840.113549.1.5.13","pkcs5PBES2");Fe("1.2.840.113549.1.5.12","pkcs5PBKDF2");Fe("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4");Fe("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4");Fe("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC");Fe("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC");Fe("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC");Fe("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC");Fe("1.2.840.113549.2.7","hmacWithSHA1");Fe("1.2.840.113549.2.8","hmacWithSHA224");Fe("1.2.840.113549.2.9","hmacWithSHA256");Fe("1.2.840.113549.2.10","hmacWithSHA384");Fe("1.2.840.113549.2.11","hmacWithSHA512");Fe("1.2.840.113549.3.7","des-EDE3-CBC");Fe("2.16.840.1.101.3.4.1.2","aes128-CBC");Fe("2.16.840.1.101.3.4.1.22","aes192-CBC");Fe("2.16.840.1.101.3.4.1.42","aes256-CBC");Fe("2.5.4.3","commonName");Fe("2.5.4.4","surname");Fe("2.5.4.5","serialNumber");Fe("2.5.4.6","countryName");Fe("2.5.4.7","localityName");Fe("2.5.4.8","stateOrProvinceName");Fe("2.5.4.9","streetAddress");Fe("2.5.4.10","organizationName");Fe("2.5.4.11","organizationalUnitName");Fe("2.5.4.12","title");Fe("2.5.4.13","description");Fe("2.5.4.15","businessCategory");Fe("2.5.4.17","postalCode");Fe("2.5.4.42","givenName");Fe("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName");Fe("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName");Fe("2.16.840.1.113730.1.1","nsCertType");Fe("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");Fe("2.5.29.14","subjectKeyIdentifier");Fe("2.5.29.15","keyUsage");xr("2.5.29.16","privateKeyUsagePeriod");Fe("2.5.29.17","subjectAltName");Fe("2.5.29.18","issuerAltName");Fe("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");Fe("2.5.29.31","cRLDistributionPoints");Fe("2.5.29.32","certificatePolicies");xr("2.5.29.33","policyMappings");xr("2.5.29.34","policyConstraints");Fe("2.5.29.35","authorityKeyIdentifier");xr("2.5.29.36","policyConstraints");Fe("2.5.29.37","extKeyUsage");xr("2.5.29.46","freshestCRL");xr("2.5.29.54","inhibitAnyPolicy");Fe("1.3.6.1.4.1.11129.2.4.2","timestampList");Fe("1.3.6.1.5.5.7.1.1","authorityInfoAccess");Fe("1.3.6.1.5.5.7.3.1","serverAuth");Fe("1.3.6.1.5.5.7.3.2","clientAuth");Fe("1.3.6.1.5.5.7.3.3","codeSigning");Fe("1.3.6.1.5.5.7.3.4","emailProtection");Fe("1.3.6.1.5.5.7.3.8","timeStamping")});var ea=te((zpe,e3)=>{"use strict";var Mr=Xt();lr();Pu();var et=e3.exports=Mr.asn1=Mr.asn1||{};et.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};et.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};et.create=function(r,e,t,n,s){if(Mr.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||Mr.util.isArray(n),value:n};return s&&"bitStringContents"in s&&(u.bitStringContents=s.bitStringContents,u.original=et.copy(u)),u};et.copy=function(r,e){var t;if(Mr.util.isArray(r)){t=[];for(var n=0;n<r.length;++n)t.push(et.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:et.copy(r.value,e)},e&&!e.excludeBitStringContents&&(t.bitStringContents=r.bitStringContents),t)};et.equals=function(r,e,t){if(Mr.util.isArray(r)){if(!Mr.util.isArray(e)||r.length!==e.length)return!1;for(var n=0;n<r.length;++n)if(!et.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&&et.equals(r.value,e.value);return t&&t.includeBitStringContents&&(s=s&&r.bitStringContents===e.bitStringContents),s};et.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 Pz=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");et.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),typeof r=="string"&&(r=Mr.util.createBuffer(r));var t=r.length(),n=gw(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 gw(r,e,t,n){var s;z0(r,e,2);var i=r.getByte();e--;var a=i&192,u=i&31;s=r.length();var c=Pz(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(gw(r,e,t+1,n)),e-=s-r.length()}else for(;c>0;)s=r.length(),h.push(gw(r,c,t+1,n)),e-=s-r.length(),c-=s-r.length();if(h===void 0&&a===et.Class.UNIVERSAL&&u===et.Type.BITSTRING&&(m=r.bytes(c)),h===void 0&&n.decodeBitStrings&&a===et.Class.UNIVERSAL&&u===et.Type.BITSTRING&&c>1){var x=r.read,v=e,S=0;if(u===et.Type.BITSTRING&&(z0(r,e,1),S=r.getByte(),e--),S===0)try{s=r.length();var E={strict:!0,decodeBitStrings:!0},C=gw(r,e,t+1,E),_=s-r.length();e-=_,u==et.Type.BITSTRING&&_++;var b=C.tagClass;_===c&&(b===et.Class.UNIVERSAL||b===et.Class.CONTEXT_SPECIFIC)&&(h=[C])}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===et.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 A=m===void 0?null:{bitStringContents:m};return et.create(a,u,g,h,A)}o(gw,"_fromDer");et.toDer=function(r){var e=Mr.util.createBuffer(),t=r.tagClass|r.type,n=Mr.util.createBuffer(),s=!1;if("bitStringContents"in r&&(s=!0,r.original&&(s=et.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(et.toDer(r.value[i]))}else if(r.type===et.Type.BMPSTRING)for(var i=0;i<r.value.length;++i)n.putInt16(r.value.charCodeAt(i));else r.type===et.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};et.oidToDer=function(r){var e=r.split("."),t=Mr.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){n=!0,s=[],i=parseInt(e[u],10);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};et.derToOid=function(r){var e;typeof r=="string"&&(r=Mr.util.createBuffer(r));var t=r.getByte();e=Math.floor(t/40)+"."+t%40;for(var n=0;r.length()>0;)t=r.getByte(),n=n<<7,t&128?n+=t&127:(e+="."+(n+t),n=0);return e};et.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};et.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};et.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};et.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};et.integerToDer=function(r){var e=Mr.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};et.derToInteger=function(r){typeof r=="string"&&(r=Mr.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)};et.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&&Mr.util.isArray(e.value))for(var i=0,a=0;s&&a<e.value.length;++a)s=e.value[a].optional||!1,r.value[i]&&(s=et.validate(r.value[i],e.value[a],t,n),s?++i:e.value[a].optional&&(s=!0)),!s&&n&&n.push("["+e.name+'] Tag class "'+e.tagClass+'", type "'+e.type+'" expected value length "'+e.value.length+'", got "'+r.value.length+'"');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 u;if(r.bitStringContents.length<2)t[e.captureBitStringValue]="";else{var c=r.bitStringContents.charCodeAt(0);if(c!==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 ZP=/[^\\u0000-\\u00ff]/;et.prettyPrint=function(r,e,t){var n="";e=e||0,t=t||2,e>0&&(n+=`
6
+ `);for(var s="",i=0;i<e*t;++i)s+=" ";switch(n+=s+"Tag: ",r.tagClass){case et.Class.UNIVERSAL:n+="Universal:";break;case et.Class.APPLICATION:n+="Application:";break;case et.Class.CONTEXT_SPECIFIC:n+="Context-Specific:";break;case et.Class.PRIVATE:n+="Private:";break}if(r.tagClass===et.Class.UNIVERSAL)switch(n+=r.type,r.type){case et.Type.NONE:n+=" (None)";break;case et.Type.BOOLEAN:n+=" (Boolean)";break;case et.Type.INTEGER:n+=" (Integer)";break;case et.Type.BITSTRING:n+=" (Bit string)";break;case et.Type.OCTETSTRING:n+=" (Octet string)";break;case et.Type.NULL:n+=" (Null)";break;case et.Type.OID:n+=" (Object Identifier)";break;case et.Type.ODESC:n+=" (Object Descriptor)";break;case et.Type.EXTERNAL:n+=" (External or Instance of)";break;case et.Type.REAL:n+=" (Real)";break;case et.Type.ENUMERATED:n+=" (Enumerated)";break;case et.Type.EMBEDDED:n+=" (Embedded PDV)";break;case et.Type.UTF8:n+=" (UTF8)";break;case et.Type.ROID:n+=" (Relative Object Identifier)";break;case et.Type.SEQUENCE:n+=" (Sequence)";break;case et.Type.SET:n+=" (Set)";break;case et.Type.PRINTABLESTRING:n+=" (Printable String)";break;case et.Type.IA5String:n+=" (IA5String (ASCII))";break;case et.Type.UTCTIME:n+=" (UTC time)";break;case et.Type.GENERALIZEDTIME:n+=" (Generalized time)";break;case et.Type.BMPSTRING:n+=" (BMP String)";break}else n+=r.type;if(n+=`
7
+ `,n+=s+"Constructed: "+r.constructed+`
8
+ `,r.composed){for(var a=0,u="",i=0;i<r.value.length;++i)r.value[i]!==void 0&&(a+=1,u+=et.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===et.Type.OID){var c=et.derToOid(r.value);n+=c,Mr.pki&&Mr.pki.oids&&c in Mr.pki.oids&&(n+=" ("+Mr.pki.oids[c]+") ")}if(r.type===et.Type.INTEGER)try{n+=et.derToInteger(r.value)}catch{n+="0x"+Mr.util.bytesToHex(r.value)}else if(r.type===et.Type.BITSTRING){if(r.value.length>1?n+="0x"+Mr.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===et.Type.OCTETSTRING)ZP.test(r.value)||(n+="("+r.value+") "),n+="0x"+Mr.util.bytesToHex(r.value);else if(r.type===et.Type.UTF8)try{n+=Mr.util.decodeUtf8(r.value)}catch(h){if(h.message==="URI malformed")n+="0x"+Mr.util.bytesToHex(r.value)+" (malformed UTF8)";else throw h}else r.type===et.Type.PRINTABLESTRING||r.type===et.Type.IA5String?n+=r.value:ZP.test(r.value)?n+="0x"+Mr.util.bytesToHex(r.value):r.value.length===0?n+="[null]":n+=r.value}return n}});var _a=te((Ype,t3)=>{"use strict";var vw=Xt();t3.exports=vw.md=vw.md||{};vw.md.algorithms=vw.md.algorithms||{}});var ap=te((Qpe,r3)=>{"use strict";var No=Xt();_a();lr();var kz=r3.exports=No.hmac=No.hmac||{};kz.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 No.md.algorithms)e=No.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=No.util.createBuffer(a);else if(No.util.isArray(a)){var u=a;a=No.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=No.util.createBuffer(),n=No.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 xw=te((Zpe,a3)=>{"use strict";var Da=Xt();_a();lr();var s3=a3.exports=Da.md5=Da.md5||{};Da.md.md5=Da.md.algorithms.md5=s3;s3.create=function(){i3||Lz();var r=null,e=Da.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=Da.util.createBuffer(),r={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},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),n3(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(JC.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};n3(h,t,s);var m=Da.util.createBuffer();return m.putInt32Le(h.h0),m.putInt32Le(h.h1),m.putInt32Le(h.h2),m.putInt32Le(h.h3),m},n};var JC=null,yw=null,J0=null,op=null,i3=!1;function Lz(){JC="\x80",JC+=Da.util.fillString("\0",64),yw=[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);i3=!0}o(Lz,"_init");function n3(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[yw[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[yw[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[yw[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(n3,"_update")});var _l=te((tde,u3)=>{"use strict";var Sw=Xt();lr();var o3=u3.exports=Sw.pem=Sw.pem||{};o3.encode=function(r,e){e=e||{};var t="-----BEGIN "+r.type+`-----\r
9
+ `,n;if(r.procType&&(n={name:"Proc-Type",values:[String(r.procType.version),r.procType.type]},t+=ww(n)),r.contentDomain&&(n={name:"Content-Domain",values:[r.contentDomain]},t+=ww(n)),r.dekInfo&&(n={name:"DEK-Info",values:[r.dekInfo.algorithm]},r.dekInfo.parameters&&n.values.push(r.dekInfo.parameters),t+=ww(n)),r.headers)for(var s=0;s<r.headers.length;++s)t+=ww(r.headers[s]);return r.procType&&(t+=`\r
10
+ `),t+=Sw.util.encode64(r.body,e.maxline||64)+`\r
11
+ `,t+="-----END "+r.type+`-----\r
12
+ `,t};o3.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:Sw.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(","),S=0;S<v.length;++S)x.values.push(Vz(v[S]));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 ww(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
13
+ `;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
14
+ `+e.substr(a)):e=e.substr(0,a)+`\r
15
+ `+u+e.substr(a+1),i=s-a-1,a=-1,++s}else(e[s]===" "||e[s]===" "||e[s]===",")&&(a=s);return e}o(ww,"foldHeader");function Vz(r){return r.replace(/^\s+/,"")}o(Vz,"ltrim")});var Y0=te((nde,l3)=>{"use strict";var Kr=Xt();hw();$C();lr();l3.exports=Kr.des=Kr.des||{};Kr.des.startEncrypting=function(r,e,t,n){var s=Ew({key:r,output:t,decrypt:!1,mode:n||(e===null?"ECB":"CBC")});return s.start(e),s};Kr.des.createEncryptionCipher=function(r,e){return Ew({key:r,output:null,decrypt:!1,mode:e})};Kr.des.startDecrypting=function(r,e,t,n){var s=Ew({key:r,output:t,decrypt:!0,mode:n||(e===null?"ECB":"CBC")});return s.start(e),s};Kr.des.createDecryptionCipher=function(r,e){return Ew({key:r,output:null,decrypt:!0,mode:e})};Kr.des.Algorithm=function(r,e){var t=this;t.name=r,t.mode=new e({blockSize:8,cipher:{encrypt:o(function(n,s){return c3(t._keys,n,s,!1)},"encrypt"),decrypt:o(function(n,s){return c3(t._keys,n,s,!0)},"decrypt")}}),t._init=!1};Kr.des.Algorithm.prototype.initialize=function(r){if(!this._init){var e=Kr.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=Gz(e),this._init=!0}};Ba("DES-ECB",Kr.cipher.modes.ecb);Ba("DES-CBC",Kr.cipher.modes.cbc);Ba("DES-CFB",Kr.cipher.modes.cfb);Ba("DES-OFB",Kr.cipher.modes.ofb);Ba("DES-CTR",Kr.cipher.modes.ctr);Ba("3DES-ECB",Kr.cipher.modes.ecb);Ba("3DES-CBC",Kr.cipher.modes.cbc);Ba("3DES-CFB",Kr.cipher.modes.cfb);Ba("3DES-OFB",Kr.cipher.modes.ofb);Ba("3DES-CTR",Kr.cipher.modes.ctr);function Ba(r,e){var t=o(function(){return new Kr.des.Algorithm(r,e)},"factory");Kr.cipher.registerAlgorithm(r,t)}o(Ba,"registerAlgorithm");var Uz=[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],jz=[-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],Mz=[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],Fz=[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],qz=[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],Hz=[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],Kz=[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],$z=[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 Gz(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],S=r.length()>8?3:1,E=[],C=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],_=0,b,A=0;A<S;A++){var T=r.getInt32(),R=r.getInt32();b=(T>>>4^R)&252645135,R^=b,T^=b<<4,b=(R>>>-16^T)&65535,T^=b,R^=b<<-16,b=(T>>>2^R)&858993459,R^=b,T^=b<<2,b=(R>>>-16^T)&65535,T^=b,R^=b<<-16,b=(T>>>1^R)&1431655765,R^=b,T^=b<<1,b=(R>>>8^T)&16711935,T^=b,R^=b<<8,b=(T>>>1^R)&1431655765,R^=b,T^=b<<1,b=T<<8|R>>>20&240,T=R<<24|R<<8&16711680|R>>>8&65280|R>>>24&240,R=b;for(var H=0;H<C.length;++H){C[H]?(T=T<<2|T>>>26,R=R<<2|R>>>26):(T=T<<1|T>>>27,R=R<<1|R>>>27),T&=-15,R&=-15;var I=e[T>>>28]|t[T>>>24&15]|n[T>>>20&15]|s[T>>>16&15]|i[T>>>12&15]|a[T>>>8&15]|u[T>>>4&15],$=c[R>>>28]|f[R>>>24&15]|h[R>>>20&15]|m[R>>>16&15]|g[R>>>12&15]|x[R>>>8&15]|v[R>>>4&15];b=($>>>16^I)&65535,E[_++]=I^b,E[_++]=$^b<<16}}return E}o(Gz,"_createKeys");function c3(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^(jz[x>>>24&63]|Fz[x>>>16&63]|Hz[x>>>8&63]|$z[x&63]|Uz[v>>>24&63]|Mz[v>>>16&63]|qz[v>>>8&63]|Kz[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(c3,"_updateBlock");function Ew(r){r=r||{};var e=(r.mode||"CBC").toUpperCase(),t="DES-"+e,n;r.decrypt?n=Kr.cipher.createDecipher(t,r.key):n=Kr.cipher.createCipher(t,r.key);var s=n.start;return n.start=function(i,a){var u=null;a instanceof Kr.util.ByteBuffer&&(u=a,a={}),a=a||{},a.output=u,a.iv=i,s.call(n,a)},n}o(Ew,"_createCipher")});var bw=te((ide,f3)=>{"use strict";var ys=Xt();ap();_a();lr();var Xz=ys.pkcs5=ys.pkcs5||{},To;ys.util.isNodejs&&!ys.options.usePureJavaScript&&(To=We("crypto"));f3.exports=ys.pbkdf2=Xz.pbkdf2=function(r,e,t,n,s,i){if(typeof s=="function"&&(i=s,s=null),ys.util.isNodejs&&!ys.options.usePureJavaScript&&To.pbkdf2&&(s===null||typeof s!="object")&&(To.pbkdf2Sync.length>4||!s||s==="sha1"))return typeof s!="string"&&(s="sha1"),r=Buffer.from(r,"binary"),e=Buffer.from(e,"binary"),i?To.pbkdf2Sync.length===4?To.pbkdf2(r,e,t,n,function(b,A){if(b)return i(b);i(null,A.toString("binary"))}):To.pbkdf2(r,e,t,n,s,function(b,A){if(b)return i(b);i(null,A.toString("binary"))}):To.pbkdf2Sync.length===4?To.pbkdf2Sync(r,e,t,n).toString("binary"):To.pbkdf2Sync(r,e,t,n,s).toString("binary");if((typeof s>"u"||s===null)&&(s="sha1"),typeof s=="string"){if(!(s in ys.md.algorithms))throw new Error("Unknown hash algorithm: "+s);s=ys.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=ys.hmac.create();h.start(s,r);var m="",g,x,v;if(!i){for(var S=1;S<=c;++S){h.start(null,null),h.update(e),h.update(ys.util.int32ToBytes(S)),g=v=h.digest().getBytes();for(var E=2;E<=t;++E)h.start(null,null),h.update(v),x=h.digest().getBytes(),g=ys.util.xorBytes(g,x,a),v=x;m+=S<c?g:g.substr(0,f)}return m}var S=1,E;function C(){if(S>c)return i(null,m);h.start(null,null),h.update(e),h.update(ys.util.int32ToBytes(S)),g=v=h.digest().getBytes(),E=2,_()}o(C,"outer");function _(){if(E<=t)return h.start(null,null),h.update(v),x=h.digest().getBytes(),g=ys.util.xorBytes(g,x,a),v=x,++E,ys.util.setImmediate(_);m+=S<c?g:g.substr(0,f),++S,C()}o(_,"inner"),C()}});var QC=te((ode,g3)=>{"use strict";var Ra=Xt();_a();lr();var p3=g3.exports=Ra.sha256=Ra.sha256||{};Ra.md.sha256=Ra.md.algorithms.sha256=p3;p3.create=function(){d3||Wz();var r=null,e=Ra.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=Ra.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=Ra.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),h3(r,t,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var s=Ra.util.createBuffer();s.putBytes(e.bytes());var i=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,a=i&n.blockLength-1;s.putBytes(YC.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};h3(m,t,s);var g=Ra.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 YC=null,d3=!1,m3=null;function Wz(){YC="\x80",YC+=Ra.util.fillString("\0",64),m3=[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],d3=!0}o(Wz,"_init");function h3(r,e,t){for(var n,s,i,a,u,c,f,h,m,g,x,v,S,E,C,_=t.length();_>=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,S=r.h5,E=r.h6,C=r.h7,f=0;f<64;++f)a=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),u=E^v&(S^E),i=(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),c=h&m|g&(h^m),n=C+a+u+m3[f]+e[f],s=i+c,C=E,E=S,S=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+S|0,r.h6=r.h6+E|0,r.h7=r.h7+C|0,_-=64}}o(h3,"_update")});var ZC=te((cde,v3)=>{"use strict";var Oa=Xt();lr();var Aw=null;Oa.util.isNodejs&&!Oa.options.usePureJavaScript&&!process.versions["node-webkit"]&&(Aw=We("crypto"));var zz=v3.exports=Oa.prng=Oa.prng||{};zz.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,S=Oa.util.createBuffer();e.key=null,E();function E(C){if(C)return h(C);if(S.length()>=f)return h(null,S.getBytes(f));if(e.generated>1048575&&(e.key=null),e.key===null)return Oa.util.nextTick(function(){i(E)});var _=m(e.key,e.seed);e.generated+=_.length,S.putBytes(_),e.key=x(m(e.key,g(e.seed))),e.seed=v(m(e.key,e.seed)),Oa.util.setImmediate(E)}o(E,"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=Oa.util.createBuffer();v.length()<f;){e.generated>1048575&&(e.key=null),e.key===null&&a();var S=h(e.key,e.seed);e.generated+=S.length,v.putBytes(S),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=Oa.util.globalScope,g=m.crypto||m.msCrypto;g&&g.getRandomValues&&(h=o(function(T){return g.getRandomValues(T)},"getRandomValues"));var x=Oa.util.createBuffer();if(h)for(;x.length()<f;){var v=Math.max(1,Math.min(f-x.length(),65536)/4),S=new Uint32Array(Math.floor(v));try{h(S);for(var E=0;E<S.length;++E)x.putInt32(S[E])}catch(T){if(!(typeof QuotaExceededError<"u"&&T instanceof QuotaExceededError))throw T}}if(x.length()<f)for(var C,_,b,A=Math.floor(Math.random()*65536);x.length()<f;){_=16807*(A&65535),C=16807*(A>>16),_+=(C&32767)<<16,_+=C>>15,_=(_&2147483647)+(_>>31),A=_&4294967295;for(var E=0;E<3;++E)b=A>>>(E<<3),b^=Math.floor(Math.random()*256),x.putByte(b&255)}return x.getBytes(f)}return o(c,"defaultSeedFile"),Aw?(e.seedFile=function(f,h){Aw.randomBytes(f,function(m,g){if(m)return h(m);h(null,g.toString())})},e.seedFileSync=function(f){return Aw.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 S=v.data;S.forge&&S.forge.prng&&(self.removeEventListener("message",x),g(S.forge.prng.err,S.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 Ei=te((fde,eN)=>{"use strict";var Bn=Xt();Ou();QC();ZC();lr();(function(){if(Bn.random&&Bn.random.getBytes){eN.exports=Bn.random;return}(function(r){var e={},t=new Array(4),n=Bn.util.createBuffer();e.formatKey=function(m){var g=Bn.util.createBuffer(m);return m=new Array(4),m[0]=g.getInt32(),m[1]=g.getInt32(),m[2]=g.getInt32(),m[3]=g.getInt32(),Bn.aes._expandKey(m,!1)},e.formatSeed=function(m){var g=Bn.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 Bn.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=Bn.md.sha256;function s(){var m=Bn.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=Bn.util.globalScope,c=u.crypto||u.msCrypto;if(c&&c.getRandomValues&&(a=o(function(m){return c.getRandomValues(m)},"getRandomValues")),Bn.options.usePureJavaScript||!Bn.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(!Bn.random)Bn.random=i;else for(var h in i)Bn.random[h]=i[h];Bn.random.createInstance=s,eN.exports=Bn.random})(typeof jQuery<"u"?jQuery:null)})()});var rN=te((pde,w3)=>{"use strict";var Ds=Xt();lr();var tN=[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],y3=[1,2,3,5],Jz=o(function(r,e){return r<<e&65535|(r&65535)>>16-e},"rol"),Yz=o(function(r,e){return(r&65535)>>e|r<<16-e&65535},"ror");w3.exports=Ds.rc2=Ds.rc2||{};Ds.rc2.expandKey=function(r,e){typeof r=="string"&&(r=Ds.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(tN[t.at(u-1)+t.at(u-n)&255]);for(t.setAt(128-i,tN[t.at(128-i)&a]),u=127-i;u>=0;u--)t.setAt(u,tN[t.at(u+1)^t.at(u+i)]);return t};var x3=o(function(r,e,t){var n=!1,s=null,i=null,a=null,u,c,f,h,m=[];for(r=Ds.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]=Jz(v[f],y3[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]=Yz(v[f],y3[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 S=[];for(f=0;f<4;f++){var E=s.getInt16Le();a!==null&&(t?E^=a.getInt16Le():a.putInt16Le(E)),S.push(E&65535)}h=t?0:63;for(var C=0;C<v.length;C++)for(var _=0;_<v[C][0];_++)v[C][1](S);for(f=0;f<4;f++)a!==null&&(t?a.putInt16Le(S[f]):S[f]^=a.getInt16Le()),i.putInt16Le(S[f])},"runPlan"),x=null;return x={start:o(function(v,S){v&&typeof v=="string"&&(v=Ds.util.createBuffer(v)),n=!1,s=Ds.util.createBuffer(),i=S||new Ds.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 S=!0;if(t)if(v)S=v(8,s,!t);else{var E=s.length()===8?8:8-s.length();s.fillWithByte(E,E)}if(S&&(n=!0,x.update()),!t&&(S=s.length()===0,S))if(v)S=v(8,i,!t);else{var C=i.length(),_=i.at(C-1);_>C?S=!1:i.truncate(_)}return S},"finish")},x},"createCipher");Ds.rc2.startEncrypting=function(r,e,t){var n=Ds.rc2.createEncryptionCipher(r,128);return n.start(e,t),n};Ds.rc2.createEncryptionCipher=function(r,e){return x3(r,e,!0)};Ds.rc2.startDecrypting=function(r,e,t){var n=Ds.rc2.createDecryptionCipher(r,128);return n.start(e,t),n};Ds.rc2.createDecryptionCipher=function(r,e){return x3(r,e,!1)}});var Z0=te((mde,I3)=>{"use strict";var nN=Xt();I3.exports=nN.jsbn=nN.jsbn||{};var Io,Qz=0xdeadbeefcafe,S3=(Qz&16777215)==15715070;function ke(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(ke,"BigInteger");nN.jsbn.BigInteger=ke;function fr(){return new ke(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 eJ(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(eJ,"am2");function E3(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(E3,"am3");typeof navigator>"u"?(ke.prototype.am=E3,Io=28):S3&&navigator.appName=="Microsoft Internet Explorer"?(ke.prototype.am=eJ,Io=30):S3&&navigator.appName!="Netscape"?(ke.prototype.am=Zz,Io=26):(ke.prototype.am=E3,Io=28);ke.prototype.DB=Io;ke.prototype.DM=(1<<Io)-1;ke.prototype.DV=1<<Io;var sN=52;ke.prototype.FV=Math.pow(2,sN);ke.prototype.F1=sN-Io;ke.prototype.F2=2*Io-sN;var tJ="0123456789abcdefghijklmnopqrstuvwxyz",Cw=new Array,up,bi;up=48;for(bi=0;bi<=9;++bi)Cw[up++]=bi;up=97;for(bi=10;bi<36;++bi)Cw[up++]=bi;up=65;for(bi=10;bi<36;++bi)Cw[up++]=bi;function b3(r){return tJ.charAt(r)}o(b3,"int2char");function A3(r,e){var t=Cw[r.charCodeAt(e)];return t??-1}o(A3,"intAt");function rJ(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(rJ,"bnpCopyTo");function nJ(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(nJ,"bnpFromInt");function ku(r){var e=fr();return e.fromInt(r),e}o(ku,"nbv");function sJ(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:A3(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&&ke.ZERO.subTo(this,this)}o(sJ,"bnpFromString");function iJ(){for(var r=this.s&this.DM;this.t>0&&this.data[this.t-1]==r;)--this.t}o(iJ,"bnpClamp");function aJ(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=b3(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+=b3(n));return s?i:"0"}o(aJ,"bnToString");function oJ(){var r=fr();return ke.ZERO.subTo(this,r),r}o(oJ,"bnNegate");function uJ(){return this.s<0?this.negate():this}o(uJ,"bnAbs");function cJ(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(cJ,"bnCompareTo");function Nw(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(Nw,"nbits");function lJ(){return this.t<=0?0:this.DB*(this.t-1)+Nw(this.data[this.t-1]^this.s&this.DM)}o(lJ,"bnBitLength");function fJ(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(fJ,"bnpDLShiftTo");function hJ(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(hJ,"bnpDRShiftTo");function pJ(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(pJ,"bnpLShiftTo");function dJ(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(dJ,"bnpRShiftTo");function mJ(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(mJ,"bnpSubTo");function gJ(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&&ke.ZERO.subTo(e,e)}o(gJ,"bnpMultiplyTo");function vJ(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(vJ,"bnpSquareTo");function yJ(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-Nw(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,S=t.t,E=S-f,C=e??fr();for(i.dlShiftTo(E,C),t.compareTo(C)>=0&&(t.data[t.t++]=1,t.subTo(C,t)),ke.ONE.dlShiftTo(f,C),C.subTo(i,i);i.t<f;)i.data[i.t++]=0;for(;--E>=0;){var _=t.data[--S]==h?this.DM:Math.floor(t.data[S]*g+(t.data[S-1]+v)*x);if((t.data[S]+=i.am(0,_,t,E,0,f))<_)for(i.dlShiftTo(E,C),t.subTo(C,t);t.data[S]<--_;)t.subTo(C,t)}e!=null&&(t.drShiftTo(f,e),a!=u&&ke.ZERO.subTo(e,e)),t.t=f,t.clamp(),c>0&&t.rShiftTo(c,t),a<0&&ke.ZERO.subTo(t,t)}}}o(yJ,"bnpDivRemTo");function xJ(r){var e=fr();return this.abs().divRemTo(r,null,e),this.s<0&&e.compareTo(ke.ZERO)>0&&r.subTo(e,e),e}o(xJ,"bnMod");function Dl(r){this.m=r}o(Dl,"Classic");function wJ(r){return r.s<0||r.compareTo(this.m)>=0?r.mod(this.m):r}o(wJ,"cConvert");function SJ(r){return r}o(SJ,"cRevert");function EJ(r){r.divRemTo(this.m,null,r)}o(EJ,"cReduce");function bJ(r,e,t){r.multiplyTo(e,t),this.reduce(t)}o(bJ,"cMulTo");function AJ(r,e){r.squareTo(e),this.reduce(e)}o(AJ,"cSqrTo");Dl.prototype.convert=wJ;Dl.prototype.revert=SJ;Dl.prototype.reduce=EJ;Dl.prototype.mulTo=bJ;Dl.prototype.sqrTo=AJ;function CJ(){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(CJ,"bnpInvDigit");function Bl(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(Bl,"Montgomery");function NJ(r){var e=fr();return r.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),r.s<0&&e.compareTo(ke.ZERO)>0&&this.m.subTo(e,e),e}o(NJ,"montConvert");function TJ(r){var e=fr();return r.copyTo(e),this.reduce(e),e}o(TJ,"montRevert");function IJ(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(IJ,"montReduce");function _J(r,e){r.squareTo(e),this.reduce(e)}o(_J,"montSqrTo");function DJ(r,e,t){r.multiplyTo(e,t),this.reduce(t)}o(DJ,"montMulTo");Bl.prototype.convert=NJ;Bl.prototype.revert=TJ;Bl.prototype.reduce=IJ;Bl.prototype.mulTo=DJ;Bl.prototype.sqrTo=_J;function BJ(){return(this.t>0?this.data[0]&1:this.s)==0}o(BJ,"bnpIsEven");function RJ(r,e){if(r>4294967295||r<1)return ke.ONE;var t=fr(),n=fr(),s=e.convert(this),i=Nw(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(RJ,"bnpExp");function OJ(r,e){var t;return r<256||e.isEven()?t=new Dl(e):t=new Bl(e),this.exp(r,t)}o(OJ,"bnModPowInt");ke.prototype.copyTo=rJ;ke.prototype.fromInt=nJ;ke.prototype.fromString=sJ;ke.prototype.clamp=iJ;ke.prototype.dlShiftTo=fJ;ke.prototype.drShiftTo=hJ;ke.prototype.lShiftTo=pJ;ke.prototype.rShiftTo=dJ;ke.prototype.subTo=mJ;ke.prototype.multiplyTo=gJ;ke.prototype.squareTo=vJ;ke.prototype.divRemTo=yJ;ke.prototype.invDigit=CJ;ke.prototype.isEven=BJ;ke.prototype.exp=RJ;ke.prototype.toString=aJ;ke.prototype.negate=oJ;ke.prototype.abs=uJ;ke.prototype.compareTo=cJ;ke.prototype.bitLength=lJ;ke.prototype.mod=xJ;ke.prototype.modPowInt=OJ;ke.ZERO=ku(0);ke.ONE=ku(1);function PJ(){var r=fr();return this.copyTo(r),r}o(PJ,"bnClone");function kJ(){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(kJ,"bnIntValue");function LJ(){return this.t==0?this.s:this.data[0]<<24>>24}o(LJ,"bnByteValue");function VJ(){return this.t==0?this.s:this.data[0]<<16>>16}o(VJ,"bnShortValue");function UJ(r){return Math.floor(Math.LN2*this.DB/Math.log(r))}o(UJ,"bnpChunkSize");function jJ(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}o(jJ,"bnSigNum");function MJ(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(MJ,"bnpToRadix");function FJ(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=A3(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&&ke.ZERO.subTo(this,this)}o(FJ,"bnpFromRadix");function qJ(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(ke.ONE.shiftLeft(r-1),iN,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>r&&this.subTo(ke.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(qJ,"bnpFromNumber");function HJ(){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(HJ,"bnToByteArray");function KJ(r){return this.compareTo(r)==0}o(KJ,"bnEquals");function $J(r){return this.compareTo(r)<0?this:r}o($J,"bnMin");function GJ(r){return this.compareTo(r)>0?this:r}o(GJ,"bnMax");function XJ(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(XJ,"bnpBitwiseTo");function WJ(r,e){return r&e}o(WJ,"op_and");function zJ(r){var e=fr();return this.bitwiseTo(r,WJ,e),e}o(zJ,"bnAnd");function iN(r,e){return r|e}o(iN,"op_or");function JJ(r){var e=fr();return this.bitwiseTo(r,iN,e),e}o(JJ,"bnOr");function C3(r,e){return r^e}o(C3,"op_xor");function YJ(r){var e=fr();return this.bitwiseTo(r,C3,e),e}o(YJ,"bnXor");function N3(r,e){return r&~e}o(N3,"op_andnot");function QJ(r){var e=fr();return this.bitwiseTo(r,N3,e),e}o(QJ,"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 eY(r){var e=fr();return r<0?this.rShiftTo(-r,e):this.lShiftTo(r,e),e}o(eY,"bnShiftLeft");function tY(r){var e=fr();return r<0?this.lShiftTo(-r,e):this.rShiftTo(r,e),e}o(tY,"bnShiftRight");function rY(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(rY,"lbit");function nY(){for(var r=0;r<this.t;++r)if(this.data[r]!=0)return r*this.DB+rY(this.data[r]);return this.s<0?this.t*this.DB:-1}o(nY,"bnGetLowestSetBit");function sY(r){for(var e=0;r!=0;)r&=r-1,++e;return e}o(sY,"cbit");function iY(){for(var r=0,e=this.s&this.DM,t=0;t<this.t;++t)r+=sY(this.data[t]^e);return r}o(iY,"bnBitCount");function aY(r){var e=Math.floor(r/this.DB);return e>=this.t?this.s!=0:(this.data[e]&1<<r%this.DB)!=0}o(aY,"bnTestBit");function oY(r,e){var t=ke.ONE.shiftLeft(r);return this.bitwiseTo(t,e,t),t}o(oY,"bnpChangeBit");function uY(r){return this.changeBit(r,iN)}o(uY,"bnSetBit");function cY(r){return this.changeBit(r,N3)}o(cY,"bnClearBit");function lY(r){return this.changeBit(r,C3)}o(lY,"bnFlipBit");function fY(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(fY,"bnpAddTo");function hY(r){var e=fr();return this.addTo(r,e),e}o(hY,"bnAdd");function pY(r){var e=fr();return this.subTo(r,e),e}o(pY,"bnSubtract");function dY(r){var e=fr();return this.multiplyTo(r,e),e}o(dY,"bnMultiply");function mY(r){var e=fr();return this.divRemTo(r,e,null),e}o(mY,"bnDivide");function gY(r){var e=fr();return this.divRemTo(r,null,e),e}o(gY,"bnRemainder");function vY(r){var e=fr(),t=fr();return this.divRemTo(r,e,t),new Array(e,t)}o(vY,"bnDivideAndRemainder");function yY(r){this.data[this.t]=this.am(0,r-1,this,0,0,this.t),++this.t,this.clamp()}o(yY,"bnpDMultiply");function xY(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(xY,"bnpDAddOffset");function Q0(){}o(Q0,"NullExp");function T3(r){return r}o(T3,"nNop");function wY(r,e,t){r.multiplyTo(e,t)}o(wY,"nMulTo");function SY(r,e){r.squareTo(e)}o(SY,"nSqrTo");Q0.prototype.convert=T3;Q0.prototype.revert=T3;Q0.prototype.mulTo=wY;Q0.prototype.sqrTo=SY;function EY(r){return this.exp(r,new Q0)}o(EY,"bnPow");function bY(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(bY,"bnpMultiplyLowerTo");function AY(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(AY,"bnpMultiplyUpperTo");function cp(r){this.r2=fr(),this.q3=fr(),ke.ONE.dlShiftTo(2*r.t,this.r2),this.mu=this.r2.divide(r),this.m=r}o(cp,"Barrett");function CY(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(CY,"barrettConvert");function NY(r){return r}o(NY,"barrettRevert");function TY(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(TY,"barrettReduce");function IY(r,e){r.squareTo(e),this.reduce(e)}o(IY,"barrettSqrTo");function _Y(r,e,t){r.multiplyTo(e,t),this.reduce(t)}o(_Y,"barrettMulTo");cp.prototype.convert=CY;cp.prototype.revert=NY;cp.prototype.reduce=TY;cp.prototype.mulTo=_Y;cp.prototype.sqrTo=IY;function DY(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 Dl(e):e.isEven()?i=new cp(e):i=new Bl(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(),S;for(t=Nw(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):(S=s,s=v,v=S),i.mulTo(v,a[g],s)}for(;m>=0&&(r.data[m]&1<<t)==0;)i.sqrTo(s,v),S=s,s=v,v=S,--t<0&&(t=this.DB-1,--m)}return i.revert(s)}o(DY,"bnModPow");function BY(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(BY,"bnGCD");function RY(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(RY,"bnpModInt");function OY(r){var e=r.isEven();if(this.isEven()&&e||r.signum()==0)return ke.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(ke.ONE)!=0)return ke.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(OY,"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],PY=(1<<26)/ta[ta.length-1];function kY(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<PY;)n*=ta[s++];for(n=t.modInt(n);e<s;)if(n%ta[e++]==0)return!1}return t.millerRabin(r)}o(kY,"bnIsProbablePrime");function LY(r){var e=this.subtract(ke.ONE),t=e.getLowestSetBit();if(t<=0)return!1;for(var n=e.shiftRight(t),s=VY(),i,a=0;a<r;++a){do i=new ke(this.bitLength(),s);while(i.compareTo(ke.ONE)<=0||i.compareTo(e)>=0);var u=i.modPow(n,this);if(u.compareTo(ke.ONE)!=0&&u.compareTo(e)!=0){for(var c=1;c++<t&&u.compareTo(e)!=0;)if(u=u.modPowInt(2,this),u.compareTo(ke.ONE)==0)return!1;if(u.compareTo(e)!=0)return!1}}return!0}o(LY,"bnpMillerRabin");function VY(){return{nextBytes:o(function(r){for(var e=0;e<r.length;++e)r[e]=Math.floor(Math.random()*256)},"nextBytes")}}o(VY,"bnGetPrng");ke.prototype.chunkSize=UJ;ke.prototype.toRadix=MJ;ke.prototype.fromRadix=FJ;ke.prototype.fromNumber=qJ;ke.prototype.bitwiseTo=XJ;ke.prototype.changeBit=oY;ke.prototype.addTo=fY;ke.prototype.dMultiply=yY;ke.prototype.dAddOffset=xY;ke.prototype.multiplyLowerTo=bY;ke.prototype.multiplyUpperTo=AY;ke.prototype.modInt=RY;ke.prototype.millerRabin=LY;ke.prototype.clone=PJ;ke.prototype.intValue=kJ;ke.prototype.byteValue=LJ;ke.prototype.shortValue=VJ;ke.prototype.signum=jJ;ke.prototype.toByteArray=HJ;ke.prototype.equals=KJ;ke.prototype.min=$J;ke.prototype.max=GJ;ke.prototype.and=zJ;ke.prototype.or=JJ;ke.prototype.xor=YJ;ke.prototype.andNot=QJ;ke.prototype.not=ZJ;ke.prototype.shiftLeft=eY;ke.prototype.shiftRight=tY;ke.prototype.getLowestSetBit=nY;ke.prototype.bitCount=iY;ke.prototype.testBit=aY;ke.prototype.setBit=uY;ke.prototype.clearBit=cY;ke.prototype.flipBit=lY;ke.prototype.add=hY;ke.prototype.subtract=pY;ke.prototype.multiply=dY;ke.prototype.divide=mY;ke.prototype.remainder=gY;ke.prototype.divideAndRemainder=vY;ke.prototype.modPow=DY;ke.prototype.modInverse=OY;ke.prototype.pow=EY;ke.prototype.gcd=BY;ke.prototype.isProbablePrime=kY});var lp=te((vde,R3)=>{"use strict";var Pa=Xt();_a();lr();var D3=R3.exports=Pa.sha1=Pa.sha1||{};Pa.md.sha1=Pa.md.algorithms.sha1=D3;D3.create=function(){B3||UY();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),_3(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(aN.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};_3(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 aN=null,B3=!1;function UY(){aN="\x80",aN+=Pa.util.fillString("\0",64),B3=!0}o(UY,"_init");function _3(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(_3,"_update")});var oN=te((xde,P3)=>{"use strict";var ka=Xt();lr();Ei();lp();var O3=P3.exports=ka.pkcs1=ka.pkcs1||{};O3.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=ka.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=ka.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 S=Tw(s,u-i.digestLength-1,a),E=ka.util.xorBytes(v,S,v.length),C=Tw(E,i.digestLength,a),_=ka.util.xorBytes(s,C,s.length);return"\0"+_+E};O3.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 E=new Error("RSAES-OAEP encoded message length is invalid.");throw E.length=e.length,E.expectedLength=a,E}if(s===void 0?s=ka.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=Tw(h,s.digestLength,i),g=ka.util.xorBytes(f,m,f.length),x=Tw(g,a-s.digestLength-1,i),v=ka.util.xorBytes(h,x,h.length),S=v.substring(0,s.digestLength),E=c!=="\0",C=0;C<s.digestLength;++C)E|=u.charAt(C)!==S.charAt(C);for(var _=1,b=s.digestLength,A=s.digestLength;A<v.length;A++){var T=v.charCodeAt(A),R=T&1^1,H=_?65534:0;E|=T&H,_=_&R,b+=_}if(E||v.charCodeAt(b)!==1)throw new Error("Invalid RSAES-OAEP padding.");return v.substring(b+1)};function Tw(r,e,t){t||(t=ka.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(Tw,"rsa_mgf1")});var cN=te((Sde,uN)=>{"use strict";var Lu=Xt();lr();Z0();Ei();(function(){if(Lu.prime){uN.exports=Lu.prime;return}var r=uN.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 S=g.prng||Lu.random,E={nextBytes:o(function(C){for(var _=S.getBytesSync(C.length),b=0;b<C.length;++b)C[b]=_.charCodeAt(b)},"nextBytes")};if(v.name==="PRIMEINC")return i(m,E,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 S=f(m,g),E=0,C=h(S.bitLength());"millerRabinTests"in x&&(C=x.millerRabinTests);var _=10;"maxBlockTime"in x&&(_=x.maxBlockTime),u(S,m,g,E,C,_,v)}o(a,"primeincFindPrimeWithoutWorkers");function u(m,g,x,v,S,E,C){var _=+new Date;do{if(m.bitLength()>g&&(m=f(g,x)),m.isProbablePrime(S))return C(null,m);m.dAddOffset(t[v++%8],0)}while(E<0||+new Date-_<E);Lu.util.setImmediate(function(){u(m,g,x,v,S,E,C)})}o(u,"_primeinc");function c(m,g,x,v){if(typeof Worker>"u")return a(m,g,x,v);var S=f(m,g),E=x.workers,C=x.workLoad||100,_=C*30/8,b=x.workerScript||"forge/prime.worker.js";if(E===-1)return Lu.util.estimateCores(function(T,R){T&&(R=2),E=R-1,A()});A();function A(){E=Math.max(1,E);for(var T=[],R=0;R<E;++R)T[R]=new Worker(b);for(var H=E,R=0;R<E;++R)T[R].addEventListener("message",$);var I=!1;function $(K){if(!I){--H;var F=K.data;if(F.found){for(var z=0;z<T.length;++z)T[z].terminate();return I=!0,v(null,new e(F.prime,16))}S.bitLength()>m&&(S=f(m,g));var he=S.toString(16);K.target.postMessage({hex:he,workLoad:C}),S.dAddOffset(_,0)}}o($,"workerMessage")}o(A,"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=te((bde,F3)=>{"use strict";var yt=Xt();ea();Z0();Pu();oN();cN();Ei();lr();typeof ar>"u"&&(ar=yt.jsbn.BigInteger);var ar,lN=yt.util.isNodejs?We("crypto"):null,me=yt.asn1,Ai=yt.util;yt.pki=yt.pki||{};F3.exports=yt.pki.rsa=yt.rsa=yt.rsa||{};var jt=yt.pki,jY=[6,4,2,4,2,4,6,2],MY={name:"PrivateKeyInfo",tagClass:me.Class.UNIVERSAL,type:me.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:me.Class.UNIVERSAL,type:me.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:me.Class.UNIVERSAL,type:me.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:me.Class.UNIVERSAL,type:me.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:me.Class.UNIVERSAL,type:me.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},FY={name:"RSAPrivateKey",tagClass:me.Class.UNIVERSAL,type:me.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:me.Class.UNIVERSAL,type:me.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:me.Class.UNIVERSAL,type:me.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:me.Class.UNIVERSAL,type:me.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:me.Class.UNIVERSAL,type:me.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:me.Class.UNIVERSAL,type:me.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:me.Class.UNIVERSAL,type:me.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:me.Class.UNIVERSAL,type:me.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:me.Class.UNIVERSAL,type:me.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:me.Class.UNIVERSAL,type:me.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},qY={name:"RSAPublicKey",tagClass:me.Class.UNIVERSAL,type:me.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:me.Class.UNIVERSAL,type:me.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:me.Class.UNIVERSAL,type:me.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},HY=yt.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:me.Class.UNIVERSAL,type:me.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:me.Class.UNIVERSAL,type:me.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:me.Class.UNIVERSAL,type:me.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:me.Class.UNIVERSAL,type:me.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:me.Class.UNIVERSAL,type:me.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},KY={name:"DigestInfo",tagClass:me.Class.UNIVERSAL,type:me.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:me.Class.UNIVERSAL,type:me.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:me.Class.UNIVERSAL,type:me.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:me.Class.UNIVERSAL,type:me.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:me.Class.UNIVERSAL,type:me.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},$Y=o(function(r){var e;if(r.algorithm in jt.oids)e=jt.oids[r.algorithm];else{var t=new Error("Unknown message digest algorithm.");throw t.algorithm=r.algorithm,t}var n=me.oidToDer(e).getBytes(),s=me.create(me.Class.UNIVERSAL,me.Type.SEQUENCE,!0,[]),i=me.create(me.Class.UNIVERSAL,me.Type.SEQUENCE,!0,[]);i.value.push(me.create(me.Class.UNIVERSAL,me.Type.OID,!1,n)),i.value.push(me.create(me.Class.UNIVERSAL,me.Type.NULL,!1,""));var a=me.create(me.Class.UNIVERSAL,me.Type.OCTETSTRING,!1,r.digest().getBytes());return s.value.push(i),s.value.push(a),me.toDer(s).getBytes()},"emsaPkcs1v15encode"),j3=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");jt.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=M3(r,e,t)):(s=yt.util.createBuffer(),s.putBytes(r));for(var a=new ar(s.toHex(),16),u=j3(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()};jt.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=j3(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?Iw(f.getBytes(),e,t):f.getBytes()};jt.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};jt.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(XY(r.num.bitLength()))?++r.pqState:r.num.dAddOffset(jY[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:jt.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:jt.rsa.setPublicKey(r.n,r.e)}}a=+new Date,u+=a-i,i=a}return r.keys!==null};jt.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(k3("generateKeyPair"))return lN.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:jt.privateKeyFromPem(f),publicKey:jt.publicKeyFromPem(c)})});if(L3("generateKey")&&L3("exportKey"))return Ai.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:r,publicExponent:U3(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=jt.privateKeyFromAsn1(me.fromDer(yt.util.createBuffer(u)));n(null,{privateKey:c,publicKey:jt.setRsaPublicKey(c.n,c.e)})}});if(V3("generateKey")&&V3("exportKey")){var s=Ai.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:r,publicExponent:U3(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=jt.privateKeyFromAsn1(me.fromDer(yt.util.createBuffer(m)));n(null,{privateKey:g,publicKey:jt.setRsaPublicKey(g.n,g.e)})},f.onerror=function(h){n(h)}},s.onerror=function(u){n(u)};return}}else if(k3("generateKeyPairSync")){var i=lN.generateKeyPairSync("rsa",{modulusLength:r,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:jt.privateKeyFromPem(i.privateKey),publicKey:jt.publicKeyFromPem(i.publicKey)}}}var a=jt.rsa.createKeyPairGenerationState(r,e,t);if(!n)return jt.rsa.stepKeyPairGenerationState(a,0),a.keys;GY(a,t,n)};jt.setRsaPublicKey=jt.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 M3(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 jt.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=Iw(f,t,!0);var h=me.fromDer(f,{parseAllBytes:a._parseAllDigestBytes}),m={},g=[];if(!me.validate(h,KY,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=me.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 identifer NULL parameters.");return c===m.digest},"verify")}:(i==="NONE"||i==="NULL"||i===null)&&(i={verify:o(function(c,f){return f=Iw(f,t,!0),c===f},"verify")});var u=jt.rsa.decrypt(s,t,!0,!1);return i.verify(n,u,t.n.bitLength())},t};jt.setRsaPrivateKey=jt.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=jt.rsa.decrypt(f,c,!1,!1);if(h==="RSAES-PKCS1-V1_5")h={decode:Iw};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:$Y},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 jt.rsa.encrypt(g,c,m)},c};jt.wrapRsaPrivateKey=function(r){return me.create(me.Class.UNIVERSAL,me.Type.SEQUENCE,!0,[me.create(me.Class.UNIVERSAL,me.Type.INTEGER,!1,me.integerToDer(0).getBytes()),me.create(me.Class.UNIVERSAL,me.Type.SEQUENCE,!0,[me.create(me.Class.UNIVERSAL,me.Type.OID,!1,me.oidToDer(jt.oids.rsaEncryption).getBytes()),me.create(me.Class.UNIVERSAL,me.Type.NULL,!1,"")]),me.create(me.Class.UNIVERSAL,me.Type.OCTETSTRING,!1,me.toDer(r).getBytes())])};jt.privateKeyFromAsn1=function(r){var e={},t=[];if(me.validate(r,MY,e,t)&&(r=me.fromDer(yt.util.createBuffer(e.privateKey))),e={},t=[],!me.validate(r,FY,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(),jt.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))};jt.privateKeyToAsn1=jt.privateKeyToRSAPrivateKey=function(r){return me.create(me.Class.UNIVERSAL,me.Type.SEQUENCE,!0,[me.create(me.Class.UNIVERSAL,me.Type.INTEGER,!1,me.integerToDer(0).getBytes()),me.create(me.Class.UNIVERSAL,me.Type.INTEGER,!1,La(r.n)),me.create(me.Class.UNIVERSAL,me.Type.INTEGER,!1,La(r.e)),me.create(me.Class.UNIVERSAL,me.Type.INTEGER,!1,La(r.d)),me.create(me.Class.UNIVERSAL,me.Type.INTEGER,!1,La(r.p)),me.create(me.Class.UNIVERSAL,me.Type.INTEGER,!1,La(r.q)),me.create(me.Class.UNIVERSAL,me.Type.INTEGER,!1,La(r.dP)),me.create(me.Class.UNIVERSAL,me.Type.INTEGER,!1,La(r.dQ)),me.create(me.Class.UNIVERSAL,me.Type.INTEGER,!1,La(r.qInv))])};jt.publicKeyFromAsn1=function(r){var e={},t=[];if(me.validate(r,HY,e,t)){var n=me.derToOid(e.publicKeyOid);if(n!==jt.oids.rsaEncryption){var s=new Error("Cannot read public key. Unknown OID.");throw s.oid=n,s}r=e.rsaPublicKey}if(t=[],!me.validate(r,qY,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 jt.setRsaPublicKey(new ar(i,16),new ar(a,16))};jt.publicKeyToAsn1=jt.publicKeyToSubjectPublicKeyInfo=function(r){return me.create(me.Class.UNIVERSAL,me.Type.SEQUENCE,!0,[me.create(me.Class.UNIVERSAL,me.Type.SEQUENCE,!0,[me.create(me.Class.UNIVERSAL,me.Type.OID,!1,me.oidToDer(jt.oids.rsaEncryption).getBytes()),me.create(me.Class.UNIVERSAL,me.Type.NULL,!1,"")]),me.create(me.Class.UNIVERSAL,me.Type.BITSTRING,!1,[jt.publicKeyToRSAPublicKey(r)])])};jt.publicKeyToRSAPublicKey=function(r){return me.create(me.Class.UNIVERSAL,me.Type.SEQUENCE,!0,[me.create(me.Class.UNIVERSAL,me.Type.INTEGER,!1,La(r.n)),me.create(me.Class.UNIVERSAL,me.Type.INTEGER,!1,La(r.e))])};function M3(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(M3,"_encodePkcs1_v1_5");function Iw(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(Iw,"_decodePkcs1_v1_5");function GY(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:jt.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:jt.rsa.setPublicKey(r.n,r.e)},t(null,r.keys)}o(a,"finish")}o(GY,"_generateKeyPair");function La(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(La,"_bnToBytes");function XY(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(XY,"_getMillerRabinTests");function k3(r){return yt.util.isNodejs&&typeof lN[r]=="function"}o(k3,"_detectNodeCrypto");function L3(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(L3,"_detectSubtleCrypto");function V3(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(V3,"_detectSubtleMsCrypto");function U3(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(U3,"_intToUint8Array")});var fN=te((Cde,G3)=>{"use strict";var at=Xt();Ou();ea();Y0();_a();Pu();bw();_l();Ei();rN();eg();lr();typeof q3>"u"&&(q3=at.jsbn.BigInteger);var q3,Ae=at.asn1,Ht=at.pki=at.pki||{};G3.exports=Ht.pbe=at.pbe=at.pbe||{};var Rl=Ht.oids,WY={name:"EncryptedPrivateKeyInfo",tagClass:Ae.Class.UNIVERSAL,type:Ae.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:Ae.Class.UNIVERSAL,type:Ae.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Ae.Class.UNIVERSAL,type:Ae.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:Ae.Class.UNIVERSAL,type:Ae.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:Ae.Class.UNIVERSAL,type:Ae.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},zY={name:"PBES2Algorithms",tagClass:Ae.Class.UNIVERSAL,type:Ae.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:Ae.Class.UNIVERSAL,type:Ae.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:Ae.Class.UNIVERSAL,type:Ae.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:Ae.Class.UNIVERSAL,type:Ae.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:Ae.Class.UNIVERSAL,type:Ae.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:Ae.Class.UNIVERSAL,type:Ae.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:Ae.Class.UNIVERSAL,type:Ae.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:Ae.Class.UNIVERSAL,type:Ae.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:Ae.Class.UNIVERSAL,type:Ae.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:Ae.Class.UNIVERSAL,type:Ae.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:Ae.Class.UNIVERSAL,type:Ae.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:Ae.Class.UNIVERSAL,type:Ae.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},JY={name:"pkcs-12PbeParams",tagClass:Ae.Class.UNIVERSAL,type:Ae.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:Ae.Class.UNIVERSAL,type:Ae.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:Ae.Class.UNIVERSAL,type:Ae.Type.INTEGER,constructed:!1,capture:"iterations"}]};Ht.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=at.random.getBytesSync(t.saltSize),s=t.count,i=Ae.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=at.aes.createEncryptionCipher;break;case"aes192":a=24,f=16,h=Rl["aes192-CBC"],m=at.aes.createEncryptionCipher;break;case"aes256":a=32,f=16,h=Rl["aes256-CBC"],m=at.aes.createEncryptionCipher;break;case"des":a=8,f=8,h=Rl.desCBC,m=at.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=$3(x),S=at.pkcs5.pbkdf2(e,n,s,a,v),E=at.random.getBytesSync(f),C=m(S);C.start(E),C.update(Ae.toDer(r)),C.finish(),c=C.output.getBytes();var _=YY(n,i,a,x);u=Ae.create(Ae.Class.UNIVERSAL,Ae.Type.SEQUENCE,!0,[Ae.create(Ae.Class.UNIVERSAL,Ae.Type.OID,!1,Ae.oidToDer(Rl.pkcs5PBES2).getBytes()),Ae.create(Ae.Class.UNIVERSAL,Ae.Type.SEQUENCE,!0,[Ae.create(Ae.Class.UNIVERSAL,Ae.Type.SEQUENCE,!0,[Ae.create(Ae.Class.UNIVERSAL,Ae.Type.OID,!1,Ae.oidToDer(Rl.pkcs5PBKDF2).getBytes()),_]),Ae.create(Ae.Class.UNIVERSAL,Ae.Type.SEQUENCE,!0,[Ae.create(Ae.Class.UNIVERSAL,Ae.Type.OID,!1,Ae.oidToDer(h).getBytes()),Ae.create(Ae.Class.UNIVERSAL,Ae.Type.OCTETSTRING,!1,E)])])])}else if(t.algorithm==="3des"){a=24;var b=new at.util.ByteBuffer(n),S=Ht.pbe.generatePkcs12Key(e,b,1,s,a),E=Ht.pbe.generatePkcs12Key(e,b,2,s,a),C=at.des.createEncryptionCipher(S);C.start(E),C.update(Ae.toDer(r)),C.finish(),c=C.output.getBytes(),u=Ae.create(Ae.Class.UNIVERSAL,Ae.Type.SEQUENCE,!0,[Ae.create(Ae.Class.UNIVERSAL,Ae.Type.OID,!1,Ae.oidToDer(Rl["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),Ae.create(Ae.Class.UNIVERSAL,Ae.Type.SEQUENCE,!0,[Ae.create(Ae.Class.UNIVERSAL,Ae.Type.OCTETSTRING,!1,n),Ae.create(Ae.Class.UNIVERSAL,Ae.Type.INTEGER,!1,i.getBytes())])])}else{var g=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw g.algorithm=t.algorithm,g}var A=Ae.create(Ae.Class.UNIVERSAL,Ae.Type.SEQUENCE,!0,[u,Ae.create(Ae.Class.UNIVERSAL,Ae.Type.OCTETSTRING,!1,c)]);return A};Ht.decryptPrivateKeyInfo=function(r,e){var t=null,n={},s=[];if(!Ae.validate(r,WY,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=Ae.derToOid(n.encryptionOid),u=Ht.pbe.getCipher(a,n.encryptionParams,e),c=at.util.createBuffer(n.encryptedData);return u.update(c),u.finish()&&(t=Ae.fromDer(u.output)),t};Ht.encryptedPrivateKeyToPem=function(r,e){var t={type:"ENCRYPTED PRIVATE KEY",body:Ae.toDer(r).getBytes()};return at.pem.encode(t,{maxline:e})};Ht.encryptedPrivateKeyFromPem=function(r){var e=at.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 Ae.fromDer(e.body)};Ht.encryptRsaPrivateKey=function(r,e,t){if(t=t||{},!t.legacy){var n=Ht.wrapRsaPrivateKey(Ht.privateKeyToAsn1(r));return n=Ht.encryptPrivateKeyInfo(n,e,t),Ht.encryptedPrivateKeyToPem(n)}var s,i,a,u;switch(t.algorithm){case"aes128":s="AES-128-CBC",a=16,i=at.random.getBytesSync(16),u=at.aes.createEncryptionCipher;break;case"aes192":s="AES-192-CBC",a=24,i=at.random.getBytesSync(16),u=at.aes.createEncryptionCipher;break;case"aes256":s="AES-256-CBC",a=32,i=at.random.getBytesSync(16),u=at.aes.createEncryptionCipher;break;case"3des":s="DES-EDE3-CBC",a=24,i=at.random.getBytesSync(8),u=at.des.createEncryptionCipher;break;case"des":s="DES-CBC",a=8,i=at.random.getBytesSync(8),u=at.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=at.pbe.opensslDeriveBytes(e,i.substr(0,8),a),h=u(f);h.start(i),h.update(Ae.toDer(Ht.privateKeyToAsn1(r))),h.finish();var m={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:s,parameters:at.util.bytesToHex(i).toUpperCase()},body:h.output.getBytes()};return at.pem.encode(m)};Ht.decryptRsaPrivateKey=function(r,e){var t=null,n=at.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=at.des.createDecryptionCipher;break;case"DES-EDE3-CBC":i=24,a=at.des.createDecryptionCipher;break;case"AES-128-CBC":i=16,a=at.aes.createDecryptionCipher;break;case"AES-192-CBC":i=24,a=at.aes.createDecryptionCipher;break;case"AES-256-CBC":i=32,a=at.aes.createDecryptionCipher;break;case"RC2-40-CBC":i=5,a=o(function(m){return at.rc2.createDecryptionCipher(m,40)},"cipherFn");break;case"RC2-64-CBC":i=8,a=o(function(m){return at.rc2.createDecryptionCipher(m,64)},"cipherFn");break;case"RC2-128-CBC":i=16,a=o(function(m){return at.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=at.util.hexToBytes(n.dekInfo.parameters),c=at.pbe.opensslDeriveBytes(e,u.substr(0,8),i),f=a(c);if(f.start(u),f.update(at.util.createBuffer(n.body)),f.finish())t=f.output.getBytes();else return t}else t=n.body;return n.type==="ENCRYPTED PRIVATE KEY"?t=Ht.decryptPrivateKeyInfo(Ae.fromDer(t),e):t=Ae.fromDer(t),t!==null&&(t=Ht.privateKeyFromAsn1(t)),t};Ht.pbe.generatePkcs12Key=function(r,e,t,n,s,i){var a,u;if(typeof i>"u"||i===null){if(!("sha1"in at.md))throw new Error('"sha1" hash algorithm unavailable.');i=at.md.sha1.create()}var c=i.digestLength,f=i.blockLength,h=new at.util.ByteBuffer,m=new at.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 at.util.ByteBuffer;v.fillWithByte(t,f);var S=f*Math.ceil(x/f),E=new at.util.ByteBuffer;for(u=0;u<S;u++)E.putByte(e.at(u%x));var C=f*Math.ceil(g/f),_=new at.util.ByteBuffer;for(u=0;u<C;u++)_.putByte(m.at(u%g));var b=E;b.putBuffer(_);for(var A=Math.ceil(s/c),T=1;T<=A;T++){var R=new at.util.ByteBuffer;R.putBytes(v.bytes()),R.putBytes(b.bytes());for(var H=0;H<n;H++)i.start(),i.update(R.getBytes()),R=i.digest();var I=new at.util.ByteBuffer;for(u=0;u<f;u++)I.putByte(R.at(u%c));var $=Math.ceil(x/f)+Math.ceil(g/f),K=new at.util.ByteBuffer;for(a=0;a<$;a++){var F=new at.util.ByteBuffer(b.getBytes(f)),z=511;for(u=I.length()-1;u>=0;u--)z=z>>8,z+=I.at(u)+F.at(u),F.setAt(u,z&255);K.putBuffer(F)}b=K,h.putBuffer(R)}return h.truncate(h.length()-s),h};Ht.pbe.getCipher=function(r,e,t){switch(r){case Ht.oids.pkcs5PBES2:return Ht.pbe.getCipherForPBES2(r,e,t);case Ht.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case Ht.oids["pbewithSHAAnd40BitRC2-CBC"]:return Ht.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}};Ht.pbe.getCipherForPBES2=function(r,e,t){var n={},s=[];if(!Ae.validate(e,zY,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=Ae.derToOid(n.kdfOid),r!==Ht.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=Ae.derToOid(n.encOid),r!==Ht.oids["aes128-CBC"]&&r!==Ht.oids["aes192-CBC"]&&r!==Ht.oids["aes256-CBC"]&&r!==Ht.oids["des-EDE3-CBC"]&&r!==Ht.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=at.util.createBuffer(n.kdfIterationCount);u=u.getInt(u.length()<<3);var c,f;switch(Ht.oids[r]){case"aes128-CBC":c=16,f=at.aes.createDecryptionCipher;break;case"aes192-CBC":c=24,f=at.aes.createDecryptionCipher;break;case"aes256-CBC":c=32,f=at.aes.createDecryptionCipher;break;case"des-EDE3-CBC":c=24,f=at.des.createDecryptionCipher;break;case"desCBC":c=8,f=at.des.createDecryptionCipher;break}var h=K3(n.prfOid),m=at.pkcs5.pbkdf2(t,a,u,c,h),g=n.encIv,x=f(m);return x.start(g),x};Ht.pbe.getCipherForPKCS12PBE=function(r,e,t){var n={},s=[];if(!Ae.validate(e,JY,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=at.util.createBuffer(n.salt),u=at.util.createBuffer(n.iterations);u=u.getInt(u.length()<<3);var c,f,h;switch(r){case Ht.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:c=24,f=8,h=at.des.startDecrypting;break;case Ht.oids["pbewithSHAAnd40BitRC2-CBC"]:c=5,f=8,h=o(function(S,E){var C=at.rc2.createDecryptionCipher(S,40);return C.start(E,null),C},"cipherFn");break;default:var i=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw i.oid=r,i}var m=K3(n.prfOid),g=Ht.pbe.generatePkcs12Key(t,a,1,u,c,m);m.start();var x=Ht.pbe.generatePkcs12Key(t,a,2,u,f,m);return h(g,x)};Ht.pbe.opensslDeriveBytes=function(r,e,t,n){if(typeof n>"u"||n===null){if(!("md5"in at.md))throw new Error('"md5" hash algorithm unavailable.');n=at.md.md5.create()}e===null&&(e="");for(var s=[H3(n,r+e)],i=16,a=1;i<t;++a,i+=16)s.push(H3(n,s[a-1]+r+e));return s.join("").substr(0,t)};function H3(r,e){return r.start().update(e).digest().getBytes()}o(H3,"hash");function K3(r){var e;if(!r)e="hmacWithSHA1";else if(e=Ht.oids[Ae.derToOid(r)],!e){var t=new Error("Unsupported PRF OID.");throw t.oid=r,t.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],t}return $3(e)}o(K3,"prfOidToMessageDigest");function $3(r){var e=at.md;switch(r){case"hmacWithSHA224":e=at.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($3,"prfAlgorithmToMessageDigest");function YY(r,e,t,n){var s=Ae.create(Ae.Class.UNIVERSAL,Ae.Type.SEQUENCE,!0,[Ae.create(Ae.Class.UNIVERSAL,Ae.Type.OCTETSTRING,!1,r),Ae.create(Ae.Class.UNIVERSAL,Ae.Type.INTEGER,!1,e.getBytes())]);return n!=="hmacWithSHA1"&&s.value.push(Ae.create(Ae.Class.UNIVERSAL,Ae.Type.INTEGER,!1,at.util.hexToBytes(t.toString(16))),Ae.create(Ae.Class.UNIVERSAL,Ae.Type.SEQUENCE,!0,[Ae.create(Ae.Class.UNIVERSAL,Ae.Type.OID,!1,Ae.oidToDer(Ht.oids[n]).getBytes()),Ae.create(Ae.Class.UNIVERSAL,Ae.Type.NULL,!1,"")])),s}o(YY,"createPbkdf2Params")});var hN=te((Tde,z3)=>{"use strict";var fp=Xt();ea();lr();var nt=fp.asn1,hp=z3.exports=fp.pkcs7asn1=fp.pkcs7asn1||{};fp.pkcs7=fp.pkcs7||{};fp.pkcs7.asn1=hp;var X3={name:"ContentInfo",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:nt.Class.UNIVERSAL,type:nt.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:nt.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};hp.contentInfoValidator=X3;var W3={name:"EncryptedContentInfo",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:nt.Class.UNIVERSAL,type:nt.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:nt.Class.UNIVERSAL,type:nt.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:nt.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:nt.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};hp.envelopedDataValidator={name:"EnvelopedData",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(W3)};hp.encryptedDataValidator={name:"EncryptedData",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"version"}].concat(W3)};var QY={name:"SignerInfo",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:nt.Class.UNIVERSAL,type:nt.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:nt.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:nt.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:nt.Class.UNIVERSAL,type:nt.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:nt.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};hp.signedDataValidator={name:"SignedData",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},X3,{name:"SignedData.Certificates",tagClass:nt.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:nt.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SET,capture:"signerInfos",optional:!0,value:[QY]}]};hp.recipientInfoValidator={name:"RecipientInfo",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:nt.Class.UNIVERSAL,type:nt.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:nt.Class.UNIVERSAL,type:nt.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:nt.Class.UNIVERSAL,type:nt.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:nt.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:nt.Class.UNIVERSAL,type:nt.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}});var pN=te((Ide,J3)=>{"use strict";var Ol=Xt();lr();Ol.mgf=Ol.mgf||{};var ZY=J3.exports=Ol.mgf.mgf1=Ol.mgf1=Ol.mgf1||{};ZY.create=function(r){var e={generate:o(function(t,n){for(var s=new Ol.util.ByteBuffer,i=Math.ceil(n/r.digestLength),a=0;a<i;a++){var u=new Ol.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 Q3=te((Dde,Y3)=>{"use strict";var _w=Xt();pN();Y3.exports=_w.mgf=_w.mgf||{};_w.mgf.mgf1=_w.mgf1});var Dw=te((Bde,Z3)=>{"use strict";var Pl=Xt();Ei();lr();var eQ=Z3.exports=Pl.pss=Pl.pss||{};eQ.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=Pl.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||Pl.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 S=new Pl.util.ByteBuffer;S.fillWithByte(0,8),S.putBytes(x),S.putBytes(v),e.start(),e.update(S.getBytes());var E=e.digest().getBytes(),C=new Pl.util.ByteBuffer;C.fillWithByte(0,g-i-n-2),C.putByte(1),C.putBytes(v);var _=C.getBytes(),b=g-n-1,A=t.generate(E,b),T="";for(h=0;h<b;h++)T+=String.fromCharCode(_.charCodeAt(h)^A.charCodeAt(h));var R=65280>>8*g-m&255;return T=String.fromCharCode(T.charCodeAt(0)&~R)+T.substr(1),T+E+"\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,S=f.substr(0,v),E=f.substr(v,n),C=65280>>8*x-g&255;if((S.charCodeAt(0)&C)!==0)throw new Error("Bits beyond keysize not zero as expected.");var _=t.generate(E,v),b="";for(m=0;m<v;m++)b+=String.fromCharCode(S.charCodeAt(m)^_.charCodeAt(m));b=String.fromCharCode(b.charCodeAt(0)&~C)+b.substr(1);var A=x-n-i-2;for(m=0;m<A;m++)if(b.charCodeAt(m)!==0)throw new Error("Leftmost octets not zero as expected");if(b.charCodeAt(A)!==1)throw new Error("Inconsistent PSS signature, 0x01 marker not found");var T=b.substr(-i),R=new Pl.util.ByteBuffer;R.fillWithByte(0,8),R.putBytes(c),R.putBytes(T),e.start(),e.update(R.getBytes());var H=e.digest().getBytes();return E===H},u}});var Ow=te((Rde,sk)=>{"use strict";var xt=Xt();Ou();ea();Y0();_a();Q3();Pu();_l();Dw();eg();lr();var L=xt.asn1,Xe=sk.exports=xt.pki=xt.pki||{},or=Xe.oids,en={};en.CN=or.commonName;en.commonName="CN";en.C=or.countryName;en.countryName="C";en.L=or.localityName;en.localityName="L";en.ST=or.stateOrProvinceName;en.stateOrProvinceName="ST";en.O=or.organizationName;en.organizationName="O";en.OU=or.organizationalUnitName;en.organizationalUnitName="OU";en.E=or.emailAddress;en.emailAddress="E";var tk=xt.pki.rsa.publicKeyValidator,tQ={name:"Certificate",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:L.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:L.Class.UNIVERSAL,type:L.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:L.Class.UNIVERSAL,type:L.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:L.Class.UNIVERSAL,type:L.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:L.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:L.Class.UNIVERSAL,type:L.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:L.Class.UNIVERSAL,type:L.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:L.Class.UNIVERSAL,type:L.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:L.Class.UNIVERSAL,type:L.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},tk,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:L.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:L.Class.UNIVERSAL,type:L.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:L.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:L.Class.UNIVERSAL,type:L.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:L.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:L.Class.UNIVERSAL,type:L.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:L.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:L.Class.UNIVERSAL,type:L.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},rQ={name:"rsapss",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:L.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:L.Class.UNIVERSAL,type:L.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:L.Class.UNIVERSAL,type:L.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:L.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:L.Class.UNIVERSAL,type:L.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:L.Class.UNIVERSAL,type:L.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:L.Class.UNIVERSAL,type:L.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:L.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:L.Class.UNIVERSAL,type:L.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:L.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:L.Class.UNIVERSAL,type:L.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},nQ={name:"CertificationRequestInfo",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:L.Class.UNIVERSAL,type:L.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},tk,{name:"CertificationRequestInfo.attributes",tagClass:L.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:L.Class.UNIVERSAL,type:L.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:L.Class.UNIVERSAL,type:L.Type.SET,constructed:!0}]}]}]},sQ={name:"CertificationRequest",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[nQ,{name:"CertificationRequest.signatureAlgorithm",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:L.Class.UNIVERSAL,type:L.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:L.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:L.Class.UNIVERSAL,type:L.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};Xe.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=L.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 en&&(i.shortName=en[i.name])),e&&(e.update(i.type),e.update(i.value)),t.push(i)}return t};Xe.CRIAttributesAsArray=function(r){for(var e=[],t=0;t<r.length;++t)for(var n=r[t],s=L.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 en&&(u.shortName=en[u.name])),u.type===or.extensionRequest){u.extensions=[];for(var c=0;c<u.value.length;++c)u.extensions.push(Xe.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 Bw=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(!L.validate(e,rQ,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=L.derToOid(s.hashOid)),s.maskGenOid!==void 0&&(n.mgf=n.mgf||{},n.mgf.algorithmOid=L.derToOid(s.maskGenOid),n.mgf.hash=n.mgf.hash||{},n.mgf.hash.algorithmOid=L.derToOid(s.maskGenHashOid)),s.saltLength!==void 0&&(n.saltLength=s.saltLength.charCodeAt(0)),n},"_readSignatureParameters"),Rw=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"),rk=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");Xe.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=L.fromDer(n.body,t);return Xe.certificateFromAsn1(i,e)};Xe.certificateToPem=function(r,e){var t={type:"CERTIFICATE",body:L.toDer(Xe.certificateToAsn1(r)).getBytes()};return xt.pem.encode(t,{maxline:e})};Xe.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=L.fromDer(e.body);return Xe.publicKeyFromAsn1(n)};Xe.publicKeyToPem=function(r,e){var t={type:"PUBLIC KEY",body:L.toDer(Xe.publicKeyToAsn1(r)).getBytes()};return xt.pem.encode(t,{maxline:e})};Xe.publicKeyToRSAPublicKeyPem=function(r,e){var t={type:"RSA PUBLIC KEY",body:L.toDer(Xe.publicKeyToRSAPublicKey(r)).getBytes()};return xt.pem.encode(t,{maxline:e})};Xe.getPublicKeyFingerprint=function(r,e){e=e||{};var t=e.md||xt.md.sha1.create(),n=e.type||"RSAPublicKey",s;switch(n){case"RSAPublicKey":s=L.toDer(Xe.publicKeyToRSAPublicKey(r)).getBytes();break;case"SubjectPublicKeyInfo":s=L.toDer(Xe.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};Xe.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=L.fromDer(n.body,t);return Xe.certificationRequestFromAsn1(i,e)};Xe.certificationRequestToPem=function(r,e){var t={type:"CERTIFICATE REQUEST",body:L.toDer(Xe.certificationRequestToAsn1(r)).getBytes()};return xt.pem.encode(t,{maxline:e})};Xe.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)nk(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=Xe.getTBSCertificate(r);var i=L.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=Rw({signatureOid:e.signatureOid,type:"certificate"});var u=e.tbsCertificate||Xe.getTBSCertificate(e),c=L.toDer(u);a.update(c.getBytes())}return a!==null&&(t=rk({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 Xe.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};Xe.certificateFromAsn1=function(r,e){var t={},n=[];if(!L.validate(r,tQ,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=L.derToOid(t.publicKeyOid);if(i!==Xe.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var a=Xe.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=Bw(a.signatureOid,t.certSignatureParams,!0),a.siginfo.algorithmOid=xt.asn1.derToOid(t.certinfoSignatureOid),a.siginfo.parameters=Bw(a.siginfo.algorithmOid,t.certinfoSignatureParams,!1),a.signature=t.certSignature;var c=[];if(t.certValidity1UTCTime!==void 0&&c.push(L.utcTimeToDate(t.certValidity1UTCTime)),t.certValidity2GeneralizedTime!==void 0&&c.push(L.generalizedTimeToDate(t.certValidity2GeneralizedTime)),t.certValidity3UTCTime!==void 0&&c.push(L.utcTimeToDate(t.certValidity3UTCTime)),t.certValidity4GeneralizedTime!==void 0&&c.push(L.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=Rw({signatureOid:a.signatureOid,type:"certificate"});var f=L.toDer(a.tbsCertificate);a.md.update(f.getBytes())}var h=xt.md.sha1.create(),m=L.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=Xe.RDNAttributesAsArray(t.certIssuer),t.certIssuerUniqueId&&(a.issuer.uniqueId=t.certIssuerUniqueId),a.issuer.hash=h.digest().toHex();var g=xt.md.sha1.create(),x=L.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=Xe.RDNAttributesAsArray(t.certSubject),t.certSubjectUniqueId&&(a.subject.uniqueId=t.certSubjectUniqueId),a.subject.hash=g.digest().toHex(),t.certExtensions?a.extensions=Xe.certificateExtensionsFromAsn1(t.certExtensions):a.extensions=[],a.publicKey=Xe.publicKeyFromAsn1(t.subjectPublicKeyInfo),a};Xe.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(Xe.certificateExtensionFromAsn1(n.value[s]));return e};Xe.certificateExtensionFromAsn1=function(r){var e={};if(e.id=L.derToOid(r.value[0].value),e.critical=!1,r.value[1].type===L.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=L.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=L.fromDer(e.value);t.value.length>0&&t.value[0].type===L.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===L.Type.INTEGER?i=t.value[0].value:t.value.length>1&&(i=t.value[1].value),i!==null&&(e.pathLenConstraint=L.derToInteger(i))}else if(e.name==="extKeyUsage")for(var t=L.fromDer(e.value),a=0;a<t.value.length;++a){var u=L.derToOid(t.value[a].value);u in or?e[or[u]]=!0:e[u]=!0}else if(e.name==="nsCertType"){var t=L.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=L.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=L.derToOid(c.value);break;default:}}}else if(e.name==="subjectKeyIdentifier"){var t=L.fromDer(e.value);e.subjectKeyIdentifier=xt.util.bytesToHex(t.value)}}return e};Xe.certificationRequestFromAsn1=function(r,e){var t={},n=[];if(!L.validate(r,sQ,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=L.derToOid(t.publicKeyOid);if(i!==Xe.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var a=Xe.createCertificationRequest();if(a.version=t.csrVersion?t.csrVersion.charCodeAt(0):0,a.signatureOid=xt.asn1.derToOid(t.csrSignatureOid),a.signatureParameters=Bw(a.signatureOid,t.csrSignatureParams,!0),a.siginfo.algorithmOid=xt.asn1.derToOid(t.csrSignatureOid),a.siginfo.parameters=Bw(a.siginfo.algorithmOid,t.csrSignatureParams,!1),a.signature=t.csrSignature,a.certificationRequestInfo=t.certificationRequestInfo,e){a.md=Rw({signatureOid:a.signatureOid,type:"certification request"});var u=L.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=Xe.RDNAttributesAsArray(t.certificationRequestInfoSubject,c),a.subject.hash=c.digest().toHex(),a.publicKey=Xe.publicKeyFromAsn1(t.subjectPublicKeyInfo),a.getAttribute=function(f){return Vu(a,f)},a.addAttribute=function(f){Ci([f]),a.attributes.push(f)},a.attributes=Xe.CRIAttributesAsArray(t.certificationRequestInfoAttributes||[]),a};Xe.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=Xe.getCertificationRequestInfo(r);var i=L.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=Rw({signatureOid:r.signatureOid,type:"certification request"});var n=r.certificationRequestInfo||Xe.getCertificationRequestInfo(r),s=L.toDer(n);t.update(s.getBytes())}return t!==null&&(e=rk({certificate:r,md:t,signature:r.signature})),e},r};function pp(r){for(var e=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[]),t,n,s=r.attributes,i=0;i<s.length;++i){t=s[i];var a=t.value,u=L.Type.PRINTABLESTRING;"valueTagClass"in t&&(u=t.valueTagClass,u===L.Type.UTF8&&(a=xt.util.encodeUtf8(a))),n=L.create(L.Class.UNIVERSAL,L.Type.SET,!0,[L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(t.type).getBytes()),L.create(L.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 Xe.oids?e.name=Xe.oids[e.type]:e.shortName&&e.shortName in en&&(e.name=Xe.oids[en[e.shortName]])),typeof e.type>"u")if(e.name&&e.name in Xe.oids)e.type=Xe.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 en&&(e.shortName=en[e.name]),e.type===or.extensionRequest&&(e.valueConstructed=!0,e.valueTagClass=L.Type.SEQUENCE,!e.value&&e.extensions)){e.value=[];for(var s=0;s<e.extensions.length;++s)e.value.push(Xe.certificateExtensionToAsn1(nk(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 nk(r,e){if(e=e||{},typeof r.name>"u"&&r.id&&r.id in Xe.oids&&(r.name=Xe.oids[r.id]),typeof r.id>"u")if(r.name&&r.name in Xe.oids)r.id=Xe.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=L.create(L.Class.UNIVERSAL,L.Type.BITSTRING,!1,a)}else if(r.name==="basicConstraints")r.value=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[]),r.cA&&r.value.value.push(L.create(L.Class.UNIVERSAL,L.Type.BOOLEAN,!1,"\xFF")),"pathLenConstraint"in r&&r.value.value.push(L.create(L.Class.UNIVERSAL,L.Type.INTEGER,!1,L.integerToDer(r.pathLenConstraint).getBytes()));else if(r.name==="extKeyUsage"){r.value=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[]);var u=r.value.value;for(var c in r)r[c]===!0&&(c in or?u.push(L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(or[c]).getBytes())):c.indexOf(".")!==-1&&u.push(L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.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=L.create(L.Class.UNIVERSAL,L.Type.BITSTRING,!1,a)}else if(r.name==="subjectAltName"||r.name==="issuerAltName"){r.value=L.create(L.Class.UNIVERSAL,L.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=L.oidToDer(L.oidToDer(f.oid)):a=L.oidToDer(a));r.value.value.push(L.create(L.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=L.create(L.Class.UNIVERSAL,L.Type.IA5STRING,!1,r.comment)}else if(r.name==="subjectKeyIdentifier"&&e.cert){var m=e.cert.generateSubjectKeyIdentifier();r.subjectKeyIdentifier=m.toHex(),r.value=L.create(L.Class.UNIVERSAL,L.Type.OCTETSTRING,!1,m.getBytes())}else if(r.name==="authorityKeyIdentifier"&&e.cert){r.value=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[]);var u=r.value.value;if(r.keyIdentifier){var g=r.keyIdentifier===!0?e.cert.generateSubjectKeyIdentifier().getBytes():r.keyIdentifier;u.push(L.create(L.Class.CONTEXT_SPECIFIC,0,!1,g))}if(r.authorityCertIssuer){var x=[L.create(L.Class.CONTEXT_SPECIFIC,4,!0,[pp(r.authorityCertIssuer===!0?e.cert.issuer:r.authorityCertIssuer)])];u.push(L.create(L.Class.CONTEXT_SPECIFIC,1,!0,x))}if(r.serialNumber){var v=xt.util.hexToBytes(r.serialNumber===!0?e.cert.serialNumber:r.serialNumber);u.push(L.create(L.Class.CONTEXT_SPECIFIC,2,!1,v))}}else if(r.name==="cRLDistributionPoints"){r.value=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[]);for(var u=r.value.value,S=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[]),E=L.create(L.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=L.oidToDer(L.oidToDer(f.oid)):a=L.oidToDer(a));E.value.push(L.create(L.Class.CONTEXT_SPECIFIC,f.type,!1,a))}S.value.push(L.create(L.Class.CONTEXT_SPECIFIC,0,!0,[E])),u.push(S)}if(typeof r.value>"u"){var t=new Error("Extension value not specified.");throw t.extension=r,t}return r}o(nk,"_fillMissingExtensionFields");function dN(r,e){switch(r){case or["RSASSA-PSS"]:var t=[];return e.hash.algorithmOid!==void 0&&t.push(L.create(L.Class.CONTEXT_SPECIFIC,0,!0,[L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(e.hash.algorithmOid).getBytes()),L.create(L.Class.UNIVERSAL,L.Type.NULL,!1,"")])])),e.mgf.algorithmOid!==void 0&&t.push(L.create(L.Class.CONTEXT_SPECIFIC,1,!0,[L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(e.mgf.algorithmOid).getBytes()),L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(e.mgf.hash.algorithmOid).getBytes()),L.create(L.Class.UNIVERSAL,L.Type.NULL,!1,"")])])])),e.saltLength!==void 0&&t.push(L.create(L.Class.CONTEXT_SPECIFIC,2,!0,[L.create(L.Class.UNIVERSAL,L.Type.INTEGER,!1,L.integerToDer(e.saltLength).getBytes())])),L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,t);default:return L.create(L.Class.UNIVERSAL,L.Type.NULL,!1,"")}}o(dN,"_signatureParametersToAsn1");function iQ(r){var e=L.create(L.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=L.Type.UTF8;"valueTagClass"in s&&(a=s.valueTagClass),a===L.Type.UTF8&&(i=xt.util.encodeUtf8(i));var u=!1;"valueConstructed"in s&&(u=s.valueConstructed);var c=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(s.type).getBytes()),L.create(L.Class.UNIVERSAL,L.Type.SET,!0,[L.create(L.Class.UNIVERSAL,a,u,i)])]);e.value.push(c)}return e}o(iQ,"_CRIAttributesToAsn1");var aQ=new Date("1950-01-01T00:00:00Z"),oQ=new Date("2050-01-01T00:00:00Z");function ek(r){return r>=aQ&&r<oQ?L.create(L.Class.UNIVERSAL,L.Type.UTCTIME,!1,L.dateToUtcTime(r)):L.create(L.Class.UNIVERSAL,L.Type.GENERALIZEDTIME,!1,L.dateToGeneralizedTime(r))}o(ek,"_dateToAsn1");Xe.getTBSCertificate=function(r){var e=ek(r.validity.notBefore),t=ek(r.validity.notAfter),n=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.CONTEXT_SPECIFIC,0,!0,[L.create(L.Class.UNIVERSAL,L.Type.INTEGER,!1,L.integerToDer(r.version).getBytes())]),L.create(L.Class.UNIVERSAL,L.Type.INTEGER,!1,xt.util.hexToBytes(r.serialNumber)),L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(r.siginfo.algorithmOid).getBytes()),dN(r.siginfo.algorithmOid,r.siginfo.parameters)]),pp(r.issuer),L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[e,t]),pp(r.subject),Xe.publicKeyToAsn1(r.publicKey)]);return r.issuer.uniqueId&&n.value.push(L.create(L.Class.CONTEXT_SPECIFIC,1,!0,[L.create(L.Class.UNIVERSAL,L.Type.BITSTRING,!1,"\0"+r.issuer.uniqueId)])),r.subject.uniqueId&&n.value.push(L.create(L.Class.CONTEXT_SPECIFIC,2,!0,[L.create(L.Class.UNIVERSAL,L.Type.BITSTRING,!1,"\0"+r.subject.uniqueId)])),r.extensions.length>0&&n.value.push(Xe.certificateExtensionsToAsn1(r.extensions)),n};Xe.getCertificationRequestInfo=function(r){var e=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.INTEGER,!1,L.integerToDer(r.version).getBytes()),pp(r.subject),Xe.publicKeyToAsn1(r.publicKey),iQ(r)]);return e};Xe.distinguishedNameToAsn1=function(r){return pp(r)};Xe.certificateToAsn1=function(r){var e=r.tbsCertificate||Xe.getTBSCertificate(r);return L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[e,L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(r.signatureOid).getBytes()),dN(r.signatureOid,r.signatureParameters)]),L.create(L.Class.UNIVERSAL,L.Type.BITSTRING,!1,"\0"+r.signature)])};Xe.certificateExtensionsToAsn1=function(r){var e=L.create(L.Class.CONTEXT_SPECIFIC,3,!0,[]),t=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[]);e.value.push(t);for(var n=0;n<r.length;++n)t.value.push(Xe.certificateExtensionToAsn1(r[n]));return e};Xe.certificateExtensionToAsn1=function(r){var e=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[]);e.value.push(L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(r.id).getBytes())),r.critical&&e.value.push(L.create(L.Class.UNIVERSAL,L.Type.BOOLEAN,!1,"\xFF"));var t=r.value;return typeof r.value!="string"&&(t=L.toDer(t).getBytes()),e.value.push(L.create(L.Class.UNIVERSAL,L.Type.OCTETSTRING,!1,t)),e};Xe.certificationRequestToAsn1=function(r){var e=r.certificationRequestInfo||Xe.getCertificationRequestInfo(r);return L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[e,L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(r.signatureOid).getBytes()),dN(r.signatureOid,r.signatureParameters)]),L.create(L.Class.UNIVERSAL,L.Type.BITSTRING,!1,"\0"+r.signature)])};Xe.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=L.toDer(Xe.certificateToAsn1(a)).getBytes(),f=0;f<u.length;++f){var h=L.toDer(Xe.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=L.toDer(Xe.certificateToAsn1(a)).getBytes(),h=0;h<c.length;++h){var m=L.toDer(Xe.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=Xe.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};Xe.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"};Xe.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:Xe.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:Xe.certificateError.bad_certificate})}a===null&&(!f||h)&&!r.hasCertificate(c)&&(a={message:"Certificate is not trusted.",error:Xe.certificateError.unknown_ca})}if(a===null&&f&&!c.isIssuer(f)&&(a={message:"Certificate issuer is invalid.",error:Xe.certificateError.bad_certificate}),a===null)for(var x={keyUsage:!0,basicConstraints:!0},v=0;a===null&&v<c.extensions.length;++v){var S=c.extensions[v];S.critical&&!(S.name in x)&&(a={message:"Certificate has an unsupported critical extension.",error:Xe.certificateError.unsupported_certificate})}if(a===null&&(!i||e.length===0&&(!f||h))){var E=c.getExtension("basicConstraints"),C=c.getExtension("keyUsage");if(C!==null&&(!C.keyCertSign||E===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:Xe.certificateError.bad_certificate}),a===null&&E!==null&&!E.cA&&(a={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:Xe.certificateError.bad_certificate}),a===null&&C!==null&&"pathLenConstraint"in E){var _=u-1;_>E.pathLenConstraint&&(a={message:"Certificate basicConstraints pathLenConstraint violated.",error:Xe.certificateError.bad_certificate})}}var b=a===null?!0:a.error,A=t.verify?t.verify(b,u,n):b;if(A===!0)a=null;else throw b===!0&&(a={message:"The application rejected the certificate.",error:Xe.certificateError.bad_certificate}),(A||A===0)&&(typeof A=="object"&&!xt.util.isArray(A)?(A.message&&(a.message=A.message),A.error&&(a.error=A.error)):typeof A=="string"&&(a.error=A)),a;i=!1,++u}while(e.length>0);return!0}});var gN=te((Pde,ak)=>{"use strict";var Or=Xt();ea();ap();Pu();hN();fN();Ei();eg();lp();lr();Ow();var Z=Or.asn1,Zt=Or.pki,rg=ak.exports=Or.pkcs12=Or.pkcs12||{},ik={name:"ContentInfo",tagClass:Z.Class.UNIVERSAL,type:Z.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:Z.Class.UNIVERSAL,type:Z.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:Z.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},uQ={name:"PFX",tagClass:Z.Class.UNIVERSAL,type:Z.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:Z.Class.UNIVERSAL,type:Z.Type.INTEGER,constructed:!1,capture:"version"},ik,{name:"PFX.macData",tagClass:Z.Class.UNIVERSAL,type:Z.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:Z.Class.UNIVERSAL,type:Z.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:Z.Class.UNIVERSAL,type:Z.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:Z.Class.UNIVERSAL,type:Z.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:Z.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:Z.Class.UNIVERSAL,type:Z.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:Z.Class.UNIVERSAL,type:Z.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:Z.Class.UNIVERSAL,type:Z.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},cQ={name:"SafeBag",tagClass:Z.Class.UNIVERSAL,type:Z.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:Z.Class.UNIVERSAL,type:Z.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:Z.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:Z.Class.UNIVERSAL,type:Z.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},lQ={name:"Attribute",tagClass:Z.Class.UNIVERSAL,type:Z.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:Z.Class.UNIVERSAL,type:Z.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:Z.Class.UNIVERSAL,type:Z.Type.SET,constructed:!0,capture:"values"}]},fQ={name:"CertBag",tagClass:Z.Class.UNIVERSAL,type:Z.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:Z.Class.UNIVERSAL,type:Z.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:Z.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:Z.Class.UNIVERSAL,type:Z.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(!Z.validate(r,uQ,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(E){var C={},_;return"localKeyId"in E?_=E.localKeyId:"localKeyIdHex"in E&&(_=Or.util.hexToBytes(E.localKeyIdHex)),_===void 0&&!("friendlyName"in E)&&"bagType"in E&&(C[E.bagType]=tg(a.safeContents,null,null,E.bagType)),_!==void 0&&(C.localKeyId=tg(a.safeContents,"localKeyId",_,E.bagType)),"friendlyName"in E&&(C.friendlyName=tg(a.safeContents,"friendlyName",E.friendlyName,E.bagType)),C},"getBags"),getBagsByFriendlyName:o(function(E,C){return tg(a.safeContents,"friendlyName",E,C)},"getBagsByFriendlyName"),getBagsByLocalKeyId:o(function(E,C){return tg(a.safeContents,"localKeyId",E,C)},"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(Z.derToOid(n.contentType)!==Zt.oids.data){var i=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw i.oid=Z.derToOid(n.contentType),i}var u=n.content.value[0];if(u.tagClass!==Z.Class.UNIVERSAL||u.type!==Z.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(u=mN(u),n.mac){var c=null,f=0,h=Z.derToOid(n.macAlgorithm);switch(h){case Zt.oids.sha1:c=Or.md.sha1.create(),f=20;break;case Zt.oids.sha256:c=Or.md.sha256.create(),f=32;break;case Zt.oids.sha384:c=Or.md.sha384.create(),f=48;break;case Zt.oids.sha512:c=Or.md.sha512.create(),f=64;break;case Zt.oids.md5:c=Or.md.md5.create(),f=16;break}if(c===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+h);var m=new Or.util.ByteBuffer(n.macSalt),g="macIterations"in n?parseInt(Or.util.bytesToHex(n.macIterations),16):1,x=rg.generateKey(t,m,3,g,f,c),v=Or.hmac.create();v.start(c,x),v.update(u.value);var S=v.getMac();if(S.getBytes()!==n.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return hQ(a,u.value,e,t),a};function mN(r){if(r.composed||r.constructed){for(var e=Or.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(mN,"_decodePkcs7Data");function hQ(r,e,t,n){if(e=Z.fromDer(e,t),e.tagClass!==Z.Class.UNIVERSAL||e.type!==Z.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(!Z.validate(i,ik,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(Z.derToOid(a.contentType)){case Zt.oids.data:if(m.tagClass!==Z.Class.UNIVERSAL||m.type!==Z.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");h=mN(m).value;break;case Zt.oids.encryptedData:h=pQ(m,n),f.encrypted=!0;break;default:var c=new Error("Unsupported PKCS#12 contentType.");throw c.contentType=Z.derToOid(a.contentType),c}f.safeBags=dQ(h,t,n),r.safeContents.push(f)}}o(hQ,"_decodeAuthenticatedSafe");function pQ(r,e){var t={},n=[];if(!Z.validate(r,Or.pkcs7.asn1.encryptedDataValidator,t,n)){var s=new Error("Cannot read EncryptedContentInfo.");throw s.errors=n,s}var i=Z.derToOid(t.contentType);if(i!==Zt.oids.data){var s=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw s.oid=i,s}i=Z.derToOid(t.encAlgorithm);var a=Zt.pbe.getCipher(i,t.encParameter,e),u=mN(t.encryptedContentAsn1),c=Or.util.createBuffer(u.value);if(a.update(c),!a.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return a.output.getBytes()}o(pQ,"_decryptSafeContents");function dQ(r,e,t){if(!e&&r.length===0)return[];if(r=Z.fromDer(r,e),r.tagClass!==Z.Class.UNIVERSAL||r.type!==Z.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(!Z.validate(i,cQ,a,u)){var c=new Error("Cannot read SafeBag.");throw c.errors=u,c}var f={type:Z.derToOid(a.bagId),attributes:mQ(a.bagAttributes)};n.push(f);var h,m,g=a.bagValue.value[0];switch(f.type){case Zt.oids.pkcs8ShroudedKeyBag:if(g=Zt.decryptPrivateKeyInfo(g,t),g===null)throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case Zt.oids.keyBag:try{f.key=Zt.privateKeyFromAsn1(g)}catch{f.key=null,f.asn1=g}continue;case Zt.oids.certBag:h=fQ,m=o(function(){if(Z.derToOid(a.certId)!==Zt.oids.x509Certificate){var v=new Error("Unsupported certificate type, only X.509 supported.");throw v.oid=Z.derToOid(a.certId),v}var S=Z.fromDer(a.cert,e);try{f.cert=Zt.certificateFromAsn1(S,!0)}catch{f.cert=null,f.asn1=S}},"decoder");break;default:var c=new Error("Unsupported PKCS#12 SafeBag type.");throw c.oid=f.type,c}if(h!==void 0&&!Z.validate(g,h,a,u)){var c=new Error("Cannot read PKCS#12 "+h.name);throw c.errors=u,c}m()}return n}o(dQ,"_decodeSafeContents");function mQ(r){var e={};if(r!==void 0)for(var t=0;t<r.length;++t){var n={},s=[];if(!Z.validate(r[t],lQ,n,s)){var i=new Error("Cannot read PKCS#12 BagAttribute.");throw i.errors=s,i}var a=Z.derToOid(n.oid);if(Zt.oids[a]!==void 0){e[Zt.oids[a]]=[];for(var u=0;u<n.values.length;++u)e[Zt.oids[a]].push(n.values[u].value)}}return e}o(mQ,"_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=Or.util.hexToBytes(s);else if(n.generateLocalKeyId)if(e){var a=Or.util.isArray(e)?e[0]:e;typeof a=="string"&&(a=Zt.certificateFromPem(a));var u=Or.md.sha1.create();u.update(Z.toDer(Zt.certificateToAsn1(a)).getBytes()),s=u.digest().getBytes()}else s=Or.random.getBytes(20);var c=[];s!==null&&c.push(Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(Zt.oids.localKeyId).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.SET,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,s)])])),"friendlyName"in n&&c.push(Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(Zt.oids.friendlyName).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.SET,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.BMPSTRING,!1,n.friendlyName)])])),c.length>0&&(i=Z.create(Z.Class.UNIVERSAL,Z.Type.SET,!0,c));var f=[],h=[];e!==null&&(Or.util.isArray(e)?h=e:h=[e]);for(var m=[],g=0;g<h.length;++g){e=h[g],typeof e=="string"&&(e=Zt.certificateFromPem(e));var x=g===0?i:void 0,v=Zt.certificateToAsn1(e),S=Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(Zt.oids.certBag).getBytes()),Z.create(Z.Class.CONTEXT_SPECIFIC,0,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(Zt.oids.x509Certificate).getBytes()),Z.create(Z.Class.CONTEXT_SPECIFIC,0,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,Z.toDer(v).getBytes())])])]),x]);m.push(S)}if(m.length>0){var E=Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,m),C=Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(Zt.oids.data).getBytes()),Z.create(Z.Class.CONTEXT_SPECIFIC,0,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,Z.toDer(E).getBytes())])]);f.push(C)}var _=null;if(r!==null){var b=Zt.wrapRsaPrivateKey(Zt.privateKeyToAsn1(r));t===null?_=Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(Zt.oids.keyBag).getBytes()),Z.create(Z.Class.CONTEXT_SPECIFIC,0,!0,[b]),i]):_=Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(Zt.oids.pkcs8ShroudedKeyBag).getBytes()),Z.create(Z.Class.CONTEXT_SPECIFIC,0,!0,[Zt.encryptPrivateKeyInfo(b,t,n)]),i]);var A=Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[_]),T=Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(Zt.oids.data).getBytes()),Z.create(Z.Class.CONTEXT_SPECIFIC,0,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,Z.toDer(A).getBytes())])]);f.push(T)}var R=Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,f),H;if(n.useMac){var u=Or.md.sha1.create(),I=new Or.util.ByteBuffer(Or.random.getBytes(n.saltSize)),$=n.count,r=rg.generateKey(t,I,3,$,20),K=Or.hmac.create();K.start(u,r),K.update(Z.toDer(R).getBytes());var F=K.getMac();H=Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(Zt.oids.sha1).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.NULL,!1,"")]),Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,F.getBytes())]),Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,I.getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.INTEGER,!1,Z.integerToDer($).getBytes())])}return Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.INTEGER,!1,Z.integerToDer(3).getBytes()),Z.create(Z.Class.UNIVERSAL,Z.Type.SEQUENCE,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OID,!1,Z.oidToDer(Zt.oids.data).getBytes()),Z.create(Z.Class.CONTEXT_SPECIFIC,0,!0,[Z.create(Z.Class.UNIVERSAL,Z.Type.OCTETSTRING,!1,Z.toDer(R).getBytes())])]),H])};rg.generateKey=Or.pbe.generatePkcs12Key});var yN=te((Lde,ok)=>{"use strict";var Uu=Xt();ea();Pu();fN();_l();bw();gN();Dw();eg();lr();Ow();var vN=Uu.asn1,dp=ok.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=vN.fromDer(e.body);return dp.privateKeyFromAsn1(n)};dp.privateKeyToPem=function(r,e){var t={type:"RSA PRIVATE KEY",body:vN.toDer(dp.privateKeyToAsn1(r)).getBytes()};return Uu.pem.encode(t,{maxline:e})};dp.privateKeyInfoToPem=function(r,e){var t={type:"PRIVATE KEY",body:vN.toDer(r).getBytes()};return Uu.pem.encode(t,{maxline:e})}});var AN=te((Vde,mk)=>{"use strict";var Le=Xt();ea();ap();xw();_l();yN();Ei();lp();lr();var Vw=o(function(r,e,t,n){var s=Le.util.createBuffer(),i=r.length>>1,a=i+(r.length&1),u=r.substr(0,a),c=r.substr(i,a),f=Le.util.createBuffer(),h=Le.hmac.create();t=e+t;var m=Math.ceil(n/16),g=Math.ceil(n/20);h.start("MD5",u);var x=Le.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 S=Le.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),S.putBuffer(h.digest());return s.putBytes(Le.util.xorBytes(x.getBytes(),S.getBytes(),n)),s},"prf_TLS1"),gQ=o(function(r,e,t){var n=Le.hmac.create();n.start("SHA1",r);var s=Le.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"),vQ=o(function(r,e,t){var n=!1;try{var s=r.deflate(e.fragment.getBytes());e.fragment=Le.util.createBuffer(s),e.length=s.length,n=!0}catch{}return n},"deflate"),yQ=o(function(r,e,t){var n=!1;try{var s=r.inflate(e.fragment.getBytes());e.fragment=Le.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 Le.util.createBuffer(r.getBytes(t))},"readVector"),Ni=o(function(r,e,t){r.putInt(t.length(),e<<3),r.putBuffer(t)},"writeVector"),j={};j.Versions={TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}};j.SupportedVersions=[j.Versions.TLS_1_1,j.Versions.TLS_1_0];j.Version=j.SupportedVersions[0];j.MaxFragment=15360;j.ConnectionEnd={server:0,client:1};j.PRFAlgorithm={tls_prf_sha256:0};j.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};j.CipherType={stream:0,block:1,aead:2};j.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};j.CompressionMethod={none:0,deflate:1};j.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24};j.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};j.Alert={};j.Alert.Level={warning:1,fatal:2};j.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};j.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};j.CipherSuites={};j.getCipherSuite=function(r){var e=null;for(var t in j.CipherSuites){var n=j.CipherSuites[t];if(n.id[0]===r.charCodeAt(0)&&n.id[1]===r.charCodeAt(1)){e=n;break}}return e};j.handleUnexpected=function(r,e){var t=!r.open&&r.entity===j.ConnectionEnd.client;t||r.error(r,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.unexpected_message}})};j.handleHelloRequest=function(r,e,t){!r.handshaking&&r.handshakes>0&&(j.queue(r,j.createAlert(r,{level:j.Alert.Level.warning,description:j.Alert.Description.no_renegotiation})),j.flush(r)),r.process()};j.parseHelloMessage=function(r,e,t){var n=null,s=r.entity===j.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:j.Alert.Level.fatal,description:j.Alert.Description.illegal_parameter}});else{var i=e.fragment,a=i.length();if(n={version:{major:i.getByte(),minor:i.getByte()},random:Le.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:j.Alert.Level.fatal,description:j.Alert.Description.protocol_version}});if(s)r.session.cipherSuite=j.getCipherSuite(n.cipher_suite);else for(var g=Le.util.createBuffer(n.cipher_suites.bytes());g.length()>0&&(r.session.cipherSuite=j.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:j.Alert.Level.fatal,description:j.Alert.Description.handshake_failure},cipherSuite:Le.util.bytesToHex(n.cipher_suite)});s?r.session.compressionMethod=n.compression_method:r.session.compressionMethod=j.CompressionMethod.none}return n};j.createSecurityParameters=function(r,e){var t=r.entity===j.ConnectionEnd.client,n=e.random.bytes(),s=t?r.session.sp.client_random:n,i=t?n:j.createRandom().getBytes();r.session.sp={entity:r.entity,prf_algorithm:j.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}};j.handleServerHello=function(r,e,t){var n=j.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:j.Alert.Level.fatal,description:j.Alert.Description.protocol_version}});r.session.version=r.version;var s=n.session_id.bytes();s.length>0&&s===r.session.id?(r.expect=lk,r.session.resuming=!0,r.session.sp.server_random=n.random.bytes()):(r.expect=wQ,r.session.resuming=!1,j.createSecurityParameters(r,n)),r.session.id=s,r.process()}};j.handleClientHello=function(r,e,t){var n=j.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=Le.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<j.SupportedVersions.length&&(a=j.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=EN,r.session.resuming=!0,r.session.sp.client_random=n.random.bytes()):(r.expect=r.verifyClient!==!1?TQ:SN,r.session.resuming=!1,j.createSecurityParameters(r,n)),r.open=!0,j.queue(r,j.createRecord(r,{type:j.ContentType.handshake,data:j.createServerHello(r)})),r.session.resuming?(j.queue(r,j.createRecord(r,{type:j.ContentType.change_cipher_spec,data:j.createChangeCipherSpec()})),r.state.pending=j.createConnectionState(r),r.state.current.write=r.state.pending.write,j.queue(r,j.createRecord(r,{type:j.ContentType.handshake,data:j.createFinished(r)}))):(j.queue(r,j.createRecord(r,{type:j.ContentType.handshake,data:j.createCertificate(r)})),r.fail||(j.queue(r,j.createRecord(r,{type:j.ContentType.handshake,data:j.createServerKeyExchange(r)})),r.verifyClient!==!1&&j.queue(r,j.createRecord(r,{type:j.ContentType.handshake,data:j.createCertificateRequest(r)})),j.queue(r,j.createRecord(r,{type:j.ContentType.handshake,data:j.createServerHelloDone(r)})))),j.flush(r),r.process()}};j.handleCertificate=function(r,e,t){if(t<3)return r.error(r,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.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=Le.asn1.fromDer(i),i=Le.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:j.Alert.Level.fatal,description:j.Alert.Description.bad_certificate}})}var c=r.entity===j.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:j.Alert.Level.fatal,description:j.Alert.Description.illegal_parameter}}):u.length===0?r.expect=c?uk:SN:(c?r.session.serverCertificate=u[0]:r.session.clientCertificate=u[0],j.verifyCertificateChain(r,u)&&(r.expect=c?uk:SN)),r.process()};j.handleServerKeyExchange=function(r,e,t){if(t>0)return r.error(r,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.unsupported_certificate}});r.expect=SQ,r.process()};j.handleClientKeyExchange=function(r,e,t){if(t<48)return r.error(r,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.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=Le.pki.privateKeyFromPem(i)}catch(c){r.error(r,{message:"Could not get private key.",cause:c,send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.internal_error}})}if(i===null)return r.error(r,{message:"No private key set.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.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=Le.random.getBytes(48)}r.expect=EN,r.session.clientCertificate!==null&&(r.expect=IQ),r.process()};j.handleCertificateRequest=function(r,e,t){if(t<3)return r.error(r,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.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=EQ,r.process()};j.handleCertificateVerify=function(r,e,t){if(t<2)return r.error(r,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.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=Le.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:j.Alert.Level.fatal,description:j.Alert.Description.handshake_failure}})}r.expect=EN,r.process()};j.handleServerHelloDone=function(r,e,t){if(t>0)return r.error(r,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.record_overflow}});if(r.serverCertificate===null){var n={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.insufficient_security}},s=0,i=r.verify(r,n.alert.description,s,[]);if(i!==!0)return(i||i===0)&&(typeof i=="object"&&!Le.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=j.createRecord(r,{type:j.ContentType.handshake,data:j.createCertificate(r)}),j.queue(r,e)),e=j.createRecord(r,{type:j.ContentType.handshake,data:j.createClientKeyExchange(r)}),j.queue(r,e),r.expect=CQ;var a=o(function(u,c){u.session.certificateRequest!==null&&u.session.clientCertificate!==null&&j.queue(u,j.createRecord(u,{type:j.ContentType.handshake,data:j.createCertificateVerify(u,c)})),j.queue(u,j.createRecord(u,{type:j.ContentType.change_cipher_spec,data:j.createChangeCipherSpec()})),u.state.pending=j.createConnectionState(u),u.state.current.write=u.state.pending.write,j.queue(u,j.createRecord(u,{type:j.ContentType.handshake,data:j.createFinished(u)})),u.expect=lk,j.flush(u),u.process()},"callback");if(r.session.certificateRequest===null||r.session.clientCertificate===null)return a(r,null);j.getClientSignature(r,a)};j.handleChangeCipherSpec=function(r,e){if(e.fragment.getByte()!==1)return r.error(r,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.illegal_parameter}});var t=r.entity===j.ConnectionEnd.client;(r.session.resuming&&t||!r.session.resuming&&!t)&&(r.state.pending=j.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?bQ:_Q,r.process()};j.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=Le.util.createBuffer(),n.putBuffer(r.session.md5.digest()),n.putBuffer(r.session.sha1.digest());var a=r.entity===j.ConnectionEnd.client,u=a?"server finished":"client finished",c=r.session.sp,f=12,h=Vw;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:j.Alert.Level.fatal,description:j.Alert.Description.decrypt_error}});r.session.md5.update(s),r.session.sha1.update(s),(r.session.resuming&&a||!r.session.resuming&&!a)&&(j.queue(r,j.createRecord(r,{type:j.ContentType.change_cipher_spec,data:j.createChangeCipherSpec()})),r.state.current.write=r.state.pending.write,r.state.pending=null,j.queue(r,j.createRecord(r,{type:j.ContentType.handshake,data:j.createFinished(r)}))),r.expect=a?AQ:DQ,r.handshaking=!1,++r.handshakes,r.peerCertificate=a?r.session.serverCertificate:r.session.clientCertificate,j.flush(r),r.isConnected=!0,r.connected(r),r.process()};j.handleAlert=function(r,e){var t=e.fragment,n={level:t.getByte(),description:t.getByte()},s;switch(n.description){case j.Alert.Description.close_notify:s="Connection closed.";break;case j.Alert.Description.unexpected_message:s="Unexpected message.";break;case j.Alert.Description.bad_record_mac:s="Bad record MAC.";break;case j.Alert.Description.decryption_failed:s="Decryption failed.";break;case j.Alert.Description.record_overflow:s="Record overflow.";break;case j.Alert.Description.decompression_failure:s="Decompression failed.";break;case j.Alert.Description.handshake_failure:s="Handshake failure.";break;case j.Alert.Description.bad_certificate:s="Bad certificate.";break;case j.Alert.Description.unsupported_certificate:s="Unsupported certificate.";break;case j.Alert.Description.certificate_revoked:s="Certificate revoked.";break;case j.Alert.Description.certificate_expired:s="Certificate expired.";break;case j.Alert.Description.certificate_unknown:s="Certificate unknown.";break;case j.Alert.Description.illegal_parameter:s="Illegal parameter.";break;case j.Alert.Description.unknown_ca:s="Unknown certificate authority.";break;case j.Alert.Description.access_denied:s="Access denied.";break;case j.Alert.Description.decode_error:s="Decode error.";break;case j.Alert.Description.decrypt_error:s="Decrypt error.";break;case j.Alert.Description.export_restriction:s="Export restriction.";break;case j.Alert.Description.protocol_version:s="Unsupported protocol version.";break;case j.Alert.Description.insufficient_security:s="Insufficient security.";break;case j.Alert.Description.internal_error:s="Internal error.";break;case j.Alert.Description.user_canceled:s="User canceled.";break;case j.Alert.Description.no_renegotiation:s="Renegotiation not supported.";break;default:s="Unknown error.";break}if(n.description===j.Alert.Description.close_notify)return r.close();r.error(r,{message:s,send:!1,origin:r.entity===j.ConnectionEnd.client?"server":"client",alert:n}),r.process()};j.handleHandshake=function(r,e){var t=e.fragment,n=t.getByte(),s=t.getInt24();if(s>t.length())return r.fragmented=e,e.fragment=Le.util.createBuffer(),t.read-=4,r.process();r.fragmented=null,t.read-=4;var i=t.bytes(s+4);t.read+=4,n in Lw[r.entity][r.expect]?(r.entity===j.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:Le.md.md5.create(),sha1:Le.md.sha1.create()}),n!==j.HandshakeType.hello_request&&n!==j.HandshakeType.certificate_verify&&n!==j.HandshakeType.finished&&(r.session.md5.update(i),r.session.sha1.update(i)),Lw[r.entity][r.expect][n](r,e,s)):j.handleUnexpected(r,e)};j.handleApplicationData=function(r,e){r.data.putBuffer(e.fragment),r.dataReady(r),r.process()};j.handleHeartbeat=function(r,e){var t=e.fragment,n=t.getByte(),s=t.getInt16(),i=t.getBytes(s);if(n===j.HeartbeatMessageType.heartbeat_request){if(r.handshaking||s>i.length)return r.process();j.queue(r,j.createRecord(r,{type:j.ContentType.heartbeat,data:j.createHeartbeat(j.HeartbeatMessageType.heartbeat_response,i)})),j.flush(r)}else if(n===j.HeartbeatMessageType.heartbeat_response){if(i!==r.expectedHeartbeatPayload)return r.process();r.heartbeatReceived&&r.heartbeatReceived(r,Le.util.createBuffer(i))}r.process()};var xQ=0,wQ=1,uk=2,SQ=3,EQ=4,lk=5,bQ=6,AQ=7,CQ=8,NQ=0,TQ=1,SN=2,IQ=3,EN=4,_Q=5,DQ=6,U=j.handleUnexpected,fk=j.handleChangeCipherSpec,Kn=j.handleAlert,xs=j.handleHandshake,hk=j.handleApplicationData,$n=j.handleHeartbeat,bN=[];bN[j.ConnectionEnd.client]=[[U,Kn,xs,U,$n],[U,Kn,xs,U,$n],[U,Kn,xs,U,$n],[U,Kn,xs,U,$n],[U,Kn,xs,U,$n],[fk,Kn,U,U,$n],[U,Kn,xs,U,$n],[U,Kn,xs,hk,$n],[U,Kn,xs,U,$n]];bN[j.ConnectionEnd.server]=[[U,Kn,xs,U,$n],[U,Kn,xs,U,$n],[U,Kn,xs,U,$n],[U,Kn,xs,U,$n],[fk,Kn,U,U,$n],[U,Kn,xs,U,$n],[U,Kn,xs,hk,$n],[U,Kn,xs,U,$n]];var ju=j.handleHelloRequest,BQ=j.handleServerHello,pk=j.handleCertificate,ck=j.handleServerKeyExchange,xN=j.handleCertificateRequest,Pw=j.handleServerHelloDone,dk=j.handleFinished,Lw=[];Lw[j.ConnectionEnd.client]=[[U,U,BQ,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U],[ju,U,U,U,U,U,U,U,U,U,U,pk,ck,xN,Pw,U,U,U,U,U,U],[ju,U,U,U,U,U,U,U,U,U,U,U,ck,xN,Pw,U,U,U,U,U,U],[ju,U,U,U,U,U,U,U,U,U,U,U,U,xN,Pw,U,U,U,U,U,U],[ju,U,U,U,U,U,U,U,U,U,U,U,U,U,Pw,U,U,U,U,U,U],[ju,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U],[ju,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,dk],[ju,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U],[ju,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U]];var RQ=j.handleClientHello,OQ=j.handleClientKeyExchange,PQ=j.handleCertificateVerify;Lw[j.ConnectionEnd.server]=[[U,RQ,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U],[U,U,U,U,U,U,U,U,U,U,U,pk,U,U,U,U,U,U,U,U,U],[U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,OQ,U,U,U,U],[U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,PQ,U,U,U,U,U],[U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U],[U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,dk],[U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U],[U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U]];j.generateKeys=function(r,e){var t=Vw,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===j.Versions.TLS_1_0.major&&r.version.minor===j.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};j.createConnectionState=function(r){var e=r.entity===j.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:j.Alert.Level.fatal,description:j.Alert.Description.decompression_failure}}):i.error(i,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.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:j.Alert.Level.fatal,description:j.Alert.Description.internal_error}}):i.error(i,{message:"Could not compress record.",send:!1,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.internal_error}}),!i.fail},r.session){var s=r.session.sp;switch(r.session.cipherSuite.initSecurityParameters(s),s.keys=j.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 j.CompressionMethod.none:break;case j.CompressionMethod.deflate:n.read.compressFunction=yQ,n.write.compressFunction=vQ;break;default:throw new Error("Unsupported compression algorithm.")}}return n};j.createRandom=function(){var r=new Date,e=+r+r.getTimezoneOffset()*6e4,t=Le.util.createBuffer();return t.putInt32(e),t.putBytes(Le.random.getBytes(28)),t};j.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};j.createAlert=function(r,e){var t=Le.util.createBuffer();return t.putByte(e.level),t.putByte(e.description),j.createRecord(r,{type:j.ContentType.alert,data:t})};j.createClientHello=function(r){r.session.clientHelloVersion={major:r.version.major,minor:r.version.minor};for(var e=Le.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=Le.util.createBuffer();i.putByte(j.CompressionMethod.none);var a=i.length(),u=Le.util.createBuffer();if(r.virtualHost){var c=Le.util.createBuffer();c.putByte(0),c.putByte(0);var f=Le.util.createBuffer();f.putByte(0),Ni(f,2,Le.util.createBuffer(r.virtualHost));var h=Le.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=Le.util.createBuffer();return v.putByte(j.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,Le.util.createBuffer(g)),Ni(v,2,e),Ni(v,1,i),m>0&&Ni(v,2,u),v};j.createServerHello=function(r){var e=r.session.id,t=e.length+1+2+4+28+2+1,n=Le.util.createBuffer();return n.putByte(j.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,Le.util.createBuffer(e)),n.putByte(r.session.cipherSuite.id[0]),n.putByte(r.session.cipherSuite.id[1]),n.putByte(r.session.compressionMethod),n};j.createCertificate=function(r){var e=r.entity===j.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=Le.util.createBuffer();if(t!==null)try{Le.util.isArray(t)||(t=[t]);for(var i=null,a=0;a<t.length;++a){var u=Le.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=Le.util.createBuffer(u.body);i===null&&(i=Le.asn1.fromDer(f.bytes(),!1));var h=Le.util.createBuffer();Ni(h,3,f),s.putBuffer(h)}t=Le.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:j.Alert.Level.fatal,description:j.Alert.Description.bad_certificate}})}var m=3+s.length(),g=Le.util.createBuffer();return g.putByte(j.HandshakeType.certificate),g.putInt24(m),Ni(g,3,s),g};j.createClientKeyExchange=function(r){var e=Le.util.createBuffer();e.putByte(r.session.clientHelloVersion.major),e.putByte(r.session.clientHelloVersion.minor),e.putBytes(Le.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=Le.util.createBuffer();return i.putByte(j.HandshakeType.client_key_exchange),i.putInt24(s),i.putInt16(e.length),i.putBytes(e),i};j.createServerKeyExchange=function(r){var e=0,t=Le.util.createBuffer();return e>0&&(t.putByte(j.HandshakeType.server_key_exchange),t.putInt24(e)),t};j.getClientSignature=function(r,e){var t=Le.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=Le.pki.privateKeyFromPem(a)}catch(u){n.error(n,{message:"Could not get private key.",cause:u,send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.internal_error}})}a===null?n.error(n,{message:"No private key set.",send:!0,alert:{level:j.Alert.Level.fatal,description:j.Alert.Description.internal_error}}):s=a.sign(s,null),i(n,s)},r.getSignature(r,t,e)};j.createCertificateVerify=function(r,e){var t=e.length+2,n=Le.util.createBuffer();return n.putByte(j.HandshakeType.certificate_verify),n.putInt24(t),n.putInt16(e.length),n.putBytes(e),n};j.createCertificateRequest=function(r){var e=Le.util.createBuffer();e.putByte(1);var t=Le.util.createBuffer();for(var n in r.caStore.certs){var s=r.caStore.certs[n],i=Le.pki.distinguishedNameToAsn1(s.subject),a=Le.asn1.toDer(i);t.putInt16(a.length()),t.putBuffer(a)}var u=1+e.length()+2+t.length(),c=Le.util.createBuffer();return c.putByte(j.HandshakeType.certificate_request),c.putInt24(u),Ni(c,1,e),Ni(c,2,t),c};j.createServerHelloDone=function(r){var e=Le.util.createBuffer();return e.putByte(j.HandshakeType.server_hello_done),e.putInt24(0),e};j.createChangeCipherSpec=function(){var r=Le.util.createBuffer();return r.putByte(1),r};j.createFinished=function(r){var e=Le.util.createBuffer();e.putBuffer(r.session.md5.digest()),e.putBuffer(r.session.sha1.digest());var t=r.entity===j.ConnectionEnd.client,n=r.session.sp,s=12,i=Vw,a=t?"client finished":"server finished";e=i(n.master_secret,a,e.getBytes(),s);var u=Le.util.createBuffer();return u.putByte(j.HandshakeType.finished),u.putInt24(e.length()),u.putBuffer(e),u};j.createHeartbeat=function(r,e,t){typeof t>"u"&&(t=e.length);var n=Le.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(Le.random.getBytes(i)),n};j.queue=function(r,e){if(e&&!(e.fragment.length()===0&&(e.type===j.ContentType.handshake||e.type===j.ContentType.alert||e.type===j.ContentType.change_cipher_spec))){if(e.type===j.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()<=j.MaxFragment)n=[e];else{n=[];for(var s=e.fragment.bytes();s.length>j.MaxFragment;)n.push(j.createRecord(r,{type:e.type,data:Le.util.createBuffer(s.slice(0,j.MaxFragment))})),s=s.slice(j.MaxFragment);s.length>0&&n.push(j.createRecord(r,{type:e.type,data:Le.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)}}};j.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 wN=o(function(r){switch(r){case!0:return!0;case Le.pki.certificateError.bad_certificate:return j.Alert.Description.bad_certificate;case Le.pki.certificateError.unsupported_certificate:return j.Alert.Description.unsupported_certificate;case Le.pki.certificateError.certificate_revoked:return j.Alert.Description.certificate_revoked;case Le.pki.certificateError.certificate_expired:return j.Alert.Description.certificate_expired;case Le.pki.certificateError.certificate_unknown:return j.Alert.Description.certificate_unknown;case Le.pki.certificateError.unknown_ca:return j.Alert.Description.unknown_ca;default:return j.Alert.Description.bad_certificate}},"_certErrorToAlertDesc"),kQ=o(function(r){switch(r){case!0:return!0;case j.Alert.Description.bad_certificate:return Le.pki.certificateError.bad_certificate;case j.Alert.Description.unsupported_certificate:return Le.pki.certificateError.unsupported_certificate;case j.Alert.Description.certificate_revoked:return Le.pki.certificateError.certificate_revoked;case j.Alert.Description.certificate_expired:return Le.pki.certificateError.certificate_expired;case j.Alert.Description.certificate_unknown:return Le.pki.certificateError.certificate_unknown;case j.Alert.Description.unknown_ca:return Le.pki.certificateError.unknown_ca;default:return Le.pki.certificateError.bad_certificate}},"_alertDescToCertError");j.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=wN(i),f=r.verify(r,i,a,u);if(f!==!0){if(typeof f=="object"&&!Le.util.isArray(f)){var h=new Error("The application rejected the certificate.");throw h.send=!0,h.alert={level:j.Alert.Level.fatal,description:j.Alert.Description.bad_certificate},f.message&&(h.message=f.message),f.alert&&(h.alert.description=f.alert),h}f!==i&&(f=kQ(f))}return f},Le.pki.verifyCertificateChain(r.caStore,e,t)}catch(i){var s=i;(typeof s!="object"||Le.util.isArray(s))&&(s={send:!0,alert:{level:j.Alert.Level.fatal,description:wN(i)}}),"send"in s||(s.send=!0),"alert"in s||(s.alert={level:j.Alert.Level.fatal,description:wN(s.error)}),r.error(r,s)}return!r.fail};j.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=Le.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=Le.util.bytesToHex(s);t.order.push(a),t.cache[a]=i}}return t};j.createConnection=function(r){var e=null;r.caStore?Le.util.isArray(r.caStore)?e=Le.pki.createCaStore(r.caStore):e=r.caStore:e=Le.pki.createCaStore();var t=r.cipherSuites||null;if(t===null){t=[];for(var n in j.CipherSuites)t.push(j.CipherSuites[n])}var s=r.server?j.ConnectionEnd.server:j.ConnectionEnd.client,i=r.sessionCache?j.createSessionCache(r.sessionCache):null,a={version:{major:j.Version.major,minor:j.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:Le.util.createBuffer(),tlsData:Le.util.createBuffer(),data:Le.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===j.ConnectionEnd.client?"client":"server"),m.send&&(j.queue(h,j.createAlert(h,m.alert)),j.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:j.Version.major,minor:j.Version.minor},a.record=null,a.session=null,a.peerCertificate=null,a.state={pending:null,current:null},a.expect=a.entity===j.ConnectionEnd.client?xQ:NQ,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=j.createConnectionState(a)},a.reset();var u=o(function(h,m){var g=m.type-j.ContentType.change_cipher_spec,x=bN[h.entity][h.expect];g in x?x[g](h,m):j.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:Le.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:j.Alert.Level.fatal,description:j.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:j.Alert.Level.fatal,description:j.Alert.Description.unexpected_message}})),h.record.ready=!0)}return m},"_readRecord");return a.handshake=function(h){if(a.entity!==j.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:Le.md.md5.create(),sha1:Le.md.sha1.create()},m&&(a.version=m.version,a.session.sp=m.sp),a.session.sp.client_random=j.createRandom().getBytes(),a.open=!0,j.queue(a,j.createRecord(a,{type:j.ContentType.handshake,data:j.createClientHello(a)})),j.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 j.queue(a,j.createRecord(a,{type:j.ContentType.application_data,data:Le.util.createBuffer(h)})),j.flush(a)},a.prepareHeartbeatRequest=function(h,m){return h instanceof Le.util.ByteBuffer&&(h=h.bytes()),typeof m>"u"&&(m=h.length),a.expectedHeartbeatPayload=h,j.queue(a,j.createRecord(a,{type:j.ContentType.heartbeat,data:j.createHeartbeat(j.HeartbeatMessageType.heartbeat_request,h,m)})),j.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,j.queue(a,j.createAlert(a,{level:j.Alert.Level.warning,description:j.Alert.Description.close_notify})),j.flush(a)),a.closed(a)),a.reset(h)},a};mk.exports=Le.tls=Le.tls||{};for(kw in j)typeof j[kw]!="function"&&(Le.tls[kw]=j[kw]);var kw;Le.tls.prf_tls1=Vw;Le.tls.hmac_sha1=gQ;Le.tls.createSessionCache=j.createSessionCache;Le.tls.createConnection=j.createConnection});var yk=te((jde,vk)=>{"use strict";var Mu=Xt();Ou();AN();var Ti=vk.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:gk};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:gk};function gk(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=jQ,r.write.cipherFunction=LQ,r.read.macLength=r.write.macLength=t.mac_length,r.read.macFunction=r.write.macFunction=Ti.hmac_sha1}o(gk,"initConnectionState");function LQ(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(VQ)&&(r.fragment=i.output,r.length=r.fragment.length(),t=!0),t}o(LQ,"encrypt_aes_cbc_sha1");function VQ(r,e,t){if(!t){var n=r-e.length()%r;e.fillWithByte(n-1,n)}return!0}o(VQ,"encrypt_aes_cbc_sha1_padding");function UQ(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(UQ,"decrypt_aes_cbc_sha1_padding");function jQ(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(UQ);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=MQ(e.macKey,a,c)&&t,t}o(jQ,"decrypt_aes_cbc_sha1");function MQ(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(MQ,"compareMacs")});var TN=te((Fde,Ek)=>{"use strict";var Fr=Xt();_a();lr();var ng=Ek.exports=Fr.sha512=Fr.sha512||{};Fr.md.sha512=Fr.md.algorithms.sha512=ng;var wk=Fr.sha384=Fr.sha512.sha384=Fr.sha512.sha384||{};wk.create=function(){return ng.create("SHA-384")};Fr.md.sha384=Fr.md.algorithms.sha384=wk;Fr.sha512.sha256=Fr.sha512.sha256||{create:o(function(){return ng.create("SHA-512/256")},"create")};Fr.md["sha512/256"]=Fr.md.algorithms["sha512/256"]=Fr.sha512.sha256;Fr.sha512.sha224=Fr.sha512.sha224||{create:o(function(){return ng.create("SHA-512/224")},"create")};Fr.md["sha512/224"]=Fr.md.algorithms["sha512/224"]=Fr.sha512.sha224;ng.create=function(r){if(Sk||FQ(),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=Fr.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=Fr.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=Fr.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),xk(t,s,n),(n.read>2048||n.length()===0)&&n.compact(),u},u.digest=function(){var c=Fr.util.createBuffer();c.putBytes(n.bytes());var f=u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize,h=f&u.blockLength-1;c.putBytes(CN.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 S=new Array(t.length),v=0;v<t.length;++v)S[v]=t[v].slice(0);xk(S,s,c);var E=Fr.util.createBuffer(),C;r==="SHA-512"?C=S.length:r==="SHA-384"?C=S.length-2:C=S.length-4;for(var v=0;v<C;++v)E.putInt32(S[v][0]),(v!==C-1||r!=="SHA-512/224")&&E.putInt32(S[v][1]);return E},u};var CN=null,Sk=!1,NN=null,kl=null;function FQ(){CN="\x80",CN+=Fr.util.fillString("\0",128),NN=[[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]],Sk=!0}o(FQ,"_init");function xk(r,e,t){for(var n,s,i,a,u,c,f,h,m,g,x,v,S,E,C,_,b,A,T,R,H,I,$,K,F,z,he,pe,oe,Q,xe,Me,Qe,de,fe,Re=t.length();Re>=128;){for(oe=0;oe<16;++oe)e[oe][0]=t.getInt32()>>>0,e[oe][1]=t.getInt32()>>>0;for(;oe<80;++oe)Me=e[oe-2],Q=Me[0],xe=Me[1],n=((Q>>>19|xe<<13)^(xe>>>29|Q<<3)^Q>>>6)>>>0,s=((Q<<13|xe>>>19)^(xe<<3|Q>>>29)^(Q<<26|xe>>>6))>>>0,de=e[oe-15],Q=de[0],xe=de[1],i=((Q>>>1|xe<<31)^(Q>>>8|xe<<24)^Q>>>7)>>>0,a=((Q<<31|xe>>>1)^(Q<<24|xe>>>8)^(Q<<25|xe>>>7))>>>0,Qe=e[oe-7],fe=e[oe-16],xe=s+Qe[1]+a+fe[1],e[oe][0]=n+Qe[0]+i+fe[0]+(xe/4294967296>>>0)>>>0,e[oe][1]=xe>>>0;for(S=r[0][0],E=r[0][1],C=r[1][0],_=r[1][1],b=r[2][0],A=r[2][1],T=r[3][0],R=r[3][1],H=r[4][0],I=r[4][1],$=r[5][0],K=r[5][1],F=r[6][0],z=r[6][1],he=r[7][0],pe=r[7][1],oe=0;oe<80;++oe)f=((H>>>14|I<<18)^(H>>>18|I<<14)^(I>>>9|H<<23))>>>0,h=((H<<18|I>>>14)^(H<<14|I>>>18)^(I<<23|H>>>9))>>>0,m=(F^H&($^F))>>>0,g=(z^I&(K^z))>>>0,u=((S>>>28|E<<4)^(E>>>2|S<<30)^(E>>>7|S<<25))>>>0,c=((S<<4|E>>>28)^(E<<30|S>>>2)^(E<<25|S>>>7))>>>0,x=(S&C|b&(S^C))>>>0,v=(E&_|A&(E^_))>>>0,xe=pe+h+g+NN[oe][1]+e[oe][1],n=he+f+m+NN[oe][0]+e[oe][0]+(xe/4294967296>>>0)>>>0,s=xe>>>0,xe=c+v,i=u+x+(xe/4294967296>>>0)>>>0,a=xe>>>0,he=F,pe=z,F=$,z=K,$=H,K=I,xe=R+s,H=T+n+(xe/4294967296>>>0)>>>0,I=xe>>>0,T=b,R=A,b=C,A=_,C=S,_=E,xe=s+a,S=n+i+(xe/4294967296>>>0)>>>0,E=xe>>>0;xe=r[0][1]+E,r[0][0]=r[0][0]+S+(xe/4294967296>>>0)>>>0,r[0][1]=xe>>>0,xe=r[1][1]+_,r[1][0]=r[1][0]+C+(xe/4294967296>>>0)>>>0,r[1][1]=xe>>>0,xe=r[2][1]+A,r[2][0]=r[2][0]+b+(xe/4294967296>>>0)>>>0,r[2][1]=xe>>>0,xe=r[3][1]+R,r[3][0]=r[3][0]+T+(xe/4294967296>>>0)>>>0,r[3][1]=xe>>>0,xe=r[4][1]+I,r[4][0]=r[4][0]+H+(xe/4294967296>>>0)>>>0,r[4][1]=xe>>>0,xe=r[5][1]+K,r[5][0]=r[5][0]+$+(xe/4294967296>>>0)>>>0,r[5][1]=xe>>>0,xe=r[6][1]+z,r[6][0]=r[6][0]+F+(xe/4294967296>>>0)>>>0,r[6][1]=xe>>>0,xe=r[7][1]+pe,r[7][0]=r[7][0]+he+(xe/4294967296>>>0)>>>0,r[7][1]=xe>>>0,Re-=128}}o(xk,"_update")});var bk=te(IN=>{"use strict";var qQ=Xt();ea();var Rn=qQ.asn1;IN.privateKeyValidator={name:"PrivateKeyInfo",tagClass:Rn.Class.UNIVERSAL,type:Rn.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:Rn.Class.UNIVERSAL,type:Rn.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:Rn.Class.UNIVERSAL,type:Rn.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Rn.Class.UNIVERSAL,type:Rn.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:Rn.Class.UNIVERSAL,type:Rn.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]};IN.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:Rn.Class.UNIVERSAL,type:Rn.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:Rn.Class.UNIVERSAL,type:Rn.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Rn.Class.UNIVERSAL,type:Rn.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:Rn.Class.UNIVERSAL,type:Rn.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}});var Lk=te((Kde,kk)=>{"use strict";var Gn=Xt();Z0();Ei();TN();lr();var _k=bk(),HQ=_k.publicKeyValidator,KQ=_k.privateKeyValidator;typeof Ak>"u"&&(Ak=Gn.jsbn.BigInteger);var Ak,BN=Gn.util.ByteBuffer,Bs=typeof Buffer>"u"?Uint8Array:Buffer;Gn.pki=Gn.pki||{};kk.exports=Gn.pki.ed25519=Gn.ed25519=Gn.ed25519||{};var er=Gn.ed25519;er.constants={};er.constants.PUBLIC_KEY_BYTE_LENGTH=32;er.constants.PRIVATE_KEY_BYTE_LENGTH=64;er.constants.SEED_BYTE_LENGTH=32;er.constants.SIGN_BYTE_LENGTH=64;er.constants.HASH_BYTE_LENGTH=64;er.generateKeyPair=function(r){r=r||{};var e=r.seed;if(e===void 0)e=Gn.random.getBytesSync(er.constants.SEED_BYTE_LENGTH);else if(typeof e=="string"){if(e.length!==er.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+er.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=_o({message:e,encoding:"binary"});for(var t=new Bs(er.constants.PUBLIC_KEY_BYTE_LENGTH),n=new Bs(er.constants.PRIVATE_KEY_BYTE_LENGTH),s=0;s<32;++s)n[s]=e[s];return WQ(t,n),{publicKey:t,privateKey:n}};er.privateKeyFromAsn1=function(r){var e={},t=[],n=Gn.asn1.validate(r,KQ,e,t);if(!n){var s=new Error("Invalid Key.");throw s.errors=t,s}var i=Gn.asn1.derToOid(e.privateKeyOid),a=Gn.oids.EdDSA25519;if(i!==a)throw new Error('Invalid OID "'+i+'"; OID must be "'+a+'".');var u=e.privateKey,c=_o({message:Gn.asn1.fromDer(u).value,encoding:"binary"});return{privateKeyBytes:c}};er.publicKeyFromAsn1=function(r){var e={},t=[],n=Gn.asn1.validate(r,HQ,e,t);if(!n){var s=new Error("Invalid Key.");throw s.errors=t,s}var i=Gn.asn1.derToOid(e.publicKeyOid),a=Gn.oids.EdDSA25519;if(i!==a)throw new Error('Invalid OID "'+i+'"; OID must be "'+a+'".');var u=e.ed25519PublicKey;if(u.length!==er.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return _o({message:u,encoding:"binary"})};er.publicKeyFromPrivateKey=function(r){r=r||{};var e=_o({message:r.privateKey,encoding:"binary"});if(e.length!==er.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+er.constants.PRIVATE_KEY_BYTE_LENGTH);for(var t=new Bs(er.constants.PUBLIC_KEY_BYTE_LENGTH),n=0;n<t.length;++n)t[n]=e[32+n];return t};er.sign=function(r){r=r||{};var e=_o(r),t=_o({message:r.privateKey,encoding:"binary"});if(t.length===er.constants.SEED_BYTE_LENGTH){var n=er.generateKeyPair({seed:t});t=n.privateKey}else if(t.length!==er.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+er.constants.SEED_BYTE_LENGTH+" or "+er.constants.PRIVATE_KEY_BYTE_LENGTH);var s=new Bs(er.constants.SIGN_BYTE_LENGTH+e.length);zQ(s,e,e.length,t);for(var i=new Bs(er.constants.SIGN_BYTE_LENGTH),a=0;a<i.length;++a)i[a]=s[a];return i};er.verify=function(r){r=r||{};var e=_o(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=_o({message:r.signature,encoding:"binary"});if(t.length!==er.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+er.constants.SIGN_BYTE_LENGTH);var n=_o({message:r.publicKey,encoding:"binary"});if(n.length!==er.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+er.constants.PUBLIC_KEY_BYTE_LENGTH);var s=new Bs(er.constants.SIGN_BYTE_LENGTH+e.length),i=new Bs(er.constants.SIGN_BYTE_LENGTH+e.length),a;for(a=0;a<er.constants.SIGN_BYTE_LENGTH;++a)s[a]=t[a];for(a=0;a<e.length;++a)s[a+er.constants.SIGN_BYTE_LENGTH]=e[a];return JQ(i,s,s.length,n)>=0};function _o(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 BN(e,t)}else if(!(e instanceof BN))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(_o,"messageToNativeBuffer");var RN=It(),Uw=It([1]),$Q=It([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),GQ=It([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),Ck=It([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),Nk=It([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),_N=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]),XQ=It([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function sg(r,e){var t=Gn.md.sha512.create(),n=new BN(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(er.constants.HASH_BYTE_LENGTH),a=0;a<64;++a)i[a]=s.charCodeAt(a);return i}o(sg,"sha512");function WQ(r,e){var t=[It(),It(),It(),It()],n,s=sg(e,32);for(s[0]&=248,s[31]&=127,s[31]|=64,LN(t,s),kN(r,t),n=0;n<32;++n)e[n+32]=r[n];return 0}o(WQ,"crypto_sign_keypair");function zQ(r,e,t,n){var s,i,a=new Float64Array(64),u=[It(),It(),It(),It()],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(ON(h),LN(u,h),kN(r,u),s=32;s<64;++s)r[s]=n[s];var m=sg(r,t+64);for(ON(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 Dk(r.subarray(32),a),f}o(zQ,"crypto_sign");function JQ(r,e,t,n){var s,i,a=new Bs(32),u=[It(),It(),It(),It()],c=[It(),It(),It(),It()];if(i=-1,t<64||YQ(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(ON(f),Ok(u,c,f),LN(c,e.subarray(32)),PN(u,c),kN(a,u),t-=64,Bk(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(JQ,"crypto_sign_open");function Dk(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]*_N[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)*_N[s],t=e[s]>>8,e[s]&=255;for(s=0;s<32;++s)e[s]-=t*_N[s];for(n=0;n<32;++n)e[n+1]+=e[n]>>8,r[n]=e[n]&255}o(Dk,"modL");function ON(r){for(var e=new Float64Array(64),t=0;t<64;++t)e[t]=r[t],r[t]=0;Dk(r,e)}o(ON,"reduce");function PN(r,e){var t=It(),n=It(),s=It(),i=It(),a=It(),u=It(),c=It(),f=It(),h=It();gp(t,r[1],r[0]),gp(h,e[1],e[0]),_r(t,t,h),mp(n,r[0],r[1]),mp(h,e[0],e[1]),_r(n,n,h),_r(s,r[3],e[3]),_r(s,s,GQ),_r(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),_r(r[0],a,u),_r(r[1],f,c),_r(r[2],c,u),_r(r[3],a,f)}o(PN,"add");function Tk(r,e,t){for(var n=0;n<4;++n)Pk(r[n],e[n],t)}o(Tk,"cswap");function kN(r,e){var t=It(),n=It(),s=It();tZ(s,e[2]),_r(t,e[0],s),_r(n,e[1],s),jw(r,n),r[31]^=Rk(t)<<7}o(kN,"pack");function jw(r,e){var t,n,s,i=It(),a=It();for(t=0;t<16;++t)a[t]=e[t];for(DN(a),DN(a),DN(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,Pk(a,i,1-s)}for(t=0;t<16;t++)r[2*t]=a[t]&255,r[2*t+1]=a[t]>>8}o(jw,"pack25519");function YQ(r,e){var t=It(),n=It(),s=It(),i=It(),a=It(),u=It(),c=It();return Fu(r[2],Uw),QQ(r[1],e),Ll(s,r[1]),_r(i,s,$Q),gp(s,s,r[2]),mp(i,r[2],i),Ll(a,i),Ll(u,a),_r(c,u,a),_r(t,c,s),_r(t,t,i),ZQ(t,t),_r(t,t,s),_r(t,t,i),_r(t,t,i),_r(r[0],t,i),Ll(n,r[0]),_r(n,n,i),Ik(n,s)&&_r(r[0],r[0],XQ),Ll(n,r[0]),_r(n,n,i),Ik(n,s)?-1:(Rk(r[0])===e[31]>>7&&gp(r[0],RN,r[0]),_r(r[3],r[0],r[1]),0)}o(YQ,"unpackneg");function QQ(r,e){var t;for(t=0;t<16;++t)r[t]=e[2*t]+(e[2*t+1]<<8);r[15]&=32767}o(QQ,"unpack25519");function ZQ(r,e){var t=It(),n;for(n=0;n<16;++n)t[n]=e[n];for(n=250;n>=0;--n)Ll(t,t),n!==1&&_r(t,t,e);for(n=0;n<16;++n)r[n]=t[n]}o(ZQ,"pow2523");function Ik(r,e){var t=new Bs(32),n=new Bs(32);return jw(t,r),jw(n,e),Bk(t,0,n,0)}o(Ik,"neq25519");function Bk(r,e,t,n){return eZ(r,e,t,n,32)}o(Bk,"crypto_verify_32");function eZ(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(eZ,"vn");function Rk(r){var e=new Bs(32);return jw(e,r),e[0]&1}o(Rk,"par25519");function Ok(r,e,t){var n,s;for(Fu(r[0],RN),Fu(r[1],Uw),Fu(r[2],Uw),Fu(r[3],RN),s=255;s>=0;--s)n=t[s/8|0]>>(s&7)&1,Tk(r,e,n),PN(e,r),PN(r,r),Tk(r,e,n)}o(Ok,"scalarmult");function LN(r,e){var t=[It(),It(),It(),It()];Fu(t[0],Ck),Fu(t[1],Nk),Fu(t[2],Uw),_r(t[3],Ck,Nk),Ok(r,t,e)}o(LN,"scalarbase");function Fu(r,e){var t;for(t=0;t<16;t++)r[t]=e[t]|0}o(Fu,"set25519");function tZ(r,e){var t=It(),n;for(n=0;n<16;++n)t[n]=e[n];for(n=253;n>=0;--n)Ll(t,t),n!==2&&n!==4&&_r(t,t,e);for(n=0;n<16;++n)r[n]=t[n]}o(tZ,"inv25519");function DN(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(DN,"car25519");function Pk(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(Pk,"sel25519");function It(r){var e,t=new Float64Array(16);if(r)for(e=0;e<r.length;++e)t[e]=r[e];return t}o(It,"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){_r(r,e,e)}o(Ll,"S");function _r(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,S=0,E=0,C=0,_=0,b=0,A=0,T=0,R=0,H=0,I=0,$=0,K=0,F=0,z=0,he=0,pe=0,oe=0,Q=0,xe=0,Me=0,Qe=0,de=t[0],fe=t[1],Re=t[2],$e=t[3],Ge=t[4],ft=t[5],N=t[6],w=t[7],X=t[8],P=t[9],be=t[10],Ee=t[11],Se=t[12],ze=t[13],Ct=t[14],Ue=t[15];n=e[0],i+=n*de,a+=n*fe,u+=n*Re,c+=n*$e,f+=n*Ge,h+=n*ft,m+=n*N,g+=n*w,x+=n*X,v+=n*P,S+=n*be,E+=n*Ee,C+=n*Se,_+=n*ze,b+=n*Ct,A+=n*Ue,n=e[1],a+=n*de,u+=n*fe,c+=n*Re,f+=n*$e,h+=n*Ge,m+=n*ft,g+=n*N,x+=n*w,v+=n*X,S+=n*P,E+=n*be,C+=n*Ee,_+=n*Se,b+=n*ze,A+=n*Ct,T+=n*Ue,n=e[2],u+=n*de,c+=n*fe,f+=n*Re,h+=n*$e,m+=n*Ge,g+=n*ft,x+=n*N,v+=n*w,S+=n*X,E+=n*P,C+=n*be,_+=n*Ee,b+=n*Se,A+=n*ze,T+=n*Ct,R+=n*Ue,n=e[3],c+=n*de,f+=n*fe,h+=n*Re,m+=n*$e,g+=n*Ge,x+=n*ft,v+=n*N,S+=n*w,E+=n*X,C+=n*P,_+=n*be,b+=n*Ee,A+=n*Se,T+=n*ze,R+=n*Ct,H+=n*Ue,n=e[4],f+=n*de,h+=n*fe,m+=n*Re,g+=n*$e,x+=n*Ge,v+=n*ft,S+=n*N,E+=n*w,C+=n*X,_+=n*P,b+=n*be,A+=n*Ee,T+=n*Se,R+=n*ze,H+=n*Ct,I+=n*Ue,n=e[5],h+=n*de,m+=n*fe,g+=n*Re,x+=n*$e,v+=n*Ge,S+=n*ft,E+=n*N,C+=n*w,_+=n*X,b+=n*P,A+=n*be,T+=n*Ee,R+=n*Se,H+=n*ze,I+=n*Ct,$+=n*Ue,n=e[6],m+=n*de,g+=n*fe,x+=n*Re,v+=n*$e,S+=n*Ge,E+=n*ft,C+=n*N,_+=n*w,b+=n*X,A+=n*P,T+=n*be,R+=n*Ee,H+=n*Se,I+=n*ze,$+=n*Ct,K+=n*Ue,n=e[7],g+=n*de,x+=n*fe,v+=n*Re,S+=n*$e,E+=n*Ge,C+=n*ft,_+=n*N,b+=n*w,A+=n*X,T+=n*P,R+=n*be,H+=n*Ee,I+=n*Se,$+=n*ze,K+=n*Ct,F+=n*Ue,n=e[8],x+=n*de,v+=n*fe,S+=n*Re,E+=n*$e,C+=n*Ge,_+=n*ft,b+=n*N,A+=n*w,T+=n*X,R+=n*P,H+=n*be,I+=n*Ee,$+=n*Se,K+=n*ze,F+=n*Ct,z+=n*Ue,n=e[9],v+=n*de,S+=n*fe,E+=n*Re,C+=n*$e,_+=n*Ge,b+=n*ft,A+=n*N,T+=n*w,R+=n*X,H+=n*P,I+=n*be,$+=n*Ee,K+=n*Se,F+=n*ze,z+=n*Ct,he+=n*Ue,n=e[10],S+=n*de,E+=n*fe,C+=n*Re,_+=n*$e,b+=n*Ge,A+=n*ft,T+=n*N,R+=n*w,H+=n*X,I+=n*P,$+=n*be,K+=n*Ee,F+=n*Se,z+=n*ze,he+=n*Ct,pe+=n*Ue,n=e[11],E+=n*de,C+=n*fe,_+=n*Re,b+=n*$e,A+=n*Ge,T+=n*ft,R+=n*N,H+=n*w,I+=n*X,$+=n*P,K+=n*be,F+=n*Ee,z+=n*Se,he+=n*ze,pe+=n*Ct,oe+=n*Ue,n=e[12],C+=n*de,_+=n*fe,b+=n*Re,A+=n*$e,T+=n*Ge,R+=n*ft,H+=n*N,I+=n*w,$+=n*X,K+=n*P,F+=n*be,z+=n*Ee,he+=n*Se,pe+=n*ze,oe+=n*Ct,Q+=n*Ue,n=e[13],_+=n*de,b+=n*fe,A+=n*Re,T+=n*$e,R+=n*Ge,H+=n*ft,I+=n*N,$+=n*w,K+=n*X,F+=n*P,z+=n*be,he+=n*Ee,pe+=n*Se,oe+=n*ze,Q+=n*Ct,xe+=n*Ue,n=e[14],b+=n*de,A+=n*fe,T+=n*Re,R+=n*$e,H+=n*Ge,I+=n*ft,$+=n*N,K+=n*w,F+=n*X,z+=n*P,he+=n*be,pe+=n*Ee,oe+=n*Se,Q+=n*ze,xe+=n*Ct,Me+=n*Ue,n=e[15],A+=n*de,T+=n*fe,R+=n*Re,H+=n*$e,I+=n*Ge,$+=n*ft,K+=n*N,F+=n*w,z+=n*X,he+=n*P,pe+=n*be,oe+=n*Ee,Q+=n*Se,xe+=n*ze,Me+=n*Ct,Qe+=n*Ue,i+=38*T,a+=38*R,u+=38*H,c+=38*I,f+=38*$,h+=38*K,m+=38*F,g+=38*z,x+=38*he,v+=38*pe,S+=38*oe,E+=38*Q,C+=38*xe,_+=38*Me,b+=38*Qe,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=S+s+65535,s=Math.floor(n/65536),S=n-s*65536,n=E+s+65535,s=Math.floor(n/65536),E=n-s*65536,n=C+s+65535,s=Math.floor(n/65536),C=n-s*65536,n=_+s+65535,s=Math.floor(n/65536),_=n-s*65536,n=b+s+65535,s=Math.floor(n/65536),b=n-s*65536,n=A+s+65535,s=Math.floor(n/65536),A=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=S+s+65535,s=Math.floor(n/65536),S=n-s*65536,n=E+s+65535,s=Math.floor(n/65536),E=n-s*65536,n=C+s+65535,s=Math.floor(n/65536),C=n-s*65536,n=_+s+65535,s=Math.floor(n/65536),_=n-s*65536,n=b+s+65535,s=Math.floor(n/65536),b=n-s*65536,n=A+s+65535,s=Math.floor(n/65536),A=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]=S,r[11]=E,r[12]=C,r[13]=_,r[14]=b,r[15]=A}o(_r,"M")});var Mk=te((Gde,jk)=>{"use strict";var si=Xt();lr();Ei();Z0();jk.exports=si.kem=si.kem||{};var Vk=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 Vk(si.util.bytesToHex(t.getBytesSync(a)),16).mod(s.n);while(u.compareTo(Vk.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){Uk(this,r,0,e||r.digestLength)};si.kem.kdf2=function(r,e){Uk(this,r,1,e||r.digestLength)};function Uk(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(Uk,"_createKDF")});var Kk=te((Wde,Hk)=>{"use strict";var sr=Xt();lr();Hk.exports=sr.log=sr.log||{};sr.log.levels=["none","error","warning","info","debug","verbose","max"];var Mw={},jN=[],ag=null;sr.log.LEVEL_LOCKED=2;sr.log.NO_LEVEL_CHECK=4;sr.log.INTERPOLATE=8;for(Va=0;Va<sr.log.levels.length;++Va)VN=sr.log.levels[Va],Mw[VN]={index:Va,name:VN.toUpperCase()};var VN,Va;sr.log.logMessage=function(r){for(var e=Mw[r.level].index,t=0;t<jN.length;++t){var n=jN[t];if(n.flags&sr.log.NO_LEVEL_CHECK)n.f(r);else{var s=Mw[n.level].index;e<=s&&n.f(n,r)}}};sr.log.prepareStandard=function(r){"standard"in r||(r.standard=Mw[r.level].name+" ["+r.category+"] "+r.message)};sr.log.prepareFull=function(r){if(!("full"in r)){var e=[r.message];e=e.concat([]),r.full=sr.util.format.apply(this,e)}};sr.log.prepareStandardFull=function(r){"standardFull"in r||(sr.log.prepareStandard(r),r.standardFull=r.standard)};for(UN=["error","warning","info","debug","verbose"],Va=0;Va<UN.length;++Va)(function(e){sr.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};sr.log.logMessage(i)}})(UN[Va]);var UN,Va;sr.log.makeLogger=function(r){var e={flags:0,f:r};return sr.log.setLevel(e,"none"),e};sr.log.setLevel=function(r,e){var t=!1;if(r&&!(r.flags&sr.log.LEVEL_LOCKED))for(var n=0;n<sr.log.levels.length;++n){var s=sr.log.levels[n];if(e==s){r.level=e,t=!0;break}}return t};sr.log.lock=function(r,e){typeof e>"u"||e?r.flags|=sr.log.LEVEL_LOCKED:r.flags&=~sr.log.LEVEL_LOCKED};sr.log.addLogger=function(r){jN.push(r)};typeof console<"u"&&"log"in console?(console.error&&console.warn&&console.info&&console.debug?(Fk={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},og=o(function(r,e){sr.log.prepareStandard(e);var t=Fk[e.level],n=[e.standard];n=n.concat(e.arguments.slice()),t.apply(console,n)},"f"),vp=sr.log.makeLogger(og)):(og=o(function(e,t){sr.log.prepareStandardFull(t),console.log(t.standardFull)},"f"),vp=sr.log.makeLogger(og)),sr.log.setLevel(vp,"debug"),sr.log.addLogger(vp),ag=vp):console={log:o(function(){},"log")};var vp,Fk,og;ag!==null&&typeof window<"u"&&window.location&&(ig=new URL(window.location.href).searchParams,ig.has("console.level")&&sr.log.setLevel(ag,ig.get("console.level").slice(-1)[0]),ig.has("console.lock")&&(qk=ig.get("console.lock").slice(-1)[0],qk=="true"&&sr.log.lock(ag)));var ig,qk;sr.log.consoleLogger=ag});var Gk=te((Jde,$k)=>{"use strict";$k.exports=_a();xw();lp();QC();TN()});var zk=te((Yde,Wk)=>{"use strict";var Ye=Xt();Ou();ea();Y0();Pu();_l();hN();Ei();lr();Ow();var re=Ye.asn1,ws=Wk.exports=Ye.pkcs7=Ye.pkcs7||{};ws.messageFromPem=function(r){var e=Ye.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=re.fromDer(e.body);return ws.messageFromAsn1(n)};ws.messageToPem=function(r,e){var t={type:"PKCS7",body:re.toDer(r.toAsn1()).getBytes()};return Ye.pem.encode(t,{maxline:e})};ws.messageFromAsn1=function(r){var e={},t=[];if(!re.validate(r,ws.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=re.derToOid(e.contentType),i;switch(s){case Ye.pki.oids.envelopedData:i=ws.createEnvelopedData();break;case Ye.pki.oids.encryptedData:i=ws.createEncryptedData();break;case Ye.pki.oids.signedData:i=ws.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};ws.createSignedData=function(){var r=null;return r={type:Ye.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:o(function(n){if(FN(r,n,ws.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(Ye.pki.certificateFromAsn1(s[i]))},"fromAsn1"),toAsn1:o(function(){r.contentInfo||r.sign();for(var n=[],s=0;s<r.certificates.length;++s)n.push(Ye.pki.certificateToAsn1(r.certificates[s]));var i=[],a=re.create(re.Class.CONTEXT_SPECIFIC,0,!0,[re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.INTEGER,!1,re.integerToDer(r.version).getBytes()),re.create(re.Class.UNIVERSAL,re.Type.SET,!0,r.digestAlgorithmIdentifiers),r.contentInfo])]);return n.length>0&&a.value[0].value.push(re.create(re.Class.CONTEXT_SPECIFIC,0,!0,n)),i.length>0&&a.value[0].value.push(re.create(re.Class.CONTEXT_SPECIFIC,1,!0,i)),a.value[0].value.push(re.create(re.Class.UNIVERSAL,re.Type.SET,!0,r.signerInfos)),re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.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=Ye.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=Ye.pki.privateKeyFromPem(u));var c=n.digestAlgorithm||Ye.pki.oids.sha1;switch(c){case Ye.pki.oids.sha1:case Ye.pki.oids.sha256:case Ye.pki.oids.sha384:case Ye.pki.oids.sha512:case Ye.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===Ye.pki.oids.contentType){if(h=!0,m)break;continue}if(!m&&x.type===Ye.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:Ye.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=re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(Ye.pki.oids.data).getBytes())]),"content"in r)){var s;r.content instanceof Ye.util.ByteBuffer?s=r.content.bytes():typeof r.content=="string"&&(s=Ye.util.encodeUtf8(r.content)),n.detached?r.detachedContent=re.create(re.Class.UNIVERSAL,re.Type.OCTETSTRING,!1,s):r.contentInfo.value.push(re.create(re.Class.CONTEXT_SPECIFIC,0,!0,[re.create(re.Class.UNIVERSAL,re.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=Ye.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]=Ye.md[Ye.pki.oids[a]].create()),i.authenticatedAttributes.length===0?i.md=n[a]:i.md=Ye.md[Ye.pki.oids[a]].create()}r.digestAlgorithmIdentifiers=[];for(var a in n)r.digestAlgorithmIdentifiers.push(re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(a).getBytes()),re.create(re.Class.UNIVERSAL,re.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=re.derToOid(r.contentInfo.value[0].value),a=re.toDer(s);a.getByte(),re.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!==Ye.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=re.create(re.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var m=re.create(re.Class.UNIVERSAL,re.Type.SET,!0,[]),g=0;g<h.authenticatedAttributes.length;++g){var x=h.authenticatedAttributes[g];x.type===Ye.pki.oids.messageDigest?x.value=n[h.digestAlgorithm].digest():x.type===Ye.pki.oids.signingTime&&(x.value||(x.value=c)),m.value.push(MN(x)),h.authenticatedAttributesAsn1.value.push(MN(x))}a=re.toDer(m).getBytes(),h.md.start().update(a)}h.signature=h.key.sign(h.md,"RSASSA-PKCS1-V1_5")}r.signerInfos=oZ(r.signers)}o(t,"addSignerInfos")};ws.createEncryptedData=function(){var r=null;return r={type:Ye.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:Ye.pki.oids["aes256-CBC"]},fromAsn1:o(function(e){FN(r,e,ws.asn1.encryptedDataValidator)},"fromAsn1"),decrypt:o(function(e){e!==void 0&&(r.encryptedContent.key=e),Xk(r)},"decrypt")},r};ws.createEnvelopedData=function(){var r=null;return r={type:Ye.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:Ye.pki.oids["aes256-CBC"]},fromAsn1:o(function(e){var t=FN(r,e,ws.asn1.envelopedDataValidator);r.recipients=sZ(t.recipientInfos.value)},"fromAsn1"),toAsn1:o(function(){return re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(r.type).getBytes()),re.create(re.Class.CONTEXT_SPECIFIC,0,!0,[re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.INTEGER,!1,re.integerToDer(r.version).getBytes()),re.create(re.Class.UNIVERSAL,re.Type.SET,!0,iZ(r.recipients)),re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,uZ(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 Ye.pki.oids.rsaEncryption:case Ye.pki.oids.desCBC:var n=t.decrypt(e.encryptedContent.content);r.encryptedContent.key=Ye.util.createBuffer(n);break;default:throw new Error("Unsupported asymmetric cipher, OID "+e.encryptedContent.algorithm)}Xk(r)},"decrypt"),addRecipient:o(function(e){r.recipients.push({version:0,issuer:e.issuer.attributes,serialNumber:e.serialNumber,encryptedContent:{algorithm:Ye.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 Ye.pki.oids["aes128-CBC"]:n=16,s=16,i=Ye.aes.createEncryptionCipher;break;case Ye.pki.oids["aes192-CBC"]:n=24,s=16,i=Ye.aes.createEncryptionCipher;break;case Ye.pki.oids["aes256-CBC"]:n=32,s=16,i=Ye.aes.createEncryptionCipher;break;case Ye.pki.oids["des-EDE3-CBC"]:n=24,s=8,i=Ye.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+t)}if(e===void 0)e=Ye.util.createBuffer(Ye.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=Ye.util.createBuffer(Ye.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 Ye.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 rZ(r){var e={},t=[];if(!re.validate(r,ws.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:Ye.pki.RDNAttributesAsArray(e.issuer),serialNumber:Ye.util.createBuffer(e.serial).toHex(),encryptedContent:{algorithm:re.derToOid(e.encAlgorithm),parameter:e.encParameter?e.encParameter.value:void 0,content:e.encKey}}}o(rZ,"_recipientFromAsn1");function nZ(r){return re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.INTEGER,!1,re.integerToDer(r.version).getBytes()),re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[Ye.pki.distinguishedNameToAsn1({attributes:r.issuer}),re.create(re.Class.UNIVERSAL,re.Type.INTEGER,!1,Ye.util.hexToBytes(r.serialNumber))]),re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(r.encryptedContent.algorithm).getBytes()),re.create(re.Class.UNIVERSAL,re.Type.NULL,!1,"")]),re.create(re.Class.UNIVERSAL,re.Type.OCTETSTRING,!1,r.encryptedContent.content)])}o(nZ,"_recipientToAsn1");function sZ(r){for(var e=[],t=0;t<r.length;++t)e.push(rZ(r[t]));return e}o(sZ,"_recipientsFromAsn1");function iZ(r){for(var e=[],t=0;t<r.length;++t)e.push(nZ(r[t]));return e}o(iZ,"_recipientsToAsn1");function aZ(r){var e=re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.INTEGER,!1,re.integerToDer(r.version).getBytes()),re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[Ye.pki.distinguishedNameToAsn1({attributes:r.issuer}),re.create(re.Class.UNIVERSAL,re.Type.INTEGER,!1,Ye.util.hexToBytes(r.serialNumber))]),re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(r.digestAlgorithm).getBytes()),re.create(re.Class.UNIVERSAL,re.Type.NULL,!1,"")])]);if(r.authenticatedAttributesAsn1&&e.value.push(r.authenticatedAttributesAsn1),e.value.push(re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(r.signatureAlgorithm).getBytes()),re.create(re.Class.UNIVERSAL,re.Type.NULL,!1,"")])),e.value.push(re.create(re.Class.UNIVERSAL,re.Type.OCTETSTRING,!1,r.signature)),r.unauthenticatedAttributes.length>0){for(var t=re.create(re.Class.CONTEXT_SPECIFIC,1,!0,[]),n=0;n<r.unauthenticatedAttributes.length;++n){var s=r.unauthenticatedAttributes[n];t.values.push(MN(s))}e.value.push(t)}return e}o(aZ,"_signerToAsn1");function oZ(r){for(var e=[],t=0;t<r.length;++t)e.push(aZ(r[t]));return e}o(oZ,"_signersToAsn1");function MN(r){var e;if(r.type===Ye.pki.oids.contentType)e=re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(r.value).getBytes());else if(r.type===Ye.pki.oids.messageDigest)e=re.create(re.Class.UNIVERSAL,re.Type.OCTETSTRING,!1,r.value.bytes());else if(r.type===Ye.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=re.utcTimeToDate(s):s=re.generalizedTimeToDate(s):s=new Date(i)}s>=t&&s<n?e=re.create(re.Class.UNIVERSAL,re.Type.UTCTIME,!1,re.dateToUtcTime(s)):e=re.create(re.Class.UNIVERSAL,re.Type.GENERALIZEDTIME,!1,re.dateToGeneralizedTime(s))}return re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(r.type).getBytes()),re.create(re.Class.UNIVERSAL,re.Type.SET,!0,[e])])}o(MN,"_attributeToAsn1");function uZ(r){return[re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(Ye.pki.oids.data).getBytes()),re.create(re.Class.UNIVERSAL,re.Type.SEQUENCE,!0,[re.create(re.Class.UNIVERSAL,re.Type.OID,!1,re.oidToDer(r.algorithm).getBytes()),r.parameter?re.create(re.Class.UNIVERSAL,re.Type.OCTETSTRING,!1,r.parameter.getBytes()):void 0]),re.create(re.Class.CONTEXT_SPECIFIC,0,!0,[re.create(re.Class.UNIVERSAL,re.Type.OCTETSTRING,!1,r.content.getBytes())])]}o(uZ,"_encryptedContentToAsn1");function FN(r,e,t){var n={},s=[];if(!re.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=re.derToOid(n.contentType);if(a!==Ye.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(n.encryptedContent){var u="";if(Ye.util.isArray(n.encryptedContent))for(var c=0;c<n.encryptedContent.length;++c){if(n.encryptedContent[c].type!==re.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:re.derToOid(n.encAlgorithm),parameter:Ye.util.createBuffer(n.encParameter.value),content:Ye.util.createBuffer(u)}}if(n.content){var u="";if(Ye.util.isArray(n.content))for(var c=0;c<n.content.length;++c){if(n.content[c].type!==re.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=Ye.util.createBuffer(u)}return r.version=n.version.charCodeAt(0),r.rawCapture=n,n}o(FN,"_fromAsn1");function Xk(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 Ye.pki.oids["aes128-CBC"]:case Ye.pki.oids["aes192-CBC"]:case Ye.pki.oids["aes256-CBC"]:e=Ye.aes.createDecryptionCipher(r.encryptedContent.key);break;case Ye.pki.oids.desCBC:case Ye.pki.oids["des-EDE3-CBC"]:e=Ye.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(Xk,"_decryptContent")});var Yk=te((Zde,Jk)=>{"use strict";var mn=Xt();Ou();ap();xw();lp();lr();var qw=Jk.exports=mn.ssh=mn.ssh||{};qw.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
16
+ `;i+="Encryption: "+s+`\r
17
+ `,i+="Comment: "+t+`\r
18
+ `;var a=mn.util.createBuffer();yp(a,n),Ua(a,r.e),Ua(a,r.n);var u=mn.util.encode64(a.bytes(),64),c=Math.floor(u.length/66)+1;i+="Public-Lines: "+c+`\r
19
+ `,i+=u;var f=mn.util.createBuffer();Ua(f,r.d),Ua(f,r.p),Ua(f,r.q),Ua(f,r.qInv);var h;if(!e)h=mn.util.encode64(f.bytes(),64);else{var m=f.length()+16-1;m-=m%16;var g=Fw(f.bytes());g.truncate(g.length()-m+f.length()),f.putBuffer(g);var x=mn.util.createBuffer();x.putBuffer(Fw("\0\0\0\0",e)),x.putBuffer(Fw("\0\0\0",e));var v=mn.aes.createEncryptionCipher(x.truncate(8),"CBC");v.start(mn.util.createBuffer().fillWithByte(0,16)),v.update(f.copy()),v.finish();var S=v.output;S.truncate(16),h=mn.util.encode64(S.bytes(),64)}c=Math.floor(h.length/66)+1,i+=`\r
20
+ Private-Lines: `+c+`\r
21
+ `,i+=h;var E=Fw("putty-private-key-file-mac-key",e),C=mn.util.createBuffer();yp(C,n),yp(C,s),yp(C,t),C.putInt32(a.length()),C.putBuffer(a),C.putInt32(f.length()),C.putBuffer(f);var _=mn.hmac.create();return _.start("sha1",E),_.update(C.bytes()),i+=`\r
22
+ Private-MAC: `+_.digest().toHex()+`\r
23
+ `,i};qw.publicKeyToOpenSSH=function(r,e){var t="ssh-rsa";e=e||"";var n=mn.util.createBuffer();return yp(n,t),Ua(n,r.e),Ua(n,r.n),t+" "+mn.util.encode64(n.bytes())+" "+e};qw.privateKeyToOpenSSH=function(r,e){return e?mn.pki.encryptRsaPrivateKey(r,e,{legacy:!0,algorithm:"aes128"}):mn.pki.privateKeyToPem(r)};qw.getPublicKeyFingerprint=function(r,e){e=e||{};var t=e.md||mn.md.md5.create(),n="ssh-rsa",s=mn.util.createBuffer();yp(s,n),Ua(s,r.e),Ua(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 Ua(r,e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var n=mn.util.hexToBytes(t);r.putInt32(n.length),r.putBytes(n)}o(Ua,"_addBigIntegerToBuffer");function yp(r,e){r.putInt32(e.length),r.putString(e)}o(yp,"_addStringToBuffer");function Fw(){for(var r=mn.md.sha1.create(),e=arguments.length,t=0;t<e;++t)r.update(arguments[t]);return r.digest()}o(Fw,"_sha1")});var Zk=te((tme,Qk)=>{"use strict";Qk.exports=Xt();Ou();yk();ea();hw();Y0();Lk();ap();Mk();Kk();Gk();pN();bw();_l();oN();gN();zk();yN();cN();ZC();Dw();Ei();rN();Yk();AN();lr()});var t4=te((ame,e4)=>{"use strict";var xp=1e3,wp=xp*60,Sp=wp*60,Vl=Sp*24,lZ=Vl*7,fZ=Vl*365.25;e4.exports=function(r,e){e=e||{};var t=typeof r;if(t==="string"&&r.length>0)return hZ(r);if(t==="number"&&isFinite(r))return e.long?dZ(r):pZ(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function hZ(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*fZ;case"weeks":case"week":case"w":return t*lZ;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(hZ,"parse");function pZ(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(pZ,"fmtShort");function dZ(r){var e=Math.abs(r);return e>=Vl?Hw(r,e,Vl,"day"):e>=Sp?Hw(r,e,Sp,"hour"):e>=wp?Hw(r,e,wp,"minute"):e>=xp?Hw(r,e,xp,"second"):r+" ms"}o(dZ,"fmtLong");function Hw(r,e,t,n){var s=e>=t*1.5;return Math.round(r/t)+" "+n+(s?"s":"")}o(Hw,"plural")});var qN=te((ume,r4)=>{"use strict";function mZ(r){t.debug=t,t.default=t,t.coerce=c,t.disable=a,t.enable=s,t.enabled=u,t.humanize=t4(),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 S(...E){if(!S.enabled)return;let C=S,_=Number(new Date),b=_-(m||_);C.diff=b,C.prev=m,C.curr=_,m=_,E[0]=t.coerce(E[0]),typeof E[0]!="string"&&E.unshift("%O");let A=0;E[0]=E[0].replace(/%([a-zA-Z%])/g,(R,H)=>{if(R==="%%")return"%";A++;let I=t.formatters[H];if(typeof I=="function"){let $=E[A];R=I.call(C,$),E.splice(A,1),A--}return R}),t.formatArgs.call(C,E),(C.log||t.log).apply(C,E)}return o(S,"debug"),S.namespace=h,S.useColors=t.useColors(),S.color=t.selectColor(h),S.extend=n,S.destroy=t.destroy,Object.defineProperty(S,"enabled",{enumerable:!0,configurable:!1,get:o(()=>g!==null?g:(x!==t.namespaces&&(x=t.namespaces,v=t.enabled(h)),v),"get"),set:o(E=>{g=E},"set")}),typeof t.init=="function"&&t.init(S),S}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,S=0;for(;g<h.length;)if(x<m.length&&(m[x]===h[g]||m[x]==="*"))m[x]==="*"?(v=x,S=g,x++):(g++,x++);else if(v!==-1)x=v+1,S++,g=S;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(mZ,"setup");r4.exports=mZ});var n4=te((Rs,Kw)=>{"use strict";Rs.formatArgs=vZ;Rs.save=yZ;Rs.load=xZ;Rs.useColors=gZ;Rs.storage=wZ();Rs.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`."))}})();Rs.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 gZ(){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(gZ,"useColors");function vZ(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+Kw.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(vZ,"formatArgs");Rs.log=console.debug||console.log||(()=>{});function yZ(r){try{r?Rs.storage.setItem("debug",r):Rs.storage.removeItem("debug")}catch{}}o(yZ,"save");function xZ(){let r;try{r=Rs.storage.getItem("debug")||Rs.storage.getItem("DEBUG")}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=process.env.DEBUG),r}o(xZ,"load");function wZ(){try{return localStorage}catch{}}o(wZ,"localstorage");Kw.exports=qN()(Rs);var{formatters:SZ}=Kw.exports;SZ.j=function(r){try{return JSON.stringify(r)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var i4=te((fme,s4)=>{"use strict";s4.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 u4=te((hme,o4)=>{"use strict";var EZ=We("os"),a4=We("tty"),Ii=i4(),{env:On}=process,Hu;Ii("no-color")||Ii("no-colors")||Ii("color=false")||Ii("color=never")?Hu=0:(Ii("color")||Ii("colors")||Ii("color=true")||Ii("color=always"))&&(Hu=1);"FORCE_COLOR"in On&&(On.FORCE_COLOR==="true"?Hu=1:On.FORCE_COLOR==="false"?Hu=0:Hu=On.FORCE_COLOR.length===0?1:Math.min(parseInt(On.FORCE_COLOR,10),3));function HN(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}o(HN,"translateLevel");function KN(r,e){if(Hu===0)return 0;if(Ii("color=16m")||Ii("color=full")||Ii("color=truecolor"))return 3;if(Ii("color=256"))return 2;if(r&&!e&&Hu===void 0)return 0;let t=Hu||0;if(On.TERM==="dumb")return t;if(process.platform==="win32"){let n=EZ.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in On)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in On)||On.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in On)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(On.TEAMCITY_VERSION)?1:0;if(On.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in On){let n=parseInt((On.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(On.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(On.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(On.TERM)||"COLORTERM"in On?1:t}o(KN,"supportsColor");function bZ(r){let e=KN(r,r&&r.isTTY);return HN(e)}o(bZ,"getSupportLevel");o4.exports={supportsColor:bZ,stdout:HN(KN(!0,a4.isatty(1))),stderr:HN(KN(!0,a4.isatty(2)))}});var l4=te((Pn,Gw)=>{"use strict";var AZ=We("tty"),$w=We("util");Pn.init=BZ;Pn.log=IZ;Pn.formatArgs=NZ;Pn.save=_Z;Pn.load=DZ;Pn.useColors=CZ;Pn.destroy=$w.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Pn.colors=[6,2,3,4,5,1];try{let r=u4();r&&(r.stderr||r).level>=2&&(Pn.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{}Pn.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 CZ(){return"colors"in Pn.inspectOpts?!!Pn.inspectOpts.colors:AZ.isatty(process.stderr.fd)}o(CZ,"useColors");function NZ(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(`
24
+ `).join(`
25
+ `+i),r.push(s+"m+"+Gw.exports.humanize(this.diff)+"\x1B[0m")}else r[0]=TZ()+e+" "+r[0]}o(NZ,"formatArgs");function TZ(){return Pn.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(TZ,"getDate");function IZ(...r){return process.stderr.write($w.formatWithOptions(Pn.inspectOpts,...r)+`
26
+ `)}o(IZ,"log");function _Z(r){r?process.env.DEBUG=r:delete process.env.DEBUG}o(_Z,"save");function DZ(){return process.env.DEBUG}o(DZ,"load");function BZ(r){r.inspectOpts={};let e=Object.keys(Pn.inspectOpts);for(let t=0;t<e.length;t++)r.inspectOpts[e[t]]=Pn.inspectOpts[e[t]]}o(BZ,"init");Gw.exports=qN()(Pn);var{formatters:c4}=Gw.exports;c4.o=function(r){return this.inspectOpts.colors=this.useColors,$w.inspect(r,this.inspectOpts).split(`
27
+ `).map(e=>e.trim()).join(" ")};c4.O=function(r){return this.inspectOpts.colors=this.useColors,$w.inspect(r,this.inspectOpts)}});var Ep=te((mme,$N)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?$N.exports=n4():$N.exports=l4()});var h4=te((gme,f4)=>{"use strict";var{PassThrough:RZ}=We("stream");f4.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 RZ({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 d4=te((yme,ug)=>{"use strict";var{constants:OZ}=We("buffer"),PZ=We("stream"),{promisify:kZ}=We("util"),LZ=h4(),VZ=kZ(PZ.pipeline),p4=class extends Error{static{o(this,"MaxBufferError")}constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function GN(r,e){if(!r)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};let{maxBuffer:t}=e,n=LZ(e);return await new Promise((s,i)=>{let a=o(u=>{u&&n.getBufferedLength()<=OZ.MAX_LENGTH&&(u.bufferedData=n.getBufferedValue()),i(u)},"rejectPromise");(async()=>{try{await VZ(r,n),s()}catch(u){a(u)}})(),n.on("data",()=>{n.getBufferedLength()>t&&a(new p4)})}),n.getBufferedValue()}o(GN,"getStream");ug.exports=GN;ug.exports.buffer=(r,e)=>GN(r,{...e,encoding:"buffer"});ug.exports.array=(r,e)=>GN(r,{...e,array:!0});ug.exports.MaxBufferError=p4});var Do=te((bp,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,S=2,E=4,C=8,_=16,b=32,A=64,T=128,R=256,H=512,I=30,$="...",K=800,F=16,z=1,he=2,pe=3,oe=1/0,Q=9007199254740991,xe=17976931348623157e292,Me=NaN,Qe=4294967295,de=Qe-1,fe=Qe>>>1,Re=[["ary",T],["bind",v],["bindKey",S],["curry",C],["curryRight",_],["flip",H],["partial",b],["partialRight",A],["rearg",R]],$e="[object Arguments]",Ge="[object Array]",ft="[object AsyncFunction]",N="[object Boolean]",w="[object Date]",X="[object DOMException]",P="[object Error]",be="[object Function]",Ee="[object GeneratorFunction]",Se="[object Map]",ze="[object Number]",Ct="[object Null]",Ue="[object Object]",wt="[object Promise]",Gr="[object Proxy]",Je="[object RegExp]",Nr="[object Set]",qr="[object String]",wn="[object Symbol]",As="[object Undefined]",hs="[object WeakMap]",dt="[object WeakSet]",tt="[object ArrayBuffer]",Mn="[object DataView]",ps="[object Float32Array]",Sa="[object Float64Array]",Ea="[object Int8Array]",Pt="[object Int16Array]",Uh="[object Int32Array]",jh="[object Uint8Array]",yl="[object Uint8ClampedArray]",T0="[object Uint16Array]",Ws="[object Uint32Array]",d=/\b__p \+= '';/g,B=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ne=/&(?:amp|lt|gt|quot|#39);/g,ae=/[&<>"']/g,W=RegExp(ne.source),it=RegExp(ae.source),Vt=/<%-([\s\S]+?)%>/g,Jt=/<%([\s\S]+?)%>/g,rt=/<%=([\s\S]+?)%>/g,Rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fn=/^\w*$/,pi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cr=/[\\^$.*+?()[\]{}|]/g,ba=RegExp(cr.source),I0=/^\s+/,lx=/\s/,d2=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,m2=/\{\n\/\* \[wrapped with (.+)\] \*/,g2=/,? & /,v2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,He=/[()=,{}\[\]\/\s]/,rr=/\\(\\)?/g,ts=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Xi=/\w*$/,y2=/^[-+]0x[0-9a-f]+$/i,xq=/^0b[01]+$/i,wq=/^\[object .+?Constructor\]$/,Sq=/^0o[0-7]+$/i,Eq=/^(?:0|[1-9]\d*)$/,bq=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,fx=/($^)/,Aq=/['\n\r\u2028\u2029\\]/g,hx="\\ud800-\\udfff",Cq="\\u0300-\\u036f",Nq="\\ufe20-\\ufe2f",Tq="\\u20d0-\\u20ff",$B=Cq+Nq+Tq,GB="\\u2700-\\u27bf",XB="a-z\\xdf-\\xf6\\xf8-\\xff",Iq="\\xac\\xb1\\xd7\\xf7",_q="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Dq="\\u2000-\\u206f",Bq=" \\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",WB="A-Z\\xc0-\\xd6\\xd8-\\xde",zB="\\ufe0e\\ufe0f",JB=Iq+_q+Dq+Bq,x2="['\u2019]",Rq="["+hx+"]",YB="["+JB+"]",px="["+$B+"]",QB="\\d+",Oq="["+GB+"]",ZB="["+XB+"]",eR="[^"+hx+JB+QB+GB+XB+WB+"]",w2="\\ud83c[\\udffb-\\udfff]",Pq="(?:"+px+"|"+w2+")",tR="[^"+hx+"]",S2="(?:\\ud83c[\\udde6-\\uddff]){2}",E2="[\\ud800-\\udbff][\\udc00-\\udfff]",Mh="["+WB+"]",rR="\\u200d",nR="(?:"+ZB+"|"+eR+")",kq="(?:"+Mh+"|"+eR+")",sR="(?:"+x2+"(?:d|ll|m|re|s|t|ve))?",iR="(?:"+x2+"(?:D|LL|M|RE|S|T|VE))?",aR=Pq+"?",oR="["+zB+"]?",Lq="(?:"+rR+"(?:"+[tR,S2,E2].join("|")+")"+oR+aR+")*",Vq="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Uq="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",uR=oR+aR+Lq,jq="(?:"+[Oq,S2,E2].join("|")+")"+uR,Mq="(?:"+[tR+px+"?",px,S2,E2,Rq].join("|")+")",Fq=RegExp(x2,"g"),qq=RegExp(px,"g"),b2=RegExp(w2+"(?="+w2+")|"+Mq+uR,"g"),Hq=RegExp([Mh+"?"+ZB+"+"+sR+"(?="+[YB,Mh,"$"].join("|")+")",kq+"+"+iR+"(?="+[YB,Mh+nR,"$"].join("|")+")",Mh+"?"+nR+"+"+sR,Mh+"+"+iR,Uq,Vq,QB,jq].join("|"),"g"),Kq=RegExp("["+rR+hx+$B+zB+"]"),$q=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Gq=["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"],Xq=-1,jr={};jr[ps]=jr[Sa]=jr[Ea]=jr[Pt]=jr[Uh]=jr[jh]=jr[yl]=jr[T0]=jr[Ws]=!0,jr[$e]=jr[Ge]=jr[tt]=jr[N]=jr[Mn]=jr[w]=jr[P]=jr[be]=jr[Se]=jr[ze]=jr[Ue]=jr[Je]=jr[Nr]=jr[qr]=jr[hs]=!1;var Br={};Br[$e]=Br[Ge]=Br[tt]=Br[Mn]=Br[N]=Br[w]=Br[ps]=Br[Sa]=Br[Ea]=Br[Pt]=Br[Uh]=Br[Se]=Br[ze]=Br[Ue]=Br[Je]=Br[Nr]=Br[qr]=Br[wn]=Br[jh]=Br[yl]=Br[T0]=Br[Ws]=!0,Br[P]=Br[be]=Br[hs]=!1;var Wq={\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"},zq={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Jq={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Yq={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Qq=parseFloat,Zq=parseInt,cR=typeof global=="object"&&global&&global.Object===Object&&global,e7=typeof self=="object"&&self&&self.Object===Object&&self,Tn=cR||e7||Function("return this")(),A2=typeof bp=="object"&&bp&&!bp.nodeType&&bp,xl=A2&&typeof cg=="object"&&cg&&!cg.nodeType&&cg,lR=xl&&xl.exports===A2,C2=lR&&cR.process,di=(function(){try{var ie=xl&&xl.require&&xl.require("util").types;return ie||C2&&C2.binding&&C2.binding("util")}catch{}})(),fR=di&&di.isArrayBuffer,hR=di&&di.isDate,pR=di&&di.isMap,dR=di&&di.isRegExp,mR=di&&di.isSet,gR=di&&di.isTypedArray;function zs(ie,Ne,we){switch(we.length){case 0:return ie.call(Ne);case 1:return ie.call(Ne,we[0]);case 2:return ie.call(Ne,we[0],we[1]);case 3:return ie.call(Ne,we[0],we[1],we[2])}return ie.apply(Ne,we)}o(zs,"apply");function t7(ie,Ne,we,lt){for(var kt=-1,vr=ie==null?0:ie.length;++kt<vr;){var Sn=ie[kt];Ne(lt,Sn,we(Sn),ie)}return lt}o(t7,"arrayAggregator");function mi(ie,Ne){for(var we=-1,lt=ie==null?0:ie.length;++we<lt&&Ne(ie[we],we,ie)!==!1;);return ie}o(mi,"arrayEach");function r7(ie,Ne){for(var we=ie==null?0:ie.length;we--&&Ne(ie[we],we,ie)!==!1;);return ie}o(r7,"arrayEachRight");function vR(ie,Ne){for(var we=-1,lt=ie==null?0:ie.length;++we<lt;)if(!Ne(ie[we],we,ie))return!1;return!0}o(vR,"arrayEvery");function gu(ie,Ne){for(var we=-1,lt=ie==null?0:ie.length,kt=0,vr=[];++we<lt;){var Sn=ie[we];Ne(Sn,we,ie)&&(vr[kt++]=Sn)}return vr}o(gu,"arrayFilter");function dx(ie,Ne){var we=ie==null?0:ie.length;return!!we&&Fh(ie,Ne,0)>-1}o(dx,"arrayIncludes");function N2(ie,Ne,we){for(var lt=-1,kt=ie==null?0:ie.length;++lt<kt;)if(we(Ne,ie[lt]))return!0;return!1}o(N2,"arrayIncludesWith");function Hr(ie,Ne){for(var we=-1,lt=ie==null?0:ie.length,kt=Array(lt);++we<lt;)kt[we]=Ne(ie[we],we,ie);return kt}o(Hr,"arrayMap");function vu(ie,Ne){for(var we=-1,lt=Ne.length,kt=ie.length;++we<lt;)ie[kt+we]=Ne[we];return ie}o(vu,"arrayPush");function T2(ie,Ne,we,lt){var kt=-1,vr=ie==null?0:ie.length;for(lt&&vr&&(we=ie[++kt]);++kt<vr;)we=Ne(we,ie[kt],kt,ie);return we}o(T2,"arrayReduce");function n7(ie,Ne,we,lt){var kt=ie==null?0:ie.length;for(lt&&kt&&(we=ie[--kt]);kt--;)we=Ne(we,ie[kt],kt,ie);return we}o(n7,"arrayReduceRight");function I2(ie,Ne){for(var we=-1,lt=ie==null?0:ie.length;++we<lt;)if(Ne(ie[we],we,ie))return!0;return!1}o(I2,"arraySome");var s7=_2("length");function i7(ie){return ie.split("")}o(i7,"asciiToArray");function a7(ie){return ie.match(v2)||[]}o(a7,"asciiWords");function yR(ie,Ne,we){var lt;return we(ie,function(kt,vr,Sn){if(Ne(kt,vr,Sn))return lt=vr,!1}),lt}o(yR,"baseFindKey");function mx(ie,Ne,we,lt){for(var kt=ie.length,vr=we+(lt?1:-1);lt?vr--:++vr<kt;)if(Ne(ie[vr],vr,ie))return vr;return-1}o(mx,"baseFindIndex");function Fh(ie,Ne,we){return Ne===Ne?y7(ie,Ne,we):mx(ie,xR,we)}o(Fh,"baseIndexOf");function o7(ie,Ne,we,lt){for(var kt=we-1,vr=ie.length;++kt<vr;)if(lt(ie[kt],Ne))return kt;return-1}o(o7,"baseIndexOfWith");function xR(ie){return ie!==ie}o(xR,"baseIsNaN");function wR(ie,Ne){var we=ie==null?0:ie.length;return we?B2(ie,Ne)/we:Me}o(wR,"baseMean");function _2(ie){return function(Ne){return Ne==null?r:Ne[ie]}}o(_2,"baseProperty");function D2(ie){return function(Ne){return ie==null?r:ie[Ne]}}o(D2,"basePropertyOf");function SR(ie,Ne,we,lt,kt){return kt(ie,function(vr,Sn,Tr){we=lt?(lt=!1,vr):Ne(we,vr,Sn,Tr)}),we}o(SR,"baseReduce");function u7(ie,Ne){var we=ie.length;for(ie.sort(Ne);we--;)ie[we]=ie[we].value;return ie}o(u7,"baseSortBy");function B2(ie,Ne){for(var we,lt=-1,kt=ie.length;++lt<kt;){var vr=Ne(ie[lt]);vr!==r&&(we=we===r?vr:we+vr)}return we}o(B2,"baseSum");function R2(ie,Ne){for(var we=-1,lt=Array(ie);++we<ie;)lt[we]=Ne(we);return lt}o(R2,"baseTimes");function c7(ie,Ne){return Hr(Ne,function(we){return[we,ie[we]]})}o(c7,"baseToPairs");function ER(ie){return ie&&ie.slice(0,NR(ie)+1).replace(I0,"")}o(ER,"baseTrim");function Js(ie){return function(Ne){return ie(Ne)}}o(Js,"baseUnary");function O2(ie,Ne){return Hr(Ne,function(we){return ie[we]})}o(O2,"baseValues");function _0(ie,Ne){return ie.has(Ne)}o(_0,"cacheHas");function bR(ie,Ne){for(var we=-1,lt=ie.length;++we<lt&&Fh(Ne,ie[we],0)>-1;);return we}o(bR,"charsStartIndex");function AR(ie,Ne){for(var we=ie.length;we--&&Fh(Ne,ie[we],0)>-1;);return we}o(AR,"charsEndIndex");function l7(ie,Ne){for(var we=ie.length,lt=0;we--;)ie[we]===Ne&&++lt;return lt}o(l7,"countHolders");var f7=D2(Wq),h7=D2(zq);function p7(ie){return"\\"+Yq[ie]}o(p7,"escapeStringChar");function d7(ie,Ne){return ie==null?r:ie[Ne]}o(d7,"getValue");function qh(ie){return Kq.test(ie)}o(qh,"hasUnicode");function m7(ie){return $q.test(ie)}o(m7,"hasUnicodeWord");function g7(ie){for(var Ne,we=[];!(Ne=ie.next()).done;)we.push(Ne.value);return we}o(g7,"iteratorToArray");function P2(ie){var Ne=-1,we=Array(ie.size);return ie.forEach(function(lt,kt){we[++Ne]=[kt,lt]}),we}o(P2,"mapToArray");function CR(ie,Ne){return function(we){return ie(Ne(we))}}o(CR,"overArg");function yu(ie,Ne){for(var we=-1,lt=ie.length,kt=0,vr=[];++we<lt;){var Sn=ie[we];(Sn===Ne||Sn===c)&&(ie[we]=c,vr[kt++]=we)}return vr}o(yu,"replaceHolders");function gx(ie){var Ne=-1,we=Array(ie.size);return ie.forEach(function(lt){we[++Ne]=lt}),we}o(gx,"setToArray");function v7(ie){var Ne=-1,we=Array(ie.size);return ie.forEach(function(lt){we[++Ne]=[lt,lt]}),we}o(v7,"setToPairs");function y7(ie,Ne,we){for(var lt=we-1,kt=ie.length;++lt<kt;)if(ie[lt]===Ne)return lt;return-1}o(y7,"strictIndexOf");function x7(ie,Ne,we){for(var lt=we+1;lt--;)if(ie[lt]===Ne)return lt;return lt}o(x7,"strictLastIndexOf");function Hh(ie){return qh(ie)?S7(ie):s7(ie)}o(Hh,"stringSize");function Wi(ie){return qh(ie)?E7(ie):i7(ie)}o(Wi,"stringToArray");function NR(ie){for(var Ne=ie.length;Ne--&&lx.test(ie.charAt(Ne)););return Ne}o(NR,"trimmedEndIndex");var w7=D2(Jq);function S7(ie){for(var Ne=b2.lastIndex=0;b2.test(ie);)++Ne;return Ne}o(S7,"unicodeSize");function E7(ie){return ie.match(b2)||[]}o(E7,"unicodeToArray");function b7(ie){return ie.match(Hq)||[]}o(b7,"unicodeWords");var A7=o(function ie(Ne){Ne=Ne==null?Tn:xu.defaults(Tn.Object(),Ne,xu.pick(Tn,Gq));var we=Ne.Array,lt=Ne.Date,kt=Ne.Error,vr=Ne.Function,Sn=Ne.Math,Tr=Ne.Object,k2=Ne.RegExp,C7=Ne.String,gi=Ne.TypeError,vx=we.prototype,N7=vr.prototype,Kh=Tr.prototype,yx=Ne["__core-js_shared__"],xx=N7.toString,Sr=Kh.hasOwnProperty,T7=0,TR=(function(){var l=/[^.]+$/.exec(yx&&yx.keys&&yx.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),wx=Kh.toString,I7=xx.call(Tr),_7=Tn._,D7=k2("^"+xx.call(Sr).replace(cr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Sx=lR?Ne.Buffer:r,wu=Ne.Symbol,Ex=Ne.Uint8Array,IR=Sx?Sx.allocUnsafe:r,bx=CR(Tr.getPrototypeOf,Tr),_R=Tr.create,DR=Kh.propertyIsEnumerable,Ax=vx.splice,BR=wu?wu.isConcatSpreadable:r,D0=wu?wu.iterator:r,wl=wu?wu.toStringTag:r,Cx=(function(){try{var l=Cl(Tr,"defineProperty");return l({},"",{}),l}catch{}})(),B7=Ne.clearTimeout!==Tn.clearTimeout&&Ne.clearTimeout,R7=lt&&lt.now!==Tn.Date.now&&lt.now,O7=Ne.setTimeout!==Tn.setTimeout&&Ne.setTimeout,Nx=Sn.ceil,Tx=Sn.floor,L2=Tr.getOwnPropertySymbols,P7=Sx?Sx.isBuffer:r,RR=Ne.isFinite,k7=vx.join,L7=CR(Tr.keys,Tr),En=Sn.max,rs=Sn.min,V7=lt.now,U7=Ne.parseInt,OR=Sn.random,j7=vx.reverse,V2=Cl(Ne,"DataView"),B0=Cl(Ne,"Map"),U2=Cl(Ne,"Promise"),$h=Cl(Ne,"Set"),R0=Cl(Ne,"WeakMap"),O0=Cl(Tr,"create"),Ix=R0&&new R0,Gh={},M7=Nl(V2),F7=Nl(B0),q7=Nl(U2),H7=Nl($h),K7=Nl(R0),_x=wu?wu.prototype:r,P0=_x?_x.valueOf:r,PR=_x?_x.toString:r;function M(l){if(Zr(l)&&!Ut(l)&&!(l instanceof nr)){if(l instanceof vi)return l;if(Sr.call(l,"__wrapped__"))return kO(l)}return new vi(l)}o(M,"lodash");var Xh=(function(){function l(){}return o(l,"object"),function(p){if(!Xr(p))return{};if(_R)return _R(p);l.prototype=p;var y=new l;return l.prototype=r,y}})();function Dx(){}o(Dx,"baseLodash");function vi(l,p){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!p,this.__index__=0,this.__values__=r}o(vi,"LodashWrapper"),M.templateSettings={escape:Vt,evaluate:Jt,interpolate:rt,variable:"",imports:{_:M}},M.prototype=Dx.prototype,M.prototype.constructor=M,vi.prototype=Xh(Dx.prototype),vi.prototype.constructor=vi;function nr(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Qe,this.__views__=[]}o(nr,"LazyWrapper");function $7(){var l=new nr(this.__wrapped__);return l.__actions__=Cs(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=Cs(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=Cs(this.__views__),l}o($7,"lazyClone");function G7(){if(this.__filtered__){var l=new nr(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}o(G7,"lazyReverse");function X7(){var l=this.__wrapped__.value(),p=this.__dir__,y=Ut(l),D=p<0,k=y?l.length:0,q=iK(0,k,this.__views__),Y=q.start,ee=q.end,le=ee-Y,Te=D?ee:Y-1,Be=this.__iteratees__,Ve=Be.length,Ze=0,pt=rs(le,this.__takeCount__);if(!y||!D&&k==le&&pt==le)return sO(l,this.__actions__);var Nt=[];e:for(;le--&&Ze<pt;){Te+=p;for(var Gt=-1,Tt=l[Te];++Gt<Ve;){var Yt=Be[Gt],ir=Yt.iteratee,Zs=Yt.type,gs=ir(Tt);if(Zs==he)Tt=gs;else if(!gs){if(Zs==z)continue e;break e}}Nt[Ze++]=Tt}return Nt}o(X7,"lazyValue"),nr.prototype=Xh(Dx.prototype),nr.prototype.constructor=nr;function Sl(l){var p=-1,y=l==null?0:l.length;for(this.clear();++p<y;){var D=l[p];this.set(D[0],D[1])}}o(Sl,"Hash");function W7(){this.__data__=O0?O0(null):{},this.size=0}o(W7,"hashClear");function z7(l){var p=this.has(l)&&delete this.__data__[l];return this.size-=p?1:0,p}o(z7,"hashDelete");function J7(l){var p=this.__data__;if(O0){var y=p[l];return y===a?r:y}return Sr.call(p,l)?p[l]:r}o(J7,"hashGet");function Y7(l){var p=this.__data__;return O0?p[l]!==r:Sr.call(p,l)}o(Y7,"hashHas");function Q7(l,p){var y=this.__data__;return this.size+=this.has(l)?0:1,y[l]=O0&&p===r?a:p,this}o(Q7,"hashSet"),Sl.prototype.clear=W7,Sl.prototype.delete=z7,Sl.prototype.get=J7,Sl.prototype.has=Y7,Sl.prototype.set=Q7;function go(l){var p=-1,y=l==null?0:l.length;for(this.clear();++p<y;){var D=l[p];this.set(D[0],D[1])}}o(go,"ListCache");function Z7(){this.__data__=[],this.size=0}o(Z7,"listCacheClear");function eH(l){var p=this.__data__,y=Bx(p,l);if(y<0)return!1;var D=p.length-1;return y==D?p.pop():Ax.call(p,y,1),--this.size,!0}o(eH,"listCacheDelete");function tH(l){var p=this.__data__,y=Bx(p,l);return y<0?r:p[y][1]}o(tH,"listCacheGet");function rH(l){return Bx(this.__data__,l)>-1}o(rH,"listCacheHas");function nH(l,p){var y=this.__data__,D=Bx(y,l);return D<0?(++this.size,y.push([l,p])):y[D][1]=p,this}o(nH,"listCacheSet"),go.prototype.clear=Z7,go.prototype.delete=eH,go.prototype.get=tH,go.prototype.has=rH,go.prototype.set=nH;function vo(l){var p=-1,y=l==null?0:l.length;for(this.clear();++p<y;){var D=l[p];this.set(D[0],D[1])}}o(vo,"MapCache");function sH(){this.size=0,this.__data__={hash:new Sl,map:new(B0||go),string:new Sl}}o(sH,"mapCacheClear");function iH(l){var p=Hx(this,l).delete(l);return this.size-=p?1:0,p}o(iH,"mapCacheDelete");function aH(l){return Hx(this,l).get(l)}o(aH,"mapCacheGet");function oH(l){return Hx(this,l).has(l)}o(oH,"mapCacheHas");function uH(l,p){var y=Hx(this,l),D=y.size;return y.set(l,p),this.size+=y.size==D?0:1,this}o(uH,"mapCacheSet"),vo.prototype.clear=sH,vo.prototype.delete=iH,vo.prototype.get=aH,vo.prototype.has=oH,vo.prototype.set=uH;function El(l){var p=-1,y=l==null?0:l.length;for(this.__data__=new vo;++p<y;)this.add(l[p])}o(El,"SetCache");function cH(l){return this.__data__.set(l,a),this}o(cH,"setCacheAdd");function lH(l){return this.__data__.has(l)}o(lH,"setCacheHas"),El.prototype.add=El.prototype.push=cH,El.prototype.has=lH;function zi(l){var p=this.__data__=new go(l);this.size=p.size}o(zi,"Stack");function fH(){this.__data__=new go,this.size=0}o(fH,"stackClear");function hH(l){var p=this.__data__,y=p.delete(l);return this.size=p.size,y}o(hH,"stackDelete");function pH(l){return this.__data__.get(l)}o(pH,"stackGet");function dH(l){return this.__data__.has(l)}o(dH,"stackHas");function mH(l,p){var y=this.__data__;if(y instanceof go){var D=y.__data__;if(!B0||D.length<t-1)return D.push([l,p]),this.size=++y.size,this;y=this.__data__=new vo(D)}return y.set(l,p),this.size=y.size,this}o(mH,"stackSet"),zi.prototype.clear=fH,zi.prototype.delete=hH,zi.prototype.get=pH,zi.prototype.has=dH,zi.prototype.set=mH;function kR(l,p){var y=Ut(l),D=!y&&Tl(l),k=!y&&!D&&Cu(l),q=!y&&!D&&!k&&Yh(l),Y=y||D||k||q,ee=Y?R2(l.length,C7):[],le=ee.length;for(var Te in l)(p||Sr.call(l,Te))&&!(Y&&(Te=="length"||k&&(Te=="offset"||Te=="parent")||q&&(Te=="buffer"||Te=="byteLength"||Te=="byteOffset")||So(Te,le)))&&ee.push(Te);return ee}o(kR,"arrayLikeKeys");function LR(l){var p=l.length;return p?l[z2(0,p-1)]:r}o(LR,"arraySample");function gH(l,p){return Kx(Cs(l),bl(p,0,l.length))}o(gH,"arraySampleSize");function vH(l){return Kx(Cs(l))}o(vH,"arrayShuffle");function j2(l,p,y){(y!==r&&!Ji(l[p],y)||y===r&&!(p in l))&&yo(l,p,y)}o(j2,"assignMergeValue");function k0(l,p,y){var D=l[p];(!(Sr.call(l,p)&&Ji(D,y))||y===r&&!(p in l))&&yo(l,p,y)}o(k0,"assignValue");function Bx(l,p){for(var y=l.length;y--;)if(Ji(l[y][0],p))return y;return-1}o(Bx,"assocIndexOf");function yH(l,p,y,D){return Su(l,function(k,q,Y){p(D,k,y(k),Y)}),D}o(yH,"baseAggregator");function VR(l,p){return l&&Ca(p,In(p),l)}o(VR,"baseAssign");function xH(l,p){return l&&Ca(p,Ts(p),l)}o(xH,"baseAssignIn");function yo(l,p,y){p=="__proto__"&&Cx?Cx(l,p,{configurable:!0,enumerable:!0,value:y,writable:!0}):l[p]=y}o(yo,"baseAssignValue");function M2(l,p){for(var y=-1,D=p.length,k=we(D),q=l==null;++y<D;)k[y]=q?r:wC(l,p[y]);return k}o(M2,"baseAt");function bl(l,p,y){return l===l&&(y!==r&&(l=l<=y?l:y),p!==r&&(l=l>=p?l:p)),l}o(bl,"baseClamp");function yi(l,p,y,D,k,q){var Y,ee=p&f,le=p&h,Te=p&m;if(y&&(Y=k?y(l,D,k,q):y(l)),Y!==r)return Y;if(!Xr(l))return l;var Be=Ut(l);if(Be){if(Y=oK(l),!ee)return Cs(l,Y)}else{var Ve=ns(l),Ze=Ve==be||Ve==Ee;if(Cu(l))return oO(l,ee);if(Ve==Ue||Ve==$e||Ze&&!k){if(Y=le||Ze?{}:NO(l),!ee)return le?JH(l,xH(Y,l)):zH(l,VR(Y,l))}else{if(!Br[Ve])return k?l:{};Y=uK(l,Ve,ee)}}q||(q=new zi);var pt=q.get(l);if(pt)return pt;q.set(l,Y),tP(l)?l.forEach(function(Tt){Y.add(yi(Tt,p,y,Tt,l,q))}):ZO(l)&&l.forEach(function(Tt,Yt){Y.set(Yt,yi(Tt,p,y,Yt,l,q))});var Nt=Te?le?aC:iC:le?Ts:In,Gt=Be?r:Nt(l);return mi(Gt||l,function(Tt,Yt){Gt&&(Yt=Tt,Tt=l[Yt]),k0(Y,Yt,yi(Tt,p,y,Yt,l,q))}),Y}o(yi,"baseClone");function wH(l){var p=In(l);return function(y){return UR(y,l,p)}}o(wH,"baseConforms");function UR(l,p,y){var D=y.length;if(l==null)return!D;for(l=Tr(l);D--;){var k=y[D],q=p[k],Y=l[k];if(Y===r&&!(k in l)||!q(Y))return!1}return!0}o(UR,"baseConformsTo");function jR(l,p,y){if(typeof l!="function")throw new gi(s);return q0(function(){l.apply(r,y)},p)}o(jR,"baseDelay");function L0(l,p,y,D){var k=-1,q=dx,Y=!0,ee=l.length,le=[],Te=p.length;if(!ee)return le;y&&(p=Hr(p,Js(y))),D?(q=N2,Y=!1):p.length>=t&&(q=_0,Y=!1,p=new El(p));e:for(;++k<ee;){var Be=l[k],Ve=y==null?Be:y(Be);if(Be=D||Be!==0?Be:0,Y&&Ve===Ve){for(var Ze=Te;Ze--;)if(p[Ze]===Ve)continue e;le.push(Be)}else q(p,Ve,D)||le.push(Be)}return le}o(L0,"baseDifference");var Su=hO(Aa),MR=hO(q2,!0);function SH(l,p){var y=!0;return Su(l,function(D,k,q){return y=!!p(D,k,q),y}),y}o(SH,"baseEvery");function Rx(l,p,y){for(var D=-1,k=l.length;++D<k;){var q=l[D],Y=p(q);if(Y!=null&&(ee===r?Y===Y&&!Qs(Y):y(Y,ee)))var ee=Y,le=q}return le}o(Rx,"baseExtremum");function EH(l,p,y,D){var k=l.length;for(y=qt(y),y<0&&(y=-y>k?0:k+y),D=D===r||D>k?k:qt(D),D<0&&(D+=k),D=y>D?0:nP(D);y<D;)l[y++]=p;return l}o(EH,"baseFill");function FR(l,p){var y=[];return Su(l,function(D,k,q){p(D,k,q)&&y.push(D)}),y}o(FR,"baseFilter");function qn(l,p,y,D,k){var q=-1,Y=l.length;for(y||(y=lK),k||(k=[]);++q<Y;){var ee=l[q];p>0&&y(ee)?p>1?qn(ee,p-1,y,D,k):vu(k,ee):D||(k[k.length]=ee)}return k}o(qn,"baseFlatten");var F2=pO(),qR=pO(!0);function Aa(l,p){return l&&F2(l,p,In)}o(Aa,"baseForOwn");function q2(l,p){return l&&qR(l,p,In)}o(q2,"baseForOwnRight");function Ox(l,p){return gu(p,function(y){return Eo(l[y])})}o(Ox,"baseFunctions");function Al(l,p){p=bu(p,l);for(var y=0,D=p.length;l!=null&&y<D;)l=l[Na(p[y++])];return y&&y==D?l:r}o(Al,"baseGet");function HR(l,p,y){var D=p(l);return Ut(l)?D:vu(D,y(l))}o(HR,"baseGetAllKeys");function ds(l){return l==null?l===r?As:Ct:wl&&wl in Tr(l)?sK(l):vK(l)}o(ds,"baseGetTag");function H2(l,p){return l>p}o(H2,"baseGt");function bH(l,p){return l!=null&&Sr.call(l,p)}o(bH,"baseHas");function AH(l,p){return l!=null&&p in Tr(l)}o(AH,"baseHasIn");function CH(l,p,y){return l>=rs(p,y)&&l<En(p,y)}o(CH,"baseInRange");function K2(l,p,y){for(var D=y?N2:dx,k=l[0].length,q=l.length,Y=q,ee=we(q),le=1/0,Te=[];Y--;){var Be=l[Y];Y&&p&&(Be=Hr(Be,Js(p))),le=rs(Be.length,le),ee[Y]=!y&&(p||k>=120&&Be.length>=120)?new El(Y&&Be):r}Be=l[0];var Ve=-1,Ze=ee[0];e:for(;++Ve<k&&Te.length<le;){var pt=Be[Ve],Nt=p?p(pt):pt;if(pt=y||pt!==0?pt:0,!(Ze?_0(Ze,Nt):D(Te,Nt,y))){for(Y=q;--Y;){var Gt=ee[Y];if(!(Gt?_0(Gt,Nt):D(l[Y],Nt,y)))continue e}Ze&&Ze.push(Nt),Te.push(pt)}}return Te}o(K2,"baseIntersection");function NH(l,p,y,D){return Aa(l,function(k,q,Y){p(D,y(k),q,Y)}),D}o(NH,"baseInverter");function V0(l,p,y){p=bu(p,l),l=DO(l,p);var D=l==null?l:l[Na(wi(p))];return D==null?r:zs(D,l,y)}o(V0,"baseInvoke");function KR(l){return Zr(l)&&ds(l)==$e}o(KR,"baseIsArguments");function TH(l){return Zr(l)&&ds(l)==tt}o(TH,"baseIsArrayBuffer");function IH(l){return Zr(l)&&ds(l)==w}o(IH,"baseIsDate");function U0(l,p,y,D,k){return l===p?!0:l==null||p==null||!Zr(l)&&!Zr(p)?l!==l&&p!==p:_H(l,p,y,D,U0,k)}o(U0,"baseIsEqual");function _H(l,p,y,D,k,q){var Y=Ut(l),ee=Ut(p),le=Y?Ge:ns(l),Te=ee?Ge:ns(p);le=le==$e?Ue:le,Te=Te==$e?Ue:Te;var Be=le==Ue,Ve=Te==Ue,Ze=le==Te;if(Ze&&Cu(l)){if(!Cu(p))return!1;Y=!0,Be=!1}if(Ze&&!Be)return q||(q=new zi),Y||Yh(l)?bO(l,p,y,D,k,q):rK(l,p,le,y,D,k,q);if(!(y&g)){var pt=Be&&Sr.call(l,"__wrapped__"),Nt=Ve&&Sr.call(p,"__wrapped__");if(pt||Nt){var Gt=pt?l.value():l,Tt=Nt?p.value():p;return q||(q=new zi),k(Gt,Tt,y,D,q)}}return Ze?(q||(q=new zi),nK(l,p,y,D,k,q)):!1}o(_H,"baseIsEqualDeep");function DH(l){return Zr(l)&&ns(l)==Se}o(DH,"baseIsMap");function $2(l,p,y,D){var k=y.length,q=k,Y=!D;if(l==null)return!q;for(l=Tr(l);k--;){var ee=y[k];if(Y&&ee[2]?ee[1]!==l[ee[0]]:!(ee[0]in l))return!1}for(;++k<q;){ee=y[k];var le=ee[0],Te=l[le],Be=ee[1];if(Y&&ee[2]){if(Te===r&&!(le in l))return!1}else{var Ve=new zi;if(D)var Ze=D(Te,Be,le,l,p,Ve);if(!(Ze===r?U0(Be,Te,g|x,D,Ve):Ze))return!1}}return!0}o($2,"baseIsMatch");function $R(l){if(!Xr(l)||hK(l))return!1;var p=Eo(l)?D7:wq;return p.test(Nl(l))}o($R,"baseIsNative");function BH(l){return Zr(l)&&ds(l)==Je}o(BH,"baseIsRegExp");function RH(l){return Zr(l)&&ns(l)==Nr}o(RH,"baseIsSet");function OH(l){return Zr(l)&&Jx(l.length)&&!!jr[ds(l)]}o(OH,"baseIsTypedArray");function GR(l){return typeof l=="function"?l:l==null?Is:typeof l=="object"?Ut(l)?zR(l[0],l[1]):WR(l):dP(l)}o(GR,"baseIteratee");function G2(l){if(!F0(l))return L7(l);var p=[];for(var y in Tr(l))Sr.call(l,y)&&y!="constructor"&&p.push(y);return p}o(G2,"baseKeys");function PH(l){if(!Xr(l))return gK(l);var p=F0(l),y=[];for(var D in l)D=="constructor"&&(p||!Sr.call(l,D))||y.push(D);return y}o(PH,"baseKeysIn");function X2(l,p){return l<p}o(X2,"baseLt");function XR(l,p){var y=-1,D=Ns(l)?we(l.length):[];return Su(l,function(k,q,Y){D[++y]=p(k,q,Y)}),D}o(XR,"baseMap");function WR(l){var p=uC(l);return p.length==1&&p[0][2]?IO(p[0][0],p[0][1]):function(y){return y===l||$2(y,l,p)}}o(WR,"baseMatches");function zR(l,p){return lC(l)&&TO(p)?IO(Na(l),p):function(y){var D=wC(y,l);return D===r&&D===p?SC(y,l):U0(p,D,g|x)}}o(zR,"baseMatchesProperty");function Px(l,p,y,D,k){l!==p&&F2(p,function(q,Y){if(k||(k=new zi),Xr(q))kH(l,p,Y,y,Px,D,k);else{var ee=D?D(hC(l,Y),q,Y+"",l,p,k):r;ee===r&&(ee=q),j2(l,Y,ee)}},Ts)}o(Px,"baseMerge");function kH(l,p,y,D,k,q,Y){var ee=hC(l,y),le=hC(p,y),Te=Y.get(le);if(Te){j2(l,y,Te);return}var Be=q?q(ee,le,y+"",l,p,Y):r,Ve=Be===r;if(Ve){var Ze=Ut(le),pt=!Ze&&Cu(le),Nt=!Ze&&!pt&&Yh(le);Be=le,Ze||pt||Nt?Ut(ee)?Be=ee:on(ee)?Be=Cs(ee):pt?(Ve=!1,Be=oO(le,!0)):Nt?(Ve=!1,Be=uO(le,!0)):Be=[]:H0(le)||Tl(le)?(Be=ee,Tl(ee)?Be=sP(ee):(!Xr(ee)||Eo(ee))&&(Be=NO(le))):Ve=!1}Ve&&(Y.set(le,Be),k(Be,le,D,q,Y),Y.delete(le)),j2(l,y,Be)}o(kH,"baseMergeDeep");function JR(l,p){var y=l.length;if(y)return p+=p<0?y:0,So(p,y)?l[p]:r}o(JR,"baseNth");function YR(l,p,y){p.length?p=Hr(p,function(q){return Ut(q)?function(Y){return Al(Y,q.length===1?q[0]:q)}:q}):p=[Is];var D=-1;p=Hr(p,Js(Et()));var k=XR(l,function(q,Y,ee){var le=Hr(p,function(Te){return Te(q)});return{criteria:le,index:++D,value:q}});return u7(k,function(q,Y){return WH(q,Y,y)})}o(YR,"baseOrderBy");function LH(l,p){return QR(l,p,function(y,D){return SC(l,D)})}o(LH,"basePick");function QR(l,p,y){for(var D=-1,k=p.length,q={};++D<k;){var Y=p[D],ee=Al(l,Y);y(ee,Y)&&j0(q,bu(Y,l),ee)}return q}o(QR,"basePickBy");function VH(l){return function(p){return Al(p,l)}}o(VH,"basePropertyDeep");function W2(l,p,y,D){var k=D?o7:Fh,q=-1,Y=p.length,ee=l;for(l===p&&(p=Cs(p)),y&&(ee=Hr(l,Js(y)));++q<Y;)for(var le=0,Te=p[q],Be=y?y(Te):Te;(le=k(ee,Be,le,D))>-1;)ee!==l&&Ax.call(ee,le,1),Ax.call(l,le,1);return l}o(W2,"basePullAll");function ZR(l,p){for(var y=l?p.length:0,D=y-1;y--;){var k=p[y];if(y==D||k!==q){var q=k;So(k)?Ax.call(l,k,1):Q2(l,k)}}return l}o(ZR,"basePullAt");function z2(l,p){return l+Tx(OR()*(p-l+1))}o(z2,"baseRandom");function UH(l,p,y,D){for(var k=-1,q=En(Nx((p-l)/(y||1)),0),Y=we(q);q--;)Y[D?q:++k]=l,l+=y;return Y}o(UH,"baseRange");function J2(l,p){var y="";if(!l||p<1||p>Q)return y;do p%2&&(y+=l),p=Tx(p/2),p&&(l+=l);while(p);return y}o(J2,"baseRepeat");function zt(l,p){return pC(_O(l,p,Is),l+"")}o(zt,"baseRest");function jH(l){return LR(Qh(l))}o(jH,"baseSample");function MH(l,p){var y=Qh(l);return Kx(y,bl(p,0,y.length))}o(MH,"baseSampleSize");function j0(l,p,y,D){if(!Xr(l))return l;p=bu(p,l);for(var k=-1,q=p.length,Y=q-1,ee=l;ee!=null&&++k<q;){var le=Na(p[k]),Te=y;if(le==="__proto__"||le==="constructor"||le==="prototype")return l;if(k!=Y){var Be=ee[le];Te=D?D(Be,le,ee):r,Te===r&&(Te=Xr(Be)?Be:So(p[k+1])?[]:{})}k0(ee,le,Te),ee=ee[le]}return l}o(j0,"baseSet");var eO=Ix?function(l,p){return Ix.set(l,p),l}:Is,FH=Cx?function(l,p){return Cx(l,"toString",{configurable:!0,enumerable:!1,value:bC(p),writable:!0})}:Is;function qH(l){return Kx(Qh(l))}o(qH,"baseShuffle");function xi(l,p,y){var D=-1,k=l.length;p<0&&(p=-p>k?0:k+p),y=y>k?k:y,y<0&&(y+=k),k=p>y?0:y-p>>>0,p>>>=0;for(var q=we(k);++D<k;)q[D]=l[D+p];return q}o(xi,"baseSlice");function HH(l,p){var y;return Su(l,function(D,k,q){return y=p(D,k,q),!y}),!!y}o(HH,"baseSome");function kx(l,p,y){var D=0,k=l==null?D:l.length;if(typeof p=="number"&&p===p&&k<=fe){for(;D<k;){var q=D+k>>>1,Y=l[q];Y!==null&&!Qs(Y)&&(y?Y<=p:Y<p)?D=q+1:k=q}return k}return Y2(l,p,Is,y)}o(kx,"baseSortedIndex");function Y2(l,p,y,D){var k=0,q=l==null?0:l.length;if(q===0)return 0;p=y(p);for(var Y=p!==p,ee=p===null,le=Qs(p),Te=p===r;k<q;){var Be=Tx((k+q)/2),Ve=y(l[Be]),Ze=Ve!==r,pt=Ve===null,Nt=Ve===Ve,Gt=Qs(Ve);if(Y)var Tt=D||Nt;else Te?Tt=Nt&&(D||Ze):ee?Tt=Nt&&Ze&&(D||!pt):le?Tt=Nt&&Ze&&!pt&&(D||!Gt):pt||Gt?Tt=!1:Tt=D?Ve<=p:Ve<p;Tt?k=Be+1:q=Be}return rs(q,de)}o(Y2,"baseSortedIndexBy");function tO(l,p){for(var y=-1,D=l.length,k=0,q=[];++y<D;){var Y=l[y],ee=p?p(Y):Y;if(!y||!Ji(ee,le)){var le=ee;q[k++]=Y===0?0:Y}}return q}o(tO,"baseSortedUniq");function rO(l){return typeof l=="number"?l:Qs(l)?Me:+l}o(rO,"baseToNumber");function Ys(l){if(typeof l=="string")return l;if(Ut(l))return Hr(l,Ys)+"";if(Qs(l))return PR?PR.call(l):"";var p=l+"";return p=="0"&&1/l==-oe?"-0":p}o(Ys,"baseToString");function Eu(l,p,y){var D=-1,k=dx,q=l.length,Y=!0,ee=[],le=ee;if(y)Y=!1,k=N2;else if(q>=t){var Te=p?null:eK(l);if(Te)return gx(Te);Y=!1,k=_0,le=new El}else le=p?[]:ee;e:for(;++D<q;){var Be=l[D],Ve=p?p(Be):Be;if(Be=y||Be!==0?Be:0,Y&&Ve===Ve){for(var Ze=le.length;Ze--;)if(le[Ze]===Ve)continue e;p&&le.push(Ve),ee.push(Be)}else k(le,Ve,y)||(le!==ee&&le.push(Ve),ee.push(Be))}return ee}o(Eu,"baseUniq");function Q2(l,p){return p=bu(p,l),l=DO(l,p),l==null||delete l[Na(wi(p))]}o(Q2,"baseUnset");function nO(l,p,y,D){return j0(l,p,y(Al(l,p)),D)}o(nO,"baseUpdate");function Lx(l,p,y,D){for(var k=l.length,q=D?k:-1;(D?q--:++q<k)&&p(l[q],q,l););return y?xi(l,D?0:q,D?q+1:k):xi(l,D?q+1:0,D?k:q)}o(Lx,"baseWhile");function sO(l,p){var y=l;return y instanceof nr&&(y=y.value()),T2(p,function(D,k){return k.func.apply(k.thisArg,vu([D],k.args))},y)}o(sO,"baseWrapperValue");function Z2(l,p,y){var D=l.length;if(D<2)return D?Eu(l[0]):[];for(var k=-1,q=we(D);++k<D;)for(var Y=l[k],ee=-1;++ee<D;)ee!=k&&(q[k]=L0(q[k]||Y,l[ee],p,y));return Eu(qn(q,1),p,y)}o(Z2,"baseXor");function iO(l,p,y){for(var D=-1,k=l.length,q=p.length,Y={};++D<k;){var ee=D<q?p[D]:r;y(Y,l[D],ee)}return Y}o(iO,"baseZipObject");function eC(l){return on(l)?l:[]}o(eC,"castArrayLikeObject");function tC(l){return typeof l=="function"?l:Is}o(tC,"castFunction");function bu(l,p){return Ut(l)?l:lC(l,p)?[l]:PO(yr(l))}o(bu,"castPath");var KH=zt;function Au(l,p,y){var D=l.length;return y=y===r?D:y,!p&&y>=D?l:xi(l,p,y)}o(Au,"castSlice");var aO=B7||function(l){return Tn.clearTimeout(l)};function oO(l,p){if(p)return l.slice();var y=l.length,D=IR?IR(y):new l.constructor(y);return l.copy(D),D}o(oO,"cloneBuffer");function rC(l){var p=new l.constructor(l.byteLength);return new Ex(p).set(new Ex(l)),p}o(rC,"cloneArrayBuffer");function $H(l,p){var y=p?rC(l.buffer):l.buffer;return new l.constructor(y,l.byteOffset,l.byteLength)}o($H,"cloneDataView");function GH(l){var p=new l.constructor(l.source,Xi.exec(l));return p.lastIndex=l.lastIndex,p}o(GH,"cloneRegExp");function XH(l){return P0?Tr(P0.call(l)):{}}o(XH,"cloneSymbol");function uO(l,p){var y=p?rC(l.buffer):l.buffer;return new l.constructor(y,l.byteOffset,l.length)}o(uO,"cloneTypedArray");function cO(l,p){if(l!==p){var y=l!==r,D=l===null,k=l===l,q=Qs(l),Y=p!==r,ee=p===null,le=p===p,Te=Qs(p);if(!ee&&!Te&&!q&&l>p||q&&Y&&le&&!ee&&!Te||D&&Y&&le||!y&&le||!k)return 1;if(!D&&!q&&!Te&&l<p||Te&&y&&k&&!D&&!q||ee&&y&&k||!Y&&k||!le)return-1}return 0}o(cO,"compareAscending");function WH(l,p,y){for(var D=-1,k=l.criteria,q=p.criteria,Y=k.length,ee=y.length;++D<Y;){var le=cO(k[D],q[D]);if(le){if(D>=ee)return le;var Te=y[D];return le*(Te=="desc"?-1:1)}}return l.index-p.index}o(WH,"compareMultiple");function lO(l,p,y,D){for(var k=-1,q=l.length,Y=y.length,ee=-1,le=p.length,Te=En(q-Y,0),Be=we(le+Te),Ve=!D;++ee<le;)Be[ee]=p[ee];for(;++k<Y;)(Ve||k<q)&&(Be[y[k]]=l[k]);for(;Te--;)Be[ee++]=l[k++];return Be}o(lO,"composeArgs");function fO(l,p,y,D){for(var k=-1,q=l.length,Y=-1,ee=y.length,le=-1,Te=p.length,Be=En(q-ee,0),Ve=we(Be+Te),Ze=!D;++k<Be;)Ve[k]=l[k];for(var pt=k;++le<Te;)Ve[pt+le]=p[le];for(;++Y<ee;)(Ze||k<q)&&(Ve[pt+y[Y]]=l[k++]);return Ve}o(fO,"composeArgsRight");function Cs(l,p){var y=-1,D=l.length;for(p||(p=we(D));++y<D;)p[y]=l[y];return p}o(Cs,"copyArray");function Ca(l,p,y,D){var k=!y;y||(y={});for(var q=-1,Y=p.length;++q<Y;){var ee=p[q],le=D?D(y[ee],l[ee],ee,y,l):r;le===r&&(le=l[ee]),k?yo(y,ee,le):k0(y,ee,le)}return y}o(Ca,"copyObject");function zH(l,p){return Ca(l,cC(l),p)}o(zH,"copySymbols");function JH(l,p){return Ca(l,AO(l),p)}o(JH,"copySymbolsIn");function Vx(l,p){return function(y,D){var k=Ut(y)?t7:yH,q=p?p():{};return k(y,l,Et(D,2),q)}}o(Vx,"createAggregator");function Wh(l){return zt(function(p,y){var D=-1,k=y.length,q=k>1?y[k-1]:r,Y=k>2?y[2]:r;for(q=l.length>3&&typeof q=="function"?(k--,q):r,Y&&ms(y[0],y[1],Y)&&(q=k<3?r:q,k=1),p=Tr(p);++D<k;){var ee=y[D];ee&&l(p,ee,D,q)}return p})}o(Wh,"createAssigner");function hO(l,p){return function(y,D){if(y==null)return y;if(!Ns(y))return l(y,D);for(var k=y.length,q=p?k:-1,Y=Tr(y);(p?q--:++q<k)&&D(Y[q],q,Y)!==!1;);return y}}o(hO,"createBaseEach");function pO(l){return function(p,y,D){for(var k=-1,q=Tr(p),Y=D(p),ee=Y.length;ee--;){var le=Y[l?ee:++k];if(y(q[le],le,q)===!1)break}return p}}o(pO,"createBaseFor");function YH(l,p,y){var D=p&v,k=M0(l);function q(){var Y=this&&this!==Tn&&this instanceof q?k:l;return Y.apply(D?y:this,arguments)}return o(q,"wrapper"),q}o(YH,"createBind");function dO(l){return function(p){p=yr(p);var y=qh(p)?Wi(p):r,D=y?y[0]:p.charAt(0),k=y?Au(y,1).join(""):p.slice(1);return D[l]()+k}}o(dO,"createCaseFirst");function zh(l){return function(p){return T2(hP(fP(p).replace(Fq,"")),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),D=l.apply(y,p);return Xr(D)?D:y}}o(M0,"createCtor");function QH(l,p,y){var D=M0(l);function k(){for(var q=arguments.length,Y=we(q),ee=q,le=Jh(k);ee--;)Y[ee]=arguments[ee];var Te=q<3&&Y[0]!==le&&Y[q-1]!==le?[]:yu(Y,le);if(q-=Te.length,q<y)return xO(l,p,Ux,k.placeholder,r,Y,Te,r,r,y-q);var Be=this&&this!==Tn&&this instanceof k?D:l;return zs(Be,this,Y)}return o(k,"wrapper"),k}o(QH,"createCurry");function mO(l){return function(p,y,D){var k=Tr(p);if(!Ns(p)){var q=Et(y,3);p=In(p),y=o(function(ee){return q(k[ee],ee,k)},"predicate")}var Y=l(p,y,D);return Y>-1?k[q?p[Y]:Y]:r}}o(mO,"createFind");function gO(l){return wo(function(p){var y=p.length,D=y,k=vi.prototype.thru;for(l&&p.reverse();D--;){var q=p[D];if(typeof q!="function")throw new gi(s);if(k&&!Y&&qx(q)=="wrapper")var Y=new vi([],!0)}for(D=Y?D:y;++D<y;){q=p[D];var ee=qx(q),le=ee=="wrapper"?oC(q):r;le&&fC(le[0])&&le[1]==(T|C|b|R)&&!le[4].length&&le[9]==1?Y=Y[qx(le[0])].apply(Y,le[3]):Y=q.length==1&&fC(q)?Y[ee]():Y.thru(q)}return function(){var Te=arguments,Be=Te[0];if(Y&&Te.length==1&&Ut(Be))return Y.plant(Be).value();for(var Ve=0,Ze=y?p[Ve].apply(this,Te):Be;++Ve<y;)Ze=p[Ve].call(this,Ze);return Ze}})}o(gO,"createFlow");function Ux(l,p,y,D,k,q,Y,ee,le,Te){var Be=p&T,Ve=p&v,Ze=p&S,pt=p&(C|_),Nt=p&H,Gt=Ze?r:M0(l);function Tt(){for(var Yt=arguments.length,ir=we(Yt),Zs=Yt;Zs--;)ir[Zs]=arguments[Zs];if(pt)var gs=Jh(Tt),ei=l7(ir,gs);if(D&&(ir=lO(ir,D,k,pt)),q&&(ir=fO(ir,q,Y,pt)),Yt-=ei,pt&&Yt<Te){var un=yu(ir,gs);return xO(l,p,Ux,Tt.placeholder,y,ir,un,ee,le,Te-Yt)}var Yi=Ve?y:this,Ao=Ze?Yi[l]:l;return Yt=ir.length,ee?ir=yK(ir,ee):Nt&&Yt>1&&ir.reverse(),Be&&le<Yt&&(ir.length=le),this&&this!==Tn&&this instanceof Tt&&(Ao=Gt||M0(Ao)),Ao.apply(Yi,ir)}return o(Tt,"wrapper"),Tt}o(Ux,"createHybrid");function vO(l,p){return function(y,D){return NH(y,l,p(D),{})}}o(vO,"createInverter");function jx(l,p){return function(y,D){var k;if(y===r&&D===r)return p;if(y!==r&&(k=y),D!==r){if(k===r)return D;typeof y=="string"||typeof D=="string"?(y=Ys(y),D=Ys(D)):(y=rO(y),D=rO(D)),k=l(y,D)}return k}}o(jx,"createMathOperation");function nC(l){return wo(function(p){return p=Hr(p,Js(Et())),zt(function(y){var D=this;return l(p,function(k){return zs(k,D,y)})})})}o(nC,"createOver");function Mx(l,p){p=p===r?" ":Ys(p);var y=p.length;if(y<2)return y?J2(p,l):p;var D=J2(p,Nx(l/Hh(p)));return qh(p)?Au(Wi(D),0,l).join(""):D.slice(0,l)}o(Mx,"createPadding");function ZH(l,p,y,D){var k=p&v,q=M0(l);function Y(){for(var ee=-1,le=arguments.length,Te=-1,Be=D.length,Ve=we(Be+le),Ze=this&&this!==Tn&&this instanceof Y?q:l;++Te<Be;)Ve[Te]=D[Te];for(;le--;)Ve[Te++]=arguments[++ee];return zs(Ze,k?y:this,Ve)}return o(Y,"wrapper"),Y}o(ZH,"createPartial");function yO(l){return function(p,y,D){return D&&typeof D!="number"&&ms(p,y,D)&&(y=D=r),p=bo(p),y===r?(y=p,p=0):y=bo(y),D=D===r?p<y?1:-1:bo(D),UH(p,y,D,l)}}o(yO,"createRange");function Fx(l){return function(p,y){return typeof p=="string"&&typeof y=="string"||(p=Si(p),y=Si(y)),l(p,y)}}o(Fx,"createRelationalOperation");function xO(l,p,y,D,k,q,Y,ee,le,Te){var Be=p&C,Ve=Be?Y:r,Ze=Be?r:Y,pt=Be?q:r,Nt=Be?r:q;p|=Be?b:A,p&=~(Be?A:b),p&E||(p&=~(v|S));var Gt=[l,p,k,pt,Ve,Nt,Ze,ee,le,Te],Tt=y.apply(r,Gt);return fC(l)&&BO(Tt,Gt),Tt.placeholder=D,RO(Tt,l,p)}o(xO,"createRecurry");function sC(l){var p=Sn[l];return function(y,D){if(y=Si(y),D=D==null?0:rs(qt(D),292),D&&RR(y)){var k=(yr(y)+"e").split("e"),q=p(k[0]+"e"+(+k[1]+D));return k=(yr(q)+"e").split("e"),+(k[0]+"e"+(+k[1]-D))}return p(y)}}o(sC,"createRound");var eK=$h&&1/gx(new $h([,-0]))[1]==oe?function(l){return new $h(l)}:NC;function wO(l){return function(p){var y=ns(p);return y==Se?P2(p):y==Nr?v7(p):c7(p,l(p))}}o(wO,"createToPairs");function xo(l,p,y,D,k,q,Y,ee){var le=p&S;if(!le&&typeof l!="function")throw new gi(s);var Te=D?D.length:0;if(Te||(p&=~(b|A),D=k=r),Y=Y===r?Y:En(qt(Y),0),ee=ee===r?ee:qt(ee),Te-=k?k.length:0,p&A){var Be=D,Ve=k;D=k=r}var Ze=le?r:oC(l),pt=[l,p,y,D,k,Be,Ve,q,Y,ee];if(Ze&&mK(pt,Ze),l=pt[0],p=pt[1],y=pt[2],D=pt[3],k=pt[4],ee=pt[9]=pt[9]===r?le?0:l.length:En(pt[9]-Te,0),!ee&&p&(C|_)&&(p&=~(C|_)),!p||p==v)var Nt=YH(l,p,y);else p==C||p==_?Nt=QH(l,p,ee):(p==b||p==(v|b))&&!k.length?Nt=ZH(l,p,y,D):Nt=Ux.apply(r,pt);var Gt=Ze?eO:BO;return RO(Gt(Nt,pt),l,p)}o(xo,"createWrap");function SO(l,p,y,D){return l===r||Ji(l,Kh[y])&&!Sr.call(D,y)?p:l}o(SO,"customDefaultsAssignIn");function EO(l,p,y,D,k,q){return Xr(l)&&Xr(p)&&(q.set(p,l),Px(l,p,r,EO,q),q.delete(p)),l}o(EO,"customDefaultsMerge");function tK(l){return H0(l)?r:l}o(tK,"customOmitClone");function bO(l,p,y,D,k,q){var Y=y&g,ee=l.length,le=p.length;if(ee!=le&&!(Y&&le>ee))return!1;var Te=q.get(l),Be=q.get(p);if(Te&&Be)return Te==p&&Be==l;var Ve=-1,Ze=!0,pt=y&x?new El:r;for(q.set(l,p),q.set(p,l);++Ve<ee;){var Nt=l[Ve],Gt=p[Ve];if(D)var Tt=Y?D(Gt,Nt,Ve,p,l,q):D(Nt,Gt,Ve,l,p,q);if(Tt!==r){if(Tt)continue;Ze=!1;break}if(pt){if(!I2(p,function(Yt,ir){if(!_0(pt,ir)&&(Nt===Yt||k(Nt,Yt,y,D,q)))return pt.push(ir)})){Ze=!1;break}}else if(!(Nt===Gt||k(Nt,Gt,y,D,q))){Ze=!1;break}}return q.delete(l),q.delete(p),Ze}o(bO,"equalArrays");function rK(l,p,y,D,k,q,Y){switch(y){case Mn:if(l.byteLength!=p.byteLength||l.byteOffset!=p.byteOffset)return!1;l=l.buffer,p=p.buffer;case tt:return!(l.byteLength!=p.byteLength||!q(new Ex(l),new Ex(p)));case N:case w:case ze:return Ji(+l,+p);case P:return l.name==p.name&&l.message==p.message;case Je:case qr:return l==p+"";case Se:var ee=P2;case Nr:var le=D&g;if(ee||(ee=gx),l.size!=p.size&&!le)return!1;var Te=Y.get(l);if(Te)return Te==p;D|=x,Y.set(l,p);var Be=bO(ee(l),ee(p),D,k,q,Y);return Y.delete(l),Be;case wn:if(P0)return P0.call(l)==P0.call(p)}return!1}o(rK,"equalByTag");function nK(l,p,y,D,k,q){var Y=y&g,ee=iC(l),le=ee.length,Te=iC(p),Be=Te.length;if(le!=Be&&!Y)return!1;for(var Ve=le;Ve--;){var Ze=ee[Ve];if(!(Y?Ze in p:Sr.call(p,Ze)))return!1}var pt=q.get(l),Nt=q.get(p);if(pt&&Nt)return pt==p&&Nt==l;var Gt=!0;q.set(l,p),q.set(p,l);for(var Tt=Y;++Ve<le;){Ze=ee[Ve];var Yt=l[Ze],ir=p[Ze];if(D)var Zs=Y?D(ir,Yt,Ze,p,l,q):D(Yt,ir,Ze,l,p,q);if(!(Zs===r?Yt===ir||k(Yt,ir,y,D,q):Zs)){Gt=!1;break}Tt||(Tt=Ze=="constructor")}if(Gt&&!Tt){var gs=l.constructor,ei=p.constructor;gs!=ei&&"constructor"in l&&"constructor"in p&&!(typeof gs=="function"&&gs instanceof gs&&typeof ei=="function"&&ei instanceof ei)&&(Gt=!1)}return q.delete(l),q.delete(p),Gt}o(nK,"equalObjects");function wo(l){return pC(_O(l,r,UO),l+"")}o(wo,"flatRest");function iC(l){return HR(l,In,cC)}o(iC,"getAllKeys");function aC(l){return HR(l,Ts,AO)}o(aC,"getAllKeysIn");var oC=Ix?function(l){return Ix.get(l)}:NC;function qx(l){for(var p=l.name+"",y=Gh[p],D=Sr.call(Gh,p)?y.length:0;D--;){var k=y[D],q=k.func;if(q==null||q==l)return k.name}return p}o(qx,"getFuncName");function Jh(l){var p=Sr.call(M,"placeholder")?M:l;return p.placeholder}o(Jh,"getHolder");function Et(){var l=M.iteratee||AC;return l=l===AC?GR:l,arguments.length?l(arguments[0],arguments[1]):l}o(Et,"getIteratee");function Hx(l,p){var y=l.__data__;return fK(p)?y[typeof p=="string"?"string":"hash"]:y.map}o(Hx,"getMapData");function uC(l){for(var p=In(l),y=p.length;y--;){var D=p[y],k=l[D];p[y]=[D,k,TO(k)]}return p}o(uC,"getMatchData");function Cl(l,p){var y=d7(l,p);return $R(y)?y:r}o(Cl,"getNative");function sK(l){var p=Sr.call(l,wl),y=l[wl];try{l[wl]=r;var D=!0}catch{}var k=wx.call(l);return D&&(p?l[wl]=y:delete l[wl]),k}o(sK,"getRawTag");var cC=L2?function(l){return l==null?[]:(l=Tr(l),gu(L2(l),function(p){return DR.call(l,p)}))}:TC,AO=L2?function(l){for(var p=[];l;)vu(p,cC(l)),l=bx(l);return p}:TC,ns=ds;(V2&&ns(new V2(new ArrayBuffer(1)))!=Mn||B0&&ns(new B0)!=Se||U2&&ns(U2.resolve())!=wt||$h&&ns(new $h)!=Nr||R0&&ns(new R0)!=hs)&&(ns=o(function(l){var p=ds(l),y=p==Ue?l.constructor:r,D=y?Nl(y):"";if(D)switch(D){case M7:return Mn;case F7:return Se;case q7:return wt;case H7:return Nr;case K7:return hs}return p},"getTag"));function iK(l,p,y){for(var D=-1,k=y.length;++D<k;){var q=y[D],Y=q.size;switch(q.type){case"drop":l+=Y;break;case"dropRight":p-=Y;break;case"take":p=rs(p,l+Y);break;case"takeRight":l=En(l,p-Y);break}}return{start:l,end:p}}o(iK,"getView");function aK(l){var p=l.match(m2);return p?p[1].split(g2):[]}o(aK,"getWrapDetails");function CO(l,p,y){p=bu(p,l);for(var D=-1,k=p.length,q=!1;++D<k;){var Y=Na(p[D]);if(!(q=l!=null&&y(l,Y)))break;l=l[Y]}return q||++D!=k?q:(k=l==null?0:l.length,!!k&&Jx(k)&&So(Y,k)&&(Ut(l)||Tl(l)))}o(CO,"hasPath");function oK(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(oK,"initCloneArray");function NO(l){return typeof l.constructor=="function"&&!F0(l)?Xh(bx(l)):{}}o(NO,"initCloneObject");function uK(l,p,y){var D=l.constructor;switch(p){case tt:return rC(l);case N:case w:return new D(+l);case Mn:return $H(l,y);case ps:case Sa:case Ea:case Pt:case Uh:case jh:case yl:case T0:case Ws:return uO(l,y);case Se:return new D;case ze:case qr:return new D(l);case Je:return GH(l);case Nr:return new D;case wn:return XH(l)}}o(uK,"initCloneByTag");function cK(l,p){var y=p.length;if(!y)return l;var D=y-1;return p[D]=(y>1?"& ":"")+p[D],p=p.join(y>2?", ":" "),l.replace(d2,`{
28
+ /* [wrapped with `+p+`] */
29
+ `)}o(cK,"insertWrapDetails");function lK(l){return Ut(l)||Tl(l)||!!(BR&&l&&l[BR])}o(lK,"isFlattenable");function So(l,p){var y=typeof l;return p=p??Q,!!p&&(y=="number"||y!="symbol"&&Eq.test(l))&&l>-1&&l%1==0&&l<p}o(So,"isIndex");function ms(l,p,y){if(!Xr(y))return!1;var D=typeof p;return(D=="number"?Ns(y)&&So(p,y.length):D=="string"&&p in y)?Ji(y[p],l):!1}o(ms,"isIterateeCall");function lC(l,p){if(Ut(l))return!1;var y=typeof l;return y=="number"||y=="symbol"||y=="boolean"||l==null||Qs(l)?!0:Fn.test(l)||!Rt.test(l)||p!=null&&l in Tr(p)}o(lC,"isKey");function fK(l){var p=typeof l;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?l!=="__proto__":l===null}o(fK,"isKeyable");function fC(l){var p=qx(l),y=M[p];if(typeof y!="function"||!(p in nr.prototype))return!1;if(l===y)return!0;var D=oC(y);return!!D&&l===D[0]}o(fC,"isLaziable");function hK(l){return!!TR&&TR in l}o(hK,"isMasked");var pK=yx?Eo:IC;function F0(l){var p=l&&l.constructor,y=typeof p=="function"&&p.prototype||Kh;return l===y}o(F0,"isPrototype");function TO(l){return l===l&&!Xr(l)}o(TO,"isStrictComparable");function IO(l,p){return function(y){return y==null?!1:y[l]===p&&(p!==r||l in Tr(y))}}o(IO,"matchesStrictComparable");function dK(l){var p=Wx(l,function(D){return y.size===u&&y.clear(),D}),y=p.cache;return p}o(dK,"memoizeCapped");function mK(l,p){var y=l[1],D=p[1],k=y|D,q=k<(v|S|T),Y=D==T&&y==C||D==T&&y==R&&l[7].length<=p[8]||D==(T|R)&&p[7].length<=p[8]&&y==C;if(!(q||Y))return l;D&v&&(l[2]=p[2],k|=y&v?0:E);var ee=p[3];if(ee){var le=l[3];l[3]=le?lO(le,ee,p[4]):ee,l[4]=le?yu(l[3],c):p[4]}return ee=p[5],ee&&(le=l[5],l[5]=le?fO(le,ee,p[6]):ee,l[6]=le?yu(l[5],c):p[6]),ee=p[7],ee&&(l[7]=ee),D&T&&(l[8]=l[8]==null?p[8]:rs(l[8],p[8])),l[9]==null&&(l[9]=p[9]),l[0]=p[0],l[1]=k,l}o(mK,"mergeData");function gK(l){var p=[];if(l!=null)for(var y in Tr(l))p.push(y);return p}o(gK,"nativeKeysIn");function vK(l){return wx.call(l)}o(vK,"objectToString");function _O(l,p,y){return p=En(p===r?l.length-1:p,0),function(){for(var D=arguments,k=-1,q=En(D.length-p,0),Y=we(q);++k<q;)Y[k]=D[p+k];k=-1;for(var ee=we(p+1);++k<p;)ee[k]=D[k];return ee[p]=y(Y),zs(l,this,ee)}}o(_O,"overRest");function DO(l,p){return p.length<2?l:Al(l,xi(p,0,-1))}o(DO,"parent");function yK(l,p){for(var y=l.length,D=rs(p.length,y),k=Cs(l);D--;){var q=p[D];l[D]=So(q,y)?k[q]:r}return l}o(yK,"reorder");function hC(l,p){if(!(p==="constructor"&&typeof l[p]=="function")&&p!="__proto__")return l[p]}o(hC,"safeGet");var BO=OO(eO),q0=O7||function(l,p){return Tn.setTimeout(l,p)},pC=OO(FH);function RO(l,p,y){var D=p+"";return pC(l,cK(D,xK(aK(D),y)))}o(RO,"setWrapToString");function OO(l){var p=0,y=0;return function(){var D=V7(),k=F-(D-y);if(y=D,k>0){if(++p>=K)return arguments[0]}else p=0;return l.apply(r,arguments)}}o(OO,"shortOut");function Kx(l,p){var y=-1,D=l.length,k=D-1;for(p=p===r?D:p;++y<p;){var q=z2(y,k),Y=l[q];l[q]=l[y],l[y]=Y}return l.length=p,l}o(Kx,"shuffleSelf");var PO=dK(function(l){var p=[];return l.charCodeAt(0)===46&&p.push(""),l.replace(pi,function(y,D,k,q){p.push(k?q.replace(rr,"$1"):D||y)}),p});function Na(l){if(typeof l=="string"||Qs(l))return l;var p=l+"";return p=="0"&&1/l==-oe?"-0":p}o(Na,"toKey");function Nl(l){if(l!=null){try{return xx.call(l)}catch{}try{return l+""}catch{}}return""}o(Nl,"toSource");function xK(l,p){return mi(Re,function(y){var D="_."+y[0];p&y[1]&&!dx(l,D)&&l.push(D)}),l.sort()}o(xK,"updateWrapDetails");function kO(l){if(l instanceof nr)return l.clone();var p=new vi(l.__wrapped__,l.__chain__);return p.__actions__=Cs(l.__actions__),p.__index__=l.__index__,p.__values__=l.__values__,p}o(kO,"wrapperClone");function wK(l,p,y){(y?ms(l,p,y):p===r)?p=1:p=En(qt(p),0);var D=l==null?0:l.length;if(!D||p<1)return[];for(var k=0,q=0,Y=we(Nx(D/p));k<D;)Y[q++]=xi(l,k,k+=p);return Y}o(wK,"chunk");function SK(l){for(var p=-1,y=l==null?0:l.length,D=0,k=[];++p<y;){var q=l[p];q&&(k[D++]=q)}return k}o(SK,"compact");function EK(){var l=arguments.length;if(!l)return[];for(var p=we(l-1),y=arguments[0],D=l;D--;)p[D-1]=arguments[D];return vu(Ut(y)?Cs(y):[y],qn(p,1))}o(EK,"concat");var bK=zt(function(l,p){return on(l)?L0(l,qn(p,1,on,!0)):[]}),AK=zt(function(l,p){var y=wi(p);return on(y)&&(y=r),on(l)?L0(l,qn(p,1,on,!0),Et(y,2)):[]}),CK=zt(function(l,p){var y=wi(p);return on(y)&&(y=r),on(l)?L0(l,qn(p,1,on,!0),r,y):[]});function NK(l,p,y){var D=l==null?0:l.length;return D?(p=y||p===r?1:qt(p),xi(l,p<0?0:p,D)):[]}o(NK,"drop");function TK(l,p,y){var D=l==null?0:l.length;return D?(p=y||p===r?1:qt(p),p=D-p,xi(l,0,p<0?0:p)):[]}o(TK,"dropRight");function IK(l,p){return l&&l.length?Lx(l,Et(p,3),!0,!0):[]}o(IK,"dropRightWhile");function _K(l,p){return l&&l.length?Lx(l,Et(p,3),!0):[]}o(_K,"dropWhile");function DK(l,p,y,D){var k=l==null?0:l.length;return k?(y&&typeof y!="number"&&ms(l,p,y)&&(y=0,D=k),EH(l,p,y,D)):[]}o(DK,"fill");function LO(l,p,y){var D=l==null?0:l.length;if(!D)return-1;var k=y==null?0:qt(y);return k<0&&(k=En(D+k,0)),mx(l,Et(p,3),k)}o(LO,"findIndex");function VO(l,p,y){var D=l==null?0:l.length;if(!D)return-1;var k=D-1;return y!==r&&(k=qt(y),k=y<0?En(D+k,0):rs(k,D-1)),mx(l,Et(p,3),k,!0)}o(VO,"findLastIndex");function UO(l){var p=l==null?0:l.length;return p?qn(l,1):[]}o(UO,"flatten");function BK(l){var p=l==null?0:l.length;return p?qn(l,oe):[]}o(BK,"flattenDeep");function RK(l,p){var y=l==null?0:l.length;return y?(p=p===r?1:qt(p),qn(l,p)):[]}o(RK,"flattenDepth");function OK(l){for(var p=-1,y=l==null?0:l.length,D={};++p<y;){var k=l[p];D[k[0]]=k[1]}return D}o(OK,"fromPairs");function jO(l){return l&&l.length?l[0]:r}o(jO,"head");function PK(l,p,y){var D=l==null?0:l.length;if(!D)return-1;var k=y==null?0:qt(y);return k<0&&(k=En(D+k,0)),Fh(l,p,k)}o(PK,"indexOf");function kK(l){var p=l==null?0:l.length;return p?xi(l,0,-1):[]}o(kK,"initial");var LK=zt(function(l){var p=Hr(l,eC);return p.length&&p[0]===l[0]?K2(p):[]}),VK=zt(function(l){var p=wi(l),y=Hr(l,eC);return p===wi(y)?p=r:y.pop(),y.length&&y[0]===l[0]?K2(y,Et(p,2)):[]}),UK=zt(function(l){var p=wi(l),y=Hr(l,eC);return p=typeof p=="function"?p:r,p&&y.pop(),y.length&&y[0]===l[0]?K2(y,r,p):[]});function jK(l,p){return l==null?"":k7.call(l,p)}o(jK,"join");function wi(l){var p=l==null?0:l.length;return p?l[p-1]:r}o(wi,"last");function MK(l,p,y){var D=l==null?0:l.length;if(!D)return-1;var k=D;return y!==r&&(k=qt(y),k=k<0?En(D+k,0):rs(k,D-1)),p===p?x7(l,p,k):mx(l,xR,k,!0)}o(MK,"lastIndexOf");function FK(l,p){return l&&l.length?JR(l,qt(p)):r}o(FK,"nth");var qK=zt(MO);function MO(l,p){return l&&l.length&&p&&p.length?W2(l,p):l}o(MO,"pullAll");function HK(l,p,y){return l&&l.length&&p&&p.length?W2(l,p,Et(y,2)):l}o(HK,"pullAllBy");function KK(l,p,y){return l&&l.length&&p&&p.length?W2(l,p,r,y):l}o(KK,"pullAllWith");var $K=wo(function(l,p){var y=l==null?0:l.length,D=M2(l,p);return ZR(l,Hr(p,function(k){return So(k,y)?+k:k}).sort(cO)),D});function GK(l,p){var y=[];if(!(l&&l.length))return y;var D=-1,k=[],q=l.length;for(p=Et(p,3);++D<q;){var Y=l[D];p(Y,D,l)&&(y.push(Y),k.push(D))}return ZR(l,k),y}o(GK,"remove");function dC(l){return l==null?l:j7.call(l)}o(dC,"reverse");function XK(l,p,y){var D=l==null?0:l.length;return D?(y&&typeof y!="number"&&ms(l,p,y)?(p=0,y=D):(p=p==null?0:qt(p),y=y===r?D:qt(y)),xi(l,p,y)):[]}o(XK,"slice");function WK(l,p){return kx(l,p)}o(WK,"sortedIndex");function zK(l,p,y){return Y2(l,p,Et(y,2))}o(zK,"sortedIndexBy");function JK(l,p){var y=l==null?0:l.length;if(y){var D=kx(l,p);if(D<y&&Ji(l[D],p))return D}return-1}o(JK,"sortedIndexOf");function YK(l,p){return kx(l,p,!0)}o(YK,"sortedLastIndex");function QK(l,p,y){return Y2(l,p,Et(y,2),!0)}o(QK,"sortedLastIndexBy");function ZK(l,p){var y=l==null?0:l.length;if(y){var D=kx(l,p,!0)-1;if(Ji(l[D],p))return D}return-1}o(ZK,"sortedLastIndexOf");function e$(l){return l&&l.length?tO(l):[]}o(e$,"sortedUniq");function t$(l,p){return l&&l.length?tO(l,Et(p,2)):[]}o(t$,"sortedUniqBy");function r$(l){var p=l==null?0:l.length;return p?xi(l,1,p):[]}o(r$,"tail");function n$(l,p,y){return l&&l.length?(p=y||p===r?1:qt(p),xi(l,0,p<0?0:p)):[]}o(n$,"take");function s$(l,p,y){var D=l==null?0:l.length;return D?(p=y||p===r?1:qt(p),p=D-p,xi(l,p<0?0:p,D)):[]}o(s$,"takeRight");function i$(l,p){return l&&l.length?Lx(l,Et(p,3),!1,!0):[]}o(i$,"takeRightWhile");function a$(l,p){return l&&l.length?Lx(l,Et(p,3)):[]}o(a$,"takeWhile");var o$=zt(function(l){return Eu(qn(l,1,on,!0))}),u$=zt(function(l){var p=wi(l);return on(p)&&(p=r),Eu(qn(l,1,on,!0),Et(p,2))}),c$=zt(function(l){var p=wi(l);return p=typeof p=="function"?p:r,Eu(qn(l,1,on,!0),r,p)});function l$(l){return l&&l.length?Eu(l):[]}o(l$,"uniq");function f$(l,p){return l&&l.length?Eu(l,Et(p,2)):[]}o(f$,"uniqBy");function h$(l,p){return p=typeof p=="function"?p:r,l&&l.length?Eu(l,r,p):[]}o(h$,"uniqWith");function mC(l){if(!(l&&l.length))return[];var p=0;return l=gu(l,function(y){if(on(y))return p=En(y.length,p),!0}),R2(p,function(y){return Hr(l,_2(y))})}o(mC,"unzip");function FO(l,p){if(!(l&&l.length))return[];var y=mC(l);return p==null?y:Hr(y,function(D){return zs(p,r,D)})}o(FO,"unzipWith");var p$=zt(function(l,p){return on(l)?L0(l,p):[]}),d$=zt(function(l){return Z2(gu(l,on))}),m$=zt(function(l){var p=wi(l);return on(p)&&(p=r),Z2(gu(l,on),Et(p,2))}),g$=zt(function(l){var p=wi(l);return p=typeof p=="function"?p:r,Z2(gu(l,on),r,p)}),v$=zt(mC);function y$(l,p){return iO(l||[],p||[],k0)}o(y$,"zipObject");function x$(l,p){return iO(l||[],p||[],j0)}o(x$,"zipObjectDeep");var w$=zt(function(l){var p=l.length,y=p>1?l[p-1]:r;return y=typeof y=="function"?(l.pop(),y):r,FO(l,y)});function qO(l){var p=M(l);return p.__chain__=!0,p}o(qO,"chain");function S$(l,p){return p(l),l}o(S$,"tap");function $x(l,p){return p(l)}o($x,"thru");var E$=wo(function(l){var p=l.length,y=p?l[0]:0,D=this.__wrapped__,k=o(function(q){return M2(q,l)},"interceptor");return p>1||this.__actions__.length||!(D instanceof nr)||!So(y)?this.thru(k):(D=D.slice(y,+y+(p?1:0)),D.__actions__.push({func:$x,args:[k],thisArg:r}),new vi(D,this.__chain__).thru(function(q){return p&&!q.length&&q.push(r),q}))});function b$(){return qO(this)}o(b$,"wrapperChain");function A$(){return new vi(this.value(),this.__chain__)}o(A$,"wrapperCommit");function C$(){this.__values__===r&&(this.__values__=rP(this.value()));var l=this.__index__>=this.__values__.length,p=l?r:this.__values__[this.__index__++];return{done:l,value:p}}o(C$,"wrapperNext");function N$(){return this}o(N$,"wrapperToIterator");function T$(l){for(var p,y=this;y instanceof Dx;){var D=kO(y);D.__index__=0,D.__values__=r,p?k.__wrapped__=D:p=D;var k=D;y=y.__wrapped__}return k.__wrapped__=l,p}o(T$,"wrapperPlant");function I$(){var l=this.__wrapped__;if(l instanceof nr){var p=l;return this.__actions__.length&&(p=new nr(this)),p=p.reverse(),p.__actions__.push({func:$x,args:[dC],thisArg:r}),new vi(p,this.__chain__)}return this.thru(dC)}o(I$,"wrapperReverse");function _$(){return sO(this.__wrapped__,this.__actions__)}o(_$,"wrapperValue");var D$=Vx(function(l,p,y){Sr.call(l,y)?++l[y]:yo(l,y,1)});function B$(l,p,y){var D=Ut(l)?vR:SH;return y&&ms(l,p,y)&&(p=r),D(l,Et(p,3))}o(B$,"every");function R$(l,p){var y=Ut(l)?gu:FR;return y(l,Et(p,3))}o(R$,"filter");var O$=mO(LO),P$=mO(VO);function k$(l,p){return qn(Gx(l,p),1)}o(k$,"flatMap");function L$(l,p){return qn(Gx(l,p),oe)}o(L$,"flatMapDeep");function V$(l,p,y){return y=y===r?1:qt(y),qn(Gx(l,p),y)}o(V$,"flatMapDepth");function HO(l,p){var y=Ut(l)?mi:Su;return y(l,Et(p,3))}o(HO,"forEach");function KO(l,p){var y=Ut(l)?r7:MR;return y(l,Et(p,3))}o(KO,"forEachRight");var U$=Vx(function(l,p,y){Sr.call(l,y)?l[y].push(p):yo(l,y,[p])});function j$(l,p,y,D){l=Ns(l)?l:Qh(l),y=y&&!D?qt(y):0;var k=l.length;return y<0&&(y=En(k+y,0)),Yx(l)?y<=k&&l.indexOf(p,y)>-1:!!k&&Fh(l,p,y)>-1}o(j$,"includes");var M$=zt(function(l,p,y){var D=-1,k=typeof p=="function",q=Ns(l)?we(l.length):[];return Su(l,function(Y){q[++D]=k?zs(p,Y,y):V0(Y,p,y)}),q}),F$=Vx(function(l,p,y){yo(l,y,p)});function Gx(l,p){var y=Ut(l)?Hr:XR;return y(l,Et(p,3))}o(Gx,"map");function q$(l,p,y,D){return l==null?[]:(Ut(p)||(p=p==null?[]:[p]),y=D?r:y,Ut(y)||(y=y==null?[]:[y]),YR(l,p,y))}o(q$,"orderBy");var H$=Vx(function(l,p,y){l[y?0:1].push(p)},function(){return[[],[]]});function K$(l,p,y){var D=Ut(l)?T2:SR,k=arguments.length<3;return D(l,Et(p,4),y,k,Su)}o(K$,"reduce");function $$(l,p,y){var D=Ut(l)?n7:SR,k=arguments.length<3;return D(l,Et(p,4),y,k,MR)}o($$,"reduceRight");function G$(l,p){var y=Ut(l)?gu:FR;return y(l,zx(Et(p,3)))}o(G$,"reject");function X$(l){var p=Ut(l)?LR:jH;return p(l)}o(X$,"sample");function W$(l,p,y){(y?ms(l,p,y):p===r)?p=1:p=qt(p);var D=Ut(l)?gH:MH;return D(l,p)}o(W$,"sampleSize");function z$(l){var p=Ut(l)?vH:qH;return p(l)}o(z$,"shuffle");function J$(l){if(l==null)return 0;if(Ns(l))return Yx(l)?Hh(l):l.length;var p=ns(l);return p==Se||p==Nr?l.size:G2(l).length}o(J$,"size");function Y$(l,p,y){var D=Ut(l)?I2:HH;return y&&ms(l,p,y)&&(p=r),D(l,Et(p,3))}o(Y$,"some");var Q$=zt(function(l,p){if(l==null)return[];var y=p.length;return y>1&&ms(l,p[0],p[1])?p=[]:y>2&&ms(p[0],p[1],p[2])&&(p=[p[0]]),YR(l,qn(p,1),[])}),Xx=R7||function(){return Tn.Date.now()};function Z$(l,p){if(typeof p!="function")throw new gi(s);return l=qt(l),function(){if(--l<1)return p.apply(this,arguments)}}o(Z$,"after");function $O(l,p,y){return p=y?r:p,p=l&&p==null?l.length:p,xo(l,T,r,r,r,r,p)}o($O,"ary");function GO(l,p){var y;if(typeof p!="function")throw new gi(s);return l=qt(l),function(){return--l>0&&(y=p.apply(this,arguments)),l<=1&&(p=r),y}}o(GO,"before");var gC=zt(function(l,p,y){var D=v;if(y.length){var k=yu(y,Jh(gC));D|=b}return xo(l,D,p,y,k)}),XO=zt(function(l,p,y){var D=v|S;if(y.length){var k=yu(y,Jh(XO));D|=b}return xo(p,D,l,y,k)});function WO(l,p,y){p=y?r:p;var D=xo(l,C,r,r,r,r,r,p);return D.placeholder=WO.placeholder,D}o(WO,"curry");function zO(l,p,y){p=y?r:p;var D=xo(l,_,r,r,r,r,r,p);return D.placeholder=zO.placeholder,D}o(zO,"curryRight");function JO(l,p,y){var D,k,q,Y,ee,le,Te=0,Be=!1,Ve=!1,Ze=!0;if(typeof l!="function")throw new gi(s);p=Si(p)||0,Xr(y)&&(Be=!!y.leading,Ve="maxWait"in y,q=Ve?En(Si(y.maxWait)||0,p):q,Ze="trailing"in y?!!y.trailing:Ze);function pt(un){var Yi=D,Ao=k;return D=k=r,Te=un,Y=l.apply(Ao,Yi),Y}o(pt,"invokeFunc");function Nt(un){return Te=un,ee=q0(Yt,p),Be?pt(un):Y}o(Nt,"leadingEdge");function Gt(un){var Yi=un-le,Ao=un-Te,mP=p-Yi;return Ve?rs(mP,q-Ao):mP}o(Gt,"remainingWait");function Tt(un){var Yi=un-le,Ao=un-Te;return le===r||Yi>=p||Yi<0||Ve&&Ao>=q}o(Tt,"shouldInvoke");function Yt(){var un=Xx();if(Tt(un))return ir(un);ee=q0(Yt,Gt(un))}o(Yt,"timerExpired");function ir(un){return ee=r,Ze&&D?pt(un):(D=k=r,Y)}o(ir,"trailingEdge");function Zs(){ee!==r&&aO(ee),Te=0,D=le=k=ee=r}o(Zs,"cancel");function gs(){return ee===r?Y:ir(Xx())}o(gs,"flush");function ei(){var un=Xx(),Yi=Tt(un);if(D=arguments,k=this,le=un,Yi){if(ee===r)return Nt(le);if(Ve)return aO(ee),ee=q0(Yt,p),pt(le)}return ee===r&&(ee=q0(Yt,p)),Y}return o(ei,"debounced"),ei.cancel=Zs,ei.flush=gs,ei}o(JO,"debounce");var eG=zt(function(l,p){return jR(l,1,p)}),tG=zt(function(l,p,y){return jR(l,Si(p)||0,y)});function rG(l){return xo(l,H)}o(rG,"flip");function Wx(l,p){if(typeof l!="function"||p!=null&&typeof p!="function")throw new gi(s);var y=o(function(){var D=arguments,k=p?p.apply(this,D):D[0],q=y.cache;if(q.has(k))return q.get(k);var Y=l.apply(this,D);return y.cache=q.set(k,Y)||q,Y},"memoized");return y.cache=new(Wx.Cache||vo),y}o(Wx,"memoize"),Wx.Cache=vo;function zx(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(zx,"negate");function nG(l){return GO(2,l)}o(nG,"once");var sG=KH(function(l,p){p=p.length==1&&Ut(p[0])?Hr(p[0],Js(Et())):Hr(qn(p,1),Js(Et()));var y=p.length;return zt(function(D){for(var k=-1,q=rs(D.length,y);++k<q;)D[k]=p[k].call(this,D[k]);return zs(l,this,D)})}),vC=zt(function(l,p){var y=yu(p,Jh(vC));return xo(l,b,r,p,y)}),YO=zt(function(l,p){var y=yu(p,Jh(YO));return xo(l,A,r,p,y)}),iG=wo(function(l,p){return xo(l,R,r,r,r,p)});function aG(l,p){if(typeof l!="function")throw new gi(s);return p=p===r?p:qt(p),zt(l,p)}o(aG,"rest");function oG(l,p){if(typeof l!="function")throw new gi(s);return p=p==null?0:En(qt(p),0),zt(function(y){var D=y[p],k=Au(y,0,p);return D&&vu(k,D),zs(l,this,k)})}o(oG,"spread");function uG(l,p,y){var D=!0,k=!0;if(typeof l!="function")throw new gi(s);return Xr(y)&&(D="leading"in y?!!y.leading:D,k="trailing"in y?!!y.trailing:k),JO(l,p,{leading:D,maxWait:p,trailing:k})}o(uG,"throttle");function cG(l){return $O(l,1)}o(cG,"unary");function lG(l,p){return vC(tC(p),l)}o(lG,"wrap");function fG(){if(!arguments.length)return[];var l=arguments[0];return Ut(l)?l:[l]}o(fG,"castArray");function hG(l){return yi(l,m)}o(hG,"clone");function pG(l,p){return p=typeof p=="function"?p:r,yi(l,m,p)}o(pG,"cloneWith");function dG(l){return yi(l,f|m)}o(dG,"cloneDeep");function mG(l,p){return p=typeof p=="function"?p:r,yi(l,f|m,p)}o(mG,"cloneDeepWith");function gG(l,p){return p==null||UR(l,p,In(p))}o(gG,"conformsTo");function Ji(l,p){return l===p||l!==l&&p!==p}o(Ji,"eq");var vG=Fx(H2),yG=Fx(function(l,p){return l>=p}),Tl=KR((function(){return arguments})())?KR:function(l){return Zr(l)&&Sr.call(l,"callee")&&!DR.call(l,"callee")},Ut=we.isArray,xG=fR?Js(fR):TH;function Ns(l){return l!=null&&Jx(l.length)&&!Eo(l)}o(Ns,"isArrayLike");function on(l){return Zr(l)&&Ns(l)}o(on,"isArrayLikeObject");function wG(l){return l===!0||l===!1||Zr(l)&&ds(l)==N}o(wG,"isBoolean");var Cu=P7||IC,SG=hR?Js(hR):IH;function EG(l){return Zr(l)&&l.nodeType===1&&!H0(l)}o(EG,"isElement");function bG(l){if(l==null)return!0;if(Ns(l)&&(Ut(l)||typeof l=="string"||typeof l.splice=="function"||Cu(l)||Yh(l)||Tl(l)))return!l.length;var p=ns(l);if(p==Se||p==Nr)return!l.size;if(F0(l))return!G2(l).length;for(var y in l)if(Sr.call(l,y))return!1;return!0}o(bG,"isEmpty");function AG(l,p){return U0(l,p)}o(AG,"isEqual");function CG(l,p,y){y=typeof y=="function"?y:r;var D=y?y(l,p):r;return D===r?U0(l,p,r,y):!!D}o(CG,"isEqualWith");function yC(l){if(!Zr(l))return!1;var p=ds(l);return p==P||p==X||typeof l.message=="string"&&typeof l.name=="string"&&!H0(l)}o(yC,"isError");function NG(l){return typeof l=="number"&&RR(l)}o(NG,"isFinite");function Eo(l){if(!Xr(l))return!1;var p=ds(l);return p==be||p==Ee||p==ft||p==Gr}o(Eo,"isFunction");function QO(l){return typeof l=="number"&&l==qt(l)}o(QO,"isInteger");function Jx(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=Q}o(Jx,"isLength");function Xr(l){var p=typeof l;return l!=null&&(p=="object"||p=="function")}o(Xr,"isObject");function Zr(l){return l!=null&&typeof l=="object"}o(Zr,"isObjectLike");var ZO=pR?Js(pR):DH;function TG(l,p){return l===p||$2(l,p,uC(p))}o(TG,"isMatch");function IG(l,p,y){return y=typeof y=="function"?y:r,$2(l,p,uC(p),y)}o(IG,"isMatchWith");function _G(l){return eP(l)&&l!=+l}o(_G,"isNaN");function DG(l){if(pK(l))throw new kt(n);return $R(l)}o(DG,"isNative");function BG(l){return l===null}o(BG,"isNull");function RG(l){return l==null}o(RG,"isNil");function eP(l){return typeof l=="number"||Zr(l)&&ds(l)==ze}o(eP,"isNumber");function H0(l){if(!Zr(l)||ds(l)!=Ue)return!1;var p=bx(l);if(p===null)return!0;var y=Sr.call(p,"constructor")&&p.constructor;return typeof y=="function"&&y instanceof y&&xx.call(y)==I7}o(H0,"isPlainObject");var xC=dR?Js(dR):BH;function OG(l){return QO(l)&&l>=-Q&&l<=Q}o(OG,"isSafeInteger");var tP=mR?Js(mR):RH;function Yx(l){return typeof l=="string"||!Ut(l)&&Zr(l)&&ds(l)==qr}o(Yx,"isString");function Qs(l){return typeof l=="symbol"||Zr(l)&&ds(l)==wn}o(Qs,"isSymbol");var Yh=gR?Js(gR):OH;function PG(l){return l===r}o(PG,"isUndefined");function kG(l){return Zr(l)&&ns(l)==hs}o(kG,"isWeakMap");function LG(l){return Zr(l)&&ds(l)==dt}o(LG,"isWeakSet");var VG=Fx(X2),UG=Fx(function(l,p){return l<=p});function rP(l){if(!l)return[];if(Ns(l))return Yx(l)?Wi(l):Cs(l);if(D0&&l[D0])return g7(l[D0]());var p=ns(l),y=p==Se?P2:p==Nr?gx:Qh;return y(l)}o(rP,"toArray");function bo(l){if(!l)return l===0?l:0;if(l=Si(l),l===oe||l===-oe){var p=l<0?-1:1;return p*xe}return l===l?l:0}o(bo,"toFinite");function qt(l){var p=bo(l),y=p%1;return p===p?y?p-y:p:0}o(qt,"toInteger");function nP(l){return l?bl(qt(l),0,Qe):0}o(nP,"toLength");function Si(l){if(typeof l=="number")return l;if(Qs(l))return Me;if(Xr(l)){var p=typeof l.valueOf=="function"?l.valueOf():l;l=Xr(p)?p+"":p}if(typeof l!="string")return l===0?l:+l;l=ER(l);var y=xq.test(l);return y||Sq.test(l)?Zq(l.slice(2),y?2:8):y2.test(l)?Me:+l}o(Si,"toNumber");function sP(l){return Ca(l,Ts(l))}o(sP,"toPlainObject");function jG(l){return l?bl(qt(l),-Q,Q):l===0?l:0}o(jG,"toSafeInteger");function yr(l){return l==null?"":Ys(l)}o(yr,"toString");var MG=Wh(function(l,p){if(F0(p)||Ns(p)){Ca(p,In(p),l);return}for(var y in p)Sr.call(p,y)&&k0(l,y,p[y])}),iP=Wh(function(l,p){Ca(p,Ts(p),l)}),Qx=Wh(function(l,p,y,D){Ca(p,Ts(p),l,D)}),FG=Wh(function(l,p,y,D){Ca(p,In(p),l,D)}),qG=wo(M2);function HG(l,p){var y=Xh(l);return p==null?y:VR(y,p)}o(HG,"create");var KG=zt(function(l,p){l=Tr(l);var y=-1,D=p.length,k=D>2?p[2]:r;for(k&&ms(p[0],p[1],k)&&(D=1);++y<D;)for(var q=p[y],Y=Ts(q),ee=-1,le=Y.length;++ee<le;){var Te=Y[ee],Be=l[Te];(Be===r||Ji(Be,Kh[Te])&&!Sr.call(l,Te))&&(l[Te]=q[Te])}return l}),$G=zt(function(l){return l.push(r,EO),zs(aP,r,l)});function GG(l,p){return yR(l,Et(p,3),Aa)}o(GG,"findKey");function XG(l,p){return yR(l,Et(p,3),q2)}o(XG,"findLastKey");function WG(l,p){return l==null?l:F2(l,Et(p,3),Ts)}o(WG,"forIn");function zG(l,p){return l==null?l:qR(l,Et(p,3),Ts)}o(zG,"forInRight");function JG(l,p){return l&&Aa(l,Et(p,3))}o(JG,"forOwn");function YG(l,p){return l&&q2(l,Et(p,3))}o(YG,"forOwnRight");function QG(l){return l==null?[]:Ox(l,In(l))}o(QG,"functions");function ZG(l){return l==null?[]:Ox(l,Ts(l))}o(ZG,"functionsIn");function wC(l,p,y){var D=l==null?r:Al(l,p);return D===r?y:D}o(wC,"get");function eX(l,p){return l!=null&&CO(l,p,bH)}o(eX,"has");function SC(l,p){return l!=null&&CO(l,p,AH)}o(SC,"hasIn");var tX=vO(function(l,p,y){p!=null&&typeof p.toString!="function"&&(p=wx.call(p)),l[p]=y},bC(Is)),rX=vO(function(l,p,y){p!=null&&typeof p.toString!="function"&&(p=wx.call(p)),Sr.call(l,p)?l[p].push(y):l[p]=[y]},Et),nX=zt(V0);function In(l){return Ns(l)?kR(l):G2(l)}o(In,"keys");function Ts(l){return Ns(l)?kR(l,!0):PH(l)}o(Ts,"keysIn");function sX(l,p){var y={};return p=Et(p,3),Aa(l,function(D,k,q){yo(y,p(D,k,q),D)}),y}o(sX,"mapKeys");function iX(l,p){var y={};return p=Et(p,3),Aa(l,function(D,k,q){yo(y,k,p(D,k,q))}),y}o(iX,"mapValues");var aX=Wh(function(l,p,y){Px(l,p,y)}),aP=Wh(function(l,p,y,D){Px(l,p,y,D)}),oX=wo(function(l,p){var y={};if(l==null)return y;var D=!1;p=Hr(p,function(q){return q=bu(q,l),D||(D=q.length>1),q}),Ca(l,aC(l),y),D&&(y=yi(y,f|h|m,tK));for(var k=p.length;k--;)Q2(y,p[k]);return y});function uX(l,p){return oP(l,zx(Et(p)))}o(uX,"omitBy");var cX=wo(function(l,p){return l==null?{}:LH(l,p)});function oP(l,p){if(l==null)return{};var y=Hr(aC(l),function(D){return[D]});return p=Et(p),QR(l,y,function(D,k){return p(D,k[0])})}o(oP,"pickBy");function lX(l,p,y){p=bu(p,l);var D=-1,k=p.length;for(k||(k=1,l=r);++D<k;){var q=l==null?r:l[Na(p[D])];q===r&&(D=k,q=y),l=Eo(q)?q.call(l):q}return l}o(lX,"result");function fX(l,p,y){return l==null?l:j0(l,p,y)}o(fX,"set");function hX(l,p,y,D){return D=typeof D=="function"?D:r,l==null?l:j0(l,p,y,D)}o(hX,"setWith");var uP=wO(In),cP=wO(Ts);function pX(l,p,y){var D=Ut(l),k=D||Cu(l)||Yh(l);if(p=Et(p,4),y==null){var q=l&&l.constructor;k?y=D?new q:[]:Xr(l)?y=Eo(q)?Xh(bx(l)):{}:y={}}return(k?mi:Aa)(l,function(Y,ee,le){return p(y,Y,ee,le)}),y}o(pX,"transform");function dX(l,p){return l==null?!0:Q2(l,p)}o(dX,"unset");function mX(l,p,y){return l==null?l:nO(l,p,tC(y))}o(mX,"update");function gX(l,p,y,D){return D=typeof D=="function"?D:r,l==null?l:nO(l,p,tC(y),D)}o(gX,"updateWith");function Qh(l){return l==null?[]:O2(l,In(l))}o(Qh,"values");function vX(l){return l==null?[]:O2(l,Ts(l))}o(vX,"valuesIn");function yX(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),bl(Si(l),p,y)}o(yX,"clamp");function xX(l,p,y){return p=bo(p),y===r?(y=p,p=0):y=bo(y),l=Si(l),CH(l,p,y)}o(xX,"inRange");function wX(l,p,y){if(y&&typeof y!="boolean"&&ms(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 D=l;l=p,p=D}if(y||l%1||p%1){var k=OR();return rs(l+k*(p-l+Qq("1e-"+((k+"").length-1))),p)}return z2(l,p)}o(wX,"random");var SX=zh(function(l,p,y){return p=p.toLowerCase(),l+(y?lP(p):p)});function lP(l){return EC(yr(l).toLowerCase())}o(lP,"capitalize");function fP(l){return l=yr(l),l&&l.replace(bq,f7).replace(qq,"")}o(fP,"deburr");function EX(l,p,y){l=yr(l),p=Ys(p);var D=l.length;y=y===r?D:bl(qt(y),0,D);var k=y;return y-=p.length,y>=0&&l.slice(y,k)==p}o(EX,"endsWith");function bX(l){return l=yr(l),l&&it.test(l)?l.replace(ae,h7):l}o(bX,"escape");function AX(l){return l=yr(l),l&&ba.test(l)?l.replace(cr,"\\$&"):l}o(AX,"escapeRegExp");var CX=zh(function(l,p,y){return l+(y?"-":"")+p.toLowerCase()}),NX=zh(function(l,p,y){return l+(y?" ":"")+p.toLowerCase()}),TX=dO("toLowerCase");function IX(l,p,y){l=yr(l),p=qt(p);var D=p?Hh(l):0;if(!p||D>=p)return l;var k=(p-D)/2;return Mx(Tx(k),y)+l+Mx(Nx(k),y)}o(IX,"pad");function _X(l,p,y){l=yr(l),p=qt(p);var D=p?Hh(l):0;return p&&D<p?l+Mx(p-D,y):l}o(_X,"padEnd");function DX(l,p,y){l=yr(l),p=qt(p);var D=p?Hh(l):0;return p&&D<p?Mx(p-D,y)+l:l}o(DX,"padStart");function BX(l,p,y){return y||p==null?p=0:p&&(p=+p),U7(yr(l).replace(I0,""),p||0)}o(BX,"parseInt1");function RX(l,p,y){return(y?ms(l,p,y):p===r)?p=1:p=qt(p),J2(yr(l),p)}o(RX,"repeat");function OX(){var l=arguments,p=yr(l[0]);return l.length<3?p:p.replace(l[1],l[2])}o(OX,"replace");var PX=zh(function(l,p,y){return l+(y?"_":"")+p.toLowerCase()});function kX(l,p,y){return y&&typeof y!="number"&&ms(l,p,y)&&(p=y=r),y=y===r?Qe:y>>>0,y?(l=yr(l),l&&(typeof p=="string"||p!=null&&!xC(p))&&(p=Ys(p),!p&&qh(l))?Au(Wi(l),0,y):l.split(p,y)):[]}o(kX,"split");var LX=zh(function(l,p,y){return l+(y?" ":"")+EC(p)});function VX(l,p,y){return l=yr(l),y=y==null?0:bl(qt(y),0,l.length),p=Ys(p),l.slice(y,y+p.length)==p}o(VX,"startsWith");function UX(l,p,y){var D=M.templateSettings;y&&ms(l,p,y)&&(p=r),l=yr(l),p=Qx({},p,D,SO);var k=Qx({},p.imports,D.imports,SO),q=In(k),Y=O2(k,q),ee,le,Te=0,Be=p.interpolate||fx,Ve="__p += '",Ze=k2((p.escape||fx).source+"|"+Be.source+"|"+(Be===rt?ts:fx).source+"|"+(p.evaluate||fx).source+"|$","g"),pt="//# sourceURL="+(Sr.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Xq+"]")+`
30
+ `;l.replace(Ze,function(Tt,Yt,ir,Zs,gs,ei){return ir||(ir=Zs),Ve+=l.slice(Te,ei).replace(Aq,p7),Yt&&(ee=!0,Ve+=`' +
31
+ __e(`+Yt+`) +
32
+ '`),gs&&(le=!0,Ve+=`';
33
+ `+gs+`;
34
+ __p += '`),ir&&(Ve+=`' +
35
+ ((__t = (`+ir+`)) == null ? '' : __t) +
36
+ '`),Te=ei+Tt.length,Tt}),Ve+=`';
37
+ `;var Nt=Sr.call(p,"variable")&&p.variable;if(!Nt)Ve=`with (obj) {
38
+ `+Ve+`
39
+ }
40
+ `;else if(He.test(Nt))throw new kt(i);Ve=(le?Ve.replace(d,""):Ve).replace(B,"$1").replace(G,"$1;"),Ve="function("+(Nt||"obj")+`) {
41
+ `+(Nt?"":`obj || (obj = {});
42
+ `)+"var __t, __p = ''"+(ee?", __e = _.escape":"")+(le?`, __j = Array.prototype.join;
43
+ function print() { __p += __j.call(arguments, '') }
44
+ `:`;
45
+ `)+Ve+`return __p
46
+ }`;var Gt=pP(function(){return vr(q,pt+"return "+Ve).apply(r,Y)});if(Gt.source=Ve,yC(Gt))throw Gt;return Gt}o(UX,"template");function jX(l){return yr(l).toLowerCase()}o(jX,"toLower");function MX(l){return yr(l).toUpperCase()}o(MX,"toUpper");function FX(l,p,y){if(l=yr(l),l&&(y||p===r))return ER(l);if(!l||!(p=Ys(p)))return l;var D=Wi(l),k=Wi(p),q=bR(D,k),Y=AR(D,k)+1;return Au(D,q,Y).join("")}o(FX,"trim");function qX(l,p,y){if(l=yr(l),l&&(y||p===r))return l.slice(0,NR(l)+1);if(!l||!(p=Ys(p)))return l;var D=Wi(l),k=AR(D,Wi(p))+1;return Au(D,0,k).join("")}o(qX,"trimEnd");function HX(l,p,y){if(l=yr(l),l&&(y||p===r))return l.replace(I0,"");if(!l||!(p=Ys(p)))return l;var D=Wi(l),k=bR(D,Wi(p));return Au(D,k).join("")}o(HX,"trimStart");function KX(l,p){var y=I,D=$;if(Xr(p)){var k="separator"in p?p.separator:k;y="length"in p?qt(p.length):y,D="omission"in p?Ys(p.omission):D}l=yr(l);var q=l.length;if(qh(l)){var Y=Wi(l);q=Y.length}if(y>=q)return l;var ee=y-Hh(D);if(ee<1)return D;var le=Y?Au(Y,0,ee).join(""):l.slice(0,ee);if(k===r)return le+D;if(Y&&(ee+=le.length-ee),xC(k)){if(l.slice(ee).search(k)){var Te,Be=le;for(k.global||(k=k2(k.source,yr(Xi.exec(k))+"g")),k.lastIndex=0;Te=k.exec(Be);)var Ve=Te.index;le=le.slice(0,Ve===r?ee:Ve)}}else if(l.indexOf(Ys(k),ee)!=ee){var Ze=le.lastIndexOf(k);Ze>-1&&(le=le.slice(0,Ze))}return le+D}o(KX,"truncate");function $X(l){return l=yr(l),l&&W.test(l)?l.replace(ne,w7):l}o($X,"unescape");var GX=zh(function(l,p,y){return l+(y?" ":"")+p.toUpperCase()}),EC=dO("toUpperCase");function hP(l,p,y){return l=yr(l),p=y?r:p,p===r?m7(l)?b7(l):a7(l):l.match(p)||[]}o(hP,"words");var pP=zt(function(l,p){try{return zs(l,r,p)}catch(y){return yC(y)?y:new kt(y)}}),XX=wo(function(l,p){return mi(p,function(y){y=Na(y),yo(l,y,gC(l[y],l))}),l});function WX(l){var p=l==null?0:l.length,y=Et();return l=p?Hr(l,function(D){if(typeof D[1]!="function")throw new gi(s);return[y(D[0]),D[1]]}):[],zt(function(D){for(var k=-1;++k<p;){var q=l[k];if(zs(q[0],this,D))return zs(q[1],this,D)}})}o(WX,"cond");function zX(l){return wH(yi(l,f))}o(zX,"conforms");function bC(l){return function(){return l}}o(bC,"constant");function JX(l,p){return l==null||l!==l?p:l}o(JX,"defaultTo");var YX=gO(),QX=gO(!0);function Is(l){return l}o(Is,"identity");function AC(l){return GR(typeof l=="function"?l:yi(l,f))}o(AC,"iteratee");function ZX(l){return WR(yi(l,f))}o(ZX,"matches");function eW(l,p){return zR(l,yi(p,f))}o(eW,"matchesProperty");var tW=zt(function(l,p){return function(y){return V0(y,l,p)}}),rW=zt(function(l,p){return function(y){return V0(l,y,p)}});function CC(l,p,y){var D=In(p),k=Ox(p,D);y==null&&!(Xr(p)&&(k.length||!D.length))&&(y=p,p=l,l=this,k=Ox(p,In(p)));var q=!(Xr(y)&&"chain"in y)||!!y.chain,Y=Eo(l);return mi(k,function(ee){var le=p[ee];l[ee]=le,Y&&(l.prototype[ee]=function(){var Te=this.__chain__;if(q||Te){var Be=l(this.__wrapped__),Ve=Be.__actions__=Cs(this.__actions__);return Ve.push({func:le,args:arguments,thisArg:l}),Be.__chain__=Te,Be}return le.apply(l,vu([this.value()],arguments))})}),l}o(CC,"mixin");function nW(){return Tn._===this&&(Tn._=_7),this}o(nW,"noConflict");function NC(){}o(NC,"noop");function sW(l){return l=qt(l),zt(function(p){return JR(p,l)})}o(sW,"nthArg");var iW=nC(Hr),aW=nC(vR),oW=nC(I2);function dP(l){return lC(l)?_2(Na(l)):VH(l)}o(dP,"property");function uW(l){return function(p){return l==null?r:Al(l,p)}}o(uW,"propertyOf");var cW=yO(),lW=yO(!0);function TC(){return[]}o(TC,"stubArray");function IC(){return!1}o(IC,"stubFalse");function fW(){return{}}o(fW,"stubObject");function hW(){return""}o(hW,"stubString");function pW(){return!0}o(pW,"stubTrue");function dW(l,p){if(l=qt(l),l<1||l>Q)return[];var y=Qe,D=rs(l,Qe);p=Et(p),l-=Qe;for(var k=R2(D,p);++y<l;)p(y);return k}o(dW,"times");function mW(l){return Ut(l)?Hr(l,Na):Qs(l)?[l]:Cs(PO(yr(l)))}o(mW,"toPath");function gW(l){var p=++T7;return yr(l)+p}o(gW,"uniqueId");var vW=jx(function(l,p){return l+p},0),yW=sC("ceil"),xW=jx(function(l,p){return l/p},1),wW=sC("floor");function SW(l){return l&&l.length?Rx(l,Is,H2):r}o(SW,"max");function EW(l,p){return l&&l.length?Rx(l,Et(p,2),H2):r}o(EW,"maxBy");function bW(l){return wR(l,Is)}o(bW,"mean");function AW(l,p){return wR(l,Et(p,2))}o(AW,"meanBy");function CW(l){return l&&l.length?Rx(l,Is,X2):r}o(CW,"min");function NW(l,p){return l&&l.length?Rx(l,Et(p,2),X2):r}o(NW,"minBy");var TW=jx(function(l,p){return l*p},1),IW=sC("round"),_W=jx(function(l,p){return l-p},0);function DW(l){return l&&l.length?B2(l,Is):0}o(DW,"sum");function BW(l,p){return l&&l.length?B2(l,Et(p,2)):0}return o(BW,"sumBy"),M.after=Z$,M.ary=$O,M.assign=MG,M.assignIn=iP,M.assignInWith=Qx,M.assignWith=FG,M.at=qG,M.before=GO,M.bind=gC,M.bindAll=XX,M.bindKey=XO,M.castArray=fG,M.chain=qO,M.chunk=wK,M.compact=SK,M.concat=EK,M.cond=WX,M.conforms=zX,M.constant=bC,M.countBy=D$,M.create=HG,M.curry=WO,M.curryRight=zO,M.debounce=JO,M.defaults=KG,M.defaultsDeep=$G,M.defer=eG,M.delay=tG,M.difference=bK,M.differenceBy=AK,M.differenceWith=CK,M.drop=NK,M.dropRight=TK,M.dropRightWhile=IK,M.dropWhile=_K,M.fill=DK,M.filter=R$,M.flatMap=k$,M.flatMapDeep=L$,M.flatMapDepth=V$,M.flatten=UO,M.flattenDeep=BK,M.flattenDepth=RK,M.flip=rG,M.flow=YX,M.flowRight=QX,M.fromPairs=OK,M.functions=QG,M.functionsIn=ZG,M.groupBy=U$,M.initial=kK,M.intersection=LK,M.intersectionBy=VK,M.intersectionWith=UK,M.invert=tX,M.invertBy=rX,M.invokeMap=M$,M.iteratee=AC,M.keyBy=F$,M.keys=In,M.keysIn=Ts,M.map=Gx,M.mapKeys=sX,M.mapValues=iX,M.matches=ZX,M.matchesProperty=eW,M.memoize=Wx,M.merge=aX,M.mergeWith=aP,M.method=tW,M.methodOf=rW,M.mixin=CC,M.negate=zx,M.nthArg=sW,M.omit=oX,M.omitBy=uX,M.once=nG,M.orderBy=q$,M.over=iW,M.overArgs=sG,M.overEvery=aW,M.overSome=oW,M.partial=vC,M.partialRight=YO,M.partition=H$,M.pick=cX,M.pickBy=oP,M.property=dP,M.propertyOf=uW,M.pull=qK,M.pullAll=MO,M.pullAllBy=HK,M.pullAllWith=KK,M.pullAt=$K,M.range=cW,M.rangeRight=lW,M.rearg=iG,M.reject=G$,M.remove=GK,M.rest=aG,M.reverse=dC,M.sampleSize=W$,M.set=fX,M.setWith=hX,M.shuffle=z$,M.slice=XK,M.sortBy=Q$,M.sortedUniq=e$,M.sortedUniqBy=t$,M.split=kX,M.spread=oG,M.tail=r$,M.take=n$,M.takeRight=s$,M.takeRightWhile=i$,M.takeWhile=a$,M.tap=S$,M.throttle=uG,M.thru=$x,M.toArray=rP,M.toPairs=uP,M.toPairsIn=cP,M.toPath=mW,M.toPlainObject=sP,M.transform=pX,M.unary=cG,M.union=o$,M.unionBy=u$,M.unionWith=c$,M.uniq=l$,M.uniqBy=f$,M.uniqWith=h$,M.unset=dX,M.unzip=mC,M.unzipWith=FO,M.update=mX,M.updateWith=gX,M.values=Qh,M.valuesIn=vX,M.without=p$,M.words=hP,M.wrap=lG,M.xor=d$,M.xorBy=m$,M.xorWith=g$,M.zip=v$,M.zipObject=y$,M.zipObjectDeep=x$,M.zipWith=w$,M.entries=uP,M.entriesIn=cP,M.extend=iP,M.extendWith=Qx,CC(M,M),M.add=vW,M.attempt=pP,M.camelCase=SX,M.capitalize=lP,M.ceil=yW,M.clamp=yX,M.clone=hG,M.cloneDeep=dG,M.cloneDeepWith=mG,M.cloneWith=pG,M.conformsTo=gG,M.deburr=fP,M.defaultTo=JX,M.divide=xW,M.endsWith=EX,M.eq=Ji,M.escape=bX,M.escapeRegExp=AX,M.every=B$,M.find=O$,M.findIndex=LO,M.findKey=GG,M.findLast=P$,M.findLastIndex=VO,M.findLastKey=XG,M.floor=wW,M.forEach=HO,M.forEachRight=KO,M.forIn=WG,M.forInRight=zG,M.forOwn=JG,M.forOwnRight=YG,M.get=wC,M.gt=vG,M.gte=yG,M.has=eX,M.hasIn=SC,M.head=jO,M.identity=Is,M.includes=j$,M.indexOf=PK,M.inRange=xX,M.invoke=nX,M.isArguments=Tl,M.isArray=Ut,M.isArrayBuffer=xG,M.isArrayLike=Ns,M.isArrayLikeObject=on,M.isBoolean=wG,M.isBuffer=Cu,M.isDate=SG,M.isElement=EG,M.isEmpty=bG,M.isEqual=AG,M.isEqualWith=CG,M.isError=yC,M.isFinite=NG,M.isFunction=Eo,M.isInteger=QO,M.isLength=Jx,M.isMap=ZO,M.isMatch=TG,M.isMatchWith=IG,M.isNaN=_G,M.isNative=DG,M.isNil=RG,M.isNull=BG,M.isNumber=eP,M.isObject=Xr,M.isObjectLike=Zr,M.isPlainObject=H0,M.isRegExp=xC,M.isSafeInteger=OG,M.isSet=tP,M.isString=Yx,M.isSymbol=Qs,M.isTypedArray=Yh,M.isUndefined=PG,M.isWeakMap=kG,M.isWeakSet=LG,M.join=jK,M.kebabCase=CX,M.last=wi,M.lastIndexOf=MK,M.lowerCase=NX,M.lowerFirst=TX,M.lt=VG,M.lte=UG,M.max=SW,M.maxBy=EW,M.mean=bW,M.meanBy=AW,M.min=CW,M.minBy=NW,M.stubArray=TC,M.stubFalse=IC,M.stubObject=fW,M.stubString=hW,M.stubTrue=pW,M.multiply=TW,M.nth=FK,M.noConflict=nW,M.noop=NC,M.now=Xx,M.pad=IX,M.padEnd=_X,M.padStart=DX,M.parseInt=BX,M.random=wX,M.reduce=K$,M.reduceRight=$$,M.repeat=RX,M.replace=OX,M.result=lX,M.round=IW,M.runInContext=ie,M.sample=X$,M.size=J$,M.snakeCase=PX,M.some=Y$,M.sortedIndex=WK,M.sortedIndexBy=zK,M.sortedIndexOf=JK,M.sortedLastIndex=YK,M.sortedLastIndexBy=QK,M.sortedLastIndexOf=ZK,M.startCase=LX,M.startsWith=VX,M.subtract=_W,M.sum=DW,M.sumBy=BW,M.template=UX,M.times=dW,M.toFinite=bo,M.toInteger=qt,M.toLength=nP,M.toLower=jX,M.toNumber=Si,M.toSafeInteger=jG,M.toString=yr,M.toUpper=MX,M.trim=FX,M.trimEnd=qX,M.trimStart=HX,M.truncate=KX,M.unescape=$X,M.uniqueId=gW,M.upperCase=GX,M.upperFirst=EC,M.each=HO,M.eachRight=KO,M.first=jO,CC(M,(function(){var l={};return Aa(M,function(p,y){Sr.call(M.prototype,y)||(l[y]=p)}),l})(),{chain:!1}),M.VERSION=e,mi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){M[l].placeholder=M}),mi(["drop","take"],function(l,p){nr.prototype[l]=function(y){y=y===r?1:En(qt(y),0);var D=this.__filtered__&&!p?new nr(this):this.clone();return D.__filtered__?D.__takeCount__=rs(y,D.__takeCount__):D.__views__.push({size:rs(y,Qe),type:l+(D.__dir__<0?"Right":"")}),D},nr.prototype[l+"Right"]=function(y){return this.reverse()[l](y).reverse()}}),mi(["filter","map","takeWhile"],function(l,p){var y=p+1,D=y==z||y==pe;nr.prototype[l]=function(k){var q=this.clone();return q.__iteratees__.push({iteratee:Et(k,3),type:y}),q.__filtered__=q.__filtered__||D,q}}),mi(["head","last"],function(l,p){var y="take"+(p?"Right":"");nr.prototype[l]=function(){return this[y](1).value()[0]}}),mi(["initial","tail"],function(l,p){var y="drop"+(p?"":"Right");nr.prototype[l]=function(){return this.__filtered__?new nr(this):this[y](1)}}),nr.prototype.compact=function(){return this.filter(Is)},nr.prototype.find=function(l){return this.filter(l).head()},nr.prototype.findLast=function(l){return this.reverse().find(l)},nr.prototype.invokeMap=zt(function(l,p){return typeof l=="function"?new nr(this):this.map(function(y){return V0(y,l,p)})}),nr.prototype.reject=function(l){return this.filter(zx(Et(l)))},nr.prototype.slice=function(l,p){l=qt(l);var y=this;return y.__filtered__&&(l>0||p<0)?new nr(y):(l<0?y=y.takeRight(-l):l&&(y=y.drop(l)),p!==r&&(p=qt(p),y=p<0?y.dropRight(-p):y.take(p-l)),y)},nr.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},nr.prototype.toArray=function(){return this.take(Qe)},Aa(nr.prototype,function(l,p){var y=/^(?:filter|find|map|reject)|While$/.test(p),D=/^(?:head|last)$/.test(p),k=M[D?"take"+(p=="last"?"Right":""):p],q=D||/^find/.test(p);k&&(M.prototype[p]=function(){var Y=this.__wrapped__,ee=D?[1]:arguments,le=Y instanceof nr,Te=ee[0],Be=le||Ut(Y),Ve=o(function(Yt){var ir=k.apply(M,vu([Yt],ee));return D&&Ze?ir[0]:ir},"interceptor");Be&&y&&typeof Te=="function"&&Te.length!=1&&(le=Be=!1);var Ze=this.__chain__,pt=!!this.__actions__.length,Nt=q&&!Ze,Gt=le&&!pt;if(!q&&Be){Y=Gt?Y:new nr(this);var Tt=l.apply(Y,ee);return Tt.__actions__.push({func:$x,args:[Ve],thisArg:r}),new vi(Tt,Ze)}return Nt&&Gt?l.apply(this,ee):(Tt=this.thru(Ve),Nt?D?Tt.value()[0]:Tt.value():Tt)})}),mi(["pop","push","shift","sort","splice","unshift"],function(l){var p=vx[l],y=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",D=/^(?:pop|shift)$/.test(l);M.prototype[l]=function(){var k=arguments;if(D&&!this.__chain__){var q=this.value();return p.apply(Ut(q)?q:[],k)}return this[y](function(Y){return p.apply(Ut(Y)?Y:[],k)})}}),Aa(nr.prototype,function(l,p){var y=M[p];if(y){var D=y.name+"";Sr.call(Gh,D)||(Gh[D]=[]),Gh[D].push({name:p,func:y})}}),Gh[Ux(r,S).name]=[{name:"wrapper",func:r}],nr.prototype.clone=$7,nr.prototype.reverse=G7,nr.prototype.value=X7,M.prototype.at=E$,M.prototype.chain=b$,M.prototype.commit=A$,M.prototype.next=C$,M.prototype.plant=T$,M.prototype.reverse=I$,M.prototype.toJSON=M.prototype.valueOf=M.prototype.value=_$,M.prototype.first=M.prototype.head,D0&&(M.prototype[D0]=N$),M},"runInContext"),xu=A7();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Tn._=xu,define(function(){return xu})):xl?((xl.exports=xu)._=xu,A2._=xu):Tn._=xu}).call(bp)});var v4=te((Sme,g4)=>{"use strict";var m4=We("stream").Stream,UZ=We("util");g4.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");UZ.inherits(ra,m4);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=m4.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 S4=te((bme,w4)=>{"use strict";var jZ=We("util"),x4=We("stream").Stream,y4=v4();w4.exports=tn;function tn(){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(tn,"CombinedStream");jZ.inherits(tn,x4);tn.create=function(r){var e=new this;r=r||{};for(var t in r)e[t]=r[t];return e};tn.isStreamLike=function(r){return typeof r!="function"&&typeof r!="string"&&typeof r!="boolean"&&typeof r!="number"&&!Buffer.isBuffer(r)};tn.prototype.append=function(r){var e=tn.isStreamLike(r);if(e){if(!(r instanceof y4)){var t=y4.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};tn.prototype.pipe=function(r,e){return x4.prototype.pipe.call(this,r,e),this.resume(),r};tn.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}};tn.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=tn.isStreamLike(t);n&&(t.on("data",this._checkDataSize.bind(this)),this._handleErrors(t)),this._pipeNext(t)}).bind(this))};tn.prototype._pipeNext=function(r){this._currentStream=r;var e=tn.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()};tn.prototype._handleErrors=function(r){var e=this;r.on("error",function(t){e._emitError(t)})};tn.prototype.write=function(r){this.emit("data",r)};tn.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};tn.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")};tn.prototype.end=function(){this._reset(),this.emit("end")};tn.prototype.destroy=function(){this._reset(),this.emit("close")};tn.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};tn.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var r="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(r))}};tn.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)};tn.prototype._emitError=function(r){this._reset(),this.emit("error",r)}});var E4=te((Cme,MZ)=>{MZ.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 A4=te((Nme,b4)=>{"use strict";b4.exports=E4()});var T4=te(Os=>{"use strict";var Xw=A4(),FZ=We("path").extname,C4=/^\s*([^;\s]*)(?:;|\s|$)/,qZ=/^text\//i;Os.charset=N4;Os.charsets={lookup:N4};Os.contentType=HZ;Os.extension=KZ;Os.extensions=Object.create(null);Os.lookup=$Z;Os.types=Object.create(null);GZ(Os.extensions,Os.types);function N4(r){if(!r||typeof r!="string")return!1;var e=C4.exec(r),t=e&&Xw[e[1].toLowerCase()];return t&&t.charset?t.charset:e&&qZ.test(e[1])?"UTF-8":!1}o(N4,"charset");function HZ(r){if(!r||typeof r!="string")return!1;var e=r.indexOf("/")===-1?Os.lookup(r):r;if(!e)return!1;if(e.indexOf("charset")===-1){var t=Os.charset(e);t&&(e+="; charset="+t.toLowerCase())}return e}o(HZ,"contentType");function KZ(r){if(!r||typeof r!="string")return!1;var e=C4.exec(r),t=e&&Os.extensions[e[1].toLowerCase()];return!t||!t.length?!1:t[0]}o(KZ,"extension");function $Z(r){if(!r||typeof r!="string")return!1;var e=FZ("x."+r).toLowerCase().substr(1);return e&&Os.types[e]||!1}o($Z,"lookup");function GZ(r,e){var t=["nginx","apache",void 0,"iana"];Object.keys(Xw).forEach(o(function(s){var i=Xw[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(Xw[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(GZ,"populateMaps")});var _4=te((_me,I4)=>{"use strict";I4.exports=XZ;function XZ(r){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(r):setTimeout(r,0)}o(XZ,"defer")});var XN=te((Bme,B4)=>{"use strict";var D4=_4();B4.exports=WZ;function WZ(r){var e=!1;return D4(function(){e=!0}),o(function(n,s){e?r(n,s):D4(o(function(){r(n,s)},"nextTick_callback"))},"async_callback")}o(WZ,"async")});var WN=te((Ome,R4)=>{"use strict";R4.exports=zZ;function zZ(r){Object.keys(r.jobs).forEach(JZ.bind(r)),r.jobs={}}o(zZ,"abort");function JZ(r){typeof this.jobs[r]=="function"&&this.jobs[r]()}o(JZ,"clean")});var zN=te((kme,P4)=>{"use strict";var O4=XN(),YZ=WN();P4.exports=QZ;function QZ(r,e,t,n){var s=t.keyedList?t.keyedList[t.index]:t.index;t.jobs[s]=ZZ(e,s,r[s],function(i,a){s in t.jobs&&(delete t.jobs[s],i?YZ(t):t.results[s]=a,n(i,t.results))})}o(QZ,"iterate");function ZZ(r,e,t,n){var s;return r.length==2?s=r(t,O4(n)):s=r(t,e,O4(n)),s}o(ZZ,"runJob")});var JN=te((Vme,k4)=>{"use strict";k4.exports=eee;function eee(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(eee,"state")});var YN=te((jme,L4)=>{"use strict";var tee=WN(),ree=XN();L4.exports=nee;function nee(r){Object.keys(this.jobs).length&&(this.index=this.size,tee(this),ree(r)(null,this.results))}o(nee,"terminator")});var U4=te((Fme,V4)=>{"use strict";var see=zN(),iee=JN(),aee=YN();V4.exports=oee;function oee(r,e,t){for(var n=iee(r);n.index<(n.keyedList||r).length;)see(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 aee.bind(n,t)}o(oee,"parallel")});var QN=te((Hme,Ww)=>{"use strict";var j4=zN(),uee=JN(),cee=YN();Ww.exports=lee;Ww.exports.ascending=M4;Ww.exports.descending=fee;function lee(r,e,t,n){var s=uee(r,t);return j4(r,e,s,o(function i(a,u){if(a){n(a,u);return}if(s.index++,s.index<(s.keyedList||r).length){j4(r,e,s,i);return}n(null,s.results)},"iteratorHandler")),cee.bind(s,n)}o(lee,"serialOrdered");function M4(r,e){return r<e?-1:r>e?1:0}o(M4,"ascending");function fee(r,e){return-1*M4(r,e)}o(fee,"descending")});var q4=te(($me,F4)=>{"use strict";var hee=QN();F4.exports=pee;function pee(r,e,t){return hee(r,e,null,t)}o(pee,"serial")});var K4=te((Xme,H4)=>{"use strict";H4.exports={parallel:U4(),serial:q4(),serialOrdered:QN()}});var ZN=te((Wme,$4)=>{"use strict";$4.exports=Object});var X4=te((zme,G4)=>{"use strict";G4.exports=Error});var z4=te((Jme,W4)=>{"use strict";W4.exports=EvalError});var Y4=te((Yme,J4)=>{"use strict";J4.exports=RangeError});var Z4=te((Qme,Q4)=>{"use strict";Q4.exports=ReferenceError});var tL=te((Zme,eL)=>{"use strict";eL.exports=SyntaxError});var zw=te((e0e,rL)=>{"use strict";rL.exports=TypeError});var sL=te((t0e,nL)=>{"use strict";nL.exports=URIError});var aL=te((r0e,iL)=>{"use strict";iL.exports=Math.abs});var uL=te((n0e,oL)=>{"use strict";oL.exports=Math.floor});var lL=te((s0e,cL)=>{"use strict";cL.exports=Math.max});var hL=te((i0e,fL)=>{"use strict";fL.exports=Math.min});var dL=te((a0e,pL)=>{"use strict";pL.exports=Math.pow});var gL=te((o0e,mL)=>{"use strict";mL.exports=Math.round});var yL=te((u0e,vL)=>{"use strict";vL.exports=Number.isNaN||o(function(e){return e!==e},"isNaN")});var wL=te((l0e,xL)=>{"use strict";var dee=yL();xL.exports=o(function(e){return dee(e)||e===0?e:e<0?-1:1},"sign")});var EL=te((h0e,SL)=>{"use strict";SL.exports=Object.getOwnPropertyDescriptor});var eT=te((p0e,bL)=>{"use strict";var Jw=EL();if(Jw)try{Jw([],"length")}catch{Jw=null}bL.exports=Jw});var CL=te((d0e,AL)=>{"use strict";var Yw=Object.defineProperty||!1;if(Yw)try{Yw({},"a",{value:1})}catch{Yw=!1}AL.exports=Yw});var tT=te((m0e,NL)=>{"use strict";NL.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 _L=te((v0e,IL)=>{"use strict";var TL=typeof Symbol<"u"&&Symbol,mee=tT();IL.exports=o(function(){return typeof TL!="function"||typeof Symbol!="function"||typeof TL("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:mee()},"hasNativeSymbols")});var rT=te((x0e,DL)=>{"use strict";DL.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var nT=te((w0e,BL)=>{"use strict";var gee=ZN();BL.exports=gee.getPrototypeOf||null});var PL=te((S0e,OL)=>{"use strict";var vee="Function.prototype.bind called on incompatible ",yee=Object.prototype.toString,xee=Math.max,wee="[object Function]",RL=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"),See=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"),Eee=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");OL.exports=o(function(e){var t=this;if(typeof t!="function"||yee.apply(t)!==wee)throw new TypeError(vee+t);for(var n=See(arguments,1),s,i=o(function(){if(this instanceof s){var h=t.apply(this,RL(n,arguments));return Object(h)===h?h:this}return t.apply(e,RL(n,arguments))},"binder"),a=xee(0,t.length-n.length),u=[],c=0;c<a;c++)u[c]="$"+c;if(s=Function("binder","return function ("+Eee(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=te((b0e,kL)=>{"use strict";var bee=PL();kL.exports=Function.prototype.bind||bee});var Qw=te((A0e,LL)=>{"use strict";LL.exports=Function.prototype.call});var sT=te((C0e,VL)=>{"use strict";VL.exports=Function.prototype.apply});var jL=te((N0e,UL)=>{"use strict";UL.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var FL=te((T0e,ML)=>{"use strict";var Aee=lg(),Cee=sT(),Nee=Qw(),Tee=jL();ML.exports=Tee||Aee.call(Nee,Cee)});var HL=te((I0e,qL)=>{"use strict";var Iee=lg(),_ee=zw(),Dee=Qw(),Bee=FL();qL.exports=o(function(e){if(e.length<1||typeof e[0]!="function")throw new _ee("a function is required");return Bee(Iee,Dee,e)},"callBindBasic")});var zL=te((D0e,WL)=>{"use strict";var Ree=HL(),KL=eT(),GL;try{GL=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var iT=!!GL&&KL&&KL(Object.prototype,"__proto__"),XL=Object,$L=XL.getPrototypeOf;WL.exports=iT&&typeof iT.get=="function"?Ree([iT.get]):typeof $L=="function"?o(function(e){return $L(e==null?e:XL(e))},"getDunder"):!1});var e8=te((R0e,ZL)=>{"use strict";var JL=rT(),YL=nT(),QL=zL();ZL.exports=JL?o(function(e){return JL(e)},"getProto"):YL?o(function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return YL(e)},"getProto"):QL?o(function(e){return QL(e)},"getProto"):null});var Zw=te((P0e,t8)=>{"use strict";var Oee=Function.prototype.call,Pee=Object.prototype.hasOwnProperty,kee=lg();t8.exports=kee.call(Oee,Pee)});var u8=te((k0e,o8)=>{"use strict";var tr,Lee=ZN(),Vee=X4(),Uee=z4(),jee=Y4(),Mee=Z4(),Tp=tL(),Np=zw(),Fee=sL(),qee=aL(),Hee=uL(),Kee=lL(),$ee=hL(),Gee=dL(),Xee=gL(),Wee=wL(),i8=Function,aT=o(function(r){try{return i8('"use strict"; return ('+r+").constructor;")()}catch{}},"getEvalledConstructor"),fg=eT(),zee=CL(),oT=o(function(){throw new Np},"throwTypeError"),Jee=fg?(function(){try{return arguments.callee,oT}catch{try{return fg(arguments,"callee").get}catch{return oT}}})():oT,Ap=_L()(),kn=e8(),Yee=nT(),Qee=rT(),a8=sT(),hg=Qw(),Cp={},Zee=typeof Uint8Array>"u"||!kn?tr:kn(Uint8Array),Ul={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?tr:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?tr:ArrayBuffer,"%ArrayIteratorPrototype%":Ap&&kn?kn([][Symbol.iterator]()):tr,"%AsyncFromSyncIteratorPrototype%":tr,"%AsyncFunction%":Cp,"%AsyncGenerator%":Cp,"%AsyncGeneratorFunction%":Cp,"%AsyncIteratorPrototype%":Cp,"%Atomics%":typeof Atomics>"u"?tr:Atomics,"%BigInt%":typeof BigInt>"u"?tr:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?tr:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?tr:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?tr:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Vee,"%eval%":eval,"%EvalError%":Uee,"%Float16Array%":typeof Float16Array>"u"?tr:Float16Array,"%Float32Array%":typeof Float32Array>"u"?tr:Float32Array,"%Float64Array%":typeof Float64Array>"u"?tr:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?tr:FinalizationRegistry,"%Function%":i8,"%GeneratorFunction%":Cp,"%Int8Array%":typeof Int8Array>"u"?tr:Int8Array,"%Int16Array%":typeof Int16Array>"u"?tr:Int16Array,"%Int32Array%":typeof Int32Array>"u"?tr:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ap&&kn?kn(kn([][Symbol.iterator]())):tr,"%JSON%":typeof JSON=="object"?JSON:tr,"%Map%":typeof Map>"u"?tr:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ap||!kn?tr:kn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Lee,"%Object.getOwnPropertyDescriptor%":fg,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?tr:Promise,"%Proxy%":typeof Proxy>"u"?tr:Proxy,"%RangeError%":jee,"%ReferenceError%":Mee,"%Reflect%":typeof Reflect>"u"?tr:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?tr:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ap||!kn?tr:kn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?tr:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ap&&kn?kn(""[Symbol.iterator]()):tr,"%Symbol%":Ap?Symbol:tr,"%SyntaxError%":Tp,"%ThrowTypeError%":Jee,"%TypedArray%":Zee,"%TypeError%":Np,"%Uint8Array%":typeof Uint8Array>"u"?tr:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?tr:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?tr:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?tr:Uint32Array,"%URIError%":Fee,"%WeakMap%":typeof WeakMap>"u"?tr:WeakMap,"%WeakRef%":typeof WeakRef>"u"?tr:WeakRef,"%WeakSet%":typeof WeakSet>"u"?tr:WeakSet,"%Function.prototype.call%":hg,"%Function.prototype.apply%":a8,"%Object.defineProperty%":zee,"%Object.getPrototypeOf%":Yee,"%Math.abs%":qee,"%Math.floor%":Hee,"%Math.max%":Kee,"%Math.min%":$ee,"%Math.pow%":Gee,"%Math.round%":Xee,"%Math.sign%":Wee,"%Reflect.getPrototypeOf%":Qee};if(kn)try{null.error}catch(r){r8=kn(kn(r)),Ul["%Error.prototype%"]=r8}var r8,ete=o(function r(e){var t;if(e==="%AsyncFunction%")t=aT("async function () {}");else if(e==="%GeneratorFunction%")t=aT("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=aT("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var s=r("%AsyncGenerator%");s&&kn&&(t=kn(s.prototype))}return Ul[e]=t,t},"doEval"),n8={__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(),eS=Zw(),tte=pg.call(hg,Array.prototype.concat),rte=pg.call(a8,Array.prototype.splice),s8=pg.call(hg,String.prototype.replace),tS=pg.call(hg,String.prototype.slice),nte=pg.call(hg,RegExp.prototype.exec),ste=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ite=/\\(\\)?/g,ate=o(function(e){var t=tS(e,0,1),n=tS(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 s8(e,ste,function(i,a,u,c){s[s.length]=u?s8(c,ite,"$1"):a||i}),s},"stringToPath"),ote=o(function(e,t){var n=e,s;if(eS(n8,n)&&(s=n8[n],n="%"+s[0]+"%"),eS(Ul,n)){var i=Ul[n];if(i===Cp&&(i=ete(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");o8.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(nte(/^%?[^%]*%?$/,e)===null)throw new Tp("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ate(e),s=n.length>0?n[0]:"",i=ote("%"+s+"%",t),a=i.name,u=i.value,c=!1,f=i.alias;f&&(s=f[0],rte(n,tte([0,1],f)));for(var h=1,m=!0;h<n.length;h+=1){var g=n[h],x=tS(g,0,1),v=tS(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+"%",eS(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 S=fg(u,g);m=!!S,m&&"get"in S&&!("originalValue"in S.get)?u=S.get:u=u[g]}else m=eS(u,g),u=u[g];m&&!c&&(Ul[a]=u)}}return u},"GetIntrinsic")});var l8=te((V0e,c8)=>{"use strict";var ute=tT();c8.exports=o(function(){return ute()&&!!Symbol.toStringTag},"hasToStringTagShams")});var p8=te((j0e,h8)=>{"use strict";var cte=u8(),f8=cte("%Object.defineProperty%",!0),lte=l8()(),fte=Zw(),hte=zw(),rS=lte?Symbol.toStringTag:null;h8.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 hte("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");rS&&(n||!fte(e,rS))&&(f8?f8(e,rS,{configurable:!s,enumerable:!1,value:t,writable:!1}):e[rS]=t)},"setToStringTag")});var m8=te((F0e,d8)=>{"use strict";d8.exports=function(r,e){return Object.keys(e).forEach(function(t){r[t]=r[t]||e[t]}),r}});var v8=te((q0e,g8)=>{"use strict";var fT=S4(),pte=We("util"),uT=We("path"),dte=We("http"),mte=We("https"),gte=We("url").parse,vte=We("fs"),yte=We("stream").Stream,xte=We("crypto"),cT=T4(),wte=K4(),Ste=p8(),Ku=Zw(),lT=m8();function ur(r){if(!(this instanceof ur))return new ur(r);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],fT.call(this),r=r||{};for(var e in r)this[e]=r[e]}o(ur,"FormData");pte.inherits(ur,fT);ur.LINE_BREAK=`\r
47
+ `;ur.DEFAULT_CONTENT_TYPE="application/octet-stream";ur.prototype.append=function(r,e,t){t=t||{},typeof t=="string"&&(t={filename:t});var n=fT.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&&Ku(e,"httpVersion"))&&!(e instanceof yte))&&(t.knownLength||this._valuesToMeasure.push(e))};ur.prototype._lengthRetriever=function(r,e){Ku(r,"fd")?r.end!=null&&r.end!=1/0&&r.start!=null?e(null,r.end+1-(r.start?r.start:0)):vte.stat(r.path,function(t,n){if(t){e(t);return}var s=n.size-(r.start?r.start:0);e(null,s)}):Ku(r,"httpVersion")?e(null,Number(r.headers["content-length"])):Ku(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"&&lT(a,t.header);var u;for(var c in a)if(Ku(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=uT.normalize(e.filepath).replace(/\\/g,"/"):e.filename||r&&(r.name||r.path)?t=uT.basename(e.filename||r&&(r.name||r.path)):r&&r.readable&&Ku(r,"httpVersion")&&(t=uT.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=cT.lookup(r.name)),!t&&r&&r.path&&(t=cT.lookup(r.path)),!t&&r&&r.readable&&Ku(r,"httpVersion")&&(t=r.headers["content-type"]),!t&&(e.filepath||e.filename)&&(t=cT.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)Ku(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="--------------------------"+xte.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}wte.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=gte(r),n=lT({port:r.port,path:r.pathname,host:r.hostname,protocol:r.protocol},s)):(n=lT(r,s),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(r.headers),n.protocol==="https:"?t=mte.request(n):t=dte.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]"};Ste(ur,"FormData");g8.exports=ur});var x8=te(y8=>{"use strict";var Ete=We("url").parse,bte={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},Ate=String.prototype.endsWith||function(r){return r.length<=this.length&&this.indexOf(r,this.length-r.length)!==-1};function Cte(r){var e=typeof r=="string"?Ete(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)||bte[t]||0,!Nte(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(Cte,"getProxyForUrl");function Nte(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)),!Ate.call(r,i)):r!==i}):!0}o(Nte,"shouldProxy");function Ip(r){return process.env[r.toLowerCase()]||process.env[r.toUpperCase()]||""}o(Ip,"getEnv");y8.getProxyForUrl=Cte});var S8=te((G0e,w8)=>{"use strict";var dg;w8.exports=function(){if(!dg){try{dg=Ep()("follow-redirects")}catch{}typeof dg!="function"&&(dg=o(function(){},"debug"))}dg.apply(null,arguments)}});var N8=te((W0e,bT)=>{"use strict";var gg=We("url"),mg=gg.URL,Tte=We("http"),Ite=We("https"),gT=We("stream").Writable,vT=We("assert"),E8=S8();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 yT=!1;try{vT(new mg(""))}catch(r){yT=r.code==="ERR_INVALID_URL"}var _te=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],xT=["abort","aborted","connect","error","socket","timeout"],wT=Object.create(null);xT.forEach(function(r){wT[r]=function(e,t,n){this._redirectable.emit(r,e,t,n)}});var pT=vg("ERR_INVALID_URL","Invalid URL",TypeError),dT=vg("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Dte=vg("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",dT),Bte=vg("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Rte=vg("ERR_STREAM_WRITE_AFTER_END","write after end"),Ote=gT.prototype.destroy||A8;function Ps(r,e){gT.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 dT?s:new dT({cause:s}))}},this._performRequest()}o(Ps,"RedirectableRequest");Ps.prototype=Object.create(gT.prototype);Ps.prototype.abort=function(){ET(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Ps.prototype.destroy=function(r){return ET(this._currentRequest,r),Ote.call(this,r),this};Ps.prototype.write=function(r,e,t){if(this._ending)throw new Rte;if(!jl(r)&&!Lte(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 Bte),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 xT)n.on(s,wT[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(ET(this._currentRequest),r.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Dte;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=[],hT(/^content-/i,this._options.headers));var a=hT(/^host$/i,this._options.headers),u=ST(this._currentUrl),c=a||u.host,f=/^\w+:/.test(t)?this._currentUrl:gg.format(Object.assign(u,{host:c})),h=Pte(t,f);if(E8("redirecting to",h.href),this._isRedirect=!0,mT(h,this._options),(h.protocol!==u.protocol&&h.protocol!=="https:"||h.host!==c&&!kte(h.host,c))&&hT(/^(?:(?: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 b8(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 Vte(f)?f=mT(f):jl(f)?f=mT(ST(f)):(m=h,h=C8(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"),vT.equal(h.protocol,s,"protocol mismatch"),E8("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(b8,"wrap");function A8(){}o(A8,"noop");function ST(r){var e;if(yT)e=new mg(r);else if(e=C8(gg.parse(r)),!jl(e.protocol))throw new pT({input:r});return e}o(ST,"parseUrl");function Pte(r,e){return yT?new mg(r,e):ST(gg.resolve(e,r))}o(Pte,"resolveUrl");function C8(r){if(/^\[/.test(r.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(r.hostname))throw new pT({input:r.href||r});if(/^\[/.test(r.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(r.host))throw new pT({input:r.href||r});return r}o(C8,"validateUrl");function mT(r,e){var t=e||{};for(var n of _te)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(mT,"spreadUrlObject");function hT(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(hT,"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 ET(r,e){for(var t of xT)r.removeListener(t,wT[t]);r.on("error",A8),r.destroy(e)}o(ET,"destroyRequest");function kte(r,e){vT(jl(r)&&jl(e));var t=r.length-e.length-1;return t>0&&r[t]==="."&&r.endsWith(e)}o(kte,"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 Lte(r){return typeof r=="object"&&"length"in r}o(Lte,"isBuffer");function Vte(r){return mg&&r instanceof mg}o(Vte,"isURL");bT.exports=b8({http:Tte,https:Ite});bT.exports.wrap=b8});var WT=te((J0e,S5)=>{"use strict";var Ute=v8(),jte=We("crypto"),Mte=We("url"),Fte=x8(),qte=We("http"),Hte=We("https"),Kte=We("http2"),$te=We("util"),Gte=N8(),Xte=We("zlib"),z8=We("stream"),Wte=We("events");function na(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}o(na,"_interopDefaultLegacy");var J8=na(Ute),zte=na(jte),Jte=na(Mte),Yte=na(Fte),Qte=na(qte),Zte=na(Hte),Y8=na(Kte),jT=na($te),ere=na(Gte),$u=na(Xte),Ma=na(z8);function Q8(r,e){return o(function(){return r.apply(e,arguments)},"wrap")}o(Q8,"bind");var{toString:tre}=Object.prototype,{getPrototypeOf:MT}=Object,{iterator:fS,toStringTag:Z8}=Symbol,hS=(r=>e=>{let t=tre.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),sa=o(r=>(r=r.toLowerCase(),e=>hS(e)===r),"kindOfTest"),pS=o(r=>e=>typeof e===r,"typeOfTest"),{isArray:Pp}=Array,Dp=pS("undefined");function wg(r){return r!==null&&!Dp(r)&&r.constructor!==null&&!Dp(r.constructor)&&ks(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}o(wg,"isBuffer");var e5=sa("ArrayBuffer");function rre(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&e5(r.buffer),e}o(rre,"isArrayBufferView");var nre=pS("string"),ks=pS("function"),t5=pS("number"),Sg=o(r=>r!==null&&typeof r=="object","isObject"),sre=o(r=>r===!0||r===!1,"isBoolean"),sS=o(r=>{if(hS(r)!=="object")return!1;let e=MT(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Z8 in r)&&!(fS in r)},"isPlainObject"),ire=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"),are=sa("Date"),ore=sa("File"),ure=sa("Blob"),cre=sa("FileList"),lre=o(r=>Sg(r)&&ks(r.pipe),"isStream"),fre=o(r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||ks(r.append)&&((e=hS(r))==="formdata"||e==="object"&&ks(r.toString)&&r.toString()==="[object FormData]"))},"isFormData"),hre=sa("URLSearchParams"),[pre,dre,mre,gre]=["ReadableStream","Request","Response","Headers"].map(sa),vre=o(r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function Eg(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,s;if(typeof r!="object"&&(r=[r]),Pp(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(Eg,"forEach");function r5(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(r5,"findKey");var Fl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,n5=o(r=>!Dp(r)&&r!==Fl,"isContextDefined");function _T(){let{caseless:r,skipUndefined:e}=n5(this)&&this||{},t={},n=o((s,i)=>{let a=r&&r5(t,i)||i;sS(t[a])&&sS(s)?t[a]=_T(t[a],s):sS(s)?t[a]=_T({},s):Pp(s)?t[a]=s.slice():(!e||!Dp(s))&&(t[a]=s)},"assignValue");for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Eg(arguments[s],n);return t}o(_T,"merge");var yre=o((r,e,t,{allOwnKeys:n}={})=>(Eg(e,(s,i)=>{t&&ks(s)?r[i]=Q8(s,t):r[i]=s},{allOwnKeys:n}),r),"extend"),xre=o(r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),"stripBOM"),wre=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"),Sre=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&&MT(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},"toFlatObject"),Ere=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"),bre=o(r=>{if(!r)return null;if(Pp(r))return r;let e=r.length;if(!t5(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},"toArray"),Are=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&MT(Uint8Array)),Cre=o((r,e)=>{let n=(r&&r[fS]).call(r),s;for(;(s=n.next())&&!s.done;){let i=s.value;e.call(r,i[0],i[1])}},"forEachEntry"),Nre=o((r,e)=>{let t,n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},"matchAll"),Tre=sa("HTMLFormElement"),Ire=o(r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,o(function(t,n,s){return n.toUpperCase()+s},"replacer")),"toCamelCase"),T8=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),_re=sa("RegExp"),s5=o((r,e)=>{let t=Object.getOwnPropertyDescriptors(r),n={};Eg(t,(s,i)=>{let a;(a=e(s,i,r))!==!1&&(n[i]=a||s)}),Object.defineProperties(r,n)},"reduceDescriptors"),Dre=o(r=>{s5(r,(e,t)=>{if(ks(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let n=r[t];if(ks(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"),Bre=o((r,e)=>{let t={},n=o(s=>{s.forEach(i=>{t[i]=!0})},"define");return Pp(r)?n(r):n(String(r).split(e)),t},"toObjectSet"),Rre=o(()=>{},"noop"),Ore=o((r,e)=>r!=null&&Number.isFinite(r=+r)?r:e,"toFiniteNumber");function Pre(r){return!!(r&&ks(r.append)&&r[Z8]==="FormData"&&r[fS])}o(Pre,"isSpecCompliantForm");var kre=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=Pp(n)?[]:{};return Eg(n,(a,u)=>{let c=t(a,s+1);!Dp(c)&&(i[u]=c)}),e[s]=void 0,i}}return n},"visit");return t(r,0)},"toJSONObject"),Lre=sa("AsyncFunction"),Vre=o(r=>r&&(Sg(r)||ks(r))&&ks(r.then)&&ks(r.catch),"isThenable"),i5=((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",ks(Fl.postMessage)),Ure=typeof queueMicrotask<"u"?queueMicrotask.bind(Fl):typeof process<"u"&&process.nextTick||i5,jre=o(r=>r!=null&&ks(r[fS]),"isIterable"),ce={isArray:Pp,isArrayBuffer:e5,isBuffer:wg,isFormData:fre,isArrayBufferView:rre,isString:nre,isNumber:t5,isBoolean:sre,isObject:Sg,isPlainObject:sS,isEmptyObject:ire,isReadableStream:pre,isRequest:dre,isResponse:mre,isHeaders:gre,isUndefined:Dp,isDate:are,isFile:ore,isBlob:ure,isRegExp:_re,isFunction:ks,isStream:lre,isURLSearchParams:hre,isTypedArray:Are,isFileList:cre,forEach:Eg,merge:_T,extend:yre,trim:vre,stripBOM:xre,inherits:wre,toFlatObject:Sre,kindOf:hS,kindOfTest:sa,endsWith:Ere,toArray:bre,forEachEntry:Cre,matchAll:Nre,isHTMLForm:Tre,hasOwnProperty:T8,hasOwnProp:T8,reduceDescriptors:s5,freezeMethods:Dre,toObjectSet:Bre,toCamelCase:Ire,noop:Rre,toFiniteNumber:Ore,findKey:r5,global:Fl,isContextDefined:n5,isSpecCompliantForm:Pre,toJSONObject:kre,isAsyncFn:Lre,isThenable:Vre,setImmediate:i5,asap:Ure,isIterable:jre};function ot(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(ot,"AxiosError");ce.inherits(ot,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:ce.toJSONObject(this.config),code:this.code,status:this.status}},"toJSON")});var a5=ot.prototype,o5={};["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=>{o5[r]={value:r}});Object.defineProperties(ot,o5);Object.defineProperty(a5,"isAxiosError",{value:!0});ot.from=(r,e,t,n,s,i)=>{let a=Object.create(a5);ce.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 ot.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 DT(r){return ce.isPlainObject(r)||ce.isArray(r)}o(DT,"isVisitable");function u5(r){return ce.endsWith(r,"[]")?r.slice(0,-2):r}o(u5,"removeBrackets");function I8(r,e,t){return r?r.concat(e).map(o(function(s,i){return s=u5(s),!t&&i?"["+s+"]":s},"each")).join(t?".":""):e}o(I8,"renderKey");function Mre(r){return ce.isArray(r)&&!r.some(DT)}o(Mre,"isFlatArray");var Fre=ce.toFlatObject(ce,{},null,o(function(e){return/^is[A-Z]/.test(e)},"filter"));function dS(r,e,t){if(!ce.isObject(r))throw new TypeError("target must be an object");e=e||new(J8.default||FormData),t=ce.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,o(function(S,E){return!ce.isUndefined(E[S])},"defined"));let n=t.metaTokens,s=t.visitor||h,i=t.dots,a=t.indexes,c=(t.Blob||typeof Blob<"u"&&Blob)&&ce.isSpecCompliantForm(e);if(!ce.isFunction(s))throw new TypeError("visitor must be a function");function f(v){if(v===null)return"";if(ce.isDate(v))return v.toISOString();if(ce.isBoolean(v))return v.toString();if(!c&&ce.isBlob(v))throw new ot("Blob is not supported. Use a Buffer instead.");return ce.isArrayBuffer(v)||ce.isTypedArray(v)?c&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}o(f,"convertValue");function h(v,S,E){let C=v;if(v&&!E&&typeof v=="object"){if(ce.endsWith(S,"{}"))S=n?S:S.slice(0,-2),v=JSON.stringify(v);else if(ce.isArray(v)&&Mre(v)||(ce.isFileList(v)||ce.endsWith(S,"[]"))&&(C=ce.toArray(v)))return S=u5(S),C.forEach(o(function(b,A){!(ce.isUndefined(b)||b===null)&&e.append(a===!0?I8([S],A,i):a===null?S:S+"[]",f(b))},"each")),!1}return DT(v)?!0:(e.append(I8(E,S,i),f(v)),!1)}o(h,"defaultVisitor");let m=[],g=Object.assign(Fre,{defaultVisitor:h,convertValue:f,isVisitable:DT});function x(v,S){if(!ce.isUndefined(v)){if(m.indexOf(v)!==-1)throw Error("Circular reference detected in "+S.join("."));m.push(v),ce.forEach(v,o(function(C,_){(!(ce.isUndefined(C)||C===null)&&s.call(e,C,ce.isString(_)?_.trim():_,S,g))===!0&&x(C,S?S.concat(_):[_])},"each")),m.pop()}}if(o(x,"build"),!ce.isObject(r))throw new TypeError("data must be an object");return x(r),e}o(dS,"toFormData");function _8(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(_8,"encode$1");function c5(r,e){this._pairs=[],r&&dS(r,this,e)}o(c5,"AxiosURLSearchParams");var l5=c5.prototype;l5.append=o(function(e,t){this._pairs.push([e,t])},"append");l5.toString=o(function(e){let t=e?function(n){return e.call(this,n,_8)}:_8;return this._pairs.map(o(function(s){return t(s[0])+"="+t(s[1])},"each"),"").join("&")},"toString");function qre(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}o(qre,"encode");function FT(r,e,t){if(!e)return r;let n=t&&t.encode||qre;ce.isFunction(t)&&(t={serialize:t});let s=t&&t.serialize,i;if(s?i=s(e,t):i=ce.isURLSearchParams(e)?e.toString():new c5(e,t).toString(n),i){let a=r.indexOf("#");a!==-1&&(r=r.slice(0,a)),r+=(r.indexOf("?")===-1?"?":"&")+i}return r}o(FT,"buildURL");var BT=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){ce.forEach(this.handlers,o(function(n){n!==null&&e(n)},"forEachHandler"))}},D8=BT,qT={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Hre=Jte.default.URLSearchParams,AT="abcdefghijklmnopqrstuvwxyz",B8="0123456789",f5={DIGIT:B8,ALPHA:AT,ALPHA_DIGIT:AT+AT.toUpperCase()+B8},Kre=o((r=16,e=f5.ALPHA_DIGIT)=>{let t="",{length:n}=e,s=new Uint32Array(r);zte.default.randomFillSync(s);for(let i=0;i<r;i++)t+=e[s[i]%n];return t},"generateString"),$re={isNode:!0,classes:{URLSearchParams:Hre,FormData:J8.default,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:f5,generateString:Kre,protocols:["http","https","file","data"]},HT=typeof window<"u"&&typeof document<"u",RT=typeof navigator=="object"&&navigator||void 0,Gre=HT&&(!RT||["ReactNative","NativeScript","NS"].indexOf(RT.product)<0),Xre=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Wre=HT&&window.location.href||"http://localhost",zre=Object.freeze({__proto__:null,hasBrowserEnv:HT,hasStandardBrowserWebWorkerEnv:Xre,hasStandardBrowserEnv:Gre,navigator:RT,origin:Wre}),rn={...zre,...$re};function Jre(r,e){return dS(r,new rn.classes.URLSearchParams,{visitor:o(function(t,n,s,i){return rn.isNode&&ce.isBuffer(t)?(this.append(n,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},"visitor"),...e})}o(Jre,"toURLEncodedForm");function Yre(r){return ce.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}o(Yre,"parsePropPath");function Qre(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(Qre,"arrayToObject");function h5(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&&ce.isArray(s)?s.length:a,c?(ce.hasOwnProp(s,a)?s[a]=[s[a],n]:s[a]=n,!u):((!s[a]||!ce.isObject(s[a]))&&(s[a]=[]),e(t,n,s[a],i)&&ce.isArray(s[a])&&(s[a]=Qre(s[a])),!u)}if(o(e,"buildPath"),ce.isFormData(r)&&ce.isFunction(r.entries)){let t={};return ce.forEachEntry(r,(n,s)=>{e(Yre(n),s,t,0)}),t}return null}o(h5,"formDataToJSON");function Zre(r,e,t){if(ce.isString(r))try{return(e||JSON.parse)(r),ce.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}o(Zre,"stringifySafely");var KT={transitional:qT,adapter:["xhr","http","fetch"],transformRequest:[o(function(e,t){let n=t.getContentType()||"",s=n.indexOf("application/json")>-1,i=ce.isObject(e);if(i&&ce.isHTMLForm(e)&&(e=new FormData(e)),ce.isFormData(e))return s?JSON.stringify(h5(e)):e;if(ce.isArrayBuffer(e)||ce.isBuffer(e)||ce.isStream(e)||ce.isFile(e)||ce.isBlob(e)||ce.isReadableStream(e))return e;if(ce.isArrayBufferView(e))return e.buffer;if(ce.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 Jre(e,this.formSerializer).toString();if((u=ce.isFileList(e))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return dS(u?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||s?(t.setContentType("application/json",!1),Zre(e)):e},"transformRequest")],transformResponse:[o(function(e){let t=this.transitional||KT.transitional,n=t&&t.forcedJSONParsing,s=this.responseType==="json";if(ce.isResponse(e)||ce.isReadableStream(e))return e;if(e&&ce.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"?ot.from(u,ot.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:rn.classes.FormData,Blob:rn.classes.Blob},validateStatus:o(function(e){return e>=200&&e<300},"validateStatus"),headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ce.forEach(["delete","get","head","post","put","patch"],r=>{KT.headers[r]={}});var $T=KT,ene=ce.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"]),tne=o(r=>{let e={},t,n,s;return r&&r.split(`
48
+ `).forEach(o(function(a){s=a.indexOf(":"),t=a.substring(0,s).trim().toLowerCase(),n=a.substring(s+1).trim(),!(!t||e[t]&&ene[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)},"parser")),e},"parseHeaders"),R8=Symbol("internals");function yg(r){return r&&String(r).trim().toLowerCase()}o(yg,"normalizeHeader");function iS(r){return r===!1||r==null?r:ce.isArray(r)?r.map(iS):String(r)}o(iS,"normalizeValue");function rne(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(rne,"parseTokens");var nne=o(r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim()),"isValidHeaderName");function CT(r,e,t,n,s){if(ce.isFunction(n))return n.call(this,e,t);if(s&&(e=t),!!ce.isString(e)){if(ce.isString(n))return e.indexOf(n)!==-1;if(ce.isRegExp(n))return n.test(e)}}o(CT,"matchHeaderValue");function sne(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}o(sne,"formatHeader");function ine(r,e){let t=ce.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(ine,"buildAccessors");var Bp=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=ce.findKey(s,h);(!m||s[m]===void 0||f===!0||f===void 0&&s[m]!==!1)&&(s[m||c]=iS(u))}o(i,"setHeader");let a=o((u,c)=>ce.forEach(u,(f,h)=>i(f,h,c)),"setHeaders");if(ce.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(ce.isString(e)&&(e=e.trim())&&!nne(e))a(tne(e),t);else if(ce.isObject(e)&&ce.isIterable(e)){let u={},c,f;for(let h of e){if(!ce.isArray(h))throw TypeError("Object iterator must return a key-value pair");u[f=h[0]]=(c=u[f])?ce.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=ce.findKey(this,e);if(n){let s=this[n];if(!t)return s;if(t===!0)return rne(s);if(ce.isFunction(t))return t.call(this,s,n);if(ce.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=ce.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||CT(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=ce.findKey(n,a);u&&(!t||CT(n,n[u],u,t))&&(delete n[u],s=!0)}}return o(i,"deleteHeader"),ce.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||CT(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){let t=this,n={};return ce.forEach(this,(s,i)=>{let a=ce.findKey(n,i);if(a){t[a]=iS(s),delete t[i];return}let u=e?sne(i):String(i).trim();u!==i&&delete t[i],t[u]=iS(s),n[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return ce.forEach(this,(n,s)=>{n!=null&&n!==!1&&(t[s]=e&&ce.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(`
49
+ `)}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[R8]=this[R8]={accessors:{}}).accessors,s=this.prototype;function i(a){let u=yg(a);n[u]||(ine(s,a),n[u]=!0)}return o(i,"defineAccessor"),ce.isArray(e)?e.forEach(i):i(e),this}};Bp.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ce.reduceDescriptors(Bp.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:o(()=>r,"get"),set(n){this[t]=n}}});ce.freezeMethods(Bp);var Ls=Bp;function NT(r,e){let t=this||$T,n=e||t,s=Ls.from(n.headers),i=n.data;return ce.forEach(r,o(function(u){i=u.call(t,i,s.normalize(),e?e.status:void 0)},"transform")),s.normalize(),i}o(NT,"transformData");function p5(r){return!!(r&&r.__CANCEL__)}o(p5,"isCancel");function Gu(r,e,t){ot.call(this,r??"canceled",ot.ERR_CANCELED,e,t),this.name="CanceledError"}o(Gu,"CanceledError");ce.inherits(Gu,ot,{__CANCEL__:!0});function _p(r,e,t){let n=t.config.validateStatus;!t.status||!n||n(t.status)?r(t):e(new ot("Request failed with status code "+t.status,[ot.ERR_BAD_REQUEST,ot.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}o(_p,"settle");function ane(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}o(ane,"isAbsoluteURL");function one(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}o(one,"combineURLs");function GT(r,e,t){let n=!ane(e);return r&&(n||t==!1)?one(r,e):e}o(GT,"buildFullPath");var uS="1.13.2";function d5(r){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}o(d5,"parseProtocol");var une=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function cne(r,e,t){let n=t&&t.Blob||rn.classes.Blob,s=d5(r);if(e===void 0&&n&&(e=!0),s==="data"){r=s.length?r.slice(s.length+1):r;let i=une.exec(r);if(!i)throw new ot("Invalid URL",ot.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 ot("Blob is not supported",ot.ERR_NOT_SUPPORT);return new n([f],{type:a})}return f}throw new ot("Unsupported protocol "+s,ot.ERR_NOT_SUPPORT)}o(cne,"fromDataURI");var TT=Symbol("internals"),OT=class extends Ma.default.Transform{static{o(this,"AxiosTransformStream")}constructor(e){e=ce.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,s)=>!ce.isUndefined(s[n])),super({readableHighWaterMark:e.chunkSize});let t=this[TT]={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[TT];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,n){let s=this[TT],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 S=Buffer.byteLength(x);s.bytesSeen+=S,s.bytes+=S,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 S=Buffer.byteLength(x),E=null,C=a,_,b=0;if(i){let A=Date.now();(!s.ts||(b=A-s.ts)>=u)&&(s.ts=A,_=f-s.bytes,s.bytes=_<0?-_:0,b=0),_=f-s.bytes}if(i){if(_<=0)return setTimeout(()=>{v(null,x)},u-b);_<C&&(C=_)}C&&S>C&&S-C>h&&(E=x.subarray(C),x=x.subarray(0,C)),m(x,E?()=>{process.nextTick(v,null,E)}:v)},"transformChunk");g(e,o(function x(v,S){if(v)return n(v);S?g(S,x):n(null)},"transformNextChunk"))}},O8=OT,{asyncIterator:P8}=Symbol,lne=o(async function*(r){r.stream?yield*r.stream():r.arrayBuffer?yield await r.arrayBuffer():r[P8]?yield*r[P8]():yield r},"readBlob"),m5=lne,fne=rn.ALPHABET.ALPHA_DIGIT+"-_",xg=typeof TextEncoder=="function"?new TextEncoder:new jT.default.TextEncoder,ql=`\r
50
+ `,hne=xg.encode(ql),pne=2,PT=class{static{o(this,"FormDataPart")}constructor(e,t){let{escapeName:n}=this.constructor,s=ce.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+pne,this.name=e,this.value=t}async*encode(){yield this.headers;let{value:e}=this;ce.isTypedArray(e)?yield e:yield*m5(e),yield hne}static escapeName(e){return String(e).replace(/[\r\n"]/g,t=>({"\r":"%0D","\n":"%0A",'"':"%22"})[t])}},dne=o((r,e,t)=>{let{tag:n="form-data-boundary",size:s=25,boundary:i=n+"-"+rn.generateString(s,fne)}=t||{};if(!ce.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 PT(m,g);return c+=x.size,x});c+=a.byteLength*f.length,c=ce.toFiniteNumber(c);let h={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(c)&&(h["Content-Length"]=c),e&&e(h),z8.Readable.from((async function*(){for(let m of f)yield a,yield*m.encode();yield u})())},"formDataToStream"),mne=dne,kT=class extends Ma.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)}},gne=kT,vne=o((r,e)=>ce.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"),yne=vne;function xne(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(xne,"speedometer");function wne(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(wne,"throttle");var Rp=o((r,e,t=3)=>{let n=0,s=xne(50,250);return wne(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"),cS=o((r,e)=>{let t=r!=null;return[n=>e[0]({lengthComputable:t,total:r,loaded:n}),e[1]]},"progressEventDecorator"),lS=o(r=>(...e)=>ce.asap(()=>r(...e)),"asyncDecorator");function Sne(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(Sne,"estimateDataURLDecodedBytes");var k8={flush:$u.default.constants.Z_SYNC_FLUSH,finishFlush:$u.default.constants.Z_SYNC_FLUSH},Ene={flush:$u.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:$u.default.constants.BROTLI_OPERATION_FLUSH},L8=ce.isFunction($u.default.createBrotliDecompress),{http:bne,https:Ane}=ere.default,Cne=/https:?/,V8=rn.protocols.map(r=>r+":"),U8=o((r,[e,t])=>(r.on("end",t).on("error",t),e),"flushOnFinish"),LT=class{static{o(this,"Http2Sessions")}constructor(){this.sessions=Object.create(null)}getSession(e,t){t=Object.assign({sessionTimeout:1e3},t);let n=this.sessions[e];if(n){let h=n.length;for(let m=0;m<h;m++){let[g,x]=n[m];if(!g.destroyed&&!g.closed&&jT.default.isDeepStrictEqual(x,t))return g}}let s=Y8.default.connect(e,t),i,a=o(()=>{if(i)return;i=!0;let h=n,m=h.length,g=m;for(;g--;)if(h[g][0]===s){m===1?delete this.sessions[e]:h.splice(g,1);return}},"removeSession"),u=s.request,{sessionTimeout:c}=t;if(c!=null){let h,m=0;s.request=function(){let g=u.apply(this,arguments);return m++,h&&(clearTimeout(h),h=null),g.once("close",()=>{--m||(h=setTimeout(()=>{h=null,a()},c))}),g}}s.once("close",a);let f=[s,t];return n?n.push(f):n=this.sessions[e]=[f],s}},Nne=new LT;function Tne(r,e){r.beforeRedirects.proxy&&r.beforeRedirects.proxy(r),r.beforeRedirects.config&&r.beforeRedirects.config(r,e)}o(Tne,"dispatchBeforeRedirect");function g5(r,e,t){let n=e;if(!n&&n!==!1){let s=Yte.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){g5(i,e,i.href)},"beforeRedirect")}o(g5,"setProxy");var Ine=typeof process<"u"&&ce.kindOf(process)==="process",_ne=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"),Dne=o(({address:r,family:e})=>{if(!ce.isString(r))throw TypeError("address must be a string");return{address:r,family:e||(r.indexOf(".")<0?6:4)}},"resolveFamily"),j8=o((r,e)=>Dne(ce.isObject(r)?r:{address:r,family:e}),"buildAddressEntry"),Bne={request(r,e){let t=r.protocol+"//"+r.hostname+":"+(r.port||80),{http2Options:n,headers:s}=r,i=Nne.getSession(t,n),{HTTP2_HEADER_SCHEME:a,HTTP2_HEADER_METHOD:u,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:f}=Y8.default.constants,h={[a]:r.protocol.replace(":",""),[u]:r.method,[c]:r.path};ce.forEach(s,(g,x)=>{x.charAt(0)!==":"&&(h[x]=g)});let m=i.request(h);return m.once("response",g=>{let x=m;g=Object.assign({},g);let v=g[f];delete g[f],x.headers=g,x.statusCode=+v,e(x)}),m}},Rne=Ine&&o(function(e){return _ne(o(async function(n,s,i){let{data:a,lookup:u,family:c,httpVersion:f=1,http2Options:h}=e,{responseType:m,responseEncoding:g}=e,x=e.method.toUpperCase(),v,S=!1,E;if(f=+f,Number.isNaN(f))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(f!==1&&f!==2)throw TypeError(`Unsupported protocol version '${f}'`);let C=f===2;if(u){let de=yne(u,fe=>ce.isArray(fe)?fe:[fe]);u=o((fe,Re,$e)=>{de(fe,Re,(Ge,ft,N)=>{if(Ge)return $e(Ge);let w=ce.isArray(ft)?ft.map(X=>j8(X)):[j8(ft,N)];Re.all?$e(Ge,w):$e(Ge,w[0].address,w[0].family)})},"lookup")}let _=new Wte.EventEmitter;function b(de){try{_.emit("abort",!de||de.type?new Gu(null,e,E):de)}catch(fe){console.warn("emit error",fe)}}o(b,"abort"),_.once("abort",s);let A=o(()=>{e.cancelToken&&e.cancelToken.unsubscribe(b),e.signal&&e.signal.removeEventListener("abort",b),_.removeAllListeners()},"onFinished");(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(b),e.signal&&(e.signal.aborted?b():e.signal.addEventListener("abort",b))),i((de,fe)=>{if(v=!0,fe){S=!0,A();return}let{data:Re}=de;if(Re instanceof Ma.default.Readable||Re instanceof Ma.default.Duplex){let $e=Ma.default.finished(Re,()=>{$e(),A()})}else A()});let T=GT(e.baseURL,e.url,e.allowAbsoluteUrls),R=new URL(T,rn.hasBrowserEnv?rn.origin:void 0),H=R.protocol||V8[0];if(H==="data:"){if(e.maxContentLength>-1){let fe=String(e.url||T||"");if(Sne(fe)>e.maxContentLength)return s(new ot("maxContentLength size of "+e.maxContentLength+" exceeded",ot.ERR_BAD_RESPONSE,e))}let de;if(x!=="GET")return _p(n,s,{status:405,statusText:"method not allowed",headers:{},config:e});try{de=cne(e.url,m==="blob",{Blob:e.env&&e.env.Blob})}catch(fe){throw ot.from(fe,ot.ERR_BAD_REQUEST,e)}return m==="text"?(de=de.toString(g),(!g||g==="utf8")&&(de=ce.stripBOM(de))):m==="stream"&&(de=Ma.default.Readable.from(de)),_p(n,s,{data:de,status:200,statusText:"OK",headers:new Ls,config:e})}if(V8.indexOf(H)===-1)return s(new ot("Unsupported protocol "+H,ot.ERR_BAD_REQUEST,e));let I=Ls.from(e.headers).normalize();I.set("User-Agent","axios/"+uS,!1);let{onUploadProgress:$,onDownloadProgress:K}=e,F=e.maxRate,z,he;if(ce.isSpecCompliantForm(a)){let de=I.getContentType(/boundary=([-_\w\d]{10,70})/i);a=mne(a,fe=>{I.set(fe)},{tag:`axios-${uS}-boundary`,boundary:de&&de[1]||void 0})}else if(ce.isFormData(a)&&ce.isFunction(a.getHeaders)){if(I.set(a.getHeaders()),!I.hasContentLength())try{let de=await jT.default.promisify(a.getLength).call(a);Number.isFinite(de)&&de>=0&&I.setContentLength(de)}catch{}}else if(ce.isBlob(a)||ce.isFile(a))a.size&&I.setContentType(a.type||"application/octet-stream"),I.setContentLength(a.size||0),a=Ma.default.Readable.from(m5(a));else if(a&&!ce.isStream(a)){if(!Buffer.isBuffer(a))if(ce.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(ce.isString(a))a=Buffer.from(a,"utf-8");else return s(new ot("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",ot.ERR_BAD_REQUEST,e));if(I.setContentLength(a.length,!1),e.maxBodyLength>-1&&a.length>e.maxBodyLength)return s(new ot("Request body larger than maxBodyLength limit",ot.ERR_BAD_REQUEST,e))}let pe=ce.toFiniteNumber(I.getContentLength());ce.isArray(F)?(z=F[0],he=F[1]):z=he=F,a&&($||z)&&(ce.isStream(a)||(a=Ma.default.Readable.from(a,{objectMode:!1})),a=Ma.default.pipeline([a,new O8({maxRate:ce.toFiniteNumber(z)})],ce.noop),$&&a.on("progress",U8(a,cS(pe,Rp(lS($),!1,3)))));let oe;if(e.auth){let de=e.auth.username||"",fe=e.auth.password||"";oe=de+":"+fe}if(!oe&&R.username){let de=R.username,fe=R.password;oe=de+":"+fe}oe&&I.delete("authorization");let Q;try{Q=FT(R.pathname+R.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(de){let fe=new Error(de.message);return fe.config=e,fe.url=e.url,fe.exists=!0,s(fe)}I.set("Accept-Encoding","gzip, compress, deflate"+(L8?", br":""),!1);let xe={path:Q,method:x,headers:I.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:oe,protocol:H,family:c,beforeRedirect:Tne,beforeRedirects:{},http2Options:h};!ce.isUndefined(u)&&(xe.lookup=u),e.socketPath?xe.socketPath=e.socketPath:(xe.hostname=R.hostname.startsWith("[")?R.hostname.slice(1,-1):R.hostname,xe.port=R.port,g5(xe,e.proxy,H+"//"+R.hostname+(R.port?":"+R.port:"")+xe.path));let Me,Qe=Cne.test(xe.protocol);if(xe.agent=Qe?e.httpsAgent:e.httpAgent,C?Me=Bne:e.transport?Me=e.transport:e.maxRedirects===0?Me=Qe?Zte.default:Qte.default:(e.maxRedirects&&(xe.maxRedirects=e.maxRedirects),e.beforeRedirect&&(xe.beforeRedirects.config=e.beforeRedirect),Me=Qe?Ane:bne),e.maxBodyLength>-1?xe.maxBodyLength=e.maxBodyLength:xe.maxBodyLength=1/0,e.insecureHTTPParser&&(xe.insecureHTTPParser=e.insecureHTTPParser),E=Me.request(xe,o(function(fe){if(E.destroyed)return;let Re=[fe],$e=ce.toFiniteNumber(fe.headers["content-length"]);if(K||he){let w=new O8({maxRate:ce.toFiniteNumber(he)});K&&w.on("progress",U8(w,cS($e,Rp(lS(K),!0,3)))),Re.push(w)}let Ge=fe,ft=fe.req||E;if(e.decompress!==!1&&fe.headers["content-encoding"])switch((x==="HEAD"||fe.statusCode===204)&&delete fe.headers["content-encoding"],(fe.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Re.push($u.default.createUnzip(k8)),delete fe.headers["content-encoding"];break;case"deflate":Re.push(new gne),Re.push($u.default.createUnzip(k8)),delete fe.headers["content-encoding"];break;case"br":L8&&(Re.push($u.default.createBrotliDecompress(Ene)),delete fe.headers["content-encoding"])}Ge=Re.length>1?Ma.default.pipeline(Re,ce.noop):Re[0];let N={status:fe.statusCode,statusText:fe.statusMessage,headers:new Ls(fe.headers),config:e,request:ft};if(m==="stream")N.data=Ge,_p(n,s,N);else{let w=[],X=0;Ge.on("data",o(function(be){w.push(be),X+=be.length,e.maxContentLength>-1&&X>e.maxContentLength&&(S=!0,Ge.destroy(),b(new ot("maxContentLength size of "+e.maxContentLength+" exceeded",ot.ERR_BAD_RESPONSE,e,ft)))},"handleStreamData")),Ge.on("aborted",o(function(){if(S)return;let be=new ot("stream has been aborted",ot.ERR_BAD_RESPONSE,e,ft);Ge.destroy(be),s(be)},"handlerStreamAborted")),Ge.on("error",o(function(be){E.destroyed||s(ot.from(be,null,e,ft))},"handleStreamError")),Ge.on("end",o(function(){try{let be=w.length===1?w[0]:Buffer.concat(w);m!=="arraybuffer"&&(be=be.toString(g),(!g||g==="utf8")&&(be=ce.stripBOM(be))),N.data=be}catch(be){return s(ot.from(be,null,e,N.request,N))}_p(n,s,N)},"handleStreamEnd"))}_.once("abort",w=>{Ge.destroyed||(Ge.emit("error",w),Ge.destroy())})},"handleResponse")),_.once("abort",de=>{E.close?E.close():E.destroy(de)}),E.on("error",o(function(fe){s(ot.from(fe,null,e,E))},"handleRequestError")),E.on("socket",o(function(fe){fe.setKeepAlive(!0,1e3*60)},"handleRequestSocket")),e.timeout){let de=parseInt(e.timeout,10);if(Number.isNaN(de)){b(new ot("error trying to parse `config.timeout` to int",ot.ERR_BAD_OPTION_VALUE,e,E));return}E.setTimeout(de,o(function(){if(v)return;let Re=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",$e=e.transitional||qT;e.timeoutErrorMessage&&(Re=e.timeoutErrorMessage),b(new ot(Re,$e.clarifyTimeoutError?ot.ETIMEDOUT:ot.ECONNABORTED,e,E))},"handleRequestTimeout"))}else E.setTimeout(0);if(ce.isStream(a)){let de=!1,fe=!1;a.on("end",()=>{de=!0}),a.once("error",Re=>{fe=!0,E.destroy(Re)}),a.on("close",()=>{!de&&!fe&&b(new Gu("Request stream has been aborted",e,E))}),a.pipe(E)}else a&&E.write(a),E.end()},"dispatchHttpRequest"))},"httpAdapter"),One=rn.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,rn.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(rn.origin),rn.navigator&&/(msie|trident)/i.test(rn.navigator.userAgent)):()=>!0,Pne=rn.hasStandardBrowserEnv?{write(r,e,t,n,s,i,a){if(typeof document>"u")return;let u=[`${r}=${encodeURIComponent(e)}`];ce.isNumber(t)&&u.push(`expires=${new Date(t).toUTCString()}`),ce.isString(n)&&u.push(`path=${n}`),ce.isString(s)&&u.push(`domain=${s}`),i===!0&&u.push("secure"),ce.isString(a)&&u.push(`SameSite=${a}`),document.cookie=u.join("; ")},read(r){if(typeof document>"u")return null;let e=document.cookie.match(new RegExp("(?:^|; )"+r+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(r){this.write(r,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}},M8=o(r=>r instanceof Ls?{...r}:r,"headersToObject");function Hl(r,e){e=e||{};let t={};function n(f,h,m,g){return ce.isPlainObject(f)&&ce.isPlainObject(h)?ce.merge.call({caseless:g},f,h):ce.isPlainObject(h)?ce.merge({},h):ce.isArray(h)?h.slice():h}o(n,"getMergedValue");function s(f,h,m,g){if(ce.isUndefined(h)){if(!ce.isUndefined(f))return n(void 0,f,m,g)}else return n(f,h,m,g)}o(s,"mergeDeepProperties");function i(f,h){if(!ce.isUndefined(h))return n(void 0,h)}o(i,"valueFromConfig2");function a(f,h){if(ce.isUndefined(h)){if(!ce.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(M8(f),M8(h),m,!0),"headers")};return ce.forEach(Object.keys({...r,...e}),o(function(h){let m=c[h]||s,g=m(r[h],e[h],h);ce.isUndefined(g)&&m!==u||(t[h]=g)},"computeConfigValue")),t}o(Hl,"mergeConfig");var v5=o(r=>{let e=Hl({},r),{data:t,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:u}=e;if(e.headers=a=Ls.from(a),e.url=FT(GT(e.baseURL,e.url,e.allowAbsoluteUrls),r.params,r.paramsSerializer),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),ce.isFormData(t)){if(rn.hasStandardBrowserEnv||rn.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(ce.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(rn.hasStandardBrowserEnv&&(n&&ce.isFunction(n)&&(n=n(e)),n||n!==!1&&One(e.url))){let c=s&&i&&Pne.read(i);c&&a.set(s,c)}return e},"resolveConfig"),kne=typeof XMLHttpRequest<"u",Lne=kne&&function(r){return new Promise(o(function(t,n){let s=v5(r),i=s.data,a=Ls.from(s.headers).normalize(),{responseType:u,onUploadProgress:c,onDownloadProgress:f}=s,h,m,g,x,v;function S(){x&&x(),v&&v(),s.cancelToken&&s.cancelToken.unsubscribe(h),s.signal&&s.signal.removeEventListener("abort",h)}o(S,"done");let E=new XMLHttpRequest;E.open(s.method.toUpperCase(),s.url,!0),E.timeout=s.timeout;function C(){if(!E)return;let b=Ls.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),T={data:!u||u==="text"||u==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:b,config:r,request:E};_p(o(function(H){t(H),S()},"_resolve"),o(function(H){n(H),S()},"_reject"),T),E=null}o(C,"onloadend"),"onloadend"in E?E.onloadend=C:E.onreadystatechange=o(function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(C)},"handleLoad"),E.onabort=o(function(){E&&(n(new ot("Request aborted",ot.ECONNABORTED,r,E)),E=null)},"handleAbort"),E.onerror=o(function(A){let T=A&&A.message?A.message:"Network Error",R=new ot(T,ot.ERR_NETWORK,r,E);R.event=A||null,n(R),E=null},"handleError"),E.ontimeout=o(function(){let A=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded",T=s.transitional||qT;s.timeoutErrorMessage&&(A=s.timeoutErrorMessage),n(new ot(A,T.clarifyTimeoutError?ot.ETIMEDOUT:ot.ECONNABORTED,r,E)),E=null},"handleTimeout"),i===void 0&&a.setContentType(null),"setRequestHeader"in E&&ce.forEach(a.toJSON(),o(function(A,T){E.setRequestHeader(T,A)},"setRequestHeader")),ce.isUndefined(s.withCredentials)||(E.withCredentials=!!s.withCredentials),u&&u!=="json"&&(E.responseType=s.responseType),f&&([g,v]=Rp(f,!0),E.addEventListener("progress",g)),c&&E.upload&&([m,x]=Rp(c),E.upload.addEventListener("progress",m),E.upload.addEventListener("loadend",x)),(s.cancelToken||s.signal)&&(h=o(b=>{E&&(n(!b||b.type?new Gu(null,r,E):b),E.abort(),E=null)},"onCanceled"),s.cancelToken&&s.cancelToken.subscribe(h),s.signal&&(s.signal.aborted?h():s.signal.addEventListener("abort",h)));let _=d5(s.url);if(_&&rn.protocols.indexOf(_)===-1){n(new ot("Unsupported protocol "+_+":",ot.ERR_BAD_REQUEST,r));return}E.send(i||null)},"dispatchXhrRequest"))},Vne=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 ot?h:new Gu(h instanceof Error?h.message:h))}},"onabort"),a=e&&setTimeout(()=>{a=null,i(new ot(`timeout ${e} of ms exceeded`,ot.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=()=>ce.asap(u),c}},"composeSignals"),Une=Vne,jne=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"),Mne=o(async function*(r,e){for await(let t of Fne(r))yield*jne(t,e)},"readBytes"),Fne=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"),F8=o((r,e,t,n)=>{let s=Mne(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"),q8=64*1024,{isFunction:nS}=ce,qne=(({Request:r,Response:e})=>({Request:r,Response:e}))(ce.global),{ReadableStream:H8,TextEncoder:K8}=ce.global,$8=o((r,...e)=>{try{return!!r(...e)}catch{return!1}},"test"),Hne=o(r=>{r=ce.merge.call({skipUndefined:!0},qne,r);let{fetch:e,Request:t,Response:n}=r,s=e?nS(e):typeof fetch=="function",i=nS(t),a=nS(n);if(!s)return!1;let u=s&&nS(H8),c=s&&(typeof K8=="function"?(v=>S=>v.encode(S))(new K8):async v=>new Uint8Array(await new t(v).arrayBuffer())),f=i&&u&&$8(()=>{let v=!1,S=new t(rn.origin,{body:new H8,method:"POST",get duplex(){return v=!0,"half"}}).headers.has("Content-Type");return v&&!S}),h=a&&u&&$8(()=>ce.isReadableStream(new n("").body)),m={stream:h&&(v=>v.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!m[v]&&(m[v]=(S,E)=>{let C=S&&S[v];if(C)return C.call(S);throw new ot(`Response type '${v}' is not supported`,ot.ERR_NOT_SUPPORT,E)})});let g=o(async v=>{if(v==null)return 0;if(ce.isBlob(v))return v.size;if(ce.isSpecCompliantForm(v))return(await new t(rn.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(ce.isArrayBufferView(v)||ce.isArrayBuffer(v))return v.byteLength;if(ce.isURLSearchParams(v)&&(v=v+""),ce.isString(v))return(await c(v)).byteLength},"getBodyLength"),x=o(async(v,S)=>{let E=ce.toFiniteNumber(v.getContentLength());return E??g(S)},"resolveBodyLength");return async v=>{let{url:S,method:E,data:C,signal:_,cancelToken:b,timeout:A,onDownloadProgress:T,onUploadProgress:R,responseType:H,headers:I,withCredentials:$="same-origin",fetchOptions:K}=v5(v),F=e||fetch;H=H?(H+"").toLowerCase():"text";let z=Une([_,b&&b.toAbortSignal()],A),he=null,pe=z&&z.unsubscribe&&(()=>{z.unsubscribe()}),oe;try{if(R&&f&&E!=="get"&&E!=="head"&&(oe=await x(I,C))!==0){let fe=new t(S,{method:"POST",body:C,duplex:"half"}),Re;if(ce.isFormData(C)&&(Re=fe.headers.get("content-type"))&&I.setContentType(Re),fe.body){let[$e,Ge]=cS(oe,Rp(lS(R)));C=F8(fe.body,q8,$e,Ge)}}ce.isString($)||($=$?"include":"omit");let Q=i&&"credentials"in t.prototype,xe={...K,signal:z,method:E.toUpperCase(),headers:I.normalize().toJSON(),body:C,duplex:"half",credentials:Q?$:void 0};he=i&&new t(S,xe);let Me=await(i?F(he,K):F(S,xe)),Qe=h&&(H==="stream"||H==="response");if(h&&(T||Qe&&pe)){let fe={};["status","statusText","headers"].forEach(ft=>{fe[ft]=Me[ft]});let Re=ce.toFiniteNumber(Me.headers.get("content-length")),[$e,Ge]=T&&cS(Re,Rp(lS(T),!0))||[];Me=new n(F8(Me.body,q8,$e,()=>{Ge&&Ge(),pe&&pe()}),fe)}H=H||"text";let de=await m[ce.findKey(m,H)||"text"](Me,v);return!Qe&&pe&&pe(),await new Promise((fe,Re)=>{_p(fe,Re,{data:de,headers:Ls.from(Me.headers),status:Me.status,statusText:Me.statusText,config:v,request:he})})}catch(Q){throw pe&&pe(),Q&&Q.name==="TypeError"&&/Load failed|fetch/i.test(Q.message)?Object.assign(new ot("Network Error",ot.ERR_NETWORK,v,he),{cause:Q.cause||Q}):ot.from(Q,Q&&Q.code,v,he)}}},"factory"),Kne=new Map,y5=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=Kne;for(;u--;)c=i[u],f=h.get(c),f===void 0&&h.set(c,f=u?new Map:Hne(e)),h=f;return f},"getFetch");y5();var XT={http:Rne,xhr:Lne,fetch:{get:y5}};ce.forEach(XT,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});var G8=o(r=>`- ${r}`,"renderReason"),$ne=o(r=>ce.isFunction(r)||r===null||r===!1,"isResolvedHandle");function Gne(r,e){r=ce.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,!$ne(n)&&(s=XT[(u=String(n)).toLowerCase()],s===void 0))throw new ot(`Unknown adapter '${u}'`);if(s&&(ce.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 :
51
+ `+a.map(G8).join(`
52
+ `):" "+G8(a[0]):"as no adapter specified";throw new ot("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return s}o(Gne,"getAdapter");var x5={getAdapter:Gne,adapters:XT};function IT(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Gu(null,r)}o(IT,"throwIfCancellationRequested");function X8(r){return IT(r),r.headers=Ls.from(r.headers),r.data=NT.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),x5.getAdapter(r.adapter||$T.adapter,r)(r).then(o(function(n){return IT(r),n.data=NT.call(r,r.transformResponse,n),n.headers=Ls.from(n.headers),n},"onAdapterResolution"),o(function(n){return p5(n)||(IT(r),n&&n.response&&(n.response.data=NT.call(r,r.transformResponse,n.response),n.response.headers=Ls.from(n.response.headers))),Promise.reject(n)},"onAdapterRejection"))}o(X8,"dispatchRequest");var mS={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{mS[r]=o(function(n){return typeof n===r||"a"+(e<1?"n ":" ")+r},"validator")});var W8={};mS.transitional=o(function(e,t,n){function s(i,a){return"[Axios v"+uS+"] Transitional option '"+i+"'"+a+(n?". "+n:"")}return o(s,"formatMessage"),(i,a,u)=>{if(e===!1)throw new ot(s(a," has been removed"+(t?" in "+t:"")),ot.ERR_DEPRECATED);return t&&!W8[a]&&(W8[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");mS.spelling=o(function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)},"spelling");function Xne(r,e,t){if(typeof r!="object")throw new ot("options must be an object",ot.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 ot("option "+i+" must be "+c,ot.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new ot("Unknown option "+i,ot.ERR_BAD_OPTION)}}o(Xne,"assertOptions");var aS={assertOptions:Xne,validators:mS},ja=aS.validators,Op=class{static{o(this,"Axios")}constructor(e){this.defaults=e||{},this.interceptors={request:new D8,response:new D8}}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+=`
53
+ `+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&&aS.assertOptions(n,{silentJSONParsing:ja.transitional(ja.boolean),forcedJSONParsing:ja.transitional(ja.boolean),clarifyTimeoutError:ja.transitional(ja.boolean)},!1),s!=null&&(ce.isFunction(s)?t.paramsSerializer={serialize:s}:aS.assertOptions(s,{encode:ja.function,serialize:ja.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),aS.assertOptions(t,{baseUrl:ja.spelling("baseURL"),withXsrfToken:ja.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=i&&ce.merge(i.common,i[t.method]);i&&ce.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),t.headers=Ls.concat(a,i);let u=[],c=!0;this.interceptors.request.forEach(o(function(S){typeof S.runWhen=="function"&&S.runWhen(t)===!1||(c=c&&S.synchronous,u.unshift(S.fulfilled,S.rejected))},"unshiftRequestInterceptors"));let f=[];this.interceptors.response.forEach(o(function(S){f.push(S.fulfilled,S.rejected)},"pushResponseInterceptors"));let h,m=0,g;if(!c){let v=[X8.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++],S=u[m++];try{x=v(x)}catch(E){S.call(this,E);break}}try{h=X8.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=GT(e.baseURL,e.url,e.allowAbsoluteUrls);return FT(t,e.params,e.paramsSerializer)}};ce.forEach(["delete","get","head","options"],o(function(e){Op.prototype[e]=function(t,n){return this.request(Hl(n||{},{method:e,url:t,data:(n||{}).data}))}},"forEachMethodNoData"));ce.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"),Op.prototype[e]=t(),Op.prototype[e+"Form"]=t(!0)},"forEachMethodWithData"));var oS=Op,VT=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}}},Wne=VT;function zne(r){return o(function(t){return r.apply(null,t)},"wrap")}o(zne,"spread");function Jne(r){return ce.isObject(r)&&r.isAxiosError===!0}o(Jne,"isAxiosError");var UT={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(UT).forEach(([r,e])=>{UT[e]=r});var Yne=UT;function w5(r){let e=new oS(r),t=Q8(oS.prototype.request,e);return ce.extend(t,oS.prototype,e,{allOwnKeys:!0}),ce.extend(t,e,null,{allOwnKeys:!0}),t.create=o(function(s){return w5(Hl(r,s))},"create"),t}o(w5,"createInstance");var gn=w5($T);gn.Axios=oS;gn.CanceledError=Gu;gn.CancelToken=Wne;gn.isCancel=p5;gn.VERSION=uS;gn.toFormData=dS;gn.AxiosError=ot;gn.Cancel=gn.CanceledError;gn.all=o(function(e){return Promise.all(e)},"all");gn.spread=zne;gn.isAxiosError=Jne;gn.mergeConfig=Hl;gn.AxiosHeaders=Ls;gn.formToJSON=r=>h5(ce.isHTMLForm(r)?new FormData(r):r);gn.getAdapter=x5.getAdapter;gn.HttpStatusCode=Yne;gn.default=gn;S5.exports=gn});var E5=te((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 zT=te(_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 gS=[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=gS.length>>>1,c=0;c<u;c++)i<<=1,i|=e>>>gS[c]&1;for(var c=u;c<gS.length;c++)a<<=1,a|=t>>>gS[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 b5=[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=b5[s*64+i];n<<=4,n|=a}for(var s=0;s<4;s++){var i=t>>>18-s*6&63,a=b5[256+s*64+i];n<<=4,n|=a}return n>>>0},"substitute");var A5=[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<A5.length;n++)t<<=1,t|=e>>>A5[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 bg=te((tge,N5)=>{"use strict";N5.exports=C5;function C5(r,e){if(!r)throw new Error(e||"Assertion failed")}o(C5,"assert");C5.equal=o(function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)},"assertEqual")});var vS=te((nge,T5)=>{"use strict";var Qne=bg();function Di(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(Di,"Cipher");T5.exports=Di;Di.prototype._init=o(function(){},"_init");Di.prototype.update=o(function(e){return e.length===0?[]:this.type==="decrypt"?this._updateDecrypt(e):this._updateEncrypt(e)},"update");Di.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");Di.prototype._flushBuffer=o(function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},"_flushBuffer");Di.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");Di.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");Di.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");Di.prototype._pad=o(function(e,t){if(t===0)return!1;for(;t<e.length;)e[t++]=0;return!0},"_pad");Di.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");Di.prototype._unpad=o(function(e){return e},"_unpad");Di.prototype._finalDecrypt=o(function(){Qne.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 I5=te((ige,JT)=>{"use strict";typeof Object.create=="function"?JT.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"):JT.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 yS=te((oge,QT)=>{"use strict";try{if(YT=We("util"),typeof YT.inherits!="function")throw"";QT.exports=YT.inherits}catch{QT.exports=I5()}var YT});var ZT=te((uge,B5)=>{"use strict";var _5=bg(),Zne=yS(),An=zT(),D5=vS();function ese(){this.tmp=new Array(2),this.keys=null}o(ese,"DESState");function Fa(r){D5.call(this,r);var e=new ese;this._desState=e,this.deriveKeys(e,r.key)}o(Fa,"DES");Zne(Fa,D5);B5.exports=Fa;Fa.create=o(function(e){return new Fa(e)},"create");var tse=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Fa.prototype.deriveKeys=o(function(e,t){e.keys=new Array(32),_5.equal(t.length,this.blockSize,"Invalid key length");var n=An.readUInt32BE(t,0),s=An.readUInt32BE(t,4);An.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=tse[i>>>1];n=An.r28shl(n,a),s=An.r28shl(s,a),An.pc2(n,s,e.keys,i)}},"deriveKeys");Fa.prototype._update=o(function(e,t,n,s){var i=this._desState,a=An.readUInt32BE(e,t),u=An.readUInt32BE(e,t+4);An.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],An.writeUInt32BE(n,a,s),An.writeUInt32BE(n,u,s+4)},"_update");Fa.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");Fa.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++)_5.equal(e[n],t);return e.slice(0,e.length-t)},"_unpad");Fa.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];An.expand(u,e.tmp,0),f^=e.tmp[0],h^=e.tmp[1];var m=An.substitute(f,h),g=An.permute(m),x=u;u=(a^g)>>>0,a=x}An.rip(u,a,s,i)},"_encrypt");Fa.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];An.expand(a,e.tmp,0),f^=e.tmp[0],h^=e.tmp[1];var m=An.substitute(f,h),g=An.permute(m),x=a;a=(u^g)>>>0,u=x}An.rip(a,u,s,i)},"_decrypt")});var O5=te(R5=>{"use strict";var rse=bg(),nse=yS(),xS={};function sse(r){rse.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(sse,"CBCState");function ise(r){function e(i){r.call(this,i),this._cbcInit()}o(e,"CBC"),nse(e,r);for(var t=Object.keys(xS),n=0;n<t.length;n++){var s=t[n];e.prototype[s]=xS[s]}return e.create=o(function(a){return new e(a)},"create"),e}o(ise,"instantiate");R5.instantiate=ise;xS._cbcInit=o(function(){var e=new sse(this.options.iv);this._cbcState=e},"_cbcInit");xS._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 L5=te((hge,k5)=>{"use strict";var ase=bg(),ose=yS(),P5=vS(),Xu=ZT();function use(r,e){ase.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(use,"EDEState");function Kl(r){P5.call(this,r);var e=new use(this.type,this.options.key);this._edeState=e}o(Kl,"EDE");ose(Kl,P5);k5.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 V5=te(kp=>{"use strict";kp.utils=zT();kp.Cipher=vS();kp.DES=ZT();kp.CBC=O5();kp.EDE=L5()});var U5=te((mge,wS)=>{"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 wS=="object"&&wS.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(C){return function(_){return new S(!0).update(_)[C]()}},"createOutputMethod"),x=o(function(){var C=g("hex");e&&(C=v(C)),C.create=function(){return new S},C.update=function(A){return C.create().update(A)};for(var _=0;_<c.length;++_){var b=c[_];C[b]=g(b)}return C},"createMethod"),v=o(function(C){var _=We("crypto"),b=We("buffer").Buffer,A=o(function(T){if(typeof T=="string")return _.createHash("md4").update(T,"utf8").digest("hex");if(s&&T instanceof ArrayBuffer)T=new Uint8Array(T);else if(T.length===void 0)return C(T);return _.createHash("md4").update(new b(T)).digest("hex")},"nodeMethod");return A},"nodeWrap");function S(C){if(C)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 _=new ArrayBuffer(68);this.buffer8=new Uint8Array(_),this.blocks=new Uint32Array(_)}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(S,"Md4"),S.prototype.update=function(C){if(!this.finalized){var _=typeof C!="string";_&&s&&C instanceof ArrayBuffer&&(C=new Uint8Array(C));for(var b,A=0,T,R=C.length||0,H=this.blocks,I=this.buffer8;A<R;){if(this.hashed&&(this.hashed=!1,H[0]=H[16],H[16]=H[1]=H[2]=H[3]=H[4]=H[5]=H[6]=H[7]=H[8]=H[9]=H[10]=H[11]=H[12]=H[13]=H[14]=H[15]=0),_)if(s)for(T=this.start;A<R&&T<64;++A)I[T++]=C[A];else for(T=this.start;A<R&&T<64;++A)H[T>>2]|=C[A]<<u[T++&3];else if(s)for(T=this.start;A<R&&T<64;++A)b=C.charCodeAt(A),b<128?I[T++]=b:b<2048?(I[T++]=192|b>>6,I[T++]=128|b&63):b<55296||b>=57344?(I[T++]=224|b>>12,I[T++]=128|b>>6&63,I[T++]=128|b&63):(b=65536+((b&1023)<<10|C.charCodeAt(++A)&1023),I[T++]=240|b>>18,I[T++]=128|b>>12&63,I[T++]=128|b>>6&63,I[T++]=128|b&63);else for(T=this.start;A<R&&T<64;++A)b=C.charCodeAt(A),b<128?H[T>>2]|=b<<u[T++&3]:b<2048?(H[T>>2]|=(192|b>>6)<<u[T++&3],H[T>>2]|=(128|b&63)<<u[T++&3]):b<55296||b>=57344?(H[T>>2]|=(224|b>>12)<<u[T++&3],H[T>>2]|=(128|b>>6&63)<<u[T++&3],H[T>>2]|=(128|b&63)<<u[T++&3]):(b=65536+((b&1023)<<10|C.charCodeAt(++A)&1023),H[T>>2]|=(240|b>>18)<<u[T++&3],H[T>>2]|=(128|b>>12&63)<<u[T++&3],H[T>>2]|=(128|b>>6&63)<<u[T++&3],H[T>>2]|=(128|b&63)<<u[T++&3]);this.lastByteIndex=T,this.bytes+=T-this.start,T>=64?(this.start=T-64,this.hash(),this.hashed=!0):this.start=T}return this}},S.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var C=this.blocks,_=this.lastByteIndex;C[_>>2]|=a[_&3],_>=56&&(this.hashed||this.hash(),C[0]=C[16],C[16]=C[1]=C[2]=C[3]=C[4]=C[5]=C[6]=C[7]=C[8]=C[9]=C[10]=C[11]=C[12]=C[13]=C[14]=C[15]=0),C[14]=this.bytes<<3,this.hash()}},S.prototype.hash=function(){var C,_,b,A,T,R,H,I,$=this.blocks;this.first?(C=$[0]-1,C=C<<3|C>>>29,A=(C&4023233417|~C&2562383102)+$[1]+271733878,A=A<<7|A>>>25,b=(A&C|~A&4023233417)+$[2]-1732584194,b=b<<11|b>>>21,_=(b&A|~b&C)+$[3]-271733879,_=_<<19|_>>>13):(C=this.h0,_=this.h1,b=this.h2,A=this.h3,C+=(_&b|~_&A)+$[0],C=C<<3|C>>>29,A+=(C&_|~C&b)+$[1],A=A<<7|A>>>25,b+=(A&C|~A&_)+$[2],b=b<<11|b>>>21,_+=(b&A|~b&C)+$[3],_=_<<19|_>>>13),C+=(_&b|~_&A)+$[4],C=C<<3|C>>>29,A+=(C&_|~C&b)+$[5],A=A<<7|A>>>25,b+=(A&C|~A&_)+$[6],b=b<<11|b>>>21,_+=(b&A|~b&C)+$[7],_=_<<19|_>>>13,C+=(_&b|~_&A)+$[8],C=C<<3|C>>>29,A+=(C&_|~C&b)+$[9],A=A<<7|A>>>25,b+=(A&C|~A&_)+$[10],b=b<<11|b>>>21,_+=(b&A|~b&C)+$[11],_=_<<19|_>>>13,C+=(_&b|~_&A)+$[12],C=C<<3|C>>>29,A+=(C&_|~C&b)+$[13],A=A<<7|A>>>25,b+=(A&C|~A&_)+$[14],b=b<<11|b>>>21,_+=(b&A|~b&C)+$[15],_=_<<19|_>>>13,R=_&b,C+=(R|_&A|b&A)+$[0]+1518500249,C=C<<3|C>>>29,T=C&_,A+=(T|C&b|R)+$[4]+1518500249,A=A<<5|A>>>27,I=A&C,b+=(I|A&_|T)+$[8]+1518500249,b=b<<9|b>>>23,H=b&A,_+=(H|b&C|I)+$[12]+1518500249,_=_<<13|_>>>19,R=_&b,C+=(R|_&A|H)+$[1]+1518500249,C=C<<3|C>>>29,T=C&_,A+=(T|C&b|R)+$[5]+1518500249,A=A<<5|A>>>27,I=A&C,b+=(I|A&_|T)+$[9]+1518500249,b=b<<9|b>>>23,H=b&A,_+=(H|b&C|I)+$[13]+1518500249,_=_<<13|_>>>19,R=_&b,C+=(R|_&A|H)+$[2]+1518500249,C=C<<3|C>>>29,T=C&_,A+=(T|C&b|R)+$[6]+1518500249,A=A<<5|A>>>27,I=A&C,b+=(I|A&_|T)+$[10]+1518500249,b=b<<9|b>>>23,H=b&A,_+=(H|b&C|I)+$[14]+1518500249,_=_<<13|_>>>19,R=_&b,C+=(R|_&A|H)+$[3]+1518500249,C=C<<3|C>>>29,T=C&_,A+=(T|C&b|R)+$[7]+1518500249,A=A<<5|A>>>27,I=A&C,b+=(I|A&_|T)+$[11]+1518500249,b=b<<9|b>>>23,_+=(b&A|b&C|I)+$[15]+1518500249,_=_<<13|_>>>19,R=_^b,C+=(R^A)+$[0]+1859775393,C=C<<3|C>>>29,A+=(R^C)+$[8]+1859775393,A=A<<9|A>>>23,I=A^C,b+=(I^_)+$[4]+1859775393,b=b<<11|b>>>21,_+=(I^b)+$[12]+1859775393,_=_<<15|_>>>17,R=_^b,C+=(R^A)+$[2]+1859775393,C=C<<3|C>>>29,A+=(R^C)+$[10]+1859775393,A=A<<9|A>>>23,I=A^C,b+=(I^_)+$[6]+1859775393,b=b<<11|b>>>21,_+=(I^b)+$[14]+1859775393,_=_<<15|_>>>17,R=_^b,C+=(R^A)+$[1]+1859775393,C=C<<3|C>>>29,A+=(R^C)+$[9]+1859775393,A=A<<9|A>>>23,I=A^C,b+=(I^_)+$[5]+1859775393,b=b<<11|b>>>21,_+=(I^b)+$[13]+1859775393,_=_<<15|_>>>17,R=_^b,C+=(R^A)+$[3]+1859775393,C=C<<3|C>>>29,A+=(R^C)+$[11]+1859775393,A=A<<9|A>>>23,I=A^C,b+=(I^_)+$[7]+1859775393,b=b<<11|b>>>21,_+=(I^b)+$[15]+1859775393,_=_<<15|_>>>17,this.first?(this.h0=C+1732584193<<0,this.h1=_-271733879<<0,this.h2=b-1732584194<<0,this.h3=A+271733878<<0,this.first=!1):(this.h0=this.h0+C<<0,this.h1=this.h1+_<<0,this.h2=this.h2+b<<0,this.h3=this.h3+A<<0)},S.prototype.hex=function(){this.finalize();var C=this.h0,_=this.h1,b=this.h2,A=this.h3;return i[C>>4&15]+i[C&15]+i[C>>12&15]+i[C>>8&15]+i[C>>20&15]+i[C>>16&15]+i[C>>28&15]+i[C>>24&15]+i[_>>4&15]+i[_&15]+i[_>>12&15]+i[_>>8&15]+i[_>>20&15]+i[_>>16&15]+i[_>>28&15]+i[_>>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[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]},S.prototype.toString=S.prototype.hex,S.prototype.digest=function(){this.finalize();var C=this.h0,_=this.h1,b=this.h2,A=this.h3;return[C&255,C>>8&255,C>>16&255,C>>24&255,_&255,_>>8&255,_>>16&255,_>>24&255,b&255,b>>8&255,b>>16&255,b>>24&255,A&255,A>>8&255,A>>16&255,A>>24&255]},S.prototype.array=S.prototype.digest,S.prototype.arrayBuffer=function(){this.finalize();var C=new ArrayBuffer(16),_=new Uint32Array(C);return _[0]=this.h0,_[1]=this.h1,_[2]=this.h2,_[3]=this.h3,C},S.prototype.buffer=S.prototype.arrayBuffer;var E=x();t?wS.exports=E:(r.md4=E,n&&define(function(){return E}))})()});var F5=te((yge,M5)=>{"use strict";var eI=We("crypto"),vge=V5(),cse=U5();function lse(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(lse,"createLMResponse");function fse(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(fse,"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 hse(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(hse,"createNTLMResponse");function pse(r){var e=cse.create();return e.update(new Buffer.from(r,"ucs2")),e.buffer()}o(pse,"createNTLMHash");function j5(r,e,t){var n=eI.createHmac("md5",r);return n.update(new Buffer.from(e.toUpperCase()+t,"ucs2")),n.digest()}o(j5,"createNTLMv2Hash");function dse(r,e,t,n,s){var i=new Buffer.alloc(24),a=j5(t,e,s),u=eI.createHmac("md5",a);r.challenge.copy(i,8),i.write(n||tI(16),16,"hex"),u.update(i.slice(8));var c=u.digest();return c.copy(i),i}o(dse,"createLMv2Response");function mse(r,e,t,n,s){var i=new Buffer.alloc(48+r.targetInfo.buffer.length),a=j5(t,e,s),u=eI.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||tI(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(mse,"createNTLMv2Response");function tI(r){for(var e="";e.length<r;)e+=Math.floor(Math.random()*16).toString(16);return e}o(tI,"createPseudoRandomValue");M5.exports={createLMHash:fse,createNTLMHash:pse,createLMResponse:lse,createNTLMResponse:hse,createLMv2Response:dse,createNTLMv2Response:mse,createPseudoRandomValue:tI}});var K5=te((wge,H5)=>{"use strict";var q5=We("os"),Ju=E5(),zu=F5(),Yu="NTLMSSP\0";function gse(r,e){var t=32,n=0,s=new Buffer.alloc(1024);return r=r===void 0?q5.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(gse,"createType1Message");function vse(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(vse,"decodeType2Message");function yse(r,e,t,n,s){var i=52,a=new Buffer.alloc(1024);if(n===void 0&&(n=q5.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(yse,"createType3Message");H5.exports={createType1Message:gse,decodeType2Message:vse,createType3Message:yse}});var W5=te((Ege,X5)=>{"use strict";var xse=We("util"),wse=We("stream"),$5=wse.Writable,G5=G5||function(r){setTimeout(r,0)};X5.exports=Ag;xse.inherits(Ag,$5);function Ag(r){if(!(this instanceof Ag))return new Ag(r);r=r||{},$5.call(this,r)}o(Ag,"DevNull");Ag.prototype._write=function(r,e,t){G5(t)}});var J5=te(Xn=>{"use strict";var Sse=Xn&&Xn.__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]}),Ese=Xn&&Xn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),SS=Xn&&Xn.__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"&&Sse(t,e,n[s]);return Ese(t,e),t}})(),bse=Xn&&Xn.__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())})},Ase=Xn&&Xn.__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}}},Cse=Xn&&Xn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xn,"__esModule",{value:!0});Xn.AxiosError=void 0;Xn.NtlmClient=_se;var z5=SS(WT());Object.defineProperty(Xn,"AxiosError",{enumerable:!0,get:o(function(){return z5.AxiosError},"get")});var rI=SS(K5()),Nse=SS(We("https")),Tse=SS(We("http")),Ise=Cse(W5());function _se(r,e){var t=this,n=e??{};n.httpAgent||(n.httpAgent=new Tse.Agent({keepAlive:!0})),n.httpsAgent||(n.httpsAgent=new Nse.Agent({keepAlive:!0}));var s=z5.default.create(n);return s.interceptors.response.use(function(i){return i},function(i){return bse(t,void 0,void 0,function(){var a,u,c,f,h,m,g,x;return Ase(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(S){return S.match(/ *NTLM/)}))===null||g===void 0?void 0:g.trim())||"",a.config.headers||(a.config.headers={}),u.length<50?(c=rI.createType1Message(r.workstation,r.domain),a.config.headers.Authorization=c):(f=rI.decodeType2Message((u.match(/^NTLM\s+(.+?)(,|\s+|$)/)||[])[1]),h=rI.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(S){m.pipe((0,Ise.default)()),m.once("close",S)})]:[3,2])):[3,3];case 1:v.sent(),v.label=2;case 2:return[2,s(a.config)];case 3:throw i}})})}),s}o(_se,"NtlmClient")});var Cg=te(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===`
54
+ `||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 Q5=te((Ige,Y5)=>{"use strict";var{asciiLowercase:ES,solelyContainsHTTPTokenCodePoints:Dse,soleyContainsHTTPQuotedStringTokenCodePoints:Bse}=Cg();Y5.exports=class{static{o(this,"MIMETypeParameters")}constructor(e){this._map=e}get size(){return this._map.size}get(e){return e=ES(String(e)),this._map.get(e)}has(e){return e=ES(String(e)),this._map.has(e)}set(e,t){if(e=ES(String(e)),t=String(t),!Dse(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=ES(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 tV=te((Dge,eV)=>{"use strict";var{removeLeadingAndTrailingHTTPWhitespace:Rse,removeTrailingHTTPWhitespace:Z5,isHTTPWhitespaceChar:Ose,solelyContainsHTTPTokenCodePoints:nI,soleyContainsHTTPQuotedStringTokenCodePoints:Pse,asciiLowercase:sI,collectAnHTTPQuotedString:kse}=Cg();eV.exports=r=>{r=Rse(r);let e=0,t="";for(;e<r.length&&r[e]!=="/";)t+=r[e],++e;if(t.length===0||!nI(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||!nI(n))return null;let s={type:sI(t),subtype:sI(n),parameters:new Map};for(;e<r.length;){for(++e;Ose(r[e]);)++e;let i="";for(;e<r.length&&r[e]!==";"&&r[e]!=="=";)i+=r[e],++e;if(i=sI(i),e<r.length){if(r[e]===";")continue;++e}let a=null;if(r[e]==='"')for([a,e]=kse(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&&nI(i)&&Pse(a)&&!s.parameters.has(i)&&s.parameters.set(i,a)}return s}});var nV=te((Bge,rV)=>{"use strict";var{solelyContainsHTTPTokenCodePoints:Lse}=Cg();rV.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+="=",(!Lse(n)||n.length===0)&&(n=n.replace(/(["\\])/ug,"\\$1"),n=`"${n}"`),e+=n;return e}});var oV=te((Oge,aV)=>{"use strict";var Vse=Q5(),Use=tV(),jse=nV(),{asciiLowercase:sV,solelyContainsHTTPTokenCodePoints:iV}=Cg();aV.exports=class{static{o(this,"MIMEType")}constructor(e){e=String(e);let t=Use(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 Vse(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=sV(String(e)),e.length===0)throw new Error("Invalid type: must be a non-empty string");if(!iV(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=sV(String(e)),e.length===0)throw new Error("Invalid subtype: must be a non-empty string");if(!iV(e))throw new Error(`Invalid subtype ${e}: must contain only HTTP token code points`);this._subtype=e}get parameters(){return this._parameters}toString(){return jse(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=te(vn=>{"use strict";var Mse=vn&&vn.__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]}),Fse=vn&&vn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),qse=vn&&vn.__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"&&Mse(t,e,n[s]);return Fse(t,e),t}})();Object.defineProperty(vn,"__esModule",{value:!0});vn.wsdlCacheSingleton=vn.TNS_PREFIX=void 0;vn.passwordDigest=Kse;vn.findPrefix=$se;vn.splitQName=Gse;vn.xmlEscape=Xse;vn.parseMTOMResp=Wse;var Hse=qse(We("crypto"));function Kse(r,e,t){let n=Hse.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");vn.TNS_PREFIX="__tns__";function $se(r,e){for(let t in r)if(t!==vn.TNS_PREFIX&&r[t]===e)return t}o($se,"findPrefix");function Gse(r){if(typeof r!="string")return{prefix:vn.TNS_PREFIX,name:r};let[e]=r.split("|",1),t=e.indexOf(":");return{prefix:e.substring(0,t)||vn.TNS_PREFIX,name:e.substring(t+1)}}o(Gse,"splitQName");function Xse(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(Xse,"xmlEscape");function Wse(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(Wse,"parseMTOMResp");var zse=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={}}};vn.wsdlCacheSingleton=new zse});var uV=te((Uge,Jse)=>{Jse.exports={name:"soap",version:"1.6.1",description:"A minimal node SOAP client",engines:{node:">=14.17.0"},author:"Vinay Pulim <v@pulim.com>",dependencies:{axios:"^1.13.1","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 bS=te(Bi=>{"use strict";var Yse=Bi&&Bi.__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]}),Qse=Bi&&Bi.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),fV=Bi&&Bi.__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"&&Yse(t,e,n[s]);return Qse(t,e),t}})(),hV=Bi&&Bi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bi,"__esModule",{value:!0});Bi.HttpClient=void 0;var Zse=fV(WT()),eie=J5(),cV=We("crypto"),tie=hV(Ep()),rie=fV(We("url")),nie=hV(oV()),sie=We("zlib"),iie=Zu(),lV=(0,tie.default)("node-soap"),aie=uV(),oie=class{static{o(this,"HttpClient")}constructor(e){e=e||{},this.options=e,this._request=e.request||Zse.create()}buildRequest(e,t,n,s={}){let i=rie.parse(e),a=t?"POST":"GET",u=i.hostname,c=parseInt(i.port,10),f={"User-Agent":"node-soap/"+aie.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 S in n)f[S]=n[S];let v={url:i.href,method:a,headers:f,transformResponse:o(S=>S,"transformResponse")};if(s.ntlm||(v.validateStatus=null),s.forceMTOM||x.length>0){let S=(0,cV.randomUUID)(),E=null;if(f["Content-Type"].indexOf("action")>-1)for(let A of f["Content-Type"].split("; "))A.indexOf("action")>-1&&(E=A);let C=(0,cV.randomUUID)();f["Content-Type"]='multipart/related; type="application/xop+xml"; start="<'+S+'>"; start-info="text/xml"; boundary='+C,E&&(f["Content-Type"]=f["Content-Type"]+"; "+E);let _=[{"Content-Type":'application/xop+xml; charset=UTF-8; type="text/xml"',"Content-ID":"<"+S+">",body:t}];x.forEach(A=>{_.push({"Content-Type":A.mimetype,"Content-Transfer-Encoding":"binary","Content-ID":"<"+A.contentId+">","Content-Disposition":'attachment; filename="'+A.name+'"',body:A.body})}),v.data=[Buffer.from(`--${C}\r
55
+ `)];let b=0;_.forEach(A=>{Object.keys(A).forEach(T=>{T!=="body"&&v.data.push(Buffer.from(`${T}: ${A[T]}\r
56
+ `))}),v.data.push(Buffer.from(`\r
57
+ `),Buffer.from(A.body),Buffer.from(`\r
58
+ --${C}${b===_.length-1?"--":""}\r
59
+ `)),b++}),v.data=Buffer.concat(v.data)}else v.data=t;s.forceGzip&&(v.decompress=!0,v.data=(0,sie.gzipSync)(v.data),v.headers["Accept-Encoding"]="gzip,deflate",v.headers["Content-Encoding"]="gzip");for(let S in g)if(h.indexOf(S)!==-1)for(let E in s[S])v[S][E]=s[S][E];else v[S]=s[S];return lV("Http request: %j",v),v}handleResponse(e,t,n){if(lV("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,eie.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=nie.default.parse(f.headers["content-type"]);return x&&(g=x.parameters.get("boundary")),g?(0,iie.parseMTOMResp)(f.data,g,(v,S)=>{if(v)return n(v);let E=S.parts.shift();return!E||!E.body?n(new Error("Cannot parse multipart response")):(f.mtomResponseAttachments=S,h(E.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}};Bi.HttpClient=oie});var iI=te(Ri=>{"use strict";var uie=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]}),cie=Ri&&Ri.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),gV=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"&&uie(t,e,n[s]);return cie(t,e),t}})(),vV=Ri&&Ri.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ri,"__esModule",{value:!0});Ri.Client=void 0;var pV=gV(We("assert")),lie=We("crypto"),fie=vV(Ep()),hie=We("events"),pie=vV(d4()),dV=gV(Do()),die=bS(),mie=Zu(),gie=(0,fie.default)("node-soap"),mV=/[^a-z$_0-9]/i,vie=class extends hie.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 die.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(mV,"_"):u;if(this[c]=a[u],!mV.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,S="",E="",C=null,_,b=(0,mie.findPrefix)(m.xmlns,v),A={"Content-Type":"text/xml; charset=utf-8"},T="xmlns:"+g+'="'+x+'"',R=o((z,he,pe)=>{let oe;if(!f)return s(null,null,he,z.Header,C,pe.mtomResponseAttachments);if(!z.html&&!z.Body){if(pe.status>=400){let Q=new Error("Error http status codes");return Q.response=pe,Q.body=he,this.emit("soapError",Q,$),s(Q,z,he,z.Header)}return s(null,z,he,z.Header)}if(typeof z.Body!="object"){let Q=new Error("Cannot parse response");return Q.response=pe,Q.body=he,s(Q,z,he,void 0,C)}oe=z.Body[f.$name],oe||(oe=z.Body[f.$name.replace(/(?:Out(?:put)?|Response)$/,"")]),oe||["Response","Out","Output"].forEach(Q=>{if(Object.hasOwnProperty.call(z.Body,u+Q))return oe=z.Body[u+Q]}),s(null,oe,he,z.Header,C,pe.mtomResponseAttachments)},"finish"),H=o((z,he)=>{let pe;try{pe=this.wsdl.xmlToObject(z)}catch(oe){if(!f||!f.$lookupTypes){gie("Response element is not present. Unable to convert response xml to json.");let Q=dV.isObject(z)?z:K(z);if(Q)return s(null,he,Q,void 0,C)}return oe.response=he,oe.body=z,this.emit("soapError",oe,$),s(oe,he,z,void 0,C,he.mtomResponseAttachments)}return R(pe,z,he)},"parseSync");this.SOAPAction?_=this.SOAPAction:e.soapAction!==void 0&&e.soapAction!==null?_=e.soapAction:_=(v.lastIndexOf("/")!==v.length-1?v+"/":v)+u,this.wsdl.options.forceSoap12Headers?(A["Content-Type"]=`application/soap+xml; charset=utf-8; action="${_}"`,T="xmlns:"+g+'="http://www.w3.org/2003/05/soap-envelope"'):A.SOAPAction='"'+_+'"',i=i||{},this.security&&this.security.addHeaders&&this.security.addHeaders(A),this.security&&this.security.addOptions&&this.security.addOptions(i),h==="rpc"&&(c.parts||c.name==="element"||t===null)?(pV.ok(!h||h==="rpc","invalid message definition for document style binding"),E=this.wsdl.objectToRpcXML(u,t,b,v,c.name!=="element"),e.inputSoap==="encoded"&&(S='soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" ')):(pV.ok(!h||h==="document","invalid message definition for rpc style binding"),E=this.wsdl.objectToDocumentXML(c.$name,t,c.targetNSAlias,c.targetNamespace,c.$type||c.$lookupType));let I;this.soapHeaders&&(I=this.soapHeaders.map(z=>typeof z=="function"?z(e,n,_,t):z).join(" ")),C='<?xml version="1.0" encoding="utf-8"?><'+g+":Envelope "+T+' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '+S+this.wsdl.xmlnsInEnvelope+">"+(I||this.security&&this.security.toXML()?"<"+g+":Header"+(this.wsdl.xmlnsInHeader?" "+this.wsdl.xmlnsInHeader:"")+">"+(I||"")+(this.security&&!this.security.postProcess?this.security.toXML():"")+"</"+g+":Header>":"")+"<"+g+":Body"+(this.bodyAttributes?this.bodyAttributes.join(" "):"")+">"+E+"</"+g+":Body></"+g+":Envelope>",this.security&&this.security.postProcess&&(C=this.security.postProcess(C,g)),i&&i.postProcess&&(C=i.postProcess(C)),this.lastMessage=E,this.lastRequest=C,this.lastEndpoint=n;let $=i.exchangeId||(0,lie.randomUUID)();if(this.emit("message",E,$),this.emit("request",C,$),this.httpHeaders===null)A={};else{for(let z in this.httpHeaders)A[z]=this.httpHeaders[z];for(let z in a)A[z]=a[z]}let K=o(z=>{try{return JSON.parse(z)}catch{return}},"tryJSONparse");if(this.streamAllowed&&typeof this.httpClient.requestStream=="function"){s=dV.once(s);let z=Date.now(),he=o(pe=>{this.lastResponse=null,this.lastResponseHeaders=null,this.lastElapsedTime=null,this.lastRequestHeaders=pe.config&&pe.config.headers,this.emit("response",null,null,$),this.returnSaxStream||!pe.response||!pe.response.data?s(pe,void 0,void 0,void 0,C):(pe.response.data.on("close",()=>{s(pe,void 0,void 0,void 0,C)}),pe.response.data.on("data",oe=>{pe.response.data=oe.toString()}))},"onError");this.httpClient.requestStream(n,C,A,i,this).then(pe=>{if(this.lastRequestHeaders=pe.headers,pe.data.on&&pe.data.on("error",oe=>he(oe)),pe.status!==200||!f||!f.$lookupTypes){(0,pie.default)(pe.data).then(oe=>(this.lastResponse=oe,this.lastElapsedTime=Date.now()-z,this.lastResponseHeaders=pe&&pe.headers,this.lastRequestHeaders=pe.config&&pe.config.headers||pe.headers,this.emit("response",oe,pe,$),H(oe,pe)));return}if(this.returnSaxStream){let oe=this.wsdl.getSaxStream(pe.data);return R({saxStream:oe},"<stream>",pe.data)}else this.wsdl.xmlToObject(pe.data,(oe,Q)=>(this.lastResponse=pe,this.lastElapsedTime=Date.now()-z,this.lastResponseHeaders=pe&&pe.headers,this.lastRequestHeaders=pe.config.headers,this.emit("response","<stream>",pe.data,$),oe?(oe.response=pe,oe.body="<stream>",this.emit("soapError",oe,$),s(oe,pe,void 0,void 0,C)):R(Q,"<stream>",pe)))},he);return}let F=Date.now();return this.httpClient.request(n,C,(z,he,pe)=>{if(this.lastResponse=pe,he&&(this.lastResponseHeaders=he.headers,this.lastElapsedTime=Date.now()-F,this.lastResponseAttachments=he.mtomResponseAttachments,this.lastRequestHeaders=he.config&&he.config.headers),this.emit("response",pe,he,$),z){this.lastRequestHeaders=z.config&&z.config.headers;try{z.response&&z.response.data&&this.wsdl.xmlToObject(z.response.data)}catch(oe){z.root=oe.root||oe}s(z,void 0,void 0,void 0,C)}else return H(pe,he)},A,i,this)}};Ri.Client=vie});var xV=te(qa=>{"use strict";var yie=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]}),xie=qa&&qa.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),wie=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"&&yie(t,e,n[s]);return xie(t,e),t}})();Object.defineProperty(qa,"__esModule",{value:!0});qa.BasicAuthSecurity=void 0;var yV=wie(Do()),Sie=class{static{o(this,"BasicAuthSecurity")}constructor(e,t,n){this._username=e,this._password=t,this.defaults={},yV.merge(this.defaults,n)}addHeaders(e){e.Authorization="Basic "+Buffer.from(this._username+":"+this._password||"").toString("base64")}toXML(){return""}addOptions(e){yV.merge(e,this.defaults)}};qa.BasicAuthSecurity=Sie});var SV=te(Ha=>{"use strict";var Eie=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]}),bie=Ha&&Ha.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Aie=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"&&Eie(t,e,n[s]);return bie(t,e),t}})();Object.defineProperty(Ha,"__esModule",{value:!0});Ha.BearerSecurity=void 0;var wV=Aie(Do()),Cie=class{static{o(this,"BearerSecurity")}constructor(e,t){this._token=e,this.defaults={},wV.merge(this.defaults,t)}addHeaders(e){e.Authorization="Bearer "+this._token}toXML(){return""}addOptions(e){wV.merge(e,this.defaults)}};Ha.BearerSecurity=Cie});var AV=te(Ka=>{"use strict";var Nie=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]}),Tie=Ka&&Ka.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),oI=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"&&Nie(t,e,n[s]);return Tie(t,e),t}})();Object.defineProperty(Ka,"__esModule",{value:!0});Ka.ClientSSLSecurity=void 0;var aI=oI(We("fs")),EV=oI(We("https")),bV=oI(Do()),Iie=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=aI.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=aI.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=aI.readFileSync(n):(s=n,this.ca=null)),this.defaults={},bV.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,bV.merge(e,this.defaults),e.forever?(this.agent||(e.keepAlive=!0,this.agent=new EV.Agent(e)),t=this.agent):t=new EV.Agent(e),e.httpsAgent=t}};Ka.ClientSSLSecurity=Iie});var NV=te($a=>{"use strict";var _ie=$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]}),Die=$a&&$a.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),uI=$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"&&_ie(t,e,n[s]);return Die(t,e),t}})();Object.defineProperty($a,"__esModule",{value:!0});$a.ClientSSLSecurityPFX=void 0;var Bie=uI(We("fs")),Rie=uI(We("https")),CV=uI(Do()),Oie=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={},CV.merge(this.defaults,n)}toXML(){return""}addOptions(e){e.pfx=this.pfx,this.passphrase&&(e.passphrase=this.passphrase),CV.merge(e,this.defaults),e.httpsAgent=new Rie.Agent(e)}};$a.ClientSSLSecurityPFX=Oie});var TV=te(Ga=>{"use strict";var Pie=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]}),kie=Ga&&Ga.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Lie=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"&&Pie(t,e,n[s]);return kie(t,e),t}})();Object.defineProperty(Ga,"__esModule",{value:!0});Ga.NTLMSecurity=void 0;var Vie=Lie(Do()),Uie=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){Vie.merge(e,this.defaults)}};Ga.NTLMSecurity=Uie});var IV=te(Xa=>{"use strict";var jie=Xa&&Xa.__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]}),Mie=Xa&&Xa.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Fie=Xa&&Xa.__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"&&jie(t,e,n[s]);return Mie(t,e),t}})();Object.defineProperty(Xa,"__esModule",{value:!0});Xa.WSSecurity=void 0;var qie=Fie(We("crypto")),cI=Zu(),Hie=["PasswordDigest","PasswordText"],Kie=class{static{o(this,"WSSecurity")}constructor(e,t,n){n=n||{},this._username=e,this._password=t,this._envelopeKey="soap",this._appendElement="",typeof n=="string"?(this._passwordType=n||"PasswordText",n={}):this._passwordType=n.passwordType?n.passwordType:"PasswordText",Hie.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),n.appendElement&&(this._appendElement=n.appendElement)}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=qie.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,cI.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,cI.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,cI.xmlEscape)(this._username)+"</wsse:Username>"+i+(this._hasTokenCreated?"<wsu:Created>"+n+"</wsu:Created>":"")+"</wsse:UsernameToken>"+this._appendElement+"</wsse:Security>"}};Xa.WSSecurity=Kie});var AS=te(lI=>{"use strict";var $ie=typeof lI>"u"?{}:lI;(function(r){"use strict";function e(d){var B=Array.prototype.slice,G=d.length,ne=o(function(W,it){return function(){return it.apply(this,W.concat(B.call(arguments)))}},"partial"),ae=o(function(){var W=B.call(arguments);return W.length<G?ne(W,ae):d.apply(this,B.apply(arguments,[0,G]))},"fn1");return ae}o(e,"curry");var t=o(function(d,B){for(var G=0;G<B.length;G+=1)d(B[G],G,B)},"forEach"),n=o(function(d,B,G){var ne=B;return t(function(ae,W){ne=d(ne,ae,W)},G),ne},"reduce"),s=o(function(d,B){var G=new Array(B.length);return t(function(ne,ae){G[ae]=d(ne)},B),G},"map"),i=o(function(d,B){var G=[];return t(function(ne,ae){d(ne,ae)&&G.push(ne)},B),G},"filter"),a=o(function(d,B){for(var G=0;G<d.length;G+=1)if(d[G]===B)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,B){return B.join(d)},"join"),h=o(function(d,B,G){return d+G+B},"wrap"),m=Array.prototype.concat,g=32767;function x(d){for(var B=[],G=0;G<d.length;G+=g){var ne=d.slice(G,G+g);B=m.apply(B,ne)}return B}o(x,"flatten");function v(d,B){for(var G=Object(d),ne=1;ne<arguments.length;ne++){var ae=arguments[ne];if(ae!=null)for(var W in ae)Object.prototype.hasOwnProperty.call(ae,W)&&(G[W]=ae[W])}return G}o(v,"assign");var S={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};E.prototype=new Object,E.prototype.constructor=E,E.superclass=Object.prototype;function E(){this.init()}o(E,"XPathParser"),E.prototype.init=function(){this.reduceActions=[],this.reduceActions[3]=function(d){return new H(d[0],d[2])},this.reduceActions[5]=function(d){return new I(d[0],d[2])},this.reduceActions[7]=function(d){return new $(d[0],d[2])},this.reduceActions[8]=function(d){return new K(d[0],d[2])},this.reduceActions[10]=function(d){return new F(d[0],d[2])},this.reduceActions[11]=function(d){return new z(d[0],d[2])},this.reduceActions[12]=function(d){return new he(d[0],d[2])},this.reduceActions[13]=function(d){return new pe(d[0],d[2])},this.reduceActions[15]=function(d){return new oe(d[0],d[2])},this.reduceActions[16]=function(d){return new Q(d[0],d[2])},this.reduceActions[18]=function(d){return new xe(d[0],d[2])},this.reduceActions[19]=function(d){return new Me(d[0],d[2])},this.reduceActions[20]=function(d){return new Qe(d[0],d[2])},this.reduceActions[22]=function(d){return new T(d[1])},this.reduceActions[24]=function(d){return new de(d[0],d[2])},this.reduceActions[25]=function(d){return new fe(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 N(N.DESCENDANTORSELF,w.nodeTest,[])),d[0]},this.reduceActions[29]=function(d){return new fe(d[0],[],void 0)},this.reduceActions[30]=function(d){return tt.instance_of(d[0],fe)?(d[0].filterPredicates==null&&(d[0].filterPredicates=[]),d[0].filterPredicates.push(d[1]),d[0]):new fe(d[0],[d[1]],void 0)},this.reduceActions[32]=function(d){return d[1]},this.reduceActions[33]=function(d){return new Ee(d[0])},this.reduceActions[34]=function(d){return new Se(d[0])},this.reduceActions[36]=function(d){return new P(d[0],[])},this.reduceActions[37]=function(d){return new P(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 ft(!0,[])},this.reduceActions[44]=function(d){return d[1].absolute=!0,d[1]},this.reduceActions[46]=function(d){return new ft(!1,[d[0]])},this.reduceActions[47]=function(d){return d[0].steps.push(d[2]),d[0]},this.reduceActions[49]=function(d){return new N(d[0],d[1],[])},this.reduceActions[50]=function(d){return new N(N.CHILD,d[0],[])},this.reduceActions[51]=function(d){return new N(d[0],d[1],d[2])},this.reduceActions[52]=function(d){return new N(N.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"?N.ANCESTOR:d[0]=="ancestor-or-self"?N.ANCESTORORSELF:d[0]=="attribute"?N.ATTRIBUTE:d[0]=="child"?N.CHILD:d[0]=="descendant"?N.DESCENDANT:d[0]=="descendant-or-self"?N.DESCENDANTORSELF:d[0]=="following"?N.FOLLOWING:d[0]=="following-sibling"?N.FOLLOWINGSIBLING:d[0]=="namespace"?N.NAMESPACE:d[0]=="parent"?N.PARENT:d[0]=="preceding"?N.PRECEDING:d[0]=="preceding-sibling"?N.PRECEDINGSIBLING:d[0]=="self"?N.SELF:-1},this.reduceActions[57]=function(d){return N.ATTRIBUTE},this.reduceActions[59]=function(d){return d[0]=="comment"?w.commentTest:d[0]=="text"?w.textTest:d[0]=="processing-instruction"?w.anyPiTest:d[0]=="node"?w.nodeTest:new w(-1,void 0)},this.reduceActions[60]=function(d){return new w.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 N(N.DESCENDANTORSELF,w.nodeTest,[])),d[1]},this.reduceActions[64]=function(d){return d[0].steps.push(new N(N.DESCENDANTORSELF,w.nodeTest,[])),d[0].steps.push(d[2]),d[0]},this.reduceActions[65]=function(d){return new N(N.SELF,w.nodeTest,[])},this.reduceActions[66]=function(d){return new N(N.PARENT,w.nodeTest,[])},this.reduceActions[67]=function(d){return new X(d[1])},this.reduceActions[68]=function(d){return w.nameTestAny},this.reduceActions[69]=function(d){return new w.NameTestPrefixAny(d[0].split(":")[0])},this.reduceActions[70]=function(d){return new w.NameTestQName(d[0])}},E.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 "],E.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 "],E.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 "," "," "],E.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]],E.DOUBLEDOT=2,E.DOUBLECOLON=3,E.DOUBLESLASH=4,E.NOTEQUAL=5,E.LESSTHANOREQUAL=6,E.GREATERTHANOREQUAL=7,E.AND=8,E.OR=9,E.MOD=10,E.DIV=11,E.MULTIPLYOPERATOR=12,E.FUNCTIONNAME=13,E.AXISNAME=14,E.LITERAL=15,E.NUMBER=16,E.ASTERISKNAMETEST=17,E.QNAME=18,E.NCNAMECOLONASTERISK=19,E.NODETYPE=20,E.PROCESSINGINSTRUCTIONWITHLITERAL=21,E.EQUALS=22,E.LESSTHAN=23,E.GREATERTHAN=24,E.PLUS=25,E.MINUS=26,E.BAR=27,E.SLASH=28,E.LEFTPARENTHESIS=29,E.RIGHTPARENTHESIS=30,E.COMMA=31,E.AT=32,E.LEFTBRACKET=33,E.RIGHTBRACKET=34,E.DOT=35,E.DOLLAR=36,E.prototype.tokenize=function(d){for(var B=[],G=[],ne=d+"\0",ae=0,W=ne.charAt(ae++);;){for(;W==" "||W==" "||W=="\r"||W==`
60
+ `;)W=ne.charAt(ae++);if(W=="\0"||ae>=ne.length)break;if(W=="("){B.push(E.LEFTPARENTHESIS),G.push(W),W=ne.charAt(ae++);continue}if(W==")"){B.push(E.RIGHTPARENTHESIS),G.push(W),W=ne.charAt(ae++);continue}if(W=="["){B.push(E.LEFTBRACKET),G.push(W),W=ne.charAt(ae++);continue}if(W=="]"){B.push(E.RIGHTBRACKET),G.push(W),W=ne.charAt(ae++);continue}if(W=="@"){B.push(E.AT),G.push(W),W=ne.charAt(ae++);continue}if(W==","){B.push(E.COMMA),G.push(W),W=ne.charAt(ae++);continue}if(W=="|"){B.push(E.BAR),G.push(W),W=ne.charAt(ae++);continue}if(W=="+"){B.push(E.PLUS),G.push(W),W=ne.charAt(ae++);continue}if(W=="-"){B.push(E.MINUS),G.push(W),W=ne.charAt(ae++);continue}if(W=="="){B.push(E.EQUALS),G.push(W),W=ne.charAt(ae++);continue}if(W=="$"){B.push(E.DOLLAR),G.push(W),W=ne.charAt(ae++);continue}if(W=="."){if(W=ne.charAt(ae++),W=="."){B.push(E.DOUBLEDOT),G.push(".."),W=ne.charAt(ae++);continue}if(W>="0"&&W<="9"){var it="."+W;for(W=ne.charAt(ae++);W>="0"&&W<="9";)it+=W,W=ne.charAt(ae++);B.push(E.NUMBER),G.push(it);continue}B.push(E.DOT),G.push(".");continue}if(W=="'"||W=='"'){for(var Vt=W,Jt="";ae<ne.length&&(W=ne.charAt(ae))!==Vt;)Jt+=W,ae+=1;if(W!==Vt)throw Mn.fromMessage("Unterminated string literal: "+Vt+Jt);ae+=1,B.push(E.LITERAL),G.push(Jt),W=ne.charAt(ae++);continue}if(W>="0"&&W<="9"){var it=W;for(W=ne.charAt(ae++);W>="0"&&W<="9";)it+=W,W=ne.charAt(ae++);if(W=="."&&ne.charAt(ae)>="0"&&ne.charAt(ae)<="9")for(it+=W,it+=ne.charAt(ae++),W=ne.charAt(ae++);W>="0"&&W<="9";)it+=W,W=ne.charAt(ae++);B.push(E.NUMBER),G.push(it);continue}if(W=="*"){if(B.length>0){var rt=B[B.length-1];if(rt!=E.AT&&rt!=E.DOUBLECOLON&&rt!=E.LEFTPARENTHESIS&&rt!=E.LEFTBRACKET&&rt!=E.AND&&rt!=E.OR&&rt!=E.MOD&&rt!=E.DIV&&rt!=E.MULTIPLYOPERATOR&&rt!=E.SLASH&&rt!=E.DOUBLESLASH&&rt!=E.BAR&&rt!=E.PLUS&&rt!=E.MINUS&&rt!=E.EQUALS&&rt!=E.NOTEQUAL&&rt!=E.LESSTHAN&&rt!=E.LESSTHANOREQUAL&&rt!=E.GREATERTHAN&&rt!=E.GREATERTHANOREQUAL){B.push(E.MULTIPLYOPERATOR),G.push(W),W=ne.charAt(ae++);continue}}B.push(E.ASTERISKNAMETEST),G.push(W),W=ne.charAt(ae++);continue}if(W==":"&&ne.charAt(ae)==":"){B.push(E.DOUBLECOLON),G.push("::"),ae++,W=ne.charAt(ae++);continue}if(W=="/"){if(W=ne.charAt(ae++),W=="/"){B.push(E.DOUBLESLASH),G.push("//"),W=ne.charAt(ae++);continue}B.push(E.SLASH),G.push("/");continue}if(W=="!"&&ne.charAt(ae)=="="){B.push(E.NOTEQUAL),G.push("!="),ae++,W=ne.charAt(ae++);continue}if(W=="<"){if(ne.charAt(ae)=="="){B.push(E.LESSTHANOREQUAL),G.push("<="),ae++,W=ne.charAt(ae++);continue}B.push(E.LESSTHAN),G.push("<"),W=ne.charAt(ae++);continue}if(W==">"){if(ne.charAt(ae)=="="){B.push(E.GREATERTHANOREQUAL),G.push(">="),ae++,W=ne.charAt(ae++);continue}B.push(E.GREATERTHAN),G.push(">"),W=ne.charAt(ae++);continue}if(W=="_"||tt.isLetter(W.charCodeAt(0))){var Rt=W;for(W=ne.charAt(ae++);tt.isNCNameChar(W.charCodeAt(0));)Rt+=W,W=ne.charAt(ae++);if(B.length>0){var rt=B[B.length-1];if(rt!=E.AT&&rt!=E.DOUBLECOLON&&rt!=E.LEFTPARENTHESIS&&rt!=E.LEFTBRACKET&&rt!=E.AND&&rt!=E.OR&&rt!=E.MOD&&rt!=E.DIV&&rt!=E.MULTIPLYOPERATOR&&rt!=E.SLASH&&rt!=E.DOUBLESLASH&&rt!=E.BAR&&rt!=E.PLUS&&rt!=E.MINUS&&rt!=E.EQUALS&&rt!=E.NOTEQUAL&&rt!=E.LESSTHAN&&rt!=E.LESSTHANOREQUAL&&rt!=E.GREATERTHAN&&rt!=E.GREATERTHANOREQUAL){if(Rt=="and"){B.push(E.AND),G.push(Rt);continue}if(Rt=="or"){B.push(E.OR),G.push(Rt);continue}if(Rt=="mod"){B.push(E.MOD),G.push(Rt);continue}if(Rt=="div"){B.push(E.DIV),G.push(Rt);continue}}}if(W==":"){if(ne.charAt(ae)=="*"){B.push(E.NCNAMECOLONASTERISK),G.push(Rt+":*"),ae++,W=ne.charAt(ae++);continue}if(ne.charAt(ae)=="_"||tt.isLetter(ne.charCodeAt(ae))){for(Rt+=":",W=ne.charAt(ae++);tt.isNCNameChar(W.charCodeAt(0));)Rt+=W,W=ne.charAt(ae++);if(W=="("){B.push(E.FUNCTIONNAME),G.push(Rt);continue}B.push(E.QNAME),G.push(Rt);continue}if(ne.charAt(ae)==":"){B.push(E.AXISNAME),G.push(Rt);continue}}if(W=="("){if(Rt=="comment"||Rt=="text"||Rt=="node"){B.push(E.NODETYPE),G.push(Rt);continue}if(Rt=="processing-instruction"){ne.charAt(ae)==")"?B.push(E.NODETYPE):B.push(E.PROCESSINGINSTRUCTIONWITHLITERAL),G.push(Rt);continue}B.push(E.FUNCTIONNAME),G.push(Rt);continue}B.push(E.QNAME),G.push(Rt);continue}throw new Error("Unexpected character "+W)}return B.push(1),G.push("[EOF]"),[B,G]},E.SHIFT="s",E.REDUCE="r",E.ACCEPT="a",E.prototype.parse=function(Jt){var B,G,ne=this.tokenize(Jt);if(ne!=null){B=ne[0],G=ne[1];var ae=0,W=[],it=[],Vt=[],Jt,rt,Rt;for(W.push(0),it.push(1),Vt.push("_S"),rt=B[ae],Rt=G[ae++];;)switch(Jt=W[W.length-1],E.actionTable[Jt].charAt(rt-1)){case E.SHIFT:it.push(-rt),Vt.push(Rt),W.push(E.actionTableNumber[Jt].charCodeAt(rt-1)-32),rt=B[ae],Rt=G[ae++];break;case E.REDUCE:for(var Fn=E.productions[E.actionTableNumber[Jt].charCodeAt(rt-1)-32][1],pi=[],cr=0;cr<Fn;cr++)it.pop(),pi.unshift(Vt.pop()),W.pop();var ba=W[W.length-1];it.push(E.productions[E.actionTableNumber[Jt].charCodeAt(rt-1)-32][0]),this.reduceActions[E.actionTableNumber[Jt].charCodeAt(rt-1)-32]==null?Vt.push(pi[0]):Vt.push(this.reduceActions[E.actionTableNumber[Jt].charCodeAt(rt-1)-32](pi)),W.push(E.gotoTable[ba].charCodeAt(E.productions[E.actionTableNumber[Jt].charCodeAt(rt-1)-32][0]-2)-33);break;case E.ACCEPT:return new C(Vt.pop());default:throw new Error("XPath parse error")}}},C.prototype=new Object,C.prototype.constructor=C,C.superclass=Object.prototype;function C(d){this.expression=d}o(C,"XPath"),C.prototype.toString=function(){return this.expression.toString()};function _(d,B,G){B in d||(d[B]=G)}o(_,"setIfUnset"),C.prototype.evaluate=function(d){return d.contextNode=d.expressionContextNode,d.contextSize=1,d.contextPosition=1,d.isHtml&&(_(d,"caseInsensitive",!0),_(d,"allowAnyNamespaceForNoPrefix",!0)),_(d,"caseInsensitive",!1),this.expression.evaluate(d)},C.XML_NAMESPACE_URI="http://www.w3.org/XML/1998/namespace",C.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.")},A.prototype=new b,A.prototype.constructor=A,A.superclass=b.prototype;function A(d){arguments.length>0&&this.init(d)}o(A,"UnaryOperation"),A.prototype.init=function(d){this.rhs=d},T.prototype=new A,T.prototype.constructor=T,T.superclass=A.prototype;function T(d){arguments.length>0&&this.init(d)}o(T,"UnaryMinusOperation"),T.prototype.init=function(d){T.superclass.init.call(this,d)},T.prototype.evaluate=function(d){return this.rhs.evaluate(d).number().negate()},T.prototype.toString=function(){return"-"+this.rhs.toString()},R.prototype=new b,R.prototype.constructor=R,R.superclass=b.prototype;function R(d,B){arguments.length>0&&this.init(d,B)}o(R,"BinaryOperation"),R.prototype.init=function(d,B){this.lhs=d,this.rhs=B},H.prototype=new R,H.prototype.constructor=H,H.superclass=R.prototype;function H(d,B){arguments.length>0&&this.init(d,B)}o(H,"OrOperation"),H.prototype.init=function(d,B){H.superclass.init.call(this,d,B)},H.prototype.toString=function(){return"("+this.lhs.toString()+" or "+this.rhs.toString()+")"},H.prototype.evaluate=function(d){var B=this.lhs.evaluate(d).bool();return B.booleanValue()?B:this.rhs.evaluate(d).bool()},I.prototype=new R,I.prototype.constructor=I,I.superclass=R.prototype;function I(d,B){arguments.length>0&&this.init(d,B)}o(I,"AndOperation"),I.prototype.init=function(d,B){I.superclass.init.call(this,d,B)},I.prototype.toString=function(){return"("+this.lhs.toString()+" and "+this.rhs.toString()+")"},I.prototype.evaluate=function(d){var B=this.lhs.evaluate(d).bool();return B.booleanValue()?this.rhs.evaluate(d).bool():B},$.prototype=new R,$.prototype.constructor=$,$.superclass=R.prototype;function $(d,B){arguments.length>0&&this.init(d,B)}o($,"EqualsOperation"),$.prototype.init=function(d,B){$.superclass.init.call(this,d,B)},$.prototype.toString=function(){return"("+this.lhs.toString()+" = "+this.rhs.toString()+")"},$.prototype.evaluate=function(d){return this.lhs.evaluate(d).equals(this.rhs.evaluate(d))},K.prototype=new R,K.prototype.constructor=K,K.superclass=R.prototype;function K(d,B){arguments.length>0&&this.init(d,B)}o(K,"NotEqualOperation"),K.prototype.init=function(d,B){K.superclass.init.call(this,d,B)},K.prototype.toString=function(){return"("+this.lhs.toString()+" != "+this.rhs.toString()+")"},K.prototype.evaluate=function(d){return this.lhs.evaluate(d).notequal(this.rhs.evaluate(d))},F.prototype=new R,F.prototype.constructor=F,F.superclass=R.prototype;function F(d,B){arguments.length>0&&this.init(d,B)}o(F,"LessThanOperation"),F.prototype.init=function(d,B){F.superclass.init.call(this,d,B)},F.prototype.evaluate=function(d){return this.lhs.evaluate(d).lessthan(this.rhs.evaluate(d))},F.prototype.toString=function(){return"("+this.lhs.toString()+" < "+this.rhs.toString()+")"},z.prototype=new R,z.prototype.constructor=z,z.superclass=R.prototype;function z(d,B){arguments.length>0&&this.init(d,B)}o(z,"GreaterThanOperation"),z.prototype.init=function(d,B){z.superclass.init.call(this,d,B)},z.prototype.evaluate=function(d){return this.lhs.evaluate(d).greaterthan(this.rhs.evaluate(d))},z.prototype.toString=function(){return"("+this.lhs.toString()+" > "+this.rhs.toString()+")"},he.prototype=new R,he.prototype.constructor=he,he.superclass=R.prototype;function he(d,B){arguments.length>0&&this.init(d,B)}o(he,"LessThanOrEqualOperation"),he.prototype.init=function(d,B){he.superclass.init.call(this,d,B)},he.prototype.evaluate=function(d){return this.lhs.evaluate(d).lessthanorequal(this.rhs.evaluate(d))},he.prototype.toString=function(){return"("+this.lhs.toString()+" <= "+this.rhs.toString()+")"},pe.prototype=new R,pe.prototype.constructor=pe,pe.superclass=R.prototype;function pe(d,B){arguments.length>0&&this.init(d,B)}o(pe,"GreaterThanOrEqualOperation"),pe.prototype.init=function(d,B){pe.superclass.init.call(this,d,B)},pe.prototype.evaluate=function(d){return this.lhs.evaluate(d).greaterthanorequal(this.rhs.evaluate(d))},pe.prototype.toString=function(){return"("+this.lhs.toString()+" >= "+this.rhs.toString()+")"},oe.prototype=new R,oe.prototype.constructor=oe,oe.superclass=R.prototype;function oe(d,B){arguments.length>0&&this.init(d,B)}o(oe,"PlusOperation"),oe.prototype.init=function(d,B){oe.superclass.init.call(this,d,B)},oe.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().plus(this.rhs.evaluate(d).number())},oe.prototype.toString=function(){return"("+this.lhs.toString()+" + "+this.rhs.toString()+")"},Q.prototype=new R,Q.prototype.constructor=Q,Q.superclass=R.prototype;function Q(d,B){arguments.length>0&&this.init(d,B)}o(Q,"MinusOperation"),Q.prototype.init=function(d,B){Q.superclass.init.call(this,d,B)},Q.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().minus(this.rhs.evaluate(d).number())},Q.prototype.toString=function(){return"("+this.lhs.toString()+" - "+this.rhs.toString()+")"},xe.prototype=new R,xe.prototype.constructor=xe,xe.superclass=R.prototype;function xe(d,B){arguments.length>0&&this.init(d,B)}o(xe,"MultiplyOperation"),xe.prototype.init=function(d,B){xe.superclass.init.call(this,d,B)},xe.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().multiply(this.rhs.evaluate(d).number())},xe.prototype.toString=function(){return"("+this.lhs.toString()+" * "+this.rhs.toString()+")"},Me.prototype=new R,Me.prototype.constructor=Me,Me.superclass=R.prototype;function Me(d,B){arguments.length>0&&this.init(d,B)}o(Me,"DivOperation"),Me.prototype.init=function(d,B){Me.superclass.init.call(this,d,B)},Me.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().div(this.rhs.evaluate(d).number())},Me.prototype.toString=function(){return"("+this.lhs.toString()+" div "+this.rhs.toString()+")"},Qe.prototype=new R,Qe.prototype.constructor=Qe,Qe.superclass=R.prototype;function Qe(d,B){arguments.length>0&&this.init(d,B)}o(Qe,"ModOperation"),Qe.prototype.init=function(d,B){Qe.superclass.init.call(this,d,B)},Qe.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().mod(this.rhs.evaluate(d).number())},Qe.prototype.toString=function(){return"("+this.lhs.toString()+" mod "+this.rhs.toString()+")"},de.prototype=new R,de.prototype.constructor=de,de.superclass=R.prototype;function de(d,B){arguments.length>0&&this.init(d,B)}o(de,"BarOperation"),de.prototype.init=function(d,B){de.superclass.init.call(this,d,B)},de.prototype.evaluate=function(d){return this.lhs.evaluate(d).nodeset().union(this.rhs.evaluate(d).nodeset())},de.prototype.toString=function(){return s(c,[this.lhs,this.rhs]).join(" | ")},fe.prototype=new b,fe.prototype.constructor=fe,fe.superclass=b.prototype;function fe(d,B,G){arguments.length>0&&this.init(d,B,G)}o(fe,"PathExpr"),fe.prototype.init=function(d,B,G){fe.superclass.init.call(this),this.filter=d,this.filterPredicates=B,this.locationPath=G};function Re(d){for(;d&&d.parentNode;)d=d.parentNode;return d}o(Re,"findRoot"),fe.applyPredicates=function(d,B,G){if(d.length===0)return G;var ne=B.extend({});return n(function(ae,W){return ne.contextSize=ae.length,i(function(it,Vt){return ne.contextNode=it,ne.contextPosition=Vt+1,fe.predicateMatches(W,ne)},ae)},G,d)},fe.getRoot=function(d,B){var G=B[0];if(G.nodeType===S.DOCUMENT_NODE)return G;if(d.virtualRoot)return d.virtualRoot;var ne=G.ownerDocument;if(ne)return ne;for(var ae=G;ae.parentNode!=null;)ae=ae.parentNode;return ae},fe.applyStep=function(d,B,G){var ne=this,ae=[];switch(B.contextNode=G,d.axis){case N.ANCESTOR:if(B.contextNode===B.virtualRoot)break;var W;for(B.contextNode.nodeType==S.ATTRIBUTE_NODE?W=fe.getOwnerElement(B.contextNode):W=B.contextNode.parentNode;W!=null&&(d.nodeTest.matches(W,B)&&ae.push(W),W!==B.virtualRoot);)W=W.parentNode;break;case N.ANCESTORORSELF:for(var W=B.contextNode;W!=null&&(d.nodeTest.matches(W,B)&&ae.push(W),W!==B.virtualRoot);W=W.nodeType==S.ATTRIBUTE_NODE?fe.getOwnerElement(W):W.parentNode);break;case N.ATTRIBUTE:var it=B.contextNode.attributes;if(it!=null)for(var Vt=0;Vt<it.length;Vt++){var W=it.item(Vt);d.nodeTest.matches(W,B)&&ae.push(W)}break;case N.CHILD:for(var W=B.contextNode.firstChild;W!=null;W=W.nextSibling)d.nodeTest.matches(W,B)&&ae.push(W);break;case N.DESCENDANT:for(var cr=[B.contextNode.firstChild];cr.length>0;)for(var W=cr.pop();W!=null;)d.nodeTest.matches(W,B)&&ae.push(W),W.firstChild!=null?(cr.push(W.nextSibling),W=W.firstChild):W=W.nextSibling;break;case N.DESCENDANTORSELF:d.nodeTest.matches(B.contextNode,B)&&ae.push(B.contextNode);for(var cr=[B.contextNode.firstChild];cr.length>0;)for(var W=cr.pop();W!=null;)d.nodeTest.matches(W,B)&&ae.push(W),W.firstChild!=null?(cr.push(W.nextSibling),W=W.firstChild):W=W.nextSibling;break;case N.FOLLOWING:if(B.contextNode===B.virtualRoot)break;var cr=[];B.contextNode.firstChild!=null?cr.unshift(B.contextNode.firstChild):cr.unshift(B.contextNode.nextSibling);for(var W=B.contextNode.parentNode;W!=null&&W.nodeType!=S.DOCUMENT_NODE&&W!==B.virtualRoot;W=W.parentNode)cr.unshift(W.nextSibling);do for(var W=cr.pop();W!=null;)d.nodeTest.matches(W,B)&&ae.push(W),W.firstChild!=null?(cr.push(W.nextSibling),W=W.firstChild):W=W.nextSibling;while(cr.length>0);break;case N.FOLLOWINGSIBLING:if(B.contextNode===B.virtualRoot)break;for(var W=B.contextNode.nextSibling;W!=null;W=W.nextSibling)d.nodeTest.matches(W,B)&&ae.push(W);break;case N.NAMESPACE:var Jt={};if(B.contextNode.nodeType==S.ELEMENT_NODE){Jt.xml=C.XML_NAMESPACE_URI,Jt.xmlns=C.XMLNS_NAMESPACE_URI;for(var W=B.contextNode;W!=null&&W.nodeType==S.ELEMENT_NODE;W=W.parentNode)for(var Vt=0;Vt<W.attributes.length;Vt++){var rt=W.attributes.item(Vt),Rt=String(rt.name);if(Rt=="xmlns")Jt[""]==null&&(Jt[""]=rt.value);else if(Rt.length>6&&Rt.substring(0,6)=="xmlns:"){var Fn=Rt.substring(6,Rt.length);Jt[Fn]==null&&(Jt[Fn]=rt.value)}}for(var Fn in Jt){var pi=new Nr(Fn,Jt[Fn],B.contextNode);d.nodeTest.matches(pi,B)&&ae.push(pi)}}break;case N.PARENT:W=null,B.contextNode!==B.virtualRoot&&(B.contextNode.nodeType==S.ATTRIBUTE_NODE?W=fe.getOwnerElement(B.contextNode):W=B.contextNode.parentNode),W!=null&&d.nodeTest.matches(W,B)&&ae.push(W);break;case N.PRECEDING:var cr;B.virtualRoot!=null?cr=[B.virtualRoot]:cr=[Re(B.contextNode)];e:for(;cr.length>0;)for(var W=cr.pop();W!=null;){if(W==B.contextNode)break e;d.nodeTest.matches(W,B)&&ae.unshift(W),W.firstChild!=null?(cr.push(W.nextSibling),W=W.firstChild):W=W.nextSibling}break;case N.PRECEDINGSIBLING:if(B.contextNode===B.virtualRoot)break;for(var W=B.contextNode.previousSibling;W!=null;W=W.previousSibling)d.nodeTest.matches(W,B)&&ae.push(W);break;case N.SELF:d.nodeTest.matches(B.contextNode,B)&&ae.push(B.contextNode);break;default:}return ae};function $e(d,B,G){return fe.applyPredicates(d.predicates,B,fe.applyStep(d,B,G))}o($e,"applyStepWithPredicates");function Ge(d,B,G){return x(s($e.bind(null,G,d),B))}o(Ge,"applyStepToNodes"),fe.applySteps=function(d,B,G){return n(Ge.bind(null,B),G,d)},fe.prototype.applyFilter=function(d,B){if(!this.filter)return{nodes:[d.contextNode]};var G=this.filter.evaluate(d);if(!tt.instance_of(G,Je)){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:G}}return{nodes:fe.applyPredicates(this.filterPredicates||[],B,G.toUnsortedArray())}},fe.applyLocationPath=function(d,B,G){if(!d)return G;var ne=d.absolute?[fe.getRoot(B,G)]:G;return fe.applySteps(d.steps,B,ne)},fe.prototype.evaluate=function(d){var B=v(new qr,d),G=this.applyFilter(d,B);if("nonNodes"in G)return G.nonNodes;var ne=new Je;return ne.addArray(fe.applyLocationPath(this.locationPath,B,G.nodes)),ne},fe.predicateMatches=function(d,B){var G=d.evaluate(B);return tt.instance_of(G,Se)?B.contextPosition===G.numberValue():G.booleanValue()},fe.predicateString=function(d){return h("[","]",d.toString())},fe.predicatesString=function(d){return f("",s(fe.predicateString,d))},fe.prototype.toString=function(){if(this.filter!=null){var d=c(this.filter);return tt.instance_of(this.filter,Ee)?h("'","'",d):this.filterPredicates!=null&&this.filterPredicates.length?h("(",")",d)+fe.predicatesString(this.filterPredicates):this.locationPath!=null?d+(this.locationPath.absolute?"":"/")+c(this.locationPath):d}return c(this.locationPath)},fe.getOwnerElement=function(d){if(d.ownerElement)return d.ownerElement;try{if(d.selectSingleNode)return d.selectSingleNode("..")}catch{}for(var B=d.nodeType==S.DOCUMENT_NODE?d:d.ownerDocument,G=B.getElementsByTagName("*"),ne=0;ne<G.length;ne++)for(var ae=G.item(ne),W=ae.attributes,it=0;it<W.length;it++){var Vt=W.item(it);if(Vt===d)return ae}return null},ft.prototype=new Object,ft.prototype.constructor=ft,ft.superclass=Object.prototype;function ft(d,B){arguments.length>0&&this.init(d,B)}o(ft,"LocationPath"),ft.prototype.init=function(d,B){this.absolute=d,this.steps=B},ft.prototype.toString=function(){return(this.absolute?"/":"")+s(c,this.steps).join("/")},N.prototype=new Object,N.prototype.constructor=N,N.superclass=Object.prototype;function N(d,B,G){arguments.length>0&&this.init(d,B,G)}o(N,"Step"),N.prototype.init=function(d,B,G){this.axis=d,this.nodeTest=B,this.predicates=G},N.prototype.toString=function(){return N.STEPNAMES[this.axis]+"::"+this.nodeTest.toString()+fe.predicatesString(this.predicates)},N.ANCESTOR=0,N.ANCESTORORSELF=1,N.ATTRIBUTE=2,N.CHILD=3,N.DESCENDANT=4,N.DESCENDANTORSELF=5,N.FOLLOWING=6,N.FOLLOWINGSIBLING=7,N.NAMESPACE=8,N.PARENT=9,N.PRECEDING=10,N.PRECEDINGSIBLING=11,N.SELF=12,N.STEPNAMES=n(function(d,B){return d[B[0]]=B[1],d},{},[[N.ANCESTOR,"ancestor"],[N.ANCESTORORSELF,"ancestor-or-self"],[N.ATTRIBUTE,"attribute"],[N.CHILD,"child"],[N.DESCENDANT,"descendant"],[N.DESCENDANTORSELF,"descendant-or-self"],[N.FOLLOWING,"following"],[N.FOLLOWINGSIBLING,"following-sibling"],[N.NAMESPACE,"namespace"],[N.PARENT,"parent"],[N.PRECEDING,"preceding"],[N.PRECEDINGSIBLING,"preceding-sibling"],[N.SELF,"self"]]),w.prototype=new Object,w.prototype.constructor=w,w.superclass=Object.prototype;function w(d,B){arguments.length>0&&this.init(d,B)}o(w,"NodeTest"),w.prototype.init=function(d,B){this.type=d,this.value=B},w.prototype.toString=function(){return"<unknown nodetest type>"},w.prototype.matches=function(d,B){console.warn("unknown node test type")},w.NAMETESTANY=0,w.NAMETESTPREFIXANY=1,w.NAMETESTQNAME=2,w.COMMENT=3,w.TEXT=4,w.PI=5,w.NODE=6,w.isNodeType=function(d){return function(B){return a(d,B.nodeType)}},w.makeNodeTestType=function(d,B,G){var ne=G||function(){};return ne.prototype=new w(d),ne.prototype.constructor=ne,v(ne.prototype,B),ne},w.makeNodeTypeTest=function(d,B,G){return new(w.makeNodeTestType(d,{matches:w.isNodeType(B),toString:u(G)}))},w.hasPrefix=function(d){return d.prefix||(d.nodeName||d.tagName).indexOf(":")!==-1},w.isElementOrAttribute=w.isNodeType([1,2]),w.nameSpaceMatches=function(d,B,G){var ne=G.namespaceURI||"";if(!d)return!ne||B.allowAnyNamespaceForNoPrefix&&!w.hasPrefix(G);var ae=B.namespaceResolver.getNamespace(d,B.expressionContextNode);if(ae==null)throw new Error("Cannot resolve QName "+d);return ae===ne},w.localNameMatches=function(d,B,G){var ne=G.localName||G.nodeName;return B.caseInsensitive?d.toLowerCase()===ne.toLowerCase():d===ne},w.NameTestPrefixAny=w.makeNodeTestType(w.NAMETESTPREFIXANY,{matches:o(function(d,B){return w.isElementOrAttribute(d)&&w.nameSpaceMatches(this.prefix,B,d)},"matches"),toString:o(function(){return this.prefix+":*"},"toString")},o(function(B){this.prefix=B},"NameTestPrefixAny")),w.NameTestQName=w.makeNodeTestType(w.NAMETESTQNAME,{matches:o(function(d,B){return w.isNodeType([S.ELEMENT_NODE,S.ATTRIBUTE_NODE,Nr.XPATH_NAMESPACE_NODE])(d)&&w.nameSpaceMatches(this.prefix,B,d)&&w.localNameMatches(this.localName,B,d)},"matches"),toString:o(function(){return this.name},"toString")},o(function(B){var G=B.split(":");this.name=B,this.prefix=G.length>1?G[0]:null,this.localName=G[G.length>1?1:0]},"NameTestQName")),w.PITest=w.makeNodeTestType(w.PI,{matches:o(function(d,B){return w.isNodeType([S.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}),w.nameTestAny=w.makeNodeTypeTest(w.NAMETESTANY,[S.ELEMENT_NODE,S.ATTRIBUTE_NODE,Nr.XPATH_NAMESPACE_NODE],"*"),w.textTest=w.makeNodeTypeTest(w.TEXT,[S.TEXT_NODE,S.CDATA_SECTION_NODE],"text()"),w.commentTest=w.makeNodeTypeTest(w.COMMENT,[S.COMMENT_NODE],"comment()"),w.nodeTest=w.makeNodeTypeTest(w.NODE,[S.ELEMENT_NODE,S.ATTRIBUTE_NODE,S.TEXT_NODE,S.CDATA_SECTION_NODE,S.PROCESSING_INSTRUCTION_NODE,S.COMMENT_NODE,S.DOCUMENT_NODE],"node()"),w.anyPiTest=w.makeNodeTypeTest(w.PI,[S.PROCESSING_INSTRUCTION_NODE],"processing-instruction()"),X.prototype=new b,X.prototype.constructor=X,X.superclass=b.prototype;function X(d){arguments.length>0&&this.init(d)}o(X,"VariableReference"),X.prototype.init=function(d){this.variable=d},X.prototype.toString=function(){return"$"+this.variable},X.prototype.evaluate=function(d){var B=tt.resolveQName(this.variable,d.namespaceResolver,d.contextNode,!1);if(B[0]==null)throw new Error("Cannot resolve QName "+fn);var G=d.variableResolver.getVariable(B[1],B[0]);if(!G)throw Mn.fromMessage("Undeclared variable: "+this.toString());return G},P.prototype=new b,P.prototype.constructor=P,P.superclass=b.prototype;function P(d,B){arguments.length>0&&this.init(d,B)}o(P,"FunctionCall"),P.prototype.init=function(d,B){this.functionName=d,this.arguments=B},P.prototype.toString=function(){for(var d=this.functionName+"(",B=0;B<this.arguments.length;B++)B>0&&(d+=", "),d+=this.arguments[B].toString();return d+")"},P.prototype.evaluate=function(d){var B=As.getFunctionFromContext(this.functionName,d);if(!B)throw new Error("Unknown function "+this.functionName);var G=[d].concat(this.arguments);return B.apply(d.functionResolver.thisArg,G)};var be=new Object;be.equals=function(d,B){return d.equals(B)},be.notequal=function(d,B){return d.notequal(B)},be.lessthan=function(d,B){return d.lessthan(B)},be.greaterthan=function(d,B){return d.greaterthan(B)},be.lessthanorequal=function(d,B){return d.lessthanorequal(B)},be.greaterthanorequal=function(d,B){return d.greaterthanorequal(B)},Ee.prototype=new b,Ee.prototype.constructor=Ee,Ee.superclass=b.prototype;function Ee(d){arguments.length>0&&this.init(d)}o(Ee,"XString"),Ee.prototype.init=function(d){this.str=String(d)},Ee.prototype.toString=function(){return this.str},Ee.prototype.evaluate=function(d){return this},Ee.prototype.string=function(){return this},Ee.prototype.number=function(){return new Se(this.str)},Ee.prototype.bool=function(){return new Ue(this.str)},Ee.prototype.nodeset=function(){throw new Error("Cannot convert string to nodeset")},Ee.prototype.stringValue=function(){return this.str},Ee.prototype.numberValue=function(){return this.number().numberValue()},Ee.prototype.booleanValue=function(){return this.bool().booleanValue()},Ee.prototype.equals=function(d){return tt.instance_of(d,Ue)?this.bool().equals(d):tt.instance_of(d,Se)?this.number().equals(d):tt.instance_of(d,Je)?d.compareWithString(this,be.equals):new Ue(this.str==d.str)},Ee.prototype.notequal=function(d){return tt.instance_of(d,Ue)?this.bool().notequal(d):tt.instance_of(d,Se)?this.number().notequal(d):tt.instance_of(d,Je)?d.compareWithString(this,be.notequal):new Ue(this.str!=d.str)},Ee.prototype.lessthan=function(d){return this.number().lessthan(d)},Ee.prototype.greaterthan=function(d){return this.number().greaterthan(d)},Ee.prototype.lessthanorequal=function(d){return this.number().lessthanorequal(d)},Ee.prototype.greaterthanorequal=function(d){return this.number().greaterthanorequal(d)},Se.prototype=new b,Se.prototype.constructor=Se,Se.superclass=b.prototype;function Se(d){arguments.length>0&&this.init(d)}o(Se,"XNumber"),Se.prototype.init=function(d){this.num=typeof d=="string"?this.parse(d):Number(d)},Se.prototype.numberFormat=/^\s*-?[0-9]*\.?[0-9]+\s*$/,Se.prototype.parse=function(d){return this.numberFormat.test(d)?parseFloat(d):Number.NaN};function ze(d){for(var B=d.split("e-"),G=B[0].replace(".",""),ne=Number(B[1]),ae=0;ae<ne-1;ae+=1)G="0"+G;return"0."+G}o(ze,"padSmallNumber");function Ct(d){for(var B=d.split("e"),G=B[0].replace(".",""),ne=Number(B[1]),ae=ne+1-G.length,W=0;W<ae;W+=1)G+="0";return G}o(Ct,"padLargeNumber"),Se.prototype.toString=function(){var d=this.num.toString();return d.indexOf("e-")!==-1?ze(d):d.indexOf("e")!==-1?Ct(d):d},Se.prototype.evaluate=function(d){return this},Se.prototype.string=function(){return new Ee(this.toString())},Se.prototype.number=function(){return this},Se.prototype.bool=function(){return new Ue(this.num)},Se.prototype.nodeset=function(){throw new Error("Cannot convert number to nodeset")},Se.prototype.stringValue=function(){return this.string().stringValue()},Se.prototype.numberValue=function(){return this.num},Se.prototype.booleanValue=function(){return this.bool().booleanValue()},Se.prototype.negate=function(){return new Se(-this.num)},Se.prototype.equals=function(d){return tt.instance_of(d,Ue)?this.bool().equals(d):tt.instance_of(d,Ee)?this.equals(d.number()):tt.instance_of(d,Je)?d.compareWithNumber(this,be.equals):new Ue(this.num==d.num)},Se.prototype.notequal=function(d){return tt.instance_of(d,Ue)?this.bool().notequal(d):tt.instance_of(d,Ee)?this.notequal(d.number()):tt.instance_of(d,Je)?d.compareWithNumber(this,be.notequal):new Ue(this.num!=d.num)},Se.prototype.lessthan=function(d){return tt.instance_of(d,Je)?d.compareWithNumber(this,be.greaterthan):tt.instance_of(d,Ue)||tt.instance_of(d,Ee)?this.lessthan(d.number()):new Ue(this.num<d.num)},Se.prototype.greaterthan=function(d){return tt.instance_of(d,Je)?d.compareWithNumber(this,be.lessthan):tt.instance_of(d,Ue)||tt.instance_of(d,Ee)?this.greaterthan(d.number()):new Ue(this.num>d.num)},Se.prototype.lessthanorequal=function(d){return tt.instance_of(d,Je)?d.compareWithNumber(this,be.greaterthanorequal):tt.instance_of(d,Ue)||tt.instance_of(d,Ee)?this.lessthanorequal(d.number()):new Ue(this.num<=d.num)},Se.prototype.greaterthanorequal=function(d){return tt.instance_of(d,Je)?d.compareWithNumber(this,be.lessthanorequal):tt.instance_of(d,Ue)||tt.instance_of(d,Ee)?this.greaterthanorequal(d.number()):new Ue(this.num>=d.num)},Se.prototype.plus=function(d){return new Se(this.num+d.num)},Se.prototype.minus=function(d){return new Se(this.num-d.num)},Se.prototype.multiply=function(d){return new Se(this.num*d.num)},Se.prototype.div=function(d){return new Se(this.num/d.num)},Se.prototype.mod=function(d){return new Se(this.num%d.num)},Ue.prototype=new b,Ue.prototype.constructor=Ue,Ue.superclass=b.prototype;function Ue(d){arguments.length>0&&this.init(d)}o(Ue,"XBoolean"),Ue.prototype.init=function(d){this.b=!!d},Ue.prototype.toString=function(){return this.b.toString()},Ue.prototype.evaluate=function(d){return this},Ue.prototype.string=function(){return new Ee(this.b)},Ue.prototype.number=function(){return new Se(this.b)},Ue.prototype.bool=function(){return this},Ue.prototype.nodeset=function(){throw new Error("Cannot convert boolean to nodeset")},Ue.prototype.stringValue=function(){return this.string().stringValue()},Ue.prototype.numberValue=function(){return this.number().numberValue()},Ue.prototype.booleanValue=function(){return this.b},Ue.prototype.not=function(){return new Ue(!this.b)},Ue.prototype.equals=function(d){return tt.instance_of(d,Ee)||tt.instance_of(d,Se)?this.equals(d.bool()):tt.instance_of(d,Je)?d.compareWithBoolean(this,be.equals):new Ue(this.b==d.b)},Ue.prototype.notequal=function(d){return tt.instance_of(d,Ee)||tt.instance_of(d,Se)?this.notequal(d.bool()):tt.instance_of(d,Je)?d.compareWithBoolean(this,be.notequal):new Ue(this.b!=d.b)},Ue.prototype.lessthan=function(d){return this.number().lessthan(d)},Ue.prototype.greaterthan=function(d){return this.number().greaterthan(d)},Ue.prototype.lessthanorequal=function(d){return this.number().lessthanorequal(d)},Ue.prototype.greaterthanorequal=function(d){return this.number().greaterthanorequal(d)},Ue.true_=new Ue(!0),Ue.false_=new Ue(!1),wt.prototype=new Object,wt.prototype.constructor=wt,wt.superclass=Object.prototype;function wt(d){this.init(d)}o(wt,"AVLTree"),wt.prototype.init=function(d){this.left=null,this.right=null,this.node=d,this.depth=1},wt.prototype.balance=function(){var d=this.left==null?0:this.left.depth,B=this.right==null?0:this.right.depth;if(d>B+1){var G=this.left.left==null?0:this.left.left.depth,ne=this.left.right==null?0:this.left.right.depth;G<ne&&this.left.rotateRR(),this.rotateLL()}else if(d+1<B){var ae=this.right.right==null?0:this.right.right.depth,W=this.right.left==null?0:this.right.left.depth;W>ae&&this.right.rotateLL(),this.rotateRR()}},wt.prototype.rotateLL=function(){var d=this.node,B=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=B,this.right.node=d,this.right.updateInNewLocation(),this.updateInNewLocation()},wt.prototype.rotateRR=function(){var d=this.node,B=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=B,this.left.node=d,this.left.updateInNewLocation(),this.updateInNewLocation()},wt.prototype.updateInNewLocation=function(){this.getDepthFromChildren()},wt.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 Gr(d,B){if(d===B)return 0;if(d.compareDocumentPosition){var G=d.compareDocumentPosition(B);return G&1||G&10?1:G&20?-1:0}for(var ne=0,ae=0,W=d;W!=null;W=W.parentNode||W.ownerElement)ne++;for(var it=B;it!=null;it=it.parentNode||it.ownerElement)ae++;if(ne>ae){for(;ne>ae;)d=d.parentNode||d.ownerElement,ne--;if(d===B)return 1}else if(ae>ne){for(;ae>ne;)B=B.parentNode||B.ownerElement,ae--;if(d===B)return-1}for(var Vt=d.parentNode||d.ownerElement,Jt=B.parentNode||B.ownerElement;Vt!==Jt;)d=Vt,B=Jt,Vt=d.parentNode||d.ownerElement,Jt=B.parentNode||B.ownerElement;var rt=tt.isAttribute(d),Rt=tt.isAttribute(B);if(rt&&!Rt)return-1;if(!rt&&Rt)return 1;if(Vt)for(var Fn=rt?Vt.attributes:Vt.childNodes,pi=Fn.length,cr=0;cr<pi;cr+=1){var ba=Fn[cr];if(ba===d)return-1;if(ba===B)return 1}throw new Error("Unexpected: could not determine node order")}o(Gr,"nodeOrder"),wt.prototype.add=function(d){if(d===this.node)return!1;var B=Gr(d,this.node),G=!1;return B==-1?this.left==null?(this.left=new wt(d),G=!0):(G=this.left.add(d),G&&this.balance()):B==1&&(this.right==null?(this.right=new wt(d),G=!0):(G=this.right.add(d),G&&this.balance())),G&&this.getDepthFromChildren(),G},Je.prototype=new b,Je.prototype.constructor=Je,Je.superclass=b.prototype;function Je(){this.init()}o(Je,"XNodeSet"),Je.prototype.init=function(){this.tree=null,this.nodes=[],this.size=0},Je.prototype.toString=function(){var d=this.first();return d==null?"":this.stringForNode(d)},Je.prototype.evaluate=function(d){return this},Je.prototype.string=function(){return new Ee(this.toString())},Je.prototype.stringValue=function(){return this.toString()},Je.prototype.number=function(){return new Se(this.string())},Je.prototype.numberValue=function(){return Number(this.string())},Je.prototype.bool=function(){return new Ue(this.booleanValue())},Je.prototype.booleanValue=function(){return!!this.size},Je.prototype.nodeset=function(){return this},Je.prototype.stringForNode=function(d){return d.nodeType==S.DOCUMENT_NODE||d.nodeType==S.ELEMENT_NODE||d.nodeType===S.DOCUMENT_FRAGMENT_NODE?this.stringForContainerNode(d):d.nodeType===S.ATTRIBUTE_NODE?d.value||d.nodeValue:d.isNamespaceNode?d.namespace:d.nodeValue},Je.prototype.stringForContainerNode=function(d){for(var B="",G=d.firstChild;G!=null;G=G.nextSibling){var ne=G.nodeType;(ne===1||ne===3||ne===4||ne===9||ne===11)&&(B+=this.stringForNode(G))}return B},Je.prototype.buildTree=function(){if(!this.tree&&this.nodes.length){this.tree=new wt(this.nodes[0]);for(var d=1;d<this.nodes.length;d+=1)this.tree.add(this.nodes[d])}return this.tree},Je.prototype.first=function(){var d=this.buildTree();if(d==null)return null;for(;d.left!=null;)d=d.left;return d.node},Je.prototype.add=function(d){for(var B=0;B<this.nodes.length;B+=1)if(d===this.nodes[B])return;this.tree=null,this.nodes.push(d),this.size+=1},Je.prototype.addArray=function(d){var B=this;t(function(G){B.add(G)},d)},Je.prototype.toArray=function(){var d=[];return this.toArrayRec(this.buildTree(),d),d},Je.prototype.toArrayRec=function(d,B){d!=null&&(this.toArrayRec(d.left,B),B.push(d.node),this.toArrayRec(d.right,B))},Je.prototype.toUnsortedArray=function(){return this.nodes.slice()},Je.prototype.compareWithString=function(d,B){for(var G=this.toUnsortedArray(),ne=0;ne<G.length;ne++){var ae=G[ne],W=new Ee(this.stringForNode(ae)),it=B(W,d);if(it.booleanValue())return it}return new Ue(!1)},Je.prototype.compareWithNumber=function(d,B){for(var G=this.toUnsortedArray(),ne=0;ne<G.length;ne++){var ae=G[ne],W=new Se(this.stringForNode(ae)),it=B(W,d);if(it.booleanValue())return it}return new Ue(!1)},Je.prototype.compareWithBoolean=function(d,B){return B(this.bool(),d)},Je.prototype.compareWithNodeSet=function(d,B){for(var G=this.toUnsortedArray(),ne=o(function(Vt,Jt){return B(Jt,Vt)},"oInvert"),ae=0;ae<G.length;ae++){var W=new Ee(this.stringForNode(G[ae])),it=d.compareWithString(W,ne);if(it.booleanValue())return it}return new Ue(!1)},Je.compareWith=e(function(d,B){return tt.instance_of(B,Ee)?this.compareWithString(B,d):tt.instance_of(B,Se)?this.compareWithNumber(B,d):tt.instance_of(B,Ue)?this.compareWithBoolean(B,d):this.compareWithNodeSet(B,d)}),Je.prototype.equals=Je.compareWith(be.equals),Je.prototype.notequal=Je.compareWith(be.notequal),Je.prototype.lessthan=Je.compareWith(be.lessthan),Je.prototype.greaterthan=Je.compareWith(be.greaterthan),Je.prototype.lessthanorequal=Je.compareWith(be.lessthanorequal),Je.prototype.greaterthanorequal=Je.compareWith(be.greaterthanorequal),Je.prototype.union=function(d){var B=new Je;return B.addArray(this.toUnsortedArray()),B.addArray(d.toUnsortedArray()),B},Nr.prototype=new Object,Nr.prototype.constructor=Nr,Nr.superclass=Object.prototype;function Nr(d,B,G){this.isXPathNamespace=!0,this.ownerDocument=G.ownerDocument,this.nodeName="#namespace",this.prefix=d,this.localName=d,this.namespaceURI=B,this.nodeValue=B,this.ownerElement=G,this.nodeType=Nr.XPATH_NAMESPACE_NODE}o(Nr,"XPathNamespace"),Nr.prototype.toString=function(){return'{ "'+this.prefix+'", "'+this.namespaceURI+'" }'},qr.prototype=new Object,qr.prototype.constructor=qr,qr.superclass=Object.prototype;function qr(d,B,G){this.variableResolver=d??new wn,this.namespaceResolver=B??new hs,this.functionResolver=G??new As}o(qr,"XPathContext"),qr.prototype.extend=function(d){return v(new qr,this,d)},wn.prototype=new Object,wn.prototype.constructor=wn,wn.superclass=Object.prototype;function wn(){}o(wn,"VariableResolver"),wn.prototype.getVariable=function(d,B){return null},As.prototype=new Object,As.prototype.constructor=As,As.superclass=Object.prototype;function As(d){this.thisArg=d??dt,this.functions=new Object,this.addStandardFunctions()}o(As,"FunctionResolver"),As.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},As.prototype.addFunction=function(d,B,G){this.functions["{"+d+"}"+B]=G},As.getFunctionFromContext=function(d,B){var G=tt.resolveQName(d,B.namespaceResolver,B.contextNode,!1);if(G[0]===null)throw new Error("Cannot resolve QName "+name);return B.functionResolver.getFunction(G[1],G[0])},As.prototype.getFunction=function(d,B){return this.functions["{"+B+"}"+d]},hs.prototype=new Object,hs.prototype.constructor=hs,hs.superclass=Object.prototype;function hs(){}o(hs,"NamespaceResolver"),hs.prototype.getNamespace=function(d,B){if(d=="xml")return C.XML_NAMESPACE_URI;if(d=="xmlns")return C.XMLNS_NAMESPACE_URI;for(B.nodeType==S.DOCUMENT_NODE?B=B.documentElement:B.nodeType==S.ATTRIBUTE_NODE?B=fe.getOwnerElement(B):B.nodeType!=S.ELEMENT_NODE&&(B=B.parentNode);B!=null&&B.nodeType==S.ELEMENT_NODE;){for(var G=B.attributes,ne=0;ne<G.length;ne++){var ae=G.item(ne),W=ae.name||ae.nodeName;if(W==="xmlns"&&d===""||W==="xmlns:"+d)return String(ae.value||ae.nodeValue)}B=B.parentNode}return null};var dt=new Object;dt.last=function(d){if(arguments.length!=1)throw new Error("Function last expects ()");return new Se(d.contextSize)},dt.position=function(d){if(arguments.length!=1)throw new Error("Function position expects ()");return new Se(d.contextPosition)},dt.count=function(){var d=arguments[0],B;if(arguments.length!=2||!tt.instance_of(B=arguments[1].evaluate(d),Je))throw new Error("Function count expects (node-set)");return new Se(B.size)},dt.id=function(){var d=arguments[0],B;if(arguments.length!=2)throw new Error("Function id expects (object)");B=arguments[1].evaluate(d),tt.instance_of(B,Je)?B=B.toArray().join(" "):B=B.stringValue();for(var G=B.split(/[\x0d\x0a\x09\x20]+/),ne=0,ae=new Je,W=d.contextNode.nodeType==S.DOCUMENT_NODE?d.contextNode:d.contextNode.ownerDocument,it=0;it<G.length;it++){var Vt;W.getElementById?Vt=W.getElementById(G[it]):Vt=tt.getElementById(W,G[it]),Vt!=null&&(ae.add(Vt),ne++)}return ae},dt.localName=function(d,B){var G;if(arguments.length==1)G=d.contextNode;else if(arguments.length==2)G=B.evaluate(d).first();else throw new Error("Function local-name expects (node-set?)");return G==null?new Ee(""):new Ee(G.localName||G.baseName||G.target||G.nodeName||"")},dt.namespaceURI=function(){var d=arguments[0],B;if(arguments.length==1)B=d.contextNode;else if(arguments.length==2)B=arguments[1].evaluate(d).first();else throw new Error("Function namespace-uri expects (node-set?)");return B==null?new Ee(""):new Ee(B.namespaceURI)},dt.name=function(){var d=arguments[0],B;if(arguments.length==1)B=d.contextNode;else if(arguments.length==2)B=arguments[1].evaluate(d).first();else throw new Error("Function name expects (node-set?)");return B==null?new Ee(""):B.nodeType==S.ELEMENT_NODE?new Ee(B.nodeName):B.nodeType==S.ATTRIBUTE_NODE?new Ee(B.name||B.nodeName):B.nodeType===S.PROCESSING_INSTRUCTION_NODE?new Ee(B.target||B.nodeName):B.localName==null?new Ee(""):new Ee(B.localName)},dt.string=function(){var d=arguments[0];if(arguments.length==1)return new Ee(Je.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 B="",G=1;G<arguments.length;G++)B+=arguments[G].evaluate(d).stringValue();return new Ee(B)},dt.startsWith=function(){var d=arguments[0];if(arguments.length!=3)throw new Error("Function startsWith expects (string, string)");var B=arguments[1].evaluate(d).stringValue(),G=arguments[2].evaluate(d).stringValue();return new Ue(B.substring(0,G.length)==G)},dt.contains=function(){var d=arguments[0];if(arguments.length!=3)throw new Error("Function contains expects (string, string)");var B=arguments[1].evaluate(d).stringValue(),G=arguments[2].evaluate(d).stringValue();return new Ue(B.indexOf(G)!==-1)},dt.substringBefore=function(){var d=arguments[0];if(arguments.length!=3)throw new Error("Function substring-before expects (string, string)");var B=arguments[1].evaluate(d).stringValue(),G=arguments[2].evaluate(d).stringValue();return new Ee(B.substring(0,B.indexOf(G)))},dt.substringAfter=function(){var d=arguments[0];if(arguments.length!=3)throw new Error("Function substring-after expects (string, string)");var B=arguments[1].evaluate(d).stringValue(),G=arguments[2].evaluate(d).stringValue();if(G.length==0)return new Ee(B);var ne=B.indexOf(G);return ne==-1?new Ee(""):new Ee(B.substring(ne+G.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 B=arguments[1].evaluate(d).stringValue(),G=Math.round(arguments[2].evaluate(d).numberValue())-1,ne=arguments.length==4?G+Math.round(arguments[3].evaluate(d).numberValue()):void 0;return new Ee(B.substring(G,ne))},dt.stringLength=function(){var d=arguments[0],B;if(arguments.length==1)B=Je.prototype.stringForNode(d.contextNode);else if(arguments.length==2)B=arguments[1].evaluate(d).stringValue();else throw new Error("Function string-length expects (string?)");return new Se(B.length)},dt.normalizeSpace=function(){var d=arguments[0],B;if(arguments.length==1)B=Je.prototype.stringForNode(d.contextNode);else if(arguments.length==2)B=arguments[1].evaluate(d).stringValue();else throw new Error("Function normalize-space expects (string?)");for(var G=0,ne=B.length-1;tt.isSpace(B.charCodeAt(ne));)ne--;for(var ae="";G<=ne&&tt.isSpace(B.charCodeAt(G));)G++;for(;G<=ne;)if(tt.isSpace(B.charCodeAt(G)))for(ae+=" ";G<=ne&&tt.isSpace(B.charCodeAt(G));)G++;else ae+=B.charAt(G),G++;return new Ee(ae)},dt.translate=function(d,B,G,ne){if(arguments.length!=4)throw new Error("Function translate expects (string, string, string)");var ae=B.evaluate(d).stringValue(),W=G.evaluate(d).stringValue(),it=ne.evaluate(d).stringValue(),Vt=n(function(rt,Rt,Fn){return Rt in rt||(rt[Rt]=Fn>it.length?"":it[Fn]),rt},{},W),Jt=f("",s(function(rt){return rt in Vt?Vt[rt]:rt},ae));return new Ee(Jt)},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,B){if(arguments.length!=2)throw new Error("Function not expects (object)");return B.evaluate(d).bool().not()},dt.true_=function(){if(arguments.length!=1)throw new Error("Function true expects ()");return Ue.true_},dt.false_=function(){if(arguments.length!=1)throw new Error("Function false expects ()");return Ue.false_},dt.lang=function(){var d=arguments[0];if(arguments.length!=2)throw new Error("Function lang expects (string)");for(var B,G=d.contextNode;G!=null&&G.nodeType!=S.DOCUMENT_NODE;G=G.parentNode){var ne=G.getAttributeNS(C.XML_NAMESPACE_URI,"lang");if(ne!=null){B=String(ne);break}}if(B==null)return Ue.false_;var ae=arguments[1].evaluate(d).stringValue();return new Ue(B.substring(0,ae.length)==ae&&(B.length==ae.length||B.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 Se(Je.prototype.stringForNode(d.contextNode)):arguments[1].evaluate(d).number()},dt.sum=function(){var d=arguments[0],B;if(arguments.length!=2||!tt.instance_of(B=arguments[1].evaluate(d),Je))throw new Error("Function sum expects (node-set)");B=B.toUnsortedArray();for(var G=0,ne=0;ne<B.length;ne++)G+=new Se(Je.prototype.stringForNode(B[ne])).numberValue();return new Se(G)},dt.floor=function(){var d=arguments[0];if(arguments.length!=2)throw new Error("Function floor expects (number)");return new Se(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 Se(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 Se(Math.round(arguments[1].evaluate(d).numberValue()))};var tt=new Object;tt.isAttribute=function(d){return d&&(d.nodeType===S.ATTRIBUTE_NODE||d.ownerElement)},tt.splitQName=function(d){var B=d.indexOf(":");return B==-1?[null,d]:[d.substring(0,B),d.substring(B+1)]},tt.resolveQName=function(d,B,G,ne){var ae=tt.splitQName(d);return ae[0]!=null?ae[0]=B.getNamespace(ae[0],G):ne?(ae[0]=B.getNamespace("",G),ae[0]==null&&(ae[0]="")):ae[0]="",ae},tt.isSpace=function(d){return d==9||d==13||d==10||d==32},tt.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},tt.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||tt.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},tt.coalesceText=function(d){for(var B=d.firstChild;B!=null;B=B.nextSibling)if(B.nodeType==S.TEXT_NODE||B.nodeType==S.CDATA_SECTION_NODE){var G=B.nodeValue,ne=B;for(B=B.nextSibling;B!=null&&(B.nodeType==S.TEXT_NODE||B.nodeType==S.CDATA_SECTION_NODE);){G+=B.nodeValue;var ae=B;B=B.nextSibling,ae.parentNode.removeChild(ae)}if(ne.nodeType==S.CDATA_SECTION_NODE){var W=ne.parentNode;if(ne.nextSibling==null)W.removeChild(ne),W.appendChild(W.ownerDocument.createTextNode(G));else{var it=ne.nextSibling;W.removeChild(ne),W.insertBefore(W.ownerDocument.createTextNode(G),it)}}else ne.nodeValue=G;if(B==null)break}else B.nodeType==S.ELEMENT_NODE&&tt.coalesceText(B)},tt.instance_of=function(d,B){for(;d!=null;){if(d.constructor===B)return!0;if(d===Object)return!1;d=d.constructor.superclass}return!1},tt.getElementById=function(d,B){if(d.nodeType==S.ELEMENT_NODE&&(d.getAttribute("id")==B||d.getAttributeNS(null,"id")==B))return d;for(var G=d.firstChild;G!=null;G=G.nextSibling){var ne=tt.getElementById(G,B);if(ne!=null)return ne}return null};var Mn=(function(){function d(G,ne){var ae=ne?": "+ne.toString():"";switch(G){case B.INVALID_EXPRESSION_ERR:return"Invalid expression"+ae;case B.TYPE_ERR:return"Type error"+ae}return null}o(d,"getMessage");function B(G,ne,ae){var W=Error.call(this,d(G,ne)||ae);return W.code=G,W.exception=ne,W}return o(B,"XPathException"),B.prototype=Object.create(Error.prototype),B.prototype.constructor=B,B.superclass=Error,B.prototype.toString=function(){return this.message},B.fromMessage=function(G,ne){return new B(null,ne,G)},B.INVALID_EXPRESSION_ERR=51,B.TYPE_ERR=52,B})();ps.prototype={},ps.prototype.constructor=ps,ps.superclass=Object.prototype;function ps(d,B,G){this.xpath=G.parse(d),this.context=new qr,this.context.namespaceResolver=new Sa(B)}o(ps,"XPathExpression"),ps.getOwnerDocument=function(d){return d.nodeType===S.DOCUMENT_NODE?d:d.ownerDocument},ps.detectHtmlDom=function(d){if(!d)return!1;var B=ps.getOwnerDocument(d);try{return B.implementation.hasFeature("HTML","2.0")}catch{return!0}},ps.prototype.evaluate=function(d,B,G){this.context.expressionContextNode=d,this.context.caseInsensitive=ps.detectHtmlDom(d);var ne=this.xpath.evaluate(this.context);return new Pt(ne,B)},Sa.prototype={},Sa.prototype.constructor=Sa,Sa.superclass=Object.prototype;function Sa(d){this.xpathNSResolver=d}o(Sa,"XPathNSResolverWrapper"),Sa.prototype.getNamespace=function(d,B){return this.xpathNSResolver==null?null:this.xpathNSResolver.lookupNamespaceURI(d)},Ea.prototype={},Ea.prototype.constructor=Ea,Ea.superclass=Object.prototype;function Ea(d){this.node=d,this.namespaceResolver=new hs}o(Ea,"NodeXPathNSResolver"),Ea.prototype.lookupNamespaceURI=function(d){return this.namespaceResolver.getNamespace(d,this.node)},Pt.prototype={},Pt.prototype.constructor=Pt,Pt.superclass=Object.prototype;function Pt(d,B){switch(B==Pt.ANY_TYPE&&(d.constructor===Ee?B=Pt.STRING_TYPE:d.constructor===Se?B=Pt.NUMBER_TYPE:d.constructor===Ue?B=Pt.BOOLEAN_TYPE:d.constructor===Je&&(B=Pt.UNORDERED_NODE_ITERATOR_TYPE)),this.resultType=B,B){case Pt.NUMBER_TYPE:this.numberValue=d.numberValue();return;case Pt.STRING_TYPE:this.stringValue=d.stringValue();return;case Pt.BOOLEAN_TYPE:this.booleanValue=d.booleanValue();return;case Pt.ANY_UNORDERED_NODE_TYPE:case Pt.FIRST_ORDERED_NODE_TYPE:if(d.constructor===Je){this.singleNodeValue=d.first();return}break;case Pt.UNORDERED_NODE_ITERATOR_TYPE:case Pt.ORDERED_NODE_ITERATOR_TYPE:if(d.constructor===Je){this.invalidIteratorState=!1,this.nodes=d.toArray(),this.iteratorIndex=0;return}break;case Pt.UNORDERED_NODE_SNAPSHOT_TYPE:case Pt.ORDERED_NODE_SNAPSHOT_TYPE:if(d.constructor===Je){this.nodes=d.toArray(),this.snapshotLength=this.nodes.length;return}break}throw new Mn(Mn.TYPE_ERR)}o(Pt,"XPathResult"),Pt.prototype.iterateNext=function(){if(this.resultType!=Pt.UNORDERED_NODE_ITERATOR_TYPE&&this.resultType!=Pt.ORDERED_NODE_ITERATOR_TYPE)throw new Mn(Mn.TYPE_ERR);return this.nodes[this.iteratorIndex++]},Pt.prototype.snapshotItem=function(d){if(this.resultType!=Pt.UNORDERED_NODE_SNAPSHOT_TYPE&&this.resultType!=Pt.ORDERED_NODE_SNAPSHOT_TYPE)throw new Mn(Mn.TYPE_ERR);return this.nodes[d]},Pt.ANY_TYPE=0,Pt.NUMBER_TYPE=1,Pt.STRING_TYPE=2,Pt.BOOLEAN_TYPE=3,Pt.UNORDERED_NODE_ITERATOR_TYPE=4,Pt.ORDERED_NODE_ITERATOR_TYPE=5,Pt.UNORDERED_NODE_SNAPSHOT_TYPE=6,Pt.ORDERED_NODE_SNAPSHOT_TYPE=7,Pt.ANY_UNORDERED_NODE_TYPE=8,Pt.FIRST_ORDERED_NODE_TYPE=9;function Uh(d,B){d.createExpression=function(G,ne){try{return new ps(G,ne,B)}catch(ae){throw new Mn(Mn.INVALID_EXPRESSION_ERR,ae)}},d.createNSResolver=function(G){return new Ea(G)},d.evaluate=function(G,ne,ae,W,it){if(W<0||W>9)throw{code:0,toString:o(function(){return"Request type not supported"},"toString")};return d.createExpression(G,ae,B).evaluate(ne,W,it)}}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 E)}catch{}Uh(r,new E),(function(){var d=new E,B=new hs,G=new As,ne=new wn;function ae(He){return{getNamespace:o(function(rr,ts){var Xi=He(rr,ts);return Xi||B.getNamespace(rr,ts)},"getNamespace")}}o(ae,"makeNSResolverFromFunction");function W(He){return ae(He.getNamespace.bind(He))}o(W,"makeNSResolverFromObject");function it(He){return ae(function(rr){return He[rr]})}o(it,"makeNSResolverFromMap");function Vt(He){return He&&typeof He.getNamespace=="function"?W(He):typeof He=="function"?ae(He):typeof He=="object"?it(He):B}o(Vt,"makeNSResolver");function Jt(He){if(He===null||typeof He>"u"||He instanceof Ee||He instanceof Ue||He instanceof Se||He instanceof Je)return He;switch(typeof He){case"string":return new Ee(He);case"boolean":return new Ue(He);case"number":return new Se(He)}var rr=new Je;return rr.addArray([].concat(He)),rr}o(Jt,"convertValue");function rt(He){return function(rr){var ts=Array.prototype.slice.call(arguments,1).map(function(y2){return y2.evaluate(rr)}),Xi=He.apply(this,[].concat(rr,ts));return Jt(Xi)}}o(rt,"makeEvaluator");function Rt(He){return{getFunction:o(function(rr,ts){var Xi=He(rr,ts);return Xi?rt(Xi):G.getFunction(rr,ts)},"getFunction")}}o(Rt,"makeFunctionResolverFromFunction");function Fn(He){return Rt(He.getFunction.bind(He))}o(Fn,"makeFunctionResolverFromObject");function pi(He){return Rt(function(rr){return He[rr]})}o(pi,"makeFunctionResolverFromMap");function cr(He){return He&&typeof He.getFunction=="function"?Fn(He):typeof He=="function"?Rt(He):typeof He=="object"?pi(He):G}o(cr,"makeFunctionResolver");function ba(He){return{getVariable:o(function(rr,ts){var Xi=He(rr,ts);return Jt(Xi)},"getVariable")}}o(ba,"makeVariableResolverFromFunction");function I0(He){if(He){if(typeof He.getVariable=="function")return ba(He.getVariable.bind(He));if(typeof He=="function")return ba(He);if(typeof He=="object")return ba(function(rr){return He[rr]})}return ne}o(I0,"makeVariableResolver");function lx(He,rr,ts){He in ts&&(rr[He]=ts[He])}o(lx,"copyIfPresent");function d2(He){var rr=new qr;return He?(rr.namespaceResolver=Vt(He.namespaces),rr.functionResolver=cr(He.functions),rr.variableResolver=I0(He.variables),rr.expressionContextNode=He.node,lx("allowAnyNamespaceForNoPrefix",rr,He),lx("isHtml",rr,He)):rr.namespaceResolver=B,rr}o(d2,"makeContext");function m2(He,rr){var ts=d2(rr);return He.evaluate(ts)}o(m2,"evaluate");var g2={evaluate:o(function(He){return m2(this.expression,He)},"evaluate"),evaluateNumber:o(function(He){return this.evaluate(He).numberValue()},"evaluateNumber"),evaluateString:o(function(He){return this.evaluate(He).stringValue()},"evaluateString"),evaluateBoolean:o(function(He){return this.evaluate(He).booleanValue()},"evaluateBoolean"),evaluateNodeSet:o(function(He){return this.evaluate(He).nodeset()},"evaluateNodeSet"),select:o(function(He){return this.evaluateNodeSet(He).toArray()},"select"),select1:o(function(He){return this.select(He)[0]},"select1")};function v2(He){var rr=d.parse(He);return Object.create(g2,{expression:{value:rr}})}o(v2,"parse"),r.parse=v2})(),v(r,{XPath:C,XPathParser:E,XPathResult:Pt,Step:N,PathExpr:fe,NodeTest:w,LocationPath:ft,OrOperation:H,AndOperation:I,BarOperation:de,EqualsOperation:$,NotEqualOperation:K,LessThanOperation:F,GreaterThanOperation:z,LessThanOrEqualOperation:he,GreaterThanOrEqualOperation:pe,PlusOperation:oe,MinusOperation:Q,MultiplyOperation:xe,DivOperation:Me,ModOperation:Qe,UnaryMinusOperation:T,FunctionCall:P,VariableReference:X,XPathContext:qr,XNodeSet:Je,XBoolean:Ue,XString:Ee,XNumber:Se,NamespaceResolver:hs,FunctionResolver:As,VariableResolver:wn,Utilities:tt}),r.select=function(d,B,G){return r.selectWithResolver(d,B,null,G)},r.useNamespaces=function(d){var B={mappings:d||{},lookupNamespaceURI:o(function(G){return this.mappings[G]},"lookupNamespaceURI")};return function(G,ne,ae){return r.selectWithResolver(G,ne,B,ae)}},r.selectWithResolver=function(d,B,G,ne){var ae=new ps(d,G,new E),W=Pt.ANY_TYPE,it=ae.evaluate(B,W,null);return it.resultType==Pt.STRING_TYPE?it=it.stringValue:it.resultType==Pt.NUMBER_TYPE?it=it.numberValue:it.resultType==Pt.BOOLEAN_TYPE?it=it.booleanValue:(it=it.nodes,ne&&(it=it[0])),it},r.select1=function(d,B){return r.select(d,B,!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(B){return yl(B)&&B.nodeType===d}},"isNodeOfType");v(r,{isNodeLike:yl,isArrayOfNodes:T0,isElement:Ws(S.ELEMENT_NODE),isAttribute:Ws(S.ATTRIBUTE_NODE),isTextNode:Ws(S.TEXT_NODE),isCDATASection:Ws(S.CDATA_SECTION_NODE),isProcessingInstruction:Ws(S.PROCESSING_INSTRUCTION_NODE),isComment:Ws(S.COMMENT_NODE),isDocumentNode:Ws(S.DOCUMENT_NODE),isDocumentTypeNode:Ws(S.DOCUMENT_TYPE_NODE),isDocumentFragment:Ws(S.DOCUMENT_FRAGMENT_NODE)})})($ie)});var Lp=te(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.assertIsDocumentFragmentNode=Dt.assertIsDocumentTypeNode=Dt.assertIsDocumentNode=Dt.assertIsCommentNode=Dt.assertIsProcessingInstructionNode=Dt.assertIsCDATASectionNode=Dt.assertIsTextNode=Dt.assertIsAttributeNode=Dt.assertIsElementNode=Dt.isDocumentFragmentNode=Dt.isDocumentTypeNode=Dt.isDocumentNode=Dt.isCommentNode=Dt.isProcessingInstructionNode=Dt.isCDATASectionNode=Dt.isTextNode=Dt.isAttributeNode=Dt.isElementNode=Dt.assertIsArrayOfNodes=Dt.isArrayOfNodes=Dt.assertIsNodeLike=Dt.isNodeLike=Dt.NodeTypes=void 0;var nn;(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"})(nn||(Dt.NodeTypes=nn={}));function CS(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(CS,"isNodeLike");Dt.isNodeLike=CS;function Gie(r){if(!CS(r))throw new Error(`Value is not a Node-like object. Received: ${r}`)}o(Gie,"assertIsNodeLike");Dt.assertIsNodeLike=Gie;function _V(r){return Array.isArray(r)&&r.every(CS)}o(_V,"isArrayOfNodes");Dt.isArrayOfNodes=_V;function Xie(r){if(!_V(r))throw new Error("Value is not an array of Nodes")}o(Xie,"assertIsArrayOfNodes");Dt.assertIsArrayOfNodes=Xie;function Wa(r,e){return CS(e)&&e.nodeType===r}o(Wa,"isNodeOfType");function Bo(r,e){let t=Object.keys(nn).find(n=>nn[n]===r);if(!Wa(r,e))throw new Error(`Value is not of type ${t}`)}o(Bo,"assertIsNodeOfType");var Wie=o(r=>Wa(nn.ELEMENT_NODE,r),"isElementNode");Dt.isElementNode=Wie;var zie=o(r=>Wa(nn.ATTRIBUTE_NODE,r),"isAttributeNode");Dt.isAttributeNode=zie;var Jie=o(r=>Wa(nn.TEXT_NODE,r),"isTextNode");Dt.isTextNode=Jie;var Yie=o(r=>Wa(nn.CDATA_SECTION_NODE,r),"isCDATASectionNode");Dt.isCDATASectionNode=Yie;var Qie=o(r=>Wa(nn.PROCESSING_INSTRUCTION_NODE,r),"isProcessingInstructionNode");Dt.isProcessingInstructionNode=Qie;var Zie=o(r=>Wa(nn.COMMENT_NODE,r),"isCommentNode");Dt.isCommentNode=Zie;var eae=o(r=>Wa(nn.DOCUMENT_NODE,r),"isDocumentNode");Dt.isDocumentNode=eae;var tae=o(r=>Wa(nn.DOCUMENT_TYPE_NODE,r),"isDocumentTypeNode");Dt.isDocumentTypeNode=tae;var rae=o(r=>Wa(nn.DOCUMENT_FRAGMENT_NODE,r),"isDocumentFragmentNode");Dt.isDocumentFragmentNode=rae;var nae=o(r=>{Bo(nn.ELEMENT_NODE,r)},"assertIsElementNode");Dt.assertIsElementNode=nae;var sae=o(r=>Bo(nn.ATTRIBUTE_NODE,r),"assertIsAttributeNode");Dt.assertIsAttributeNode=sae;var iae=o(r=>Bo(nn.TEXT_NODE,r),"assertIsTextNode");Dt.assertIsTextNode=iae;var aae=o(r=>Bo(nn.CDATA_SECTION_NODE,r),"assertIsCDATASectionNode");Dt.assertIsCDATASectionNode=aae;var oae=o(r=>Bo(nn.PROCESSING_INSTRUCTION_NODE,r),"assertIsProcessingInstructionNode");Dt.assertIsProcessingInstructionNode=oae;var uae=o(r=>Bo(nn.COMMENT_NODE,r),"assertIsCommentNode");Dt.assertIsCommentNode=uae;var cae=o(r=>Bo(nn.DOCUMENT_NODE,r),"assertIsDocumentNode");Dt.assertIsDocumentNode=cae;var lae=o(r=>Bo(nn.DOCUMENT_TYPE_NODE,r),"assertIsDocumentTypeNode");Dt.assertIsDocumentTypeNode=lae;var fae=o(r=>Bo(nn.DOCUMENT_FRAGMENT_NODE,r),"assertIsDocumentFragmentNode");Dt.assertIsDocumentFragmentNode=fae});var Ng=te(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 hae=AS(),hI=Lp();function DV(r){return Array.isArray(r)&&r.length>0}o(DV,"isArrayHasLength");hr.isArrayHasLength=DV;function pae(r,e,t){return r.localName===e&&(r.namespaceURI===t||t==null)}o(pae,"attrEqualsExplicitly");function dae(r,e,t,n){return r.localName===e&&(!r.namespaceURI&&n?.namespaceURI===t||t==null)}o(dae,"attrEqualsImplicitly");function mae(r,e,t){for(let n=0;n<r.attributes.length;n++){let s=r.attributes[n];if(pae(s,e,t)||dae(s,e,t,r))return s}return null}o(mae,"findAttr");hr.findAttr=mae;function BV(r,e,t){let n=r.documentElement??r,s=[];for(let i=0;i<n.childNodes.length;i++){let a=n.childNodes[i];hI.isElementNode(a)&&a.localName===e&&(a.namespaceURI===t||t==null)&&s.push(a)}return s}o(BV,"findChildren");hr.findChildren=BV;function gae(r,e,t){return BV(r,e,t)}o(gae,"findChilds");hr.findChilds=gae;var vae={"&":"&amp;","<":"&lt;",'"':"&quot;","\r":"&#xD;","\n":"&#xA;"," ":"&#x9;"},yae={"&":"&amp;","<":"&lt;",">":"&gt;","\r":"&#xD;"};function xae(r){return r.replace(/([&<"\r\n\t])/g,function(e,t){return vae[t]})}o(xae,"encodeSpecialCharactersInAttribute");hr.encodeSpecialCharactersInAttribute=xae;function wae(r){return r.replace(/([&<>\r])/g,function(e,t){return yae[t]})}o(wae,"encodeSpecialCharactersInText");hr.encodeSpecialCharactersInText=wae;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 fI(r){return`${(r.trim().replace(/(\r\n|\r)/g,`
61
+ `).match(/.{1,64}/g)??[]).join(`
62
+ `)}
63
+ `}o(fI,"normalizePem");hr.normalizePem=fI;function Sae(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(Sae,"pemToDer");hr.pemToDer=Sae;function Eae(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 fI(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}-----
64
+ ${t.replace(/ /g,"")}
65
+ -----END ${e}-----`;return fI(n)}throw new Error("Unknown DER format.")}o(Eae,"derToPem");hr.derToPem=Eae;function RV(r,e=[]){if(!hI.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 RV(t,e)}o(RV,"collectAncestorNamespaces");function bae(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(bae,"findNSPrefix");function Aae(r){return r.every(e=>hI.isElementNode(e))}o(Aae,"isElementSubset");function Cae(r,e,t){if(e==null)return[];let n=hae.selectWithResolver(e,r,t);if(!DV(n))return[];if(!Aae(n))throw new Error("Document subset must be list of elements");let s=RV(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=bae(n[0]);for(let c of i)c.prefix!==u&&a.push(c);return a}o(Cae,"findAncestorNs");hr.findAncestorNs=Cae;function Nae(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(Nae,"validateDigestValue");hr.validateDigestValue=Nae});var dI=te(Vp=>{"use strict";Object.defineProperty(Vp,"__esModule",{value:!0});Vp.C14nCanonicalizationWithComments=Vp.C14nCanonicalization=void 0;var NS=Ng(),pI=Lp(),OV=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(pI.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}="${NS.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(NS.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(pI.isCommentNode(e))return this.renderComment(e);if(e.data)return NS.encodeSpecialCharactersInText(e.data);if(pI.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?`
66
+ `:"",a=n?`
67
+ `:"",u=NS.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=OV;var Tae=class extends OV{static{o(this,"C14nCanonicalizationWithComments")}constructor(){super(),this.includeComments=!0}getAlgorithmName(){return"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"}};Vp.C14nCanonicalizationWithComments=Tae});var vI=te(Up=>{"use strict";Object.defineProperty(Up,"__esModule",{value:!0});Up.ExclusiveCanonicalizationWithComments=Up.ExclusiveCanonicalization=void 0;var $l=Ng(),mI=Lp();function gI(r,e,t){let n=!1;return r.forEach(function(s){s.prefix===e&&s.namespaceURI===t&&(n=!0)}),n}o(gI,"isPrefixInScope");var PV=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(mI.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?gI(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&&!gI(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&&!gI(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(mI.isCommentNode(e))return this.renderComment(e);if(e.data)return $l.encodeSpecialCharactersInText(e.data);if(mI.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?`
68
+ `:"",a=n?`
69
+ `:"",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=PV;var Iae=class extends PV{static{o(this,"ExclusiveCanonicalizationWithComments")}constructor(){super(),this.includeComments=!0}getAlgorithmName(){return"http://www.w3.org/2001/10/xml-exc-c14n#WithComments"}};Up.ExclusiveCanonicalizationWithComments=Iae});var Tg=te(jp=>{"use strict";function _ae(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(_ae,"find");function yI(r,e){return e===void 0&&(e=Object),e&&typeof e.freeze=="function"?e.freeze(r):r}o(yI,"freeze");function Dae(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(Dae,"assign");var kV=yI({HTML:"text/html",isHTML:o(function(r){return r===kV.HTML},"isHTML"),XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),LV=yI({HTML:"http://www.w3.org/1999/xhtml",isHTML:o(function(r){return r===LV.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=Dae;jp.find=_ae;jp.freeze=yI;jp.MIME_TYPE=kV;jp.NAMESPACE=LV});var _I=te(ec=>{"use strict";var KV=Tg(),za=KV.find,Ig=KV.NAMESPACE;function Bae(r){return r!==""}o(Bae,"notEmptyString");function Rae(r){return r?r.split(/[\t\n\f\r ]+/).filter(Bae):[]}o(Rae,"splitOnASCIIWhitespace");function Oae(r,e){return r.hasOwnProperty(e)||(r[e]=!0),r}o(Oae,"orderedSetReducer");function VV(r){if(!r)return[];var e=Rae(r);return Object.keys(e.reduce(Oae,{}))}o(VV,"toOrderedSet");function Pae(r){return function(e){return r&&r.indexOf(e)!==-1}}o(Pae,"arrayIncludes");function Bg(r,e){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}o(Bg,"copy");function Us(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,Bg(t,s),r.prototype=t=s}t.constructor!=r&&(typeof r!="function"&&console.error("unknown Class:"+r),t.constructor=r)}o(Us,"_extends");var js={},Oi=js.ELEMENT_NODE=1,Fp=js.ATTRIBUTE_NODE=2,TS=js.TEXT_NODE=3,$V=js.CDATA_SECTION_NODE=4,GV=js.ENTITY_REFERENCE_NODE=5,kae=js.ENTITY_NODE=6,XV=js.PROCESSING_INSTRUCTION_NODE=7,WV=js.COMMENT_NODE=8,zV=js.DOCUMENT_NODE=9,JV=js.DOCUMENT_TYPE_NODE=10,Oo=js.DOCUMENT_FRAGMENT_NODE=11,Lae=js.NOTATION_NODE=12,is={},Ln={},Cve=is.INDEX_SIZE_ERR=(Ln[1]="Index size error",1),Nve=is.DOMSTRING_SIZE_ERR=(Ln[2]="DOMString size error",2),Vs=is.HIERARCHY_REQUEST_ERR=(Ln[3]="Hierarchy request error",3),Tve=is.WRONG_DOCUMENT_ERR=(Ln[4]="Wrong document",4),Ive=is.INVALID_CHARACTER_ERR=(Ln[5]="Invalid character",5),_ve=is.NO_DATA_ALLOWED_ERR=(Ln[6]="No data allowed",6),Dve=is.NO_MODIFICATION_ALLOWED_ERR=(Ln[7]="No modification allowed",7),YV=is.NOT_FOUND_ERR=(Ln[8]="Not found",8),Bve=is.NOT_SUPPORTED_ERR=(Ln[9]="Not supported",9),UV=is.INUSE_ATTRIBUTE_ERR=(Ln[10]="Attribute in use",10),Rve=is.INVALID_STATE_ERR=(Ln[11]="Invalid state",11),Ove=is.SYNTAX_ERR=(Ln[12]="Syntax error",12),Pve=is.INVALID_MODIFICATION_ERR=(Ln[13]="Invalid modification",13),kve=is.NAMESPACE_ERR=(Ln[14]="Invalid namespace",14),Lve=is.INVALID_ACCESS_ERR=(Ln[15]="Invalid access",15);function cn(r,e){if(e instanceof Error)var t=e;else t=this,Error.call(this,Ln[r]),this.message=Ln[r],Error.captureStackTrace&&Error.captureStackTrace(this,cn);return t.code=r,e&&(this.message=this.message+": "+e),t}o(cn,"DOMException");cn.prototype=Error.prototype;Bg(is,cn);function Ro(){}o(Ro,"NodeList");Ro.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,SI(this)}o(qp,"LiveNodeList");function SI(r){var e=r._node._inc||r._node.ownerDocument._inc;if(r._inc!==e){var t=r._refresh(r._node);if(c6(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];Bg(t,r),r._inc=e}}o(SI,"_updateLiveList");qp.prototype.item=function(r){return SI(this),this[r]||null};Us(qp,Ro);function IS(){}o(IS,"NamedNodeMap");function QV(r,e){for(var t=r.length;t--;)if(r[t]===e)return t}o(QV,"_findNodeIndex");function jV(r,e,t,n){if(n?e[QV(e,n)]=t:e[e.length++]=t,r){t.ownerElement=r;var s=r.ownerDocument;s&&(n&&t6(s,r,n),Vae(s,r,t))}}o(jV,"_addNamedNode");function MV(r,e,t){var n=QV(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&&(t6(i,r,t),t.ownerElement=null)}}else throw new cn(YV,new Error(r.tagName+"@"+t))}o(MV,"_removeNamedNode");IS.prototype={length:0,item:Ro.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 cn(UV);var t=this.getNamedItem(r.nodeName);return jV(this._ownerElement,this,r,t),t},"setNamedItem"),setNamedItemNS:o(function(r){var e=r.ownerElement,t;if(e&&e!=this._ownerElement)throw new cn(UV);return t=this.getNamedItemNS(r.namespaceURI,r.localName),jV(this._ownerElement,this,r,t),t},"setNamedItemNS"),removeNamedItem:o(function(r){var e=this.getNamedItem(r);return MV(this._ownerElement,this,e),e},"removeNamedItem"),removeNamedItemNS:o(function(r,e){var t=this.getNamedItemNS(r,e);return MV(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 Ro,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 BS;return n.name=r,n.nodeName=r,n.publicId=e||"",n.systemId=t||"",n},"createDocumentType")};function br(){}o(br,"Node");br.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 _S(this,r,e)},"insertBefore"),replaceChild:o(function(r,e){_S(this,r,e,n6),e&&this.removeChild(e)},"replaceChild"),removeChild:o(function(r){return r6(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 wI(this.ownerDocument||this,this,r)},"cloneNode"),normalize:o(function(){for(var r=this.firstChild;r;){var e=r.nextSibling;e&&e.nodeType==TS&&r.nodeType==TS?(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 e6(r){return r=="<"&&"&lt;"||r==">"&&"&gt;"||r=="&"&&"&amp;"||r=='"'&&"&quot;"||"&#"+r.charCodeAt()+";"}o(e6,"_xmlEncoder");Bg(js,br);Bg(js,br.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 Vae(r,e,t){r&&r._inc++;var n=t.namespaceURI;n===Ig.XMLNS&&(e._nsMap[t.prefix?t.localName:""]=t.value)}o(Vae,"_onAddAttribute");function t6(r,e,t,n){r&&r._inc++;var s=t.namespaceURI;s===Ig.XMLNS&&delete e._nsMap[t.prefix?t.localName:""]}o(t6,"_onRemoveAttribute");function EI(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(EI,"_onUpdateChild");function r6(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,EI(r.ownerDocument,r),e}o(r6,"_removeChild");function Uae(r){return r&&(r.nodeType===br.DOCUMENT_NODE||r.nodeType===br.DOCUMENT_FRAGMENT_NODE||r.nodeType===br.ELEMENT_NODE)}o(Uae,"hasValidParentNodeType");function jae(r){return r&&(Ja(r)||bI(r)||Po(r)||r.nodeType===br.DOCUMENT_FRAGMENT_NODE||r.nodeType===br.COMMENT_NODE||r.nodeType===br.PROCESSING_INSTRUCTION_NODE)}o(jae,"hasInsertableNodeType");function Po(r){return r&&r.nodeType===br.DOCUMENT_TYPE_NODE}o(Po,"isDocTypeNode");function Ja(r){return r&&r.nodeType===br.ELEMENT_NODE}o(Ja,"isElementNode");function bI(r){return r&&r.nodeType===br.TEXT_NODE}o(bI,"isTextNode");function FV(r,e){var t=r.childNodes||[];if(za(t,Ja)||Po(e))return!1;var n=za(t,Po);return!(e&&n&&t.indexOf(n)>t.indexOf(e))}o(FV,"isElementInsertionPossible");function qV(r,e){var t=r.childNodes||[];function n(i){return Ja(i)&&i!==e}if(o(n,"hasElementChildThatIsNotChild"),za(t,n))return!1;var s=za(t,Po);return!(e&&s&&t.indexOf(s)>t.indexOf(e))}o(qV,"isElementReplacementPossible");function Mae(r,e,t){if(!Uae(r))throw new cn(Vs,"Unexpected parent node type "+r.nodeType);if(t&&t.parentNode!==r)throw new cn(YV,"child not in parent");if(!jae(e)||Po(e)&&r.nodeType!==br.DOCUMENT_NODE)throw new cn(Vs,"Unexpected node type "+e.nodeType+" for parent node type "+r.nodeType)}o(Mae,"assertPreInsertionValidity1to5");function Fae(r,e,t){var n=r.childNodes||[],s=e.childNodes||[];if(e.nodeType===br.DOCUMENT_FRAGMENT_NODE){var i=s.filter(Ja);if(i.length>1||za(s,bI))throw new cn(Vs,"More than one element or text in fragment");if(i.length===1&&!FV(r,t))throw new cn(Vs,"Element in fragment can not be inserted before doctype")}if(Ja(e)&&!FV(r,t))throw new cn(Vs,"Only one element can be added and only after doctype");if(Po(e)){if(za(n,Po))throw new cn(Vs,"Only one doctype is allowed");var a=za(n,Ja);if(t&&n.indexOf(a)<n.indexOf(t))throw new cn(Vs,"Doctype can only be inserted before an element");if(!t&&a)throw new cn(Vs,"Doctype can not be appended since element is present")}}o(Fae,"assertPreInsertionValidityInDocument");function n6(r,e,t){var n=r.childNodes||[],s=e.childNodes||[];if(e.nodeType===br.DOCUMENT_FRAGMENT_NODE){var i=s.filter(Ja);if(i.length>1||za(s,bI))throw new cn(Vs,"More than one element or text in fragment");if(i.length===1&&!qV(r,t))throw new cn(Vs,"Element in fragment can not be inserted before doctype")}if(Ja(e)&&!qV(r,t))throw new cn(Vs,"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"),za(n,c))throw new cn(Vs,"Only one doctype is allowed");var a=za(n,Ja);if(t&&n.indexOf(a)<n.indexOf(t))throw new cn(Vs,"Doctype can only be inserted before an element")}}o(n6,"assertPreReplacementValidityInDocument");function _S(r,e,t,n){Mae(r,e,t),r.nodeType===br.DOCUMENT_NODE&&(n||Fae)(r,e,t);var s=e.parentNode;if(s&&s.removeChild(e),e.nodeType===Oo){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;Dg(i,c)}while(i!==a&&(i=i.nextSibling));return EI(r.ownerDocument||r,r),e.nodeType==Oo&&(e.firstChild=e.lastChild=null),e}o(_S,"_insertBefore");function Dg(r,e){if(r.ownerDocument!==e){if(r.ownerDocument=e,r.nodeType===Oi&&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;)Dg(s,e),s=s.nextSibling}}o(Dg,"_updateOwnerDocument");function qae(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,EI(r.ownerDocument,r,e);var t=r.ownerDocument||r;return Dg(e,t),e}o(qae,"_appendSingleChild");Rg.prototype={nodeName:"#document",nodeType:zV,doctype:null,documentElement:null,_inc:1,insertBefore:o(function(r,e){if(r.nodeType==Oo){for(var t=r.firstChild;t;){var n=t.nextSibling;this.insertBefore(t,e),t=n}return r}return _S(this,r,e),Dg(r,this),this.documentElement===null&&r.nodeType===Oi&&(this.documentElement=r),r},"insertBefore"),removeChild:o(function(r){return this.documentElement==r&&(this.documentElement=null),r6(this,r)},"removeChild"),replaceChild:o(function(r,e){_S(this,r,e,n6),Dg(r,this),e&&this.removeChild(e),Ja(r)&&(this.documentElement=r)},"replaceChild"),importNode:o(function(r,e){return u6(this,r,e)},"importNode"),getElementById:o(function(r){var e=null;return _g(this.documentElement,function(t){if(t.nodeType==Oi&&t.getAttribute("id")==r)return e=t,!0}),e},"getElementById"),getElementsByClassName:o(function(r){var e=VV(r);return new qp(this,function(t){var n=[];return e.length>0&&_g(t.documentElement,function(s){if(s!==t&&s.nodeType===Oi){var i=s.getAttribute("class");if(i){var a=r===i;if(!a){var u=VV(i);a=e.every(Pae(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 Ro;var t=e.attributes=new IS;return t._ownerElement=e,e},"createElement"),createDocumentFragment:o(function(){var r=new RS;return r.ownerDocument=this,r.childNodes=new Ro,r},"createDocumentFragment"),createTextNode:o(function(r){var e=new AI;return e.ownerDocument=this,e.appendData(r),e},"createTextNode"),createComment:o(function(r){var e=new CI;return e.ownerDocument=this,e.appendData(r),e},"createComment"),createCDATASection:o(function(r){var e=new NI;return e.ownerDocument=this,e.appendData(r),e},"createCDATASection"),createProcessingInstruction:o(function(r,e){var t=new II;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 DS;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 TI;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 IS;return t.childNodes=new Ro,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 DS,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")};Us(Rg,br);function Gl(){this._nsMap={}}o(Gl,"Element");Gl.prototype={nodeType:Oi,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===Oo?this.insertBefore(r,null):qae(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==Oi&&(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===Oi&&(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;Us(Gl,br);function DS(){}o(DS,"Attr");DS.prototype.nodeType=Fp;Us(DS,br);function Og(){}o(Og,"CharacterData");Og.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(Ln[Vs])},"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")};Us(Og,br);function AI(){}o(AI,"Text");AI.prototype={nodeName:"#text",nodeType:TS,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")};Us(AI,Og);function CI(){}o(CI,"Comment");CI.prototype={nodeName:"#comment",nodeType:WV};Us(CI,Og);function NI(){}o(NI,"CDATASection");NI.prototype={nodeName:"#cdata-section",nodeType:$V};Us(NI,Og);function BS(){}o(BS,"DocumentType");BS.prototype.nodeType=JV;Us(BS,br);function s6(){}o(s6,"Notation");s6.prototype.nodeType=Lae;Us(s6,br);function i6(){}o(i6,"Entity");i6.prototype.nodeType=kae;Us(i6,br);function TI(){}o(TI,"EntityReference");TI.prototype.nodeType=GV;Us(TI,br);function RS(){}o(RS,"DocumentFragment");RS.prototype.nodeName="#document-fragment";RS.prototype.nodeType=Oo;Us(RS,br);function II(){}o(II,"ProcessingInstruction");II.prototype.nodeType=XV;Us(II,br);function a6(){}o(a6,"XMLSerializer");a6.prototype.serializeToString=function(r,e,t){return o6.call(r,e,t)};br.prototype.toString=o6;function o6(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(o6,"nodeSerializeToString");function HV(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(HV,"needNamespaceDefine");function xI(r,e,t){r.push(" ",e,'="',t.replace(/[<>&"\t\n\r]/g,e6),'"')}o(xI,"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 Oi:var i=r.attributes,a=i.length,C=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(HV(v,t,s)){var S=v.prefix||"",E=v.namespaceURI;xI(e,S?"xmlns:"+S:"xmlns",E),s.push({prefix:S,namespace:E})}Mp(v,e,t,n,s)}if(u===c&&HV(r,t,s)){var S=r.prefix||"",E=r.namespaceURI;xI(e,S?"xmlns:"+S:"xmlns",E),s.push({prefix:S,namespace:E})}if(C||t&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(e.push(">"),t&&/^script$/i.test(u))for(;C;)C.data?e.push(C.data):Mp(C,e,t,n,s.slice()),C=C.nextSibling;else for(;C;)Mp(C,e,t,n,s.slice()),C=C.nextSibling;e.push("</",c,">")}else e.push("/>");return;case zV:case Oo:for(var C=r.firstChild;C;)Mp(C,e,t,n,s.slice()),C=C.nextSibling;return;case Fp:return xI(e,r.name,r.value);case TS:return e.push(r.data.replace(/[<&>]/g,e6));case $V:return e.push("<![CDATA[",r.data,"]]>");case WV:return e.push("<!--",r.data,"-->");case JV:var _=r.publicId,b=r.systemId;if(e.push("<!DOCTYPE ",r.name),_)e.push(" PUBLIC ",_),b&&b!="."&&e.push(" ",b),e.push(">");else if(b&&b!=".")e.push(" SYSTEM ",b,">");else{var A=r.internalSubset;A&&e.push(" [",A,"]"),e.push(">")}return;case XV:return e.push("<?",r.target," ",r.data,"?>");case GV:return e.push("&",r.nodeName,";");default:e.push("??",r.nodeName)}}o(Mp,"serializeToString");function u6(r,e,t){var n;switch(e.nodeType){case Oi:n=e.cloneNode(!1),n.ownerDocument=r;case Oo: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(u6(r,s,t)),s=s.nextSibling;return n}o(u6,"importNode");function wI(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 Ro),n.ownerDocument=r,n.nodeType){case Oi:var a=e.attributes,u=n.attributes=new IS,c=a.length;u._ownerElement=n;for(var f=0;f<c;f++)n.setAttributeNode(wI(r,a.item(f),!0));break;case Fp:t=!0}if(t)for(var h=e.firstChild;h;)n.appendChild(wI(r,h,t)),h=h.nextSibling;return n}o(wI,"cloneNode");function c6(r,e,t){r[e]=t}o(c6,"__set__");try{if(Object.defineProperty){let r=function(e){switch(e.nodeType){case Oi:case Oo: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}};Hae=r,o(r,"getTextContent"),Object.defineProperty(qp.prototype,"length",{get:o(function(){return SI(this),this.$$length},"get")}),Object.defineProperty(br.prototype,"textContent",{get:o(function(){return r(this)},"get"),set:o(function(e){switch(this.nodeType){case Oi:case Oo: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")}),c6=o(function(e,t,n){e["$$"+t]=n},"__set__")}}catch{}var Hae;ec.DocumentType=BS;ec.DOMException=cn;ec.DOMImplementation=ZV;ec.Element=Gl;ec.Node=br;ec.NodeList=Ro;ec.XMLSerializer=a6});var f6=te(Pg=>{"use strict";var l6=Tg().freeze;Pg.XML_ENTITIES=l6({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});Pg.HTML_ENTITIES=l6({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:`
70
+ `,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"});Pg.entityMap=Pg.HTML_ENTITIES});var x6=te(BI=>{"use strict";var Ug=Tg().NAMESPACE,DI=/[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]/,h6=new RegExp("[\\-\\.0-9"+DI.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),p6=new RegExp("^"+DI.source+h6.source+"*(?::"+DI.source+h6.source+"*)?$"),kg=0,tc=1,Hp=2,Lg=3,Kp=4,$p=5,Vg=6,OS=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 g6(){}o(g6,"XMLReader");g6.prototype={parse:o(function(r,e,t){var n=this.domBuilder;n.startDocument(),v6(e,e={}),Kae(r,e,t,n,this.errorHandler),n.endDocument()},"parse")};function Kae(r,e,t,n,s){function i(Q){if(Q>65535){Q-=65536;var xe=55296+(Q>>10),Me=56320+(Q&1023);return String.fromCharCode(xe,Me)}else return String.fromCharCode(Q)}o(i,"fixedFromCharCode");function a(Q){var xe=Q.slice(1,-1);return Object.hasOwnProperty.call(t,xe)?t[xe]:xe.charAt(0)==="#"?i(parseInt(xe.substr(1).replace("x","0x"))):(s.error("entity not found:"+Q),Q)}o(a,"entityReplacer");function u(Q){if(Q>S){var xe=r.substring(S,Q).replace(/&#?\w+;/g,a);g&&c(S),n.characters(xe,0,Q-S),S=Q}}o(u,"appendText");function c(Q,xe){for(;Q>=h&&(xe=m.exec(r));)f=xe.index,h=f+xe[0].length,g.lineNumber++;g.columnNumber=Q-f+1}o(c,"position");for(var f=0,h=0,m=/.*(?:\r\n?|\n)|.*$/g,g=n.locator,x=[{currentNSMap:e}],v={},S=0;;){try{var E=r.indexOf("<",S);if(E<0){if(!r.substr(S).match(/^\s*$/)){var C=n.doc,_=C.createTextNode(r.substr(S));C.appendChild(_),n.currentElement=_}return}switch(E>S&&u(E),r.charAt(E+1)){case"/":var F=r.indexOf(">",E+3),b=r.substring(E+2,F).replace(/[ \t\n\r]+$/g,""),A=x.pop();F<0?(b=r.substring(E+2).replace(/[\s<].*/,""),s.error("end tag name: "+b+" is not complete:"+A.tagName),F=E+1+b.length):b.match(/\s</)&&(b=b.replace(/[\s<].*/,""),s.error("end tag name: "+b+" maybe not complete"),F=E+1+b.length);var T=A.localNSMap,R=A.tagName==b,H=R||A.tagName&&A.tagName.toLowerCase()==b.toLowerCase();if(H){if(n.endElement(A.uri,A.localName,b),T)for(var I in T)Object.prototype.hasOwnProperty.call(T,I)&&n.endPrefixMapping(I);R||s.fatalError("end tag name: "+b+" is not match the current start tagName:"+A.tagName)}else x.push(A);F++;break;case"?":g&&c(E),F=zae(r,E,n);break;case"!":g&&c(E),F=Wae(r,E,n,s);break;default:g&&c(E);var $=new y6,K=x[x.length-1].currentNSMap,F=$ae(r,E,$,K,a,s),z=$.length;if(!$.closed&&Xae(r,F,$.tagName,v)&&($.closed=!0,t.nbsp||s.warning("unclosed xml attribute")),g&&z){for(var he=d6(g,{}),pe=0;pe<z;pe++){var oe=$[pe];c(oe.offset),oe.locator=d6(g,{})}n.locator=he,m6($,n,K)&&x.push($),n.locator=g}else m6($,n,K)&&x.push($);Ug.isHTML($.uri)&&!$.closed?F=Gae(r,F,$.tagName,a,n):F++}}catch(Q){if(Q instanceof Gp)throw Q;s.error("element parse error: "+Q),F=-1}F>S?S=F:u(Math.max(E,S)+1)}}o(Kae,"parse");function d6(r,e){return e.lineNumber=r.lineNumber,e.columnNumber=r.columnNumber,e}o(d6,"copyLocator");function $ae(r,e,t,n,s,i){function a(x,v,S){t.attributeNames.hasOwnProperty(x)&&i.fatalError("Attribute "+x+" redefined"),t.addValue(x,v.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,s),S)}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 OS:h=OS,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 OS: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 OS:throw new Error("elements closed character '/' and '>' must be connected to")}}f++}}o($ae,"parseElementStartPart");function m6(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={},v6(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(m6,"appendElement");function Gae(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(Gae,"parseHtmlSpecialContent");function Xae(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(Xae,"fixSelfClosed");function v6(r,e){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}o(v6,"_copy");function Wae(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=Jae(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(Wae,"parseDCC");function zae(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(zae,"parseInstruction");function y6(){this.attributeNames={}}o(y6,"ElementAttributes");y6.prototype={setTagName:o(function(r){if(!p6.test(r))throw new Error("invalid tagName:"+r);this.tagName=r},"setTagName"),addValue:o(function(r,e,t){if(!p6.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 Jae(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(Jae,"split");BI.XMLReader=g6;BI.ParseError=Gp});var N6=te(kS=>{"use strict";var Yae=Tg(),Qae=_I(),w6=f6(),b6=x6(),Zae=Qae.DOMImplementation,S6=Yae.NAMESPACE,eoe=b6.ParseError,toe=b6.XMLReader;function A6(r){return r.replace(/\r[\n\u0085]/g,`
71
+ `).replace(/[\r\u0085\u2028]/g,`
72
+ `)}o(A6,"normalizeLineEndings");function C6(r){this.options=r||{locator:{}}}o(C6,"DOMParser");C6.prototype.parseFromString=function(r,e){var t=this.options,n=new toe,s=t.domBuilder||new jg,i=t.errorHandler,a=t.locator,u=t.xmlns||{},c=/\/x?html?$/.test(e),f=c?w6.HTML_ENTITIES:w6.XML_ENTITIES;a&&s.setDocumentLocator(a),n.errorHandler=roe(i,s,a),n.domBuilder=t.domBuilder||s,c&&(u[""]=S6.HTML),u.xml=u.xml||S6.XML;var h=t.normalizeLineEndings||A6;return r&&typeof r=="string"?n.parse(h(r),u,f):n.errorHandler.error("invalid doc source"),s.doc};function roe(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+RI(t))}||function(){}}return o(i,"build"),i("warning"),i("error"),i("fatalError"),n}o(roe,"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 Zae().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;PS(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),PS(this,t)},"processingInstruction"),ignorableWhitespace:o(function(r,e,t){},"ignorableWhitespace"),characters:o(function(r,e,t){if(r=E6.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=E6.apply(this,arguments);var n=this.doc.createComment(r);this.locator&&Xp(this.locator,n),PS(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),PS(this,s),this.doc.doctype=s}},"startDTD"),warning:o(function(r){console.warn("[xmldom warning] "+r,RI(this.locator))},"warning"),error:o(function(r){console.error("[xmldom error] "+r,RI(this.locator))},"error"),fatalError:o(function(r){throw new eoe(r,this.locator)},"fatalError")};function RI(r){if(r)return`
73
+ @`+(r.systemId||"")+"#[line:"+r.lineNumber+",col:"+r.columnNumber+"]"}o(RI,"_locator");function E6(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(E6,"_toString");"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(r){jg.prototype[r]=function(){return null}});function PS(r,e){r.currentElement?r.currentElement.appendChild(e):r.doc.appendChild(e)}o(PS,"appendElement");kS.__DOMHandler=jg;kS.normalizeLineEndings=A6;kS.DOMParser=C6});var OI=te(LS=>{"use strict";var T6=_I();LS.DOMImplementation=T6.DOMImplementation;LS.XMLSerializer=T6.XMLSerializer;LS.DOMParser=N6().DOMParser});var I6=te(US=>{"use strict";Object.defineProperty(US,"__esModule",{value:!0});US.EnvelopedSignature=void 0;var VS=AS(),PI=Lp(),noe=class{static{o(this,"EnvelopedSignature")}constructor(){this.includeComments=!1,this.includeComments=!1}process(e,t){if(t.signatureNode==null){let i=VS.select1("./*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']",e);return PI.isNodeLike(i)&&i.parentNode&&i.parentNode.removeChild(i),e}let n=t.signatureNode,s=VS.select1(".//*[local-name(.)='SignatureValue']/text()",n);if(PI.isTextNode(s)){let i=s.data,a=VS.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=VS.select1(".//*[local-name(.)='SignatureValue']/text()",u);if(PI.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"}};US.EnvelopedSignature=noe});var _6=te(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});rc.Sha512=rc.Sha256=rc.Sha1=void 0;var kI=We("crypto"),soe=class{static{o(this,"Sha1")}constructor(){this.getHash=function(e){let t=kI.createHash("sha1");return t.update(e,"utf8"),t.digest("base64")},this.getAlgorithmName=function(){return"http://www.w3.org/2000/09/xmldsig#sha1"}}};rc.Sha1=soe;var ioe=class{static{o(this,"Sha256")}constructor(){this.getHash=function(e){let t=kI.createHash("sha256");return t.update(e,"utf8"),t.digest("base64")},this.getAlgorithmName=function(){return"http://www.w3.org/2001/04/xmlenc#sha256"}}};rc.Sha256=ioe;var aoe=class{static{o(this,"Sha512")}constructor(){this.getHash=function(e){let t=kI.createHash("sha512");return t.update(e,"utf8"),t.digest("base64")},this.getAlgorithmName=function(){return"http://www.w3.org/2001/04/xmlenc#sha512"}}};rc.Sha512=aoe});var LI=te(jS=>{"use strict";Object.defineProperty(jS,"__esModule",{value:!0});jS.createOptionalCallbackFunction=void 0;function ooe(r){return typeof r=="function"}o(ooe,"isErrorFirstCallback");function uoe(r){return(...e)=>{let t=e[e.length-1];if(ooe(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(uoe,"createOptionalCallbackFunction");jS.createOptionalCallbackFunction=uoe});var D6=te(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.HmacSha1=Ya.RsaSha512=Ya.RsaSha256=Ya.RsaSha1=void 0;var nc=We("crypto"),sc=LI(),coe=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"}};Ya.RsaSha1=coe;var loe=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"}};Ya.RsaSha256=loe;var foe=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"}};Ya.RsaSha512=foe;var hoe=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"}};Ya.HmacSha1=hoe});var O6=te(FS=>{"use strict";Object.defineProperty(FS,"__esModule",{value:!0});FS.SignedXml=void 0;var ii=Lp(),Xl=OI(),poe=We("util"),Pi=AS(),B6=dI(),doe=I6(),R6=vI(),VI=_6(),MS=D6(),mr=Ng(),UI=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":B6.C14nCanonicalization,"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments":B6.C14nCanonicalizationWithComments,"http://www.w3.org/2001/10/xml-exc-c14n#":R6.ExclusiveCanonicalization,"http://www.w3.org/2001/10/xml-exc-c14n#WithComments":R6.ExclusiveCanonicalizationWithComments,"http://www.w3.org/2000/09/xmldsig#enveloped-signature":doe.EnvelopedSignature},this.HashAlgorithms={"http://www.w3.org/2000/09/xmldsig#sha1":VI.Sha1,"http://www.w3.org/2001/04/xmlenc#sha256":VI.Sha256,"http://www.w3.org/2001/04/xmlenc#sha512":VI.Sha512},this.SignatureAlgorithms={"http://www.w3.org/2000/09/xmldsig#rsa-sha1":MS.RsaSha1,"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256":MS.RsaSha256,"http://www.w3.org/2001/04/xmldsig-more#rsa-sha512":MS.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":MS.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=Pi.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=Pi.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=Pi.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=Pi.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,poe.deprecate)(c=>{if(c=c||e.xpath,typeof c!="string"||e.validationError!=null)return null;let f=Pi.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=Pi.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=Pi.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=Pi.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=Pi.select1(".//*[local-name(.)='SignatureValue']/text()",e);ii.isTextNode(h)&&(this.signatureValue=h.data.replace(/\r?\n/g,""));let m=Pi.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(R){return R?x[R]:null},"lookupNamespaceURI")},g.reference=g.reference||"/*",g.action=g.action||"append",f.indexOf(g.action)===-1){let R=new Error(`location.action option has an invalid action: ${g.action}, must be any of the following values: ${f.join(", ")}`);if(s){s(R);return}else throw R}h?(a+=`:${h}`,c=`${h}:`):c="",Object.keys(m).forEach(function(R){R!=="xmlns"&&R!==a&&u.push(`${R}="${m[R]}"`)}),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 S="";Object.keys(x).forEach(function(R){S+=`xmlns:${R}="${x[R]}" `});let E=`<Dummy ${S}>${v}</Dummy>`,_=new Xl.DOMParser().parseFromString(E).documentElement.firstChild,b=Pi.select1(g.reference,i);if(!ii.isNodeLike(b)){let R=new Error(`the following xpath cannot be used because it was not found: ${g.reference}`);if(s){s(R);return}else throw R}if(g.action==="append")b.appendChild(_);else if(g.action==="prepend")b.insertBefore(_,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(_,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(_,b.nextSibling)}this.signatureNode=_;let A=mr.findChildren(this.signatureNode,"SignedInfo");if(A.length===0){let R=new Error("could not find SignedInfo element in the message");if(s){s(R);return}else throw R}let T=A[0];typeof s=="function"?this.calculateSignatureValue(i,(R,H)=>{R?s(R):(this.signatureValue=H||"",_.insertBefore(this.createSignature(h),T.nextSibling),this.signatureXml=_.toString(),this.signedXml=i.toString(),s(null,this))}):(this.calculateSignatureValue(i),_.insertBefore(this.createSignature(h),T.nextSibling),this.signatureXml=_.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=Pi.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}};FS.SignedXml=UI;UI.defaultNsForPrefix={ds:"http://www.w3.org/2000/09/xmldsig#"};UI.noop=()=>null});var jI=te(Vn=>{"use strict";var moe=Vn&&Vn.__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]}),P6=Vn&&Vn.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&moe(e,r,t)};Object.defineProperty(Vn,"__esModule",{value:!0});Vn.SignedXml=Vn.ExclusiveCanonicalizationWithComments=Vn.ExclusiveCanonicalization=Vn.C14nCanonicalizationWithComments=Vn.C14nCanonicalization=void 0;var k6=dI();Object.defineProperty(Vn,"C14nCanonicalization",{enumerable:!0,get:o(function(){return k6.C14nCanonicalization},"get")});Object.defineProperty(Vn,"C14nCanonicalizationWithComments",{enumerable:!0,get:o(function(){return k6.C14nCanonicalizationWithComments},"get")});var L6=vI();Object.defineProperty(Vn,"ExclusiveCanonicalization",{enumerable:!0,get:o(function(){return L6.ExclusiveCanonicalization},"get")});Object.defineProperty(Vn,"ExclusiveCanonicalizationWithComments",{enumerable:!0,get:o(function(){return L6.ExclusiveCanonicalizationWithComments},"get")});var goe=O6();Object.defineProperty(Vn,"SignedXml",{enumerable:!0,get:o(function(){return goe.SignedXml},"get")});P6(LI(),Vn);P6(Ng(),Vn)});var j6=te(HS=>{"use strict";Object.defineProperty(HS,"__esModule",{value:!0});HS.WSSecurityCert=void 0;var voe=We("crypto"),yoe=jI();function xoe(r,e){return new Date(r.getTime()+e*6e4)}o(xoe,"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 woe(){return V6(new Date)}o(woe,"generateCreated");function Soe(){return V6(xoe(new Date,10))}o(Soe,"generateExpires");function qS(r,e,t){return[e.slice(0,t),r,e.slice(t)].join("")}o(qS,"insertStr");function Eoe(){return(0,voe.randomUUID)().replace(/-/gm,"")}o(Eoe,"generateId");function boe(r,e){for(let t of r)t.xpath===U6&&(t.xpath=e)}o(boe,"resolvePlaceholderInReferences");var ic="http://docs.oasis-open.org/wss/2004/01",U6="[[bodyXpath]]",Aoe=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 yoe.SignedXml({idMode:s?.signerOptions?.idMode,signatureAlgorithm:s?.signatureAlgorithm}),this.signer.digestAlgorithm=s.digestAlgorithm??"http://www.w3.org/2001/04/xmlenc#sha256",this.appendElement="",s.appendElement&&(this.appendElement=s.appendElement),s.signatureAlgorithm==="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"&&(this.signer.signatureAlgorithm=s.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"})),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-${Eoe()}`,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=woe(),this.expires=Soe();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+this.appendElement,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( [^>]*)?>/,S=e.match(v),E="";S[0].includes(` ${t}:mustUnderstand="`)||(E+=`${t}:mustUnderstand="1" `),S[0].includes(a.substring(0,a.indexOf("=")))||(E+=`${a} `),S[0].includes(u.substring(0,a.indexOf("=")))||(E+=`${u} `);let C="<wsse:Security ",_=e.indexOf(C);e=qS(s,e,c),i=qS(E,e,_+C.length)}else{let v=`<wsse:Security ${a} ${u} ${t}:mustUnderstand="1">`+s+"</wsse:Security>";i=qS(v,e,e.indexOf(`</${t}:Header>`))}let f=this.signatureTransformations,h=`//*[name(.)='${t}:Body']`;boe(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 S=`//*[name(.)='${v}']`;!this.excludeReferencesFromSigning.some(E=>E===v)&&!(this.signer.references.filter(E=>E.xpath===S).length>0)&&this.signer.addReference({xpath:S,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 qS(x,g,g.indexOf("</wsse:Security>"))}};HS.WSSecurityCert=Aoe});var H6=te(KS=>{"use strict";Object.defineProperty(KS,"__esModule",{value:!0});KS.WSSecurityCertWithToken=void 0;var Coe=We("crypto"),Noe=jI();function Toe(r,e){return new Date(r.getTime()+e*6e4)}o(Toe,"addMinutes");function F6(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(F6,"dateStringForSOAP");function Ioe(){return F6(new Date)}o(Ioe,"generateCreated");function _oe(){return F6(Toe(new Date,10))}o(_oe,"generateExpires");function M6(r,e,t){return[e.slice(0,t),r,e.slice(t)].join("")}o(M6,"insertStr");function Doe(){return(0,Coe.randomUUID)().replace(/-/gm,"")}o(Doe,"generateId");function Boe(r,e){for(let t of r)t.xpath===q6&&(t.xpath=e)}o(Boe,"resolvePlaceholderInReferences");var ac="http://docs.oasis-open.org/wss/2004/01",q6="[[bodyXpath]]",Roe=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 Noe.SignedXml;let t=e.options||{};if(this.appendElement="",t.appendElement&&(this.appendElement=t.appendElement),t.signatureAlgorithm==="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"&&(this.signer.signatureAlgorithm=t.signatureAlgorithm,this.signer.addReference({xpath:q6,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-${Doe()}`,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=Ioe(),this.expires=_oe();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+this.appendElement+"</wsse:Security>",a=M6(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),M6(this.signer.getSignatureXml(),a,a.indexOf("</wsse:Security>"))}};KS.WSSecurityCertWithToken=Roe});var K6=te($S=>{"use strict";Object.defineProperty($S,"__esModule",{value:!0});$S.WSSecurityPlusCert=void 0;var Ooe=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)}};$S.WSSecurityPlusCert=Ooe});var MI=te(Ss=>{"use strict";var Poe=Ss&&Ss.__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]}),ko=Ss&&Ss.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Poe(e,r,t)};Object.defineProperty(Ss,"__esModule",{value:!0});ko(xV(),Ss);ko(SV(),Ss);ko(AV(),Ss);ko(NV(),Ss);ko(TV(),Ss);ko(IV(),Ss);ko(j6(),Ss);ko(H6(),Ss);ko(K6(),Ss)});var FI=te(ki=>{"use strict";var koe=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]}),Loe=ki&&ki.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Voe=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"&&koe(t,e,n[s]);return Loe(t,e),t}})(),Uoe=ki&&ki.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ki,"__esModule",{value:!0});ki.Server=void 0;var joe=We("events"),GS=Voe(We("url")),Moe=Uoe(We("zlib"));function Foe(r){return typeof r.route=="function"&&typeof r.use=="function"}o(Foe,"isExpress");function $6(r){return!!r&&typeof r.then=="function"}o($6,"isPromiseLike");function G6(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(G6,"getDateString");var qoe=class extends joe.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(Foe(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=GS.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,this.wsdl.options.envelopeKey=e.envelopeKey||"soap"}_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=GS.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=Moe.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=GS.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"),S=o((C,_)=>{let b={result:C};this.emit("response",b,h),s(b.result,_)},"callback"),E=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 C=this.wsdl.definitions.services,_,b;for(b in C){m=b;let T=C[m].ports;for(b in T){g=b;let R=T[g],H=GS.parse(R.location).pathname.replace(/\/$/,"");if(typeof this.log=="function"&&this.log("info","Trying "+g+" from path "+H,t),H===i)return R.binding;_||(_=R)}}return _?_.binding:void 0})(),!f)throw new Error("Failed to bind to WSDL");try{let C=this._getSoapAction(t),_=Object.keys(u)[0]==="attributes"?Object.keys(u)[1]:Object.keys(u)[0],b=f.topElements[_];C?h=this._getMethodNameBySoapAction(f,C):h=b?b.methodName:_;let A=f.methods[h].style||f.style;this.emit("request",a,h),c&&this.emit("headers",c,h),A==="rpc"?this._executeMethod({serviceName:m,portName:g,methodName:h,outputName:_+"Response",args:u[_],headers:c,style:"rpc"},t,n,S):this._executeMethod({serviceName:m,portName:g,methodName:h,outputName:b.outputName,args:u[_],headers:c,style:"document"},t,n,S,x)}catch(C){if(C.Fault!==void 0)return this._sendError(C.Fault,S,x);throw C}},"process");if(typeof v=="function"){let C=!1,_=o(A=>{if(!C){if(C=!0,A instanceof Error)return this._sendError({Code:{Value:"SOAP-ENV:Server",Subcode:{Value:"InternalServerError"}},Reason:{Text:A.toString()},statusCode:500},S,x);if(typeof A=="boolean")if(A===!0)try{E()}catch(T){return T.Fault!==void 0?this._sendError(T.Fault,S,x):this._sendError({Code:{Value:"SOAP-ENV:Server",Subcode:{Value:"InternalServerError"}},Reason:{Text:T.toString()},statusCode:500},S,x)}else return this._sendError({Code:{Value:"SOAP-ENV:Client",Subcode:{Value:"AuthenticationFailure"}},Reason:{Text:"Invalid username or password"},statusCode:401},S,x)}},"processAuthResult"),b=v(a.Header&&a.Header.Security,_,t,a);$6(b)&&b.then(A=>{_(A)},A=>{_(A)}),typeof b=="boolean"&&_(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,S=e.style;this.soapHeaders&&(c=this.soapHeaders.map(A=>typeof A=="function"?A(g,v,e.headers,t,n,this):A).join(`
74
+ `));try{a=this.services[f][h][g]}catch{return s(this._envelope("",c,i))}let E=!1,C=o((A,T)=>{if(!E){if(E=!0,A)return A.Fault!==void 0?this._sendError(A.Fault,s,i):this._sendError({Code:{Value:"SOAP-ENV:Server",Subcode:{Value:"InternalServerError"}},Reason:{Text:A.toString()},statusCode:500},s,i);if(S==="rpc")u=this.wsdl.objectToRpcXML(x,T,"",this.wsdl.definitions.$targetNamespace);else if(S==="document"){let R=m.methods[g].output;u=this.wsdl.objectToDocumentXML(x,T,R.targetNSAlias,R.targetNamespace)}else{let R=m.methods[g].output,H=R.$targetNamespace,I=x;H&&(I=`${H}:${I}`),u=this.wsdl.objectToDocumentXML(I,T,R.targetNSAlias,R.targetNamespace)}s(this._envelope(u,c,i))}},"handleResult");m.methods[g].output||(E=!0,u="",this.onewayOptions.emptyBody&&(u=this._envelope("",c,i)),s(u,this.onewayOptions.responseCode));let _=o((A,T)=>{A&&A.Fault!==void 0||T===void 0&&(T=A,A=null),C(A,T)},"methodCallback"),b=a.apply(this,[v,_,e.headers,t,n]);typeof b<"u"&&($6(b)?b.then(A=>{C(null,A)},A=>{C(A)}):C(null,b))}_envelope(e,t,n){let i=this.wsdl.options.envelopeKey,a=this.wsdl.options.forceSoap12Headers?"http://www.w3.org/2003/05/soap-envelope":"http://schemas.xmlsoap.org/soap/envelope/",u='<?xml version="1.0" encoding="utf-8"?><'+i+":Envelope xmlns:"+i+'="'+a+'" '+this.wsdl.xmlnsInEnvelope+">";if(t=t||"",n){let c=new Date,f=G6(c),h=G6(new Date(c.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>'+f+"</u:Created> <u:Expires>"+h+`</u:Expires> </u:Timestamp> </o:Security>
75
+ `}return t!==""&&(u+="<"+i+":Header>"+t+"</"+i+":Header>"),u+=e?"<"+i+":Body>"+e+"</"+i+":Body>":"<"+i+":Body/>",u+="</"+i+":Envelope>",u}_sendError(e,t,n){let s,i=this.wsdl.options.envelopeKey,a;return e.statusCode&&(a=e.statusCode,e.statusCode=void 0),"faultcode"in e?s=this.wsdl.objectToDocumentXML(i+":Fault",e,void 0):s=this.wsdl.objectToDocumentXML("Fault",e,i),t(this._envelope(s,"",n),a)}_sendHttpResponse(e,t,n){t&&(e.statusCode=t),this.enableChunkedEncoding?(e.write(n),e.end()):e.end(n)}};ki.Server=qoe});var X6=te(XS=>{"use strict";(function(r){r.parser=function(N,w){return new t(N,w)},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(N,w){if(!(this instanceof t))return new t(N,w);var X=this;s(X),X.q=X.c="",X.bufferCheckPosition=r.MAX_BUFFER_LENGTH,X.opt=w||{},X.opt.lowercase=X.opt.lowercase||X.opt.lowercasetags,X.looseCase=X.opt.lowercase?"toLowerCase":"toUpperCase",X.tags=[],X.closed=X.closedRoot=X.sawRoot=!1,X.tag=X.error=null,X.strict=!!N,X.noscript=!!(N||X.opt.noscript),X.state=I.BEGIN,X.strictEntities=X.opt.strictEntities,X.ENTITIES=X.strictEntities?Object.create(r.XML_ENTITIES):Object.create(r.ENTITIES),X.attribList=[],X.opt.xmlns&&(X.ns=Object.create(v)),X.opt.unquotedAttributeValues===void 0&&(X.opt.unquotedAttributeValues=!N),X.trackPosition=X.opt.position!==!1,X.trackPosition&&(X.position=X.line=X.column=0),K(X,"onready")}o(t,"SAXParser"),Object.create||(Object.create=function(N){function w(){}o(w,"F"),w.prototype=N;var X=new w;return X}),Object.keys||(Object.keys=function(N){var w=[];for(var X in N)N.hasOwnProperty(X)&&w.push(X);return w});function n(N){for(var w=Math.max(r.MAX_BUFFER_LENGTH,10),X=0,P=0,be=e.length;P<be;P++){var Ee=N[e[P]].length;if(Ee>w)switch(e[P]){case"textNode":z(N);break;case"cdata":F(N,"oncdata",N.cdata),N.cdata="";break;case"script":F(N,"onscript",N.script),N.script="";break;default:pe(N,"Max buffer length exceeded: "+e[P])}X=Math.max(X,Ee)}var Se=r.MAX_BUFFER_LENGTH-X;N.bufferCheckPosition=Se+N.position}o(n,"checkBufferLength");function s(N){for(var w=0,X=e.length;w<X;w++)N[e[w]]=""}o(s,"clearBuffers");function i(N){z(N),N.cdata!==""&&(F(N,"oncdata",N.cdata),N.cdata=""),N.script!==""&&(F(N,"onscript",N.script),N.script="")}o(i,"flushBuffers"),t.prototype={end:o(function(){oe(this)},"end"),write:ft,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=We("stream").Stream}catch{a=o(function(){},"Stream")}a||(a=o(function(){},"Stream"));var u=r.EVENTS.filter(function(N){return N!=="error"&&N!=="end"});function c(N,w){return new f(N,w)}o(c,"createStream");function f(N,w){if(!(this instanceof f))return new f(N,w);a.apply(this),this._parser=new t(N,w),this.writable=!0,this.readable=!0;var X=this;this._parser.onend=function(){X.emit("end")},this._parser.onerror=function(P){X.emit("error",P),X._parser.error=null},this._decoder=null,u.forEach(function(P){Object.defineProperty(X,"on"+P,{get:o(function(){return X._parser["on"+P]},"get"),set:o(function(be){if(!be)return X.removeAllListeners(P),X._parser["on"+P]=be,be;X.on(P,be)},"set"),enumerable:!0,configurable:!1})})}o(f,"SAXStream"),f.prototype=Object.create(a.prototype,{constructor:{value:f}}),f.prototype.write=function(N){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(N)){if(!this._decoder){var w=We("string_decoder").StringDecoder;this._decoder=new w("utf8")}N=this._decoder.write(N)}return this._parser.write(N.toString()),this.emit("data",N),!0},f.prototype.end=function(N){return N&&N.length&&this.write(N),this._parser.end(),!0},f.prototype.on=function(N,w){var X=this;return!X._parser["on"+N]&&u.indexOf(N)!==-1&&(X._parser["on"+N]=function(){var P=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);P.splice(0,0,N),X.emit.apply(X,P)}),a.prototype.on.call(X,N,w)};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},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]/,E=/[:_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-]/,C=/[#:_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]/,_=/[#:_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(N){return N===" "||N===`
76
+ `||N==="\r"||N===" "}o(b,"isWhitespace");function A(N){return N==='"'||N==="'"}o(A,"isQuote");function T(N){return N===">"||b(N)}o(T,"isAttribEnd");function R(N,w){return N.test(w)}o(R,"isMatch");function H(N,w){return!R(N,w)}o(H,"notMatch");var I=0;r.STATE={BEGIN:I++,BEGIN_WHITESPACE:I++,TEXT:I++,TEXT_ENTITY:I++,OPEN_WAKA:I++,SGML_DECL:I++,SGML_DECL_QUOTED:I++,DOCTYPE:I++,DOCTYPE_QUOTED:I++,DOCTYPE_DTD:I++,DOCTYPE_DTD_QUOTED:I++,COMMENT_STARTING:I++,COMMENT:I++,COMMENT_ENDING:I++,COMMENT_ENDED:I++,CDATA:I++,CDATA_ENDING:I++,CDATA_ENDING_2:I++,PROC_INST:I++,PROC_INST_BODY:I++,PROC_INST_ENDING:I++,OPEN_TAG:I++,OPEN_TAG_SLASH:I++,ATTRIB:I++,ATTRIB_NAME:I++,ATTRIB_NAME_SAW_WHITE:I++,ATTRIB_VALUE:I++,ATTRIB_VALUE_QUOTED:I++,ATTRIB_VALUE_CLOSED:I++,ATTRIB_VALUE_UNQUOTED:I++,ATTRIB_VALUE_ENTITY_Q:I++,ATTRIB_VALUE_ENTITY_U:I++,CLOSE_TAG:I++,CLOSE_TAG_SAW_WHITE:I++,SCRIPT:I++,SCRIPT_ENDING:I++},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(N){var w=r.ENTITIES[N],X=typeof w=="number"?String.fromCharCode(w):w;r.ENTITIES[N]=X});for(var $ in r.STATE)r.STATE[r.STATE[$]]=$;I=r.STATE;function K(N,w,X){N[w]&&N[w](X)}o(K,"emit");function F(N,w,X){N.textNode&&z(N),K(N,w,X)}o(F,"emitNode");function z(N){N.textNode=he(N.opt,N.textNode),N.textNode&&K(N,"ontext",N.textNode),N.textNode=""}o(z,"closeText");function he(N,w){return N.trim&&(w=w.trim()),N.normalize&&(w=w.replace(/\s+/g," ")),w}o(he,"textopts");function pe(N,w){return z(N),N.trackPosition&&(w+=`
77
+ Line: `+N.line+`
78
+ Column: `+N.column+`
79
+ Char: `+N.c),w=new Error(w),N.error=w,K(N,"onerror",w),N}o(pe,"error");function oe(N){return N.sawRoot&&!N.closedRoot&&Q(N,"Unclosed root tag"),N.state!==I.BEGIN&&N.state!==I.BEGIN_WHITESPACE&&N.state!==I.TEXT&&pe(N,"Unexpected end"),z(N),N.c="",N.closed=!0,K(N,"onend"),t.call(N,N.strict,N.opt),N}o(oe,"end");function Q(N,w){if(typeof N!="object"||!(N instanceof t))throw new Error("bad call to strictFail");N.strict&&pe(N,w)}o(Q,"strictFail");function xe(N){N.strict||(N.tagName=N.tagName[N.looseCase]());var w=N.tags[N.tags.length-1]||N,X=N.tag={name:N.tagName,attributes:{}};N.opt.xmlns&&(X.ns=w.ns),N.attribList.length=0,F(N,"onopentagstart",X)}o(xe,"newTag");function Me(N,w){var X=N.indexOf(":"),P=X<0?["",N]:N.split(":"),be=P[0],Ee=P[1];return w&&N==="xmlns"&&(be="xmlns",Ee=""),{prefix:be,local:Ee}}o(Me,"qname");function Qe(N){if(N.strict||(N.attribName=N.attribName[N.looseCase]()),N.attribList.indexOf(N.attribName)!==-1||N.tag.attributes.hasOwnProperty(N.attribName)){N.attribName=N.attribValue="";return}if(N.opt.xmlns){var w=Me(N.attribName,!0),X=w.prefix,P=w.local;if(X==="xmlns")if(P==="xml"&&N.attribValue!==g)Q(N,"xml: prefix must be bound to "+g+`
80
+ Actual: `+N.attribValue);else if(P==="xmlns"&&N.attribValue!==x)Q(N,"xmlns: prefix must be bound to "+x+`
81
+ Actual: `+N.attribValue);else{var be=N.tag,Ee=N.tags[N.tags.length-1]||N;be.ns===Ee.ns&&(be.ns=Object.create(Ee.ns)),be.ns[P]=N.attribValue}N.attribList.push([N.attribName,N.attribValue])}else N.tag.attributes[N.attribName]=N.attribValue,F(N,"onattribute",{name:N.attribName,value:N.attribValue});N.attribName=N.attribValue=""}o(Qe,"attrib");function de(N,w){if(N.opt.xmlns){var X=N.tag,P=Me(N.tagName);X.prefix=P.prefix,X.local=P.local,X.uri=X.ns[P.prefix]||"",X.prefix&&!X.uri&&(Q(N,"Unbound namespace prefix: "+JSON.stringify(N.tagName)),X.uri=P.prefix);var be=N.tags[N.tags.length-1]||N;X.ns&&be.ns!==X.ns&&Object.keys(X.ns).forEach(function(wn){F(N,"onopennamespace",{prefix:wn,uri:X.ns[wn]})});for(var Ee=0,Se=N.attribList.length;Ee<Se;Ee++){var ze=N.attribList[Ee],Ct=ze[0],Ue=ze[1],wt=Me(Ct,!0),Gr=wt.prefix,Je=wt.local,Nr=Gr===""?"":X.ns[Gr]||"",qr={name:Ct,value:Ue,prefix:Gr,local:Je,uri:Nr};Gr&&Gr!=="xmlns"&&!Nr&&(Q(N,"Unbound namespace prefix: "+JSON.stringify(Gr)),qr.uri=Gr),N.tag.attributes[Ct]=qr,F(N,"onattribute",qr)}N.attribList.length=0}N.tag.isSelfClosing=!!w,N.sawRoot=!0,N.tags.push(N.tag),F(N,"onopentag",N.tag),w||(!N.noscript&&N.tagName.toLowerCase()==="script"?N.state=I.SCRIPT:N.state=I.TEXT,N.tag=null,N.tagName=""),N.attribName=N.attribValue="",N.attribList.length=0}o(de,"openTag");function fe(N){if(!N.tagName){Q(N,"Weird empty close tag."),N.textNode+="</>",N.state=I.TEXT;return}if(N.script){if(N.tagName!=="script"){N.script+="</"+N.tagName+">",N.tagName="",N.state=I.SCRIPT;return}F(N,"onscript",N.script),N.script=""}var w=N.tags.length,X=N.tagName;N.strict||(X=X[N.looseCase]());for(var P=X;w--;){var be=N.tags[w];if(be.name!==P)Q(N,"Unexpected close tag");else break}if(w<0){Q(N,"Unmatched closing tag: "+N.tagName),N.textNode+="</"+N.tagName+">",N.state=I.TEXT;return}N.tagName=X;for(var Ee=N.tags.length;Ee-- >w;){var Se=N.tag=N.tags.pop();N.tagName=N.tag.name,F(N,"onclosetag",N.tagName);var ze={};for(var Ct in Se.ns)ze[Ct]=Se.ns[Ct];var Ue=N.tags[N.tags.length-1]||N;N.opt.xmlns&&Se.ns!==Ue.ns&&Object.keys(Se.ns).forEach(function(wt){var Gr=Se.ns[wt];F(N,"onclosenamespace",{prefix:wt,uri:Gr})})}w===0&&(N.closedRoot=!0),N.tagName=N.attribValue=N.attribName="",N.attribList.length=0,N.state=I.TEXT}o(fe,"closeTag");function Re(N){var w=N.entity,X=w.toLowerCase(),P,be="";return N.ENTITIES[w]?N.ENTITIES[w]:N.ENTITIES[X]?N.ENTITIES[X]:(w=X,w.charAt(0)==="#"&&(w.charAt(1)==="x"?(w=w.slice(2),P=parseInt(w,16),be=P.toString(16)):(w=w.slice(1),P=parseInt(w,10),be=P.toString(10))),w=w.replace(/^0+/,""),isNaN(P)||be.toLowerCase()!==w||P<0||P>1114111?(Q(N,"Invalid character entity"),"&"+N.entity+";"):String.fromCodePoint(P))}o(Re,"parseEntity");function $e(N,w){w==="<"?(N.state=I.OPEN_WAKA,N.startTagPosition=N.position):b(w)||(Q(N,"Non-whitespace before first tag."),N.textNode=w,N.state=I.TEXT)}o($e,"beginWhiteSpace");function Ge(N,w){var X="";return w<N.length&&(X=N.charAt(w)),X}o(Ge,"charAt");function ft(N){var w=this;if(this.error)throw this.error;if(w.closed)return pe(w,"Cannot write after close. Assign an onready handler.");if(N===null)return oe(w);typeof N=="object"&&(N=N.toString());for(var X=0,P="";P=Ge(N,X++),w.c=P,!!P;)switch(w.trackPosition&&(w.position++,P===`
82
+ `?(w.line++,w.column=0):w.column++),w.state){case I.BEGIN:if(w.state=I.BEGIN_WHITESPACE,P==="\uFEFF")continue;$e(w,P);continue;case I.BEGIN_WHITESPACE:$e(w,P);continue;case I.TEXT:if(w.sawRoot&&!w.closedRoot){for(var Ee=X-1;P&&P!=="<"&&P!=="&";)P=Ge(N,X++),P&&w.trackPosition&&(w.position++,P===`
83
+ `?(w.line++,w.column=0):w.column++);w.textNode+=N.substring(Ee,X-1)}P==="<"&&!(w.sawRoot&&w.closedRoot&&!w.strict)?(w.state=I.OPEN_WAKA,w.startTagPosition=w.position):(!b(P)&&(!w.sawRoot||w.closedRoot)&&Q(w,"Text data outside of root node."),P==="&"?w.state=I.TEXT_ENTITY:w.textNode+=P);continue;case I.SCRIPT:P==="<"?w.state=I.SCRIPT_ENDING:w.script+=P;continue;case I.SCRIPT_ENDING:P==="/"?w.state=I.CLOSE_TAG:(w.script+="<"+P,w.state=I.SCRIPT);continue;case I.OPEN_WAKA:if(P==="!")w.state=I.SGML_DECL,w.sgmlDecl="";else if(!b(P))if(R(S,P))w.state=I.OPEN_TAG,w.tagName=P;else if(P==="/")w.state=I.CLOSE_TAG,w.tagName="";else if(P==="?")w.state=I.PROC_INST,w.procInstName=w.procInstBody="";else{if(Q(w,"Unencoded <"),w.startTagPosition+1<w.position){var be=w.position-w.startTagPosition;P=new Array(be).join(" ")+P}w.textNode+="<"+P,w.state=I.TEXT}continue;case I.SGML_DECL:if(w.sgmlDecl+P==="--"){w.state=I.COMMENT,w.comment="",w.sgmlDecl="";continue}w.doctype&&w.doctype!==!0&&w.sgmlDecl?(w.state=I.DOCTYPE_DTD,w.doctype+="<!"+w.sgmlDecl+P,w.sgmlDecl=""):(w.sgmlDecl+P).toUpperCase()===h?(F(w,"onopencdata"),w.state=I.CDATA,w.sgmlDecl="",w.cdata=""):(w.sgmlDecl+P).toUpperCase()===m?(w.state=I.DOCTYPE,(w.doctype||w.sawRoot)&&Q(w,"Inappropriately located doctype declaration"),w.doctype="",w.sgmlDecl=""):P===">"?(F(w,"onsgmldeclaration",w.sgmlDecl),w.sgmlDecl="",w.state=I.TEXT):(A(P)&&(w.state=I.SGML_DECL_QUOTED),w.sgmlDecl+=P);continue;case I.SGML_DECL_QUOTED:P===w.q&&(w.state=I.SGML_DECL,w.q=""),w.sgmlDecl+=P;continue;case I.DOCTYPE:P===">"?(w.state=I.TEXT,F(w,"ondoctype",w.doctype),w.doctype=!0):(w.doctype+=P,P==="["?w.state=I.DOCTYPE_DTD:A(P)&&(w.state=I.DOCTYPE_QUOTED,w.q=P));continue;case I.DOCTYPE_QUOTED:w.doctype+=P,P===w.q&&(w.q="",w.state=I.DOCTYPE);continue;case I.DOCTYPE_DTD:P==="]"?(w.doctype+=P,w.state=I.DOCTYPE):P==="<"?(w.state=I.OPEN_WAKA,w.startTagPosition=w.position):A(P)?(w.doctype+=P,w.state=I.DOCTYPE_DTD_QUOTED,w.q=P):w.doctype+=P;continue;case I.DOCTYPE_DTD_QUOTED:w.doctype+=P,P===w.q&&(w.state=I.DOCTYPE_DTD,w.q="");continue;case I.COMMENT:P==="-"?w.state=I.COMMENT_ENDING:w.comment+=P;continue;case I.COMMENT_ENDING:P==="-"?(w.state=I.COMMENT_ENDED,w.comment=he(w.opt,w.comment),w.comment&&F(w,"oncomment",w.comment),w.comment=""):(w.comment+="-"+P,w.state=I.COMMENT);continue;case I.COMMENT_ENDED:P!==">"?(Q(w,"Malformed comment"),w.comment+="--"+P,w.state=I.COMMENT):w.doctype&&w.doctype!==!0?w.state=I.DOCTYPE_DTD:w.state=I.TEXT;continue;case I.CDATA:for(var Ee=X-1;P&&P!=="]";)P=Ge(N,X++),P&&w.trackPosition&&(w.position++,P===`
84
+ `?(w.line++,w.column=0):w.column++);w.cdata+=N.substring(Ee,X-1),P==="]"&&(w.state=I.CDATA_ENDING);continue;case I.CDATA_ENDING:P==="]"?w.state=I.CDATA_ENDING_2:(w.cdata+="]"+P,w.state=I.CDATA);continue;case I.CDATA_ENDING_2:P===">"?(w.cdata&&F(w,"oncdata",w.cdata),F(w,"onclosecdata"),w.cdata="",w.state=I.TEXT):P==="]"?w.cdata+="]":(w.cdata+="]]"+P,w.state=I.CDATA);continue;case I.PROC_INST:P==="?"?w.state=I.PROC_INST_ENDING:b(P)?w.state=I.PROC_INST_BODY:w.procInstName+=P;continue;case I.PROC_INST_BODY:if(!w.procInstBody&&b(P))continue;P==="?"?w.state=I.PROC_INST_ENDING:w.procInstBody+=P;continue;case I.PROC_INST_ENDING:P===">"?(F(w,"onprocessinginstruction",{name:w.procInstName,body:w.procInstBody}),w.procInstName=w.procInstBody="",w.state=I.TEXT):(w.procInstBody+="?"+P,w.state=I.PROC_INST_BODY);continue;case I.OPEN_TAG:R(E,P)?w.tagName+=P:(xe(w),P===">"?de(w):P==="/"?w.state=I.OPEN_TAG_SLASH:(b(P)||Q(w,"Invalid character in tag name"),w.state=I.ATTRIB));continue;case I.OPEN_TAG_SLASH:P===">"?(de(w,!0),fe(w)):(Q(w,"Forward-slash in opening tag not followed by >"),w.state=I.ATTRIB);continue;case I.ATTRIB:if(b(P))continue;P===">"?de(w):P==="/"?w.state=I.OPEN_TAG_SLASH:R(S,P)?(w.attribName=P,w.attribValue="",w.state=I.ATTRIB_NAME):Q(w,"Invalid attribute name");continue;case I.ATTRIB_NAME:P==="="?w.state=I.ATTRIB_VALUE:P===">"?(Q(w,"Attribute without value"),w.attribValue=w.attribName,Qe(w),de(w)):b(P)?w.state=I.ATTRIB_NAME_SAW_WHITE:R(E,P)?w.attribName+=P:Q(w,"Invalid attribute name");continue;case I.ATTRIB_NAME_SAW_WHITE:if(P==="=")w.state=I.ATTRIB_VALUE;else{if(b(P))continue;Q(w,"Attribute without value"),w.tag.attributes[w.attribName]="",w.attribValue="",F(w,"onattribute",{name:w.attribName,value:""}),w.attribName="",P===">"?de(w):R(S,P)?(w.attribName=P,w.state=I.ATTRIB_NAME):(Q(w,"Invalid attribute name"),w.state=I.ATTRIB)}continue;case I.ATTRIB_VALUE:if(b(P))continue;A(P)?(w.q=P,w.state=I.ATTRIB_VALUE_QUOTED):(w.opt.unquotedAttributeValues||pe(w,"Unquoted attribute value"),w.state=I.ATTRIB_VALUE_UNQUOTED,w.attribValue=P);continue;case I.ATTRIB_VALUE_QUOTED:if(P!==w.q){P==="&"?w.state=I.ATTRIB_VALUE_ENTITY_Q:w.attribValue+=P;continue}Qe(w),w.q="",w.state=I.ATTRIB_VALUE_CLOSED;continue;case I.ATTRIB_VALUE_CLOSED:b(P)?w.state=I.ATTRIB:P===">"?de(w):P==="/"?w.state=I.OPEN_TAG_SLASH:R(S,P)?(Q(w,"No whitespace between attributes"),w.attribName=P,w.attribValue="",w.state=I.ATTRIB_NAME):Q(w,"Invalid attribute name");continue;case I.ATTRIB_VALUE_UNQUOTED:if(!T(P)){P==="&"?w.state=I.ATTRIB_VALUE_ENTITY_U:w.attribValue+=P;continue}Qe(w),P===">"?de(w):w.state=I.ATTRIB;continue;case I.CLOSE_TAG:if(w.tagName)P===">"?fe(w):R(E,P)?w.tagName+=P:w.script?(w.script+="</"+w.tagName,w.tagName="",w.state=I.SCRIPT):(b(P)||Q(w,"Invalid tagname in closing tag"),w.state=I.CLOSE_TAG_SAW_WHITE);else{if(b(P))continue;H(S,P)?w.script?(w.script+="</"+P,w.state=I.SCRIPT):Q(w,"Invalid tagname in closing tag."):w.tagName=P}continue;case I.CLOSE_TAG_SAW_WHITE:if(b(P))continue;P===">"?fe(w):Q(w,"Invalid characters in closing tag");continue;case I.TEXT_ENTITY:case I.ATTRIB_VALUE_ENTITY_Q:case I.ATTRIB_VALUE_ENTITY_U:var Se,ze;switch(w.state){case I.TEXT_ENTITY:Se=I.TEXT,ze="textNode";break;case I.ATTRIB_VALUE_ENTITY_Q:Se=I.ATTRIB_VALUE_QUOTED,ze="attribValue";break;case I.ATTRIB_VALUE_ENTITY_U:Se=I.ATTRIB_VALUE_UNQUOTED,ze="attribValue";break}if(P===";"){var Ct=Re(w);w.opt.unparsedEntities&&!Object.values(r.XML_ENTITIES).includes(Ct)?(w.entity="",w.state=Se,w.write(Ct)):(w[ze]+=Ct,w.entity="",w.state=Se)}else R(w.entity.length?_:C,P)?w.entity+=P:(Q(w,"Invalid character in entity name"),w[ze]+="&"+w.entity+P,w.entity="",w.state=Se);continue;default:throw new Error(w,"Unknown state: "+w.state)}return w.position>=w.bufferCheckPosition&&n(w),w}o(ft,"write");String.fromCodePoint||(function(){var N=String.fromCharCode,w=Math.floor,X=o(function(){var P=16384,be=[],Ee,Se,ze=-1,Ct=arguments.length;if(!Ct)return"";for(var Ue="";++ze<Ct;){var wt=Number(arguments[ze]);if(!isFinite(wt)||wt<0||wt>1114111||w(wt)!==wt)throw RangeError("Invalid code point: "+wt);wt<=65535?be.push(wt):(wt-=65536,Ee=(wt>>10)+55296,Se=wt%1024+56320,be.push(Ee,Se)),(ze+1===Ct||be.length>P)&&(Ue+=N.apply(null,be),be.length=0)}return Ue},"fromCodePoint");Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:X,configurable:!0,writable:!0}):String.fromCodePoint=X})()})(typeof XS>"u"?XS.sax={}:XS)});var z6=te((T1e,W6)=>{"use strict";W6.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 J6=te(WS=>{"use strict";Object.defineProperty(WS,"__esModule",{value:!0});WS.NamespaceContext=void 0;var Hoe=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 Hoe(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}};WS.NamespaceContext=Koe});var oU=te(ut=>{"use strict";var $oe=ut&&ut.__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]}),Goe=ut&&ut.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Xoe=ut&&ut.__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"&&$oe(t,e,n[s]);return Goe(t,e),t}})(),Woe=ut&&ut.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ut,"__esModule",{value:!0});ut.ImportElement=ut.IncludeElement=ut.BodyElement=ut.DefinitionsElement=ut.ServiceElement=ut.PortElement=ut.BindingElement=ut.PortTypeElement=ut.OperationElement=ut.TypesElement=ut.SchemaElement=ut.DocumentationElement=ut.MessageElement=ut.AllElement=ut.AttributeElement=ut.SequenceElement=ut.SimpleContentElement=ut.ComplexContentElement=ut.ComplexTypeElement=ut.EnumerationElement=ut.ChoiceElement=ut.ExtensionElement=ut.RestrictionElement=ut.SimpleTypeElement=ut.OutputElement=ut.InputElement=ut.AnyElement=ut.ElementElement=ut.UnexpectedElement=ut.Element=void 0;var qI=We("assert"),zoe=Woe(Ep()),ia=Xoe(Do()),as=Zu(),Joe=(0,zoe.default)("node-soap"),zS={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,as.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]:as.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[as.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,as.splitQName)(t).name];if(a==null&&!this.strict&&(a=Y6),a){let u=new a(t,n,s,i);u.init();let c=e[0];c instanceof QI&&(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]&&(ia.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)}};ut.Element=gr;var Y6=class Q6 extends gr{static{o(this,"UnexpectedElement")}startElement(e,t,n,s,i){let a=new Q6(t,n,s,i);a.init(),e.push(a)}};ut.UnexpectedElement=Y6;var HI=class extends gr{static{o(this,"ElementElement")}constructor(){super(...arguments),this.allowedChildren=ln(["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[as.TNS_PREFIX]&&(this.$targetNamespace=t[as.TNS_PREFIX]);let c=this.$type||this.$ref;if(c){c=(0,as.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 zS))if(f in v)if(this.$ref)if(u){let S=f+"[]";v[S]=v[f],n[S]=v[S]}else n=v[f];else n[s]=v[f];else{let S={};v[f]=S,u&&"maxOccurs"in x&&(x.maxOccurs=this.$maxOccurs),this.$minOccurs&&"minOccurs"in x&&(x.minOccurs=this.$minOccurs);let E=x.description(e,t);if(typeof E=="string")S=E;else{Object.keys(E).forEach(_=>{S[_]=E[_]});let C=E[aa.Symbol];C&&(S[aa.Symbol]=C)}this.$ref?n=S:n[s]=S,typeof S=="object"&&(S.targetNSAlias=c.prefix,S.targetNamespace=m),v[f]=S}else n[s]=this.$type}else{let f=this.children;n[s]={};for(let h of f)(h instanceof eE||h instanceof YS)&&(n[s]=h.description(e,t))}return n}};ut.ElementElement=HI;var JS=class extends gr{static{o(this,"AnyElement")}};ut.AnyElement=JS;var Z6=class extends gr{static{o(this,"InputElement")}constructor(){super(...arguments),this.allowedChildren=ln(["body","documentation","header","SecuritySpecRef"])}addChild(e){e instanceof tE&&(this.use=e.$use,this.use==="encoded"&&(this.encodingStyle=e.$encodingStyle),this.children.pop())}};ut.InputElement=Z6;var eU=class extends gr{static{o(this,"OutputElement")}constructor(){super(...arguments),this.allowedChildren=ln(["body","documentation","header","SecuritySpecRef"])}addChild(e){e instanceof tE&&(this.use=e.$use,this.use==="encoded"&&(this.encodingStyle=e.$encodingStyle),this.children.pop())}};ut.OutputElement=eU;var YS=class extends gr{static{o(this,"SimpleTypeElement")}constructor(){super(...arguments),this.allowedChildren=ln(["restriction"])}description(e){for(let t of this.children)if(t instanceof QS)return[this.$name,t.description()].filter(Boolean).join("|");return{}}};ut.SimpleTypeElement=YS;var QS=class extends gr{static{o(this,"RestrictionElement")}constructor(){super(...arguments),this.allowedChildren=ln(["all","choice","enumeration","sequence","attribute"])}description(e,t){let n=this.children,s,i=!1,a={};for(let c of n){if(c instanceof aa){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[aa.Symbol]=a),s&&this.$base){let c=(0,as.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[aa.Symbol]&&ia.defaults(a,x[aa.Symbol]),s=ia.defaults(s,x)}return s}let u=this.children.map(c=>c.description()).join(",");return[this.$base,u].filter(Boolean).join("|")}};ut.RestrictionElement=QS;var ZS=class extends gr{static{o(this,"ExtensionElement")}constructor(){super(...arguments),this.allowedChildren=ln(["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,as.splitQName)(this.$base),i=s.name,a=oc(s.prefix,t,this.definitionsXmlns,e.xmlns),u=e.schemas[a];if(i in zS)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:ia.defaults(f,n)}}}return n}};ut.ExtensionElement=ZS;var Fg=class extends gr{static{o(this,"ChoiceElement")}constructor(){super(...arguments),this.allowedChildren=ln(["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}};ut.ChoiceElement=Fg;var tU=class extends gr{static{o(this,"EnumerationElement")}description(){return this[this.valueKey]}};ut.EnumerationElement=tU;var eE=class extends gr{static{o(this,"ComplexTypeElement")}constructor(){super(...arguments),this.allowedChildren=ln(["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 aa){i[u.$name]=u.description(e);continue}!s&&(u instanceof Fg||u instanceof qg||u instanceof GI||u instanceof $I||u instanceof KI)&&(s=!0,n=u.description(e,t))}return Object.keys(i).length>0&&(n[aa.Symbol]=i),n}};ut.ComplexTypeElement=eE;var KI=class extends gr{static{o(this,"ComplexContentElement")}constructor(){super(...arguments),this.allowedChildren=ln(["extension","restriction"])}description(e,t){for(let n of this.children)if(n instanceof ZS||n instanceof QS)return n.description(e,t);return{}}};ut.ComplexContentElement=KI;var $I=class extends gr{static{o(this,"SimpleContentElement")}constructor(){super(...arguments),this.allowedChildren=ln(["extension"])}description(e,t){for(let n of this.children)if(n instanceof ZS)return n.description(e,t);return{}}};ut.SimpleContentElement=$I;var qg=class extends gr{static{o(this,"SequenceElement")}constructor(){super(...arguments),this.allowedChildren=ln(["any","choice","element","sequence"])}description(e,t){let n={};for(let s of this.children){if(s instanceof JS)continue;let i=s.description(e,t);for(let a in i)n[a]=i[a]}return n}};ut.SequenceElement=qg;var aa=class extends gr{static{o(this,"AttributeElement")}description(e){return{type:this.$type,required:this.$use==="required"}}};ut.AttributeElement=aa;aa.Symbol=Symbol("$attributes");var GI=class extends gr{static{o(this,"AllElement")}constructor(){super(...arguments),this.allowedChildren=ln(["choice","element"])}description(e,t){let n={};for(let s of this.children){if(s instanceof JS)continue;let i=s.description(e,t);for(let a in i)n[a]=i[a]}return n}};ut.AllElement=GI;var XI=class extends gr{static{o(this,"MessageElement")}constructor(){super(...arguments),this.allowedChildren=ln(["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,as.splitQName)(t.$element),a=oc(i.prefix,this.definitionsXmlns,e.xmlns),u=e.schemas[a];if(this.element=u.elements[i.name],!this.element){Joe(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,as.splitQName)(this.element.$type),h=oc(f.prefix,u.xmlns,this.definitionsXmlns,e.xmlns);if(h&&!(f.name in zS)){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,qI.ok)(i.name==="part","Expected part element");let a=(0,as.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,as.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}};ut.MessageElement=XI;var rU=class extends gr{static{o(this,"DocumentationElement")}};ut.DocumentationElement=rU;var Mg=class nU extends gr{static{o(this,"SchemaElement")}constructor(){super(...arguments),this.allowedChildren=ln(["complexType","element","import","include","simpleType"]),this.complexTypes={},this.types={},this.elements={},this.includes=[]}merge(e){return(0,qI.ok)(e instanceof nU),ia.merge(this.complexTypes,e.complexTypes),ia.merge(this.types,e.types),ia.merge(this.elements,e.elements),ia.merge(this.xmlns,e.xmlns),ia.merge(this,ia.pickBy(e,(t,n)=>n.startsWith("$")&&!Object.hasOwnProperty.call(this,n))),this}addChild(e){if(!(e.$name in zS)){if(e instanceof ZI||e instanceof e_){let t=e.$schemaLocation||e.$location;t&&this.includes.push({namespace:e.$namespace||e.$targetNamespace||this.$targetNamespace,location:t})}else e instanceof eE?this.complexTypes[e.$name]=e:e instanceof HI?this.elements[e.$name]=e:e instanceof YS&&(this.types[e.$name]=e);this.children.pop()}}};ut.SchemaElement=Mg;var WI=class extends gr{static{o(this,"TypesElement")}constructor(){super(...arguments),this.allowedChildren=ln(["documentation","schema"]),this.schemas={}}addChild(e){(0,qI.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}};ut.TypesElement=WI;var sU=class iU extends gr{static{o(this,"OperationElement")}constructor(){super(...arguments),this.allowedChildren=ln(["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 iU&&(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,as.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]]}}};ut.OperationElement=sU;var zI=class extends gr{static{o(this,"PortTypeElement")}constructor(){super(...arguments),this.allowedChildren=ln(["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}};ut.PortTypeElement=zI;var JI=class extends gr{static{o(this,"BindingElement")}constructor(){super(...arguments),this.allowedChildren=ln(["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,as.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}};ut.BindingElement=JI;var aU=class extends gr{static{o(this,"PortElement")}constructor(){super(...arguments),this.allowedChildren=ln(["address","documentation"]),this.location=null}addChild(e){e.name==="address"&&typeof e.$location<"u"&&(this.location=e.$location)}};ut.PortElement=aU;var YI=class extends gr{static{o(this,"ServiceElement")}constructor(){super(...arguments),this.allowedChildren=ln(["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,as.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}};ut.ServiceElement=YI;var QI=class extends gr{static{o(this,"DefinitionsElement")}constructor(){super(...arguments),this.allowedChildren=ln(["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 WI)ia.merge(this.schemas,e.schemas);else if(e instanceof XI)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 zI?this.portTypes[e.$name]=e:e instanceof JI?(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 YI&&(this.services[e.$name]=e);this.children.pop()}};ut.DefinitionsElement=QI;var tE=class extends gr{static{o(this,"BodyElement")}};ut.BodyElement=tE;var ZI=class extends gr{static{o(this,"IncludeElement")}};ut.IncludeElement=ZI;var e_=class extends gr{static{o(this,"ImportElement")}};ut.ImportElement=e_;var Yoe={all:GI,any:JS,binding:JI,body:tE,choice:Fg,complexContent:KI,complexType:eE,definitions:QI,documentation:rU,element:HI,enumeration:tU,extension:ZS,fault:gr,import:e_,include:ZI,input:Z6,message:XI,operation:sU,output:eU,port:aU,portType:zI,restriction:QS,schema:Mg,sequence:qg,service:YI,simpleContent:$I,simpleType:YS,types:WI,attribute:aa};function ln(r){let e={};for(let t of r)e[t.replace(/^_/,"")]=Yoe[t]||gr;return e}o(ln,"buildAllowedChildren");function oc(r,...e){for(let t of e)if(t?.[r])return t[r]}o(oc,"findNs")});var n_=te(Ms=>{"use strict";var Qoe=Ms&&Ms.__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]}),Zoe=Ms&&Ms.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),zp=Ms&&Ms.__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"&&Qoe(t,e,n[s]);return Zoe(t,e),t}})(),fU=Ms&&Ms.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ms,"__esModule",{value:!0});Ms.WSDL=void 0;Ms.trim=r_;Ms.open_wsdl=hU;var eue=We("assert"),tue=fU(Ep()),rue=zp(We("fs")),uU=zp(Do()),Hg=zp(We("path")),rE=zp(X6()),nue=fU(z6()),sue=zp(We("url")),iue=bS(),aue=J6(),Dr=Zu(),Wl=zp(oU()),cU=(0,tue.default)("node-soap"),lU="http://www.w3.org/2001/XMLSchema-instance",oue="http://schemas.xmlsoap.org/soap/envelope/";function r_(r){return r.trim()}o(r_,"trim");function nE(r){return r&&r.charAt(r.length-1)!==":"?r+":":r}o(nE,"appendColon");function t_(r){return r&&r.charAt(r.length-1)===":"?r.substring(0,r.length-1):r}o(t_,"noColonNameSpace");var sE=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,nue.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 S=g[v].input.$name,E="";g[v].output&&(E=g[v].output.$name),x[S]={methodName:v,outputName:E}}}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=rE.createStream(!0,null);return e.pipe(t),t}xmlToObject(e,t){let n=typeof t=="function"?{}:rE.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,S=x.attributes,E=(0,Dr.splitQName)(v).name,C,_=u[u.length-1],b=_.schema,A={},T=!1,R=!1,H={},I=E;if(S.href){let F=S.href.substr(1);m[F]||(m[F]={hrefs:[],obj:null}),m[F].hrefs.push({par:_.object,key:E,obj:H})}S.id&&(m[S.id]||(m[S.id]={hrefs:[],obj:null}));for(C in S){let F=S[C];if(/^xmlns:|^xmlns$/.test(C)){let z=(0,Dr.splitQName)(C).name;h[z]=F,F===lU&&c.set(z,F),F===oue&&(f=z);continue}T=!0,A[C]=F}for(C in A){let F=(0,Dr.splitQName)(C);if(F.name==="nil"&&h[F.prefix]===lU&&A[C]&&(A[C].toLowerCase()==="true"||A[C]==="1")){R=!0;break}}if(T&&(H[this.options.attributesKey]=A),!s&&h[f]&&_.name==="Body"&&E!=="Fault"){let F=this.definitions.messages[E];if(!F)try{let z=!1;/Response$/.test(E)?E=E.replace(/Response$/,""):/Request$/.test(E)?(z=!0,E=E.replace(/Request$/,"")):/Solicit$/.test(E)&&(z=!0,E=E.replace(/Solicit$/,""));let he=this.definitions.portTypes,pe=Object.keys(he);for(let oe of pe){let Q=he[oe];if(Q.methods[E])try{z?E=Q.methods[E].input.$name:E=Q.methods[E].output.$name,F=this.definitions.messages[E];break}catch{throw new Error(`Failed to lookup message ${E} in methods`)}}if(!F)throw new Error(`Could not find message ${E}`);this.definitions.messages[I]=F}catch(z){this.options.returnFault&&n.onerror(z)}b=F.description(this.definitions),s=I}let $,K;for(let F of c.keys())if(`${F}:type`in A){K=A[`${F}:type`];break}if(K){let F=(0,Dr.splitQName)(K),z;F.prefix===Dr.TNS_PREFIX?z=h[F.prefix]||h.xmlns:z=h[F.prefix];let he=this.findSchemaObject(z,F.name);he&&($=he.description(this.definitions))}b&&b[E+"[]"]&&(E=E+"[]"),u.push({name:I,object:H,schema:$||b&&b[E],id:S.id,nil:R})},n.onclosetag=x=>{let v=u.pop(),S=v.object,E=u[u.length-1],C=E.object,_=E.schema,b=(0,Dr.splitQName)(x).name;if(typeof v.schema=="string"&&(v.schema==="string"||v.schema.split(":")[1]==="string")&&typeof S=="object"&&Object.keys(S).length===0&&(S=v.object=this.options.preserveWhitespace&&v.text||""),v.nil===!0)if(this.options.handleNilAsNull)S=null;else return;uU.isPlainObject(S)&&!Object.keys(S).length&&(S=null),_&&_[b+"[]"]?(C[b]||(C[b]=[]),C[b].push(S)):b in C?(Array.isArray(C[b])||(C[b]=[C[b]]),C[b].push(S)):C[b]=S,v.id&&(m[v.id].obj=S)},n.oncdata=x=>{let v=x;if(x=r_(x),!!x.length)if(/<\?xml[\s\S]+\?>/.test(x)){let S=u[u.length-1],E=this.xmlToObject(x);S.object[this.options.attributesKey]?S.object[this.options.valueKey]=E:S.object=E}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],S=x;if(x=r_(x),!x.length){this.options.preserveWhitespace&&(v.text=(v.text||"")+S);return}let E=(0,Dr.splitQName)(v.schema).name,C;this.options&&this.options.customDeserializer&&this.options.customDeserializer[E]?C=this.options.customDeserializer[E](x,v):E==="int"||E==="integer"||E==="short"||E==="long"?C=parseInt(x,10):E==="double"||E==="float"||E==="decimal"?C=Number(x):E==="bool"||E==="boolean"?C=x.toLowerCase()==="true"||x==="1":E==="dateTime"||E==="date"?C=new Date(x):(this.options.preserveWhitespace&&(x=S),typeof v.object!="string"?C=x:C=v.object+x),v.object[this.options.attributesKey]?v.object[this.options.valueKey]=C:v.object=C},typeof t=="function"){let x=rE.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(S){return t(S)}t(null,v)});return}return n.write(e).close(),g();function g(){for(let x in m){let v=m[x];for(let S of v.hrefs)Object.assign(S.obj,v.obj)}if(i.Envelope){let x=i.Envelope.Body;if(x&&x.Fault){let v=x.Fault,S=v.faultcode&&v.faultcode.$value,E=v.faultstring&&v.faultstring.$value,C=v.detail&&v.detail.$value;S=S||v.faultcode,E=E||v.faultstring,C=C||v.detail,S=S||v.Code&&`${v.Code.Value}: ${v.Code.Subcode&&v.Code.Subcode.Value}`,E=E||v.Reason&&v.Reason.Text.$value,E=E||v.Reason&&v.Reason.Text,C=C||v.Detail;let _=new Error(S+": "+E+(C?": "+JSON.stringify(C):""));throw _.root=i,_}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,Dr.findPrefix)(u.xmlns,s),s=s||u.xmlns[n],n=n===Dr.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,Dr.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=t_(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 A=this.options.overrideElementKey[b];e&&e[b]&&(Object.defineProperty(e,A,Object.getOwnPropertyDescriptor(e,b)),delete e[b])}let h=n?n.parent:void 0;typeof h<"u"&&(n=n.current),h=t_(h),this.isIgnoredNameSpace(h)&&(h="");let m=!f,g=f&&f.$elementFormDefault==="qualified",x=[],v=(n||g)&&n!==Dr.TNS_PREFIX,S="";s&&i&&(this.options.overrideRootElement&&this.options.overrideRootElement.xmlnsAttributes?this.options.overrideRootElement.xmlnsAttributes.forEach(b=>{S+=" "+b.name+'="'+b.value+'"'}):(v&&!this.isIgnoredNameSpace(n)&&(S+=" xmlns:"+n+'="'+s+'"'),(g||m)&&(S+=' xmlns="'+s+'"'))),c?c.pushContext():(c=new aue.NamespaceContext,c.declareNamespace(n,s)),a&&!(this.options.overrideRootElement&&this.options.overrideRootElement.xmlnsAttributes)&&(S=a);let E="";this.options.overrideRootElement&&i?E=this.options.overrideRootElement.namespace:v&&(g||i||m)&&!this.isIgnoredNameSpace(n)&&(E=n);let C,_;if(Array.isArray(e)){let b="",A=!1,T=/^([^:]+):([^:]+)$/.exec(t);for(T?(b=T[1],t=T[2]):t[0]===":"&&(A=!0,t=t.substr(1)),C=0,_=e.length;C<_;C++){let R=e[C],H=this.processAttributes(R,c),I=b||h||E,$=this.objectToXML(R,t,n,s,!1,null,u,c),K=["<",t,H,S];A||(K=["<",nE(I),t,H,S]),$===""&&this.options.useEmptyTag?(K.push(" />"),x.push(K.join(""))):(K.push(">"),(this.options.namespaceArrayElements||C===0)&&x.push(K.join("")),x.push($),(this.options.namespaceArrayElements||C===_-1)&&(A?x.push(["</",t,">"].join("")):x.push(["</",nE(I),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,Dr.xmlEscape)(e[t]);let A=e[t];if(typeof A>"u")continue;let T=this.processAttributes(A,c),R="",H="",I=!1,$=/^([^:]+):([^:]+)$/.exec(t);if($?(H=$[1]+":",t=$[2]):t[0]===":"&&(I=!0,t=t.substr(1)),i)R=this.objectToXML(A,t,n,s,!1,null,u,c);else if(this.definitions.schemas)if(f){let F=this.findChildSchemaObject(u,t);if(F&&(F.$type&&F.$type.indexOf("xsd:")===-1||F.$ref||F.$name)){let z="",he="",pe,oe="",Q=F.$ref||F.$name;if(Q){Q=(0,Dr.splitQName)(Q),he=Q.name,Q.prefix===Dr.TNS_PREFIX?(pe=F.$targetNamespace,z=c.registerNamespace(pe),this.isIgnoredNameSpace(z)&&(z=n)):(z=Q.prefix,this.isIgnoredNameSpace(z)&&(z=n),pe=f.xmlns[z]||this.definitions.xmlns[z]);let Me=!1;F.$name&&F.targetNamespace===void 0&&(F.$form==="unqualified"?Me=!0:F.$form==="qualified"?Me=!1:Me=f.$elementFormDefault!=="qualified"),Me&&(z=""),pe&&z&&c.declareNamespace(z,pe)&&(oe=" xmlns:"+z+'="'+pe+'"',S.includes(z)||(b=oe,S+=oe))}let xe;if(F.$type){let Me=(0,Dr.splitQName)(F.$type),Qe=F.$baseNameSpace||Me.prefix,de=f.xmlns[Qe]||this.definitions.xmlns[Qe];pe=de,de!=="http://www.w3.org/2001/XMLSchema"&&Qe!==Dr.TNS_PREFIX&&c.addNamespace(Qe,de),xe=this.findSchemaType(Me.name,de)||F}else xe=this.findSchemaObject(pe,he)||F;F.$baseNameSpace&&this.options.ignoreBaseNameSpaces&&(z=n,pe=s),this.options.ignoreBaseNameSpaces&&(z="",pe=""),E=z,Array.isArray(A)?(z={current:z,parent:E},oe=oe&&oe.length?oe:b):oe=null,R=this.objectToXML(A,t,z,pe,!1,oe,xe,c)}else e[this.options.attributesKey]&&e[this.options.attributesKey].xsi_type?(H=e[this.options.attributesKey].xsi_type.prefix,c.addNamespace(e[this.options.attributesKey].xsi_type.prefix,e[this.options.attributesKey].xsi_type.xmlns),R=this.objectToXML(A,t,e[this.options.attributesKey].xsi_type.prefix,e[this.options.attributesKey].xsi_type.xmlns,!1,null,null,c)):(Array.isArray(A)&&(I?t=":"+t:t=H+t),R=this.objectToXML(A,t,n,s,!1,null,null,c))}else R=this.objectToXML(A,t,n,s,!1,null,null,c);E=t_(E),v&&!g&&i&&!this.options.overrideRootElement?E=n:this.isIgnoredNameSpace(E)&&(E="");let K=!R&&this.options.useEmptyTag;Array.isArray(A)||x.push(["<",I?"":nE(H||E),t,T,S,A===null?' xsi:nil="true"':"",K?" />":">"].join("")),K||(x.push(R),Array.isArray(A)||x.push(["</",I?"":nE(H||E),t,">"].join("")))}}else e!==void 0&&x.push(this.options.escapeXML?(0,Dr.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,Dr.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,Dr.splitQName)(u.$ref),a.name===t))return u;let c;if(u.$type&&n.length===1){let f=(0,Dr.splitQName)(u.$type);f.prefix===Dr.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,Dr.splitQName)(u.$base);c=e.$targetNamespace,f.prefix!==Dr.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,Dr.splitQName)(f.$base),m=h.prefix===Dr.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=sue.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)}uue(s,i,(a,u)=>{if(a)return t(a);if(this._includesWsdl.push(u),u.definitions instanceof Wl.DefinitionsElement)uU.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=rE.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,Dr.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,eue.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===Dr.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}};Ms.WSDL=sE;function uue(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):hU(r,n,s)}o(uue,"open_wsdl_recursive");function hU(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 sE(r,r,n),i[r]=c,c.WSDL_CACHE=i,c.onReady(s)):/^https?:/i.test(r)?(cU("Reading url: %s",r),(n.httpClient||new iue.HttpClient(n)).request(r,null,(h,m,g)=>{h?s(h):m&&m.status===200?(c=new sE(g,r,n),i[r]=c,c.WSDL_CACHE=i,c.onReady(s)):s(new Error("Invalid WSDL URL: "+r+`
85
+
86
+ \r Code: `+m.status+`
87
+
88
+ \r Response Body: `+m.data))},a,u)):(cU("Reading file: %s",r),rue.readFile(r,"utf8",(f,h)=>{f?s(f):(c=new sE(h,r,n),i[r]=c,c.WSDL_CACHE=i,c.onReady(s))})),c}o(hU,"open_wsdl")});var dU=te(pU=>{"use strict";Object.defineProperty(pU,"__esModule",{value:!0})});var yU=te(Lt=>{"use strict";var mU=Lt&&Lt.__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]}),cue=Lt&&Lt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),lue=Lt&&Lt.__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"&&mU(t,e,n[s]);return cue(t,e),t}})(),fue=Lt&&Lt.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&mU(e,r,t)};Object.defineProperty(Lt,"__esModule",{value:!0});Lt.WSDL=Lt.passwordDigest=Lt.Server=Lt.WSSecurityCertWithToken=Lt.WSSecurityPlusCert=Lt.WSSecurityCert=Lt.WSSecurity=Lt.NTLMSecurity=Lt.ClientSSLSecurityPFX=Lt.ClientSSLSecurity=Lt.BearerSecurity=Lt.BasicAuthSecurity=Lt.HttpClient=Lt.Client=Lt.security=void 0;Lt.createClient=vU;Lt.createClientAsync=bue;Lt.listen=Aue;var hue=iI(),pue=lue(MI()),due=FI(),mue=Zu(),gU=n_();Lt.security=pue;var gue=iI();Object.defineProperty(Lt,"Client",{enumerable:!0,get:o(function(){return gue.Client},"get")});var vue=bS();Object.defineProperty(Lt,"HttpClient",{enumerable:!0,get:o(function(){return vue.HttpClient},"get")});var Lo=MI();Object.defineProperty(Lt,"BasicAuthSecurity",{enumerable:!0,get:o(function(){return Lo.BasicAuthSecurity},"get")});Object.defineProperty(Lt,"BearerSecurity",{enumerable:!0,get:o(function(){return Lo.BearerSecurity},"get")});Object.defineProperty(Lt,"ClientSSLSecurity",{enumerable:!0,get:o(function(){return Lo.ClientSSLSecurity},"get")});Object.defineProperty(Lt,"ClientSSLSecurityPFX",{enumerable:!0,get:o(function(){return Lo.ClientSSLSecurityPFX},"get")});Object.defineProperty(Lt,"NTLMSecurity",{enumerable:!0,get:o(function(){return Lo.NTLMSecurity},"get")});Object.defineProperty(Lt,"WSSecurity",{enumerable:!0,get:o(function(){return Lo.WSSecurity},"get")});Object.defineProperty(Lt,"WSSecurityCert",{enumerable:!0,get:o(function(){return Lo.WSSecurityCert},"get")});Object.defineProperty(Lt,"WSSecurityPlusCert",{enumerable:!0,get:o(function(){return Lo.WSSecurityPlusCert},"get")});Object.defineProperty(Lt,"WSSecurityCertWithToken",{enumerable:!0,get:o(function(){return Lo.WSSecurityCertWithToken},"get")});var yue=FI();Object.defineProperty(Lt,"Server",{enumerable:!0,get:o(function(){return yue.Server},"get")});var xue=Zu();Object.defineProperty(Lt,"passwordDigest",{enumerable:!0,get:o(function(){return xue.passwordDigest},"get")});fue(dU(),Lt);var wue=n_();Object.defineProperty(Lt,"WSDL",{enumerable:!0,get:o(function(){return wue.WSDL},"get")});function Sue(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(Sue,"getFromCache");function Eue(r,e,t){typeof e=="function"&&(t=e,e={});let n=o(s=>{(0,gU.open_wsdl)(r,e,s)},"openWsdl");if(e.disableCache===!0)n(t);else{let s;e.wsdlCache?s=e.wsdlCache:s=mue.wsdlCacheSingleton,Sue(r,s,n,t)}}o(Eue,"_requestWSDL");function vU(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,Eue(r,a,(u,c)=>{i(u,c&&new hue.Client(c,s,a))})}o(vU,"createClient");function bue(r,e,t){return typeof e>"u"&&(e={}),new Promise((n,s)=>{vU(r,e,(i,a)=>{i&&s(i),n(a)},t)})}o(bue,"createClientAsync");function Aue(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 gU.WSDL(n||t,u,i);return new due.Server(r,a,t,c,i)}o(Aue,"listen")});var aE=te(i_=>{"use strict";(function(){i_.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:`
89
+ `},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(i_)});var Qa=te((_U,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(_U)});var a_=te((DU,BU)=>{"use strict";(function(){var r;BU.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(DU)});var PU=te((RU,OU)=>{"use strict";(function(){var r;OU.exports=r=(function(){function e(){}return o(e,"XMLDOMErrorHandler"),e.prototype.handleError=function(t){throw new Error(t)},e})()}).call(RU)});var VU=te((kU,LU)=>{"use strict";(function(){var r;LU.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(kU)});var MU=te((UU,jU)=>{"use strict";(function(){var r,e,t;e=PU(),t=VU(),jU.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(UU)});var hn=te((FU,qU)=>{"use strict";(function(){qU.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(FU)});var o_=te((HU,KU)=>{"use strict";(function(){var r,e,t;r=hn(),t=ai(),KU.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(HU)});var oE=te(($U,GU)=>{"use strict";(function(){var r;GU.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($U)});var uE=te((XU,WU)=>{"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=Qa(),u=c.isObject,a=c.isFunction,i=c.getValue,s=ai(),r=hn(),e=o_(),n=oE(),WU.exports=t=(function(m){f(g,m);function g(x,v,S){var E,C,_,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,S!=null&&this.attribute(S),x.type===r.Document&&(this.isRoot=!0,this.documentObject=x,x.rootObject=this,x.children)){for(b=x.children,C=0,_=b.length;C<_;C++)if(E=b[C],E.type===r.DocType){E.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,S,E;S=Object.create(this),S.isRoot&&(S.documentObject=null),S.attribs={},E=this.attribs;for(v in E)h.call(E,v)&&(x=E[v],S.attribs[v]=x.clone());return S.children=[],this.children.forEach(function(C){var _;return _=C.clone(),_.parent=S,S.children.push(_)}),S},g.prototype.attribute=function(x,v){var S,E;if(x!=null&&(x=i(x)),u(x))for(S in x)h.call(x,S)&&(E=x[S],this.attribute(S,E));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,S,E;if(x==null)throw new Error("Missing attribute name. "+this.debugInfo());if(x=i(x),Array.isArray(x))for(S=0,E=x.length;S<E;S++)v=x[S],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,S){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,S){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,S,E;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=S=0,E=this.attribs.length-1;0<=E?S<=E:S>=E;v=0<=E?++S:--S)if(!this.attribs[v].isEqualNode(x.attribs[v]))return!1;return!0},g})(s)}).call(XU)});var Gg=te((zU,JU)=>{"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(),JU.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(zU)});var cE=te((YU,QU)=>{"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=hn(),t=Gg(),QU.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(YU)});var lE=te((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;r=hn(),e=Gg(),ej.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 fE=te((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=Qa().isObject,t=ai(),r=hn(),rj.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(tj)});var hE=te((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=hn(),sj.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(nj)});var pE=te((ij,aj)=>{"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=Qa().isObject,t=ai(),r=hn(),aj.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(ij)});var dE=te((oj,uj)=>{"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=hn(),uj.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(oj)});var mE=te((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;t=ai(),r=hn(),lj.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(cj)});var gE=te((fj,hj)=>{"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=Qa().isObject,u=ai(),r=hn(),e=hE(),n=pE(),t=dE(),s=mE(),a=oE(),hj.exports=i=(function(m){f(g,m);function g(x,v,S){var E,C,_,b,A,T;if(g.__super__.constructor.call(this,x),this.type=r.DocType,x.children){for(b=x.children,C=0,_=b.length;C<_;C++)if(E=b[C],E.type===r.Element){this.name=E.name;break}}this.documentObject=x,c(v)&&(A=v,v=A.pubID,S=A.sysID),S==null&&(T=[v,S],S=T[0],v=T[1]),v!=null&&(this.pubID=this.stringify.dtdPubID(v)),S!=null&&(this.sysID=this.stringify.dtdSysID(S))}return o(g,"XMLDocType"),Object.defineProperty(g.prototype,"entities",{get:o(function(){var x,v,S,E,C;for(E={},C=this.children,v=0,S=C.length;v<S;v++)x=C[v],x.type===r.EntityDeclaration&&!x.pe&&(E[x.name]=x);return new a(E)},"get")}),Object.defineProperty(g.prototype,"notations",{get:o(function(){var x,v,S,E,C;for(E={},C=this.children,v=0,S=C.length;v<S;v++)x=C[v],x.type===r.NotationDeclaration&&(E[x.name]=x);return new a(E)},"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 S;return S=new t(this,x,v),this.children.push(S),this},g.prototype.attList=function(x,v,S,E,C){var _;return _=new e(this,x,v,S,E,C),this.children.push(_),this},g.prototype.entity=function(x,v){var S;return S=new n(this,!1,x,v),this.children.push(S),this},g.prototype.pEntity=function(x,v){var S;return S=new n(this,!0,x,v),this.children.push(S),this},g.prototype.notation=function(x,v){var S;return S=new s(this,x,v),this.children.push(S),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,S,E,C){return this.attList(x,v,S,E,C)},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(fj)});var vE=te((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=hn(),e=ai(),dj.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(pj)});var yE=te((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;r=hn(),e=Gg(),gj.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(mj)});var xE=te((vj,yj)=>{"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=hn(),e=Gg(),yj.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(vj)});var u_=te((xj,wj)=>{"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=hn(),wj.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(xj)});var bj=te((Sj,Ej)=>{"use strict";(function(){var r;Ej.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(Sj)});var Nj=te((Aj,Cj)=>{"use strict";(function(){Cj.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(Aj)});var ai=te((Tj,Ij)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,f,h,m,g,x,v,S,E,C,_,b={}.hasOwnProperty;_=Qa(),C=_.isObject,E=_.isFunction,S=_.isEmpty,v=_.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,Ij.exports=f=(function(){function A(T){this.parent=T,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,u||(u=uE(),t=cE(),n=lE(),s=fE(),i=gE(),g=vE(),x=yE(),m=xE(),a=u_(),e=hn(),h=bj(),c=oE(),r=Nj())}return o(A,"XMLNode"),Object.defineProperty(A.prototype,"nodeName",{get:o(function(){return this.name},"get")}),Object.defineProperty(A.prototype,"nodeType",{get:o(function(){return this.type},"get")}),Object.defineProperty(A.prototype,"nodeValue",{get:o(function(){return this.value},"get")}),Object.defineProperty(A.prototype,"parentNode",{get:o(function(){return this.parent},"get")}),Object.defineProperty(A.prototype,"childNodes",{get:o(function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new h(this.children)),this.childNodeList},"get")}),Object.defineProperty(A.prototype,"firstChild",{get:o(function(){return this.children[0]||null},"get")}),Object.defineProperty(A.prototype,"lastChild",{get:o(function(){return this.children[this.children.length-1]||null},"get")}),Object.defineProperty(A.prototype,"previousSibling",{get:o(function(){var T;return T=this.parent.children.indexOf(this),this.parent.children[T-1]||null},"get")}),Object.defineProperty(A.prototype,"nextSibling",{get:o(function(){var T;return T=this.parent.children.indexOf(this),this.parent.children[T+1]||null},"get")}),Object.defineProperty(A.prototype,"ownerDocument",{get:o(function(){return this.document()||null},"get")}),Object.defineProperty(A.prototype,"textContent",{get:o(function(){var T,R,H,I,$;if(this.nodeType===e.Element||this.nodeType===e.DocumentFragment){for($="",I=this.children,R=0,H=I.length;R<H;R++)T=I[R],T.textContent&&($+=T.textContent);return $}else return null},"get"),set:o(function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},"set")}),A.prototype.setParent=function(T){var R,H,I,$,K;for(this.parent=T,T&&(this.options=T.options,this.stringify=T.stringify),$=this.children,K=[],H=0,I=$.length;H<I;H++)R=$[H],K.push(R.setParent(this));return K},A.prototype.element=function(T,R,H){var I,$,K,F,z,he,pe,oe,Q,xe,Me;if(he=null,R===null&&H==null&&(Q=[{},null],R=Q[0],H=Q[1]),R==null&&(R={}),R=v(R),C(R)||(xe=[R,H],H=xe[0],R=xe[1]),T!=null&&(T=v(T)),Array.isArray(T))for(K=0,pe=T.length;K<pe;K++)$=T[K],he=this.element($);else if(E(T))he=this.element(T.apply());else if(C(T)){for(z in T)if(b.call(T,z))if(Me=T[z],E(Me)&&(Me=Me.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&z.indexOf(this.stringify.convertAttKey)===0)he=this.attribute(z.substr(this.stringify.convertAttKey.length),Me);else if(!this.options.separateArrayItems&&Array.isArray(Me)&&S(Me))he=this.dummy();else if(C(Me)&&S(Me))he=this.element(z);else if(!this.options.keepNullNodes&&Me==null)he=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(Me))for(F=0,oe=Me.length;F<oe;F++)$=Me[F],I={},I[z]=$,he=this.element(I);else C(Me)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&z.indexOf(this.stringify.convertTextKey)===0?he=this.element(Me):(he=this.element(z),he.element(Me)):he=this.element(z,Me)}else!this.options.keepNullNodes&&H===null?he=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&T.indexOf(this.stringify.convertTextKey)===0?he=this.text(H):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&T.indexOf(this.stringify.convertCDataKey)===0?he=this.cdata(H):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&T.indexOf(this.stringify.convertCommentKey)===0?he=this.comment(H):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&T.indexOf(this.stringify.convertRawKey)===0?he=this.raw(H):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&T.indexOf(this.stringify.convertPIKey)===0?he=this.instruction(T.substr(this.stringify.convertPIKey.length),H):he=this.node(T,R,H);if(he==null)throw new Error("Could not create any elements with: "+T+". "+this.debugInfo());return he},A.prototype.insertBefore=function(T,R,H){var I,$,K,F,z;if(T?.type)return K=T,F=R,K.setParent(this),F?($=children.indexOf(F),z=children.splice($),children.push(K),Array.prototype.push.apply(children,z)):children.push(K),K;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(T));return $=this.parent.children.indexOf(this),z=this.parent.children.splice($),I=this.parent.element(T,R,H),Array.prototype.push.apply(this.parent.children,z),I},A.prototype.insertAfter=function(T,R,H){var I,$,K;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(T));return $=this.parent.children.indexOf(this),K=this.parent.children.splice($+1),I=this.parent.element(T,R,H),Array.prototype.push.apply(this.parent.children,K),I},A.prototype.remove=function(){var T,R;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return T=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[T,T-T+1].concat(R=[])),this.parent},A.prototype.node=function(T,R,H){var I,$;return T!=null&&(T=v(T)),R||(R={}),R=v(R),C(R)||($=[R,H],H=$[0],R=$[1]),I=new u(this,T,R),H!=null&&I.text(H),this.children.push(I),I},A.prototype.text=function(T){var R;return C(T)&&this.element(T),R=new x(this,T),this.children.push(R),this},A.prototype.cdata=function(T){var R;return R=new t(this,T),this.children.push(R),this},A.prototype.comment=function(T){var R;return R=new n(this,T),this.children.push(R),this},A.prototype.commentBefore=function(T){var R,H,I;return H=this.parent.children.indexOf(this),I=this.parent.children.splice(H),R=this.parent.comment(T),Array.prototype.push.apply(this.parent.children,I),this},A.prototype.commentAfter=function(T){var R,H,I;return H=this.parent.children.indexOf(this),I=this.parent.children.splice(H+1),R=this.parent.comment(T),Array.prototype.push.apply(this.parent.children,I),this},A.prototype.raw=function(T){var R;return R=new g(this,T),this.children.push(R),this},A.prototype.dummy=function(){var T;return T=new a(this),T},A.prototype.instruction=function(T,R){var H,I,$,K,F;if(T!=null&&(T=v(T)),R!=null&&(R=v(R)),Array.isArray(T))for(K=0,F=T.length;K<F;K++)H=T[K],this.instruction(H);else if(C(T))for(H in T)b.call(T,H)&&(I=T[H],this.instruction(H,I));else E(R)&&(R=R.apply()),$=new m(this,T,R),this.children.push($);return this},A.prototype.instructionBefore=function(T,R){var H,I,$;return I=this.parent.children.indexOf(this),$=this.parent.children.splice(I),H=this.parent.instruction(T,R),Array.prototype.push.apply(this.parent.children,$),this},A.prototype.instructionAfter=function(T,R){var H,I,$;return I=this.parent.children.indexOf(this),$=this.parent.children.splice(I+1),H=this.parent.instruction(T,R),Array.prototype.push.apply(this.parent.children,$),this},A.prototype.declaration=function(T,R,H){var I,$;return I=this.document(),$=new s(I,T,R,H),I.children.length===0?I.children.unshift($):I.children[0].type===e.Declaration?I.children[0]=$:I.children.unshift($),I.root()||I},A.prototype.dtd=function(T,R){var H,I,$,K,F,z,he,pe,oe,Q;for(I=this.document(),$=new i(I,T,R),oe=I.children,K=F=0,he=oe.length;F<he;K=++F)if(H=oe[K],H.type===e.DocType)return I.children[K]=$,$;for(Q=I.children,K=z=0,pe=Q.length;z<pe;K=++z)if(H=Q[K],H.isRoot)return I.children.splice(K,0,$),$;return I.children.push($),$},A.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},A.prototype.root=function(){var T;for(T=this;T;){if(T.type===e.Document)return T.rootObject;if(T.isRoot)return T;T=T.parent}},A.prototype.document=function(){var T;for(T=this;T;){if(T.type===e.Document)return T;T=T.parent}},A.prototype.end=function(T){return this.document().end(T)},A.prototype.prev=function(){var T;if(T=this.parent.children.indexOf(this),T<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[T-1]},A.prototype.next=function(){var T;if(T=this.parent.children.indexOf(this),T===-1||T===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[T+1]},A.prototype.importDocument=function(T){var R;return R=T.root().clone(),R.parent=this,R.isRoot=!1,this.children.push(R),this},A.prototype.debugInfo=function(T){var R,H;return T=T||this.name,T==null&&!((R=this.parent)!=null&&R.name)?"":T==null?"parent: <"+this.parent.name+">":(H=this.parent)!=null&&H.name?"node: <"+T+">, parent: <"+this.parent.name+">":"node: <"+T+">"},A.prototype.ele=function(T,R,H){return this.element(T,R,H)},A.prototype.nod=function(T,R,H){return this.node(T,R,H)},A.prototype.txt=function(T){return this.text(T)},A.prototype.dat=function(T){return this.cdata(T)},A.prototype.com=function(T){return this.comment(T)},A.prototype.ins=function(T,R){return this.instruction(T,R)},A.prototype.doc=function(){return this.document()},A.prototype.dec=function(T,R,H){return this.declaration(T,R,H)},A.prototype.e=function(T,R,H){return this.element(T,R,H)},A.prototype.n=function(T,R,H){return this.node(T,R,H)},A.prototype.t=function(T){return this.text(T)},A.prototype.d=function(T){return this.cdata(T)},A.prototype.c=function(T){return this.comment(T)},A.prototype.r=function(T){return this.raw(T)},A.prototype.i=function(T,R){return this.instruction(T,R)},A.prototype.u=function(){return this.up()},A.prototype.importXMLBuilder=function(T){return this.importDocument(T)},A.prototype.replaceChild=function(T,R){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.removeChild=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.appendChild=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.hasChildNodes=function(){return this.children.length!==0},A.prototype.cloneNode=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.isSupported=function(T,R){return!0},A.prototype.hasAttributes=function(){return this.attribs.length!==0},A.prototype.compareDocumentPosition=function(T){var R,H;return R=this,R===T?0:this.document()!==T.document()?(H=r.Disconnected|r.ImplementationSpecific,Math.random()<.5?H|=r.Preceding:H|=r.Following,H):R.isAncestor(T)?r.Contains|r.Preceding:R.isDescendant(T)?r.Contains|r.Following:R.isPreceding(T)?r.Preceding:r.Following},A.prototype.isSameNode=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.lookupPrefix=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.isDefaultNamespace=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.lookupNamespaceURI=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.isEqualNode=function(T){var R,H,I;if(T.nodeType!==this.nodeType||T.children.length!==this.children.length)return!1;for(R=H=0,I=this.children.length-1;0<=I?H<=I:H>=I;R=0<=I?++H:--H)if(!this.children[R].isEqualNode(T.children[R]))return!1;return!0},A.prototype.getFeature=function(T,R){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.setUserData=function(T,R,H){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.getUserData=function(T){throw new Error("This DOM method is not implemented."+this.debugInfo())},A.prototype.contains=function(T){return T?T===this||this.isDescendant(T):!1},A.prototype.isDescendant=function(T){var R,H,I,$,K;for(K=this.children,I=0,$=K.length;I<$;I++)if(R=K[I],T===R||(H=R.isDescendant(T),H))return!0;return!1},A.prototype.isAncestor=function(T){return T.isDescendant(this)},A.prototype.isPreceding=function(T){var R,H;return R=this.treePosition(T),H=this.treePosition(this),R===-1||H===-1?!1:R<H},A.prototype.isFollowing=function(T){var R,H;return R=this.treePosition(T),H=this.treePosition(this),R===-1||H===-1?!1:R>H},A.prototype.treePosition=function(T){var R,H;return H=0,R=!1,this.foreachTreeNode(this.document(),function(I){if(H++,!R&&I===T)return R=!0}),R?H:-1},A.prototype.foreachTreeNode=function(T,R){var H,I,$,K,F;for(T||(T=this.document()),K=T.children,I=0,$=K.length;I<$;I++){if(H=K[I],F=R(H))return F;if(F=this.foreachTreeNode(H,R),F)return F}},A})()}).call(Tj)});var c_=te((_j,Dj)=>{"use strict";(function(){var r,e=o(function(n,s){return function(){return n.apply(s,arguments)}},"bind"),t={}.hasOwnProperty;Dj.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(_j)});var Xg=te((Bj,Rj)=>{"use strict";(function(){Rj.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(Bj)});var l_=te((Oj,Pj)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,f,h,m,g,x,v,S,E,C={}.hasOwnProperty;E=Qa().assign,r=hn(),c=fE(),f=gE(),t=cE(),n=lE(),m=uE(),x=vE(),v=yE(),g=xE(),h=u_(),s=hE(),i=dE(),a=pE(),u=mE(),e=Xg(),Pj.exports=S=(function(){function _(b){var A,T,R;b||(b={}),this.options=b,T=b.writer||{};for(A in T)C.call(T,A)&&(R=T[A],this["_"+A]=this[A],this[A]=R)}return o(_,"XMLWriterBase"),_.prototype.filterOptions=function(b){var A,T,R,H,I,$,K,F;return b||(b={}),b=E({},this.options,b),A={writer:this},A.pretty=b.pretty||!1,A.allowEmpty=b.allowEmpty||!1,A.indent=(T=b.indent)!=null?T:" ",A.newline=(R=b.newline)!=null?R:`
90
+ `,A.offset=(H=b.offset)!=null?H:0,A.dontPrettyTextNodes=(I=($=b.dontPrettyTextNodes)!=null?$:b.dontprettytextnodes)!=null?I:0,A.spaceBeforeSlash=(K=(F=b.spaceBeforeSlash)!=null?F:b.spacebeforeslash)!=null?K:"",A.spaceBeforeSlash===!0&&(A.spaceBeforeSlash=" "),A.suppressPrettyCount=0,A.user={},A.state=e.None,A},_.prototype.indent=function(b,A,T){var R;return!A.pretty||A.suppressPrettyCount?"":A.pretty&&(R=(T||0)+A.offset+1,R>0)?new Array(R).join(A.indent):""},_.prototype.endline=function(b,A,T){return!A.pretty||A.suppressPrettyCount?"":A.newline},_.prototype.attribute=function(b,A,T){var R;return this.openAttribute(b,A,T),R=" "+b.name+'="'+b.value+'"',this.closeAttribute(b,A,T),R},_.prototype.cdata=function(b,A,T){var R;return this.openNode(b,A,T),A.state=e.OpenTag,R=this.indent(b,A,T)+"<![CDATA[",A.state=e.InsideTag,R+=b.value,A.state=e.CloseTag,R+="]]>"+this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),R},_.prototype.comment=function(b,A,T){var R;return this.openNode(b,A,T),A.state=e.OpenTag,R=this.indent(b,A,T)+"<!-- ",A.state=e.InsideTag,R+=b.value,A.state=e.CloseTag,R+=" -->"+this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),R},_.prototype.declaration=function(b,A,T){var R;return this.openNode(b,A,T),A.state=e.OpenTag,R=this.indent(b,A,T)+"<?xml",A.state=e.InsideTag,R+=' version="'+b.version+'"',b.encoding!=null&&(R+=' encoding="'+b.encoding+'"'),b.standalone!=null&&(R+=' standalone="'+b.standalone+'"'),A.state=e.CloseTag,R+=A.spaceBeforeSlash+"?>",R+=this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),R},_.prototype.docType=function(b,A,T){var R,H,I,$,K;if(T||(T=0),this.openNode(b,A,T),A.state=e.OpenTag,$=this.indent(b,A,T),$+="<!DOCTYPE "+b.root().name,b.pubID&&b.sysID?$+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.sysID&&($+=' SYSTEM "'+b.sysID+'"'),b.children.length>0){for($+=" [",$+=this.endline(b,A,T),A.state=e.InsideTag,K=b.children,H=0,I=K.length;H<I;H++)R=K[H],$+=this.writeChildNode(R,A,T+1);A.state=e.CloseTag,$+="]"}return A.state=e.CloseTag,$+=A.spaceBeforeSlash+">",$+=this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),$},_.prototype.element=function(b,A,T){var R,H,I,$,K,F,z,he,pe,oe,Q,xe,Me,Qe;T||(T=0),oe=!1,Q="",this.openNode(b,A,T),A.state=e.OpenTag,Q+=this.indent(b,A,T)+"<"+b.name,xe=b.attribs;for(pe in xe)C.call(xe,pe)&&(R=xe[pe],Q+=this.attribute(R,A,T));if(I=b.children.length,$=I===0?null:b.children[0],I===0||b.children.every(function(de){return(de.type===r.Text||de.type===r.Raw)&&de.value===""}))A.allowEmpty?(Q+=">",A.state=e.CloseTag,Q+="</"+b.name+">"+this.endline(b,A,T)):(A.state=e.CloseTag,Q+=A.spaceBeforeSlash+"/>"+this.endline(b,A,T));else if(A.pretty&&I===1&&($.type===r.Text||$.type===r.Raw)&&$.value!=null)Q+=">",A.state=e.InsideTag,A.suppressPrettyCount++,oe=!0,Q+=this.writeChildNode($,A,T+1),A.suppressPrettyCount--,oe=!1,A.state=e.CloseTag,Q+="</"+b.name+">"+this.endline(b,A,T);else{if(A.dontPrettyTextNodes){for(Me=b.children,K=0,z=Me.length;K<z;K++)if(H=Me[K],(H.type===r.Text||H.type===r.Raw)&&H.value!=null){A.suppressPrettyCount++,oe=!0;break}}for(Q+=">"+this.endline(b,A,T),A.state=e.InsideTag,Qe=b.children,F=0,he=Qe.length;F<he;F++)H=Qe[F],Q+=this.writeChildNode(H,A,T+1);A.state=e.CloseTag,Q+=this.indent(b,A,T)+"</"+b.name+">",oe&&A.suppressPrettyCount--,Q+=this.endline(b,A,T),A.state=e.None}return this.closeNode(b,A,T),Q},_.prototype.writeChildNode=function(b,A,T){switch(b.type){case r.CData:return this.cdata(b,A,T);case r.Comment:return this.comment(b,A,T);case r.Element:return this.element(b,A,T);case r.Raw:return this.raw(b,A,T);case r.Text:return this.text(b,A,T);case r.ProcessingInstruction:return this.processingInstruction(b,A,T);case r.Dummy:return"";case r.Declaration:return this.declaration(b,A,T);case r.DocType:return this.docType(b,A,T);case r.AttributeDeclaration:return this.dtdAttList(b,A,T);case r.ElementDeclaration:return this.dtdElement(b,A,T);case r.EntityDeclaration:return this.dtdEntity(b,A,T);case r.NotationDeclaration:return this.dtdNotation(b,A,T);default:throw new Error("Unknown XML node type: "+b.constructor.name)}},_.prototype.processingInstruction=function(b,A,T){var R;return this.openNode(b,A,T),A.state=e.OpenTag,R=this.indent(b,A,T)+"<?",A.state=e.InsideTag,R+=b.target,b.value&&(R+=" "+b.value),A.state=e.CloseTag,R+=A.spaceBeforeSlash+"?>",R+=this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),R},_.prototype.raw=function(b,A,T){var R;return this.openNode(b,A,T),A.state=e.OpenTag,R=this.indent(b,A,T),A.state=e.InsideTag,R+=b.value,A.state=e.CloseTag,R+=this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),R},_.prototype.text=function(b,A,T){var R;return this.openNode(b,A,T),A.state=e.OpenTag,R=this.indent(b,A,T),A.state=e.InsideTag,R+=b.value,A.state=e.CloseTag,R+=this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),R},_.prototype.dtdAttList=function(b,A,T){var R;return this.openNode(b,A,T),A.state=e.OpenTag,R=this.indent(b,A,T)+"<!ATTLIST",A.state=e.InsideTag,R+=" "+b.elementName+" "+b.attributeName+" "+b.attributeType,b.defaultValueType!=="#DEFAULT"&&(R+=" "+b.defaultValueType),b.defaultValue&&(R+=' "'+b.defaultValue+'"'),A.state=e.CloseTag,R+=A.spaceBeforeSlash+">"+this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),R},_.prototype.dtdElement=function(b,A,T){var R;return this.openNode(b,A,T),A.state=e.OpenTag,R=this.indent(b,A,T)+"<!ELEMENT",A.state=e.InsideTag,R+=" "+b.name+" "+b.value,A.state=e.CloseTag,R+=A.spaceBeforeSlash+">"+this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),R},_.prototype.dtdEntity=function(b,A,T){var R;return this.openNode(b,A,T),A.state=e.OpenTag,R=this.indent(b,A,T)+"<!ENTITY",A.state=e.InsideTag,b.pe&&(R+=" %"),R+=" "+b.name,b.value?R+=' "'+b.value+'"':(b.pubID&&b.sysID?R+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.sysID&&(R+=' SYSTEM "'+b.sysID+'"'),b.nData&&(R+=" NDATA "+b.nData)),A.state=e.CloseTag,R+=A.spaceBeforeSlash+">"+this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),R},_.prototype.dtdNotation=function(b,A,T){var R;return this.openNode(b,A,T),A.state=e.OpenTag,R=this.indent(b,A,T)+"<!NOTATION",A.state=e.InsideTag,R+=" "+b.name,b.pubID&&b.sysID?R+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.pubID?R+=' PUBLIC "'+b.pubID+'"':b.sysID&&(R+=' SYSTEM "'+b.sysID+'"'),A.state=e.CloseTag,R+=A.spaceBeforeSlash+">"+this.endline(b,A,T),A.state=e.None,this.closeNode(b,A,T),R},_.prototype.openNode=function(b,A,T){},_.prototype.closeNode=function(b,A,T){},_.prototype.openAttribute=function(b,A,T){},_.prototype.closeAttribute=function(b,A,T){},_})()}).call(Oj)});var wE=te((kj,Lj)=>{"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=l_(),Lj.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(kj)});var f_=te((Vj,Uj)=>{"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=Qa().isPlainObject,t=a_(),e=MU(),s=ai(),r=hn(),a=c_(),i=wE(),Uj.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,S;for(S=this.children,x=0,v=S.length;x<v;x++)if(g=S[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(Vj)});var Fj=te((jj,Mj)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,f,h,m,g,x,v,S,E,C,_,b,A,T,R,H,I={}.hasOwnProperty;H=Qa(),T=H.isObject,A=H.isFunction,R=H.isPlainObject,b=H.getValue,r=hn(),m=f_(),x=uE(),n=cE(),s=lE(),S=vE(),_=yE(),v=xE(),f=fE(),h=gE(),i=hE(),u=pE(),a=dE(),c=mE(),t=o_(),C=c_(),E=wE(),e=Xg(),Mj.exports=g=(function(){function $(K,F,z){var he;this.name="?xml",this.type=r.Document,K||(K={}),he={},K.writer?R(K.writer)&&(he=K.writer,K.writer=new E):K.writer=new E,this.options=K,this.writer=K.writer,this.writerOptions=this.writer.filterOptions(he),this.stringify=new C(K),this.onDataCallback=F||function(){},this.onEndCallback=z||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return o($,"XMLDocumentCB"),$.prototype.createChildNode=function(K){var F,z,he,pe,oe,Q,xe,Me;switch(K.type){case r.CData:this.cdata(K.value);break;case r.Comment:this.comment(K.value);break;case r.Element:he={},xe=K.attribs;for(z in xe)I.call(xe,z)&&(F=xe[z],he[z]=F.value);this.node(K.name,he);break;case r.Dummy:this.dummy();break;case r.Raw:this.raw(K.value);break;case r.Text:this.text(K.value);break;case r.ProcessingInstruction:this.instruction(K.target,K.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+K.constructor.name)}for(Me=K.children,oe=0,Q=Me.length;oe<Q;oe++)pe=Me[oe],this.createChildNode(pe),pe.type===r.Element&&this.up();return this},$.prototype.dummy=function(){return this},$.prototype.node=function(K,F,z){var he;if(K==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(K));return this.openCurrent(),K=b(K),F==null&&(F={}),F=b(F),T(F)||(he=[F,z],z=he[0],F=he[1]),this.currentNode=new x(this,K,F),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,z!=null&&this.text(z),this},$.prototype.element=function(K,F,z){var he,pe,oe,Q,xe,Me;if(this.currentNode&&this.currentNode.type===r.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(K)||T(K)||A(K))for(Q=this.options.noValidation,this.options.noValidation=!0,Me=new m(this.options).element("TEMP_ROOT"),Me.element(K),this.options.noValidation=Q,xe=Me.children,pe=0,oe=xe.length;pe<oe;pe++)he=xe[pe],this.createChildNode(he),he.type===r.Element&&this.up();else this.node(K,F,z);return this},$.prototype.attribute=function(K,F){var z,he;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(K));if(K!=null&&(K=b(K)),T(K))for(z in K)I.call(K,z)&&(he=K[z],this.attribute(z,he));else A(F)&&(F=F.apply()),this.options.keepNullAttributes&&F==null?this.currentNode.attribs[K]=new t(this,K,""):F!=null&&(this.currentNode.attribs[K]=new t(this,K,F));return this},$.prototype.text=function(K){var F;return this.openCurrent(),F=new _(this,K),this.onData(this.writer.text(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},$.prototype.cdata=function(K){var F;return this.openCurrent(),F=new n(this,K),this.onData(this.writer.cdata(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},$.prototype.comment=function(K){var F;return this.openCurrent(),F=new s(this,K),this.onData(this.writer.comment(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},$.prototype.raw=function(K){var F;return this.openCurrent(),F=new S(this,K),this.onData(this.writer.raw(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},$.prototype.instruction=function(K,F){var z,he,pe,oe,Q;if(this.openCurrent(),K!=null&&(K=b(K)),F!=null&&(F=b(F)),Array.isArray(K))for(z=0,oe=K.length;z<oe;z++)he=K[z],this.instruction(he);else if(T(K))for(he in K)I.call(K,he)&&(pe=K[he],this.instruction(he,pe));else A(F)&&(F=F.apply()),Q=new v(this,K,F),this.onData(this.writer.processingInstruction(Q,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},$.prototype.declaration=function(K,F,z){var he;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return he=new f(this,K,F,z),this.onData(this.writer.declaration(he,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},$.prototype.doctype=function(K,F,z){if(this.openCurrent(),K==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,F,z),this.currentNode.rootNodeName=K,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},$.prototype.dtdElement=function(K,F){var z;return this.openCurrent(),z=new a(this,K,F),this.onData(this.writer.dtdElement(z,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},$.prototype.attList=function(K,F,z,he,pe){var oe;return this.openCurrent(),oe=new i(this,K,F,z,he,pe),this.onData(this.writer.dtdAttList(oe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},$.prototype.entity=function(K,F){var z;return this.openCurrent(),z=new u(this,!1,K,F),this.onData(this.writer.dtdEntity(z,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},$.prototype.pEntity=function(K,F){var z;return this.openCurrent(),z=new u(this,!0,K,F),this.onData(this.writer.dtdEntity(z,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},$.prototype.notation=function(K,F){var z;return this.openCurrent(),z=new c(this,K,F),this.onData(this.writer.dtdNotation(z,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},$.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},$.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},$.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},$.prototype.openNode=function(K){var F,z,he,pe;if(!K.isOpen){if(!this.root&&this.currentLevel===0&&K.type===r.Element&&(this.root=K),z="",K.type===r.Element){this.writerOptions.state=e.OpenTag,z=this.writer.indent(K,this.writerOptions,this.currentLevel)+"<"+K.name,pe=K.attribs;for(he in pe)I.call(pe,he)&&(F=pe[he],z+=this.writer.attribute(F,this.writerOptions,this.currentLevel));z+=(K.children?">":"/>")+this.writer.endline(K,this.writerOptions,this.currentLevel),this.writerOptions.state=e.InsideTag}else this.writerOptions.state=e.OpenTag,z=this.writer.indent(K,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+K.rootNodeName,K.pubID&&K.sysID?z+=' PUBLIC "'+K.pubID+'" "'+K.sysID+'"':K.sysID&&(z+=' SYSTEM "'+K.sysID+'"'),K.children?(z+=" [",this.writerOptions.state=e.InsideTag):(this.writerOptions.state=e.CloseTag,z+=">"),z+=this.writer.endline(K,this.writerOptions,this.currentLevel);return this.onData(z,this.currentLevel),K.isOpen=!0}},$.prototype.closeNode=function(K){var F;if(!K.isClosed)return F="",this.writerOptions.state=e.CloseTag,K.type===r.Element?F=this.writer.indent(K,this.writerOptions,this.currentLevel)+"</"+K.name+">"+this.writer.endline(K,this.writerOptions,this.currentLevel):F=this.writer.indent(K,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(K,this.writerOptions,this.currentLevel),this.writerOptions.state=e.None,this.onData(F,this.currentLevel),K.isClosed=!0},$.prototype.onData=function(K,F){return this.documentStarted=!0,this.onDataCallback(K,F+1)},$.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},$.prototype.debugInfo=function(K){return K==null?"":"node: <"+K+">"},$.prototype.ele=function(){return this.element.apply(this,arguments)},$.prototype.nod=function(K,F,z){return this.node(K,F,z)},$.prototype.txt=function(K){return this.text(K)},$.prototype.dat=function(K){return this.cdata(K)},$.prototype.com=function(K){return this.comment(K)},$.prototype.ins=function(K,F){return this.instruction(K,F)},$.prototype.dec=function(K,F,z){return this.declaration(K,F,z)},$.prototype.dtd=function(K,F,z){return this.doctype(K,F,z)},$.prototype.e=function(K,F,z){return this.element(K,F,z)},$.prototype.n=function(K,F,z){return this.node(K,F,z)},$.prototype.t=function(K){return this.text(K)},$.prototype.d=function(K){return this.cdata(K)},$.prototype.c=function(K){return this.comment(K)},$.prototype.r=function(K){return this.raw(K)},$.prototype.i=function(K,F){return this.instruction(K,F)},$.prototype.att=function(){return this.currentNode&&this.currentNode.type===r.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},$.prototype.a=function(){return this.currentNode&&this.currentNode.type===r.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},$.prototype.ent=function(K,F){return this.entity(K,F)},$.prototype.pent=function(K,F){return this.pEntity(K,F)},$.prototype.not=function(K,F){return this.notation(K,F)},$})()}).call(jj)});var Kj=te((qj,Hj)=>{"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=hn(),n=l_(),e=Xg(),Hj.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,S,E,C,_;for(E=c.children,m=g=0,v=E.length;g<v;m=++g)h=E[m],h.isLastRootNode=m===c.children.length-1;for(f=this.filterOptions(f),C=c.children,_=[],x=0,S=C.length;x<S;x++)h=C[x],_.push(this.writeChildNode(h,f,0));return _},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,S,E,C,_,b,A;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(C in b)i.call(b,C)&&(m=b[C],this.attribute(m,f,h));if(x=c.children.length,v=x===0?null:c.children[0],x===0||c.children.every(function(T){return(T.type===r.Text||T.type===r.Raw)&&T.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++,_=!0,this.writeChildNode(v,f,h+1),f.suppressPrettyCount--,_=!1,f.state=e.CloseTag,this.stream.write("</"+c.name+">");else{for(this.stream.write(">"+this.endline(c,f,h)),f.state=e.InsideTag,A=c.children,S=0,E=A.length;S<E;S++)g=A[S],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(qj)});var Gj=te(($j,cc)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,f;f=Qa(),u=f.assign,c=f.isFunction,t=a_(),n=f_(),s=Fj(),a=wE(),i=Kj(),r=hn(),e=Xg(),cc.exports.create=function(h,m,g,x){var v,S;if(h==null)throw new Error("Root element needs a name.");return x=u({},m,g,x),v=new n(x),S=v.element(h),x.headless||(v.declaration(x),(x.pubID!=null||x.sysID!=null)&&v.dtd(x)),S},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($j)});var Xj=te(h_=>{"use strict";(function(){"use strict";var r,e,t,n,s,i={}.hasOwnProperty;r=Gj(),e=aE().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"),h_.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,S){var E,C,_,b,A,T;if(typeof S!="object")x.options.cdata&&n(S)?v.raw(s(S)):v.txt(S);else if(Array.isArray(S)){for(b in S)if(i.call(S,b)){C=S[b];for(A in C)_=C[A],v=h(v.ele(A),_).up()}}else for(A in S)if(i.call(S,A))if(C=S[A],A===c){if(typeof C=="object")for(E in C)T=C[E],v=v.att(E,T)}else if(A===f)x.options.cdata&&n(C)?v=v.raw(s(C)):v=v.txt(C);else if(Array.isArray(C))for(b in C)i.call(C,b)&&(_=C[b],typeof _=="string"?x.options.cdata&&n(_)?v=v.ele(A).raw(s(_)).up():v=v.ele(A,_).up():v=h(v.ele(A),_).up());else typeof C=="object"?v=h(v.ele(A),C).up():typeof C=="string"&&x.options.cdata&&n(C)?v=v.ele(A).raw(s(C)).up():(C==null&&(C=""),v=v.ele(A,C.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(h_)});var Wj=te(SE=>{"use strict";(function(r){r.parser=function(N,w){return new t(N,w)},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(N,w){if(!(this instanceof t))return new t(N,w);var X=this;s(X),X.q=X.c="",X.bufferCheckPosition=r.MAX_BUFFER_LENGTH,X.opt=w||{},X.opt.lowercase=X.opt.lowercase||X.opt.lowercasetags,X.looseCase=X.opt.lowercase?"toLowerCase":"toUpperCase",X.tags=[],X.closed=X.closedRoot=X.sawRoot=!1,X.tag=X.error=null,X.strict=!!N,X.noscript=!!(N||X.opt.noscript),X.state=I.BEGIN,X.strictEntities=X.opt.strictEntities,X.ENTITIES=X.strictEntities?Object.create(r.XML_ENTITIES):Object.create(r.ENTITIES),X.attribList=[],X.opt.xmlns&&(X.ns=Object.create(v)),X.opt.unquotedAttributeValues===void 0&&(X.opt.unquotedAttributeValues=!N),X.trackPosition=X.opt.position!==!1,X.trackPosition&&(X.position=X.line=X.column=0),K(X,"onready")}o(t,"SAXParser"),Object.create||(Object.create=function(N){function w(){}o(w,"F"),w.prototype=N;var X=new w;return X}),Object.keys||(Object.keys=function(N){var w=[];for(var X in N)N.hasOwnProperty(X)&&w.push(X);return w});function n(N){for(var w=Math.max(r.MAX_BUFFER_LENGTH,10),X=0,P=0,be=e.length;P<be;P++){var Ee=N[e[P]].length;if(Ee>w)switch(e[P]){case"textNode":z(N);break;case"cdata":F(N,"oncdata",N.cdata),N.cdata="";break;case"script":F(N,"onscript",N.script),N.script="";break;default:pe(N,"Max buffer length exceeded: "+e[P])}X=Math.max(X,Ee)}var Se=r.MAX_BUFFER_LENGTH-X;N.bufferCheckPosition=Se+N.position}o(n,"checkBufferLength");function s(N){for(var w=0,X=e.length;w<X;w++)N[e[w]]=""}o(s,"clearBuffers");function i(N){z(N),N.cdata!==""&&(F(N,"oncdata",N.cdata),N.cdata=""),N.script!==""&&(F(N,"onscript",N.script),N.script="")}o(i,"flushBuffers"),t.prototype={end:o(function(){oe(this)},"end"),write:ft,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=We("stream").Stream}catch{a=o(function(){},"Stream")}a||(a=o(function(){},"Stream"));var u=r.EVENTS.filter(function(N){return N!=="error"&&N!=="end"});function c(N,w){return new f(N,w)}o(c,"createStream");function f(N,w){if(!(this instanceof f))return new f(N,w);a.apply(this),this._parser=new t(N,w),this.writable=!0,this.readable=!0;var X=this;this._parser.onend=function(){X.emit("end")},this._parser.onerror=function(P){X.emit("error",P),X._parser.error=null},this._decoder=null,u.forEach(function(P){Object.defineProperty(X,"on"+P,{get:o(function(){return X._parser["on"+P]},"get"),set:o(function(be){if(!be)return X.removeAllListeners(P),X._parser["on"+P]=be,be;X.on(P,be)},"set"),enumerable:!0,configurable:!1})})}o(f,"SAXStream"),f.prototype=Object.create(a.prototype,{constructor:{value:f}}),f.prototype.write=function(N){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(N)){if(!this._decoder){var w=We("string_decoder").StringDecoder;this._decoder=new w("utf8")}N=this._decoder.write(N)}return this._parser.write(N.toString()),this.emit("data",N),!0},f.prototype.end=function(N){return N&&N.length&&this.write(N),this._parser.end(),!0},f.prototype.on=function(N,w){var X=this;return!X._parser["on"+N]&&u.indexOf(N)!==-1&&(X._parser["on"+N]=function(){var P=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);P.splice(0,0,N),X.emit.apply(X,P)}),a.prototype.on.call(X,N,w)};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},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]/,E=/[:_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-]/,C=/[#:_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]/,_=/[#:_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(N){return N===" "||N===`
91
+ `||N==="\r"||N===" "}o(b,"isWhitespace");function A(N){return N==='"'||N==="'"}o(A,"isQuote");function T(N){return N===">"||b(N)}o(T,"isAttribEnd");function R(N,w){return N.test(w)}o(R,"isMatch");function H(N,w){return!R(N,w)}o(H,"notMatch");var I=0;r.STATE={BEGIN:I++,BEGIN_WHITESPACE:I++,TEXT:I++,TEXT_ENTITY:I++,OPEN_WAKA:I++,SGML_DECL:I++,SGML_DECL_QUOTED:I++,DOCTYPE:I++,DOCTYPE_QUOTED:I++,DOCTYPE_DTD:I++,DOCTYPE_DTD_QUOTED:I++,COMMENT_STARTING:I++,COMMENT:I++,COMMENT_ENDING:I++,COMMENT_ENDED:I++,CDATA:I++,CDATA_ENDING:I++,CDATA_ENDING_2:I++,PROC_INST:I++,PROC_INST_BODY:I++,PROC_INST_ENDING:I++,OPEN_TAG:I++,OPEN_TAG_SLASH:I++,ATTRIB:I++,ATTRIB_NAME:I++,ATTRIB_NAME_SAW_WHITE:I++,ATTRIB_VALUE:I++,ATTRIB_VALUE_QUOTED:I++,ATTRIB_VALUE_CLOSED:I++,ATTRIB_VALUE_UNQUOTED:I++,ATTRIB_VALUE_ENTITY_Q:I++,ATTRIB_VALUE_ENTITY_U:I++,CLOSE_TAG:I++,CLOSE_TAG_SAW_WHITE:I++,SCRIPT:I++,SCRIPT_ENDING:I++},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(N){var w=r.ENTITIES[N],X=typeof w=="number"?String.fromCharCode(w):w;r.ENTITIES[N]=X});for(var $ in r.STATE)r.STATE[r.STATE[$]]=$;I=r.STATE;function K(N,w,X){N[w]&&N[w](X)}o(K,"emit");function F(N,w,X){N.textNode&&z(N),K(N,w,X)}o(F,"emitNode");function z(N){N.textNode=he(N.opt,N.textNode),N.textNode&&K(N,"ontext",N.textNode),N.textNode=""}o(z,"closeText");function he(N,w){return N.trim&&(w=w.trim()),N.normalize&&(w=w.replace(/\s+/g," ")),w}o(he,"textopts");function pe(N,w){return z(N),N.trackPosition&&(w+=`
92
+ Line: `+N.line+`
93
+ Column: `+N.column+`
94
+ Char: `+N.c),w=new Error(w),N.error=w,K(N,"onerror",w),N}o(pe,"error");function oe(N){return N.sawRoot&&!N.closedRoot&&Q(N,"Unclosed root tag"),N.state!==I.BEGIN&&N.state!==I.BEGIN_WHITESPACE&&N.state!==I.TEXT&&pe(N,"Unexpected end"),z(N),N.c="",N.closed=!0,K(N,"onend"),t.call(N,N.strict,N.opt),N}o(oe,"end");function Q(N,w){if(typeof N!="object"||!(N instanceof t))throw new Error("bad call to strictFail");N.strict&&pe(N,w)}o(Q,"strictFail");function xe(N){N.strict||(N.tagName=N.tagName[N.looseCase]());var w=N.tags[N.tags.length-1]||N,X=N.tag={name:N.tagName,attributes:{}};N.opt.xmlns&&(X.ns=w.ns),N.attribList.length=0,F(N,"onopentagstart",X)}o(xe,"newTag");function Me(N,w){var X=N.indexOf(":"),P=X<0?["",N]:N.split(":"),be=P[0],Ee=P[1];return w&&N==="xmlns"&&(be="xmlns",Ee=""),{prefix:be,local:Ee}}o(Me,"qname");function Qe(N){if(N.strict||(N.attribName=N.attribName[N.looseCase]()),N.attribList.indexOf(N.attribName)!==-1||N.tag.attributes.hasOwnProperty(N.attribName)){N.attribName=N.attribValue="";return}if(N.opt.xmlns){var w=Me(N.attribName,!0),X=w.prefix,P=w.local;if(X==="xmlns")if(P==="xml"&&N.attribValue!==g)Q(N,"xml: prefix must be bound to "+g+`
95
+ Actual: `+N.attribValue);else if(P==="xmlns"&&N.attribValue!==x)Q(N,"xmlns: prefix must be bound to "+x+`
96
+ Actual: `+N.attribValue);else{var be=N.tag,Ee=N.tags[N.tags.length-1]||N;be.ns===Ee.ns&&(be.ns=Object.create(Ee.ns)),be.ns[P]=N.attribValue}N.attribList.push([N.attribName,N.attribValue])}else N.tag.attributes[N.attribName]=N.attribValue,F(N,"onattribute",{name:N.attribName,value:N.attribValue});N.attribName=N.attribValue=""}o(Qe,"attrib");function de(N,w){if(N.opt.xmlns){var X=N.tag,P=Me(N.tagName);X.prefix=P.prefix,X.local=P.local,X.uri=X.ns[P.prefix]||"",X.prefix&&!X.uri&&(Q(N,"Unbound namespace prefix: "+JSON.stringify(N.tagName)),X.uri=P.prefix);var be=N.tags[N.tags.length-1]||N;X.ns&&be.ns!==X.ns&&Object.keys(X.ns).forEach(function(wn){F(N,"onopennamespace",{prefix:wn,uri:X.ns[wn]})});for(var Ee=0,Se=N.attribList.length;Ee<Se;Ee++){var ze=N.attribList[Ee],Ct=ze[0],Ue=ze[1],wt=Me(Ct,!0),Gr=wt.prefix,Je=wt.local,Nr=Gr===""?"":X.ns[Gr]||"",qr={name:Ct,value:Ue,prefix:Gr,local:Je,uri:Nr};Gr&&Gr!=="xmlns"&&!Nr&&(Q(N,"Unbound namespace prefix: "+JSON.stringify(Gr)),qr.uri=Gr),N.tag.attributes[Ct]=qr,F(N,"onattribute",qr)}N.attribList.length=0}N.tag.isSelfClosing=!!w,N.sawRoot=!0,N.tags.push(N.tag),F(N,"onopentag",N.tag),w||(!N.noscript&&N.tagName.toLowerCase()==="script"?N.state=I.SCRIPT:N.state=I.TEXT,N.tag=null,N.tagName=""),N.attribName=N.attribValue="",N.attribList.length=0}o(de,"openTag");function fe(N){if(!N.tagName){Q(N,"Weird empty close tag."),N.textNode+="</>",N.state=I.TEXT;return}if(N.script){if(N.tagName!=="script"){N.script+="</"+N.tagName+">",N.tagName="",N.state=I.SCRIPT;return}F(N,"onscript",N.script),N.script=""}var w=N.tags.length,X=N.tagName;N.strict||(X=X[N.looseCase]());for(var P=X;w--;){var be=N.tags[w];if(be.name!==P)Q(N,"Unexpected close tag");else break}if(w<0){Q(N,"Unmatched closing tag: "+N.tagName),N.textNode+="</"+N.tagName+">",N.state=I.TEXT;return}N.tagName=X;for(var Ee=N.tags.length;Ee-- >w;){var Se=N.tag=N.tags.pop();N.tagName=N.tag.name,F(N,"onclosetag",N.tagName);var ze={};for(var Ct in Se.ns)ze[Ct]=Se.ns[Ct];var Ue=N.tags[N.tags.length-1]||N;N.opt.xmlns&&Se.ns!==Ue.ns&&Object.keys(Se.ns).forEach(function(wt){var Gr=Se.ns[wt];F(N,"onclosenamespace",{prefix:wt,uri:Gr})})}w===0&&(N.closedRoot=!0),N.tagName=N.attribValue=N.attribName="",N.attribList.length=0,N.state=I.TEXT}o(fe,"closeTag");function Re(N){var w=N.entity,X=w.toLowerCase(),P,be="";return N.ENTITIES[w]?N.ENTITIES[w]:N.ENTITIES[X]?N.ENTITIES[X]:(w=X,w.charAt(0)==="#"&&(w.charAt(1)==="x"?(w=w.slice(2),P=parseInt(w,16),be=P.toString(16)):(w=w.slice(1),P=parseInt(w,10),be=P.toString(10))),w=w.replace(/^0+/,""),isNaN(P)||be.toLowerCase()!==w?(Q(N,"Invalid character entity"),"&"+N.entity+";"):String.fromCodePoint(P))}o(Re,"parseEntity");function $e(N,w){w==="<"?(N.state=I.OPEN_WAKA,N.startTagPosition=N.position):b(w)||(Q(N,"Non-whitespace before first tag."),N.textNode=w,N.state=I.TEXT)}o($e,"beginWhiteSpace");function Ge(N,w){var X="";return w<N.length&&(X=N.charAt(w)),X}o(Ge,"charAt");function ft(N){var w=this;if(this.error)throw this.error;if(w.closed)return pe(w,"Cannot write after close. Assign an onready handler.");if(N===null)return oe(w);typeof N=="object"&&(N=N.toString());for(var X=0,P="";P=Ge(N,X++),w.c=P,!!P;)switch(w.trackPosition&&(w.position++,P===`
97
+ `?(w.line++,w.column=0):w.column++),w.state){case I.BEGIN:if(w.state=I.BEGIN_WHITESPACE,P==="\uFEFF")continue;$e(w,P);continue;case I.BEGIN_WHITESPACE:$e(w,P);continue;case I.TEXT:if(w.sawRoot&&!w.closedRoot){for(var be=X-1;P&&P!=="<"&&P!=="&";)P=Ge(N,X++),P&&w.trackPosition&&(w.position++,P===`
98
+ `?(w.line++,w.column=0):w.column++);w.textNode+=N.substring(be,X-1)}P==="<"&&!(w.sawRoot&&w.closedRoot&&!w.strict)?(w.state=I.OPEN_WAKA,w.startTagPosition=w.position):(!b(P)&&(!w.sawRoot||w.closedRoot)&&Q(w,"Text data outside of root node."),P==="&"?w.state=I.TEXT_ENTITY:w.textNode+=P);continue;case I.SCRIPT:P==="<"?w.state=I.SCRIPT_ENDING:w.script+=P;continue;case I.SCRIPT_ENDING:P==="/"?w.state=I.CLOSE_TAG:(w.script+="<"+P,w.state=I.SCRIPT);continue;case I.OPEN_WAKA:if(P==="!")w.state=I.SGML_DECL,w.sgmlDecl="";else if(!b(P))if(R(S,P))w.state=I.OPEN_TAG,w.tagName=P;else if(P==="/")w.state=I.CLOSE_TAG,w.tagName="";else if(P==="?")w.state=I.PROC_INST,w.procInstName=w.procInstBody="";else{if(Q(w,"Unencoded <"),w.startTagPosition+1<w.position){var Ee=w.position-w.startTagPosition;P=new Array(Ee).join(" ")+P}w.textNode+="<"+P,w.state=I.TEXT}continue;case I.SGML_DECL:if(w.sgmlDecl+P==="--"){w.state=I.COMMENT,w.comment="",w.sgmlDecl="";continue}w.doctype&&w.doctype!==!0&&w.sgmlDecl?(w.state=I.DOCTYPE_DTD,w.doctype+="<!"+w.sgmlDecl+P,w.sgmlDecl=""):(w.sgmlDecl+P).toUpperCase()===h?(F(w,"onopencdata"),w.state=I.CDATA,w.sgmlDecl="",w.cdata=""):(w.sgmlDecl+P).toUpperCase()===m?(w.state=I.DOCTYPE,(w.doctype||w.sawRoot)&&Q(w,"Inappropriately located doctype declaration"),w.doctype="",w.sgmlDecl=""):P===">"?(F(w,"onsgmldeclaration",w.sgmlDecl),w.sgmlDecl="",w.state=I.TEXT):(A(P)&&(w.state=I.SGML_DECL_QUOTED),w.sgmlDecl+=P);continue;case I.SGML_DECL_QUOTED:P===w.q&&(w.state=I.SGML_DECL,w.q=""),w.sgmlDecl+=P;continue;case I.DOCTYPE:P===">"?(w.state=I.TEXT,F(w,"ondoctype",w.doctype),w.doctype=!0):(w.doctype+=P,P==="["?w.state=I.DOCTYPE_DTD:A(P)&&(w.state=I.DOCTYPE_QUOTED,w.q=P));continue;case I.DOCTYPE_QUOTED:w.doctype+=P,P===w.q&&(w.q="",w.state=I.DOCTYPE);continue;case I.DOCTYPE_DTD:P==="]"?(w.doctype+=P,w.state=I.DOCTYPE):P==="<"?(w.state=I.OPEN_WAKA,w.startTagPosition=w.position):A(P)?(w.doctype+=P,w.state=I.DOCTYPE_DTD_QUOTED,w.q=P):w.doctype+=P;continue;case I.DOCTYPE_DTD_QUOTED:w.doctype+=P,P===w.q&&(w.state=I.DOCTYPE_DTD,w.q="");continue;case I.COMMENT:P==="-"?w.state=I.COMMENT_ENDING:w.comment+=P;continue;case I.COMMENT_ENDING:P==="-"?(w.state=I.COMMENT_ENDED,w.comment=he(w.opt,w.comment),w.comment&&F(w,"oncomment",w.comment),w.comment=""):(w.comment+="-"+P,w.state=I.COMMENT);continue;case I.COMMENT_ENDED:P!==">"?(Q(w,"Malformed comment"),w.comment+="--"+P,w.state=I.COMMENT):w.doctype&&w.doctype!==!0?w.state=I.DOCTYPE_DTD:w.state=I.TEXT;continue;case I.CDATA:P==="]"?w.state=I.CDATA_ENDING:w.cdata+=P;continue;case I.CDATA_ENDING:P==="]"?w.state=I.CDATA_ENDING_2:(w.cdata+="]"+P,w.state=I.CDATA);continue;case I.CDATA_ENDING_2:P===">"?(w.cdata&&F(w,"oncdata",w.cdata),F(w,"onclosecdata"),w.cdata="",w.state=I.TEXT):P==="]"?w.cdata+="]":(w.cdata+="]]"+P,w.state=I.CDATA);continue;case I.PROC_INST:P==="?"?w.state=I.PROC_INST_ENDING:b(P)?w.state=I.PROC_INST_BODY:w.procInstName+=P;continue;case I.PROC_INST_BODY:if(!w.procInstBody&&b(P))continue;P==="?"?w.state=I.PROC_INST_ENDING:w.procInstBody+=P;continue;case I.PROC_INST_ENDING:P===">"?(F(w,"onprocessinginstruction",{name:w.procInstName,body:w.procInstBody}),w.procInstName=w.procInstBody="",w.state=I.TEXT):(w.procInstBody+="?"+P,w.state=I.PROC_INST_BODY);continue;case I.OPEN_TAG:R(E,P)?w.tagName+=P:(xe(w),P===">"?de(w):P==="/"?w.state=I.OPEN_TAG_SLASH:(b(P)||Q(w,"Invalid character in tag name"),w.state=I.ATTRIB));continue;case I.OPEN_TAG_SLASH:P===">"?(de(w,!0),fe(w)):(Q(w,"Forward-slash in opening tag not followed by >"),w.state=I.ATTRIB);continue;case I.ATTRIB:if(b(P))continue;P===">"?de(w):P==="/"?w.state=I.OPEN_TAG_SLASH:R(S,P)?(w.attribName=P,w.attribValue="",w.state=I.ATTRIB_NAME):Q(w,"Invalid attribute name");continue;case I.ATTRIB_NAME:P==="="?w.state=I.ATTRIB_VALUE:P===">"?(Q(w,"Attribute without value"),w.attribValue=w.attribName,Qe(w),de(w)):b(P)?w.state=I.ATTRIB_NAME_SAW_WHITE:R(E,P)?w.attribName+=P:Q(w,"Invalid attribute name");continue;case I.ATTRIB_NAME_SAW_WHITE:if(P==="=")w.state=I.ATTRIB_VALUE;else{if(b(P))continue;Q(w,"Attribute without value"),w.tag.attributes[w.attribName]="",w.attribValue="",F(w,"onattribute",{name:w.attribName,value:""}),w.attribName="",P===">"?de(w):R(S,P)?(w.attribName=P,w.state=I.ATTRIB_NAME):(Q(w,"Invalid attribute name"),w.state=I.ATTRIB)}continue;case I.ATTRIB_VALUE:if(b(P))continue;A(P)?(w.q=P,w.state=I.ATTRIB_VALUE_QUOTED):(w.opt.unquotedAttributeValues||pe(w,"Unquoted attribute value"),w.state=I.ATTRIB_VALUE_UNQUOTED,w.attribValue=P);continue;case I.ATTRIB_VALUE_QUOTED:if(P!==w.q){P==="&"?w.state=I.ATTRIB_VALUE_ENTITY_Q:w.attribValue+=P;continue}Qe(w),w.q="",w.state=I.ATTRIB_VALUE_CLOSED;continue;case I.ATTRIB_VALUE_CLOSED:b(P)?w.state=I.ATTRIB:P===">"?de(w):P==="/"?w.state=I.OPEN_TAG_SLASH:R(S,P)?(Q(w,"No whitespace between attributes"),w.attribName=P,w.attribValue="",w.state=I.ATTRIB_NAME):Q(w,"Invalid attribute name");continue;case I.ATTRIB_VALUE_UNQUOTED:if(!T(P)){P==="&"?w.state=I.ATTRIB_VALUE_ENTITY_U:w.attribValue+=P;continue}Qe(w),P===">"?de(w):w.state=I.ATTRIB;continue;case I.CLOSE_TAG:if(w.tagName)P===">"?fe(w):R(E,P)?w.tagName+=P:w.script?(w.script+="</"+w.tagName,w.tagName="",w.state=I.SCRIPT):(b(P)||Q(w,"Invalid tagname in closing tag"),w.state=I.CLOSE_TAG_SAW_WHITE);else{if(b(P))continue;H(S,P)?w.script?(w.script+="</"+P,w.state=I.SCRIPT):Q(w,"Invalid tagname in closing tag."):w.tagName=P}continue;case I.CLOSE_TAG_SAW_WHITE:if(b(P))continue;P===">"?fe(w):Q(w,"Invalid characters in closing tag");continue;case I.TEXT_ENTITY:case I.ATTRIB_VALUE_ENTITY_Q:case I.ATTRIB_VALUE_ENTITY_U:var Se,ze;switch(w.state){case I.TEXT_ENTITY:Se=I.TEXT,ze="textNode";break;case I.ATTRIB_VALUE_ENTITY_Q:Se=I.ATTRIB_VALUE_QUOTED,ze="attribValue";break;case I.ATTRIB_VALUE_ENTITY_U:Se=I.ATTRIB_VALUE_UNQUOTED,ze="attribValue";break}if(P===";"){var Ct=Re(w);w.opt.unparsedEntities&&!Object.values(r.XML_ENTITIES).includes(Ct)?(w.entity="",w.state=Se,w.write(Ct)):(w[ze]+=Ct,w.entity="",w.state=Se)}else R(w.entity.length?_:C,P)?w.entity+=P:(Q(w,"Invalid character in entity name"),w[ze]+="&"+w.entity+P,w.entity="",w.state=Se);continue;default:throw new Error(w,"Unknown state: "+w.state)}return w.position>=w.bufferCheckPosition&&n(w),w}o(ft,"write");String.fromCodePoint||(function(){var N=String.fromCharCode,w=Math.floor,X=o(function(){var P=16384,be=[],Ee,Se,ze=-1,Ct=arguments.length;if(!Ct)return"";for(var Ue="";++ze<Ct;){var wt=Number(arguments[ze]);if(!isFinite(wt)||wt<0||wt>1114111||w(wt)!==wt)throw RangeError("Invalid code point: "+wt);wt<=65535?be.push(wt):(wt-=65536,Ee=(wt>>10)+55296,Se=wt%1024+56320,be.push(Ee,Se)),(ze+1===Ct||be.length>P)&&(Ue+=N.apply(null,be),be.length=0)}return Ue},"fromCodePoint");Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:X,configurable:!0,writable:!0}):String.fromCodePoint=X})()})(typeof SE>"u"?SE.sax={}:SE)});var zj=te(p_=>{"use strict";(function(){"use strict";p_.stripBOM=function(r){return r[0]==="\uFEFF"?r.substring(1):r}}).call(p_)});var d_=te(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 Jj=te(Vo=>{"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 S(){this.constructor=g}return o(S,"ctor"),S.prototype=x.prototype,g.prototype=new S,g.__super__=x.prototype,g},"extend"),m={}.hasOwnProperty;u=Wj(),n=We("events"),r=zj(),a=d_(),c=We("timers").setImmediate,e=aE().defaults,s=o(function(g){return typeof g=="object"&&g!=null&&Object.keys(g).length===0},"isEmpty"),i=o(function(g,x,v){var S,E,C;for(S=0,E=g.length;S<E;S++)C=g[S],x=C(x,v);return x},"processItem"),t=o(function(g,x,v){var S;return S=Object.create(null),S.value=v,S.writable=!0,S.enumerable=!0,S.configurable=!0,Object.defineProperty(g,x,S)},"defineProperty"),Vo.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 S,E,C;if(!(this instanceof Vo.Parser))return new Vo.Parser(v);this.options={},E=e["0.2"];for(S in E)m.call(E,S)&&(C=E[S],this.options[S]=C);for(S in v)m.call(v,S)&&(C=v[S],this.options[S]=C);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,S;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(E){if(S=E,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(S)}},x.prototype.assignOrPush=function(v,S,E){return S in v?(v[S]instanceof Array||t(v,S,[v[S]]),v[S].push(E)):this.options.explicitArray?t(v,S,[E]):t(v,S,E)},x.prototype.reset=function(){var v,S,E,C;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(_){return function(b){if(_.saxParser.resume(),!_.saxParser.errThrown)return _.saxParser.errThrown=!0,_.emit("error",b)}})(this),this.saxParser.onend=(function(_){return function(){if(!_.saxParser.ended)return _.saxParser.ended=!0,_.emit("end",_.resultObject)}})(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,C=[],v=this.options.attrkey,S=this.options.charkey,this.saxParser.onopentag=(function(_){return function(b){var A,T,R,H,I;if(R={},R[S]="",!_.options.ignoreAttrs){I=b.attributes;for(A in I)m.call(I,A)&&(!(v in R)&&!_.options.mergeAttrs&&(R[v]={}),T=_.options.attrValueProcessors?i(_.options.attrValueProcessors,b.attributes[A],A):b.attributes[A],H=_.options.attrNameProcessors?i(_.options.attrNameProcessors,A):A,_.options.mergeAttrs?_.assignOrPush(R,H,T):t(R[v],H,T))}return R["#name"]=_.options.tagNameProcessors?i(_.options.tagNameProcessors,b.name):b.name,_.options.xmlns&&(R[_.options.xmlnskey]={uri:b.uri,local:b.local}),C.push(R)}})(this),this.saxParser.onclosetag=(function(_){return function(){var b,A,T,R,H,I,$,K,F,z;if(I=C.pop(),H=I["#name"],(!_.options.explicitChildren||!_.options.preserveChildrenOrder)&&delete I["#name"],I.cdata===!0&&(b=I.cdata,delete I.cdata),F=C[C.length-1],I[S].match(/^\s*$/)&&!b?(A=I[S],delete I[S]):(_.options.trim&&(I[S]=I[S].trim()),_.options.normalize&&(I[S]=I[S].replace(/\s{2,}/g," ").trim()),I[S]=_.options.valueProcessors?i(_.options.valueProcessors,I[S],H):I[S],Object.keys(I).length===1&&S in I&&!_.EXPLICIT_CHARKEY&&(I=I[S])),s(I)&&(typeof _.options.emptyTag=="function"?I=_.options.emptyTag():I=_.options.emptyTag!==""?_.options.emptyTag:A),_.options.validator!=null&&(z="/"+(function(){var he,pe,oe;for(oe=[],he=0,pe=C.length;he<pe;he++)R=C[he],oe.push(R["#name"]);return oe})().concat(H).join("/"),(function(){var he;try{return I=_.options.validator(z,F&&F[H],I)}catch(pe){return he=pe,_.emit("error",he)}})()),_.options.explicitChildren&&!_.options.mergeAttrs&&typeof I=="object"){if(!_.options.preserveChildrenOrder)R={},_.options.attrkey in I&&(R[_.options.attrkey]=I[_.options.attrkey],delete I[_.options.attrkey]),!_.options.charsAsChildren&&_.options.charkey in I&&(R[_.options.charkey]=I[_.options.charkey],delete I[_.options.charkey]),Object.getOwnPropertyNames(I).length>0&&(R[_.options.childkey]=I),I=R;else if(F){F[_.options.childkey]=F[_.options.childkey]||[],$={};for(T in I)m.call(I,T)&&t($,T,I[T]);F[_.options.childkey].push($),delete I["#name"],Object.keys(I).length===1&&S in I&&!_.EXPLICIT_CHARKEY&&(I=I[S])}}return C.length>0?_.assignOrPush(F,H,I):(_.options.explicitRoot&&(K=I,I={},t(I,H,K)),_.resultObject=I,_.saxParser.ended=!0,_.emit("end",_.resultObject))}})(this),E=(function(_){return function(b){var A,T;if(T=C[C.length-1],T)return T[S]+=b,_.options.explicitChildren&&_.options.preserveChildrenOrder&&_.options.charsAsChildren&&(_.options.includeWhiteChars||b.replace(/\\n/g,"").trim()!=="")&&(T[_.options.childkey]=T[_.options.childkey]||[],A={"#name":"__text__"},A[S]=b,_.options.normalize&&(A[S]=A[S].replace(/\s{2,}/g," ").trim()),T[_.options.childkey].push(A)),T}})(this),this.saxParser.ontext=E,this.saxParser.oncdata=(function(_){return function(b){var A;if(A=E(b),A)return A.cdata=!0}})(this)},x.prototype.parseString=function(v,S){var E;S!=null&&typeof S=="function"&&(this.on("end",function(C){return this.reset(),S(null,C)}),this.on("error",function(C){return this.reset(),S(C)}));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(C){if(E=C,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw E}else return this.emit("error",E),this.saxParser.errThrown=!0}},x.prototype.parseStringPromise=function(v){return new Promise((function(S){return function(E,C){return S.parseString(v,function(_,b){return _?C(_):E(b)})}})(this))},x})(n),Vo.parseString=function(g,x,v){var S,E,C;return v!=null?(typeof v=="function"&&(S=v),typeof x=="object"&&(E=x)):(typeof x=="function"&&(S=x),E={}),C=new Vo.Parser(E),C.parseString(g,S)},Vo.parseStringPromise=function(g,x){var v,S;return typeof x=="object"&&(v=x),S=new Vo.Parser(v),S.parseStringPromise(g)}}).call(Vo)});var Yj=te(Uo=>{"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=aE(),r=Xj(),t=Jj(),n=d_(),Uo.defaults=e.defaults,Uo.processors=n,Uo.ValidationError=(function(a){s(u,a);function u(c){this.message=c}return o(u,"ValidationError"),u})(Error),Uo.Builder=r.Builder,Uo.Parser=t.Parser,Uo.parseString=t.parseString,Uo.parseStringPromise=t.parseStringPromise}).call(Uo)});var _C="http://www.w3.org/2000/09/xmldsig#",gP="http://www.w3.org/TR/2001/REC-xml-c14n-20010315",DC=(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})({}),Nu=(function(r){return r.SHA1="sha1",r.SHA256="sha256",r})({}),BC=(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 Er={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"},Vhe=Object.keys(Er);var jhe={Production:"1",Homolog:"2"};var dn=class extends Error{static{o(this,"NFeTsError")}};var vP=class extends dn{static{o(this,"ValidationError")}};var K0={includeComments:!1,exclusive:!0};var RC=o(r=>{throw new dn("Didn't expect to get here")},"unreachable");var Zh=class{static{o(this,"Signer")}toolkit;certificateRepository;algorithm;canonical;constructor(e,t,n=Nu.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:_C},SignedInfo:e,SignatureValue:t,KeyInfo:{X509Data:{X509Certificate:s}}}}signedInfo(e,t){return{CanonicalizationMethod:{$:{Algorithm:gP}},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:_C},...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 Nu.SHA256:return BC.SHA256;case Nu.SHA1:return BC.SHA1;default:return RC(this.algorithm)}}get signatureMethod(){switch(this.algorithm){case Nu.SHA256:return DC.RSA_SHA256;case Nu.SHA1:return DC.RSA_SHA1;default:return RC(this.algorithm)}}};var OC=class{static{o(this,"Left")}value;constructor(e){this.value=e}isLeft(){return!0}isRight(){return!1}},ew=class{static{o(this,"Right")}value;constructor(e){this.value=e}isLeft(){return!1}isRight(){return!0}},ti=o(r=>new OC(r),"left"),ri=o(r=>r===void 0?new ew(void 0):new ew(r),"right");var yP=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 dn(`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 xP=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 dn(`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__",dpe=o(()=>(r,e)=>{Reflect.defineMetadata($0,!0,r,e.toString())},"SkipValidation"),mpe=o(()=>r=>{Reflect.defineMetadata($0,!0,r)},"SkipAllValidations");import{plainToInstance as RW}from"class-transformer";var tw=o(r=>{for(let[e,t]of Object.entries(r))typeof t>"u"&&delete r[e],t===""&&delete r[e],t&&typeof t=="object"&&tw(t)},"clearEmptyValues"),wP=o((r,e,t={})=>{let n=RW(e,r);return t.clearEmptyValues&&tw(n),n},"plainToInstance");import"reflect-metadata";import{validateSync as OW}from"class-validator";var SP="__ValidateErrors__",EP=o((r,e)=>r.reduce((t,n)=>{if(n.children?.length)return t.concat(EP(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"),Cpe=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=wP(c,r),m=OW(h,{whitelist:!0});if(tw(h),m.length){let g=Reflect.getMetadata(SP,this)??[];Reflect.defineMetadata(SP,g.concat(EP(m,s?.name)),this)}return s?.apply(this,[h,...f])}},"Validates");var ep=9e15,Du=1e9,PC="0123456789abcdef",sw="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",iw="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",kC={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ep,maxE:ep,crypto:!1},NP,Co,Bt=!0,ow="[DecimalError] ",_u=ow+"Invalid argument: ",TP=ow+"Precision limit exceeded",IP=ow+"crypto unavailable",_P="[object Decimal]",ss=Math.floor,bn=Math.pow,PW=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,kW=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,LW=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,DP=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Qi=1e7,bt=7,VW=9007199254740991,UW=sw.length-1,LC=iw.length-1,Pe={toStringTag:_P};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(_u+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=jW(n,kP(n,t)),n.precision=r,n.rounding=e,gt(Co==2||Co==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(Bt=!1,i=h.s*bn(h.s*h,1/3),!i||Math.abs(i)==1/0?(t=Hn(h.d),r=h.e,(i=(r-t.length+1)%3)&&(t+=i==1||i==-2?"0":"00"),i=bn(t,1/3),r=ss((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=Ir(f.plus(h).times(u),f.plus(c),a+2,1),Hn(u.d).slice(0,a)===(t=Hn(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 Bt=!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-ss(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 Ir(this,new this.constructor(r))};Pe.dividedToIntegerBy=Pe.divToInt=function(r){var e=this,t=e.constructor;return gt(Ir(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/cw(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/cw(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,Ir(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()?Ta(e,n,s):new e(0):new e(NaN):r.isZero()?Ta(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,Bt=!1,t=t.times(t).minus(1).sqrt().plus(t),Bt=!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,Bt=!1,t=t.times(t).plus(1).sqrt().plus(t),Bt=!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=Ir(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=Ta(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<=LC)return a=Ta(h,m+4,g).times(.25),a.s=f.s,a}else{if(!f.s)return new h(NaN);if(m+4<=LC)return a=Ta(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(Bt=!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)),Bt=!0,gt(a,h.precision=m,h.rounding=g,!0)};Pe.isFinite=function(){return!!this.d};Pe.isInteger=Pe.isInt=function(){return!!this.d&&ss(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(Bt=!1,u=m+x,a=Iu(f,u),n=e?aw(h,u+10):Iu(r,u),c=Ir(a,n,u,1),G0(c.d,s=m,g))do if(u+=10,a=Iu(f,u),n=e?aw(h,u+10):Iu(r,u),c=Ir(a,n,u,1),!i){+Hn(c.d).slice(s+1,s+15)+1==1e14&&(c=gt(c,m+1,0));break}while(G0(c.d,s+=10,g));return Bt=!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 Bt?gt(r,u,c):r}if(t=ss(r.e/bt),h=ss(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=uw(f,t),Bt?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):(Bt=!1,n.modulo==9?(e=Ir(t,r.abs(),0,3,1),e.s*=r.s):e=Ir(t,r,0,n.modulo,1),e=e.times(r),Bt=!0,t.minus(e))};Pe.naturalExponential=Pe.exp=function(){return VC(this)};Pe.naturalLogarithm=Pe.ln=function(){return Iu(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)),Bt?gt(r,u,c):r;if(i=ss(m.e/bt),n=ss(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=uw(f,n),Bt?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(_u+r);return t.d?(e=BP(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=FW(n,kP(n,t)),n.precision=r,n.rounding=e,gt(Co>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(Bt=!1,f=Math.sqrt(+a),f==0||f==1/0?(e=Hn(u),(e.length+c)%2==0&&(e+="0"),f=Math.sqrt(e),c=ss((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(Ir(a,i,t+2,1)).times(.5),Hn(i.d).slice(0,t)===(e=Hn(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 Bt=!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=Ir(t,new n(1).minus(t.times(t)).sqrt(),r+10,0),n.precision=r,n.rounding=e,gt(Co==2||Co==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=ss(h.e/bt)+ss(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=uw(i,t),Bt?gt(r,m.precision,m.rounding):r};Pe.toBinary=function(r,e){return UC(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:(_s(r,0,Du),e===void 0?e=n.rounding:_s(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=Ia(n,!0):(_s(r,0,Du),e===void 0?e=s.rounding:_s(e,0,8),n=gt(new s(n),r+1,e),t=Ia(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=Ia(s):(_s(r,0,Du),e===void 0?e=i.rounding:_s(e,0,8),n=gt(new i(s),r+s.e+1,e),t=Ia(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,S=x.constructor;if(!v)return new S(x);if(f=t=new S(1),n=c=new S(0),e=new S(n),i=e.e=BP(v)-x.e-1,a=i%bt,e.d[0]=bn(10,a<0?bt+a:a),r==null)r=i>0?e:f;else{if(u=new S(r),!u.isInt()||u.lt(f))throw Error(_u+u);r=u.gt(e)?i>0?e:f:u}for(Bt=!1,u=new S(Hn(v)),h=S.precision,S.precision=i=v.length*bt*2;m=Ir(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=Ir(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=Ir(f,n,i,1).minus(x).abs().cmp(Ir(c,t,i,1).minus(x).abs())<1?[f,n]:[c,t],S.precision=h,Bt=!0,g};Pe.toHexadecimal=Pe.toHex=function(r,e){return UC(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:_s(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]?(Bt=!1,t=Ir(t,r,0,e,1).times(r),Bt=!0,gt(t)):(r.s=t.s,t=r),t};Pe.toNumber=function(){return+this};Pe.toOctal=function(r,e){return UC(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(bn(+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=ss(r.e/bt),e>=r.d.length-1&&(t=f<0?-f:f)<=VW)return s=RP(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=bn(+u,f),e=t==0||!isFinite(t)?ss(f*(Math.log("0."+Hn(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):(Bt=!1,c.rounding=u.s=1,t=Math.min(12,(e+"").length),s=VC(r.times(Iu(u,n+t)),n),s.d&&(s=gt(s,n+5,1),G0(s.d,n,i)&&(e=n+10,s=gt(VC(r.times(Iu(u,e+t)),e),e+5,1),+Hn(s.d).slice(n+1,n+15)+1==1e14&&(s=gt(s,n+1,0)))),s.s=a,Bt=!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=Ia(n,n.e<=s.toExpNeg||n.e>=s.toExpPos):(_s(r,1,Du),e===void 0?e=s.rounding:_s(e,0,8),n=gt(new s(n),r,e),t=Ia(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):(_s(r,1,Du),e===void 0?e=n.rounding:_s(e,0,8)),gt(new n(t),r,e)};Pe.toString=function(){var r=this,e=r.constructor,t=Ia(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=Ia(r,r.e<=e.toExpNeg||r.e>=e.toExpPos);return r.isNeg()?"-"+t:t};function Hn(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+=Tu(t)),i+=n;a=r[e],n=a+"",t=bt-n.length,t&&(i+=Tu(t))}else if(a===0)return"0";for(;a%10===0;)a/=10;return i+a}o(Hn,"digitsToString");function _s(r,e,t){if(r!==~~r||r<e||r>t)throw Error(_u+r)}o(_s,"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=bn(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)==bn(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)==bn(10,e-3)-1,a}o(G0,"checkRoundingDigits");function rw(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]+=PC.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(rw,"convertBase");function jW(r,e){var t,n,s;if(e.isZero())return e;n=e.d.length,n<32?(t=Math.ceil(n/3),s=(1/cw(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(jW,"cosine");var Ir=(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,S,E,C,_,b,A,T,R,H,I,$,K,F,z,he=n.constructor,pe=n.s==s.s?1:-1,oe=n.d,Q=s.d;if(!oe||!oe[0]||!Q||!Q[0])return new he(!n.s||!s.s||(oe?Q&&oe[0]==Q[0]:!Q)?NaN:oe&&oe[0]==0||!Q?pe*0:pe/0);for(c?(x=1,h=n.e-s.e):(c=Qi,x=bt,h=ss(n.e/x)-ss(s.e/x)),F=Q.length,$=oe.length,C=new he(pe),_=C.d=[],m=0;Q[m]==(oe[m]||0);m++);if(Q[m]>(oe[m]||0)&&h--,i==null?(R=i=he.precision,a=he.rounding):u?R=i+(n.e-s.e)+1:R=i,R<0)_.push(1),v=!0;else{if(R=R/x+2|0,m=0,F==1){for(g=0,Q=Q[0],R++;(m<$||g)&&R--;m++)H=g*c+(oe[m]||0),_[m]=H/Q|0,g=H%Q|0;v=g||m<$}else{for(g=c/(Q[0]+1)|0,g>1&&(Q=r(Q,g,c),oe=r(oe,g,c),F=Q.length,$=oe.length),I=F,b=oe.slice(0,F),A=b.length;A<F;)b[A++]=0;z=Q.slice(),z.unshift(0),K=Q[0],Q[1]>=c/2&&++K;do g=0,f=e(Q,b,F,A),f<0?(T=b[0],F!=A&&(T=T*c+(b[1]||0)),g=T/K|0,g>1?(g>=c&&(g=c-1),S=r(Q,g,c),E=S.length,A=b.length,f=e(S,b,E,A),f==1&&(g--,t(S,F<E?z:Q,E,c))):(g==0&&(f=g=1),S=Q.slice()),E=S.length,E<A&&S.unshift(0),t(b,S,A,c),f==-1&&(A=b.length,f=e(Q,b,F,A),f<1&&(g++,t(b,F<A?z:Q,A,c))),A=b.length):f===0&&(g++,b=[0]),_[m++]=g,f&&b[0]?b[A++]=oe[I]||0:(b=[oe[I]],A=1);while((I++<$||b[0]!==void 0)&&R--);v=b[0]!==void 0}_[0]||_.shift()}if(x==1)C.e=h,NP=v;else{for(m=1,g=_[0];g>=10;g/=10)m++;C.e=m+h*x-1,gt(C,u?i+C.e+1:i,a,v)}return C}})();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/bn(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/bn(10,s-a-1)%10|0}if(n=n||e<0||m[g+1]!==void 0||(a<0?h:h%bn(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/bn(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]=bn(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=bn(10,bt-i),m[g]=a>0?(h/bn(10,s-a)%bn(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 Bt&&(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 Ia(r,e,t){if(!r.isFinite())return PP(r);var n,s=r.e,i=Hn(r.d),a=i.length;return e?(t&&(n=t-a)>0?i=i.charAt(0)+"."+i.slice(1)+Tu(n):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(r.e<0?"e":"e+")+r.e):s<0?(i="0."+Tu(-s-1)+i,t&&(n=t-a)>0&&(i+=Tu(n))):s>=a?(i+=Tu(s+1-a),t&&(n=t-s-1)>0&&(i=i+"."+Tu(n))):((n=s+1)<a&&(i=i.slice(0,n)+"."+i.slice(n)),t&&(n=t-a)>0&&(s+1===a&&(i+="."),i+=Tu(n))),i}o(Ia,"finiteToString");function uw(r,e){var t=r[0];for(e*=bt;t>=10;t/=10)e++;return e}o(uw,"getBase10Exponent");function aw(r,e,t){if(e>UW)throw Bt=!0,t&&(r.precision=t),Error(TP);return gt(new r(sw),e,1,!0)}o(aw,"getLn10");function Ta(r,e,t){if(e>LC)throw Error(TP);return gt(new r(iw),e,t,!0)}o(Ta,"getPi");function BP(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(BP,"getPrecision");function Tu(r){for(var e="";r--;)e+="0";return e}o(Tu,"getZeroString");function RP(r,e,t,n){var s,i=new r(1),a=Math.ceil(n/bt+4);for(Bt=!1;;){if(t%2&&(i=i.times(e),AP(i.d,a)&&(s=!0)),t=ss(t/2),t===0){t=i.d.length-1,s&&i.d[t]===0&&++i.d[t];break}e=e.times(e),AP(e.d,a)}return Bt=!0,i}o(RP,"intPow");function bP(r){return r.d[r.d.length-1]&1}o(bP,"isOdd");function OP(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(OP,"maxOrMin");function VC(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?(Bt=!1,c=v):c=e,u=new g(.03125);r.e>-2;)r=r.times(u),m+=5;for(n=Math.log(bn(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(Ir(i,t,c,1)),Hn(u.d).slice(0,c)===Hn(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,Bt=!0);else return g.precision=v,a}a=u}}o(VC,"naturalExponential");function Iu(r,e){var t,n,s,i,a,u,c,f,h,m,g,x=1,v=10,S=r,E=S.d,C=S.constructor,_=C.rounding,b=C.precision;if(S.s<0||!E||!E[0]||!S.e&&E[0]==1&&E.length==1)return new C(E&&!E[0]?-1/0:S.s!=1?NaN:E?0:S);if(e==null?(Bt=!1,h=b):h=e,C.precision=h+=v,t=Hn(E),n=t.charAt(0),Math.abs(i=S.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)S=S.times(r),t=Hn(S.d),n=t.charAt(0),x++;i=S.e,n>1?(S=new C("0."+t),i++):S=new C(n+"."+t.slice(1))}else return f=aw(C,h+2,b).times(i+""),S=Iu(new C(n+"."+t.slice(1)),h-v).plus(f),C.precision=b,e==null?gt(S,b,_,Bt=!0):S;for(m=S,c=a=S=Ir(S.minus(1),S.plus(1),h,1),g=gt(S.times(S),h,1),s=3;;){if(a=gt(a.times(g),h,1),f=c.plus(Ir(a,new C(s),h,1)),Hn(f.d).slice(0,h)===Hn(c.d).slice(0,h))if(c=c.times(2),i!==0&&(c=c.plus(aw(C,h+2,b).times(i+""))),c=Ir(c,new C(x),h,1),e==null)if(G0(c.d,h-v,_,u))C.precision=h+=v,f=a=S=Ir(m.minus(1),m.plus(1),h,1),g=gt(S.times(S),h,1),s=u=1;else return gt(c,C.precision=b,_,Bt=!0);else return C.precision=b,c;c=f,s+=2}}o(Iu,"naturalLogarithm");function PP(r){return String(r.s*r.s/0)}o(PP,"nonFiniteToString");function nw(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),Bt&&(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(nw,"parseDecimal");function MW(r,e){var t,n,s,i,a,u,c,f,h;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),DP.test(e))return nw(r,e)}else if(e==="Infinity"||e==="NaN")return+e||(r.s=NaN),r.e=NaN,r.d=null,r;if(kW.test(e))t=16,e=e.toLowerCase();else if(PW.test(e))t=2;else if(LW.test(e))t=8;else throw Error(_u+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=RP(n,new n(t),i,i*2)),f=rw(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=uw(f,h),r.d=f,Bt=!1,a&&(r=Ir(r,s,u*4)),c&&(r=r.times(Math.abs(c)<54?bn(2,c):rp.pow(2,c))),Bt=!0,r)}o(MW,"parseOther");function FW(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/cw(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(FW,"sine");function tp(r,e,t,n,s){var i,a,u,c,f=1,h=r.precision,m=Math.ceil(h/bt);for(Bt=!1,c=t.times(t),u=new r(n);;){if(a=Ir(u.times(c),new r(e++*e++),h,1),u=s?n.plus(a):n.minus(a),n=Ir(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 Bt=!0,a.d.length=m+1,a}o(tp,"taylorSeries");function cw(r,e){for(var t=r;--e;)t*=r;return t}o(cw,"tinyPow");function kP(r,e){var t,n=e.s<0,s=Ta(r,r.precision,1),i=s.times(.5);if(e=e.abs(),e.lte(i))return Co=n?4:1,e;if(t=e.divToInt(s),t.isZero())Co=n?3:2;else{if(e=e.minus(t.times(s)),e.lte(i))return Co=bP(t)?n?2:3:n?4:1,e;Co=bP(t)?n?1:4:n?3:2}return e.minus(s).abs()}o(kP,"toLessThanHalfPi");function UC(r,e,t,n){var s,i,a,u,c,f,h,m,g,x=r.constructor,v=t!==void 0;if(v?(_s(t,1,Du),n===void 0?n=x.rounding:_s(n,0,8)):(t=x.precision,n=x.rounding),!r.isFinite())h=PP(r);else{for(h=Ia(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=rw(Ia(g),10,s),g.e=g.d.length),m=rw(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=Ir(r,g,t,n,0,s),m=r.d,i=r.e,f=NP),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+=PC.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=rw(h,s,e),c=m.length;!m[c-1];--c);for(a=1,h="1.";a<c;a++)h+=PC.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(UC,"toStringBinary");function AP(r,e){if(r.length>e)return r.length=e,!0}o(AP,"truncate");function qW(r){return new this(r).abs()}o(qW,"abs");function HW(r){return new this(r).acos()}o(HW,"acos");function KW(r){return new this(r).acosh()}o(KW,"acosh");function $W(r,e){return new this(r).plus(e)}o($W,"add");function GW(r){return new this(r).asin()}o(GW,"asin");function XW(r){return new this(r).asinh()}o(XW,"asinh");function WW(r){return new this(r).atan()}o(WW,"atan");function zW(r){return new this(r).atanh()}o(zW,"atanh");function JW(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=Ta(this,i,1).times(e.s>0?.25:.75),t.s=r.s):!e.d||r.isZero()?(t=e.s<0?Ta(this,n,s):new this(0),t.s=r.s):!r.d||e.isZero()?(t=Ta(this,i,1).times(.5),t.s=r.s):e.s<0?(this.precision=i,this.rounding=1,t=this.atan(Ir(r,e,i,1)),e=Ta(this,i,1),this.precision=n,this.rounding=s,t=r.s<0?t.minus(e):t.plus(e)):t=this.atan(Ir(r,e,i,1)),t}o(JW,"atan2");function YW(r){return new this(r).cbrt()}o(YW,"cbrt");function QW(r){return gt(r=new this(r),r.e+1,2)}o(QW,"ceil");function ZW(r,e,t){return new this(r).clamp(e,t)}o(ZW,"clamp");function ez(r){if(!r||typeof r!="object")throw Error(ow+"Object expected");var e,t,n,s=r.defaults===!0,i=["precision",1,Du,"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]=kC[t]),(n=r[t])!==void 0)if(ss(n)===n&&n>=i[e+1]&&n<=i[e+2])this[t]=n;else throw Error(_u+t+": "+n);if(t="crypto",s&&(this[t]=kC[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(IP);else this[t]=!1;else throw Error(_u+t+": "+n);return this}o(ez,"config");function tz(r){return new this(r).cos()}o(tz,"cos");function rz(r){return new this(r).cosh()}o(rz,"cosh");function LP(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,CP(i)){f.s=i.s,Bt?!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++;Bt?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 nw(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),DP.test(i)?nw(f,i):MW(f,i);if(c==="bigint")return i<0?(i=-i,f.s=-1):f.s=1,nw(f,i.toString());throw Error(_u+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=ez,s.clone=LP,s.isDecimal=CP,s.abs=qW,s.acos=HW,s.acosh=KW,s.add=$W,s.asin=GW,s.asinh=XW,s.atan=WW,s.atanh=zW,s.atan2=JW,s.cbrt=YW,s.ceil=QW,s.clamp=ZW,s.cos=tz,s.cosh=rz,s.div=nz,s.exp=sz,s.floor=iz,s.hypot=az,s.ln=oz,s.log=uz,s.log10=lz,s.log2=cz,s.max=fz,s.min=hz,s.mod=pz,s.mul=dz,s.pow=mz,s.random=gz,s.round=vz,s.sign=yz,s.sin=xz,s.sinh=wz,s.sqrt=Sz,s.sub=Ez,s.sum=bz,s.tan=Az,s.tanh=Cz,s.trunc=Nz,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(LP,"clone");function nz(r,e){return new this(r).div(e)}o(nz,"div");function sz(r){return new this(r).exp()}o(sz,"exp");function iz(r){return gt(r=new this(r),r.e+1,3)}o(iz,"floor");function az(){var r,e,t=new this(0);for(Bt=!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 Bt=!0,new this(1/0);t=e}return Bt=!0,t.sqrt()}o(az,"hypot");function CP(r){return r instanceof rp||r&&r.toStringTag===_P||!1}o(CP,"isDecimalInstance");function oz(r){return new this(r).ln()}o(oz,"ln");function uz(r,e){return new this(r).log(e)}o(uz,"log");function cz(r){return new this(r).log(2)}o(cz,"log2");function lz(r){return new this(r).log(10)}o(lz,"log10");function fz(){return OP(this,arguments,-1)}o(fz,"max");function hz(){return OP(this,arguments,1)}o(hz,"min");function pz(r,e){return new this(r).mod(e)}o(pz,"mod");function dz(r,e){return new this(r).mul(e)}o(dz,"mul");function mz(r,e){return new this(r).pow(e)}o(mz,"pow");function gz(r){var e,t,n,s,i=0,a=new this(1),u=[];if(r===void 0?r=this.precision:_s(r,1,Du),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(IP);else for(;i<n;)u[i++]=Math.random()*1e7|0;for(n=u[--i],r%=bt,n&&r&&(s=bn(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(gz,"random");function vz(r){return gt(r=new this(r),r.e+1,this.rounding)}o(vz,"round");function yz(r){return r=new this(r),r.d?r.d[0]?r.s:0*r.s:r.s||NaN}o(yz,"sign");function xz(r){return new this(r).sin()}o(xz,"sin");function wz(r){return new this(r).sinh()}o(wz,"sinh");function Sz(r){return new this(r).sqrt()}o(Sz,"sqrt");function Ez(r,e){return new this(r).sub(e)}o(Ez,"sub");function bz(){var r=0,e=arguments,t=new this(e[r]);for(Bt=!1;t.s&&++r<e.length;)t=t.plus(e[r]);return Bt=!0,gt(t,this.precision,this.rounding)}o(bz,"sum");function Az(r){return new this(r).tan()}o(Az,"tan");function Cz(r){return new this(r).tanh()}o(Cz,"tanh");function Nz(r){return gt(r=new this(r),r.e+1,1)}o(Nz,"trunc");Pe[Symbol.for("nodejs.util.inspect.custom")]=Pe.toString;Pe[Symbol.toStringTag]="Decimal";var rp=Pe.constructor=LP(kC);sw=new rp(sw);iw=new rp(iw);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 VP=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 lw=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=Zx(Zk(),1);import vq from"fs";import khe from"path";import N0 from"crypto";var cZ=o(r=>!!r&&typeof r=="object"&&"message"in r,"hasMessageInRecord"),qu=o(r=>typeof r=="string"?ti(new dn(r)):r instanceof Error?ti(new dn(r.message,{cause:r.cause})):cZ(r)?ti(new dn(r.message)):ti(new dn("unexpected error")),"leftFromError");import"reflect-metadata";var SU=Zx(yU(),1);import{constants as Cue}from"crypto";import{Agent as xU}from"https";var wU=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:Cue.SSL_OP_LEGACY_SERVER_CONNECT};if(!this.certificate)return new xU({...e});let{ca:t,password:n,certificate:s,privateKey:i}=this.certificate;return new xU({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,SU.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 qu(t)}}};import{arch as _ue,platform as Due}from"os";import{join as Kg,dirname as s_,resolve as Bue}from"path";import{existsSync as iE}from"fs";import{resolve as bU}from"path";import{createRequire as EU}from"module";import{fileURLToPath as Nue,pathToFileURL as Tue}from"url";var Iue=typeof jest<"u"||process.env.JEST_WORKER_ID!==void 0,Jp,AU=o(()=>{if(Jp!==void 0)return Jp;if(Iue){Jp=void 0;return}try{Jp=new Function("try { return import.meta.url; } catch { return undefined; }")()}catch{Jp=void 0}return Jp},"getImportMetaUrl"),CU=o(()=>{if(typeof We<"u")return We;let r=AU();if(r)return EU(r);let e=Tue(bU(process.cwd(),"package.json")).href;return EU(e)},"getRequireFn"),NU=o(()=>{if(typeof __filename<"u")return __filename;let r=AU();return r?Nue(r):bU(process.cwd())},"getCurrentFile");var $g=o(r=>CU()(r),"exportRequireModule"),TU=o(r=>{r=`${r}.node`;let e=`${Due()}-${_ue()}`;if(process.env.NFETS_ADDONS_DIR)return $g(Kg(process.env.NFETS_ADDONS_DIR,r));let t=NU(),n=Bue(t,"../../../../"),s=Kg(n,"build","addons",e,r);if(iE(s))return $g(s);let i=t;for(let a=0;a<5;a++){let u=Kg(i,"build","addons",e,r);if(iE(u))return $g(u);let c=s_(i);if(c===i)break;i=c}i=t;for(let a=0;a<5;a++){let u=Kg(i,"node_modules","nfets","build","addons",e,r);if(iE(u))return $g(u);let c=s_(i);if(c===i)break;i=c}i=t;for(let a=0;a<5;a++){let u=Kg(i,"build","Release",r);if(iE(u))return $g(u);let c=s_(i);if(c===i)break;i=c}throw new Error(`Addon ${e}/${r} not found`)},"addon");var Rue=TU("xml_validator"),IU=Rue;var Ihe=Zx(Yj(),1);import The from"crypto";var Qj="application/xml";var Mt;(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"})(Mt||(Mt={}));function Oue(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(Oue,"SelectNodesEx");function Pue(r,e){let t=Yp("xpath").select;return t(e,r)}o(Pue,"SelectNodesNode");var Zj=typeof self<"u"?Oue:Pue;function Li(r){r=r.replace(/\r\n/g,`
99
+ `).replace(/\r/g,`
100
+ `);let e;return typeof DOMParser<"u"?e=DOMParser:e=Yp("DOMParser"),new e().parseFromString(r,Qj)}o(Li,"Parse");function Za(r){let e;return typeof XMLSerializer<"u"?e=XMLSerializer:e=Yp("XMLSerializer"),new e().serializeToString(r)}o(Za,"Stringify");function EE(r,e){let t=Zj(r,e);return t&&t.length>0?t[0]:null}o(EE,"SelectSingleNode");function eM(r,e){return r&&r.nodeType===e}o(eM,"isNodeType");function oi(r){return eM(r,Mt.Element)}o(oi,"isElement");function Jl(r){return eM(r,Mt.Document)}o(Jl,"isDocument");var tM=new Map;function rM(r){for(let e in r)tM.set(e,r[e])}o(rM,"setNodeDependencies");function Yp(r){let e=tM.get(r);if(!e)throw new Error(`Node dependency not found: ${r}. Please use 'setNodeDependencies' to register it.`);return e}o(Yp,"getNodeDependency");var Wg="element",zg="attribute",bE="content";var kue=1e9;function m_(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(m_,"assign");function Ft(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=m_({},t.items)),t.target=e}}o(Ft,"XmlElement");function Wt(r={}){return(e,t)=>{let n=e.constructor,s=t;n.items||(n.items={}),n.target!==n&&(n.items=m_({},n.items)),n.target=e;let i;r.parser?i={parser:r.parser,required:r.required||!1,maxOccurs:r.maxOccurs||kue,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:Wg},sM(e,s,r)}}o(Wt,"XmlChildElement");function kr(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=m_({},n.items)),n.target=e;let i=n.items;i[t]=r,i[t].type=zg,sM(e,s,r)}}o(kr,"XmlAttribute");function sM(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(sM,"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 Lue(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(Lue,"printf");function Vue(r,e){let t=r+"";for(;t.length<e;)t="0"+t;return t}o(Vue,"padNum");var qe=class{static{o(this,"XmlError")}constructor(e,...t){this.prefix="XMLJS",this.code=e,this.name=this.constructor.name;let n=Lue(pn[e],...t);this.message=`${this.prefix}${Vue(e,4)}: ${n}`,this.stack=new Error(this.message).stack}},Ie;(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"})(Ie||(Ie={}));var pn={};pn[Ie.NONE]="No description";pn[Ie.NULL_REFERENCE]="Null reference";pn[Ie.NULL_PARAM]="'%1' has empty '%2' object";pn[Ie.DECORATOR_NULL_PARAM]="Decorator '%1' has empty '%2' parameter";pn[Ie.COLLECTION_LIMIT]="Collection of '%1' in element '%2' has wrong amount of items";pn[Ie.METHOD_NOT_IMPLEMENTED]="Method is not implemented";pn[Ie.METHOD_NOT_SUPPORTED]="Method is not supported";pn[Ie.PARAM_REQUIRED]="Required parameter is missing '%1'";pn[Ie.CONVERTER_UNSUPPORTED]="Converter is not supported";pn[Ie.ELEMENT_MALFORMED]="Malformed element '%1'";pn[Ie.ELEMENT_MISSING]="Element '%1' is missing in '%2'";pn[Ie.ATTRIBUTE_MISSING]="Attribute '%1' is missing in '%2'";pn[Ie.CONTENT_MISSING]="Content is missing in '%1'";pn[Ie.CRYPTOGRAPHIC]="Cryptographic error: %1";pn[Ie.CRYPTOGRAPHIC_NO_MODULE]="WebCrypto module is not found";pn[Ie.CRYPTOGRAPHIC_UNKNOWN_TRANSFORM]="Unknown transform %1";pn[Ie.ALGORITHM_NOT_SUPPORTED]="Algorithm is not supported '%1'";pn[Ie.ALGORITHM_WRONG_NAME]="Algorithm wrong name in use '%1'";pn[Ie.XML_EXCEPTION]="XML exception: %1";pn[Ie.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 qe(Ie.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 qe(Ie.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 qe(Ie.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 qe(Ie.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")},Jg={get:o(r=>r?r.toString():"0","get"),set:o(r=>Number(r),"set")};var Uue="xml_root",Fs=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 qe(Ie.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 qe(Ie.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=EE(e,`//*[@*[local-name()='Id']='${t}']`),n==null&&(n=EE(e,`//*[@*[local-name()='ID']='${t}']`),n==null&&(n=EE(e,`//*[@*[local-name()='id']='${t}']`)))),n}static CreateDocument(e=Uue,t=null,n=null){if(n&&!t)throw new qe(Ie.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 qe(Ie.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 bE:{let h=f,m=h.converter?h.converter.get(c):c;if(h.required&&m==null)throw new qe(Ie.CONTENT_MISSING,a);(h.defaultValue!==c||h.required)&&(s.textContent=m);break}case zg:{let h=f,m=h.converter?h.converter.get(c):c;if(h.required&&m==null)throw new qe(Ie.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 Wg:{let h=f,m=null;if(h.parser){if(h.required&&!c||h.minOccurs&&!c.Count){let g=c?.localName||h.localName;throw new qe(Ie.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 qe(Ie.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 S=0;S<m.childNodes.length;S++){let E=m.childNodes.item(S);oi(E)&&g.push(E)}let x=h.minOccurs||0,v=h.maxOccurs||1/0;if(g.length<x||g.length>v)throw new qe(Ie.COLLECTION_LIMIT,c.localName,i.localName);g.forEach(S=>s.appendChild(S.cloneNode(!0)))}else{if(m.childNodes.length<(h.minOccurs||0)||m.childNodes.length>(h.maxOccurs||1/0))throw new qe(Ie.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 qe(Ie.PARAM_REQUIRED,"element");let s=this.GetStatic(),i=this.localName||"";if(!(t.localName===i&&t.namespaceURI==this.NamespaceURI))throw new qe(Ie.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 bE:{let c=u;if(c.required&&!t.textContent)throw new qe(Ie.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 zg:{let c=u,f,h;if(!c.localName)throw new qe(Ie.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 qe(Ie.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 Wg:{let c=u;if(c.noRoot){if(!c.parser)throw new qe(Ie.XML_EXCEPTION,`Schema for '${c.localName}' with flag noRoot must have 'parser'`);let h=new c.parser;if(!(h instanceof Qp))throw new qe(Ie.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 qe(Ie.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 qe(Ie.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?Za(e):""}GetElement(e,t=!0){if(!this.element)throw new qe(Ie.NULL_PARAM,this.localName);return r.GetElement(this.element,e,t)}GetChildren(e,t){if(!this.element)throw new qe(Ie.NULL_PARAM,this.localName);return r.GetChildren(this.element,e,t||this.NamespaceURI||void 0)}GetChild(e,t=!0){if(!this.element)throw new qe(Ie.NULL_PARAM,this.localName);return r.GetChild(this.element,e,this.NamespaceURI||void 0,t)}GetFirstChild(e,t){if(!this.element)throw new qe(Ie.NULL_PARAM,this.localName);return r.GetFirstChild(this.element,e,t)}GetAttribute(e,t,n=!0){if(!this.element)throw new qe(Ie.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 qe(Ie.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 Fs{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 qe(Ie.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 jue="[object ArrayBuffer]",mt=class y_{static{o(this,"BufferSourceConverter")}static isArrayBuffer(e){return Object.prototype.toString.call(e)===jue}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=y_.toUint8Array(e),s=y_.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}},v_="string",Mue=/^[0-9a-f\s]+$/i,Fue=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,que=/^[a-zA-Z0-9-_]+$/,iM=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))}},eo=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}},At=class ed{static{o(this,"Convert")}static isHex(e){return typeof e===v_&&Mue.test(e)}static isBase64(e){return typeof e===v_&&Fue.test(e)}static isBase64Url(e){return typeof e===v_&&que.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 eo.toString(n,!0);case"utf16":case"utf16be":return eo.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 eo.fromString(e,!0);case"utf16":case"utf16be":return eo.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 iM.fromString(e);case"utf16":case"utf16be":return eo.fromString(e);case"utf16le":case"usc2":return eo.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 iM.toString(e);case"utf16":case"utf16be":return eo.toString(e);case"utf16le":case"usc2":return eo.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 eo.toString(e,t)}static FromUtf16String(e,t=!1){return eo.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,"")||""}};At.DEFAULT_UTF8_ENCODING="utf8";function O(r,e,t){var n;return r instanceof Object&&(n=r[e])!==null&&n!==void 0?n:t}o(O,"getParametersValue");function AE(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(AE,"bufferToHexCodes");function jo(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(jo,"utilFromBase");function oa(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(oa,"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 CE(...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(CE,"utilConcatView");function x_(){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=jo(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,jo(i,8)-n}o(x_,"utilDecodeTC");function oM(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=oa(a,8,n),c=new Uint8Array(u);return c[0]|=128,u}let s=oa(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(oM,"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 qs(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(qs,"padNumber");var uM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",cM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=";function NE(r,e=!1,t=!1,n=!1){let s=0,i=0,a=0,u="",c=e?cM:uM;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,S=m&63;i===1?v=S=64:a===1&&(S=64),t?v===64?u+=`${c.charAt(g)}${c.charAt(x)}`:S===64?u+=`${c.charAt(g)}${c.charAt(x)}${c.charAt(v)}`:u+=`${c.charAt(g)}${c.charAt(x)}${c.charAt(v)}${c.charAt(S)}`:u+=`${c.charAt(g)}${c.charAt(x)}${c.charAt(v)}${c.charAt(S)}`}return u}o(NE,"toBase64");function td(r,e=!1,t=!1){let n=e?cM:uM;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 Yg(r){let e="",t=new Uint8Array(r);for(let n of t)e+=String.fromCharCode(n);return e}o(Yg,"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 Hue=Math.log(2);function lM(r){let e=Math.log(r)/Hue,t=Math.floor(e),n=Math.round(e);return t===n?t:n}o(lM,"nearestPowerOf2");function Oe(r,e){for(let t of e)delete r[t]}o(Oe,"clearProps");function TE(){if(typeof BigInt>"u")throw new Error("BigInt is not defined. Your environment doesn't implement BigInt.")}o(TE,"assertBigInt");function b_(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(b_,"concat");function Mo(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(Mo,"checkBufferParams");var A_=class{static{o(this,"ViewWriter")}constructor(){this.items=[]}write(e){this.items.push(e)}final(){return b_(this.items)}},Qg=[new Uint8Array([1])],hM="0123456789",w_="name",pM="valueHexView",Kue="isHexOnly",$ue="idBlock",Gue="tagClass",Xue="tagNumber",Wue="isConstructed",zue="fromBER",Jue="toBER",Yue="local",Hs="",ua=new ArrayBuffer(0),IE=new Uint8Array(0),ev="EndOfContent",mM="OCTET STRING",gM="BIT STRING";function Fo(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):IE}fromBER(n,s,i){let a=n instanceof ArrayBuffer?new Uint8Array(n):n;if(!Mo(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",ua)}toJSON(){return{...super.toJSON(),isHexOnly:this.isHexOnly,valueHex:At.ToHex(this.valueHexView)}}},e.NAME="hexBlock",e}o(Fo,"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=Hs,warnings:n=[],valueBeforeDecode:s=IE}={}){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:At.ToHex(this.valueBeforeDecodeView)}}};Zl.NAME="baseBlock";var Ks=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'")}};Ks.NAME="valueBlock";var vM=class extends Fo(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):IE,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",ua}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=oa(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(!Mo(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=jo(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}}};vM.NAME="identificationBlock";var yM=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(!Mo(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=jo(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=oa(this.length,8);if(s.byteLength>127)return this.error="Too big length",ua;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}}};yM.NAME="lengthBlock";var ct={},Es=class extends Zl{static{o(this,"BaseBlock")}constructor({name:e=Hs,optional:t=!1,primitiveSchema:n,...s}={},i){super(s),this.name=e,this.optional=t,n&&(this.primitiveSchema=n),this.idBlock=new vM(s),this.lenBlock=new yM(s),this.valueBlock=i?new i(s):new Ks(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 A_;t||xM(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?ua: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():At.ToHex(this.toBER())}onAsciiEncoding(){let e=this.constructor.NAME,t=At.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)}};Es.NAME="BaseBlock";function xM(r){var e;if(r instanceof ct.Constructed)for(let t of r.valueBlock.value)xM(t)&&(r.lenBlock.isIndefiniteForm=!0);return!!(!((e=r.lenBlock)===null||e===void 0)&&e.isIndefiniteForm)}o(xM,"prepareIndefiniteForm");var wM=class extends Es{static{o(this,"BaseStringBlock")}getValue(){return this.valueBlock.value}setValue(e){this.valueBlock.value=e}constructor({value:e=Hs,...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}'`}};wM.NAME="BaseStringBlock";var SM=class extends Fo(Ks){static{o(this,"LocalPrimitiveValueBlock")}constructor({isHexOnly:e=!0,...t}={}){super(t),this.isHexOnly=e}};SM.NAME="PrimitiveValueBlock";var EM,vt=class extends Es{static{o(this,"Primitive")}constructor(e={}){super(e,SM),this.idBlock.isConstructed=!1}};EM=vt;ct.Primitive=EM;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 tv(r,e=0,t=r.length){let n=e,s=new Es({},Ks),i=new Zl;if(!Mo(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=Es;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=ct.EndOfContent;break;case 1:c=ct.Boolean;break;case 2:c=ct.Integer;break;case 3:c=ct.BitString;break;case 4:c=ct.OctetString;break;case 5:c=ct.Null;break;case 6:c=ct.ObjectIdentifier;break;case 10:c=ct.Enumerated;break;case 12:c=ct.Utf8String;break;case 13:c=ct.RelativeObjectIdentifier;break;case 14:c=ct.TIME;break;case 15:return s.error="[UNIVERSAL 15] is reserved by ASN.1 standard",{offset:-1,result:s};case 16:c=ct.Sequence;break;case 17:c=ct.Set;break;case 18:c=ct.NumericString;break;case 19:c=ct.PrintableString;break;case 20:c=ct.TeletexString;break;case 21:c=ct.VideotexString;break;case 22:c=ct.IA5String;break;case 23:c=ct.UTCTime;break;case 24:c=ct.GeneralizedTime;break;case 25:c=ct.GraphicString;break;case 26:c=ct.VisibleString;break;case 27:c=ct.GeneralString;break;case 28:c=ct.UniversalString;break;case 29:c=ct.CharacterString;break;case 30:c=ct.BmpString;break;case 31:c=ct.DATE;break;case 32:c=ct.TimeOfDay;break;case 33:c=ct.DateTime;break;case 34:c=ct.Duration;break;default:{let f=s.idBlock.isConstructed?new ct.Constructed:new ct.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?ct.Constructed:ct.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(tv,"localFromBER");function Wr(r){if(!r.byteLength){let e=new Es({},Ks);return e.error="Input buffer has zero length",{offset:-1,result:e}}return tv(mt.toUint8Array(r).slice(),0,r.byteLength)}o(Wr,"fromBER");function Zue(r,e){return r?1:e}o(Zue,"checkLen");var hc=class extends Ks{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(!Mo(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(;Zue(this.isIndefiniteForm,n)>0;){let a=tv(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===ev)break}return this.isIndefiniteForm&&(this.value[this.value.length-1].constructor.NAME===ev?this.value.pop():this.warnings.push("No EndOfContent block encoded")),i}toBER(e,t){let n=t||new A_;for(let s=0;s<this.value.length;s++)this.value[s].toBER(e,n);return t?ua: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 bM,ue=class extends Es{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(`
101
+ `).map(s=>` ${s}`).join(`
102
+ `));let t=this.idBlock.tagClass===3?`[${this.idBlock.tagNumber}]`:this.constructor.NAME;return e.length?`${t} :
103
+ ${e.join(`
104
+ `)}`:`${t} :`}};bM=ue;ct.Constructed=bM;ue.NAME="CONSTRUCTED";var AM=class extends Ks{static{o(this,"LocalEndOfContentValueBlock")}fromBER(e,t,n){return t}toBER(e){return ua}};AM.override="EndOfContentValueBlock";var CM,NM=class extends Es{static{o(this,"EndOfContent")}constructor(e={}){super(e,AM),this.idBlock.tagClass=1,this.idBlock.tagNumber=0}};CM=NM;ct.EndOfContent=CM;NM.NAME=ev;var TM,zr=class extends Es{static{o(this,"Null")}constructor(e={}){super(e,Ks),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}`}};TM=zr;ct.Null=TM;zr.NAME="NULL";var IM=class extends Fo(Ks){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 Mo(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,x_.call(this),this.blockLength=n,t+n):-1}toBER(){return this.valueHexView.slice()}toJSON(){return{...super.toJSON(),value:this.value}}};IM.NAME="BooleanValueBlock";var _M,ca=class extends Es{static{o(this,"Boolean")}getValue(){return this.valueBlock.value}setValue(e){this.valueBlock.value=e}constructor(e={}){super(e,IM),this.idBlock.tagClass=1,this.idBlock.tagNumber=1}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.getValue}`}};_M=ca;ct.Boolean=_M;ca.NAME="BOOLEAN";var DM=class extends Fo(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===ev){if(this.isIndefiniteForm)break;return this.error="EndOfContent is unexpected, OCTET STRING may consists of OCTET STRINGs only",-1}if(a!==mM)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}}};DM.NAME="OctetStringValueBlock";var C_,je=class extends Es{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},DM),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=tv(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 ue.prototype.onAsciiEncoding.call(this);let e=this.constructor.NAME,t=At.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 C_&&e.push(t.valueBlock.valueHexView);return mt.concat(e)}};C_=je;ct.OctetString=C_;je.NAME=mM;var BM=class extends Fo(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===ev){if(this.isIndefiniteForm)break;return this.error="EndOfContent is unexpected, BIT STRING may consists of BIT STRINGs only",-1}if(c!==gM)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(!Mo(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=tv(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 ua;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}}};BM.NAME="BitStringValueBlock";var RM,Kt=class extends Es{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},BM),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 ue.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}`}}};RM=Kt;ct.BitString=RM;Kt.NAME=gM;var OM;function ece(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=CE(new Uint8Array([f%10]),i);break;default:i[a-m]=f%10}}return t[0]>0&&(i=CE(t,i)),i}o(ece,"viewAdd");function dM(r){if(r>=Qg.length)for(let e=Qg.length;e<=r;e++){let t=new Uint8Array([0]),n=Qg[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=CE(t,n)),Qg.push(n)}return Qg[r]}o(dM,"power2");function tce(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(tce,"viewSub");var N_=class extends Fo(Ks){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=x_.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(oM(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=tce(dM(n),t),a="-";break;default:t=ece(t,dM(n))}n++,s>>=1}}for(let c=0;c<t.length;c++)t[c]&&(u=!0),u&&(a+=hM.charAt(t[c]));return u===!1&&(a+=hM.charAt(0)),a}};OM=N_;N_.NAME="IntegerValueBlock";Object.defineProperty(OM.prototype,"valueHex",{set:o(function(r){this.valueHexView=new Uint8Array(r),this.setValueHex()},"set"),get:o(function(){return this.valueHexView.slice().buffer},"get")});var Zg,ve=class extends Es{static{o(this,"Integer")}constructor(e={}){super(e,N_),this.idBlock.tagClass=1,this.idBlock.tagNumber=2}toBigInt(){return TE(),BigInt(this.valueBlock.toString())}static fromBigInt(e){TE();let t=BigInt(e),n=new A_,s=t.toString(16).replace(/^-/,""),i=new Uint8Array(At.FromHex(s));if(t<0){let u=new Uint8Array(i.length+(i[0]&128?1:0));u[0]|=128;let f=BigInt(`0x${At.ToHex(u)}`)+t,h=mt.toUint8Array(At.FromHex(f.toString(16)));h[0]|=128,n.write(h)}else i[0]&128&&n.write(new Uint8Array([0])),n.write(i);return new Zg({valueHex:n.final()})}convertToDER(){let e=new Zg({valueHex:this.valueBlock.valueHexView});return e.valueBlock.toDER(),e}convertFromDER(){return new Zg({valueHex:this.valueBlock.valueHexView[0]===0?this.valueBlock.valueHexView.subarray(1):this.valueBlock.valueHexView})}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()}`}};Zg=ve;ct.Integer=Zg;ve.NAME="INTEGER";var PM,pc=class extends ve{static{o(this,"Enumerated")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=10}};PM=pc;ct.Enumerated=PM;pc.NAME="ENUMERATED";var S_=class extends Fo(Ks){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(!Mo(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=jo(this.valueHexView,7):(this.isHexOnly=!0,this.warnings.push("Too big SID for decoding, hex only")),t+this.blockLength)}set valueBigInt(e){TE();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=oa(this.valueDec,7);if(t.byteLength===0)return this.error="Error during encoding SID value",ua;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=At.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}}};S_.NAME="sidBlock";var kM=class extends Ks{static{o(this,"LocalObjectIdentifierValueBlock")}constructor({value:e=Hs,...t}={}){super(t),this.value=[],e&&this.fromString(e)}fromBER(e,t,n){let s=t;for(;n>0;){let i=new S_;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,ua;t.push(s)}return b_(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 S_;if(s>Number.MAX_SAFE_INTEGER){TE();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}};kM.NAME="ObjectIdentifierValueBlock";var LM,st=class extends Es{static{o(this,"ObjectIdentifier")}getValue(){return this.valueBlock.toString()}setValue(e){this.valueBlock.fromString(e)}constructor(e={}){super(e,kM),this.idBlock.tagClass=1,this.idBlock.tagNumber=6}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()||"empty"}`}toJSON(){return{...super.toJSON(),value:this.getValue()}}};LM=st;ct.ObjectIdentifier=LM;st.NAME="OBJECT IDENTIFIER";var E_=class extends Fo(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(!Mo(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=jo(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=oa(this.valueDec,7);if(t.byteLength===0)return this.error="Error during encoding SID value",ua;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=At.ToHex(this.valueHexView):e=this.valueDec.toString(),e}toJSON(){return{...super.toJSON(),valueDec:this.valueDec}}};E_.NAME="relativeSidBlock";var VM=class extends Ks{static{o(this,"LocalRelativeObjectIdentifierValueBlock")}constructor({value:e=Hs,...t}={}){super(t),this.value=[],e&&this.fromString(e)}fromBER(e,t,n){let s=t;for(;n>0;){let i=new E_;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,ua;n.push(i)}return b_(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 E_;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}};VM.NAME="RelativeObjectIdentifierValueBlock";var UM,jM=class extends Es{static{o(this,"RelativeObjectIdentifier")}getValue(){return this.valueBlock.toString()}setValue(e){this.valueBlock.fromString(e)}constructor(e={}){super(e,VM),this.idBlock.tagClass=1,this.idBlock.tagNumber=13}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()||"empty"}`}toJSON(){return{...super.toJSON(),value:this.getValue()}}};UM=jM;ct.RelativeObjectIdentifier=UM;jM.NAME="RelativeObjectIdentifier";var MM,J=class extends ue{static{o(this,"Sequence")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=16}};MM=J;ct.Sequence=MM;J.NAME="SEQUENCE";var FM,Jr=class extends ue{static{o(this,"Set")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=17}};FM=Jr;ct.Set=FM;Jr.NAME="SET";var qM=class extends Fo(Ks){static{o(this,"LocalStringValueBlock")}constructor({...e}={}){super(e),this.isHexOnly=!0,this.value=Hs}toJSON(){return{...super.toJSON(),value:this.value}}};qM.NAME="StringValueBlock";var HM=class extends qM{static{o(this,"LocalSimpleStringValueBlock")}};HM.NAME="SimpleStringValueBlock";var ui=class extends wM{static{o(this,"LocalSimpleStringBlock")}constructor({...e}={}){super(e,HM)}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 KM=class extends ui{static{o(this,"LocalUtf8StringValueBlock")}fromBuffer(e){this.valueBlock.valueHexView=mt.toUint8Array(e);try{this.valueBlock.value=At.ToUtf8String(e)}catch(t){this.warnings.push(`Error during "decodeURIComponent": ${t}, using raw string`),this.valueBlock.value=At.ToBinary(e)}}fromString(e){this.valueBlock.valueHexView=new Uint8Array(At.FromUtf8String(e)),this.valueBlock.value=e}};KM.NAME="Utf8StringValueBlock";var $M,Ui=class extends KM{static{o(this,"Utf8String")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=12}};$M=Ui;ct.Utf8String=$M;Ui.NAME="UTF8String";var GM=class extends ui{static{o(this,"LocalBmpStringValueBlock")}fromBuffer(e){this.valueBlock.value=At.ToUtf16String(e),this.valueBlock.valueHexView=mt.toUint8Array(e)}fromString(e){this.valueBlock.value=e,this.valueBlock.valueHexView=new Uint8Array(At.FromUtf16String(e))}};GM.NAME="BmpStringValueBlock";var XM,rd=class extends GM{static{o(this,"BmpString")}constructor({...e}={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=30}};XM=rd;ct.BmpString=XM;rd.NAME="BMPString";var WM=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=oa(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}};WM.NAME="UniversalStringValueBlock";var zM,nd=class extends WM{static{o(this,"UniversalString")}constructor({...e}={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=28}};zM=nd;ct.UniversalString=zM;nd.NAME="UniversalString";var JM,ef=class extends ui{static{o(this,"NumericString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=18}};JM=ef;ct.NumericString=JM;ef.NAME="NumericString";var YM,ji=class extends ui{static{o(this,"PrintableString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=19}};YM=ji;ct.PrintableString=YM;ji.NAME="PrintableString";var QM,sd=class extends ui{static{o(this,"TeletexString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=20}};QM=sd;ct.TeletexString=QM;sd.NAME="TeletexString";var ZM,_E=class extends ui{static{o(this,"VideotexString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=21}};ZM=_E;ct.VideotexString=ZM;_E.NAME="VideotexString";var eF,rv=class extends ui{static{o(this,"IA5String")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=22}};eF=rv;ct.IA5String=eF;rv.NAME="IA5String";var tF,DE=class extends ui{static{o(this,"GraphicString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=25}};tF=DE;ct.GraphicString=tF;DE.NAME="GraphicString";var rF,nv=class extends ui{static{o(this,"VisibleString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=26}};rF=nv;ct.VisibleString=rF;nv.NAME="VisibleString";var nF,BE=class extends ui{static{o(this,"GeneralString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=27}};nF=BE;ct.GeneralString=nF;BE.NAME="GeneralString";var sF,RE=class extends ui{static{o(this,"CharacterString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=29}};sF=RE;ct.CharacterString=sF;RE.NAME="CharacterString";var iF,tf=class extends nv{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]=qs(this.year<2e3?this.year-1900:this.year-2e3,2),t[1]=qs(this.month,2),t[2]=qs(this.day,2),t[3]=qs(this.hour,2),t[4]=qs(this.minute,2),t[5]=qs(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}}};iF=tf;ct.UTCTime=iF;tf.NAME="UTCTime";var aF,Lr=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(qs(this.year,4)),t.push(qs(this.month,2)),t.push(qs(this.day,2)),t.push(qs(this.hour,2)),t.push(qs(this.minute,2)),t.push(qs(this.second,2)),this.millisecond!==0&&(t.push("."),t.push(qs(this.millisecond,3))),t.push("Z"),t.join("")}return super.toString(e)}toJSON(){return{...super.toJSON(),millisecond:this.millisecond}}};aF=Lr;ct.GeneralizedTime=aF;Lr.NAME="GeneralizedTime";var oF,uF=class extends Ui{static{o(this,"DATE")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=31}};oF=uF;ct.DATE=oF;uF.NAME="DATE";var cF,lF=class extends Ui{static{o(this,"TimeOfDay")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=32}};cF=lF;ct.TimeOfDay=cF;lF.NAME="TimeOfDay";var fF,hF=class extends Ui{static{o(this,"DateTime")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=33}};fF=hF;ct.DateTime=fF;hF.NAME="DateTime";var pF,dF=class extends Ui{static{o(this,"Duration")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=34}};pF=dF;ct.Duration=pF;dF.NAME="Duration";var mF,gF=class extends Ui{static{o(this,"TIME")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=14}};mF=gF;ct.TIME=mF;gF.NAME="TIME";var St=class{static{o(this,"Any")}constructor({name:e=Hs,optional:t=!1}={}){this.name=e,this.optional=t}},Vr=class extends St{static{o(this,"Choice")}constructor({value:e=[],...t}={}){super(t),this.value=e}},_t=class extends St{static{o(this,"Repeated")}constructor({value:e=new St,local:t=!1,...n}={}){super(n),this.value=e,this.local=t}},sv=class{static{o(this,"RawData")}get data(){return this.dataView.slice().buffer}set data(e){this.dataView=mt.toUint8Array(e)}constructor({data:e=IE}={}){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 _e(r,e,t){if(t instanceof Vr){for(let i of t.value)if(_e(r,e,i).verified)return{verified:!0,result:r};{let i={verified:!1,result:{error:"Wrong values for Choice type"}};return t.hasOwnProperty(w_)&&(i.name=t.name),i}}if(t instanceof St)return t.hasOwnProperty(w_)&&(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(!($ue in t))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(zue in t.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(Jue 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(Gue)===!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(Xue)===!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(Wue)===!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(t.idBlock.isConstructed!==e.idBlock.isConstructed)return{verified:!1,result:r};if(!(Kue 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(!(pM 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,Hs),t.name&&(r[t.name]=e)),t instanceof ct.Constructed){let i=0,a={verified:!1,result:{error:"Unknown error"}},u=t.valueBlock.value.length;if(u>0&&t.valueBlock.value[0]instanceof _t&&(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,Hs),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,Hs),t.name&&(delete r[t.name],f.name=t.name)),f}}else if(t.valueBlock.value[0]instanceof _t){if(a=_e(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,Hs),t.name&&delete r[t.name]),a;if(w_ in t.valueBlock.value[0]&&t.valueBlock.value[0].name.length>0){let f={};Yue 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=_e(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,Hs),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,Hs),t.name&&(delete r[t.name],c.name=t.name)),c}return{verified:!0,result:r}}if(t.primitiveSchema&&pM in e.valueBlock){let i=tv(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,Hs),t.name&&(delete r[t.name],a.name=t.name)),a}return _e(r,i.result,t.primitiveSchema)}return{verified:!0,result:r}}o(_e,"compareSchema");var Wn=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 rce=16777216,qo=class r{static{o(this,"SeqStream")}constructor(e={}){this._stream=new Wn,this._length=0,this._start=0,this.backward=!1,this.appendBlock=0,this.prevLength=0,this.prevStart=0,"view"in e?this.stream=new Wn({view:e.view}):"buffer"in e?this.stream=new Wn({buffer:e.buffer}):"string"in e?this.stream=new Wn({string:e.string}):"hexstring"in e?this.stream=new Wn({hexstring:e.hexstring}):"stream"in e?this.stream=e.stream.slice():this.stream=new Wn,"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 Wn}}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 Wn};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 Wn}}else if(s.position>this._start+s.value.length+n)return{position:-1,value:new Wn};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]*rce+(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))}};qo.APPEND_BLOCK=1e3;function sce(r){return r instanceof Uint8Array||r!=null&&typeof r=="object"&&r.constructor.name==="Uint8Array"}o(sce,"isBytes");function T_(r,...e){if(!sce(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(T_,"bytes");function I_(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(I_,"exists");function yF(r,e){T_(r);let t=e.outputLen;if(r.length<t)throw new Error(`digestInto() expects output buffer of length at least ${t}`)}o(yF,"output");var PE=o(r=>new DataView(r.buffer,r.byteOffset,r.byteLength),"createView"),la=o((r,e)=>r<<32-e|r>>>e,"rotr"),kE=o((r,e)=>r<<e|r>>>32-e>>>0,"rotl"),qSe=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function ice(r){if(typeof r!="string")throw new Error(`utf8ToBytes expected string, got ${typeof r}`);return new Uint8Array(new TextEncoder().encode(r))}o(ice,"utf8ToBytes");function __(r){return typeof r=="string"&&(r=ice(r)),T_(r),r}o(__,"toBytes");var OE=class{static{o(this,"Hash")}clone(){return this._cloneInto()}},HSe={}.toString;function rf(r){let e=o(n=>r().update(__(n)).digest(),"hashC"),t=r();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>r(),e}o(rf,"wrapConstructor");function ace(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(ace,"setBigUint64");var LE=o((r,e,t)=>r&e^~r&t,"Chi"),VE=o((r,e,t)=>r&e^r&t^e&t,"Maj"),dc=class extends OE{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=PE(this.buffer)}update(e){I_(this);let{view:t,buffer:n,blockLen:s}=this;e=__(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=PE(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){I_(this),yF(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;ace(n,s-8,BigInt(this.length*8),i),this.process(n,0);let u=PE(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 iv=new Uint32Array([1732584193,4023233417,2562383102,271733878,3285377520]),mc=new Uint32Array(80),oce=class extends dc{static{o(this,"SHA1")}constructor(){super(64,20,8,!1),this.A=iv[0]|0,this.B=iv[1]|0,this.C=iv[2]|0,this.D=iv[3]|0,this.E=iv[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]=kE(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=LE(s,i,a),h=1518500249):c<40?(f=s^i^a,h=1859775393):c<60?(f=VE(s,i,a),h=2400959708):(f=s^i^a,h=3395469782);let m=kE(n,5)+f+u+h+mc[c]|0;u=a,a=i,i=kE(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)}},xF=rf(()=>new oce);var uce=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),cce=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=la(g,7)^la(g,18)^g>>>3,S=la(x,17)^la(x,19)^x>>>10;vc[m]=S+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=la(u,6)^la(u,11)^la(u,25),x=h+g+LE(u,c,f)+uce[m]+vc[m]|0,S=(la(n,2)^la(n,13)^la(n,22))+VE(n,s,i)|0;h=f,f=c,c=u,u=a+x|0,a=i,i=s,s=n,n=x+S|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 D_=rf(()=>new cce);var UE=BigInt(4294967295),B_=BigInt(32);function wF(r,e=!1){return e?{h:Number(r&UE),l:Number(r>>B_&UE)}:{h:Number(r>>B_&UE)|0,l:Number(r&UE)|0}}o(wF,"fromBig");function lce(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}=wF(r[s],e);[t[s],n[s]]=[i,a]}return[t,n]}o(lce,"split");var fce=o((r,e)=>BigInt(r>>>0)<<B_|BigInt(e>>>0),"toBig"),hce=o((r,e,t)=>r>>>t,"shrSH"),pce=o((r,e,t)=>r<<32-t|e>>>t,"shrSL"),dce=o((r,e,t)=>r>>>t|e<<32-t,"rotrSH"),mce=o((r,e,t)=>r<<32-t|e>>>t,"rotrSL"),gce=o((r,e,t)=>r<<64-t|e>>>t-32,"rotrBH"),vce=o((r,e,t)=>r>>>t-32|e<<64-t,"rotrBL"),yce=o((r,e)=>e,"rotr32H"),xce=o((r,e)=>r,"rotr32L"),wce=o((r,e,t)=>r<<t|e>>>32-t,"rotlSH"),Sce=o((r,e,t)=>e<<t|r>>>32-t,"rotlSL"),Ece=o((r,e,t)=>e<<t-32|r>>>64-t,"rotlBH"),bce=o((r,e,t)=>r<<t-32|e>>>64-t,"rotlBL");function Ace(r,e,t,n){let s=(e>>>0)+(n>>>0);return{h:r+t+(s/2**32|0)|0,l:s|0}}o(Ace,"add");var Cce=o((r,e,t)=>(r>>>0)+(e>>>0)+(t>>>0),"add3L"),Nce=o((r,e,t,n)=>e+t+n+(r/2**32|0)|0,"add3H"),Tce=o((r,e,t,n)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0),"add4L"),Ice=o((r,e,t,n,s)=>e+t+n+s+(r/2**32|0)|0,"add4H"),_ce=o((r,e,t,n,s)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0)+(s>>>0),"add5L"),Dce=o((r,e,t,n,s,i)=>e+t+n+s+i+(r/2**32|0)|0,"add5H");var Bce={fromBig:wF,split:lce,toBig:fce,shrSH:hce,shrSL:pce,rotrSH:dce,rotrSL:mce,rotrBH:gce,rotrBL:vce,rotr32H:yce,rotr32L:xce,rotlSH:wce,rotlSL:Sce,rotlBH:Ece,rotlBL:bce,add:Ace,add3L:Cce,add3H:Nce,add4L:Tce,add4H:Ice,add5H:Dce,add5L:_ce},$t=Bce;var[Rce,Oce]=$t.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),jE=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:S,Hl:E}=this;return[e,t,n,s,i,a,u,c,f,h,m,g,x,v,S,E]}set(e,t,n,s,i,a,u,c,f,h,m,g,x,v,S,E){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=S|0,this.Hl=E|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 A=yc[b-15]|0,T=xc[b-15]|0,R=$t.rotrSH(A,T,1)^$t.rotrSH(A,T,8)^$t.shrSH(A,T,7),H=$t.rotrSL(A,T,1)^$t.rotrSL(A,T,8)^$t.shrSL(A,T,7),I=yc[b-2]|0,$=xc[b-2]|0,K=$t.rotrSH(I,$,19)^$t.rotrBH(I,$,61)^$t.shrSH(I,$,6),F=$t.rotrSL(I,$,19)^$t.rotrBL(I,$,61)^$t.shrSL(I,$,6),z=$t.add4L(H,F,xc[b-7],xc[b-16]),he=$t.add4H(z,R,K,yc[b-7],yc[b-16]);yc[b]=he|0,xc[b]=z|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:S,Gl:E,Hh:C,Hl:_}=this;for(let b=0;b<80;b++){let A=$t.rotrSH(m,g,14)^$t.rotrSH(m,g,18)^$t.rotrBH(m,g,41),T=$t.rotrSL(m,g,14)^$t.rotrSL(m,g,18)^$t.rotrBL(m,g,41),R=m&x^~m&S,H=g&v^~g&E,I=$t.add5L(_,T,H,Oce[b],xc[b]),$=$t.add5H(I,C,A,R,Rce[b],yc[b]),K=I|0,F=$t.rotrSH(n,s,28)^$t.rotrBH(n,s,34)^$t.rotrBH(n,s,39),z=$t.rotrSL(n,s,28)^$t.rotrBL(n,s,34)^$t.rotrBL(n,s,39),he=n&i^n&u^i&u,pe=s&a^s&c^a&c;C=S|0,_=E|0,S=x|0,E=v|0,x=m|0,v=g|0,{h:m,l:g}=$t.add(f|0,h|0,$|0,K|0),f=u|0,h=c|0,u=i|0,c=a|0,i=n|0,a=s|0;let oe=$t.add3L(K,z,pe);n=$t.add3H(oe,$,F,he),s=oe|0}({h:n,l:s}=$t.add(this.Ah|0,this.Al|0,n|0,s|0)),{h:i,l:a}=$t.add(this.Bh|0,this.Bl|0,i|0,a|0),{h:u,l:c}=$t.add(this.Ch|0,this.Cl|0,u|0,c|0),{h:f,l:h}=$t.add(this.Dh|0,this.Dl|0,f|0,h|0),{h:m,l:g}=$t.add(this.Eh|0,this.El|0,m|0,g|0),{h:x,l:v}=$t.add(this.Fh|0,this.Fl|0,x|0,v|0),{h:S,l:E}=$t.add(this.Gh|0,this.Gl|0,S|0,E|0),{h:C,l:_}=$t.add(this.Hh|0,this.Hl|0,C|0,_|0),this.set(n,s,i,a,u,c,f,h,m,g,x,v,S,E,C,_)}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 Pce=class extends jE{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}},R_=rf(()=>new jE);var O_=rf(()=>new Pce);var sn=new ArrayBuffer(0),V="",Ar=class cD extends TypeError{static{o(this,"ArgumentError")}constructor(){super(...arguments),this.name=cD.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 cD(`Parameter '${t}' is not of type ${s.length>1?`(${s.join(" or ")})`:s[0]}`)}};Ar.NAME="ArgumentError";var pr=class hb 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 hb(i,t)}}static assertEmpty(e,t,n){if(e==null)throw new hb(t,n)}constructor(e,t=null,n){super(),this.name=hb.NAME,this.field=e,t&&(this.target=t),n?this.message=n:this.message=`Absent mandatory parameter '${e}' ${t?` in '${t}'`:V}`}};pr.NAME="ParameterError";var Ce=class $F 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 $F(`Error during parsing of ASN.1 data. Data is not correct for '${t}'.`)}constructor(e){super(e),this.name="AsnError"}},De=class{static{o(this,"PkiObject")}static blockName(){return this.CLASS_NAME}static fromBER(e){let t=Wr(e);Ce.assert(t,this.name);try{return new this({schema:t.result})}catch{throw new Ce(`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 At.ToString(t.toBER(),e)}};De.CLASS_NAME="PkiObject";function hl(r){let e=!1,t=V,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 av="type",P_="value",lD=class xv extends De{static{o(this,"AttributeTypeAndValue")}constructor(e={}){super(),this.type=O(e,av,xv.defaultValues(av)),this.value=O(e,P_,xv.defaultValues(P_)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case av:return V;case P_:return{};default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new st({name:t.type||V}),new St({name:t.value||V})]})}fromSchema(e){Oe(e,[av,"typeValue"]);let t=_e(e,e,xv.schema({names:{type:av,value:"typeValue"}}));Ce.assertSchema(t,this.className),this.type=t.result.type.valueBlock.toString(),this.value=t.result.typeValue}toSchema(){return new J({value:[new st({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(),_E.blockName(),rv.blockName(),DE.blockName(),nv.blockName(),BE.blockName(),RE.blockName()];if(e instanceof ArrayBuffer)return mt.isEqual(this.value.valueBeforeDecodeView,e);if(e.constructor.blockName()===xv.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}};lD.CLASS_NAME="AttributeTypeAndValue";var nf="typesAndValues",ME="valueBeforeDecode",SF="RDN",Ur=class wv extends De{static{o(this,"RelativeDistinguishedNames")}constructor(e={}){super(),this.typesAndValues=O(e,nf,wv.defaultValues(nf)),this.valueBeforeDecode=O(e,ME,wv.defaultValues(ME)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case nf:return[];case ME:return sn;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case nf:return t.length===0;case ME:return t.byteLength===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new _t({name:t.repeatedSequence||V,value:new Jr({value:[new _t({name:t.repeatedSet||V,value:lD.schema(t.typeAndValue||{})})]})})]})}fromSchema(e){Oe(e,[SF,nf]);let t=_e(e,e,wv.schema({names:{blockName:SF,repeatedSet:nf}}));Ce.assertSchema(t,this.className),nf in t.result&&(this.typesAndValues=Array.from(t.result.typesAndValues,n=>new lD({schema:n}))),this.valueBeforeDecode=t.result.RDN.valueBeforeDecodeView.slice().buffer}toSchema(){if(this.valueBeforeDecode.byteLength===0)return new J({value:[new Jr({value:Array.from(this.typesAndValues,t=>t.toSchema())})]});let e=Wr(this.valueBeforeDecode);if(Ce.assert(e,"RelativeDistinguishedNames"),!(e.result instanceof J))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 wv){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}};Ur.CLASS_NAME="RelativeDistinguishedNames";var Sv="type",Ev="value";function kce(r={},e=!1){let t=O(r,"names",{});return new J({optional:e,value:[new ue({optional:!0,idBlock:{tagClass:2,tagNumber:1},name:t.country_name||V,value:[new Vr({value:[new ef,new ji]})]}),new ue({optional:!0,idBlock:{tagClass:2,tagNumber:2},name:t.administration_domain_name||V,value:[new Vr({value:[new ef,new ji]})]}),new vt({optional:!0,idBlock:{tagClass:3,tagNumber:0},name:t.network_address||V,isHexOnly:!0}),new vt({optional:!0,idBlock:{tagClass:3,tagNumber:1},name:t.terminal_identifier||V,isHexOnly:!0}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:2},name:t.private_domain_name||V,value:[new Vr({value:[new ef,new ji]})]}),new vt({optional:!0,idBlock:{tagClass:3,tagNumber:3},name:t.organization_name||V,isHexOnly:!0}),new vt({optional:!0,name:t.numeric_user_identifier||V,idBlock:{tagClass:3,tagNumber:4},isHexOnly:!0}),new ue({optional:!0,name:t.personal_name||V,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 ue({optional:!0,name:t.organizational_unit_names||V,idBlock:{tagClass:3,tagNumber:6},value:[new _t({value:new ji})]})]})}o(kce,"builtInStandardAttributes");function Lce(r=!1){return new J({optional:r,value:[new ji,new ji]})}o(Lce,"builtInDomainDefinedAttributes");function Vce(r=!1){return new Jr({optional:r,value:[new vt({optional:!0,idBlock:{tagClass:3,tagNumber:0},isHexOnly:!0}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new St]})]})}o(Vce,"extensionAttributes");var Cr=class hd extends De{static{o(this,"GeneralName")}constructor(e={}){super(),this.type=O(e,Sv,hd.defaultValues(Sv)),this.value=O(e,Ev,hd.defaultValues(Ev)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Sv:return 9;case Ev:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Sv:return t===hd.defaultValues(e);case Ev:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new Vr({value:[new ue({idBlock:{tagClass:3,tagNumber:0},name:t.blockName||V,value:[new st,new ue({idBlock:{tagClass:3,tagNumber:0},value:[new St]})]}),new vt({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:1}}),new vt({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:2}}),new ue({idBlock:{tagClass:3,tagNumber:3},name:t.blockName||V,value:[kce(t.builtInStandardAttributes||{},!1),Lce(!0),Vce(!0)]}),new ue({idBlock:{tagClass:3,tagNumber:4},name:t.blockName||V,value:[Ur.schema(t.directoryName||{})]}),new ue({idBlock:{tagClass:3,tagNumber:5},name:t.blockName||V,value:[new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Vr({value:[new sd,new ji,new nd,new Ui,new rd]})]}),new ue({idBlock:{tagClass:3,tagNumber:1},value:[new Vr({value:[new sd,new ji,new nd,new Ui,new rd]})]})]}),new vt({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:6}}),new vt({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:7}}),new vt({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:8}})]})}fromSchema(e){Oe(e,["blockName","otherName","rfc822Name","dNSName","x400Address","directoryName","ediPartyName","uniformResourceIdentifier","iPAddress","registeredID"]);let t=_e(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(Ce.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=Wr(s);Ce.assert(i,"GeneralName value"),this.value=i.result.valueBlock.value}break;case 3:this.value=t.result.blockName;break;case 4:this.value=new Ur({schema:t.result.directoryName});break;case 5:this.value=t.result.ediPartyName;break;case 7:this.value=new je({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=Wr(s);Ce.assert(i,"GeneralName registeredID"),this.value=i.result.valueBlock.toString()}break}}toSchema(){switch(this.type){case 0:case 3:case 5:return new ue({idBlock:{tagClass:3,tagNumber:this.type},value:[this.value]});case 1:case 2:case 6:{let e=new rv({value:this.value});return e.idBlock.tagClass=3,e.idBlock.tagNumber=this.type,e}case 4:return new ue({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 st({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:V};if(typeof this.value=="string")e.value=this.value;else try{e.value=this.value.toJSON()}catch{}return e}};Cr.CLASS_NAME="GeneralName";var bv="accessMethod",Av="accessLocation",Uce=[bv,Av],fD=class pb extends De{static{o(this,"AccessDescription")}constructor(e={}){super(),this.accessMethod=O(e,bv,pb.defaultValues(bv)),this.accessLocation=O(e,Av,pb.defaultValues(Av)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case bv:return V;case Av:return new Cr;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new st({name:t.accessMethod||V}),Cr.schema(t.accessLocation||{})]})}fromSchema(e){Oe(e,Uce);let t=_e(e,e,pb.schema({names:{accessMethod:bv,accessLocation:{names:{blockName:Av}}}}));Ce.assertSchema(t,this.className),this.accessMethod=t.result.accessMethod.valueBlock.toString(),this.accessLocation=new Cr({schema:t.result.accessLocation})}toSchema(){return new J({value:[new st({value:this.accessMethod}),this.accessLocation.toSchema()]})}toJSON(){return{accessMethod:this.accessMethod,accessLocation:this.accessLocation.toJSON()}}};fD.CLASS_NAME="AccessDescription";var Sc="seconds",Ec="millis",bc="micros",uf=class pd extends De{static{o(this,"Accuracy")}constructor(e={}){super(),Sc in e&&(this.seconds=O(e,Sc,pd.defaultValues(Sc))),Ec in e&&(this.millis=O(e,Ec,pd.defaultValues(Ec))),bc in e&&(this.micros=O(e,bc,pd.defaultValues(bc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Sc:case Ec:case bc:return 0;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Sc:case Ec:case bc:return t===pd.defaultValues(e);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,optional:!0,value:[new ve({optional:!0,name:t.seconds||V}),new vt({name:t.millis||V,optional:!0,idBlock:{tagClass:3,tagNumber:0}}),new vt({name:t.micros||V,optional:!0,idBlock:{tagClass:3,tagNumber:1}})]})}fromSchema(e){Oe(e,[Sc,Ec,bc]);let t=_e(e,e,pd.schema({names:{seconds:Sc,millis:Ec,micros:bc}}));if(Ce.assertSchema(t,this.className),"seconds"in t.result&&(this.seconds=t.result.seconds.valueBlock.valueDec),"millis"in t.result){let n=new ve({valueHex:t.result.millis.valueBlock.valueHex});this.millis=n.valueBlock.valueDec}if("micros"in t.result){let n=new ve({valueHex:t.result.micros.valueBlock.valueHex});this.micros=n.valueBlock.valueDec}}toSchema(){let e=[];if(this.seconds!==void 0&&e.push(new ve({value:this.seconds})),this.millis!==void 0){let t=new ve({value:this.millis});e.push(new vt({idBlock:{tagClass:3,tagNumber:0},valueHex:t.valueBlock.valueHexView}))}if(this.micros!==void 0){let t=new ve({value:this.micros});e.push(new vt({idBlock:{tagClass:3,tagNumber:1},valueHex:t.valueBlock.valueHexView}))}return new J({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 FE="algorithmId",ov="algorithmParams",GF="algorithm",hD="params",jce=[GF,hD],ye=class Cv extends De{static{o(this,"AlgorithmIdentifier")}constructor(e={}){super(),this.algorithmId=O(e,FE,Cv.defaultValues(FE)),ov in e&&(this.algorithmParams=O(e,ov,Cv.defaultValues(ov))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case FE:return V;case ov:return new St;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case FE:return t===V;case ov:return t instanceof St;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,optional:t.optional||!1,value:[new st({name:t.algorithmIdentifier||V}),new St({name:t.algorithmParams||V,optional:!0})]})}fromSchema(e){Oe(e,jce);let t=_e(e,e,Cv.schema({names:{algorithmIdentifier:GF,algorithmParams:hD}}));Ce.assertSchema(t,this.className),this.algorithmId=t.result.algorithm.valueBlock.toString(),hD in t.result&&(this.algorithmParams=t.result.params)}toSchema(){let e=[];return e.push(new st({value:this.algorithmId})),this.algorithmParams&&!(this.algorithmParams instanceof St)&&e.push(this.algorithmParams),new J({value:e})}toJSON(){let e={algorithmId:this.algorithmId};return this.algorithmParams&&!(this.algorithmParams instanceof St)&&(e.algorithmParams=this.algorithmParams.toJSON()),e}isEqual(e){return!(e instanceof Cv)||this.algorithmId!==e.algorithmId?!1:this.algorithmParams?e.algorithmParams?JSON.stringify(this.algorithmParams)===JSON.stringify(e.algorithmParams):!1:!e.algorithmParams}};ye.CLASS_NAME="AlgorithmIdentifier";var dd="altNames",Mce=[dd],pD=class dD extends De{static{o(this,"AltName")}constructor(e={}){super(),this.altNames=O(e,dd,dD.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=O(e,"names",{});return new J({name:t.blockName||V,value:[new _t({name:t.altNames||V,value:Cr.schema()})]})}fromSchema(e){Oe(e,Mce);let t=_e(e,e,dD.schema({names:{altNames:dd}}));Ce.assertSchema(t,this.className),dd in t.result&&(this.altNames=Array.from(t.result.altNames,n=>new Cr({schema:n})))}toSchema(){return new J({value:Array.from(this.altNames,e=>e.toSchema())})}toJSON(){return{altNames:Array.from(this.altNames,e=>e.toJSON())}}};pD.CLASS_NAME="AltName";var md="type",gd="values",Fce=[md,gd],an=class db extends De{static{o(this,"Attribute")}constructor(e={}){super(),this.type=O(e,md,db.defaultValues(md)),this.values=O(e,gd,db.defaultValues(gd)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case md:return V;case gd:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case md:return t===V;case gd:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new st({name:t.type||V}),new Jr({name:t.setName||V,value:[new _t({name:t.values||V,value:new St})]})]})}fromSchema(e){Oe(e,Fce);let t=_e(e,e,db.schema({names:{type:md,values:gd}}));Ce.assertSchema(t,this.className),this.type=t.result.type.valueBlock.toString(),this.values=t.result.values}toSchema(){return new J({value:[new st({value:this.type}),new Jr({value:this.values})]})}toJSON(){return{type:this.type,values:Array.from(this.values,e=>e.toJSON())}}};an.CLASS_NAME="Attribute";var Nv="notBeforeTime",Tv="notAfterTime",qce=[Nv,Tv],bh=class mb extends De{static{o(this,"AttCertValidityPeriod")}constructor(e={}){super(),this.notBeforeTime=O(e,Nv,mb.defaultValues(Nv)),this.notAfterTime=O(e,Tv,mb.defaultValues(Tv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Nv:case Tv:return new Date(0,0,0);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new Lr({name:t.notBeforeTime||V}),new Lr({name:t.notAfterTime||V})]})}fromSchema(e){Oe(e,qce);let t=_e(e,e,mb.schema({names:{notBeforeTime:Nv,notAfterTime:Tv}}));Ce.assertSchema(t,this.className),this.notBeforeTime=t.result.notBeforeTime.toDate(),this.notAfterTime=t.result.notAfterTime.toDate()}toSchema(){return new J({value:[new Lr({valueDate:this.notBeforeTime}),new Lr({valueDate:this.notAfterTime})]})}toJSON(){return{notBeforeTime:this.notBeforeTime,notAfterTime:this.notAfterTime}}};bh.CLASS_NAME="AttCertValidityPeriod";var uv="names",EF="generalNames",zn=class mD extends De{static{o(this,"GeneralNames")}constructor(e={}){super(),this.names=O(e,uv,mD.defaultValues(uv)),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=O(e,uv,{});return new J({optional:t,name:n.blockName||V,value:[new _t({name:n.generalNames||V,value:Cr.schema()})]})}fromSchema(e){Oe(e,[uv,EF]);let t=_e(e,e,mD.schema({names:{blockName:uv,generalNames:EF}}));Ce.assertSchema(t,this.className),this.names=Array.from(t.result.generalNames,n=>new Cr({schema:n}))}toSchema(){return new J({value:Array.from(this.names,e=>e.toSchema())})}toJSON(){return{names:Array.from(this.names,e=>e.toJSON())}}};zn.CLASS_NAME="GeneralNames";var Hce="2.5.29.9",Kce="2.5.29.14",$ce="2.5.29.15",Gce="2.5.29.16",XF="2.5.29.17",WF="2.5.29.18",gB="2.5.29.19",Xce="2.5.29.20",Wce="2.5.29.27",zce="2.5.29.21",Jce="2.5.29.24",zF="2.5.29.28",JF="2.5.29.29",YF="2.5.29.30",QF="2.5.29.31",vB="2.5.29.46",ZF="2.5.29.32",Mi="2.5.29.32.0",Yce="1.3.6.1.4.1.311.21.10",e9="2.5.29.33",yB="2.5.29.35",t9="2.5.29.36",Qce="2.5.29.37",Zce="2.5.29.54",xB="1.3.6.1.5.5.7.1.1",ele="1.3.6.1.5.5.7.1.11",tle="1.3.6.1.4.1.11129.2.4.2";var rle="1.3.6.1.4.1.311.21.7",nle="1.3.6.1.4.1.311.21.1",sle="1.3.6.1.5.5.7.1.3",wB="1.2.840.113549.1.7.1",r9="1.2.840.113549.1.7.2",n9="1.2.840.113549.1.7.3",s9="1.2.840.113549.1.7.6",ile="1.2.840.113549.1.9.16.1.4",bF="1.2.840.113549.1.9.22.1",ale="1.2.840.113549.1.9.22.2",AF="1.2.840.113549.1.9.22.3",CF="1.2.840.113549.1.9.23.1",ole="1.3.6.1.5.5.7",SB=`${ole}.48`,gb=`${SB}.1.1`,AEe=`${SB}.2`,CEe=`${SB}.1`;var cf="keyIdentifier",lf="authorityCertIssuer",ff="authorityCertSerialNumber",ule=[cf,lf,ff],EB=class Iv extends De{static{o(this,"AuthorityKeyIdentifier")}constructor(e={}){super(),cf in e&&(this.keyIdentifier=O(e,cf,Iv.defaultValues(cf))),lf in e&&(this.authorityCertIssuer=O(e,lf,Iv.defaultValues(lf))),ff in e&&(this.authorityCertSerialNumber=O(e,ff,Iv.defaultValues(ff))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case cf:return new je;case lf:return[];case ff:return new ve;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new vt({name:t.keyIdentifier||V,optional:!0,idBlock:{tagClass:3,tagNumber:0}}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new _t({name:t.authorityCertIssuer||V,value:Cr.schema()})]}),new vt({name:t.authorityCertSerialNumber||V,optional:!0,idBlock:{tagClass:3,tagNumber:2}})]})}fromSchema(e){Oe(e,ule);let t=_e(e,e,Iv.schema({names:{keyIdentifier:cf,authorityCertIssuer:lf,authorityCertSerialNumber:ff}}));Ce.assertSchema(t,this.className),cf in t.result&&(this.keyIdentifier=new je({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 ve({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 ue({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 J({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}};EB.CLASS_NAME="AuthorityKeyIdentifier";var sf="pathLenConstraint",af="cA",bB=class vb extends De{static{o(this,"BasicConstraints")}constructor(e={}){super(),this.cA=O(e,af,!1),sf in e&&(this.pathLenConstraint=O(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=O(e,"names",{});return new J({name:t.blockName||V,value:[new ca({optional:!0,name:t.cA||V}),new ve({optional:!0,name:t.pathLenConstraint||V})]})}fromSchema(e){Oe(e,[af,sf]);let t=_e(e,e,vb.schema({names:{cA:af,pathLenConstraint:sf}}));Ce.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!==vb.defaultValues(af)&&e.push(new ca({value:this.cA})),sf in this&&(this.pathLenConstraint instanceof ve?e.push(this.pathLenConstraint):e.push(new ve({value:this.pathLenConstraint}))),new J({value:e})}toJSON(){let e={};return this.cA!==vb.defaultValues(af)&&(e.cA=this.cA),sf in this&&(this.pathLenConstraint instanceof ve?e.pathLenConstraint=this.pathLenConstraint.toJSON():e.pathLenConstraint=this.pathLenConstraint),e}};bB.CLASS_NAME="BasicConstraints";var k_="certificateIndex",L_="keyIndex",i9=class gD extends De{static{o(this,"CAVersion")}constructor(e={}){super(),this.certificateIndex=O(e,k_,gD.defaultValues(k_)),this.keyIndex=O(e,L_,gD.defaultValues(L_)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case k_:case L_:return 0;default:return super.defaultValues(e)}}static schema(){return new ve}fromSchema(e){if(e.constructor.blockName()!==ve.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 ve({valueHex:Yl(i,e)})}toJSON(){return{certificateIndex:this.certificateIndex,keyIndex:this.keyIndex}}};i9.CLASS_NAME="CAVersion";var _v="policyQualifierId",Dv="qualifier",cle=[_v,Dv],vD=class yb extends De{static{o(this,"PolicyQualifierInfo")}constructor(e={}){super(),this.policyQualifierId=O(e,_v,yb.defaultValues(_v)),this.qualifier=O(e,Dv,yb.defaultValues(Dv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case _v:return V;case Dv:return new St;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new st({name:t.policyQualifierId||V}),new St({name:t.qualifier||V})]})}fromSchema(e){Oe(e,cle);let t=_e(e,e,yb.schema({names:{policyQualifierId:_v,qualifier:Dv}}));Ce.assertSchema(t,this.className),this.policyQualifierId=t.result.policyQualifierId.valueBlock.toString(),this.qualifier=t.result.qualifier}toSchema(){return new J({value:[new st({value:this.policyQualifierId}),this.qualifier]})}toJSON(){return{policyQualifierId:this.policyQualifierId,qualifier:this.qualifier.toJSON()}}};vD.CLASS_NAME="PolicyQualifierInfo";var Bv="policyIdentifier",hf="policyQualifiers",lle=[Bv,hf],yD=class xb extends De{static{o(this,"PolicyInformation")}constructor(e={}){super(),this.policyIdentifier=O(e,Bv,xb.defaultValues(Bv)),hf in e&&(this.policyQualifiers=O(e,hf,xb.defaultValues(hf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Bv:return V;case hf:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new st({name:t.policyIdentifier||V}),new J({optional:!0,value:[new _t({name:t.policyQualifiers||V,value:vD.schema()})]})]})}fromSchema(e){Oe(e,lle);let t=_e(e,e,xb.schema({names:{policyIdentifier:Bv,policyQualifiers:hf}}));Ce.assertSchema(t,this.className),this.policyIdentifier=t.result.policyIdentifier.valueBlock.toString(),hf in t.result&&(this.policyQualifiers=Array.from(t.result.policyQualifiers,n=>new vD({schema:n})))}toSchema(){let e=[];return e.push(new st({value:this.policyIdentifier})),this.policyQualifiers&&e.push(new J({value:Array.from(this.policyQualifiers,t=>t.toSchema())})),new J({value:e})}toJSON(){let e={policyIdentifier:this.policyIdentifier};return this.policyQualifiers&&(e.policyQualifiers=Array.from(this.policyQualifiers,t=>t.toJSON())),e}};yD.CLASS_NAME="PolicyInformation";var Rv="certificatePolicies",fle=[Rv],xD=class wD extends De{static{o(this,"CertificatePolicies")}constructor(e={}){super(),this.certificatePolicies=O(e,Rv,wD.defaultValues(Rv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Rv:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new _t({name:t.certificatePolicies||V,value:yD.schema()})]})}fromSchema(e){Oe(e,fle);let t=_e(e,e,wD.schema({names:{certificatePolicies:Rv}}));Ce.assertSchema(t,this.className),this.certificatePolicies=Array.from(t.result.certificatePolicies,n=>new yD({schema:n}))}toSchema(){return new J({value:Array.from(this.certificatePolicies,e=>e.toSchema())})}toJSON(){return{certificatePolicies:Array.from(this.certificatePolicies,e=>e.toJSON())}}};xD.CLASS_NAME="CertificatePolicies";var Ov="templateID",Ko="templateMajorVersion",$o="templateMinorVersion",hle=[Ov,Ko,$o],ple=class Pv extends De{static{o(this,"CertificateTemplate")}constructor(e={}){super(),this.templateID=O(e,Ov,Pv.defaultValues(Ov)),Ko in e&&(this.templateMajorVersion=O(e,Ko,Pv.defaultValues(Ko))),$o in e&&(this.templateMinorVersion=O(e,$o,Pv.defaultValues($o))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Ov:return V;case Ko:case $o:return 0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new st({name:t.templateID||V}),new ve({name:t.templateMajorVersion||V,optional:!0}),new ve({name:t.templateMinorVersion||V,optional:!0})]})}fromSchema(e){Oe(e,hle);let t=_e(e,e,Pv.schema({names:{templateID:Ov,templateMajorVersion:Ko,templateMinorVersion:$o}}));Ce.assertSchema(t,this.className),this.templateID=t.result.templateID.valueBlock.toString(),Ko in t.result&&(this.templateMajorVersion=t.result.templateMajorVersion.valueBlock.valueDec),$o in t.result&&(this.templateMinorVersion=t.result.templateMinorVersion.valueBlock.valueDec)}toSchema(){let e=[];return e.push(new st({value:this.templateID})),Ko in this&&e.push(new ve({value:this.templateMajorVersion})),$o in this&&e.push(new ve({value:this.templateMinorVersion})),new J({value:e})}toJSON(){let e={templateID:this.templateID};return Ko in this&&(e.templateMajorVersion=this.templateMajorVersion),$o in this&&(e.templateMinorVersion=this.templateMinorVersion),e}},pf="distributionPoint",a9="distributionPointNames",df="reasons",mf="cRLIssuer",o9="cRLIssuerNames",dle=[pf,a9,df,mf,o9],SD=class kv extends De{static{o(this,"DistributionPoint")}constructor(e={}){super(),pf in e&&(this.distributionPoint=O(e,pf,kv.defaultValues(pf))),df in e&&(this.reasons=O(e,df,kv.defaultValues(df))),mf in e&&(this.cRLIssuer=O(e,mf,kv.defaultValues(mf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case pf:return[];case df:return new Kt;case mf:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Vr({value:[new ue({name:t.distributionPoint||V,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new _t({name:t.distributionPointNames||V,value:Cr.schema()})]}),new ue({name:t.distributionPoint||V,optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Ur.schema().valueBlock.value})]})]}),new vt({name:t.reasons||V,optional:!0,idBlock:{tagClass:3,tagNumber:1}}),new ue({name:t.cRLIssuer||V,optional:!0,idBlock:{tagClass:3,tagNumber:2},value:[new _t({name:t.cRLIssuerNames||V,value:Cr.schema()})]})]})}fromSchema(e){Oe(e,dle);let t=_e(e,e,kv.schema({names:{distributionPoint:pf,distributionPointNames:a9,reasons:df,cRLIssuer:mf,cRLIssuerNames:o9}}));Ce.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 Ur({schema:new J({value:t.result.distributionPoint.valueBlock.value})}))),df in t.result&&(this.reasons=new Kt({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 ue({idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.distributionPoint,n=>n.toSchema())}):t=new ue({idBlock:{tagClass:3,tagNumber:1},value:[this.distributionPoint.toSchema()]}),e.push(new ue({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 ue({idBlock:{tagClass:3,tagNumber:2},value:Array.from(this.cRLIssuer,t=>t.toSchema())})),new J({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}};SD.CLASS_NAME="DistributionPoint";var Lv="distributionPoints",mle=[Lv],ED=class bD extends De{static{o(this,"CRLDistributionPoints")}constructor(e={}){super(),this.distributionPoints=O(e,Lv,bD.defaultValues(Lv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Lv:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new _t({name:t.distributionPoints||V,value:SD.schema()})]})}fromSchema(e){Oe(e,mle);let t=_e(e,e,bD.schema({names:{distributionPoints:Lv}}));Ce.assertSchema(t,this.className),this.distributionPoints=Array.from(t.result.distributionPoints,n=>new SD({schema:n}))}toSchema(){return new J({value:Array.from(this.distributionPoints,e=>e.toSchema())})}toJSON(){return{distributionPoints:Array.from(this.distributionPoints,e=>e.toJSON())}}};ED.CLASS_NAME="CRLDistributionPoints";var Vv="keyPurposes",gle=[Vv],u9=class AD extends De{static{o(this,"ExtKeyUsage")}constructor(e={}){super(),this.keyPurposes=O(e,Vv,AD.defaultValues(Vv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Vv:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new _t({name:t.keyPurposes||V,value:new st})]})}fromSchema(e){Oe(e,gle);let t=_e(e,e,AD.schema({names:{keyPurposes:Vv}}));Ce.assertSchema(t,this.className),this.keyPurposes=Array.from(t.result.keyPurposes,n=>n.valueBlock.toString())}toSchema(){return new J({value:Array.from(this.keyPurposes,e=>new st({value:e}))})}toJSON(){return{keyPurposes:Array.from(this.keyPurposes)}}};u9.CLASS_NAME="ExtKeyUsage";var cv="accessDescriptions",CD=class ND extends De{static{o(this,"InfoAccess")}constructor(e={}){super(),this.accessDescriptions=O(e,cv,ND.defaultValues(cv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case cv:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new _t({name:t.accessDescriptions||V,value:fD.schema()})]})}fromSchema(e){Oe(e,[cv]);let t=_e(e,e,ND.schema({names:{accessDescriptions:cv}}));Ce.assertSchema(t,this.className),this.accessDescriptions=Array.from(t.result.accessDescriptions,n=>new fD({schema:n}))}toSchema(){return new J({value:Array.from(this.accessDescriptions,e=>e.toSchema())})}toJSON(){return{accessDescriptions:Array.from(this.accessDescriptions,e=>e.toJSON())}}};CD.CLASS_NAME="InfoAccess";var gf="distributionPoint",c9="distributionPointNames",Ac="onlyContainsUserCerts",Cc="onlyContainsCACerts",Nc="onlySomeReasons",Tc="indirectCRL",Ic="onlyContainsAttributeCerts",vle=[gf,c9,Ac,Cc,Nc,Tc,Ic],l9=class us extends De{static{o(this,"IssuingDistributionPoint")}constructor(e={}){super(),gf in e&&(this.distributionPoint=O(e,gf,us.defaultValues(gf))),this.onlyContainsUserCerts=O(e,Ac,us.defaultValues(Ac)),this.onlyContainsCACerts=O(e,Cc,us.defaultValues(Cc)),Nc in e&&(this.onlySomeReasons=O(e,Nc,us.defaultValues(Nc))),this.indirectCRL=O(e,Tc,us.defaultValues(Tc)),this.onlyContainsAttributeCerts=O(e,Ic,us.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=O(e,"names",{});return new J({name:t.blockName||V,value:[new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Vr({value:[new ue({name:t.distributionPoint||V,idBlock:{tagClass:3,tagNumber:0},value:[new _t({name:t.distributionPointNames||V,value:Cr.schema()})]}),new ue({name:t.distributionPoint||V,idBlock:{tagClass:3,tagNumber:1},value:Ur.schema().valueBlock.value})]})]}),new vt({name:t.onlyContainsUserCerts||V,optional:!0,idBlock:{tagClass:3,tagNumber:1}}),new vt({name:t.onlyContainsCACerts||V,optional:!0,idBlock:{tagClass:3,tagNumber:2}}),new vt({name:t.onlySomeReasons||V,optional:!0,idBlock:{tagClass:3,tagNumber:3}}),new vt({name:t.indirectCRL||V,optional:!0,idBlock:{tagClass:3,tagNumber:4}}),new vt({name:t.onlyContainsAttributeCerts||V,optional:!0,idBlock:{tagClass:3,tagNumber:5}})]})}fromSchema(e){Oe(e,vle);let t=_e(e,e,us.schema({names:{distributionPoint:gf,distributionPointNames:c9,onlyContainsUserCerts:Ac,onlyContainsCACerts:Cc,onlySomeReasons:Nc,indirectCRL:Tc,onlyContainsAttributeCerts:Ic}}));if(Ce.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 Ur({schema:new J({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 ue({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 ue({idBlock:{tagClass:3,tagNumber:0},value:[t]}))}if(this.onlyContainsUserCerts!==us.defaultValues(Ac)&&e.push(new vt({idBlock:{tagClass:3,tagNumber:1},valueHex:new Uint8Array([255]).buffer})),this.onlyContainsCACerts!==us.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!==us.defaultValues(Tc)&&e.push(new vt({idBlock:{tagClass:3,tagNumber:4},valueHex:new Uint8Array([255]).buffer})),this.onlyContainsAttributeCerts!==us.defaultValues(Ic)&&e.push(new vt({idBlock:{tagClass:3,tagNumber:5},valueHex:new Uint8Array([255]).buffer})),new J({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!==us.defaultValues(Ac)&&(e.onlyContainsUserCerts=this.onlyContainsUserCerts),this.onlyContainsCACerts!==us.defaultValues(Cc)&&(e.onlyContainsCACerts=this.onlyContainsCACerts),Nc in this&&(e.onlySomeReasons=this.onlySomeReasons),this.indirectCRL!==us.defaultValues(Tc)&&(e.indirectCRL=this.indirectCRL),this.onlyContainsAttributeCerts!==us.defaultValues(Ic)&&(e.onlyContainsAttributeCerts=this.onlyContainsAttributeCerts),e}};l9.CLASS_NAME="IssuingDistributionPoint";var Uv="base",vd="minimum",_c="maximum",yle=[Uv,vd,_c],jv=class Mv extends De{static{o(this,"GeneralSubtree")}constructor(e={}){super(),this.base=O(e,Uv,Mv.defaultValues(Uv)),this.minimum=O(e,vd,Mv.defaultValues(vd)),_c in e&&(this.maximum=O(e,_c,Mv.defaultValues(_c))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Uv:return new Cr;case vd:return 0;case _c:return 0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[Cr.schema(t.base||{}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new ve({name:t.minimum||V})]}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new ve({name:t.maximum||V})]})]})}fromSchema(e){Oe(e,yle);let t=_e(e,e,Mv.schema({names:{base:{names:{blockName:Uv}},minimum:vd,maximum:_c}}));Ce.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 ve?t=this.minimum:t=new ve({value:this.minimum}),e.push(new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[t]}))}if(_c in this){let t=0;this.maximum instanceof ve?t=this.maximum:t=new ve({value:this.maximum}),e.push(new ue({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[t]}))}return new J({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}};jv.CLASS_NAME="GeneralSubtree";var vf="permittedSubtrees",yf="excludedSubtrees",xle=[vf,yf],f9=class wb extends De{static{o(this,"NameConstraints")}constructor(e={}){super(),vf in e&&(this.permittedSubtrees=O(e,vf,wb.defaultValues(vf))),yf in e&&(this.excludedSubtrees=O(e,yf,wb.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=O(e,"names",{});return new J({name:t.blockName||V,value:[new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new _t({name:t.permittedSubtrees||V,value:jv.schema()})]}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new _t({name:t.excludedSubtrees||V,value:jv.schema()})]})]})}fromSchema(e){Oe(e,xle);let t=_e(e,e,wb.schema({names:{permittedSubtrees:vf,excludedSubtrees:yf}}));Ce.assertSchema(t,this.className),vf in t.result&&(this.permittedSubtrees=Array.from(t.result.permittedSubtrees,n=>new jv({schema:n}))),yf in t.result&&(this.excludedSubtrees=Array.from(t.result.excludedSubtrees,n=>new jv({schema:n})))}toSchema(){let e=[];return this.permittedSubtrees&&e.push(new ue({idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.permittedSubtrees,t=>t.toSchema())})),this.excludedSubtrees&&e.push(new ue({idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.excludedSubtrees,t=>t.toSchema())})),new J({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}};f9.CLASS_NAME="NameConstraints";var Go="requireExplicitPolicy",Xo="inhibitPolicyMapping",wle=[Go,Xo],h9=class Sb extends De{static{o(this,"PolicyConstraints")}constructor(e={}){super(),Go in e&&(this.requireExplicitPolicy=O(e,Go,Sb.defaultValues(Go))),Xo in e&&(this.inhibitPolicyMapping=O(e,Xo,Sb.defaultValues(Xo))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Go:return 0;case Xo:return 0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new vt({name:t.requireExplicitPolicy||V,optional:!0,idBlock:{tagClass:3,tagNumber:0}}),new vt({name:t.inhibitPolicyMapping||V,optional:!0,idBlock:{tagClass:3,tagNumber:1}})]})}fromSchema(e){Oe(e,wle);let t=_e(e,e,Sb.schema({names:{requireExplicitPolicy:Go,inhibitPolicyMapping:Xo}}));if(Ce.assertSchema(t,this.className),Go in t.result){let n=t.result.requireExplicitPolicy;n.idBlock.tagClass=1,n.idBlock.tagNumber=2;let s=n.toBER(!1),i=Wr(s);Ce.assert(i,"Integer"),this.requireExplicitPolicy=i.result.valueBlock.valueDec}if(Xo in t.result){let n=t.result.inhibitPolicyMapping;n.idBlock.tagClass=1,n.idBlock.tagNumber=2;let s=n.toBER(!1),i=Wr(s);Ce.assert(i,"Integer"),this.inhibitPolicyMapping=i.result.valueBlock.valueDec}}toSchema(){let e=[];if(Go in this){let t=new ve({value:this.requireExplicitPolicy});t.idBlock.tagClass=3,t.idBlock.tagNumber=0,e.push(t)}if(Xo in this){let t=new ve({value:this.inhibitPolicyMapping});t.idBlock.tagClass=3,t.idBlock.tagNumber=1,e.push(t)}return new J({value:e})}toJSON(){let e={};return Go in this&&(e.requireExplicitPolicy=this.requireExplicitPolicy),Xo in this&&(e.inhibitPolicyMapping=this.inhibitPolicyMapping),e}};h9.CLASS_NAME="PolicyConstraints";var Fv="issuerDomainPolicy",qv="subjectDomainPolicy",Sle=[Fv,qv],TD=class Eb extends De{static{o(this,"PolicyMapping")}constructor(e={}){super(),this.issuerDomainPolicy=O(e,Fv,Eb.defaultValues(Fv)),this.subjectDomainPolicy=O(e,qv,Eb.defaultValues(qv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Fv:return V;case qv:return V;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new st({name:t.issuerDomainPolicy||V}),new st({name:t.subjectDomainPolicy||V})]})}fromSchema(e){Oe(e,Sle);let t=_e(e,e,Eb.schema({names:{issuerDomainPolicy:Fv,subjectDomainPolicy:qv}}));Ce.assertSchema(t,this.className),this.issuerDomainPolicy=t.result.issuerDomainPolicy.valueBlock.toString(),this.subjectDomainPolicy=t.result.subjectDomainPolicy.valueBlock.toString()}toSchema(){return new J({value:[new st({value:this.issuerDomainPolicy}),new st({value:this.subjectDomainPolicy})]})}toJSON(){return{issuerDomainPolicy:this.issuerDomainPolicy,subjectDomainPolicy:this.subjectDomainPolicy}}};TD.CLASS_NAME="PolicyMapping";var Hv="mappings",Ele=[Hv],p9=class ID extends De{static{o(this,"PolicyMappings")}constructor(e={}){super(),this.mappings=O(e,Hv,ID.defaultValues(Hv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Hv:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new _t({name:t.mappings||V,value:TD.schema()})]})}fromSchema(e){Oe(e,Ele);let t=_e(e,e,ID.schema({names:{mappings:Hv}}));Ce.assertSchema(t,this.className),this.mappings=Array.from(t.result.mappings,n=>new TD({schema:n}))}toSchema(){return new J({value:Array.from(this.mappings,e=>e.toSchema())})}toJSON(){return{mappings:Array.from(this.mappings,e=>e.toJSON())}}};p9.CLASS_NAME="PolicyMappings";var Dc="notBefore",Bc="notAfter",ble=[Dc,Bc],d9=class bb extends De{static{o(this,"PrivateKeyUsagePeriod")}constructor(e={}){super(),Dc in e&&(this.notBefore=O(e,Dc,bb.defaultValues(Dc))),Bc in e&&(this.notAfter=O(e,Bc,bb.defaultValues(Bc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Dc:return new Date;case Bc:return new Date;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new vt({name:t.notBefore||V,optional:!0,idBlock:{tagClass:3,tagNumber:0}}),new vt({name:t.notAfter||V,optional:!0,idBlock:{tagClass:3,tagNumber:1}})]})}fromSchema(e){Oe(e,ble);let t=_e(e,e,bb.schema({names:{notBefore:Dc,notAfter:Bc}}));if(Ce.assertSchema(t,this.className),Dc in t.result){let n=new Lr;n.fromBuffer(t.result.notBefore.valueBlock.valueHex),this.notBefore=n.toDate()}if(Bc in t.result){let n=new Lr({valueHex:t.result.notAfter.valueBlock.valueHex});n.fromBuffer(t.result.notAfter.valueBlock.valueHex),this.notAfter=n.toDate()}}toSchema(){let e=[];return Dc in this&&e.push(new vt({idBlock:{tagClass:3,tagNumber:0},valueHex:new Lr({valueDate:this.notBefore}).valueBlock.valueHexView})),Bc in this&&e.push(new vt({idBlock:{tagClass:3,tagNumber:1},valueHex:new Lr({valueDate:this.notAfter}).valueBlock.valueHexView})),new J({value:e})}toJSON(){let e={};return this.notBefore&&(e.notBefore=this.notBefore),this.notAfter&&(e.notAfter=this.notAfter),e}};d9.CLASS_NAME="PrivateKeyUsagePeriod";var yd="id",Wo="type",xd="values",Ale=[yd,Wo],Cle=[xd],_D=class Ab extends De{static{o(this,"QCStatement")}constructor(e={}){super(),this.id=O(e,yd,Ab.defaultValues(yd)),Wo in e&&(this.type=O(e,Wo,Ab.defaultValues(Wo))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case yd:return V;case Wo:return new zr;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case yd:return t===V;case Wo:return t instanceof zr;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new st({name:t.id||V}),new St({name:t.type||V,optional:!0})]})}fromSchema(e){Oe(e,Ale);let t=_e(e,e,Ab.schema({names:{id:yd,type:Wo}}));Ce.assertSchema(t,this.className),this.id=t.result.id.valueBlock.toString(),Wo in t.result&&(this.type=t.result.type)}toSchema(){let e=[new st({value:this.id})];return Wo in this&&e.push(this.type),new J({value:e})}toJSON(){let e={id:this.id};return this.type&&(e.type=this.type.toJSON()),e}};_D.CLASS_NAME="QCStatement";var m9=class DD extends De{static{o(this,"QCStatements")}constructor(e={}){super(),this.values=O(e,xd,DD.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=O(e,"names",{});return new J({name:t.blockName||V,value:[new _t({name:t.values||V,value:_D.schema(t.value||{})})]})}fromSchema(e){Oe(e,Cle);let t=_e(e,e,DD.schema({names:{values:xd}}));Ce.assertSchema(t,this.className),this.values=Array.from(t.result.values,n=>new _D({schema:n}))}toSchema(){return new J({value:Array.from(this.values,e=>e.toSchema())})}toJSON(){return{values:Array.from(this.values,e=>e.toJSON())}}};m9.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 qE="x",HE="y",KE="namedCurve",uu=class wd extends De{static{o(this,"ECPublicKey")}constructor(e={}){super(),this.x=O(e,qE,wd.defaultValues(qE)),this.y=O(e,HE,wd.defaultValues(HE)),this.namedCurve=O(e,KE,wd.defaultValues(KE)),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case qE:case HE:return sn;case KE:return V;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case qE:case HE:return t instanceof ArrayBuffer&&fc(t,wd.defaultValues(e));case KE:return typeof t=="string"&&t===wd.defaultValues(e);default:return super.defaultValues(e)}}static schema(){return new sv}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 sv({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:NE(Yg(this.x),!0,!0,!1),y:NE(Yg(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)}};uu.CLASS_NAME="ECPublicKey";var Kv="modulus",$v="publicExponent",Nle=[Kv,$v],BD=class Cb extends De{static{o(this,"RSAPublicKey")}constructor(e={}){super(),this.modulus=O(e,Kv,Cb.defaultValues(Kv)),this.publicExponent=O(e,$v,Cb.defaultValues($v)),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 ve;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ve({name:t.modulus||V}),new ve({name:t.publicExponent||V})]})}fromSchema(e){Oe(e,Nle);let t=_e(e,e,Cb.schema({names:{modulus:Kv,publicExponent:$v}}));Ce.assertSchema(t,this.className),this.modulus=t.result.modulus.convertFromDER(256),this.publicExponent=t.result.publicExponent}toSchema(){return new J({value:[this.modulus.convertToDER(),this.publicExponent]})}toJSON(){return{n:At.ToBase64Url(this.modulus.valueBlock.valueHexView),e:At.ToBase64Url(this.publicExponent.valueBlock.valueHexView)}}fromJSON(e){pr.assert("json",e,"n","e");let t=Ql(td(e.n,!0));this.modulus=new ve({valueHex:t.slice(0,Math.pow(2,lM(t.byteLength)))}),this.publicExponent=new ve({valueHex:Ql(td(e.e,!0)).slice(0,3)})}};BD.CLASS_NAME="RSAPublicKey";var Gv="algorithm",Xv="subjectPublicKey",Tle=[Gv,Xv],ya=class Nb extends De{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()===st.blockName())try{this._parsedKey=new uu({namedCurve:this.algorithm.algorithmParams.valueBlock.toString(),schema:this.subjectPublicKey.valueBlock.valueHexView})}catch{}break;case"1.2.840.113549.1.1.1":{let e=Wr(this.subjectPublicKey.valueBlock.valueHexView);if(e.offset!==-1)try{this._parsedKey=new BD({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=O(e,Gv,Nb.defaultValues(Gv)),this.subjectPublicKey=O(e,Xv,Nb.defaultValues(Xv));let t=O(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 Gv:return new ye;case Xv:return new Kt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[ye.schema(t.algorithm||{}),new Kt({name:t.subjectPublicKey||V})]})}fromSchema(e){Oe(e,Tle);let t=_e(e,e,Nb.schema({names:{algorithm:{names:{blockName:Gv}},subjectPublicKey:Xv}}));Ce.assertSchema(t,this.className),this.algorithm=new ye({schema:t.result.algorithm}),this.subjectPublicKey=t.result.subjectPublicKey}toSchema(){return new J({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 uu({json:e}),this.algorithm=new ye({algorithmId:"1.2.840.10045.2.1",algorithmParams:new st({value:this.parsedKey.namedCurve})});break;case"RSA":this.parsedKey=new BD({json:e}),this.algorithm=new ye({algorithmId:"1.2.840.113549.1.1.1",algorithmParams:new zr});break;default:throw new Error(`Invalid value for "kty" parameter: ${e.kty}`)}this.subjectPublicKey=new Kt({valueHex:this.parsedKey.toSchema().toBER(!1)})}}async importKey(e,t=Ot(!0)){try{if(!e)throw new Error("Need to provide publicKey input parameter");let n=await t.exportKey("spki",e),s=Wr(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}`)}}};ya.CLASS_NAME="PublicKeyInfo";var Sd="version",Ed="privateKey",fa="namedCurve",Rc="publicKey",Ile=[Sd,Ed,fa,Rc],RD=class zo extends De{static{o(this,"ECPrivateKey")}constructor(e={}){super(),this.version=O(e,Sd,zo.defaultValues(Sd)),this.privateKey=O(e,Ed,zo.defaultValues(Ed)),fa in e&&(this.namedCurve=O(e,fa,zo.defaultValues(fa))),Rc in e&&(this.publicKey=O(e,Rc,zo.defaultValues(Rc))),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Sd:return 1;case Ed:return new je;case fa:return V;case Rc:return new uu;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Sd:return t===zo.defaultValues(e);case Ed:return t.isEqual(zo.defaultValues(e));case fa:return t===V;case Rc:return uu.compareWithDefault(fa,t.namedCurve)&&uu.compareWithDefault("x",t.x)&&uu.compareWithDefault("y",t.y);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ve({name:t.version||V}),new je({name:t.privateKey||V}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new st({name:t.namedCurve||V})]}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Kt({name:t.publicKey||V})]})]})}fromSchema(e){Oe(e,Ile);let t=_e(e,e,zo.schema({names:{version:Sd,privateKey:Ed,namedCurve:fa,publicKey:Rc}}));if(Ce.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.privateKey=t.result.privateKey,fa in t.result&&(this.namedCurve=t.result.namedCurve.valueBlock.toString()),Rc in t.result){let n={schema:t.result.publicKey.valueBlock.valueHex};fa in this&&(n.namedCurve=this.namedCurve),this.publicKey=new uu(n)}}toSchema(){let e=[new ve({value:this.version}),this.privateKey];return this.namedCurve&&e.push(new ue({idBlock:{tagClass:3,tagNumber:0},value:[new st({value:this.namedCurve})]})),this.publicKey&&e.push(new ue({idBlock:{tagClass:3,tagNumber:1},value:[new Kt({valueHex:this.publicKey.toSchema().toBER(!1)})]})),new J({value:e})}toJSON(){if(!this.namedCurve||zo.compareWithDefault(fa,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:At.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=At.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 je({valueHex:i})}else this.privateKey=new je({valueHex:s.slice(0,t)});e.x&&e.y&&(this.publicKey=new uu({json:e}))}};RD.CLASS_NAME="ECPrivateKey";var Wv="prime",zv="exponent",Jv="coefficient",_le=[Wv,zv,Jv],Tb=class Yv extends De{static{o(this,"OtherPrimeInfo")}constructor(e={}){super(),this.prime=O(e,Wv,Yv.defaultValues(Wv)),this.exponent=O(e,zv,Yv.defaultValues(zv)),this.coefficient=O(e,Jv,Yv.defaultValues(Jv)),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Wv:return new ve;case zv:return new ve;case Jv:return new ve;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ve({name:t.prime||V}),new ve({name:t.exponent||V}),new ve({name:t.coefficient||V})]})}fromSchema(e){Oe(e,_le);let t=_e(e,e,Yv.schema({names:{prime:Wv,exponent:zv,coefficient:Jv}}));Ce.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 J({value:[this.prime.convertToDER(),this.exponent.convertToDER(),this.coefficient.convertToDER()]})}toJSON(){return{r:At.ToBase64Url(this.prime.valueBlock.valueHexView),d:At.ToBase64Url(this.exponent.valueBlock.valueHexView),t:At.ToBase64Url(this.coefficient.valueBlock.valueHexView)}}fromJSON(e){pr.assert("json",e,"r","d","r"),this.prime=new ve({valueHex:At.FromBase64Url(e.r)}),this.exponent=new ve({valueHex:At.FromBase64Url(e.d)}),this.coefficient=new ve({valueHex:At.FromBase64Url(e.t)})}};Tb.CLASS_NAME="OtherPrimeInfo";var Qv="version",Zv="modulus",e1="publicExponent",t1="privateExponent",r1="prime1",n1="prime2",s1="exponent1",i1="exponent2",a1="coefficient",wf="otherPrimeInfos",Dle=[Qv,Zv,e1,t1,r1,n1,s1,i1,a1,wf],OD=class Fi extends De{static{o(this,"RSAPrivateKey")}constructor(e={}){super(),this.version=O(e,Qv,Fi.defaultValues(Qv)),this.modulus=O(e,Zv,Fi.defaultValues(Zv)),this.publicExponent=O(e,e1,Fi.defaultValues(e1)),this.privateExponent=O(e,t1,Fi.defaultValues(t1)),this.prime1=O(e,r1,Fi.defaultValues(r1)),this.prime2=O(e,n1,Fi.defaultValues(n1)),this.exponent1=O(e,s1,Fi.defaultValues(s1)),this.exponent2=O(e,i1,Fi.defaultValues(i1)),this.coefficient=O(e,a1,Fi.defaultValues(a1)),wf in e&&(this.otherPrimeInfos=O(e,wf,Fi.defaultValues(wf))),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Qv:return 0;case Zv:return new ve;case e1:return new ve;case t1:return new ve;case r1:return new ve;case n1:return new ve;case s1:return new ve;case i1:return new ve;case a1:return new ve;case wf:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ve({name:t.version||V}),new ve({name:t.modulus||V}),new ve({name:t.publicExponent||V}),new ve({name:t.privateExponent||V}),new ve({name:t.prime1||V}),new ve({name:t.prime2||V}),new ve({name:t.exponent1||V}),new ve({name:t.exponent2||V}),new ve({name:t.coefficient||V}),new J({optional:!0,value:[new _t({name:t.otherPrimeInfosName||V,value:Tb.schema(t.otherPrimeInfo||{})})]})]})}fromSchema(e){Oe(e,Dle);let t=_e(e,e,Fi.schema({names:{version:Qv,modulus:Zv,publicExponent:e1,privateExponent:t1,prime1:r1,prime2:n1,exponent1:s1,exponent2:i1,coefficient:a1,otherPrimeInfo:{names:{blockName:wf}}}}));Ce.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 Tb({schema:n})))}toSchema(){let e=[];return e.push(new ve({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 J({value:Array.from(this.otherPrimeInfos,t=>t.toSchema())})),new J({value:e})}toJSON(){let e={n:At.ToBase64Url(this.modulus.valueBlock.valueHexView),e:At.ToBase64Url(this.publicExponent.valueBlock.valueHexView),d:At.ToBase64Url(this.privateExponent.valueBlock.valueHexView),p:At.ToBase64Url(this.prime1.valueBlock.valueHexView),q:At.ToBase64Url(this.prime2.valueBlock.valueHexView),dp:At.ToBase64Url(this.exponent1.valueBlock.valueHexView),dq:At.ToBase64Url(this.exponent2.valueBlock.valueHexView),qi:At.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 ve({valueHex:At.FromBase64Url(e.n)}),this.publicExponent=new ve({valueHex:At.FromBase64Url(e.e)}),this.privateExponent=new ve({valueHex:At.FromBase64Url(e.d)}),this.prime1=new ve({valueHex:At.FromBase64Url(e.p)}),this.prime2=new ve({valueHex:At.FromBase64Url(e.q)}),this.exponent1=new ve({valueHex:At.FromBase64Url(e.dp)}),this.exponent2=new ve({valueHex:At.FromBase64Url(e.dq)}),this.coefficient=new ve({valueHex:At.FromBase64Url(e.qi)}),e.oth&&(this.otherPrimeInfos=Array.from(e.oth,t=>new Tb({json:t})))}};OD.CLASS_NAME="RSAPrivateKey";var o1="version",u1="privateKeyAlgorithm",c1="privateKey",Sf="attributes",$E="parsedKey",Ble=[o1,u1,c1,Sf],Jy=class Ef extends De{static{o(this,"PrivateKeyInfo")}constructor(e={}){super(),this.version=O(e,o1,Ef.defaultValues(o1)),this.privateKeyAlgorithm=O(e,u1,Ef.defaultValues(u1)),this.privateKey=O(e,c1,Ef.defaultValues(c1)),Sf in e&&(this.attributes=O(e,Sf,Ef.defaultValues(Sf))),$E in e&&(this.parsedKey=O(e,$E,Ef.defaultValues($E))),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case o1:return 0;case u1:return new ye;case c1:return new je;case Sf:return[];case $E:return{};default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ve({name:t.version||V}),ye.schema(t.privateKeyAlgorithm||{}),new je({name:t.privateKey||V}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new _t({name:t.attributes||V,value:an.schema()})]})]})}fromSchema(e){Oe(e,Ble);let t=_e(e,e,Ef.schema({names:{version:o1,privateKeyAlgorithm:{names:{blockName:u1}},privateKey:c1,attributes:Sf}}));switch(Ce.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.privateKeyAlgorithm=new ye({schema:t.result.privateKeyAlgorithm}),this.privateKey=t.result.privateKey,Sf in t.result&&(this.attributes=Array.from(t.result.attributes,n=>new an({schema:n}))),this.privateKeyAlgorithm.algorithmId){case"1.2.840.113549.1.1.1":{let n=Wr(this.privateKey.valueBlock.valueHexView);n.offset!==-1&&(this.parsedKey=new OD({schema:n.result}))}break;case"1.2.840.10045.2.1":if("algorithmParams"in this.privateKeyAlgorithm&&this.privateKeyAlgorithm.algorithmParams instanceof st){let n=Wr(this.privateKey.valueBlock.valueHexView);n.offset!==-1&&(this.parsedKey=new RD({namedCurve:this.privateKeyAlgorithm.algorithmParams.valueBlock.toString(),schema:n.result}))}break}}toSchema(){let e=[new ve({value:this.version}),this.privateKeyAlgorithm.toSchema(),this.privateKey];return this.attributes&&e.push(new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.attributes,t=>t.toSchema())})),new J({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 RD({json:e}),this.privateKeyAlgorithm=new ye({algorithmId:"1.2.840.10045.2.1",algorithmParams:new st({value:this.parsedKey.namedCurve})});break;case"RSA":this.parsedKey=new OD({json:e}),this.privateKeyAlgorithm=new ye({algorithmId:"1.2.840.113549.1.1.1",algorithmParams:new zr});break;default:throw new Error(`Invalid value for "kty" parameter: ${e.kty}`)}this.privateKey=new je({valueHex:this.parsedKey.toSchema().toBER(!1)})}}};Jy.CLASS_NAME="PrivateKeyInfo";var bd="contentType",Ad="contentEncryptionAlgorithm",bf="encryptedContent",Rle=[bd,Ad,bf],NF=1024,cs=class l1 extends De{static{o(this,"EncryptedContentInfo")}constructor(e={}){if(super(),this.contentType=O(e,bd,l1.defaultValues(bd)),this.contentEncryptionAlgorithm=O(e,Ad,l1.defaultValues(Ad)),bf 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 je({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+NF>s.byteLength?s.byteLength-n:NF),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 je({valueHex:u})),i-=a.length,n+=a.length}this.encryptedContent=t}e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case bd:return V;case Ad:return new ye;case bf:return new je;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case bd:return t===V;case Ad:return t.algorithmId===V&&!("algorithmParams"in t);case bf:return t.isEqual(l1.defaultValues(bf));default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new st({name:t.contentType||V}),ye.schema(t.contentEncryptionAlgorithm||{}),new Vr({value:[new ue({name:t.encryptedContent||V,idBlock:{tagClass:3,tagNumber:0},value:[new _t({value:new je})]}),new vt({name:t.encryptedContent||V,idBlock:{tagClass:3,tagNumber:0}})]})]})}fromSchema(e){Oe(e,Rle);let t=_e(e,e,l1.schema({names:{contentType:bd,contentEncryptionAlgorithm:{names:{blockName:Ad}},encryptedContent:bf}}));Ce.assertSchema(t,this.className),this.contentType=t.result.contentType.valueBlock.toString(),this.contentEncryptionAlgorithm=new ye({schema:t.result.contentEncryptionAlgorithm}),bf 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 st({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 J({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 je.prototype.getValue.call(this.encryptedContent)}};cs.CLASS_NAME="EncryptedContentInfo";var Oc="hashAlgorithm",Pc="maskGenAlgorithm",kc="saltLength",Lc="trailerField",Ole=[Oc,Pc,kc,Lc],Ib=class $s extends De{static{o(this,"RSASSAPSSParams")}constructor(e={}){super(),this.hashAlgorithm=O(e,Oc,$s.defaultValues(Oc)),this.maskGenAlgorithm=O(e,Pc,$s.defaultValues(Pc)),this.saltLength=O(e,kc,$s.defaultValues(kc)),this.trailerField=O(e,Lc,$s.defaultValues(Lc)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Oc:return new ye({algorithmId:"1.3.14.3.2.26",algorithmParams:new zr});case Pc:return new ye({algorithmId:"1.2.840.113549.1.1.8",algorithmParams:new ye({algorithmId:"1.3.14.3.2.26",algorithmParams:new zr}).toSchema()});case kc:return 20;case Lc:return 1;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ue({idBlock:{tagClass:3,tagNumber:0},optional:!0,value:[ye.schema(t.hashAlgorithm||{})]}),new ue({idBlock:{tagClass:3,tagNumber:1},optional:!0,value:[ye.schema(t.maskGenAlgorithm||{})]}),new ue({idBlock:{tagClass:3,tagNumber:2},optional:!0,value:[new ve({name:t.saltLength||V})]}),new ue({idBlock:{tagClass:3,tagNumber:3},optional:!0,value:[new ve({name:t.trailerField||V})]})]})}fromSchema(e){Oe(e,Ole);let t=_e(e,e,$s.schema({names:{hashAlgorithm:{names:{blockName:Oc}},maskGenAlgorithm:{names:{blockName:Pc}},saltLength:kc,trailerField:Lc}}));Ce.assertSchema(t,this.className),Oc in t.result&&(this.hashAlgorithm=new ye({schema:t.result.hashAlgorithm})),Pc in t.result&&(this.maskGenAlgorithm=new ye({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($s.defaultValues(Oc))||e.push(new ue({idBlock:{tagClass:3,tagNumber:0},value:[this.hashAlgorithm.toSchema()]})),this.maskGenAlgorithm.isEqual($s.defaultValues(Pc))||e.push(new ue({idBlock:{tagClass:3,tagNumber:1},value:[this.maskGenAlgorithm.toSchema()]})),this.saltLength!==$s.defaultValues(kc)&&e.push(new ue({idBlock:{tagClass:3,tagNumber:2},value:[new ve({value:this.saltLength})]})),this.trailerField!==$s.defaultValues(Lc)&&e.push(new ue({idBlock:{tagClass:3,tagNumber:3},value:[new ve({value:this.trailerField})]})),new J({value:e})}toJSON(){let e={};return this.hashAlgorithm.isEqual($s.defaultValues(Oc))||(e.hashAlgorithm=this.hashAlgorithm.toJSON()),this.maskGenAlgorithm.isEqual($s.defaultValues(Pc))||(e.maskGenAlgorithm=this.maskGenAlgorithm.toJSON()),this.saltLength!==$s.defaultValues(kc)&&(e.saltLength=this.saltLength),this.trailerField!==$s.defaultValues(Lc)&&(e.trailerField=this.trailerField),e}};Ib.CLASS_NAME="RSASSAPSSParams";var Cd="salt",f1="iterationCount",ha="keyLength",Jo="prf",Ple=[Cd,f1,ha,Jo],$m=class to extends De{static{o(this,"PBKDF2Params")}constructor(e={}){super(),this.salt=O(e,Cd,to.defaultValues(Cd)),this.iterationCount=O(e,f1,to.defaultValues(f1)),ha in e&&(this.keyLength=O(e,ha,to.defaultValues(ha))),Jo in e&&(this.prf=O(e,Jo,to.defaultValues(Jo))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Cd:return{};case f1:return-1;case ha:return 0;case Jo:return new ye({algorithmId:"1.3.14.3.2.26",algorithmParams:new zr});default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new Vr({value:[new je({name:t.saltPrimitive||V}),ye.schema(t.saltConstructed||{})]}),new ve({name:t.iterationCount||V}),new ve({name:t.keyLength||V,optional:!0}),ye.schema(t.prf||{names:{optional:!0}})]})}fromSchema(e){Oe(e,Ple);let t=_e(e,e,to.schema({names:{saltPrimitive:Cd,saltConstructed:{names:{blockName:Cd}},iterationCount:f1,keyLength:ha,prf:{names:{blockName:Jo,optional:!0}}}}));Ce.assertSchema(t,this.className),this.salt=t.result.salt,this.iterationCount=t.result.iterationCount.valueBlock.valueDec,ha in t.result&&(this.keyLength=t.result.keyLength.valueBlock.valueDec),Jo in t.result&&(this.prf=new ye({schema:t.result.prf}))}toSchema(){let e=[];return e.push(this.salt),e.push(new ve({value:this.iterationCount})),ha in this&&to.defaultValues(ha)!==this.keyLength&&e.push(new ve({value:this.keyLength})),this.prf&&to.defaultValues(Jo).isEqual(this.prf)===!1&&e.push(this.prf.toSchema()),new J({value:e})}toJSON(){let e={salt:this.salt.toJSON(),iterationCount:this.iterationCount};return ha in this&&to.defaultValues(ha)!==this.keyLength&&(e.keyLength=this.keyLength),this.prf&&to.defaultValues(Jo).isEqual(this.prf)===!1&&(e.prf=this.prf.toJSON()),e}};$m.CLASS_NAME="PBKDF2Params";var h1="keyDerivationFunc",p1="encryptionScheme",kle=[h1,p1],PD=class _b extends De{static{o(this,"PBES2Params")}constructor(e={}){super(),this.keyDerivationFunc=O(e,h1,_b.defaultValues(h1)),this.encryptionScheme=O(e,p1,_b.defaultValues(p1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case h1:return new ye;case p1:return new ye;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[ye.schema(t.keyDerivationFunc||{}),ye.schema(t.encryptionScheme||{})]})}fromSchema(e){Oe(e,kle);let t=_e(e,e,_b.schema({names:{keyDerivationFunc:{names:{blockName:h1}},encryptionScheme:{names:{blockName:p1}}}}));Ce.assertSchema(t,this.className),this.keyDerivationFunc=new ye({schema:t.result.keyDerivationFunc}),this.encryptionScheme=new ye({schema:t.result.encryptionScheme})}toSchema(){return new J({value:[this.keyDerivationFunc.toSchema(),this.encryptionScheme.toSchema()]})}toJSON(){return{keyDerivationFunc:this.keyDerivationFunc.toJSON(),encryptionScheme:this.encryptionScheme.toJSON()}}};PD.CLASS_NAME="PBES2Params";var Lle=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=O(e,"name",V)}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 TF(r,e,t,n,s){let i,a,u;switch(r.toUpperCase()){case"SHA-1":i=20,a=64,u=xF;break;case"SHA-256":i=32,a=64,u=D_;break;case"SHA-384":i=48,a=128,u=O_;break;case"SHA-512":i=64,a=128,u=R_;break;default:throw new Error("Unsupported hashing algorithm")}let c=new Uint8Array(t),f=new TextDecoder().decode(t);new TextEncoder().encode(f).some((A,T)=>A!==c[T])&&(f=String.fromCharCode(...c));let m=new Uint8Array(f.length*2+2),g=new DataView(m.buffer);for(let A=0;A<f.length;A++)g.setUint16(A*2,f.charCodeAt(A),!1);g.setUint16(f.length*2,0,!1);let x=new Uint8Array(a).fill(3),v=new Uint8Array(n),S=new Uint8Array(a*Math.ceil(v.length/a)).map((A,T)=>v[T%v.length]),E=new Uint8Array(a*Math.ceil(m.length/a)).map((A,T)=>m[T%m.length]),C=new Uint8Array(S.length+E.length);C.set(S),C.set(E,S.length);let _=Math.ceil((e>>3)/i),b=[];for(let A=0;A<_;A++){let T=new Uint8Array(x.length+C.length);T.set(x),T.set(C,x.length);for(let $=0;$<s;$++)T=u(T);let R=new Uint8Array(a).map(($,K)=>T[K%T.length]),H=Math.ceil(v.length/a)+Math.ceil(m.length/a),I=[];for(let $=0;$<H;$++){let K=Array.from(C.slice($*a,($+1)*a)),F=511;for(let z=R.length-1;z>=0;z--)F>>=8,F+=R[z]+(K[z]||0),K[z]=F&255;I.push(...K)}C=new Uint8Array(I),b.push(...T)}return new Uint8Array(b.slice(0,e>>3)).buffer}o(TF,"makePKCS12B2Key");function g9(r){let e=typeof r=="string"?{name:r}:r;return"hash"in e?{...e,hash:g9(e.hash)}:e}o(g9,"prepareAlgorithm");var Xm=class extends Lle{static{o(this,"CryptoEngine")}async importKey(e,t,n,s,i){var a,u,c,f,h,m;let g={},x=g9(n);switch(e.toLowerCase()){case"raw":return this.subtle.importKey("raw",t,n,s,i);case"spki":{let v=Wr(mt.toArrayBuffer(t));Ce.assert(v,"keyData");let S=new ya;try{S.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,S.algorithm.algorithmId!=="1.2.840.113549.1.1.1")throw new Error(`Incorrect public key algorithm: ${S.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 E=S.toJSON();Object.assign(g,E)}break;case"ECDSA":i=["verify"];case"ECDH":{if(g={kty:"EC",ext:s,key_ops:i},S.algorithm.algorithmId!=="1.2.840.10045.2.1")throw new Error(`Incorrect public key algorithm: ${S.algorithm.algorithmId}`);let E=S.toJSON();Object.assign(g,E)}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 E=S.toJSON();Object.assign(g,E)}break;case"RSAES-PKCS1-V1_5":{g.kty="RSA",g.ext=s,g.key_ops=i,g.alg="PS1";let E=S.toJSON();Object.assign(g,E)}break;default:throw new Error(`Incorrect algorithm name: ${x.name.toUpperCase()}`)}}break;case"pkcs8":{let v=new Jy,S=Wr(mt.toArrayBuffer(t));Ce.assert(S,"keyData");try{v.fromSchema(S.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 E=v.toJSON();Object.assign(g,E)}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 E=v.toJSON();Object.assign(g,E)}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 E=v.toJSON();Object.assign(g,E)}break;case"RSAES-PKCS1-V1_5":{i=["decrypt"],g.kty="RSA",g.ext=s,g.key_ops=i,g.alg="PS1";let E=v.toJSON();Object.assign(g,E)}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(Yg(n))),e.toLowerCase()){case"raw":return this.subtle.exportKey("raw",t);case"spki":{let s=new ya;try{s.fromJSON(n)}catch{throw new Error("Incorrect key data")}return s.toSchema().toBER(!1)}case"pkcs8":{let s=new Jy;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} `:V}: ${e}`);return{}}getOIDByAlgorithm(e,t=!1,n){let s=V;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} `:V}: ${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=V;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 Ib({schema:e.algorithmParams});if(n.hashAlgorithm){let s=this.getAlgorithmByOID(n.hashAlgorithm.algorithmId);if("name"in s)t=s.name;else return V}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 je({valueHex:u}),iterationCount:e.iterationCount,prf:new ye({algorithmId:s,algorithmParams:new zr})}),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),S=new PD({keyDerivationFunc:new ye({algorithmId:n,algorithmParams:h.toSchema()}),encryptionScheme:new ye({algorithmId:t,algorithmParams:new je({valueHex:i})})});return new cs({contentType:e.contentType,contentEncryptionAlgorithm:new ye({algorithmId:"1.2.840.113549.1.5.13",algorithmParams:S.toSchema()}),encryptedContent:new je({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 PD({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 TF(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 TF(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 ye,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 ye({algorithmId:c,algorithmParams:new zr}),a.maskGenAlgorithm=new ye({algorithmId:"1.2.840.113549.1.1.8",algorithmParams:a.hashAlgorithm.toSchema()})}i.saltLength!==20&&(a.saltLength=i.saltLength);let u=new Ib(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"?Ule(s):s}fillPublicKeyParameters(e,t){let n={},s=this.getHashAlgorithm(t);if(s===V)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=Wr(c);Ce.assert(h,"Signature value"),c=jle(h.result,f.size)}if(a.algorithm.name==="RSA-PSS"){let f=new Ib({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)}},v9={name:"none",crypto:null};function IF(r){return!!(r&&typeof r=="object"&&"crypto"in r)}o(IF,"isCryptoEngine");function NA(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];IF(s)?t=s:IF(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 v9={name:r,crypto:t}}o(NA,"setEngine");function Vle(){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 v9}o(Vle,"getEngine");function Ot(r=!1){let e=Vle();if(!e.crypto&&r)throw new Error("Unable to create WebCrypto object");return e.crypto}o(Ot,"getCrypto");function Ule(r){if(r.byteLength%2!==0)return sn;let e=r.byteLength/2,t=new ArrayBuffer(e);new Uint8Array(t).set(new Uint8Array(r,0,e));let s=new ve({valueHex:t}),i=new ArrayBuffer(e);new Uint8Array(i).set(new Uint8Array(r,e,e));let u=new ve({valueHex:i});return new J({value:[s.convertToDER(),u.convertToDER()]}).toBER(!1)}o(Ule,"createCMSECDSASignature");function jle(r,e){if(!(r instanceof J&&r.valueBlock.value.length===2&&r.valueBlock.value[0]instanceof ve&&r.valueBlock.value[1]instanceof ve))return sn;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(jle,"createECDSASignatureFromCMS");async function Mle(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=sn;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(Mle,"kdfWithCounter");async function _F(r,e,t,n,s=Ot(!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 Mle(r,e,g,n,s));let f=sn,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 S=0;S<t;S++)x[S]=v[S];return g}return f}o(_F,"kdf");var V_="version",U_="logID",j_="extensions",M_="timestamp",F_="hashAlgorithm",q_="signatureAlgorithm",H_="signature",DF="none",BF="md5",RF="sha1",OF="sha224",PF="sha256",kF="sha384",LF="sha512",VF="anonymous",UF="rsa",jF="dsa",MF="ecdsa",y9=class Vc extends De{static{o(this,"SignedCertificateTimestamp")}constructor(e={}){super(),this.version=O(e,V_,Vc.defaultValues(V_)),this.logID=O(e,U_,Vc.defaultValues(U_)),this.timestamp=O(e,M_,Vc.defaultValues(M_)),this.extensions=O(e,j_,Vc.defaultValues(j_)),this.hashAlgorithm=O(e,F_,Vc.defaultValues(F_)),this.signatureAlgorithm=O(e,q_,Vc.defaultValues(q_)),this.signature=O(e,H_,Vc.defaultValues(H_)),"stream"in e&&e.stream&&this.fromStream(e.stream),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case V_:return 0;case U_:case j_:return sn;case M_:return new Date(0);case F_:case q_:return V;case H_:return sn;default:return super.defaultValues(e)}}fromSchema(e){if(!(e instanceof sv))throw new Error("Object's schema was not verified against input data for SignedCertificateTimestamp");let t=new qo({stream:new Wn({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(jo(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=DF;break;case 1:this.hashAlgorithm=BF;break;case 2:this.hashAlgorithm=RF;break;case 3:this.hashAlgorithm=OF;break;case 4:this.hashAlgorithm=PF;break;case 5:this.hashAlgorithm=kF;break;case 6:this.hashAlgorithm=LF;break;default:throw new Error("Object's stream was not correct for SignedCertificateTimestamp")}switch(e.getBlock(1)[0]){case 0:this.signatureAlgorithm=VF;break;case 1:this.signatureAlgorithm=UF;break;case 2:this.signatureAlgorithm=jF;break;case 3:this.signatureAlgorithm=MF;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 sv({data:e.stream.buffer})}toStream(){let e=new qo;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=oa(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 DF:i=0;break;case BF:i=1;break;case RF:i=2;break;case OF:i=3;break;case PF:i=4;break;case kF:i=5;break;case LF:i=6;break;default:throw new Error(`Incorrect data for hashAlgorithm: ${this.hashAlgorithm}`)}e.appendChar(i);let a;switch(this.signatureAlgorithm.toLowerCase()){case VF:a=0;break;case UF:a=1;break;case jF:a=2;break;case MF: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:AE(this.logID),timestamp:this.timestamp,extensions:AE(this.extensions),hashAlgorithm:this.hashAlgorithm,signatureAlgorithm:this.signatureAlgorithm,signature:AE(this.signature)}}async verify(e,t,n=0,s=Ot(!0)){let i=NE(Yg(this.logID)),a=null,u=new qo;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=ya.fromBER(c);u.appendChar(0),u.appendChar(0);let h=new ArrayBuffer(8),m=new Uint8Array(h),g=oa(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 je({valueHex:this.signature}),f,{algorithmId:V},"SHA-256")}};y9.CLASS_NAME="SignedCertificateTimestamp";var GE="timestamps",x9=class w9 extends De{static{o(this,"SignedCertificateTimestampList")}constructor(e={}){super(),this.timestamps=O(e,GE,w9.defaultValues(GE)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case GE:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case GE:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){var t;let n=O(e,"names",{});return(t=n.optional)!==null&&t!==void 0||(n.optional=!1),new je({name:n.blockName||"SignedCertificateTimestampList",optional:n.optional})}fromSchema(e){if(!(e instanceof je))throw new Error("Object's schema was not verified against input data for SignedCertificateTimestampList");let t=new qo({stream:new Wn({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 y9({stream:t}))}toSchema(){let e=new qo,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 je({valueHex:e.stream.buffer.slice(0)})}toJSON(){return{timestamps:Array.from(this.timestamps,e=>e.toJSON())}}};x9.CLASS_NAME="SignedCertificateTimestampList";var d1="attributes",Fle=[d1],S9=class kD extends De{static{o(this,"SubjectDirectoryAttributes")}constructor(e={}){super(),this.attributes=O(e,d1,kD.defaultValues(d1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case d1:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new _t({name:t.attributes||V,value:an.schema()})]})}fromSchema(e){Oe(e,Fle);let t=_e(e,e,kD.schema({names:{attributes:d1}}));Ce.assertSchema(t,this.className),this.attributes=Array.from(t.result.attributes,n=>new an({schema:n}))}toSchema(){return new J({value:Array.from(this.attributes,e=>e.toSchema())})}toJSON(){return{attributes:Array.from(this.attributes,e=>e.toJSON())}}};S9.CLASS_NAME="SubjectDirectoryAttributes";var qle=class Yr{static{o(this,"ExtensionValueFactory")}static getItems(){return this.types||(this.types={},Yr.register(XF,"SubjectAltName",pD),Yr.register(WF,"IssuerAltName",pD),Yr.register(yB,"AuthorityKeyIdentifier",EB),Yr.register(gB,"BasicConstraints",bB),Yr.register(nle,"MicrosoftCaVersion",i9),Yr.register(ZF,"CertificatePolicies",xD),Yr.register(Yce,"CertificatePoliciesMicrosoft",xD),Yr.register(rle,"MicrosoftCertTemplateV2",ple),Yr.register(QF,"CRLDistributionPoints",ED),Yr.register(vB,"FreshestCRL",ED),Yr.register(Qce,"ExtKeyUsage",u9),Yr.register(JF,"CertificateIssuer",zn),Yr.register(xB,"AuthorityInfoAccess",CD),Yr.register(ele,"SubjectInfoAccess",CD),Yr.register(zF,"IssuingDistributionPoint",l9),Yr.register(YF,"NameConstraints",f9),Yr.register(t9,"PolicyConstraints",h9),Yr.register(e9,"PolicyMappings",p9),Yr.register(Gce,"PrivateKeyUsagePeriod",d9),Yr.register(sle,"QCStatements",m9),Yr.register(tle,"SignedCertificateTimestampList",x9),Yr.register(Hce,"SubjectDirectoryAttributes",S9)),this.types}static fromBER(e,t){let n=Wr(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}}},m1="extnID",Uc="critical",g1="extnValue",XE="parsedValue",Hle=[m1,Uc,g1],Ki=class jc extends De{static{o(this,"Extension")}get parsedValue(){if(this._parsedValue===void 0){let e=qle.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=O(e,m1,jc.defaultValues(m1)),this.critical=O(e,Uc,jc.defaultValues(Uc)),g1 in e?this.extnValue=new je({valueHex:e.extnValue}):this.extnValue=jc.defaultValues(g1),XE in e&&(this.parsedValue=O(e,XE,jc.defaultValues(XE))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case m1:return V;case Uc:return!1;case g1:return new je;case XE:return{};default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new st({name:t.extnID||V}),new ca({name:t.critical||V,optional:!0}),new je({name:t.extnValue||V})]})}fromSchema(e){Oe(e,Hle);let t=_e(e,e,jc.schema({names:{extnID:m1,critical:Uc,extnValue:g1}}));Ce.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 st({value:this.extnID})),this.critical!==jc.defaultValues(Uc)&&e.push(new ca({value:this.critical})),e.push(this.extnValue),new J({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 v1="extensions",Kle=[v1],Nn=class LD extends De{static{o(this,"Extensions")}constructor(e={}){super(),this.extensions=O(e,v1,LD.defaultValues(v1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case v1:return[];default:return super.defaultValues(e)}}static schema(e={},t=!1){let n=O(e,"names",{});return new J({optional:t,name:n.blockName||V,value:[new _t({name:n.extensions||V,value:Ki.schema(n.extension||{})})]})}fromSchema(e){Oe(e,Kle);let t=_e(e,e,LD.schema({names:{extensions:v1}}));Ce.assertSchema(t,this.className),this.extensions=Array.from(t.result.extensions,n=>new Ki({schema:n}))}toSchema(){return new J({value:Array.from(this.extensions,e=>e.toSchema())})}toJSON(){return{extensions:this.extensions.map(e=>e.toJSON())}}};Nn.CLASS_NAME="Extensions";var y1="issuer",x1="serialNumber",Af="issuerUID",$le=[y1,x1,Af],oo=class w1 extends De{static{o(this,"IssuerSerial")}constructor(e={}){super(),this.issuer=O(e,y1,w1.defaultValues(y1)),this.serialNumber=O(e,x1,w1.defaultValues(x1)),Af in e&&(this.issuerUID=O(e,Af,w1.defaultValues(Af))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case y1:return new zn;case x1:return new ve;case Af:return new Kt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[zn.schema(t.issuer||{}),new ve({name:t.serialNumber||V}),new Kt({optional:!0,name:t.issuerUID||V})]})}fromSchema(e){Oe(e,$le);let t=_e(e,e,w1.schema({names:{issuer:{names:{blockName:y1}},serialNumber:x1,issuerUID:Af}}));Ce.assertSchema(t,this.className),this.issuer=new zn({schema:t.result.issuer}),this.serialNumber=t.result.serialNumber,Af in t.result&&(this.issuerUID=t.result.issuerUID)}toSchema(){let e=new J({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}};oo.CLASS_NAME="IssuerSerial";var S1="version",Cf="baseCertificateID",Nf="subjectName",E1="issuer",b1="signature",A1="serialNumber",C1="attrCertValidityPeriod",N1="attributes",Tf="issuerUniqueID",If="extensions",Gle=[S1,Cf,Nf,E1,b1,A1,C1,N1,Tf,If],Db=class qi extends De{static{o(this,"AttributeCertificateInfoV1")}constructor(e={}){super(),this.version=O(e,S1,qi.defaultValues(S1)),Cf in e&&(this.baseCertificateID=O(e,Cf,qi.defaultValues(Cf))),Nf in e&&(this.subjectName=O(e,Nf,qi.defaultValues(Nf))),this.issuer=O(e,E1,qi.defaultValues(E1)),this.signature=O(e,b1,qi.defaultValues(b1)),this.serialNumber=O(e,A1,qi.defaultValues(A1)),this.attrCertValidityPeriod=O(e,C1,qi.defaultValues(C1)),this.attributes=O(e,N1,qi.defaultValues(N1)),Tf in e&&(this.issuerUniqueID=O(e,Tf,qi.defaultValues(Tf))),If in e&&(this.extensions=O(e,If,qi.defaultValues(If))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case S1:return 0;case Cf:return new oo;case Nf:return new zn;case E1:return new zn;case b1:return new ye;case A1:return new ve;case C1:return new bh;case N1:return[];case Tf:return new Kt;case If:return new Nn;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ve({name:t.version||V}),new Vr({value:[new ue({name:t.baseCertificateID||V,idBlock:{tagClass:3,tagNumber:0},value:oo.schema().valueBlock.value}),new ue({name:t.subjectName||V,idBlock:{tagClass:3,tagNumber:1},value:zn.schema().valueBlock.value})]}),zn.schema({names:{blockName:t.issuer||V}}),ye.schema(t.signature||{}),new ve({name:t.serialNumber||V}),bh.schema(t.attrCertValidityPeriod||{}),new J({name:t.attributes||V,value:[new _t({value:an.schema()})]}),new Kt({optional:!0,name:t.issuerUniqueID||V}),Nn.schema(t.extensions||{},!0)]})}fromSchema(e){Oe(e,Gle);let t=_e(e,e,qi.schema({names:{version:S1,baseCertificateID:Cf,subjectName:Nf,issuer:E1,signature:{names:{blockName:b1}},serialNumber:A1,attrCertValidityPeriod:{names:{blockName:C1}},attributes:N1,issuerUniqueID:Tf,extensions:{names:{blockName:If}}}}));Ce.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,Cf in t.result&&(this.baseCertificateID=new oo({schema:new J({value:t.result.baseCertificateID.valueBlock.value})})),Nf in t.result&&(this.subjectName=new zn({schema:new J({value:t.result.subjectName.valueBlock.value})})),this.issuer=t.result.issuer,this.signature=new ye({schema:t.result.signature}),this.serialNumber=t.result.serialNumber,this.attrCertValidityPeriod=new bh({schema:t.result.attrCertValidityPeriod}),this.attributes=Array.from(t.result.attributes.valueBlock.value,n=>new an({schema:n})),Tf in t.result&&(this.issuerUniqueID=t.result.issuerUniqueID),If in t.result&&(this.extensions=new Nn({schema:t.result.extensions}))}toSchema(){let e=new J({value:[new ve({value:this.version})]});return this.baseCertificateID&&e.valueBlock.value.push(new ue({idBlock:{tagClass:3,tagNumber:0},value:this.baseCertificateID.toSchema().valueBlock.value})),this.subjectName&&e.valueBlock.value.push(new ue({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 J({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}};Db.CLASS_NAME="AttributeCertificateInfoV1";var T1="acinfo",I1="signatureAlgorithm",_1="signatureValue",Xle=[T1,_1,I1],TA=class D1 extends De{static{o(this,"AttributeCertificateV1")}constructor(e={}){super(),this.acinfo=O(e,T1,D1.defaultValues(T1)),this.signatureAlgorithm=O(e,I1,D1.defaultValues(I1)),this.signatureValue=O(e,_1,D1.defaultValues(_1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case T1:return new Db;case I1:return new ye;case _1:return new Kt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[Db.schema(t.acinfo||{}),ye.schema(t.signatureAlgorithm||{}),new Kt({name:t.signatureValue||V})]})}fromSchema(e){Oe(e,Xle);let t=_e(e,e,D1.schema({names:{acinfo:{names:{blockName:T1}},signatureAlgorithm:{names:{blockName:I1}},signatureValue:_1}}));Ce.assertSchema(t,this.className),this.acinfo=new Db({schema:t.result.acinfo}),this.signatureAlgorithm=new ye({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}toSchema(){return new J({value:[this.acinfo.toSchema(),this.signatureAlgorithm.toSchema(),this.signatureValue]})}toJSON(){return{acinfo:this.acinfo.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signatureValue:this.signatureValue.toJSON()}}};TA.CLASS_NAME="AttributeCertificateV1";var B1="digestedObjectType",_f="otherObjectTypeID",R1="digestAlgorithm",O1="objectDigest",Wle=[B1,_f,R1,O1],Ah=class Nd extends De{static{o(this,"ObjectDigestInfo")}constructor(e={}){super(),this.digestedObjectType=O(e,B1,Nd.defaultValues(B1)),_f in e&&(this.otherObjectTypeID=O(e,_f,Nd.defaultValues(_f))),this.digestAlgorithm=O(e,R1,Nd.defaultValues(R1)),this.objectDigest=O(e,O1,Nd.defaultValues(O1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case B1:return new pc;case _f:return new st;case R1:return new ye;case O1:return new Kt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new pc({name:t.digestedObjectType||V}),new st({optional:!0,name:t.otherObjectTypeID||V}),ye.schema(t.digestAlgorithm||{}),new Kt({name:t.objectDigest||V})]})}fromSchema(e){Oe(e,Wle);let t=_e(e,e,Nd.schema({names:{digestedObjectType:B1,otherObjectTypeID:_f,digestAlgorithm:{names:{blockName:R1}},objectDigest:O1}}));Ce.assertSchema(t,this.className),this.digestedObjectType=t.result.digestedObjectType,_f in t.result&&(this.otherObjectTypeID=t.result.otherObjectTypeID),this.digestAlgorithm=new ye({schema:t.result.digestAlgorithm}),this.objectDigest=t.result.objectDigest}toSchema(){let e=new J({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 Df="issuerName",Bf="baseCertificateID",Rf="objectDigestInfo",zle=[Df,Bf,Rf],VD=class P1 extends De{static{o(this,"V2Form")}constructor(e={}){super(),Df in e&&(this.issuerName=O(e,Df,P1.defaultValues(Df))),Bf in e&&(this.baseCertificateID=O(e,Bf,P1.defaultValues(Bf))),Rf in e&&(this.objectDigestInfo=O(e,Rf,P1.defaultValues(Rf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Df:return new zn;case Bf:return new oo;case Rf:return new Ah;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[zn.schema({names:{blockName:t.issuerName}},!0),new ue({optional:!0,name:t.baseCertificateID||V,idBlock:{tagClass:3,tagNumber:0},value:oo.schema().valueBlock.value}),new ue({optional:!0,name:t.objectDigestInfo||V,idBlock:{tagClass:3,tagNumber:1},value:Ah.schema().valueBlock.value})]})}fromSchema(e){Oe(e,zle);let t=_e(e,e,P1.schema({names:{issuerName:Df,baseCertificateID:Bf,objectDigestInfo:Rf}}));Ce.assertSchema(t,this.className),Df in t.result&&(this.issuerName=new zn({schema:t.result.issuerName})),Bf in t.result&&(this.baseCertificateID=new oo({schema:new J({value:t.result.baseCertificateID.valueBlock.value})})),Rf in t.result&&(this.objectDigestInfo=new Ah({schema:new J({value:t.result.objectDigestInfo.valueBlock.value})}))}toSchema(){let e=new J;return this.issuerName&&e.valueBlock.value.push(this.issuerName.toSchema()),this.baseCertificateID&&e.valueBlock.value.push(new ue({idBlock:{tagClass:3,tagNumber:0},value:this.baseCertificateID.toSchema().valueBlock.value})),this.objectDigestInfo&&e.valueBlock.value.push(new ue({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}};VD.CLASS_NAME="V2Form";var Of="baseCertificateID",Pf="entityName",kf="objectDigestInfo",Jle=[Of,Pf,kf],Bb=class k1 extends De{static{o(this,"Holder")}constructor(e={}){super(),Of in e&&(this.baseCertificateID=O(e,Of,k1.defaultValues(Of))),Pf in e&&(this.entityName=O(e,Pf,k1.defaultValues(Pf))),kf in e&&(this.objectDigestInfo=O(e,kf,k1.defaultValues(kf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Of:return new oo;case Pf:return new zn;case kf:return new Ah;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ue({optional:!0,name:t.baseCertificateID||V,idBlock:{tagClass:3,tagNumber:0},value:oo.schema().valueBlock.value}),new ue({optional:!0,name:t.entityName||V,idBlock:{tagClass:3,tagNumber:1},value:zn.schema().valueBlock.value}),new ue({optional:!0,name:t.objectDigestInfo||V,idBlock:{tagClass:3,tagNumber:2},value:Ah.schema().valueBlock.value})]})}fromSchema(e){Oe(e,Jle);let t=_e(e,e,k1.schema({names:{baseCertificateID:Of,entityName:Pf,objectDigestInfo:kf}}));Ce.assertSchema(t,this.className),Of in t.result&&(this.baseCertificateID=new oo({schema:new J({value:t.result.baseCertificateID.valueBlock.value})})),Pf in t.result&&(this.entityName=new zn({schema:new J({value:t.result.entityName.valueBlock.value})})),kf in t.result&&(this.objectDigestInfo=new Ah({schema:new J({value:t.result.objectDigestInfo.valueBlock.value})}))}toSchema(){let e=new J;return this.baseCertificateID&&e.valueBlock.value.push(new ue({idBlock:{tagClass:3,tagNumber:0},value:this.baseCertificateID.toSchema().valueBlock.value})),this.entityName&&e.valueBlock.value.push(new ue({idBlock:{tagClass:3,tagNumber:1},value:this.entityName.toSchema().valueBlock.value})),this.objectDigestInfo&&e.valueBlock.value.push(new ue({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}};Bb.CLASS_NAME="Holder";var L1="version",V1="holder",U1="issuer",j1="signature",M1="serialNumber",F1="attrCertValidityPeriod",q1="attributes",Lf="issuerUniqueID",Vf="extensions",Yle=[L1,V1,U1,j1,M1,F1,q1,Lf,Vf],Rb=class pa extends De{static{o(this,"AttributeCertificateInfoV2")}constructor(e={}){super(),this.version=O(e,L1,pa.defaultValues(L1)),this.holder=O(e,V1,pa.defaultValues(V1)),this.issuer=O(e,U1,pa.defaultValues(U1)),this.signature=O(e,j1,pa.defaultValues(j1)),this.serialNumber=O(e,M1,pa.defaultValues(M1)),this.attrCertValidityPeriod=O(e,F1,pa.defaultValues(F1)),this.attributes=O(e,q1,pa.defaultValues(q1)),Lf in e&&(this.issuerUniqueID=O(e,Lf,pa.defaultValues(Lf))),Vf in e&&(this.extensions=O(e,Vf,pa.defaultValues(Vf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case L1:return 1;case V1:return new Bb;case U1:return{};case j1:return new ye;case M1:return new ve;case F1:return new bh;case q1:return[];case Lf:return new Kt;case Vf:return new Nn;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ve({name:t.version||V}),Bb.schema(t.holder||{}),new Vr({value:[zn.schema({names:{blockName:t.issuer||V}}),new ue({name:t.issuer||V,idBlock:{tagClass:3,tagNumber:0},value:VD.schema().valueBlock.value})]}),ye.schema(t.signature||{}),new ve({name:t.serialNumber||V}),bh.schema(t.attrCertValidityPeriod||{}),new J({name:t.attributes||V,value:[new _t({value:an.schema()})]}),new Kt({optional:!0,name:t.issuerUniqueID||V}),Nn.schema(t.extensions||{},!0)]})}fromSchema(e){Oe(e,Yle);let t=_e(e,e,pa.schema({names:{version:L1,holder:{names:{blockName:V1}},issuer:U1,signature:{names:{blockName:j1}},serialNumber:M1,attrCertValidityPeriod:{names:{blockName:F1}},attributes:q1,issuerUniqueID:Lf,extensions:{names:{blockName:Vf}}}}));switch(Ce.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.holder=new Bb({schema:t.result.holder}),t.result.issuer.idBlock.tagClass){case 3:this.issuer=new VD({schema:new J({value:t.result.issuer.valueBlock.value})});break;case 1:default:throw new Error("Incorrect value for 'issuer' in AttributeCertificateInfoV2")}this.signature=new ye({schema:t.result.signature}),this.serialNumber=t.result.serialNumber,this.attrCertValidityPeriod=new bh({schema:t.result.attrCertValidityPeriod}),this.attributes=Array.from(t.result.attributes.valueBlock.value,n=>new an({schema:n})),Lf in t.result&&(this.issuerUniqueID=t.result.issuerUniqueID),Vf in t.result&&(this.extensions=new Nn({schema:t.result.extensions}))}toSchema(){let e=new J({value:[new ve({value:this.version}),this.holder.toSchema(),new ue({idBlock:{tagClass:3,tagNumber:0},value:this.issuer.toSchema().valueBlock.value}),this.signature.toSchema(),this.serialNumber,this.attrCertValidityPeriod.toSchema(),new J({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}};Rb.CLASS_NAME="AttributeCertificateInfoV2";var H1="acinfo",K1="signatureAlgorithm",$1="signatureValue",Qle=[H1,K1,$1],pl=class G1 extends De{static{o(this,"AttributeCertificateV2")}constructor(e={}){super(),this.acinfo=O(e,H1,G1.defaultValues(H1)),this.signatureAlgorithm=O(e,K1,G1.defaultValues(K1)),this.signatureValue=O(e,$1,G1.defaultValues($1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case H1:return new Rb;case K1:return new ye;case $1:return new Kt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[Rb.schema(t.acinfo||{}),ye.schema(t.signatureAlgorithm||{}),new Kt({name:t.signatureValue||V})]})}fromSchema(e){Oe(e,Qle);let t=_e(e,e,G1.schema({names:{acinfo:{names:{blockName:H1}},signatureAlgorithm:{names:{blockName:K1}},signatureValue:$1}}));Ce.assertSchema(t,this.className),this.acinfo=new Rb({schema:t.result.acinfo}),this.signatureAlgorithm=new ye({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}toSchema(){return new J({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",Zle=[Uf,Td],Qr=class Ob extends De{static{o(this,"ContentInfo")}constructor(e={}){super(),this.contentType=O(e,Uf,Ob.defaultValues(Uf)),this.content=O(e,Td,Ob.defaultValues(Td)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Uf:return V;case Td:return new St;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 St;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return"optional"in t||(t.optional=!1),new J({name:t.blockName||"ContentInfo",optional:t.optional,value:[new st({name:t.contentType||Uf}),new ue({idBlock:{tagClass:3,tagNumber:0},value:[new St({name:t.content||Td})]})]})}fromSchema(e){Oe(e,Zle);let t=_e(e,e,Ob.schema());Ce.assertSchema(t,this.className),this.contentType=t.result.contentType.valueBlock.toString(),this.content=t.result.content}toSchema(){return new J({value:[new st({value:this.contentType}),new ue({idBlock:{tagClass:3,tagNumber:0},value:[this.content]})]})}toJSON(){let e={contentType:this.contentType};return this.content instanceof St||(e.content=this.content.toJSON()),e}};Qr.CLASS_NAME="ContentInfo";Qr.DATA=wB;Qr.SIGNED_DATA=r9;Qr.ENVELOPED_DATA=n9;Qr.ENCRYPTED_DATA=s9;var K_="type",$_="value",UD="utcTimeName",jD="generalTimeName",efe=[UD,jD],FF;(function(r){r[r.UTCTime=0]="UTCTime",r[r.GeneralizedTime=1]="GeneralizedTime",r[r.empty=2]="empty"})(FF||(FF={}));var Jn=class Pb extends De{static{o(this,"Time")}constructor(e={}){super(),this.type=O(e,K_,Pb.defaultValues(K_)),this.value=O(e,$_,Pb.defaultValues($_)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case K_:return 0;case $_:return new Date(0,0,0);default:return super.defaultValues(e)}}static schema(e={},t=!1){let n=O(e,"names",{});return new Vr({optional:t,value:[new tf({name:n.utcTimeName||V}),new Lr({name:n.generalTimeName||V})]})}fromSchema(e){Oe(e,efe);let t=_e(e,e,Pb.schema({names:{utcTimeName:UD,generalTimeName:jD}}));Ce.assertSchema(t,this.className),UD in t.result&&(this.type=0,this.value=t.result.utcTimeName.toDate()),jD 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 Lr({valueDate:this.value}):{}}toJSON(){return{type:this.type,value:this.value}}};Jn.CLASS_NAME="Time";var G_="tbs",Mc="version",kb="serialNumber",Lb="signature",Vb="issuer",Ub="notBefore",jb="notAfter",Mb="subject",Fb="subjectPublicKeyInfo",X1="issuerUniqueID",W1="subjectUniqueID",z1="extensions",J1="signatureAlgorithm",Y1="signatureValue",li="tbsCertificate",IA=`${li}.${Mc}`,AB=`${li}.${kb}`,CB=`${li}.${Lb}`,NB=`${li}.${Vb}`,_A=`${li}.${Ub}`,DA=`${li}.${jb}`,TB=`${li}.${Mb}`,IB=`${li}.${Fb}`,BA=`${li}.${X1}`,RA=`${li}.${W1}`,Hy=`${li}.${z1}`,tfe=[li,IA,AB,CB,NB,_A,DA,TB,IB,BA,RA,Hy,J1,Y1];function rfe(r={}){let e=O(r,"names",{});return new J({name:e.blockName||li,value:[new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new ve({name:e.tbsCertificateVersion||IA})]}),new ve({name:e.tbsCertificateSerialNumber||AB}),ye.schema(e.signature||{names:{blockName:CB}}),Ur.schema(e.issuer||{names:{blockName:NB}}),new J({name:e.tbsCertificateValidity||"tbsCertificate.validity",value:[Jn.schema(e.notBefore||{names:{utcTimeName:_A,generalTimeName:_A}}),Jn.schema(e.notAfter||{names:{utcTimeName:DA,generalTimeName:DA}})]}),Ur.schema(e.subject||{names:{blockName:TB}}),ya.schema(e.subjectPublicKeyInfo||{names:{blockName:IB}}),new vt({name:e.tbsCertificateIssuerUniqueID||BA,optional:!0,idBlock:{tagClass:3,tagNumber:1}}),new vt({name:e.tbsCertificateSubjectUniqueID||RA,optional:!0,idBlock:{tagClass:3,tagNumber:2}}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:3},value:[Nn.schema(e.extensions||{names:{blockName:Hy}})]})]})}o(rfe,"tbsCertificate");var ls=class Cn extends De{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(O(e,G_,Cn.defaultValues(G_))),this.version=O(e,Mc,Cn.defaultValues(Mc)),this.serialNumber=O(e,kb,Cn.defaultValues(kb)),this.signature=O(e,Lb,Cn.defaultValues(Lb)),this.issuer=O(e,Vb,Cn.defaultValues(Vb)),this.notBefore=O(e,Ub,Cn.defaultValues(Ub)),this.notAfter=O(e,jb,Cn.defaultValues(jb)),this.subject=O(e,Mb,Cn.defaultValues(Mb)),this.subjectPublicKeyInfo=O(e,Fb,Cn.defaultValues(Fb)),X1 in e&&(this.issuerUniqueID=O(e,X1,Cn.defaultValues(X1))),W1 in e&&(this.subjectUniqueID=O(e,W1,Cn.defaultValues(W1))),z1 in e&&(this.extensions=O(e,z1,Cn.defaultValues(z1))),this.signatureAlgorithm=O(e,J1,Cn.defaultValues(J1)),this.signatureValue=O(e,Y1,Cn.defaultValues(Y1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case G_:return sn;case Mc:return 0;case kb:return new ve;case Lb:return new ye;case Vb:return new Ur;case Ub:return new Jn;case jb:return new Jn;case Mb:return new Ur;case Fb:return new ya;case X1:return sn;case W1:return sn;case z1:return[];case J1:return new ye;case Y1:return new Kt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[rfe(t.tbsCertificate),ye.schema(t.signatureAlgorithm||{names:{blockName:J1}}),new Kt({name:t.signatureValue||Y1})]})}fromSchema(e){Oe(e,tfe);let t=_e(e,e,Cn.schema({names:{tbsCertificate:{names:{extensions:{names:{extensions:Hy}}}}}}));Ce.assertSchema(t,this.className),this.tbsView=t.result.tbsCertificate.valueBeforeDecodeView,IA in t.result&&(this.version=t.result[IA].valueBlock.valueDec),this.serialNumber=t.result[AB],this.signature=new ye({schema:t.result[CB]}),this.issuer=new Ur({schema:t.result[NB]}),this.notBefore=new Jn({schema:t.result[_A]}),this.notAfter=new Jn({schema:t.result[DA]}),this.subject=new Ur({schema:t.result[TB]}),this.subjectPublicKeyInfo=new ya({schema:t.result[IB]}),BA in t.result&&(this.issuerUniqueID=t.result[BA].valueBlock.valueHex),RA in t.result&&(this.subjectUniqueID=t.result[RA].valueBlock.valueHex),Hy in t.result&&(this.extensions=Array.from(t.result[Hy],n=>new Ki({schema:n}))),this.signatureAlgorithm=new ye({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}encodeTBS(){let e=[];return Mc in this&&this.version!==Cn.defaultValues(Mc)&&e.push(new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new ve({value:this.version})]})),e.push(this.serialNumber),e.push(this.signature.toSchema()),e.push(this.issuer.toSchema()),e.push(new J({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 ue({optional:!0,idBlock:{tagClass:3,tagNumber:3},value:[new J({value:Array.from(this.extensions,t=>t.toSchema())})]})),new J({value:e})}toSchema(e=!1){let t;if(e===!1){if(!this.tbsView.byteLength)return Cn.schema().value[0];let n=Wr(this.tbsView);Ce.assert(n,"TBS Certificate"),t=n.result}else t=this.encodeTBS();return new J({value:[t,this.signatureAlgorithm.toSchema(),this.signatureValue]})}toJSON(){let e={tbs:At.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!==Cn.defaultValues(Mc)&&(e.version=this.version),this.issuerUniqueID&&(e.issuerUniqueID=At.ToHex(this.issuerUniqueID)),this.subjectUniqueID&&(e.subjectUniqueID=At.ToHex(this.subjectUniqueID)),this.extensions&&(e.extensions=Array.from(this.extensions,t=>t.toJSON())),e}async getPublicKey(e,t=Ot(!0)){return t.getPublicKey(this.subjectPublicKeyInfo,this.signatureAlgorithm,e)}async getKeyHash(e="SHA-1",t=Ot(!0)){return t.digest({name:e},this.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView)}async sign(e,t="SHA-1",n=Ot(!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 Kt({valueHex:a})}async verify(e,t=Ot(!0)){let n;if(e?n=e.subjectPublicKeyInfo:this.issuer.isEqual(this.subject)&&(n=this.subjectPublicKeyInfo),!(n instanceof ya))throw new Error("Please provide issuer certificate as a parameter");return t.verifyWithPublicKey(this.tbsView,this.signatureValue,n,this.signatureAlgorithm)}};ls.CLASS_NAME="Certificate";function E9(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===gB&&n.parsedValue instanceof bB&&n.parsedValue.cA){t=!0;break}}return t?r:null}o(E9,"checkCA");var Id="certId",_d="certValue",id="parsedValue",nfe=[Id,_d],b9=class Q1 extends De{static{o(this,"CertBag")}constructor(e={}){super(),this.certId=O(e,Id,Q1.defaultValues(Id)),this.certValue=O(e,_d,Q1.defaultValues(_d)),id in e&&(this.parsedValue=O(e,id,Q1.defaultValues(id))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Id:return V;case _d:return new St;case id:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Id:return t===V;case _d:return t instanceof St;case id:return t instanceof Object&&Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new st({name:t.id||"id"}),new ue({idBlock:{tagClass:3,tagNumber:0},value:[new St({name:t.value||"value"})]})]})}fromSchema(e){Oe(e,nfe);let t=_e(e,e,Q1.schema({names:{id:Id,value:_d}}));Ce.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 bF:try{this.parsedValue=ls.fromBER(n)}catch{pl.fromBER(n)}break;case AF:this.parsedValue=pl.fromBER(n);break;case ale:default:throw new Error(`Incorrect CERT_ID value in CertBag: ${this.certId}`)}}toSchema(){return id in this&&("acinfo"in this.parsedValue?this.certId=AF:this.certId=bF,this.certValue=new je({valueHex:this.parsedValue.toSchema().toBER(!1)})),new J({value:[new st({value:this.certId}),new ue({idBlock:{tagClass:3,tagNumber:0},value:["toSchema"in this.certValue?this.certValue.toSchema():this.certValue]})]})}toJSON(){return{certId:this.certId,certValue:this.certValue.toJSON()}}};b9.CLASS_NAME="CertBag";var Z1="userCertificate",Dd="revocationDate",jf="crlEntryExtensions",sfe=[Z1,Dd,jf],A9=class ey extends De{static{o(this,"RevokedCertificate")}constructor(e={}){super(),this.userCertificate=O(e,Z1,ey.defaultValues(Z1)),this.revocationDate=O(e,Dd,ey.defaultValues(Dd)),jf in e&&(this.crlEntryExtensions=O(e,jf,ey.defaultValues(jf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Z1:return new ve;case Dd:return new Jn;case jf:return new Nn;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ve({name:t.userCertificate||Z1}),Jn.schema({names:{utcTimeName:t.revocationDate||Dd,generalTimeName:t.revocationDate||Dd}}),Nn.schema({names:{blockName:t.crlEntryExtensions||jf}},!0)]})}fromSchema(e){Oe(e,sfe);let t=_e(e,e,ey.schema());Ce.assertSchema(t,this.className),this.userCertificate=t.result.userCertificate,this.revocationDate=new Jn({schema:t.result.revocationDate}),jf in t.result&&(this.crlEntryExtensions=new Nn({schema:t.result.crlEntryExtensions}))}toSchema(){let e=[this.userCertificate,this.revocationDate.toSchema()];return this.crlEntryExtensions&&e.push(this.crlEntryExtensions.toSchema()),new J({value:e})}toJSON(){let e={userCertificate:this.userCertificate.toJSON(),revocationDate:this.revocationDate.toJSON()};return this.crlEntryExtensions&&(e.crlEntryExtensions=this.crlEntryExtensions.toJSON()),e}};A9.CLASS_NAME="RevokedCertificate";var X_="tbs",lv="version",W_="signature",z_="issuer",J_="thisUpdate",WE="nextUpdate",zE="revokedCertificates",JE="crlExtensions",ty="signatureAlgorithm",ry="signatureValue",cu="tbsCertList",OA=`${cu}.version`,_B=`${cu}.signature`,DB=`${cu}.issuer`,PA=`${cu}.thisUpdate`,Yy=`${cu}.nextUpdate`,kA=`${cu}.revokedCertificates`,LA=`${cu}.extensions`,ife=[cu,OA,_B,DB,PA,Yy,kA,LA,ty,ry];function afe(r={}){let e=O(r,"names",{});return new J({name:e.blockName||cu,value:[new ve({optional:!0,name:e.tbsCertListVersion||OA,value:2}),ye.schema(e.signature||{names:{blockName:_B}}),Ur.schema(e.issuer||{names:{blockName:DB}}),Jn.schema(e.tbsCertListThisUpdate||{names:{utcTimeName:PA,generalTimeName:PA}}),Jn.schema(e.tbsCertListNextUpdate||{names:{utcTimeName:Yy,generalTimeName:Yy}},!0),new J({optional:!0,value:[new _t({name:e.tbsCertListRevokedCertificates||kA,value:new J({value:[new ve,Jn.schema(),Nn.schema({},!0)]})})]}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[Nn.schema(e.crlExtensions||{names:{blockName:LA}})]})]})}o(afe,"tbsCertList");var ofe=[yB,WF,Xce,Wce,zF,vB,xB,zce,Jce,JF],Qy=class bs extends De{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(O(e,X_,bs.defaultValues(X_))),this.version=O(e,lv,bs.defaultValues(lv)),this.signature=O(e,W_,bs.defaultValues(W_)),this.issuer=O(e,z_,bs.defaultValues(z_)),this.thisUpdate=O(e,J_,bs.defaultValues(J_)),WE in e&&(this.nextUpdate=O(e,WE,bs.defaultValues(WE))),zE in e&&(this.revokedCertificates=O(e,zE,bs.defaultValues(zE))),JE in e&&(this.crlExtensions=O(e,JE,bs.defaultValues(JE))),this.signatureAlgorithm=O(e,ty,bs.defaultValues(ty)),this.signatureValue=O(e,ry,bs.defaultValues(ry)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case X_:return sn;case lv:return 0;case W_:return new ye;case z_:return new Ur;case J_:return new Jn;case WE:return new Jn;case zE:return[];case JE:return new Nn;case ty:return new ye;case ry:return new Kt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||"CertificateList",value:[afe(e),ye.schema(t.signatureAlgorithm||{names:{blockName:ty}}),new Kt({name:t.signatureValue||ry})]})}fromSchema(e){Oe(e,ife);let t=_e(e,e,bs.schema());Ce.assertSchema(t,this.className),this.tbsView=t.result.tbsCertList.valueBeforeDecodeView,OA in t.result&&(this.version=t.result[OA].valueBlock.valueDec),this.signature=new ye({schema:t.result[_B]}),this.issuer=new Ur({schema:t.result[DB]}),this.thisUpdate=new Jn({schema:t.result[PA]}),Yy in t.result&&(this.nextUpdate=new Jn({schema:t.result[Yy]})),kA in t.result&&(this.revokedCertificates=Array.from(t.result[kA],n=>new A9({schema:n}))),LA in t.result&&(this.crlExtensions=new Nn({schema:t.result[LA]})),this.signatureAlgorithm=new ye({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}encodeTBS(){let e=[];return this.version!==bs.defaultValues(lv)&&e.push(new ve({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 J({value:Array.from(this.revokedCertificates,t=>t.toSchema())})),this.crlExtensions&&e.push(new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[this.crlExtensions.toSchema()]})),new J({value:e})}toSchema(e=!1){let t;if(e)t=this.encodeTBS();else{if(!this.tbsView.byteLength)return bs.schema();let n=Wr(this.tbsView);Ce.assert(n,"TBS Certificate Revocation List"),t=n.result}return new J({value:[t,this.signatureAlgorithm.toSchema(),this.signatureValue]})}toJSON(){let e={tbs:At.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(lv)&&(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=Ot(!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 Kt({valueHex:a})}async verify(e={},t=Ot(!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&&!ofe.includes(s.extnID))return!1}return t.verifyWithPublicKey(this.tbsView,this.signatureValue,n,this.signatureAlgorithm)}};Qy.CLASS_NAME="CertificateRevocationList";var Bd="crlId",Rd="crlValue",fv="parsedValue",ufe=[Bd,Rd],C9=class ny extends De{static{o(this,"CRLBag")}constructor(e={}){super(),this.crlId=O(e,Bd,ny.defaultValues(Bd)),this.crlValue=O(e,Rd,ny.defaultValues(Rd)),fv in e&&(this.parsedValue=O(e,fv,ny.defaultValues(fv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Bd:return V;case Rd:return new St;case fv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Bd:return t===V;case Rd:return t instanceof St;case fv:return t instanceof Object&&Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new st({name:t.id||"id"}),new ue({idBlock:{tagClass:3,tagNumber:0},value:[new St({name:t.value||"value"})]})]})}fromSchema(e){Oe(e,ufe);let t=_e(e,e,ny.schema({names:{id:Bd,value:Rd}}));switch(Ce.assertSchema(t,this.className),this.crlId=t.result.crlId.valueBlock.toString(),this.crlValue=t.result.crlValue,this.crlId){case CF:this.parsedValue=Qy.fromBER(this.certValue.valueBlock.valueHex);break;default:throw new Error(`Incorrect CRL_ID value in CRLBag: ${this.crlId}`)}}toSchema(){return this.parsedValue&&(this.crlId=CF,this.crlValue=new je({valueHex:this.parsedValue.toSchema().toBER(!1)})),new J({value:[new st({value:this.crlId}),new ue({idBlock:{tagClass:3,tagNumber:0},value:[this.crlValue.toSchema()]})]})}toJSON(){return{crlId:this.crlId,crlValue:this.crlValue.toJSON()}}};C9.CLASS_NAME="CRLBag";var Od="version",Pd="encryptedContentInfo",Fc="unprotectedAttrs",cfe=[Od,Pd,Fc],Zy=class sy extends De{static{o(this,"EncryptedData")}constructor(e={}){super(),this.version=O(e,Od,sy.defaultValues(Od)),this.encryptedContentInfo=O(e,Pd,sy.defaultValues(Pd)),Fc in e&&(this.unprotectedAttrs=O(e,Fc,sy.defaultValues(Fc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Od:return 0;case Pd:return new cs;case Fc:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Od:return t===0;case Pd:return cs.compareWithDefault("contentType",t.contentType)&&cs.compareWithDefault("contentEncryptionAlgorithm",t.contentEncryptionAlgorithm)&&cs.compareWithDefault("encryptedContent",t.encryptedContent);case Fc:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ve({name:t.version||V}),cs.schema(t.encryptedContentInfo||{}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new _t({name:t.unprotectedAttrs||V,value:an.schema()})]})]})}fromSchema(e){Oe(e,cfe);let t=_e(e,e,sy.schema({names:{version:Od,encryptedContentInfo:{names:{blockName:Pd}},unprotectedAttrs:Fc}}));Ce.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.encryptedContentInfo=new cs({schema:t.result.encryptedContentInfo}),Fc in t.result&&(this.unprotectedAttrs=Array.from(t.result.unprotectedAttrs,n=>new an({schema:n})))}toSchema(){let e=[];return e.push(new ve({value:this.version})),e.push(this.encryptedContentInfo.toSchema()),this.unprotectedAttrs&&e.push(new ue({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.unprotectedAttrs,t=>t.toSchema())})),new J({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=Ot(!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=Ot(!0)){Ar.assert(e,"parameters","object");let n={...e,encryptedContentInfo:this.encryptedContentInfo};return t.decryptEncryptedContentInfo(n)}};Zy.CLASS_NAME="EncryptedData";var Mf="encryptionAlgorithm",qc="encryptedData",hv="parsedValue",lfe=[Mf,qc],N9=class kd extends De{static{o(this,"PKCS8ShroudedKeyBag")}constructor(e={}){super(),this.encryptionAlgorithm=O(e,Mf,kd.defaultValues(Mf)),this.encryptedData=O(e,qc,kd.defaultValues(qc)),hv in e&&(this.parsedValue=O(e,hv,kd.defaultValues(hv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Mf:return new ye;case qc:return new je;case hv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Mf:return ye.compareWithDefault("algorithmId",t.algorithmId)&&!("algorithmParams"in t);case qc:return t.isEqual(kd.defaultValues(e));case hv:return t instanceof Object&&Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[ye.schema(t.encryptionAlgorithm||{names:{blockName:Mf}}),new Vr({value:[new je({name:t.encryptedData||qc}),new je({idBlock:{isConstructed:!0},name:t.encryptedData||qc})]})]})}fromSchema(e){Oe(e,lfe);let t=_e(e,e,kd.schema({names:{encryptionAlgorithm:{names:{blockName:Mf}},encryptedData:qc}}));Ce.assertSchema(t,this.className),this.encryptionAlgorithm=new ye({schema:t.result.encryptionAlgorithm}),this.encryptedData=t.result.encryptedData}toSchema(){return new J({value:[this.encryptionAlgorithm.toSchema(),this.encryptedData]})}toJSON(){return{encryptionAlgorithm:this.encryptionAlgorithm.toJSON(),encryptedData:this.encryptedData.toJSON()}}async parseInternalValues(e,t=Ot(!0)){let s=await new Zy({encryptedContentInfo:new cs({contentEncryptionAlgorithm:this.encryptionAlgorithm,encryptedContent:this.encryptedData})}).decrypt(e,t);this.parsedValue=Jy.fromBER(s)}async makeInternalValues(e,t=Ot(!0)){if(!this.parsedValue)throw new Error('Please initialize "parsedValue" first');let n=new Zy,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}};N9.CLASS_NAME="PKCS8ShroudedKeyBag";var Ld="secretTypeId",Vd="secretValue",ffe=[Ld,Vd],T9=class qb extends De{static{o(this,"SecretBag")}constructor(e={}){super(),this.secretTypeId=O(e,Ld,qb.defaultValues(Ld)),this.secretValue=O(e,Vd,qb.defaultValues(Vd)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Ld:return V;case Vd:return new St;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Ld:return t===V;case Vd:return t instanceof St;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new st({name:t.id||"id"}),new ue({idBlock:{tagClass:3,tagNumber:0},value:[new St({name:t.value||"value"})]})]})}fromSchema(e){Oe(e,ffe);let t=_e(e,e,qb.schema({names:{id:Ld,value:Vd}}));Ce.assertSchema(t,this.className),this.secretTypeId=t.result.secretTypeId.valueBlock.toString(),this.secretValue=t.result.secretValue}toSchema(){return new J({value:[new st({value:this.secretTypeId}),new ue({idBlock:{tagClass:3,tagNumber:0},value:[this.secretValue.toSchema()]})]})}toJSON(){return{secretTypeId:this.secretTypeId,secretValue:this.secretValue.toJSON()}}};T9.CLASS_NAME="SecretBag";var hfe=class Ff{static{o(this,"SafeBagValueFactory")}static getItems(){return this.items||(this.items={},Ff.register("1.2.840.113549.1.12.10.1.1",Jy),Ff.register("1.2.840.113549.1.12.10.1.2",N9),Ff.register("1.2.840.113549.1.12.10.1.3",b9),Ff.register("1.2.840.113549.1.12.10.1.4",C9),Ff.register("1.2.840.113549.1.12.10.1.5",T9),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",Yo="bagAttributes",pfe=[qf,Hf,Yo],MD=class iy extends De{static{o(this,"SafeBag")}constructor(e={}){super(),this.bagId=O(e,qf,iy.defaultValues(qf)),this.bagValue=O(e,Hf,iy.defaultValues(Hf)),Yo in e&&(this.bagAttributes=O(e,Yo,iy.defaultValues(Yo))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case qf:return V;case Hf:return new St;case Yo:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case qf:return t===V;case Hf:return t instanceof St;case Yo:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new st({name:t.bagId||qf}),new ue({idBlock:{tagClass:3,tagNumber:0},value:[new St({name:t.bagValue||Hf})]}),new Jr({optional:!0,value:[new _t({name:t.bagAttributes||Yo,value:an.schema()})]})]})}fromSchema(e){Oe(e,pfe);let t=_e(e,e,iy.schema({names:{bagId:qf,bagValue:Hf,bagAttributes:Yo}}));Ce.assertSchema(t,this.className),this.bagId=t.result.bagId.valueBlock.toString();let n=hfe.find(this.bagId);if(!n)throw new Error(`Invalid BAG_ID for SafeBag: ${this.bagId}`);this.bagValue=new n({schema:t.result.bagValue}),Yo in t.result&&(this.bagAttributes=Array.from(t.result.bagAttributes,s=>new an({schema:s})))}toSchema(){let e=[new st({value:this.bagId}),new ue({idBlock:{tagClass:3,tagNumber:0},value:[this.bagValue.toSchema()]})];return this.bagAttributes&&e.push(new Jr({value:Array.from(this.bagAttributes,t=>t.toSchema())})),new J({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}};MD.CLASS_NAME="SafeBag";var ad="safeBags",Km=class FD extends De{static{o(this,"SafeContents")}constructor(e={}){super(),this.safeBags=O(e,ad,FD.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=O(e,"names",{});return new J({name:t.blockName||V,value:[new _t({name:t.safeBags||V,value:MD.schema()})]})}fromSchema(e){Oe(e,[ad]);let t=_e(e,e,FD.schema({names:{safeBags:ad}}));Ce.assertSchema(t,this.className),this.safeBags=Array.from(t.result.safeBags,n=>new MD({schema:n}))}toSchema(){return new J({value:Array.from(this.safeBags,e=>e.toSchema())})}toJSON(){return{safeBags:Array.from(this.safeBags,e=>e.toJSON())}}};Km.CLASS_NAME="SafeContents";var ay="otherCertFormat",oy="otherCert",dfe=[ay,oy],Hb=class Kb extends De{static{o(this,"OtherCertificateFormat")}constructor(e={}){super(),this.otherCertFormat=O(e,ay,Kb.defaultValues(ay)),this.otherCert=O(e,oy,Kb.defaultValues(oy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ay:return V;case oy:return new St;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new st({name:t.otherCertFormat||ay}),new St({name:t.otherCert||oy})]})}fromSchema(e){Oe(e,dfe);let t=_e(e,e,Kb.schema());Ce.assertSchema(t,this.className),this.otherCertFormat=t.result.otherCertFormat.valueBlock.toString(),this.otherCert=t.result.otherCert}toSchema(){return new J({value:[new st({value:this.otherCertFormat}),this.otherCert]})}toJSON(){let e={otherCertFormat:this.otherCertFormat};return this.otherCert instanceof St||(e.otherCert=this.otherCert.toJSON()),e}},uy="certificates",mfe=[uy],Ch=class qD extends De{static{o(this,"CertificateSet")}constructor(e={}){super(),this.certificates=O(e,uy,qD.defaultValues(uy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case uy:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new Jr({name:t.blockName||V,value:[new _t({name:t.certificates||uy,value:new Vr({value:[ls.schema(),new ue({idBlock:{tagClass:3,tagNumber:0},value:[new St]}),new ue({idBlock:{tagClass:3,tagNumber:1},value:[new J]}),new ue({idBlock:{tagClass:3,tagNumber:2},value:pl.schema().valueBlock.value}),new ue({idBlock:{tagClass:3,tagNumber:3},value:Hb.schema().valueBlock.value})]})})]})}fromSchema(e){Oe(e,mfe);let t=_e(e,e,qD.schema());Ce.assertSchema(t,this.className),this.certificates=Array.from(t.result.certificates||[],n=>{let s=n.idBlock.tagNumber;if(n.idBlock.tagClass===1)return new ls({schema:n});let i=new J({value:n.valueBlock.value});switch(s){case 1:return i.valueBlock.value[0].valueBlock.value[0].valueBlock.valueDec===1?new pl({schema:i}):new TA({schema:i});case 2:return new pl({schema:i});case 3:return new Hb({schema:i})}return n})}toSchema(){return new Jr({value:Array.from(this.certificates,e=>{switch(!0){case e instanceof ls:return e.toSchema();case e instanceof TA:return new ue({idBlock:{tagClass:3,tagNumber:1},value:e.toSchema().valueBlock.value});case e instanceof pl:return new ue({idBlock:{tagClass:3,tagNumber:2},value:e.toSchema().valueBlock.value});case e instanceof Hb:return new ue({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 cy="otherRevInfoFormat",ly="otherRevInfo",gfe=[cy,ly],Ky=class $b extends De{static{o(this,"OtherRevocationInfoFormat")}constructor(e={}){super(),this.otherRevInfoFormat=O(e,cy,$b.defaultValues(cy)),this.otherRevInfo=O(e,ly,$b.defaultValues(ly)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case cy:return V;case ly:return new St;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new st({name:t.otherRevInfoFormat||cy}),new St({name:t.otherRevInfo||ly})]})}fromSchema(e){Oe(e,gfe);let t=_e(e,e,$b.schema());Ce.assertSchema(t,this.className),this.otherRevInfoFormat=t.result.otherRevInfoFormat.valueBlock.toString(),this.otherRevInfo=t.result.otherRevInfo}toSchema(){return new J({value:[new st({value:this.otherRevInfoFormat}),this.otherRevInfo]})}toJSON(){let e={otherRevInfoFormat:this.otherRevInfoFormat};return this.otherRevInfo instanceof St||(e.otherRevInfo=this.otherRevInfo.toJSON()),e}};Ky.CLASS_NAME="OtherRevocationInfoFormat";var fy="crls",Y_="otherRevocationInfos",vfe=[fy],$y=class Gb extends De{static{o(this,"RevocationInfoChoices")}constructor(e={}){super(),this.crls=O(e,fy,Gb.defaultValues(fy)),this.otherRevocationInfos=O(e,Y_,Gb.defaultValues(Y_)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case fy:return[];case Y_:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new Jr({name:t.blockName||V,value:[new _t({name:t.crls||V,value:new Vr({value:[Qy.schema(),new ue({idBlock:{tagClass:3,tagNumber:1},value:[new st,new St]})]})})]})}fromSchema(e){Oe(e,vfe);let t=_e(e,e,Gb.schema({names:{crls:fy}}));if(Ce.assertSchema(t,this.className),t.result.crls)for(let n of t.result.crls)n.idBlock.tagClass===1?this.crls.push(new Qy({schema:n})):this.otherRevocationInfos.push(new Ky({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 Jr({value:e})}toJSON(){return{crls:Array.from(this.crls,e=>e.toJSON()),otherRevocationInfos:Array.from(this.otherRevocationInfos,e=>e.toJSON())}}};$y.CLASS_NAME="RevocationInfoChoices";var hy="certs",Kf="crls",yfe=[hy,Kf],Xb=class HD extends De{static{o(this,"OriginatorInfo")}constructor(e={}){super(),this.crls=O(e,Kf,HD.defaultValues(Kf)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case hy:return new Ch;case Kf:return new $y;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case hy: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=O(e,"names",{});return new J({name:t.blockName||V,value:[new ue({name:t.certs||V,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:Ch.schema().valueBlock.value}),new ue({name:t.crls||V,optional:!0,idBlock:{tagClass:3,tagNumber:1},value:$y.schema().valueBlock.value})]})}fromSchema(e){Oe(e,yfe);let t=_e(e,e,HD.schema({names:{certs:hy,crls:Kf}}));Ce.assertSchema(t,this.className),hy in t.result&&(this.certs=new Ch({schema:new Jr({value:t.result.certs.valueBlock.value})})),Kf in t.result&&(this.crls=new $y({schema:new Jr({value:t.result.crls.valueBlock.value})}))}toSchema(){let e=[];return this.certs&&e.push(new ue({idBlock:{tagClass:3,tagNumber:0},value:this.certs.toSchema().valueBlock.value})),this.crls&&e.push(new ue({idBlock:{tagClass:3,tagNumber:1},value:this.crls.toSchema().valueBlock.value})),new J({value:e})}toJSON(){let e={};return this.certs&&(e.certs=this.certs.toJSON()),this.crls&&(e.crls=this.crls.toJSON()),e}};Xb.CLASS_NAME="OriginatorInfo";var py="issuer",dy="serialNumber",xfe=[py,dy],Yn=class Wb extends De{static{o(this,"IssuerAndSerialNumber")}constructor(e={}){super(),this.issuer=O(e,py,Wb.defaultValues(py)),this.serialNumber=O(e,dy,Wb.defaultValues(dy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case py:return new Ur;case dy:return new ve;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[Ur.schema(t.issuer||{}),new ve({name:t.serialNumber||V})]})}fromSchema(e){Oe(e,xfe);let t=_e(e,e,Wb.schema({names:{issuer:{names:{blockName:py}},serialNumber:dy}}));Ce.assertSchema(t,this.className),this.issuer=new Ur({schema:t.result.issuer}),this.serialNumber=t.result.serialNumber}toSchema(){return new J({value:[this.issuer.toSchema(),this.serialNumber]})}toJSON(){return{issuer:this.issuer.toJSON(),serialNumber:this.serialNumber.toJSON()}}};Yn.CLASS_NAME="IssuerAndSerialNumber";var YE="variant",pv="value",wfe=["blockName"],I9=class zb extends De{static{o(this,"RecipientIdentifier")}constructor(e={}){super(),this.variant=O(e,YE,zb.defaultValues(YE)),pv in e&&(this.value=O(e,pv,zb.defaultValues(pv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case YE:return-1;case pv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case YE:return t===-1;case pv:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new Vr({value:[Yn.schema({names:{blockName:t.blockName||V}}),new vt({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:0}})]})}fromSchema(e){Oe(e,wfe);let t=_e(e,e,zb.schema({names:{blockName:"blockName"}}));Ce.assertSchema(t,this.className),t.result.blockName.idBlock.tagClass===1?(this.variant=1,this.value=new Yn({schema:t.result.blockName})):(this.variant=2,this.value=new je({valueHex:t.result.blockName.valueBlock.valueHex}))}toSchema(){switch(this.variant){case 1:if(!(this.value instanceof Yn))throw new Error("Incorrect type of RecipientIdentifier.value. It should be IssuerAndSerialNumber.");return this.value.toSchema();case 2:if(!(this.value instanceof je))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 St}}toJSON(){let e={variant:this.variant};return(this.variant===1||this.variant===2)&&this.value&&(e.value=this.value.toJSON()),e}};I9.CLASS_NAME="RecipientIdentifier";var $f="version",Ud="rid",jd="keyEncryptionAlgorithm",Md="encryptedKey",QE="recipientCertificate",Sfe=[$f,Ud,jd,Md],VA=class Qo extends De{static{o(this,"KeyTransRecipientInfo")}constructor(e={}){super(),this.version=O(e,$f,Qo.defaultValues($f)),this.rid=O(e,Ud,Qo.defaultValues(Ud)),this.keyEncryptionAlgorithm=O(e,jd,Qo.defaultValues(jd)),this.encryptedKey=O(e,Md,Qo.defaultValues(Md)),this.recipientCertificate=O(e,QE,Qo.defaultValues(QE)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case $f:return-1;case Ud:return{};case jd:return new ye;case Md:return new je;case QE:return new ls;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case $f:return t===Qo.defaultValues($f);case Ud:return Object.keys(t).length===0;case jd:case Md:return t.isEqual(Qo.defaultValues(e));case QE:return!1;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ve({name:t.version||V}),I9.schema(t.rid||{}),ye.schema(t.keyEncryptionAlgorithm||{}),new je({name:t.encryptedKey||V})]})}fromSchema(e){Oe(e,Sfe);let t=_e(e,e,Qo.schema({names:{version:$f,rid:{names:{blockName:Ud}},keyEncryptionAlgorithm:{names:{blockName:jd}},encryptedKey:Md}}));Ce.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,t.result.rid.idBlock.tagClass===3?this.rid=new je({valueHex:t.result.rid.valueBlock.valueHex}):this.rid=new Yn({schema:t.result.rid}),this.keyEncryptionAlgorithm=new ye({schema:t.result.keyEncryptionAlgorithm}),this.encryptedKey=t.result.encryptedKey}toSchema(){let e=[];return this.rid instanceof Yn?(this.version=0,e.push(new ve({value:this.version})),e.push(this.rid.toSchema())):(this.version=2,e.push(new ve({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 J({value:e})}toJSON(){return{version:this.version,rid:this.rid.toJSON(),keyEncryptionAlgorithm:this.keyEncryptionAlgorithm.toJSON(),encryptedKey:this.encryptedKey.toJSON()}}};VA.CLASS_NAME="KeyTransRecipientInfo";var Fd="algorithm",qd="publicKey",Efe=[Fd,qd],UA=class my extends De{static{o(this,"OriginatorPublicKey")}constructor(e={}){super(),this.algorithm=O(e,Fd,my.defaultValues(Fd)),this.publicKey=O(e,qd,my.defaultValues(qd)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Fd:return new ye;case qd:return new Kt;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Fd:case qd:return t.isEqual(my.defaultValues(e));default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[ye.schema(t.algorithm||{}),new Kt({name:t.publicKey||V})]})}fromSchema(e){Oe(e,Efe);let t=_e(e,e,my.schema({names:{algorithm:{names:{blockName:Fd}},publicKey:qd}}));Ce.assertSchema(t,this.className),this.algorithm=new ye({schema:t.result.algorithm}),this.publicKey=t.result.publicKey}toSchema(){return new J({value:[this.algorithm.toSchema(),this.publicKey]})}toJSON(){return{algorithm:this.algorithm.toJSON(),publicKey:this.publicKey.toJSON()}}};UA.CLASS_NAME="OriginatorPublicKey";var ZE="variant",dv="value",bfe=["blockName"],Gy=class Jb extends De{static{o(this,"OriginatorIdentifierOrKey")}constructor(e={}){super(),this.variant=O(e,ZE,Jb.defaultValues(ZE)),dv in e&&(this.value=O(e,dv,Jb.defaultValues(dv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ZE:return-1;case dv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case ZE:return t===-1;case dv:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new Vr({value:[Yn.schema({names:{blockName:t.blockName||V}}),new vt({idBlock:{tagClass:3,tagNumber:0},name:t.blockName||V}),new ue({idBlock:{tagClass:3,tagNumber:1},name:t.blockName||V,value:UA.schema().valueBlock.value})]})}fromSchema(e){Oe(e,bfe);let t=_e(e,e,Jb.schema({names:{blockName:"blockName"}}));Ce.assertSchema(t,this.className),t.result.blockName.idBlock.tagClass===1?(this.variant=1,this.value=new Yn({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 UA({schema:new J({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 St}}toJSON(){let e={variant:this.variant};return(this.variant===1||this.variant===2||this.variant===3)&&(e.value=this.value.toJSON()),e}};Gy.CLASS_NAME="OriginatorIdentifierOrKey";var Hd="keyAttrId",ro="keyAttr",Afe=[Hd,ro],Nh=class Yb extends De{static{o(this,"OtherKeyAttribute")}constructor(e={}){super(),this.keyAttrId=O(e,Hd,Yb.defaultValues(Hd)),ro in e&&(this.keyAttr=O(e,ro,Yb.defaultValues(ro))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Hd:return V;case ro:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Hd:return typeof t=="string"&&t===V;case ro:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({optional:t.optional||!0,name:t.blockName||V,value:[new st({name:t.keyAttrId||V}),new St({optional:!0,name:t.keyAttr||V})]})}fromSchema(e){Oe(e,Afe);let t=_e(e,e,Yb.schema({names:{keyAttrId:Hd,keyAttr:ro}}));Ce.assertSchema(t,this.className),this.keyAttrId=t.result.keyAttrId.valueBlock.toString(),ro in t.result&&(this.keyAttr=t.result.keyAttr)}toSchema(){let e=[];return e.push(new st({value:this.keyAttrId})),ro in this&&e.push(this.keyAttr),new J({value:e})}toJSON(){let e={keyAttrId:this.keyAttrId};return ro in this&&(e.keyAttr=this.keyAttr.toJSON()),e}};Nh.CLASS_NAME="OtherKeyAttribute";var Gf="subjectKeyIdentifier",Hc="date",Kc="other",Cfe=[Gf,Hc,Kc],jA=class Kd extends De{static{o(this,"RecipientKeyIdentifier")}constructor(e={}){super(),this.subjectKeyIdentifier=O(e,Gf,Kd.defaultValues(Gf)),Hc in e&&(this.date=O(e,Hc,Kd.defaultValues(Hc))),Kc in e&&(this.other=O(e,Kc,Kd.defaultValues(Kc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Gf:return new je;case Hc:return new Lr;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===V&&!("keyAttr"in t);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new je({name:t.subjectKeyIdentifier||V}),new Lr({optional:!0,name:t.date||V}),Nh.schema(t.other||{})]})}fromSchema(e){Oe(e,Cfe);let t=_e(e,e,Kd.schema({names:{subjectKeyIdentifier:Gf,date:Hc,other:{names:{blockName:Kc}}}}));Ce.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 J({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}};jA.CLASS_NAME="RecipientKeyIdentifier";var eb="variant",tb="value",Nfe=["blockName"],Gm=class Qb extends De{static{o(this,"KeyAgreeRecipientIdentifier")}constructor(e={}){super(),this.variant=O(e,eb,Qb.defaultValues(eb)),this.value=O(e,tb,Qb.defaultValues(tb)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case eb:return-1;case tb:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case eb:return t===-1;case tb:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new Vr({value:[Yn.schema(t.issuerAndSerialNumber||{names:{blockName:t.blockName||V}}),new ue({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:0},value:jA.schema(t.rKeyId||{names:{blockName:t.blockName||V}}).valueBlock.value})]})}fromSchema(e){Oe(e,Nfe);let t=_e(e,e,Qb.schema({names:{blockName:"blockName"}}));Ce.assertSchema(t,this.className),t.result.blockName.idBlock.tagClass===1?(this.variant=1,this.value=new Yn({schema:t.result.blockName})):(this.variant=2,this.value=new jA({schema:new J({value:t.result.blockName.valueBlock.value})}))}toSchema(){switch(this.variant){case 1:return this.value.toSchema();case 2:return new ue({idBlock:{tagClass:3,tagNumber:0},value:this.value.toSchema().valueBlock.value});default:return new St}}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",Tfe=[$d,Xf],MA=class gy extends De{static{o(this,"RecipientEncryptedKey")}constructor(e={}){super(),this.rid=O(e,$d,gy.defaultValues($d)),this.encryptedKey=O(e,Xf,gy.defaultValues(Xf)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case $d:return new Gm;case Xf:return new je;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(gy.defaultValues(Xf));default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[Gm.schema(t.rid||{}),new je({name:t.encryptedKey||V})]})}fromSchema(e){Oe(e,Tfe);let t=_e(e,e,gy.schema({names:{rid:{names:{blockName:$d}},encryptedKey:Xf}}));Ce.assertSchema(t,this.className),this.rid=new Gm({schema:t.result.rid}),this.encryptedKey=t.result.encryptedKey}toSchema(){return new J({value:[this.rid.toSchema(),this.encryptedKey]})}toJSON(){return{rid:this.rid.toJSON(),encryptedKey:this.encryptedKey.toJSON()}}};MA.CLASS_NAME="RecipientEncryptedKey";var rb="encryptedKeys",_9="RecipientEncryptedKeys",Ife=[_9],Xy=class KD extends De{static{o(this,"RecipientEncryptedKeys")}constructor(e={}){super(),this.encryptedKeys=O(e,rb,KD.defaultValues(rb)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case rb:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case rb:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new _t({name:t.RecipientEncryptedKeys||V,value:MA.schema()})]})}fromSchema(e){Oe(e,Ife);let t=_e(e,e,KD.schema({names:{RecipientEncryptedKeys:_9}}));Ce.assertSchema(t,this.className),this.encryptedKeys=Array.from(t.result.RecipientEncryptedKeys,n=>new MA({schema:n}))}toSchema(){return new J({value:Array.from(this.encryptedKeys,e=>e.toSchema())})}toJSON(){return{encryptedKeys:Array.from(this.encryptedKeys,e=>e.toJSON())}}};Xy.CLASS_NAME="RecipientEncryptedKeys";var Gd="version",Xd="originator",Zo="ukm",Wd="keyEncryptionAlgorithm",zd="recipientEncryptedKeys",nb="recipientCertificate",sb="recipientPublicKey",_fe=[Gd,Xd,Zo,Wd,zd],FA=class no extends De{static{o(this,"KeyAgreeRecipientInfo")}constructor(e={}){super(),this.version=O(e,Gd,no.defaultValues(Gd)),this.originator=O(e,Xd,no.defaultValues(Xd)),Zo in e&&(this.ukm=O(e,Zo,no.defaultValues(Zo))),this.keyEncryptionAlgorithm=O(e,Wd,no.defaultValues(Wd)),this.recipientEncryptedKeys=O(e,zd,no.defaultValues(zd)),this.recipientCertificate=O(e,nb,no.defaultValues(nb)),this.recipientPublicKey=O(e,sb,no.defaultValues(sb)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Gd:return 0;case Xd:return new Gy;case Zo:return new je;case Wd:return new ye;case zd:return new Xy;case nb:return new ls;case sb: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 Zo:return t.isEqual(no.defaultValues(Zo));case Wd:return t.algorithmId===V&&!("algorithmParams"in t);case zd:return t.encryptedKeys.length===0;case nb:return!1;case sb:return!1;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ve({name:t.version||V}),new ue({idBlock:{tagClass:3,tagNumber:0},value:[Gy.schema(t.originator||{})]}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new je({name:t.ukm||V})]}),ye.schema(t.keyEncryptionAlgorithm||{}),Xy.schema(t.recipientEncryptedKeys||{})]})}fromSchema(e){Oe(e,_fe);let t=_e(e,e,no.schema({names:{version:Gd,originator:{names:{blockName:Xd}},ukm:Zo,keyEncryptionAlgorithm:{names:{blockName:Wd}},recipientEncryptedKeys:{names:{blockName:zd}}}}));Ce.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.originator=new Gy({schema:t.result.originator}),Zo in t.result&&(this.ukm=t.result.ukm),this.keyEncryptionAlgorithm=new ye({schema:t.result.keyEncryptionAlgorithm}),this.recipientEncryptedKeys=new Xy({schema:t.result.recipientEncryptedKeys})}toSchema(){let e=[];return e.push(new ve({value:this.version})),e.push(new ue({idBlock:{tagClass:3,tagNumber:0},value:[this.originator.toSchema()]})),this.ukm&&e.push(new ue({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[this.ukm]})),e.push(this.keyEncryptionAlgorithm.toSchema()),e.push(this.recipientEncryptedKeys.toSchema()),new J({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}};FA.CLASS_NAME="KeyAgreeRecipientInfo";var Wf="keyIdentifier",$c="date",Gc="other",Dfe=[Wf,$c,Gc],Wy=class Jd extends De{static{o(this,"KEKIdentifier")}constructor(e={}){super(),this.keyIdentifier=O(e,Wf,Jd.defaultValues(Wf)),$c in e&&(this.date=O(e,$c,Jd.defaultValues($c))),Gc in e&&(this.other=O(e,Gc,Jd.defaultValues(Gc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Wf:return new je;case $c:return new Lr;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=O(e,"names",{});return new J({name:t.blockName||V,value:[new je({name:t.keyIdentifier||V}),new Lr({optional:!0,name:t.date||V}),Nh.schema(t.other||{})]})}fromSchema(e){Oe(e,Dfe);let t=_e(e,e,Jd.schema({names:{keyIdentifier:Wf,date:$c,other:{names:{blockName:Gc}}}}));Ce.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 J({value:e})}toJSON(){let e={keyIdentifier:this.keyIdentifier.toJSON()};return this.date&&(e.date=this.date),this.other&&(e.other=this.other.toJSON()),e}};Wy.CLASS_NAME="KEKIdentifier";var Yd="version",Qd="kekid",Zd="keyEncryptionAlgorithm",zf="encryptedKey",ib="preDefinedKEK",Bfe=[Yd,Qd,Zd,zf],qA=class eu extends De{static{o(this,"KEKRecipientInfo")}constructor(e={}){super(),this.version=O(e,Yd,eu.defaultValues(Yd)),this.kekid=O(e,Qd,eu.defaultValues(Qd)),this.keyEncryptionAlgorithm=O(e,Zd,eu.defaultValues(Zd)),this.encryptedKey=O(e,zf,eu.defaultValues(zf)),this.preDefinedKEK=O(e,ib,eu.defaultValues(ib)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Yd:return 0;case Qd:return new Wy;case Zd:return new ye;case zf:return new je;case ib:return sn;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case"KEKRecipientInfo":return t===eu.defaultValues(Yd);case Qd:return t.compareWithDefault("keyIdentifier",t.keyIdentifier)&&!("date"in t)&&!("other"in t);case Zd:return t.algorithmId===V&&!("algorithmParams"in t);case zf:return t.isEqual(eu.defaultValues(zf));case ib:return t.byteLength===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ve({name:t.version||V}),Wy.schema(t.kekid||{}),ye.schema(t.keyEncryptionAlgorithm||{}),new je({name:t.encryptedKey||V})]})}fromSchema(e){Oe(e,Bfe);let t=_e(e,e,eu.schema({names:{version:Yd,kekid:{names:{blockName:Qd}},keyEncryptionAlgorithm:{names:{blockName:Zd}},encryptedKey:zf}}));Ce.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.kekid=new Wy({schema:t.result.kekid}),this.keyEncryptionAlgorithm=new ye({schema:t.result.keyEncryptionAlgorithm}),this.encryptedKey=t.result.encryptedKey}toSchema(){return new J({value:[new ve({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()}}};qA.CLASS_NAME="KEKRecipientInfo";var em="version",Xc="keyDerivationAlgorithm",tm="keyEncryptionAlgorithm",Jf="encryptedKey",ab="password",Rfe=[em,Xc,tm,Jf],HA=class Wc extends De{static{o(this,"PasswordRecipientinfo")}constructor(e={}){super(),this.version=O(e,em,Wc.defaultValues(em)),Xc in e&&(this.keyDerivationAlgorithm=O(e,Xc,Wc.defaultValues(Xc))),this.keyEncryptionAlgorithm=O(e,tm,Wc.defaultValues(tm)),this.encryptedKey=O(e,Jf,Wc.defaultValues(Jf)),this.password=O(e,ab,Wc.defaultValues(ab)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case em:return-1;case Xc:return new ye;case tm:return new ye;case Jf:return new je;case ab:return sn;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case em:return t===-1;case Xc:case tm:return t.algorithmId===V&&!("algorithmParams"in t);case Jf:return t.isEqual(Wc.defaultValues(Jf));case ab:return t.byteLength===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ve({name:t.version||V}),new ue({name:t.keyDerivationAlgorithm||V,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:ye.schema().valueBlock.value}),ye.schema(t.keyEncryptionAlgorithm||{}),new je({name:t.encryptedKey||V})]})}fromSchema(e){Oe(e,Rfe);let t=_e(e,e,Wc.schema({names:{version:em,keyDerivationAlgorithm:Xc,keyEncryptionAlgorithm:{names:{blockName:tm}},encryptedKey:Jf}}));Ce.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,Xc in t.result&&(this.keyDerivationAlgorithm=new ye({schema:new J({value:t.result.keyDerivationAlgorithm.valueBlock.value})})),this.keyEncryptionAlgorithm=new ye({schema:t.result.keyEncryptionAlgorithm}),this.encryptedKey=t.result.encryptedKey}toSchema(){let e=[];return e.push(new ve({value:this.version})),this.keyDerivationAlgorithm&&e.push(new ue({idBlock:{tagClass:3,tagNumber:0},value:this.keyDerivationAlgorithm.toSchema().valueBlock.value})),e.push(this.keyEncryptionAlgorithm.toSchema()),e.push(this.encryptedKey),new J({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}};HA.CLASS_NAME="PasswordRecipientInfo";var rm="oriType",Yf="oriValue",Ofe=[rm,Yf],$D=class vy extends De{static{o(this,"OtherRecipientInfo")}constructor(e={}){super(),this.oriType=O(e,rm,vy.defaultValues(rm)),this.oriValue=O(e,Yf,vy.defaultValues(Yf)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case rm:return V;case Yf:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case rm:return t===V;case Yf:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new st({name:t.oriType||V}),new St({name:t.oriValue||V})]})}fromSchema(e){Oe(e,Ofe);let t=_e(e,e,vy.schema({names:{oriType:rm,oriValue:Yf}}));Ce.assertSchema(t,this.className),this.oriType=t.result.oriType.valueBlock.toString(),this.oriValue=t.result.oriValue}toSchema(){return new J({value:[new st({value:this.oriType}),this.oriValue]})}toJSON(){let e={oriType:this.oriType};return vy.compareWithDefault(Yf,this.oriValue)||(e.oriValue=this.oriValue.toJSON()),e}};$D.CLASS_NAME="OtherRecipientInfo";var ob="variant",mv="value",Pfe=["blockName"],Qf=class yy extends De{static{o(this,"RecipientInfo")}constructor(e={}){super(),this.variant=O(e,ob,yy.defaultValues(ob)),mv in e&&(this.value=O(e,mv,yy.defaultValues(mv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ob:return-1;case mv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case ob:return t===yy.defaultValues(e);case mv:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new Vr({value:[VA.schema({names:{blockName:t.blockName||V}}),new ue({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:1},value:FA.schema().valueBlock.value}),new ue({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:2},value:qA.schema().valueBlock.value}),new ue({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:3},value:HA.schema().valueBlock.value}),new ue({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:4},value:$D.schema().valueBlock.value})]})}fromSchema(e){Oe(e,Pfe);let t=_e(e,e,yy.schema({names:{blockName:"blockName"}}));if(Ce.assertSchema(t,this.className),t.result.blockName.idBlock.tagClass===1)this.variant=1,this.value=new VA({schema:t.result.blockName});else{let n=new J({value:t.result.blockName.valueBlock.value});switch(t.result.blockName.idBlock.tagNumber){case 1:this.variant=2,this.value=new FA({schema:n});break;case 2:this.variant=3,this.value=new qA({schema:n});break;case 3:this.variant=4,this.value=new HA({schema:n});break;case 4:this.variant=5,this.value=new $D({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 St}}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",kfe=[zc,Jc,Yc],Zb=class da extends De{static{o(this,"RSAESOAEPParams")}constructor(e={}){super(),this.hashAlgorithm=O(e,zc,da.defaultValues(zc)),this.maskGenAlgorithm=O(e,Jc,da.defaultValues(Jc)),this.pSourceAlgorithm=O(e,Yc,da.defaultValues(Yc)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case zc:return new ye({algorithmId:"1.3.14.3.2.26",algorithmParams:new zr});case Jc:return new ye({algorithmId:"1.2.840.113549.1.1.8",algorithmParams:new ye({algorithmId:"1.3.14.3.2.26",algorithmParams:new zr}).toSchema()});case Yc:return new ye({algorithmId:"1.2.840.113549.1.1.9",algorithmParams:new je({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=O(e,"names",{});return new J({name:t.blockName||V,value:[new ue({idBlock:{tagClass:3,tagNumber:0},optional:!0,value:[ye.schema(t.hashAlgorithm||{})]}),new ue({idBlock:{tagClass:3,tagNumber:1},optional:!0,value:[ye.schema(t.maskGenAlgorithm||{})]}),new ue({idBlock:{tagClass:3,tagNumber:2},optional:!0,value:[ye.schema(t.pSourceAlgorithm||{})]})]})}fromSchema(e){Oe(e,kfe);let t=_e(e,e,da.schema({names:{hashAlgorithm:{names:{blockName:zc}},maskGenAlgorithm:{names:{blockName:Jc}},pSourceAlgorithm:{names:{blockName:Yc}}}}));Ce.assertSchema(t,this.className),zc in t.result&&(this.hashAlgorithm=new ye({schema:t.result.hashAlgorithm})),Jc in t.result&&(this.maskGenAlgorithm=new ye({schema:t.result.maskGenAlgorithm})),Yc in t.result&&(this.pSourceAlgorithm=new ye({schema:t.result.pSourceAlgorithm}))}toSchema(){let e=[];return this.hashAlgorithm.isEqual(da.defaultValues(zc))||e.push(new ue({idBlock:{tagClass:3,tagNumber:0},value:[this.hashAlgorithm.toSchema()]})),this.maskGenAlgorithm.isEqual(da.defaultValues(Jc))||e.push(new ue({idBlock:{tagClass:3,tagNumber:1},value:[this.maskGenAlgorithm.toSchema()]})),this.pSourceAlgorithm.isEqual(da.defaultValues(Yc))||e.push(new ue({idBlock:{tagClass:3,tagNumber:2},value:[this.pSourceAlgorithm.toSchema()]})),new J({value:e})}toJSON(){let e={};return this.hashAlgorithm.isEqual(da.defaultValues(zc))||(e.hashAlgorithm=this.hashAlgorithm.toJSON()),this.maskGenAlgorithm.isEqual(da.defaultValues(Jc))||(e.maskGenAlgorithm=this.maskGenAlgorithm.toJSON()),this.pSourceAlgorithm.isEqual(da.defaultValues(Yc))||(e.pSourceAlgorithm=this.pSourceAlgorithm.toJSON()),e}};Zb.CLASS_NAME="RSAESOAEPParams";var nm="keyInfo",Qc="entityUInfo",sm="suppPubInfo",Lfe=[nm,Qc,sm],GD=class im extends De{static{o(this,"ECCCMSSharedInfo")}constructor(e={}){super(),this.keyInfo=O(e,nm,im.defaultValues(nm)),Qc in e&&(this.entityUInfo=O(e,Qc,im.defaultValues(Qc))),this.suppPubInfo=O(e,sm,im.defaultValues(sm)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case nm:return new ye;case Qc:return new je;case sm:return new je;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=O(e,"names",{});return new J({name:t.blockName||V,value:[ye.schema(t.keyInfo||{}),new ue({name:t.entityUInfo||V,idBlock:{tagClass:3,tagNumber:0},optional:!0,value:[new je]}),new ue({name:t.suppPubInfo||V,idBlock:{tagClass:3,tagNumber:2},value:[new je]})]})}fromSchema(e){Oe(e,Lfe);let t=_e(e,e,im.schema({names:{keyInfo:{names:{blockName:nm}},entityUInfo:Qc,suppPubInfo:sm}}));Ce.assertSchema(t,this.className),this.keyInfo=new ye({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 ue({idBlock:{tagClass:3,tagNumber:0},value:[this.entityUInfo]})),e.push(new ue({idBlock:{tagClass:3,tagNumber:2},value:[this.suppPubInfo]})),new J({value:e})}toJSON(){let e={keyInfo:this.keyInfo.toJSON(),suppPubInfo:this.suppPubInfo.toJSON()};return this.entityUInfo&&(e.entityUInfo=this.entityUInfo.toJSON()),e}};GD.CLASS_NAME="ECCCMSSharedInfo";var am="version",Zc="originatorInfo",om="recipientInfos",um="encryptedContentInfo",el="unprotectedAttrs",Vfe=[am,Zc,om,um,el],qF={kdfAlgorithm:"SHA-512",kekEncryptionLength:256},Ufe={"P-256":256,"P-384":384,"P-521":528},XD=class tl extends De{static{o(this,"EnvelopedData")}constructor(e={}){super(),this.version=O(e,am,tl.defaultValues(am)),Zc in e&&(this.originatorInfo=O(e,Zc,tl.defaultValues(Zc))),this.recipientInfos=O(e,om,tl.defaultValues(om)),this.encryptedContentInfo=O(e,um,tl.defaultValues(um)),el in e&&(this.unprotectedAttrs=O(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 Xb;case om:return[];case um:return new cs;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 cs.compareWithDefault("contentType",t.contentType)&&cs.compareWithDefault("contentEncryptionAlgorithm",t.contentEncryptionAlgorithm)&&cs.compareWithDefault("encryptedContent",t.encryptedContent);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ve({name:t.version||V}),new ue({name:t.originatorInfo||V,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:Xb.schema().valueBlock.value}),new Jr({value:[new _t({name:t.recipientInfos||V,value:Qf.schema()})]}),cs.schema(t.encryptedContentInfo||{}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new _t({name:t.unprotectedAttrs||V,value:an.schema()})]})]})}fromSchema(e){Oe(e,Vfe);let t=_e(e,e,tl.schema({names:{version:am,originatorInfo:Zc,recipientInfos:om,encryptedContentInfo:{names:{blockName:um}},unprotectedAttrs:el}}));Ce.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,Zc in t.result&&(this.originatorInfo=new Xb({schema:new J({value:t.result.originatorInfo.valueBlock.value})})),this.recipientInfos=Array.from(t.result.recipientInfos,n=>new Qf({schema:n})),this.encryptedContentInfo=new cs({schema:t.result.encryptedContentInfo}),el in t.result&&(this.unprotectedAttrs=Array.from(t.result.unprotectedAttrs,n=>new an({schema:n})))}toSchema(){let e=[];return e.push(new ve({value:this.version})),this.originatorInfo&&e.push(new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:this.originatorInfo.toSchema().valueBlock.value})),e.push(new Jr({value:Array.from(this.recipientInfos,t=>t.toSchema())})),e.push(this.encryptedContentInfo.toSchema()),this.unprotectedAttrs&&e.push(new ue({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.unprotectedAttrs,t=>t.toSchema())})),new J({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=Ot(!0)){let i=Object.assign({useOAEP:!0,oaepHashAlgorithm:"SHA-512"},qF,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 ye({algorithmId:f,algorithmParams:new zr});u=new Zb({hashAlgorithm:h,maskGenAlgorithm:new ye({algorithmId:"1.2.840.113549.1.1.8",algorithmParams:h.toSchema()})}).toSchema()}else{if(a=s.getOIDByAlgorithm({name:"RSAES-PKCS1-v1_5"}),a===V)throw new Error("Can not find OID for RSAES-PKCS1-v1_5");u=new zr}let c=new VA({version:0,rid:new Yn({issuer:e.issuer,serialNumber:e.serialNumber}),keyEncryptionAlgorithm:new ye({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 Yn({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=Ot(!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 zr),n){case 1:{let i=s.getOIDByAlgorithm(t.keyEncryptionAlgorithm,!0,"keyEncryptionAlgorithm"),a=new qA({version:4,kekid:new Wy({keyIdentifier:new je({valueHex:t.keyIdentifier})}),keyEncryptionAlgorithm:new ye({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 je({valueHex:a}),iterationCount:t.iterationCount,prf:new ye({algorithmId:c,algorithmParams:new zr})}),h=s.getOIDByAlgorithm(t.keyEncryptionAlgorithm,!0,"keyEncryptionAlgorithm"),m=new HA({version:0,keyDerivationAlgorithm:new ye({algorithmId:i,algorithmParams:f.toSchema()}),keyEncryptionAlgorithm:new ye({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=Ot(!0)){let i=Object.assign({},qF,n||{}),a=new Gm({variant:2,value:new jA({subjectKeyIdentifier:new je({valueHex:t})})});this._addKeyAgreeRecipientInfo(a,i,{recipientPublicKey:e},s)}_addKeyAgreeRecipientInfo(e,t,n,s=Ot(!0)){let i=new MA({rid:e}),a=s.getOIDByAlgorithm({name:"AES-KW",length:t.kekEncryptionLength},!0,"keyEncryptionAlgorithm"),u=new ye({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 je({valueHex:f}),keyEncryptionAlgorithm:new ye({algorithmId:c,algorithmParams:u.toSchema()}),recipientEncryptedKeys:new Xy({encryptedKeys:[i]})},g=new FA(Object.assign(m,n));this.recipientInfos.push(new Qf({variant:2,value:g}))}async encrypt(e,t,n=Ot(!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 cs({disableSplit:this.policy.disableSplit,contentType:"1.2.840.113549.1.7.1",contentEncryptionAlgorithm:new ye({algorithmId:u,algorithmParams:new je({valueHex:s})}),encryptedContent:new je({valueHex:f})});let m=o(async E=>{let C=this.recipientInfos[E].value,_,b;if(C.recipientPublicKey)_=C.recipientPublicKey.algorithm.namedCurve,b=C.recipientPublicKey;else if(C.recipientCertificate){let de=C.recipientCertificate.subjectPublicKeyInfo.algorithm.algorithmParams;if(de.constructor.blockName()!==st.blockName())throw new Error(`Incorrect "recipientCertificate" for index ${E}`);switch(de.valueBlock.toString()){case"1.2.840.10045.3.1.7":_="P-256";break;case"1.3.132.0.34":_="P-384";break;case"1.3.132.0.35":_="P-521";break;default:throw new Error(`Incorrect curve OID for index ${E}`)}b=await C.recipientCertificate.getPublicKey({algorithm:{algorithm:{name:"ECDH",namedCurve:_},usages:[]}},n)}else throw new Error("Unsupported RecipientInfo");let A=Ufe[_],T=await n.generateKey({name:"ECDH",namedCurve:_},!0,["deriveBits"]),R=await n.exportKey("spki",T.publicKey),H=await n.deriveBits({name:"ECDH",public:b},T.privateKey,A),I=new ye({schema:C.keyEncryptionAlgorithm.algorithmParams}),$=n.getAlgorithmByOID(I.algorithmId,!0,"aesKWAlgorithm"),K=$.length,F=new ArrayBuffer(4),z=new Uint8Array(F);for(let de=3;de>=0;de--)z[de]=K,K>>=8;let pe=new GD({keyInfo:new ye({algorithmId:I.algorithmId}),entityUInfo:C.ukm,suppPubInfo:new je({valueHex:F})}).toSchema().toBER(!1),oe=n.getAlgorithmByOID(C.keyEncryptionAlgorithm.algorithmId,!0,"ecdhAlgorithm"),Q=await _F(oe.kdf,H,$.length,pe,n),xe=await n.importKey("raw",Q,{name:"AES-KW"},!0,["wrapKey"]),Me=await n.wrapKey("raw",c,xe,{name:"AES-KW"}),Qe=new Gy;return Qe.variant=3,Qe.value=UA.fromBER(R),C.originator=Qe,C.recipientEncryptedKeys.encryptedKeys[0].encryptedKey=new je({valueHex:Me}),{ecdhPrivateKey:T.privateKey}},"SubKeyAgreeRecipientInfo"),g=o(async E=>{let C=this.recipientInfos[E].value,_=n.getAlgorithmByOID(C.keyEncryptionAlgorithm.algorithmId,!0,"keyEncryptionAlgorithm");if(_.name==="RSA-OAEP"){let b=C.keyEncryptionAlgorithm.algorithmParams,A=new Zb({schema:b});if(_.hash=n.getAlgorithmByOID(A.hashAlgorithm.algorithmId),!("name"in _.hash))throw new Error(`Incorrect OID for hash algorithm: ${A.hashAlgorithm.algorithmId}`)}try{let b=await C.recipientCertificate.getPublicKey({algorithm:{algorithm:_,usages:["encrypt","wrapKey"]}},n),A=await n.encrypt(b.algorithm,b,h);C.encryptedKey=new je({valueHex:A})}catch{}},"SubKeyTransRecipientInfo"),x=o(async E=>{let C=this.recipientInfos[E].value,_=n.getAlgorithmByOID(C.keyEncryptionAlgorithm.algorithmId,!0,"kekAlgorithm"),b=await n.importKey("raw",new Uint8Array(C.preDefinedKEK),_,!0,["wrapKey"]),A=await n.wrapKey("raw",c,b,_);C.encryptedKey=new je({valueHex:A})},"SubKEKRecipientInfo"),v=o(async E=>{let C=this.recipientInfos[E].value,_;if(!C.keyDerivationAlgorithm)throw new Error('Please append encoded "keyDerivationAlgorithm"');if(!C.keyDerivationAlgorithm.algorithmParams)throw new Error('Incorrectly encoded "keyDerivationAlgorithm"');try{_=new $m({schema:C.keyDerivationAlgorithm.algorithmParams})}catch{throw new Error('Incorrectly encoded "keyDerivationAlgorithm"')}let b=new Uint8Array(C.password),A=await n.importKey("raw",b,"PBKDF2",!1,["deriveKey"]),T=n.getAlgorithmByOID(C.keyEncryptionAlgorithm.algorithmId,!0,"kekAlgorithm"),R="SHA-1";_.prf&&(R=n.getAlgorithmByOID(_.prf.algorithmId,!0,"prfAlgorithm").hash.name);let H=new Uint8Array(_.salt.valueBlock.valueHex),I=_.iterationCount,$=await n.deriveKey({name:"PBKDF2",hash:{name:R},salt:H,iterations:I},A,T,!0,["wrapKey"]),K=await n.wrapKey("raw",c,$,T);C.encryptedKey=new je({valueHex:K})},"SubPasswordRecipientinfo"),S=[];for(let E=0;E<this.recipientInfos.length;E++)switch(this.recipientInfos[E].variant){case 1:S.push(await g(E));break;case 2:S.push(await m(E));break;case 3:S.push(await x(E));break;case 4:S.push(await v(E));break;default:throw new Error(`Unknown recipient type in array with index ${E}`)}return S}async decrypt(e,t,n=Ot(!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 S=>{let E=this.recipientInfos[S].value,C,_,b,A=E.originator;if(s.recipientCertificate){let oe=s.recipientCertificate.subjectPublicKeyInfo.algorithm.algorithmParams;if(oe.constructor.blockName()!==st.blockName())throw new Error(`Incorrect "recipientCertificate" for index ${S}`);C=oe.valueBlock.toString()}else if(A.value.algorithm.algorithmParams){let oe=A.value.algorithm.algorithmParams;if(oe.constructor.blockName()!==st.blockName())throw new Error(`Incorrect originator for index ${S}`);C=oe.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(C){case"1.2.840.10045.3.1.7":_="P-256",b=256;break;case"1.3.132.0.34":_="P-384",b=384;break;case"1.3.132.0.35":_="P-521",b=528;break;default:throw new Error(`Incorrect curve OID for index ${S}`)}let T,R=n;mt.isBufferSource(s.recipientPrivateKey)?T=await n.importKey("pkcs8",s.recipientPrivateKey,{name:"ECDH",namedCurve:_},!0,["deriveBits"]):(T=s.recipientPrivateKey,"crypto"in s&&s.crypto&&(R=s.crypto.subtle)),"algorithmParams"in A.value.algorithm||(A.value.algorithm.algorithmParams=new st({value:C}));let H=A.value.toSchema().toBER(!1),I=await n.importKey("spki",H,{name:"ECDH",namedCurve:_},!0,[]),$=await R.deriveBits({name:"ECDH",public:I},T,b);async function K(oe){oe=oe||!1;let Q=new ye({schema:E.keyEncryptionAlgorithm.algorithmParams}),xe=n.getAlgorithmByOID(Q.algorithmId,!0,"kwAlgorithm"),Me=xe.length,Qe=new ArrayBuffer(4),de=new Uint8Array(Qe);for(let ft=3;ft>=0;ft--)de[ft]=Me,Me>>=8;let fe={algorithmId:Q.algorithmId};oe&&(fe.algorithmParams=new zr);let $e=new GD({keyInfo:new ye(fe),entityUInfo:E.ukm,suppPubInfo:new je({valueHex:Qe})}).toSchema().toBER(!1),Ge=n.getAlgorithmByOID(E.keyEncryptionAlgorithm.algorithmId,!0,"ecdhAlgorithm");if(!Ge.name)throw new Error(`Incorrect OID for key encryption algorithm: ${E.keyEncryptionAlgorithm.algorithmId}`);return _F(Ge.kdf,$,xe.length,$e,n)}o(K,"applyKDF");let F=await K(),z=o(async oe=>n.importKey("raw",oe,{name:"AES-KW"},!0,["unwrapKey"]),"importAesKwKey"),he=await z(F),pe=o(async oe=>{let Q=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId,xe=n.getAlgorithmByOID(Q,!0,"contentEncryptionAlgorithm");return n.unwrapKey("raw",E.recipientEncryptedKeys.encryptedKeys[0].encryptedKey.valueBlock.valueHexView,oe,{name:"AES-KW"},xe,!0,["decrypt"])},"unwrapSessionKey");try{return await pe(he)}catch{let oe=await K(!0),Q=await z(oe);return pe(Q)}},"SubKeyAgreeRecipientInfo"),a=o(async S=>{let E=this.recipientInfos[S].value;if(!s.recipientPrivateKey)throw new Error('Parameter "recipientPrivateKey" is mandatory for "KeyTransRecipientInfo"');let C=n.getAlgorithmByOID(E.keyEncryptionAlgorithm.algorithmId,!0,"keyEncryptionAlgorithm");if(C.name==="RSA-OAEP"){let H=E.keyEncryptionAlgorithm.algorithmParams,I=new Zb({schema:H});if(C.hash=n.getAlgorithmByOID(I.hashAlgorithm.algorithmId),!("name"in C.hash))throw new Error(`Incorrect OID for hash algorithm: ${I.hashAlgorithm.algorithmId}`)}let _,b=n;mt.isBufferSource(s.recipientPrivateKey)?_=await n.importKey("pkcs8",s.recipientPrivateKey,C,!0,["decrypt"]):(_=s.recipientPrivateKey,"crypto"in s&&s.crypto&&(b=s.crypto.subtle));let A=await b.decrypt(_.algorithm,_,E.encryptedKey.valueBlock.valueHexView),T=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId,R=n.getAlgorithmByOID(T,!0,"contentEncryptionAlgorithm");if(!("name"in R))throw new Error(`Incorrect "contentEncryptionAlgorithm": ${T}`);return n.importKey("raw",A,R,!0,["decrypt"])},"SubKeyTransRecipientInfo"),u=o(async S=>{let E=this.recipientInfos[S].value;if(!s.preDefinedData)throw new Error('Parameter "preDefinedData" is mandatory for "KEKRecipientInfo"');let C=n.getAlgorithmByOID(E.keyEncryptionAlgorithm.algorithmId,!0,"kekAlgorithm"),_=await n.importKey("raw",s.preDefinedData,C,!0,["unwrapKey"]),b=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId,A=n.getAlgorithmByOID(b,!0,"contentEncryptionAlgorithm");if(!A.name)throw new Error(`Incorrect "contentEncryptionAlgorithm": ${b}`);return n.unwrapKey("raw",E.encryptedKey.valueBlock.valueHexView,_,C,A,!0,["decrypt"])},"SubKEKRecipientInfo"),c=o(async S=>{let E=this.recipientInfos[S].value,C;if(!s.preDefinedData)throw new Error('Parameter "preDefinedData" is mandatory for "KEKRecipientInfo"');if(!E.keyDerivationAlgorithm)throw new Error('Please append encoded "keyDerivationAlgorithm"');if(!E.keyDerivationAlgorithm.algorithmParams)throw new Error('Incorrectly encoded "keyDerivationAlgorithm"');try{C=new $m({schema:E.keyDerivationAlgorithm.algorithmParams})}catch{throw new Error('Incorrectly encoded "keyDerivationAlgorithm"')}let _=await n.importKey("raw",s.preDefinedData,"PBKDF2",!1,["deriveKey"]),b=n.getAlgorithmByOID(E.keyEncryptionAlgorithm.algorithmId,!0,"keyEncryptionAlgorithm"),A=C.prf?n.getAlgorithmByOID(C.prf.algorithmId,!0,"prfAlgorithm").hash.name:"SHA-1",T=new Uint8Array(C.salt.valueBlock.valueHex),R=C.iterationCount,H=await n.deriveKey({name:"PBKDF2",hash:{name:A},salt:T,iterations:R},_,b,!0,["unwrapKey"]),I=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId,$=n.getAlgorithmByOID(I,!0,"contentEncryptionAlgorithm");return n.unwrapKey("raw",E.encryptedKey.valueBlock.valueHexView,H,b,$,!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)}};XD.CLASS_NAME="EnvelopedData";var od="safeContents",gv="parsedValue",HF="contentInfos",WD=class eA extends De{static{o(this,"AuthenticatedSafe")}constructor(e={}){super(),this.safeContents=O(e,od,eA.defaultValues(od)),gv in e&&(this.parsedValue=O(e,gv,eA.defaultValues(gv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case od:return[];case gv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case od:return t.length===0;case gv:return t instanceof Object&&Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new _t({name:t.contentInfos||V,value:Qr.schema()})]})}fromSchema(e){Oe(e,[HF]);let t=_e(e,e,eA.schema({names:{contentInfos:HF}}));Ce.assertSchema(t,this.className),this.safeContents=Array.from(t.result.contentInfos,n=>new Qr({schema:n}))}toSchema(){return new J({value:Array.from(this.safeContents,e=>e.toSchema())})}toJSON(){return{safeContents:Array.from(this.safeContents,e=>e.toJSON())}}async parseInternalValues(e,t=Ot(!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 wB:{Ar.assert(s.content,"this.safeContents[j].content",je);let u=s.content.getValue();this.parsedValue.safeContents.push({privacyMode:0,value:Km.fromBER(u)})}break;case n9:{let u=new XD({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 s9:{let u=new Zy({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=Ot(!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 Qr({contentType:"1.2.840.113549.1.7.1",content:new je({valueHex:i})}))}break;case 1:{let i=new Zy,a=e.safeContents[n];a.contentToEncrypt=s.value.toSchema().toBER(!1),await i.encrypt(a,t),this.safeContents.push(new Qr({contentType:"1.2.840.113549.1.7.6",content:i.toSchema()}))}break;case 2:{let i=new XD,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 Qr({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}};WD.CLASS_NAME="AuthenticatedSafe";var Zf="hashAlgorithm",cm="issuerNameHash",lm="issuerKeyHash",eh="serialNumber",jfe=[Zf,cm,lm,eh],ci=class rl extends De{static{o(this,"CertID")}static async create(e,t,n=Ot(!0)){let s=new rl;return await s.createForCertificate(e,t,n),s}constructor(e={}){super(),this.hashAlgorithm=O(e,Zf,rl.defaultValues(Zf)),this.issuerNameHash=O(e,cm,rl.defaultValues(cm)),this.issuerKeyHash=O(e,lm,rl.defaultValues(lm)),this.serialNumber=O(e,eh,rl.defaultValues(eh)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Zf:return new ye;case cm:case lm:return new je;case eh:return new ve;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Zf:return t.algorithmId===V&&!("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=O(e,"names",{});return new J({name:t.blockName||V,value:[ye.schema(t.hashAlgorithmObject||{names:{blockName:t.hashAlgorithm||V}}),new je({name:t.issuerNameHash||V}),new je({name:t.issuerKeyHash||V}),new ve({name:t.serialNumber||V})]})}fromSchema(e){Oe(e,jfe);let t=_e(e,e,rl.schema({names:{hashAlgorithm:Zf,issuerNameHash:cm,issuerKeyHash:lm,serialNumber:eh}}));Ce.assertSchema(t,this.className),this.hashAlgorithm=new ye({schema:t.result.hashAlgorithm}),this.issuerNameHash=t.result.issuerNameHash,this.issuerKeyHash=t.result.issuerKeyHash,this.serialNumber=t.result.serialNumber}toSchema(){return new J({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=Ot(!0)){pr.assert(t,Zf,"issuerCertificate");let s=n.getOIDByAlgorithm({name:t.hashAlgorithm},!0,"hashAlgorithm");this.hashAlgorithm=new ye({algorithmId:s,algorithmParams:new zr});let i=t.issuerCertificate;this.serialNumber=e.serialNumber;let a=await n.digest({name:t.hashAlgorithm},i.subject.toSchema().toBER(!1));this.issuerNameHash=new je({valueHex:a});let u=i.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView,c=await n.digest({name:t.hashAlgorithm},u);this.issuerKeyHash=new je({valueHex:c})}};ci.CLASS_NAME="CertID";var fm="certID",hm="certStatus",pm="thisUpdate",nl="nextUpdate",th="singleExtensions",Mfe=[fm,hm,pm,nl,th],zD=class sl extends De{static{o(this,"SingleResponse")}constructor(e={}){super(),this.certID=O(e,fm,sl.defaultValues(fm)),this.certStatus=O(e,hm,sl.defaultValues(hm)),this.thisUpdate=O(e,pm,sl.defaultValues(pm)),nl in e&&(this.nextUpdate=O(e,nl,sl.defaultValues(nl))),th in e&&(this.singleExtensions=O(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=O(e,"names",{});return new J({name:t.blockName||V,value:[ci.schema(t.certID||{}),new Vr({value:[new vt({name:t.certStatus||V,idBlock:{tagClass:3,tagNumber:0}}),new ue({name:t.certStatus||V,idBlock:{tagClass:3,tagNumber:1},value:[new Lr,new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new pc]})]}),new vt({name:t.certStatus||V,idBlock:{tagClass:3,tagNumber:2},lenBlock:{length:1}})]}),new Lr({name:t.thisUpdate||V}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Lr({name:t.nextUpdate||V})]}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[Nn.schema(t.singleExtensions||{})]})]})}fromSchema(e){Oe(e,Mfe);let t=_e(e,e,sl.schema({names:{certID:{names:{blockName:fm}},certStatus:hm,thisUpdate:pm,nextUpdate:nl,singleExtensions:{names:{blockName:th}}}}));Ce.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 Lr({valueDate:this.thisUpdate})),this.nextUpdate&&e.push(new ue({idBlock:{tagClass:3,tagNumber:0},value:[new Lr({valueDate:this.nextUpdate})]})),this.singleExtensions&&e.push(new ue({idBlock:{tagClass:3,tagNumber:1},value:[new J({value:Array.from(this.singleExtensions,t=>t.toSchema())})]})),new J({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}};zD.CLASS_NAME="SingleResponse";var ub="tbs",rh="version",xy="responderID",wy="producedAt",Sy="responses",dm="responseExtensions",Th="ResponseData",tA=`${Th}.${rh}`,mm=`${Th}.${xy}`,JD=`${Th}.${wy}`,YD=`${Th}.${Sy}`,rA=`${Th}.${dm}`,Ffe=[Th,tA,mm,JD,YD,rA],tu=class so extends De{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(O(e,ub,so.defaultValues(ub))),rh in e&&(this.version=O(e,rh,so.defaultValues(rh))),this.responderID=O(e,xy,so.defaultValues(xy)),this.producedAt=O(e,wy,so.defaultValues(wy)),this.responses=O(e,Sy,so.defaultValues(Sy)),dm in e&&(this.responseExtensions=O(e,dm,so.defaultValues(dm))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case rh:return 0;case ub:return sn;case xy:return{};case wy:return new Date(0,0,0);case Sy:case dm:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case ub:return t.byteLength===0;case xy:return Object.keys(t).length===0;case wy:return t===so.defaultValues(e);case Sy:case dm:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||Th,value:[new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new ve({name:t.version||tA})]}),new Vr({value:[new ue({name:t.responderID||mm,idBlock:{tagClass:3,tagNumber:1},value:[Ur.schema(t.ResponseDataByName||{names:{blockName:"ResponseData.byName"}})]}),new ue({name:t.responderID||mm,idBlock:{tagClass:3,tagNumber:2},value:[new je({name:t.ResponseDataByKey||"ResponseData.byKey"})]})]}),new Lr({name:t.producedAt||JD}),new J({value:[new _t({name:YD,value:zD.schema(t.response||{})})]}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[Nn.schema(t.extensions||{names:{blockName:rA}})]})]})}fromSchema(e){Oe(e,Ffe);let t=_e(e,e,so.schema());Ce.assertSchema(t,this.className),this.tbsView=t.result.ResponseData.valueBeforeDecodeView,tA in t.result&&(this.version=t.result[tA].valueBlock.valueDec),t.result[mm].idBlock.tagNumber===1?this.responderID=new Ur({schema:t.result[mm].valueBlock.value[0]}):this.responderID=t.result[mm].valueBlock.value[0],this.producedAt=t.result[JD].toDate(),this.responses=Array.from(t.result[YD],n=>new zD({schema:n})),rA in t.result&&(this.responseExtensions=Array.from(t.result[rA].valueBlock.value,n=>new Ki({schema:n})))}toSchema(e=!1){let t;if(e===!1){if(!this.tbsView.byteLength)return so.schema();let n=Wr(this.tbsView);Ce.assert(n,"TBS Response Data"),t=n.result}else{let n=[];rh in this&&n.push(new ue({idBlock:{tagClass:3,tagNumber:0},value:[new ve({value:this.version})]})),this.responderID instanceof Ur?n.push(new ue({idBlock:{tagClass:3,tagNumber:1},value:[this.responderID.toSchema()]})):n.push(new ue({idBlock:{tagClass:3,tagNumber:2},value:[this.responderID]})),n.push(new Lr({valueDate:this.producedAt})),n.push(new J({value:Array.from(this.responses,s=>s.toSchema())})),this.responseExtensions&&n.push(new ue({idBlock:{tagClass:3,tagNumber:1},value:[new J({value:Array.from(this.responseExtensions,s=>s.toSchema())})]})),t=new J({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}};tu.CLASS_NAME="ResponseData";var Q_="trustedCerts",Z_="certs",eD="crls",tD="ocsps",rD="checkDate",nD="findOrigin",sD="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 D9 extends Error{static{o(this,"ChainValidationError")}constructor(e,t){super(t),this.name=D9.NAME,this.code=e,this.message=t}};gm.NAME="ChainValidationError";function qfe(r,e){for(let t=0;t<e.length;t++)if(mt.isEqual(r.tbsView,e[t].tbsView))return!0;return!1}o(qfe,"isTrusted");var B9=class R9{static{o(this,"CertificateChainValidationEngine")}constructor(e={}){this.trustedCerts=O(e,Q_,this.defaultValues(Q_)),this.certs=O(e,Z_,this.defaultValues(Z_)),this.crls=O(e,eD,this.defaultValues(eD)),this.ocsps=O(e,tD,this.defaultValues(tD)),this.checkDate=O(e,rD,this.defaultValues(rD)),this.findOrigin=O(e,nD,this.defaultValues(nD)),this.findIssuer=O(e,sD,this.defaultValues(sD))}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=Ot(!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===yB&&f.parsedValue instanceof EB){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===Kce&&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 Q_:return[];case Z_:return[];case eD:return[];case tD:return[];case rD:return new Date;case nD:return R9.defaultFindOrigin;case sD:return this.defaultFindIssuer;default:throw new Error(`Invalid member name for CertificateChainValidationEngine class: ${e}`)}}async sort(e=!1,t=Ot(!0)){let n=[],s=o(async(v,S)=>{let E=[];function C(b){let A=!0;for(let T=0;T<b.length;T++){for(let R=0;R<b.length;R++)if(R!==T&&b[T]===b[R]){A=!1;break}if(!A)break}return A}if(o(C,"checkUnique"),qfe(v,this.trustedCerts))return[[v]];let _=await this.findIssuer(v,this,S);if(_.length===0)throw new Error("No valid certificate paths found");for(let b=0;b<_.length;b++){if(mt.isEqual(_[b].tbsView,v.tbsView)){E.push([_[b]]);continue}let A=await s(_[b],S);for(let T=0;T<A.length;T++){let R=A[T].slice();R.splice(0,0,_[b]),C(R)?E.push(R):E.push(A[T])}}return E},"buildPath"),i=o(async v=>{let S=[],E=[],C=[];if(S.push(...n.filter(_=>v.issuer.isEqual(_.subject))),S.length===0)return{status:1,statusMessage:"No certificate's issuers"};if(E.push(...this.crls.filter(_=>_.issuer.isEqual(v.issuer))),E.length===0)return{status:2,statusMessage:"No CRLs for specific certificate issuer"};for(let _=0;_<E.length;_++){let b=E[_];if(!(b.nextUpdate&&b.nextUpdate.value<this.checkDate))for(let A=0;A<S.length;A++)try{if(await E[_].verify({issuerCertificate:S[A]},t)){C.push({crl:E[_],certificate:S[A]});break}}catch{}}return C.length?{status:0,statusMessage:V,result:C}:{status:3,statusMessage:"No valid CRLs found"}},"findCRL"),a=o(async(v,S)=>{let E=t.getAlgorithmByOID(v.signatureAlgorithm.algorithmId);if(!E.name||!E.hash)return 1;for(let C=0;C<this.ocsps.length;C++){let b=await this.ocsps[C].getCertificateStatus(v,S,t);if(b.isForCertificate)return b.status===0?0:1}return 2},"findOCSP");async function u(v,S=!1){let E=!1,C=!1,_=!1,b=!1;if(v.extensions){for(let A=0;A<v.extensions.length;A++){let T=v.extensions[A];if(T.critical&&!T.parsedValue)return{result:!1,resultCode:6,resultMessage:`Unable to parse critical certificate extension: ${T.extnID}`};if(T.extnID===$ce){_=!0;let R=new Uint8Array(T.parsedValue.valueBlock.valueHex);(R[0]&4)===4&&(C=!0),(R[0]&2)===2&&(b=!0)}T.extnID===gB&&"cA"in T.parsedValue&&T.parsedValue.cA===!0&&(E=!0)}if(C===!0&&E===!1)return{result:!1,resultCode:3,resultMessage:'Unable to build certificate chain - using "keyCertSign" flag set without BasicConstraints'};if(_===!0&&E===!0&&C===!1)return{result:!1,resultCode:4,resultMessage:'Unable to build certificate chain - "keyCertSign" flag was not set'};if(E===!0&&_===!0&&S&&b===!1)return{result:!1,resultCode:5,resultMessage:'Unable to build certificate chain - intermediate certificate must have "cRLSign" key usage flag'}}return E===!1?{result:!1,resultCode:7,resultMessage:"Unable to build certificate chain - more than one possible end-user certificate"}:{result:!0,resultCode:0,resultMessage:V}}o(u,"checkForCA");let c=o(async(v,S)=>{for(let E=0;E<v.length;E++)if(v[E].notBefore.value>S||v[E].notAfter.value<S)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 E=v.length-2;E>=0;E--)if(v[E].issuer.isEqual(v[E].subject)===!1&&v[E].issuer.isEqual(v[E+1].subject)===!1)return{result:!1,resultCode:10,resultMessage:"Incorrect name chaining"};if(this.crls.length!==0||this.ocsps.length!==0)for(let E=0;E<v.length-1;E++){let C=2,_={status:0,statusMessage:V};if(this.ocsps.length!==0)switch(C=await a(v[E],v[E+1]),C){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(_=await i(v[E]),_.status===0&&_.result)for(let b=0;b<_.result.length;b++){if(_.result[b].crl.isCertificateRevoked(v[E]))return{result:!1,resultCode:12,resultMessage:"One of certificates had been revoked"};if((await u(_.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: ${_.statusMessage}`)}else if(C===2)return{result:!1,resultCode:11,resultMessage:"No revocation values found for one of certificates"};if(C===2&&_.status===2&&e){let b=v[E+1],A=!1;if(b.extensions)for(let T of b.extensions)switch(T.extnID){case QF:case vB:case xB:A=!0;break}if(A)throw new gm(yh.noRevocation,`No revocation values found for one of certificates: ${_.statusMessage}`)}}for(let[E,C]of v.entries()){if(!E)continue;if(!(await u(C)).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 S=0;S<n.length;S++)if(v!==S&&mt.isEqual(n[v].tbsView,n[S].tbsView)){n.splice(S,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 S=!1;for(let E=0;E<h[v].length;E++){let C=h[v][E];for(let _=0;_<this.trustedCerts.length;_++)if(mt.isEqual(C.tbsView,this.trustedCerts[_].tbsView)){S=!0;break}if(S)break}S||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=Ot(!0)){function n(c,f){let h=hl(c),m=hl(f),g=h.split("."),x=m.split("."),v=g.length,S=x.length;if(v===0||S===0||v<S)return!1;for(let E=0;E<v;E++)if(g[E].length===0)return!1;for(let E=0;E<S;E++)if(x[E].length===0){if(E===0){if(S===1)return!1;continue}return!1}for(let E=0;E<S;E++)if(x[S-1-E].length!==0&&g[v-1-E].localeCompare(x[S-1-E])!==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 S=g[1].split("."),E=x[0].split(".");return E[0].length===0?!0:S.length===E.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 S=0;S<g.length;S++)if(g[S].length>0&&g[S].charAt(g[S].length-1)!==":"){h=g[S].split(":")[0];break}}if(n(h,m)){let S=h.split("."),E=m.split(".");return E[0].length===0?!0:S.length===E.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||[],S=e.initialRequiredNameForms||[],E=h,C=m,_=g,b=[!1,!1,!1],A=0,T=0,R=0,H=x,I=v,$=S,K=1;this.certs=await this.sort(c,t);let F=[];F.push(Mi);let z=[],he=new Array(this.certs.length-1);for(let de=0;de<this.certs.length-1;de++)he[de]=!0;z.push(he);let pe=new Array(this.certs.length-1),oe=new Array(this.certs.length-1),Q=E?this.certs.length-1:-1;for(let de=this.certs.length-2;de>=0;de--,K++){let fe=this.certs[de];if(fe.extensions){for(let Re=0;Re<fe.extensions.length;Re++){let $e=fe.extensions[Re];if($e.extnID===ZF){oe[de]=$e.parsedValue;for(let Ge=0;Ge<F.length;Ge++)if(F[Ge]===Mi){delete z[Ge][de];break}for(let Ge=0;Ge<$e.parsedValue.certificatePolicies.length;Ge++){let ft=-1,N=$e.parsedValue.certificatePolicies[Ge].policyIdentifier;for(let w=0;w<F.length;w++)if(N===F[w]){ft=w;break}if(ft===-1){F.push(N);let w=new Array(this.certs.length-1);w[de]=!0,z.push(w)}else z[ft][de]=!0}}if($e.extnID===e9){if(C)return{result:!1,resultCode:98,resultMessage:"Policy mapping prohibited"};pe[de]=$e.parsedValue}$e.extnID===t9&&E===!1&&($e.parsedValue.requireExplicitPolicy===0?(E=!0,Q=de):b[0]===!1?(b[0]=!0,A=$e.parsedValue.requireExplicitPolicy):A=A>$e.parsedValue.requireExplicitPolicy?$e.parsedValue.requireExplicitPolicy:A,$e.parsedValue.inhibitPolicyMapping===0?C=!0:b[1]===!1?(b[1]=!0,T=$e.parsedValue.inhibitPolicyMapping+1):T=T>$e.parsedValue.inhibitPolicyMapping+1?$e.parsedValue.inhibitPolicyMapping+1:T),$e.extnID===Zce&&_===!1&&($e.parsedValue.valueBlock.valueDec===0?_=!0:b[2]===!1?(b[2]=!0,R=$e.parsedValue.valueBlock.valueDec):R=R>$e.parsedValue.valueBlock.valueDec?$e.parsedValue.valueBlock.valueDec:R)}if(_===!0){let Re=-1;for(let $e=0;$e<F.length;$e++)if(F[$e]===Mi){Re=$e;break}Re!==-1&&delete z[0][de]}E===!1&&b[0]===!0&&(A--,A===0&&(E=!0,Q=de,b[0]=!1)),C===!1&&b[1]===!0&&(T--,T===0&&(C=!0,b[1]=!1)),_===!1&&b[2]===!0&&(R--,R===0&&(_=!0,b[2]=!1))}}for(let de=0;de<this.certs.length-1;de++)if(de<this.certs.length-2&&typeof pe[de+1]<"u")for(let fe=0;fe<pe[de+1].mappings.length;fe++){if(pe[de+1].mappings[fe].issuerDomainPolicy===Mi||pe[de+1].mappings[fe].subjectDomainPolicy===Mi)return{result:!1,resultCode:99,resultMessage:'The "anyPolicy" should not be a part of policy mapping scheme'};let Re=-1,$e=-1;for(let Ge=0;Ge<F.length;Ge++)F[Ge]===pe[de+1].mappings[fe].issuerDomainPolicy&&(Re=Ge),F[Ge]===pe[de+1].mappings[fe].subjectDomainPolicy&&($e=Ge);typeof z[Re][de]<"u"&&delete z[Re][de];for(let Ge=0;Ge<oe[de].certificatePolicies.length;Ge++)if(pe[de+1].mappings[fe].subjectDomainPolicy===oe[de].certificatePolicies[Ge].policyIdentifier&&Re!==-1&&$e!==-1)for(let ft=0;ft<=de;ft++)typeof z[$e][ft]<"u"&&(z[Re][ft]=!0,delete z[$e][ft])}for(let de=0;de<F.length;de++)if(F[de]===Mi)for(let fe=0;fe<Q;fe++)delete z[de][fe];let xe=[];for(let de=0;de<z.length;de++){let fe=!0;for(let Re=0;Re<this.certs.length-1;Re++){let $e=!1;if(Re<Q&&F[de]===Mi&&F.length>1){fe=!1;break}if(typeof z[de][Re]>"u"){if(Re>=Q){for(let Ge=0;Ge<F.length;Ge++)if(F[Ge]===Mi){z[Ge][Re]===!0&&($e=!0);break}}if(!$e){fe=!1;break}}}fe===!0&&xe.push(F[de])}let Me=[];if(f.length===1&&f[0]===Mi&&E===!1)Me=f;else if(xe.length===1&&xe[0]===Mi)Me=f;else for(let de=0;de<xe.length;de++)for(let fe=0;fe<f.length;fe++)if(f[fe]===xe[de]||f[fe]===Mi){Me.push(xe[de]);break}let Qe={result:Me.length>0,resultCode:0,resultMessage:Me.length>0?V:'Zero "userConstrPolicies" array, no intersections with "authConstrPolicies"',authConstrPolicies:xe,userConstrPolicies:Me,explicitPolicyIndicator:E,policyMappings:pe,certificatePath:this.certs};if(Me.length===0||Qe.result===!1)return Qe;K=1;for(let de=this.certs.length-2;de>=0;de--,K++){let fe=this.certs[de],Re=[],$e=[],Ge=[];if(fe.extensions)for(let X=0;X<fe.extensions.length;X++){let P=fe.extensions[X];P.extnID===YF&&("permittedSubtrees"in P.parsedValue&&($e=$e.concat(P.parsedValue.permittedSubtrees)),"excludedSubtrees"in P.parsedValue&&(Ge=Ge.concat(P.parsedValue.excludedSubtrees))),P.extnID===XF&&(Re=Re.concat(P.parsedValue.altNames))}let ft=$.length<=0;for(let X=0;X<$.length;X++)switch($[X].base.type){case 4:{if($[X].base.value.typesAndValues.length!==fe.subject.typesAndValues.length)continue;ft=!0;for(let P=0;P<fe.subject.typesAndValues.length;P++)if(fe.subject.typesAndValues[P].type!==$[X].base.value.typesAndValues[P].type){ft=!1;break}if(ft===!0)break}break;default:}if(ft===!1)throw Qe.result=!1,Qe.resultCode=21,Qe.resultMessage="No necessary name form found",Qe;let N=[[],[],[],[],[]];for(let X=0;X<H.length;X++)switch(H[X].base.type){case 1:N[0].push(H[X]);break;case 2:N[1].push(H[X]);break;case 4:N[2].push(H[X]);break;case 6:N[3].push(H[X]);break;case 7:N[4].push(H[X]);break;default:}for(let X=0;X<5;X++){let P=!1,be=!1,Ee=N[X];for(let Se=0;Se<Ee.length;Se++){switch(X){case 0:if(Re.length>0)for(let ze=0;ze<Re.length;ze++)Re[ze].type===1&&(be=!0,P=P||s(Re[ze].value,Ee[Se].base.value));else for(let ze=0;ze<fe.subject.typesAndValues.length;ze++)(fe.subject.typesAndValues[ze].type==="1.2.840.113549.1.9.1"||fe.subject.typesAndValues[ze].type==="0.9.2342.19200300.100.1.3")&&(be=!0,P=P||s(fe.subject.typesAndValues[ze].value.valueBlock.value,Ee[Se].base.value));break;case 1:if(Re.length>0)for(let ze=0;ze<Re.length;ze++)Re[ze].type===2&&(be=!0,P=P||n(Re[ze].value,Ee[Se].base.value));break;case 2:be=!0,P=u(fe.subject,Ee[Se].base.value);break;case 3:if(Re.length>0)for(let ze=0;ze<Re.length;ze++)Re[ze].type===6&&(be=!0,P=P||i(Re[ze].value,Ee[Se].base.value));break;case 4:if(Re.length>0)for(let ze=0;ze<Re.length;ze++)Re[ze].type===7&&(be=!0,P=P||a(Re[ze].value,Ee[Se].base.value));break;default:}if(P)break}if(P===!1&&Ee.length>0&&be)throw Qe.result=!1,Qe.resultCode=41,Qe.resultMessage='Failed to meet "permitted sub-trees" name constraint',Qe}let w=!1;for(let X=0;X<I.length;X++){switch(I[X].base.type){case 1:if(Re.length>=0)for(let P=0;P<Re.length;P++)Re[P].type===1&&(w=w||s(Re[P].value,I[X].base.value));else for(let P=0;P<fe.subject.typesAndValues.length;P++)(fe.subject.typesAndValues[P].type==="1.2.840.113549.1.9.1"||fe.subject.typesAndValues[P].type==="0.9.2342.19200300.100.1.3")&&(w=w||s(fe.subject.typesAndValues[P].value.valueBlock.value,I[X].base.value));break;case 2:if(Re.length>0)for(let P=0;P<Re.length;P++)Re[P].type===2&&(w=w||n(Re[P].value,I[X].base.value));break;case 4:w=w||u(fe.subject,I[X].base.value);break;case 6:if(Re.length>0)for(let P=0;P<Re.length;P++)Re[P].type===6&&(w=w||i(Re[P].value,I[X].base.value));break;case 7:if(Re.length>0)for(let P=0;P<Re.length;P++)Re[P].type===7&&(w=w||a(Re[P].value,I[X].base.value));break;default:}if(w)break}if(w===!0)throw Qe.result=!1,Qe.resultCode=42,Qe.resultMessage='Failed to meet "excluded sub-trees" name constraint',Qe;H=H.concat($e),I=I.concat(Ge)}return Qe}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}`}}}},nA="tbsResponseData",Ey="signatureAlgorithm",by="signature",vm="certs",ex="BasicOCSPResponse",QD=`${ex}.${nA}`,ZD=`${ex}.${Ey}`,eB=`${ex}.${by}`,sA=`${ex}.${vm}`,Hfe=[QD,ZD,eB,sA],zy=class nh extends De{static{o(this,"BasicOCSPResponse")}constructor(e={}){super(),this.tbsResponseData=O(e,nA,nh.defaultValues(nA)),this.signatureAlgorithm=O(e,Ey,nh.defaultValues(Ey)),this.signature=O(e,by,nh.defaultValues(by)),vm in e&&(this.certs=O(e,vm,nh.defaultValues(vm))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case nA:return new tu;case Ey:return new ye;case by:return new Kt;case vm:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case"type":{let n=tu.compareWithDefault("tbs",t.tbs)&&tu.compareWithDefault("responderID",t.responderID)&&tu.compareWithDefault("producedAt",t.producedAt)&&tu.compareWithDefault("responses",t.responses);return"responseExtensions"in t&&(n=n&&tu.compareWithDefault("responseExtensions",t.responseExtensions)),n}case Ey:return t.algorithmId===V&&!("algorithmParams"in t);case by:return t.isEqual(nh.defaultValues(e));case vm:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||ex,value:[tu.schema(t.tbsResponseData||{names:{blockName:QD}}),ye.schema(t.signatureAlgorithm||{names:{blockName:ZD}}),new Kt({name:t.signature||eB}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new J({value:[new _t({name:sA,value:ls.schema(t.certs||{})})]})]})]})}fromSchema(e){Oe(e,Hfe);let t=_e(e,e,nh.schema());Ce.assertSchema(t,this.className),this.tbsResponseData=new tu({schema:t.result[QD]}),this.signatureAlgorithm=new ye({schema:t.result[ZD]}),this.signature=t.result[eB],sA in t.result&&(this.certs=Array.from(t.result[sA],n=>new ls({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 ue({idBlock:{tagClass:3,tagNumber:0},value:[new J({value:Array.from(this.certs,t=>t.toSchema())})]})),new J({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=Ot(!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=Ot(!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 Kt({valueHex:a})}async verify(e={},t=Ot(!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 Ur:for(let[f,h]of this.certs.entries())if(h.subject.isEqual(this.tbsResponseData.responderID)){s=f;break}break;case this.tbsResponseData.responderID instanceof je: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 E9(f,n);h&&a.push(h)}if(!(await new B9({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)}};zy.CLASS_NAME="BasicOCSPResponse";var iD="tbs",aD="version",oD="subject",uD="subjectPublicKeyInfo",ud="attributes",Ay="signatureAlgorithm",Cy="signatureValue",zm="CertificationRequestInfo",BB=`${zm}.version`,RB=`${zm}.subject`,OB=`${zm}.subjectPublicKeyInfo`,KA=`${zm}.attributes`,Kfe=[zm,BB,RB,OB,KA,Ay,Cy];function $fe(r={}){let e=O(r,"names",{});return new J({name:e.CertificationRequestInfo||zm,value:[new ve({name:e.CertificationRequestInfoVersion||BB}),Ur.schema(e.subject||{names:{blockName:RB}}),ya.schema({names:{blockName:OB}}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new _t({optional:!0,name:e.CertificationRequestInfoAttributes||KA,value:an.schema(e.attributes||{})})]})]})}o($fe,"CertificationRequestInfo");var Gfe=class io extends De{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(O(e,iD,io.defaultValues(iD))),this.version=O(e,aD,io.defaultValues(aD)),this.subject=O(e,oD,io.defaultValues(oD)),this.subjectPublicKeyInfo=O(e,uD,io.defaultValues(uD)),ud in e&&(this.attributes=O(e,ud,io.defaultValues(ud))),this.signatureAlgorithm=O(e,Ay,io.defaultValues(Ay)),this.signatureValue=O(e,Cy,io.defaultValues(Cy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case iD:return sn;case aD:return 0;case oD:return new Ur;case uD:return new ya;case ud:return[];case Ay:return new ye;case Cy:return new Kt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({value:[$fe(t.certificationRequestInfo||{}),new J({name:t.signatureAlgorithm||Ay,value:[new st,new St({optional:!0})]}),new Kt({name:t.signatureValue||Cy})]})}fromSchema(e){Oe(e,Kfe);let t=_e(e,e,io.schema());Ce.assertSchema(t,this.className),this.tbsView=t.result.CertificationRequestInfo.valueBeforeDecodeView,this.version=t.result[BB].valueBlock.valueDec,this.subject=new Ur({schema:t.result[RB]}),this.subjectPublicKeyInfo=new ya({schema:t.result[OB]}),KA in t.result&&(this.attributes=Array.from(t.result[KA],n=>new an({schema:n}))),this.signatureAlgorithm=new ye({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}encodeTBS(){let e=[new ve({value:this.version}),this.subject.toSchema(),this.subjectPublicKeyInfo.toSchema()];return ud in this&&e.push(new ue({idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.attributes||[],t=>t.toSchema())})),new J({value:e})}toSchema(e=!1){let t;if(e===!1){if(this.tbsView.byteLength===0)return io.schema();let n=Wr(this.tbsView);Ce.assert(n,"PKCS#10 Certificate Request"),t=n.result}else t=this.encodeTBS();return new J({value:[t,this.signatureAlgorithm.toSchema(),this.signatureValue]})}toJSON(){let e={tbs:At.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=Ot(!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 Kt({valueHex:a})}async verify(e=Ot(!0)){return e.verifyWithPublicKey(this.tbsView,this.signatureValue,this.subjectPublicKeyInfo,this.signatureAlgorithm)}async getPublicKey(e,t=Ot(!0)){return t.getPublicKey(this.subjectPublicKeyInfo,this.signatureAlgorithm,e)}};Gfe.CLASS_NAME="CertificationRequest";var sh="digestAlgorithm",ih="digest",Xfe=[sh,ih],xh=class Ny extends De{static{o(this,"DigestInfo")}constructor(e={}){super(),this.digestAlgorithm=O(e,sh,Ny.defaultValues(sh)),this.digest=O(e,ih,Ny.defaultValues(ih)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case sh:return new ye;case ih:return new je;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case sh:return ye.compareWithDefault("algorithmId",t.algorithmId)&&!("algorithmParams"in t);case ih:return t.isEqual(Ny.defaultValues(e));default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[ye.schema(t.digestAlgorithm||{names:{blockName:sh}}),new je({name:t.digest||ih})]})}fromSchema(e){Oe(e,Xfe);let t=_e(e,e,Ny.schema({names:{digestAlgorithm:{names:{blockName:sh}},digest:ih}}));Ce.assertSchema(t,this.className),this.digestAlgorithm=new ye({schema:t.result.digestAlgorithm}),this.digest=t.result.digest}toSchema(){return new J({value:[this.digestAlgorithm.toSchema(),this.digest]})}toJSON(){return{digestAlgorithm:this.digestAlgorithm.toJSON(),digest:this.digest.toJSON()}}};xh.CLASS_NAME="DigestInfo";var ym="eContentType",ma="eContent",Wfe=[ym,ma],wh=class ah extends De{static{o(this,"EncapsulatedContentInfo")}constructor(e={}){if(super(),this.eContentType=O(e,ym,ah.defaultValues(ym)),ma in e&&(this.eContent=O(e,ma,ah.defaultValues(ma)),this.eContent.idBlock.tagClass===1&&this.eContent.idBlock.tagNumber===4&&this.eContent.idBlock.isConstructed===!1)){let t=new je({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 je({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 V;case ma:return new je;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case ym:return t===V;case ma:return t.idBlock.tagClass===1&&t.idBlock.tagNumber===4?t.isEqual(ah.defaultValues(ma)):!1;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new st({name:t.eContentType||V}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new St({name:t.eContent||V})]})]})}fromSchema(e){Oe(e,Wfe);let t=_e(e,e,ah.schema({names:{eContentType:ym,eContent:ma}}));Ce.assertSchema(t,this.className),this.eContentType=t.result.eContentType.valueBlock.toString(),ma in t.result&&(this.eContent=t.result.eContent)}toSchema(){let e=[];return e.push(new st({value:this.eContentType})),this.eContent&&ah.compareWithDefault(ma,this.eContent)===!1&&e.push(new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[this.eContent]})),new J({value:e})}toJSON(){let e={eContentType:this.eContentType};return this.eContent&&ah.compareWithDefault(ma,this.eContent)===!1&&(e.eContent=this.eContent.toJSON()),e}};wh.CLASS_NAME="EncapsulatedContentInfo";var oh="mac",uh="macSalt",ru="iterations",zfe=[oh,uh,ru],il=class ch extends De{static{o(this,"MacData")}constructor(e={}){super(),this.mac=O(e,oh,ch.defaultValues(oh)),this.macSalt=O(e,uh,ch.defaultValues(uh)),ru in e&&(this.iterations=O(e,ru,ch.defaultValues(ru))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case oh:return new xh;case uh:return new je;case ru: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 ru:return t===ch.defaultValues(e);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,optional:t.optional||!0,value:[xh.schema(t.mac||{names:{blockName:oh}}),new je({name:t.macSalt||uh}),new ve({optional:!0,name:t.iterations||ru})]})}fromSchema(e){Oe(e,zfe);let t=_e(e,e,ch.schema({names:{mac:{names:{blockName:oh}},macSalt:uh,iterations:ru}}));Ce.assertSchema(t,this.className),this.mac=new xh({schema:t.result.mac}),this.macSalt=t.result.macSalt,ru 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 ve({value:this.iterations})),new J({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",Eh="hashedMessage",Jfe=[Sh,Eh],va=class xm extends De{static{o(this,"MessageImprint")}static async create(e,t,n=Ot(!0)){let s=n.getOIDByAlgorithm({name:e},!0,"hashAlgorithm"),i=await n.digest(e,t);return new xm({hashAlgorithm:new ye({algorithmId:s,algorithmParams:new zr}),hashedMessage:new je({valueHex:i})})}constructor(e={}){super(),this.hashAlgorithm=O(e,Sh,xm.defaultValues(Sh)),this.hashedMessage=O(e,Eh,xm.defaultValues(Eh)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Sh:return new ye;case Eh:return new je;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Sh:return t.algorithmId===V&&!("algorithmParams"in t);case Eh:return t.isEqual(xm.defaultValues(e))===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[ye.schema(t.hashAlgorithm||{}),new je({name:t.hashedMessage||V})]})}fromSchema(e){Oe(e,Jfe);let t=_e(e,e,xm.schema({names:{hashAlgorithm:{names:{blockName:Sh}},hashedMessage:Eh}}));Ce.assertSchema(t,this.className),this.hashAlgorithm=new ye({schema:t.result.hashAlgorithm}),this.hashedMessage=t.result.hashedMessage}toSchema(){return new J({value:[this.hashAlgorithm.toSchema(),this.hashedMessage]})}toJSON(){return{hashAlgorithm:this.hashAlgorithm.toJSON(),hashedMessage:this.hashedMessage.toJSON()}}};va.CLASS_NAME="MessageImprint";var wm="reqCert",al="singleRequestExtensions",Yfe=[wm,al],$A=class Ty extends De{static{o(this,"Request")}constructor(e={}){super(),this.reqCert=O(e,wm,Ty.defaultValues(wm)),al in e&&(this.singleRequestExtensions=O(e,al,Ty.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(Ty.defaultValues(e));case al:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[ci.schema(t.reqCert||{}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[Nn.schema(t.extensions||{names:{blockName:t.singleRequestExtensions||V}})]})]})}fromSchema(e){Oe(e,Yfe);let t=_e(e,e,Ty.schema({names:{reqCert:{names:{blockName:wm}},extensions:{names:{blockName:al}}}}));Ce.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 ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new J({value:Array.from(this.singleRequestExtensions,t=>t.toSchema())})]})),new J({value:e})}toJSON(){let e={reqCert:this.reqCert.toJSON()};return this.singleRequestExtensions&&(e.singleRequestExtensions=Array.from(this.singleRequestExtensions,t=>t.toJSON())),e}};$A.CLASS_NAME="Request";var cb="tbs",Sm="version",Em="requestorName",lb="requestList",bm="requestExtensions",Jm="TBSRequest",iA=`${Jm}.${Sm}`,aA=`${Jm}.${Em}`,tB=`${Jm}.requests`,oA=`${Jm}.${bm}`,Qfe=[Jm,iA,aA,tB,oA],nu=class su extends De{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(O(e,cb,su.defaultValues(cb))),Sm in e&&(this.version=O(e,Sm,su.defaultValues(Sm))),Em in e&&(this.requestorName=O(e,Em,su.defaultValues(Em))),this.requestList=O(e,lb,su.defaultValues(lb)),bm in e&&(this.requestExtensions=O(e,bm,su.defaultValues(bm))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case cb:return sn;case Sm:return 0;case Em:return new Cr;case lb:case bm:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case cb:return t.byteLength===0;case Sm:return t===su.defaultValues(e);case Em:return t.type===Cr.defaultValues("type")&&Object.keys(t.value).length===0;case lb:case bm:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||Jm,value:[new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new ve({name:t.TBSRequestVersion||iA})]}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[Cr.schema(t.requestorName||{names:{blockName:aA}})]}),new J({name:t.requestList||"TBSRequest.requestList",value:[new _t({name:t.requests||tB,value:$A.schema(t.requestNames||{})})]}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:2},value:[Nn.schema(t.extensions||{names:{blockName:t.requestExtensions||oA}})]})]})}fromSchema(e){Oe(e,Qfe);let t=_e(e,e,su.schema());Ce.assertSchema(t,this.className),this.tbsView=t.result.TBSRequest.valueBeforeDecodeView,iA in t.result&&(this.version=t.result[iA].valueBlock.valueDec),aA in t.result&&(this.requestorName=new Cr({schema:t.result[aA]})),this.requestList=Array.from(t.result[tB],n=>new $A({schema:n})),oA in t.result&&(this.requestExtensions=Array.from(t.result[oA].valueBlock.value,n=>new Ki({schema:n})))}toSchema(e=!1){let t;if(e===!1){if(this.tbsView.byteLength===0)return su.schema();let n=Wr(this.tbsView);if(Ce.assert(n,"TBS Request"),!(n.result instanceof J))throw new Error("ASN.1 result should be SEQUENCE");t=n.result}else{let n=[];this.version!==void 0&&n.push(new ue({idBlock:{tagClass:3,tagNumber:0},value:[new ve({value:this.version})]})),this.requestorName&&n.push(new ue({idBlock:{tagClass:3,tagNumber:1},value:[this.requestorName.toSchema()]})),n.push(new J({value:Array.from(this.requestList,s=>s.toSchema())})),this.requestExtensions&&n.push(new ue({idBlock:{tagClass:3,tagNumber:2},value:[new J({value:Array.from(this.requestExtensions,s=>s.toSchema())})]})),t=new J({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}};nu.CLASS_NAME="TBSRequest";var cd="signatureAlgorithm",ld="signature",wc="certs",lh=class Am extends De{static{o(this,"Signature")}constructor(e={}){super(),this.signatureAlgorithm=O(e,cd,Am.defaultValues(cd)),this.signature=O(e,ld,Am.defaultValues(ld)),wc in e&&(this.certs=O(e,wc,Am.defaultValues(wc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case cd:return new ye;case ld:return new Kt;case wc:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case cd:return t.algorithmId===V&&!("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=O(e,"names",{});return new J({name:t.blockName||V,value:[ye.schema(t.signatureAlgorithm||{}),new Kt({name:t.signature||V}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new J({value:[new _t({name:t.certs||V,value:ls.schema({})})]})]})]})}fromSchema(e){Oe(e,[cd,ld,wc]);let t=_e(e,e,Am.schema({names:{signatureAlgorithm:{names:{blockName:cd}},signature:ld,certs:wc}}));Ce.assertSchema(t,this.className),this.signatureAlgorithm=new ye({schema:t.result.signatureAlgorithm}),this.signature=t.result.signature,wc in t.result&&(this.certs=Array.from(t.result.certs,n=>new ls({schema:n})))}toSchema(){let e=[];return e.push(this.signatureAlgorithm.toSchema()),e.push(this.signature),this.certs&&e.push(new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new J({value:Array.from(this.certs,t=>t.toSchema())})]})),new J({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",Zfe=[Cm,ol],ehe=class uA extends De{static{o(this,"OCSPRequest")}constructor(e={}){super(),this.tbsRequest=O(e,Cm,uA.defaultValues(Cm)),ol in e&&(this.optionalSignature=O(e,ol,uA.defaultValues(ol))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Cm:return new nu;case ol:return new lh;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Cm:return nu.compareWithDefault("tbs",t.tbs)&&nu.compareWithDefault("version",t.version)&&nu.compareWithDefault("requestorName",t.requestorName)&&nu.compareWithDefault("requestList",t.requestList)&&nu.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=O(e,"names",{});return new J({name:t.blockName||"OCSPRequest",value:[nu.schema(t.tbsRequest||{names:{blockName:Cm}}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[lh.schema(t.optionalSignature||{names:{blockName:ol}})]})]})}fromSchema(e){Oe(e,Zfe);let t=_e(e,e,uA.schema());Ce.assertSchema(t,this.className),this.tbsRequest=new nu({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 ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[this.optionalSignature.toSchema()]})),new J({value:t})}toJSON(){let e={tbsRequest:this.tbsRequest.toJSON()};return this.optionalSignature&&(e.optionalSignature=this.optionalSignature.toJSON()),e}async createForCertificate(e,t,n=Ot(!0)){let s=new ci;await s.createForCertificate(e,t,n),this.tbsRequest.requestList.push(new $A({reqCert:s}))}async sign(e,t="SHA-1",n=Ot(!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 Kt({valueHex:u})}verify(){}};ehe.CLASS_NAME="OCSPRequest";var Nm="responseType",Tm="response",the=[Nm,Tm],Im=class Iy extends De{static{o(this,"ResponseBytes")}constructor(e={}){super(),this.responseType=O(e,Nm,Iy.defaultValues(Nm)),this.response=O(e,Tm,Iy.defaultValues(Tm)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Nm:return V;case Tm:return new je;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Nm:return t===V;case Tm:return t.isEqual(Iy.defaultValues(e));default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new st({name:t.responseType||V}),new je({name:t.response||V})]})}fromSchema(e){Oe(e,the);let t=_e(e,e,Iy.schema({names:{responseType:Nm,response:Tm}}));Ce.assertSchema(t,this.className),this.responseType=t.result.responseType.valueBlock.toString(),this.response=t.result.response}toSchema(){return new J({value:[new st({value:this.responseType}),this.response]})}toJSON(){return{responseType:this.responseType,response:this.response.toJSON()}}};Im.CLASS_NAME="ResponseBytes";var fd="responseStatus",Ho="responseBytes",rhe=class _y extends De{static{o(this,"OCSPResponse")}constructor(e={}){super(),this.responseStatus=O(e,fd,_y.defaultValues(fd)),Ho in e&&(this.responseBytes=O(e,Ho,_y.defaultValues(Ho))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case fd:return new pc;case Ho:return new Im;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case fd:return t.isEqual(_y.defaultValues(e));case Ho:return Im.compareWithDefault("responseType",t.responseType)&&Im.compareWithDefault("response",t.response);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||"OCSPResponse",value:[new pc({name:t.responseStatus||fd}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[Im.schema(t.responseBytes||{names:{blockName:Ho}})]})]})}fromSchema(e){Oe(e,[fd,Ho]);let t=_e(e,e,_y.schema());Ce.assertSchema(t,this.className),this.responseStatus=t.result.responseStatus,Ho in t.result&&(this.responseBytes=new Im({schema:t.result.responseBytes}))}toSchema(){let e=[];return e.push(this.responseStatus),this.responseBytes&&e.push(new ue({idBlock:{tagClass:3,tagNumber:0},value:[this.responseBytes.toSchema()]})),new J({value:e})}toJSON(){let e={responseStatus:this.responseStatus.toJSON()};return this.responseBytes&&(e.responseBytes=this.responseBytes.toJSON()),e}async getCertificateStatus(e,t,n=Ot(!0)){let s,i={isForCertificate:!1,status:2};if(!this.responseBytes||this.responseBytes.responseType!==gb)return i;try{let a=Wr(this.responseBytes.response.valueBlock.valueHexView);Ce.assert(a,"Basic OCSP response"),s=new zy({schema:a.result})}catch{return i}return s.getCertificateStatus(e,t,n)}async sign(e,t,n=Ot(!0)){var s;if(this.responseBytes&&this.responseBytes.responseType===gb)return zy.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=Ot(!0)){var n;if(!(Ho in this))throw new Error("Empty ResponseBytes field");if(this.responseBytes&&this.responseBytes.responseType===gb){let s=zy.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"}`)}};rhe.CLASS_NAME="OCSPResponse";var of="type",iu="attributes",fb="encodedValue",nhe=[iu],Xs=class ao extends De{static{o(this,"SignedAndUnsignedAttributes")}constructor(e={}){super(),this.type=O(e,of,ao.defaultValues(of)),this.attributes=O(e,iu,ao.defaultValues(iu)),this.encodedValue=O(e,fb,ao.defaultValues(fb)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case of:return-1;case iu:return[];case fb:return sn;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case of:return t===ao.defaultValues(of);case iu:return t.length===0;case fb:return t.byteLength===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new ue({name:t.blockName||V,optional:!0,idBlock:{tagClass:3,tagNumber:t.tagNumber||0},value:[new _t({name:t.attributes||V,value:an.schema()})]})}fromSchema(e){Oe(e,nhe);let t=_e(e,e,ao.schema({names:{tagNumber:this.type,attributes:iu}}));Ce.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,!(iu in t.result)){if(this.type===0)throw new Error("Wrong structure of SignedUnsignedAttributes");return}this.attributes=Array.from(t.result.attributes,s=>new an({schema:s}))}toSchema(){if(ao.compareWithDefault(of,this.type)||ao.compareWithDefault(iu,this.attributes))throw new Error('Incorrectly initialized "SignedAndUnsignedAttributes" class');return new ue({optional:!0,idBlock:{tagClass:3,tagNumber:this.type},value:Array.from(this.attributes,e=>e.toSchema())})}toJSON(){if(ao.compareWithDefault(of,this.type)||ao.compareWithDefault(iu,this.attributes))throw new Error('Incorrectly initialized "SignedAndUnsignedAttributes" class');return{type:this.type,attributes:Array.from(this.attributes,e=>e.toJSON())}}};Xs.CLASS_NAME="SignedAndUnsignedAttributes";var _m="version",fh="sid",Dm="digestAlgorithm",ul="signedAttrs",Bm="signatureAlgorithm",Dy="signature",cl="unsignedAttrs",ml="SignerInfo",rB=`${ml}.${_m}`,By=`${ml}.${fh}`,nB=`${ml}.${Dm}`,cA=`${ml}.${ul}`,sB=`${ml}.${Bm}`,iB=`${ml}.${Dy}`,lA=`${ml}.${cl}`,she=[rB,By,nB,cA,sB,iB,lA],GA=class Un extends De{static{o(this,"SignerInfo")}constructor(e={}){super(),this.version=O(e,_m,Un.defaultValues(_m)),this.sid=O(e,fh,Un.defaultValues(fh)),this.digestAlgorithm=O(e,Dm,Un.defaultValues(Dm)),ul in e&&(this.signedAttrs=O(e,ul,Un.defaultValues(ul))),this.signatureAlgorithm=O(e,Bm,Un.defaultValues(Bm)),this.signature=O(e,Dy,Un.defaultValues(Dy)),cl in e&&(this.unsignedAttrs=O(e,cl,Un.defaultValues(cl))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case _m:return 0;case fh:return new St;case Dm:return new ye;case ul:return new Xs({type:0});case Bm:return new ye;case Dy:return new je;case cl:return new Xs({type:1});default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case _m:return Un.defaultValues(_m)===t;case fh:return t instanceof St;case Dm:return t instanceof ye?t.isEqual(Un.defaultValues(Dm)):!1;case ul:return Xs.compareWithDefault("type",t.type)&&Xs.compareWithDefault("attributes",t.attributes)&&Xs.compareWithDefault("encodedValue",t.encodedValue);case Bm:return t instanceof ye?t.isEqual(Un.defaultValues(Bm)):!1;case Dy:case cl:return Xs.compareWithDefault("type",t.type)&&Xs.compareWithDefault("attributes",t.attributes)&&Xs.compareWithDefault("encodedValue",t.encodedValue);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:ml,value:[new ve({name:t.version||rB}),new Vr({value:[Yn.schema(t.sidSchema||{names:{blockName:By}}),new Vr({value:[new ue({optional:!0,name:t.sid||By,idBlock:{tagClass:3,tagNumber:0},value:[new je]}),new vt({optional:!0,name:t.sid||By,idBlock:{tagClass:3,tagNumber:0}})]})]}),ye.schema(t.digestAlgorithm||{names:{blockName:nB}}),Xs.schema(t.signedAttrs||{names:{blockName:cA,tagNumber:0}}),ye.schema(t.signatureAlgorithm||{names:{blockName:sB}}),new je({name:t.signature||iB}),Xs.schema(t.unsignedAttrs||{names:{blockName:lA,tagNumber:1}})]})}fromSchema(e){Oe(e,she);let t=_e(e,e,Un.schema());Ce.assertSchema(t,this.className),this.version=t.result[rB].valueBlock.valueDec;let n=t.result[By];n.idBlock.tagClass===1?this.sid=new Yn({schema:n}):this.sid=n,this.digestAlgorithm=new ye({schema:t.result[nB]}),cA in t.result&&(this.signedAttrs=new Xs({type:0,schema:t.result[cA]})),this.signatureAlgorithm=new ye({schema:t.result[sB]}),this.signature=t.result[iB],lA in t.result&&(this.unsignedAttrs=new Xs({type:1,schema:t.result[lA]}))}toSchema(){if(Un.compareWithDefault(fh,this.sid))throw new Error('Incorrectly initialized "SignerInfo" class');let e=[];return e.push(new ve({value:this.version})),this.sid instanceof Yn?e.push(this.sid.toSchema()):e.push(this.sid),e.push(this.digestAlgorithm.toSchema()),this.signedAttrs&&Un.compareWithDefault(ul,this.signedAttrs)===!1&&e.push(this.signedAttrs.toSchema()),e.push(this.signatureAlgorithm.toSchema()),e.push(this.signature),this.unsignedAttrs&&Un.compareWithDefault(cl,this.unsignedAttrs)===!1&&e.push(this.unsignedAttrs.toSchema()),new J({value:e})}toJSON(){if(Un.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 St||(e.sid=this.sid.toJSON()),this.signedAttrs&&Un.compareWithDefault(ul,this.signedAttrs)===!1&&(e.signedAttrs=this.signedAttrs.toJSON()),this.unsignedAttrs&&Un.compareWithDefault(cl,this.unsignedAttrs)===!1&&(e.unsignedAttrs=this.unsignedAttrs.toJSON()),e}};GA.CLASS_NAME="SignerInfo";var Ry="version",Oy="policy",Py="messageImprint",ky="serialNumber",Ly="genTime",hh="ordering",ph="nonce",Rm="accuracy",Om="tsa",Pm="extensions",xa="TSTInfo",aB=`${xa}.${Ry}`,oB=`${xa}.${Oy}`,uB=`${xa}.${Py}`,cB=`${xa}.${ky}`,lB=`${xa}.${Ly}`,fA=`${xa}.${Rm}`,hA=`${xa}.${hh}`,pA=`${xa}.${ph}`,dA=`${xa}.${Om}`,mA=`${xa}.${Pm}`,ihe=[aB,oB,uB,cB,lB,fA,hA,pA,dA,mA],O9=class Gs extends De{static{o(this,"TSTInfo")}constructor(e={}){super(),this.version=O(e,Ry,Gs.defaultValues(Ry)),this.policy=O(e,Oy,Gs.defaultValues(Oy)),this.messageImprint=O(e,Py,Gs.defaultValues(Py)),this.serialNumber=O(e,ky,Gs.defaultValues(ky)),this.genTime=O(e,Ly,Gs.defaultValues(Ly)),Rm in e&&(this.accuracy=O(e,Rm,Gs.defaultValues(Rm))),hh in e&&(this.ordering=O(e,hh,Gs.defaultValues(hh))),ph in e&&(this.nonce=O(e,ph,Gs.defaultValues(ph))),Om in e&&(this.tsa=O(e,Om,Gs.defaultValues(Om))),Pm in e&&(this.extensions=O(e,Pm,Gs.defaultValues(Pm))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Ry:return 0;case Oy:return V;case Py:return new va;case ky:return new ve;case Ly:return new Date(0,0,0);case Rm:return new uf;case hh:return!1;case ph:return new ve;case Om:return new Cr;case Pm:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Ry:case Oy:case Ly:case hh:return t===Gs.defaultValues(hh);case Py:return va.compareWithDefault(Sh,t.hashAlgorithm)&&va.compareWithDefault(Eh,t.hashedMessage);case ky:case ph:return t.isEqual(Gs.defaultValues(ph));case Rm:return uf.compareWithDefault(Sc,t.seconds)&&uf.compareWithDefault(Ec,t.millis)&&uf.compareWithDefault(bc,t.micros);case Om:return Cr.compareWithDefault(Sv,t.type)&&Cr.compareWithDefault(Ev,t.value);case Pm:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||xa,value:[new ve({name:t.version||aB}),new st({name:t.policy||oB}),va.schema(t.messageImprint||{names:{blockName:uB}}),new ve({name:t.serialNumber||cB}),new Lr({name:t.genTime||lB}),uf.schema(t.accuracy||{names:{blockName:fA}}),new ca({name:t.ordering||hA,optional:!0}),new ve({name:t.nonce||pA,optional:!0}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[Cr.schema(t.tsa||{names:{blockName:dA}})]}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new _t({name:t.extensions||mA,value:Ki.schema(t.extension||{})})]})]})}fromSchema(e){Oe(e,ihe);let t=_e(e,e,Gs.schema());Ce.assertSchema(t,this.className),this.version=t.result[aB].valueBlock.valueDec,this.policy=t.result[oB].valueBlock.toString(),this.messageImprint=new va({schema:t.result[uB]}),this.serialNumber=t.result[cB],this.genTime=t.result[lB].toDate(),fA in t.result&&(this.accuracy=new uf({schema:t.result[fA]})),hA in t.result&&(this.ordering=t.result[hA].valueBlock.value),pA in t.result&&(this.nonce=t.result[pA]),dA in t.result&&(this.tsa=new Cr({schema:t.result[dA]})),mA in t.result&&(this.extensions=Array.from(t.result[mA],n=>new Ki({schema:n})))}toSchema(){let e=[];return e.push(new ve({value:this.version})),e.push(new st({value:this.policy})),e.push(this.messageImprint.toSchema()),e.push(this.serialNumber),e.push(new Lr({valueDate:this.genTime})),this.accuracy&&e.push(this.accuracy.toSchema()),this.ordering!==void 0&&e.push(new ca({value:this.ordering})),this.nonce&&e.push(this.nonce),this.tsa&&e.push(new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[this.tsa.toSchema()]})),this.extensions&&e.push(new ue({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.extensions,t=>t.toSchema())})),new J({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=Ot(!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)}};O9.CLASS_NAME="TSTInfo";var km="version",Vy="digestAlgorithms",Uy="encapContentInfo",Lm="certificates",Vm="crls",jy="signerInfos",vv="ocsps",Ih="SignedData",fB=`${Ih}.${km}`,gA=`${Ih}.${Vy}`,hB=`${Ih}.${Uy}`,vA=`${Ih}.${Lm}`,yA=`${Ih}.${Vm}`,xA=`${Ih}.${jy}`,ahe=[fB,gA,hB,vA,yA,xA],os=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 ga extends De{static{o(this,"SignedData")}constructor(e={}){super(),this.version=O(e,km,ga.defaultValues(km)),this.digestAlgorithms=O(e,Vy,ga.defaultValues(Vy)),this.encapContentInfo=O(e,Uy,ga.defaultValues(Uy)),Lm in e&&(this.certificates=O(e,Lm,ga.defaultValues(Lm))),Vm in e&&(this.crls=O(e,Vm,ga.defaultValues(Vm))),vv in e&&(this.ocsps=O(e,vv,ga.defaultValues(vv))),this.signerInfos=O(e,jy,ga.defaultValues(jy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case km:return 0;case Vy:return[];case Uy:return new wh;case Lm:return[];case Vm:return[];case vv:return[];case jy:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case km:return t===ga.defaultValues(km);case Uy:return wh.compareWithDefault("eContentType",t.eContentType)&&wh.compareWithDefault("eContent",t.eContent);case Vy:case Lm:case Vm:case vv:case jy:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return t.optional===void 0&&(t.optional=!1),new J({name:t.blockName||Ih,optional:t.optional,value:[new ve({name:t.version||fB}),new Jr({value:[new _t({name:t.digestAlgorithms||gA,value:ye.schema()})]}),wh.schema(t.encapContentInfo||{names:{blockName:hB}}),new ue({name:t.certificates||vA,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:Ch.schema().valueBlock.value}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:$y.schema(t.crls||{names:{crls:yA}}).valueBlock.value}),new Jr({value:[new _t({name:t.signerInfos||xA,value:GA.schema()})]})]})}fromSchema(e){Oe(e,ahe);let t=_e(e,e,ga.schema());if(Ce.assertSchema(t,this.className),this.version=t.result[fB].valueBlock.valueDec,gA in t.result&&(this.digestAlgorithms=Array.from(t.result[gA],n=>new ye({schema:n}))),this.encapContentInfo=new wh({schema:t.result[hB]}),vA in t.result){let n=new Ch({schema:new Jr({value:t.result[vA].valueBlock.value})});this.certificates=n.certificates.slice(0)}yA in t.result&&(this.crls=Array.from(t.result[yA],n=>n.idBlock.tagClass===1?new Qy({schema:n}):(n.idBlock.tagClass=1,n.idBlock.tagNumber=16,new Ky({schema:n})))),xA in t.result&&(this.signerInfos=Array.from(t.result[xA],n=>new GA({schema:n})))}toSchema(e=!1){let t=[];if(this.certificates&&this.certificates.length&&this.certificates.some(n=>n instanceof Hb)||this.crls&&this.crls.length&&this.crls.some(n=>n instanceof Ky)?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 TA)||this.signerInfos.some(n=>n.version===3)||this.encapContentInfo.eContentType!==ga.ID_DATA?this.version=3:this.version=1,t.push(new ve({value:this.version})),t.push(new Jr({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 ue({idBlock:{tagClass:3,tagNumber:0},value:s.valueBlock.value}))}return this.crls&&t.push(new ue({idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.crls,n=>{if(n instanceof Ky){let s=n.toSchema();return s.idBlock.tagClass=3,s.idBlock.tagNumber=1,s}return n.toSchema(e)})})),t.push(new Jr({value:Array.from(this.signerInfos,n=>n.toSchema())})),new J({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=sn,trustedCerts:n=[],checkDate:s=new Date,checkChain:i=!1,passedWhenNotRevValues:a=!1,extendedMode:u=!1,findOrigin:c=null,findIssuer:f=null}={},h=Ot(!0)){let m=null,g=null;try{let x=sn,v=V,S=[],E=this.signerInfos[e];if(!E)throw new os({date:s,code:1,message:"Unable to get signer by supplied index"});if(!this.certificates)throw new os({date:s,code:2,message:"No certificates attached to this signed data"});if(E.sid instanceof Yn){for(let A of this.certificates)if(A instanceof ls&&A.issuer.isEqual(E.sid.issuer)&&A.serialNumber.isEqual(E.sid.serialNumber)){m=A;break}}else{let A=E.sid,T=A.idBlock.isConstructed?A.valueBlock.value[0].valueBlock.valueHex:A.valueBlock.valueHex;for(let R of this.certificates){if(!(R instanceof ls))continue;let H=await h.digest({name:"sha-1"},R.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView);if(fc(H,T)){m=R;break}}}if(!m)throw new os({date:s,code:3,message:"Unable to find signer certificate"});if(this.encapContentInfo.eContentType===ile){if(!this.encapContentInfo.eContent)throw new os({date:s,code:15,message:"Error during verification: TSTInfo eContent is empty",signatureVerified:null,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0});let A;try{A=O9.fromBER(this.encapContentInfo.eContent.valueBlock.valueHexView)}catch{throw new os({date:s,code:15,message:"Error during verification: TSTInfo wrong ASN.1 schema ",signatureVerified:null,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0})}if(s=A.genTime,g=A.serialNumber.valueBlock.valueHexView.slice().buffer,t.byteLength===0)throw new os({date:s,code:4,message:"Missed detached data input array"});if(!await A.verify({data:t},h))throw new os({date:s,code:15,message:"Error during verification: TSTInfo verification is failed",signatureVerified:!1,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0})}if(i){let A=this.certificates.filter(I=>I instanceof ls&&!!E9(I,m)),T={checkDate:s,certs:A,trustedCerts:n};f&&(T.findIssuer=f),c&&(T.findOrigin=c);let R=new B9(T);if(R.certs.push(m),this.crls)for(let I of this.crls)"thisUpdate"in I?R.crls.push(I):I.otherRevInfoFormat===gb&&R.ocsps.push(new zy({schema:I.otherRevInfo}));this.ocsps&&R.ocsps.push(...this.ocsps);let H=await R.verify({passedWhenNotRevValues:a},h).catch(I=>{throw new os({date:s,code:5,message:`Validation of signer's certificate failed with error: ${I instanceof Object?I.resultMessage:I}`,signerCertificate:m,signerCertificateVerified:!1})});if(H.certificatePath&&(S=H.certificatePath),!H.result)throw new os({date:s,code:5,message:`Validation of signer's certificate failed: ${H.resultMessage}`,signerCertificate:m,signerCertificateVerified:!1})}let C=h.getAlgorithmByOID(E.digestAlgorithm.algorithmId);if(!("name"in C))throw new os({date:s,code:7,message:`Unsupported signature algorithm: ${E.digestAlgorithm.algorithmId}`,signerCertificate:m,signerCertificateVerified:!0});v=C.name;let _=this.encapContentInfo.eContent;if(_)_.idBlock.tagClass===1&&_.idBlock.tagNumber===4?t=_.getValue():t=_.valueBlock.valueBeforeDecodeView.slice().buffer;else if(t.byteLength===0)throw new os({date:s,code:8,message:"Missed detached data input array",signerCertificate:m,signerCertificateVerified:!0});if(E.signedAttrs){let A=!1,T=!1;for(let R of E.signedAttrs.attributes)if(R.type==="1.2.840.113549.1.9.3"&&(A=!0),R.type==="1.2.840.113549.1.9.4"&&(T=!0,x=R.values[0].valueBlock.valueHex),A&&T)break;if(A===!1)throw new os({date:s,code:9,message:'Attribute "content-type" is a mandatory attribute for "signed attributes"',signerCertificate:m,signerCertificateVerified:!0});if(T===!1)throw new os({date:s,code:10,message:'Attribute "message-digest" is a mandatory attribute for "signed attributes"',signatureVerified:null,signerCertificate:m,signerCertificateVerified:!0})}if(E.signedAttrs){let A=await h.digest(v,new Uint8Array(t));if(!fc(A,x))throw new os({date:s,code:15,message:"Error during verification: Message digest doesn't match",signatureVerified:null,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0});t=E.signedAttrs.encodedValue}let b=E.signatureAlgorithm.algorithmId==="1.2.840.113549.1.1.1"?await h.verifyWithPublicKey(t,E.signature,m.subjectPublicKeyInfo,E.signatureAlgorithm,v):await h.verifyWithPublicKey(t,E.signature,m.subjectPublicKeyInfo,E.signatureAlgorithm);return u?{date:s,code:14,message:V,signatureVerified:b,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0,certificatePath:S}:b}catch(x){throw x instanceof os?x:new os({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=sn,i=Ot(!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 ye({algorithmId:c,algorithmParams:new zr})),u.digestAlgorithm=new ye({algorithmId:c,algorithmParams:new zr});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 je({valueHex:m})}};Wm.CLASS_NAME="SignedData";Wm.ID_DATA=wB;var dh="version",mh="authSafe",au="macData",yv="parsedValue",ohe=[dh,mh,au],uhe=class gh extends De{static{o(this,"PFX")}constructor(e={}){super(),this.version=O(e,dh,gh.defaultValues(dh)),this.authSafe=O(e,mh,gh.defaultValues(mh)),au in e&&(this.macData=O(e,au,gh.defaultValues(au))),yv in e&&(this.parsedValue=O(e,yv,gh.defaultValues(yv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case dh:return 3;case mh:return new Qr;case au:return new il;case yv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case dh:return t===gh.defaultValues(e);case mh:return Qr.compareWithDefault("contentType",t.contentType)&&Qr.compareWithDefault("content",t.content);case au:return il.compareWithDefault("mac",t.mac)&&il.compareWithDefault("macSalt",t.macSalt)&&il.compareWithDefault("iterations",t.iterations);case yv:return t instanceof Object&&Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ve({name:t.version||dh}),Qr.schema(t.authSafe||{names:{blockName:mh}}),il.schema(t.macData||{names:{blockName:au,optional:!0}})]})}fromSchema(e){Oe(e,ohe);let t=_e(e,e,gh.schema({names:{version:dh,authSafe:{names:{blockName:mh}},macData:{names:{blockName:au}}}}));Ce.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.authSafe=new Qr({schema:t.result.authSafe}),au in t.result&&(this.macData=new il({schema:t.result.macData}))}toSchema(){let e=[new ve({value:this.version}),this.authSafe.toSchema()];return this.macData&&e.push(this.macData.toSchema()),new J({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=Ot(!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 Qr({contentType:Qr.DATA,content:new je({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 ye({algorithmId:t.getOIDByAlgorithm({name:e.hmacHashAlgorithm},!0,"hmacHashAlgorithm")}),digest:new je({valueHex:a})}),macSalt:new je({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 je({valueHex:n})}),certificates:[e.signingCertificate]}),i=await t.digest({name:e.hashAlgorithm},new Uint8Array(n)),a=[];a.push(new an({type:"1.2.840.113549.1.9.3",values:[new st({value:"1.2.840.113549.1.7.1"})]})),a.push(new an({type:"1.2.840.113549.1.9.5",values:[new tf({valueDate:new Date})]})),a.push(new an({type:"1.2.840.113549.1.9.4",values:[new je({valueHex:i})]})),s.signerInfos.push(new GA({version:1,sid:new Yn({issuer:e.signingCertificate.issuer,serialNumber:e.signingCertificate.serialNumber}),signedAttrs:new Xs({type:0,attributes:a})})),await s.sign(e.privateKey,0,e.hashAlgorithm,void 0,t),this.authSafe=new Qr({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=Ot(!0)){switch(Ar.assert(e,"parameters","object"),e.checkIntegrity===void 0&&(e.checkIntegrity=!0),this.parsedValue={},this.authSafe.contentType){case Qr.DATA:{pr.assertEmpty(e.password,"password"),this.parsedValue.integrityMode=0,Ar.assert(this.authSafe.content,"authSafe.content",je);let n=this.authSafe.content.getValue();if(this.parsedValue.authenticatedSafe=WD.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 Qr.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",je);let i=s.getValue();if(this.parsedValue.authenticatedSafe=WD.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}`)}}};uhe.CLASS_NAME="PFX";var Um="status",ll="statusStrings",fl="failInfo",che=[Um,ll,fl],KF;(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"})(KF||(KF={}));var My=class vh extends De{static{o(this,"PKIStatusInfo")}constructor(e={}){super(),this.status=O(e,Um,vh.defaultValues(Um)),ll in e&&(this.statusStrings=O(e,ll,vh.defaultValues(ll))),fl in e&&(this.failInfo=O(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 Kt;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=O(e,"names",{});return new J({name:t.blockName||V,value:[new ve({name:t.status||V}),new J({optional:!0,value:[new _t({name:t.statusStrings||V,value:new Ui})]}),new Kt({name:t.failInfo||V,optional:!0})]})}fromSchema(e){Oe(e,che);let t=_e(e,e,vh.schema({names:{status:Um,statusStrings:ll,failInfo:fl}}));Ce.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 ve({value:this.status})),this.statusStrings&&e.push(new J({optional:!0,value:this.statusStrings})),this.failInfo&&e.push(this.failInfo),new J({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}};My.CLASS_NAME="PKIStatusInfo";var Fy="version",qy="messageImprint",jm="reqPolicy",Mm="nonce",ou="certReq",Fm="extensions",_h="TimeStampReq",pB=`${_h}.${Fy}`,dB=`${_h}.${qy}`,wA=`${_h}.${jm}`,SA=`${_h}.${Mm}`,EA=`${_h}.${ou}`,bA=`${_h}.${Fm}`,lhe=[pB,dB,wA,SA,EA,bA],fhe=class Hi extends De{static{o(this,"TimeStampReq")}constructor(e={}){super(),this.version=O(e,Fy,Hi.defaultValues(Fy)),this.messageImprint=O(e,qy,Hi.defaultValues(qy)),jm in e&&(this.reqPolicy=O(e,jm,Hi.defaultValues(jm))),Mm in e&&(this.nonce=O(e,Mm,Hi.defaultValues(Mm))),ou in e&&(this.certReq=O(e,ou,Hi.defaultValues(ou))),Fm in e&&(this.extensions=O(e,Fm,Hi.defaultValues(Fm))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Fy:return 0;case qy:return new va;case jm:return V;case Mm:return new ve;case ou:return!1;case Fm:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Fy:case jm:case ou:return t===Hi.defaultValues(e);case qy:return va.compareWithDefault("hashAlgorithm",t.hashAlgorithm)&&va.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=O(e,"names",{});return new J({name:t.blockName||_h,value:[new ve({name:t.version||pB}),va.schema(t.messageImprint||{names:{blockName:dB}}),new st({name:t.reqPolicy||wA,optional:!0}),new ve({name:t.nonce||SA,optional:!0}),new ca({name:t.certReq||EA,optional:!0}),new ue({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new _t({name:t.extensions||bA,value:Ki.schema()})]})]})}fromSchema(e){Oe(e,lhe);let t=_e(e,e,Hi.schema());Ce.assertSchema(t,this.className),this.version=t.result[pB].valueBlock.valueDec,this.messageImprint=new va({schema:t.result[dB]}),wA in t.result&&(this.reqPolicy=t.result[wA].valueBlock.toString()),SA in t.result&&(this.nonce=t.result[SA]),EA in t.result&&(this.certReq=t.result[EA].valueBlock.value),bA in t.result&&(this.extensions=Array.from(t.result[bA],n=>new Ki({schema:n})))}toSchema(){let e=[];return e.push(new ve({value:this.version})),e.push(this.messageImprint.toSchema()),this.reqPolicy&&e.push(new st({value:this.reqPolicy})),this.nonce&&e.push(this.nonce),ou in this&&Hi.compareWithDefault(ou,this.certReq)===!1&&e.push(new ca({value:this.certReq})),this.extensions&&e.push(new ue({idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.extensions,t=>t.toSchema())})),new J({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(ou,this.certReq)===!1&&(e.certReq=this.certReq),this.extensions&&(e.extensions=Array.from(this.extensions,t=>t.toJSON())),e}};fhe.CLASS_NAME="TimeStampReq";var qm="status",Hm="timeStampToken",PB="TimeStampResp",mB=`${PB}.${qm}`,AA=`${PB}.${Hm}`,hhe=[mB,AA],phe=class CA extends De{static{o(this,"TimeStampResp")}constructor(e={}){super(),this.status=O(e,qm,CA.defaultValues(qm)),Hm in e&&(this.timeStampToken=O(e,Hm,CA.defaultValues(Hm))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case qm:return new My;case Hm:return new Qr;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case qm:return My.compareWithDefault(qm,t.status)&&!("statusStrings"in t)&&!("failInfo"in t);case Hm:return t.contentType===V&&t.content instanceof St;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||PB,value:[My.schema(t.status||{names:{blockName:mB}}),Qr.schema(t.timeStampToken||{names:{blockName:AA,optional:!0}})]})}fromSchema(e){Oe(e,hhe);let t=_e(e,e,CA.schema());Ce.assertSchema(t,this.className),this.status=new My({schema:t.result[mB]}),AA in t.result&&(this.timeStampToken=new Qr({schema:t.result[AA]}))}toSchema(){let e=[];return e.push(this.status.toSchema()),this.timeStampToken&&e.push(this.timeStampToken.toSchema()),new J({value:e})}toJSON(){let e={status:this.status.toJSON()};return this.timeStampToken&&(e.timeStampToken=this.timeStampToken.toJSON()),e}async sign(e,t,n=Ot(!0)){return this.assertContentType(),new Wm({schema:this.timeStampToken.content}).sign(e,0,t,void 0,n)}async verify(e={signer:0,trustedCerts:[],data:sn},t=Ot(!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!==r9)throw new Error(`Wrong format of timeStampToken: ${this.timeStampToken.contentType}`)}};phe.CLASS_NAME="TimeStampResp";function dhe(){if(typeof globalThis<"u"&&"crypto"in globalThis){let r="webcrypto";"webkitSubtle"in globalThis.crypto&&(r="safari"),NA(r,new Xm({name:r,crypto:globalThis.crypto}))}else if(typeof crypto<"u"&&"webcrypto"in crypto){let r="NodeJS ^15",e=crypto.webcrypto;NA(r,new Xm({name:r,crypto:e}))}}o(dhe,"initCryptoEngine");dhe();var kB=null,yn=class{static{o(this,"Application")}static setEngine(e,t){kB=Object.assign(t,{name:e}),NA(e,new Xm({name:e,crypto:t}))}static get crypto(){if(!kB)throw new qe(Ie.CRYPTOGRAPHIC_NO_MODULE);return kB}static isNodePlugin(){return typeof self>"u"&&typeof window>"u"}};function mhe(){yn.isNodePlugin()||yn.setEngine("W3 WebCrypto module",self.crypto)}o(mhe,"init");mhe();var XA=class{static{o(this,"XmlAlgorithm")}getAlgorithmName(){return this.namespaceURI}},Dh=class extends XA{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=Za(e);t=wr.FromString(s,"utf8")}let n=await yn.crypto.subtle.digest(this.algorithm,t);return new Uint8Array(n)}},xn=class extends XA{static{o(this,"SignatureAlgorithm")}async Sign(e,t,n){let s=wr.FromString(e,"utf8");return yn.crypto.subtle.sign(n,t,s)}async Verify(e,t,n){let s=this.algorithm,i=wr.FromString(e,"utf8");return yn.crypto.subtle.verify(s,t,n,i)}};var jn="SHA-1",Qn="SHA-256",Zn="SHA-384",es="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",WA=class extends Dh{static{o(this,"Sha1")}constructor(){super(...arguments),this.algorithm={name:jn},this.namespaceURI=Ym}},tx=class extends Dh{static{o(this,"Sha256")}constructor(){super(...arguments),this.algorithm={name:Qn},this.namespaceURI=Qm}},zA=class extends Dh{static{o(this,"Sha384")}constructor(){super(...arguments),this.algorithm={name:Zn},this.namespaceURI=Zm}},JA=class extends Dh{static{o(this,"Sha512")}constructor(){super(...arguments),this.algorithm={name:es},this.namespaceURI=e0}};var lu="ECDSA",YA="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1",QA="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256",ZA="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384",e2="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512";function t2(r){if(r.name.toUpperCase()===lu.toUpperCase())switch(r.hash.name.toUpperCase()){case jn:return new t0;case Qn:return new r0;case Zn:return new n0;case es:return new s0}return null}o(t2,"fromAlgorithm");var t0=class extends xn{static{o(this,"EcdsaSha1")}constructor(){super(...arguments),this.algorithm={name:lu,hash:{name:jn}},this.namespaceURI=YA}static fromAlgorithm(e){return t2(e)}},r0=class extends xn{static{o(this,"EcdsaSha256")}constructor(){super(...arguments),this.algorithm={name:lu,hash:{name:Qn}},this.namespaceURI=QA}static fromAlgorithm(e){return t2(e)}},n0=class extends xn{static{o(this,"EcdsaSha384")}constructor(){super(...arguments),this.algorithm={name:lu,hash:{name:Zn}},this.namespaceURI=ZA}static fromAlgorithm(e){return t2(e)}},s0=class extends xn{static{o(this,"EcdsaSha512")}constructor(){super(...arguments),this.algorithm={name:lu,hash:{name:es}},this.namespaceURI=e2}static fromAlgorithm(e){return t2(e)}};var i0="HMAC",LB="http://www.w3.org/2000/09/xmldsig#hmac-sha1",VB="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256",UB="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384",jB="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512";function r2(r){if(r.name.toUpperCase()===i0.toUpperCase())switch(r.hash.name.toUpperCase()){case jn:return new rx;case Qn:return new nx;case Zn:return new sx;case es:return new ix}return null}o(r2,"fromAlgorithm");var rx=class extends xn{static{o(this,"HmacSha1")}constructor(){super(...arguments),this.algorithm={name:i0,hash:{name:jn}},this.namespaceURI=LB}static fromAlgorithm(e){return r2(e)}},nx=class extends xn{static{o(this,"HmacSha256")}constructor(){super(...arguments),this.algorithm={name:i0,hash:{name:Qn}},this.namespaceURI=VB}static fromAlgorithm(e){return r2(e)}},sx=class extends xn{static{o(this,"HmacSha384")}constructor(){super(...arguments),this.algorithm={name:i0,hash:{name:Zn}},this.namespaceURI=UB}static fromAlgorithm(e){return r2(e)}},ix=class extends xn{static{o(this,"HmacSha512")}constructor(){super(...arguments),this.algorithm={name:i0,hash:{name:es}},this.namespaceURI=jB}static fromAlgorithm(e){return r2(e)}};var fu="RSASSA-PKCS1-v1_5",n2="http://www.w3.org/2000/09/xmldsig#rsa-sha1",s2="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",i2="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384",a2="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512";function o2(r){if(r.name.toUpperCase()===fu.toUpperCase())switch(r.hash.name.toUpperCase()){case jn:return new a0;case Qn:return new o0;case Zn:return new u0;case es:return new c0}return null}o(o2,"fromAlgorithm");var a0=class extends xn{static{o(this,"RsaPkcs1Sha1")}constructor(){super(...arguments),this.algorithm={name:fu,hash:{name:jn}},this.namespaceURI=n2}static fromAlgorithm(e){return o2(e)}},o0=class extends xn{static{o(this,"RsaPkcs1Sha256")}constructor(){super(...arguments),this.algorithm={name:fu,hash:{name:Qn}},this.namespaceURI=s2}static fromAlgorithm(e){return o2(e)}},u0=class extends xn{static{o(this,"RsaPkcs1Sha384")}constructor(){super(...arguments),this.algorithm={name:fu,hash:{name:Zn}},this.namespaceURI=i2}static fromAlgorithm(e){return o2(e)}},c0=class extends xn{static{o(this,"RsaPkcs1Sha512")}constructor(){super(...arguments),this.algorithm={name:fu,hash:{name:es}},this.namespaceURI=a2}static fromAlgorithm(e){return o2(e)}};function Ke(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(Ke,"__decorate");function ht(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)}o(ht,"__metadata");var ge={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 $r=class extends Fs{static{o(this,"XmlSignatureObject")}};$r=Ke([Ft({localName:"xmldsig",namespaceURI:ge.NamespaceURI,prefix:ge.DefaultPrefix})],$r);var $i=class extends Qp{static{o(this,"XmlSignatureCollection")}};$i=Ke([Ft({localName:"xmldsig_collection",namespaceURI:ge.NamespaceURI,prefix:ge.DefaultPrefix})],$i);var Gi=class extends $r{static{o(this,"DigestMethod")}constructor(e){super(),e&&(this.Algorithm=e)}};Ke([kr({localName:ge.AttributeNames.Algorithm,required:!0,defaultValue:ge.DefaultDigestMethod}),ht("design:type",String)],Gi.prototype,"Algorithm",void 0);Gi=Ke([Ft({localName:ge.ElementNames.DigestMethod}),ht("design:paramtypes",[String])],Gi);var fi=class extends $r{static{o(this,"KeyInfoClause")}static canImportCryptoKey(e){return!1}};var ghe={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===fu.toUpperCase()||t===Bh.toUpperCase()}async importKey(e){let t=e.algorithm.name?e.algorithm.name.toUpperCase():"";if(t!==fu.toUpperCase()&&t!==Bh.toUpperCase())throw new qe(Ie.ALGORITHM_WRONG_NAME,e.algorithm.name);this.key=e;let n=await yn.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=ghe){if(this.key)return this.key;if(!this.Modulus)throw new qe(Ie.CRYPTOGRAPHIC,"RsaKeyValue has no Modulus");let t=wr.ToBase64Url(this.Modulus);if(!this.Exponent)throw new qe(Ie.CRYPTOGRAPHIC,"RsaKeyValue has no Exponent");let n=wr.ToBase64Url(this.Exponent),s;switch(e.name.toUpperCase()){case fu.toUpperCase():s="R";break;case Bh.toUpperCase():s="P";break;default:throw new qe(Ie.ALGORITHM_NOT_SUPPORTED,e.name)}switch(e.hash.name.toUpperCase()){case jn:s+="S1";break;case Qn:s+="S256";break;case Zn:s+="S384";break;case es:s+="S512";break}let i={kty:"RSA",alg:s,n:t,e:n,ext:!0};return yn.crypto.subtle.importKey("jwk",i,e,!0,this.keyUsage)}LoadXml(e){super.LoadXml(e),this.keyUsage=["verify"]}};Ke([Wt({localName:ge.ElementNames.Modulus,prefix:ge.DefaultPrefix,namespaceURI:ge.NamespaceURI,required:!0,converter:Vi}),ht("design:type",Object)],l0.prototype,"Modulus",void 0);Ke([Wt({localName:ge.ElementNames.Exponent,prefix:ge.DefaultPrefix,namespaceURI:ge.NamespaceURI,required:!0,converter:Vi}),ht("design:type",Object)],l0.prototype,"Exponent",void 0);l0=Ke([Ft({localName:ge.ElementNames.RSAKeyValue})],l0);var MB="http://www.w3.org/2007/05/xmldsig-more#",FB="pss",f0=class extends Fs{static{o(this,"MaskGenerationFunction")}};Ke([Wt({parser:Gi}),ht("design:type",Gi)],f0.prototype,"DigestMethod",void 0);Ke([kr({localName:ge.AttributeNames.Algorithm,defaultValue:"http://www.w3.org/2007/05/xmldsig-more#MGF1"}),ht("design:type",String)],f0.prototype,"Algorithm",void 0);f0=Ke([Ft({localName:ge.ElementNames.MaskGenerationFunction,prefix:FB,namespaceURI:MB})],f0);var wa=class extends Fs{static{o(this,"PssAlgorithmParams")}};Ke([Wt({parser:Gi}),ht("design:type",Gi)],wa.prototype,"DigestMethod",void 0);Ke([Wt({parser:f0}),ht("design:type",f0)],wa.prototype,"MGF",void 0);Ke([Wt({converter:Jg,prefix:FB,namespaceURI:MB}),ht("design:type",Number)],wa.prototype,"SaltLength",void 0);Ke([Wt({converter:Jg}),ht("design:type",Number)],wa.prototype,"TrailerField",void 0);wa=Ke([Ft({localName:ge.ElementNames.RSAPSSParams,prefix:FB,namespaceURI:MB})],wa);var Bh="RSA-PSS",qB="http://www.w3.org/2007/05/xmldsig-more#rsa-pss",u2=class r extends xn{static{o(this,"RsaPssWithParams")}constructor(){super(...arguments),this.algorithm={name:Bh,hash:{name:jn}},this.namespaceURI=qB}static fromAlgorithm(e){let t=null;if(e.name.toUpperCase()===Bh.toUpperCase()){switch(e.hash.name.toUpperCase()){case jn:t=new r;break;case Qn:t=new r;break;case Zn:t=new r;break;case es: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 wa){switch(t.DigestMethod.Algorithm.toLowerCase()){case Ym:this.algorithm.hash.name=jn;break;case Qm:this.algorithm.hash.name=Qn;break;case Zm:this.algorithm.hash.name=Zn;break;case e0:this.algorithm.hash.name=es;break;default:throw new qe(Ie.CRYPTOGRAPHIC,`Unsupported hash algorithm: ${t.DigestMethod.Algorithm}`)}return t.SaltLength&&(this.algorithm.saltLength=t.SaltLength),!0}return!1}))throw new qe(Ie.CRYPTOGRAPHIC,"RSA-PSS parameters not found in SignatureMethod")}toMethod(e){let t=new wa;switch(this.algorithm.hash.name.toUpperCase()){case jn:t.DigestMethod.Algorithm=Ym;break;case Qn:t.DigestMethod.Algorithm=Qm;break;case Zn:t.DigestMethod.Algorithm=Zm;break;case es:t.DigestMethod.Algorithm=e0;break;default:throw new qe(Ie.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 uo=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 qe(Ie.CRYPTOGRAPHIC,"Parameter 1 is not Node");return this.WriteNode(e),this.result.join("")}WriteNode(e){switch(e.nodeType){case Mt.Document:case Mt.DocumentFragment:this.WriteDocumentNode(e);break;case Mt.Element:this.WriteElementNode(e);break;case Mt.CDATA:case Mt.SignificantWhitespace:case Mt.Text:Jl(e.parentNode)||this.WriteTextNode(e);break;case Mt.Whitespace:this.state===hi.InsideDocElement&&this.WriteTextNode(e);break;case Mt.Comment:this.WriteCommentNode(e);break;case Mt.ProcessingInstruction:this.WriteProcessingInstructionNode(e);break;case Mt.EntityReference:for(let t=0;t<e.childNodes.length;t++)this.WriteNode(e.childNodes[t]);break;case Mt.Attribute:throw new qe(Ie.CRYPTOGRAPHIC,"Attribute node is impossible here");case Mt.EndElement:throw new qe(Ie.CRYPTOGRAPHIC,"Attribute node is impossible here");case Mt.EndEntity:throw new qe(Ie.CRYPTOGRAPHIC,"Attribute node is impossible here");case Mt.DocumentType:case Mt.Entity:case Mt.Notation:case Mt.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(`
105
+ <!--`):this.result.push("<!--"),this.result.push(this.NormalizeString(e.nodeValue,Mt.Comment)),this.state===hi.BeforeDocElement?this.result.push(`-->
106
+ `):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(`
107
+ <?`):this.result.push("<?"),this.result.push(t),e.nodeValue&&(this.result.push(" "),this.result.push(this.NormalizeString(e.nodeValue,Mt.ProcessingInstruction))),this.state===hi.BeforeDocElement?this.result.push(`?>
108
+ `):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(!HB(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=P9(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(yhe);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];HB(s)||t.push(s)}t.sort(xhe),t.forEach(n=>{n!=null&&(this.result.push(" "),this.result.push(n.nodeName),this.result.push('="'),this.result.push(this.NormalizeString(n.nodeValue,Mt.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===Mt.Attribute||this.IsTextNode(t))?n.push("&lt;"):i===">"&&this.IsTextNode(t)?n.push("&gt;"):i==="&"&&(t===Mt.Attribute||this.IsTextNode(t))?n.push("&amp;"):i==='"'&&t===Mt.Attribute?n.push("&quot;"):i===" "&&t===Mt.Attribute?n.push("&#x9;"):i===`
109
+ `&&t===Mt.Attribute?n.push("&#xA;"):i==="\r"?n.push("&#xD;"):n.push(i)}return n.join("")}IsTextNode(e){switch(e){case Mt.Text:case Mt.CDATA:case Mt.SignificantWhitespace:case Mt.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 yhe(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(yhe,"XmlDsigC14NTransformNamespacesComparer");function xhe(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(xhe,"XmlDsigC14NTransformAttributesComparer");function P9(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(!HB(i)&&e&&r.attributes[s].prefix===e)return++t}for(let s=r.firstChild;s;s=s.nextSibling)if(s.nodeType===Mt.Element){let a=P9(s,e,t);if(s.nodeType===Mt.Element&&a)return++t+a}return t}o(P9,"IsNamespaceUsed");function HB(r){let e=/xmlns:/;return!!(r!==null&&r.nodeType===Mt.Attribute&&(r.nodeName==="xmlns"||e.test(r.nodeName)))}o(HB,"IsNamespaceNode");var c2=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!==Mt.Element||n.nodeName===ge.ElementNames.HMACOutputLength)continue;let s;switch(n.localName){case ge.ElementNames.RSAPSSParams:s=wa;break;default:break}if(s){let i=new s;i.LoadXml(n),this.Add(i)}}}};c2=Ke([Ft({localName:"Other"})],c2);var co=class extends $r{static{o(this,"SignatureMethod")}};Ke([kr({localName:ge.AttributeNames.Algorithm,required:!0,defaultValue:""}),ht("design:type",String)],co.prototype,"Algorithm",void 0);Ke([Wt({localName:ge.ElementNames.HMACOutputLength,namespaceURI:ge.NamespaceURI,prefix:ge.DefaultPrefix,converter:Jg}),ht("design:type",Number)],co.prototype,"HMACOutputLength",void 0);Ke([Wt({parser:c2,noRoot:!0,minOccurs:0}),ht("design:type",c2)],co.prototype,"Any",void 0);co=Ke([Ft({localName:ge.ElementNames.SignatureMethod})],co);var h0=class extends $r{static{o(this,"CanonicalizationMethod")}};Ke([kr({localName:ge.AttributeNames.Algorithm,required:!0,defaultValue:ge.DefaultCanonMethod}),ht("design:type",String)],h0.prototype,"Algorithm",void 0);h0=Ke([Ft({localName:ge.ElementNames.CanonicalizationMethod})],h0);var p0=class extends $r{static{o(this,"DataObject")}};Ke([kr({localName:ge.AttributeNames.Id,defaultValue:""}),ht("design:type",String)],p0.prototype,"Id",void 0);Ke([kr({localName:ge.AttributeNames.MimeType,defaultValue:""}),ht("design:type",String)],p0.prototype,"MimeType",void 0);Ke([kr({localName:ge.AttributeNames.Encoding,defaultValue:""}),ht("design:type",String)],p0.prototype,"Encoding",void 0);p0=Ke([Ft({localName:ge.ElementNames.Object})],p0);var ax=class extends $i{static{o(this,"DataObjects")}};ax=Ke([Ft({localName:"xmldsig_objects",parser:p0})],ax);var fs=class extends $r{static{o(this,"Transform")}constructor(){super(...arguments),this.innerXml=null}GetOutput(){throw new qe(Ie.METHOD_NOT_IMPLEMENTED)}LoadInnerXml(e){if(!e)throw new qe(Ie.PARAM_REQUIRED,"node");this.innerXml=e}GetInnerXml(){return this.innerXml}};Ke([kr({localName:ge.AttributeNames.Algorithm,defaultValue:""}),ht("design:type",String)],fs.prototype,"Algorithm",void 0);Ke([Wt({localName:ge.ElementNames.XPath,defaultValue:""}),ht("design:type",String)],fs.prototype,"XPath",void 0);fs=Ke([Ft({localName:ge.ElementNames.Transform})],fs);var hu=class extends fs{static{o(this,"XmlDsigBase64Transform")}constructor(){super(...arguments),this.Algorithm=ge.AlgorithmNamespaces.XmlDsigBase64Transform}GetOutput(){if(!this.innerXml)throw new qe(Ie.PARAM_REQUIRED,"innerXml");return wr.FromString(this.innerXml.textContent||"","base64")}};var lo=class extends fs{static{o(this,"XmlDsigC14NTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315",this.xmlCanonicalizer=new uo(!1,!1)}GetOutput(){if(!this.innerXml)throw new qe(Ie.PARAM_REQUIRED,"innerXml");return this.xmlCanonicalizer.Canonicalize(this.innerXml)}},fo=class extends lo{static{o(this,"XmlDsigC14NWithCommentsTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments",this.xmlCanonicalizer=new uo(!0,!1)}};var pu=class extends fs{static{o(this,"XmlDsigEnvelopedSignatureTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"}GetOutput(){if(!this.innerXml)throw new qe(Ie.PARAM_REQUIRED,"innerXml");let e=this.innerXml.firstChild,t=[];for(;e;)oi(e)&&e.localName===ge.ElementNames.Signature&&e.namespaceURI===ge.NamespaceURI&&t.push(e),e=e.nextSibling;for(let n of t)n.parentNode?.removeChild(n);return this.innerXml}};var ho=class extends fs{static{o(this,"XmlDsigExcC14NTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#",this.xmlCanonicalizer=new uo(!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 qe(Ie.PARAM_REQUIRED,"innerXml");return this.xmlCanonicalizer.Canonicalize(this.innerXml)}setInclusiveNamespacesElement(e){let t=e.getAttribute("PrefixList");t&&t.length>0&&(this.xmlCanonicalizer.InclusiveNamespacesPrefixList=t)}},po=class extends ho{static{o(this,"XmlDsigExcC14NWithCommentsTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments",this.xmlCanonicalizer=new uo(!0,!0)}};function k9(r){return r.parentNode?k9(r.parentNode):r}o(k9,"lookupParentNode");var d0=class extends fs{static{o(this,"XmlDsigXPathTransform")}constructor(){super(...arguments),this.Algorithm=ge.AlgorithmNamespaces.XmlDsigXPathTransform}GetOutput(){if(!this.innerXml)throw new qe(Ie.PARAM_REQUIRED,"innerXml");this.Filter(k9(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}}};Ke([Wt({localName:ge.ElementNames.XPath,namespaceURI:ge.NamespaceURI,prefix:ge.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 ge.AlgorithmNamespaces.XmlDsigEnvelopedSignatureTransform:return Rh(t,pu);case ge.AlgorithmNamespaces.XmlDsigC14NTransform:return Rh(t,lo);case ge.AlgorithmNamespaces.XmlDsigC14NWithCommentsTransform:return Rh(t,fo);case ge.AlgorithmNamespaces.XmlDsigExcC14NTransform:return Rh(t,ho);case ge.AlgorithmNamespaces.XmlDsigExcC14NWithCommentsTransform:return Rh(t,po);case ge.AlgorithmNamespaces.XmlDsigBase64Transform:return Rh(t,hu);case ge.AlgorithmNamespaces.XmlDsigXPathTransform:return Rh(t,d0);default:try{let n=ox.CreateFromName(t.Algorithm);if(!t.Element)throw new Error("Transform element is not defined");return n.LoadXml(t.Element),n}catch{throw new qe(Ie.CRYPTOGRAPHIC_UNKNOWN_TRANSFORM,t.Algorithm)}}})}};m0=Ke([Ft({localName:ge.ElementNames.Transforms,parser:fs})],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 mo=class extends $r{static{o(this,"Reference")}constructor(e){super(),this.DigestMethod=new Gi,e&&(this.Uri=e)}};Ke([kr({defaultValue:""}),ht("design:type",String)],mo.prototype,"Id",void 0);Ke([kr({localName:ge.AttributeNames.URI}),ht("design:type",String)],mo.prototype,"Uri",void 0);Ke([kr({localName:ge.AttributeNames.Type,defaultValue:""}),ht("design:type",String)],mo.prototype,"Type",void 0);Ke([Wt({parser:m0}),ht("design:type",m0)],mo.prototype,"Transforms",void 0);Ke([Wt({required:!0,parser:Gi}),ht("design:type",Gi)],mo.prototype,"DigestMethod",void 0);Ke([Wt({required:!0,localName:ge.ElementNames.DigestValue,namespaceURI:ge.NamespaceURI,prefix:ge.DefaultPrefix,converter:Vi}),ht("design:type",Uint8Array)],mo.prototype,"DigestValue",void 0);mo=Ke([Ft({localName:ge.ElementNames.Reference}),ht("design:paramtypes",[String])],mo);var g0=class extends $i{static{o(this,"References")}};g0=Ke([Ft({localName:"References",parser:mo})],g0);var du=class extends $r{static{o(this,"SignedInfo")}};Ke([kr({localName:ge.AttributeNames.Id,defaultValue:""}),ht("design:type",String)],du.prototype,"Id",void 0);Ke([Wt({parser:h0,required:!0}),ht("design:type",h0)],du.prototype,"CanonicalizationMethod",void 0);Ke([Wt({parser:co,required:!0}),ht("design:type",co)],du.prototype,"SignatureMethod",void 0);Ke([Wt({parser:g0,minOccurs:1,noRoot:!0}),ht("design:type",g0)],du.prototype,"References",void 0);du=Ke([Ft({localName:ge.ElementNames.SignedInfo})],du);var w0="http://www.w3.org/2001/04/xmldsig-more#",S0="ecdsa",Oh=class extends Fs{static{o(this,"EcdsaPublicKey")}};Ke([Wt({localName:ge.ElementNames.X,namespaceURI:w0,prefix:S0,required:!0,converter:Vi}),ht("design:type",Uint8Array)],Oh.prototype,"X",void 0);Ke([Wt({localName:ge.ElementNames.Y,namespaceURI:w0,prefix:S0,required:!0,converter:Vi}),ht("design:type",Uint8Array)],Oh.prototype,"Y",void 0);Oh=Ke([Ft({localName:ge.ElementNames.PublicKey,namespaceURI:w0,prefix:S0})],Oh);var v0=class extends Fs{static{o(this,"NamedCurve")}};Ke([kr({localName:ge.AttributeNames.URI,required:!0}),ht("design:type",String)],v0.prototype,"Uri",void 0);v0=Ke([Ft({localName:ge.ElementNames.NamedCurve,namespaceURI:w0,prefix:S0})],v0);var y0=class extends Fs{static{o(this,"DomainParameters")}};Ke([Wt({parser:v0}),ht("design:type",v0)],y0.prototype,"NamedCurve",void 0);y0=Ke([Ft({localName:ge.ElementNames.DomainParameters,namespaceURI:w0,prefix:S0})],y0);var x0=class extends fi{static{o(this,"EcdsaKeyValue")}constructor(){super(...arguments),this.name=ge.ElementNames.ECDSAKeyValue,this.key=null,this.jwk=null,this.keyUsage=null}static canImportCryptoKey(e){return e.algorithm.name.toUpperCase()===lu.toUpperCase()}get NamedCurve(){return V9(this.DomainParameters.NamedCurve.Uri)}async importKey(e){if(!e.algorithm.name||e.algorithm.name.toUpperCase()!=="ECDSA")throw new qe(Ie.ALGORITHM_WRONG_NAME,e.algorithm.name);let t=await yn.crypto.subtle.exportKey("jwk",e);return this.key=e,this.jwk=t,this.PublicKey=new Oh,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=V9(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=whe(this.DomainParameters.NamedCurve.Uri),i={kty:"EC",crv:s,x:t,y:n,ext:!0};this.keyUsage=["verify"];let a=await yn.crypto.subtle.importKey("jwk",i,{name:"ECDSA",namedCurve:s},!0,this.keyUsage);return this.key=a,this.key}};Ke([Wt({parser:y0}),ht("design:type",y0)],x0.prototype,"DomainParameters",void 0);Ke([Wt({parser:Oh,required:!0}),ht("design:type",Oh)],x0.prototype,"PublicKey",void 0);x0=Ke([Ft({localName:ge.ElementNames.ECDSAKeyValue,namespaceURI:w0,prefix:S0})],x0);function V9(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 qe(Ie.CRYPTOGRAPHIC,"Unknown NamedCurve")}o(V9,"GetNamedCurveOid");function whe(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 qe(Ie.CRYPTOGRAPHIC,"Unknown NamedCurve OID")}o(whe,"GetNamedCurveFromOid");var She=class extends Map{static{o(this,"KeyInfoClauseRegistry")}},gl=new She;gl.set(ge.ElementNames.RSAKeyValue,l0);gl.set(ge.ElementNames.ECDSAKeyValue,x0);var l2=class{static{o(this,"KeyInfoClauseFactory")}static create(e){let t=gl.get(e);if(!t)throw new qe(Ie.KEY_INFO_CLAUSE_NOT_SUPPORTED,e);return new t}};var ux=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 qe(Ie.ALGORITHM_NOT_SUPPORTED,e.algorithm.name)}async exportKey(e){if(!this.Value)throw new qe(Ie.NULL_REFERENCE);return this.Value.exportKey(e)}OnGetXml(e){if(!this.Value)throw new qe(Ie.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=l2.create(s);i.LoadXml(n),this.value=i;return}catch{}}throw new qe(Ie.CRYPTOGRAPHIC,"Unsupported KeyValue in use")}};ux=Ke([Ft({localName:ge.ElementNames.KeyValue}),ht("design:paramtypes",[fi])],ux);var Ehe={"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"}},E0=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 yn.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()===lu){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=Ehe[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=Wr(this.raw.buffer);this.simpl=new ls({schema:t.result})}isHashedAlgorithm(e){return!!e.hash}};var f2=class extends $r{static{o(this,"X509IssuerSerial")}};Ke([Wt({localName:ge.ElementNames.X509IssuerName,namespaceURI:ge.NamespaceURI,prefix:ge.DefaultPrefix,required:!0}),ht("design:type",String)],f2.prototype,"X509IssuerName",void 0);Ke([Wt({localName:ge.ElementNames.X509SerialNumber,namespaceURI:ge.NamespaceURI,prefix:ge.DefaultPrefix,required:!0}),ht("design:type",String)],f2.prototype,"X509SerialNumber",void 0);f2=Ke([Ft({localName:ge.ElementNames.X509IssuerSerial})],f2);var Ph;(function(r){r[r.None=0]="None",r[r.EndCertOnly=1]="EndCertOnly",r[r.ExcludeRoot=2]="ExcludeRoot",r[r.WholeChain=3]="WholeChain"})(Ph||(Ph={}));var b0=class extends fi{static{o(this,"KeyInfoX509Data")}constructor(e,t=Ph.None){if(super(),this.x509crl=null,this.SubjectKeyIdList=[],e){if(e instanceof Uint8Array)this.AddCertificate(new E0(e));else if(e instanceof E0)switch(t){case Ph.None:case Ph.EndCertOnly:this.AddCertificate(e);break;case Ph.ExcludeRoot:this.AddCertificatesChainFrom(e,!1);break;case Ph.WholeChain:this.AddCertificatesChainFrom(e,!0);break}}}async importKey(e){throw new qe(Ie.METHOD_NOT_SUPPORTED)}async exportKey(e){if(!this.Certificates.length)throw new qe(Ie.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 qe(Ie.PARAM_REQUIRED,"certificate");this.X509CertificateList||(this.X509CertificateList=[]),this.X509CertificateList.push(e)}AddIssuerSerial(e,t){if(e==null)throw new qe(Ie.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(ge.NamespaceURI,n+ge.ElementNames.X509IssuerSerial),a=e.createElementNS(ge.NamespaceURI,n+ge.ElementNames.X509IssuerName);a.textContent=s.issuerName,i.appendChild(a);let u=e.createElementNS(ge.NamespaceURI,n+ge.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(ge.NamespaceURI,n+ge.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(ge.NamespaceURI,n+ge.ElementNames.X509SubjectName);i.textContent=s,t.appendChild(i)}),this.X509CertificateList!=null&&this.X509CertificateList.length>0&&this.X509CertificateList.forEach(s=>{let i=e.createElementNS(ge.NamespaceURI,n+ge.ElementNames.X509Certificate);i.textContent=wr.ToBase64(s.GetRaw()),t.appendChild(i)}),this.x509crl!=null){let s=e.createElementNS(ge.NamespaceURI,n+ge.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(ge.ElementNames.X509IssuerSerial);t&&t.forEach(s=>{let i=$r.GetChild(s,ge.ElementNames.X509IssuerName,ge.NamespaceURI,!0),a=$r.GetChild(s,ge.ElementNames.X509SerialNumber,ge.NamespaceURI,!0);i&&i.textContent&&a&&a.textContent&&this.AddIssuerSerial(i.textContent,a.textContent)}),t=this.GetChildren(ge.ElementNames.X509SKI),t&&t.forEach(s=>{if(s.textContent){let i=wr.FromBase64(s.textContent);this.AddSubjectKeyId(i)}}),t=this.GetChildren(ge.ElementNames.X509SubjectName),t?.forEach(s=>{s.textContent&&this.AddSubjectName(s.textContent)}),t=this.GetChildren(ge.ElementNames.X509Certificate),t&&t.forEach(s=>{if(s.textContent){let i=wr.FromBase64(s.textContent);this.AddCertificate(new E0(i))}});let n=this.GetChild(ge.ElementNames.X509CRL,!1);n&&n.textContent&&(this.x509crl=wr.FromBase64(n.textContent))}AddCertificatesChainFrom(e,t){}};b0=Ke([Ft({localName:ge.ElementNames.X509Data}),ht("design:paramtypes",[Object,Object])],b0);var cx=class extends fi{static{o(this,"SPKIData")}async importKey(e){let t=await yn.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 yn.crypto.subtle.importKey("spki",this.SPKIexp,e,!0,["verify"]);return this.Key=t,t}};Ke([Wt({localName:ge.ElementNames.SPKIexp,namespaceURI:ge.NamespaceURI,prefix:ge.DefaultPrefix,required:!0,converter:Vi}),ht("design:type",Object)],cx.prototype,"SPKIexp",void 0);cx=Ke([Ft({localName:ge.ElementNames.SPKIData})],cx);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!==Mt.Element)continue;let s=null;switch(n.localName){case ge.ElementNames.KeyValue:s=ux;break;case ge.ElementNames.X509Data:s=b0;break;case ge.ElementNames.SPKIData:s=cx;break;case ge.ElementNames.KeyName:case ge.ElementNames.RetrievalMethod:case ge.ElementNames.PGPData:case ge.ElementNames.MgmtData:}if(s){let i=new s;i.LoadXml(n),this.Add(i)}}}};Ke([kr({localName:ge.AttributeNames.Id,defaultValue:""}),ht("design:type",String)],kh.prototype,"Id",void 0);kh=Ke([Ft({localName:ge.ElementNames.KeyInfo})],kh);var vl=class extends $r{static{o(this,"Signature")}};Ke([kr({localName:ge.AttributeNames.Id,defaultValue:""}),ht("design:type",String)],vl.prototype,"Id",void 0);Ke([Wt({parser:du,required:!0}),ht("design:type",du)],vl.prototype,"SignedInfo",void 0);Ke([Wt({localName:ge.ElementNames.SignatureValue,namespaceURI:ge.NamespaceURI,prefix:ge.DefaultPrefix,required:!0,converter:Vi,defaultValue:null}),ht("design:type",Object)],vl.prototype,"SignatureValue",void 0);Ke([Wt({parser:kh}),ht("design:type",kh)],vl.prototype,"KeyInfo",void 0);Ke([Wt({parser:ax,noRoot:!0}),ht("design:type",ax)],vl.prototype,"ObjectList",void 0);vl=Ke([Ft({localName:ge.ElementNames.Signature})],vl);var Ahe=class extends Map{static{o(this,"AlgorithmRegistry")}},dr=new Ahe;dr.set(n2,{type:"signature",algorithm:a0});dr.set(s2,{type:"signature",algorithm:o0});dr.set(i2,{type:"signature",algorithm:u0});dr.set(a2,{type:"signature",algorithm:c0});dr.set(n2,{type:"signature",algorithm:a0});dr.set(s2,{type:"signature",algorithm:o0});dr.set(i2,{type:"signature",algorithm:u0});dr.set(a2,{type:"signature",algorithm:c0});dr.set(qB,{type:"signature",algorithm:u2});dr.set(YA,{type:"signature",algorithm:t0});dr.set(QA,{type:"signature",algorithm:r0});dr.set(ZA,{type:"signature",algorithm:n0});dr.set(e2,{type:"signature",algorithm:s0});dr.set(YA.toUpperCase(),{type:"signature",algorithm:t0});dr.set(QA.toUpperCase(),{type:"signature",algorithm:r0});dr.set(ZA.toUpperCase(),{type:"signature",algorithm:n0});dr.set(e2.toUpperCase(),{type:"signature",algorithm:s0});dr.set(LB,{type:"signature",algorithm:rx});dr.set(VB,{type:"signature",algorithm:nx});dr.set(UB,{type:"signature",algorithm:sx});dr.set(jB,{type:"signature",algorithm:ix});dr.set(Ym,{type:"hash",algorithm:WA});dr.set(Qm,{type:"hash",algorithm:tx});dr.set(Zm,{type:"hash",algorithm:zA});dr.set(e0,{type:"hash",algorithm:JA});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 qe(Ie.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 qe(Ie.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 qe(Ie.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 qe(Ie.ALGORITHM_NOT_SUPPORTED,e.name)}};var Che=class extends Map{static{o(this,"TransformRegistry")}},mu=new Che;mu.set(ge.AlgorithmNamespaces.XmlDsigBase64Transform,hu);mu.set(ge.AlgorithmNamespaces.XmlDsigC14NTransform,lo);mu.set(ge.AlgorithmNamespaces.XmlDsigC14NWithCommentsTransform,fo);mu.set(ge.AlgorithmNamespaces.XmlDsigEnvelopedSignatureTransform,pu);mu.set(ge.AlgorithmNamespaces.XmlDsigExcC14NTransform,ho);mu.set(ge.AlgorithmNamespaces.XmlDsigExcC14NWithCommentsTransform,po);var ox=class{static{o(this,"CryptoConfig")}static CreateFromName(e){if(!e)throw new qe(Ie.PARAM_REQUIRED,"name");let t=mu.get(e);if(t)return new t;let n;switch(e){case ge.AlgorithmNamespaces.XmlDsigBase64Transform:n=new hu;break;case ge.AlgorithmNamespaces.XmlDsigC14NTransform:n=new lo;break;case ge.AlgorithmNamespaces.XmlDsigC14NWithCommentsTransform:n=new fo;break;case ge.AlgorithmNamespaces.XmlDsigEnvelopedSignatureTransform:n=new pu;break;case ge.AlgorithmNamespaces.XmlDsigXPathTransform:throw new qe(Ie.ALGORITHM_NOT_SUPPORTED,e);case ge.AlgorithmNamespaces.XmlDsigXsltTransform:throw new qe(Ie.ALGORITHM_NOT_SUPPORTED,e);case ge.AlgorithmNamespaces.XmlDsigExcC14NTransform:n=new ho;break;case ge.AlgorithmNamespaces.XmlDsigExcC14NWithCommentsTransform:n=new po;break;case ge.AlgorithmNamespaces.XmlDecryptionTransform:throw new qe(Ie.ALGORITHM_NOT_SUPPORTED,e);default:throw new qe(Ie.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 co;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){mu.set(e,t)}};var h2=Zx(OI(),1);var U9={xmldec:{version:"1.0",encoding:"UTF-8",standalone:void 0}};var j9={explicitArray:!1,explicitRoot:!1,preserveChildrenOrder:!0};var M9=class{static{o(this,"Xml2JsToolkit")}xml2js;constructor(e=Ihe){this.xml2js=e,rM({XMLSerializer:h2.default.XMLSerializer,DOMParser:h2.default.DOMParser,DOMImplementation:h2.default.DOMImplementation})}async validate(e,t){try{return await IU.validate(e,t),ri()}catch(n){return qu(n)}}parse(e,t){return new Promise((n,s)=>new this.xml2js.Parser({...j9,...t}).parseString(e,(i,a)=>i?s(i):n(a)))}build(e,t){return Promise.resolve(new this.xml2js.Builder({...U9,...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 uo(t.includeComments,t.exclusive).Canonicalize(n)}getNode(e,t){let s=Li(e).documentElement.getElementsByTagName(t).item(0);return s?this.clear(Za(s)):null}getFirstNode(e){let n=Li(e).documentElement.firstChild;return n?this.clear(Za(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(Za(n))}hash(e,t){return The.createHash(t).update(e,"utf8").digest().toString("base64")}clear(e){return['xmlns:default="http://www.w3.org/2000/09/xmldsig#"',' standalone="no"',"default:",":default",`
110
+ `,"\r"," "].reduce((n,s)=>n.replace(s,""),e.replace(/(>)\s*(<)/gm,"$1$2"))}};import{registerDecorator as _he}from"class-validator";var F9=o(r=>(e,t)=>{_he({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 q9}from"class-validator";var A0=Symbol("choice"),C0=o(r=>r==null||r==="","isEmpty"),VTe=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)q9({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 S=h[v];if(!C0(S))return!1}for(let v of g)if(v!==x)for(let S of v.properties){let E=h[S];if(!C0(E))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)q9({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 Dhe}from"class-transformer";var KTe=o(({fixed:r,...e}={fixed:2})=>(t,n)=>{F9(e)(t,n),Dhe(({value:s})=>np.newOrUndefined(s)?.toFixed(r))(t,n)},"TransformDecimal");import{Transform as Ohe}from"class-transformer";import{IsDateString as Phe}from"class-validator";import KB from"dayjs";import Bhe from"dayjs/plugin/utc.js";import Rhe from"dayjs/plugin/timezone.js";KB.extend(Bhe);KB.extend(Rhe);var H9=KB;var eIe=o((r={})=>(e,t)=>{Ohe(({value:n})=>{let s=n instanceof Date?n.toISOString():n;return s?H9(s).tz("America/Sao_Paulo").format(r.format):void 0})(e,t),Phe()(e,t)},"TransformDateString");var K9=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,S,E)=>v+S*a[E],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,S,E)=>v+S*h[E],0)%11,x=g===0||g===1?0:11-g;return s===f&&i===x}};var $9=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 G9=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 X9=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 W9=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(S=>parseInt(S,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 S=0;S<i.length;S++)a+=n[S]*i[S];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(S=>parseInt(S,10)),m=t.length===8?[8,7,6,5,4,3,2]:[9,8,7,6,5,4,3,2],g=0;for(let S=0;S<m.length;S++)g+=h[S]*m[S];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 z9=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 J9=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 Y9=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 Q9=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 Z9=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 eq=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,S=(parseInt(s[x])*v).toString();i+=S.split("").reduce((E,C)=>E+parseInt(C),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 tq=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 rq=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 nq=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 sq=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 iq=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 aq=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 oq=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 uq=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 cq=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 lq=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 fq=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 hq=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 pq=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 dq=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 mq=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 gq=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 p2=class{static{o(this,"ASN1")}extractCertificateInfo(e){let n=e.subject.split(`
111
+ `).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 S=g.subarray(-x).toString("utf8");return S.substring(Buffer.from(S).findIndex((E,C)=>S.charCodeAt(C)>=32&&S.charCodeAt(C)<=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 yq=class{static{o(this,"NativeCertificateRepository")}httpClient;cache;constructor(e,t=new lw){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 dn("Cannot read certificate"));let[{cert:m},...g]=h;if(!m)return ti(new dn("Issuer Certificate not found"));let x=f[u]?.[0].key;if(!x)return ti(new dn("Certificate Private Key not found"));let v=g.reduce((b,{cert:A})=>(A&&b.push(new N0.X509Certificate(Vh.default.pki.certificateToPem(A))),b),[]),S=Vh.default.pki.privateKeyToPem(x),E=Vh.default.pki.certificateToPem(m),C=N0.createPrivateKey(S),_=new N0.X509Certificate(E);return ri({ca:v,password:t,privateKey:C,certificate:_})}catch(t){return qu(t)}}async sign(e,t,n=Nu.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(qu(s))}}getCertificateInfo(e){return new p2().extractCertificateInfo(e)}getStringCertificate(e){return e.raw.toString("base64")}getStringPrivateKey(e){try{return e.export({type:"pkcs8",format:"pem"})}catch{throw new dn("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(khe.isAbsolute(t)||vq.existsSync(t))return this.hitBufferOnCache(s,vq.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 qu(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 aDe={[Er.AC]:"America/Rio_Branco",[Er.AL]:"America/Maceio",[Er.AM]:"America/Manaus",[Er.AP]:"America/Belem",[Er.BA]:"America/Bahia",[Er.CE]:"America/Fortaleza",[Er.DF]:"America/Sao_Paulo",[Er.ES]:"America/Sao_Paulo",[Er.GO]:"America/Sao_Paulo",[Er.MA]:"America/Fortaleza",[Er.MG]:"America/Sao_Paulo",[Er.MS]:"America/Campo_Grande",[Er.MT]:"America/Cuiaba",[Er.PA]:"America/Belem",[Er.PB]:"America/Fortaleza",[Er.PE]:"America/Recife",[Er.PI]:"America/Fortaleza",[Er.PR]:"America/Sao_Paulo",[Er.RJ]:"America/Sao_Paulo",[Er.RN]:"America/Fortaleza",[Er.RO]:"America/Porto_Velho",[Er.RR]:"America/Boa_Vista",[Er.RS]:"America/Sao_Paulo",[Er.SC]:"America/Sao_Paulo",[Er.SE]:"America/Maceio",[Er.SP]:"America/Sao_Paulo",[Er.TO]:"America/Araguaina"};export{_C as a,gP as b,DC as c,Nu as d,BC as e,Er as f,Vhe as g,jhe as h,dn as i,vP as j,RC as k,Zh as l,ti as m,ri as n,yP as o,xP as p,$0 as q,dpe as r,mpe as s,tw as t,wP as u,SP as v,EP as w,Cpe as x,np as y,VP as z,lw as A,yq as B,v8 as C,x8 as D,N8 as E,wU as F,M9 as G,F9 as H,VTe as I,KTe as J,eIe as K,K9 as L,$9 as M,G9 as N,X9 as O,W9 as P,z9 as Q,J9 as R,Y9 as S,Q9 as T,Z9 as U,eq as V,tq as W,rq as X,nq as Y,sq as Z,iq as _,aq as $,oq as aa,uq as ba,cq as ca,lq as da,fq as ea,hq as fa,pq as ga,dq as ha,mq as ia,gq as ja,p2 as ka};
112
+ /*! Bundled license information:
113
+
114
+ lodash/lodash.js:
115
+ (**
116
+ * @license
117
+ * Lodash <https://lodash.com/>
118
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
119
+ * Released under MIT license <https://lodash.com/license>
120
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
121
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
122
+ *)
123
+
124
+ mime-db/index.js:
125
+ (*!
126
+ * mime-db
127
+ * Copyright(c) 2014 Jonathan Ong
128
+ * Copyright(c) 2015-2022 Douglas Christopher Wilson
129
+ * MIT Licensed
130
+ *)
131
+
132
+ mime-types/index.js:
133
+ (*!
134
+ * mime-types
135
+ * Copyright(c) 2014 Jonathan Ong
136
+ * Copyright(c) 2015 Douglas Christopher Wilson
137
+ * MIT Licensed
138
+ *)
139
+
140
+ axios/dist/node/axios.cjs:
141
+ (*! Axios v1.13.2 Copyright (c) 2025 Matt Zabriskie and contributors *)
142
+
143
+ js-md4/src/md4.js:
144
+ (**
145
+ * [js-md4]{@link https://github.com/emn178/js-md4}
146
+ *
147
+ * @namespace md4
148
+ * @version 0.3.2
149
+ * @author Yi-Cyuan Chen [emn178@gmail.com]
150
+ * @copyright Yi-Cyuan Chen 2015-2027
151
+ * @license MIT
152
+ *)
153
+
154
+ sax/lib/sax.js:
155
+ sax/lib/sax.js:
156
+ (*! http://mths.be/fromcodepoint v0.1.0 by @mathias *)
157
+
158
+ decimal.js/decimal.mjs:
159
+ (*!
160
+ * decimal.js v10.6.0
161
+ * An arbitrary-precision Decimal type for JavaScript.
162
+ * https://github.com/MikeMcl/decimal.js
163
+ * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
164
+ * MIT Licence
165
+ *)
166
+
167
+ pvtsutils/build/index.es.js:
168
+ (*!
169
+ * MIT License
170
+ *
171
+ * Copyright (c) 2017-2024 Peculiar Ventures, LLC
172
+ *
173
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
174
+ * of this software and associated documentation files (the "Software"), to deal
175
+ * in the Software without restriction, including without limitation the rights
176
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
177
+ * copies of the Software, and to permit persons to whom the Software is
178
+ * furnished to do so, subject to the following conditions:
179
+ *
180
+ * The above copyright notice and this permission notice shall be included in all
181
+ * copies or substantial portions of the Software.
182
+ *
183
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
184
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
185
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
186
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
187
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
188
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
189
+ * SOFTWARE.
190
+ *
191
+ *)
192
+
193
+ pvutils/build/utils.es.js:
194
+ (*!
195
+ Copyright (c) Peculiar Ventures, LLC
196
+ *)
197
+
198
+ asn1js/build/index.es.js:
199
+ (*!
200
+ * Copyright (c) 2014, GMO GlobalSign
201
+ * Copyright (c) 2015-2022, Peculiar Ventures
202
+ * All rights reserved.
203
+ *
204
+ * Author 2014-2019, Yury Strozhevsky
205
+ *
206
+ * Redistribution and use in source and binary forms, with or without modification,
207
+ * are permitted provided that the following conditions are met:
208
+ *
209
+ * * Redistributions of source code must retain the above copyright notice, this
210
+ * list of conditions and the following disclaimer.
211
+ *
212
+ * * Redistributions in binary form must reproduce the above copyright notice, this
213
+ * list of conditions and the following disclaimer in the documentation and/or
214
+ * other materials provided with the distribution.
215
+ *
216
+ * * Neither the name of the copyright holder nor the names of its
217
+ * contributors may be used to endorse or promote products derived from
218
+ * this software without specific prior written permission.
219
+ *
220
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
221
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
222
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
223
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
224
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
225
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
226
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
227
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
228
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
229
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
230
+ *
231
+ *)
232
+
233
+ @noble/hashes/esm/utils.js:
234
+ (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
235
+
236
+ pkijs/build/index.es.js:
237
+ (*!
238
+ * Copyright (c) 2014, GlobalSign
239
+ * Copyright (c) 2015-2019, Peculiar Ventures
240
+ * All rights reserved.
241
+ *
242
+ * Author 2014-2019, Yury Strozhevsky
243
+ *
244
+ * Redistribution and use in source and binary forms, with or without modification,
245
+ * are permitted provided that the following conditions are met:
246
+ *
247
+ * * Redistributions of source code must retain the above copyright notice, this
248
+ * list of conditions and the following disclaimer.
249
+ *
250
+ * * Redistributions in binary form must reproduce the above copyright notice, this
251
+ * list of conditions and the following disclaimer in the documentation and/or
252
+ * other materials provided with the distribution.
253
+ *
254
+ * * Neither the name of the {organization} nor the names of its
255
+ * contributors may be used to endorse or promote products derived from
256
+ * this software without specific prior written permission.
257
+ *
258
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
259
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
260
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
261
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
262
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
263
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
264
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
265
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
266
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
267
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
268
+ *
269
+ *)
270
+ */