Files
2026-10-07 20:48:58 +00:00

118 lines
1.2 MiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*! sw.js (wabac.js 2.27.2) is part of Webrecorder project. Copyright (C) 2020-2026, Webrecorder Software. Licensed under the Affero General Public License v3. */var e={152(e,t){class n{static isArrayBuffer(e){return"[object ArrayBuffer]"===Object.prototype.toString.call(e)}static toArrayBuffer(e){return this.isArrayBuffer(e)?e:e.byteLength===e.buffer.byteLength?e.buffer:this.toUint8Array(e).slice().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){const r=n.toUint8Array(e),i=n.toUint8Array(t);if(r.length!==i.byteLength)return!1;for(let e=0;e<r.length;e++)if(r[e]!==i[e])return!1;return!0}static concat(...e){if(Array.isArray(e[0])){const t=e[0];let n=0;for(const e of t)n+=e.byteLength;const r=new Uint8Array(n);let i=0;for(const e of t){const t=this.toUint8Array(e);r.set(t,i),i+=t.length}return e[1]?this.toView(r,e[1]):r.buffer}return this.concat(e)}}class r{static fromString(e){const t=unescape(encodeURIComponent(e)),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n.buffer}static toString(e){const t=n.toUint8Array(e);let r="";for(let e=0;e<t.length;e++)r+=String.fromCharCode(t[e]);return decodeURIComponent(escape(r))}}class i{static toString(e,t=!1){const r=n.toArrayBuffer(e),i=new DataView(r);let s="";for(let e=0;e<r.byteLength;e+=2){const n=i.getUint16(e,t);s+=String.fromCharCode(n)}return s}static fromString(e,t=!1){const n=new ArrayBuffer(2*e.length),r=new DataView(n);for(let n=0;n<e.length;n++)r.setUint16(2*n,e.charCodeAt(n),t);return n}}class s{static isHex(e){return"string"==typeof e&&/^[a-z0-9]+$/i.test(e)}static isBase64(e){return"string"==typeof e&&/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}static isBase64Url(e){return"string"==typeof e&&/^[a-zA-Z0-9-_]+$/i.test(e)}static ToString(e,t="utf8"){const r=n.toUint8Array(e);switch(t.toLowerCase()){case"utf8":return this.ToUtf8String(r);case"binary":return this.ToBinary(r);case"hex":return this.ToHex(r);case"base64":return this.ToBase64(r);case"base64url":return this.ToBase64Url(r);case"utf16le":return i.toString(r,!0);case"utf16":case"utf16be":return i.toString(r);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 i.fromString(e,!0);case"utf16":case"utf16be":return i.fromString(e);default:throw new Error(`Unknown type of encoding '${t}'`)}}static ToBase64(e){const t=n.toUint8Array(e);if("undefined"!=typeof btoa){const e=this.ToString(t,"binary");return btoa(e)}return Buffer.from(t).toString("base64")}static FromBase64(e){const t=this.formatString(e);if(!t)return new ArrayBuffer(0);if(!s.isBase64(t))throw new TypeError("Argument 'base64Text' is not Base64 encoded");return"undefined"!=typeof atob?this.FromBinary(atob(t)):new Uint8Array(Buffer.from(t,"base64")).buffer}static FromBase64Url(e){const t=this.formatString(e);if(!t)return new ArrayBuffer(0);if(!s.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=s.DEFAULT_UTF8_ENCODING){switch(t){case"ascii":return this.FromBinary(e);case"utf8":return r.fromString(e);case"utf16":case"utf16be":return i.fromString(e);case"utf16le":case"usc2":return i.fromString(e,!0);default:throw new Error(`Unknown type of encoding '${t}'`)}}static ToUtf8String(e,t=s.DEFAULT_UTF8_ENCODING){switch(t){case"ascii":return this.ToBinary(e);case"utf8":return r.toString(e);case"utf16":case"utf16be":return i.toString(e);case"utf16le":case"usc2":return i.toString(e,!0);default:throw new Error(`Unknown type of encoding '${t}'`)}}static FromBinary(e){const t=e.length,n=new Uint8Array(t);for(let r=0;r<t;r++)n[r]=e.charCodeAt(r);return n.buffer}static ToBinary(e){const t=n.toUint8Array(e);let r="";for(let e=0;e<t.length;e++)r+=String.fromCharCode(t[e]);return r}static ToHex(e){const t=n.toUint8Array(e),r=[],i=t.length;for(let e=0;e<i;e++){const n=t[e].toString(16).padStart(2,"0");r.push(n)}return r.join("")}static FromHex(e){let t=this.formatString(e);if(!t)return new ArrayBuffer(0);if(!s.isHex(t))throw new TypeError("Argument 'hexString' is not HEX encoded");t.length%2&&(t=`0${t}`);const n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2){const r=t.slice(e,e+2);n[e/2]=parseInt(r,16)}return n.buffer}static ToUtf16String(e,t=!1){return i.toString(e,t)}static FromUtf16String(e,t=!1){return i.fromString(e,t)}static Base64Padding(e){const t=4-e.length%4;if(t<4)for(let n=0;n<t;n++)e+="=";return e}static formatString(e){return(null==e?void 0:e.replace(/[\n\r\t ]/g,""))||""}}s.DEFAULT_UTF8_ENCODING="utf8",t._H=n,t.U$=s,t.kg=function(...e){const t=e.map(e=>e.byteLength).reduce((e,t)=>e+t),n=new Uint8Array(t);let r=0;return e.map(e=>new Uint8Array(e)).forEach(e=>{for(const t of e)n[r++]=t}),n.buffer},t.n4=function(e,t){if(!e||!t)return!1;if(e.byteLength!==t.byteLength)return!1;const n=new Uint8Array(e),r=new Uint8Array(t);for(let t=0;t<e.byteLength;t++)if(n[t]!==r[t])return!1;return!0}},251(e,t){
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
t.read=function(e,t,n,r,i){var s,o,a=8*i-r-1,c=(1<<a)-1,l=c>>1,h=-7,u=n?i-1:0,p=n?-1:1,d=e[t+u];for(u+=p,s=d&(1<<-h)-1,d>>=-h,h+=a;h>0;s=256*s+e[t+u],u+=p,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=r;h>0;o=256*o+e[t+u],u+=p,h-=8);if(0===s)s=1-l;else{if(s===c)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,r),s-=l}return(d?-1:1)*o*Math.pow(2,s-r)},t.write=function(e,t,n,r,i,s){var o,a,c,l=8*s-i-1,h=(1<<l)-1,u=h>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:s-1,f=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+u>=1?p/c:p*Math.pow(2,1-u))*c>=2&&(o++,c/=2),o+u>=h?(a=0,o=h):o+u>=1?(a=(t*c-1)*Math.pow(2,i),o+=u):(a=t*Math.pow(2,u-1)*Math.pow(2,i),o=0));i>=8;e[n+d]=255&a,d+=f,a/=256,i-=8);for(o=o<<i|a,l+=i;l>0;e[n+d]=255&o,d+=f,o/=256,l-=8);e[n+d-f]|=128*g}},345(e,t,n){e.exports=n(7007).EventEmitter},460(e,t,n){const{DANGEROUS_PROPERTY_NAMES:r,criticalProperties:i}=n(5334),s=e=>r.includes(e)?"__"+e:e,o={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,onDangerousProperty:s};function a(e,t){if("string"!=typeof e)return;const n=e.toLowerCase();if(r.some(e=>n===e.toLowerCase()))throw new Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);if(i.some(e=>n===e.toLowerCase()))throw new Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`)}function c(e){return"boolean"==typeof e?{enabled:e,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,allowedTags:null,tagFilter:null}:"object"==typeof e&&null!==e?{enabled:!1!==e.enabled,maxEntitySize:Math.max(1,e.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,e.maxExpansionDepth??10),maxTotalExpansions:Math.max(1,e.maxTotalExpansions??1e3),maxExpandedLength:Math.max(1,e.maxExpandedLength??1e5),maxEntityCount:Math.max(1,e.maxEntityCount??100),allowedTags:e.allowedTags??null,tagFilter:e.tagFilter??null}:c(!0)}t.buildOptions=function(e){const t=Object.assign({},o,e),n=[{value:t.attributeNamePrefix,name:"attributeNamePrefix"},{value:t.attributesGroupName,name:"attributesGroupName"},{value:t.textNodeName,name:"textNodeName"},{value:t.cdataPropName,name:"cdataPropName"},{value:t.commentPropName,name:"commentPropName"}];for(const{value:e,name:t}of n)e&&a(e,t);return null===t.onDangerousProperty&&(t.onDangerousProperty=s),t.processEntities=c(t.processEntities),t},t.defaultOptions=o},575(){},640(e){!function(t){const n="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${n}\\.${n}\\.${n}\\.${n}$`,"i"),threeOctet:new RegExp(`^${n}\\.${n}\\.${n}$`,"i"),twoOctet:new RegExp(`^${n}\\.${n}$`,"i"),longValue:new RegExp(`^${n}$`,"i")},i=new RegExp("^0[0-7]+$","i"),s=new RegExp("^0x[a-f0-9]+$","i"),o="%[0-9a-z]{1,}",a="(?:[0-9a-f]+::?)+",c={zoneIndex:new RegExp(o,"i"),native:new RegExp(`^(::)?(${a})?([0-9a-f]+)?(::)?(${o})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${n}\\.${n}\\.${n}\\.${n}(${o})?)$`,"i"),transitional:new RegExp(`^((?:${a})|(?:::)(?:${a})?)${n}\\.${n}\\.${n}\\.${n}(${o})?$`,"i")};function l(e,t){if(e.indexOf("::")!==e.lastIndexOf("::"))return null;let n,r,i=0,s=-1,o=(e.match(c.zoneIndex)||[])[0];for(o&&(o=o.substring(1),e=e.replace(/%.+$/,""));(s=e.indexOf(":",s+1))>=0;)i++;if("::"===e.substr(0,2)&&i--,"::"===e.substr(-2,2)&&i--,i>t)return null;for(r=t-i,n=":";r--;)n+="0:";return":"===(e=e.replace("::",n))[0]&&(e=e.slice(1)),":"===e[e.length-1]&&(e=e.slice(0,-1)),t=function(){const t=e.split(":"),n=[];for(let e=0;e<t.length;e++)n.push(parseInt(t[e],16));return n}(),{parts:t,zoneId:o}}function h(e,t,n,r){if(e.length!==t.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let i,s=0;for(;r>0;){if(i=n-r,i<0&&(i=0),e[s]>>i!==t[s]>>i)return!1;r-=n,s+=1}return!0}function u(e){if(s.test(e))return parseInt(e,16);if("0"===e[0]&&!isNaN(parseInt(e[1],10))){if(i.test(e))return parseInt(e,8);throw new Error(`ipaddr: cannot parse ${e} as octal`)}return parseInt(e,10)}function p(e,t){for(;e.length<t;)e=`0${e}`;return e}const d={};d.IPv4=function(){function e(e){if(4!==e.length)throw new Error("ipaddr: ipv4 octet count should be 4");let t,n;for(t=0;t<e.length;t++)if(n=e[t],!(0<=n&&n<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=e}return e.prototype.SpecialRanges={unspecified:[[new e([0,0,0,0]),8]],broadcast:[[new e([255,255,255,255]),32]],multicast:[[new e([224,0,0,0]),4]],linkLocal:[[new e([169,254,0,0]),16]],loopback:[[new e([127,0,0,0]),8]],carrierGradeNat:[[new e([100,64,0,0]),10]],private:[[new e([10,0,0,0]),8],[new e([172,16,0,0]),12],[new e([192,168,0,0]),16]],reserved:[[new e([192,0,0,0]),24],[new e([192,0,2,0]),24],[new e([192,88,99,0]),24],[new e([198,51,100,0]),24],[new e([203,0,113,0]),24],[new e([240,0,0,0]),4]]},e.prototype.kind=function(){return"ipv4"},e.prototype.match=function(e,t){let n;if(void 0===t&&(n=e,e=n[0],t=n[1]),"ipv4"!==e.kind())throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return h(this.octets,e.octets,8,t)},e.prototype.prefixLengthFromSubnetMask=function(){let e=0,t=!1;const n={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0};let r,i,s;for(r=3;r>=0;r-=1){if(i=this.octets[r],!(i in n))return null;if(s=n[i],t&&0!==s)return null;8!==s&&(t=!0),e+=s}return 32-e},e.prototype.range=function(){return d.subnetMatch(this,this.SpecialRanges)},e.prototype.toByteArray=function(){return this.octets.slice(0)},e.prototype.toIPv4MappedAddress=function(){return d.IPv6.parse(`::ffff:${this.toString()}`)},e.prototype.toNormalizedString=function(){return this.toString()},e.prototype.toString=function(){return this.octets.join(".")},e}(),d.IPv4.broadcastAddressFromCIDR=function(e){try{const t=this.parseCIDR(e),n=t[0].toByteArray(),r=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),i=[];let s=0;for(;s<4;)i.push(parseInt(n[s],10)|255^parseInt(r[s],10)),s++;return new this(i)}catch(e){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},d.IPv4.isIPv4=function(e){return null!==this.parser(e)},d.IPv4.isValid=function(e){try{return new this(this.parser(e)),!0}catch(e){return!1}},d.IPv4.isValidFourPartDecimal=function(e){return!(!d.IPv4.isValid(e)||!e.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},d.IPv4.networkAddressFromCIDR=function(e){let t,n,r,i,s;try{for(t=this.parseCIDR(e),r=t[0].toByteArray(),s=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),i=[],n=0;n<4;)i.push(parseInt(r[n],10)&parseInt(s[n],10)),n++;return new this(i)}catch(e){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},d.IPv4.parse=function(e){const t=this.parser(e);if(null===t)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(t)},d.IPv4.parseCIDR=function(e){let t;if(t=e.match(/^(.+)\/(\d+)$/)){const e=parseInt(t[2]);if(e>=0&&e<=32){const n=[this.parse(t[1]),e];return Object.defineProperty(n,"toString",{value:function(){return this.join("/")}}),n}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},d.IPv4.parser=function(e){let t,n,i;if(t=e.match(r.fourOctet))return function(){const e=t.slice(1,6),r=[];for(let t=0;t<e.length;t++)n=e[t],r.push(u(n));return r}();if(t=e.match(r.longValue)){if(i=u(t[1]),i>4294967295||i<0)throw new Error("ipaddr: address outside defined range");return function(){const e=[];let t;for(t=0;t<=24;t+=8)e.push(i>>t&255);return e}().reverse()}return(t=e.match(r.twoOctet))?function(){const e=t.slice(1,4),n=[];if(i=u(e[1]),i>16777215||i<0)throw new Error("ipaddr: address outside defined range");return n.push(u(e[0])),n.push(i>>16&255),n.push(i>>8&255),n.push(255&i),n}():(t=e.match(r.threeOctet))?function(){const e=t.slice(1,5),n=[];if(i=u(e[2]),i>65535||i<0)throw new Error("ipaddr: address outside defined range");return n.push(u(e[0])),n.push(u(e[1])),n.push(i>>8&255),n.push(255&i),n}():null},d.IPv4.subnetMaskFromPrefixLength=function(e){if((e=parseInt(e))<0||e>32)throw new Error("ipaddr: invalid IPv4 prefix length");const t=[0,0,0,0];let n=0;const r=Math.floor(e/8);for(;n<r;)t[n]=255,n++;return r<4&&(t[r]=Math.pow(2,e%8)-1<<8-e%8),new this(t)},d.IPv6=function(){function e(e,t){let n,r;if(16===e.length)for(this.parts=[],n=0;n<=14;n+=2)this.parts.push(e[n]<<8|e[n+1]);else{if(8!==e.length)throw new Error("ipaddr: ipv6 part count should be 8 or 16");this.parts=e}for(n=0;n<this.parts.length;n++)if(r=this.parts[n],!(0<=r&&r<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");t&&(this.zoneId=t)}return e.prototype.SpecialRanges={unspecified:[new e([0,0,0,0,0,0,0,0]),128],linkLocal:[new e([65152,0,0,0,0,0,0,0]),10],multicast:[new e([65280,0,0,0,0,0,0,0]),8],loopback:[new e([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new e([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new e([0,0,0,0,0,65535,0,0]),96],rfc6145:[new e([0,0,0,0,65535,0,0,0]),96],rfc6052:[new e([100,65435,0,0,0,0,0,0]),96],"6to4":[new e([8194,0,0,0,0,0,0,0]),16],teredo:[new e([8193,0,0,0,0,0,0,0]),32],reserved:[[new e([8193,3512,0,0,0,0,0,0]),32]]},e.prototype.isIPv4MappedAddress=function(){return"ipv4Mapped"===this.range()},e.prototype.kind=function(){return"ipv6"},e.prototype.match=function(e,t){let n;if(void 0===t&&(n=e,e=n[0],t=n[1]),"ipv6"!==e.kind())throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return h(this.parts,e.parts,16,t)},e.prototype.prefixLengthFromSubnetMask=function(){let e=0,t=!1;const n={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0};let r,i;for(let s=7;s>=0;s-=1){if(r=this.parts[s],!(r in n))return null;if(i=n[r],t&&0!==i)return null;16!==i&&(t=!0),e+=i}return 128-e},e.prototype.range=function(){return d.subnetMatch(this,this.SpecialRanges)},e.prototype.toByteArray=function(){let e;const t=[],n=this.parts;for(let r=0;r<n.length;r++)e=n[r],t.push(e>>8),t.push(255&e);return t},e.prototype.toFixedLengthString=function(){const e=function(){const e=[];for(let t=0;t<this.parts.length;t++)e.push(p(this.parts[t].toString(16),4));return e}.call(this).join(":");let t="";return this.zoneId&&(t=`%${this.zoneId}`),e+t},e.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");const e=this.parts.slice(-2),t=e[0],n=e[1];return new d.IPv4([t>>8,255&t,n>>8,255&n])},e.prototype.toNormalizedString=function(){const e=function(){const e=[];for(let t=0;t<this.parts.length;t++)e.push(this.parts[t].toString(16));return e}.call(this).join(":");let t="";return this.zoneId&&(t=`%${this.zoneId}`),e+t},e.prototype.toRFC5952String=function(){const e=/((^|:)(0(:|$)){2,})/g,t=this.toNormalizedString();let n,r=0,i=-1;for(;n=e.exec(t);)n[0].length>i&&(r=n.index,i=n[0].length);return i<0?t:`${t.substring(0,r)}::${t.substring(r+i)}`},e.prototype.toString=function(){return this.toNormalizedString().replace(/((^|:)(0(:|$))+)/,"::")},e}(),d.IPv6.broadcastAddressFromCIDR=function(e){try{const t=this.parseCIDR(e),n=t[0].toByteArray(),r=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),i=[];let s=0;for(;s<16;)i.push(parseInt(n[s],10)|255^parseInt(r[s],10)),s++;return new this(i)}catch(e){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${e})`)}},d.IPv6.isIPv6=function(e){return null!==this.parser(e)},d.IPv6.isValid=function(e){if("string"==typeof e&&-1===e.indexOf(":"))return!1;try{const t=this.parser(e);return new this(t.parts,t.zoneId),!0}catch(e){return!1}},d.IPv6.networkAddressFromCIDR=function(e){let t,n,r,i,s;try{for(t=this.parseCIDR(e),r=t[0].toByteArray(),s=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),i=[],n=0;n<16;)i.push(parseInt(r[n],10)&parseInt(s[n],10)),n++;return new this(i)}catch(e){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${e})`)}},d.IPv6.parse=function(e){const t=this.parser(e);if(null===t.parts)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(t.parts,t.zoneId)},d.IPv6.parseCIDR=function(e){let t,n,r;if((n=e.match(/^(.+)\/(\d+)$/))&&(t=parseInt(n[2]),t>=0&&t<=128))return r=[this.parse(n[1]),t],Object.defineProperty(r,"toString",{value:function(){return this.join("/")}}),r;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},d.IPv6.parser=function(e){let t,n,r,i,s,o;if(r=e.match(c.deprecatedTransitional))return this.parser(`::ffff:${r[1]}`);if(c.native.test(e))return l(e,8);if((r=e.match(c.transitional))&&(o=r[6]||"",t=l(r[1].slice(0,-1)+o,6),t.parts)){for(s=[parseInt(r[2]),parseInt(r[3]),parseInt(r[4]),parseInt(r[5])],n=0;n<s.length;n++)if(i=s[n],!(0<=i&&i<=255))return null;return t.parts.push(s[0]<<8|s[1]),t.parts.push(s[2]<<8|s[3]),{parts:t.parts,zoneId:t.zoneId}}return null},d.IPv6.subnetMaskFromPrefixLength=function(e){if((e=parseInt(e))<0||e>128)throw new Error("ipaddr: invalid IPv6 prefix length");const t=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];let n=0;const r=Math.floor(e/8);for(;n<r;)t[n]=255,n++;return r<16&&(t[r]=Math.pow(2,e%8)-1<<8-e%8),new this(t)},d.fromByteArray=function(e){const t=e.length;if(4===t)return new d.IPv4(e);if(16===t)return new d.IPv6(e);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},d.isValid=function(e){return d.IPv6.isValid(e)||d.IPv4.isValid(e)},d.parse=function(e){if(d.IPv6.isValid(e))return d.IPv6.parse(e);if(d.IPv4.isValid(e))return d.IPv4.parse(e);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},d.parseCIDR=function(e){try{return d.IPv6.parseCIDR(e)}catch(t){try{return d.IPv4.parseCIDR(e)}catch(e){throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},d.process=function(e){const t=this.parse(e);return"ipv6"===t.kind()&&t.isIPv4MappedAddress()?t.toIPv4Address():t},d.subnetMatch=function(e,t,n){let r,i,s,o;for(i in null==n&&(n="unicast"),t)if(Object.prototype.hasOwnProperty.call(t,i))for(s=t[i],!s[0]||s[0]instanceof Array||(s=[s]),r=0;r<s.length;r++)if(o=s[r],e.kind()===o[0].kind()&&e.match.apply(e,o))return i;return n},e.exports?e.exports=d:t.ipaddr=d}(this)},1447(e,t,n){var r=n(9805),i=n(3269),s=n(4823),o=n(7293),a=n(1998),c=-2,l=12,h=30;function u(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function p(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function d(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(852),t.distcode=t.distdyn=new r.Buf32(592),t.sane=1,t.back=-1,0):c}function f(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,d(e)):c}function g(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?c:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,f(e))):c}function m(e,t){var n,r;return e?(r=new p,e.state=r,r.window=null,0!==(n=g(e,t))&&(e.state=null),n):c}var w,y,b=!0;function A(e){if(b){var t;for(w=new r.Buf32(512),y=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,w,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,y,0,e.work,{bits:5}),b=!1}e.lencode=w,e.lenbits=9,e.distcode=y,e.distbits=5}function v(e,t,n,i){var s,o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new r.Buf8(o.wsize)),i>=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((s=o.wsize-o.wnext)>i&&(s=i),r.arraySet(o.window,t,n-i,s,o.wnext),(i-=s)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=s,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=s))),0}t.inflateReset=f,t.inflateReset2=g,t.inflateResetKeep=d,t.inflateInit=function(e){return m(e,15)},t.inflateInit2=m,t.inflate=function(e,t){var n,p,d,f,g,m,w,y,b,_,E,x,I,S,T,C,R,O,k,N,B,P,D,L,U=0,M=new r.Buf8(4),F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return c;(n=e.state).mode===l&&(n.mode=13),g=e.next_out,d=e.output,w=e.avail_out,f=e.next_in,p=e.input,m=e.avail_in,y=n.hold,b=n.bits,_=m,E=w,P=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;b<16;){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}if(2&n.wrap&&35615===y){n.check=0,M[0]=255&y,M[1]=y>>>8&255,n.check=s(n.check,M,2,0),y=0,b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&y)<<8)+(y>>8))%31){e.msg="incorrect header check",n.mode=h;break}if(8!=(15&y)){e.msg="unknown compression method",n.mode=h;break}if(b-=4,B=8+(15&(y>>>=4)),0===n.wbits)n.wbits=B;else if(B>n.wbits){e.msg="invalid window size",n.mode=h;break}n.dmax=1<<B,e.adler=n.check=1,n.mode=512&y?10:l,y=0,b=0;break;case 2:for(;b<16;){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}if(n.flags=y,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=h;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=h;break}n.head&&(n.head.text=y>>8&1),512&n.flags&&(M[0]=255&y,M[1]=y>>>8&255,n.check=s(n.check,M,2,0)),y=0,b=0,n.mode=3;case 3:for(;b<32;){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}n.head&&(n.head.time=y),512&n.flags&&(M[0]=255&y,M[1]=y>>>8&255,M[2]=y>>>16&255,M[3]=y>>>24&255,n.check=s(n.check,M,4,0)),y=0,b=0,n.mode=4;case 4:for(;b<16;){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}n.head&&(n.head.xflags=255&y,n.head.os=y>>8),512&n.flags&&(M[0]=255&y,M[1]=y>>>8&255,n.check=s(n.check,M,2,0)),y=0,b=0,n.mode=5;case 5:if(1024&n.flags){for(;b<16;){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}n.length=y,n.head&&(n.head.extra_len=y),512&n.flags&&(M[0]=255&y,M[1]=y>>>8&255,n.check=s(n.check,M,2,0)),y=0,b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((x=n.length)>m&&(x=m),x&&(n.head&&(B=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,p,f,x,B)),512&n.flags&&(n.check=s(n.check,p,x,f)),m-=x,f+=x,n.length-=x),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===m)break e;x=0;do{B=p[f+x++],n.head&&B&&n.length<65536&&(n.head.name+=String.fromCharCode(B))}while(B&&x<m);if(512&n.flags&&(n.check=s(n.check,p,x,f)),m-=x,f+=x,B)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===m)break e;x=0;do{B=p[f+x++],n.head&&B&&n.length<65536&&(n.head.comment+=String.fromCharCode(B))}while(B&&x<m);if(512&n.flags&&(n.check=s(n.check,p,x,f)),m-=x,f+=x,B)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;b<16;){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}if(y!==(65535&n.check)){e.msg="header crc mismatch",n.mode=h;break}y=0,b=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=l;break;case 10:for(;b<32;){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}e.adler=n.check=u(y),y=0,b=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=g,e.avail_out=w,e.next_in=f,e.avail_in=m,n.hold=y,n.bits=b,2;e.adler=n.check=1,n.mode=l;case l:if(5===t||6===t)break e;case 13:if(n.last){y>>>=7&b,b-=7&b,n.mode=27;break}for(;b<3;){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}switch(n.last=1&y,b-=1,3&(y>>>=1)){case 0:n.mode=14;break;case 1:if(A(n),n.mode=20,6===t){y>>>=2,b-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=h}y>>>=2,b-=2;break;case 14:for(y>>>=7&b,b-=7&b;b<32;){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}if((65535&y)!=(y>>>16^65535)){e.msg="invalid stored block lengths",n.mode=h;break}if(n.length=65535&y,y=0,b=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(x=n.length){if(x>m&&(x=m),x>w&&(x=w),0===x)break e;r.arraySet(d,p,f,x,g),m-=x,f+=x,w-=x,g+=x,n.length-=x;break}n.mode=l;break;case 17:for(;b<14;){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}if(n.nlen=257+(31&y),y>>>=5,b-=5,n.ndist=1+(31&y),y>>>=5,b-=5,n.ncode=4+(15&y),y>>>=4,b-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=h;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;b<3;){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}n.lens[F[n.have++]]=7&y,y>>>=3,b-=3}for(;n.have<19;)n.lens[F[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,D={bits:n.lenbits},P=a(0,n.lens,0,19,n.lencode,0,n.work,D),n.lenbits=D.bits,P){e.msg="invalid code lengths set",n.mode=h;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;C=(U=n.lencode[y&(1<<n.lenbits)-1])>>>16&255,R=65535&U,!((T=U>>>24)<=b);){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}if(R<16)y>>>=T,b-=T,n.lens[n.have++]=R;else{if(16===R){for(L=T+2;b<L;){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}if(y>>>=T,b-=T,0===n.have){e.msg="invalid bit length repeat",n.mode=h;break}B=n.lens[n.have-1],x=3+(3&y),y>>>=2,b-=2}else if(17===R){for(L=T+3;b<L;){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}b-=T,B=0,x=3+(7&(y>>>=T)),y>>>=3,b-=3}else{for(L=T+7;b<L;){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}b-=T,B=0,x=11+(127&(y>>>=T)),y>>>=7,b-=7}if(n.have+x>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=h;break}for(;x--;)n.lens[n.have++]=B}}if(n.mode===h)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=h;break}if(n.lenbits=9,D={bits:n.lenbits},P=a(1,n.lens,0,n.nlen,n.lencode,0,n.work,D),n.lenbits=D.bits,P){e.msg="invalid literal/lengths set",n.mode=h;break}if(n.distbits=6,n.distcode=n.distdyn,D={bits:n.distbits},P=a(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,D),n.distbits=D.bits,P){e.msg="invalid distances set",n.mode=h;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(m>=6&&w>=258){e.next_out=g,e.avail_out=w,e.next_in=f,e.avail_in=m,n.hold=y,n.bits=b,o(e,E),g=e.next_out,d=e.output,w=e.avail_out,f=e.next_in,p=e.input,m=e.avail_in,y=n.hold,b=n.bits,n.mode===l&&(n.back=-1);break}for(n.back=0;C=(U=n.lencode[y&(1<<n.lenbits)-1])>>>16&255,R=65535&U,!((T=U>>>24)<=b);){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}if(C&&!(240&C)){for(O=T,k=C,N=R;C=(U=n.lencode[N+((y&(1<<O+k)-1)>>O)])>>>16&255,R=65535&U,!(O+(T=U>>>24)<=b);){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}y>>>=O,b-=O,n.back+=O}if(y>>>=T,b-=T,n.back+=T,n.length=R,0===C){n.mode=26;break}if(32&C){n.back=-1,n.mode=l;break}if(64&C){e.msg="invalid literal/length code",n.mode=h;break}n.extra=15&C,n.mode=22;case 22:if(n.extra){for(L=n.extra;b<L;){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}n.length+=y&(1<<n.extra)-1,y>>>=n.extra,b-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;C=(U=n.distcode[y&(1<<n.distbits)-1])>>>16&255,R=65535&U,!((T=U>>>24)<=b);){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}if(!(240&C)){for(O=T,k=C,N=R;C=(U=n.distcode[N+((y&(1<<O+k)-1)>>O)])>>>16&255,R=65535&U,!(O+(T=U>>>24)<=b);){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}y>>>=O,b-=O,n.back+=O}if(y>>>=T,b-=T,n.back+=T,64&C){e.msg="invalid distance code",n.mode=h;break}n.offset=R,n.extra=15&C,n.mode=24;case 24:if(n.extra){for(L=n.extra;b<L;){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}n.offset+=y&(1<<n.extra)-1,y>>>=n.extra,b-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=h;break}n.mode=25;case 25:if(0===w)break e;if(x=E-w,n.offset>x){if((x=n.offset-x)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=h;break}x>n.wnext?(x-=n.wnext,I=n.wsize-x):I=n.wnext-x,x>n.length&&(x=n.length),S=n.window}else S=d,I=g-n.offset,x=n.length;x>w&&(x=w),w-=x,n.length-=x;do{d[g++]=S[I++]}while(--x);0===n.length&&(n.mode=21);break;case 26:if(0===w)break e;d[g++]=n.length,w--,n.mode=21;break;case 27:if(n.wrap){for(;b<32;){if(0===m)break e;m--,y|=p[f++]<<b,b+=8}if(E-=w,e.total_out+=E,n.total+=E,E&&(e.adler=n.check=n.flags?s(n.check,d,E,g-E):i(n.check,d,E,g-E)),E=w,(n.flags?y:u(y))!==n.check){e.msg="incorrect data check",n.mode=h;break}y=0,b=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;b<32;){if(0===m)break e;m--,y+=p[f++]<<b,b+=8}if(y!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=h;break}y=0,b=0}n.mode=29;case 29:P=1;break e;case h:P=-3;break e;case 31:return-4;default:return c}return e.next_out=g,e.avail_out=w,e.next_in=f,e.avail_in=m,n.hold=y,n.bits=b,(n.wsize||E!==e.avail_out&&n.mode<h&&(n.mode<27||4!==t))&&v(e,e.output,e.next_out,E-e.avail_out)?(n.mode=31,-4):(_-=e.avail_in,E-=e.avail_out,e.total_in+=_,e.total_out+=E,n.total+=E,n.wrap&&E&&(e.adler=n.check=n.flags?s(n.check,d,E,e.next_out-E):i(n.check,d,E,e.next_out-E)),e.data_type=n.bits+(n.last?64:0)+(n.mode===l?128:0)+(20===n.mode||15===n.mode?256:0),(0===_&&0===E||4===t)&&0===P&&(P=-5),P)},t.inflateEnd=function(e){if(!e||!e.state)return c;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var n;return e&&e.state&&2&(n=e.state).wrap?(n.head=t,t.done=!1,0):c},t.inflateSetDictionary=function(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?c:11===n.mode&&i(1,t,r,0)!==n.check?-3:v(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,0):c},t.inflateInfo="pako inflate (from Nodeca project)"},1668(e,t,n){var r={};(0,n(9805).assign)(r,n(3303),n(7083),n(9681)),e.exports=r},1996(e,t,n){var r=n(9805),i=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){s=!1}for(var o=new r.Buf8(256),a=0;a<256;a++)o[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function c(e,t){if(t<65534&&(e.subarray&&s||!e.subarray&&i))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",o=0;o<t;o++)n+=String.fromCharCode(e[o]);return n}o[254]=o[254]=1,t.string2buf=function(e){var t,n,i,s,o,a=e.length,c=0;for(s=0;s<a;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(i=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(i-56320),s++),c+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(c),o=0,s=0;o<c;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(i=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(i-56320),s++),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},t.buf2binstring=function(e){return c(e,e.length)},t.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},t.buf2string=function(e,t){var n,r,i,s,a=t||e.length,l=new Array(2*a);for(r=0,n=0;n<a;)if((i=e[n++])<128)l[r++]=i;else if((s=o[i])>4)l[r++]=65533,n+=s-1;else{for(i&=2===s?31:3===s?15:7;s>1&&n<a;)i=i<<6|63&e[n++],s--;s>1?l[r++]=65533:i<65536?l[r++]=i:(i-=65536,l[r++]=55296|i>>10&1023,l[r++]=56320|1023&i)}return c(l,r)},t.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+o[e[n]]>t?n:t}},1998(e,t,n){var r=n(9805),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],s=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,n,c,l,h,u,p){var d,f,g,m,w,y,b,A,v,_=p.bits,E=0,x=0,I=0,S=0,T=0,C=0,R=0,O=0,k=0,N=0,B=null,P=0,D=new r.Buf16(16),L=new r.Buf16(16),U=null,M=0;for(E=0;E<=15;E++)D[E]=0;for(x=0;x<c;x++)D[t[n+x]]++;for(T=_,S=15;S>=1&&0===D[S];S--);if(T>S&&(T=S),0===S)return l[h++]=20971520,l[h++]=20971520,p.bits=1,0;for(I=1;I<S&&0===D[I];I++);for(T<I&&(T=I),O=1,E=1;E<=15;E++)if(O<<=1,(O-=D[E])<0)return-1;if(O>0&&(0===e||1!==S))return-1;for(L[1]=0,E=1;E<15;E++)L[E+1]=L[E]+D[E];for(x=0;x<c;x++)0!==t[n+x]&&(u[L[t[n+x]]++]=x);if(0===e?(B=U=u,y=19):1===e?(B=i,P-=257,U=s,M-=257,y=256):(B=o,U=a,y=-1),N=0,x=0,E=I,w=h,C=T,R=0,g=-1,m=(k=1<<T)-1,1===e&&k>852||2===e&&k>592)return 1;for(;;){b=E-R,u[x]<y?(A=0,v=u[x]):u[x]>y?(A=U[M+u[x]],v=B[P+u[x]]):(A=96,v=0),d=1<<E-R,I=f=1<<C;do{l[w+(N>>R)+(f-=d)]=b<<24|A<<16|v}while(0!==f);for(d=1<<E-1;N&d;)d>>=1;if(0!==d?(N&=d-1,N+=d):N=0,x++,0===--D[E]){if(E===S)break;E=t[n+u[x]]}if(E>T&&(N&m)!==g){for(0===R&&(R=T),w+=I,O=1<<(C=E-R);C+R<S&&!((O-=D[C+R])<=0);)C++,O<<=1;if(k+=1<<C,1===e&&k>852||2===e&&k>592)return 1;l[g=N&m]=T<<24|C<<16|w-h}}return 0!==N&&(l[w+N]=E-R<<24|64<<16),p.bits=T,0}},2726(e,t,n){function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(8287).Buffer,a=n(5340).inspect,c=a&&a.custom||"inspect";function l(e,t,n){o.prototype.copy.call(e,t,n)}e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n;return t=e,n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t=o.allocUnsafe(e>>>0),n=this.head,r=0;n;)l(n.data,t,r),r+=n.data.length,n=n.next;return t}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,s=e>i.length?i.length:e;if(s===i.length?r+=i:r+=i.slice(0,e),0===(e-=s)){s===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(s));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0===(e-=s)){s===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(s));break}++r}return this.length-=r,t}},{key:c,value:function(e,t){return a(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){i(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},t,{depth:0,customInspect:!1}))}}],n&&s(t.prototype,n),e}()},2788(e){function t(e,o,a,c){let l="",h=!1;if(!Array.isArray(e)){if(null!=e){let t=e.toString();return t=s(t,o),t}return""}for(let u=0;u<e.length;u++){const p=e[u],d=n(p);if(void 0===d)continue;let f="";if(f=0===a.length?d:`${a}.${d}`,d===o.textNodeName){let e=p[d];i(f,o)||(e=o.tagValueProcessor(d,e),e=s(e,o)),h&&(l+=c),l+=e,h=!1;continue}if(d===o.cdataPropName){h&&(l+=c),l+=`<![CDATA[${p[d][0][o.textNodeName]}]]>`,h=!1;continue}if(d===o.commentPropName){l+=c+`\x3c!--${p[d][0][o.textNodeName]}--\x3e`,h=!0;continue}if("?"===d[0]){const e=r(p[":@"],o),t="?xml"===d?"":c;let n=p[d][0][o.textNodeName];n=0!==n.length?" "+n:"",l+=t+`<${d}${n}${e}?>`,h=!0;continue}let g=c;""!==g&&(g+=o.indentBy);const m=c+`<${d}${r(p[":@"],o)}`,w=t(p[d],o,f,g);-1!==o.unpairedTags.indexOf(d)?o.suppressUnpairedNode?l+=m+">":l+=m+"/>":w&&0!==w.length||!o.suppressEmptyNode?w&&w.endsWith(">")?l+=m+`>${w}${c}</${d}>`:(l+=m+">",w&&""!==c&&(w.includes("/>")||w.includes("</"))?l+=c+o.indentBy+w+c:l+=w,l+=`</${d}>`):l+=m+"/>",h=!0}return l}function n(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const r=t[n];if(Object.prototype.hasOwnProperty.call(e,r)&&":@"!==r)return r}}function r(e,t){let n="";if(e&&!t.ignoreAttributes)for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let i=t.attributeValueProcessor(r,e[r]);i=s(i,t),!0===i&&t.suppressBooleanAttributes?n+=` ${r.substr(t.attributeNamePrefix.length)}`:n+=` ${r.substr(t.attributeNamePrefix.length)}="${i}"`}return n}function i(e,t){let n=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let r in t.stopNodes)if(t.stopNodes[r]===e||t.stopNodes[r]==="*."+n)return!0;return!1}function s(e,t){if(e&&e.length>0&&t.processEntities)for(let n=0;n<t.entities.length;n++){const r=t.entities[n];e=e.replace(r.regex,r.val)}return e}e.exports=function(e,n){let r="";return n.format&&n.indentBy.length>0&&(r="\n"),t(e,n,"",r)}},2805(e,t){t.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,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,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,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1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,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,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,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,52,53,54,55,56,57,58,59,60,61,62,63,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,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,52,53,54,55,56,57,58,59,60,61,62,63,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,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,52,53,54,55,56,57,58,59,60,61,62,63,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,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,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},2861(e,t,n){
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
var r=n(8287),i=r.Buffer;function s(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(s(r,t),t.Buffer=o),o.prototype=Object.create(i.prototype),s(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},2923(e,t,n){const{buildOptions:r}=n(460),i=n(7680),{prettify:s}=n(5629),o=n(3918);e.exports=class{constructor(e){this.externalEntities={},this.options=r(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const n=o.validate(e,t);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new i(this.options);n.addExternalEntities(this.externalEntities);const r=n.parseXml(e);return this.options.preserveOrder||void 0===r?r:s(r,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}},2955(e,t,n){var r,i=n(5606);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(6238),a=Symbol("lastResolve"),c=Symbol("lastReject"),l=Symbol("error"),h=Symbol("ended"),u=Symbol("lastPromise"),p=Symbol("handlePromise"),d=Symbol("stream");function f(e,t){return{value:e,done:t}}function g(e){var t=e[a];if(null!==t){var n=e[d].read();null!==n&&(e[u]=null,e[a]=null,e[c]=null,t(f(n,!1)))}}function m(e){i.nextTick(g,e)}var w=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((r={get stream(){return this[d]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[h])return Promise.resolve(f(void 0,!0));if(this[d].destroyed)return new Promise(function(t,n){i.nextTick(function(){e[l]?n(e[l]):t(f(void 0,!0))})});var n,r=this[u];if(r)n=new Promise(function(e,t){return function(n,r){e.then(function(){t[h]?n(f(void 0,!0)):t[p](n,r)},r)}}(r,this));else{var s=this[d].read();if(null!==s)return Promise.resolve(f(s,!1));n=new Promise(this[p])}return this[u]=n,n}},s(r,Symbol.asyncIterator,function(){return this}),s(r,"return",function(){var e=this;return new Promise(function(t,n){e[d].destroy(null,function(e){e?n(e):t(f(void 0,!0))})})}),r),w);e.exports=function(e){var t,n=Object.create(y,(s(t={},d,{value:e,writable:!0}),s(t,a,{value:null,writable:!0}),s(t,c,{value:null,writable:!0}),s(t,l,{value:null,writable:!0}),s(t,h,{value:e._readableState.endEmitted,writable:!0}),s(t,p,{value:function(e,t){var r=n[d].read();r?(n[u]=null,n[a]=null,n[c]=null,e(f(r,!1))):(n[a]=e,n[c]=t)},writable:!0}),t));return n[u]=null,o(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[c];return null!==t&&(n[u]=null,n[a]=null,n[c]=null,t(e)),void(n[l]=e)}var r=n[a];null!==r&&(n[u]=null,n[a]=null,n[c]=null,r(f(void 0,!0))),n[h]=!0}),e.on("readable",m.bind(null,n)),n}},3085(e){e.exports=function(e){return"function"==typeof e?e:Array.isArray(e)?t=>{for(const n of e){if("string"==typeof n&&t===n)return!0;if(n instanceof RegExp&&n.test(t))return!0}}:()=>!1}},3141(e,t,n){var r=n(2861).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=l,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=h,this.end=u,t=3;break;default:return this.write=p,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function h(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function u(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.I=s,s.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=o(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||-2===i?0:(i=o(t[r]))>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||-2===i?0:(i=o(t[r]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},3269(e){e.exports=function(e,t,n,r){for(var i=65535&e,s=e>>>16&65535,o=0;0!==n;){n-=o=n>2e3?2e3:n;do{s=s+(i=i+t[r++]|0)|0}while(--o);i%=65521,s%=65521}return i|s<<16}},3303(e,t,n){var r=n(8411),i=n(9805),s=n(1996),o=n(4674),a=n(4442),c=Object.prototype.toString;function l(e){if(!(this instanceof l))return new l(e);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(o[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var h;if(h="string"==typeof t.dictionary?s.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=r.deflateSetDictionary(this.strm,h)))throw new Error(o[n]);this._dict_set=!0}}function h(e,t){var n=new l(t);if(n.push(e,!0),n.err)throw n.msg||o[n.err];return n.result}l.prototype.push=function(e,t){var n,o,a=this.strm,l=this.options.chunkSize;if(this.ended)return!1;o=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=s.string2buf(e):"[object ArrayBuffer]"===c.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(l),a.next_out=0,a.avail_out=l),1!==(n=r.deflate(a,o))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==o&&2!==o)||("string"===this.options.to?this.onData(s.buf2binstring(i.shrinkBuf(a.output,a.next_out))):this.onData(i.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==n);return 4===o?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==o||(this.onEnd(0),a.avail_out=0,!0)},l.prototype.onData=function(e){this.chunks.push(e)},l.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=l,t.deflate=h,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,h(e,t)}},3390(e,t){t.byteLength=function(e){var t=a(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){for(var t,n=a(e),s=n[0],o=n[1],c=new i(function(e,t,n){return 3*(t+n)/4-n}(0,s,o)),l=0,h=o>0?s-4:s,u=0;u<h;u+=4)t=r[e.charCodeAt(u)]<<18|r[e.charCodeAt(u+1)]<<12|r[e.charCodeAt(u+2)]<<6|r[e.charCodeAt(u+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===o&&(t=r[e.charCodeAt(u)]<<2|r[e.charCodeAt(u+1)]>>4,c[l++]=255&t),1===o&&(t=r[e.charCodeAt(u)]<<10|r[e.charCodeAt(u+1)]<<4|r[e.charCodeAt(u+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,s=[],o=16383,a=0,c=r-i;a<c;a+=o)s.push(l(e,a,a+o>c?c:a+o));return 1===i?(t=e[r-1],s.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],s.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),s.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=s[o],r[s.charCodeAt(o)]=o;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,n){for(var r,i=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),i.push(c(r));return i.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},3600(e,t,n){e.exports=i;var r=n(4610);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n(6698)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},3665(e,t,n){var r=n(9805);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var s=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],o=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],l=new Array(576);i(l);var h=new Array(60);i(h);var u=new Array(512);i(u);var p=new Array(256);i(p);var d=new Array(29);i(d);var f,g,m,w=new Array(30);function y(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function b(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function A(e){return e<256?u[e]:u[256+(e>>>7)]}function v(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function _(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,v(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function E(e,t,n){_(e,n[2*t],n[2*t+1])}function x(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function I(e,t,n){var r,i,s=new Array(16),o=0;for(r=1;r<=15;r++)s[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=x(s[a]++,a))}}function S(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function T(e){e.bi_valid>8?v(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function C(e,t,n,r){var i=2*t,s=2*n;return e[i]<e[s]||e[i]===e[s]&&r[t]<=r[n]}function R(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&C(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!C(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function O(e,t,n){var r,i,a,c,l=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*l]<<8|e.pending_buf[e.d_buf+2*l+1],i=e.pending_buf[e.l_buf+l],l++,0===r?E(e,i,t):(E(e,(a=p[i])+256+1,t),0!==(c=s[a])&&_(e,i-=d[a],c),E(e,a=A(--r),n),0!==(c=o[a])&&_(e,r-=w[a],c))}while(l<e.last_lit);E(e,256,t)}function k(e,t){var n,r,i,s=t.dyn_tree,o=t.stat_desc.static_tree,a=t.stat_desc.has_stree,c=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<c;n++)0!==s[2*n]?(e.heap[++e.heap_len]=l=n,e.depth[n]=0):s[2*n+1]=0;for(;e.heap_len<2;)s[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,a&&(e.static_len-=o[2*i+1]);for(t.max_code=l,n=e.heap_len>>1;n>=1;n--)R(e,s,n);i=c;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],R(e,s,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,s[2*i]=s[2*n]+s[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,s[2*n+1]=s[2*r+1]=i,e.heap[1]=i++,R(e,s,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,s,o,a,c=t.dyn_tree,l=t.max_code,h=t.stat_desc.static_tree,u=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,f=t.stat_desc.max_length,g=0;for(s=0;s<=15;s++)e.bl_count[s]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(s=c[2*c[2*(r=e.heap[n])+1]+1]+1)>f&&(s=f,g++),c[2*r+1]=s,r>l||(e.bl_count[s]++,o=0,r>=d&&(o=p[r-d]),a=c[2*r],e.opt_len+=a*(s+o),u&&(e.static_len+=a*(h[2*r+1]+o)));if(0!==g){do{for(s=f-1;0===e.bl_count[s];)s--;e.bl_count[s]--,e.bl_count[s+1]+=2,e.bl_count[f]--,g-=2}while(g>0);for(s=f;0!==s;s--)for(r=e.bl_count[s];0!==r;)(i=e.heap[--n])>l||(c[2*i+1]!==s&&(e.opt_len+=(s-c[2*i+1])*c[2*i],c[2*i+1]=s),r--)}}(e,t),I(s,l,e.bl_count)}function N(e,t,n){var r,i,s=-1,o=t[1],a=0,c=7,l=4;for(0===o&&(c=138,l=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=o,o=t[2*(r+1)+1],++a<c&&i===o||(a<l?e.bl_tree[2*i]+=a:0!==i?(i!==s&&e.bl_tree[2*i]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,a=0,s=i,0===o?(c=138,l=3):i===o?(c=6,l=3):(c=7,l=4))}function B(e,t,n){var r,i,s=-1,o=t[1],a=0,c=7,l=4;for(0===o&&(c=138,l=3),r=0;r<=n;r++)if(i=o,o=t[2*(r+1)+1],!(++a<c&&i===o)){if(a<l)do{E(e,i,e.bl_tree)}while(0!==--a);else 0!==i?(i!==s&&(E(e,i,e.bl_tree),a--),E(e,16,e.bl_tree),_(e,a-3,2)):a<=10?(E(e,17,e.bl_tree),_(e,a-3,3)):(E(e,18,e.bl_tree),_(e,a-11,7));a=0,s=i,0===o?(c=138,l=3):i===o?(c=6,l=3):(c=7,l=4)}}i(w);var P=!1;function D(e,t,n,i){_(e,0+(i?1:0),3),function(e,t,n){T(e),v(e,n),v(e,~n),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n)}t._tr_init=function(e){P||(function(){var e,t,n,r,i,c=new Array(16);for(n=0,r=0;r<28;r++)for(d[r]=n,e=0;e<1<<s[r];e++)p[n++]=r;for(p[n-1]=r,i=0,r=0;r<16;r++)for(w[r]=i,e=0;e<1<<o[r];e++)u[i++]=r;for(i>>=7;r<30;r++)for(w[r]=i<<7,e=0;e<1<<o[r]-7;e++)u[256+i++]=r;for(t=0;t<=15;t++)c[t]=0;for(e=0;e<=143;)l[2*e+1]=8,e++,c[8]++;for(;e<=255;)l[2*e+1]=9,e++,c[9]++;for(;e<=279;)l[2*e+1]=7,e++,c[7]++;for(;e<=287;)l[2*e+1]=8,e++,c[8]++;for(I(l,287,c),e=0;e<30;e++)h[2*e+1]=5,h[2*e]=x(e,5);f=new y(l,s,257,286,15),g=new y(h,o,0,30,15),m=new y(new Array(0),a,0,19,7)}(),P=!0),e.l_desc=new b(e.dyn_ltree,f),e.d_desc=new b(e.dyn_dtree,g),e.bl_desc=new b(e.bl_tree,m),e.bi_buf=0,e.bi_valid=0,S(e)},t._tr_stored_block=D,t._tr_flush_block=function(e,t,n,r){var i,s,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),k(e,e.l_desc),k(e,e.d_desc),o=function(e){var t;for(N(e,e.dyn_ltree,e.l_desc.max_code),N(e,e.dyn_dtree,e.d_desc.max_code),k(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*c[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!==t?D(e,t,n,r):4===e.strategy||s===i?(_(e,2+(r?1:0),3),O(e,l,h)):(_(e,4+(r?1:0),3),function(e,t,n,r){var i;for(_(e,t-257,5),_(e,n-1,5),_(e,r-4,4),i=0;i<r;i++)_(e,e.bl_tree[2*c[i]+1],3);B(e,e.dyn_ltree,t-1),B(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),O(e,e.dyn_ltree,e.dyn_dtree)),S(e),r&&T(e)},t._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(p[n]+256+1)]++,e.dyn_dtree[2*A(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){_(e,2,3),E(e,256,l),function(e){16===e.bi_valid?(v(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},3832(e){e.exports=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}},3918(e,t,n){const r=n(5334),i={allowBooleanAttributes:!1,unpairedTags:[]};function s(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function o(e,t){const n=t;for(;t<e.length;t++)if("?"==e[t]||" "==e[t]){const r=e.substr(n,t-n);if(t>5&&"xml"===r)return p("InvalidXml","XML declaration allowed only at the start of the document.",g(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}continue}return t}function a(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let n=1;for(t+=8;t<e.length;t++)if("<"===e[t])n++;else if(">"===e[t]&&(n--,0===n))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}function c(e,t){let n="",r="",i=!1;for(;t<e.length;t++){if('"'===e[t]||"'"===e[t])""===r?r=e[t]:r!==e[t]||(r="");else if(">"===e[t]&&""===r){i=!0;break}n+=e[t]}return""===r&&{value:n,index:t,tagClosed:i}}t.validate=function(e,t){t=Object.assign({},i,t);const n=[];let r=!1,l=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let i=0;i<e.length;i++)if("<"===e[i]&&"?"===e[i+1]){if(i+=2,i=o(e,i),i.err)return i}else{if("<"!==e[i]){if(s(e[i]))continue;return p("InvalidChar","char '"+e[i]+"' is not expected.",g(e,i))}{let d=i;if(i++,"!"===e[i]){i=a(e,i);continue}{let m=!1;"/"===e[i]&&(m=!0,i++);let w="";for(;i<e.length&&">"!==e[i]&&" "!==e[i]&&"\t"!==e[i]&&"\n"!==e[i]&&"\r"!==e[i];i++)w+=e[i];if(w=w.trim(),"/"===w[w.length-1]&&(w=w.substring(0,w.length-1),i--),!f(w)){let t;return t=0===w.trim().length?"Invalid space after '<'.":"Tag '"+w+"' is an invalid name.",p("InvalidTag",t,g(e,i))}const y=c(e,i);if(!1===y)return p("InvalidAttr","Attributes for '"+w+"' have open quote.",g(e,i));let b=y.value;if(i=y.index,"/"===b[b.length-1]){const n=i-b.length;b=b.substring(0,b.length-1);const s=h(b,t);if(!0!==s)return p(s.err.code,s.err.msg,g(e,n+s.err.line));r=!0}else if(m){if(!y.tagClosed)return p("InvalidTag","Closing tag '"+w+"' doesn't have proper closing.",g(e,i));if(b.trim().length>0)return p("InvalidTag","Closing tag '"+w+"' can't have attributes or invalid starting.",g(e,d));if(0===n.length)return p("InvalidTag","Closing tag '"+w+"' has not been opened.",g(e,d));{const t=n.pop();if(w!==t.tagName){let n=g(e,t.tagStartPos);return p("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+w+"'.",g(e,d))}0==n.length&&(l=!0)}}else{const s=h(b,t);if(!0!==s)return p(s.err.code,s.err.msg,g(e,i-b.length+s.err.line));if(!0===l)return p("InvalidXml","Multiple possible root nodes found.",g(e,i));-1!==t.unpairedTags.indexOf(w)||n.push({tagName:w,tagStartPos:d}),r=!0}for(i++;i<e.length;i++)if("<"===e[i]){if("!"===e[i+1]){i++,i=a(e,i);continue}if("?"!==e[i+1])break;if(i=o(e,++i),i.err)return i}else if("&"===e[i]){const t=u(e,i);if(-1==t)return p("InvalidChar","char '&' is not expected.",g(e,i));i=t}else if(!0===l&&!s(e[i]))return p("InvalidXml","Extra text at the end",g(e,i));"<"===e[i]&&i--}}}return r?1==n.length?p("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",g(e,n[0].tagStartPos)):!(n.length>0)||p("InvalidXml","Invalid '"+JSON.stringify(n.map(e=>e.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):p("InvalidXml","Start tag expected.",1)};const l=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function h(e,t){const n=r.getAllMatches(e,l),i={};for(let e=0;e<n.length;e++){if(0===n[e][1].length)return p("InvalidAttr","Attribute '"+n[e][2]+"' has no space in starting.",m(n[e]));if(void 0!==n[e][3]&&void 0===n[e][4])return p("InvalidAttr","Attribute '"+n[e][2]+"' is without value.",m(n[e]));if(void 0===n[e][3]&&!t.allowBooleanAttributes)return p("InvalidAttr","boolean attribute '"+n[e][2]+"' is not allowed.",m(n[e]));const r=n[e][2];if(!d(r))return p("InvalidAttr","Attribute '"+r+"' is an invalid name.",m(n[e]));if(i.hasOwnProperty(r))return p("InvalidAttr","Attribute '"+r+"' is repeated.",m(n[e]));i[r]=1}return!0}function u(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let n=/\d/;for("x"===e[t]&&(t++,n=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(n))break}return-1}(e,++t);let n=0;for(;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(";"===e[t])break;return-1}return t}function p(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function d(e){return r.isName(e)}function f(e){return r.isName(e)}function g(e,t){const n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function m(e){return e.startIndex+e[1].length}},4342(e,t,n){!function(){var t,r,i,s=0,o=[];for(r=0;r<256;r++)o[r]=(r+256).toString(16).substr(1);function a(){var e=((!t||s+16>c.BUFFER_SIZE)&&(s=0,t=c.randomBytes(c.BUFFER_SIZE)),t.slice(s,s+=16));return e[6]=15&e[6]|64,e[8]=63&e[8]|128,e}function c(){var e=a();return o[e[0]]+o[e[1]]+o[e[2]]+o[e[3]]+"-"+o[e[4]]+o[e[5]]+"-"+o[e[6]]+o[e[7]]+"-"+o[e[8]]+o[e[9]]+"-"+o[e[10]]+o[e[11]]+o[e[12]]+o[e[13]]+o[e[14]]+o[e[15]]}c.BUFFER_SIZE=4096,c.bin=a,c.clearBuffer=function(){t=null,s=0},c.test=function(e){return"string"==typeof e&&/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)},"undefined"!=typeof crypto?i=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(i=window.msCrypto),i=i||n(575),e.exports=c,c.randomBytes=function(){if(i){if(i.randomBytes)return i.randomBytes;if(i.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(e){var t=new Uint8Array(e);return i.getRandomValues(t),Array.from(t)}:function(e){var t=new Uint8Array(e);return i.getRandomValues(t),t}}return function(e){var t,n=[];for(t=0;t<e;t++)n.push(Math.floor(256*Math.random()));return n}}()}()},4442(e){e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},4610(e,t,n){e.exports=h;var r=n(6048).F,i=r.ERR_METHOD_NOT_IMPLEMENTED,s=r.ERR_MULTIPLE_CALLBACK,o=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=r.ERR_TRANSFORM_WITH_LENGTH_0,c=n(5382);function l(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new s);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function h(e){if(!(this instanceof h))return new h(e);c.call(this,e),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",u)}function u(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?p(this,null,null):this._flush(function(t,n){p(e,t,n)})}function p(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new a;if(e._transformState.transforming)throw new o;return e.push(null)}n(6698)(h,c),h.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},h.prototype._transform=function(e,t,n){n(new i("_transform()"))},h.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},h.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},h.prototype._destroy=function(e,t){c.prototype._destroy.call(this,e,function(e){t(e)})}},4643(e,t,n){function r(e){try{if(!n.g.localStorage)return!1}catch(e){return!1}var t=n.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}},4668(e){e.exports=function(){function e(e,t,n,r,i){return e<t||n<t?e>n?n+1:e+1:r===i?t:t+1}return function(t,n){if(t===n)return 0;if(t.length>n.length){var r=t;t=n,n=r}for(var i=t.length,s=n.length;i>0&&t.charCodeAt(i-1)===n.charCodeAt(s-1);)i--,s--;for(var o=0;o<i&&t.charCodeAt(o)===n.charCodeAt(o);)o++;if(s-=o,0===(i-=o)||s<3)return s;var a,c,l,h,u,p,d,f,g,m,w,y,b=0,A=[];for(a=0;a<i;a++)A.push(a+1),A.push(t.charCodeAt(o+a));for(var v=A.length-1;b<s-3;)for(g=n.charCodeAt(o+(c=b)),m=n.charCodeAt(o+(l=b+1)),w=n.charCodeAt(o+(h=b+2)),y=n.charCodeAt(o+(u=b+3)),p=b+=4,a=0;a<v;a+=2)c=e(d=A[a],c,l,g,f=A[a+1]),l=e(c,l,h,m,f),h=e(l,h,u,w,f),p=e(h,u,p,y,f),A[a]=p,u=h,h=l,l=c,c=d;for(;b<s;)for(g=n.charCodeAt(o+(c=b)),p=++b,a=0;a<v;a+=2)d=A[a],A[a]=p=e(d,c,p,g,A[a+1]),c=d;return p}}()},4674(e){e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},4698(e,t,n){e.exports=n(9206).BrotliDecompressBuffer},4741(e,t,n){var r,i=n(5606);
/*! *****************************************************************************
Copyright (C) Microsoft. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */!function(e){!function(){var t="object"==typeof n.g?n.g:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),r=s(e);function s(e,t){return function(n,r){"function"!=typeof e[n]&&Object.defineProperty(e,n,{configurable:!0,writable:!0,value:r}),t&&t(n,r)}}void 0===t.Reflect?t.Reflect=e:r=s(t.Reflect,r),function(e){var t=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,r=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",s=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,a={__proto__:[]}instanceof Array,c=!o&&!a,l={create:o?function(){return M(Object.create(null))}:a?function(){return M({__proto__:null})}:function(){return M({})},has:c?function(e,n){return t.call(e,n)}:function(e,t){return t in e},get:c?function(e,n){return t.call(e,n)?e[n]:void 0}:function(e,t){return e[t]}},h=Object.getPrototypeOf(Function),u="object"==typeof i&&i.env&&"true"===i.env.REFLECT_METADATA_USE_MAP_POLYFILL,p=u||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){var e={},t=[],n=function(){function e(e,t,n){this._index=0,this._keys=e,this._values=t,this._selector=n}return e.prototype["@@iterator"]=function(){return this},e.prototype[s]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var n=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var n=this._find(e,!0);return this._values[n]=t,this},t.prototype.delete=function(t){var n=this._find(t,!1);if(n>=0){for(var r=this._keys.length,i=n+1;i<r;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,t===this._cacheKey&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new n(this._keys,this._values,r)},t.prototype.values=function(){return new n(this._keys,this._values,i)},t.prototype.entries=function(){return new n(this._keys,this._values,o)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[s]=function(){return this.entries()},t.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function r(e,t){return e}function i(e,t){return t}function o(e,t){return[e,t]}}():Map,d=u||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function e(){this._map=new p}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.values()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[s]=function(){return this.keys()},e}():Set,f=new(u||"function"!=typeof WeakMap?function(){var e=l.create(),n=r();return function(){function e(){this._key=r()}return e.prototype.has=function(e){var t=i(e,!1);return void 0!==t&&l.has(t,this._key)},e.prototype.get=function(e){var t=i(e,!1);return void 0!==t?l.get(t,this._key):void 0},e.prototype.set=function(e,t){return i(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=i(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=r()},e}();function r(){var t;do{t="@@WeakMap@@"+o()}while(l.has(e,t));return e[t]=!0,t}function i(e,r){if(!t.call(e,n)){if(!r)return;Object.defineProperty(e,n,{value:l.create()})}return e[n]}function s(e,t){for(var n=0;n<t;++n)e[n]=255*Math.random()|0;return e}function o(){var e=function(e){return"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(e)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(e)):s(new Uint8Array(e),e):s(new Array(e),e)}(16);e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var t="",n=0;n<16;++n){var r=e[n];4!==n&&6!==n&&8!==n||(t+="-"),r<16&&(t+="0"),t+=r.toString(16).toLowerCase()}return t}}():WeakMap);function g(e,t,n){var r=f.get(e);if(x(r)){if(!n)return;r=new p,f.set(e,r)}var i=r.get(t);if(x(i)){if(!n)return;i=new p,r.set(t,i)}return i}function m(e,t,n){if(w(e,t,n))return!0;var r=U(t);return!I(r)&&m(e,r,n)}function w(e,t,n){var r=g(t,n,!1);return!x(r)&&function(e){return!!e}(r.has(e))}function y(e,t,n){if(w(e,t,n))return b(e,t,n);var r=U(t);return I(r)?void 0:y(e,r,n)}function b(e,t,n){var r=g(t,n,!1);if(!x(r))return r.get(e)}function A(e,t,n,r){g(n,r,!0).set(e,t)}function v(e,t){var n=_(e,t),r=U(e);if(null===r)return n;var i=v(r,t);if(i.length<=0)return n;if(n.length<=0)return i;for(var s=new d,o=[],a=0,c=n;a<c.length;a++){var l=c[a];s.has(l)||(s.add(l),o.push(l))}for(var h=0,u=i;h<u.length;h++)l=u[h],s.has(l)||(s.add(l),o.push(l));return o}function _(e,t){var n=[],r=g(e,t,!1);if(x(r))return n;for(var i=B(r.keys()),s=0;;){var o=D(i);if(!o)return n.length=s,n;var a=P(o);try{n[s]=a}catch(e){try{L(i)}finally{throw e}}s++}}function E(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function x(e){return void 0===e}function I(e){return null===e}function S(e){return"object"==typeof e?null!==e:"function"==typeof e}function T(e,t){switch(E(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var n=3===t?"string":5===t?"number":"default",i=N(e,r);if(void 0!==i){var s=i.call(e,n);if(S(s))throw new TypeError;return s}return function(e,t){if("string"===t){var n=e.toString;if(O(n)&&!S(i=n.call(e)))return i;if(O(r=e.valueOf)&&!S(i=r.call(e)))return i}else{var r;if(O(r=e.valueOf)&&!S(i=r.call(e)))return i;var i,s=e.toString;if(O(s)&&!S(i=s.call(e)))return i}throw new TypeError}(e,"default"===n?"number":n)}function C(e){var t=T(e,3);return function(e){return"symbol"==typeof e}(t)?t:function(e){return""+e}(t)}function R(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function O(e){return"function"==typeof e}function k(e){return"function"==typeof e}function N(e,t){var n=e[t];if(null!=n){if(!O(n))throw new TypeError;return n}}function B(e){var t=N(e,s);if(!O(t))throw new TypeError;var n=t.call(e);if(!S(n))throw new TypeError;return n}function P(e){return e.value}function D(e){var t=e.next();return!t.done&&t}function L(e){var t=e.return;t&&t.call(e)}function U(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===h)return t;if(t!==h)return t;var n=e.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return t;var i=r.constructor;return"function"!=typeof i||i===e?t:i}function M(e){return e.__=void 0,delete e.__,e}e("decorate",function(e,t,n,r){if(x(n)){if(!R(e))throw new TypeError;if(!k(t))throw new TypeError;return function(e,t){for(var n=e.length-1;n>=0;--n){var r=(0,e[n])(t);if(!x(r)&&!I(r)){if(!k(r))throw new TypeError;t=r}}return t}(e,t)}if(!R(e))throw new TypeError;if(!S(t))throw new TypeError;if(!S(r)&&!x(r)&&!I(r))throw new TypeError;return I(r)&&(r=void 0),function(e,t,n,r){for(var i=e.length-1;i>=0;--i){var s=(0,e[i])(t,n,r);if(!x(s)&&!I(s)){if(!S(s))throw new TypeError;r=s}}return r}(e,t,n=C(n),r)}),e("metadata",function(e,t){return function(n,r){if(!S(n))throw new TypeError;if(!x(r)&&!function(e){switch(E(e)){case 3:case 4:return!0;default:return!1}}(r))throw new TypeError;A(e,t,n,r)}}),e("defineMetadata",function(e,t,n,r){if(!S(n))throw new TypeError;return x(r)||(r=C(r)),A(e,t,n,r)}),e("hasMetadata",function(e,t,n){if(!S(t))throw new TypeError;return x(n)||(n=C(n)),m(e,t,n)}),e("hasOwnMetadata",function(e,t,n){if(!S(t))throw new TypeError;return x(n)||(n=C(n)),w(e,t,n)}),e("getMetadata",function(e,t,n){if(!S(t))throw new TypeError;return x(n)||(n=C(n)),y(e,t,n)}),e("getOwnMetadata",function(e,t,n){if(!S(t))throw new TypeError;return x(n)||(n=C(n)),b(e,t,n)}),e("getMetadataKeys",function(e,t){if(!S(e))throw new TypeError;return x(t)||(t=C(t)),v(e,t)}),e("getOwnMetadataKeys",function(e,t){if(!S(e))throw new TypeError;return x(t)||(t=C(t)),_(e,t)}),e("deleteMetadata",function(e,t,n){if(!S(t))throw new TypeError;x(n)||(n=C(n));var r=g(t,n,!1);if(x(r))return!1;if(!r.delete(e))return!1;if(r.size>0)return!0;var i=f.get(t);return i.delete(n),i.size>0||f.delete(t),!0})}(r)}()}(r||(r={}))},4823(e){var t=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=function(e,n,r,i){var s=t,o=i+r;e^=-1;for(var a=i;a<o;a++)e=e>>>8^s[255&(e^n[a])];return-1^e}},4927(e,t){function n(e){this.buffer=e,this.pos=0}function r(e){this.buffer=e,this.pos=0}n.prototype.read=function(e,t,n){this.pos+n>this.buffer.length&&(n=this.buffer.length-this.pos);for(var r=0;r<n;r++)e[t+r]=this.buffer[this.pos+r];return this.pos+=n,n},t.z=n,r.prototype.write=function(e,t){if(this.pos+t>this.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(e.subarray(0,t),this.pos),this.pos+=t,t},t.y=r},5157(e){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},5291(e,t,n){var r=n(6048).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,i){var s=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new r(i?n:"highWaterMark",s);return Math.floor(s)}return e.objectMode?16:16384}}},5334(e,t){const n=":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",r="["+n+"]["+n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+r+"$");t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t,n){if(t){const r=Object.keys(t),i=r.length;for(let s=0;s<i;s++)e[r[s]]="strict"===n?[t[r[s]]]:t[r[s]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(e){return!(null==i.exec(e))},t.getAllMatches=function(e,t){const n=[];let r=t.exec(e);for(;r;){const i=[];i.startIndex=t.lastIndex-r[0].length;const s=r.length;for(let e=0;e<s;e++)i.push(r[e]);n.push(i),r=t.exec(e)}return n},t.nameRegexp=r,t.DANGEROUS_PROPERTY_NAMES=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],t.criticalProperties=["__proto__","constructor","prototype"]},5340(){},5382(e,t,n){var r=n(5606),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=h;var s=n(5412),o=n(6708);n(6698)(h,s);for(var a=i(o.prototype),c=0;c<a.length;c++){var l=a[c];h.prototype[l]||(h.prototype[l]=o.prototype[l])}function h(e){if(!(this instanceof h))return new h(e);s.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",u)))}function u(){this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(h.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(h.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},5412(e,t,n){var r,i=n(5606);e.exports=I,I.ReadableState=x,n(7007).EventEmitter;var s,o=function(e,t){return e.listeners(t).length},a=n(345),c=n(8287).Buffer,l=n.g.Uint8Array||function(){},h=n(9838);s=h&&h.debuglog?h.debuglog("stream"):function(){};var u,p,d,f=n(2726),g=n(5896),m=n(5291).getHighWaterMark,w=n(6048).F,y=w.ERR_INVALID_ARG_TYPE,b=w.ERR_STREAM_PUSH_AFTER_EOF,A=w.ERR_METHOD_NOT_IMPLEMENTED,v=w.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(6698)(I,a);var _=g.errorOrDestroy,E=["error","close","destroy","pause","resume"];function x(e,t,i){r=r||n(5382),e=e||{},"boolean"!=typeof i&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",i),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(u||(u=n(3141).I),this.decoder=new u(e.encoding),this.encoding=e.encoding)}function I(e){if(r=r||n(5382),!(this instanceof I))return new I(e);var t=this instanceof r;this._readableState=new x(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function S(e,t,n,r,i){s("readableAddChunk",t);var o,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(s("onEofChunk"),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,k(e)))}}(e,a);else if(i||(o=function(e,t){var n,r;return r=t,c.isBuffer(r)||r instanceof l||"string"==typeof t||void 0===t||e.objectMode||(n=new y("chunk",["string","Buffer","Uint8Array"],t)),n}(a,t)),o)_(e,o);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),r)a.endEmitted?_(e,new v):T(e,a,t,!0);else if(a.ended)_(e,new b);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?T(e,a,t,!1):N(e,a)):T(e,a,t,!1)}else r||(a.reading=!1,N(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function T(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&O(e)),N(e,t)}Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),I.prototype.destroy=g.destroy,I.prototype._undestroy=g.undestroy,I.prototype._destroy=function(e,t){t(e)},I.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=c.from(e,t),t=""),n=!0),S(this,e,t,!1,n)},I.prototype.unshift=function(e){return S(this,e,null,!0,!1)},I.prototype.isPaused=function(){return!1===this._readableState.flowing},I.prototype.setEncoding=function(e){u||(u=n(3141).I);var t=new u(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var C=1073741824;function R(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=C?e=C:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;s("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(s("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(k,e))}function k(e){var t=e._readableState;s("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,U(e)}function N(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(B,e,t))}function B(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(s("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function P(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function D(e){s("readable nexttick read 0"),e.read(0)}function L(e,t){s("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(s("flow",t.flowing);t.flowing&&null!==e.read(););}function M(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function F(e){var t=e._readableState;s("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(j,t,e))}function j(e,t){if(s("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function H(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}I.prototype.read=function(e){s("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return s("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):O(this),null;if(0===(e=R(e,t))&&t.ended)return 0===t.length&&F(this),null;var r,i=t.needReadable;return s("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&s("length less than watermark",i=!0),t.ended||t.reading?s("reading or ended",i=!1):i&&(s("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=R(n,t))),null===(r=e>0?M(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&F(this)),null!==r&&this.emit("data",r),r},I.prototype._read=function(e){_(this,new A("_read()"))},I.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,s("pipe count=%d opts=%j",r.pipesCount,t);var a=t&&!1===t.end||e===i.stdout||e===i.stderr?g:c;function c(){s("onend"),e.end()}r.endEmitted?i.nextTick(a):n.once("end",a),e.on("unpipe",function t(i,o){s("onunpipe"),i===n&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,s("cleanup"),e.removeListener("close",d),e.removeListener("finish",f),e.removeListener("drain",l),e.removeListener("error",p),e.removeListener("unpipe",t),n.removeListener("end",c),n.removeListener("end",g),n.removeListener("data",u),h=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||l())});var l=function(e){return function(){var t=e._readableState;s("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,U(e))}}(n);e.on("drain",l);var h=!1;function u(t){s("ondata");var i=e.write(t);s("dest.write",i),!1===i&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==H(r.pipes,e))&&!h&&(s("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function p(t){s("onerror",t),g(),e.removeListener("error",p),0===o(e,"error")&&_(e,t)}function d(){e.removeListener("finish",f),g()}function f(){s("onfinish"),e.removeListener("close",d),g()}function g(){s("unpipe"),n.unpipe(e)}return n.on("data",u),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",p),e.once("close",d),e.once("finish",f),e.emit("pipe",n),r.flowing||(s("pipe resume"),n.resume()),e},I.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)r[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=H(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},I.prototype.on=function(e,t){var n=a.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,s("on readable",r.length,r.reading),r.length?O(this):r.reading||i.nextTick(D,this))),n},I.prototype.addListener=I.prototype.on,I.prototype.removeListener=function(e,t){var n=a.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(P,this),n},I.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(P,this),t},I.prototype.resume=function(){var e=this._readableState;return e.flowing||(s("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(L,e,t))}(this,e)),e.paused=!1,this},I.prototype.pause=function(){return s("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(s("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},I.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",function(){if(s("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){s("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<E.length;o++)e.on(E[o],this.emit.bind(this,E[o]));return this._read=function(t){s("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(I.prototype[Symbol.asyncIterator]=function(){return void 0===p&&(p=n(2955)),p(this)}),Object.defineProperty(I.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(I.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(I.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),I._fromList=M,Object.defineProperty(I.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(I.from=function(e,t){return void 0===d&&(d=n(5157)),d(I,e,t)})},5606(e){var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var a,c=[],l=!1,h=-1;function u(){l&&a&&(l=!1,a.length?c=a.concat(c):h=-1,c.length&&p())}function p(){if(!l){var e=o(u);l=!0;for(var t=c.length;t;){for(a=c,c=[];++h<t;)a&&a[h].run();h=-1,t=c.length}a=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function f(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new d(e,t)),1!==c.length||l||o(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=f,r.addListener=f,r.once=f,r.off=f,r.removeListener=f,r.removeAllListeners=f,r.emit=f,r.prependListener=f,r.prependOnceListener=f,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},5629(e,t){function n(e,t,o){let a;const c={};for(let l=0;l<e.length;l++){const h=e[l],u=r(h);let p="";if(p=void 0===o?u:o+"."+u,u===t.textNodeName)void 0===a?a=h[u]:a+=""+h[u];else{if(void 0===u)continue;if(h[u]){let e=n(h[u],t,p);const r=s(e,t);h[":@"]?i(e,h[":@"],p,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==c[u]&&c.hasOwnProperty(u)?(Array.isArray(c[u])||(c[u]=[c[u]]),c[u].push(e)):t.isArray(u,p,r)?c[u]=[e]:c[u]=e}}}return"string"==typeof a?a.length>0&&(c[t.textNodeName]=a):void 0!==a&&(c[t.textNodeName]=a),c}function r(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const n=t[e];if(":@"!==n)return n}}function i(e,t,n,r){if(t){const i=Object.keys(t),s=i.length;for(let o=0;o<s;o++){const s=i[o];r.isArray(s,n+"."+s,!0,!0)?e[s]=[t[s]]:e[s]=t[s]}}}function s(e,t){const{textNodeName:n}=t,r=Object.keys(e).length;return 0===r||!(1!==r||!e[n]&&"boolean"!=typeof e[n]&&0!==e[n])}t.prettify=function(e,t){return n(e,t)}},5896(e,t,n){var r=n(5606);function i(e,t){o(e,t),s(e)}function s(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return a||c?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(o,this,e)):r.nextTick(o,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?n._writableState?n._writableState.errorEmitted?r.nextTick(s,n):(n._writableState.errorEmitted=!0,r.nextTick(i,n,e)):r.nextTick(i,n,e):t?(r.nextTick(s,n),t(e)):r.nextTick(s,n)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}},6035(e){var t=4096,n=new Uint32Array([0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215]);function r(e){this.buf_=new Uint8Array(8224),this.input_=e,this.reset()}r.READ_SIZE=t,r.IBUF_MASK=8191,r.prototype.reset=function(){this.buf_ptr_=0,this.val_=0,this.pos_=0,this.bit_pos_=0,this.bit_end_pos_=0,this.eos_=0,this.readMoreInput();for(var e=0;e<4;e++)this.val_|=this.buf_[this.pos_]<<8*e,++this.pos_;return this.bit_end_pos_>0},r.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var e=this.buf_ptr_,n=this.input_.read(this.buf_,e,t);if(n<0)throw new Error("Unexpected end of input");if(n<t){this.eos_=1;for(var r=0;r<32;r++)this.buf_[e+n+r]=0}if(0===e){for(r=0;r<32;r++)this.buf_[8192+r]=this.buf_[r];this.buf_ptr_=t}else this.buf_ptr_=0;this.bit_end_pos_+=n<<3}},r.prototype.fillBitWindow=function(){for(;this.bit_pos_>=8;)this.val_>>>=8,this.val_|=this.buf_[8191&this.pos_]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},r.prototype.readBits=function(e){32-this.bit_pos_<e&&this.fillBitWindow();var t=this.val_>>>this.bit_pos_&n[e];return this.bit_pos_+=e,t},e.exports=r},6048(e){var t={};function n(e,n,r){r||(r=Error);var i=function(e){var t,r;function i(t,r,i){return e.call(this,function(e,t,r){return"string"==typeof n?n:n(e,t,r)}(t,r,i))||this}return r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,i}(r);i.prototype.name=r.name,i.prototype.code=e,t[e]=i}function r(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map(function(e){return String(e)}),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(e,t,n){var i,s;if("string"==typeof t&&function(e,t){return e.substr(0,4)===t}(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-9,n)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(r(t,"type"));else{var o=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+1>e.length)&&-1!==e.indexOf(".",n)}(e)?"property":"argument";s='The "'.concat(e,'" ').concat(o," ").concat(i," ").concat(r(t,"type"))}return s+". Received type ".concat(typeof n)},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},6238(e,t,n){var r=n(6048).F.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,s){if("function"==typeof n)return e(t,null,n);n||(n={}),s=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(s||i);var o=n.readable||!1!==n.readable&&t.readable,a=n.writable||!1!==n.writable&&t.writable,c=function(){t.writable||h()},l=t._writableState&&t._writableState.finished,h=function(){a=!1,l=!0,o||s.call(t)},u=t._readableState&&t._readableState.endEmitted,p=function(){o=!1,u=!0,a||s.call(t)},d=function(e){s.call(t,e)},f=function(){var e;return o&&!u?(t._readableState&&t._readableState.ended||(e=new r),s.call(t,e)):a&&!l?(t._writableState&&t._writableState.ended||(e=new r),s.call(t,e)):void 0},g=function(){t.req.on("finish",h)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",h),t.on("abort",f),t.req?g():t.on("request",g)):a&&!t._writableState&&(t.on("end",c),t.on("close",c)),t.on("end",p),t.on("finish",h),!1!==n.error&&t.on("error",d),t.on("close",f),function(){t.removeListener("complete",h),t.removeListener("abort",f),t.removeListener("request",g),t.req&&t.req.removeListener("finish",h),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",h),t.removeListener("end",p),t.removeListener("error",d),t.removeListener("close",f)}}},6454(e,t,n){const r=n(3918),i=n(2923),s=n(8904);e.exports={XMLParser:i,XMLValidator:r,XMLBuilder:s}},6698(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},6708(e,t,n){var r,i=n(5606);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var n=e.entry;for(e.entry=null;n;){var r=n.callback;t.pendingcb--,r(void 0),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=I,I.WritableState=x;var o,a={deprecate:n(4643)},c=n(345),l=n(8287).Buffer,h=n.g.Uint8Array||function(){},u=n(5896),p=n(5291).getHighWaterMark,d=n(6048).F,f=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,m=d.ERR_MULTIPLE_CALLBACK,w=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,A=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,_=u.errorOrDestroy;function E(){}function x(e,t,o){r=r||n(5382),e=e||{},"boolean"!=typeof o&&(o=t instanceof r),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=p(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,s=n.writecb;if("function"!=typeof s)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,s){--t.pendingcb,n?(i.nextTick(s,r),i.nextTick(k,e,t),e._writableState.errorEmitted=!0,_(e,r)):(s(r),e._writableState.errorEmitted=!0,_(e,r),k(e,t))}(e,n,r,t,s);else{var o=R(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||C(e,n),r?i.nextTick(T,e,n,o,s):T(e,n,o,s)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function I(e){var t=this instanceof(r=r||n(5382));if(!t&&!o.call(I,this))return new I(e);this._writableState=new x(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),c.call(this)}function S(e,t,n,r,i,s,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):n?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function T(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),k(e,t)}function C(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,c=!0;n;)i[a]=n,n.isBuf||(c=!1),n=n.next,a+=1;i.allBuffers=c,S(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,h=n.encoding,u=n.callback;if(S(e,t,!1,t.objectMode?1:l.length,l,h,u),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function R(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final(function(n){t.pendingcb--,n&&_(e,n),t.prefinished=!0,e.emit("prefinish"),k(e,t)})}function k(e,t){var n=R(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(O,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}n(6698)(I,c),x.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(x.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(I,Symbol.hasInstance,{value:function(e){return!!o.call(this,e)||this===I&&e&&e._writableState instanceof x}})):o=function(e){return e instanceof this},I.prototype.pipe=function(){_(this,new w)},I.prototype.write=function(e,t,n){var r,s=this._writableState,o=!1,a=!s.objectMode&&(r=e,l.isBuffer(r)||r instanceof h);return a&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof n&&(n=E),s.ending?function(e,t){var n=new A;_(e,n),i.nextTick(t,n)}(this,n):(a||function(e,t,n,r){var s;return null===n?s=new b:"string"==typeof n||t.objectMode||(s=new f("chunk",["string","Buffer"],n)),!s||(_(e,s),i.nextTick(r,s),!1)}(this,s,e,n))&&(s.pendingcb++,o=function(e,t,n,r,i,s){if(!n){var o=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,n)),t}(t,r,i);r!==o&&(n=!0,i="buffer",r=o)}var a=t.objectMode?1:r.length;t.length+=a;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:s,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else S(e,t,!1,a,r,i,s);return c}(this,s,a,e,t,n)),o},I.prototype.cork=function(){this._writableState.corked++},I.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||C(this,e))},I.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(I.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),I.prototype._write=function(e,t,n){n(new g("_write()"))},I.prototype._writev=null,I.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,k(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(I.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),I.prototype.destroy=u.destroy,I.prototype._undestroy=u.undestroy,I.prototype._destroy=function(e,t){t(e)}},7007(e){var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,s),r(n)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}g(e,t,s,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,s,o,l;if(a(n),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),o=s[t]),void 0===o)o=s[t]=n,++e._eventsCount;else if("function"==typeof o?o=s[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=e,h.type=t,h.count=o.length,l=h,console&&console.warn&&console.warn(l)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=h.bind(r);return i.listener=n,r.wrapFn=i,i}function p(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):f(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function f(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function i(s){r.once&&e.removeEventListener(t,i),n(s)})}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,s=this._events;if(void 0!==s)i=i&&void 0===s.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var c=s[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var l=c.length,h=f(c,l);for(n=0;n<l;++n)r(h[n],this,t)}return!0},s.prototype.addListener=function(e,t){return l(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return l(this,e,t,!0)},s.prototype.once=function(e,t){return a(t),this.on(e,u(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,u(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,s,o;if(a(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,s=n.length-1;s>=0;s--)if(n[s]===t||n[s].listener===t){o=n[s].listener,i=s;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,s=Object.keys(n);for(r=0;r<s.length;++r)"removeListener"!==(i=s[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},s.prototype.listenerCount=d,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7083(e,t,n){var r=n(1447),i=n(9805),s=n(1996),o=n(9681),a=n(4674),c=n(4442),l=n(7414),h=Object.prototype.toString;function u(e){if(!(this instanceof u))return new u(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==o.Z_OK)throw new Error(a[n]);if(this.header=new l,r.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=s.string2buf(t.dictionary):"[object ArrayBuffer]"===h.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=r.inflateSetDictionary(this.strm,t.dictionary))!==o.Z_OK))throw new Error(a[n])}function p(e,t){var n=new u(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}u.prototype.push=function(e,t){var n,a,c,l,u,p=this.strm,d=this.options.chunkSize,f=this.options.dictionary,g=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof e?p.input=s.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?p.input=new Uint8Array(e):p.input=e,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new i.Buf8(d),p.next_out=0,p.avail_out=d),(n=r.inflate(p,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&f&&(n=r.inflateSetDictionary(this.strm,f)),n===o.Z_BUF_ERROR&&!0===g&&(n=o.Z_OK,g=!1),n!==o.Z_STREAM_END&&n!==o.Z_OK)return this.onEnd(n),this.ended=!0,!1;p.next_out&&(0!==p.avail_out&&n!==o.Z_STREAM_END&&(0!==p.avail_in||a!==o.Z_FINISH&&a!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(c=s.utf8border(p.output,p.next_out),l=p.next_out-c,u=s.buf2string(p.output,c),p.next_out=l,p.avail_out=d-l,l&&i.arraySet(p.output,p.output,c,l,0),this.onData(u)):this.onData(i.shrinkBuf(p.output,p.next_out)))),0===p.avail_in&&0===p.avail_out&&(g=!0)}while((p.avail_in>0||0===p.avail_out)&&n!==o.Z_STREAM_END);return n===o.Z_STREAM_END&&(a=o.Z_FINISH),a===o.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===o.Z_OK):a!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),p.avail_out=0,!0)},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){e===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=u,t.inflate=p,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,p(e,t)},t.ungzip=p},7293(e){e.exports=function(e,t){var n,r,i,s,o,a,c,l,h,u,p,d,f,g,m,w,y,b,A,v,_,E,x,I,S;n=e.state,r=e.next_in,I=e.input,i=r+(e.avail_in-5),s=e.next_out,S=e.output,o=s-(t-e.avail_out),a=s+(e.avail_out-257),c=n.dmax,l=n.wsize,h=n.whave,u=n.wnext,p=n.window,d=n.hold,f=n.bits,g=n.lencode,m=n.distcode,w=(1<<n.lenbits)-1,y=(1<<n.distbits)-1;e:do{f<15&&(d+=I[r++]<<f,f+=8,d+=I[r++]<<f,f+=8),b=g[d&w];t:for(;;){if(d>>>=A=b>>>24,f-=A,0==(A=b>>>16&255))S[s++]=65535&b;else{if(!(16&A)){if(64&A){if(32&A){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}b=g[(65535&b)+(d&(1<<A)-1)];continue t}for(v=65535&b,(A&=15)&&(f<A&&(d+=I[r++]<<f,f+=8),v+=d&(1<<A)-1,d>>>=A,f-=A),f<15&&(d+=I[r++]<<f,f+=8,d+=I[r++]<<f,f+=8),b=m[d&y];;){if(d>>>=A=b>>>24,f-=A,16&(A=b>>>16&255)){if(_=65535&b,f<(A&=15)&&(d+=I[r++]<<f,(f+=8)<A&&(d+=I[r++]<<f,f+=8)),(_+=d&(1<<A)-1)>c){e.msg="invalid distance too far back",n.mode=30;break e}if(d>>>=A,f-=A,_>(A=s-o)){if((A=_-A)>h&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(E=0,x=p,0===u){if(E+=l-A,A<v){v-=A;do{S[s++]=p[E++]}while(--A);E=s-_,x=S}}else if(u<A){if(E+=l+u-A,(A-=u)<v){v-=A;do{S[s++]=p[E++]}while(--A);if(E=0,u<v){v-=A=u;do{S[s++]=p[E++]}while(--A);E=s-_,x=S}}}else if(E+=u-A,A<v){v-=A;do{S[s++]=p[E++]}while(--A);E=s-_,x=S}for(;v>2;)S[s++]=x[E++],S[s++]=x[E++],S[s++]=x[E++],v-=3;v&&(S[s++]=x[E++],v>1&&(S[s++]=x[E++]))}else{E=s-_;do{S[s++]=S[E++],S[s++]=S[E++],S[s++]=S[E++],v-=3}while(v>2);v&&(S[s++]=S[E++],v>1&&(S[s++]=S[E++]))}break}if(64&A){e.msg="invalid distance code",n.mode=30;break e}b=m[(65535&b)+(d&(1<<A)-1)]}}break}}while(r<i&&s<a);r-=v=f>>3,d&=(1<<(f-=v<<3))-1,e.next_in=r,e.next_out=s,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=s<a?a-s+257:257-(s-a),n.hold=d,n.bits=f}},7414(e){e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},7526(e,t){t.byteLength=function(e){var t=a(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,s=a(e),o=s[0],c=s[1],l=new i(function(e,t,n){return 3*(t+n)/4-n}(0,o,c)),h=0,u=c>0?o-4:o;for(n=0;n<u;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[h++]=t>>16&255,l[h++]=t>>8&255,l[h++]=255&t;return 2===c&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[h++]=255&t),1===c&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[h++]=t>>8&255,l[h++]=255&t),l},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,s=[],o=16383,a=0,c=r-i;a<c;a+=o)s.push(l(e,a,a+o>c?c:a+o));return 1===i?(t=e[r-1],s.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],s.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),s.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=s[o],r[s.charCodeAt(o)]=o;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,n){for(var r,i=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),i.push(c(r));return i.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},7611(e){e.exports="W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdUEsyw9g4bJlEt1Y6oVMxMRTEVbCIwZzJzboK5j8m4YH02qgXYhv1V+PM435sLVxyHJihaJREEhZGqL03txGFQLm76caGO/ovxKvzCby/3vMTtX/459f0igi7WutnKiMQ6wODSoRh/8Lx1V3Q99MvKtwB6bHdERYRY0hStJoMjNeTsNX7bn+Y7e4EQ3bf8xBc7L0BsyfFPK43dGSXpL6clYC/I328h54/VYrQ5i0648FgbGtl837svJ35L3Mot/+nPlNpWgKx1gGXQYqX6n+bbZ7wuyCHKcUok12Xjqub7NXZGzqBx0SD+uziNf87t7ve42jxSKQoW3nyxVrWIGlFShhCKxjpZZ5MeGna0+lBkk+kaN8F9qFBAFgEogyMBdcX/T1W/WnMOi/7ycWUQloEBKGeC48MkiwqJkJO+12eQiOFHMmck6q/IjWW3RZlany23TBm+cNr/84/oi5GGmGBZWrZ6j+zykVozz5fT/QH/Da6WTbZYYPynVNO7kxzuNN2kxKKWche5WveitPKAecB8YcAHz/+zXLjcLzkdDSktNIDwZE9J9X+tto43oJy65wApM3mDzY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ZcT5R+KdtyYb0zyqG9pSLuCw5WBwAn7fjBjKLLoxLXMI+52L9cLwIR2B6OllJZLHJ8vDxmWdtF+QJnmt1rsHPIWY20lftk8fYePkAIg6Hgn532QoIpegMxiWgAOfe5/U44APR8Ac0NeZrVh3gEhs12W+tVSiWiUQekf/YBECUy5fdYbA08dd7VzPAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg="},7680(e,t,n){const r=n(5334),i=n(3832),s=n(9400),o=n(7983),a=n(3085);function c(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const r=t[n],i=r.replace(/[.\-+*:]/g,"\\.");this.lastEntities[r]={regex:new RegExp("&"+i+";","g"),val:e[r]}}}function l(e,t,n,r,i,s,o){if(void 0!==e&&(this.options.trimValues&&!r&&(e=e.trim()),e.length>0)){o||(e=this.replaceEntitiesValue(e,t,n));const r=this.options.tagValueProcessor(t,e,n,i,s);return null==r?e:typeof r!=typeof e||r!==e?r:this.options.trimValues||e.trim()===e?v(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function h(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}const u=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function p(e,t,n){if(!0!==this.options.ignoreAttributes&&"string"==typeof e){const i=r.getAllMatches(e,u),s=i.length,o={};for(let e=0;e<s;e++){const r=this.resolveNameSpace(i[e][1]);if(this.ignoreAttributesFn(r,t))continue;let s=i[e][4],a=this.options.attributeNamePrefix+r;if(r.length)if(this.options.transformAttributeName&&(a=this.options.transformAttributeName(a)),a=E(a,this.options),void 0!==s){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s,n,t);const e=this.options.attributeValueProcessor(r,s,t);o[a]=null==e?s:typeof e!=typeof s||e!==s?e:v(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[a]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=o,e}return o}}const d=function(e){e=e.replace(/\r\n?/g,"\n");const t=new i("!xml");let n=t,r="",o="";this.entityExpansionCount=0,this.currentExpandedLength=0;const a=new s(this.options.processEntities);for(let s=0;s<e.length;s++)if("<"===e[s])if("/"===e[s+1]){const t=y(e,">",s,"Closing Tag is not closed.");let i=e.substring(s+2,t).trim();if(this.options.removeNSPrefix){const e=i.indexOf(":");-1!==e&&(i=i.substr(e+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),n&&(r=this.saveTextToParentTag(r,n,o));const a=o.substring(o.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error(`Unpaired tag can not be used as closing tag: </${i}>`);let c=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(c=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=o.lastIndexOf("."),o=o.substring(0,c),n=this.tagsNodeStack.pop(),r="",s=t}else if("?"===e[s+1]){let t=b(e,s,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,o),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new i(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,o,t.tagName)),this.addChild(n,e,o,s)}s=t.closeIndex+1}else if("!--"===e.substr(s+1,3)){const t=y(e,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const i=e.substring(s+4,t-2);r=this.saveTextToParentTag(r,n,o),n.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}s=t}else if("!D"===e.substr(s+1,2)){const t=a.readDocType(e,s);this.docTypeEntities=t.entities,s=t.i}else if("!["===e.substr(s+1,2)){const t=y(e,"]]>",s,"CDATA is not closed.")-2,i=e.substring(s+9,t);r=this.saveTextToParentTag(r,n,o);let a=this.parseTextData(i,n.tagname,o,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):n.add(this.options.textNodeName,a),s=t+2}else{let a=b(e,s,this.options.removeNSPrefix),c=a.tagName;const l=a.rawTagName;let h=a.tagExp,u=a.attrExpPresent,p=a.closeIndex;if(this.options.transformTagName){const e=this.options.transformTagName(c);h===c&&(h=e),c=e}if(this.options.strictReservedNames&&(c===this.options.commentPropName||c===this.options.cdataPropName||c===this.options.textNodeName||c===this.options.attributesGroupName))throw new Error(`Invalid tag name: ${c}`);n&&r&&"!xml"!==n.tagname&&(r=this.saveTextToParentTag(r,n,o,!1));const d=n;d&&-1!==this.options.unpairedTags.indexOf(d.tagname)&&(n=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),c!==t.tagname&&(o+=o?"."+c:c);const f=s;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,o,c)){let t="";if(h.length>0&&h.lastIndexOf("/")===h.length-1)"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),h=c):h=h.substr(0,h.length-1),s=a.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))s=a.closeIndex;else{const n=this.readStopNodeData(e,l,p+1);if(!n)throw new Error(`Unexpected end of ${l}`);s=n.i,t=n.tagContent}const r=new i(c);c!==h&&u&&(r[":@"]=this.buildAttributesMap(h,o,c)),t&&(t=this.parseTextData(t,c,o,!0,u,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),r.add(this.options.textNodeName,t),this.addChild(n,r,o,f)}else{if(h.length>0&&h.lastIndexOf("/")===h.length-1){if("/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),h=c):h=h.substr(0,h.length-1),this.options.transformTagName){const e=this.options.transformTagName(c);h===c&&(h=e),c=e}const e=new i(c);c!==h&&u&&(e[":@"]=this.buildAttributesMap(h,o,c)),this.addChild(n,e,o,f),o=o.substr(0,o.lastIndexOf("."))}else{if(-1!==this.options.unpairedTags.indexOf(c)){const e=new i(c);c!==h&&u&&(e[":@"]=this.buildAttributesMap(h,o)),this.addChild(n,e,o,f),o=o.substr(0,o.lastIndexOf(".")),s=a.closeIndex;continue}{const e=new i(c);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(n),c!==h&&u&&(e[":@"]=this.buildAttributesMap(h,o,c)),this.addChild(n,e,o),n=e}}r="",s=p}}else r+=e[s];return t.child};function f(e,t,n,r){this.options.captureMetaData||(r=void 0);const i=this.options.updateTag(t.tagname,n,t[":@"]);!1===i||("string"==typeof i?(t.tagname=i,e.addChild(t,r)):e.addChild(t,r))}const g=function(e,t,n){if(-1===e.indexOf("&"))return e;const r=this.options.processEntities;if(!r.enabled)return e;if(r.allowedTags&&!r.allowedTags.includes(t))return e;if(r.tagFilter&&!r.tagFilter(t,n))return e;for(let t in this.docTypeEntities){const n=this.docTypeEntities[t],i=e.match(n.regx);if(i){if(this.entityExpansionCount+=i.length,r.maxTotalExpansions&&this.entityExpansionCount>r.maxTotalExpansions)throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${r.maxTotalExpansions}`);const t=e.length;if(e=e.replace(n.regx,n.val),r.maxExpandedLength&&(this.currentExpandedLength+=e.length-t,this.currentExpandedLength>r.maxExpandedLength))throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${r.maxExpandedLength}`)}}if(-1===e.indexOf("&"))return e;for(const t of Object.keys(this.lastEntities)){const n=this.lastEntities[t],i=e.match(n.regex);if(i&&(this.entityExpansionCount+=i.length,r.maxTotalExpansions&&this.entityExpansionCount>r.maxTotalExpansions))throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${r.maxTotalExpansions}`);e=e.replace(n.regex,n.val)}if(-1===e.indexOf("&"))return e;if(this.options.htmlEntities)for(const t of Object.keys(this.htmlEntities)){const n=this.htmlEntities[t],i=e.match(n.regex);if(i&&(this.entityExpansionCount+=i.length,r.maxTotalExpansions&&this.entityExpansionCount>r.maxTotalExpansions))throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${r.maxTotalExpansions}`);e=e.replace(n.regex,n.val)}return e.replace(this.ampEntity.regex,this.ampEntity.val)};function m(e,t,n,r){return e&&(void 0===r&&(r=0===t.child.length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,r))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function w(e,t,n,r){return!(!t||!t.has(r))||!(!e||!e.has(n))}function y(e,t,n,r){const i=e.indexOf(t,n);if(-1===i)throw new Error(r);return i+t.length-1}function b(e,t,n,r=">"){const i=function(e,t,n=">"){let r,i="";for(let s=t;s<e.length;s++){let t=e[s];if(r)t===r&&(r="");else if('"'===t||"'"===t)r=t;else if(t===n[0]){if(!n[1])return{data:i,index:s};if(e[s+1]===n[1])return{data:i,index:s}}else"\t"===t&&(t=" ");i+=t}}(e,t+1,r);if(!i)return;let s=i.data;const o=i.index,a=s.search(/\s/);let c=s,l=!0;-1!==a&&(c=s.substring(0,a),s=s.substring(a+1).trimStart());const h=c;if(n){const e=c.indexOf(":");-1!==e&&(c=c.substr(e+1),l=c!==i.data.substr(e+1))}return{tagName:c,tagExp:s,closeIndex:o,attrExpPresent:l,rawTagName:h}}function A(e,t,n){const r=n;let i=1;for(;n<e.length;n++)if("<"===e[n])if("/"===e[n+1]){const s=y(e,">",n,`${t} is not closed`);if(e.substring(n+2,s).trim()===t&&(i--,0===i))return{tagContent:e.substring(r,n),i:s};n=s}else if("?"===e[n+1])n=y(e,"?>",n+1,"StopNode is not closed.");else if("!--"===e.substr(n+1,3))n=y(e,"--\x3e",n+3,"StopNode is not closed.");else if("!["===e.substr(n+1,2))n=y(e,"]]>",n,"StopNode is not closed.")-2;else{const r=b(e,n,">");r&&((r&&r.tagName)===t&&"/"!==r.tagExp[r.tagExp.length-1]&&i++,n=r.closeIndex)}}function v(e,t,n){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&o(e,n)}return r.isExist(e)?e:""}function _(e,t,n){const r=Number.parseInt(e,t);return r>=0&&r<=1114111?String.fromCodePoint(r):n+e+";"}function E(e,t){if(r.criticalProperties.includes(e))throw new Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);return r.DANGEROUS_PROPERTY_NAMES.includes(e)?t.onDangerousProperty(e):e}e.exports=class{constructor(e){if(this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>_(t,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>_(t,16,"&#x")}},this.addExternalEntities=c,this.parseXml=d,this.parseTextData=l,this.resolveNameSpace=h,this.buildAttributesMap=p,this.isItStopNode=w,this.replaceEntitiesValue=g,this.readStopNodeData=A,this.saveTextToParentTag=m,this.addChild=f,this.ignoreAttributesFn=a(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let e=0;e<this.options.stopNodes.length;e++){const t=this.options.stopNodes[e];"string"==typeof t&&(t.startsWith("*.")?this.stopNodesWildcard.add(t.substring(2)):this.stopNodesExact.add(t))}}}}},7708(e,t){function n(e,t){this.offset=e,this.nbits=t}t.kBlockLengthPrefixCode=[new n(1,2),new n(5,2),new n(9,2),new n(13,2),new n(17,3),new n(25,3),new n(33,3),new n(41,3),new n(49,4),new n(65,4),new n(81,4),new n(97,4),new n(113,5),new n(145,5),new n(177,5),new n(209,5),new n(241,6),new n(305,6),new n(369,7),new n(497,8),new n(753,9),new n(1265,10),new n(2289,11),new n(4337,12),new n(8433,13),new n(16625,24)],t.kInsertLengthPrefixCode=[new n(0,0),new n(1,0),new n(2,0),new n(3,0),new n(4,0),new n(5,0),new n(6,1),new n(8,1),new n(10,2),new n(14,2),new n(18,3),new n(26,3),new n(34,4),new n(50,4),new n(66,5),new n(98,5),new n(130,6),new n(194,7),new n(322,8),new n(578,9),new n(1090,10),new n(2114,12),new n(6210,14),new n(22594,24)],t.kCopyLengthPrefixCode=[new n(2,0),new n(3,0),new n(4,0),new n(5,0),new n(6,0),new n(7,0),new n(8,0),new n(9,0),new n(10,1),new n(12,1),new n(14,2),new n(18,2),new n(22,3),new n(30,3),new n(38,4),new n(54,4),new n(70,5),new n(102,5),new n(134,6),new n(198,7),new n(326,8),new n(582,9),new n(1094,10),new n(2118,24)],t.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],t.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},7758(e,t,n){var r,i=n(6048).F,s=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function c(e){e()}function l(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var h,u=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new s("streams");var p=t.map(function(e,i){var s=i<t.length-1;return function(e,t,i,s){s=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(s);var a=!1;e.on("close",function(){a=!0}),void 0===r&&(r=n(6238)),r(e,{readable:t,writable:i},function(e){if(e)return s(e);a=!0,s()});var c=!1;return function(t){if(!a&&!c)return c=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void s(t||new o("pipe"))}}(e,s,i>0,function(e){h||(h=e),e&&p.forEach(c),s||(p.forEach(c),u(h))})});return t.reduce(l)}},7983(e){const t=/^[-+]?0x[a-fA-F0-9]+$/,n=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const r={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};e.exports=function(e,i={}){if(i=Object.assign({},r,i),!e||"string"!=typeof e)return e;let s=e.trim();if(void 0!==i.skipLike&&i.skipLike.test(s))return e;if(i.hex&&t.test(s))return Number.parseInt(s,16);{const t=n.exec(s);if(t){const n=t[1],r=t[2];let o=function(e){return e&&-1!==e.indexOf(".")?("."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1)),e):e}(t[3]);const a=t[4]||t[6];if(!i.leadingZeros&&r.length>0&&n&&"."!==s[2])return e;if(!i.leadingZeros&&r.length>0&&!n&&"."!==s[1])return e;{const t=Number(s),c=""+t;return-1!==c.search(/[eE]/)||a?i.eNotation?t:e:-1!==s.indexOf(".")?"0"===c&&""===o||c===o||n&&c==="-"+o?t:e:r?o===c||n+o===c?t:e:s===c||s===n+c?t:e}}return e}}},8171(e,t){function n(e,t){this.bits=e,this.value=t}t.z=n;function r(e,t){for(var n=1<<t-1;e&n;)n>>=1;return(e&n-1)+n}function i(e,t,r,i,s){do{e[t+(i-=r)]=new n(s.bits,s.value)}while(i>0)}function s(e,t,n){for(var r=1<<t-n;t<15&&!((r-=e[t])<=0);)++t,r<<=1;return t-n}t.u=function(e,t,o,a,c){var l,h,u,p,d,f,g,m,w,y,b=t,A=new Int32Array(16),v=new Int32Array(16);for(y=new Int32Array(c),h=0;h<c;h++)A[a[h]]++;for(v[1]=0,l=1;l<15;l++)v[l+1]=v[l]+A[l];for(h=0;h<c;h++)0!==a[h]&&(y[v[a[h]]++]=h);if(w=m=1<<(g=o),1===v[15]){for(u=0;u<w;++u)e[t+u]=new n(0,65535&y[0]);return w}for(u=0,h=0,l=1,p=2;l<=o;++l,p<<=1)for(;A[l]>0;--A[l])i(e,t+u,p,m,new n(255&l,65535&y[h++])),u=r(u,l);for(f=w-1,d=-1,l=o+1,p=2;l<=15;++l,p<<=1)for(;A[l]>0;--A[l])(u&f)!==d&&(t+=m,w+=m=1<<(g=s(A,l,o)),e[b+(d=u&f)]=new n(g+o&255,t-b-d&65535)),i(e,t+(u>>o),p,m,new n(l-o&255,65535&y[h++])),u=r(u,l);return w}},8270(e,t,n){var r=n(8712),i=10,s=11;function o(e,t,n){this.prefix=new Uint8Array(e.length),this.transform=t,this.suffix=new Uint8Array(n.length);for(var r=0;r<e.length;r++)this.prefix[r]=e.charCodeAt(r);for(r=0;r<n.length;r++)this.suffix[r]=n.charCodeAt(r)}var a=[new o("",0,""),new o("",0," "),new o(" ",0," "),new o("",12,""),new o("",i," "),new o("",0," the "),new o(" ",0,""),new o("s ",0," "),new o("",0," of "),new o("",i,""),new o("",0," and "),new o("",13,""),new o("",1,""),new o(", ",0," "),new o("",0,", "),new o(" ",i," "),new o("",0," in "),new o("",0," to "),new o("e ",0," "),new o("",0,'"'),new o("",0,"."),new o("",0,'">'),new o("",0,"\n"),new o("",3,""),new o("",0,"]"),new o("",0," for "),new o("",14,""),new o("",2,""),new o("",0," a "),new o("",0," that "),new o(" ",i,""),new o("",0,". "),new o(".",0,""),new o(" ",0,", "),new o("",15,""),new o("",0," with "),new o("",0,"'"),new o("",0," from "),new o("",0," by "),new o("",16,""),new o("",17,""),new o(" the ",0,""),new o("",4,""),new o("",0,". The "),new o("",s,""),new o("",0," on "),new o("",0," as "),new o("",0," is "),new o("",7,""),new o("",1,"ing "),new o("",0,"\n\t"),new o("",0,":"),new o(" ",0,". "),new o("",0,"ed "),new o("",20,""),new o("",18,""),new o("",6,""),new o("",0,"("),new o("",i,", "),new o("",8,""),new o("",0," at "),new o("",0,"ly "),new o(" the ",0," of "),new o("",5,""),new o("",9,""),new o(" ",i,", "),new o("",i,'"'),new o(".",0,"("),new o("",s," "),new o("",i,'">'),new o("",0,'="'),new o(" ",0,"."),new o(".com/",0,""),new o(" the ",0," of the "),new o("",i,"'"),new o("",0,". This "),new o("",0,","),new o(".",0," "),new o("",i,"("),new o("",i,"."),new o("",0," not "),new o(" ",0,'="'),new o("",0,"er "),new o(" ",s," "),new o("",0,"al "),new o(" ",s,""),new o("",0,"='"),new o("",s,'"'),new o("",i,". "),new o(" ",0,"("),new o("",0,"ful "),new o(" ",i,". "),new o("",0,"ive "),new o("",0,"less "),new o("",s,"'"),new o("",0,"est "),new o(" ",i,"."),new o("",s,'">'),new o(" ",0,"='"),new o("",i,","),new o("",0,"ize "),new o("",s,"."),new o(" ",0,""),new o(" ",0,","),new o("",i,'="'),new o("",s,'="'),new o("",0,"ous "),new o("",s,", "),new o("",i,"='"),new o(" ",i,","),new o(" ",s,'="'),new o(" ",s,", "),new o("",s,","),new o("",s,"("),new o("",s,". "),new o(" ",s,"."),new o("",s,"='"),new o(" ",s,". "),new o(" ",i,'="'),new o(" ",s,"='"),new o(" ",i,"='")];function c(e,t){return e[t]<192?(e[t]>=97&&e[t]<=122&&(e[t]^=32),1):e[t]<224?(e[t+1]^=32,2):(e[t+2]^=5,3)}t.kTransforms=a,t.kNumTransforms=a.length,t.transformDictionaryWord=function(e,t,n,o,l){var h,u=a[l].prefix,p=a[l].suffix,d=a[l].transform,f=d<12?0:d-11,g=0,m=t;f>o&&(f=o);for(var w=0;w<u.length;)e[t++]=u[w++];for(n+=f,o-=f,d<=9&&(o-=d),g=0;g<o;g++)e[t++]=r.dictionary[n+g];if(h=t-o,d===i)c(e,h);else if(d===s)for(;o>0;){var y=c(e,h);h+=y,o-=y}for(var b=0;b<p.length;)e[t++]=p[b++];return t-m}},8287(e,t,n){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
const r=n(7526),i=n(251),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const o=2147483647;function a(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|g(e,t);let r=a(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return p(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return d(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return d(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return c.from(r,t,n);const i=function(e){if(c.isBuffer(e)){const t=0|f(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?a(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return h(e),a(e<0?0:0|f(e))}function p(e){const t=e.length<0?0:0|f(e.length),n=a(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function d(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,c.prototype),r}function f(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function g(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(i)return r?-1:G(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return I(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function w(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Y(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){let s,o=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,a/=2,c/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let r=-1;for(s=n;s<a;s++)if(l(e,s)===l(t,-1===r?0:s-r)){if(-1===r&&(r=s),s-r+1===c)return r*o}else-1!==r&&(s-=s-r),r=-1}else for(n+c>a&&(n=a-c),s=n;s>=0;s--){let n=!0;for(let r=0;r<c;r++)if(l(e,s+r)!==l(t,r)){n=!1;break}if(n)return s}return-1}function A(e,t,n,r){n=Number(n)||0;const i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;const s=t.length;let o;for(r>s/2&&(r=s/2),o=0;o<r;++o){const r=parseInt(t.substr(2*o,2),16);if(Y(r))return o;e[n+o]=r}return o}function v(e,t,n,r){return K(G(t,e.length-n),e,n,r)}function _(e,t,n,r){return K(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function E(e,t,n,r){return K(q(t),e,n,r)}function x(e,t,n,r){return K(function(e,t){let n,r,i;const s=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,s.push(i),s.push(r);return s}(t,e.length-n),e,n,r)}function I(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i<n;){const t=e[i];let s=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,a,c;switch(o){case 1:t<128&&(s=t);break;case 2:n=e[i+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(s=c));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(s=c));break;case 4:n=e[i+1],r=e[i+2],a=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&a)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&a,c>65535&&c<1114112&&(s=c))}}null===s?(s=65533,o=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=o}return function(e){const t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=T));return n}(r)}t.kMaxLength=o,c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,n){return l(e,t,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,n){return function(e,t,n){return h(e),e<=0?a(e):void 0!==t?"string"==typeof n?a(e).fill(t,n):a(e).fill(t):a(e)}(e,t,n)},c.allocUnsafe=function(e){return u(e)},c.allocUnsafeSlow=function(e){return u(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(X(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),X(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,s=Math.min(n,r);i<s;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=c.allocUnsafe(t);let i=0;for(n=0;n<e.length;++n){let t=e[n];if(X(t,Uint8Array))i+t.length>r.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)w(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)w(this,t,t+3),w(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)w(this,t,t+7),w(this,t+1,t+6),w(this,t+2,t+5),w(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?S(this,0,e):m.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},s&&(c.prototype[s]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,i){if(X(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let s=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0);const a=Math.min(s,o),l=this.slice(r,i),h=e.slice(t,n);for(let e=0;e<a;++e)if(l[e]!==h[e]){s=l[e],o=h[e];break}return s<o?-1:o<s?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let s=!1;for(;;)switch(r){case"hex":return A(this,e,t,n);case"utf8":case"utf-8":return v(this,e,t,n);case"ascii":case"latin1":case"binary":return _(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const T=4096;function C(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function R(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function O(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=t;r<n;++r)i+=J[e[r]];return i}function k(e,t,n){const r=e.slice(t,n);let i="";for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+256*r[e+1]);return i}function N(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function B(e,t,n,r,i,s){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function P(e,t,n,r,i){W(t,r,i,e,n,7);let s=Number(t&BigInt(4294967295));e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function D(e,t,n,r,i){W(t,r,i,e,n,7);let s=Number(t&BigInt(4294967295));e[n+7]=s,s>>=8,e[n+6]=s,s>>=8,e[n+5]=s,s>>=8,e[n+4]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}function L(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,n,r,s){return t=+t,n>>>=0,s||L(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function M(e,t,n,r,s){return t=+t,n>>>=0,s||L(e,0,n,8),i.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,c.prototype),r},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e],i=1,s=0;for(;++s<t&&(i*=256);)r+=this[e+s]*i;return r},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Z(function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Q(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))}),c.prototype.readBigUInt64BE=Z(function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Q(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e],i=1,s=0;for(;++s<t&&(i*=256);)r+=this[e+s]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||N(e,t,this.length);let r=t,i=1,s=this[e+--r];for(;r>0&&(i*=256);)s+=this[e+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},c.prototype.readInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||N(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||N(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Z(function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Q(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),c.prototype.readBigInt64BE=Z(function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Q(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)}),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||N(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||N(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||N(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||N(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||B(this,e,t,n,Math.pow(2,8*n)-1,0);let i=1,s=0;for(this[t]=255&e;++s<n&&(i*=256);)this[t+s]=e/i&255;return t+n},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||B(this,e,t,n,Math.pow(2,8*n)-1,0);let i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Z(function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=Z(function(e,t=0){return D(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);B(this,e,t,n,r-1,-r)}let i=0,s=1,o=0;for(this[t]=255&e;++i<n&&(s*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/s|0)-o&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);B(this,e,t,n,r-1,-r)}let i=n-1,s=1,o=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/s|0)-o&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=Z(function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=Z(function(e,t=0){return D(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return M(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return M(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{const s=c.isBuffer(e)?e:c.from(e,r),o=s.length;if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=s[i%o]}return this};const F={};function j(e,t,n){F[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function H(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function W(e,t,n,r,i,s){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let i;throw i=s>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(s+1)}${r}`:`>= -(2${r} ** ${8*(s+1)-1}${r}) and < 2 ** ${8*(s+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||Q(t,e.length-(n+1))}(r,i,s)}function V(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function Q(e,t,n){if(Math.floor(e)!==e)throw V(e,n),new F.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}j("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),j("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),j("ERR_OUT_OF_RANGE",function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=H(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=H(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r},RangeError);const z=/[^+/0-9A-Za-z-_]/g;function G(e,t){let n;t=t||1/0;const r=e.length;let i=null;const s=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function q(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const J=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function Z(e){return"undefined"==typeof BigInt?$:e}function $(){throw new Error("BigInt not supported")}},8310(e,t,n){e.exports=i;var r=n(7007).EventEmitter;function i(){r.call(this)}n(6698)(i,r),i.Readable=n(5412),i.Writable=n(6708),i.Duplex=n(5382),i.Transform=n(4610),i.PassThrough=n(3600),i.finished=n(6238),i.pipeline=n(7758),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function s(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",s),e._isStdio||t&&!1===t.end||(n.on("end",a),n.on("close",c));var o=!1;function a(){o||(o=!0,e.end())}function c(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(h(),0===r.listenerCount(this,"error"))throw e}function h(){n.removeListener("data",i),e.removeListener("drain",s),n.removeListener("end",a),n.removeListener("close",c),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",h),n.removeListener("close",h),e.removeListener("close",h)}return n.on("error",l),e.on("error",l),n.on("end",h),n.on("close",h),e.on("close",h),e.emit("pipe",n),e}},8411(e,t,n){var r,i=n(9805),s=n(3665),o=n(3269),a=n(4823),c=n(4674),l=-2,h=258,u=262,p=103,d=113,f=666;function g(e,t){return e.msg=c[t],t}function m(e){return(e<<1)-(e>4?9:0)}function w(e){for(var t=e.length;--t>=0;)e[t]=0}function y(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function b(e,t){s._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,y(e.strm)}function A(e,t){e.pending_buf[e.pending++]=t}function v(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function _(e,t,n,r){var s=e.avail_in;return s>r&&(s=r),0===s?0:(e.avail_in-=s,i.arraySet(t,e.input,e.next_in,s,n),1===e.state.wrap?e.adler=o(e.adler,t,s,n):2===e.state.wrap&&(e.adler=a(e.adler,t,s,n)),e.next_in+=s,e.total_in+=s,s)}function E(e,t){var n,r,i=e.max_chain_length,s=e.strstart,o=e.prev_length,a=e.nice_match,c=e.strstart>e.w_size-u?e.strstart-(e.w_size-u):0,l=e.window,p=e.w_mask,d=e.prev,f=e.strstart+h,g=l[s+o-1],m=l[s+o];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(l[(n=t)+o]===m&&l[n+o-1]===g&&l[n]===l[s]&&l[++n]===l[s+1]){s+=2,n++;do{}while(l[++s]===l[++n]&&l[++s]===l[++n]&&l[++s]===l[++n]&&l[++s]===l[++n]&&l[++s]===l[++n]&&l[++s]===l[++n]&&l[++s]===l[++n]&&l[++s]===l[++n]&&s<f);if(r=h-(f-s),s=f-h,r>o){if(e.match_start=t,o=r,r>=a)break;g=l[s+o-1],m=l[s+o]}}}while((t=d[t&p])>c&&0!==--i);return o<=e.lookahead?o:e.lookahead}function x(e){var t,n,r,s,o,a=e.w_size;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=a+(a-u)){i.arraySet(e.window,e.window,a,a,0),e.match_start-=a,e.strstart-=a,e.block_start-=a,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=a?r-a:0}while(--n);t=n=a;do{r=e.prev[--t],e.prev[t]=r>=a?r-a:0}while(--n);s+=a}if(0===e.strm.avail_in)break;if(n=_(e.strm,e.window,e.strstart+e.lookahead,s),e.lookahead+=n,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+3-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<u&&0!==e.strm.avail_in)}function I(e,t){for(var n,r;;){if(e.lookahead<u){if(x(e),e.lookahead<u&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-u&&(e.match_length=E(e,n)),e.match_length>=3)if(r=s._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!==--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(b(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(b(e,!1),0===e.strm.avail_out)?1:2}function S(e,t){for(var n,r,i;;){if(e.lookahead<u){if(x(e),e.lookahead<u&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-u&&(e.match_length=E(e,n),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=s._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!==--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(b(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=s._tr_tally(e,0,e.window[e.strstart-1]))&&b(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=s._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(b(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(b(e,!1),0===e.strm.avail_out)?1:2}function T(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function C(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),w(this.dyn_ltree),w(this.dyn_dtree),w(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),w(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),w(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function R(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:d,e.adler=2===t.wrap?0:1,t.last_flush=0,s._tr_init(t),0):g(e,l)}function O(e){var t,n=R(e);return 0===n&&((t=e.state).window_size=2*t.w_size,w(t.head),t.max_lazy_match=r[t.level].max_lazy,t.good_match=r[t.level].good_length,t.nice_match=r[t.level].nice_length,t.max_chain_length=r[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),n}function k(e,t,n,r,s,o){if(!e)return l;var a=1;if(-1===t&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),s<1||s>9||8!==n||r<8||r>15||t<0||t>9||o<0||o>4)return g(e,l);8===r&&(r=9);var c=new C;return e.state=c,c.strm=e,c.wrap=a,c.gzhead=null,c.w_bits=r,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=s+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+3-1)/3),c.window=new i.Buf8(2*c.w_size),c.head=new i.Buf16(c.hash_size),c.prev=new i.Buf16(c.w_size),c.lit_bufsize=1<<s+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new i.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=t,c.strategy=o,c.method=n,O(e)}r=[new T(0,0,0,0,function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(x(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,b(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-u&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(b(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(b(e,!1),e.strm.avail_out),1)}),new T(4,4,8,4,I),new T(4,5,16,8,I),new T(4,6,32,32,I),new T(4,4,16,16,S),new T(8,16,32,32,S),new T(8,16,128,128,S),new T(8,32,128,256,S),new T(32,128,258,1024,S),new T(32,258,258,4096,S)],t.deflateInit=function(e,t){return k(e,t,8,15,8,0)},t.deflateInit2=k,t.deflateReset=O,t.deflateResetKeep=R,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?l:(e.state.gzhead=t,0):l},t.deflate=function(e,t){var n,i,o,c;if(!e||!e.state||t>5||t<0)return e?g(e,l):l;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===f&&4!==t)return g(e,0===e.avail_out?-5:l);if(i.strm=e,n=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,A(i,31),A(i,139),A(i,8),i.gzhead?(A(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),A(i,255&i.gzhead.time),A(i,i.gzhead.time>>8&255),A(i,i.gzhead.time>>16&255),A(i,i.gzhead.time>>24&255),A(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),A(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(A(i,255&i.gzhead.extra.length),A(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=a(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(A(i,0),A(i,0),A(i,0),A(i,0),A(i,0),A(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),A(i,3),i.status=d);else{var u=8+(i.w_bits-8<<4)<<8;u|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(u|=32),u+=31-u%31,i.status=d,v(i,u),0!==i.strstart&&(v(i,e.adler>>>16),v(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),y(e),o=i.pending,i.pending!==i.pending_buf_size));)A(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),y(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,A(i,c)}while(0!==c);i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),0===c&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),y(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,A(i,c)}while(0!==c);i.gzhead.hcrc&&i.pending>o&&(e.adler=a(e.adler,i.pending_buf,i.pending-o,o)),0===c&&(i.status=p)}else i.status=p;if(i.status===p&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&y(e),i.pending+2<=i.pending_buf_size&&(A(i,255&e.adler),A(i,e.adler>>8&255),e.adler=0,i.status=d)):i.status=d),0!==i.pending){if(y(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&m(t)<=m(n)&&4!==t)return g(e,-5);if(i.status===f&&0!==e.avail_in)return g(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&i.status!==f){var _=2===i.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(x(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(b(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(b(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var n,r,i,o,a=e.window;;){if(e.lookahead<=h){if(x(e),e.lookahead<=h&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=a[i=e.strstart-1])===a[++i]&&r===a[++i]&&r===a[++i]){o=e.strstart+h;do{}while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o);e.match_length=h-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=s._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(b(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(b(e,!1),0===e.strm.avail_out)?1:2}(i,t):r[i.level].func(i,t);if(3!==_&&4!==_||(i.status=f),1===_||3===_)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===_&&(1===t?s._tr_align(i):5!==t&&(s._tr_stored_block(i,0,0,!1),3===t&&(w(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),y(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(A(i,255&e.adler),A(i,e.adler>>8&255),A(i,e.adler>>16&255),A(i,e.adler>>24&255),A(i,255&e.total_in),A(i,e.total_in>>8&255),A(i,e.total_in>>16&255),A(i,e.total_in>>24&255)):(v(i,e.adler>>>16),v(i,65535&e.adler)),y(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==p&&t!==d&&t!==f?g(e,l):(e.state=null,t===d?g(e,-3):0):l},t.deflateSetDictionary=function(e,t){var n,r,s,a,c,h,u,p,d=t.length;if(!e||!e.state)return l;if(2===(a=(n=e.state).wrap)||1===a&&42!==n.status||n.lookahead)return l;for(1===a&&(e.adler=o(e.adler,t,d,0)),n.wrap=0,d>=n.w_size&&(0===a&&(w(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,d-n.w_size,n.w_size,0),t=p,d=n.w_size),c=e.avail_in,h=e.next_in,u=e.input,e.avail_in=d,e.next_in=0,e.input=t,x(n);n.lookahead>=3;){r=n.strstart,s=n.lookahead-2;do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+3-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++}while(--s);n.strstart=r,n.lookahead=2,x(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=h,e.input=u,e.avail_in=c,n.wrap=a,0},t.deflateInfo="pako deflate (from Nodeca project)"},8712(e,t,n){var r=n(9017);t.init=function(){t.dictionary=r.init()},t.offsetsByLength=new Uint32Array([0,0,0,0,0,4096,9216,21504,35840,44032,53248,63488,74752,87040,93696,100864,104704,106752,108928,113536,115968,118528,119872,121280,122016]),t.sizeBitsByLength=new Uint8Array([0,0,0,0,10,10,11,11,10,10,10,10,10,9,9,8,7,7,8,7,7,6,6,5,5]),t.minDictionaryWordLength=4,t.maxDictionaryWordLength=24},8904(e,t,n){const r=n(2788),i=n(3085),s={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function o(e){this.options=Object.assign({},s,e),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=i(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=l),this.processTextOrObjNode=a,this.options.format?(this.indentate=c,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function a(e,t,n,r){const i=this.j2x(e,n+1,r.concat(t));return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,i.attrStr,n):this.buildObjectNode(i.val,t,i.attrStr,n)}function c(e){return this.options.indentBy.repeat(e)}function l(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}o.prototype.build=function(e){return this.options.preserveOrder?r(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0,[]).val)},o.prototype.j2x=function(e,t,n){let r="",i="";const s=n.join(".");for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o))if(void 0===e[o])this.isAttribute(o)&&(i+="");else if(null===e[o])this.isAttribute(o)||o===this.options.cdataPropName?i+="":"?"===o[0]?i+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+o+"/"+this.tagEndChar;else if(e[o]instanceof Date)i+=this.buildTextValNode(e[o],o,"",t);else if("object"!=typeof e[o]){const n=this.isAttribute(o);if(n&&!this.ignoreAttributesFn(n,s))r+=this.buildAttrPairStr(n,""+e[o]);else if(!n)if(o===this.options.textNodeName){let t=this.options.tagValueProcessor(o,""+e[o]);i+=this.replaceEntitiesValue(t)}else i+=this.buildTextValNode(e[o],o,"",t)}else if(Array.isArray(e[o])){const r=e[o].length;let s="",a="";for(let c=0;c<r;c++){const r=e[o][c];if(void 0===r);else if(null===r)"?"===o[0]?i+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+o+"/"+this.tagEndChar;else if("object"==typeof r)if(this.options.oneListGroup){const e=this.j2x(r,t+1,n.concat(o));s+=e.val,this.options.attributesGroupName&&r.hasOwnProperty(this.options.attributesGroupName)&&(a+=e.attrStr)}else s+=this.processTextOrObjNode(r,o,t,n);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(o,r);e=this.replaceEntitiesValue(e),s+=e}else s+=this.buildTextValNode(r,o,"",t)}this.options.oneListGroup&&(s=this.buildObjectNode(s,o,a,t)),i+=s}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const t=Object.keys(e[o]),n=t.length;for(let i=0;i<n;i++)r+=this.buildAttrPairStr(t[i],""+e[o][t[i]])}else i+=this.processTextOrObjNode(e[o],o,t,n);return{attrStr:r,val:i}},o.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},o.prototype.buildObjectNode=function(e,t,n,r){if(""===e)return"?"===t[0]?this.indentate(r)+"<"+t+n+"?"+this.tagEndChar:this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar;{let i="</"+t+this.tagEndChar,s="";return"?"===t[0]&&(s="?",i=""),!n&&""!==n||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===s.length?this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(r)+"<"+t+n+s+this.tagEndChar+e+this.indentate(r)+i:this.indentate(r)+"<"+t+n+s+">"+e+i}},o.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},o.prototype.buildTextValNode=function(e,t,n,r){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(r)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(r)+"<"+t+n+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),""===i?this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+"<"+t+n+">"+i+"</"+t+this.tagEndChar}},o.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const n=this.options.entities[t];e=e.replace(n.regex,n.val)}return e},e.exports=o},9017(e,t,n){var r=n(3390);t.init=function(){return(0,n(9206).BrotliDecompressBuffer)(r.toByteArray(n(7611)))}},9206(e,t,n){var r=n(4927).z,i=n(4927).y,s=n(6035),o=n(8712),a=n(8171).z,c=n(8171).u,l=n(2805),h=n(7708),u=n(8270),p=1080,d=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),f=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),g=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),m=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function w(e){var t;return 0===e.readBits(1)?16:(t=e.readBits(3))>0?17+t:(t=e.readBits(3))>0?8+t:17}function y(e){if(e.readBits(1)){var t=e.readBits(3);return 0===t?1:e.readBits(t)+(1<<t)}return 0}function b(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function A(e){var t,n,r,i=new b;if(i.input_end=e.readBits(1),i.input_end&&e.readBits(1))return i;if(7===(t=e.readBits(2)+4)){if(i.is_metadata=!0,0!==e.readBits(1))throw new Error("Invalid reserved bit");if(0===(n=e.readBits(2)))return i;for(r=0;r<n;r++){var s=e.readBits(8);if(r+1===n&&n>1&&0===s)throw new Error("Invalid size byte");i.meta_block_length|=s<<8*r}}else for(r=0;r<t;++r){var o=e.readBits(4);if(r+1===t&&t>4&&0===o)throw new Error("Invalid size nibble");i.meta_block_length|=o<<4*r}return++i.meta_block_length,i.input_end||i.is_metadata||(i.is_uncompressed=e.readBits(1)),i}function v(e,t,n){var r;return n.fillBitWindow(),(r=e[t+=n.val_>>>n.bit_pos_&255].bits-8)>0&&(n.bit_pos_+=8,t+=e[t].value,t+=n.val_>>>n.bit_pos_&(1<<r)-1),n.bit_pos_+=e[t].bits,e[t].value}function _(e,t,n,r){var i,s,o=new Uint8Array(e);if(r.readMoreInput(),1===(s=r.readBits(2))){for(var l=e-1,h=0,u=new Int32Array(4),p=r.readBits(2)+1;l;)l>>=1,++h;for(f=0;f<p;++f)u[f]=r.readBits(h)%e,o[u[f]]=2;switch(o[u[0]]=1,p){case 1:break;case 3:if(u[0]===u[1]||u[0]===u[2]||u[1]===u[2])throw new Error("[ReadHuffmanCode] invalid symbols");break;case 2:if(u[0]===u[1])throw new Error("[ReadHuffmanCode] invalid symbols");o[u[1]]=1;break;case 4:if(u[0]===u[1]||u[0]===u[2]||u[0]===u[3]||u[1]===u[2]||u[1]===u[3]||u[2]===u[3])throw new Error("[ReadHuffmanCode] invalid symbols");r.readBits(1)?(o[u[2]]=3,o[u[3]]=3):o[u[0]]=2}}else{var f,g=new Uint8Array(18),m=32,w=0,y=[new a(2,0),new a(2,4),new a(2,3),new a(3,2),new a(2,0),new a(2,4),new a(2,3),new a(4,1),new a(2,0),new a(2,4),new a(2,3),new a(3,2),new a(2,0),new a(2,4),new a(2,3),new a(4,5)];for(f=s;f<18&&m>0;++f){var b,A=d[f],v=0;r.fillBitWindow(),v+=r.val_>>>r.bit_pos_&15,r.bit_pos_+=y[v].bits,b=y[v].value,g[A]=b,0!==b&&(m-=32>>b,++w)}if(1!==w&&0!==m)throw new Error("[ReadHuffmanCode] invalid num_codes or space");!function(e,t,n,r){for(var i=0,s=8,o=0,l=0,h=32768,u=[],p=0;p<32;p++)u.push(new a(0,0));for(c(u,0,5,e,18);i<t&&h>0;){var d,f=0;if(r.readMoreInput(),r.fillBitWindow(),f+=r.val_>>>r.bit_pos_&31,r.bit_pos_+=u[f].bits,(d=255&u[f].value)<16)o=0,n[i++]=d,0!==d&&(s=d,h-=32768>>d);else{var g,m,w=d-14,y=0;if(16===d&&(y=s),l!==y&&(o=0,l=y),g=o,o>0&&(o-=2,o<<=w),i+(m=(o+=r.readBits(w)+3)-g)>t)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var b=0;b<m;b++)n[i+b]=l;i+=m,0!==l&&(h-=m<<15-l)}}if(0!==h)throw new Error("[ReadHuffmanCodeLengths] space = "+h);for(;i<t;i++)n[i]=0}(g,e,o,r)}if(0===(i=c(t,n,8,o,e)))throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return i}function E(e,t,n){var r,i;return r=v(e,t,n),i=h.kBlockLengthPrefixCode[r].nbits,h.kBlockLengthPrefixCode[r].offset+n.readBits(i)}function x(e,t,n){var r;return e<16?(n+=f[e],r=t[n&=3]+g[e]):r=e-16+1,r}function I(e,t){for(var n=e[t],r=t;r;--r)e[r]=e[r-1];e[0]=n}function S(e,t){this.alphabet_size=e,this.num_htrees=t,this.codes=new Array(t+t*m[e+31>>>5]),this.htrees=new Uint32Array(t)}function T(e,t){var n,r,i={num_htrees:null,context_map:null},s=0;t.readMoreInput();var o=i.num_htrees=y(t)+1,c=i.context_map=new Uint8Array(e);if(o<=1)return i;for(t.readBits(1)&&(s=t.readBits(4)+1),n=[],r=0;r<p;r++)n[r]=new a(0,0);for(_(o+s,n,0,t),r=0;r<e;){var l;if(t.readMoreInput(),0===(l=v(n,0,t)))c[r]=0,++r;else if(l<=s)for(var h=1+(1<<l)+t.readBits(l);--h;){if(r>=e)throw new Error("[DecodeContextMap] i >= context_map_size");c[r]=0,++r}else c[r]=l-s,++r}return t.readBits(1)&&function(e,t){var n,r=new Uint8Array(256);for(n=0;n<256;++n)r[n]=n;for(n=0;n<t;++n){var i=e[n];e[n]=r[i],i&&I(r,i)}}(c,e),i}function C(e,t,n,r,i,s,o){var a,c=2*n,l=n,h=v(t,n*p,o);(a=0===h?i[c+(1&s[l])]:1===h?i[c+(s[l]-1&1)]+1:h-2)>=e&&(a-=e),r[n]=a,i[c+(1&s[l])]=a,++s[l]}function R(e,t,n,r,i,o){var a,c=i+1,l=n&i,h=o.pos_&s.IBUF_MASK;if(t<8||o.bit_pos_+(t<<3)<o.bit_end_pos_)for(;t-- >0;)o.readMoreInput(),r[l++]=o.readBits(8),l===c&&(e.write(r,c),l=0);else{if(o.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;o.bit_pos_<32;)r[l]=o.val_>>>o.bit_pos_,o.bit_pos_+=8,++l,--t;if(h+(a=o.bit_end_pos_-o.bit_pos_>>3)>s.IBUF_MASK){for(var u=s.IBUF_MASK+1-h,p=0;p<u;p++)r[l+p]=o.buf_[h+p];a-=u,l+=u,t-=u,h=0}for(p=0;p<a;p++)r[l+p]=o.buf_[h+p];if(t-=a,(l+=a)>=c)for(e.write(r,c),l-=c,p=0;p<l;p++)r[p]=r[c+p];for(;l+t>=c;){if(a=c-l,o.input_.read(r,l,a)<a)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");e.write(r,c),t-=a,l=0}if(o.input_.read(r,l,t)<t)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");o.reset()}}function O(e){var t=e.bit_pos_+7&-8;return 0==e.readBits(t-e.bit_pos_)}function k(e){var t=new r(e),n=new s(t);return w(n),A(n).meta_block_length}function N(e,t){var n,r,i,c,d,f,g,m,b,I,k=0,N=0,B=0,P=[16,15,11,4],D=0,L=0,U=0,M=[new S(0,0),new S(0,0),new S(0,0)],F=128+s.READ_SIZE;i=(1<<(r=w(I=new s(e))))-16,d=(c=1<<r)-1,f=new Uint8Array(c+F+o.maxDictionaryWordLength),g=c,m=[],b=[];for(var j=0;j<3240;j++)m[j]=new a(0,0),b[j]=new a(0,0);for(;!N;){var H,W,V,Q,z,G,q,K,X,Y,J,Z=0,$=[1<<28,1<<28,1<<28],ee=[0],te=[1,1,1],ne=[0,1,0,1,0,1],re=[0],ie=null,se=null,oe=0,ae=null,ce=0,le=0,he=0;for(n=0;n<3;++n)M[n].codes=null,M[n].htrees=null;I.readMoreInput();var ue=A(I);if(k+(Z=ue.meta_block_length)>t.buffer.length){var pe=new Uint8Array(k+Z);pe.set(t.buffer),t.buffer=pe}if(N=ue.input_end,H=ue.is_uncompressed,ue.is_metadata)for(O(I);Z>0;--Z)I.readMoreInput(),I.readBits(8);else if(0!==Z)if(H)I.bit_pos_=I.bit_pos_+7&-8,R(t,Z,k,f,d,I),k+=Z;else{for(n=0;n<3;++n)te[n]=y(I)+1,te[n]>=2&&(_(te[n]+2,m,n*p,I),_(26,b,n*p,I),$[n]=E(b,n*p,I),re[n]=1);for(I.readMoreInput(),Q=(1<<(W=I.readBits(2)))-1,z=(V=16+(I.readBits(4)<<W))+(48<<W),ie=new Uint8Array(te[0]),n=0;n<te[0];++n)I.readMoreInput(),ie[n]=I.readBits(2)<<1;var de=T(te[0]<<6,I);q=de.num_htrees,G=de.context_map;var fe=T(te[2]<<2,I);for(X=fe.num_htrees,K=fe.context_map,M[0]=new S(256,q),M[1]=new S(704,te[1]),M[2]=new S(z,X),n=0;n<3;++n)M[n].decode(I);for(se=0,ae=0,Y=ie[ee[0]],le=l.lookupOffsets[Y],he=l.lookupOffsets[Y+1],J=M[1].htrees[0];Z>0;){var ge,me,we,ye,be,Ae,ve,_e,Ee,xe,Ie,Se;for(I.readMoreInput(),0===$[1]&&(C(te[1],m,1,ee,ne,re,I),$[1]=E(b,p,I),J=M[1].htrees[ee[1]]),--$[1],(me=(ge=v(M[1].codes,J,I))>>6)>=2?(me-=2,ve=-1):ve=0,we=h.kInsertRangeLut[me]+(ge>>3&7),ye=h.kCopyRangeLut[me]+(7&ge),be=h.kInsertLengthPrefixCode[we].offset+I.readBits(h.kInsertLengthPrefixCode[we].nbits),Ae=h.kCopyLengthPrefixCode[ye].offset+I.readBits(h.kCopyLengthPrefixCode[ye].nbits),L=f[k-1&d],U=f[k-2&d],Ee=0;Ee<be;++Ee)I.readMoreInput(),0===$[0]&&(C(te[0],m,0,ee,ne,re,I),$[0]=E(b,0,I),se=ee[0]<<6,Y=ie[ee[0]],le=l.lookupOffsets[Y],he=l.lookupOffsets[Y+1]),oe=G[se+(l.lookup[le+L]|l.lookup[he+U])],--$[0],U=L,L=v(M[0].codes,M[0].htrees[oe],I),f[k&d]=L,(k&d)===d&&t.write(f,c),++k;if((Z-=be)<=0)break;if(ve<0&&(I.readMoreInput(),0===$[2]&&(C(te[2],m,2,ee,ne,re,I),$[2]=E(b,2160,I),ae=ee[2]<<2),--$[2],ce=K[ae+(255&(Ae>4?3:Ae-2))],(ve=v(M[2].codes,M[2].htrees[ce],I))>=V&&(Se=(ve-=V)&Q,ve=V+((Te=(2+(1&(ve>>=W))<<(Ie=1+(ve>>1)))-4)+I.readBits(Ie)<<W)+Se)),(_e=x(ve,P,D))<0)throw new Error("[BrotliDecompress] invalid distance");if(xe=k&d,_e>(B=k<i&&B!==i?k:i)){if(!(Ae>=o.minDictionaryWordLength&&Ae<=o.maxDictionaryWordLength))throw new Error("Invalid backward reference. pos: "+k+" distance: "+_e+" len: "+Ae+" bytes left: "+Z);var Te=o.offsetsByLength[Ae],Ce=_e-B-1,Re=o.sizeBitsByLength[Ae],Oe=Ce>>Re;if(Te+=(Ce&(1<<Re)-1)*Ae,!(Oe<u.kNumTransforms))throw new Error("Invalid backward reference. pos: "+k+" distance: "+_e+" len: "+Ae+" bytes left: "+Z);var ke=u.transformDictionaryWord(f,xe,Te,Ae,Oe);if(k+=ke,Z-=ke,(xe+=ke)>=g){t.write(f,c);for(var Ne=0;Ne<xe-g;Ne++)f[Ne]=f[g+Ne]}}else{if(ve>0&&(P[3&D]=_e,++D),Ae>Z)throw new Error("Invalid backward reference. pos: "+k+" distance: "+_e+" len: "+Ae+" bytes left: "+Z);for(Ee=0;Ee<Ae;++Ee)f[k&d]=f[k-_e&d],(k&d)===d&&t.write(f,c),++k,--Z}L=f[k-1&d],U=f[k-2&d]}k&=1073741823}}t.write(f,k&d)}S.prototype.decode=function(e){var t,n=0;for(t=0;t<this.num_htrees;++t)this.htrees[t]=n,n+=_(this.alphabet_size,this.codes,n,e)},t.BrotliDecompressBuffer=function(e,t){var n=new r(e);null==t&&(t=k(e));var s=new Uint8Array(t),o=new i(s);return N(n,o),o.pos<o.buffer.length&&(o.buffer=o.buffer.subarray(0,o.pos)),o.buffer},o.init()},9400(e,t,n){const r=n(5334),i=(e,t)=>{for(;t<e.length&&/\s/.test(e[t]);)t++;return t};function s(e,t,n){for(let r=0;r<t.length;r++)if(t[r]!==e[n+r+1])return!1;return!0}function o(e){if(r.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}e.exports=class{constructor(e){this.suppressValidationErr=!e,this.options=e||{}}readDocType(e,t){const n=Object.create(null);let r=0;if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let i=1,o=!1,a=!1,c="";for(;t<e.length;t++)if("<"!==e[t]||a)if(">"===e[t]){if(a?"-"===e[t-1]&&"-"===e[t-2]&&(a=!1,i--):i--,0===i)break}else"["===e[t]?o=!0:c+=e[t];else{if(o&&s(e,"!ENTITY",t)){let i,s;if(t+=7,[i,s,t]=this.readEntityExp(e,t+1,this.suppressValidationErr),-1===s.indexOf("&")){if(!1!==this.options.enabled&&null!=this.options.maxEntityCount&&r>=this.options.maxEntityCount)throw new Error(`Entity count (${r+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);const e=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n[i]={regx:RegExp(`&${e};`,"g"),val:s},r++}}else if(o&&s(e,"!ELEMENT",t)){t+=8;const{index:n}=this.readElementExp(e,t+1);t=n}else if(o&&s(e,"!ATTLIST",t))t+=8;else if(o&&s(e,"!NOTATION",t)){t+=9;const{index:n}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=n}else{if(!s(e,"!--",t))throw new Error("Invalid DOCTYPE");a=!0}i++,c=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:t}}readEntityExp(e,t){t=i(e,t);let n="";for(;t<e.length&&!/\s/.test(e[t])&&'"'!==e[t]&&"'"!==e[t];)n+=e[t],t++;if(o(n),t=i(e,t),!this.suppressValidationErr){if("SYSTEM"===e.substring(t,t+6).toUpperCase())throw new Error("External entities are not supported");if("%"===e[t])throw new Error("Parameter entities are not supported")}let r="";if([t,r]=this.readIdentifierVal(e,t,"entity"),!1!==this.options.enabled&&null!=this.options.maxEntitySize&&r.length>this.options.maxEntitySize)throw new Error(`Entity "${n}" size (${r.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[n,r,--t]}readNotationExp(e,t){t=i(e,t);let n="";for(;t<e.length&&!/\s/.test(e[t]);)n+=e[t],t++;!this.suppressValidationErr&&o(n),t=i(e,t);const r=e.substring(t,t+6).toUpperCase();if(!this.suppressValidationErr&&"SYSTEM"!==r&&"PUBLIC"!==r)throw new Error(`Expected SYSTEM or PUBLIC, found "${r}"`);t+=r.length,t=i(e,t);let s=null,a=null;if("PUBLIC"===r)[t,s]=this.readIdentifierVal(e,t,"publicIdentifier"),'"'!==e[t=i(e,t)]&&"'"!==e[t]||([t,a]=this.readIdentifierVal(e,t,"systemIdentifier"));else if("SYSTEM"===r&&([t,a]=this.readIdentifierVal(e,t,"systemIdentifier"),!this.suppressValidationErr&&!a))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:s,systemIdentifier:a,index:--t}}readIdentifierVal(e,t,n){let r="";const i=e[t];if('"'!==i&&"'"!==i)throw new Error(`Expected quoted string, found "${i}"`);for(t++;t<e.length&&e[t]!==i;)r+=e[t],t++;if(e[t]!==i)throw new Error(`Unterminated ${n} value`);return[++t,r]}readElementExp(e,t){t=i(e,t);let n="";for(;t<e.length&&!/\s/.test(e[t]);)n+=e[t],t++;if(!this.suppressValidationErr&&!r.isName(n))throw new Error(`Invalid element name: "${n}"`);let o="";if("E"===e[t=i(e,t)]&&s(e,"MPTY",t))t+=4;else if("A"===e[t]&&s(e,"NY",t))t+=2;else if("("===e[t]){for(t++;t<e.length&&")"!==e[t];)o+=e[t],t++;if(")"!==e[t])throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${e[t]}"`);return{elementName:n,contentModel:o.trim(),index:t}}readAttlistExp(e,t){t=i(e,t);let n="";for(;t<e.length&&!/\s/.test(e[t]);)n+=e[t],t++;o(n),t=i(e,t);let r="";for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;if(!o(r))throw new Error(`Invalid attribute name: "${r}"`);t=i(e,t);let s="";if("NOTATION"===e.substring(t,t+8).toUpperCase()){if(s="NOTATION","("!==e[t=i(e,t+=8)])throw new Error(`Expected '(', found "${e[t]}"`);t++;let n=[];for(;t<e.length&&")"!==e[t];){let r="";for(;t<e.length&&"|"!==e[t]&&")"!==e[t];)r+=e[t],t++;if(r=r.trim(),!o(r))throw new Error(`Invalid notation name: "${r}"`);n.push(r),"|"===e[t]&&(t++,t=i(e,t))}if(")"!==e[t])throw new Error("Unterminated list of notations");t++,s+=" ("+n.join("|")+")"}else{for(;t<e.length&&!/\s/.test(e[t]);)s+=e[t],t++;const n=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!n.includes(s.toUpperCase()))throw new Error(`Invalid attribute type: "${s}"`)}t=i(e,t);let a="";return"#REQUIRED"===e.substring(t,t+8).toUpperCase()?(a="#REQUIRED",t+=8):"#IMPLIED"===e.substring(t,t+7).toUpperCase()?(a="#IMPLIED",t+=7):[t,a]=this.readIdentifierVal(e,t,"ATTLIST"),{elementName:n,attributeName:r,attributeType:s,defaultValue:a,index:t}}}},9681(e){e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},9805(e,t){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var s=0;s<r;s++)e[i+s]=t[n+s]},flattenChunks:function(e){var t,n,r,i,s,o;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(o=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)s=e[t],o.set(s,i),i+=s.length;return o}},s={arraySet:function(e,t,n,r,i){for(var s=0;s<r;s++)e[i+s]=t[n+s]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,i)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,s))},t.setTyped(n)},9838(){}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};n.r(r),n.d(r,{Any:()=>Hu,BaseBlock:()=>nh,BaseStringBlock:()=>ih,BitString:()=>tu,BmpString:()=>_u,Boolean:()=>Jh,CharacterString:()=>Bu,Choice:()=>Wu,Constructed:()=>qh,DATE:()=>Du,DateTime:()=>Fu,Duration:()=>Mu,EndOfContent:()=>Kh,Enumerated:()=>au,GeneralString:()=>Ou,GeneralizedTime:()=>Lu,GraphicString:()=>ku,HexBlock:()=>Yl,IA5String:()=>Ru,Integer:()=>ou,Null:()=>Xh,NumericString:()=>Su,ObjectIdentifier:()=>hu,OctetString:()=>$h,Primitive:()=>Hh,PrintableString:()=>Iu,RawData:()=>Vu,RelativeObjectIdentifier:()=>du,Repeated:()=>Qu,Sequence:()=>fu,Set:()=>gu,TIME:()=>ju,TeletexString:()=>Tu,TimeOfDay:()=>Uu,UTCTime:()=>Pu,UniversalString:()=>xu,Utf8String:()=>Au,ValueBlock:()=>Zl,VideotexString:()=>Cu,ViewWriter:()=>Nl,VisibleString:()=>Nu,compareSchema:()=>zu,fromBER:()=>Qh,verifySchema:()=>qu});const i=(e,t)=>t.some(t=>e instanceof t);let s,o;const a=new WeakMap,c=new WeakMap,l=new WeakMap,h=new WeakMap,u=new WeakMap;let p={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return c.get(e);if("objectStoreNames"===t)return e.objectStoreNames||l.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return m(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function d(e){p=e(p)}function f(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(o||(o=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(w(this),t),m(a.get(this))}:function(...t){return m(e.apply(w(this),t))}:function(t,...n){const r=e.call(w(this),t,...n);return l.set(r,t.sort?t.sort():[t]),m(r)}}function g(e){return"function"==typeof e?f(e):(e instanceof IDBTransaction&&function(e){if(c.has(e))return;const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",s),e.removeEventListener("abort",s)},i=()=>{t(),r()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",s),e.addEventListener("abort",s)});c.set(e,t)}(e),i(e,s||(s=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,p):e)}function m(e){if(e instanceof IDBRequest)return function(e){const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",s)},i=()=>{t(m(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",s)});return t.then(t=>{t instanceof IDBCursor&&a.set(t,e)}).catch(()=>{}),u.set(t,e),t}(e);if(h.has(e))return h.get(e);const t=g(e);return t!==e&&(h.set(e,t),u.set(t,e)),t}const w=e=>u.get(e);function y(e,t,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){const o=indexedDB.open(e,t),a=m(o);return r&&o.addEventListener("upgradeneeded",e=>{r(m(o.result),e.oldVersion,e.newVersion,m(o.transaction),e)}),n&&o.addEventListener("blocked",e=>n(e.oldVersion,e.newVersion,e)),a.then(e=>{s&&e.addEventListener("close",()=>s()),i&&e.addEventListener("versionchange",e=>i(e.oldVersion,e.newVersion,e))}).catch(()=>{}),a}function b(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",e=>t(e.oldVersion,e)),m(n).then(()=>{})}const A=["get","getKey","getAll","getAllKeys","count"],v=["put","add","delete","clear"],_=new Map;function E(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(_.get(t))return _.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=v.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!A.includes(n))return;const s=async function(e,...t){const s=this.transaction(e,i?"readwrite":"readonly");let o=s.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),i&&s.done]))[0]};return _.set(t,s),s}d(e=>({...e,get:(t,n,r)=>E(t,n)||e.get(t,n,r),has:(t,n)=>!!E(t,n)||e.has(t,n)}));const x=["continue","continuePrimaryKey","advance"],S={},I=new WeakMap,T=new WeakMap,C={get(e,t){if(!x.includes(t))return e[t];let n=S[t];return n||(n=S[t]=function(...e){I.set(this,T.get(this)[t](...e))}),n}};async function*R(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const n=new Proxy(t,C);for(T.set(n,t),u.set(n,w(t));t;)yield n,t=await(I.get(n)||t.continue()),I.delete(n)}function k(e,t){return t===Symbol.asyncIterator&&i(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&i(e,[IDBIndex,IDBObjectStore])}d(e=>({...e,get:(t,n,r)=>k(t,n)?R:e.get(t,n,r),has:(t,n)=>k(t,n)||e.has(t,n)}));var N={202:"Accepted",502:"Bad Gateway",400:"Bad Request",409:"Conflict",100:"Continue",201:"Created",417:"Expectation Failed",424:"Failed Dependency",403:"Forbidden",504:"Gateway Timeout",410:"Gone",505:"HTTP Version Not Supported",418:"I'm a teapot",419:"Insufficient Space on Resource",507:"Insufficient Storage",500:"Internal Server Error",411:"Length Required",423:"Locked",420:"Method Failure",405:"Method Not Allowed",301:"Moved Permanently",302:"Moved Temporarily",207:"Multi-Status",300:"Multiple Choices",511:"Network Authentication Required",204:"No Content",203:"Non Authoritative Information",406:"Not Acceptable",404:"Not Found",501:"Not Implemented",304:"Not Modified",200:"OK",206:"Partial Content",402:"Payment Required",308:"Permanent Redirect",412:"Precondition Failed",428:"Precondition Required",102:"Processing",407:"Proxy Authentication Required",431:"Request Header Fields Too Large",408:"Request Timeout",413:"Request Entity Too Large",414:"Request-URI Too Long",416:"Requested Range Not Satisfiable",205:"Reset Content",303:"See Other",503:"Service Unavailable",101:"Switching Protocols",307:"Temporary Redirect",429:"Too Many Requests",401:"Unauthorized",451:"Unavailable For Legal Reasons",422:"Unprocessable Entity",415:"Unsupported Media Type",305:"Use Proxy"};function O(e){var t=N[e.toString()];if(!t)throw new Error("Status code does not exist: "+e);return t}const B=25e6,P=262144,L="___wb_replay_top_frame",D=/Expires=\w{3},\s\d[^;,]+(?:;\s*)?/gi;let U="default-src 'unsafe-eval' 'unsafe-inline' 'self' data: blob: mediastream: ws: wss: ; form-action 'self' ; object-src 'none'";function F(){return U}function M(e,t){for(const n of t)if(e.startsWith(n))return!0;return!1}function j(e){return e.replace(/[-:T]/g,"").slice(0,14)}function H(e){if(!e)return new Date;e.length<17&&(e+="00000101000000000".substring(e.length));const t=e.substring(0,4)+"-"+e.substring(4,6)+"-"+e.substring(6,8)+"T"+e.substring(8,10)+":"+e.substring(10,12)+":"+e.substring(12,14)+"."+e.substring(14)+"Z";return new Date(t)}function W(e){if(!e)return"";try{return""+e.getTime()/1e3}catch(e){return""}}function Q(e){return Array.from(new Uint8Array(e)).map(e=>e.toString(16).padStart(2,"0")).join("")}async function V(e,t,n=null){const r="string"==typeof e?(new TextEncoder).encode(e):e,i=await crypto.subtle.digest(t,r);return""===n?Q(i):(n||t)+":"+Q(i)}function z(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}function q(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=255&e.charCodeAt(n);return t}function G(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}function K(e){try{return new Headers(e)}catch(t){if("object"==typeof e){const t=e;for(const n of Object.keys(e)){const e=t[n],r=e.replace(/[\r\n]+/g,", ");e!=r&&(t[n]=r)}}else{const t=e;for(const n of Object.keys(e)){const e=t.get(n)||"",r=e.replace(/[\r\n]+/g,", ");e!=r&&t.set(n,r)}}return new Headers(e)}}const X=[101,204,205,304];function Y(e){return X.includes(e)}function J(e){try{return O(e)}catch(e){return"Unknown Status"}}function Z(e){return"XMLHttpRequest"===e.headers.get("X-Pywb-Requested-With")||"cors"===e.mode&&("script"!==e.destination||"esm_"!==e.mod)}async function $(e,t){if(e instanceof ne){const n=await self.clients.matchAll({type:"window"});for(const r of n)new URL(r.url).searchParams.get("source")===t.sourceUrl&&r.postMessage({source:t.sourceUrl,coll:t.dbname.slice(3),type:"authneeded",fileHandle:e.info.fileHandle});return!0}return!1}function ee(e){const t=e.config.metadata?e.config.metadata:{},n={...t,title:t.title||"",desc:t.desc||"",size:t.size||0,filename:e.config.sourceName,loadUrl:e.config.loadUrl,sourceUrl:e.config.sourceUrl,id:e.name,ctime:e.config.ctime,mtime:t.mtime||e.config.ctime,onDemand:e.config.onDemand};return t.ipfsPins&&(n.ipfsPins=t.ipfsPins),n}class te{info;constructor(e={}){this.info=e}toString(){return JSON.stringify(this.info)}}class ne extends te{}class re extends te{}class ie{}class se{}async function oe(e){return new Promise(t=>setTimeout(t,e))}const ae=new Set;function ce(e){for(const t of e)try{const e=new URL(t,self.location.href);ae.add(e.href)}catch(e){}}var le,he=n(4668),ue=n.n(he),pe=n(1668),de=n.n(pe),fe=n(4342);
/*!
* hash-wasm (https://www.npmjs.com/package/hash-wasm)
* (c) Dani Biro
* @license MIT
*/
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function ge(e,t,n,r){return new(n||(n=Promise))(function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,a)}c((r=r.apply(e,t||[])).next())})}class me{constructor(){this.mutex=Promise.resolve()}lock(){let e=()=>{};return this.mutex=this.mutex.then(()=>new Promise(e)),new Promise(t=>{e=t})}dispatch(e){return ge(this,void 0,void 0,function*(){const t=yield this.lock();try{return yield Promise.resolve(e())}finally{t()}})}}const we="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,ye=null!==(le=we.Buffer)&&void 0!==le?le:null,be=we.TextEncoder?new we.TextEncoder:null;function Ae(e,t){return(15&e)+(e>>6|e>>3&8)<<4|(15&t)+(t>>6|t>>3&8)}function ve(e,t){const n=t.length>>1;for(let r=0;r<n;r++){const n=r<<1;e[r]=Ae(t.charCodeAt(n),t.charCodeAt(n+1))}}const _e="a".charCodeAt(0)-10,Ee="0".charCodeAt(0);function xe(e,t,n){let r=0;for(let i=0;i<n;i++){let n=t[i]>>>4;e[r++]=n>9?n+_e:n+Ee,n=15&t[i],e[r++]=n>9?n+_e:n+Ee}return String.fromCharCode.apply(null,e)}const Se=null!==ye?e=>{if("string"==typeof e){const t=ye.from(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.length)}if(ye.isBuffer(e))return new Uint8Array(e.buffer,e.byteOffset,e.length);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Invalid data type!")}:e=>{if("string"==typeof e)return be.encode(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Invalid data type!")},Ie="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Te=new Uint8Array(256);for(let e=0;e<64;e++)Te[Ie.charCodeAt(e)]=e;function Ce(e){let t=Math.floor(.75*e.length);const n=e.length;return"="===e[n-1]&&(t-=1,"="===e[n-2]&&(t-=1)),t}function Re(e){const t=Ce(e),n=e.length,r=new Uint8Array(t);let i=0;for(let t=0;t<n;t+=4){const n=Te[e.charCodeAt(t)],s=Te[e.charCodeAt(t+1)],o=Te[e.charCodeAt(t+2)],a=Te[e.charCodeAt(t+3)];r[i]=n<<2|s>>4,i+=1,r[i]=(15&s)<<4|o>>2,i+=1,r[i]=(3&o)<<6|63&a,i+=1}return r}const ke=16384,Ne=new me,Oe=new Map;function Be(e,t){return ge(this,void 0,void 0,function*(){let n=null,r=null,i=!1;if("undefined"==typeof WebAssembly)throw new Error("WebAssembly is not supported in this environment!");const s=()=>new DataView(n.exports.memory.buffer).getUint32(n.exports.STATE_SIZE,!0),o=Ne.dispatch(()=>ge(this,void 0,void 0,function*(){if(!Oe.has(e.name)){const t=Re(e.data),n=WebAssembly.compile(t);Oe.set(e.name,n)}const t=yield Oe.get(e.name);n=yield WebAssembly.instantiate(t,{})})),a=(e=null)=>{i=!0,n.exports.Hash_Init(e)},c=e=>{if(!i)throw new Error("update() called before init()");(e=>{let t=0;for(;t<e.length;){const i=e.subarray(t,t+ke);t+=i.length,r.set(i),n.exports.Hash_Update(i.length)}})(Se(e))},l=new Uint8Array(2*t),h=(e,s=null)=>{if(!i)throw new Error("digest() called before init()");return i=!1,n.exports.Hash_Final(s),"binary"===e?r.slice(0,t):xe(l,r,t)},u=e=>"string"==typeof e?e.length<4096:e.byteLength<ke;let p=u;switch(e.name){case"argon2":case"scrypt":p=()=>!0;break;case"blake2b":case"blake2s":p=(e,t)=>t<=512&&u(e);break;case"blake3":p=(e,t)=>0===t&&u(e);break;case"xxhash64":case"xxhash3":case"xxhash128":p=()=>!1}return yield(()=>ge(this,void 0,void 0,function*(){n||(yield o);const e=n.exports.Hash_GetBuffer(),t=n.exports.memory.buffer;r=new Uint8Array(t,e,ke)}))(),{getMemory:()=>r,writeMemory:(e,t=0)=>{r.set(e,t)},getExports:()=>n.exports,setMemorySize:e=>{n.exports.Hash_SetMemorySize(e);const t=n.exports.Hash_GetBuffer(),i=n.exports.memory.buffer;r=new Uint8Array(i,t,e)},init:a,update:c,digest:h,save:()=>{if(!i)throw new Error("save() can only be called after init() and before digest()");const t=n.exports.Hash_GetState(),r=s(),o=n.exports.memory.buffer,a=new Uint8Array(o,t,r),c=new Uint8Array(4+r);return ve(c,e.hash),c.set(a,4),c},load:t=>{if(!(t instanceof Uint8Array))throw new Error("load() expects an Uint8Array generated by save()");const r=n.exports.Hash_GetState(),o=s(),a=4+o,c=n.exports.memory.buffer;if(t.length!==a)throw new Error(`Bad state length (expected ${a} bytes, got ${t.length})`);if(!function(e,t){if(e.length!==2*t.length)return!1;for(let n=0;n<t.length;n++){const r=n<<1;if(t[n]!==Ae(e.charCodeAt(r),e.charCodeAt(r+1)))return!1}return!0}(e.hash,t.subarray(0,4)))throw new Error("This state was written by an incompatible hash implementation");const l=t.subarray(4);new Uint8Array(c,r,o).set(l),i=!0},calculate:(e,i=null,s=null)=>{if(!p(e,i))return a(i),c(e),h("hex",s);const o=Se(e);return r.set(o),n.exports.Hash_Calculate(o.length,i,s),xe(l,r,t)},hashLength:t}})}new me,new me,new DataView(new ArrayBuffer(4)),new me,new me,new me,new me,new me,new me;var Pe={name:"sha1",data:"AGFzbQEAAAABEQRgAAF/YAJ/fwBgAABgAX8AAwkIAAECAQMCAAMEBQFwAQEBBQQBAQICBg4CfwFB4IkFC38AQYAICwdwCAZtZW1vcnkCAA5IYXNoX0dldEJ1ZmZlcgAACUhhc2hfSW5pdAACC0hhc2hfVXBkYXRlAAQKSGFzaF9GaW5hbAAFDUhhc2hfR2V0U3RhdGUABg5IYXNoX0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G9JP9vn9Cq7OP/JGjs/DbACABGzcD4IkBQQBCsZaA/p+ihazoAEL/pLmIxZHagpt/IAEbNwPYiQFBAEKXusODk6eWh3dC8ua746On/aelfyABGzcD0IkBQQBC2L2WiPygtb42QufMp9DW0Ouzu38gARs3A8iJASAAEAIQBAsLCwEAQYAICwRwAAAA",hash:"817d957e"};function De(){return Be(Le,32).then(e=>{e.init(256);const t={init:()=>(e.init(256),t),update:n=>(e.update(n),t),digest:t=>e.digest(t),save:()=>e.save(),load:n=>(e.load(n),t),blockSize:64,digestSize:32};return t})}function Ue(e){let t;t="string"==typeof e?e:e?.length?e.reduce((e,t)=>e+String.fromCharCode(t),""):e?e.toString():"";try{return"__wb_post_data="+btoa(t)}catch{return"__wb_post_data="}}function Fe(e){try{if(!e.startsWith("https:")&&!e.startsWith("http:"))return e;let t=(e=e.replace(/^(https?:\/\/)www\d*\./,"$1")).toLowerCase(),n=new URL(t),r=n.hostname.split(".").reverse().join(",");if(n.port&&(r+=":"+n.port),r+=")",r+=n.pathname,n.search){let e=n.search.slice(1).split("&");e.sort(),r+="?"+e.join("&")}return r}catch{return e}}function Me(e,t=0){let{method:n,headers:r,postData:i=""}=e;if("GET"===n)return!1;let s=(e=>{let t=e.get("content-type");if(t)return t;if(!(e instanceof Headers))for(let[t,n]of e.entries())if(t&&"content-type"===t.toLowerCase())return n;return""})(r);function o(e){return e instanceof Uint8Array&&(e=(new TextDecoder).decode(e)),e}let a="";switch(s.split(";")[0]){case"application/x-www-form-urlencoded":a=o(i);break;case"application/json":a=We(o(i));break;case"text/plain":try{a=We(o(i),!1)}catch{a=Ue(i)}break;case"multipart/form-data":if(!s)throw new Error("utils cannot call postToGetURL when missing content-type header");a=function(e,t){return function(e="",t){let n=new URLSearchParams;e instanceof Uint8Array&&(e=(new TextDecoder).decode(e));try{let r=t.split("boundary=")[1],i=e.split(new RegExp("-*"+r+"-*","mi"));for(let e of i){let t=e.trim().match(/name="([^"]+)"\r\n\r\n(.*)/im);t&&n.set(t[1],t[2])}}catch{}return n}(e,t).toString()}(o(i),s);break;default:a=Ue(i)}if(null!=a){t>0&&a.length>t&&(a=a.slice(0,t)),e.requestBody=a;try{a=decodeURI(a)}catch{a=""}return e.url=je(e.url,a,e.method),e.method="GET",!0}return!1}function je(e,t,n){if(!n)return e;let r=e.indexOf("?")>0?"&":"?";return`${e}${r}__wb_method=${n}&${t}`}function He(e,t=!0){if("string"==typeof e)try{e=JSON.parse(e)}catch{e={}}let n=new URLSearchParams,r={},i=(e,t="")=>{let s="";if("object"!=typeof e||e instanceof Array){if(e instanceof Array)for(let n=0;n<e.length;n++)i(e[n],t)}else try{for(let[t,n]of Object.entries(e))i(n,t)}catch{null===e&&(s="null")}["string","number","boolean"].includes(typeof e)&&(s=e.toString()),s&&n.set((e=>n.has(e)?(e in r||(r[e]=1),e+"."+ ++r[e]+"_"):e)(t),s)};try{i(e)}catch(e){if(!t)throw e}return n}function We(e="",t=!0){return He(e,t).toString()}function Qe(e,t){if(1===e.length)return e[0];let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.byteLength;return n}function Ve(e,t){return[e.slice(0,t),e.slice(t)]}function ze(e){let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=255&e.charCodeAt(n);return(new TextDecoder).decode(t)}new me,new me,new me,new me,new me,new me,new ArrayBuffer(8),new me,new ArrayBuffer(8),new me,new ArrayBuffer(8),new me,new me,new me;var qe=["warc-concurrent-to","warc-protocol"],Ge=["warc-json-metadata"],Ke=",,,";function Xe(e){let t=e.toLowerCase();if(t.startsWith("warc-")&&!qe.includes(t))throw new Error("Invalid multi value WARC header: "+e);return!0}var Ye=class extends Map{constructor(e){if(e instanceof Array){super();for(let t of e)if(t instanceof Array){let e=t[0],n=t[1];this.append(e,n)}}else super(e?Object.entries(e):void 0)}isMultiValue(e,t){return!Ge.includes(e.toLowerCase())&&t.indexOf(Ke)>0&&Xe(e)}getMultiple(e){let t=super.get(e);if(t)return this.isMultiValue(e,t)?t.split(Ke):[t]}append(e,t){let n=this.get(e);n?(Xe(e),this.set(e,n+Ke+t)):this.set(e,t)}*[Symbol.iterator](){for(let[e,t]of super[Symbol.iterator]())if(this.isMultiValue(e,t))for(let n of t.split(Ke))yield[e,n];else yield[e,t]}},Je=new TextDecoder("utf-8"),Ze=class extends pe.Inflate{constructor(e,t){super(e),this.ended=!1,this.chunks=[],this.reader=t}onEnd(e){this.err=e,this.err||(this.reader._rawOffset+=this.strm.total_in)}},$e=class e{static async readFully(e){let t=[],n=0;for await(let r of e)t.push(r),n+=r.byteLength;return Qe(t,n)}getReadableStream(){let e=this[Symbol.asyncIterator]();return new ReadableStream({pull:async t=>e.next().then(e=>{e.done||!e.value?t.close():t.enqueue(e.value)})})}async readFully(){return await e.readFully(this)}async readline(e=0){let t=await this.readlineRaw(e);return t?Je.decode(t):""}async*iterLines(e=0){let t=null;for(;t=await this.readline(e);)yield t}},et=class e extends $e{constructor(t,n="gzip",r=!1){let i;if(super(),this.compressed=n,this.opts={raw:"deflateRaw"===n},this.inflator=n?new Ze(this.opts,this):null,function(e){return!(!e||!(Symbol.asyncIterator in Object(e)))}(t))i=t;else if("object"==typeof t&&"read"in t&&"function"==typeof t.read)i=e.fromReadable(t);else if(t instanceof ReadableStream)i=e.fromReadable(t.getReader());else{if(!function(e){return!(!e||!(Symbol.iterator in Object(e)))}(t))throw new TypeError("Invalid Stream Source");i=e.fromIter(t)}this._sourceIter=r?this.dechunk(i):i[Symbol.asyncIterator](),this.lastValue=null,this.errored=!1,this._savedChunk=null,this._rawOffset=0,this._readOffset=0,this.numChunks=0}async _loadNext(){let e=await this._sourceIter.next();return e.done?null:e.value}async*dechunk(t){let n=t instanceof e?t:new e(t,null),r=-1,i=!0;for(;0!=r;){let e=await n.readlineRaw(64),t=new Uint8Array;if(r=e?parseInt(Je.decode(e),16):0,!r||r>2**32){if(Number.isNaN(r)||r>2**32){i||(this.errored=!0),yield e;break}}else if(t=await n.readSize(r),t.length!=r){i?yield e:this.errored=!0,yield t;break}let s=await n.readSize(2);if(13!=s[0]||10!=s[1]){i?yield e:this.errored=!0,yield t,yield s;break}if(i=!1,!t||0===r)return;yield t}yield*n}unread(e){e.length&&(this._readOffset-=e.length,this._savedChunk&&console.log("Already have chunk!"),this._savedChunk=e)}async _next(){if(this._savedChunk){let e=this._savedChunk;return this._savedChunk=null,e}if(this.compressed){let e=this._getNextChunk();if(e)return e}let e=await this._loadNext();for(;this.compressed&&e;){this._push(e);let t=this._getNextChunk(e);if(t)return t;e=await this._loadNext()}return e}_push(e){if(!this.inflator)throw new Error("AsyncIterReader cannot call _push when this.compressed is null");this.lastValue=e,this.inflator.ended&&(this.inflator=new Ze(this.opts,this)),this.inflator.push(e),this.inflator.err&&this.inflator.ended&&"deflate"===this.compressed&&!this.opts.raw&&0===this.numChunks&&(this.opts.raw=!0,this.compressed="deflateRaw",this.inflator=new Ze(this.opts,this),this.inflator.push(e))}_getNextChunk(e){if(!this.inflator)throw new Error("AsyncIterReader cannot call _getNextChunk when this.compressed is null");for(;;){if(this.inflator.chunks.length>0)return this.numChunks++,this.inflator.chunks.shift();if(this.inflator.ended){if(0!==this.inflator.err)return this.compressed=null,e;let t=this.inflator.strm.avail_in;if(t&&this.lastValue){this._push(this.lastValue.slice(-t));continue}}return null}}async*[Symbol.asyncIterator](){let e=null;for(;e=await this._next();)this._readOffset+=e.length,yield e}async readlineRaw(e){let t=[],n=0,r=-1,i=null;for await(let s of this){if(e&&n+s.byteLength>e){i=s,r=e-n-1;let t=s.slice(0,r+1).indexOf(10);t>=0&&(r=t);break}if(r=s.indexOf(10),r>=0){i=s;break}t.push(s),n+=s.byteLength}if(i){let[e,s]=Ve(i,r+1);t.push(e),n+=e.byteLength,this.unread(s)}else if(!t.length)return null;return Qe(t,n)}async readFully(){return(await this._readOrSkip())[1]}async readSize(e){return(await this._readOrSkip(e))[1]}async skipSize(e){return(await this._readOrSkip(e,!0))[0]}async _readOrSkip(e=-1,t=!1){let n=[],r=0;for await(let i of this){if(e>=0){if(i.length>e){let[s,o]=Ve(i,e);t||n.push(s),r+=s.byteLength,this.unread(o);break}if(i.length===e){t||n.push(i),r+=i.byteLength,e=0;break}e-=i.length}t||n.push(i),r+=i.byteLength}return t?[r,new Uint8Array]:[r,Qe(n,r)]}getReadOffset(){return this._readOffset}getRawOffset(){return this.compressed?this._rawOffset:this._readOffset}getRawLength(e){return this.compressed?this.inflator.strm.total_in:this._readOffset-e}static fromReadable(e){return{async*[Symbol.asyncIterator](){let t=null;for(;(t=await e.read())&&!t.done;)yield t.value}}}static fromIter(e){return{async*[Symbol.asyncIterator](){for(let t of e)yield t}}}},tt=class extends $e{constructor(e,t,n=0){super(),this.sourceIter=e,this.length=t,this.limit=t,this.skip=n}setLimitSkip(e,t=0){this.limit=e,this.skip=t}async*[Symbol.asyncIterator](){if(!(this.limit<=0))for await(let e of this.sourceIter){if(this.skip>0){if(!(e.length>=this.skip)){this.skip-=e.length;continue}{let[,t]=Ve(e,this.skip);e=t,this.skip=0}}if(e.length>this.limit){let[t,n]=Ve(e,this.limit);e=t,this.sourceIter.unread&&this.sourceIter.unread(n)}if(e.length&&(this.limit-=e.length,yield e),this.limit<=0)break}}async readlineRaw(e){if(this.limit<=0)return null;let t=await this.sourceIter.readlineRaw(e?Math.min(e,this.limit):this.limit);return this.limit-=t?.length||0,t}async skipFully(){let e=this.limit;for(;this.limit>0;)this.limit-=await this.sourceIter.skipSize(this.limit);return e}},nt=new Uint8Array([13,10]),rt=new Uint8Array([13,10,13,10]),it=new TextDecoder("utf-8"),st=class{constructor({statusline:e,headers:t,reencodeHeaders:n}){this.statusline=e,this.headers=t,this.reencodeHeaders=n}toString(){let e=[this.statusline],t=this.headers instanceof Headers;for(let[n,r]of this.headers)t&&this.reencodeHeaders?.has(n)?e.push(`${n}: ${ze(r)}`):e.push(`${n}: ${r}`);return e.join("\r\n")+"\r\n"}async*iterSerialize(e){yield e.encode(this.statusline),yield nt;for(let[t,n]of this.headers)yield e.encode(`${t}: ${n}\r\n`)}_parseResponseStatusLine(){let e=function(e){let t=e.split(" "),n=t.slice(0,2);return t.slice(2).length>0&&n.push(t.slice(2).join(" ")),n}(this.statusline);this._protocol=e[0]??"",this._statusCode=e.length>1?Number(e[1]):"",this._statusText=e.length>2?e[2]:""}get statusCode(){return void 0===this._statusCode&&this._parseResponseStatusLine(),this._statusCode}get protocol(){return void 0===this._protocol&&this._parseResponseStatusLine(),this._protocol}get statusText(){return void 0===this._statusText&&this._parseResponseStatusLine(),this._statusText}_parseRequestStatusLine(){let e=this.statusline.split(" ",2);this._method=e[0]??"",this._requestPath=e.length>1?e[1]:""}get method(){return void 0===this._method&&this._parseRequestStatusLine(),this._method}get requestPath(){return void 0===this._requestPath&&this._parseRequestStatusLine(),this._requestPath}},ot=class{constructor(){this.reencodeHeaders=new Set}async parse(e,{headersClass:t,firstLine:n}={headersClass:Ye}){let r=n||await e.readline();if(!r)return null;let i=r.trimEnd();if(!i)return null;let s,o,a,c,l=new t,h=await async function(e){let t=[],n=0,r=0,i=null,s=e[Symbol.asyncIterator]();for await(let e of s){if([r,e]=await at(e,s),r>=0){i=e;break}t.push(e),n+=e.byteLength}if(i){let[s,o]=Ve(i,r+1);t.push(s),n+=s.byteLength,e.unread(o)}else if(!t.length)return"";return it.decode(Qe(t,n))}(e),u=0,p="";for(;u<h.length&&(a=h.indexOf("\n",u),!c||" "!==h[u]&&"\t"!==h[u]?(c&&(this.setHeader(p,c,l),c=null),s=h.indexOf(":",u),o=s<0?u:s+1,s>=0&&s<a?(p=h.slice(u,s).trimStart(),c=h.slice(o,a<0?void 0:a).trim()):c=null):c+=h.slice(u,a<0?void 0:a).trimEnd(),!(a<0));)u=a+1;return c&&this.setHeader(p,c,l),new st({statusline:i,headers:l,reencodeHeaders:this.reencodeHeaders})}setHeader(e,t,n,r=!1){try{n.append(e,t),n instanceof Headers&&r&&this.reencodeHeaders.add(e.toLowerCase())}catch{r||this.setHeader(e,function(e){let t=(new TextEncoder).encode(e),n="";return t.forEach(e=>n+=String.fromCharCode(e)),n}(t),n,!0)}}};async function at(e,t){let n=0;for(let r=0;r<e.length-4;r++){let r=e.indexOf(13,n);if(r<0)break;if(r+3>=e.length){let{value:n}=await t.next();if(!n)break;let r=new Uint8Array(n.length+e.length);r.set(e,0),r.set(n,e.length),e=r}if(10===e[r+1]&&13===e[r+2]&&10===e[r+3])return[r+3,e];n=r+1}return[-1,e]}var ct=new TextDecoder("utf-8"),lt=new TextEncoder,ht="WARC/1.0",ut={warcinfo:"application/warc-fields",response:"application/http; msgtype=response",revisit:"application/http; msgtype=response",request:"application/http; msgtype=request",metadata:"application/warc-fields"},pt=class e extends $e{constructor({warcHeaders:e,reader:t}){super(),this._offset=0,this._length=0,this._urlkey="",this.warcHeaders=e,this._reader=t,this._contentReader=null,this.payload=null,this.httpHeaders=null,this.consumed="",this.fixUp()}static create({url:t,date:n,type:r,warcHeaders:i={},filename:s="",httpHeaders:o={},statusline:a="HTTP/1.1 200 OK",warcVersion:c=ht,keepHeadersCase:l=!0,refersToUrl:h,refersToDate:u}={},p){function d(e){let t=e;return c===ht&&"Z"!=(e=e.split(".")[0]).charAt(t.length-1)&&(e+="Z"),e}n=d(n||(new Date).toISOString());let f=new Ye(i);if("warcinfo"===r)s&&f.set("WARC-Filename",s);else if(t)try{f.set("WARC-Target-URI",new URL(t).href)}catch{f.set("WARC-Target-URI",t)}f.set("WARC-Date",n),r&&f.set("WARC-Type",r),"revisit"===r&&(f.set("WARC-Profile","WARC/1.1"===c?"http://netpreserve.org/warc/1.1/revisit/identical-payload-digest":"http://netpreserve.org/warc/1.0/revisit/identical-payload-digest"),h&&(f.set("WARC-Refers-To-Target-URI",h),f.set("WARC-Refers-To-Date",d(u||(new Date).toISOString()))));let g=new st({statusline:c,headers:f});g.headers.get("WARC-Record-ID")||g.headers.set("WARC-Record-ID",`<urn:uuid:${fe()}>`),g.headers.get("Content-Type")||g.headers.set("Content-Type",r&&ut[r]||"application/octet-stream"),p||(p=dt());let m=new e({warcHeaders:g,reader:p}),w=null,y=!1;switch(r){case"response":case"request":case"revisit":l?(w=new Ye(o),y=!w.size):(w=new Headers(o),y=!Object.entries(o).length),(!y||"revisit"!==r)&&(m.httpHeaders=new st({statusline:a,headers:w}))}return m}static createWARCInfo(t={},n){return t.type="warcinfo",e.create(t,async function*(){for(let[e,t]of Object.entries(n))yield lt.encode(`${e}: ${t}\r\n`)}())}getResponseInfo(){let e=this.httpHeaders;return e?{headers:e.headers,status:e.statusCode,statusText:e.statusText}:null}fixUp(){let e=this.warcHeaders.headers.get("WARC-Target-URI");e&&e.startsWith("<")&&e.endsWith(">")&&this.warcHeaders.headers.set("WARC-Target-URI",e.slice(1,-1))}async readFully(e=!1){if(this.httpHeaders){if(this.payload&&!this.payload.length)return this.payload;if(this._contentReader&&!e)throw new TypeError("WARC Record decoding already started, but requesting raw payload");if(e&&"raw"===this.consumed&&this.payload)return await this._createDecodingReader([this.payload]).readFully()}return this.payload||(e?(this.payload=await super.readFully(),this.consumed="content"):(this.payload=await $e.readFully(this._reader),this.consumed="raw")),this.payload}get reader(){if(this.payload&&!this.payload.length)return dt();if(this._contentReader)throw new TypeError("WARC Record decoding already started, but requesting raw payload");return this._reader}get contentReader(){return this.httpHeaders?(this._contentReader||(this._contentReader=this._createDecodingReader(this._reader)),this._contentReader):this._reader}_createDecodingReader(e){if(!this.httpHeaders)throw new Error("WARCRecord cannot call _createDecodingReader when this.httpHeaders === null");let t=this.httpHeaders.headers.get("Content-Encoding"),n=this.httpHeaders.headers.get("Transfer-Encoding"),r="chunked"===n;return!t&&!r&&(t=n),new et(e,t,r)}async readlineRaw(e){if(this.consumed)throw new Error("Record already consumed.. Perhaps a promise was not awaited?");if(this.contentReader instanceof $e)return this.contentReader.readlineRaw(e);throw new Error("WARCRecord cannot call readlineRaw on this.contentReader if it does not extend BaseAsyncIterReader")}async contentText(){let e=await this.readFully(!0);return ct.decode(e)}async*[Symbol.asyncIterator](){for await(let e of this.contentReader)if(yield e,this.consumed)throw new Error("Record already consumed.. Perhaps a promise was not awaited?");this.consumed="content"}async skipFully(){if(!this.consumed){if(this._reader instanceof tt){let e=await this._reader.skipFully();return this.consumed="skipped",e}throw new Error("WARCRecord cannot call skipFully on this._reader if it is not a LimitReader")}}warcHeader(e){return this.warcHeaders.headers.get(e)}get warcType(){return this.warcHeaders.headers.get("WARC-Type")}get warcTargetURI(){return this.warcHeaders.headers.get("WARC-Target-URI")}get warcDate(){return this.warcHeaders.headers.get("WARC-Date")}get warcRefersToTargetURI(){return this.warcHeaders.headers.get("WARC-Refers-To-Target-URI")}get warcRefersToDate(){return this.warcHeaders.headers.get("WARC-Refers-To-Date")}get warcPayloadDigest(){return this.warcHeaders.headers.get("WARC-Payload-Digest")}get warcBlockDigest(){return this.warcHeaders.headers.get("WARC-Block-Digest")}get warcContentType(){return this.warcHeaders.headers.get("Content-Type")}get warcContentLength(){return Number(this.warcHeaders.headers.get("Content-Length"))}get warcConcurrentTo(){if(this.warcHeaders.headers instanceof Ye)return this.warcHeaders.headers.getMultiple("WARC-Concurrent-To");{let e=this.warcHeaders.headers.get("WARC-Concurrent-To");return e?e.split(","):[]}}};async function*dt(){}var ft=new TextDecoder,gt=new Uint8Array([]),mt=class e{static async parse(t,n){return new e(t,n).parse()}static iterRecords(t,n){return new e(t,n)[Symbol.asyncIterator]()}constructor(e,{keepHeadersCase:t=!1,parseHttp:n=!0}={}){this._offset=0,this._warcHeadersLength=0,this._headersClass=t?Ye:Headers,this._parseHttp=n,this._reader=e instanceof et?e:new et(e),this._record=null}async readToNextRecord(){if(!this._reader||!this._record)return gt;await this._record.skipFully(),this._reader.compressed&&(this._offset=this._reader.getRawOffset());let e=await this._reader.readlineRaw(),t=0;if(e){if(t=e.byteLength-1,9===t&&ft.decode(e).startsWith("WARC/"))return e;for(;t>0;){let n=e[t-1];if(10!==n&&13!==n)break;t--}t&&console.warn(`Content-Length Too Small: Record not followed by newline, Remainder Length: ${t}, Offset: ${this._reader.getRawOffset()-e.byteLength}`)}else e=gt;if(this._reader.compressed)await this._reader.skipSize(2),e=gt;else{for(e=await this._reader.readlineRaw();e&&2===e.byteLength;)e=await this._reader.readlineRaw();this._offset=this._reader.getRawOffset(),e&&(this._offset-=e.length)}return e}_initRecordReader(e){return new tt(this._reader,Number(e.headers.get("Content-Length")||0))}async parse(){let e=await this.readToNextRecord(),t=e?ft.decode(e):"",n=new ot,r=await n.parse(this._reader,{firstLine:t,headersClass:this._headersClass});if(!r)return null;this._warcHeadersLength=this._reader.getReadOffset();let i=new pt({warcHeaders:r,reader:this._initRecordReader(r)});if(this._record=i,this._parseHttp)switch(i.warcType){case"response":case"request":await this._addHttpHeaders(i,n);break;case"revisit":i.warcContentLength>0&&await this._addHttpHeaders(i,n)}return i}get offset(){return this._offset}get recordLength(){return this._reader.getRawLength(this._offset)}async*[Symbol.asyncIterator](){let e=null;for(;null!==(e=await this.parse());)yield e;this._record=null}async _addHttpHeaders(e,t){let n=await t.parse(this._reader,{headersClass:this._headersClass});e.httpHeaders=n;let r=this._reader.getReadOffset()-this._warcHeadersLength;e.reader instanceof tt&&e.reader.setLimitSkip(e.warcContentLength-r)}};function wt(e,t,n){let r,i;switch(n=n||{},t){case"RFC3548":case"RFC4648":r="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",i=!0;break;case"RFC4648-HEX":r="0123456789ABCDEFGHIJKLMNOPQRSTUV",i=!0;break;case"Crockford":r="0123456789ABCDEFGHJKMNPQRSTVWXYZ",i=!1;break;default:throw new Error("Unknown base32 variant: "+t)}let s=void 0!==n.padding?n.padding:i,o=function(e){if(e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray)return new DataView(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new DataView(e);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}(e),a=0,c=0,l="";for(let e=0;e<o.byteLength;e++)for(c=c<<8|o.getUint8(e),a+=8;a>=5;)l+=r[c>>>a-5&31],a-=5;if(a>0&&(l+=r[c<<5-a&31]),s)for(;l.length%8!=0;)l+="=";return l}var yt=new TextEncoder,bt=class{},At=class extends bt{constructor(){super(...arguments),this.buffers=[]}write(e){this.buffers.push(e)}async*readAll(){for(let e of this.buffers)yield e}purge(){this.buffers=[]}},vt=(Symbol.asyncIterator,["offset","warc-type","warc-target-uri"]),_t=class{constructor(e={},t=vt){this.opts=e,e.fields?(this.fields=e.fields,this.reqFields=this.fields.filter(e=>{return(t=e).startsWith("req.")||"referrer"===t.toLowerCase();var t})):(this.fields=t,this.reqFields=[]),this.parseHttp=!1}serialize(e){return JSON.stringify(e)+"\n"}write(e,t){t.write(this.serialize(e))}async writeAll(e,t){for await(let n of this.iterIndex(e))this.write(n,t)}async*iterIndex(e){let t={strictHeaders:!0,parseHttp:this.parseHttp};for(let{filename:n,reader:r}of e){let e=new mt(r,t);yield*this.iterRecords(e,n)}}async*iterRecords(e,t){for await(let n of e){await n.skipFully();let r=this.indexRecord(n,e,t);r&&(yield r)}}indexRecord(e,t,n){if(this.filterRecord&&!this.filterRecord(e))return null;let r={},{offset:i,recordLength:s}=t,o={offset:i,length:s,filename:n};for(let t of this.fields)t in o?r[t]=o[t]:this.setField(t,e,r);return r}setField(e,t,n){let r=this.getField(e,t);null!==r&&(n[e]=r)}getField(e,t){if(e.startsWith("req.")){if("request"!==t.warcType)return null;e=e.slice(4)}if("http:status"===e)return!t.httpHeaders||"response"!==t.warcType&&"revisit"!==t.warcType?null:t.httpHeaders.statusCode;if(e.startsWith("http:")){if(t.httpHeaders){let n=t.httpHeaders.headers,r=e.slice(5),i=n.get(r);if(n instanceof Map){let e=r.toLowerCase();for(let t of n.keys())e===t.toLowerCase()&&(i=n.get(t))}return i}return null}return t.warcHeaders.headers.get(e)||null}},Et=class extends _t{constructor(e,t){super(e,t);for(let e of this.fields)if(e.startsWith("http:")){this.parseHttp=!0;break}}},xt="urlkey,timestamp,url,mime,status,digest,length,offset,filename".split(","),St="urlkey,timestamp,url,mime,status,digest,redirect,meta,length,offset,filename".split(","),It=class extends Et{constructor(e){switch(super(e,xt),this.includeAll=!!e?.all,this.overrideIndexForAll=!!e?.all,this.parseHttp=!0,this.noSurt=!!e?.noSurt,this._lastRecord=null,e?.format){case"cdxj":this.serialize=this.serializeCDXJ;break;case"cdx":this.serialize=this.serializeCDX11}}async*iterRecords(e,t){this._lastRecord=null;for await(let n of e){await n.readFully();let r=this.indexRecord(n,e,t);r&&(yield r)}let n=this.indexRecord(null,e,t);n&&(yield n)}filterRecord(e){if(this.includeAll)return!0;let t=e.warcType;return!("request"===t||"warcinfo"===t||("metadata"===t||"resource"===t)&&"application/warc-fields"===e.warcContentType)}indexRecord(e,t,n){if(this.overrideIndexForAll)return e?super.indexRecord(e,t,n):null;let r=this._lastRecord;if(this._lastRecord=e,e&&(e._offset=t.offset,e._length=t.recordLength),!r)return null;if(!e||r.warcTargetURI!=e.warcTargetURI)return this.indexRecordPair(r,null,t,n);let i=e.warcType,s=r.warcType;return"request"!==i||"response"!==s&&"revisit"!==s?"response"!==i&&"revisit"!==i||"request"!==s?this.indexRecordPair(r,null,t,n):(this._lastRecord=null,this.indexRecordPair(e,r,t,n)):(this._lastRecord=null,this.indexRecordPair(r,e,t,n))}indexRecordPair(e,t,n,r,i=4096){let s,o,a=e.warcTargetURI||"";if(t?.httpHeaders&&"GET"!==t.httpHeaders.method){let e={url:a,method:t.httpHeaders.method,headers:t.httpHeaders.headers,postData:t.payload};s=e.method,Me(e,i)&&(o=e.requestBody,a=e.url)}e._urlkey=a;let c=super.indexRecord(e,n,r);if(c&&(void 0!==e._offset&&(c.offset=e._offset,c.length=e._length),s&&(c.method=s),o&&(c.requestBody=o),t&&this.reqFields.length))for(let e of this.reqFields)this.setField(e,t,c);return c}serializeCDXJ(e){let{urlkey:t,timestamp:n}=e;return delete e.urlkey,delete e.timestamp,`${t} ${n} ${JSON.stringify(e,(e,t)=>["offset","length","status"].includes(e)?null==t?"":""+t:t)}\n`}serializeCDX11(e){let t=[];for(let n of St)t.push(null!=e[n]?e[n]:"-");return t.join(" ")+"\n"}getField(e,t){let n=null;switch(e){case"urlkey":return n=t._urlkey||t.warcTargetURI||null,this.noSurt||null===n?n:Fe(n);case"timestamp":return n=t.warcDate??"",n.replace(/[-:T]/g,"").slice(0,14);case"url":return t.warcTargetURI;case"mime":switch(t.warcType){case"revisit":return"warc/revisit";case"response":case"request":e="http:content-type";break;default:return t.warcContentType}return n=super.getField(e,t),n?n.toString().split(";",1)[0]?.trim():null;case"status":return super.getField("http:status",t);case"referrer":return super.getField("req.http:referer",t);case"digest":return n=t.warcPayloadDigest,n?n.split(":",2)[1]:null;default:return super.getField(e,t)}}};const Tt=1024,Ct=/\[\d]+/,Rt=[{match:/\/\/.*(?:gcs-vimeo|vod|vod-progressive|vod-adaptive)\.akamaized\.net.*?\/([\d/]+\.mp4)/,fuzzyCanonReplace:"//vimeo-cdn.fuzzy.replayweb.page/$1",split:".net"},{match:/\/\/.*player.vimeo.com\/(video\/[\d]+)\?.*/i,fuzzyCanonReplace:"//vimeo.fuzzy.replayweb.page/$1"},{match:/www.\washingtonpost\.com\/wp-apps\/imrs.php/,args:[["src"]]},{match:/(static.wixstatic.com\/.*\.[\w]+\/v1\/fill\/)(w_.*)/,replace:"$1?_args=$2",split:"/v1/fill"},{match:/(twimg.com\/profile_images\/[^/]+\/[^_]+)_([\w]+\.[\w]+)/,replace:"$1=_args=$2",split:"_",splitLast:!0},{match:/^https?:\/\/(?:www\.)?(youtube\.com\/embed\/[^?]+)[?].*/i,replace:"$1"},{match:/^(https?:\/\/(?:www\.)?)(youtube\.com\/@[^?]+)[?].*/i,fuzzyCanonReplace:"$1$2"},{match:/\/\/(?:www\.)?youtube(?:-nocookie)?\.com\/(get_video_info)/i,fuzzyCanonReplace:"//youtube.fuzzy.replayweb.page/$1",args:[["video_id"]]},{match:/\/\/(?:www\.)?youtube(?:-nocookie)?\.com\/(youtubei\/v1\/[^?]+\?).*(videoId[^&]+).*/i,fuzzyCanonReplace:"//youtube.fuzzy.replayweb.page/$1$2",args:[["videoId"]]},{match:/\/\/.*googlevideo.com\/(videoplayback)/i,fuzzyCanonReplace:"//youtube.fuzzy.replayweb.page/$1",args:[["id","itag"],["id"]],fuzzyArgs:!0},{match:/facebook\.com\/ajax\/pagelet\/generic.php\/photoviewerinitpagelet/i,args:[[{arg:"data",keys:["query_type","fbid","v","cursor","data"]}]]},{match:/((?:twitter|x)\.com\/[^/]+\/status\/[^?]+)(\?.*)/,fuzzyCanonReplace:"$1"},{match:/((?:twitter|x)\.com\/i\/api\/graphql\/.*)/,args:[["cursor"]],fuzzyArgs:!0},{match:/facebook\.com\/ajax\//i,fuzzySet:!0},{match:(kt=["(callback=jsonp)[^&]+(?=&|$)","((?:\\w+)=jquery)[\\d]+_[\\d]+","utm_[^=]+=[^&]+(?=&|$)","(_|cb|_ga|\\w*cache\\w*)=[\\d.-]+(?=$|&)"],new RegExp("[?&]"+kt.map(e=>"("+e+")").join("|"),"gi")),replace:""},{match:/(\.(?:js|webm|mp4|gif|jpg|png|css|json|m3u8))\?.*/i,replace:"$1",maxResults:2}];var kt;const Nt=new class{rules;constructor(e){this.rules=e||Rt}getRuleFor(e){let t;const n=-1===e.indexOf("?")?e+"?":e;for(const e of this.rules)if(n.length<4096&&n.match(e.match)){t=e;break}let r=e;t?.fuzzyCanonReplace&&(r=e.replace(t.match,t.fuzzyCanonReplace));const i=t?.split||"?",s=t?.splitLast?e.lastIndexOf(i):e.indexOf(i);return{prefix:s>0?e.slice(0,s+i.length):e,rule:t,fuzzyCanonUrl:r}}getFuzzyCanonsWithArgs(e){let{fuzzyCanonUrl:t,prefix:n,rule:r}=this.getRuleFor(e);t===e&&(t=n);const i=[];if(r?.args){const n=new URL(t),s=new URL(e);for(const e of r.args){const t=new URLSearchParams;for(const n of e)t.set(n,s.searchParams.get(n)||"");n.search=t.toString(),i.push(n.href)}return i}return[t]}fuzzyCompareUrls(e,t,n){if(!t?.length)return null;if(void 0!==n?.replace&&void 0!==n.match&&(!n.maxResults||t.length<=n.maxResults)){const r=n.match,i=n.replace,s=e.replace(r,i),o=[];for(const e of t){const t=e.url.replace(r,i);if(s===t)return e;e.fuzzyMatchUrl=t,o.push(e)}t=o,e=s}return this.fuzzyBestMatchQuery(e,t,n)}fuzzyBestMatchQuery(e,t,n){let r;try{r=new URL(e)}catch(e){return null}const i=n?.args&&!n.fuzzyArgs?new Set(n.args[0]):null;let s=Number.MIN_SAFE_INTEGER,o=null;const a=new URLSearchParams(r.search);for(const r of t){if(304===r.status)continue;let t;try{t=new URL(r.fuzzyMatchUrl||r.url)}catch(e){continue}const c=new URLSearchParams(t.search);let l=this.getMatch(a,c,i,n?.fuzzySet);l+=this.getMatch(c,a,i),l/=2,r.status>200&&(l+=.1*(200-r.status)),l>s&&(s=l,o=r)}return o}getMatch(e,t,n=null,r=!1){let i=1,s=1;const o={};for(let[a,c]of e){let e,l=t.get(a);if(n&&n.has(a)&&l!==c)return-1e3;e=a.startsWith("_")?.1:10,null!==l&&(i+=.5*e,l.length>Tt&&(l=l.slice(0,Tt))),c&&c.length>Tt&&(c=c.slice(0,Tt));const h=Number(c),u=Number(l);if(s+=e,r&&l&&this.addSetMatch(o,a,c,l),l===c)i+=e*c.length;else if(null===l||null===c)i+=0;else if(isNaN(h)||isNaN(u))if(c.startsWith("{")&&l.startsWith("{"))try{const t=He(c),n=He(l);i+=this.getMatch(t,n)*e*2}catch(t){i+=.5*e*this.levScore(c,l)}else r||(i+=e*this.levScore(c,l));else i+=10-Math.log(Math.abs(h-u)+1)}return i/s+(r?this.paramSetMatch(o,100):0)}addSetMatch(e,t,n,r){if(!(n&&r&&n.startsWith("/")&&r.startsWith("/")))return;const i=t.split(Ct);if(i.length<=1)return;const s=n.indexOf("?"),o=r.indexOf("?"),a=i[0],c=s>0?n.slice(0,s):n,l=o>0?r.slice(0,o):r;e[a]||(e[a]={value:[],found:new Set}),e[a].value.push(c),e[a].found.add(l)}paramSetMatch(e,t){let n=0;for(const r of Object.values(e)){let e=t;for(const t of r.value)r.found.has(t)&&(n+=e),e*=.33}return n}levScore(e,t){const n=Math.min(e.length,t.length),r=ue()(e,t);return r<n?n-r:0}};var Ot=n(8287);const Bt=new TextEncoder,Pt=new TextDecoder;class Lt{static fromResponse({url:e,response:t,date:n,noRW:r,isLive:i,archivePrefix:s}){const o=t.body?new et(t.body.getReader(),null,!1):null,a=Number(t.headers.get("x-redirect-status")||t.status),c=t.headers.get("x-redirect-statusText")||t.statusText,l=new Headers(t.headers);let h=l.get("x-orig-location");if(h){if(h.startsWith(self.location.origin)&&(h=h.slice(self.location.origin.length)),s&&h.startsWith(s)){const e=h.indexOf("/http");e>0&&(h=h.slice(e+1))}l.set("location",h),l.delete("x-orig-location"),l.delete("x-redirect-status"),l.delete("x-redirect-statusText")}let u=null;const p=l.get("x-orig-ts");p&&(n=H(p),l.delete("x-orig-ts"),p&&h&&(u=p));const d=l.get("memento-datetime");d&&(n=new Date(d));const f=l.get("x-proxy-set-cookie");if(f){const e=[];f.split(",").forEach(t=>{const n=t.split(";",1)[0].trim();n.indexOf("=")>0&&e.push(n)}),l.delete("x-proxy-set-cookie"),e.length&&l.set("x-wabac-preset-cookie",e.join(";"))}return new Lt({payload:o,status:a,statusText:c,headers:l,url:e,date:n,noRW:r,isLive:i,updateTS:u})}reader;buffer;status;statusText;url;date;extraOpts;headers;noRW;isLive;updateTS;clonedResponse=null;constructor({payload:e,status:t,statusText:n,headers:r,url:i,date:s,extraOpts:o=null,noRW:a=!1,isLive:c=!1,updateTS:l=null}){this.reader=null,this.buffer=null,e&&e instanceof $e?this.reader=e:this.buffer=e,this.status=t,this.statusText=n||J(t),this.headers=r,this.url=i,this.date=s,this.extraOpts=o,this.noRW=a,this.isLive=c,this.updateTS=l}async getText(e=!1,t=!1){const n=await this.getBuffer();return"string"==typeof n?{bomFound:!1,text:n}:n?239===n[0]&&187===n[1]&&191===n[2]?{bomFound:!0,text:Pt.decode(n.slice(3))}:254===n[0]&&255===n[1]?{bomFound:!0,text:Ot.Buffer.from(n.slice(2)).swap16().toString("utf16le")}:255===n[0]&&254===n[1]?{bomFound:!0,text:Ot.Buffer.from(n.slice(2)).toString("utf16le")}:{bomFound:!1,text:t?"":e?Pt.decode(n):z(n)}:{bomFound:!1,text:""}}setText(e,t=!1){this.setBuffer(t?Bt.encode(e):q(e))}async getBuffer(){return this.buffer||!this.reader||(this.buffer=await this.reader.readFully()),this.buffer}setBuffer(e){this.buffer=e,this.reader=null}setReader(e){e instanceof $e?(this.reader=e,this.buffer=null):e.getReader&&(this.reader=new et(e.getReader()),this.buffer=null)}setRange(e){if(206===this.status){const e=this.headers.get("Content-Range");if(e&&!e.startsWith("bytes 0-"))return!1}const t=e.match(/^bytes=(\d+)-(\d+)?$/);let n=0;if(this.buffer)n=this.buffer.length;else if(this.reader&&(n=Number(this.headers.get("content-length")),!n))return!1;if(!t)return this.status=416,this.statusText="Range Not Satisfiable",this.headers.set("Content-Range",`*/${n}`),!1;const r=Number(t[1]),i=Number(t[2])||n-1;return!!this.setRawRange(r,i)&&(this.headers.set("Content-Range",`bytes ${r}-${i}/${n}`),this.headers.set("Content-Length",String(i-r+1)),this.status=206,this.statusText="Partial Content",!0)}setRawRange(e,t){const n=this.reader;return this.buffer?(this.buffer=this.buffer.slice(e,t+1),!0):!!n?.setLimitSkip&&(n.setLimitSkip(t-e+1,e),!0)}makeResponse(e=!1,t=!1){let n=null;Y(this.status)||(n=this.buffer||!this.reader?this.buffer:this.reader.getReadableStream());const r=new Response(n,{status:this.status,statusText:this.statusText,headers:this.headers});return r.date=this.date,e&&(r.headers.set("Cross-Origin-Opener-Policy","same-origin"),r.headers.set("Cross-Origin-Embedder-Policy","require-corp")),t&&r.headers.set("content-disposition","inline"),r}}const Dt=new Date("9999-01-01").getTime(),Ut="warc/revisit";class Ft{name;minDedupSize;version;autoHttpsCheck=!0;useRefCounts=!1;allowRepeats=!0;repeatTracker=null;fuzzyPrefixSearch=!0;initing;db=null;constructor(e,t={}){this.name=e,this.db=null;const{minDedupSize:n,noRefCounts:r}=t;this.minDedupSize=Number.isInteger(n)?n:1024,this.version=4,this.autoHttpsCheck=!0,this.useRefCounts=!r,this.allowRepeats=!0,this.repeatTracker=new Mt,this.fuzzyPrefixSearch=!0,this.initing=this.init()}async init(){let e=0;this.db=await y(this.name,this.version,{upgrade:(t,n,r,i)=>{e=n,this._initDB(t,n,r,i)},blocking:(e,t)=>{t||this.close()}}),1===e&&await this.convertCuratedPagesToV2(this.db)}_initDB(e,t,n,r){if(!t){const t=e.createObjectStore("pages",{keyPath:"id"});t.createIndex("url","url"),t.createIndex("ts","ts"),t.createIndex("state","state"),e.createObjectStore("pageLists",{keyPath:"id",autoIncrement:!0}),e.createObjectStore("curatedPages",{keyPath:"id",autoIncrement:!0}).createIndex("listPages",["list","pos"]);const n=e.createObjectStore("resources",{keyPath:["url","ts"]});n.createIndex("pageId","pageId"),n.createIndex("mimeStatusUrl",["mime","status","url"]),e.createObjectStore("payload",{keyPath:"digest"}).createIndex("digest","digest",{unique:!0}),e.createObjectStore("digestRef",{keyPath:"digest"}).createIndex("digest","digest",{unique:!0})}}async clearAll(){const e=["pages","resources","payload","digestRef"];if(this.db)for(const t of e)await this.db.clear(t)}close(){this.db&&(this.db.close(),this.db=null)}async delete(){this.close(),await b(this.name,{blocked(e,t){console.log("Unable to delete: "+t)}})}async addPage(e,t){const n=e.url,r=e.title||e.url,i=e.id||this.newPageId(),s=e.state||17;let o=e.ts;if("number"!=typeof o)if(e.timestamp)o=H(e.timestamp).getTime();else{const t=e.ts||e.date||e.datetime;t&&(o=new Date(t).getTime())}const a={...e,url:n,ts:o,title:r,id:i,state:s};return t?(t.store.put(a),a.id):await this.db.put("pages",a)}async addPages(e,t="pages",n=!1){const r=this.db.transaction(t,"readwrite");for(const t of e)n?r.store.put(t):this.addPage(t,r);try{await r.done}catch(e){console.warn("addPages tx",String(e))}}async createPageList(e){const t={title:e.title,desc:e.desc||e.description,slug:e.id||e.slug};return await this.db.put("pageLists",t)}async addCuratedPageList(e,t){const n=await this.createPageList(e);let r=0;for(const e of t)e.pos=r++,e.list=n;await this.addPages(t,"curatedPages")}async addCuratedPageLists(e,t="pages",n="public"){for(const r of e){if(n&&!r[n])continue;const e=r[t]||[];await this.addCuratedPageList(r,e)}}async convertCuratedPagesToV2(e){const t=await e.getAll("curatedPages");if(!t?.length)return;const n=await e.getAll("pages"),r=new Map;for(const e of n)r.set(e.id,e);for(const e of t)if(e.page){const t=r.get(e.page);t&&(e.id=this.newPageId(),e.url=t.url,e.ts=t.ts,!e.title&&t.title&&(e.title=t.title)),delete e.page}await e.clear("curatedPages");const i=e.transaction("curatedPages","readwrite");for(const e of t)i.store.put(e);try{await i.done}catch(e){console.warn("Conversion Failed",e)}}async getCuratedPagesByList(){const e=await this.db.getAll("pageLists"),t=this.db.transaction("curatedPages","readonly");for await(const n of t.store.index("listPages").iterate()){const t=e[n.value.list-1];t&&(t.show=!0,t.pages||(t.pages=[]),t.pages.push(n.value))}return e}newPageId(){return G()}async getAllPages(){return await this.db.getAll("pages")}async getPagesByUrl(e){return await this.db.getAllFromIndex("pages","url",e)}async getPages(e){const t=[];e.sort();for await(const n of this.matchAny("pages",null,e))t.push(n);return t}async getTimestampsByURL(e){const t=this.db.transaction("resources"),n=IDBKeyRange.bound([e],[e,Dt]),r=[];for await(const e of t.store.iterate(n))r.push(e.key[1]);return r}async getPagesWithState(e){return await this.db.getAllFromIndex("pages","state",e)}async getVerifyInfo(){return{}}async addVerifyData(e="",t,n,r=null,i=!1){}async addVerifyDataList(e,t){}async dedupResource(e,t,n,r=1){const i=n.objectStore("digestRef"),s=await i.get(e);if(s)return++s.count,s;if(t)try{return n.objectStore("payload").put({digest:e,payload:t}),{digest:e,count:r,size:t.length}}catch(e){console.log(e)}return null}async addResources(e){const t=[],n=[],r=[],i={},s=new Set,o=this.db.transaction(["digestRef","payload"],"readwrite");for(const a of e){let e=1;const c=a.status||200,l=a.mime===Ut?t:c>=300?n:r;l.push(a);const h=this.getFuzzyUrl(a);if(h&&(l.push(h),e=2),this.useRefCounts&&a.digest){const t=i[a.digest];t?(t.count+=e,s.add(a.digest)):i[a.digest]=await this.dedupResource(a.digest,a.payload,o,e),delete a.payload}}if(this.useRefCounts){const e=o.objectStore("digestRef");for(const t of s)e.put(i[t])}try{await o.done}catch(e){console.error("Payload and Ref Count Bulk Add Failed: ",e)}const a=this.db.transaction("resources","readwrite");for(const e of t)a.store.put(e);for(const e of n)a.store.put(e);for(const e of r)a.store.put(e);try{await a.done}catch(e){console.error("Resources Bulk Add Failed",e)}}getFuzzyUrl(e){if(e.status&&e.status>=200&&e.status<400&&304!==e.status&&204!==e.status){const{fuzzyCanonUrl:t}=Nt.getRuleFor(e.url);return t&&t!==e.url?{url:t,ts:e.ts,origURL:e.url,origTS:e.ts,pageId:e.pageId,digest:e.digest}:null}return null}async addResource(e){e.payload&&e.payload.length>this.minDedupSize&&(e.digest||(e.digest=await V(e.payload,"sha-256")));let t=null,n=!1;const r=this.db.transaction(["resources","digestRef","payload"],"readwrite");if(e.payload&&e.payload.length>this.minDedupSize?(t=await this.dedupResource(e.digest||"",e.payload,r),n=!!t&&1===t.count,delete e.payload):e.payload&&(n=!0),e.mime!==Ut){r.objectStore("resources").put(e);const n=this.getFuzzyUrl(e);n&&(r.objectStore("resources").put(n),t&&t.count++)}else r.objectStore("resources").add(e);t&&r.objectStore("digestRef").put(t);try{await r.done}catch(t){e.mime===Ut?console.log("Skip Duplicate revisit for: "+e.url):console.log("Add Error for "+e.url),console.log(t)}return n}async getResource(e,t,n,r={}){const i=H(e.timestamp).getTime();let s=e.url,o=null;const a=this.repeatTracker?this.repeatTracker.getSkipCount(n,s,e.request.method):0,c={...r,skip:a};if(e.httpToHttpsNeeded&&(s=s.slice(s.indexOf("//"))),s.startsWith("//")){let t=!1;o=await this.lookupUrl("https:"+s,i,c),o||(o=await this.lookupUrl("http:"+s,i,c),(o||e.request.referrer.indexOf("/http://",2)>0)&&(t=!0)),s=(t?"http:":"https:")+s}else if(o=await this.lookupUrl(s,i,c),!o&&this.autoHttpsCheck&&s.startsWith("http://")){const e=s.replace("http://","https://");o=await this.lookupUrl(e,i,c),o&&(s=e)}if(o||!this.fuzzyPrefixSearch||r.noFuzzyCheck||(o=await this.lookupQueryPrefix(s,r)),o?.origURL){const e=await this.lookupUrl(o.origURL,o.origTS||o.ts,r);e&&(s=e.url,o=e)}if(!o)return null;const l=o.status||0,h=o.statusText||J(l);let u=null;if(!Y(l)&&(u=await this.loadPayload(o,r),!u))return null;const p=o.respHeaders?K(o.respHeaders):new Headers,d=new Date(o.ts),f=o.extraOpts||null;return s=o.url,s!==e.url&&p.set("Content-Location",s),new Lt({url:s,payload:u,status:l,statusText:h,headers:p,date:d,extraOpts:f})}async loadPayload(e,t){if(e.digest&&!e.payload){if("sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"===e.digest||"sha1:3I42H3S6NNFQ2MSVX7XZKYAYSCX5QBYJ"===e.digest)return new Uint8Array([]);const t=await this.db.get("payload",e.digest);if(!t)return null;const{payload:n}=t;return n}return e.payload||null}shouldSkipResult(e,t,n){try{if(n&&t?.status&&t.status>=500)return!0;if(t?.respHeaders&&t.status&&t.status>=300&&t.status<400){const n=new Headers(t.respHeaders).get("location")||"";if(new URL(n,e).href===e)return!0}}catch(e){}return!1}async lookupUrl(e,t,n={}){const r=this.db.transaction("resources","readonly");if(t){const i=IDBKeyRange.bound([e,t],[e,Dt]);if(n.noRevisits||n.pageId){let t=await r.store.getAll(i,16);t=t||[];for(const r of t)if(!(n.pageId&&r.pageId&&r.pageId!==n.pageId||n.noRevisits&&r.mime===Ut||this.shouldSkipResult(e,r,n.skip5xx)))return r}else{const s=await r.store.get(i);if(s&&this.shouldSkipResult(e,s,n.skip5xx))t+=1e4;else if(s)return s}}const i=IDBKeyRange.bound([e],[e,t||Dt]);for await(const t of r.store.iterate(i,"prev")){const r=t.value;if(!(n.pageId&&r.pageId&&r.pageId!==n.pageId||n.noRevisits&&r.mime===Ut||this.shouldSkipResult(e,r,n.skip5xx)))return r}return null}async lookupQueryPrefix(e,t){const{rule:n,prefix:r,fuzzyCanonUrl:i}=Nt.getRuleFor(e);if(i!==e){const e=await this.lookupUrl(i,0,t);if(e)return e}if(!n&&r===e&&r===i&&!e.endsWith("?"))return null;const s=await this.db.getAll("resources",this.getLookupRange(r,"prefix"),128e3);return Nt.fuzzyCompareUrls(e,s,n)}resJson(e){const t=new Date(e.ts).toISOString();return{url:e.url,date:t,ts:j(t),mime:e.mime||"",status:e.status||0}}async resourcesByPage(e){return this.db.getAllFromIndex("resources","pageId",e)}async*resourcesByPages2(e){e.sort(),yield*this.matchAny("resources","pageId",e)}async*resourcesByPages(e){const t=this.db.transaction("resources","readonly");for await(const n of t.store.iterate())e.includes(n.value.pageId)&&(yield n.value)}async*matchAny(e,t,n,r,i=!1){const s=this.db.transaction(e,"readonly"),o=IDBKeyRange.lowerBound(n[0],i);let a=t?await s.store.index(t).openCursor(o):await s.store.openCursor(o),c=0;for(;a&&c<n.length;){let e,t,i;void 0!==r?(e=a.key[r],t=n[c][r],i=e.startsWith(t)):(e=a.key,t=n[c],i=e===t),!i&&e>t?++c:i?(yield a.value,a=await a.continue()):a=await a.continue(n[c])}}async resourcesByUrlAndMime(e,t,n=1e3,r=!0,i="",s=""){const o=t?0:n,a=await this.db.getAll("resources",this.getLookupRange(e,r?"prefix":"exact",i,s),o),c=t.split(","),l=[];for(const e of a)for(const t of c)if(!t||e.mime?.startsWith(t)){if(l.push(this.resJson(e)),l.length===n)return l;break}return l}async resourcesByMime(e,t=100,n="",r="",i=0){const s=e.split(","),o=[];s.sort();const a=[];n&&a.push([n,i,r]);for(const e of s)(!n||!e||e>n)&&a.push([e,0,""]);for await(const e of this.matchAny("resources","mimeStatusUrl",a,0,!0))if(o.push(this.resJson(e)),o.length===t)break;return o}async deletePage(e){const t=this.db.transaction("pages","readwrite"),n=await t.store.get(e);await t.store.delete(e);const r=await this.deletePageResources(e);return{pageSize:n?.size||0,dedupSize:r}}async deletePageResources(e){const t={},n=this.db.transaction("resources","readwrite");let r=await n.store.index("pageId").openCursor(e),i=0;for(;r;){const e=r.value.digest;e?t[e]=(t[e]||0)+1:r.value.payload&&(i+=r.value.payload.length),n.store.delete(r.primaryKey),r=await r.continue()}await n.done;const s=this.db.transaction(["payload","digestRef"],"readwrite"),o=s.objectStore("digestRef");for(const e of Object.keys(t)){const n=await o.get(e);n&&(n.count-=t[e]),n&&n.count>=1?o.put(n):(i+=n?n.size:0,o.delete(e),s.objectStore("payload").delete(e))}return await s.done,i}prefixUpperBound(e){return e.slice(0,-1)+String.fromCharCode(e.charCodeAt(e.length-1)+1)}getLookupRange(e,t,n,r){let i,s,o;switch(t){case"prefix":i=[e],s=[this.prefixUpperBound(e)];break;case"host":{const t=new URL(e).origin;i=[t+"/"],s=[t+"0"];break}default:i=[e],s=[e,Number.MAX_SAFE_INTEGER]}return n?(i=[n,r||""],o=!0):o=!1,IDBKeyRange.bound(i,s,o,!0)}}class Mt{repeats={};getSkipCount(e,t,n){if("POST"!==n&&!t.endsWith(".m3u8"))return 0;e.replacesClientId&&delete this.repeats[e.replacesClientId];const r=e.resultingClientId||e.clientId;return r?(void 0===this.repeats[r]&&(this.repeats[r]={}),void 0===this.repeats[r][t]?this.repeats[r][t]=0:this.repeats[r][t]++,this.repeats[r][t]):0}}var jt=n(8310);class Ht extends jt.Writable{_write(e,t,n){n()}}const Wt=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Qt="�";var Vt;!function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",e[e.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_F=102]="LATIN_SMALL_F",e[e.LATIN_SMALL_X=120]="LATIN_SMALL_X",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",e[e.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"}(Vt=Vt||(Vt={}));const zt="--",qt="[CDATA[",Gt="doctype",Kt="script",Xt="public",Yt="system";function Jt(e){return e>=55296&&e<=57343}function Zt(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159}function $t(e){return e>=64976&&e<=65007||Wt.has(e)}var en,nn;!function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"}(en=en||(en={}));class tn{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e){const{line:t,col:n,offset:r}=this;return{code:e,startLine:t,endLine:t,startCol:n,endCol:n,startOffset:r,endOffset:r}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(function(e){return e>=56320&&e<=57343}(t))return this.pos++,this._addGap(),1024*(e-55296)+9216+t}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Vt.EOF;return this._err(en.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((32|this.html.charCodeAt(this.pos+t))!==e.charCodeAt(t))return!1;return!0}peek(e){const t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Vt.EOF;const n=this.html.charCodeAt(t);return n===Vt.CARRIAGE_RETURN?Vt.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Vt.EOF;let e=this.html.charCodeAt(this.pos);return e===Vt.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,Vt.LINE_FEED):e===Vt.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Jt(e)&&(e=this._processSurrogate(e)),null===this.handler.onParseError||e>31&&e<127||e===Vt.LINE_FEED||e===Vt.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){Zt(e)?this._err(en.controlCharacterInInputStream):$t(e)&&this._err(en.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}!function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"}(nn=nn||(nn={}));const rn=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),sn=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var on;const an=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),cn=null!==(on=String.fromCodePoint)&&void 0!==on?on:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e),t};function ln(e){return cn(function(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=an.get(e))&&void 0!==t?t:e}(e))}var hn,un,fn,gn,mn,wn,yn;function pn(e){return function(t,n){let r="",i=0,s=0;for(;(s=t.indexOf("&",s))>=0;){if(r+=t.slice(i,s),i=s,s+=1,t.charCodeAt(s)===hn.NUM){let e=s+1,o=10,a=t.charCodeAt(e);(a|hn.To_LOWER_BIT)===hn.LOWER_X&&(o=16,s+=1,e+=1);do{a=t.charCodeAt(++s)}while(a>=hn.ZERO&&a<=hn.NINE||16===o&&(a|hn.To_LOWER_BIT)>=hn.LOWER_A&&(a|hn.To_LOWER_BIT)<=hn.LOWER_F);if(e!==s){const a=t.substring(e,s),c=parseInt(a,o);if(t.charCodeAt(s)===hn.SEMI)s+=1;else if(n)continue;r+=ln(c),i=s}continue}let o=0,a=1,c=0,l=e[c];for(;s<t.length&&(c=dn(e,l,c+1,t.charCodeAt(s)),!(c<0));s++,a++){l=e[c];const r=l&un.VALUE_LENGTH;if(r){n&&t.charCodeAt(s)!==hn.SEMI||(o=c,a=0);const e=(r>>14)-1;if(0===e)break;c+=e}}if(0!==o){const t=(e[o]&un.VALUE_LENGTH)>>14;r+=1===t?String.fromCharCode(e[o]&~un.VALUE_LENGTH):2===t?String.fromCharCode(e[o+1]):String.fromCharCode(e[o+1],e[o+2]),i=s-a+1}}return r+t.slice(i)}}function dn(e,t,n,r){const i=(t&un.BRANCH_LENGTH)>>7,s=t&un.JUMP_TABLE;if(0===i)return 0!==s&&r===s?n:-1;if(s){const t=r-s;return t<0||t>=i?-1:e[n+t]-1}let o=n,a=o+i-1;for(;o<=a;){const t=o+a>>>1,n=e[t];if(n<r)o=t+1;else{if(!(n>r))return e[t+i];a=t-1}}return-1}!function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.To_LOWER_BIT=32]="To_LOWER_BIT"}(hn||(hn={})),function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(un||(un={})),pn(rn),pn(sn),function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"}(fn=fn||(fn={})),function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"}(gn=gn||(gn={})),function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"}(mn=mn||(mn={})),function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"}(wn=wn||(wn={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SECTION=94]="SECTION",e[e.SELECT=95]="SELECT",e[e.SOURCE=96]="SOURCE",e[e.SMALL=97]="SMALL",e[e.SPAN=98]="SPAN",e[e.STRIKE=99]="STRIKE",e[e.STRONG=100]="STRONG",e[e.STYLE=101]="STYLE",e[e.SUB=102]="SUB",e[e.SUMMARY=103]="SUMMARY",e[e.SUP=104]="SUP",e[e.TABLE=105]="TABLE",e[e.TBODY=106]="TBODY",e[e.TEMPLATE=107]="TEMPLATE",e[e.TEXTAREA=108]="TEXTAREA",e[e.TFOOT=109]="TFOOT",e[e.TD=110]="TD",e[e.TH=111]="TH",e[e.THEAD=112]="THEAD",e[e.TITLE=113]="TITLE",e[e.TR=114]="TR",e[e.TRACK=115]="TRACK",e[e.TT=116]="TT",e[e.U=117]="U",e[e.UL=118]="UL",e[e.SVG=119]="SVG",e[e.VAR=120]="VAR",e[e.WBR=121]="WBR",e[e.XMP=122]="XMP"}(yn=yn||(yn={}));const bn=new Map([[wn.A,yn.A],[wn.ADDRESS,yn.ADDRESS],[wn.ANNOTATION_XML,yn.ANNOTATION_XML],[wn.APPLET,yn.APPLET],[wn.AREA,yn.AREA],[wn.ARTICLE,yn.ARTICLE],[wn.ASIDE,yn.ASIDE],[wn.B,yn.B],[wn.BASE,yn.BASE],[wn.BASEFONT,yn.BASEFONT],[wn.BGSOUND,yn.BGSOUND],[wn.BIG,yn.BIG],[wn.BLOCKQUOTE,yn.BLOCKQUOTE],[wn.BODY,yn.BODY],[wn.BR,yn.BR],[wn.BUTTON,yn.BUTTON],[wn.CAPTION,yn.CAPTION],[wn.CENTER,yn.CENTER],[wn.CODE,yn.CODE],[wn.COL,yn.COL],[wn.COLGROUP,yn.COLGROUP],[wn.DD,yn.DD],[wn.DESC,yn.DESC],[wn.DETAILS,yn.DETAILS],[wn.DIALOG,yn.DIALOG],[wn.DIR,yn.DIR],[wn.DIV,yn.DIV],[wn.DL,yn.DL],[wn.DT,yn.DT],[wn.EM,yn.EM],[wn.EMBED,yn.EMBED],[wn.FIELDSET,yn.FIELDSET],[wn.FIGCAPTION,yn.FIGCAPTION],[wn.FIGURE,yn.FIGURE],[wn.FONT,yn.FONT],[wn.FOOTER,yn.FOOTER],[wn.FOREIGN_OBJECT,yn.FOREIGN_OBJECT],[wn.FORM,yn.FORM],[wn.FRAME,yn.FRAME],[wn.FRAMESET,yn.FRAMESET],[wn.H1,yn.H1],[wn.H2,yn.H2],[wn.H3,yn.H3],[wn.H4,yn.H4],[wn.H5,yn.H5],[wn.H6,yn.H6],[wn.HEAD,yn.HEAD],[wn.HEADER,yn.HEADER],[wn.HGROUP,yn.HGROUP],[wn.HR,yn.HR],[wn.HTML,yn.HTML],[wn.I,yn.I],[wn.IMG,yn.IMG],[wn.IMAGE,yn.IMAGE],[wn.INPUT,yn.INPUT],[wn.IFRAME,yn.IFRAME],[wn.KEYGEN,yn.KEYGEN],[wn.LABEL,yn.LABEL],[wn.LI,yn.LI],[wn.LINK,yn.LINK],[wn.LISTING,yn.LISTING],[wn.MAIN,yn.MAIN],[wn.MALIGNMARK,yn.MALIGNMARK],[wn.MARQUEE,yn.MARQUEE],[wn.MATH,yn.MATH],[wn.MENU,yn.MENU],[wn.META,yn.META],[wn.MGLYPH,yn.MGLYPH],[wn.MI,yn.MI],[wn.MO,yn.MO],[wn.MN,yn.MN],[wn.MS,yn.MS],[wn.MTEXT,yn.MTEXT],[wn.NAV,yn.NAV],[wn.NOBR,yn.NOBR],[wn.NOFRAMES,yn.NOFRAMES],[wn.NOEMBED,yn.NOEMBED],[wn.NOSCRIPT,yn.NOSCRIPT],[wn.OBJECT,yn.OBJECT],[wn.OL,yn.OL],[wn.OPTGROUP,yn.OPTGROUP],[wn.OPTION,yn.OPTION],[wn.P,yn.P],[wn.PARAM,yn.PARAM],[wn.PLAINTEXT,yn.PLAINTEXT],[wn.PRE,yn.PRE],[wn.RB,yn.RB],[wn.RP,yn.RP],[wn.RT,yn.RT],[wn.RTC,yn.RTC],[wn.RUBY,yn.RUBY],[wn.S,yn.S],[wn.SCRIPT,yn.SCRIPT],[wn.SECTION,yn.SECTION],[wn.SELECT,yn.SELECT],[wn.SOURCE,yn.SOURCE],[wn.SMALL,yn.SMALL],[wn.SPAN,yn.SPAN],[wn.STRIKE,yn.STRIKE],[wn.STRONG,yn.STRONG],[wn.STYLE,yn.STYLE],[wn.SUB,yn.SUB],[wn.SUMMARY,yn.SUMMARY],[wn.SUP,yn.SUP],[wn.TABLE,yn.TABLE],[wn.TBODY,yn.TBODY],[wn.TEMPLATE,yn.TEMPLATE],[wn.TEXTAREA,yn.TEXTAREA],[wn.TFOOT,yn.TFOOT],[wn.TD,yn.TD],[wn.TH,yn.TH],[wn.THEAD,yn.THEAD],[wn.TITLE,yn.TITLE],[wn.TR,yn.TR],[wn.TRACK,yn.TRACK],[wn.TT,yn.TT],[wn.U,yn.U],[wn.UL,yn.UL],[wn.SVG,yn.SVG],[wn.VAR,yn.VAR],[wn.WBR,yn.WBR],[wn.XMP,yn.XMP]]);function An(e){var t;return null!==(t=bn.get(e))&&void 0!==t?t:yn.UNKNOWN}const vn=yn;fn.HTML,new Set([vn.ADDRESS,vn.APPLET,vn.AREA,vn.ARTICLE,vn.ASIDE,vn.BASE,vn.BASEFONT,vn.BGSOUND,vn.BLOCKQUOTE,vn.BODY,vn.BR,vn.BUTTON,vn.CAPTION,vn.CENTER,vn.COL,vn.COLGROUP,vn.DD,vn.DETAILS,vn.DIR,vn.DIV,vn.DL,vn.DT,vn.EMBED,vn.FIELDSET,vn.FIGCAPTION,vn.FIGURE,vn.FOOTER,vn.FORM,vn.FRAME,vn.FRAMESET,vn.H1,vn.H2,vn.H3,vn.H4,vn.H5,vn.H6,vn.HEAD,vn.HEADER,vn.HGROUP,vn.HR,vn.HTML,vn.IFRAME,vn.IMG,vn.INPUT,vn.LI,vn.LINK,vn.LISTING,vn.MAIN,vn.MARQUEE,vn.MENU,vn.META,vn.NAV,vn.NOEMBED,vn.NOFRAMES,vn.NOSCRIPT,vn.OBJECT,vn.OL,vn.P,vn.PARAM,vn.PLAINTEXT,vn.PRE,vn.SCRIPT,vn.SECTION,vn.SELECT,vn.SOURCE,vn.STYLE,vn.SUMMARY,vn.TABLE,vn.TBODY,vn.TD,vn.TEMPLATE,vn.TEXTAREA,vn.TFOOT,vn.TH,vn.THEAD,vn.TITLE,vn.TR,vn.TRACK,vn.UL,vn.WBR,vn.XMP]),fn.MATHML,new Set([vn.MI,vn.MO,vn.MN,vn.MS,vn.MTEXT,vn.ANNOTATION_XML]),fn.SVG,new Set([vn.TITLE,vn.FOREIGN_OBJECT,vn.DESC]),fn.XLINK,new Set,fn.XML,new Set,fn.XMLNS,new Set;const _n=new Set([wn.STYLE,wn.SCRIPT,wn.XMP,wn.IFRAME,wn.NOEMBED,wn.NOFRAMES,wn.PLAINTEXT]),En=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);var xn;!function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",e[e.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",e[e.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",e[e.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",e[e.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",e[e.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"}(xn||(xn={}));const Sn={DATA:xn.DATA,RCDATA:xn.RCDATA,RAWTEXT:xn.RAWTEXT,SCRIPT_DATA:xn.SCRIPT_DATA,PLAINTEXT:xn.PLAINTEXT,CDATA_SECTION:xn.CDATA_SECTION};function In(e){return e>=Vt.DIGIT_0&&e<=Vt.DIGIT_9}function Tn(e){return e>=Vt.LATIN_CAPITAL_A&&e<=Vt.LATIN_CAPITAL_Z}function Cn(e){return function(e){return e>=Vt.LATIN_SMALL_A&&e<=Vt.LATIN_SMALL_Z}(e)||Tn(e)}function Rn(e){return Cn(e)||In(e)}function kn(e){return e>=Vt.LATIN_CAPITAL_A&&e<=Vt.LATIN_CAPITAL_F}function Nn(e){return e>=Vt.LATIN_SMALL_A&&e<=Vt.LATIN_SMALL_F}function On(e){return e+32}function Bn(e){return e===Vt.SPACE||e===Vt.LINE_FEED||e===Vt.TABULATION||e===Vt.FORM_FEED}function Pn(e){return e===Vt.EQUALS_SIGN||Rn(e)}function Ln(e){return Bn(e)||e===Vt.SOLIDUS||e===Vt.GREATER_THAN_SIGN}class Dn{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=xn.DATA,this.returnState=xn.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new tn(t),this.currentLocation=this.getCurrentLocation(-1)}_err(e){var t,n;null===(n=(t=this.handler).onParseError)||void 0===n||n.call(t,this.preprocessor.getError(e))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,this.inLoop||(this._runParsingLoop(),this.paused||null==e||e())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==n||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return!!this.preprocessor.endOfChunkHit&&(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0)}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(e){this.consumedAfterSnapshot-=e,this.preprocessor.retreat(e)}_reconsumeInState(e,t){this.state=e,this._callState(t)}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return!!this.preprocessor.startsWith(e,t)&&(this._advanceBy(e.length-1),!0)}_createStartTagToken(){this.currentToken={type:nn.START_TAG,tagName:"",tagID:yn.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:nn.END_TAG,tagName:"",tagID:yn.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:nn.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:nn.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;const n=this.currentToken;null===function(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}(n,this.currentAttr.name)?(n.attrs.push(this.currentAttr),n.location&&this.currentLocation&&((null!==(e=(t=n.location).attrs)&&void 0!==e?e:t.attrs=Object.create(null))[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue())):this._err(en.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const e=this.currentToken;this.prepareToken(e),e.tagID=An(e.tagName),e.type===nn.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(en.endTagWithAttributes),e.selfClosing&&this._err(en.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case nn.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case nn.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case nn.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:nn.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e)return void(this.currentCharacterToken.chars+=t);this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){const t=Bn(e)?nn.WHITESPACE_CHARACTER:e===Vt.NULL?nn.NULL_CHARACTER:nn.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(nn.CHARACTER,e)}_matchNamedCharacterReference(e){let t=null,n=0,r=!1;for(let i=0,s=rn[0];i>=0&&(i=dn(rn,s,i+1,e),!(i<0));e=this._consume()){n+=1,s=rn[i];const o=s&un.VALUE_LENGTH;if(o){const s=(o>>14)-1;if(e!==Vt.SEMICOLON&&this._isCharacterReferenceInAttribute()&&Pn(this.preprocessor.peek(1))?(t=[Vt.AMPERSAND],i+=s):(t=0===s?[rn[i]&~un.VALUE_LENGTH]:1===s?[rn[++i]]:[rn[++i],rn[++i]],n=0,r=e!==Vt.SEMICOLON),0===s){this._consume();break}}}return this._unconsume(n),r&&!this.preprocessor.endOfChunkHit&&this._err(en.missingSemicolonAfterCharacterReference),this._unconsume(1),t}_isCharacterReferenceInAttribute(){return this.returnState===xn.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===xn.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===xn.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case xn.DATA:this._stateData(e);break;case xn.RCDATA:this._stateRcdata(e);break;case xn.RAWTEXT:this._stateRawtext(e);break;case xn.SCRIPT_DATA:this._stateScriptData(e);break;case xn.PLAINTEXT:this._statePlaintext(e);break;case xn.TAG_OPEN:this._stateTagOpen(e);break;case xn.END_TAG_OPEN:this._stateEndTagOpen(e);break;case xn.TAG_NAME:this._stateTagName(e);break;case xn.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case xn.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case xn.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case xn.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case xn.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case xn.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case xn.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case xn.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case xn.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case xn.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case xn.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case xn.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case xn.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case xn.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case xn.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case xn.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case xn.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case xn.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case xn.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case xn.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case xn.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case xn.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case xn.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case xn.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case xn.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case xn.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case xn.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case xn.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case xn.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case xn.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case xn.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case xn.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case xn.BOGUS_COMMENT:this._stateBogusComment(e);break;case xn.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case xn.COMMENT_START:this._stateCommentStart(e);break;case xn.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case xn.COMMENT:this._stateComment(e);break;case xn.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case xn.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case xn.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case xn.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case xn.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case xn.COMMENT_END:this._stateCommentEnd(e);break;case xn.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case xn.DOCTYPE:this._stateDoctype(e);break;case xn.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case xn.DOCTYPE_NAME:this._stateDoctypeName(e);break;case xn.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case xn.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case xn.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case xn.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case xn.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case xn.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case xn.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case xn.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case xn.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case xn.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case xn.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case xn.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case xn.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case xn.CDATA_SECTION:this._stateCdataSection(e);break;case xn.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case xn.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case xn.CHARACTER_REFERENCE:this._stateCharacterReference(e);break;case xn.NAMED_CHARACTER_REFERENCE:this._stateNamedCharacterReference(e);break;case xn.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;case xn.NUMERIC_CHARACTER_REFERENCE:this._stateNumericCharacterReference(e);break;case xn.HEXADEMICAL_CHARACTER_REFERENCE_START:this._stateHexademicalCharacterReferenceStart(e);break;case xn.HEXADEMICAL_CHARACTER_REFERENCE:this._stateHexademicalCharacterReference(e);break;case xn.DECIMAL_CHARACTER_REFERENCE:this._stateDecimalCharacterReference(e);break;case xn.NUMERIC_CHARACTER_REFERENCE_END:this._stateNumericCharacterReferenceEnd(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case Vt.LESS_THAN_SIGN:this.state=xn.TAG_OPEN;break;case Vt.AMPERSAND:this.returnState=xn.DATA,this.state=xn.CHARACTER_REFERENCE;break;case Vt.NULL:this._err(en.unexpectedNullCharacter),this._emitCodePoint(e);break;case Vt.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case Vt.AMPERSAND:this.returnState=xn.RCDATA,this.state=xn.CHARACTER_REFERENCE;break;case Vt.LESS_THAN_SIGN:this.state=xn.RCDATA_LESS_THAN_SIGN;break;case Vt.NULL:this._err(en.unexpectedNullCharacter),this._emitChars(Qt);break;case Vt.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case Vt.LESS_THAN_SIGN:this.state=xn.RAWTEXT_LESS_THAN_SIGN;break;case Vt.NULL:this._err(en.unexpectedNullCharacter),this._emitChars(Qt);break;case Vt.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case Vt.LESS_THAN_SIGN:this.state=xn.SCRIPT_DATA_LESS_THAN_SIGN;break;case Vt.NULL:this._err(en.unexpectedNullCharacter),this._emitChars(Qt);break;case Vt.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case Vt.NULL:this._err(en.unexpectedNullCharacter),this._emitChars(Qt);break;case Vt.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Cn(e))this._createStartTagToken(),this.state=xn.TAG_NAME,this._stateTagName(e);else switch(e){case Vt.EXCLAMATION_MARK:this.state=xn.MARKUP_DECLARATION_OPEN;break;case Vt.SOLIDUS:this.state=xn.END_TAG_OPEN;break;case Vt.QUESTION_MARK:this._err(en.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=xn.BOGUS_COMMENT,this._stateBogusComment(e);break;case Vt.EOF:this._err(en.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(en.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=xn.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Cn(e))this._createEndTagToken(),this.state=xn.TAG_NAME,this._stateTagName(e);else switch(e){case Vt.GREATER_THAN_SIGN:this._err(en.missingEndTagName),this.state=xn.DATA;break;case Vt.EOF:this._err(en.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(en.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=xn.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const t=this.currentToken;switch(e){case Vt.SPACE:case Vt.LINE_FEED:case Vt.TABULATION:case Vt.FORM_FEED:this.state=xn.BEFORE_ATTRIBUTE_NAME;break;case Vt.SOLIDUS:this.state=xn.SELF_CLOSING_START_TAG;break;case Vt.GREATER_THAN_SIGN:this.state=xn.DATA,this.emitCurrentTagToken();break;case Vt.NULL:this._err(en.unexpectedNullCharacter),t.tagName+=Qt;break;case Vt.EOF:this._err(en.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(Tn(e)?On(e):e)}}_stateRcdataLessThanSign(e){e===Vt.SOLIDUS?this.state=xn.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=xn.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Cn(e)?(this.state=xn.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=xn.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();switch(this._createEndTagToken(),this.currentToken.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case Vt.SPACE:case Vt.LINE_FEED:case Vt.TABULATION:case Vt.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=xn.BEFORE_ATTRIBUTE_NAME,!1;case Vt.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=xn.SELF_CLOSING_START_TAG,!1;case Vt.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=xn.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=xn.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===Vt.SOLIDUS?this.state=xn.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=xn.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Cn(e)?(this.state=xn.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=xn.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=xn.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case Vt.SOLIDUS:this.state=xn.SCRIPT_DATA_END_TAG_OPEN;break;case Vt.EXCLAMATION_MARK:this.state=xn.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=xn.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Cn(e)?(this.state=xn.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=xn.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=xn.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===Vt.HYPHEN_MINUS?(this.state=xn.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=xn.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===Vt.HYPHEN_MINUS?(this.state=xn.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=xn.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case Vt.HYPHEN_MINUS:this.state=xn.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case Vt.LESS_THAN_SIGN:this.state=xn.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Vt.NULL:this._err(en.unexpectedNullCharacter),this._emitChars(Qt);break;case Vt.EOF:this._err(en.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case Vt.HYPHEN_MINUS:this.state=xn.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case Vt.LESS_THAN_SIGN:this.state=xn.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Vt.NULL:this._err(en.unexpectedNullCharacter),this.state=xn.SCRIPT_DATA_ESCAPED,this._emitChars(Qt);break;case Vt.EOF:this._err(en.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=xn.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case Vt.HYPHEN_MINUS:this._emitChars("-");break;case Vt.LESS_THAN_SIGN:this.state=xn.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Vt.GREATER_THAN_SIGN:this.state=xn.SCRIPT_DATA,this._emitChars(">");break;case Vt.NULL:this._err(en.unexpectedNullCharacter),this.state=xn.SCRIPT_DATA_ESCAPED,this._emitChars(Qt);break;case Vt.EOF:this._err(en.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=xn.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===Vt.SOLIDUS?this.state=xn.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Cn(e)?(this._emitChars("<"),this.state=xn.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=xn.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Cn(e)?(this.state=xn.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=xn.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=xn.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Kt,!1)&&Ln(this.preprocessor.peek(6))){this._emitCodePoint(e);for(let e=0;e<6;e++)this._emitCodePoint(this._consume());this.state=xn.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=xn.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case Vt.HYPHEN_MINUS:this.state=xn.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case Vt.LESS_THAN_SIGN:this.state=xn.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Vt.NULL:this._err(en.unexpectedNullCharacter),this._emitChars(Qt);break;case Vt.EOF:this._err(en.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case Vt.HYPHEN_MINUS:this.state=xn.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case Vt.LESS_THAN_SIGN:this.state=xn.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Vt.NULL:this._err(en.unexpectedNullCharacter),this.state=xn.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Qt);break;case Vt.EOF:this._err(en.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=xn.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case Vt.HYPHEN_MINUS:this._emitChars("-");break;case Vt.LESS_THAN_SIGN:this.state=xn.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Vt.GREATER_THAN_SIGN:this.state=xn.SCRIPT_DATA,this._emitChars(">");break;case Vt.NULL:this._err(en.unexpectedNullCharacter),this.state=xn.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Qt);break;case Vt.EOF:this._err(en.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=xn.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===Vt.SOLIDUS?(this.state=xn.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=xn.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Kt,!1)&&Ln(this.preprocessor.peek(6))){this._emitCodePoint(e);for(let e=0;e<6;e++)this._emitCodePoint(this._consume());this.state=xn.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=xn.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case Vt.SPACE:case Vt.LINE_FEED:case Vt.TABULATION:case Vt.FORM_FEED:break;case Vt.SOLIDUS:case Vt.GREATER_THAN_SIGN:case Vt.EOF:this.state=xn.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Vt.EQUALS_SIGN:this._err(en.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=xn.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=xn.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case Vt.SPACE:case Vt.LINE_FEED:case Vt.TABULATION:case Vt.FORM_FEED:case Vt.SOLIDUS:case Vt.GREATER_THAN_SIGN:case Vt.EOF:this._leaveAttrName(),this.state=xn.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Vt.EQUALS_SIGN:this._leaveAttrName(),this.state=xn.BEFORE_ATTRIBUTE_VALUE;break;case Vt.QUOTATION_MARK:case Vt.APOSTROPHE:case Vt.LESS_THAN_SIGN:this._err(en.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case Vt.NULL:this._err(en.unexpectedNullCharacter),this.currentAttr.name+=Qt;break;default:this.currentAttr.name+=String.fromCodePoint(Tn(e)?On(e):e)}}_stateAfterAttributeName(e){switch(e){case Vt.SPACE:case Vt.LINE_FEED:case Vt.TABULATION:case Vt.FORM_FEED:break;case Vt.SOLIDUS:this.state=xn.SELF_CLOSING_START_TAG;break;case Vt.EQUALS_SIGN:this.state=xn.BEFORE_ATTRIBUTE_VALUE;break;case Vt.GREATER_THAN_SIGN:this.state=xn.DATA,this.emitCurrentTagToken();break;case Vt.EOF:this._err(en.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=xn.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case Vt.SPACE:case Vt.LINE_FEED:case Vt.TABULATION:case Vt.FORM_FEED:break;case Vt.QUOTATION_MARK:this.state=xn.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case Vt.APOSTROPHE:this.state=xn.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case Vt.GREATER_THAN_SIGN:this._err(en.missingAttributeValue),this.state=xn.DATA,this.emitCurrentTagToken();break;default:this.state=xn.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case Vt.QUOTATION_MARK:this.state=xn.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Vt.AMPERSAND:this.returnState=xn.ATTRIBUTE_VALUE_DOUBLE_QUOTED,this.state=xn.CHARACTER_REFERENCE;break;case Vt.NULL:this._err(en.unexpectedNullCharacter),this.currentAttr.value+=Qt;break;case Vt.EOF:this._err(en.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case Vt.APOSTROPHE:this.state=xn.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Vt.AMPERSAND:this.returnState=xn.ATTRIBUTE_VALUE_SINGLE_QUOTED,this.state=xn.CHARACTER_REFERENCE;break;case Vt.NULL:this._err(en.unexpectedNullCharacter),this.currentAttr.value+=Qt;break;case Vt.EOF:this._err(en.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case Vt.SPACE:case Vt.LINE_FEED:case Vt.TABULATION:case Vt.FORM_FEED:this._leaveAttrValue(),this.state=xn.BEFORE_ATTRIBUTE_NAME;break;case Vt.AMPERSAND:this.returnState=xn.ATTRIBUTE_VALUE_UNQUOTED,this.state=xn.CHARACTER_REFERENCE;break;case Vt.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=xn.DATA,this.emitCurrentTagToken();break;case Vt.NULL:this._err(en.unexpectedNullCharacter),this.currentAttr.value+=Qt;break;case Vt.QUOTATION_MARK:case Vt.APOSTROPHE:case Vt.LESS_THAN_SIGN:case Vt.EQUALS_SIGN:case Vt.GRAVE_ACCENT:this._err(en.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case Vt.EOF:this._err(en.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case Vt.SPACE:case Vt.LINE_FEED:case Vt.TABULATION:case Vt.FORM_FEED:this._leaveAttrValue(),this.state=xn.BEFORE_ATTRIBUTE_NAME;break;case Vt.SOLIDUS:this._leaveAttrValue(),this.state=xn.SELF_CLOSING_START_TAG;break;case Vt.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=xn.DATA,this.emitCurrentTagToken();break;case Vt.EOF:this._err(en.eofInTag),this._emitEOFToken();break;default:this._err(en.missingWhitespaceBetweenAttributes),this.state=xn.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case Vt.GREATER_THAN_SIGN:this.currentToken.selfClosing=!0,this.state=xn.DATA,this.emitCurrentTagToken();break;case Vt.EOF:this._err(en.eofInTag),this._emitEOFToken();break;default:this._err(en.unexpectedSolidusInTag),this.state=xn.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const t=this.currentToken;switch(e){case Vt.GREATER_THAN_SIGN:this.state=xn.DATA,this.emitCurrentComment(t);break;case Vt.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case Vt.NULL:this._err(en.unexpectedNullCharacter),t.data+=Qt;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(zt,!0)?(this._createCommentToken(3),this.state=xn.COMMENT_START):this._consumeSequenceIfMatch(Gt,!1)?(this.currentLocation=this.getCurrentLocation(8),this.state=xn.DOCTYPE):this._consumeSequenceIfMatch(qt,!0)?this.inForeignNode?this.state=xn.CDATA_SECTION:(this._err(en.cdataInHtmlContent),this._createCommentToken(8),this.currentToken.data="[CDATA[",this.state=xn.BOGUS_COMMENT):this._ensureHibernation()||(this._err(en.incorrectlyOpenedComment),this._createCommentToken(2),this.state=xn.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case Vt.HYPHEN_MINUS:this.state=xn.COMMENT_START_DASH;break;case Vt.GREATER_THAN_SIGN:{this._err(en.abruptClosingOfEmptyComment),this.state=xn.DATA;const e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=xn.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const t=this.currentToken;switch(e){case Vt.HYPHEN_MINUS:this.state=xn.COMMENT_END;break;case Vt.GREATER_THAN_SIGN:this._err(en.abruptClosingOfEmptyComment),this.state=xn.DATA,this.emitCurrentComment(t);break;case Vt.EOF:this._err(en.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=xn.COMMENT,this._stateComment(e)}}_stateComment(e){const t=this.currentToken;switch(e){case Vt.HYPHEN_MINUS:this.state=xn.COMMENT_END_DASH;break;case Vt.LESS_THAN_SIGN:t.data+="<",this.state=xn.COMMENT_LESS_THAN_SIGN;break;case Vt.NULL:this._err(en.unexpectedNullCharacter),t.data+=Qt;break;case Vt.EOF:this._err(en.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const t=this.currentToken;switch(e){case Vt.EXCLAMATION_MARK:t.data+="!",this.state=xn.COMMENT_LESS_THAN_SIGN_BANG;break;case Vt.LESS_THAN_SIGN:t.data+="<";break;default:this.state=xn.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===Vt.HYPHEN_MINUS?this.state=xn.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=xn.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===Vt.HYPHEN_MINUS?this.state=xn.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=xn.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==Vt.GREATER_THAN_SIGN&&e!==Vt.EOF&&this._err(en.nestedComment),this.state=xn.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const t=this.currentToken;switch(e){case Vt.HYPHEN_MINUS:this.state=xn.COMMENT_END;break;case Vt.EOF:this._err(en.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=xn.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const t=this.currentToken;switch(e){case Vt.GREATER_THAN_SIGN:this.state=xn.DATA,this.emitCurrentComment(t);break;case Vt.EXCLAMATION_MARK:this.state=xn.COMMENT_END_BANG;break;case Vt.HYPHEN_MINUS:t.data+="-";break;case Vt.EOF:this._err(en.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=xn.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const t=this.currentToken;switch(e){case Vt.HYPHEN_MINUS:t.data+="--!",this.state=xn.COMMENT_END_DASH;break;case Vt.GREATER_THAN_SIGN:this._err(en.incorrectlyClosedComment),this.state=xn.DATA,this.emitCurrentComment(t);break;case Vt.EOF:this._err(en.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=xn.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case Vt.SPACE:case Vt.LINE_FEED:case Vt.TABULATION:case Vt.FORM_FEED:this.state=xn.BEFORE_DOCTYPE_NAME;break;case Vt.GREATER_THAN_SIGN:this.state=xn.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case Vt.EOF:{this._err(en.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(en.missingWhitespaceBeforeDoctypeName),this.state=xn.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Tn(e))this._createDoctypeToken(String.fromCharCode(On(e))),this.state=xn.DOCTYPE_NAME;else switch(e){case Vt.SPACE:case Vt.LINE_FEED:case Vt.TABULATION:case Vt.FORM_FEED:break;case Vt.NULL:this._err(en.unexpectedNullCharacter),this._createDoctypeToken(Qt),this.state=xn.DOCTYPE_NAME;break;case Vt.GREATER_THAN_SIGN:{this._err(en.missingDoctypeName),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=xn.DATA;break}case Vt.EOF:{this._err(en.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=xn.DOCTYPE_NAME}}_stateDoctypeName(e){const t=this.currentToken;switch(e){case Vt.SPACE:case Vt.LINE_FEED:case Vt.TABULATION:case Vt.FORM_FEED:this.state=xn.AFTER_DOCTYPE_NAME;break;case Vt.GREATER_THAN_SIGN:this.state=xn.DATA,this.emitCurrentDoctype(t);break;case Vt.NULL:this._err(en.unexpectedNullCharacter),t.name+=Qt;break;case Vt.EOF:this._err(en.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Tn(e)?On(e):e)}}_stateAfterDoctypeName(e){const t=this.currentToken;switch(e){case Vt.SPACE:case Vt.LINE_FEED:case Vt.TABULATION:case Vt.FORM_FEED:break;case Vt.GREATER_THAN_SIGN:this.state=xn.DATA,this.emitCurrentDoctype(t);break;case Vt.EOF:this._err(en.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(Xt,!1)?this.state=xn.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Yt,!1)?this.state=xn.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(en.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=xn.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const t=this.currentToken;switch(e){case Vt.SPACE:case Vt.LINE_FEED:case Vt.TABULATION:case Vt.FORM_FEED:this.state=xn.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case Vt.QUOTATION_MARK:this._err(en.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=xn.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Vt.APOSTROPHE:this._err(en.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=xn.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Vt.GREATER_THAN_SIGN:this._err(en.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=xn.DATA,this.emitCurrentDoctype(t);break;case Vt.EOF:this._err(en.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(en.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=xn.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case Vt.SPACE:case Vt.LINE_FEED:case Vt.TABULATION:case Vt.FORM_FEED:break;case Vt.QUOTATION_MARK:t.publicId="",this.state=xn.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Vt.APOSTROPHE:t.publicId="",this.state=xn.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Vt.GREATER_THAN_SIGN:this._err(en.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=xn.DATA,this.emitCurrentDoctype(t);break;case Vt.EOF:this._err(en.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(en.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=xn.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case Vt.QUOTATION_MARK:this.state=xn.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Vt.NULL:this._err(en.unexpectedNullCharacter),t.publicId+=Qt;break;case Vt.GREATER_THAN_SIGN:this._err(en.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=xn.DATA;break;case Vt.EOF:this._err(en.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case Vt.APOSTROPHE:this.state=xn.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Vt.NULL:this._err(en.unexpectedNullCharacter),t.publicId+=Qt;break;case Vt.GREATER_THAN_SIGN:this._err(en.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=xn.DATA;break;case Vt.EOF:this._err(en.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case Vt.SPACE:case Vt.LINE_FEED:case Vt.TABULATION:case Vt.FORM_FEED:this.state=xn.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case Vt.GREATER_THAN_SIGN:this.state=xn.DATA,this.emitCurrentDoctype(t);break;case Vt.QUOTATION_MARK:this._err(en.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=xn.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Vt.APOSTROPHE:this._err(en.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=xn.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Vt.EOF:this._err(en.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(en.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=xn.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const t=this.currentToken;switch(e){case Vt.SPACE:case Vt.LINE_FEED:case Vt.TABULATION:case Vt.FORM_FEED:break;case Vt.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=xn.DATA;break;case Vt.QUOTATION_MARK:t.systemId="",this.state=xn.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Vt.APOSTROPHE:t.systemId="",this.state=xn.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Vt.EOF:this._err(en.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(en.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=xn.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const t=this.currentToken;switch(e){case Vt.SPACE:case Vt.LINE_FEED:case Vt.TABULATION:case Vt.FORM_FEED:this.state=xn.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case Vt.QUOTATION_MARK:this._err(en.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=xn.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Vt.APOSTROPHE:this._err(en.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=xn.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Vt.GREATER_THAN_SIGN:this._err(en.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=xn.DATA,this.emitCurrentDoctype(t);break;case Vt.EOF:this._err(en.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(en.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=xn.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case Vt.SPACE:case Vt.LINE_FEED:case Vt.TABULATION:case Vt.FORM_FEED:break;case Vt.QUOTATION_MARK:t.systemId="",this.state=xn.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Vt.APOSTROPHE:t.systemId="",this.state=xn.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Vt.GREATER_THAN_SIGN:this._err(en.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=xn.DATA,this.emitCurrentDoctype(t);break;case Vt.EOF:this._err(en.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(en.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=xn.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case Vt.QUOTATION_MARK:this.state=xn.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Vt.NULL:this._err(en.unexpectedNullCharacter),t.systemId+=Qt;break;case Vt.GREATER_THAN_SIGN:this._err(en.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=xn.DATA;break;case Vt.EOF:this._err(en.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case Vt.APOSTROPHE:this.state=xn.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Vt.NULL:this._err(en.unexpectedNullCharacter),t.systemId+=Qt;break;case Vt.GREATER_THAN_SIGN:this._err(en.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=xn.DATA;break;case Vt.EOF:this._err(en.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case Vt.SPACE:case Vt.LINE_FEED:case Vt.TABULATION:case Vt.FORM_FEED:break;case Vt.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=xn.DATA;break;case Vt.EOF:this._err(en.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(en.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=xn.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const t=this.currentToken;switch(e){case Vt.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=xn.DATA;break;case Vt.NULL:this._err(en.unexpectedNullCharacter);break;case Vt.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case Vt.RIGHT_SQUARE_BRACKET:this.state=xn.CDATA_SECTION_BRACKET;break;case Vt.EOF:this._err(en.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===Vt.RIGHT_SQUARE_BRACKET?this.state=xn.CDATA_SECTION_END:(this._emitChars("]"),this.state=xn.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case Vt.GREATER_THAN_SIGN:this.state=xn.DATA;break;case Vt.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=xn.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(e){e===Vt.NUMBER_SIGN?this.state=xn.NUMERIC_CHARACTER_REFERENCE:Rn(e)?(this.state=xn.NAMED_CHARACTER_REFERENCE,this._stateNamedCharacterReference(e)):(this._flushCodePointConsumedAsCharacterReference(Vt.AMPERSAND),this._reconsumeInState(this.returnState,e))}_stateNamedCharacterReference(e){const t=this._matchNamedCharacterReference(e);if(this._ensureHibernation());else if(t){for(let e=0;e<t.length;e++)this._flushCodePointConsumedAsCharacterReference(t[e]);this.state=this.returnState}else this._flushCodePointConsumedAsCharacterReference(Vt.AMPERSAND),this.state=xn.AMBIGUOUS_AMPERSAND}_stateAmbiguousAmpersand(e){Rn(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===Vt.SEMICOLON&&this._err(en.unknownNamedCharacterReference),this._reconsumeInState(this.returnState,e))}_stateNumericCharacterReference(e){this.charRefCode=0,e===Vt.LATIN_SMALL_X||e===Vt.LATIN_CAPITAL_X?this.state=xn.HEXADEMICAL_CHARACTER_REFERENCE_START:In(e)?(this.state=xn.DECIMAL_CHARACTER_REFERENCE,this._stateDecimalCharacterReference(e)):(this._err(en.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(Vt.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(Vt.NUMBER_SIGN),this._reconsumeInState(this.returnState,e))}_stateHexademicalCharacterReferenceStart(e){!function(e){return In(e)||kn(e)||Nn(e)}(e)?(this._err(en.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(Vt.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(Vt.NUMBER_SIGN),this._unconsume(2),this.state=this.returnState):(this.state=xn.HEXADEMICAL_CHARACTER_REFERENCE,this._stateHexademicalCharacterReference(e))}_stateHexademicalCharacterReference(e){kn(e)?this.charRefCode=16*this.charRefCode+e-55:Nn(e)?this.charRefCode=16*this.charRefCode+e-87:In(e)?this.charRefCode=16*this.charRefCode+e-48:e===Vt.SEMICOLON?this.state=xn.NUMERIC_CHARACTER_REFERENCE_END:(this._err(en.missingSemicolonAfterCharacterReference),this.state=xn.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(e))}_stateDecimalCharacterReference(e){In(e)?this.charRefCode=10*this.charRefCode+e-48:e===Vt.SEMICOLON?this.state=xn.NUMERIC_CHARACTER_REFERENCE_END:(this._err(en.missingSemicolonAfterCharacterReference),this.state=xn.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(e))}_stateNumericCharacterReferenceEnd(e){if(this.charRefCode===Vt.NULL)this._err(en.nullCharacterReference),this.charRefCode=Vt.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(en.characterReferenceOutsideUnicodeRange),this.charRefCode=Vt.REPLACEMENT_CHARACTER;else if(Jt(this.charRefCode))this._err(en.surrogateCharacterReference),this.charRefCode=Vt.REPLACEMENT_CHARACTER;else if($t(this.charRefCode))this._err(en.noncharacterCharacterReference);else if(Zt(this.charRefCode)||this.charRefCode===Vt.CARRIAGE_RETURN){this._err(en.controlCharacterReference);const e=En.get(this.charRefCode);void 0!==e&&(this.charRefCode=e)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,e)}}const Un=new Set([yn.DD,yn.DT,yn.LI,yn.OPTGROUP,yn.OPTION,yn.P,yn.RB,yn.RP,yn.RT,yn.RTC]);var Fn;new Set([...Un,yn.CAPTION,yn.COLGROUP,yn.TBODY,yn.TD,yn.TFOOT,yn.TH,yn.THEAD,yn.TR]),new Map([[yn.APPLET,fn.HTML],[yn.CAPTION,fn.HTML],[yn.HTML,fn.HTML],[yn.MARQUEE,fn.HTML],[yn.OBJECT,fn.HTML],[yn.TABLE,fn.HTML],[yn.TD,fn.HTML],[yn.TEMPLATE,fn.HTML],[yn.TH,fn.HTML],[yn.ANNOTATION_XML,fn.MATHML],[yn.MI,fn.MATHML],[yn.MN,fn.MATHML],[yn.MO,fn.MATHML],[yn.MS,fn.MATHML],[yn.MTEXT,fn.MATHML],[yn.DESC,fn.SVG],[yn.FOREIGN_OBJECT,fn.SVG],[yn.TITLE,fn.SVG]]),yn.H1,yn.H2,yn.H3,yn.H4,yn.H5,yn.H6,yn.TR,yn.TEMPLATE,yn.HTML,yn.TBODY,yn.TFOOT,yn.THEAD,yn.TEMPLATE,yn.HTML,yn.TABLE,yn.TEMPLATE,yn.HTML,yn.TD,yn.TH,function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"}(Fn=Fn||(Fn={})),Fn.Marker;const Mn=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],jn=(new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"]),Hn="text/html",Wn="application/xhtml+xml",Qn=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),Vn=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:fn.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:fn.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:fn.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:fn.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:fn.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:fn.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:fn.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:fn.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:fn.XML}],["xml:space",{prefix:"xml",name:"space",namespace:fn.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:fn.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:fn.XMLNS}]]),zn=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),qn=new Set([yn.B,yn.BIG,yn.BLOCKQUOTE,yn.BODY,yn.BR,yn.CENTER,yn.CODE,yn.DD,yn.DIV,yn.DL,yn.DT,yn.EM,yn.EMBED,yn.H1,yn.H2,yn.H3,yn.H4,yn.H5,yn.H6,yn.HEAD,yn.HR,yn.I,yn.IMG,yn.LI,yn.LISTING,yn.MENU,yn.META,yn.NOBR,yn.OL,yn.P,yn.PRE,yn.RUBY,yn.S,yn.SMALL,yn.SPAN,yn.STRONG,yn.STRIKE,yn.SUB,yn.SUP,yn.TABLE,yn.TT,yn.U,yn.UL,yn.VAR]);function Gn(e){const t=zn.get(e.tagName);null!=t&&(e.tagName=t,e.tagID=An(e.tagName))}function Kn(e,t,n,r){return(!r||r===fn.HTML)&&function(e,t,n){if(t===fn.MATHML&&e===yn.ANNOTATION_XML)for(let e=0;e<n.length;e++)if(n[e].name===gn.ENCODING){const t=n[e].value.toLowerCase();return t===Hn||t===Wn}return t===fn.SVG&&(e===yn.FOREIGN_OBJECT||e===yn.DESC||e===yn.TITLE)}(e,t,n)||(!r||r===fn.MATHML)&&function(e,t){return t===fn.MATHML&&(e===yn.MI||e===yn.MO||e===yn.MN||e===yn.MS||e===yn.MTEXT)}(e,t)}var Xn;!function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"}(Xn||(Xn={})),new Set([yn.TABLE,yn.TBODY,yn.TFOOT,yn.THEAD,yn.TR]),new Set([yn.CAPTION,yn.COL,yn.COLGROUP,yn.TBODY,yn.TD,yn.TFOOT,yn.TH,yn.THEAD,yn.TR]);const Yn=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]);function Jn(e,t){return function(n){let r,i=0,s="";for(;r=e.exec(n);)i!==r.index&&(s+=n.substring(i,r.index)),s+=t.get(r[0].charCodeAt(0)),i=r.index+1;return s+n.substring(i)}}String.prototype.codePointAt,Jn(/[&<>'"]/g,Yn);const Zn=Jn(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),$n=Jn(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]));new Set([wn.AREA,wn.BASE,wn.BASEFONT,wn.BGSOUND,wn.BR,wn.COL,wn.EMBED,wn.FRAME,wn.HR,wn.IMG,wn.INPUT,wn.KEYGEN,wn.LINK,wn.META,wn.PARAM,wn.SOURCE,wn.TRACK,wn.WBR]);const er=yn;class tr{constructor(e,t){this.handler=t,this.namespaceStack=[],this.inForeignContent=!1,this.skipNextNewLine=!1,this.tokenizer=new Dn(e,this),this._enterNamespace(fn.HTML)}onNullCharacter(e){this.skipNextNewLine=!1,this.inForeignContent?this.handler.onCharacter({type:nn.CHARACTER,chars:"�",location:e.location}):this.handler.onNullCharacter(e)}onWhitespaceCharacter(e){if(this.skipNextNewLine&&10===e.chars.charCodeAt(0)){if(this.skipNextNewLine=!1,1===e.chars.length)return;e.chars=e.chars.substr(1)}this.handler.onWhitespaceCharacter(e)}onCharacter(e){this.skipNextNewLine=!1,this.handler.onCharacter(e)}onComment(e){this.skipNextNewLine=!1,this.handler.onComment(e)}onDoctype(e){this.skipNextNewLine=!1,this.handler.onDoctype(e)}onEof(e){this.skipNextNewLine=!1,this.handler.onEof(e)}_enterNamespace(e){this.namespaceStack.unshift(e),this.inForeignContent=e!==fn.HTML,this.tokenizer.inForeignNode=this.inForeignContent}_leaveCurrentNamespace(){this.namespaceStack.shift(),this.inForeignContent=this.namespaceStack[0]!==fn.HTML,this.tokenizer.inForeignNode=this.inForeignContent}_ensureTokenizerMode(e){switch(e){case er.TEXTAREA:case er.TITLE:this.tokenizer.state=Sn.RCDATA;break;case er.PLAINTEXT:this.tokenizer.state=Sn.PLAINTEXT;break;case er.SCRIPT:this.tokenizer.state=Sn.SCRIPT_DATA;break;case er.STYLE:case er.IFRAME:case er.XMP:case er.NOEMBED:case er.NOFRAMES:case er.NOSCRIPT:this.tokenizer.state=Sn.RAWTEXT}}onStartTag(e){let t=e.tagID;switch(t){case er.SVG:this._enterNamespace(fn.SVG);break;case er.MATH:this._enterNamespace(fn.MATHML)}if(this.inForeignContent)if(function(e){const t=e.tagID;return t===yn.FONT&&e.attrs.some(({name:e})=>e===gn.COLOR||e===gn.SIZE||e===gn.FACE)||qn.has(t)}(e))this._leaveCurrentNamespace();else{const n=this.namespaceStack[0];n===fn.MATHML?function(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}}(e):n===fn.SVG&&(Gn(e),function(e){for(let t=0;t<e.attrs.length;t++){const n=Qn.get(e.attrs[t].name);null!=n&&(e.attrs[t].name=n)}}(e)),function(e){for(let t=0;t<e.attrs.length;t++){const n=Vn.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}(e),t=e.tagID,!e.selfClosing&&Kn(t,n,e.attrs)&&this._enterNamespace(fn.HTML)}else{switch(t){case er.PRE:case er.TEXTAREA:case er.LISTING:this.skipNextNewLine=!0;break;case er.IMAGE:e.tagName=wn.IMG,e.tagID=er.IMG}this._ensureTokenizerMode(t)}this.handler.onStartTag(e)}onEndTag(e){let t=e.tagID;if(this.inForeignContent)(t===er.SVG&&this.namespaceStack[0]===fn.SVG||t===er.MATH&&this.namespaceStack[0]===fn.MATHML)&&this._leaveCurrentNamespace();else{const n=this.namespaceStack[1];if(n===fn.SVG){const n=zn.get(e.tagName);n&&(t=An(n))}Kn(t,n,e.attrs)&&this._leaveCurrentNamespace()}this.namespaceStack[0]===fn.SVG&&Gn(e),this.handler.onEndTag(e)}}class nr extends jt.Transform{constructor(e={}){super({encoding:"utf8",decodeStrings:!1}),this.pendingText=null,this.lastChunkWritten=!1,this.stopped=!1,this.options={sourceCodeLocationInfo:!1,...e},this.parserFeedbackSimulator=new tr(this.options,this),this.tokenizer=this.parserFeedbackSimulator.tokenizer,this.pipe(new Ht)}_transform(e,t,n){if("string"!=typeof e)throw new TypeError("Parser can work only with string streams.");n(null,this._transformChunk(e))}_final(e){this.lastChunkWritten=!0,e(null,this._transformChunk(""))}stop(){this.stopped=!0,this.tokenizer.pause()}_transformChunk(e){return this.stopped||this.tokenizer.write(e,this.lastChunkWritten),e}onCharacter({chars:e,location:t}){if(null===this.pendingText)this.pendingText={text:e,sourceCodeLocation:t};else if(this.pendingText.text+=e,t&&this.pendingText.sourceCodeLocation){const{endLine:e,endCol:n,endOffset:r}=t;this.pendingText.sourceCodeLocation={...this.pendingText.sourceCodeLocation,endLine:e,endCol:n,endOffset:r}}this.tokenizer.preprocessor.willDropParsedChunk()&&this._emitPendingText()}onWhitespaceCharacter(e){this.onCharacter(e)}onNullCharacter(e){this.onCharacter(e)}onEof(){this._emitPendingText(),this.stopped=!0}onStartTag(e){this._emitPendingText();const t={tagName:e.tagName,attrs:e.attrs,selfClosing:e.selfClosing,sourceCodeLocation:e.location};this.emitIfListenerExists("startTag",t)}onEndTag(e){this._emitPendingText();const t={tagName:e.tagName,sourceCodeLocation:e.location};this.emitIfListenerExists("endTag",t)}onDoctype(e){this._emitPendingText();const t={name:e.name,publicId:e.publicId,systemId:e.systemId,sourceCodeLocation:e.location};this.emitIfListenerExists("doctype",t)}onComment(e){this._emitPendingText();const t={text:e.data,sourceCodeLocation:e.location};this.emitIfListenerExists("comment",t)}emitIfListenerExists(e,t){return 0!==this.listenerCount(e)&&(this._emitToken(e,t),!0)}_emitToken(e,t){this.emit(e,t)}_emitPendingText(){null!==this.pendingText&&(this.emitIfListenerExists("text",this.pendingText),this.pendingText=null)}}var rr=n(4698),ir=n.n(rr);async function sr(e,t,n){const r=e;try{"chunked"===n&&(e=function(e){let t=0,n=0;const r=new TextDecoder("utf-8");for(;t<e.length;){let i=t;for(;e[i]>=48&&e[i]<=57||e[i]>=65&&e[i]<=70||e[i]>=97&&e[i]<=102;)i++;if(0===i)return e;if(13!=e[i]||10!=e[i+1])return e;i+=2;const s=parseInt(r.decode(e.subarray(t,i)),16);if(0==s)break;e.set(e.subarray(i,i+s),n),i+=s,n+=s,13==e[i]&&10==e[i+1]&&(i+=2),t=i}return e.subarray(0,n)}(e))}catch(e){console.log("Chunk-Encoding Ignored: "+e)}try{if("br"===t)0===(e=ir()(e)).length&&(e=r);else if("gzip"===t||"gzip"===n){const t=new(de().Inflate);t.push(e,!0),t.result&&!t.err&&(e=t.result)}}catch(e){console.log("Content-Encoding Ignored: "+e)}return e}const or=["script","style","header","footer","banner-div","noscript"];class ar{batchSize;promises=[];batch=[];count=0;dupeSet=new Set;db;constructor(e=1e3){this.batchSize=e}addPage(e){this.promises.push(this.db.addPage(e))}isBatchFull(){return this.batch.length>=this.batchSize}addResource(e){if(this.isBatchFull()&&this.flush(),Number.isNaN(e.ts))return void console.warn("Skipping resource with missing/invalid ts: "+e.url);const t=e.url+" "+e.ts;if("warc/revisit"===e.mime){if(this.dupeSet.has(t))return void console.warn("Skipping duplicate revisit, prevent overriding non-revisit")}else this.dupeSet.add(t);this.batch.push(e)}flush(){this.batch.length>0&&this.promises.push(this.db.addResources(this.batch)),console.log(`Read ${this.count+=this.batch.length} records`),this.batch=[]}async finishIndexing(){this.flush(),this._finishLoad();try{await Promise.all(this.promises)}catch(e){console.warn(e)}this.promises=[]}_finishLoad(){}}class cr extends ar{reader;abort;loadId;sourceExtra;anyPages=!1;detectPages=!1;_lastRecord=null;metadata={};pages=[];lists=[];pageMap={};constructor(e,t=null,n=null,r=null){super(),this.reader=e,this.abort=t,this.loadId=n,this._lastRecord=null,this.metadata={},this.pageMap={},this.pages=[],this.lists=[],this.sourceExtra=r}parseWarcInfo(e){if(!e.payload)return;const t=new TextDecoder("utf-8").decode(e.payload);for(const n of t.split("\n"))if(n.startsWith("json-metadata:"))try{const e=JSON.parse(n.slice(14));if("collection"===e.type&&(this.metadata.desc=e.desc,this.metadata.title=e.title),e.pages?.length){this.pages=this.pages.concat(e.pages);for(const t of e.pages)t.ts=H(t.timestamp).getTime(),this.pageMap[t.ts+"/"+t.url]={page:t};this.anyPages=!0}e.lists?.length&&(this.lists=this.lists.concat(e.lists))}catch(e){console.log("Page Add Error",e.toString())}}index(e,t){if("warcinfo"!==e.warcType){if(this._lastRecord)return this._lastRecord.warcTargetURI!=e.warcTargetURI?(this.indexReqResponse(this._lastRecord,null,t),void(this._lastRecord=e)):void("request"===e.warcType&&"response"===this._lastRecord.warcType?(this.indexReqResponse(this._lastRecord,e,t),this._lastRecord=null):"response"===e.warcType&&"request"===this._lastRecord.warcType?(this.indexReqResponse(e,this._lastRecord,t),this._lastRecord=null):(this.indexReqResponse(this._lastRecord,null,t),this._lastRecord=e));this._lastRecord=e}else this.parseWarcInfo(e)}indexDone(e){this._lastRecord&&(this.indexReqResponse(this._lastRecord,null,e),this._lastRecord=null)}shouldIndexMetadataRecord(e){const t=e.warcTargetURI;return!!t?.startsWith("metadata://")}parseRevisitRecord(e,t){const n=e.warcTargetURI.split("#")[0],r=e.warcDate,i=r?new Date(r).getTime():Date.now();let s,o=null;if(e.httpHeaders){const r=this.parseResponseHttpHeaders(e,n,t);r&&(o=Object.fromEntries(r.headers.entries()),s=r.status)}const a=e.warcRefersToTargetURI,c=new Date(e.warcRefersToDate).getTime(),l=e.warcHeader("WARC-Refers-To-Container");let h="";return l?.endsWith(".wacz")&&(h=l,l.startsWith("file://")&&(h=h.slice(7))),a===n&&c===i?null:{url:n,ts:i,origURL:a,origTS:c,origWACZ:h,digest:e.warcPayloadDigest||null,pageId:null,respHeaders:o,status:s}}parseResponseHttpHeaders(e,t,n){let r=200,i=null,s="";const o=n?.httpHeaders?.method;if(e.httpHeaders){if(r=Number(e.httpHeaders.statusCode)||200,"OPTIONS"===o||"HEAD"===o)return null;if(i=K(e.httpHeaders.headers),s=(i.get("content-type")||"").split(";")[0],206===r&&!this.isFullRangeRequest(i))return null}else i=new Headers,i.set("content-type",e.warcContentType),i.set("content-length",String(e.warcContentLength)),s=e.warcContentType||"";return{status:r,method:o,headers:i,mime:s}}indexReqResponse(e,t,n){const r=this.parseRecords(e,t);r&&this.addResource(r)}parseRecords(e,t){switch(e.warcType){case"revisit":return this.parseRevisitRecord(e,t);case"resource":t=null;break;case"response":break;case"metadata":if(!this.shouldIndexMetadataRecord(e))return null;break;default:return null}let n=e.warcTargetURI.split("#")[0];const r=e.warcDate,i=this.parseResponseHttpHeaders(e,n,t);if(!i)return null;const{status:s,method:o,headers:a,mime:c}=i;let l,h,u=null,p=null;if(t?.httpHeaders?.headers){let e=null;try{e=new Headers(t.httpHeaders.headers);const n=e.get("cookie");n&&a.set("x-wabac-preset-cookie",n),u=t.httpHeaders.headers.get("Referer")||null}catch(t){e=new Headers,console.warn(t)}if(h=Object.fromEntries(e.entries()),"GET"!==o){const r={headers:e,method:o||"GET",url:n,postData:t.payload};Me(r)&&(l=n,n=r.url,p=t.payload)}}if(void 0===this.detectPages&&(this.detectPages=!this.anyPages),this.detectPages&&function(e,t,n){if(200!=t)return!1;if(!e.startsWith("http:")&&!e.startsWith("https:")&&!e.startsWith("blob:"))return!1;if(e.endsWith("/robots.txt"))return!1;const r=e.split("?",2);return!(2===r.length&&r[1].length>r[0].length)&&(!r[0].substring(r[0].lastIndexOf("/")+1).startsWith(".")&&(!n||"text/html"===n))}(n,s,c)){const e=n;this.addPage({url:n,date:r,title:e})}const d=r?new Date(r).getTime():Date.now(),f=Object.fromEntries(a.entries()),g=e.warcPayloadDigest||null,m=e.payload,w={url:n,ts:d,status:s,mime:c,respHeaders:f,reqHeaders:h,digest:g,payload:m,reader:m?null:e.reader,referrer:u};this.pageMap[d+"/"+n]&&m&&c.startsWith("text/")&&(this.pageMap[d+"/"+n].textPromise=async function(e,t,n,r){const i=new nr,s=[];let o=null;i.on("text",e=>{if(o)return;const t=e.text.trim();t&&s.push(t)}),i.on("startTag",e=>{!e.selfClosing&&or.includes(e.tagName)&&(o=e.tagName)}),i.on("endTag",e=>{e.tagName===o&&(o=null)}),(n||r)&&(t=await sr(t,n,r)),i.end((new TextDecoder).decode(t));const a=new Promise(e=>{i.on("end",()=>{e(s.join(" "))})});return await a}(0,m,a.get("content-encoding"),a.get("transfer-encoding")));const y=e.warcHeader("WARC-JSON-Metadata");if(y)try{w.extraOpts=JSON.parse(y)}catch(e){}const b=e.warcHeader("WARC-Identified-Payload-Type");b&&(w.extraOpts||(w.extraOpts={}),w.extraOpts.detectedCT=b);const A=e.warcHeader("WARC-Page-ID");return A&&(w.pageId=A),this.sourceExtra&&(w.source=this.sourceExtra),"GET"!==o&&l&&(w.requestUrl=l,w.method=o,w.requestBody=p||new Uint8Array([])),w}isFullRangeRequest(e){const t=e.get("content-range"),n=parseInt(e.get("content-length")||"0");return t&&t===`bytes 0-${n-1}/${n}`}filterRecord(e){return null}async load(e,t,n=0){if(t&&!n)throw new Error("totalSize is required");this.db=e;const r=new mt(this.reader);let i=0,s=0,o=0;try{for await(const a of r){if(o++,!a.warcType){console.log("skip empty record");continue}const c=self.interruptLoads;if(t&&this.loadId&&c[this.loadId])throw t(Math.round(r.offset/n*95),"Loading Canceled",r.offset,n),c[this.loadId](),this.abort&&this.abort.abort(),new ie;if(s=(new Date).getTime(),s-i>500){const e=`Processed ${o} records`;t(Math.round(r.offset/n*95),null,r.offset,n,null,e),i=s}const l=this.filterRecord(a);if("done"===l){this.abort&&this.abort.abort();break}if("skip"!==l&&("skipContent"===l?await a.skipFully():await a.readFully(),o++,this.index(a,r),this.promises.length>0)){try{await Promise.all(this.promises)}catch(e){console.warn(e.toString())}this.promises=[]}}}catch(e){if(e instanceof ie)throw e;t(Math.round(r.offset/n*95),`Sorry there was an error downloading. Please try again (${e})`,r.offset,n),console.warn(e)}return this.indexDone(r),t(95,null,r.offset,n),await this.finishIndexing(),t(100,null,n,n),this.metadata}async _finishLoad(){if(this.pages.length){for(const{page:e,textPromise:t}of Object.values(this.pageMap))if(t)try{e.text=await t}catch(e){console.warn("Error adding text: "+e.toString())}this.promises.push(this.db.addPages(this.pages))}this.lists.length&&this.promises.push(this.db.addCuratedPageLists(this.lists,"bookmarks","public"))}}class lr extends cr{constructor(e){super(e),this.detectPages=!1}addPage(){}async load(){const e=await new mt(this.reader).parse();if(!e)return null;const t=this.parseRecords(e,null);return t&&"revisit"!==e.warcType||await e.readFully(),t}}const hr="https://w3s.link/";function ur(e){const{hostname:t,protocol:n,pathname:r}=new URL(e),i=n.slice(0,-1);if(!t){const[e,...t]=r.slice(2).split("/");return{type:i,cid:e,path:"/"+t.join("/")}}return{type:i,cid:t,path:r}}async function pr(e){return yr(e)?e:br(e)?gr(e):e}async function dr(e){return new Response(e).blob()}async function*fr(e){const t=await e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)return;yield n}}finally{t.releaseLock()}}function gr(e){let t=e;t.next||(t=e[Symbol.asyncIterator]());const n=new TextEncoder;return new ReadableStream({async pull(e){const{value:r,done:i}=await t.next();if(i)await e.close();else{let t=r;"string"==typeof t&&(t=n.encode(t)),await e.enqueue(t)}}})}async function mr(e){if(!e.ok){const t=await e.text(),n=e.status;throw new Error(`HTTP Error ${n}: ${t}`)}}async function wr({url:e,file:t,fileName:n="",parameterName:r="file",fetch:i=globalThis.fetch,signal:s}){const o=new FormData,a=new Headers;Ar(e,a);const c=await async function(e){if(yr(e))return await dr(e);if(br(e)){const t=gr(e);return await dr(t)}return e instanceof Blob?e:new Blob([e])}(t);n?o.append(r,c,n):o.append(r,c);const l=await i(e,{method:"POST",body:o,headers:a,signal:s});return await mr(l),l}function yr(e){return"function"==typeof e.getReader}function br(e){return e[Symbol.asyncIterator]}function Ar(e,t){if(e.password)if(e.username){const n=`Basic ${btoa(`${unescape(e.username)}:${unescape(e.password)}`)}`;t.append("Authorization",unescape(n)),e.username="",e.password=""}else{const n=`Bearer ${e.password}`;t.append("Authorization",unescape(n)),e.password=""}}async function vr({url:e,fetch:t=globalThis.fetch,signal:n}){const r=await t(e,{method:"HEAD",signal:n});await mr(r);const i=r.headers.get("x-ipfs-datasize")||r.headers.get("Content-Length");return parseInt(i,10)}async function*_r({url:e,start:t,end:n,format:r,signal:i,fetch:s=globalThis.fetch}){const o=new Headers;Number.isInteger(t)&&(Number.isInteger(n)?o.set("Range",`bytes=${t}-${n}`):o.set("Range",`bytes=${t}-`));const a=new URL(e);r&&(o.set("Accept",`application/vnd.ipld.${r}`),o.set("cache-control","no-cache"));const c=await s(a.href,{headers:o,signal:i});await mr(c),yield*fr(c.body)}async function*Er({url:e,start:t,end:n,format:r,signal:i,gatewayURL:s=xr()}){const o=function(e,t=xr()){const{cid:n,path:r,type:i}=ur(e);return new URL(`/${i}/${n}${r}`,t)}(e,s);yield*_r({url:o,start:t,end:n,format:r,signal:i})}function xr(){if(!globalThis.location)return hr;const{pathname:e,hostname:t,protocol:n}=globalThis.location;if(e.startsWith("/ipfs/")||e.startsWith("/ipns/"))return`${n}//${t}/`;const[r,...i]=t.split(".");return 59===r.length&&i.length>=2?`${n}//${i.join(".")}/`:hr}let Sr=!1;const Ir=[5001,45001,45002,45003,45004,45005],Tr="https://api.web3.storage/",Cr="https://api.estuary.tech/",Rr="http://localhost:5001/",kr="agregore",Nr="daemon",Or="web3.storage",Br="estuary",Pr="readonly",Lr=[kr,Nr,Or,Br,Pr];class Dr{get type(){return"invalid"}async*get(e,{start:t,end:n,signal:r=null,format:i=null}={}){throw new Error("Not Implemented")}async getSize(e,t=null){throw new Error("Not Implemented")}async uploadCAR(e,t=null){throw new Error("Not Implemented")}async uploadFile(e,t,n=null){throw new Error("Not Implemented")}async clear(e,t=null){throw new Error("Not Implemented")}}async function Ur({daemonURL:e,web3StorageToken:t,web3StorageURL:n=Tr,estuaryToken:r,estuaryURL:i=Cr,publicGatewayURL:s=xr(),readonly:o=!0,timeout:a=1e3,fetch:c=globalThis.fetch}={}){const l=[],h=[];if(h.push(async function(e=globalThis.fetch){try{return await e("ipfs://localhost/"),!0}catch(e){return Sr&&console.warn("Unable to detect Agregore",e),!1}}(c).then(e=>e&&l.push({type:kr,fetch:c}))),h.push(async function(){const e=Ir.map(e=>`http://localhost:${e}`);try{const n=await Promise.any(e.map(e=>qr(e).then(t=>{if(t)return e;throw new Error("Not found")})));return!!n&&(zr&&!Vr&&(t=n,Vr=!0,globalThis.chrome.webRequest.onBeforeSendHeaders.addListener(e=>{const{requestHeaders:n}=e;for(const e of n)if("origin"===e.name.toLowerCase())return e.value=t,{requestHeaders:n};return e.requestHeaders.push({name:"Origin",value:t}),{requestHeaders:n}},{urls:[t+"/*"]},["blocking","requestHeaders","extraHeaders"])),n)}catch{return!1}var t}().then(e=>e&&l.push({type:Nr,url:e,fetch:c}))),e&&h.push(qr(e,a,c).then(t=>t&&l.push({type:Nr,url:e,fetch:c}))),r){const e=i,t=r;l.push({type:Br,url:e,authorization:t,fetch:c,publicGatewayURL:s})}if(t){const e=n,r=t;l.push({type:Or,url:e,authorization:r,fetch:c,publicGatewayURL:s})}return o&&s&&l.push({type:Pr,fetch:c,publicGatewayURL:s}),await Promise.allSettled(h),l}async function Fr({chooseOrder:e=Lr,...t}={}){const n=function(e,t=Lr){const n=e.filter(({type:e})=>t.includes(e)).sort(({type:e},{type:n})=>t.indexOf(e)-t.indexOf(n))[0];if(!n)throw new Error("Unable to find valid type");return n}(await Ur(t),e);return async function(e){const{type:t}=e;let n=null;if(t===kr)n=new Hr(e.fetch||globalThis.fetch);else if(t===Nr)n=new Qr(e.url);else if(t===Or)n=new Wr(e.authorization,e.url,e.publicGatewayURL);else if(t===Br)n=new jr(e.authorization,e.url,e.publicGatewayURL);else{if(t!==Pr)throw new TypeError(`Unknown API type: ${t}.`);n=new Mr(e.publicGatewayURL)}return n}(n)}class Mr extends Dr{constructor(e=xr()){super(),this.gatewayURL=e}get type(){return Pr}async*get(e,{start:t,end:n,signal:r=null,format:i=null}={}){yield*Er({url:e,start:t,end:n,format:i,gatewayURL:this.gatewayURL,signal:r})}async getSize(e,t=null){const{cid:n,path:r,type:i}=ur(e);return vr({url:new URL(`/${i}/${n}${r}`,this.gatewayURL),signal:t})}}class jr extends Mr{constructor(e,t=Cr,n=xr()){super(n),this.authorization=e,this.url=t}get type(){return Br}async uploadCAR(e,t=null){throw new Error("Not Implemented")}async uploadFile(e,t,n=null){const r=new URL("/content/add",this.url);r.password=this.authorization;const i=await wr({url:r,file:e,fileName:t,parameterName:"data",signal:n}),{cid:s}=await i.json();return`ipfs://${s}/`}}class Hr extends Dr{constructor(e=globalThis.fetch){super(),this.fetch=e}get type(){return kr}async*get(e,{start:t,end:n,signal:r=null,format:i=null}={}){const{fetch:s}=this;yield*_r({url:e,start:t,end:n,format:i,fetch:s,signal:r})}async getSize(e,t=null){const{fetch:n}=this;return vr({url:e,fetch:n,signal:t})}async uploadCAR(e,t=null){const n=await pr(e),{fetch:r}=this,i=await r("ipfs://localhost",{method:"POST",headers:{"Content-Type":"application/vnd.ipld.car"},signal:t,body:n});return await mr(i),(await i.text()).split("\n")}async uploadFile(e,t=null){const n=await pr(e),{fetch:r}=this,i=await r("ipfs://localhost",{method:"POST",headers:{"Content-Type":"application/octet-stream"},signal:t,body:n});return await mr(i),i.headers.get("Location")}}class Wr extends Mr{constructor(e,t=Tr,n=xr()){super(n),this.authorization=e,this.url=t}get type(){return Or}async uploadCAR(e,t=null){const n=new URL("/car",this.url);n.password=this.authorization;const r=await async function({url:e,fileIterator:t,signal:n}){const r=new Headers;r.set("Content-Type","application/octet-stream"),Ar(e,r);const i=await pr(t),s=await fetch(e,{method:"POST",signal:n,body:i,headers:r,duplex:"half"});return await mr(s),s}({url:n,fileIterator:e,signal:t});return(await r.text()).split("\n").filter(e=>e).map(e=>{const{cid:t}=JSON.parse(e);return`ipfs://${t}/`})}async uploadFile(e,{fileName:t="",signal:n=null}={}){const r=new URL("/upload",this.url);r.password=this.authorization;const i=await wr({url:r,file:e,fileName:t,signal:n}),{cid:s}=await i.json();return`ipfs://${s}/`}}class Qr extends Dr{constructor(e=Rr){super(),this.url=e}get type(){return Nr}async*get(e,{start:t,end:n,signal:r=null,format:i=null}={}){const{cid:s,path:o,type:a}=ur(e),c=new URL(`/api/v0/cat?arg=/${a}/${s}${o}`,this.url);if(t&&c.searchParams.set("offset",t),n&&c.searchParams.set("length",n-(t||0)+1),i)throw new Error("Format is unsupported on Kubo Daemons for now");const l=await fetch(c,{method:"POST",signal:r});await mr(l),yield*fr(l.body)}async getSize(e,t=null){try{const{cid:n,path:r,type:i}=ur(e),s=`/api/v0/file/ls?arg=/${i}/${n}${r}&size=true`,o=new URL(s,this.url),a=await fetch(o,{method:"POST",signal:t});await mr(a);const{Objects:c}=await a.json(),[{Size:l}]=Object.values(c);return l}catch(n){return Sr&&console.warn(n),this._getSizeWithDag(e,t)}}async _getSizeWithDag(e,t=null){const{cid:n,path:r,type:i}=ur(e),s=new URL(`/api/v0/dag/stat?arg=/${i}/${n}${r}`,this.url),o=await fetch(s,{method:"POST",signal:t});await mr(o);const{Size:a}=await o.json();return parseInt(a,10)}async _pin(e,t=null){const{cid:n,path:r,type:i}=ur(e),s=new URL(`/api/v0/pin/add?arg=/${i}/${n}${r}`,this.url),o=await fetch(s,{method:"POST",signal:t});await mr(o)}async _unpin(e,t=null){const{cid:n,path:r,type:i}=ur(e),s=new URL(`/api/v0/pin/rm?arg=/${i}/${n}${r}`,this.url),o=await fetch(s,{method:"POST",signal:t});await mr(o)}async clear(e,t=null){return this._unpin(e,t)}async uploadCAR(e,t=null){const n=new URL("/api/v0/dag/import?allow-big-block=true&pin-roots=true",this.url),r=await wr({url:n,file:e,signal:t});return(await r.text()).split("\n").filter(e=>e).map(e=>{const{Root:t}=JSON.parse(e);return`ipfs://${t.Cid["/"]}/`})}async uploadFile(e,t="",n=null){const r=new URL("/api/v0/add?pin=true&cid-version=1&inline=false&raw-leaves=true",this.url),i=e.name&&e instanceof Blob;(t||i)&&r.searchParams.set("wrap-with-directory","true");const s=await wr({url:r,file:e,fileName:t,signal:n}),o=await s.text(),[a]=o.split("\n"),{Hash:c}=JSON.parse(a),l=`ipfs://${c}/`;return await this._pin(l,n),l}}let Vr=!1;const zr=!!(globalThis&&globalThis.chrome&&globalThis.chrome.webRequest&&globalThis.chrome.webRequest.onBeforeSendHeaders&&globalThis.chrome.webRequest.onBeforeSendHeaders.addListener);async function qr(e=Rr,t=1e3,n=globalThis.fetch){try{const r=new AbortController,{signal:i}=r;setTimeout(()=>r.abort(),t);const s=await n(new URL("/api/v0/version",e),{method:"POST",signal:i});return!!s.ok||!(!s.status||404===s.status)}catch(t){return Sr&&console.warn("Unable to detect Kubo Daemon",t,e),!1}}let Gr=null;async function Kr(e){return Gr||(Gr=await Fr(e)),Gr}const Xr="https://helper-proxy.webrecorder.workers.dev";async function Yr(e){const{url:t}=e;if(e.extra?.arrayBuffer)return new ei(e.extra.arrayBuffer);const n=t.split(":",1)[0];switch(n){case"blob":return new ti(e);case"http":case"https":return new Zr(e);case"file":return new ni(e);case"googledrive":return new $r(e);case"ipfs":return new ri(e)}try{if(self.location&&n===self.location.protocol.split(":")[0])return new Zr(e)}catch(e){}try{await fetch(`${n}://localhost`,{method:"HEAD"});try{new URL(t)}catch(n){let r=t.replace(":\\","//");r=r.replaceAll("\\","/"),e.url=r}return new Zr(e)}catch(e){}throw new Error("Invalid URL: "+t)}class Jr{canLoadOnDemand=!0;headers={};length=null;canDoNegativeRange=!1;constructor(e){this.canLoadOnDemand=e}async getRangeFromEnd(e,t,n){if(this.canDoNegativeRange)return await this.getRange(0,-e,t,n);{const r=await this.getLength();return e=Math.min(e,r),await this.getRange(r-e,e,t,n)}}getFullBuffer(){return null}}class Zr extends Jr{url;length;isValid=!1;ipfsAPI=null;loadingIPFS=null;arrayBuffer=null;constructor({url:e,headers:t,length:n=null,canLoadOnDemand:r=!1}){super(r),this.url=e,this.headers=t||{},this.length=n,this.canLoadOnDemand=r,this.canDoNegativeRange=!0}async doInitialFetch(e,t=!1){const n=new Headers(this.headers);t||n.set("Range","bytes=0-"),this.isValid=!1;let r=null,i=null;if(e)try{i=await this.retryFetch(this.url,{headers:n,method:"HEAD",cache:"no-store"}),200!==i.status&&206!=i.status||(this.canLoadOnDemand=206===i.status||"bytes"===i.headers.get("Accept-Ranges"),this.isValid=!0)}catch(e){}if(!this.isValid||!this.canLoadOnDemand){r=new AbortController;const t=r.signal;i=await this.retryFetch(this.url,{headers:n,signal:t,cache:"no-store"}),this.canLoadOnDemand=206===i.status||"bytes"===i.headers.get("Accept-Ranges"),this.isValid=206===i.status||200===i.status,e&&(r.abort(),r=null)}if(null===this.length&&i&&(this.length=Number(i.headers.get("Content-Length")),this.length||206!==i.status||this.parseLengthFromContentRange(i.headers)),null===this.length)try{const e=await fetch(`${Xr}/c/${this.url}`),t=await e.json();t.size&&(this.length=t.size)}catch(e){console.log("Error fetching from helper: "+e)}if(this.length=Number(this.length||0),!this.canLoadOnDemand&&this.isValid&&this.length>0&&this.length<=B){const e=await this.retryFetch(this.url,{headers:n,cache:"no-store"});e.ok&&(this.arrayBuffer=new ei(new Uint8Array(await e.arrayBuffer())),this.canLoadOnDemand=!0,this.canDoNegativeRange=!1)}return{response:i,abort:r}}async getLength(){if(null===this.length){const{abort:e}=await this.doInitialFetch(!0);e&&e.abort()}return this.length||0}async getRange(e,t,n=!1,r=null){if(this.arrayBuffer)return await this.arrayBuffer.getRange(e,t,n);const i=new Headers(this.headers);t<0?i.set("Range",`bytes=${t}`):i.set("Range",`bytes=${e}-${e+t-1}`);const s={signal:r,headers:i,cache:"no-store"};let o;try{o=await this.retryFetch(this.url,s)}catch(e){throw new te(this.url)}if(206!=o.status){if(t<0){const e=await this.getLength();return-t>e&&(t=-e),await this.getRange(e+t,-t,n,r)}const e={url:this.url,status:o.status,resp:o};throw 401===o.status?new ne(e):403==o.status?new re(e):new te(e)}return null===this.length&&this.parseLengthFromContentRange(o.headers),n?o.body||new Uint8Array:new Uint8Array(await o.arrayBuffer())}async retryFetch(e,t){let n=1e3;for(let r=0;r<20;r++){const r=await fetch(e,t);if(429!==r.status&&503!==r.status)return r;await oe(n),n+=2e3}throw new Error("retryFetch failed")}parseLengthFromContentRange(e){const t=e.get("Content-Range");if(t){const e=t.split("/");2===e.length&&(this.length=parseInt(e[1]))}}getFullBuffer(){return this.arrayBuffer?.getFullBuffer()??null}}class $r extends Jr{fileId;apiUrl;length;publicUrl=null;isValid=!1;constructor({url:e,headers:t,size:n,extra:r}){super(!0),this.fileId=e.slice(14),this.apiUrl=`https://www.googleapis.com/drive/v3/files/${this.fileId}?alt=media`,this.headers=t||{},r?.publicUrl&&(this.publicUrl=r.publicUrl),this.length=n||0}async getLength(){return this.length}async doInitialFetch(e){let t=null,n=null;if(this.publicUrl){t=new Zr({url:this.publicUrl,length:this.length});try{n=await t.doInitialFetch(e)}catch(e){}if(!t.isValid&&(n?.abort&&n.abort.abort(),await this.refreshPublicUrl())){t=new Zr({url:this.publicUrl,length:this.length});try{n=await t.doInitialFetch(e)}catch(e){}!t.isValid&&n?.abort&&n.abort.abort()}}return t?.isValid||(this.publicUrl=null,t=new Zr({url:this.apiUrl,headers:this.headers,length:this.length}),n=await t.doInitialFetch(e)),this.isValid=t.isValid,!this.length&&t.length&&(this.length=t.length),n}async getRange(e,t,n=!1,r){let i=null;if(this.publicUrl){i=new Zr({url:this.publicUrl,length:this.length});try{return await i.getRange(e,t,n,r)}catch(s){if(await this.refreshPublicUrl()){i=new Zr({url:this.publicUrl,length:this.length});try{return await i.getRange(e,t,n,r)}catch(e){}}}this.publicUrl=null}i=new Zr({url:this.apiUrl,headers:this.headers,length:this.length});let s=50;for(;s<2e3;)try{return await i.getRange(e,t,n,r)}catch(e){if(e instanceof re&&e.info.resp?.headers.get("content-type").startsWith("application/json")){const t=await e.info.resp.json();if(t.error?.errors&&"userRateLimitExceeded"===t.error.errors[0].reason){console.log(`Exponential backoff, waiting for: ${s}`),await oe(s),s*=2;continue}}throw e}throw new te("not found")}async refreshPublicUrl(){try{const e=await fetch(`${Xr}/g/${this.fileId}`),t=await e.json();if(t.url)return this.publicUrl=t.url,!0}catch(e){}return!1}}class ei extends Jr{arrayBuffer;size;constructor(e){super(!0),this.arrayBuffer=e,this.size=e.length,this.length=this.size}get isValid(){return!!this.arrayBuffer}async getLength(){return this.size}async doInitialFetch(e=!1){const t=e?null:si(this.arrayBuffer);return{response:new Response(t),abort:null}}async getRange(e,t,n=!1){const r=this.arrayBuffer.slice(e,e+t);return n?si(r):r}getFullBuffer(){return this.arrayBuffer}}class ti extends Jr{url;blob;size;arrayBuffer=null;constructor({url:e,blob:t=null,size:n=null}){super(!0),this.url=e,this.blob=t,this.size=this.blob?this.blob.size:n||0,this.length=this.size}get isValid(){return!!this.blob}async getLength(){if(!this.blob?.size){const e=await fetch(this.url);this.blob=await e.blob(),this.size=this.blob.size,this.length=this.size}return this.size}async doInitialFetch(e=!1){if(!this.blob)try{const e=await fetch(this.url);this.blob=await e.blob(),this.size=this.blob.size,this.length=this.size}catch(e){throw console.warn(e),e}const t=this.blob.arrayBuffer?await this.blob.arrayBuffer():await this._getArrayBuffer();this.arrayBuffer=new Uint8Array(t);const n=e?null:si(this.arrayBuffer);return{response:new Response(n),abort:null}}async getRange(e,t,n=!1){this.arrayBuffer||await this.doInitialFetch(!0);const r=this.arrayBuffer.slice(e,e+t);return n?si(r):r}async _getArrayBuffer(){return new Promise((e,t)=>{const n=new FileReader;n.onloadend=()=>{n.result instanceof ArrayBuffer?e(n.result):t(n.result)},this.blob&&n.readAsArrayBuffer(this.blob)})}}class ni extends Jr{url;file;size;fileHandle;constructor({blob:e,size:t,extra:n,url:r}){super(!0),this.url=r,this.file=null,this.size=e?e.size:t||0,this.length=this.size,this.fileHandle=n.fileHandle}get isValid(){return!!this.file}async getLength(){return void 0===this.size&&await this.initFileObject(),this.size}async initFileObject(){const e={mode:"read"};if("granted"!==await this.fileHandle.queryPermission(e)&&"granted"!==await this.fileHandle.requestPermission(e))throw new ne({fileHandle:this.fileHandle});this.file=await this.fileHandle.getFile(),this.size=this.file.size,this.length=this.size}async doInitialFetch(e=!1){this.file||await this.initFileObject();const t=e?null:this.file.stream();return{response:new Response(t),abort:null}}async getRange(e,t,n=!1){this.file||await this.initFileObject();const r=this.file.slice(e,e+t);return n?r.stream():new Uint8Array(await r.arrayBuffer())}}class ri extends Jr{url;opts;length;isValid=!1;constructor({url:e,headers:t,...n}){super(!0),this.url=e,this.opts=n,this.headers=t||{},this.length=null}async getLength(){return null===this.length&&await this.doInitialFetch(!0),this.length}async doInitialFetch(e){const t=await Kr(this.opts);try{this.length=await t.getSize(this.url),this.isValid=null!==this.length}catch(e){console.warn(e),this.length=null,this.isValid=!1}let n=206;this.isValid||(n=404);const r=new AbortController,i=r.signal;let s;return s=e||!this.isValid?new Uint8Array([]):ii(t.get(this.url,{signal:i})),{response:new Response(s,{status:n}),abort:r}}async getRange(e,t,n=!1,r=null){const i=(await Kr(this.opts)).get(this.url,{start:e,end:e+t-1,signal:r});if(n)return ii(i);{const e=[];let t=0;for await(const n of i)e.push(n),t+=n.byteLength;return Qe(e,t)}}}function ii(e){return new ReadableStream({start:async t=>{try{for await(const n of e)t.enqueue(n)}catch(e){console.log(e)}t.close()}})}function si(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}class oi extends Error{cdx;constructor(e,t){super(e),this.cdx=t}}class ai extends Ft{noCache;streamMap;constructor(e,t=!1){super(e),this.noCache=t,this.useRefCounts=!t,this.streamMap=new Map}isSameUrl(e,t,n){if(e===t)return!0;const r=decodeURIComponent(e),i=decodeURIComponent(t);return r===i||!(!n||!i.startsWith(r))}async loadPayload(e,t){let n=await super.loadPayload(e,t);if(n&&e.respHeaders&&("warc/revisit"!==e.mime||e.status>=300&&e.status<400))return n;const r=this.streamMap.get(e.url);if(r)return console.log(`Reuse stream for ${e.url}`),new ui(r);const{remote:i,hasher:s}=await this.loadRecordFromSource(e);if(!i)return console.log(`No WARC Record Loaded for: ${e.url}`),null;if(!this.isSameUrl(i.url,e.url,e.method))return console.log(`Wrong url: expected ${e.url}, got ${i.url}`),null;const o=e.origTS||e.ts;if(i.ts!==o&&1e3*Math.floor(i.ts/1e3)!==o)return console.log(`Wrong timestamp: expected ${o}, got ${i.ts}`),null;if(i.digest!==e.digest&&e.digest&&i.digest){const t=i.digest.split(":"),n=e.digest.split(":");2===t.length&&2===n.length&&n[1]===t[1]?e.digest=t[0]+":"+n[1]:console.log(`Wrong digest: expected ${e.digest}, got ${i.digest}`)}if(i.origURL){if(!n&&e.status>=300&&e.status<400&&i.respHeaders){if(e.respHeaders=i.respHeaders,!this.noCache)try{await this.db.put("resources",e)}catch(e){console.log(e)}return new Uint8Array([])}const r={...t,noRevisits:!0};i.origWACZ&&(r.waczname=i.origWACZ);const s=await this.lookupUrl(i.origURL,i.origTS||0,r);if(!s)throw new oi(`Encountered revisit record but unable to locate original record for ${i.origURL}`,e);const o=t.depth||0;if(!n&&(o<2?n=await this.loadPayload(s,{...t,depth:o+1}):console.warn("Avoiding revisit lookup loop for: "+JSON.stringify(i)),!n))return null;if(i.respHeaders&&s.respHeaders?(e.respHeaders=i.respHeaders,s.respHeaders["content-length"]&&(e.respHeaders["content-length"]=s.respHeaders["content-length"])):e.respHeaders=s.respHeaders,e.mime=s.mime,e.origTS=s.ts,e.origURL=s.url,e.source=s.source,e.digest=s.digest,s.extraOpts&&(e.extraOpts=s.extraOpts),!this.noCache){delete e.payload;try{await this.db.put("resources",e)}catch(e){console.log(e)}s.digest!==i.digest&&i.digest&&n instanceof Uint8Array&&await this.commitPayload(n,i.digest)}return n}const a=i.digest,c=e.source.length>=25e6;if(!this.noCache&&!c&&i.reader&&a&&(i.reader=new di(this,i.reader,a,e.url,this.streamMap,s||null,e.recordDigest,e.source)),c&&console.log("Not cacheing, too big: "+e.url),n=i.payload||null,!n&&!i.reader)return null;try{n&&!this.noCache&&!c&&a&&await this.commitPayload(n,a)}catch(t){console.warn(`Payload Update Error: ${e.url}`),console.warn(t)}if(!(e.respHeaders&&e.digest||(e.respHeaders=i.respHeaders,e.digest=a,i.extraOpts&&(e.extraOpts=i.extraOpts),this.noCache||c)))try{await this.db.put("resources",e)}catch(t){console.warn(`Resource Update Error: ${e.url}`),console.warn(t)}return n||i.reader||null}async commitPayload(e,t){if(!e||0===e.length)return;const n=this.db.transaction(["payload","digestRef"],"readwrite");try{if(n.objectStore("payload").put({payload:e,digest:t}),this.useRefCounts){const r=await n.objectStore("digestRef").get(t);r&&(r.size=e.length,n.objectStore("digestRef").put(r))}await n.done}catch(e){console.warn("Payload Commit Error: "+e)}}}class ci extends ai{async loadRecordFromSource(e){const t=await this.loadSource(e.source),n=new lr(t);return{remote:await n.load()}}}class li extends ci{loader;constructor(e,t,n=!1){super(e,n),this.loader=t}updateHeaders(e){this.loader.headers=e}async loadSource(e){const{start:t,length:n}=e;return await this.loader.getRange(t,n,!0)}}class hi extends ci{remoteUrlPrefix;headers;constructor(e,t,n,r=!1){super(e,r),this.remoteUrlPrefix=t,this.headers=n}updateHeaders(e){this.headers=e}async loadSource(e){const{start:t,length:n}=e,r=new Headers(this.headers),i=new URL(e.path,this.remoteUrlPrefix).href,s=await Yr({url:i,headers:r});return await s.getRange(t,n,!0)}}class ui extends $e{chunkstore;offset;size;constructor(e){super(),this.chunkstore=e,this.offset=0,this.size=this.chunkstore.totalLength}setLimitSkip(e=-1,t=0){this.offset=t,e>0&&(this.size=e)}setRangeAll(e){this.size=e}async*[Symbol.asyncIterator](){yield*this.chunkstore.getChunkIter()}getReadableStream(){console.log(`Offset: ${this.offset}, Size: ${this.size}`);const e=this.chunkstore.getChunkIter();return new tt(e,this.size,this.offset).getReadableStream()}async readlineRaw(e){throw new Error("Method not implemented.")}}class pi{chunks;size=0;done=!1;totalLength;nextChunk;_nextResolve=()=>{};constructor(e){this.chunks=[],this.size=0,this.done=!1,this.totalLength=e,this.nextChunk=new Promise(e=>this._nextResolve=e)}add(e){this.chunks.push(e),this.size+=e.byteLength,this._nextResolve(!0),this.nextChunk=new Promise(e=>this._nextResolve=e)}concatChunks(){return this._nextResolve(!1),this.done=!0,Qe(this.chunks,this.size)}async*getChunkIter(){for(const e of this.chunks)yield e;let e=this.chunks.length;for(;!this.done&&await this.nextChunk;)for(;e<this.chunks.length;e++)yield this.chunks[e]}}class di extends $e{db;reader;digest;url;commit=!0;fullbuff=null;hasher;expectedHash;source;isRange=!1;totalLength=-1;fixedSize=0;streamMap;constructor(e,t,n,r="",i,s,o,a){super(),this.db=e,this.reader=t,this.digest=n,this.url=r,this.commit=!0,this.fullbuff=null,this.hasher=s,this.expectedHash=o,this.source=a,this.isRange=!1,this.totalLength=-1,this.streamMap=i}setRangeAll(e){this.isRange=!0,this.totalLength=e}setLimitSkip(e=-1,t=0){this.isRange=!0,2!==e||0!==t?((-1!=e||t>0)&&(this.commit=!1),this.reader.setLimitSkip(e,t)):this.fixedSize=2}async*[Symbol.asyncIterator](){let e=null;this.commit&&(e=new pi(this.totalLength),this.isRange&&(console.log(`Store stream for ${this.url}, ${this.totalLength}`),this.streamMap.set(this.url,e)));for await(const t of this.reader)e&&e.add(t),yield t;if(0!==this.reader.limit)console.warn(`Expected payload not consumed, ${this.reader.limit} bytes left`);else{if(!this.isRange&&this.hasher&&this.expectedHash&&this.source){const e=this.hasher.getHash(),{path:t,start:n,length:r}=this.source,i=`${t}:${n}-${r}`;this.db.addVerifyData(i,this.expectedHash,e)}this.commit&&(this.fullbuff=e.concatChunks(),await this.db.commitPayload(this.fullbuff,this.digest))}this.commit&&this.isRange&&(this.streamMap.delete(this.url),console.log(`Delete stream for ${this.url}`))}async _consumeIter(e){for await(const t of e);}async readFully(){return this.fullbuff||await this._consumeIter(this),this.fullbuff}getReadableStream(){const e=super.getReadableStream();if(!this.commit)return e;const t=e.tee();return this._consumeIter(et.fromReadable(t[1].getReader())),this.fixedSize?this.getFixedSizeReader(t[0].getReader(),this.fixedSize):t[0]}getFixedSizeReader(e,t){return new ReadableStream({async start(n){const{value:r,done:i}=await e.read();i||n.enqueue(r.slice(0,t)),n.close()}})}async readlineRaw(e){throw new Error("Method not implemented.")}}var fi=n(6454);function gi(e){let t,n;const r=e.response,i=r?.extraOpts;if(i&&(t=i.adaptive_max_resolution||i.maxRes,n=i.adaptive_max_bandwidth||i.maxBand,t&&n))return{maxRes:t,maxBand:n};let s;return s=e.response&&!e.response.isLive?{maxRes:921600,maxBand:2e6}:{maxRes:412800,maxBand:1e6},e.save&&(e.save.maxRes=s.maxRes,e.save.maxBand=s.maxBand),s}function mi(e,t){const n=/#EXT-X-STREAM-INF:(?:.*[,])?BANDWIDTH=([\d]+)/,r=/RESOLUTION=([\d]+)x([\d]+)/,{maxRes:i,maxBand:s}=gi(t),o=i||s,a=[];let c=0;const l=[],h=e.trimEnd().split("\n");for(const e of h){const s=e.match(n);if(!s){t.rewriteUrl&&!e.startsWith("#")&&(h[c]=t.rewriteUrl(e)),c+=1;continue}a.push(c);const o=Number(s[1]),u=e.match(r),p=u?Number(u[1])*Number(u[2]):0;l.push({value:i?p:o,index:c}),c+=1}l.sort((e,t)=>e.value-t.value);let u=null,p=null;for(const e of l){if(e.value>o)break;p!=e.value&&(p=e.value,u=e.index)}null===u&&l.length>0&&(u=l[0].index),a.reverse();for(const e of a)e!==u&&h.splice(e,2);return h.join("\n")}const wi={ignoreAttributes:!1,removeNSPrefix:!1,format:!1,suppressEmptyNode:!0,suppressBooleanAttributes:!1};function yi(e,t,n){try{return function(e,t,n){const r=new fi.XMLParser(wi).parse(e),{maxRes:i,maxBand:s}=gi(t);let o,a=null,c=0,l=0;o=Array.isArray(r.MPD.Period.AdaptationSet)?r.MPD.Period.AdaptationSet:[r.MPD.Period.AdaptationSet];for(const e of o){let t;a=null,c=0,l=0,t=Array.isArray(e.Representation)?e.Representation:[e.Representation];for(const e of t){const t=Number(e["@_width"]||"0")*Number(e["@_height"]||"0"),n=Number(e["@_bandwidth"]||"0");t&&i&&t<=i?t>c&&(c=t,l=n,a=e):n<=s&&n>l&&(c=t,l=n,a=e)}a&&Array.isArray(n)&&n.push(a["@_id"]),a&&(e.Representation=[a])}const h=new fi.XMLBuilder(wi).build(r).trim();return h.slice(0,5).toLowerCase().startsWith("<?xml")?h:"<?xml version='1.0' encoding='UTF-8'?>\n"+h}(e,t,n)}catch(t){return console.log(t),e}}const bi=[{contains:["youtube.com","youtube-nocookie.com"],rxRules:[[/ytplayer.load\(\);/,xi('ytplayer.config.args.dash = "0"; ytplayer.config.args.dashmpd = ""; {0}')],[/yt\.setConfig.*PLAYER_CONFIG.*args":\s*{/,xi('{0} "dash": "0", dashmpd: "", ')],[/(?:"player":|ytplayer\.config).*"args":\s*{/,xi('{0}"dash":"0","dashmpd":"",')],[/yt\.setConfig.*PLAYER_VARS.*?{/,xi('{0}"dash":"0","dashmpd":"",')],[/ytplayer.config={args:\s*{/,xi('{0}"dash":"0","dashmpd":"",')],[/"0"\s*?==\s*?\w+\.dash&&/m,xi("1&&")]]},{contains:["player.vimeo.com/video/"],rxRules:[[/^\{.+\}$/,function(e){let t;try{t=JSON.parse(e)}catch(t){return e}if(t?.request?.files){const e=t.request.files;if("object"==typeof e.progressive&&e.progressive.length)return e.dash&&(e.__dash=e.dash,delete e.dash),e.hls&&(e.__hls=e.hls,delete e.hls),JSON.stringify(t)}return e.replace(/query_string_ranges=1/g,"query_string_ranges=0")}]]},{contains:["master.json?query_string_ranges=0","master.json?base64"],rxRules:[[/^\{.+\}$/,function(e,t){if(!t)return e;let n=null;const r=Ii(t);try{n=JSON.parse(e),console.log("manifest",n)}catch(t){return e}function i(e,t,n){if(!e)return null;let r=null,i=0;for(const s of e)s.mime_type==n&&s.bitrate>i&&s.bitrate<=t&&(i=s.bitrate,r=s);return r?[r]:e}return n.video=i(n.video,r,"video/mp4"),n.audio=i(n.audio,r,"audio/mp4"),JSON.stringify(n)}]]},{contains:["facebook.com/","fbsbx.com/"],rxRules:[[/"dash_manifests.*?,"failure_reason":null}]/,function(e,t){const n=e.indexOf("\\u003C?xml"),r=e.indexOf("/MPD>",n)+5;if(r<5)return e;let i=yi(JSON.parse('"'+e.slice(n,r)+'"'),t);i=JSON.stringify(i).replaceAll("<","\\u003C").slice(1,-1);const s=e.slice(0,n)+i+e.slice(r),o=Math.max(0,e.length-s.length);return s+" ".repeat(o)}],[/"playlist/,Si('"playli__')],[/"debugNoBatching\s?":(?:false|0)/,Si('"debugNoBatching":1')],[/"bulkRouteFetchBatchSize\s?":(?:[^{},]+)/,Si('"bulkRouteFetchBatchSize":1')],[/"maxBatchSize\s?":(?:[^{},]+)/,Si('"maxBatchSize":1')]]},{contains:["instagram.com/"],rxRules:[[/"is_dash_eligible":(?:true|1)/,Si('"is_dash_eligible":0')],[/"debugNoBatching\s?":(?:false|0)/,Si('"debugNoBatching":1')],[/"bulkRouteFetchBatchSize\s?":(?:[^{},]+)/,Si('"bulkRouteFetchBatchSize":1')],[/"maxBatchSize\s?":(?:[^{},]+)/,Si('"maxBatchSize":1')]]},{contains:["api.twitter.com/2/","twitter.com/i/api/2/","twitter.com/i/api/graphql/","api.x.com/2/","x.com/i/api/2/","x.com/i/api/graphql/"],rxRules:[[/"video_info":.*?}]}/,Ti('"video_info":')]]},{contains:["cdn.syndication.twimg.com/tweet-result"],rxRules:[[/"video":.*?viewCount":\d+}/,Ti('"video":')]]},{contains:["/vqlweb.js"],rxRules:[[/\b\w+\.updatePortSize\(\);this\.updateApplicationSize\(\)(?![*])/gim,xi("/*{0}*/")]]}],Ai=' ;Object.defineProperty(MediaSource, "isTypeSupported", {value: () => false, configurable: false, writable: false});',vi=[{contains:["youtube.com","youtube-nocookie.com"],rxRules:[[/[^"]<head.*?>/,e=>`\n ${e}<script>${Ai}<\/script>\n `]]},...bi],_i=[{contains:/video.*fbcdn.net/,start:"bytestart",end:"byteend"}];function Ei(e){if(!e)return null;for(const t of _i){const{contains:n,start:r,end:i}=t;if(e.match(n))return{start:r,end:i}}return null}function xi(e){return t=>e.replace("{0}",t)}function Si(e){return t=>{const n=Math.max(0,t.length-e.length);return e+" ".repeat(n)}}function Ii(e){let t=5e6;const n=e.response,r=n?.extraOpts;return e.save?e.save.maxBitrate=t:r?.maxBitrate&&(t=r.maxBitrate),t}function Ti(e){return(t,n)=>{if(!n)return t;const r=t;try{const r=/([\d]+)x([\d]+)/,i=Ii(n);t=t.slice(e.length);const s=JSON.parse(t);let o=null,a=0;for(const e of s.variants)if(!(e.content_type&&"video/mp4"!==e.content_type||e.type&&"video/mp4"!==e.type))if(e.bitrate&&e.bitrate>a&&e.bitrate<=i)o=e,a=e.bitrate;else if(e.src){const t=r.exec(e.src);if(t){const n=Number(t[1])*Number(t[2]);n>a&&(a=n,o=e)}}return o&&(s.variants=[o]),e+JSON.stringify(s)}catch(e){return console.warn("rewriter error: ",e),r}}}class Ci{rwRules;RewriterCls;rewriters=new Map;defaultRewriter;constructor(e,t){this.rwRules=t||bi,this.RewriterCls=e,this._initRules()}_initRules(){this.rewriters=new Map;for(const e of this.rwRules)e.rxRules&&this.rewriters.set(e,new this.RewriterCls(e.rxRules));this.defaultRewriter=new this.RewriterCls}getCustomRewriter(e){for(const t of this.rwRules)if(t.contains)for(const n of t.contains)if(e.indexOf(n)>=0){const e=this.rewriters.get(t);if(e)return e}return null}getRewriter(e){return this.getCustomRewriter(e)||this.defaultRewriter}}class Ri{rules;rx=null;constructor(e){this.rules=e||null,this.rules&&this.compileRules()}compileRules(){let e="";if(!this.rules)return;for(const t of this.rules)e&&(e+="|"),e+=`(${t[0].source})`;const t=`(?:${e})`;this.rx=new RegExp(t,"gm")}doReplace(e,t,n){const r=t[t.length-2],i=t[t.length-1];for(let e=0;e<this.rules.length;e++){const s=t[e];if(!s)continue;const o=this.rules[e][1].call(this,s,n,r,i);if(o)return o}return console.warn(`rx no match found for ${e} - rx rule contains extra matching group?`),e}rewrite(e,t){return this.rx?e.replace(this.rx,(e,...n)=>this.doReplace(e,n,t)):e}}var ki=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],Ni=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Oi="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Bi={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Pi="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",Li={5:Pi,"5module":Pi+" export import",6:Pi+" const class extends export import super"},Di=/^in(stanceof)?$/,Ui=new RegExp("["+Oi+"]"),Fi=new RegExp("["+Oi+"‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");function Mi(e,t){for(var n=65536,r=0;r<t.length;r+=2){if((n+=t[r])>e)return!1;if((n+=t[r+1])>=e)return!0}return!1}function ji(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Ui.test(String.fromCharCode(e)):!1!==t&&Mi(e,Ni)))}function Hi(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Fi.test(String.fromCharCode(e)):!1!==t&&(Mi(e,Ni)||Mi(e,ki)))))}var Wi=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function Qi(e,t){return new Wi(e,{beforeExpr:!0,binop:t})}var Vi={beforeExpr:!0},zi={startsExpr:!0},qi={};function Gi(e,t){return void 0===t&&(t={}),t.keyword=e,qi[e]=new Wi(e,t)}var Ki={num:new Wi("num",zi),regexp:new Wi("regexp",zi),string:new Wi("string",zi),name:new Wi("name",zi),privateId:new Wi("privateId",zi),eof:new Wi("eof"),bracketL:new Wi("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new Wi("]"),braceL:new Wi("{",{beforeExpr:!0,startsExpr:!0}),braceR:new Wi("}"),parenL:new Wi("(",{beforeExpr:!0,startsExpr:!0}),parenR:new Wi(")"),comma:new Wi(",",Vi),semi:new Wi(";",Vi),colon:new Wi(":",Vi),dot:new Wi("."),question:new Wi("?",Vi),questionDot:new Wi("?."),arrow:new Wi("=>",Vi),template:new Wi("template"),invalidTemplate:new Wi("invalidTemplate"),ellipsis:new Wi("...",Vi),backQuote:new Wi("`",zi),dollarBraceL:new Wi("${",{beforeExpr:!0,startsExpr:!0}),eq:new Wi("=",{beforeExpr:!0,isAssign:!0}),assign:new Wi("_=",{beforeExpr:!0,isAssign:!0}),incDec:new Wi("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new Wi("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Qi("||",1),logicalAND:Qi("&&",2),bitwiseOR:Qi("|",3),bitwiseXOR:Qi("^",4),bitwiseAND:Qi("&",5),equality:Qi("==/!=/===/!==",6),relational:Qi("</>/<=/>=",7),bitShift:Qi("<</>>/>>>",8),plusMin:new Wi("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Qi("%",10),star:Qi("*",10),slash:Qi("/",10),starstar:new Wi("**",{beforeExpr:!0}),coalesce:Qi("??",1),_break:Gi("break"),_case:Gi("case",Vi),_catch:Gi("catch"),_continue:Gi("continue"),_debugger:Gi("debugger"),_default:Gi("default",Vi),_do:Gi("do",{isLoop:!0,beforeExpr:!0}),_else:Gi("else",Vi),_finally:Gi("finally"),_for:Gi("for",{isLoop:!0}),_function:Gi("function",zi),_if:Gi("if"),_return:Gi("return",Vi),_switch:Gi("switch"),_throw:Gi("throw",Vi),_try:Gi("try"),_var:Gi("var"),_const:Gi("const"),_while:Gi("while",{isLoop:!0}),_with:Gi("with"),_new:Gi("new",{beforeExpr:!0,startsExpr:!0}),_this:Gi("this",zi),_super:Gi("super",zi),_class:Gi("class",zi),_extends:Gi("extends",Vi),_export:Gi("export"),_import:Gi("import",zi),_null:Gi("null",zi),_true:Gi("true",zi),_false:Gi("false",zi),_in:Gi("in",{beforeExpr:!0,binop:7}),_instanceof:Gi("instanceof",{beforeExpr:!0,binop:7}),_typeof:Gi("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:Gi("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:Gi("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Xi=/\r\n?|\n|\u2028|\u2029/,Yi=new RegExp(Xi.source,"g");function Ji(e){return 10===e||13===e||8232===e||8233===e}function Zi(e,t,n){void 0===n&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(Ji(i))return r<n-1&&13===i&&10===e.charCodeAt(r+1)?r+2:r+1}return-1}var $i=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,es=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ts=Object.prototype,ns=ts.hasOwnProperty,rs=ts.toString,is=Object.hasOwn||function(e,t){return ns.call(e,t)},ss=Array.isArray||function(e){return"[object Array]"===rs.call(e)},os=Object.create(null);function as(e){return os[e]||(os[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function cs(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}var ls=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,hs=function(e,t){this.line=e,this.column=t};hs.prototype.offset=function(e){return new hs(this.line,this.column+e)};var us=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function ps(e,t){for(var n=1,r=0;;){var i=Zi(e,r,t);if(i<0)return new hs(n,t-r);++n,r=i}}var ds={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},fs=!1;function gs(e){var t={};for(var n in ds)t[n]=e&&is(e,n)?e[n]:ds[n];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!fs&&"object"==typeof console&&console.warn&&(fs=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),e&&null!=e.allowHashBang||(t.allowHashBang=t.ecmaVersion>=14),ss(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return ss(t.onComment)&&(t.onComment=function(e,t){return function(n,r,i,s,o,a){var c={type:n?"Block":"Line",value:r,start:i,end:s};e.locations&&(c.loc=new us(this,o,a)),e.ranges&&(c.range=[i,s]),t.push(c)}}(t,t.onComment)),t}var ms=256,ws=259;function ys(e,t){return 2|(e?4:0)|(t?8:0)}var bs=function(e,t,n){this.options=e=gs(e),this.sourceFile=e.sourceFile,this.keywords=as(Li[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var r="";!0!==e.allowReserved&&(r=Bi[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(r+=" await")),this.reservedWords=as(r);var i=(r?r+" ":"")+Bi.strict;this.reservedWordsStrict=as(i),this.reservedWordsStrictBind=as(i+" "+Bi.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Xi).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=Ki.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},As={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};bs.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},As.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},As.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},As.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},As.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(768&t)return!1;if(2&t)return(4&t)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},As.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},As.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},As.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},As.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(768&t||2&t&&!(16&t))return!0}return!1},As.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&ms)>0},bs.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},bs.parse=function(e,t){return new this(t,e).parse()},bs.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},bs.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(bs.prototype,As);var vs=bs.prototype,_s=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;vs.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){es.lastIndex=e,e+=es.exec(this.input)[0].length;var t=_s.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2])){es.lastIndex=e+t[0].length;var n=es.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return";"===i||"}"===i||Xi.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||"!"===i&&"="===this.input.charAt(r+1))}e+=t[0].length,es.lastIndex=e,e+=es.exec(this.input)[0].length,";"===this.input[e]&&e++}},vs.eat=function(e){return this.type===e&&(this.next(),!0)},vs.isContextual=function(e){return this.type===Ki.name&&this.value===e&&!this.containsEsc},vs.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},vs.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},vs.canInsertSemicolon=function(){return this.type===Ki.eof||this.type===Ki.braceR||Xi.test(this.input.slice(this.lastTokEnd,this.start))},vs.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},vs.semicolon=function(){this.eat(Ki.semi)||this.insertSemicolon()||this.unexpected()},vs.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},vs.expect=function(e){this.eat(e)||this.unexpected()},vs.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var Es=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};vs.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")}},vs.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},vs.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},vs.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var xs=bs.prototype;xs.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==Ki.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var s=i[r];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var Ss={kind:"loop"},Is={kind:"switch"};xs.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;es.lastIndex=this.pos;var t=es.exec(this.input),n=this.pos+t[0].length,r=this.input.charCodeAt(n);if(91===r||92===r)return!0;if(e)return!1;if(123===r||r>55295&&r<56320)return!0;if(ji(r,!0)){for(var i=n+1;Hi(r=this.input.charCodeAt(i),!0);)++i;if(92===r||r>55295&&r<56320)return!0;var s=this.input.slice(n,i);if(!Di.test(s))return!0}return!1},xs.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;es.lastIndex=this.pos;var e,t=es.exec(this.input),n=this.pos+t[0].length;return!(Xi.test(this.input.slice(this.pos,n))||"function"!==this.input.slice(n,n+8)||n+8!==this.input.length&&(Hi(e=this.input.charCodeAt(n+8))||e>55295&&e<56320))},xs.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;es.lastIndex=this.pos;var n=es.exec(this.input),r=this.pos+n[0].length;if(Xi.test(this.input.slice(this.pos,r)))return!1;if(e){var i,s=r+5;if("using"!==this.input.slice(r,s)||s===this.input.length||Hi(i=this.input.charCodeAt(s))||i>55295&&i<56320)return!1;es.lastIndex=s;var o=es.exec(this.input);if(o&&Xi.test(this.input.slice(s,s+o[0].length)))return!1}if(t){var a,c=r+2;if(!("of"!==this.input.slice(r,c)||c!==this.input.length&&(Hi(a=this.input.charCodeAt(c))||a>55295&&a<56320)))return!1}var l=this.input.charCodeAt(r);return ji(l,!0)||92===l},xs.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},xs.isUsing=function(e){return this.isUsingKeyword(!1,e)},xs.parseStatement=function(e,t,n){var r,i=this.type,s=this.startNode();switch(this.isLet(e)&&(i=Ki._var,r="let"),i){case Ki._break:case Ki._continue:return this.parseBreakContinueStatement(s,i.keyword);case Ki._debugger:return this.parseDebuggerStatement(s);case Ki._do:return this.parseDoStatement(s);case Ki._for:return this.parseForStatement(s);case Ki._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!e);case Ki._class:return e&&this.unexpected(),this.parseClass(s,!0);case Ki._if:return this.parseIfStatement(s);case Ki._return:return this.parseReturnStatement(s);case Ki._switch:return this.parseSwitchStatement(s);case Ki._throw:return this.parseThrowStatement(s);case Ki._try:return this.parseTryStatement(s);case Ki._const:case Ki._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(s,r);case Ki._while:return this.parseWhileStatement(s);case Ki._with:return this.parseWithStatement(s);case Ki.braceL:return this.parseBlock(!0,s);case Ki.semi:return this.parseEmptyStatement(s);case Ki._export:case Ki._import:if(this.options.ecmaVersion>10&&i===Ki._import){es.lastIndex=this.pos;var o=es.exec(this.input),a=this.pos+o[0].length,c=this.input.charCodeAt(a);if(40===c||46===c)return this.parseExpressionStatement(s,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===Ki._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!e);var l=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(l)return t&&"script"===this.options.sourceType&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),"await using"===l&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(s,!1,l),this.semicolon(),this.finishNode(s,"VariableDeclaration");var h=this.value,u=this.parseExpression();return i===Ki.name&&"Identifier"===u.type&&this.eat(Ki.colon)?this.parseLabeledStatement(s,h,u,e):this.parseExpressionStatement(s,u)}},xs.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(Ki.semi)||this.insertSemicolon()?e.label=null:this.type!==Ki.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(n||"loop"===i.kind))break;if(e.label&&n)break}}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")},xs.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},xs.parseDoStatement=function(e){return this.next(),this.labels.push(Ss),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(Ki._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(Ki.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},xs.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Ss),this.enterScope(0),this.expect(Ki.parenL),this.type===Ki.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===Ki._var||this.type===Ki._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(e,r,t)}var s=this.isContextual("let"),o=!1,a=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(a){var c=this.startNode();return this.next(),"await using"===a&&this.next(),this.parseVar(c,!0,a),this.finishNode(c,"VariableDeclaration"),this.parseForAfterInit(e,c,t)}var l=this.containsEsc,h=new Es,u=this.start,p=t>-1?this.parseExprSubscripts(h,"await"):this.parseExpression(!0,h);return this.type===Ki._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===Ki._in&&this.unexpected(t),e.await=!0):o&&this.options.ecmaVersion>=8&&(p.start!==u||l||"Identifier"!==p.type||"async"!==p.name?this.options.ecmaVersion>=9&&(e.await=!1):this.unexpected()),s&&o&&this.raise(p.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(p,!1,h),this.checkLValPattern(p),this.parseForIn(e,p)):(this.checkExpressionErrors(h,!0),t>-1&&this.unexpected(t),this.parseFor(e,p))},xs.parseForAfterInit=function(e,t,n){return(this.type===Ki._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===t.declarations.length?(this.options.ecmaVersion>=9&&(this.type===Ki._in?n>-1&&this.unexpected(n):e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))},xs.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,Cs|(n?0:Rs),!1,t)},xs.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(Ki._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},xs.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(Ki.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},xs.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(Ki.braceL),this.labels.push(Is),this.enterScope(0);for(var n=!1;this.type!==Ki.braceR;)if(this.type===Ki._case||this.type===Ki._default){var r=this.type===Ki._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(Ki.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},xs.parseThrowStatement=function(e){return this.next(),Xi.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Ts=[];xs.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.enterScope(t?32:0),this.checkLValPattern(e,t?4:2),this.expect(Ki.parenR),e},xs.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===Ki._catch){var t=this.startNode();this.next(),this.eat(Ki.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(Ki._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},xs.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")},xs.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Ss),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},xs.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},xs.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},xs.parseLabeledStatement=function(e,t,n,r){for(var i=0,s=this.labels;i<s.length;i+=1)s[i].name===t&&this.raise(n.start,"Label '"+t+"' is already declared");for(var o=this.type.isLoop?"loop":this.type===Ki._switch?"switch":null,a=this.labels.length-1;a>=0;a--){var c=this.labels[a];if(c.statementStart!==e.start)break;c.statementStart=this.start,c.kind=o}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},xs.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},xs.parseBlock=function(e,t,n){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(Ki.braceL),e&&this.enterScope(0);this.type!==Ki.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},xs.parseFor=function(e,t){return e.init=t,this.expect(Ki.semi),e.test=this.type===Ki.semi?null:this.parseExpression(),this.expect(Ki.semi),e.update=this.type===Ki.parenR?null:this.parseExpression(),this.expect(Ki.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},xs.parseForIn=function(e,t){var n=this.type===Ki._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!n||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(Ki.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")},xs.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(Ki.eq)?i.init=this.parseMaybeAssign(t):r||"const"!==n||this.type===Ki._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r||"using"!==n&&"await using"!==n||!(this.options.ecmaVersion>=17)||this.type===Ki._in||this.isContextual("of")?r||"Identifier"===i.id.type||t&&(this.type===Ki._in||this.isContextual("of"))?i.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration"):this.unexpected(),e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(Ki.comma))break}return e},xs.parseVarId=function(e,t){e.id="using"===t||"await using"===t?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)};var Cs=1,Rs=2;function ks(e,t){var n=t.key.name,r=e[n],i="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(i=(t.static?"s":"i")+t.kind),"iget"===r&&"iset"===i||"iset"===r&&"iget"===i||"sget"===r&&"sset"===i||"sset"===r&&"sget"===i?(e[n]="true",!1):!!r||(e[n]=i,!1)}function Ns(e,t){var n=e.computed,r=e.key;return!n&&("Identifier"===r.type&&r.name===t||"Literal"===r.type&&r.value===t)}xs.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===Ki.star&&t&Rs&&this.unexpected(),e.generator=this.eat(Ki.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&Cs&&(e.id=4&t&&this.type!==Ki.name?null:this.parseIdent(),!e.id||t&Rs||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var s=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ys(e.async,e.generator)),t&Cs||(e.id=this.type===Ki.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=s,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(e,t&Cs?"FunctionDeclaration":"FunctionExpression")},xs.parseFunctionParams=function(e){this.expect(Ki.parenL),e.params=this.parseBindingList(Ki.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},xs.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),s=!1;for(i.body=[],this.expect(Ki.braceL);this.type!==Ki.braceR;){var o=this.parseClassElement(null!==e.superClass);o&&(i.body.push(o),"MethodDefinition"===o.type&&"constructor"===o.kind?(s&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),s=!0):o.key&&"PrivateIdentifier"===o.key.type&&ks(r,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=n,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},xs.parseClassElement=function(e){if(this.eat(Ki.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r="",i=!1,s=!1,o="method",a=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(Ki.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===Ki.star?a=!0:r="static"}if(n.static=a,!r&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==Ki.star||this.canInsertSemicolon()?r="async":s=!0),!r&&(t>=9||!s)&&this.eat(Ki.star)&&(i=!0),!r&&!s&&!i){var c=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=c:r=c)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),t<13||this.type===Ki.parenL||"method"!==o||i||s){var l=!n.static&&Ns(n,"constructor"),h=l&&e;l&&"method"!==o&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=l?"constructor":o,this.parseClassMethod(n,i,s,h)}else this.parseClassField(n);return n},xs.isClassElementNameStart=function(){return this.type===Ki.name||this.type===Ki.privateId||this.type===Ki.num||this.type===Ki.string||this.type===Ki.bracketL||this.type.keyword},xs.parseClassElementName=function(e){this.type===Ki.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},xs.parseClassMethod=function(e,t,n,r){var i=e.key;"constructor"===e.kind?(t&&this.raise(i.start,"Constructor can't be a generator"),n&&this.raise(i.start,"Constructor can't be an async method")):e.static&&Ns(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,n,r);return"get"===e.kind&&0!==s.params.length&&this.raiseRecoverable(s.start,"getter should have no params"),"set"===e.kind&&1!==s.params.length&&this.raiseRecoverable(s.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===s.params[0].type&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},xs.parseClassField=function(e){return Ns(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Ns(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(Ki.eq)?(this.enterScope(576),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")},xs.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==Ki.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},xs.parseClassId=function(e,t){this.type===Ki.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},xs.parseClassSuper=function(e){e.superClass=this.eat(Ki._extends)?this.parseExprSubscripts(null,!1):null},xs.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},xs.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=0===r?null:this.privateNameStack[r-1],s=0;s<n.length;++s){var o=n[s];is(t,o.name)||(i?i.used.push(o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"))}},xs.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==Ki.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},xs.parseExport=function(e,t){if(this.next(),this.eat(Ki.star))return this.parseExportAllDeclaration(e,t);if(this.eat(Ki._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==Ki.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];this.checkUnreserved(i.local),this.checkLocalExport(i.local),"Literal"===i.local.type&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},xs.parseExportDeclaration=function(e){return this.parseStatement(null)},xs.parseExportDefaultDeclaration=function(){var e;if(this.type===Ki._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,4|Cs,!1,e)}if(this.type===Ki._class){var n=this.startNode();return this.parseClass(n,"nullableID")}var r=this.parseMaybeAssign();return this.semicolon(),r},xs.checkExport=function(e,t,n){e&&("string"!=typeof t&&(t="Identifier"===t.type?t.name:t.value),is(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},xs.checkPatternExport=function(e,t){var n=t.type;if("Identifier"===n)this.checkExport(e,t,t.start);else if("ObjectPattern"===n)for(var r=0,i=t.properties;r<i.length;r+=1){var s=i[r];this.checkPatternExport(e,s)}else if("ArrayPattern"===n)for(var o=0,a=t.elements;o<a.length;o+=1){var c=a[o];c&&this.checkPatternExport(e,c)}else"Property"===n?this.checkPatternExport(e,t.value):"AssignmentPattern"===n?this.checkPatternExport(e,t.left):"RestElement"===n&&this.checkPatternExport(e,t.argument)},xs.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},xs.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},xs.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")},xs.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(Ki.braceL);!this.eat(Ki.braceR);){if(n)n=!1;else if(this.expect(Ki.comma),this.afterTrailingComma(Ki.braceR))break;t.push(this.parseExportSpecifier(e))}return t},xs.parseImport=function(e){return this.next(),this.type===Ki.string?(e.specifiers=Ts,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===Ki.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},xs.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportSpecifier")},xs.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportDefaultSpecifier")},xs.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportNamespaceSpecifier")},xs.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===Ki.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(Ki.comma)))return e;if(this.type===Ki.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(Ki.braceL);!this.eat(Ki.braceR);){if(t)t=!1;else if(this.expect(Ki.comma),this.afterTrailingComma(Ki.braceR))break;e.push(this.parseImportSpecifier())}return e},xs.parseWithClause=function(){var e=[];if(!this.eat(Ki._with))return e;this.expect(Ki.braceL);for(var t={},n=!0;!this.eat(Ki.braceR);){if(n)n=!1;else if(this.expect(Ki.comma),this.afterTrailingComma(Ki.braceR))break;var r=this.parseImportAttribute(),i="Identifier"===r.key.type?r.key.name:r.key.value;is(t,i)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,e.push(r)}return e},xs.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===Ki.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(Ki.colon),this.type!==Ki.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")},xs.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===Ki.string){var e=this.parseLiteral(this.value);return ls.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},xs.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},xs.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var Os=bs.prototype;Os.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var s=i[r];this.toAssignable(s,t),"RestElement"!==s.type||"ArrayPattern"!==s.argument.type&&"ObjectPattern"!==s.argument.type||this.raise(s.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return e},Os.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var s=e[n-1];6===this.options.ecmaVersion&&t&&s&&"RestElement"===s.type&&"Identifier"!==s.argument.type&&this.unexpected(s.argument.start)}return e},Os.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},Os.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==Ki.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},Os.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case Ki.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(Ki.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case Ki.braceL:return this.parseObj(!0)}return this.parseIdent()},Os.parseBindingList=function(e,t,n,r){for(var i=[],s=!0;!this.eat(e);)if(s?s=!1:this.expect(Ki.comma),t&&this.type===Ki.comma)i.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===Ki.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),i.push(o),this.type===Ki.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}i.push(this.parseAssignableListItem(r))}return i},Os.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},Os.parseBindingListItem=function(e){return e},Os.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(Ki.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},Os.checkLValSimple=function(e,t,n){void 0===t&&(t=0);var r=0!==t;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(2===t&&"let"===e.name&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),n&&(is(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),5!==t&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}},Os.checkLValPattern=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var s=i[r];this.checkLValInnerPattern(s,t,n)}break;case"ArrayPattern":for(var o=0,a=e.elements;o<a.length;o+=1){var c=a[o];c&&this.checkLValInnerPattern(c,t,n)}break;default:this.checkLValSimple(e,t,n)}},Os.checkLValInnerPattern=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var Bs=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},Ps={b_stat:new Bs("{",!1),b_expr:new Bs("{",!0),b_tmpl:new Bs("${",!1),p_stat:new Bs("(",!1),p_expr:new Bs("(",!0),q_tmpl:new Bs("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new Bs("function",!1),f_expr:new Bs("function",!0),f_expr_gen:new Bs("function",!0,!1,null,!0),f_gen:new Bs("function",!1,!1,null,!0)},Ls=bs.prototype;Ls.initialContext=function(){return[Ps.b_stat]},Ls.curContext=function(){return this.context[this.context.length-1]},Ls.braceIsBlock=function(e){var t=this.curContext();return t===Ps.f_expr||t===Ps.f_stat||(e!==Ki.colon||t!==Ps.b_stat&&t!==Ps.b_expr?e===Ki._return||e===Ki.name&&this.exprAllowed?Xi.test(this.input.slice(this.lastTokEnd,this.start)):e===Ki._else||e===Ki.semi||e===Ki.eof||e===Ki.parenR||e===Ki.arrow||(e===Ki.braceL?t===Ps.b_stat:e!==Ki._var&&e!==Ki._const&&e!==Ki.name&&!this.exprAllowed):!t.isExpr)},Ls.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},Ls.updateContext=function(e){var t,n=this.type;n.keyword&&e===Ki.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},Ls.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},Ki.parenR.updateContext=Ki.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===Ps.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},Ki.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?Ps.b_stat:Ps.b_expr),this.exprAllowed=!0},Ki.dollarBraceL.updateContext=function(){this.context.push(Ps.b_tmpl),this.exprAllowed=!0},Ki.parenL.updateContext=function(e){var t=e===Ki._if||e===Ki._for||e===Ki._with||e===Ki._while;this.context.push(t?Ps.p_stat:Ps.p_expr),this.exprAllowed=!0},Ki.incDec.updateContext=function(){},Ki._function.updateContext=Ki._class.updateContext=function(e){!e.beforeExpr||e===Ki._else||e===Ki.semi&&this.curContext()!==Ps.p_stat||e===Ki._return&&Xi.test(this.input.slice(this.lastTokEnd,this.start))||(e===Ki.colon||e===Ki.braceL)&&this.curContext()===Ps.b_stat?this.context.push(Ps.f_stat):this.context.push(Ps.f_expr),this.exprAllowed=!1},Ki.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},Ki.backQuote.updateContext=function(){this.curContext()===Ps.q_tmpl?this.context.pop():this.context.push(Ps.q_tmpl),this.exprAllowed=!1},Ki.star.updateContext=function(e){if(e===Ki._function){var t=this.context.length-1;this.context[t]===Ps.f_expr?this.context[t]=Ps.f_expr_gen:this.context[t]=Ps.f_gen}this.exprAllowed=!0},Ki.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==Ki.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var Ds=bs.prototype;function Us(e){return"Identifier"===e.type||"ParenthesizedExpression"===e.type&&Us(e.expression)}function Fs(e){return"MemberExpression"===e.type&&"PrivateIdentifier"===e.property.type||"ChainExpression"===e.type&&Fs(e.expression)||"ParenthesizedExpression"===e.type&&Fs(e.expression)}Ds.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r,i=e.key;switch(i.type){case"Identifier":r=i.name;break;case"Literal":r=String(i.value);break;default:return}var s=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===r&&"init"===s&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=i.start):this.raiseRecoverable(i.start,"Redefinition of __proto__ property")),t.proto=!0);else{var o=t[r="$"+r];o?("init"===s?this.strict&&o.init||o.get||o.set:o.init||o[s])&&this.raiseRecoverable(i.start,"Redefinition of property"):o=t[r]={init:!1,get:!1,set:!1},o[s]=!0}}},Ds.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===Ki.comma){var s=this.startNodeAt(n,r);for(s.expressions=[i];this.eat(Ki.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return i},Ds.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,s=-1,o=-1;t?(i=t.parenthesizedAssign,s=t.trailingComma,o=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new Es,r=!0);var a=this.start,c=this.startLoc;this.type!==Ki.parenL&&this.type!==Ki.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===e);var l=this.parseMaybeConditional(e,t);if(n&&(l=n.call(this,l,a,c)),this.type.isAssign){var h=this.startNodeAt(a,c);return h.operator=this.value,this.type===Ki.eq&&(l=this.toAssignable(l,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=l.start&&(t.shorthandAssign=-1),this.type===Ki.eq?this.checkLValPattern(l):this.checkLValSimple(l),h.left=l,this.next(),h.right=this.parseMaybeAssign(e),o>-1&&(t.doubleProto=o),this.finishNode(h,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),s>-1&&(t.trailingComma=s),l},Ds.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(Ki.question)){var s=this.startNodeAt(n,r);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(Ki.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return i},Ds.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,r,-1,e)},Ds.parseExprOp=function(e,t,n,r,i){var s=this.type.binop;if(null!=s&&(!i||this.type!==Ki._in)&&s>r){var o=this.type===Ki.logicalOR||this.type===Ki.logicalAND,a=this.type===Ki.coalesce;a&&(s=Ki.logicalAND.binop);var c=this.value;this.next();var l=this.start,h=this.startLoc,u=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),l,h,s,i),p=this.buildBinary(t,n,e,u,c,o||a);return(o&&this.type===Ki.coalesce||a&&(this.type===Ki.logicalOR||this.type===Ki.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(p,t,n,r,i)}return e},Ds.buildBinary=function(e,t,n,r,i,s){"PrivateIdentifier"===r.type&&this.raise(r.start,"Private identifier can only be left side of binary expression");var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")},Ds.parseMaybeUnary=function(e,t,n,r){var i,s=this.start,o=this.startLoc;if(this.isContextual("await")&&this.canAwait)i=this.parseAwait(r),t=!0;else if(this.type.prefix){var a=this.startNode(),c=this.type===Ki.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0,c,r),this.checkExpressionErrors(e,!0),c?this.checkLValSimple(a.argument):this.strict&&"delete"===a.operator&&Us(a.argument)?this.raiseRecoverable(a.start,"Deleting local variable in strict mode"):"delete"===a.operator&&Fs(a.argument)?this.raiseRecoverable(a.start,"Private fields can not be deleted"):t=!0,i=this.finishNode(a,c?"UpdateExpression":"UnaryExpression")}else if(t||this.type!==Ki.privateId){if(i=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return i;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(s,o);l.operator=this.value,l.prefix=!1,l.argument=i,this.checkLValSimple(i),this.next(),i=this.finishNode(l,"UpdateExpression")}}else(r||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),i=this.parsePrivateIdent(),this.type!==Ki._in&&this.unexpected();return n||!this.eat(Ki.starstar)?i:t?void this.unexpected(this.lastTokStart):this.buildBinary(s,o,i,this.parseMaybeUnary(null,!1,!1,r),"**",!1)},Ds.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprAtom(e,t);if("ArrowFunctionExpression"===i.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return i;var s=this.parseSubscripts(i,n,r,!1,t);return e&&"MemberExpression"===s.type&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1),e.trailingComma>=s.start&&(e.trailingComma=-1)),s},Ds.parseSubscripts=function(e,t,n,r,i){for(var s=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,o=!1;;){var a=this.parseSubscript(e,t,n,r,s,o,i);if(a.optional&&(o=!0),a===e||"ArrowFunctionExpression"===a.type){if(o){var c=this.startNodeAt(t,n);c.expression=a,a=this.finishNode(c,"ChainExpression")}return a}e=a}},Ds.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(Ki.arrow)},Ds.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},Ds.parseSubscript=function(e,t,n,r,i,s,o){var a=this.options.ecmaVersion>=11,c=a&&this.eat(Ki.questionDot);r&&c&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var l=this.eat(Ki.bracketL);if(l||c&&this.type!==Ki.parenL&&this.type!==Ki.backQuote||this.eat(Ki.dot)){var h=this.startNodeAt(t,n);h.object=e,l?(h.property=this.parseExpression(),this.expect(Ki.bracketR)):this.type===Ki.privateId&&"Super"!==e.type?h.property=this.parsePrivateIdent():h.property=this.parseIdent("never"!==this.options.allowReserved),h.computed=!!l,a&&(h.optional=c),e=this.finishNode(h,"MemberExpression")}else if(!r&&this.eat(Ki.parenL)){var u=new Es,p=this.yieldPos,d=this.awaitPos,f=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var g=this.parseExprList(Ki.parenR,this.options.ecmaVersion>=8,!1,u);if(i&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(u,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=p,this.awaitPos=d,this.awaitIdentPos=f,this.parseSubscriptAsyncArrow(t,n,g,o);this.checkExpressionErrors(u,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=d||this.awaitPos,this.awaitIdentPos=f||this.awaitIdentPos;var m=this.startNodeAt(t,n);m.callee=e,m.arguments=g,a&&(m.optional=c),e=this.finishNode(m,"CallExpression")}else if(this.type===Ki.backQuote){(c||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var w=this.startNodeAt(t,n);w.tag=e,w.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(w,"TaggedTemplateExpression")}return e},Ds.parseExprAtom=function(e,t,n){this.type===Ki.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case Ki._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type!==Ki.parenL||this.allowDirectSuper||this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==Ki.dot&&this.type!==Ki.bracketL&&this.type!==Ki.parenL&&this.unexpected(),this.finishNode(r,"Super");case Ki._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case Ki.name:var s=this.start,o=this.startLoc,a=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!a&&"async"===c.name&&!this.canInsertSemicolon()&&this.eat(Ki._function))return this.overrideContext(Ps.f_expr),this.parseFunction(this.startNodeAt(s,o),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(Ki.arrow))return this.parseArrowExpression(this.startNodeAt(s,o),[c],!1,t);if(this.options.ecmaVersion>=8&&"async"===c.name&&this.type===Ki.name&&!a&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return c=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(Ki.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,o),[c],!0,t)}return c;case Ki.regexp:var l=this.value;return(r=this.parseLiteral(l.value)).regex={pattern:l.pattern,flags:l.flags},r;case Ki.num:case Ki.string:return this.parseLiteral(this.value);case Ki._null:case Ki._true:case Ki._false:return(r=this.startNode()).value=this.type===Ki._null?null:this.type===Ki._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case Ki.parenL:var h=this.start,u=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=h),e.parenthesizedBind<0&&(e.parenthesizedBind=h)),u;case Ki.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(Ki.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case Ki.braceL:return this.overrideContext(Ps.b_expr),this.parseObj(!1,e);case Ki._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case Ki._class:return this.parseClass(this.startNode(),!1);case Ki._new:return this.parseNew();case Ki.backQuote:return this.parseTemplate();case Ki._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}},Ds.parseExprAtomDefault=function(){this.unexpected()},Ds.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===Ki.parenL&&!e)return this.parseDynamicImport(t);if(this.type===Ki.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name="import",t.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(t)}this.unexpected()},Ds.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(Ki.parenR)?e.options=null:(this.expect(Ki.comma),this.afterTrailingComma(Ki.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(Ki.parenR)||(this.expect(Ki.comma),this.afterTrailingComma(Ki.parenR)||this.unexpected())));else if(!this.eat(Ki.parenR)){var t=this.start;this.eat(Ki.comma)&&this.eat(Ki.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},Ds.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},Ds.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=null!=t.value?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},Ds.parseParenExpression=function(){this.expect(Ki.parenL);var e=this.parseExpression();return this.expect(Ki.parenR),e},Ds.shouldParseArrow=function(e){return!this.canInsertSemicolon()},Ds.parseParenAndDistinguishExpression=function(e,t){var n,r=this.start,i=this.startLoc,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,a=this.start,c=this.startLoc,l=[],h=!0,u=!1,p=new Es,d=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==Ki.parenR;){if(h?h=!1:this.expect(Ki.comma),s&&this.afterTrailingComma(Ki.parenR,!0)){u=!0;break}if(this.type===Ki.ellipsis){o=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===Ki.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}l.push(this.parseMaybeAssign(!1,p,this.parseParenItem))}var g=this.lastTokEnd,m=this.lastTokEndLoc;if(this.expect(Ki.parenR),e&&this.shouldParseArrow(l)&&this.eat(Ki.arrow))return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=f,this.parseParenArrowList(r,i,l,t);l.length&&!u||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(p,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=f||this.awaitPos,l.length>1?((n=this.startNodeAt(a,c)).expressions=l,this.finishNodeAt(n,"SequenceExpression",g,m)):n=l[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var w=this.startNodeAt(r,i);return w.expression=n,this.finishNode(w,"ParenthesizedExpression")}return n},Ds.parseParenItem=function(e){return e},Ds.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var Ms=[];Ds.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===Ki.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),this.eat(Ki.parenL)?e.arguments=this.parseExprList(Ki.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Ms,this.finishNode(e,"NewExpression")},Ds.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===Ki.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===Ki.backQuote,this.finishNode(n,"TemplateElement")},Ds.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===Ki.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(Ki.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(Ki.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},Ds.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===Ki.name||this.type===Ki.num||this.type===Ki.string||this.type===Ki.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===Ki.star)&&!Xi.test(this.input.slice(this.lastTokEnd,this.start))},Ds.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(Ki.braceR);){if(r)r=!1;else if(this.expect(Ki.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(Ki.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,i,t),n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},Ds.parseProperty=function(e,t){var n,r,i,s,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(Ki.ellipsis))return e?(o.argument=this.parseIdent(!1),this.type===Ki.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(o.argument=this.parseMaybeAssign(!1,t),this.type===Ki.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(i=this.start,s=this.startLoc),e||(n=this.eat(Ki.star)));var a=this.containsEsc;return this.parsePropertyName(o),!e&&!a&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(o)?(r=!0,n=this.options.ecmaVersion>=9&&this.eat(Ki.star),this.parsePropertyName(o)):r=!1,this.parsePropertyValue(o,e,n,r,i,s,t,a),this.finishNode(o,"Property")},Ds.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n="get"===e.kind?0:1;if(e.value.params.length!==n){var r=e.value.start;"get"===e.kind?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")},Ds.parsePropertyValue=function(e,t,n,r,i,s,o,a){(n||r)&&this.type===Ki.colon&&this.unexpected(),this.eat(Ki.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===Ki.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,r),e.kind="init"):t||a||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===Ki.comma||this.type===Ki.braceR||this.type===Ki.eq?this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key)):this.type===Ki.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected():((n||r)&&this.unexpected(),this.parseGetterSetter(e))},Ds.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(Ki.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(Ki.bracketR),e.key;e.computed=!1}return e.key=this.type===Ki.num||this.type===Ki.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},Ds.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Ds.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|ys(t,r.generator)|(n?128:0)),this.expect(Ki.parenL),r.params=this.parseBindingList(Ki.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(r,"FunctionExpression")},Ds.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(16|ys(n,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")},Ds.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==Ki.braceL,s=this.strict,o=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);s&&!a||(o=this.strictDirective(this.end))&&a&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var c=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!s&&!o&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,5),e.body=this.parseBlock(!1,void 0,o&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()},Ds.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1)if("Identifier"!==n[t].type)return!1;return!0},Ds.checkParams=function(e,t){for(var n=Object.create(null),r=0,i=e.params;r<i.length;r+=1){var s=i[r];this.checkLValInnerPattern(s,1,t?null:n)}},Ds.parseExprList=function(e,t,n,r){for(var i=[],s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect(Ki.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===Ki.comma?o=null:this.type===Ki.ellipsis?(o=this.parseSpread(r),r&&this.type===Ki.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),i.push(o)}return i},Ds.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;this.inGenerator&&"yield"===r&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().flags&ws||"arguments"!==r||this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==r&&"await"!==r||this.raise(t,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(t,n).indexOf("\\")||(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||"await"!==r||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))},Ds.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),"await"!==t.name||this.awaitIdentPos||(this.awaitIdentPos=t.start)),t},Ds.parseIdentNode=function(){var e=this.startNode();return this.type===Ki.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,"class"!==e.name&&"function"!==e.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop(),this.type=Ki.name):this.unexpected(),e},Ds.parsePrivateIdent=function(){var e=this.startNode();return this.type===Ki.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(0===this.privateNameStack.length?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e},Ds.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===Ki.semi||this.canInsertSemicolon()||this.type!==Ki.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(Ki.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},Ds.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var js=bs.prototype;js.raise=function(e,t){var n=ps(this.input,e);t+=" ("+n.line+":"+n.column+")",this.sourceFile&&(t+=" in "+this.sourceFile);var r=new SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},js.raiseRecoverable=js.raise,js.curPosition=function(){if(this.options.locations)return new hs(this.curLine,this.pos-this.lineStart)};var Hs=bs.prototype,Ws=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};Hs.enterScope=function(e){this.scopeStack.push(new Ws(e))},Hs.exitScope=function(){this.scopeStack.pop()},Hs.treatFunctionsAsVarInScope=function(e){return 2&e.flags||!this.inModule&&1&e.flags},Hs.declareName=function(e,t,n){var r=!1;if(2===t){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&1&i.flags&&delete this.undefinedExports[e]}else if(4===t)this.currentScope().lexical.push(e);else if(3===t){var s=this.currentScope();r=this.treatFunctionsAsVar?s.lexical.indexOf(e)>-1:s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1,s.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var a=this.scopeStack[o];if(a.lexical.indexOf(e)>-1&&!(32&a.flags&&a.lexical[0]===e)||!this.treatFunctionsAsVarInScope(a)&&a.functions.indexOf(e)>-1){r=!0;break}if(a.var.push(e),this.inModule&&1&a.flags&&delete this.undefinedExports[e],a.flags&ws)break}r&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")},Hs.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},Hs.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Hs.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(771&t.flags)return t}},Hs.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(771&t.flags&&!(16&t.flags))return t}};var Qs=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new us(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},Vs=bs.prototype;function zs(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}Vs.startNode=function(){return new Qs(this,this.start,this.startLoc)},Vs.startNodeAt=function(e,t){return new Qs(this,e,t)},Vs.finishNode=function(e,t){return zs.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Vs.finishNodeAt=function(e,t,n,r){return zs.call(this,e,t,n,r)},Vs.copyNode=function(e){var t=new Qs(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var qs="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Gs=qs+" Extended_Pictographic",Ks=Gs+" EBase EComp EMod EPres ExtPict",Xs={9:qs,10:Gs,11:Gs,12:Ks,13:Ks,14:Ks},Ys={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},Js="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Zs="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",$s=Zs+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",eo=$s+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",to=eo+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",no=to+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ro={9:Zs,10:$s,11:eo,12:to,13:no,14:no+" Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz"},io={};function so(e){var t=io[e]={binary:as(Xs[e]+" "+Js),binaryOfStrings:as(Ys[e]),nonBinary:{General_Category:as(Js),Script:as(ro[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var oo=0,ao=[9,10,11,12,13,14];oo<ao.length;oo+=1)so(ao[oo]);var co=bs.prototype,lo=function(e,t){this.parent=e,this.base=t||this};lo.prototype.separatedFrom=function(e){for(var t=this;t;t=t.parent)for(var n=e;n;n=n.parent)if(t.base===n.base&&t!==n)return!0;return!1},lo.prototype.sibling=function(){return new lo(this.parent,this.base)};var ho=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=io[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function uo(e){return 105===e||109===e||115===e}function po(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function fo(e){return e>=65&&e<=90||e>=97&&e<=122}function go(e){return fo(e)||95===e}function mo(e){return go(e)||wo(e)}function wo(e){return e>=48&&e<=57}function yo(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function bo(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function Ao(e){return e>=48&&e<=55}ho.prototype.reset=function(e,t,n){var r=-1!==n.indexOf("v"),i=-1!==n.indexOf("u");this.start=0|e,this.source=t+"",this.flags=n,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=i&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=i&&this.parser.options.ecmaVersion>=9)},ho.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},ho.prototype.at=function(e,t){void 0===t&&(t=!1);var n=this.source,r=n.length;if(e>=r)return-1;var i=n.charCodeAt(e);if(!t&&!this.switchU||i<=55295||i>=57344||e+1>=r)return i;var s=n.charCodeAt(e+1);return s>=56320&&s<=57343?(i<<10)+s-56613888:i},ho.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var n=this.source,r=n.length;if(e>=r)return r;var i,s=n.charCodeAt(e);return!t&&!this.switchU||s<=55295||s>=57344||e+1>=r||(i=n.charCodeAt(e+1))<56320||i>57343?e+1:e+2},ho.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},ho.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},ho.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},ho.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},ho.prototype.eatChars=function(e,t){void 0===t&&(t=!1);for(var n=this.pos,r=0,i=e;r<i.length;r+=1){var s=i[r],o=this.at(n,t);if(-1===o||o!==s)return!1;n=this.nextIndex(n,t)}return this.pos=n,!0},co.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=!1,i=!1,s=0;s<n.length;s++){var o=n.charAt(s);-1===t.indexOf(o)&&this.raise(e.start,"Invalid regular expression flag"),n.indexOf(o,s+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),"u"===o&&(r=!0),"v"===o&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,"Invalid regular expression flag")},co.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&function(e){for(var t in e)return!0;return!1}(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},co.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];e.groupNames[r]||e.raise("Invalid named capture referenced")}},co.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new lo(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},co.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},co.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):!!(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))&&(this.regexp_eatQuantifier(e),!0)},co.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},co.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},co.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},co.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return-1!==i&&i<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=n}return!1},co.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},co.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},co.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i<n.length;i++){var s=n.charAt(i);n.indexOf(s,i+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(r){var o=this.regexp_eatModifiers(e);n||o||58!==e.current()||e.raise("Invalid regular expression modifiers");for(var a=0;a<o.length;a++){var c=o.charAt(a);(o.indexOf(c,a+1)>-1||n.indexOf(c)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1},co.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},co.regexp_eatModifiers=function(e){for(var t="",n=0;-1!==(n=e.current())&&uo(n);)t+=cs(n),e.advance();return t},co.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},co.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},co.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!po(t)&&(e.lastIntValue=t,e.advance(),!0)},co.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!po(n);)e.advance();return e.pos!==t},co.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t||(e.advance(),0))},co.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n)if(t)for(var r=0,i=n;r<i.length;r+=1)i[r].separatedFrom(e.branchID)||e.raise("Duplicate capture group name");else e.raise("Duplicate capture group name");t?(n||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}},co.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},co.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=cs(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=cs(e.lastIntValue);return!0}return!1},co.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),function(e){return ji(e,!0)||36===e||95===e}(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},co.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),function(e){return Hi(e,!0)||36===e||95===e||8204===e||8205===e}(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},co.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},co.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},co.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},co.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},co.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},co.regexp_eatZero=function(e){return 48===e.current()&&!wo(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},co.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},co.regexp_eatControlLetter=function(e){var t=e.current();return!!fo(t)&&(e.lastIntValue=t%32,e.advance(),!0)},co.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var n,r=e.pos,i=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(i&&s>=55296&&s<=56319){var o=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(a>=56320&&a<=57343)return e.lastIntValue=1024*(s-55296)+(a-56320)+65536,!0}e.pos=o,e.lastIntValue=s}return!0}if(i&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&(n=e.lastIntValue)>=0&&n<=1114111)return!0;i&&e.raise("Invalid unicode escape"),e.pos=r}return!1},co.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t||(e.lastIntValue=t,e.advance(),0))},co.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1},co.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),1;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=80===t)||112===t)){var r;if(e.lastIntValue=-1,e.advance(),e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&2===r&&e.raise("Invalid property name"),r;e.raise("Invalid property name")}return 0},co.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),1}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return 0},co.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){is(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},co.regexp_validateUnicodePropertyNameOrValue=function(e,t){return e.unicodeProperties.binary.test(t)?1:e.switchV&&e.unicodeProperties.binaryOfStrings.test(t)?2:void e.raise("Invalid property name")},co.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";go(t=e.current());)e.lastStringValue+=cs(t),e.advance();return""!==e.lastStringValue},co.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";mo(t=e.current());)e.lastStringValue+=cs(t),e.advance();return""!==e.lastStringValue},co.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},co.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&2===n&&e.raise("Negated character class may contain strings"),!0}return!1},co.regexp_classContents=function(e){return 93===e.current()?1:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),1)},co.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;!e.switchU||-1!==t&&-1!==n||e.raise("Invalid character class"),-1!==t&&-1!==n&&t>n&&e.raise("Range out of order in character class")}}},co.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(99===n||Ao(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return 93!==r&&(e.lastIntValue=r,e.advance(),!0)},co.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},co.regexp_classSetExpression=function(e){var t,n=1;if(this.regexp_eatClassSetRange(e));else if(t=this.regexp_eatClassSetOperand(e)){2===t&&(n=2);for(var r=e.pos;e.eatChars([38,38]);)38!==e.current()&&(t=this.regexp_eatClassSetOperand(e))?2!==t&&(n=1):e.raise("Invalid character in character class");if(r!==e.pos)return n;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(r!==e.pos)return n}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(!(t=this.regexp_eatClassSetOperand(e)))return n;2===t&&(n=2)}},co.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return-1!==n&&-1!==r&&n>r&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1},co.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?1:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},co.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&2===r&&e.raise("Negated character class may contain strings"),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null},co.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise("Invalid escape");e.pos=t}return null},co.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)2===this.regexp_classString(e)&&(t=2);return t},co.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return 1===t?1:2},co.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return!(!this.regexp_eatCharacterEscape(e)&&!this.regexp_eatClassSetReservedPunctuator(e)&&(e.eat(98)?(e.lastIntValue=8,0):(e.pos=t,1)));var n=e.current();return!(n<0||n===e.lookahead()&&function(e){return 33===e||e>=35&&e<=38||e>=42&&e<=44||46===e||e>=58&&e<=64||94===e||96===e||126===e}(n)||function(e){return 40===e||41===e||45===e||47===e||e>=91&&e<=93||e>=123&&e<=125}(n)||(e.advance(),e.lastIntValue=n,0))},co.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return!!function(e){return 33===e||35===e||37===e||38===e||44===e||45===e||e>=58&&e<=62||64===e||96===e||126===e}(t)&&(e.lastIntValue=t,e.advance(),!0)},co.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!wo(t)&&95!==t||(e.lastIntValue=t%32,e.advance(),0))},co.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},co.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;wo(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},co.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;yo(n=e.current());)e.lastIntValue=16*e.lastIntValue+bo(n),e.advance();return e.pos!==t},co.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},co.regexp_eatOctalDigit=function(e){var t=e.current();return Ao(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},co.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!yo(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+bo(i),e.advance()}return!0};var vo=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new us(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},_o=bs.prototype;function Eo(e){return"function"!=typeof BigInt?null:BigInt(e.replace(/_/g,""))}_o.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new vo(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},_o.getToken=function(){return this.next(),new vo(this)},"undefined"!=typeof Symbol&&(_o[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===Ki.eof,value:t}}}}),_o.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(Ki.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},_o.readToken=function(e){return ji(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},_o.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888},_o.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(-1===n&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=Zi(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},_o.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!Ji(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},_o.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&$i.test(String.fromCharCode(e))))break e;++this.pos}}},_o.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},_o.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(Ki.ellipsis)):(++this.pos,this.finishToken(Ki.dot))},_o.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(Ki.assign,2):this.finishOp(Ki.slash,1)},_o.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?Ki.star:Ki.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,r=Ki.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(Ki.assign,n+1):this.finishOp(r,n)},_o.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(Ki.assign,3):this.finishOp(124===e?Ki.logicalOR:Ki.logicalAND,2):61===t?this.finishOp(Ki.assign,2):this.finishOp(124===e?Ki.bitwiseOR:Ki.bitwiseAND,1)},_o.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(Ki.assign,2):this.finishOp(Ki.bitwiseXOR,1)},_o.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!Xi.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(Ki.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(Ki.assign,2):this.finishOp(Ki.plusMin,1)},_o.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(Ki.assign,n+1):this.finishOp(Ki.bitShift,n)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(Ki.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},_o.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(Ki.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(Ki.arrow)):this.finishOp(61===e?Ki.eq:Ki.prefix,1)},_o.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(Ki.questionDot,2)}if(63===t)return e>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(Ki.assign,3):this.finishOp(Ki.coalesce,2)}return this.finishOp(Ki.question,1)},_o.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,ji(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken(Ki.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+cs(e)+"'")},_o.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(Ki.parenL);case 41:return++this.pos,this.finishToken(Ki.parenR);case 59:return++this.pos,this.finishToken(Ki.semi);case 44:return++this.pos,this.finishToken(Ki.comma);case 91:return++this.pos,this.finishToken(Ki.bracketL);case 93:return++this.pos,this.finishToken(Ki.bracketR);case 123:return++this.pos,this.finishToken(Ki.braceL);case 125:return++this.pos,this.finishToken(Ki.braceR);case 58:return++this.pos,this.finishToken(Ki.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(Ki.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(Ki.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+cs(e)+"'")},_o.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},_o.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(Xi.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new ho(this));a.reset(n,i,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var c=null;try{c=new RegExp(i,o)}catch(e){}return this.finishToken(Ki.regexp,{pattern:i,flags:o,value:c})},_o.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&void 0===t,i=n&&48===this.input.charCodeAt(this.pos),s=this.pos,o=0,a=0,c=0,l=t??1/0;c<l;++c,++this.pos){var h=this.input.charCodeAt(this.pos),u=void 0;if(r&&95===h)i&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===a&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===c&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),a=h;else{if((u=h>=97?h-97+10:h>=65?h-65+10:h>=48&&h<=57?h-48:1/0)>=e)break;a=h,o=o*e+u}}return r&&95===a&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||null!=t&&this.pos-s!==t?null:o},_o.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return null==n&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(n=Eo(this.input.slice(t,this.pos)),++this.pos):ji(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(Ki.num,n)},_o.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(t,"Invalid number");var n=this.pos-t>=2&&48===this.input.charCodeAt(t);n&&this.strict&&this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&110===r){var i=Eo(this.input.slice(t,this.pos));return++this.pos,ji(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(Ki.num,i)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),46!==r||n||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),69!==r&&101!==r||n||(43!==(r=this.input.charCodeAt(++this.pos))&&45!==r||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),ji(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s=function(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}(this.input.slice(t,this.pos),n);return this.finishToken(Ki.num,s)},_o.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},_o.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):8232===r||8233===r?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Ji(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(Ki.string,t)};var xo={};_o.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==xo)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},_o.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw xo;this.raise(e,t)},_o.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==Ki.template&&this.type!==Ki.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(Ki.template,e)):36===n?(this.pos+=2,this.finishToken(Ki.dollarBraceL)):(++this.pos,this.finishToken(Ki.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Ji(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},_o.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(Ki.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":"\n"===this.input[this.pos+1]&&++this.pos;case"\n":case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},_o.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return cs(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var n=this.pos-1;this.invalidStringToken(n,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),"0"===r&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return Ji(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}},_o.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},_o.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(Hi(i,r))this.pos+=i<=65535?1:2;else{if(92!==i)break;this.containsEsc=!0,e+=this.input.slice(n,this.pos);var s=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?ji:Hi)(o,r)||this.invalidStringToken(s,"Invalid Unicode escape"),e+=cs(o),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},_o.readWord=function(){var e=this.readWord1(),t=Ki.name;return this.keywords.test(e)&&(t=qi[e]),this.finishToken(t,e)},bs.acorn={Parser:bs,version:"8.15.0",defaultOptions:ds,Position:hs,SourceLocation:us,getLineInfo:ps,Node:Qs,TokenType:Wi,tokTypes:Ki,keywordTypes:qi,TokContext:Bs,tokContexts:Ps,isIdentifierChar:Hi,isIdentifierStart:ji,Token:vo,isNewLine:Ji,lineBreak:Xi,lineBreakG:Yi,nonASCIIwhitespace:$i};const So=/^\s*?import\s*?[{"'*]/,Io=/^\s*?export\s*?({([\s\w,$\n]+?)}[\s;]*|default|class)\s+/m,To=/(^|;)\s*?(?:im|ex)port(?:['"\s]*(?:[\w*${}\s,]+from\s*)?['"\s]?['"\s])(?:.*?)['"\s]/,Co=/((?:im|ex)port(?:['"\s]*(?:[\w*${}\s,]+from\s*)?['"\s]?['"\s]))((?:https?|[./]).*?)(['"\s])/,Ro=["window","globalThis","self","document","location","top","parent","frames","opener"],ko=["globalThis","self","location"],No=Ro.map(e=>`(?:^|[^$.])\\b${e}\\b(?:$|[^$])`).join("|"),Oo=new RegExp(`(${No})`),Bo=(()=>{const e="_____WB$wombat$check$this$function_____(this)",t="WB_wombat_runEval2((_______eval_arg, isGlobal) => { var ge = eval; return isGlobal ? ge(_______eval_arg) : eval(_______eval_arg); }).eval(this, (function() { return arguments })(),";function n(){return(t,n,r,i)=>function(e,t){let n=e.lastIndexOf('"',t);return n<0&&(n=e.indexOf('"',t)),n>0&&"\\"===e[n-1]}(i,r)?t:t.replace("this",e)}function r(e,t){return n=>n.replace(e,t)}return[[/(?<!static|function|})(?:^|\s)\beval\s*\(/,(i=t,e=>{const t=e.indexOf("eval");return 0===t?i:e.slice(0,t)+i})],[/\([\w]+,\s*eval\)\(/,()=>" "+t],[/[=]\s*\beval\b(?![(:.$])/,r("eval","self.eval")],[/var\s+self/,r("var","let")],[/\.postMessage\b\(/,e=>".__WB_pmw(self)"+e],[/(?:let|const)\s+location\s*=/,e=>e],[/(?:^|[^$.+*/%^-])\s?\blocation\b\s*[=]\s*(?![\s\d=>])/,(e,t,n,r)=>{if(n>0){const t=r[n-1];if("."===t||"$"===t)return e}return e+function(e,t,n,r){return void 0===t.isStrict&&(t.isStrict=r.slice(0,n).indexOf("class ")>=0),t.isStrict?e.replace("arguments","[]"):e}("((self.__WB_check_loc && self.__WB_check_loc(location, arguments)) || {}).maybeHref = ",t,n,r)}],[/\breturn\s+this\b\s*(?![\s\w.$])/,n()],[new RegExp(`[^$.]\\s?\\bthis\\b(?=(?:\\.(?:${Ro.join("|")})\\b))`),(t,n,r,i)=>{const s=i[r];return"\n"===s?t.replace("this",";"+e):"."!==s&&"$"!==s?t.replace("this",e):t}],[/[=,]\s*\bthis\b\s*(?![\s\w:.$])/,n()],[/\}(?:\s*\))?\s*\(this\)/,n()],[/[^|&][|&]{2}\s*this\b\s*(?![|\s&.$](?:[^|&]|$))/,n()],[/async\s+import\s*\(/,e=>e],[/[^$.]\bimport\s*\([^)]*\)\s*\{/,e=>e],[/[^$.]\bimport\s*\(/,(e,t)=>{let n=e.replace("import","____wb_rewrite_import__");return n+=t.isModule?"import.meta.url, ":"null, ",n}]];var i})();class Po extends nr{constructor(){super({sourceCodeLocationInfo:!0})}_transformChunk(e){return super._transformChunk(e),""}_getRawHtml(e){const{droppedBufferSize:t,html:n}=this.tokenizer.preprocessor,r=e.startOffset-t,i=e.endOffset-t;return n.slice(r,i)}emitIfListenerExists(e,t){return super.emitIfListenerExists(e,t)||this.emitRaw(this._getRawHtml(t.sourceCodeLocation)),this.parserFeedbackSimulator.skipNextNewLine=!1,!0}_emitToken(e,t){this.emit(e,t,this._getRawHtml(t.sourceCodeLocation))}emitDoctype(e){let t=`<!DOCTYPE ${e.name}`;null!==e.publicId?t+=` PUBLIC "${e.publicId}"`:null!==e.systemId&&(t+=" SYSTEM"),null!==e.systemId&&(t+=` "${e.systemId}"`),t+=">",this.push(t)}emitStartTag(e){let t=`<${e.tagName}`;for(const n of e.attrs)t+=` ${n.name}="${Zn(n.value)}"`;t+=e.selfClosing?"/>":">",this.push(t)}emitEndTag(e){this.push(`</${e.tagName}>`)}emitText({text:e}){var t;this.push(!this.parserFeedbackSimulator.inForeignContent&&(t=this.tokenizer.lastStartTagName,_n.has(t)||t===wn.NOSCRIPT)?e:$n(e))}emitComment(e){this.push(`\x3c!--${e.text}--\x3e`)}emitRaw(e){this.push(e)}}const Lo=new TextEncoder,Do=new TextDecoder,Uo=/([\d.]+\s*;\s*(?:url\s*=)?\s*)['"]?(.+)['"]?(\s*)/im,Fo=["http://","https://","//"],Mo="mp_",jo=["utf-8","utf8"],Ho={a:{href:"ln_"},applet:{codebase:"oe_",archive:"oe_"},area:{href:Mo},audio:{src:"oe_"},base:{href:Mo},blockquote:{cite:Mo},body:{background:"im_"},button:{formaction:Mo},command:{icon:"im_"},del:{cite:Mo},embed:{src:"oe_"},iframe:{src:"if_"},image:{src:"im_","xlink:href":"im_",href:"im_"},img:{src:"im_",srcset:"im_"},ins:{cite:Mo},input:{src:"im_",formaction:Mo},form:{action:Mo},frame:{src:"fr_"},link:{href:"oe_"},meta:{content:"mt_"},object:{codebase:"oe_",data:"oe_"},param:{value:"oe_"},q:{cite:Mo},ref:{href:"oe_"},script:{src:"js_","xlink:href":"js_"},source:{src:"oe_",srcset:"oe_"},video:{src:"oe_",poster:"im_"}},Wo=[{match:/youtube.com\/v\/([^&]+)[&]/,replace:"youtube.com/embed/$1?"}],Qo=[{urlMatch:/[?&]:loadOrderID=([\d]+)/,match:/(loadOrderID&(quot;&)?#x[^;]+?;)([\d]+)/gi,replace:"$1$U1"}];class Vo{rewriter;rule=null;ruleMatch=null;isCharsetUTF8;detectedCharset="";jsOpts;constructor(e){this.rewriter=e,this.rule=null,this.jsOpts={baseUrl:e.baseUrl,prefix:e.prefix};for(const e of Qo){const t=this.rewriter.url.match(e.urlMatch);if(t){this.ruleMatch=t,this.rule=e;break}}this.isCharsetUTF8=e.isCharsetUTF8}detectMetaCharset(e){e.length>1024&&(e=e.slice(0,1024));const t=new TextDecoder("latin1").decode(e),n=t.match(/<meta[^>]*charset\s*=\s*["']?([^"'\s>/]+)["']?[^>]*>/i);if(n?.[1])return n[1].toLowerCase();const r=t.match(/<meta[^>]*http-equiv\s*=\s*["']?content-type["']?[^>]*content\s*=\s*["']?[^"']*charset\s*=\s*([^"'\s>/;]+)[^>]*>/i);return r?.[1]?r[1].toLowerCase():""}rewriteMetaContent(e,t,n){let r=this.getAttr(e,"http-equiv");if(r&&(r=r.toLowerCase()),"content-security-policy"===r)t.name="_"+t.name;else{if("refresh"===r)return t.value.replace(Uo,(e,t,r,i)=>t+this.rewriteUrl(n,r,!1,"mt_")+i);if("referrer"===this.getAttr(e,"name"))return"no-referrer-when-downgrade";if(M(t.value,Fo))return this.rewriteUrl(n,t.value)}return t.value}rewriteSrcSet(e,t){const n=/\s*(\S*\s+[\d.]+[wx]),|(?:\s*,(?:\s+|(?=https?:)))/,r=[];for(const i of e.split(n))if(i){const e=i.trim().split(" ");e[0]=this.rewriteUrl(t,e[0]),r.push(e.join(" "))}return r.join(", ")}rewriteTagAndAttrs(e,t,n){const r=e=>M(e,Fo),i=e.tagName;if(i.indexOf("-")>0)return"";let s="";const o=t=>{"iframe"===t&&(e.selfClosing&&(e.selfClosing=!1,s=t),e.attrs.push({name:"style",value:"border: none"})),e.tagName=t};for(const s of e.attrs){const a=s.name||"",c=s.value||"";if(c.startsWith("javascript:"))s.value="javascript:"+n.rewriteJS(c.slice(11),{inline:!0,...this.jsOpts});else if(a.startsWith("on")&&"-"!=a.slice(2,3))s.value=n.rewriteJS(c,{inline:!0,...this.jsOpts});else if("style"===a)s.value=n.rewriteCSS(s.value);else if("background"===a)s.value=this.rewriteUrl(n,c);else if("srcset"===a||"imagesrcset"===a&&"link"===i)s.value=this.rewriteSrcSet(c,n);else if("crossorigin"===a||"integrity"===a||"download"===a)s.name="_"+s.name;else if("meta"===i&&"content"===a)s.value=this.rewriteMetaContent(e.attrs,s,n);else if("meta"===i&&"charset"===a)c&&jo.includes(c.toLowerCase())&&(this.isCharsetUTF8=!0);else if("param"===i&&r(c))s.value=this.rewriteUrl(n,s.value);else if(a.startsWith("data-")&&r(c))s.value=this.rewriteUrl(n,s.value);else if("base"===i&&"href"===a)try{s.value=this.rewriter.updateBaseUrl(s.value)}catch(e){console.warn("Invalid <base>: "+s.value)}else if("script"===i&&"src"===a){const t="module"===this.getScriptRWType(e)?"esm_":"",r=this.rewriteUrl(n,s.value,!1,t);r===s.value?(e.attrs.push({name:"__wb_orig_src",value:s.value}),s.value&&s.value.startsWith("data:text/javascript;base64")?s.value=this.rewriteJSBase64(s.value,n):s.value=this.rewriteUrl(n,s.value,!0,t)):s.value=r}else if("object"===i&&"data"===a){const t=this.getAttr(e.attrs,"type");if("application/pdf"===t)s.name="src",s.value=this.rewriteUrl(n,s.value,!1,"if_"),o("iframe");else if("image/svg+xml"===t)s.name="src",s.value=this.rewriteUrl(n,s.value),o("img");else if("application/x-shockwave-flash"===t)for(const e of Wo){const t=s.value.replace(e.match,e.replace);if(t!==s.value){s.name="src",s.value=this.rewriteUrl(n,t,!1,"if_"),o("iframe");break}}}else if("embed"===i&&"src"===a){const t=this.getAttr(e.attrs,"type")||"";t.startsWith("image/")?(o("img"),s.value=this.rewriteUrl(n,c,!1,"mp_")):"application/pdf"!==t&&t.startsWith("application/")||(o("iframe"),s.value=this.rewriteUrl(n,c,!1,"if_"),"application/pdf"!==t&&e.attrs.push({name:"sandbox",value:"allow-same-origin allow-scripts"}))}else if("target"===a){const e=s.value;"_blank"!==e&&"_parent"!==e&&"_top"!==e&&"new"!==e||(s.value=L)}else(t[a]||"href"===a||"src"===a)&&(s.value=this.rewriteUrl(n,s.value,!1,t[a]))}return s}getAttr(e,t){for(const n of e)if(n.name===t)return n.value;return null}getScriptRWType(e){const t=this.getAttr(e.attrs,"type");return"module"===t?"module":"application/json"===t?"json":!t||t.indexOf("javascript")>=0||t.indexOf("ecmascript")>=0?"js":t.startsWith("text/")?"text":"importmap"===t?"importmap":""}async rewrite(e){let t=await e.getBuffer();if(!t)return e;if(t.length>5e7)return console.warn("Skipping rewriting, HTML file too big: "+t.length),e;const{bomFound:n,text:r}=await e.getText(this.isCharsetUTF8,!0);n&&(t=(new TextEncoder).encode(r),this.isCharsetUTF8=!0),this.isCharsetUTF8||this.rewriter.isCharsetDetected||(this.detectedCharset=this.detectMetaCharset(t),jo.includes(this.detectedCharset)&&(this.isCharsetUTF8=!0));const i=this.rewriter,s=new Po;s.tokenizer.preprocessor.bufferWaterline=1/0;let o=!1,a=!1,c=!0,l="",h="",u="";const p=()=>{if(!o&&i.headInsertFunc){this.detectedCharset&&s.emitRaw(`<meta charset="${this.detectedCharset}"/>`);const e=i.headInsertFunc(i.url);e&&s.emitRaw(e),o=!0}};s.on("startTag",e=>{const t=Ho[e.tagName],n=e.tagName,r=this.rewriteTagAndAttrs(e,t||{},i);switch(o||["head","html"].includes(e.tagName)||p(),s.emitStartTag(e),r&&s.emitEndTag({tagName:r}),e.tagName){case"script":if(e.selfClosing)break;l=e.tagName,c=!0,h=this.getScriptRWType(e);break;case"style":e.selfClosing||(l=e.tagName);break;case"head":p();break;case"body":a=!0}e.tagName!==n&&(l=n,u=e.tagName)}),s.on("endTag",e=>{if(e.tagName===l){switch(u&&(e.tagName=u,u=""),l){case"head":a=!0;break;case"script":a&&!c&&"js"===h&&s.emitRaw(";document.close();")}l=""}s.emitEndTag(e)}),s.on("text",(e,t)=>{const n=(()=>{if("script"===l){const t="module"===h;return c=c&&0===e.text.trim().length,"js"===h||t?i.rewriteJS(e.text,{isModule:t,...this.jsOpts}):"json"===h?i.rewriteJSON(e.text,{isModule:t,...this.jsOpts}):"importmap"===h?i.rewriteImportmap(e.text):e.text}return"style"===l?i.rewriteCSS(e.text):this.rewriteHTMLText(t)})();for(let e=0;e<n.length;e+=P)s.emitRaw(n.slice(e,e+P))});const d=this;return e.setReader(new ReadableStream({async start(e){s.on("data",t=>{e.enqueue(d.isCharsetUTF8?Lo.encode(t):q(t))}),s.on("end",()=>{e.close()}),d.isCharsetUTF8?s.write(Do.decode(t),"utf8"):s.write(z(t),"latin1"),p(),s.end()}})),e}rewriteUrl(e,t,n=!1,r=""){this.isCharsetUTF8||(t=Do.decode(q(t)));const i=e.rewriteUrl(t,n);return r&&r!==Mo&&"ln_"!==r&&"mt_"!==r?i.replace("mp_/",r+"/"):i}rewriteHTMLText(e){if(this.rule&&this.ruleMatch){const t=this.rule.replace.replace("$U1",this.ruleMatch[1]),n=e.replace(this.rule.match,t);if(e!==n)return n}return e}rewriteJSBase64(e,t){const n=e.split(","),r=t.rewriteJS(atob(n[1]),{isModule:!1,...this.jsOpts});return n[1]=btoa(r),n.join(",")}}class zo extends Vo{rewriteUrl(e,t,n=!1,r=""){return"if_"===r||"fr_"===r||"mt_"===r?e.fullRewriteUrl(t,n):"ln_"===r?(this.isCharsetUTF8||(t=Do.decode(q(t))),e.rewriteUrl(t,n)):e.httpToHttps?e.rewriteUrl(t,n):t}rewriteTagAndAttrs(e,t,n){const r=n;if(r.httpToHttps)return super.rewriteTagAndAttrs(e,t,n);const i=e.tagName;if("embed"===i||"object"===i)return super.rewriteTagAndAttrs(e,t,n);if(i.indexOf("-")>0)return"";for(const s of e.attrs){const o=s.name||"",a=s.value||"";"meta"===i&&"content"===o?s.value=this.rewriteMetaContent(e.attrs,s,n):(t[o]||"href"===o||"src"===o)&&(s.value=this.rewriteUrl(n,a,!1,t[o])),r.rewriteRelCanonical&&"link"===i&&"href"===o&&a&&"canonical"===this.getAttr(e.attrs,"rel")&&(s.value=r.rewriteUrl(s.value))}return""}}const qo=/(url\s*\(\s*[\\"']*)([^)'"]+)([\\"']*\s*\)?)/gi,Go=/(@import\s*[\\"']*)([^)'";]+)([\\"']*\s*;?)/gi,Ko=/WB_wombat_/g,Xo=/^(?:\s*(?:(?:\/\*[^*]*\*\/)|(?:\/\/[^\n]+[\n])))*\s*([\w.]+)\([{[]/,Yo=/[?].*(?:callback|jsonp)=([^&]+)/i,Jo=new Ci(class extends Ri{extraRules;firstBuff;lastBuff;constructor(e=[]){super(),this.extraRules=e,this.firstBuff=this.initLocalDecl(Ro),this.lastBuff="\n\n}"}initLocalDecl(e){const t="_____WB$wombat$assign$function_____";let n=`var ${t} = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };\nif (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } }\n{\n`;for(const r of e)n+=`let ${r} = ${t}("${r}");\n`;return n+="let arguments;\n",n+"\n"}getModuleDecl(e,t){return`import { ${e.join(", ")} } from "${t}__wb_module_decl.js";\n`}detectModuleOrStrict(e){return e.indexOf("import")>=0&&e.match(So)?"module":e.indexOf('"use strict";')>=0?"strict":e.indexOf("export")>=0&&e.match(Io)?"module":"lax"}parseGlobals(e,t){const n=bs.parse(e,{ecmaVersion:"latest"});let r=!1;const i=[],s=new Set,o=[];let a=-1;for(const e of n.body){const{type:n,start:c}=e;if("VariableDeclaration"===n){const{kind:n,declarations:r}=e;for(const e of r)if("Identifier"===e.id.type){const r=e.id.name;t.includes(r)?s.add(r):"const"!==n&&"let"!==n||(i.push({name:r,kind:n}),"let"===n&&(a!==c&&o.unshift(c),a=c))}}else if("ClassDeclaration"===n){if(e.id.name){const t=e.id.name;i.push({name:t,kind:"const"})}}else if(!r&&"ExpressionStatement"===n){const{expression:t}=e;if("CallExpression"===t.type){const{callee:e}=t;if("MemberExpression"===e.type){const{object:t,property:n}=e;"Identifier"===t.type&&"document"===t.name&&"Identifier"===n.type&&"write"===n.name&&(r=!0)}}}}let c=this.firstBuff;if(s.size){const e=t.filter(e=>!s.has(e));c=this.initLocalDecl(e)}let l=this.lastBuff;return r&&(l=";document.close();"+this.lastBuff),{names:i,letOffsets:o,firstBuff:c,lastBuff:l}}rewrite(e,t){if(void 0===t.isModule)switch(this.detectModuleOrStrict(e)){case"module":t.isModule=!0,t.isStrict=!0;break;case"strict":t.isModule=!1,t.isStrict=!0}else t.isModule&&(t.isStrict=!0);let n=Bo;t.isModule&&(n=[...n,this.getESMImportRule()]),this.extraRules.length?this.rules=[...n,...this.extraRules]:this.rules=n,this.compileRules();let r=super.rewrite(e,t);if(t.isModule)return this.getModuleDecl(Ro,t.prefix||"")+(t.moduleInsert||"")+r;const i=!!Oo.exec(e);t.inline&&(r=r.replace(/\n/g," "));const s=t.isWorker;if(s&&-1===e.indexOf("location"))return r;if(i){let n=this.firstBuff,i=this.lastBuff,o=Ro;s&&(n="{ const location = self._WB_wombat_location || self.location;\n",o=ko);let a="",c="",l="";if(r)try{const e=this.parseGlobals(r,o),{names:t,letOffsets:s}=e;n=e.firstBuff,i=e.lastBuff;for(const e of s)r=r.slice(0,e)+r.slice(e+3);for(const{name:e,kind:n}of t)if("const"===n){const t=`self.___WB_const_${e}`;c+=`${t} = ${e};\n`,l+=`${n} ${e} = ${t}; delete ${t};\n`}else"let"===n&&(a+=`let ${e};\n`);c&&(c="\n;"+c),l&&(l="\n"+l)}catch(e){console.warn(`acorn parsing failed, script len ${r.length}`)}r=a+n+r+c+i+l,t.inline&&(r=r.replace(/\n/g," "))}return r}getESMImportRule(){return[To,(e,t)=>{const n=(t.prefix||"").replace("mp_/","esm_/");return e.replace(Co,(e,r,i,s)=>{try{i=new URL(i,t.baseUrl).href,i=n+i}catch(e){}return r+i+s})}]}}),Zo=new Ci(Ri),$o=(new Ci(Ri,vi),["if_","fr_","ln_","oe_","mt_"]);class ea{urlRewrite;contentRewrite;baseUrl;dsRules;decode;prefix="";originPrefix="";relPrefix="";schemeRelPrefix="";scheme;url;responseUrl;isCharsetUTF8;isCharsetDetected=!1;headInsertFunc;workerInsertFunc;_jsonpCallback;constructor({baseUrl:e,prefix:t,responseUrl:n,workerInsertFunc:r=null,headInsertFunc:i=null,urlRewrite:s=!0,contentRewrite:o=!0,decode:a=!0,useBaseRules:c=!1}){if(this.urlRewrite=s,this.contentRewrite=o,this.dsRules=s&&!c?Jo:Zo,this.decode=a,this.prefix=t||"",this.prefix&&s){const e=new URL(this.prefix);this.originPrefix=e.origin,this.relPrefix=e.pathname,this.schemeRelPrefix=this.prefix.slice(e.protocol.length)}const l=new URL(n||e);this.scheme=l.protocol,e.startsWith("//")&&(e=this.scheme+e),this.url=this.baseUrl=e,this.headInsertFunc=i,this.workerInsertFunc=r,this.responseUrl=n||e,this.isCharsetUTF8=!1,this._jsonpCallback=null}getRewriteMode(e,t,n="",r=""){if(!r&&t){const e=(r=t.headers.get("Content-Type")||"").split(";");r=e[0],e.length>1&&(this.isCharsetUTF8="utf8"===e[1].trim().toLowerCase().replace("charset=","").replace("-",""),this.isCharsetDetected=!0)}if(r=r.toLowerCase(),"esm_"===e.mod&&(this.isCharsetUTF8=!0),e)switch(e.destination){case"style":return"css";case"script":return this.getScriptRewriteMode(r,n,e.mod,"js");case"worker":return"js-worker"}switch(r){case"text/html":return e.destination||"application/json"!==e.headers.get("Accept")?"html":"json";case"text/css":return"css";case"application/x-mpegurl":case"application/vnd.apple.mpegurl":return"hls";case"application/dash+xml":return"dash";case"":if(this.isGuessHtml(e,t))return"html";default:return this.getScriptRewriteMode(r,n,e.mod,"")}}isGuessHtml(e,t){if(e.destination&&"document"!==e.destination&&"iframe"!==e.destination)return!1;if(t.buffer)try{const e=(new TextDecoder).decode(t.buffer.slice(0,1024));if(/<\s*html/i.exec(e))return!0}catch(e){return!1}return!1}getScriptRewriteMode(e,t,n="",r=""){switch(e){case"text/javascript":case"application/javascript":case"application/x-javascript":return this.parseJSONPCallback(t)?"jsonp":t.endsWith(".json")?"json":"wkr_"===n||"wkrm_"===n?"js-worker":"js";case"application/json":return"json";default:return r}}async rewrite(e,t){const n=this.contentRewrite?this.getRewriteMode(t,e,this.baseUrl):null,r=Z(t),i=this.urlRewrite&&!r,s=this.rewriteHeaders(e.headers,this.urlRewrite,!!n,r);e.extraOpts?.detectedCT&&s.set("Content-Type",e.extraOpts.detectedCT);const o=e.headers.get("content-encoding"),a=e.headers.get("transfer-encoding");e.headers=s,this.decode&&(o||a)&&(e=await async function(e,t,n,r){if(e.reader&&r&&("gzip"===t&&!n||!t&&"gzip"===n))return e.setReader(new et(e.reader)),e;const i=await e.getBuffer()||[],s=new Uint8Array(i),o=await sr(s,t,n);return s!==o&&e.setBuffer(o),e}(e,o,a,null===n));const c={response:e,prefix:this.prefix,baseUrl:this.baseUrl};let l=null;switch(n){case"html":if(i)return await this.rewriteHtml(e);break;case"css":this.urlRewrite&&(l=this.rewriteCSS);break;case"js":l=this.rewriteJS,"esm_"===t.mod&&(c.isModule=!0);break;case"json":l=this.rewriteJSON;break;case"js-worker":"wkrm_"!==t.mod&&"esm_"!==t.mod||(c.isModule=!0),l=this.rewriteJSWorker;break;case"jsonp":l=this.rewriteJSONP;break;case"hls":l=mi;break;case"dash":l=yi}if(i&&(c.rewriteUrl=e=>this.rewriteUrl(e)),l){let{bomFound:t,text:n}=await e.getText(this.isCharsetUTF8);if(n=l.call(this,n,c),t&&!this.isCharsetUTF8){let e=s.get("Content-Type")||"";const t=e.split(";");e=t[0],e&&s.set("Content-Type",e+"; charset=utf-8"),this.isCharsetUTF8=!0}e.setText(n,this.isCharsetUTF8)}else{const n=Ei(t.url);if(n){const r=new URL(t.url),i=parseInt(r.searchParams.get(n.start)||""),s=parseInt(r.searchParams.get(n.end)||"");if(!isNaN(i)&&!isNaN(s)){const t=Number(e.headers.get("Content-Length")),n=s-i+1;t!==n&&(isNaN(t)||t>n)&&e.setRawRange(i,s)&&e.headers.set("Content-Length",String(n))}}}return e}updateBaseUrl(e){if(this.originPrefix&&e.startsWith(this.originPrefix)){const t=e.indexOf("/http");t>=0&&(e=e.slice(t+1))}if(this.baseUrl=new URL(e,this.baseUrl).href,e&&this.baseUrl!=e)try{e=new URL(e).href}catch(t){e.startsWith("//")&&(e=(e=new URL("https:"+e).href).slice(6))}return this.rewriteUrl(e)}isRewritableUrl(e){const t=["#","javascript:","data:","mailto:","about:","file:","blob:","{"];for(const n of t)if(e.startsWith(n))return!1;return!0}rewriteUrl(e,t=!1){if(!this.urlRewrite)return e;const n=e;return(e=e.trim()).startsWith("\\")&&(e=e.replace(/\\(?![//])/g,"/")),!e||!this.isRewritableUrl(e)||e.startsWith(this.prefix)||e.startsWith(this.relPrefix)?n:e.startsWith("http:")||e.startsWith("https:")||e.startsWith("https\\3a/")?this.prefix+e:e.startsWith("//")||e.startsWith("\\/\\/")?this.schemeRelPrefix+e:e.startsWith("/")?(e=new URL(e,this.baseUrl).href,this.relPrefix+e):t||e.indexOf("../")>=0?(e=new URL(e,this.baseUrl).href,this.prefix+e):n}async rewriteHtml(e){return new Vo(this).rewrite(e)}rewriteCSS(e){const t=this;function n(e,n,r,i){return r=r.trim(),n+t.rewriteUrl(r)+i}return e.replace(qo,n).replace(Go,n).replace(Ko,"")}rewriteJS(e,t){const n=t&&!t.rewriteUrl&&void 0===t.isModule&&!t.inline,r=n?Zo:this.dsRules,i=r.getRewriter(this.baseUrl);return i===r.defaultRewriter&&n?e:i.rewrite(e,t)}rewriteJSWorker(e,t){t.isWorker=!0;const n=this.workerInsertFunc(t.isModule??!1);return t.isModule?(t.moduleInsert=n,this.rewriteJS(e,t)):n+this.rewriteJS(e,t)}rewriteJSON(e,t){e=this.rewriteJSONP(e);const n=Zo.getRewriter(this.baseUrl);return n!==Zo.defaultRewriter?n.rewrite(e,t):e}rewriteImportmap(e){const t=e=>this.rewriteUrl(e).replace("mp_/","esm_/");try{const n=JSON.parse(e),r={},i={imports:r};for(const[e,i]of Object.entries(n.imports||{}))r[t(e)]=t(i);if(n.scopes){const e={};for(const[r,i]of Object.entries(n.scopes)){const n={};for(const[e,r]of Object.entries(i))n[t(e)]=t(r);e[t(r)]=n}i.scopes=e}return JSON.stringify(i,null,2)}catch(t){return console.warn("Error parsing importmap",t),e}}parseJSONPCallback(e){const t=e.match(Yo);return t&&"?"!==t[1]?(this._jsonpCallback=t[1],!0):(this._jsonpCallback=!1,!1)}rewriteJSONP(e){const t=e.match(Xo);return t?(null===this._jsonpCallback&&this.parseJSONPCallback(this.baseUrl),!1===this._jsonpCallback?e:this._jsonpCallback+e.slice(e.indexOf(t[1])+t[1].length)):e}rewriteHeaders(e,t,n,r){const i={"access-control-allow-origin":"prefix-if-url-rewrite","access-control-allow-credentials":"prefix-if-url-rewrite","access-control-expose-headers":"prefix-if-url-rewrite","access-control-max-age":"prefix-if-url-rewrite","access-control-allow-methods":"prefix-if-url-rewrite","access-control-allow-headers":"prefix-if-url-rewrite","accept-patch":"keep","accept-ranges":"keep",age:"prefix",allow:"keep","alt-svc":"prefix","cache-control":"prefix",connection:"prefix","content-base":"url-rewrite","content-disposition":"keep","content-encoding":"prefix-if-content-rewrite","content-language":"keep","content-length":"content-length","content-location":"url-rewrite","content-md5":"prefix","content-range":"keep","content-security-policy":"prefix","content-security-policy-report-only":"prefix","content-type":"keep",date:"keep",etag:"prefix",expires:"prefix","last-modified":"prefix",link:"link",location:"url-rewrite",p3p:"prefix",pragma:"prefix","proxy-authenticate":"keep","public-key-pins":"prefix","referrer-policy":"prefix","retry-after":"prefix",server:"prefix","set-cookie":"cookie",status:"prefix","strict-transport-security":"prefix",trailer:"prefix","transfer-encoding":"transfer-encoding",tk:"prefix",upgrade:"prefix","upgrade-insecure-requests":"prefix",vary:"prefix",via:"prefix",warning:"prefix","www-authenticate":"keep","x-frame-options":"prefix","x-xss-protection":"prefix","origin-agent-cluster":"prefix"},s="X-Archive-Orig-",o=new Headers;for(let[a,c]of e.entries())switch(i[a]){case"keep":case"cookie":default:o.append(a,c);break;case"url-rewrite":if(t){if("location"===a&&this.url!==this.responseUrl){const e="http:"===this.scheme?"https:":"http:";c===e+this.responseUrl.slice(this.scheme.length)&&(c=e+this.url.slice(this.url.indexOf("//")))}o.append(a,this.rewriteUrl(c))}else o.append(a,c);break;case"prefix-if-content-rewrite":n?o.append(s+a,c):o.append(a,c);break;case"prefix-if-url-rewrite":t?o.append(s+a,c):o.append(a,c);break;case"content-length":if("0"==c){o.append(a,c);continue}if(n)try{if(parseInt(c)>=0){o.append(a,c);continue}}catch(e){}o.append(a,c);break;case"transfer-encoding":case"prefix":o.append(s+a,c);break;case"link":t?o.append(a,this.rewriteLinkHeader(c,r)):o.append(a,c)}return o}rewriteLinkHeader(e,t=!1){try{e=e.replace(t?/<(.*?)>(?=[^,]+rel=["']?(?:preload|modulepreload|stylesheet))/g:/<(.*?)>/g,(e,t)=>"<"+this.rewriteUrl(t)+">")}catch(t){console.warn("Error parsing link header: "+e)}return e}}class ta extends ea{proxyOrigin;proxyHost;altProxyOrigins;localOrigin;proxyTLD;localTLD;localScheme;httpToHttps;rewriteRelCanonical;constructor(e,t,{rewriteRelCanonical:n=!1}){super(e),this.proxyOrigin=t.proxyOrigin,this.localOrigin=t.localOrigin,this.altProxyOrigins=t.altProxyOrigins,this.proxyTLD=t.proxyTLD||"",this.localTLD=t.localTLD||"";const r=new URL(this.proxyOrigin);this.proxyHost=r.host;const i=new URL(this.localOrigin);this.localScheme=i.protocol,this.httpToHttps=t.httpToHttpsNeeded,this.rewriteRelCanonical=n}rewriteUrl(e){if(e.startsWith(this.proxyOrigin))return this.localOrigin+e.slice(this.proxyOrigin.length);if(this.altProxyOrigins)for(const t of this.altProxyOrigins)if(e.startsWith(t))return this.localOrigin+e.slice(t.length);if(this.proxyTLD&&this.localTLD&&e.indexOf(this.proxyTLD)>0){const t=new URL(e);if(t.host.endsWith(this.proxyTLD)){const e=t.host.slice(0,-this.proxyTLD.length).replace(".","-")+this.localTLD;return this.localScheme+"//"+e+t.href.slice(t.origin.length)}}return this.httpToHttps?e.replace("http:","https:"):e}fullRewriteUrl(e,t=!1){return e.startsWith(this.proxyOrigin)?this.localOrigin+e.slice(this.proxyOrigin.length):e.startsWith("//"+this.proxyHost)?this.localOrigin+e.slice(this.proxyHost.length+2):e.startsWith("https://")||e.startsWith("http://")||e.startsWith("//")?super.rewriteUrl(e,t):e}async rewriteHtml(e){return new zo(this).rewrite(e)}rewriteJS(e,t){return e}rewriteCSS(e){return this.httpToHttps?super.rewriteCSS(e):e}rewriteJSON(e,t){return e}rewriteImportmap(e){return e}updateBaseUrl(e){return e}}async function na(e,t){const n=e.split("."),r=[];for(let e=0;e<n.length-1;e++)"www"!==n[e]&&r.push(n.slice(e).join("."));const i=r.length?r[r.length-1]:"";let s=(await fetch(t)).body;const o=new Headers({"Content-Type":"text/css"});if(!s)return new Response("",{status:400,headers:o,statusText:"Not Found"});t.endsWith(".gz")&&(s=s.pipeThrough(new self.DecompressionStream("gzip")));const a=s.pipeThrough(new ia),c=new TextEncoder,l=async function*(){for await(const e of async function*(e){try{let t;const n=e.getReader();for(;(t=await n.read())&&!t.done;){const e=t.value;if(i&&e.indexOf(i)>=0){const t=e.split("##");if(t.length<2)continue;if(t[0].endsWith("#@"))continue;const n=t[0].split(",");for(const e of r)if(n.includes(e)){yield t[1];break}}else!i&&e.startsWith("##")&&(yield e.slice(2))}}catch(e){console.warn(e)}}(a))yield c.encode(`${e} {\n display: none !important;\n}\n\n`)}(),h=new ReadableStream({pull:async e=>l.next().then(t=>{t.done||!t.value?e.close():e.enqueue(t.value)})});return new Response(h,{status:200,statusText:"OK",headers:o})}class ra{_buffer=[];_lastChunkEndedWithCR=!1;decoder=new TextDecoder;transform(e,t){const n=this.decoder.decode(e),r=n.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/g),i=this._buffer;for(this._lastChunkEndedWithCR&&n.startsWith("\n")&&r.shift(),i.length>0&&(i[i.length-1]+=r[0],r.shift()),this._lastChunkEndedWithCR=n.endsWith("\r");i.length>1;){const e=i.shift();e?.length&&t.enqueue(e)}for(;r.length>1;){const e=r.shift();e?.length&&t.enqueue(e)}}flush(e){const t=this._buffer;for(;t.length;){const n=t.shift();n?.length&&e.enqueue(n)}}}class ia extends TransformStream{constructor(){super(new ra)}}const sa='<!doctype html>\n<html>\n <head>\n <script>\n window.requestURL = $REQUEST_URL;\n window.redirectOnNotFound = $REDIRECT_NOT_FOUND;\n window.errorMsg = $REQUEST_ERR_MSG;\n window.errorTitle = $TITLE;\n window.errorReason = $REASON;\n <\/script>\n </head>\n <body style="font-family: sans-serif">\n <h2 id="title"></h2>\n <p id="msg"></p>\n <p>\n <code id="url" style="word-break: break-all; font-size: larger"></code>\n </p>\n <p id="#redirectMessage" style="display: none">\n Redirecting to live page now... (If this URL is a file download, the\n download should have started).\n </p>\n <script>\n if (window.redirectOnNotFound) {\n document.querySelector("redirectMessage").style.display = "initial";\n window.top.location.href = window.requestURL;\n }\n <\/script>\n <p id="goback" style="display: none">\n <a href="#" onclick="window.history.back()">Go Back</a> to the previous\n page.\n </p>\n\n <p>\n <a id="livelink" target="_blank" href="">Load the live page</a> in a new\n tab (or download the file, if this URL points to a file).\n </p>\n\n <script>\n document.querySelector("#title").innerText = window.errorTitle;\n document.title = window.errorTitle;\n\n document.querySelector("#url").innerText = window.requestURL;\n document.querySelector("#msg").innerText = window.errorMsg;\n document.querySelector("#livelink").href = window.requestURL;\n let isTop = true;\n try {\n if (window.parent._WB_wombat_location) {\n isTop = false;\n }\n } catch (e) {}\n if (isTop) {\n document.querySelector("#goback").style.display = "";\n\n window.parent.postMessage(\n {\n wb_type: "archive-not-found",\n reason: window.errorReason,\n url: window.requestURL,\n ts: $REQUEST_TS,\n },\n "*",\n );\n }\n <\/script>\n </body>\n</html>\n';let oa="";function aa(e,t,n=404){return ca(e,e.url,"",!1,"notFound",n,t)}function ca(e,t,n,r=!1,i="notFound",s=404,o){let a,c;switch(e.destination){case"json":case"":a=function(e,t,n,r="not_found"){return JSON.stringify({error:r,URL:e,TS:t,reason:n})}(t,n,i,o),c="application/json; charset=utf-8";break;case"script":a=ha("Script",t,n,i,o),c="text/javascript; charset=utf-8";break;case"style":a=ha("CSS",t,n,i,o),c="text/css; charset=utf-8";break;default:a=function(e,t,n,r,i,s){let o,a;switch(i){case"notFound":a="Archived Page Not Found",o="Sorry, this page was not found in this archive:";break;case"missingOriginalForDupe":a="Original Archived Page Missing",o="This page is marked as a duplicate but the original page is missing from the archive or has been removed."}let c=oa||sa;return c=c.replaceAll("$REQUEST_URL",JSON.stringify(t)),c=c.replaceAll("$REQUEST_TS",JSON.stringify(n)),c=c.replaceAll("$REDIRECT_NOT_FOUND",r&&"navigate"===e.mode?"1":"0"),c=c.replaceAll("$TITLE",JSON.stringify(a)),c=c.replaceAll("$REQUEST_ERR_MSG",JSON.stringify(s||o)),c=c.replaceAll("$REASON",JSON.stringify(i)),c}(e,t,n,r,i,o),c="text/html; charset=utf-8"}return la(a,c,s)}function la(e,t,n=200){const r=(new TextEncoder).encode(e),i={status:n,statusText:J(n),headers:{"Content-Type":t,"Content-Length":r.length+"","Content-Security-Policy":F()}};return new Response(r,i)}function ha(e,t,n,r,i){return`/*\n ${i||e+" Not Found"}\n URL: ${t}\n TS: ${n}\n reason: ${r}\n*/\n `}function ua(e,t){return la(function(e,t){return`\n <!doctype html>\n <html>\n <head>\n <script>\n window.requestURL = ${JSON.stringify(e)};\n <\/script>\n </head>\n <body style="font-family: sans-serif">\n <h2>Live page could not be loaded</h2>\n <p>\n Sorry, this page was could not be loaded through the archiving proxy.\n Check the URL and try again.\n </p>\n <p>\n <code\n id="url"\n style="word-break: break-all; font-size: larger"\n ></code>\n </p>\n <p id="goback" style="display: none">\n <a href="#" onclick="window.history.back()">Go Back</a> to the\n previous page.\n </p>\n\n <script>\n document.getElementById("url").innerText = ${JSON.stringify(`Status Code: ${t}`)};\n let isTop = true;\n try {\n if (window.parent._WB_wombat_location) {\n isTop = false;\n }\n } catch (e) {}\n if (isTop) {\n document.querySelector("#goback").style.display = "";\n\n window.parent.postMessage(\n {\n wb_type: "live-proxy-url-error",\n url: window.requestURL,\n status: ${JSON.stringify(t)},\n },\n "*",\n );\n }\n <\/script>\n </body>\n </html>\n `}(e,t),"text/html",t)}const pa={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/dicom":["dcm"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg","one","onea"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"application/zip+dotlottie":["lottie"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a","m4b"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/ief":["ief"],"image/jaii":["jaii"],"image/jais":["jais"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpg","jpeg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxl":["jxl"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/pjpeg":["jfif"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime","mht","mhtml"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step":["step","stp","stpnc","p21","210"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts","m2t","m2ts","mts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(pa);const da=pa;var fa,ga,ma,wa=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};fa=new WeakMap,ga=new WeakMap,ma=new WeakMap;const ya=class{constructor(...e){fa.set(this,new Map),ga.set(this,new Map),ma.set(this,new Map);for(const t of e)this.define(t)}define(e,t=!1){for(let[n,r]of Object.entries(e)){n=n.toLowerCase(),r=r.map(e=>e.toLowerCase()),wa(this,ma,"f").has(n)||wa(this,ma,"f").set(n,new Set);const e=wa(this,ma,"f").get(n);let i=!0;for(let s of r){const r=s.startsWith("*");if(s=r?s.slice(1):s,e?.add(s),i&&wa(this,ga,"f").set(n,s),i=!1,r)continue;const o=wa(this,fa,"f").get(s);if(o&&o!=n&&!t)throw new Error(`"${n} -> ${s}" conflicts with "${o} -> ${s}". Pass \`force=true\` to override this definition.`);wa(this,fa,"f").set(s,n)}}return this}getType(e){if("string"!=typeof e)return null;const t=e.replace(/^.*[/\\]/s,"").toLowerCase(),n=t.replace(/^.*\./s,"").toLowerCase(),r=t.length<e.length;return n.length<t.length-1||!r?wa(this,fa,"f").get(n)??null:null}getExtension(e){return"string"!=typeof e?null:(e=e?.split?.(";")[0],(e&&wa(this,ga,"f").get(e.trim().toLowerCase()))??null)}getAllExtensions(e){return"string"!=typeof e?null:wa(this,ma,"f").get(e.toLowerCase())??null}_freeze(){this.define=()=>{throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances")},Object.freeze(this);for(const e of wa(this,ma,"f").values())Object.freeze(e);return this}_getTestState(){return{types:wa(this,fa,"f"),extensions:wa(this,ga,"f")}}},ba=(new ya(da)._freeze(),Ea([80,75,3,4])),Aa=Ea([31,139,8]),va=Ea([87,65,82,67]),_a=(new ya).define(da).define({"application/x-javascript":[".js"]});function Ea(e){return t=>{for(const[n,r]of e.entries())if(r!==t[n])return!1;return!0}}async function xa(e){const t=e.body.getReader();let n="";const{value:r,done:i}=await t.read();var s;return!i&&r.length>=4&&(s=r.slice(0,4),n=ba(s)?".wacz":va(s)?".warc":Aa(s)?".warc.gz":"",n||(n=function(e){try{const t=(new TextDecoder).decode(e).split("\n");if(t.length>1&&t.indexOf(" {")>=0)return".cdxj"}catch(e){return""}}(r))),i||t.cancel().catch(()=>{}),n}class Sa{name;store;config;metadata;injectScripts;noRewritePrefixes;noPostToGet;convertPostToGet;coHeaders;csp;injectRelCanon;baseFramePrefix;baseFrameUrl;baseFrameHashReplay=!1;baseFrameAppendReplay=!1;liveRedirectOnNotFound=!1;rootPrefix;isRoot;prefix;adblockUrl;excludeUrlPaths;staticPrefix;proxyPrefix;proxyBannerUrl="";proxyCustomInsert="";proxyHomePageUrl;constructor(e,t,n={}){const{name:r,store:i,config:s}=e;this.name=r,this.store=i,this.config=s,this.metadata=this.config.metadata?this.config.metadata:{};const o={...n,...this.config.extraConfig};this.injectScripts=o.injectScripts||[],this.noRewritePrefixes=o.noRewritePrefixes||null,this.noPostToGet=!!o.noPostToGet,this.convertPostToGet=!!o.convertPostToGet,this.coHeaders=o.coHeaders||!1,this.injectRelCanon=o.injectRelCanon||!1,this.baseFramePrefix=o.baseUrlSourcePrefix,this.baseFrameUrl=o.baseUrl,this.baseFrameHashReplay=o.baseUrlHashReplay||!1,this.baseFrameAppendReplay=o.baseUrlAppendReplay||!1,this.liveRedirectOnNotFound=o.liveRedirectOnNotFound||!1,this.rootPrefix=t.root||t.main,this.proxyHomePageUrl=o.proxyHomePageUrl,this.adblockUrl=o.adblockUrl,this.excludeUrlPaths=o.excludeUrlPaths,this.prefix=t.main,this.proxyBannerUrl=o.proxyBannerUrl||"",this.proxyBannerUrl&&ce([this.proxyBannerUrl]),this.proxyCustomInsert=o.proxyCustomInsert||"",this.config.root?(this.isRoot=!0,this.csp=o.csp||F()):(this.prefix+=this.name+"/",this.isRoot=!1,this.csp=o.csp||F()+this.name+"/"),this.staticPrefix=t.static,this.proxyPrefix=t.proxy}async handleRequest(e,t){let n=e.url,r=e.timestamp;if(!e.mod)return await this.makeTopFrame(n,r);if(this.noPostToGet||(n=await e.convertPostToGet()),e.isProxyOrigin&&this.proxyHomePageUrl&&e.proxyOrigin&&n.startsWith(e.proxyOrigin)&&"/"===new URL(n).pathname)return fetch(this.proxyHomePageUrl,{mode:"no-cors"});if(this.excludeUrlPaths?.length)for(const t of this.excludeUrlPaths)if(n.startsWith(t))return aa(e.request);let i=null,s=n;try{if(n.startsWith("srcdoc:"))i=this.getSrcDocResponse(n,n.slice(7));else if(n.startsWith("blob:")){const e=n.indexOf("/"),t=n.slice(5,e),r=`blob:${self.location.origin}/${t}`;s=n.slice(e+1),i=await this.getBlobResponse(r)}else"about:blank"===n?i=await this.getSrcDocResponse(n):"__wb_module_decl.js"===n?i=await this.getWrappedModuleDecl():this.adblockUrl&&n.startsWith("adblock:")?i=await na(n.slice(8),this.adblockUrl):(i=await this.getReplayResponse(e,t),n=e.url,i&&i instanceof Lt&&i.updateTS&&(r=i.updateTS))}catch(t){if(t instanceof oi)return ca(e.request,n,r,this.liveRedirectOnNotFound,"missingOriginalForDupe",404);if(await $(t,this.config))return aa(e.request,"Please wait, this page will reload after authentication...",401)}if(!i){try{n=decodeURIComponent(n),n+=e.hash}catch(e){}return ca(e.request,n,r,this.liveRedirectOnNotFound)}if(i instanceof Response)return i;i.noRW||(i=e.isProxyOrigin?await this.proxyRewrite(e,i,s,r):await this.fullRewrite(e,i,s,n,r));const o=e.headers.get("range");!o||200!==i.status&&206!==i.status||i.setRange(o);let a=!1;if("dl_"===e.mod){const t=i.headers.get("Content-Disposition");if(!t?.match(/^attachment\s*;/i)){const t=await async function(e,t){let n="";try{const t=new URL(e.url.startsWith("//")?"https:"+e.url:e.url);n=t.pathname.slice(t.pathname.lastIndexOf("/")+1)}catch(e){}if(n||(n="index"),-1===n.indexOf(".")){const e=t.headers.get("content-type"),r=e?_a.getExtension(e):"";r&&(n+="."+r)}const r=encodeURIComponent(n);return r!==n?`filename*=UTF-8''${r}`:`filename="${n}"`}(e,i);i.headers.set("Content-Disposition",`attachment; ${t}`)}}else a="iframe"===e.destination||"document"===e.destination;return i.makeResponse(this.coHeaders,a)}async fullRewrite(e,t,n,r,i){const s=this.prefix+(e.pageId?`:${e.pageId}/`:""),o=s+i,a=t,c=$o.includes(e.mod)?"mp_":e.mod,l="id_"===c||"wkrf_"===c||"dl_"===c,h=o+c+"/",u={baseUrl:n,responseUrl:t.url,prefix:h,headInsertFunc:t=>{const n=o+(i?"/":"")+t;return this.makeHeadInsert(t,i,n,s,a,e.referrer)},workerInsertFunc:e=>{const t=`new WBWombat(\n {"prefix": "${o}",\n "mod": "wkr_",\n "originalURL": "${r}"\n })`;return e?`import '${this.staticPrefix}wombatWorkers.js'; if (!self.__wb_wombat) { self.__wb_wombat = ${t} }`:`\n { if (!self.__wb_wombat) { self.importScripts('${this.staticPrefix}wombatWorkers.js'); self.__wb_wombat = ${t};} }`},urlRewrite:!l,contentRewrite:!l,decode:this.config.decode},p=new ea(u);return(t=await p.rewrite(t,e)).headers.set("Content-Security-Policy",this.csp),t}async proxyRewrite(e,t,n,r){const i=this.prefix+(e.pageId?`:${e.pageId}/`:""),s=t.date.toISOString(),o=i+(r||j(s)),a=o+"mp_/",c={baseUrl:n,responseUrl:t.url,prefix:a,headInsertFunc:n=>{const i=this.getCookiePreset(t,e.proxyScheme),a=W(t.date),c=t.extraOpts,l=c?.disableMSE;return`\n\x3c!-- WB Insert --\x3e\n<script>\n const wbinfo = {};\n wbinfo.url = "${n}";\n wbinfo.request_ts = "${r}";\n wbinfo.timestamp = "${s}";\n wbinfo.proxyOrigin = "${e.proxyOrigin||""}";\n wbinfo.localOrigin = "${e.localOrigin||""}";\n wbinfo.localTLD = "${e.localTLD||""}";\n wbinfo.proxyTLD = "${e.proxyTLD||""}";\n wbinfo.prefix = "${o}";\n wbinfo.presetCookie = ${i};\n wbinfo.seconds = "${a}";\n self.__wbinfo = wbinfo;\n<\/script>\n<script src="${this.staticPrefix}wombatProxy.js"><\/script>\n${this.proxyBannerUrl?`\n<script src="${this.proxyPrefix}${this.proxyBannerUrl}"><\/script>`:""}\n${this.proxyCustomInsert?this.proxyCustomInsert:""}\n${l?Ai:""}\n\x3c!-- End WB Insert --\x3e\n `},workerInsertFunc:null,urlRewrite:!0,contentRewrite:!0,decode:this.config.decode},l=this.config.extraConfig||{},h=new ta(c,e,{rewriteRelCanonical:l.proxyRewriteRelCanonical});return t=await h.rewrite(t,e)}getCookiePreset(e,t){let n=e.headers.get("x-wabac-preset-cookie")||"";const r=e.headers.get("Set-Cookie");return r&&(n=function(e,t){e=e.replace(D,"");const n=[];for(const r of e.split(",")){const e=r.split(";",1)[0];if(e!==r){const n=r.slice(e.length).toLowerCase();if(n.indexOf("httponly")>0)continue;if("http"===t&&n.indexOf("secure")>0)continue}n.push(e)}return n.join(";")}(r,t)+";"+n),n?JSON.stringify(n):'""'}getCanonRedirect(e){let{url:t,timestamp:n,mod:r,referrer:i}=e;const s=t.startsWith("//");s&&(t=(i&&i.indexOf("/http://")>0?"http:":"https:")+t);try{const i=new URL(t);if(i.href!==t){if("/"===i.pathname){let e=this.prefix+n+r;return(n||r)&&(e+="/"),e+=i.href,Response.redirect(e,301)}(!s&&t.indexOf(":443")||t.indexOf(":80"))&&(e.url=i.href)}}catch(e){}return null}getWrappedModuleDecl(){const e=(new TextEncoder).encode('\n var wrapObj = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };\n if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } }\n\n const window = wrapObj("window");\n const document = wrapObj("document");\n const location = wrapObj("location");\n const top = wrapObj("top");\n const parent = wrapObj("parent");\n const frames = wrapObj("frames");\n const opener = wrapObj("opener");\n const __self = wrapObj("self");\n const __globalThis = wrapObj("globalThis");\n\n export { window, document, location, top, parent, frames, opener, __self as self, __globalThis as globalThis };\n '),t=new Headers({"Content-Type":"application/javascript"});return new Response(e,{headers:t,status:200,statusText:"OK"})}getSrcDocResponse(e,t){const n=t?decodeURIComponent(atob(t)):"<html><head></head><body></body></html>",r=(new TextEncoder).encode(n),i=new Headers({"Content-Type":"text/html"}),s=new Date;return new Lt({payload:r,status:200,statusText:"OK",headers:i,url:e,date:s})}async getBlobResponse(e){const t=await fetch(e),n=t.status,r=t.statusText,i=new Headers(t.headers);"application/xhtml+xml"===i.get("content-type")&&i.set("content-type","text/html");const s=new Date,o=new Uint8Array(await t.arrayBuffer());return new Lt({payload:o,status:n,statusText:r,headers:i,url:e,date:s})}async getReplayResponse(e,t){let n=this.getCanonRedirect(e);if(n)return n;const r={pageId:e.pageId,noRedirect:e.isProxyOrigin};if(n=await this.store.getResource(e,this.prefix,t,r),!n&&e.altProxyOrigins&&e.isProxyOrigin&&e.proxyOrigin&&e.url.startsWith(e.proxyOrigin)){const i=e.url;for(const s of e.altProxyOrigins)if(e.url=i.replace(e.proxyOrigin,s),n=await this.store.getResource(e,this.prefix,t,r),n)break}return n}async makeTopFrame(e,t){let n="";if(this.baseFrameUrl&&!this.baseFramePrefix?n=this.baseFrameUrl:!this.isRoot&&this.config.sourceUrl&&(n=this.baseFramePrefix||"./",n+=`?source=${this.config.sourceUrl}`),n)return this.baseFrameAppendReplay?n+=`${t}/${e}`:this.baseFrameHashReplay?n+=`#${t}/${e}`:n+="#"+new URLSearchParams({url:e,ts:t,view:"replay"}).toString(),Response.redirect(n);let r="";if(this.config.topTemplateUrl){const n=await fetch(this.config.topTemplateUrl);r=(await n.text()).replace("$URL",e).replace("$TS",t).replace("$PREFIX",this.prefix)}else r=`\n<!DOCTYPE html>\n<html>\n<head>\n<style>\nhtml, body\n{\n height: 100%;\n margin: 0px;\n padding: 0px;\n border: 0px;\n overflow: hidden;\n}\n\n</style>\n<script src='${this.staticPrefix}wb_frame.js'> <\/script>\n\n<script>\nwindow.home = "${this.rootPrefix}";\n<\/script>\n\n<script src='${this.staticPrefix}default_banner.js'> <\/script>\n<link rel='stylesheet' href='${this.staticPrefix}default_banner.css'/>\n\n</head>\n<body style="margin: 0px; padding: 0px;">\n<div id="wb_iframe_div">\n<iframe id="replay_iframe" name="${L}" frameborder="0" seamless="seamless" scrolling="yes" class="wb_iframe" allow="autoplay; fullscreen"></iframe>\n</div>\n<script>\n var cframe = new ContentFrame({"url": "${e}",\n "app_prefix": "${this.prefix}",\n "content_prefix": "${this.prefix}",\n "request_ts": "${t}",\n "iframe": "#replay_iframe"});\n\n<\/script>\n</body>\n</html>\n`;const i={status:200,statusText:"OK",headers:{"Content-Type":"text/html","Content-Security-Policy":this.csp}};return new Response(r,i)}makeHeadInsert(e,t,n,r,i,s){const o=this.name,a=i.date,c=i.isLive,l=i.extraOpts,h=W(a),u=j(a.toISOString()),p=new URL(e);let d;d="https:"!==p.protocol&&"http:"!==p.protocol?s&&s.indexOf("/http://")>0?"http":"https":p.protocol.slice(0,-1);const f=this.getCookiePreset(i,d),g=l&&Number(l.pixelRatio)?l.pixelRatio:2,m=l?.storage?JSON.stringify(l.storage):'""',w=l?.disableMSE;return`\n\x3c!-- WB Insert --\x3e\n${this.adblockUrl?`\n<link rel='stylesheet' href="${r}mp_/adblock:${p.hostname}"/>\n<link rel='stylesheet' href="${r}mp_/adblock:"/>\n`:""}\n<style>\nbody {\n font-family: inherit;\n font-size: inherit;\n}\n</style>\n${this.injectRelCanon?`<link rel="canonical" href="${e}"/>`:""}\n<script>\n wbinfo = {};\n wbinfo.top_url = "${n}";\n // Fast Top-Frame Redirect\n if (window == window.top && wbinfo.top_url) {\n var loc = window.location.href.replace(window.location.hash, "");\n loc = decodeURI(loc);\n\n if (loc != decodeURI(wbinfo.top_url)) {\n window.location.href = wbinfo.top_url + window.location.hash;\n }\n }\n wbinfo.url = "${e}";\n wbinfo.timestamp = "${u}";\n wbinfo.request_ts = "${t}";\n wbinfo.prefix = decodeURI("${r}");\n wbinfo.mod = "mp_";\n wbinfo.is_framed = true;\n wbinfo.is_live = ${c?"true":"false"};\n wbinfo.coll = "${o}";\n wbinfo.proxy_magic = "";\n wbinfo.static_prefix = "${this.staticPrefix}";\n wbinfo.enable_auto_fetch = true;\n wbinfo.presetCookie = ${f};\n wbinfo.storage = ${m};\n wbinfo.isSW = true;\n wbinfo.injectDocClose = true;\n wbinfo.pixel_ratio = ${g};\n wbinfo.convert_post_to_get = ${this.convertPostToGet};\n wbinfo.target_frame = "${L}";\n<\/script>\n<script src='${this.staticPrefix}wombat.js'> <\/script>\n<script>\n wbinfo.wombat_ts = "${c?u:t}";\n wbinfo.wombat_sec = "${h}";\n wbinfo.wombat_scheme = "${d}";\n wbinfo.wombat_host = "${p.host}";\n\n ${this.noRewritePrefixes?`\n wbinfo.wombat_opts = {"no_rewrite_prefixes": ${JSON.stringify(this.noRewritePrefixes)}}`:"\n wbinfo.wombat_opts = {}\n "}\n\n if (window && window._WBWombatInit) {\n window._WBWombatInit(wbinfo);\n }\n ${w?Ai:""}\n<\/script>\n${this.injectScripts.map(e=>`<script src='${this.proxyPrefix}${e}'> <\/script>`).join("")}\n\x3c!-- End WB Insert --\x3e\n`}}class Ia extends ar{har;pageRefs;constructor(e){super(),this.har="string"==typeof e?JSON.parse(e):e,this.pageRefs={}}async load(e){this.db=e,this.parseEntries(this.har),this.parsePages(this.har),await this.finishIndexing()}parsePages(e){for(const t of e.log.pages){if(!t.pageTimings?.onLoad)continue;let e;e=t.title&&(t.title.startsWith("http:")||t.title.startsWith("https:"))?t.title:this.pageRefs[t.id];const n=t.title||e,r=t.startedDateTime;this.addPage({url:e,date:r,title:n})}}parseEntries(e){for(const t of e.log.entries){const n=new Date(t.startedDateTime).getTime(),r={};for(const{name:e,value:n}of t.response.headers)r[e]=n;let i=null;const s=new TextEncoder;if(t.response.content?.text)try{i=Uint8Array.from(atob(t.response.content.text),e=>e.charCodeAt(0))}catch(e){i=t.response.content.text}else{const e=r["Content-Length"];e&&"0"!==e?(console.log(`Warning: Content-Length ${e} but no content found for ${t.request.url}`),i=s.encode("Sorry, the HAR file did not include the content for this resource.")):i=Uint8Array.from([])}this.addResource({url:t.request.url,ts:n,status:t.response.status,respHeaders:r,payload:i}),t.pageref&&!this.pageRefs[t.pageref]&&(this.pageRefs[t.pageref]=t.request.url)}}}const Ta="req.http:cookie",Ca=["text/javascript","application/javascript","application/x-javascript","application/json","application/octet-stream","text/html"];class Ra extends cr{cdxindexer=null;sourceExtra;shaPrefix;constructor(e,t,n,r={},i="sha256:"){super(e,t,n),this.sourceExtra=r,this.shaPrefix=i}filterRecord(e){switch(e.warcType){case"warcinfo":case"revisit":case"request":return null;case"metadata":return this.shouldIndexMetadataRecord(e)?null:"skip"}const t=e.warcTargetURI,n=e.warcDate?new Date(e.warcDate).getTime():Date.now();return this.pageMap[n+"/"+t]?(e._isPage=!0,null):null}index(e,t){return e&&(e._offset=t.offset,e._length=t.recordLength),super.index(e,t)}indexReqResponse(e,t,n){if(e._isPage)return super.indexReqResponse(e,t,n);if("warcinfo"===e.warcType)return void this.parseWarcInfo(e);this.cdxindexer||(this.cdxindexer=new It({noSurt:!0}));const r=this.cdxindexer.indexRecordPair(e,t,n,"");if(r){if(206===r.status){const t=e.httpHeaders?.headers;if(t&&!this.isFullRangeRequest(t))return}if(t&&t.httpHeaders){const e=t.httpHeaders.headers.get("cookie");e&&(r[Ta]=e)}this.addCdx(r)}}getSource(e){return{...this.sourceExtra,path:e.filename,start:Number(e.offset),length:Number(e.length)}}addCdx(e){const{url:t,mime:n}=e,r=Number(e.status)||200,i=H(e.timestamp).getTime(),s=this.getSource(e);let{digest:o,recordDigest:a}=e;o&&-1===o.indexOf(":")&&(o=this.shaPrefix+o);const c={url:t,ts:i,status:r,digest:o,recordDigest:a,mime:n,loaded:!1,source:s};if(e.method){if("HEAD"===e.method||"OPTIONS"===e.method)return;c.method=e.method}if(e[Ta]&&(c[Ta]=e[Ta]),e.method&&"GET"!==e.method)if(c.url=je(e.url,e.requestBody||"",e.method),n&&Ca.includes(n))try{const e=new URL(c.url);for(const[t,n]of e.searchParams)n.length>Tt&&e.searchParams.set(t,n.slice(0,Tt));c.url=e.href}catch(e){c.url=c.url.slice(0,8192)}else c.url.length>512&&(c.url=c.url.slice(0,512));this.addResource(c)}}class ka extends Ra{async load(e,t,n){this.db=e;let r=this.reader;r.iterLines||(r=new et(this.reader));let i=0;for await(const s of r.iterLines()){let r,o,a;i+=s.length;let c=s.trimEnd();if(!c.startsWith("{")){const e=c.indexOf(" {");if(e<0)continue;[o,a]=c.split(" ",2),c=c.slice(e)}try{r=JSON.parse(c)}catch(e){console.log("JSON Parser error on: "+c);continue}r.timestamp=a,r.url||(r.url=o,console.warn(`URL missing, using urlkey ${o}`)),t&&n&&this.isBatchFull()&&t(Math.round(i/n*100),null,i,n),this.addCdx(r)}return await this.finishIndexing(),t&&t(100,null,n,n),{}}}const Na=4294967295,Oa=65535;class Ba{start;length;constructor(e,t){this.start=e,this.length=t}}let Pa=!1;class La extends et{hasher=null;hashInited=!1;hash="";constructor(e,t="gzip",n=!1){super(e,t,n)}async initHasher(){try{this.hasher=await De()}catch(e){console.warn("Hasher init failed, not checking hashes: "+e.toString())}finally{this.hashInited=!0}}async _loadNext(){const e=await super._loadNext();return e?(this.hashInited||await this.initHasher(),this.hasher&&this.hasher.update(e)):this.hasher&&(this.hash="sha256:"+this.hasher.digest("hex"),this.hasher=null),e}getHash(){return this.hash}}class Da{loader;entriesUpdated=!1;entries=null;constructor(e,t=null){this.loader=e,this.entries=t,this.entriesUpdated=!1}async load(e=!1){if(!this.entries||e){const t=65558,n=await this.loader.getRangeFromEnd(t,!1),r=Math.max(await this.loader.getLength()-t,0);try{this.entries=this._loadEntries(n,r)}catch(e){if(e instanceof Ba){const t=Qe([await this.loader.getRange(e.start,e.length,!1),n],e.length+n.length);this.entries=this._loadEntries(t,e.start)}}this.entriesUpdated=!0}return this.entries}_loadEntries(e,t){const n=e.byteLength;if(!n)return null;const r=new DataView(e.buffer,e.byteOffset,e.byteLength),i=new TextDecoder("utf8"),s=new TextDecoder("ascii"),o={};let a=0,c=0,l=n;for(let t=n-22,i=Math.max(0,t-Oa);t>=i;--t)if(80===e[t]&&75===e[t+1]&&5===e[t+2]&&6===e[t+3]){l=t,c=r.getUint32(t+16,!0),a=r.getUint16(t+8,!0);break}if(c===Na||a===Oa){if(117853008!==r.getUint32(l-20,!0))return console.warn("invalid zip64 EOCD locator"),null;const e=this.getUint64(r,l-12,!0)-t;if(101075792!==r.getUint32(e,!0))return console.warn("invalid zip64 EOCD record"),null;a=this.getUint64(r,e+32,!0),c=this.getUint64(r,e+48,!0)}if(c>=t)c-=t;else if(c<t&&c>0)throw new Ba(c,t-c);if(c>=n||c<0)for(c=-1,a=Oa;++c<n&&80!==e[c]&&75!==e[c+1]&&1!==e[c+2]&&2!==e[c+3];);for(l-=46;--a>=0&&c<l&&1347092738==r.getUint32(c);){const t=r.getUint16(c+8,!0);let n=r.getUint32(c+20,!0),a=r.getUint32(c+24,!0);const l=r.getUint16(c+28,!0),h=r.getUint16(c+30,!0),u=r.getUint16(c+32,!0),p=8===r.getUint16(c+10,!0);let d=r.getUint32(c+42,!0);const f=(2048&t?i:s).decode(e.subarray(c+46,c+46+l));if(n===Na||a===Na||d===Na){let e=c+46+l;const t=e+h-3;for(;e<t;){const t=r.getUint16(e,!0);let i=r.getUint16(e+2,!0);e+=4,1===t&&(a===Na&&i>=8&&(a=this.getUint64(r,e,!0),e+=8,i-=8),n===Na&&i>=8&&(n=this.getUint64(r,e,!0),e+=8,i-=8),d===Na&&i>=8&&(d=this.getUint64(r,e,!0),e+=8,i-=8)),e+=i}}f.endsWith("/")||(o[f]={filename:f,deflate:p,uncompressedSize:a,compressedSize:n,localEntryOffset:d},h||(o[f].offset=30+l+d)),c+=46+l+h+u}return o}getCompressedSize(e){if(null===this.entries)return 0;const t=this.entries[e];return t?isNaN(t.compressedSize)?0:t.compressedSize:0}async loadFile(e,{offset:t=0,length:n=-1,signal:r=null,unzip:i=!1,computeHash:s=!1}={}){if(null===this.entries&&await this.load(),!this.entries)throw new Error("entries not loaded");const o=this.entries[e];if(!o)throw new Error("file not found in zip: "+e);if(void 0===o.offset){const e=await this.loader.getRange(o.localEntryOffset,30,!1),t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=t.getUint16(26,!0),r=t.getUint16(28,!0);o.offset=30+n+r+o.localEntryOffset,this.entriesUpdated=!0}n=n<0?o.compressedSize:Math.min(n,o.compressedSize-t),t+=o.offset;const a=(await this.loader.getRange(t,n,!0,r)).getReader();let c,l=null;return c=i?o.deflate?new et(new et(a,"deflate")):new et(a):new et(a,o.deflate?"deflate":null),c=(e=>s&&Pa?(l=new La(e),l):e)(c),{reader:c,hasher:l}}getUint64(e,t,n){const r=e.getUint32(t,n),i=e.getUint32(t+4,n),s=n?r+2**32*i:2**32*r+i;return Number.isSafeInteger(s)||console.warn(s,"exceeds MAX_SAFE_INTEGER. Precision may be lost"),s}}class Ua extends Jr{zipreader;filename;constructor(e,t){super(!0),this.zipreader=e,this.filename=t}get isValid(){return!0}async doInitialFetch(e=!1){await this.zipreader.load(),this.length=this.zipreader.getCompressedSize(this.filename);let t=null;if(!e){const{reader:e}=await this.zipreader.loadFile(this.filename,{unzip:!0});t=ii(e)}return{response:new Response(t),abort:null}}async getLength(){return null===this.length&&await this.doInitialFetch(!0),this.length||0}async getRange(e,t,n=!1,r=null){const{reader:i}=await this.zipreader.loadFile(this.filename,{offset:e,length:t,signal:r,unzip:!0});return n?ii(i):await i.readFully()}}const Fa="wacz";class Ma{waczname;hash;path;crawlId;parent;fileType;indexType;reqFiles=[];entries;nonSurt;loader;zipreader;constructor({waczname:e,hash:t,path:n,parent:r=null,entries:i=null,fileType:s=Fa,indexType:o=0,nonSurt:a=!1,loader:c=null,crawlId:l}){this.waczname=e,this.hash=t,this.path=n,this.loader=c,this.parent=r,this.zipreader=null,this.entries=i,this.indexType=o,this.fileType=s,this.nonSurt=a,this.crawlId=l}markAsMultiWACZ(){this.fileType="multi-wacz"}async init(e){if(e&&(this.path=e),this.loader)await this.initFromLoader(this.loader);else{if(!this.parent)throw new Error("must have either loader or parent");{const e=await this.parent.createLoader({url:this.path});await this.initFromLoader(e)}}if(!this.zipreader)return{};try{const{reader:e}=await this.zipreader.loadFile("datapackage.json"),t=(new TextDecoder).decode(await e.readFully()),n=JSON.parse(t);if(n.relation?.requires){const e=n.relation.requires.map(e=>e.filename);this.reqFiles=e}}catch(e){console.warn("Error parsing reqFiles",e)}return this.entries}async initFromLoader(e){return this.zipreader=new Da(e,this.entries),this.entries||(this.entries=await this.zipreader.load()||{}),this.entries}async loadFile(e,t){return this.zipreader||await this.init(),await this.zipreader.loadFile(e,t)}containsFile(e){return this.entries&&!!this.entries[e]}getSizeOf(e){return this.zipreader?this.zipreader.getCompressedSize(e):0}serialize(){return{waczname:this.waczname,hash:this.hash,path:this.path,crawlId:this.crawlId,entries:this.entries,indexType:this.indexType,nonSurt:this.nonSurt,reqFiles:this.reqFiles}}async save(e,t=!1){const n=this.zipreader;(t||n&&n.entriesUpdated)&&(await e.put("waczfiles",this.serialize()),n&&(n.entriesUpdated=!1))}iterContainedFiles(){return this.entries?Object.keys(this.entries):[]}getLoadPath(e){return this.waczname+"#!/"+e}getName(e){return this.waczname+"#!/"+e}async createLoader(e){const{url:t}=e,n=t.lastIndexOf("#!/");if(this.zipreader||await this.init(),n>=0)return new Ua(this.zipreader,t.slice(n+3));throw new Error("invalid wacz url: "+t)}}function ja(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ha,Wa,Qa,Va,za,qa,Ga,Ka,Xa,Ya,Ja,Za,$a,ec,tc,nc,rc,ic,sc,oc,ac,cc,lc,hc,uc,pc,dc,fc,gc,mc,wc,yc,bc,Ac,vc,_c,Ec,xc,Sc,Ic,Tc,Cc,Rc,kc,Nc={},Oc={},Bc={};function Pc(){if(Ha)return Bc;function e(e){return null==e}return Ha=1,Bc.isNothing=e,Bc.isObject=function(e){return"object"==typeof e&&null!==e},Bc.toArray=function(t){return Array.isArray(t)?t:e(t)?[]:[t]},Bc.repeat=function(e,t){let n="";for(let r=0;r<t;r+=1)n+=e;return n},Bc.isNegativeZero=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},Bc.extend=function(e,t){if(t){const n=Object.keys(t);for(let r=0,i=n.length;r<i;r+=1){const i=n[r];e[i]=t[i]}}return e},Bc}function Lc(){if(Qa)return Wa;function e(e,t){let n="";const r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+="\n\n"+e.mark.snippet),r+" "+n):r}function t(t,n){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=n,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}return Qa=1,t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=function(t){return this.name+": "+e(this,t)},Wa=t}function Dc(){if(Ga)return qa;Ga=1;const e=Lc(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],n=["scalar","sequence","mapping"];return qa=function(r,i){if(i=i||{},Object.keys(i).forEach(function(n){if(-1===t.indexOf(n))throw new e('Unknown option "'+n+'" is met in definition of "'+r+'" YAML type.')}),this.options=i,this.tag=r,this.kind=i.kind||null,this.resolve=i.resolve||function(){return!0},this.construct=i.construct||function(e){return e},this.instanceOf=i.instanceOf||null,this.predicate=i.predicate||null,this.represent=i.represent||null,this.representName=i.representName||null,this.defaultStyle=i.defaultStyle||null,this.multi=i.multi||!1,this.styleAliases=function(e){const t={};return null!==e&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}(i.styleAliases||null),-1===n.indexOf(this.kind))throw new e('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')},qa}function Uc(){if(Xa)return Ka;Xa=1;const e=Lc(),t=Dc();function n(e,t){const n=[];return e[t].forEach(function(e){let t=n.length;n.forEach(function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)}),n[t]=e}),n}function r(e){return this.extend(e)}return r.prototype.extend=function(i){let s=[],o=[];if(i instanceof t)o.push(i);else if(Array.isArray(i))o=o.concat(i);else{if(!i||!Array.isArray(i.implicit)&&!Array.isArray(i.explicit))throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.implicit&&(s=s.concat(i.implicit)),i.explicit&&(o=o.concat(i.explicit))}s.forEach(function(n){if(!(n instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(n.loadKind&&"scalar"!==n.loadKind)throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(n.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),o.forEach(function(n){if(!(n instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const a=Object.create(r.prototype);return a.implicit=(this.implicit||[]).concat(s),a.explicit=(this.explicit||[]).concat(o),a.compiledImplicit=n(a,"implicit"),a.compiledExplicit=n(a,"explicit"),a.compiledTypeMap=function(){const e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function t(t){t.multi?(e.multi[t.kind].push(t),e.multi.fallback.push(t)):e[t.kind][t.tag]=e.fallback[t.tag]=t}for(let e=0,n=arguments.length;e<n;e+=1)arguments[e].forEach(t);return e}(a.compiledImplicit,a.compiledExplicit),a},Ka=r}function Fc(){if(Ja)return Ya;Ja=1;const e=Dc();return Ya=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})}function Mc(){if($a)return Za;$a=1;const e=Dc();return Za=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})}function jc(){if(tc)return ec;tc=1;const e=Dc();return ec=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})}function Hc(){if(rc)return nc;rc=1;const e=Uc();return nc=new e({explicit:[Fc(),Mc(),jc()]})}function Wc(){if(sc)return ic;sc=1;const e=Dc();return ic=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;const t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),ic}function Qc(){if(ac)return oc;ac=1;const e=Dc();return oc=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;const t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"}),oc}function Vc(){if(lc)return cc;lc=1;const e=Pc(),t=Dc();function n(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function r(e){return e>=48&&e<=55}function i(e){return e>=48&&e<=57}function s(e){let t=e,n=1,r=t[0];if("-"!==r&&"+"!==r||("-"===r&&(n=-1),t=t.slice(1),r=t[0]),"0"===t)return 0;if("0"===r){if("b"===t[1])return n*parseInt(t.slice(2),2);if("x"===t[1])return n*parseInt(t.slice(2),16);if("o"===t[1])return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}return cc=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;const t=e.length;let o=0,a=!1;if(!t)return!1;let c=e[o];if("-"!==c&&"+"!==c||(c=e[++o]),"0"===c){if(o+1===t)return!0;if(c=e[++o],"b"===c){for(o++;o<t;o++){if(c=e[o],"0"!==c&&"1"!==c)return!1;a=!0}return a&&isFinite(s(e))}if("x"===c){for(o++;o<t;o++){if(!n(e.charCodeAt(o)))return!1;a=!0}return a&&isFinite(s(e))}if("o"===c){for(o++;o<t;o++){if(!r(e.charCodeAt(o)))return!1;a=!0}return a&&isFinite(s(e))}}for(;o<t;o++){if(!i(e.charCodeAt(o)))return!1;a=!0}return!!a&&isFinite(s(e))},construct:function(e){return s(e)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!e.isNegativeZero(t)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),cc}function zc(){if(uc)return hc;uc=1;const e=Pc(),t=Dc(),n=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),r=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=/^[-+]?[0-9]+e/;return hc=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!!n.test(e)&&(!!isFinite(parseFloat(e,10))||r.test(e))},construct:function(e){let t=e.toLowerCase();const n="-"===t[0]?-1:1;return"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||e.isNegativeZero(t))},represent:function(t,n){if(isNaN(t))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(t))return"-0.0";const r=t.toString(10);return i.test(r)?r.replace("e",".e"):r},defaultStyle:"lowercase"}),hc}function qc(){return dc?pc:(dc=1,pc=Hc().extend({implicit:[Wc(),Qc(),Vc(),zc()]}))}function Gc(){return gc?fc:(gc=1,fc=qc())}function Kc(){if(wc)return mc;wc=1;const e=Dc(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),n=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");return mc=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==t.exec(e)||null!==n.exec(e))},construct:function(e){let r=0,i=null,s=t.exec(e);if(null===s&&(s=n.exec(e)),null===s)throw new Error("Date resolve error");const o=+s[1],a=+s[2]-1,c=+s[3];if(!s[4])return new Date(Date.UTC(o,a,c));const l=+s[4],h=+s[5],u=+s[6];if(s[7]){for(r=s[7].slice(0,3);r.length<3;)r+="0";r=+r}s[9]&&(i=6e4*(60*+s[10]+ +(s[11]||0)),"-"===s[9]&&(i=-i));const p=new Date(Date.UTC(o,a,c,l,h,u,r));return i&&p.setTime(p.getTime()-i),p},instanceOf:Date,represent:function(e){return e.toISOString()}}),mc}function Xc(){if(bc)return yc;bc=1;const e=Dc();return yc=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})}function Yc(){if(vc)return Ac;vc=1;const e=Dc(),t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";return Ac=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;let n=0;const r=e.length,i=t;for(let t=0;t<r;t++){const r=i.indexOf(e.charAt(t));if(!(r>64)){if(r<0)return!1;n+=6}}return n%8==0},construct:function(e){const n=e.replace(/[\r\n=]/g,""),r=n.length,i=t;let s=0;const o=[];for(let e=0;e<r;e++)e%4==0&&e&&(o.push(s>>16&255),o.push(s>>8&255),o.push(255&s)),s=s<<6|i.indexOf(n.charAt(e));const a=r%4*6;return 0===a?(o.push(s>>16&255),o.push(s>>8&255),o.push(255&s)):18===a?(o.push(s>>10&255),o.push(s>>2&255)):12===a&&o.push(s>>4&255),new Uint8Array(o)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){let n="",r=0;const i=e.length,s=t;for(let t=0;t<i;t++)t%3==0&&t&&(n+=s[r>>18&63],n+=s[r>>12&63],n+=s[r>>6&63],n+=s[63&r]),r=(r<<8)+e[t];const o=i%3;return 0===o?(n+=s[r>>18&63],n+=s[r>>12&63],n+=s[r>>6&63],n+=s[63&r]):2===o?(n+=s[r>>10&63],n+=s[r>>4&63],n+=s[r<<2&63],n+=s[64]):1===o&&(n+=s[r>>2&63],n+=s[r<<4&63],n+=s[64],n+=s[64]),n}}),Ac}function Jc(){if(Ec)return _c;Ec=1;const e=Dc(),t=Object.prototype.hasOwnProperty,n=Object.prototype.toString;return _c=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;const r={},i=e;for(let e=0,s=i.length;e<s;e+=1){const s=i[e];let o,a=!1;if("[object Object]"!==n.call(s))return!1;for(o in s)if(t.call(s,o)){if(a)return!1;a=!0}if(!a)return!1;if(t.call(r,o))return!1;Object.defineProperty(r,o,{value:!0})}return!0},construct:function(e){return null!==e?e:[]}}),_c}function Zc(){if(Sc)return xc;Sc=1;const e=Dc(),t=Object.prototype.toString;return xc=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;const n=e,r=new Array(n.length);for(let e=0,i=n.length;e<i;e+=1){const i=n[e];if("[object Object]"!==t.call(i))return!1;const s=Object.keys(i);if(1!==s.length)return!1;r[e]=[s[0],i[s[0]]]}return!0},construct:function(e){if(null===e)return[];const t=e,n=new Array(t.length);for(let e=0,r=t.length;e<r;e+=1){const r=t[e],i=Object.keys(r);n[e]=[i[0],r[i[0]]]}return n}}),xc}function $c(){if(Tc)return Ic;Tc=1;const e=Dc(),t=Object.prototype.hasOwnProperty;return Ic=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;const n=e;for(const e in n)if(t.call(n,e)&&null!==n[e])return!1;return!0},construct:function(e){return null!==e?e:{}}}),Ic}function el(){return Rc?Cc:(Rc=1,Cc=Gc().extend({implicit:[Kc(),Xc()],explicit:[Yc(),Jc(),Zc(),$c()]}))}function tl(){if(kc)return Oc;kc=1;const e=Pc(),t=Lc(),n=function(){if(za)return Va;za=1;const e=Pc();function t(e,t,n,r,i){let s="",o="";const a=Math.floor(i/2)-1;return r-t>a&&(s=" ... ",t=r-a+s.length),n-r>a&&(o=" ...",n=r+a-o.length),{str:s+e.slice(t,n).replace(/\t/g,"→")+o,pos:r-t+s.length}}function n(t,n){return e.repeat(" ",n-t.length)+t}return Va=function(r,i){if(i=Object.create(i||null),!r.buffer)return null;i.maxLength||(i.maxLength=79),"number"!=typeof i.indent&&(i.indent=1),"number"!=typeof i.linesBefore&&(i.linesBefore=3),"number"!=typeof i.linesAfter&&(i.linesAfter=2);const s=/\r?\n|\r|\0/g,o=[0],a=[];let c,l=-1;for(;c=s.exec(r.buffer);)a.push(c.index),o.push(c.index+c[0].length),r.position<=c.index&&l<0&&(l=o.length-2);l<0&&(l=o.length-1);let h="";const u=Math.min(r.line+i.linesAfter,a.length).toString().length,p=i.maxLength-(i.indent+u+3);for(let s=1;s<=i.linesBefore&&!(l-s<0);s++){const c=t(r.buffer,o[l-s],a[l-s],r.position-(o[l]-o[l-s]),p);h=e.repeat(" ",i.indent)+n((r.line-s+1).toString(),u)+" | "+c.str+"\n"+h}const d=t(r.buffer,o[l],a[l],r.position,p);h+=e.repeat(" ",i.indent)+n((r.line+1).toString(),u)+" | "+d.str+"\n",h+=e.repeat("-",i.indent+u+3+d.pos)+"^\n";for(let s=1;s<=i.linesAfter&&!(l+s>=a.length);s++){const c=t(r.buffer,o[l+s],a[l+s],r.position-(o[l]-o[l+s]),p);h+=e.repeat(" ",i.indent)+n((r.line+s+1).toString(),u)+" | "+c.str+"\n"}return h.replace(/\n$/,"")},Va}(),r=el(),i=Object.prototype.hasOwnProperty,s=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,o=/[\x85\u2028\u2029]/,a=/[,\[\]{}]/,c=/^(?:!|!!|![0-9A-Za-z-]+!)$/,l=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function h(e){return Object.prototype.toString.call(e)}function u(e){return 10===e||13===e}function p(e){return 9===e||32===e}function d(e){return 9===e||32===e||10===e||13===e}function f(e){return 44===e||91===e||93===e||123===e||125===e}function g(e){if(e>=48&&e<=57)return e-48;const t=32|e;return t>=97&&t<=102?t-97+10:-1}function m(e){return 120===e?2:117===e?4:85===e?8:0}function w(e){return e>=48&&e<=57?e-48:-1}function y(e){switch(e){case 48:return"\0";case 97:return"";case 98:return"\b";case 116:case 9:return"\t";case 110:return"\n";case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function b(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function A(e,t,n){"__proto__"===t?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}const v=new Array(256),_=new Array(256);for(let e=0;e<256;e++)v[e]=y(e)?1:0,_[e]=y(e);function E(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||r,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.maxDepth="number"==typeof t.maxDepth?t.maxDepth:100,this.maxTotalMergeKeys="number"==typeof t.maxTotalMergeKeys?t.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function x(e,r){const i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=n(i),new t(r,i)}function I(e,t){throw x(e,t)}function S(e,t){e.onWarning&&e.onWarning.call(null,x(e,t))}function T(e,t,n){const r=e.anchorMapTransactions;if(0!==r.length){const n=r[r.length-1];i.call(n,t)||(n[t]={existed:i.call(e.anchorMap,t),value:e.anchorMap[t]})}e.anchorMap[t]=n}function C(e){return{position:e.position,line:e.line,lineStart:e.lineStart,lineIndent:e.lineIndent,firstTabInLine:e.firstTabInLine,tag:e.tag,anchor:e.anchor,kind:e.kind,result:e.result}}function R(e,t){e.position=t.position,e.line=t.line,e.lineStart=t.lineStart,e.lineIndent=t.lineIndent,e.firstTabInLine=t.firstTabInLine,e.tag=t.tag,e.anchor=t.anchor,e.kind=t.kind,e.result=t.result}const O={YAML:function(e,t,n){null!==e.version&&I(e,"duplication of %YAML directive"),1!==n.length&&I(e,"YAML directive accepts exactly one argument");const r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]);null===r&&I(e,"ill-formed argument of the YAML directive");const i=parseInt(r[1],10),s=parseInt(r[2],10);1!==i&&I(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=s<2,1!==s&&2!==s&&S(e,"unsupported YAML version of the document")},TAG:function(e,t,n){let r;2!==n.length&&I(e,"TAG directive accepts exactly two arguments");const s=n[0];r=n[1],c.test(s)||I(e,"ill-formed tag handle (first argument) of the TAG directive"),i.call(e.tagMap,s)&&I(e,'there is a previously declared suffix for "'+s+'" tag handle'),l.test(r)||I(e,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch(t){I(e,"tag prefix is malformed: "+r)}e.tagMap[s]=r}};function k(e,t,n,r){if(t<n){const i=e.input.slice(t,n);if(r)for(let t=0,n=i.length;t<n;t+=1){const n=i.charCodeAt(t);9===n||n>=32&&n<=1114111||I(e,"expected valid JSON character")}else s.test(i)&&I(e,"the stream contains non-printable characters");e.result+=i}}function N(t,n,r,s){e.isObject(r)||I(t,"cannot merge mappings; the provided source object is unacceptable");const o=Object.keys(r);for(let e=0,a=o.length;e<a;e+=1){const a=o[e];-1!==t.maxTotalMergeKeys&&++t.totalMergeKeys>t.maxTotalMergeKeys&&I(t,"merge keys exceeded maxTotalMergeKeys ("+t.maxTotalMergeKeys+")"),i.call(n,a)||(A(n,a,r[a]),s[a]=!0)}}function B(e,t,n,r,s,o,a,c,l){if(Array.isArray(s))for(let t=0,n=(s=Array.prototype.slice.call(s)).length;t<n;t+=1)Array.isArray(s[t])&&I(e,"nested arrays are not supported inside keys"),"object"==typeof s&&"[object Object]"===h(s[t])&&(s[t]="[object Object]");if("object"==typeof s&&"[object Object]"===h(s)&&(s="[object Object]"),s=String(s),null===t&&(t={}),"tag:yaml.org,2002:merge"===r)if(Array.isArray(o))for(let r=0,i=o.length;r<i;r+=1)N(e,t,o[r],n);else N(e,t,o,n);else e.json||i.call(n,s)||!i.call(t,s)||(e.line=a||e.line,e.lineStart=c||e.lineStart,e.position=l||e.position,I(e,"duplicated mapping key")),A(t,s,o),delete n[s];return t}function P(e){const t=e.input.charCodeAt(e.position);10===t?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):I(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function D(e,t,n){let r=0,i=e.input.charCodeAt(e.position);for(;0!==i;){for(;p(i);)9===i&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&35===i)do{i=e.input.charCodeAt(++e.position)}while(10!==i&&13!==i&&0!==i);if(!u(i))break;for(P(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;32===i;)e.lineIndent++,i=e.input.charCodeAt(++e.position)}return-1!==n&&0!==r&&e.lineIndent<n&&S(e,"deficient indentation"),r}function L(e){let t=e.position,n=e.input.charCodeAt(t);return!(45!==n&&46!==n||n!==e.input.charCodeAt(t+1)||n!==e.input.charCodeAt(t+2)||(t+=3,n=e.input.charCodeAt(t),0!==n&&!d(n)))}function U(t,n){1===n?t.result+=" ":n>1&&(t.result+=e.repeat("\n",n-1))}function M(e,t){const n=e.tag,r=e.anchor,i=[];let s=!1;if(-1!==e.firstTabInLine)return!1;null!==e.anchor&&T(e,e.anchor,i);let o=e.input.charCodeAt(e.position);for(;0!==o&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,I(e,"tab characters must not be used in indentation")),45===o)&&d(e.input.charCodeAt(e.position+1));){if(s=!0,e.position++,D(e,!0,-1)&&e.lineIndent<=t){i.push(null),o=e.input.charCodeAt(e.position);continue}const n=e.line;if(V(e,t,3,!1,!0),i.push(e.result),D(e,!0,-1),o=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==o)I(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return!!s&&(e.tag=n,e.anchor=r,e.kind="sequence",e.result=i,!0)}function F(e,t,n){let r,i,s,o;const a=e.tag,c=e.anchor,l={},h=Object.create(null);let u=null,f=null,g=null,m=!1,w=!1;if(-1!==e.firstTabInLine)return!1;null!==e.anchor&&T(e,e.anchor,l);let y=e.input.charCodeAt(e.position);for(;0!==y;){m||-1===e.firstTabInLine||(e.position=e.firstTabInLine,I(e,"tab characters must not be used in indentation"));const b=e.input.charCodeAt(e.position+1),A=e.line;if(63!==y&&58!==y||!d(b)){if(i=e.line,s=e.lineStart,o=e.position,!V(e,n,2,!1,!0))break;if(e.line===A){for(y=e.input.charCodeAt(e.position);p(y);)y=e.input.charCodeAt(++e.position);if(58===y)y=e.input.charCodeAt(++e.position),d(y)||I(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(B(e,l,h,u,f,null,i,s,o),u=f=g=null),w=!0,m=!1,r=!1,u=e.tag,f=e.result;else{if(!w)return e.tag=a,e.anchor=c,!0;I(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!w)return e.tag=a,e.anchor=c,!0;I(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===y?(m&&(B(e,l,h,u,f,null,i,s,o),u=f=g=null),w=!0,m=!0,r=!0):m?(m=!1,r=!0):I(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,y=b;if((e.line===A||e.lineIndent>t)&&(m&&(i=e.line,s=e.lineStart,o=e.position),V(e,t,4,!0,r)&&(m?f=e.result:g=e.result),m||(B(e,l,h,u,f,g,i,s,o),u=f=g=null),D(e,!0,-1),y=e.input.charCodeAt(e.position)),(e.line===A||e.lineIndent>t)&&0!==y)I(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&B(e,l,h,u,f,null,i,s,o),w&&(e.tag=a,e.anchor=c,e.kind="mapping",e.result=l),w}function j(e){let t,n,r=!1,s=!1,o=e.input.charCodeAt(e.position);if(33!==o)return!1;null!==e.tag&&I(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),60===o?(r=!0,o=e.input.charCodeAt(++e.position)):33===o?(s=!0,t="!!",o=e.input.charCodeAt(++e.position)):t="!";let h=e.position;if(r){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&62!==o);e.position<e.length?(n=e.input.slice(h,e.position),o=e.input.charCodeAt(++e.position)):I(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!d(o);)33===o&&(s?I(e,"tag suffix cannot contain exclamation marks"):(t=e.input.slice(h-1,e.position+1),c.test(t)||I(e,"named tag handle cannot contain such characters"),s=!0,h=e.position+1)),o=e.input.charCodeAt(++e.position);n=e.input.slice(h,e.position),a.test(n)&&I(e,"tag suffix cannot contain flow indicator characters")}n&&!l.test(n)&&I(e,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch(t){I(e,"tag name is malformed: "+n)}return r?e.tag=n:i.call(e.tagMap,t)?e.tag=e.tagMap[t]+n:"!"===t?e.tag="!"+n:"!!"===t?e.tag="tag:yaml.org,2002:"+n:I(e,'undeclared tag handle "'+t+'"'),!0}function H(e){let t=e.input.charCodeAt(e.position);if(38!==t)return!1;null!==e.anchor&&I(e,"duplication of an anchor property"),t=e.input.charCodeAt(++e.position);const n=e.position;for(;0!==t&&!d(t)&&!f(t);)t=e.input.charCodeAt(++e.position);return e.position===n&&I(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(n,e.position),!0}function W(e,t,n,r){const s=C(e);return function(e){e.anchorMapTransactions.push(Object.create(null))}(e),R(e,t),e.tag=null,e.anchor=null,e.kind=null,e.result=null,F(e,n,r)&&"mapping"===e.kind?(function(e){const t=e.anchorMapTransactions.pop(),n=e.anchorMapTransactions;if(0===n.length)return;const r=n[n.length-1],s=Object.keys(t);for(let e=0,n=s.length;e<n;e+=1){const n=s[e];i.call(r,n)||(r[n]=t[n])}}(e),!0):(function(e){const t=e.anchorMapTransactions.pop(),n=Object.keys(t);for(let r=n.length-1;r>=0;r-=1){const i=t[n[r]];i.existed?e.anchorMap[n[r]]=i.value:delete e.anchorMap[n[r]]}}(e),R(e,s),!1)}function V(t,n,r,s,o){let a,c,l,h,y,A=1,E=!1,x=!1,S=null;t.depth>=t.maxDepth&&I(t,"nesting exceeded maxDepth ("+t.maxDepth+")"),t.depth+=1,null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null;const R=a=c=4===r||3===r;if(s&&D(t,!0,-1)&&(E=!0,t.lineIndent>n?A=1:t.lineIndent===n?A=0:t.lineIndent<n&&(A=-1)),1===A)for(;;){const e=t.input.charCodeAt(t.position),r=C(t);if(E&&(33===e&&null!==t.tag||38===e&&null!==t.anchor))break;if(!j(t)&&!H(t))break;null===S&&(S=r),D(t,!0,-1)?(E=!0,c=R,t.lineIndent>n?A=1:t.lineIndent===n?A=0:t.lineIndent<n&&(A=-1)):c=!1}if(c&&(c=E||o),1===A||4===r)if(h=1===r||2===r?n:n+1,y=t.position-t.lineStart,1===A)if(c&&(M(t,y)||F(t,y,h))||function(e,t){let n,r,i,s=!0;const o=e.tag;let a;const c=e.anchor;let l,h,u,p;const f=Object.create(null);let g,m,w,y=e.input.charCodeAt(e.position);if(91===y)l=93,p=!1,a=[];else{if(123!==y)return!1;l=125,p=!0,a={}}for(null!==e.anchor&&T(e,e.anchor,a),y=e.input.charCodeAt(++e.position);0!==y;){if(D(e,!0,t),y=e.input.charCodeAt(e.position),y===l)return e.position++,e.tag=o,e.anchor=c,e.kind=p?"mapping":"sequence",e.result=a,!0;s?44===y&&I(e,"expected the node content, but found ','"):I(e,"missed comma between flow collection entries"),m=g=w=null,h=u=!1,63===y&&d(e.input.charCodeAt(e.position+1))&&(h=u=!0,e.position++,D(e,!0,t)),n=e.line,r=e.lineStart,i=e.position,V(e,t,1,!1,!0),m=e.tag,g=e.result,D(e,!0,t),y=e.input.charCodeAt(e.position),!u&&e.line!==n||58!==y||(h=!0,y=e.input.charCodeAt(++e.position),D(e,!0,t),V(e,t,1,!1,!0),w=e.result),p?B(e,a,f,m,g,w,n,r,i):h?a.push(B(e,null,f,m,g,w,n,r,i)):a.push(g),D(e,!0,t),y=e.input.charCodeAt(e.position),44===y?(s=!0,y=e.input.charCodeAt(++e.position)):s=!1}I(e,"unexpected end of the stream within a flow collection")}(t,h))x=!0;else{const n=t.input.charCodeAt(t.position);null!==S&&R&&!c&&124!==n&&62!==n&&W(t,S,S.position-S.lineStart,h)||a&&function(t,n){let r,i,s=1,o=!1,a=!1,c=n,l=0,h=!1,d=t.input.charCodeAt(t.position);if(124===d)r=!1;else{if(62!==d)return!1;r=!0}for(t.kind="scalar",t.result="";0!==d;)if(d=t.input.charCodeAt(++t.position),43===d||45===d)1===s?s=43===d?3:2:I(t,"repeat of a chomping mode identifier");else{if(!((i=w(d))>=0))break;0===i?I(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?I(t,"repeat of an indentation width identifier"):(c=n+i-1,a=!0)}if(p(d)){do{d=t.input.charCodeAt(++t.position)}while(p(d));if(35===d)do{d=t.input.charCodeAt(++t.position)}while(!u(d)&&0!==d)}for(;0!==d;){for(P(t),t.lineIndent=0,d=t.input.charCodeAt(t.position);(!a||t.lineIndent<c)&&32===d;)t.lineIndent++,d=t.input.charCodeAt(++t.position);if(!a&&t.lineIndent>c&&(c=t.lineIndent),u(d)){l++;continue}if(a||0!==c||I(t,"missing indentation for block scalar"),t.lineIndent<c){3===s?t.result+=e.repeat("\n",o?1+l:l):1===s&&o&&(t.result+="\n");break}r?p(d)?(h=!0,t.result+=e.repeat("\n",o?1+l:l)):h?(h=!1,t.result+=e.repeat("\n",l+1)):0===l?o&&(t.result+=" "):t.result+=e.repeat("\n",l):t.result+=e.repeat("\n",o?1+l:l),o=!0,a=!0,l=0;const n=t.position;for(;!u(d)&&0!==d;)d=t.input.charCodeAt(++t.position);k(t,n,t.position,!1)}return!0}(t,h)||function(e,t){let n,r,i=e.input.charCodeAt(e.position);if(39!==i)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;0!==(i=e.input.charCodeAt(e.position));)if(39===i){if(k(e,n,e.position,!0),i=e.input.charCodeAt(++e.position),39!==i)return!0;n=e.position,e.position++,r=e.position}else u(i)?(k(e,n,r,!0),U(e,D(e,!1,t)),n=r=e.position):e.position===e.lineStart&&L(e)?I(e,"unexpected end of the document within a single quoted scalar"):(e.position++,p(i)||(r=e.position));I(e,"unexpected end of the stream within a single quoted scalar")}(t,h)||function(e,t){let n,r,i,s=e.input.charCodeAt(e.position);if(34!==s)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return k(e,n,e.position,!0),e.position++,!0;if(92===s){if(k(e,n,e.position,!0),s=e.input.charCodeAt(++e.position),u(s))D(e,!1,t);else if(s<256&&v[s])e.result+=_[s],e.position++;else if((i=m(s))>0){let t=i,n=0;for(;t>0;t--)s=e.input.charCodeAt(++e.position),(i=g(s))>=0?n=(n<<4)+i:I(e,"expected hexadecimal character");e.result+=b(n),e.position++}else I(e,"unknown escape sequence");n=r=e.position}else u(s)?(k(e,n,r,!0),U(e,D(e,!1,t)),n=r=e.position):e.position===e.lineStart&&L(e)?I(e,"unexpected end of the document within a double quoted scalar"):(e.position++,p(s)||(r=e.position))}I(e,"unexpected end of the stream within a double quoted scalar")}(t,h)?x=!0:function(e){let t=e.input.charCodeAt(e.position);if(42!==t)return!1;t=e.input.charCodeAt(++e.position);const n=e.position;for(;0!==t&&!d(t)&&!f(t);)t=e.input.charCodeAt(++e.position);e.position===n&&I(e,"name of an alias node must contain at least one character");const r=e.input.slice(n,e.position);return i.call(e.anchorMap,r)||I(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],D(e,!0,-1),!0}(t)?(x=!0,null===t.tag&&null===t.anchor||I(t,"alias node should not have any properties")):function(e,t,n){let r,i,s,o,a,c;const l=e.kind,h=e.result;let g=e.input.charCodeAt(e.position);if(d(g)||f(g)||35===g||38===g||42===g||33===g||124===g||62===g||39===g||34===g||37===g||64===g||96===g)return!1;if(63===g||45===g){const t=e.input.charCodeAt(e.position+1);if(d(t)||n&&f(t))return!1}for(e.kind="scalar",e.result="",r=i=e.position,s=!1;0!==g;){if(58===g){const t=e.input.charCodeAt(e.position+1);if(d(t)||n&&f(t))break}else if(35===g){if(d(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&L(e)||n&&f(g))break;if(u(g)){if(o=e.line,a=e.lineStart,c=e.lineIndent,D(e,!1,-1),e.lineIndent>=t){s=!0,g=e.input.charCodeAt(e.position);continue}e.position=i,e.line=o,e.lineStart=a,e.lineIndent=c;break}}s&&(k(e,r,i,!1),U(e,e.line-o),r=i=e.position,s=!1),p(g)||(i=e.position+1),g=e.input.charCodeAt(++e.position)}return k(e,r,i,!1),!!e.result||(e.kind=l,e.result=h,!1)}(t,h,1===r)&&(x=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&T(t,t.anchor,t.result)}else 0===A&&(x=c&&M(t,y));if(null===t.tag)null!==t.anchor&&T(t,t.anchor,t.result);else if("?"===t.tag){null!==t.result&&"scalar"!==t.kind&&I(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"');for(let e=0,n=t.implicitTypes.length;e<n;e+=1)if(l=t.implicitTypes[e],l.resolve(t.result)){t.result=l.construct(t.result),t.tag=l.tag,null!==t.anchor&&T(t,t.anchor,t.result);break}}else if("!"!==t.tag){if(i.call(t.typeMap[t.kind||"fallback"],t.tag))l=t.typeMap[t.kind||"fallback"][t.tag];else{l=null;const e=t.typeMap.multi[t.kind||"fallback"];for(let n=0,r=e.length;n<r;n+=1)if(t.tag.slice(0,e[n].tag.length)===e[n].tag){l=e[n];break}}l||I(t,"unknown tag !<"+t.tag+">"),null!==t.result&&l.kind!==t.kind&&I(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+l.kind+'", not "'+t.kind+'"'),l.resolve(t.result,t.tag)?(t.result=l.construct(t.result,t.tag),null!==t.anchor&&T(t,t.anchor,t.result)):I(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),t.depth-=1,null!==t.tag||null!==t.anchor||x}function Q(e){const t=e.position;let n,r=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(n=e.input.charCodeAt(e.position))&&(D(e,!0,-1),n=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==n));){r=!0,n=e.input.charCodeAt(++e.position);let t=e.position;for(;0!==n&&!d(n);)n=e.input.charCodeAt(++e.position);const s=e.input.slice(t,e.position),o=[];for(s.length<1&&I(e,"directive name must not be less than one character in length");0!==n;){for(;p(n);)n=e.input.charCodeAt(++e.position);if(35===n){do{n=e.input.charCodeAt(++e.position)}while(0!==n&&!u(n));break}if(u(n))break;for(t=e.position;0!==n&&!d(n);)n=e.input.charCodeAt(++e.position);o.push(e.input.slice(t,e.position))}0!==n&&P(e),i.call(O,s)?O[s](e,s,o):S(e,'unknown document directive "'+s+'"')}D(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,D(e,!0,-1)):r&&I(e,"directives end mark is expected"),V(e,e.lineIndent-1,4,!1,!0),D(e,!0,-1),e.checkLineBreaks&&o.test(e.input.slice(t,e.position))&&S(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&L(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,D(e,!0,-1)):e.position<e.length-1&&I(e,"end of the stream or a document separator is expected")}function z(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));const n=new E(e,t),r=e.indexOf("\0");for(-1!==r&&(n.position=r,I(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Q(n);return n.documents}return Oc.loadAll=function(e,t,n){null!==t&&"object"==typeof t&&void 0===n&&(n=t,t=null);const r=z(e,n);if("function"!=typeof t)return r;for(let e=0,n=r.length;e<n;e+=1)t(r[e])},Oc.load=function(e,n){const r=z(e,n);if(0!==r.length){if(1===r.length)return r[0];throw new t("expected a single document in the stream, but found more")}},Oc}var nl,rl,il={};function sl(){if(nl)return il;nl=1;const e=Pc(),t=Lc(),n=el(),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,s=65279,o={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},a=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],c=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function l(n){let r,i;const s=n.toString(16).toUpperCase();if(n<=255)r="x",i=2;else if(n<=65535)r="u",i=4;else{if(!(n<=4294967295))throw new t("code point within a string may not be greater than 0xFFFFFFFF");r="U",i=8}return"\\"+r+e.repeat("0",i-s.length)+s}function h(t){this.schema=t.schema||n,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=e.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=function(e,t){if(null===t)return{};const n={},r=Object.keys(t);for(let s=0,o=r.length;s<o;s+=1){let o=r[s],a=String(t[o]);"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2));const c=e.compiledTypeMap.fallback[o];c&&i.call(c.styleAliases,a)&&(a=c.styleAliases[a]),n[o]=a}return n}(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function u(t,n){const r=e.repeat(" ",n);let i=0,s="";const o=t.length;for(;i<o;){let e;const n=t.indexOf("\n",i);-1===n?(e=t.slice(i),i=o):(e=t.slice(i,n+1),i=n+1),e.length&&"\n"!==e&&(s+=r),s+=e}return s}function p(t,n){return"\n"+e.repeat(" ",t.indent*n)}function d(e){return 32===e||9===e}function f(e){return e>=32&&e<=126||e>=161&&e<=55295&&8232!==e&&8233!==e||e>=57344&&e<=65533&&e!==s||e>=65536&&e<=1114111}function g(e){return f(e)&&e!==s&&13!==e&&10!==e}function m(e,t,n){const r=g(e),i=r&&!d(e);return(n?r:r&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!i)||g(t)&&!d(t)&&35===e||58===t&&i}function w(e,t){const n=e.charCodeAt(t);let r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?1024*(n-55296)+r-56320+65536:n}function y(e){return/^\n* /.test(e)}function b(e,t,n,r,i,o,a,c){let l,h=0,u=null,p=!1,g=!1;const b=-1!==r;let A=-1,v=f(_=w(e,0))&&_!==s&&!d(_)&&45!==_&&63!==_&&58!==_&&44!==_&&91!==_&&93!==_&&123!==_&&125!==_&&35!==_&&38!==_&&42!==_&&33!==_&&124!==_&&61!==_&&62!==_&&39!==_&&34!==_&&37!==_&&64!==_&&96!==_&&function(e){return!d(e)&&58!==e}(w(e,e.length-1));var _;if(t||a)for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=w(e,l),!f(h))return 5;v=v&&m(h,u,c),u=h}else{for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=w(e,l),10===h)p=!0,b&&(g=g||l-A-1>r&&" "!==e[A+1],A=l);else if(!f(h))return 5;v=v&&m(h,u,c),u=h}g=g||b&&l-A-1>r&&" "!==e[A+1]}return p||g?n>9&&y(e)?5:a?2===o?5:2:g?4:3:!v||a||i(e)?2===o?5:2:1}function A(e,n,r,i,s){e.dump=function(){if(0===n.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==a.indexOf(n)||c.test(n)))return 2===e.quotingType?'"'+n+'"':"'"+n+"'";const h=e.indent*Math.max(1,r),p=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-h),d=i||e.flowLevel>-1&&r>=e.flowLevel;switch(b(n,d,e.indent,p,function(t){return function(e,t){for(let n=0,r=e.implicitTypes.length;n<r;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}(e,t)},e.quotingType,e.forceQuotes&&!i,s)){case 1:return n;case 2:return"'"+n.replace(/'/g,"''")+"'";case 3:return"|"+v(n,e.indent)+_(u(n,h));case 4:return">"+v(n,e.indent)+_(u(function(e,t){const n=/(\n+)([^\n]*)/g;let r,i,s=function(){let r=e.indexOf("\n");return r=-1!==r?r:e.length,n.lastIndex=r,E(e.slice(0,r),t)}(),o="\n"===e[0]||" "===e[0];for(;i=n.exec(e);){const e=i[1],n=i[2];r=" "===n[0],s+=e+(o||r||""===n?"":"\n")+E(n,t),o=r}return s}(n,p),h));case 5:return'"'+function(e){let t="",n=0;for(let r=0;r<e.length;n>=65536?r+=2:r++){n=w(e,r);const i=o[n];!i&&f(n)?(t+=e[r],n>=65536&&(t+=e[r+1])):t+=i||l(n)}return t}(n)+'"';default:throw new t("impossible error: invalid scalar style")}}()}function v(e,t){const n=y(e)?String(t):"",r="\n"===e[e.length-1];return n+(!r||"\n"!==e[e.length-2]&&"\n"!==e?r?"":"-":"+")+"\n"}function _(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function E(e,t){if(""===e||" "===e[0])return e;const n=/ [^ ]/g;let r,i,s=0,o=0,a=0,c="";for(;r=n.exec(e);)a=r.index,a-s>t&&(i=o>s?o:a,c+="\n"+e.slice(s,i),s=i+1),o=a;return c+="\n",e.length-s>t&&o>s?c+=e.slice(s,o)+"\n"+e.slice(o+1):c+=e.slice(s),c.slice(1)}function x(e,t,n,r){let i="";const s=e.tag;for(let s=0,o=n.length;s<o;s+=1){let o=n[s];e.replacer&&(o=e.replacer.call(n,String(s),o)),(S(e,t+1,o,!0,!0,!1,!0)||void 0===o&&S(e,t+1,null,!0,!0,!1,!0))&&(r&&""===i||(i+=p(e,t)),e.dump&&10===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump)}e.tag=s,e.dump=i||"[]"}function I(e,n,s){const o=s?e.explicitTypes:e.implicitTypes;for(let a=0,c=o.length;a<c;a+=1){const c=o[a];if((c.instanceOf||c.predicate)&&(!c.instanceOf||"object"==typeof n&&n instanceof c.instanceOf)&&(!c.predicate||c.predicate(n))){if(s?c.multi&&c.representName?e.tag=c.representName(n):e.tag=c.tag:e.tag="?",c.represent){const s=e.styleMap[c.tag]||c.defaultStyle;let o;if("[object Function]"===r.call(c.represent))o=c.represent(n,s);else{if(!i.call(c.represent,s))throw new t("!<"+c.tag+'> tag resolver accepts not "'+s+'" style');o=c.represent[s](n,s)}e.dump=o}return!0}}return!1}function S(e,n,i,s,o,a,c){e.tag=null,e.dump=i,I(e,i,!1)||I(e,i,!0);const l=r.call(e.dump),h=s;s&&(s=e.flowLevel<0||e.flowLevel>n);const u="[object Object]"===l||"[object Array]"===l;let d,f;if(u&&(d=e.duplicates.indexOf(i),f=-1!==d),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&n>0)&&(o=!1),f&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(u&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),"[object Object]"===l)s&&0!==Object.keys(e.dump).length?(function(e,n,r,i){let s="";const o=e.tag,a=Object.keys(r);if(!0===e.sortKeys)a.sort();else if("function"==typeof e.sortKeys)a.sort(e.sortKeys);else if(e.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let t=0,o=a.length;t<o;t+=1){let o="";i&&""===s||(o+=p(e,n));const c=a[t];let l=r[c];if(e.replacer&&(l=e.replacer.call(r,c,l)),!S(e,n+1,c,!0,!0,!0))continue;const h=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024;h&&(e.dump&&10===e.dump.charCodeAt(0)?o+="?":o+="? "),o+=e.dump,h&&(o+=p(e,n)),S(e,n+1,l,!0,h)&&(e.dump&&10===e.dump.charCodeAt(0)?o+=":":o+=": ",o+=e.dump,s+=o)}e.tag=o,e.dump=s||"{}"}(e,n,e.dump,o),f&&(e.dump="&ref_"+d+e.dump)):(function(e,t,n){let r="";const i=e.tag,s=Object.keys(n);for(let i=0,o=s.length;i<o;i+=1){let o="";""!==r&&(o+=", "),e.condenseFlow&&(o+='"');const a=s[i];let c=n[a];e.replacer&&(c=e.replacer.call(n,a,c)),S(e,t,a,!1,!1)&&(e.dump.length>1024&&(o+="? "),o+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),S(e,t,c,!1,!1)&&(o+=e.dump,r+=o))}e.tag=i,e.dump="{"+r+"}"}(e,n,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if("[object Array]"===l)s&&0!==e.dump.length?(e.noArrayIndent&&!c&&n>0?x(e,n-1,e.dump,o):x(e,n,e.dump,o),f&&(e.dump="&ref_"+d+e.dump)):(function(e,t,n){let r="";const i=e.tag;for(let i=0,s=n.length;i<s;i+=1){let s=n[i];e.replacer&&(s=e.replacer.call(n,String(i),s)),(S(e,t,s,!1,!1)||void 0===s&&S(e,t,null,!1,!1))&&(""!==r&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump)}e.tag=i,e.dump="["+r+"]"}(e,n,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(e.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+l)}"?"!==e.tag&&A(e,e.dump,n,a,h)}if(null!==e.tag&&"?"!==e.tag){let t=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21");t="!"===e.tag[0]?"!"+t:"tag:yaml.org,2002:"===t.slice(0,18)?"!!"+t.slice(18):"!<"+t+">",e.dump=t+" "+e.dump}}return!0}function T(e,t){const n=[],r=[];C(e,n,r);const i=r.length;for(let e=0;e<i;e+=1)t.duplicates.push(n[r[e]]);t.usedDuplicates=new Array(i)}function C(e,t,n){if(null!==e&&"object"==typeof e){const r=t.indexOf(e);if(-1!==r)-1===n.indexOf(r)&&n.push(r);else if(t.push(e),Array.isArray(e))for(let r=0,i=e.length;r<i;r+=1)C(e[r],t,n);else{const r=Object.keys(e);for(let i=0,s=r.length;i<s;i+=1)C(e[r[i]],t,n)}}}return il.dump=function(e,t){const n=new h(t=t||{});n.noRefs||T(e,n);let r=e;return n.replacer&&(r=n.replacer.call({"":r},"",r)),S(n,0,r,!0,!0)?n.dump+"\n":""},il}const ol=ja(function(){if(rl)return Nc;rl=1;const e=tl(),t=sl();function n(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}return Nc.Type=Dc(),Nc.Schema=Uc(),Nc.FAILSAFE_SCHEMA=Hc(),Nc.JSON_SCHEMA=qc(),Nc.CORE_SCHEMA=Gc(),Nc.DEFAULT_SCHEMA=el(),Nc.load=e.load,Nc.loadAll=e.loadAll,Nc.dump=t.dump,Nc.YAMLException=Lc(),Nc.types={binary:Yc(),float:zc(),map:jc(),null:Wc(),pairs:Zc(),set:$c(),timestamp:Kc(),bool:Qc(),int:Vc(),merge:Xc(),omap:Jc(),seq:Mc(),str:Fc()},Nc.safeLoad=n("safeLoad","load"),Nc.safeLoadAll=n("safeLoadAll","loadAll"),Nc.safeDump=n("safeDump","dump"),Nc}()),{Type:al,Schema:cl,FAILSAFE_SCHEMA:ll,JSON_SCHEMA:hl,CORE_SCHEMA:ul,DEFAULT_SCHEMA:pl,load:dl,loadAll:fl,dump:gl,YAMLException:ml,types:wl,safeLoad:yl,safeLoadAll:bl,safeDump:Al}=ol;var vl=n(7526),_l=(n(4741),n(152));function El(e,t){let n=0;if(1===e.length)return e[0];for(let r=e.length-1;r>=0;r--)n+=e[e.length-1-r]*Math.pow(2,t*r);return n}function xl(e,t,n=-1){const r=n;let i=e,s=0,o=Math.pow(2,t);for(let n=1;n<8;n++){if(e<o){let e;if(r<0)e=new ArrayBuffer(n),s=n;else{if(r<n)return new ArrayBuffer(0);e=new ArrayBuffer(r),s=r}const o=new Uint8Array(e);for(let e=n-1;e>=0;e--){const n=Math.pow(2,e*t);o[s-e-1]=Math.floor(i/n),i-=o[s-e-1]*n}return e}o*=Math.pow(2,t)}return new ArrayBuffer(0)}function Sl(...e){let t=0,n=0;for(const n of e)t+=n.length;const r=new ArrayBuffer(t),i=new Uint8Array(r);for(const t of e)i.set(t,n),n+=t.length;return i}function Il(){const e=new Uint8Array(this.valueHex);if(this.valueHex.byteLength>=2){const t=255===e[0]&&128&e[1],n=0===e[0]&&!(128&e[1]);(t||n)&&this.warnings.push("Needlessly long format")}const t=new ArrayBuffer(this.valueHex.byteLength),n=new Uint8Array(t);for(let e=0;e<this.valueHex.byteLength;e++)n[e]=0;n[0]=128&e[0];const r=El(n,8),i=new ArrayBuffer(this.valueHex.byteLength),s=new Uint8Array(i);for(let t=0;t<this.valueHex.byteLength;t++)s[t]=e[t];return s[0]&=127,El(s,8)-r}function Tl(e,t){const n=e.toString(10);if(t<n.length)return"";const r=t-n.length,i=new Array(r);for(let e=0;e<r;e++)i[e]="0";return i.join("").concat(n)}
/*!
* Copyright (c) 2014, GMO GlobalSign
* Copyright (c) 2015-2022, Peculiar Ventures
* All rights reserved.
*
* Author 2014-2019, Yury Strozhevsky
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* * Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
function Cl(){if("undefined"==typeof BigInt)throw new Error("BigInt is not defined. Your environment doesn't implement BigInt.")}function Rl(e){let t=0,n=0;for(let n=0;n<e.length;n++)t+=e[n].byteLength;const r=new Uint8Array(t);for(let t=0;t<e.length;t++){const i=e[t];r.set(new Uint8Array(i),n),n+=i.byteLength}return r.buffer}function kl(e,t,n,r){return t instanceof Uint8Array?t.byteLength?n<0?(e.error="Wrong parameter: inputOffset less than zero",!1):r<0?(e.error="Wrong parameter: inputLength less than zero",!1):!(t.byteLength-n-r<0&&(e.error="End of input reached before message was fully decoded (inconsistent offset and length values)",1)):(e.error="Wrong parameter: inputBuffer has zero length",!1):(e.error="Wrong parameter: inputBuffer must be 'Uint8Array'",!1)}Math.log(2);class Nl{constructor(){this.items=[]}write(e){this.items.push(e)}final(){return Rl(this.items)}}const Ol=[new Uint8Array([1])],Bl="0123456789",Pl="name",Ll="valueHexView",Dl="isHexOnly",Ul="idBlock",Fl="tagClass",Ml="tagNumber",jl="isConstructed",Hl="fromBER",Wl="toBER",Ql="local",Vl="",zl=new ArrayBuffer(0),ql=new Uint8Array(0),Gl="EndOfContent",Kl="OCTET STRING",Xl="BIT STRING";function Yl(e){var t;return(t=class extends e{constructor(...e){var t;super(...e);const n=e[0]||{};this.isHexOnly=null!==(t=n.isHexOnly)&&void 0!==t&&t,this.valueHexView=n.valueHex?_l._H.toUint8Array(n.valueHex):ql}get valueHex(){return this.valueHexView.slice().buffer}set valueHex(e){this.valueHexView=new Uint8Array(e)}fromBER(e,t,n){const r=e instanceof ArrayBuffer?new Uint8Array(e):e;if(!kl(this,r,t,n))return-1;const i=t+n;return this.valueHexView=r.subarray(t,i),this.valueHexView.length?(this.blockLength=n,i):(this.warnings.push("Zero buffer length"),t)}toBER(e=!1){return this.isHexOnly?e?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",zl)}toJSON(){return{...super.toJSON(),isHexOnly:this.isHexOnly,valueHex:_l.U$.ToHex(this.valueHexView)}}}).NAME="hexBlock",t}class Jl{constructor({blockLength:e=0,error:t=Vl,warnings:n=[],valueBeforeDecode:r=ql}={}){this.blockLength=e,this.error=t,this.warnings=n,this.valueBeforeDecodeView=_l._H.toUint8Array(r)}static blockName(){return this.NAME}get valueBeforeDecode(){return this.valueBeforeDecodeView.slice().buffer}set valueBeforeDecode(e){this.valueBeforeDecodeView=new Uint8Array(e)}toJSON(){return{blockName:this.constructor.NAME,blockLength:this.blockLength,error:this.error,warnings:this.warnings,valueBeforeDecode:_l.U$.ToHex(this.valueBeforeDecodeView)}}}Jl.NAME="baseBlock";class Zl extends Jl{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'")}}Zl.NAME="valueBlock";class $l extends(Yl(Jl)){constructor({idBlock:e={}}={}){var t,n,r,i;super(),e?(this.isHexOnly=null!==(t=e.isHexOnly)&&void 0!==t&&t,this.valueHexView=e.valueHex?_l._H.toUint8Array(e.valueHex):ql,this.tagClass=null!==(n=e.tagClass)&&void 0!==n?n:-1,this.tagNumber=null!==(r=e.tagNumber)&&void 0!==r?r:-1,this.isConstructed=null!==(i=e.isConstructed)&&void 0!==i&&i):(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",zl}if(this.isConstructed&&(t|=32),this.tagNumber<31&&!this.isHexOnly){const n=new Uint8Array(1);if(!e){let e=this.tagNumber;e&=31,t|=e,n[0]=t}return n.buffer}if(!this.isHexOnly){const n=xl(this.tagNumber,7),r=new Uint8Array(n),i=n.byteLength,s=new Uint8Array(i+1);if(s[0]=31|t,!e){for(let e=0;e<i-1;e++)s[e+1]=128|r[e];s[i]=r[i-1]}return s.buffer}const n=new Uint8Array(this.valueHexView.byteLength+1);if(n[0]=31|t,!e){const e=this.valueHexView;for(let t=0;t<e.length-1;t++)n[t+1]=128|e[t];n[this.valueHexView.byteLength]=e[e.length-1]}return n.buffer}fromBER(e,t,n){const r=_l._H.toUint8Array(e);if(!kl(this,r,t,n))return-1;const i=r.subarray(t,t+n);if(0===i.length)return this.error="Zero buffer length",-1;switch(192&i[0]){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=!(32&~i[0]),this.isHexOnly=!1;const s=31&i[0];if(31!==s)this.tagNumber=s,this.blockLength=1;else{let e=1,t=this.valueHexView=new Uint8Array(255),n=255;for(;128&i[e];){if(t[e-1]=127&i[e],e++,e>=i.length)return this.error="End of input reached before message was fully decoded",-1;if(e===n){n+=255;const e=new Uint8Array(n);for(let n=0;n<t.length;n++)e[n]=t[n];t=this.valueHexView=new Uint8Array(n)}}this.blockLength=e+1,t[e-1]=127&i[e];const r=new Uint8Array(e);for(let n=0;n<e;n++)r[n]=t[n];t=this.valueHexView=new Uint8Array(e),t.set(r),this.blockLength<=9?this.tagNumber=El(t,7):(this.isHexOnly=!0,this.warnings.push("Tag too long, represented as hex-coded"))}if(1===this.tagClass&&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}}}$l.NAME="identificationBlock";class eh extends Jl{constructor({lenBlock:e={}}={}){var t,n,r;super(),this.isIndefiniteForm=null!==(t=e.isIndefiniteForm)&&void 0!==t&&t,this.longFormUsed=null!==(n=e.longFormUsed)&&void 0!==n&&n,this.length=null!==(r=e.length)&&void 0!==r?r:0}fromBER(e,t,n){const r=_l._H.toUint8Array(e);if(!kl(this,r,t,n))return-1;const i=r.subarray(t,t+n);if(0===i.length)return this.error="Zero buffer length",-1;if(255===i[0])return this.error="Length block 0xFF is reserved by standard",-1;if(this.isIndefiniteForm=128===i[0],this.isIndefiniteForm)return this.blockLength=1,t+this.blockLength;if(this.longFormUsed=!!(128&i[0]),!1===this.longFormUsed)return this.length=i[0],this.blockLength=1,t+this.blockLength;const s=127&i[0];if(s>8)return this.error="Too big integer",-1;if(s+1>i.length)return this.error="End of input reached before message was fully decoded",-1;const o=t+1,a=r.subarray(o,o+s);return 0===a[s-1]&&this.warnings.push("Needlessly long encoded length"),this.length=El(a,8),this.longFormUsed&&this.length<=127&&this.warnings.push("Unnecessary usage of long length form"),this.blockLength=s+1,t+this.blockLength}toBER(e=!1){let t,n;if(this.length>127&&(this.longFormUsed=!0),this.isIndefiniteForm)return t=new ArrayBuffer(1),!1===e&&(n=new Uint8Array(t),n[0]=128),t;if(this.longFormUsed){const r=xl(this.length,8);if(r.byteLength>127)return this.error="Too big length",zl;if(t=new ArrayBuffer(r.byteLength+1),e)return t;const i=new Uint8Array(r);n=new Uint8Array(t),n[0]=128|r.byteLength;for(let e=0;e<r.byteLength;e++)n[e+1]=i[e];return t}return t=new ArrayBuffer(1),!1===e&&(n=new Uint8Array(t),n[0]=this.length),t}toJSON(){return{...super.toJSON(),isIndefiniteForm:this.isIndefiniteForm,longFormUsed:this.longFormUsed,length:this.length}}}eh.NAME="lengthBlock";const th={};class nh extends Jl{constructor({name:e=Vl,optional:t=!1,primitiveSchema:n,...r}={},i){super(r),this.name=e,this.optional=t,n&&(this.primitiveSchema=n),this.idBlock=new $l(r),this.lenBlock=new eh(r),this.valueBlock=i?new i(r):new Zl(r)}fromBER(e,t,n){const r=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?n:this.lenBlock.length);return-1===r?(this.error=this.valueBlock.error,r):(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),r)}toBER(e,t){const n=t||new Nl;t||rh(this);const r=this.idBlock.toBER(e);if(n.write(r),this.lenBlock.isIndefiniteForm)n.write(new Uint8Array([128]).buffer),this.valueBlock.toBER(e,n),n.write(new ArrayBuffer(2));else{const t=this.valueBlock.toBER(e);this.lenBlock.length=t.byteLength;const r=this.lenBlock.toBER(e);n.write(r),n.write(t)}return t?zl:n.final()}toJSON(){const 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"ascii"===e?this.onAsciiEncoding():_l.U$.ToHex(this.toBER())}onAsciiEncoding(){return`${this.constructor.NAME} : ${_l.U$.ToHex(this.valueBlock.valueBeforeDecodeView)}`}isEqual(e){return this===e||e instanceof this.constructor&&function(e,t){if(e.byteLength!==t.byteLength)return!1;const n=new Uint8Array(e),r=new Uint8Array(t);for(let e=0;e<n.length;e++)if(n[e]!==r[e])return!1;return!0}(this.toBER(),e.toBER())}}function rh(e){if(e instanceof th.Constructed)for(const t of e.valueBlock.value)rh(t)&&(e.lenBlock.isIndefiniteForm=!0);return!!e.lenBlock.isIndefiniteForm}nh.NAME="BaseBlock";class ih extends nh{constructor({value:e=Vl,...t}={},n){super(t,n),e&&this.fromString(e)}getValue(){return this.valueBlock.value}setValue(e){this.valueBlock.value=e}fromBER(e,t,n){const r=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?n:this.lenBlock.length);return-1===r?(this.error=this.valueBlock.error,r):(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),r)}onAsciiEncoding(){return`${this.constructor.NAME} : '${this.valueBlock.value}'`}}ih.NAME="BaseStringBlock";class sh extends(Yl(Zl)){constructor({isHexOnly:e=!0,...t}={}){super(t),this.isHexOnly=e}}var oh,ah,ch,lh,hh,uh,ph,dh,fh,gh,mh,wh,yh,bh,Ah,vh,_h,Eh,xh,Sh,Ih,Th,Ch,Rh,kh,Nh,Oh,Bh,Ph,Lh,Dh,Uh,Fh,Mh,jh;sh.NAME="PrimitiveValueBlock";class Hh extends nh{constructor(e={}){super(e,sh),this.idBlock.isConstructed=!1}}function Wh(e,t=0,n=e.length){const r=t;let i=new nh({},Zl);const s=new Jl;if(!kl(s,e,t,n))return i.error=s.error,{offset:-1,result:i};if(!e.subarray(t,t+n).length)return i.error="Zero buffer length",{offset:-1,result:i};let o=i.idBlock.fromBER(e,t,n);if(i.idBlock.warnings.length&&i.warnings.concat(i.idBlock.warnings),-1===o)return i.error=i.idBlock.error,{offset:-1,result:i};if(t=o,n-=i.idBlock.blockLength,o=i.lenBlock.fromBER(e,t,n),i.lenBlock.warnings.length&&i.warnings.concat(i.lenBlock.warnings),-1===o)return i.error=i.lenBlock.error,{offset:-1,result:i};if(t=o,n-=i.lenBlock.blockLength,!i.idBlock.isConstructed&&i.lenBlock.isIndefiniteForm)return i.error="Indefinite length form used for primitive encoding form",{offset:-1,result:i};let a=nh;if(1===i.idBlock.tagClass){if(i.idBlock.tagNumber>=37&&!1===i.idBlock.isHexOnly)return i.error="UNIVERSAL 37 and upper tags are reserved by ASN.1 standard",{offset:-1,result:i};switch(i.idBlock.tagNumber){case 0:if(i.idBlock.isConstructed&&i.lenBlock.length>0)return i.error="Type [UNIVERSAL 0] is reserved",{offset:-1,result:i};a=th.EndOfContent;break;case 1:a=th.Boolean;break;case 2:a=th.Integer;break;case 3:a=th.BitString;break;case 4:a=th.OctetString;break;case 5:a=th.Null;break;case 6:a=th.ObjectIdentifier;break;case 10:a=th.Enumerated;break;case 12:a=th.Utf8String;break;case 13:a=th.RelativeObjectIdentifier;break;case 14:a=th.TIME;break;case 15:return i.error="[UNIVERSAL 15] is reserved by ASN.1 standard",{offset:-1,result:i};case 16:a=th.Sequence;break;case 17:a=th.Set;break;case 18:a=th.NumericString;break;case 19:a=th.PrintableString;break;case 20:a=th.TeletexString;break;case 21:a=th.VideotexString;break;case 22:a=th.IA5String;break;case 23:a=th.UTCTime;break;case 24:a=th.GeneralizedTime;break;case 25:a=th.GraphicString;break;case 26:a=th.VisibleString;break;case 27:a=th.GeneralString;break;case 28:a=th.UniversalString;break;case 29:a=th.CharacterString;break;case 30:a=th.BmpString;break;case 31:a=th.DATE;break;case 32:a=th.TimeOfDay;break;case 33:a=th.DateTime;break;case 34:a=th.Duration;break;default:{const e=i.idBlock.isConstructed?new th.Constructed:new th.Primitive;e.idBlock=i.idBlock,e.lenBlock=i.lenBlock,e.warnings=i.warnings,i=e}}}else a=i.idBlock.isConstructed?th.Constructed:th.Primitive;return i=function(e,t){if(e instanceof t)return e;const n=new t;return n.idBlock=e.idBlock,n.lenBlock=e.lenBlock,n.warnings=e.warnings,n.valueBeforeDecodeView=e.valueBeforeDecodeView,n}(i,a),o=i.fromBER(e,t,i.lenBlock.isIndefiniteForm?n:i.lenBlock.length),i.valueBeforeDecodeView=e.subarray(r,r+i.blockLength),{offset:o,result:i}}function Qh(e){if(!e.byteLength){const e=new nh({},Zl);return e.error="Input buffer has zero length",{offset:-1,result:e}}return Wh(_l._H.toUint8Array(e).slice(),0,e.byteLength)}function Vh(e,t){return e?1:t}oh=Hh,th.Primitive=oh,Hh.NAME="PRIMITIVE";class zh extends Zl{constructor({value:e=[],isIndefiniteForm:t=!1,...n}={}){super(n),this.value=e,this.isIndefiniteForm=t}fromBER(e,t,n){const r=_l._H.toUint8Array(e);if(!kl(this,r,t,n))return-1;if(this.valueBeforeDecodeView=r.subarray(t,t+n),0===this.valueBeforeDecodeView.length)return this.warnings.push("Zero buffer length"),t;let i=t;for(;Vh(this.isIndefiniteForm,n)>0;){const e=Wh(r,i,n);if(-1===e.offset)return this.error=e.result.error,this.warnings.concat(e.result.warnings),-1;if(i=e.offset,this.blockLength+=e.result.blockLength,n-=e.result.blockLength,this.value.push(e.result),this.isIndefiniteForm&&e.result.constructor.NAME===Gl)break}return this.isIndefiniteForm&&(this.value[this.value.length-1].constructor.NAME===Gl?this.value.pop():this.warnings.push("No EndOfContent block encoded")),i}toBER(e,t){const n=t||new Nl;for(let t=0;t<this.value.length;t++)this.value[t].toBER(e,n);return t?zl:n.final()}toJSON(){const e={...super.toJSON(),isIndefiniteForm:this.isIndefiniteForm,value:[]};for(const t of this.value)e.value.push(t.toJSON());return e}}zh.NAME="ConstructedValueBlock";class qh extends nh{constructor(e={}){super(e,zh),this.idBlock.isConstructed=!0}fromBER(e,t,n){this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm;const r=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?n:this.lenBlock.length);return-1===r?(this.error=this.valueBlock.error,r):(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),r)}onAsciiEncoding(){const e=[];for(const t of this.valueBlock.value)e.push(t.toString("ascii").split("\n").map(e=>` ${e}`).join("\n"));const t=3===this.idBlock.tagClass?`[${this.idBlock.tagNumber}]`:this.constructor.NAME;return e.length?`${t} :\n${e.join("\n")}`:`${t} :`}}ah=qh,th.Constructed=ah,qh.NAME="CONSTRUCTED";class Gh extends Zl{fromBER(e,t,n){return t}toBER(e){return zl}}Gh.override="EndOfContentValueBlock";class Kh extends nh{constructor(e={}){super(e,Gh),this.idBlock.tagClass=1,this.idBlock.tagNumber=0}}ch=Kh,th.EndOfContent=ch,Kh.NAME=Gl;class Xh extends nh{constructor(e={}){super(e,Zl),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){const n=new ArrayBuffer(2);if(!e){const e=new Uint8Array(n);e[0]=5,e[1]=0}return t&&t.write(n),n}onAsciiEncoding(){return`${this.constructor.NAME}`}}lh=Xh,th.Null=lh,Xh.NAME="NULL";class Yh extends(Yl(Zl)){constructor({value:e,...t}={}){super(t),t.valueHex?this.valueHexView=_l._H.toUint8Array(t.valueHex):this.valueHexView=new Uint8Array(1),e&&(this.value=e)}get value(){for(const e of this.valueHexView)if(e>0)return!0;return!1}set value(e){this.valueHexView[0]=e?255:0}fromBER(e,t,n){const r=_l._H.toUint8Array(e);return kl(this,r,t,n)?(this.valueHexView=r.subarray(t,t+n),n>1&&this.warnings.push("Boolean value encoded in more then 1 octet"),this.isHexOnly=!0,Il.call(this),this.blockLength=n,t+n):-1}toBER(){return this.valueHexView.slice()}toJSON(){return{...super.toJSON(),value:this.value}}}Yh.NAME="BooleanValueBlock";class Jh extends nh{constructor(e={}){super(e,Yh),this.idBlock.tagClass=1,this.idBlock.tagNumber=1}getValue(){return this.valueBlock.value}setValue(e){this.valueBlock.value=e}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.getValue}`}}hh=Jh,th.Boolean=hh,Jh.NAME="BOOLEAN";class Zh extends(Yl(zh)){constructor({isConstructed:e=!1,...t}={}){super(t),this.isConstructed=e}fromBER(e,t,n){let r=0;if(this.isConstructed){if(this.isHexOnly=!1,r=zh.prototype.fromBER.call(this,e,t,n),-1===r)return r;for(let e=0;e<this.value.length;e++){const t=this.value[e].constructor.NAME;if(t===Gl){if(this.isIndefiniteForm)break;return this.error="EndOfContent is unexpected, OCTET STRING may consists of OCTET STRINGs only",-1}if(t!==Kl)return this.error="OCTET STRING may consists of OCTET STRINGs only",-1}}else this.isHexOnly=!0,r=super.fromBER(e,t,n),this.blockLength=n;return r}toBER(e,t){return this.isConstructed?zh.prototype.toBER.call(this,e,t):e?new ArrayBuffer(this.valueHexView.byteLength):this.valueHexView.slice().buffer}toJSON(){return{...super.toJSON(),isConstructed:this.isConstructed}}}Zh.NAME="OctetStringValueBlock";class $h extends nh{constructor({idBlock:e={},lenBlock:t={},...n}={}){var r,i;null!==(r=n.isConstructed)&&void 0!==r||(n.isConstructed=!!(null===(i=n.value)||void 0===i?void 0:i.length)),super({idBlock:{isConstructed:n.isConstructed,...e},lenBlock:{...t,isIndefiniteForm:!!n.isIndefiniteForm},...n},Zh),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,0===n)return 0===this.idBlock.error.length&&(this.blockLength+=this.idBlock.blockLength),0===this.lenBlock.error.length&&(this.blockLength+=this.lenBlock.blockLength),t;if(!this.valueBlock.isConstructed){const r=(e instanceof ArrayBuffer?new Uint8Array(e):e).subarray(t,t+n);try{if(r.byteLength){const e=Wh(r,0,r.byteLength);-1!==e.offset&&e.offset===n&&(this.valueBlock.value=[e.result])}}catch(e){}}return super.fromBER(e,t,n)}onAsciiEncoding(){return this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length?qh.prototype.onAsciiEncoding.call(this):`${this.constructor.NAME} : ${_l.U$.ToHex(this.valueBlock.valueHexView)}`}getValue(){if(!this.idBlock.isConstructed)return this.valueBlock.valueHexView.slice().buffer;const e=[];for(const t of this.valueBlock.value)t instanceof $h&&e.push(t.valueBlock.valueHexView);return _l._H.concat(e)}}uh=$h,th.OctetString=uh,$h.NAME=Kl;class eu extends(Yl(zh)){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 r=-1;if(this.isConstructed){if(r=zh.prototype.fromBER.call(this,e,t,n),-1===r)return r;for(const e of this.value){const t=e.constructor.NAME;if(t===Gl){if(this.isIndefiniteForm)break;return this.error="EndOfContent is unexpected, BIT STRING may consists of BIT STRINGs only",-1}if(t!==Xl)return this.error="BIT STRING may consists of BIT STRINGs only",-1;const n=e.valueBlock;if(this.unusedBits>0&&n.unusedBits>0)return this.error='Using of "unused bits" inside constructive BIT STRING allowed for least one only',-1;this.unusedBits=n.unusedBits}return r}const i=_l._H.toUint8Array(e);if(!kl(this,i,t,n))return-1;const s=i.subarray(t,t+n);if(this.unusedBits=s[0],this.unusedBits>7)return this.error="Unused bits for BitString must be in range 0-7",-1;if(!this.unusedBits){const t=s.subarray(1);try{if(t.byteLength){const e=Wh(t,0,t.byteLength);-1!==e.offset&&e.offset===n-1&&(this.value=[e.result])}}catch(e){}}return this.valueHexView=s.subarray(1),this.blockLength=s.length,t+n}toBER(e,t){if(this.isConstructed)return zh.prototype.toBER.call(this,e,t);if(e)return new ArrayBuffer(this.valueHexView.byteLength+1);if(!this.valueHexView.byteLength)return zl;const 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}}}eu.NAME="BitStringValueBlock";class tu extends nh{constructor({idBlock:e={},lenBlock:t={},...n}={}){var r,i;null!==(r=n.isConstructed)&&void 0!==r||(n.isConstructed=!!(null===(i=n.value)||void 0===i?void 0:i.length)),super({idBlock:{isConstructed:n.isConstructed,...e},lenBlock:{...t,isIndefiniteForm:!!n.isIndefiniteForm},...n},eu),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 qh.prototype.onAsciiEncoding.call(this);{const e=[],t=this.valueBlock.valueHexView;for(const n of t)e.push(n.toString(2).padStart(8,"0"));const n=e.join("");return`${this.constructor.NAME} : ${n.substring(0,n.length-this.valueBlock.unusedBits)}`}}}function nu(e,t){const n=new Uint8Array([0]),r=new Uint8Array(e),i=new Uint8Array(t);let s=r.slice(0);const o=s.length-1,a=i.slice(0),c=a.length-1;let l=0,h=0;for(let e=c<o?o:c;e>=0;e--,h++)l=1==h<a.length?s[o-h]+a[c-h]+n[0]:s[o-h]+n[0],n[0]=l/10,1==h>=s.length?s=Sl(new Uint8Array([l%10]),s):s[o-h]=l%10;return n[0]>0&&(s=Sl(n,s)),s}function ru(e){if(e>=Ol.length)for(let t=Ol.length;t<=e;t++){const e=new Uint8Array([0]);let n=Ol[t-1].slice(0);for(let t=n.length-1;t>=0;t--){const r=new Uint8Array([(n[t]<<1)+e[0]]);e[0]=r[0]/10,n[t]=r[0]%10}e[0]>0&&(n=Sl(e,n)),Ol.push(n)}return Ol[e]}function iu(e,t){let n=0;const r=new Uint8Array(e),i=new Uint8Array(t),s=r.slice(0),o=s.length-1,a=i.slice(0),c=a.length-1;let l,h=0;for(let e=c;e>=0;e--,h++)l=s[o-h]-a[c-h]-n,1==l<0?(n=1,s[o-h]=l+10):(n=0,s[o-h]=l);if(n>0)for(let e=o-c+1;e>=0;e--,h++){if(l=s[o-h]-n,!(l<0)){n=0,s[o-h]=l;break}n=1,s[o-h]=l+10}return s.slice()}ph=tu,th.BitString=ph,tu.NAME=Xl;class su extends(Yl(Zl)){constructor({value:e,...t}={}){super(t),this._valueDec=0,t.valueHex&&this.setValueHex(),void 0!==e&&(this.valueDec=e)}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=Il.call(this)))}set valueDec(e){this._valueDec=e,this.isHexOnly=!1,this.valueHexView=new Uint8Array(function(e){const t=e<0?-1*e:e;let n=128;for(let r=1;r<8;r++){if(t<=n){if(e<0){const e=xl(n-t,8,r);return new Uint8Array(e)[0]|=128,e}let i=xl(t,8,r),s=new Uint8Array(i);if(128&s[0]){const e=i.slice(0),t=new Uint8Array(e);i=new ArrayBuffer(i.byteLength+1),s=new Uint8Array(i);for(let n=0;n<e.byteLength;n++)s[n+1]=t[n];s[0]=0}return i}n*=Math.pow(2,8)}return new ArrayBuffer(0)}(e))}get valueDec(){return this._valueDec}fromDER(e,t,n,r=0){const i=this.fromBER(e,t,n);if(-1===i)return i;const s=this.valueHexView;return 0===s[0]&&128&s[1]?this.valueHexView=s.subarray(1):0!==r&&s.length<r&&(r-s.length>1&&(r=s.length+1),this.valueHexView=s.subarray(r-s.length)),i}toDER(e=!1){const t=this.valueHexView;switch(!0){case!!(128&t[0]):{const e=new Uint8Array(this.valueHexView.length+1);e[0]=0,e.set(t,1),this.valueHexView=e}break;case 0===t[0]&&!(128&t[1]):this.valueHexView=this.valueHexView.subarray(1)}return this.toBER(e)}fromBER(e,t,n){const r=super.fromBER(e,t,n);return-1===r||this.setValueHex(),r}toBER(e){return e?new ArrayBuffer(this.valueHexView.length):this.valueHexView.slice().buffer}toJSON(){return{...super.toJSON(),valueDec:this.valueDec}}toString(){const e=8*this.valueHexView.length-1;let t,n=new Uint8Array(8*this.valueHexView.length/3),r=0;const i=this.valueHexView;let s="",o=!1;for(let o=i.byteLength-1;o>=0;o--){t=i[o];for(let i=0;i<8;i++)1&~t||(r===e?(n=iu(ru(r),n),s="-"):n=nu(n,ru(r))),r++,t>>=1}for(let e=0;e<n.length;e++)n[e]&&(o=!0),o&&(s+=Bl.charAt(n[e]));return!1===o&&(s+=Bl.charAt(0)),s}}dh=su,su.NAME="IntegerValueBlock",Object.defineProperty(dh.prototype,"valueHex",{set:function(e){this.valueHexView=new Uint8Array(e),this.setValueHex()},get:function(){return this.valueHexView.slice().buffer}});class ou extends nh{constructor(e={}){super(e,su),this.idBlock.tagClass=1,this.idBlock.tagNumber=2}toBigInt(){return Cl(),BigInt(this.valueBlock.toString())}static fromBigInt(e){Cl();const t=BigInt(e),n=new Nl,r=t.toString(16).replace(/^-/,""),i=new Uint8Array(_l.U$.FromHex(r));if(t<0){const e=new Uint8Array(i.length+(128&i[0]?1:0));e[0]|=128;const r=BigInt(`0x${_l.U$.ToHex(e)}`)+t,s=_l._H.toUint8Array(_l.U$.FromHex(r.toString(16)));s[0]|=128,n.write(s)}else 128&i[0]&&n.write(new Uint8Array([0])),n.write(i);return new ou({valueHex:n.final()})}convertToDER(){const e=new ou({valueHex:this.valueBlock.valueHexView});return e.valueBlock.toDER(),e}convertFromDER(){return new ou({valueHex:0===this.valueBlock.valueHexView[0]?this.valueBlock.valueHexView.subarray(1):this.valueBlock.valueHexView})}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()}`}}fh=ou,th.Integer=fh,ou.NAME="INTEGER";class au extends ou{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=10}}gh=au,th.Enumerated=gh,au.NAME="ENUMERATED";class cu extends(Yl(Zl)){constructor({valueDec:e=-1,isFirstSid:t=!1,...n}={}){super(n),this.valueDec=e,this.isFirstSid=t}fromBER(e,t,n){if(!n)return t;const r=_l._H.toUint8Array(e);if(!kl(this,r,t,n))return-1;const i=r.subarray(t,t+n);this.valueHexView=new Uint8Array(n);for(let e=0;e<n&&(this.valueHexView[e]=127&i[e],this.blockLength++,128&i[e]);e++);const s=new Uint8Array(this.blockLength);for(let e=0;e<this.blockLength;e++)s[e]=this.valueHexView[e];return this.valueHexView=s,128&i[this.blockLength-1]?(this.error="End of input reached before message was fully decoded",-1):(0===this.valueHexView[0]&&this.warnings.push("Needlessly long format of SID encoding"),this.blockLength<=8?this.valueDec=El(this.valueHexView,7):(this.isHexOnly=!0,this.warnings.push("Too big SID for decoding, hex only")),t+this.blockLength)}set valueBigInt(e){Cl();let t=BigInt(e).toString(2);for(;t.length%7;)t="0"+t;const n=new Uint8Array(t.length/7);for(let e=0;e<n.length;e++)n[e]=parseInt(t.slice(7*e,7*e+7),2)+(e+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);const t=this.valueHexView,n=new Uint8Array(this.blockLength);for(let e=0;e<this.blockLength-1;e++)n[e]=128|t[e];return n[this.blockLength-1]=t[this.blockLength-1],n.buffer}const t=xl(this.valueDec,7);if(0===t.byteLength)return this.error="Error during encoding SID value",zl;const n=new Uint8Array(t.byteLength);if(!e){const e=new Uint8Array(t),r=t.byteLength-1;for(let t=0;t<r;t++)n[t]=128|e[t];n[r]=e[r]}return n}toString(){let e="";if(this.isHexOnly)e=_l.U$.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}}}cu.NAME="sidBlock";class lu extends Zl{constructor({value:e=Vl,...t}={}){super(t),this.value=[],e&&this.fromString(e)}fromBER(e,t,n){let r=t;for(;n>0;){const t=new cu;if(r=t.fromBER(e,r,n),-1===r)return this.blockLength=0,this.error=t.error,r;0===this.value.length&&(t.isFirstSid=!0),this.blockLength+=t.blockLength,n-=t.blockLength,this.value.push(t)}return r}toBER(e){const t=[];for(let n=0;n<this.value.length;n++){const r=this.value[n].toBER(e);if(0===r.byteLength)return this.error=this.value[n].error,zl;t.push(r)}return Rl(t)}fromString(e){this.value=[];let t=0,n=0,r="",i=!1;do{if(n=e.indexOf(".",t),r=-1===n?e.substring(t):e.substring(t,n),t=n+1,i){const e=this.value[0];let t=0;switch(e.valueDec){case 0:break;case 1:t=40;break;case 2:t=80;break;default:return void(this.value=[])}const n=parseInt(r,10);if(isNaN(n))return;e.valueDec=n+t,i=!1}else{const e=new cu;if(r>Number.MAX_SAFE_INTEGER){Cl();const t=BigInt(r);e.valueBigInt=t}else if(e.valueDec=parseInt(r,10),isNaN(e.valueDec))return;this.value.length||(e.isFirstSid=!0,i=!0),this.value.push(e)}}while(-1!==n)}toString(){let e="",t=!1;for(let n=0;n<this.value.length;n++){t=this.value[n].isHexOnly;let r=this.value[n].toString();0!==n&&(e=`${e}.`),t?(r=`{${r}}`,this.value[n].isFirstSid?e=`2.{${r} - 80}`:e+=r):e+=r}return e}toJSON(){const 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}}lu.NAME="ObjectIdentifierValueBlock";class hu extends nh{constructor(e={}){super(e,lu),this.idBlock.tagClass=1,this.idBlock.tagNumber=6}getValue(){return this.valueBlock.toString()}setValue(e){this.valueBlock.fromString(e)}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()||"empty"}`}toJSON(){return{...super.toJSON(),value:this.getValue()}}}mh=hu,th.ObjectIdentifier=mh,hu.NAME="OBJECT IDENTIFIER";class uu extends(Yl(Jl)){constructor({valueDec:e=0,...t}={}){super(t),this.valueDec=e}fromBER(e,t,n){if(0===n)return t;const r=_l._H.toUint8Array(e);if(!kl(this,r,t,n))return-1;const i=r.subarray(t,t+n);this.valueHexView=new Uint8Array(n);for(let e=0;e<n&&(this.valueHexView[e]=127&i[e],this.blockLength++,128&i[e]);e++);const s=new Uint8Array(this.blockLength);for(let e=0;e<this.blockLength;e++)s[e]=this.valueHexView[e];return this.valueHexView=s,128&i[this.blockLength-1]?(this.error="End of input reached before message was fully decoded",-1):(0===this.valueHexView[0]&&this.warnings.push("Needlessly long format of SID encoding"),this.blockLength<=8?this.valueDec=El(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);const t=this.valueHexView,n=new Uint8Array(this.blockLength);for(let e=0;e<this.blockLength-1;e++)n[e]=128|t[e];return n[this.blockLength-1]=t[this.blockLength-1],n.buffer}const t=xl(this.valueDec,7);if(0===t.byteLength)return this.error="Error during encoding SID value",zl;const n=new Uint8Array(t.byteLength);if(!e){const e=new Uint8Array(t),r=t.byteLength-1;for(let t=0;t<r;t++)n[t]=128|e[t];n[r]=e[r]}return n.buffer}toString(){let e="";return e=this.isHexOnly?_l.U$.ToHex(this.valueHexView):this.valueDec.toString(),e}toJSON(){return{...super.toJSON(),valueDec:this.valueDec}}}uu.NAME="relativeSidBlock";class pu extends Zl{constructor({value:e=Vl,...t}={}){super(t),this.value=[],e&&this.fromString(e)}fromBER(e,t,n){let r=t;for(;n>0;){const t=new uu;if(r=t.fromBER(e,r,n),-1===r)return this.blockLength=0,this.error=t.error,r;this.blockLength+=t.blockLength,n-=t.blockLength,this.value.push(t)}return r}toBER(e,t){const n=[];for(let t=0;t<this.value.length;t++){const r=this.value[t].toBER(e);if(0===r.byteLength)return this.error=this.value[t].error,zl;n.push(r)}return Rl(n)}fromString(e){this.value=[];let t=0,n=0,r="";do{n=e.indexOf(".",t),r=-1===n?e.substring(t):e.substring(t,n),t=n+1;const i=new uu;if(i.valueDec=parseInt(r,10),isNaN(i.valueDec))return!0;this.value.push(i)}while(-1!==n);return!0}toString(){let e="",t=!1;for(let n=0;n<this.value.length;n++){t=this.value[n].isHexOnly;let r=this.value[n].toString();0!==n&&(e=`${e}.`),t?(r=`{${r}}`,e+=r):e+=r}return e}toJSON(){const 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}}pu.NAME="RelativeObjectIdentifierValueBlock";class du extends nh{constructor(e={}){super(e,pu),this.idBlock.tagClass=1,this.idBlock.tagNumber=13}getValue(){return this.valueBlock.toString()}setValue(e){this.valueBlock.fromString(e)}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()||"empty"}`}toJSON(){return{...super.toJSON(),value:this.getValue()}}}wh=du,th.RelativeObjectIdentifier=wh,du.NAME="RelativeObjectIdentifier";class fu extends qh{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=16}}yh=fu,th.Sequence=yh,fu.NAME="SEQUENCE";class gu extends qh{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=17}}bh=gu,th.Set=bh,gu.NAME="SET";class mu extends(Yl(Zl)){constructor({...e}={}){super(e),this.isHexOnly=!0,this.value=Vl}toJSON(){return{...super.toJSON(),value:this.value}}}mu.NAME="StringValueBlock";class wu extends mu{}wu.NAME="SimpleStringValueBlock";class yu extends ih{constructor({...e}={}){super(e,wu)}fromBuffer(e){this.valueBlock.value=String.fromCharCode.apply(null,_l._H.toUint8Array(e))}fromString(e){const t=e.length,n=this.valueBlock.valueHexView=new Uint8Array(t);for(let r=0;r<t;r++)n[r]=e.charCodeAt(r);this.valueBlock.value=e}}yu.NAME="SIMPLE STRING";class bu extends yu{fromBuffer(e){this.valueBlock.valueHexView=_l._H.toUint8Array(e);try{this.valueBlock.value=_l.U$.ToUtf8String(e)}catch(t){this.warnings.push(`Error during "decodeURIComponent": ${t}, using raw string`),this.valueBlock.value=_l.U$.ToBinary(e)}}fromString(e){this.valueBlock.valueHexView=new Uint8Array(_l.U$.FromUtf8String(e)),this.valueBlock.value=e}}bu.NAME="Utf8StringValueBlock";class Au extends bu{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=12}}Ah=Au,th.Utf8String=Ah,Au.NAME="UTF8String";class vu extends yu{fromBuffer(e){this.valueBlock.value=_l.U$.ToUtf16String(e),this.valueBlock.valueHexView=_l._H.toUint8Array(e)}fromString(e){this.valueBlock.value=e,this.valueBlock.valueHexView=new Uint8Array(_l.U$.FromUtf16String(e))}}vu.NAME="BmpStringValueBlock";class _u extends vu{constructor({...e}={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=30}}vh=_u,th.BmpString=vh,_u.NAME="BMPString";class Eu extends yu{fromBuffer(e){const t=ArrayBuffer.isView(e)?e.slice().buffer:e.slice(0),n=new Uint8Array(t);for(let e=0;e<n.length;e+=4)n[e]=n[e+3],n[e+1]=n[e+2],n[e+2]=0,n[e+3]=0;this.valueBlock.value=String.fromCharCode.apply(null,new Uint32Array(t))}fromString(e){const t=e.length,n=this.valueBlock.valueHexView=new Uint8Array(4*t);for(let r=0;r<t;r++){const t=xl(e.charCodeAt(r),8),i=new Uint8Array(t);if(i.length>4)continue;const s=4-i.length;for(let e=i.length-1;e>=0;e--)n[4*r+e+s]=i[e]}this.valueBlock.value=e}}Eu.NAME="UniversalStringValueBlock";class xu extends Eu{constructor({...e}={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=28}}_h=xu,th.UniversalString=_h,xu.NAME="UniversalString";class Su extends yu{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=18}}Eh=Su,th.NumericString=Eh,Su.NAME="NumericString";class Iu extends yu{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=19}}xh=Iu,th.PrintableString=xh,Iu.NAME="PrintableString";class Tu extends yu{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=20}}Sh=Tu,th.TeletexString=Sh,Tu.NAME="TeletexString";class Cu extends yu{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=21}}Ih=Cu,th.VideotexString=Ih,Cu.NAME="VideotexString";class Ru extends yu{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=22}}Th=Ru,th.IA5String=Th,Ru.NAME="IA5String";class ku extends yu{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=25}}Ch=ku,th.GraphicString=Ch,ku.NAME="GraphicString";class Nu extends yu{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=26}}Rh=Nu,th.VisibleString=Rh,Nu.NAME="VisibleString";class Ou extends yu{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=27}}kh=Ou,th.GeneralString=kh,Ou.NAME="GeneralString";class Bu extends yu{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=29}}Nh=Bu,th.CharacterString=Nh,Bu.NAME="CharacterString";class Pu extends Nu{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 t=0;t<e.length;t++)this.valueBlock.valueHexView[t]=e.charCodeAt(t)}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,_l._H.toUint8Array(e)))}toBuffer(){const e=this.toString(),t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t);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){const t=/(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})Z/gi.exec(e);if(null===t)return void(this.error="Wrong input string for conversion");const n=parseInt(t[1],10);this.year=n>=50?1900+n:2e3+n,this.month=parseInt(t[2],10),this.day=parseInt(t[3],10),this.hour=parseInt(t[4],10),this.minute=parseInt(t[5],10),this.second=parseInt(t[6],10)}toString(e="iso"){if("iso"===e){const e=new Array(7);return e[0]=Tl(this.year<2e3?this.year-1900:this.year-2e3,2),e[1]=Tl(this.month,2),e[2]=Tl(this.day,2),e[3]=Tl(this.hour,2),e[4]=Tl(this.minute,2),e[5]=Tl(this.second,2),e[6]="Z",e.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}}}Oh=Pu,th.UTCTime=Oh,Pu.NAME="UTCTime";class Lu extends Pu{constructor(e={}){var t;super(e),null!==(t=this.millisecond)&&void 0!==t||(this.millisecond=0),this.idBlock.tagClass=1,this.idBlock.tagNumber=24}fromDate(e){super.fromDate(e),this.millisecond=e.getUTCMilliseconds()}toDate(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond))}fromString(e){let t,n=!1,r="",i="",s=0,o=0,a=0;if("Z"===e[e.length-1])r=e.substring(0,e.length-1),n=!0;else{const t=new Number(e[e.length-1]);if(isNaN(t.valueOf()))throw new Error("Wrong input string for conversion");r=e}if(n){if(-1!==r.indexOf("+"))throw new Error("Wrong input string for conversion");if(-1!==r.indexOf("-"))throw new Error("Wrong input string for conversion")}else{let e=1,t=r.indexOf("+"),n="";if(-1===t&&(t=r.indexOf("-"),e=-1),-1!==t){if(n=r.substring(t+1),r=r.substring(0,t),2!==n.length&&4!==n.length)throw new Error("Wrong input string for conversion");let i=parseInt(n.substring(0,2),10);if(isNaN(i.valueOf()))throw new Error("Wrong input string for conversion");if(o=e*i,4===n.length){if(i=parseInt(n.substring(2,4),10),isNaN(i.valueOf()))throw new Error("Wrong input string for conversion");a=e*i}}}let c=r.indexOf(".");if(-1===c&&(c=r.indexOf(",")),-1!==c){const e=new Number(`0${r.substring(c)}`);if(isNaN(e.valueOf()))throw new Error("Wrong input string for conversion");s=e.valueOf(),i=r.substring(0,c)}else i=r;switch(!0){case 8===i.length:if(t=/(\d{4})(\d{2})(\d{2})/gi,-1!==c)throw new Error("Wrong input string for conversion");break;case 10===i.length:if(t=/(\d{4})(\d{2})(\d{2})(\d{2})/gi,-1!==c){let e=60*s;this.minute=Math.floor(e),e=60*(e-this.minute),this.second=Math.floor(e),e=1e3*(e-this.second),this.millisecond=Math.floor(e)}break;case 12===i.length:if(t=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/gi,-1!==c){let e=60*s;this.second=Math.floor(e),e=1e3*(e-this.second),this.millisecond=Math.floor(e)}break;case 14===i.length:if(t=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/gi,-1!==c){const e=1e3*s;this.millisecond=Math.floor(e)}break;default:throw new Error("Wrong input string for conversion")}const l=t.exec(i);if(null===l)throw new Error("Wrong input string for conversion");for(let e=1;e<l.length;e++)switch(e){case 1:this.year=parseInt(l[e],10);break;case 2:this.month=parseInt(l[e],10);break;case 3:this.day=parseInt(l[e],10);break;case 4:this.hour=parseInt(l[e],10)+o;break;case 5:this.minute=parseInt(l[e],10)+a;break;case 6:this.second=parseInt(l[e],10);break;default:throw new Error("Wrong input string for conversion")}if(!1===n){const e=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond);this.year=e.getUTCFullYear(),this.month=e.getUTCMonth(),this.day=e.getUTCDay(),this.hour=e.getUTCHours(),this.minute=e.getUTCMinutes(),this.second=e.getUTCSeconds(),this.millisecond=e.getUTCMilliseconds()}}toString(e="iso"){if("iso"===e){const e=[];return e.push(Tl(this.year,4)),e.push(Tl(this.month,2)),e.push(Tl(this.day,2)),e.push(Tl(this.hour,2)),e.push(Tl(this.minute,2)),e.push(Tl(this.second,2)),0!==this.millisecond&&(e.push("."),e.push(Tl(this.millisecond,3))),e.push("Z"),e.join("")}return super.toString(e)}toJSON(){return{...super.toJSON(),millisecond:this.millisecond}}}Bh=Lu,th.GeneralizedTime=Bh,Lu.NAME="GeneralizedTime";class Du extends Au{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=31}}Ph=Du,th.DATE=Ph,Du.NAME="DATE";class Uu extends Au{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=32}}Lh=Uu,th.TimeOfDay=Lh,Uu.NAME="TimeOfDay";class Fu extends Au{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=33}}Dh=Fu,th.DateTime=Dh,Fu.NAME="DateTime";class Mu extends Au{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=34}}Uh=Mu,th.Duration=Uh,Mu.NAME="Duration";class ju extends Au{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=14}}Fh=ju,th.TIME=Fh,ju.NAME="TIME";class Hu{constructor({name:e=Vl,optional:t=!1}={}){this.name=e,this.optional=t}}class Wu extends Hu{constructor({value:e=[],...t}={}){super(t),this.value=e}}class Qu extends Hu{constructor({value:e=new Hu,local:t=!1,...n}={}){super(n),this.value=e,this.local=t}}class Vu{constructor({data:e=ql}={}){this.dataView=_l._H.toUint8Array(e)}get data(){return this.dataView.slice().buffer}set data(e){this.dataView=_l._H.toUint8Array(e)}fromBER(e,t,n){const r=t+n;return this.dataView=_l._H.toUint8Array(e).subarray(t,r),r}toBER(e){return this.dataView.slice().buffer}}function zu(e,t,n){if(n instanceof Wu){for(let r=0;r<n.value.length;r++)if(zu(e,t,n.value[r]).verified)return{verified:!0,result:e};{const e={verified:!1,result:{error:"Wrong values for Choice type"}};return n.hasOwnProperty(Pl)&&(e.name=n.name),e}}if(n instanceof Hu)return n.hasOwnProperty(Pl)&&(e[n.name]=t),{verified:!0,result:e};if(e instanceof Object==0)return{verified:!1,result:{error:"Wrong root object"}};if(t instanceof Object==0)return{verified:!1,result:{error:"Wrong ASN.1 data"}};if(n instanceof Object==0)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(Ul in n==0)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(Hl in n.idBlock==0)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(Wl in n.idBlock==0)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};const r=n.idBlock.toBER(!1);if(0===r.byteLength)return{verified:!1,result:{error:"Error encoding idBlock for ASN.1 schema"}};if(-1===n.idBlock.fromBER(r,0,r.byteLength))return{verified:!1,result:{error:"Error decoding idBlock for ASN.1 schema"}};if(!1===n.idBlock.hasOwnProperty(Fl))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(n.idBlock.tagClass!==t.idBlock.tagClass)return{verified:!1,result:e};if(!1===n.idBlock.hasOwnProperty(Ml))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(n.idBlock.tagNumber!==t.idBlock.tagNumber)return{verified:!1,result:e};if(!1===n.idBlock.hasOwnProperty(jl))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(n.idBlock.isConstructed!==t.idBlock.isConstructed)return{verified:!1,result:e};if(!(Dl in n.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(n.idBlock.isHexOnly!==t.idBlock.isHexOnly)return{verified:!1,result:e};if(n.idBlock.isHexOnly){if(Ll in n.idBlock==0)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};const r=n.idBlock.valueHexView,i=t.idBlock.valueHexView;if(r.length!==i.length)return{verified:!1,result:e};for(let t=0;t<r.length;t++)if(r[t]!==i[1])return{verified:!1,result:e}}if(n.name&&(n.name=n.name.replace(/^\s+|\s+$/g,Vl),n.name&&(e[n.name]=t)),n instanceof th.Constructed){let r=0,i={verified:!1,result:{error:"Unknown error"}},s=n.valueBlock.value.length;if(s>0&&n.valueBlock.value[0]instanceof Qu&&(s=t.valueBlock.value.length),0===s)return{verified:!0,result:e};if(0===t.valueBlock.value.length&&0!==n.valueBlock.value.length){let t=!0;for(let e=0;e<n.valueBlock.value.length;e++)t=t&&(n.valueBlock.value[e].optional||!1);return t?{verified:!0,result:e}:(n.name&&(n.name=n.name.replace(/^\s+|\s+$/g,Vl),n.name&&delete e[n.name]),e.error="Inconsistent object length",{verified:!1,result:e})}for(let o=0;o<s;o++)if(o-r>=t.valueBlock.value.length){if(!1===n.valueBlock.value[o].optional){const t={verified:!1,result:e};return e.error="Inconsistent length between ASN.1 data and schema",n.name&&(n.name=n.name.replace(/^\s+|\s+$/g,Vl),n.name&&(delete e[n.name],t.name=n.name)),t}}else if(n.valueBlock.value[0]instanceof Qu){if(i=zu(e,t.valueBlock.value[o],n.valueBlock.value[0].value),!1===i.verified){if(!n.valueBlock.value[0].optional)return n.name&&(n.name=n.name.replace(/^\s+|\s+$/g,Vl),n.name&&delete e[n.name]),i;r++}if(Pl in n.valueBlock.value[0]&&n.valueBlock.value[0].name.length>0){let r={};r=Ql in n.valueBlock.value[0]&&n.valueBlock.value[0].local?t:e,void 0===r[n.valueBlock.value[0].name]&&(r[n.valueBlock.value[0].name]=[]),r[n.valueBlock.value[0].name].push(t.valueBlock.value[o])}}else if(i=zu(e,t.valueBlock.value[o-r],n.valueBlock.value[o]),!1===i.verified){if(!n.valueBlock.value[o].optional)return n.name&&(n.name=n.name.replace(/^\s+|\s+$/g,Vl),n.name&&delete e[n.name]),i;r++}if(!1===i.verified){const t={verified:!1,result:e};return n.name&&(n.name=n.name.replace(/^\s+|\s+$/g,Vl),n.name&&(delete e[n.name],t.name=n.name)),t}return{verified:!0,result:e}}if(n.primitiveSchema&&Ll in t.valueBlock){const r=Wh(t.valueBlock.valueHexView);if(-1===r.offset){const t={verified:!1,result:r.result};return n.name&&(n.name=n.name.replace(/^\s+|\s+$/g,Vl),n.name&&(delete e[n.name],t.name=n.name)),t}return zu(e,r.result,n.primitiveSchema)}return{verified:!0,result:e}}function qu(e,t){if(t instanceof Object==0)return{verified:!1,result:{error:"Wrong ASN.1 schema type"}};const n=Wh(_l._H.toUint8Array(e));return-1===n.offset?{verified:!1,result:n.result}:zu(n.result,n.result,t)}!function(e){e[e.Sequence=0]="Sequence",e[e.Set=1]="Set",e[e.Choice=2]="Choice"}(Mh||(Mh={})),function(e){e[e.Any=1]="Any",e[e.Boolean=2]="Boolean",e[e.OctetString=3]="OctetString",e[e.BitString=4]="BitString",e[e.Integer=5]="Integer",e[e.Enumerated=6]="Enumerated",e[e.ObjectIdentifier=7]="ObjectIdentifier",e[e.Utf8String=8]="Utf8String",e[e.BmpString=9]="BmpString",e[e.UniversalString=10]="UniversalString",e[e.NumericString=11]="NumericString",e[e.PrintableString=12]="PrintableString",e[e.TeletexString=13]="TeletexString",e[e.VideotexString=14]="VideotexString",e[e.IA5String=15]="IA5String",e[e.GraphicString=16]="GraphicString",e[e.VisibleString=17]="VisibleString",e[e.GeneralString=18]="GeneralString",e[e.CharacterString=19]="CharacterString",e[e.UTCTime=20]="UTCTime",e[e.GeneralizedTime=21]="GeneralizedTime",e[e.DATE=22]="DATE",e[e.TimeOfDay=23]="TimeOfDay",e[e.DateTime=24]="DateTime",e[e.Duration=25]="Duration",e[e.TIME=26]="TIME",e[e.Null=27]="Null"}(jh||(jh={}));class Gu{constructor(e,t=0){if(this.unusedBits=0,this.value=new ArrayBuffer(0),e)if("number"==typeof e)this.fromNumber(e);else{if(!_l._H.isBufferSource(e))throw TypeError("Unsupported type of 'params' argument for BitString");this.unusedBits=t,this.value=_l._H.toArrayBuffer(e)}}fromASN(e){if(!(e instanceof tu))throw new TypeError("Argument 'asn' is not instance of ASN.1 BitString");return this.unusedBits=e.valueBlock.unusedBits,this.value=e.valueBlock.valueHex,this}toASN(){return new tu({unusedBits:this.unusedBits,valueHex:this.value})}toSchema(e){return new tu({name:e})}toNumber(){let e="";const t=new Uint8Array(this.value);for(const n of t)e+=n.toString(2).padStart(8,"0");return e=e.split("").reverse().join(""),this.unusedBits&&(e=e.slice(this.unusedBits).padStart(this.unusedBits,"0")),parseInt(e,2)}fromNumber(e){let t=e.toString(2);const n=t.length+7>>3;this.unusedBits=(n<<3)-t.length;const r=new Uint8Array(n);t=t.padStart(n<<3,"0").split("").reverse().join("");let i=0;for(;i<n;)r[i]=parseInt(t.slice(i<<3,8+(i<<3)),2),i++;this.value=r.buffer}}class Ku{constructor(e){"number"==typeof e?this.buffer=new ArrayBuffer(e):_l._H.isBufferSource(e)?this.buffer=_l._H.toArrayBuffer(e):Array.isArray(e)?this.buffer=new Uint8Array(e):this.buffer=new ArrayBuffer(0)}get byteLength(){return this.buffer.byteLength}get byteOffset(){return 0}fromASN(e){if(!(e instanceof $h))throw new TypeError("Argument 'asn' is not instance of ASN.1 OctetString");return this.buffer=e.valueBlock.valueHex,this}toASN(){return new $h({valueHex:this.buffer})}toSchema(e){return new $h({name:e})}}const Xu={fromASN:e=>e instanceof Xh?null:e.valueBeforeDecodeView,toASN:e=>{if(null===e)return new Xh;const t=Qh(e);if(t.result.error)throw new Error(t.result.error);return t.result}},Yu={fromASN:e=>e.valueBlock.valueHexView.byteLength>=4?e.valueBlock.toString():e.valueBlock.valueDec,toASN:e=>new ou({value:+e})},Ju={fromASN:e=>e.valueBlock.valueDec,toASN:e=>new au({value:e})},Zu={fromASN:e=>e.valueBlock.valueHexView,toASN:e=>new ou({valueHex:e})},$u={fromASN:e=>e.valueBlock.valueHexView,toASN:e=>new tu({valueHex:e})},ep={fromASN:e=>e.valueBlock.toString(),toASN:e=>new hu({value:e})},tp={fromASN:e=>e.valueBlock.value,toASN:e=>new Jh({value:e})},np={fromASN:e=>e.valueBlock.valueHexView,toASN:e=>new $h({valueHex:e})},rp={fromASN:e=>new Ku(e.getValue()),toASN:e=>e.toASN()};function ip(e){return{fromASN:e=>e.valueBlock.value,toASN:t=>new e({value:t})}}const sp=ip(Au),op=ip(_u),ap=ip(xu),cp=ip(Su),lp=ip(Iu),hp=ip(Tu),up=ip(Cu),pp=ip(Ru),dp=ip(ku),fp=ip(Nu),gp=ip(Ou),mp=ip(Bu),wp={fromASN:e=>e.toDate(),toASN:e=>new Pu({valueDate:e})},yp={fromASN:e=>e.toDate(),toASN:e=>new Lu({valueDate:e})},bp={fromASN:()=>null,toASN:()=>new Xh};function Ap(e){switch(e){case jh.Any:return Xu;case jh.BitString:return $u;case jh.BmpString:return op;case jh.Boolean:return tp;case jh.CharacterString:return mp;case jh.Enumerated:return Ju;case jh.GeneralString:return gp;case jh.GeneralizedTime:return yp;case jh.GraphicString:return dp;case jh.IA5String:return pp;case jh.Integer:return Yu;case jh.Null:return bp;case jh.NumericString:return cp;case jh.ObjectIdentifier:return ep;case jh.OctetString:return np;case jh.PrintableString:return lp;case jh.TeletexString:return hp;case jh.UTCTime:return wp;case jh.UniversalString:return ap;case jh.Utf8String:return sp;case jh.VideotexString:return up;case jh.VisibleString:return fp;default:return null}}function vp(e){return"function"==typeof e&&e.prototype?!(!e.prototype.toASN||!e.prototype.fromASN)||vp(e.prototype):!!(e&&"object"==typeof e&&"toASN"in e&&"fromASN"in e)}function _p(e){var t;if(e){const n=Object.getPrototypeOf(e);return(null===(t=null==n?void 0:n.prototype)||void 0===t?void 0:t.constructor)===Array||_p(n)}return!1}function Ep(e,t){if(!e||!t)return!1;if(e.byteLength!==t.byteLength)return!1;const n=new Uint8Array(e),r=new Uint8Array(t);for(let t=0;t<e.byteLength;t++)if(n[t]!==r[t])return!1;return!0}const xp=new class{constructor(){this.items=new WeakMap}has(e){return this.items.has(e)}get(e,t=!1){const n=this.items.get(e);if(!n)throw new Error(`Cannot get schema for '${e.prototype.constructor.name}' target`);if(t&&!n.schema)throw new Error(`Schema '${e.prototype.constructor.name}' doesn't contain ASN.1 schema. Call 'AsnSchemaStorage.cache'.`);return n}cache(e){const t=this.get(e);t.schema||(t.schema=this.create(e,!0))}createDefault(e){const t={type:Mh.Sequence,items:{}},n=this.findParentSchema(e);return n&&(Object.assign(t,n),t.items=Object.assign({},t.items,n.items)),t}create(e,t){const n=this.items.get(e)||this.createDefault(e),i=[];for(const e in n.items){const s=n.items[e],o=t?e:"";let a;if("number"==typeof s.type){const e=jh[s.type],t=r[e];if(!t)throw new Error(`Cannot get ASN1 class by name '${e}'`);a=new t({name:o})}else vp(s.type)?a=(new s.type).toSchema(o):s.optional?this.get(s.type).type===Mh.Choice?a=new Hu({name:o}):(a=this.create(s.type,!1),a.name=o):a=new Hu({name:o});const c=!!s.optional||void 0!==s.defaultValue;if(s.repeated&&(a.name="",a=new("set"===s.repeated?gu:fu)({name:"",value:[new Qu({name:o,value:a})]})),null!==s.context&&void 0!==s.context)if(s.implicit)if("number"==typeof s.type||vp(s.type)){const e=s.repeated?qh:Hh;i.push(new e({name:o,optional:c,idBlock:{tagClass:3,tagNumber:s.context}}))}else{this.cache(s.type);const e=!!s.repeated;let t=e?a:this.get(s.type,!0).schema;t="valueBlock"in t?t.valueBlock.value:t.value,i.push(new qh({name:e?"":o,optional:c,idBlock:{tagClass:3,tagNumber:s.context},value:t}))}else i.push(new qh({optional:c,idBlock:{tagClass:3,tagNumber:s.context},value:[a]}));else a.optional=c,i.push(a)}switch(n.type){case Mh.Sequence:return new fu({value:i,name:""});case Mh.Set:return new gu({value:i,name:""});case Mh.Choice:return new Wu({value:i,name:""});default:throw new Error("Unsupported ASN1 type in use")}}set(e,t){return this.items.set(e,t),this}findParentSchema(e){const t=Object.getPrototypeOf(e);return t?this.items.get(t)||this.findParentSchema(t):null}},Sp=e=>t=>{let n;xp.has(t)?n=xp.get(t):(n=xp.createDefault(t),xp.set(t,n)),Object.assign(n,e)},Ip=e=>(t,n)=>{let r;xp.has(t.constructor)?r=xp.get(t.constructor):(r=xp.createDefault(t.constructor),xp.set(t.constructor,r));const i=Object.assign({},e);if("number"==typeof i.type&&!i.converter){const r=Ap(e.type);if(!r)throw new Error(`Cannot get default converter for property '${n}' of ${t.constructor.name}`);i.converter=r}r.items[n]=i};class Tp extends Error{constructor(){super(...arguments),this.schemas=[]}}class Cp{static parse(e,t){const n=Qh(e);if(n.result.error)throw new Error(n.result.error);return this.fromASN(n.result,t)}static fromASN(e,t){var n;try{if(vp(t))return(new t).fromASN(e);const i=xp.get(t);xp.cache(t);let s=i.schema;if(e.constructor===qh&&i.type!==Mh.Choice){s=new qh({idBlock:{tagClass:3,tagNumber:e.idBlock.tagNumber},value:i.schema.valueBlock.value});for(const t in i.items)delete e[t]}const o=zu({},e,s);if(!o.verified)throw new Tp(`Data does not match to ${t.name} ASN1 schema. ${o.result.error}`);const a=new t;if(_p(t)){if(!("value"in e.valueBlock)||!Array.isArray(e.valueBlock.value))throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");const n=i.itemType;if("number"==typeof n){const r=Ap(n);if(!r)throw new Error(`Cannot get default converter for array item of ${t.name} ASN1 schema`);return t.from(e.valueBlock.value,e=>r.fromASN(e))}return t.from(e.valueBlock.value,e=>this.fromASN(e,n))}for(const e in i.items){const t=o.result[e];if(!t)continue;const s=i.items[e],c=s.type;if("number"==typeof c||vp(c)){const i=null!==(n=s.converter)&&void 0!==n?n:vp(c)?new c:null;if(!i)throw new Error("Converter is empty");if(s.repeated)if(s.implicit){const n=new("sequence"===s.repeated?fu:gu);n.valueBlock=t.valueBlock;const r=Qh(n.toBER(!1));if(-1===r.offset)throw new Error(`Cannot parse the child item. ${r.result.error}`);if(!("value"in r.result.valueBlock)||!Array.isArray(r.result.valueBlock.value))throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");const o=r.result.valueBlock.value;a[e]=Array.from(o,e=>i.fromASN(e))}else a[e]=Array.from(t,e=>i.fromASN(e));else{let n=t;if(s.implicit){let e;if(vp(c))e=(new c).toSchema("");else{const t=jh[c],n=r[t];if(!n)throw new Error(`Cannot get '${t}' class from asn1js module`);e=new n}e.valueBlock=n.valueBlock,n=Qh(e.toBER(!1)).result}a[e]=i.fromASN(n)}}else if(s.repeated){if(!Array.isArray(t))throw new Error("Cannot get list of items from the ASN.1 parsed value. ASN.1 value should be iterable.");a[e]=Array.from(t,e=>this.fromASN(e,c))}else a[e]=this.fromASN(t,c)}return a}catch(e){throw e instanceof Tp&&e.schemas.push(t.name),e}}}class Rp{static serialize(e){return e instanceof nh?e.toBER(!1):this.toASN(e).toBER(!1)}static toASN(e){if(e&&"object"==typeof e&&vp(e))return e.toASN();if(!e||"object"!=typeof e)throw new TypeError("Parameter 1 should be type of Object.");const t=e.constructor,n=xp.get(t);xp.cache(t);let r,i=[];if(n.itemType){if(!Array.isArray(e))throw new TypeError("Parameter 1 should be type of Array.");if("number"==typeof n.itemType){const r=Ap(n.itemType);if(!r)throw new Error(`Cannot get default converter for array item of ${t.name} ASN1 schema`);i=e.map(e=>r.toASN(e))}else i=e.map(e=>this.toAsnItem({type:n.itemType},"[]",t,e))}else for(const r in n.items){const s=n.items[r],o=e[r];if(void 0===o||s.defaultValue===o||"object"==typeof s.defaultValue&&"object"==typeof o&&Ep(this.serialize(s.defaultValue),this.serialize(o)))continue;const a=Rp.toAsnItem(s,r,t,o);if("number"==typeof s.context)if(s.implicit)if(s.repeated||"number"!=typeof s.type&&!vp(s.type))i.push(new qh({optional:s.optional,idBlock:{tagClass:3,tagNumber:s.context},value:a.valueBlock.value}));else{const e={};e.valueHex=a instanceof Xh?a.valueBeforeDecodeView:a.valueBlock.toBER(),i.push(new Hh({optional:s.optional,idBlock:{tagClass:3,tagNumber:s.context},...e}))}else i.push(new qh({optional:s.optional,idBlock:{tagClass:3,tagNumber:s.context},value:[a]}));else s.repeated?i=i.concat(a):i.push(a)}switch(n.type){case Mh.Sequence:r=new fu({value:i});break;case Mh.Set:r=new gu({value:i});break;case Mh.Choice:if(!i[0])throw new Error(`Schema '${t.name}' has wrong data. Choice cannot be empty.`);r=i[0]}return r}static toAsnItem(e,t,n,r){let i;if("number"==typeof e.type){const s=e.converter;if(!s)throw new Error(`Property '${t}' doesn't have converter for type ${jh[e.type]} in schema '${n.name}'`);if(e.repeated){if(!Array.isArray(r))throw new TypeError("Parameter 'objProp' should be type of Array.");const t=Array.from(r,e=>s.toASN(e));i=new("sequence"===e.repeated?fu:gu)({value:t})}else i=s.toASN(r)}else if(e.repeated){if(!Array.isArray(r))throw new TypeError("Parameter 'objProp' should be type of Array.");const t=Array.from(r,e=>this.toASN(e));i=new("sequence"===e.repeated?fu:gu)({value:t})}else i=this.toASN(r);return i}}class kp extends Array{constructor(e=[]){if("number"==typeof e)super(e);else{super();for(const t of e)this.push(t)}}}class Np{static serialize(e){return Rp.serialize(e)}static parse(e,t){return Cp.parse(e,t)}static toString(e){const t=Qh(_l._H.isBufferSource(e)?_l._H.toArrayBuffer(e):Np.serialize(e));if(-1===t.offset)throw new Error(`Cannot decode ASN.1 data. ${t.result.error}`);return t.result.toString()}}function Op(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}Object.create,Object.create;var Bp,Pp,Lp,Dp=n(640);class Up{static decodeIP(e){if(64===e.length&&0===parseInt(e,16))return"::/0";if(16!==e.length)return e;const t=parseInt(e.slice(8),16).toString(2).split("").reduce((e,t)=>e+ +t,0);let n=e.slice(0,8).replace(/(.{2})/g,e=>`${parseInt(e,16)}.`);return n=n.slice(0,-1),`${n}/${t}`}static toString(e){if(4===e.byteLength||16===e.byteLength){const t=new Uint8Array(e);return Dp.fromByteArray(Array.from(t)).toString()}return this.decodeIP(_l.U$.ToHex(e))}static fromString(e){const t=Dp.parse(e);return new Uint8Array(t.toByteArray()).buffer}}let Fp=class{constructor(e={}){Object.assign(this,e)}toString(){return this.bmpString||this.printableString||this.teletexString||this.universalString||this.utf8String||""}};Op([Ip({type:jh.TeletexString})],Fp.prototype,"teletexString",void 0),Op([Ip({type:jh.PrintableString})],Fp.prototype,"printableString",void 0),Op([Ip({type:jh.UniversalString})],Fp.prototype,"universalString",void 0),Op([Ip({type:jh.Utf8String})],Fp.prototype,"utf8String",void 0),Op([Ip({type:jh.BmpString})],Fp.prototype,"bmpString",void 0),Fp=Op([Sp({type:Mh.Choice})],Fp);let Mp=class extends Fp{constructor(e={}){super(e),Object.assign(this,e)}toString(){return this.ia5String||(this.anyValue?_l.U$.ToHex(this.anyValue):super.toString())}};Op([Ip({type:jh.IA5String})],Mp.prototype,"ia5String",void 0),Op([Ip({type:jh.Any})],Mp.prototype,"anyValue",void 0),Mp=Op([Sp({type:Mh.Choice})],Mp);class jp{constructor(e={}){this.type="",this.value=new Mp,Object.assign(this,e)}}Op([Ip({type:jh.ObjectIdentifier})],jp.prototype,"type",void 0),Op([Ip({type:Mp})],jp.prototype,"value",void 0);let Hp=Bp=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,Bp.prototype)}};Hp=Bp=Op([Sp({type:Mh.Set,itemType:jp})],Hp);let Wp=Pp=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,Pp.prototype)}};Wp=Pp=Op([Sp({type:Mh.Sequence,itemType:Hp})],Wp);let Qp=Lp=class extends Wp{constructor(e){super(e),Object.setPrototypeOf(this,Lp.prototype)}};Qp=Lp=Op([Sp({type:Mh.Sequence})],Qp);const Vp={fromASN:e=>Up.toString(np.fromASN(e)),toASN:e=>np.toASN(Up.fromString(e))};class zp{constructor(e={}){this.typeId="",this.value=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:jh.ObjectIdentifier})],zp.prototype,"typeId",void 0),Op([Ip({type:jh.Any,context:0})],zp.prototype,"value",void 0);class qp{constructor(e={}){this.partyName=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:Fp,optional:!0,context:0,implicit:!0})],qp.prototype,"nameAssigner",void 0),Op([Ip({type:Fp,context:1,implicit:!0})],qp.prototype,"partyName",void 0);let Gp=class{constructor(e={}){Object.assign(this,e)}};var Kp;Op([Ip({type:zp,context:0,implicit:!0})],Gp.prototype,"otherName",void 0),Op([Ip({type:jh.IA5String,context:1,implicit:!0})],Gp.prototype,"rfc822Name",void 0),Op([Ip({type:jh.IA5String,context:2,implicit:!0})],Gp.prototype,"dNSName",void 0),Op([Ip({type:jh.Any,context:3,implicit:!0})],Gp.prototype,"x400Address",void 0),Op([Ip({type:Qp,context:4,implicit:!1})],Gp.prototype,"directoryName",void 0),Op([Ip({type:qp,context:5})],Gp.prototype,"ediPartyName",void 0),Op([Ip({type:jh.IA5String,context:6,implicit:!0})],Gp.prototype,"uniformResourceIdentifier",void 0),Op([Ip({type:jh.OctetString,context:7,implicit:!0,converter:Vp})],Gp.prototype,"iPAddress",void 0),Op([Ip({type:jh.ObjectIdentifier,context:8,implicit:!0})],Gp.prototype,"registeredID",void 0),Gp=Op([Sp({type:Mh.Choice})],Gp);class Xp{constructor(e={}){this.accessMethod="",this.accessLocation=new Gp,Object.assign(this,e)}}Op([Ip({type:jh.ObjectIdentifier})],Xp.prototype,"accessMethod",void 0),Op([Ip({type:Gp})],Xp.prototype,"accessLocation",void 0);let Yp=Kp=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,Kp.prototype)}};Yp=Kp=Op([Sp({type:Mh.Sequence,itemType:Xp})],Yp);const Jp="1.3.6.1.5.5.7",Zp=`${Jp}.3`,$p="2.5.29",ed=`${$p}.35`;class td extends Ku{}class nd{constructor(e={}){e&&Object.assign(this,e)}}Op([Ip({type:td,context:0,optional:!0,implicit:!0})],nd.prototype,"keyIdentifier",void 0),Op([Ip({type:Gp,context:1,optional:!0,implicit:!0,repeated:"sequence"})],nd.prototype,"authorityCertIssuer",void 0),Op([Ip({type:jh.Integer,context:2,optional:!0,implicit:!0,converter:Zu})],nd.prototype,"authorityCertSerialNumber",void 0);const rd=`${$p}.19`;class id{constructor(e={}){this.cA=!1,Object.assign(this,e)}}var sd;Op([Ip({type:jh.Boolean,defaultValue:!1})],id.prototype,"cA",void 0),Op([Ip({type:jh.Integer,optional:!0})],id.prototype,"pathLenConstraint",void 0);let od=sd=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,sd.prototype)}};var ad;od=sd=Op([Sp({type:Mh.Sequence,itemType:Gp})],od);let cd=ad=class extends od{constructor(e){super(e),Object.setPrototypeOf(this,ad.prototype)}};var ld;cd=ad=Op([Sp({type:Mh.Sequence})],cd);const hd=`${$p}.32`;let ud=class{constructor(e={}){Object.assign(this,e)}toString(){return this.ia5String||this.visibleString||this.bmpString||this.utf8String||""}};Op([Ip({type:jh.IA5String})],ud.prototype,"ia5String",void 0),Op([Ip({type:jh.VisibleString})],ud.prototype,"visibleString",void 0),Op([Ip({type:jh.BmpString})],ud.prototype,"bmpString",void 0),Op([Ip({type:jh.Utf8String})],ud.prototype,"utf8String",void 0),ud=Op([Sp({type:Mh.Choice})],ud);class pd{constructor(e={}){this.organization=new ud,this.noticeNumbers=[],Object.assign(this,e)}}Op([Ip({type:ud})],pd.prototype,"organization",void 0),Op([Ip({type:jh.Integer,repeated:"sequence"})],pd.prototype,"noticeNumbers",void 0);class dd{constructor(e={}){Object.assign(this,e)}}Op([Ip({type:pd,optional:!0})],dd.prototype,"noticeRef",void 0),Op([Ip({type:ud,optional:!0})],dd.prototype,"explicitText",void 0);let fd=class{constructor(e={}){Object.assign(this,e)}};Op([Ip({type:jh.IA5String})],fd.prototype,"cPSuri",void 0),Op([Ip({type:dd})],fd.prototype,"userNotice",void 0),fd=Op([Sp({type:Mh.Choice})],fd);class gd{constructor(e={}){this.policyQualifierId="",this.qualifier=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:jh.ObjectIdentifier})],gd.prototype,"policyQualifierId",void 0),Op([Ip({type:jh.Any})],gd.prototype,"qualifier",void 0);class md{constructor(e={}){this.policyIdentifier="",Object.assign(this,e)}}Op([Ip({type:jh.ObjectIdentifier})],md.prototype,"policyIdentifier",void 0),Op([Ip({type:gd,repeated:"sequence",optional:!0})],md.prototype,"policyQualifiers",void 0);let wd=ld=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,ld.prototype)}};wd=ld=Op([Sp({type:Mh.Sequence,itemType:md})],wd);let yd=class{constructor(e=0){this.value=e}};Op([Ip({type:jh.Integer})],yd.prototype,"value",void 0),yd=Op([Sp({type:Mh.Choice})],yd);let bd=class extends yd{};var Ad,vd;bd=Op([Sp({type:Mh.Choice})],bd),function(e){e[e.unused=1]="unused",e[e.keyCompromise=2]="keyCompromise",e[e.cACompromise=4]="cACompromise",e[e.affiliationChanged=8]="affiliationChanged",e[e.superseded=16]="superseded",e[e.cessationOfOperation=32]="cessationOfOperation",e[e.certificateHold=64]="certificateHold",e[e.privilegeWithdrawn=128]="privilegeWithdrawn",e[e.aACompromise=256]="aACompromise"}(vd||(vd={}));class _d extends Gu{toJSON(){const e=[],t=this.toNumber();return t&vd.aACompromise&&e.push("aACompromise"),t&vd.affiliationChanged&&e.push("affiliationChanged"),t&vd.cACompromise&&e.push("cACompromise"),t&vd.certificateHold&&e.push("certificateHold"),t&vd.cessationOfOperation&&e.push("cessationOfOperation"),t&vd.keyCompromise&&e.push("keyCompromise"),t&vd.privilegeWithdrawn&&e.push("privilegeWithdrawn"),t&vd.superseded&&e.push("superseded"),t&vd.unused&&e.push("unused"),e}toString(){return`[${this.toJSON().join(", ")}]`}}let Ed=class{constructor(e={}){Object.assign(this,e)}};Op([Ip({type:Gp,context:0,repeated:"sequence",implicit:!0})],Ed.prototype,"fullName",void 0),Op([Ip({type:Hp,context:1,implicit:!0})],Ed.prototype,"nameRelativeToCRLIssuer",void 0),Ed=Op([Sp({type:Mh.Choice})],Ed);class xd{constructor(e={}){Object.assign(this,e)}}Op([Ip({type:Ed,context:0,optional:!0})],xd.prototype,"distributionPoint",void 0),Op([Ip({type:_d,context:1,optional:!0,implicit:!0})],xd.prototype,"reasons",void 0),Op([Ip({type:Gp,context:2,optional:!0,repeated:"sequence",implicit:!0})],xd.prototype,"cRLIssuer",void 0);let Sd=Ad=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,Ad.prototype)}};var Id;Sd=Ad=Op([Sp({type:Mh.Sequence,itemType:xd})],Sd);let Td=Id=class extends Sd{constructor(e){super(e),Object.setPrototypeOf(this,Id.prototype)}};Td=Id=Op([Sp({type:Mh.Sequence,itemType:xd})],Td);class Cd{constructor(e={}){this.onlyContainsUserCerts=Cd.ONLY,this.onlyContainsCACerts=Cd.ONLY,this.indirectCRL=Cd.ONLY,this.onlyContainsAttributeCerts=Cd.ONLY,Object.assign(this,e)}}var Rd;Cd.ONLY=!1,Op([Ip({type:Ed,context:0,optional:!0})],Cd.prototype,"distributionPoint",void 0),Op([Ip({type:jh.Boolean,context:1,defaultValue:Cd.ONLY,implicit:!0})],Cd.prototype,"onlyContainsUserCerts",void 0),Op([Ip({type:jh.Boolean,context:2,defaultValue:Cd.ONLY,implicit:!0})],Cd.prototype,"onlyContainsCACerts",void 0),Op([Ip({type:_d,context:3,optional:!0,implicit:!0})],Cd.prototype,"onlySomeReasons",void 0),Op([Ip({type:jh.Boolean,context:4,defaultValue:Cd.ONLY,implicit:!0})],Cd.prototype,"indirectCRL",void 0),Op([Ip({type:jh.Boolean,context:5,defaultValue:Cd.ONLY,implicit:!0})],Cd.prototype,"onlyContainsAttributeCerts",void 0),function(e){e[e.unspecified=0]="unspecified",e[e.keyCompromise=1]="keyCompromise",e[e.cACompromise=2]="cACompromise",e[e.affiliationChanged=3]="affiliationChanged",e[e.superseded=4]="superseded",e[e.cessationOfOperation=5]="cessationOfOperation",e[e.certificateHold=6]="certificateHold",e[e.removeFromCRL=8]="removeFromCRL",e[e.privilegeWithdrawn=9]="privilegeWithdrawn",e[e.aACompromise=10]="aACompromise"}(Rd||(Rd={}));let kd=class{constructor(e=Rd.unspecified){this.reason=Rd.unspecified,this.reason=e}toJSON(){return Rd[this.reason]}toString(){return this.toJSON()}};var Nd;Op([Ip({type:jh.Enumerated})],kd.prototype,"reason",void 0),kd=Op([Sp({type:Mh.Choice})],kd);const Od=`${$p}.37`;let Bd=Nd=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,Nd.prototype)}};Bd=Nd=Op([Sp({type:Mh.Sequence,itemType:jh.ObjectIdentifier})],Bd);const Pd=`${Zp}.1`,Ld=`${Zp}.2`,Dd=`${Zp}.3`,Ud=`${Zp}.4`,Fd=`${Zp}.8`,Md=`${Zp}.9`;let jd=class{constructor(e=new ArrayBuffer(0)){this.value=e}};Op([Ip({type:jh.Integer,converter:Zu})],jd.prototype,"value",void 0),jd=Op([Sp({type:Mh.Choice})],jd);let Hd=class{constructor(e){this.value=new Date,e&&(this.value=e)}};var Wd;Op([Ip({type:jh.GeneralizedTime})],Hd.prototype,"value",void 0),Hd=Op([Sp({type:Mh.Choice})],Hd);let Qd=Wd=class extends od{constructor(e){super(e),Object.setPrototypeOf(this,Wd.prototype)}};Qd=Wd=Op([Sp({type:Mh.Sequence})],Qd);const Vd=`${$p}.15`;var zd,qd;!function(e){e[e.digitalSignature=1]="digitalSignature",e[e.nonRepudiation=2]="nonRepudiation",e[e.keyEncipherment=4]="keyEncipherment",e[e.dataEncipherment=8]="dataEncipherment",e[e.keyAgreement=16]="keyAgreement",e[e.keyCertSign=32]="keyCertSign",e[e.cRLSign=64]="cRLSign",e[e.encipherOnly=128]="encipherOnly",e[e.decipherOnly=256]="decipherOnly"}(zd||(zd={}));class Gd extends Gu{toJSON(){const e=this.toNumber(),t=[];return e&zd.cRLSign&&t.push("crlSign"),e&zd.dataEncipherment&&t.push("dataEncipherment"),e&zd.decipherOnly&&t.push("decipherOnly"),e&zd.digitalSignature&&t.push("digitalSignature"),e&zd.encipherOnly&&t.push("encipherOnly"),e&zd.keyAgreement&&t.push("keyAgreement"),e&zd.keyCertSign&&t.push("keyCertSign"),e&zd.keyEncipherment&&t.push("keyEncipherment"),e&zd.nonRepudiation&&t.push("nonRepudiation"),t}toString(){return`[${this.toJSON().join(", ")}]`}}class Kd{constructor(e={}){this.base=new Gp,this.minimum=0,Object.assign(this,e)}}Op([Ip({type:Gp})],Kd.prototype,"base",void 0),Op([Ip({type:jh.Integer,context:0,defaultValue:0,implicit:!0})],Kd.prototype,"minimum",void 0),Op([Ip({type:jh.Integer,context:1,optional:!0,implicit:!0})],Kd.prototype,"maximum",void 0);let Xd=qd=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,qd.prototype)}};Xd=qd=Op([Sp({type:Mh.Sequence,itemType:Kd})],Xd);class Yd{constructor(e={}){Object.assign(this,e)}}Op([Ip({type:Xd,context:0,optional:!0,implicit:!0})],Yd.prototype,"permittedSubtrees",void 0),Op([Ip({type:Xd,context:1,optional:!0,implicit:!0})],Yd.prototype,"excludedSubtrees",void 0);class Jd{constructor(e={}){Object.assign(this,e)}}var Zd;Op([Ip({type:jh.Integer,context:0,implicit:!0,optional:!0,converter:Zu})],Jd.prototype,"requireExplicitPolicy",void 0),Op([Ip({type:jh.Integer,context:1,implicit:!0,optional:!0,converter:Zu})],Jd.prototype,"inhibitPolicyMapping",void 0);class $d{constructor(e={}){this.issuerDomainPolicy="",this.subjectDomainPolicy="",Object.assign(this,e)}}Op([Ip({type:jh.ObjectIdentifier})],$d.prototype,"issuerDomainPolicy",void 0),Op([Ip({type:jh.ObjectIdentifier})],$d.prototype,"subjectDomainPolicy",void 0);let ef=Zd=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,Zd.prototype)}};var tf;ef=Zd=Op([Sp({type:Mh.Sequence,itemType:$d})],ef);const nf=`${$p}.17`;let rf=tf=class extends od{constructor(e){super(e),Object.setPrototypeOf(this,tf.prototype)}};rf=tf=Op([Sp({type:Mh.Sequence})],rf);class sf{constructor(e={}){this.type="",this.values=[],Object.assign(this,e)}}var of;Op([Ip({type:jh.ObjectIdentifier})],sf.prototype,"type",void 0),Op([Ip({type:jh.Any,repeated:"set"})],sf.prototype,"values",void 0);let af=of=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,of.prototype)}};af=of=Op([Sp({type:Mh.Sequence,itemType:sf})],af);const cf=`${$p}.14`;class lf extends td{}class hf{constructor(e={}){Object.assign(this,e)}}var uf,pf;Op([Ip({type:jh.GeneralizedTime,context:0,implicit:!0,optional:!0})],hf.prototype,"notBefore",void 0),Op([Ip({type:jh.GeneralizedTime,context:1,implicit:!0,optional:!0})],hf.prototype,"notAfter",void 0),function(e){e[e.keyUpdateAllowed=1]="keyUpdateAllowed",e[e.newExtensions=2]="newExtensions",e[e.pKIXCertificate=4]="pKIXCertificate"}(uf||(uf={}));class df extends Gu{toJSON(){const e=[],t=this.toNumber();return t&uf.pKIXCertificate&&e.push("pKIXCertificate"),t&uf.newExtensions&&e.push("newExtensions"),t&uf.keyUpdateAllowed&&e.push("keyUpdateAllowed"),e}toString(){return`[${this.toJSON().join(", ")}]`}}class ff{constructor(e={}){this.entrustVers="",this.entrustInfoFlags=new df,Object.assign(this,e)}}Op([Ip({type:jh.GeneralString})],ff.prototype,"entrustVers",void 0),Op([Ip({type:df})],ff.prototype,"entrustInfoFlags",void 0);let gf=pf=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,pf.prototype)}};gf=pf=Op([Sp({type:Mh.Sequence,itemType:Xp})],gf);class mf{constructor(e={}){this.algorithm="",Object.assign(this,e)}isEqual(e){return e instanceof mf&&e.algorithm==this.algorithm&&(e.parameters&&this.parameters&&_l.n4(e.parameters,this.parameters)||e.parameters===this.parameters)}}Op([Ip({type:jh.ObjectIdentifier})],mf.prototype,"algorithm",void 0),Op([Ip({type:jh.Any,optional:!0})],mf.prototype,"parameters",void 0);class wf{constructor(e={}){this.algorithm=new mf,this.subjectPublicKey=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:mf})],wf.prototype,"algorithm",void 0),Op([Ip({type:jh.BitString})],wf.prototype,"subjectPublicKey",void 0);let yf=class{constructor(e){if(e)if("string"==typeof e||"number"==typeof e||e instanceof Date){const t=new Date(e);t.getUTCFullYear()>2049?this.generalTime=t:this.utcTime=t}else Object.assign(this,e)}getTime(){const e=this.utcTime||this.generalTime;if(!e)throw new Error("Cannot get time from CHOICE object");return e}};Op([Ip({type:jh.UTCTime})],yf.prototype,"utcTime",void 0),Op([Ip({type:jh.GeneralizedTime})],yf.prototype,"generalTime",void 0),yf=Op([Sp({type:Mh.Choice})],yf);class bf{constructor(e){this.notBefore=new yf(new Date),this.notAfter=new yf(new Date),e&&(this.notBefore=new yf(e.notBefore),this.notAfter=new yf(e.notAfter))}}var Af;Op([Ip({type:yf})],bf.prototype,"notBefore",void 0),Op([Ip({type:yf})],bf.prototype,"notAfter",void 0);class vf{constructor(e={}){this.extnID="",this.critical=vf.CRITICAL,this.extnValue=new Ku,Object.assign(this,e)}}vf.CRITICAL=!1,Op([Ip({type:jh.ObjectIdentifier})],vf.prototype,"extnID",void 0),Op([Ip({type:jh.Boolean,defaultValue:vf.CRITICAL})],vf.prototype,"critical",void 0),Op([Ip({type:Ku})],vf.prototype,"extnValue",void 0);let _f=Af=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,Af.prototype)}};var Ef,xf;_f=Af=Op([Sp({type:Mh.Sequence,itemType:vf})],_f),function(e){e[e.v1=0]="v1",e[e.v2=1]="v2",e[e.v3=2]="v3"}(Ef||(Ef={}));class Sf{constructor(e={}){this.version=Ef.v1,this.serialNumber=new ArrayBuffer(0),this.signature=new mf,this.issuer=new Qp,this.validity=new bf,this.subject=new Qp,this.subjectPublicKeyInfo=new wf,Object.assign(this,e)}}Op([Ip({type:jh.Integer,context:0,defaultValue:Ef.v1})],Sf.prototype,"version",void 0),Op([Ip({type:jh.Integer,converter:Zu})],Sf.prototype,"serialNumber",void 0),Op([Ip({type:mf})],Sf.prototype,"signature",void 0),Op([Ip({type:Qp})],Sf.prototype,"issuer",void 0),Op([Ip({type:bf})],Sf.prototype,"validity",void 0),Op([Ip({type:Qp})],Sf.prototype,"subject",void 0),Op([Ip({type:wf})],Sf.prototype,"subjectPublicKeyInfo",void 0),Op([Ip({type:jh.BitString,context:1,implicit:!0,optional:!0})],Sf.prototype,"issuerUniqueID",void 0),Op([Ip({type:jh.BitString,context:2,implicit:!0,optional:!0})],Sf.prototype,"subjectUniqueID",void 0),Op([Ip({type:_f,context:3,optional:!0})],Sf.prototype,"extensions",void 0);class If{constructor(e={}){this.tbsCertificate=new Sf,this.signatureAlgorithm=new mf,this.signatureValue=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:Sf})],If.prototype,"tbsCertificate",void 0),Op([Ip({type:mf})],If.prototype,"signatureAlgorithm",void 0),Op([Ip({type:jh.BitString})],If.prototype,"signatureValue",void 0);class Tf{constructor(e={}){this.userCertificate=new ArrayBuffer(0),this.revocationDate=new yf,Object.assign(this,e)}}Op([Ip({type:jh.Integer,converter:Zu})],Tf.prototype,"userCertificate",void 0),Op([Ip({type:yf})],Tf.prototype,"revocationDate",void 0),Op([Ip({type:vf,optional:!0,repeated:"sequence"})],Tf.prototype,"crlEntryExtensions",void 0);class Cf{constructor(e={}){this.signature=new mf,this.issuer=new Qp,this.thisUpdate=new yf,Object.assign(this,e)}}Op([Ip({type:jh.Integer,optional:!0})],Cf.prototype,"version",void 0),Op([Ip({type:mf})],Cf.prototype,"signature",void 0),Op([Ip({type:Qp})],Cf.prototype,"issuer",void 0),Op([Ip({type:yf})],Cf.prototype,"thisUpdate",void 0),Op([Ip({type:yf,optional:!0})],Cf.prototype,"nextUpdate",void 0),Op([Ip({type:Tf,repeated:"sequence",optional:!0})],Cf.prototype,"revokedCertificates",void 0),Op([Ip({type:vf,optional:!0,context:0,repeated:"sequence"})],Cf.prototype,"crlExtensions",void 0);class Rf{constructor(e={}){this.tbsCertList=new Cf,this.signatureAlgorithm=new mf,this.signature=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:Cf})],Rf.prototype,"tbsCertList",void 0),Op([Ip({type:mf})],Rf.prototype,"signatureAlgorithm",void 0),Op([Ip({type:jh.BitString})],Rf.prototype,"signature",void 0);class kf{constructor(e={}){this.attrType="",this.attrValues=[],Object.assign(this,e)}}Op([Ip({type:jh.ObjectIdentifier})],kf.prototype,"attrType",void 0),Op([Ip({type:jh.Any,repeated:"set"})],kf.prototype,"attrValues",void 0);class Nf{constructor(e={}){this.acIssuer=new Gp,this.acSerial=0,this.attrs=[],Object.assign(this,e)}}Op([Ip({type:Gp})],Nf.prototype,"acIssuer",void 0),Op([Ip({type:jh.Integer})],Nf.prototype,"acSerial",void 0),Op([Ip({type:sf,repeated:"sequence"})],Nf.prototype,"attrs",void 0);let Of=xf=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,xf.prototype)}};Of=xf=Op([Sp({type:Mh.Sequence,itemType:jh.ObjectIdentifier})],Of);class Bf{constructor(e={}){this.permitUnSpecified=!0,Object.assign(this,e)}}Op([Ip({type:jh.Integer,optional:!0})],Bf.prototype,"pathLenConstraint",void 0),Op([Ip({type:Of,implicit:!0,context:0,optional:!0})],Bf.prototype,"permittedAttrs",void 0),Op([Ip({type:Of,implicit:!0,context:1,optional:!0})],Bf.prototype,"excludedAttrs",void 0),Op([Ip({type:jh.Boolean,defaultValue:!0})],Bf.prototype,"permitUnSpecified",void 0);class Pf{constructor(e={}){this.issuer=new od,this.serial=new ArrayBuffer(0),this.issuerUID=new ArrayBuffer(0),Object.assign(this,e)}}var Lf;Op([Ip({type:od})],Pf.prototype,"issuer",void 0),Op([Ip({type:jh.Integer,converter:Zu})],Pf.prototype,"serial",void 0),Op([Ip({type:jh.BitString,optional:!0})],Pf.prototype,"issuerUID",void 0),function(e){e[e.publicKey=0]="publicKey",e[e.publicKeyCert=1]="publicKeyCert",e[e.otherObjectTypes=2]="otherObjectTypes"}(Lf||(Lf={}));class Df{constructor(e={}){this.digestedObjectType=Lf.publicKey,this.digestAlgorithm=new mf,this.objectDigest=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:jh.Enumerated})],Df.prototype,"digestedObjectType",void 0),Op([Ip({type:jh.ObjectIdentifier,optional:!0})],Df.prototype,"otherObjectTypeID",void 0),Op([Ip({type:mf})],Df.prototype,"digestAlgorithm",void 0),Op([Ip({type:jh.BitString})],Df.prototype,"objectDigest",void 0);class Uf{constructor(e={}){Object.assign(this,e)}}Op([Ip({type:od,optional:!0})],Uf.prototype,"issuerName",void 0),Op([Ip({type:Pf,context:0,implicit:!0,optional:!0})],Uf.prototype,"baseCertificateID",void 0),Op([Ip({type:Df,context:1,implicit:!0,optional:!0})],Uf.prototype,"objectDigestInfo",void 0);let Ff=class{constructor(e={}){Object.assign(this,e)}};Op([Ip({type:Gp,repeated:"sequence"})],Ff.prototype,"v1Form",void 0),Op([Ip({type:Uf,context:0,implicit:!0})],Ff.prototype,"v2Form",void 0),Ff=Op([Sp({type:Mh.Choice})],Ff);class Mf{constructor(e={}){this.notBeforeTime=new Date,this.notAfterTime=new Date,Object.assign(this,e)}}Op([Ip({type:jh.GeneralizedTime})],Mf.prototype,"notBeforeTime",void 0),Op([Ip({type:jh.GeneralizedTime})],Mf.prototype,"notAfterTime",void 0);class jf{constructor(e={}){Object.assign(this,e)}}var Hf,Wf,Yf;Op([Ip({type:Pf,implicit:!0,context:0,optional:!0})],jf.prototype,"baseCertificateID",void 0),Op([Ip({type:od,implicit:!0,context:1,optional:!0})],jf.prototype,"entityName",void 0),Op([Ip({type:Df,implicit:!0,context:2,optional:!0})],jf.prototype,"objectDigestInfo",void 0),function(e){e[e.v2=1]="v2"}(Hf||(Hf={}));class Qf{constructor(e={}){this.version=Hf.v2,this.holder=new jf,this.issuer=new Ff,this.signature=new mf,this.serialNumber=new ArrayBuffer(0),this.attrCertValidityPeriod=new Mf,this.attributes=[],Object.assign(this,e)}}Op([Ip({type:jh.Integer})],Qf.prototype,"version",void 0),Op([Ip({type:jf})],Qf.prototype,"holder",void 0),Op([Ip({type:Ff})],Qf.prototype,"issuer",void 0),Op([Ip({type:mf})],Qf.prototype,"signature",void 0),Op([Ip({type:jh.Integer,converter:Zu})],Qf.prototype,"serialNumber",void 0),Op([Ip({type:Mf})],Qf.prototype,"attrCertValidityPeriod",void 0),Op([Ip({type:sf,repeated:"sequence"})],Qf.prototype,"attributes",void 0),Op([Ip({type:jh.BitString,optional:!0})],Qf.prototype,"issuerUniqueID",void 0),Op([Ip({type:_f,optional:!0})],Qf.prototype,"extensions",void 0);class Vf{constructor(e={}){this.acinfo=new Qf,this.signatureAlgorithm=new mf,this.signatureValue=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:Qf})],Vf.prototype,"acinfo",void 0),Op([Ip({type:mf})],Vf.prototype,"signatureAlgorithm",void 0),Op([Ip({type:jh.BitString})],Vf.prototype,"signatureValue",void 0),function(e){e[e.unmarked=1]="unmarked",e[e.unclassified=2]="unclassified",e[e.restricted=4]="restricted",e[e.confidential=8]="confidential",e[e.secret=16]="secret",e[e.topSecret=32]="topSecret"}(Wf||(Wf={}));class zf extends Gu{}class qf{constructor(e={}){this.type="",this.value=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:jh.ObjectIdentifier,implicit:!0,context:0})],qf.prototype,"type",void 0),Op([Ip({type:jh.Any,implicit:!0,context:1})],qf.prototype,"value",void 0);class Gf{constructor(e={}){this.policyId="",this.classList=new zf(Wf.unclassified),Object.assign(this,e)}}Op([Ip({type:jh.ObjectIdentifier})],Gf.prototype,"policyId",void 0),Op([Ip({type:zf,defaultValue:new zf(Wf.unclassified)})],Gf.prototype,"classList",void 0),Op([Ip({type:qf,repeated:"set"})],Gf.prototype,"securityCategories",void 0);class Kf{constructor(e={}){Object.assign(this,e)}}Op([Ip({type:Ku})],Kf.prototype,"cotets",void 0),Op([Ip({type:jh.ObjectIdentifier})],Kf.prototype,"oid",void 0),Op([Ip({type:jh.Utf8String})],Kf.prototype,"string",void 0);class Xf{constructor(e={}){this.values=[],Object.assign(this,e)}}Op([Ip({type:od,implicit:!0,context:0,optional:!0})],Xf.prototype,"policyAuthority",void 0),Op([Ip({type:Kf,repeated:"sequence"})],Xf.prototype,"values",void 0);class Jf{constructor(e={}){this.targetCertificate=new Pf,Object.assign(this,e)}}Op([Ip({type:Pf})],Jf.prototype,"targetCertificate",void 0),Op([Ip({type:Gp,optional:!0})],Jf.prototype,"targetName",void 0),Op([Ip({type:Df,optional:!0})],Jf.prototype,"certDigestInfo",void 0);let Zf=class{constructor(e={}){Object.assign(this,e)}};Op([Ip({type:Gp,context:0,implicit:!0})],Zf.prototype,"targetName",void 0),Op([Ip({type:Gp,context:1,implicit:!0})],Zf.prototype,"targetGroup",void 0),Op([Ip({type:Jf,context:2,implicit:!0})],Zf.prototype,"targetCert",void 0),Zf=Op([Sp({type:Mh.Choice})],Zf);let $f=Yf=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,Yf.prototype)}};var eg;$f=Yf=Op([Sp({type:Mh.Sequence,itemType:Zf})],$f);let tg=eg=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,eg.prototype)}};tg=eg=Op([Sp({type:Mh.Sequence,itemType:$f})],tg);class ng{constructor(e={}){Object.assign(this,e)}}Op([Ip({type:od,implicit:!0,context:0,optional:!0})],ng.prototype,"roleAuthority",void 0),Op([Ip({type:Gp,implicit:!0,context:1})],ng.prototype,"roleName",void 0);class rg{constructor(e={}){this.service=new Gp,this.ident=new Gp,Object.assign(this,e)}}var ig;Op([Ip({type:Gp})],rg.prototype,"service",void 0),Op([Ip({type:Gp})],rg.prototype,"ident",void 0),Op([Ip({type:Ku,optional:!0})],rg.prototype,"authInfo",void 0);class sg{constructor(e={}){this.otherCertFormat="",this.otherCert=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:jh.ObjectIdentifier})],sg.prototype,"otherCertFormat",void 0),Op([Ip({type:jh.Any})],sg.prototype,"otherCert",void 0);let og=class{constructor(e={}){Object.assign(this,e)}};Op([Ip({type:If})],og.prototype,"certificate",void 0),Op([Ip({type:Vf,context:2,implicit:!0})],og.prototype,"v2AttrCert",void 0),Op([Ip({type:sg,context:3,implicit:!0})],og.prototype,"other",void 0),og=Op([Sp({type:Mh.Choice})],og);let ag=ig=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,ig.prototype)}};ag=ig=Op([Sp({type:Mh.Set,itemType:og})],ag);class cg{constructor(e={}){this.contentType="",this.content=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:jh.ObjectIdentifier})],cg.prototype,"contentType",void 0),Op([Ip({type:jh.Any,context:0})],cg.prototype,"content",void 0);let lg=class{constructor(e={}){Object.assign(this,e)}};Op([Ip({type:Ku})],lg.prototype,"single",void 0),Op([Ip({type:jh.Any})],lg.prototype,"any",void 0),lg=Op([Sp({type:Mh.Choice})],lg);class hg{constructor(e={}){this.eContentType="",Object.assign(this,e)}}var ug;Op([Ip({type:jh.ObjectIdentifier})],hg.prototype,"eContentType",void 0),Op([Ip({type:lg,context:0,optional:!0})],hg.prototype,"eContent",void 0),function(e){e[e.v0=0]="v0",e[e.v1=1]="v1",e[e.v2=2]="v2",e[e.v3=3]="v3",e[e.v4=4]="v4",e[e.v5=5]="v5"}(ug||(ug={}));let pg=class extends mf{};pg=Op([Sp({type:Mh.Sequence})],pg);let dg=class extends mf{};dg=Op([Sp({type:Mh.Sequence})],dg);let fg=class extends mf{};fg=Op([Sp({type:Mh.Sequence})],fg);let gg=class extends mf{};gg=Op([Sp({type:Mh.Sequence})],gg);let mg=class extends mf{};mg=Op([Sp({type:Mh.Sequence})],mg);let wg=class extends mf{};wg=Op([Sp({type:Mh.Sequence})],wg);let yg=class{constructor(e={}){Object.assign(this,e)}};Op([Ip({type:Ku,context:0,implicit:!0,optional:!0})],yg.prototype,"value",void 0),Op([Ip({type:Ku,converter:rp,context:0,implicit:!0,optional:!0,repeated:"sequence"})],yg.prototype,"constructedValue",void 0),yg=Op([Sp({type:Mh.Choice})],yg);class bg{constructor(e={}){this.contentType="",this.contentEncryptionAlgorithm=new gg,Object.assign(this,e)}}Op([Ip({type:jh.ObjectIdentifier})],bg.prototype,"contentType",void 0),Op([Ip({type:gg})],bg.prototype,"contentEncryptionAlgorithm",void 0),Op([Ip({type:yg,optional:!0})],bg.prototype,"encryptedContent",void 0);class Ag{constructor(e={}){this.issuer=new Qp,this.serialNumber=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:Qp})],Ag.prototype,"issuer",void 0),Op([Ip({type:jh.Integer,converter:Zu})],Ag.prototype,"serialNumber",void 0);class vg{constructor(e={}){this.keyAttrId="",Object.assign(this,e)}}var _g;Op([Ip({type:jh.ObjectIdentifier})],vg.prototype,"keyAttrId",void 0),Op([Ip({type:jh.Any,optional:!0})],vg.prototype,"keyAttr",void 0);class Eg{constructor(e={}){this.subjectKeyIdentifier=new lf,Object.assign(this,e)}}Op([Ip({type:lf})],Eg.prototype,"subjectKeyIdentifier",void 0),Op([Ip({type:jh.GeneralizedTime,optional:!0})],Eg.prototype,"date",void 0),Op([Ip({type:vg,optional:!0})],Eg.prototype,"other",void 0);let xg=class{constructor(e={}){Object.assign(this,e)}};Op([Ip({type:Eg,context:0,implicit:!0,optional:!0})],xg.prototype,"rKeyId",void 0),Op([Ip({type:Ag,optional:!0})],xg.prototype,"issuerAndSerialNumber",void 0),xg=Op([Sp({type:Mh.Choice})],xg);class Sg{constructor(e={}){this.rid=new xg,this.encryptedKey=new Ku,Object.assign(this,e)}}Op([Ip({type:xg})],Sg.prototype,"rid",void 0),Op([Ip({type:Ku})],Sg.prototype,"encryptedKey",void 0);let Ig=_g=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,_g.prototype)}};Ig=_g=Op([Sp({type:Mh.Sequence,itemType:Sg})],Ig);class Tg{constructor(e={}){this.algorithm=new mf,this.publicKey=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:mf})],Tg.prototype,"algorithm",void 0),Op([Ip({type:jh.BitString})],Tg.prototype,"publicKey",void 0);let Cg=class{constructor(e={}){Object.assign(this,e)}};Op([Ip({type:lf,context:0,implicit:!0,optional:!0})],Cg.prototype,"subjectKeyIdentifier",void 0),Op([Ip({type:Tg,context:1,implicit:!0,optional:!0})],Cg.prototype,"originatorKey",void 0),Op([Ip({type:Ag,optional:!0})],Cg.prototype,"issuerAndSerialNumber",void 0),Cg=Op([Sp({type:Mh.Choice})],Cg);class Rg{constructor(e={}){this.version=ug.v3,this.originator=new Cg,this.keyEncryptionAlgorithm=new fg,this.recipientEncryptedKeys=new Ig,Object.assign(this,e)}}Op([Ip({type:jh.Integer})],Rg.prototype,"version",void 0),Op([Ip({type:Cg,context:0})],Rg.prototype,"originator",void 0),Op([Ip({type:Ku,context:1,optional:!0})],Rg.prototype,"ukm",void 0),Op([Ip({type:fg})],Rg.prototype,"keyEncryptionAlgorithm",void 0),Op([Ip({type:Ig})],Rg.prototype,"recipientEncryptedKeys",void 0);let kg=class{constructor(e={}){Object.assign(this,e)}};Op([Ip({type:lf,context:0,implicit:!0})],kg.prototype,"subjectKeyIdentifier",void 0),Op([Ip({type:Ag})],kg.prototype,"issuerAndSerialNumber",void 0),kg=Op([Sp({type:Mh.Choice})],kg);class Ng{constructor(e={}){this.version=ug.v0,this.rid=new kg,this.keyEncryptionAlgorithm=new fg,this.encryptedKey=new Ku,Object.assign(this,e)}}Op([Ip({type:jh.Integer})],Ng.prototype,"version",void 0),Op([Ip({type:kg})],Ng.prototype,"rid",void 0),Op([Ip({type:fg})],Ng.prototype,"keyEncryptionAlgorithm",void 0),Op([Ip({type:Ku})],Ng.prototype,"encryptedKey",void 0);class Og{constructor(e={}){this.keyIdentifier=new Ku,Object.assign(this,e)}}Op([Ip({type:Ku})],Og.prototype,"keyIdentifier",void 0),Op([Ip({type:jh.GeneralizedTime,optional:!0})],Og.prototype,"date",void 0),Op([Ip({type:vg,optional:!0})],Og.prototype,"other",void 0);class Bg{constructor(e={}){this.version=ug.v4,this.kekid=new Og,this.keyEncryptionAlgorithm=new fg,this.encryptedKey=new Ku,Object.assign(this,e)}}Op([Ip({type:jh.Integer})],Bg.prototype,"version",void 0),Op([Ip({type:Og})],Bg.prototype,"kekid",void 0),Op([Ip({type:fg})],Bg.prototype,"keyEncryptionAlgorithm",void 0),Op([Ip({type:Ku})],Bg.prototype,"encryptedKey",void 0);class Pg{constructor(e={}){this.version=ug.v0,this.keyEncryptionAlgorithm=new fg,this.encryptedKey=new Ku,Object.assign(this,e)}}Op([Ip({type:jh.Integer})],Pg.prototype,"version",void 0),Op([Ip({type:wg,context:0,optional:!0})],Pg.prototype,"keyDerivationAlgorithm",void 0),Op([Ip({type:fg})],Pg.prototype,"keyEncryptionAlgorithm",void 0),Op([Ip({type:Ku})],Pg.prototype,"encryptedKey",void 0);class Lg{constructor(e={}){this.oriType="",this.oriValue=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:jh.ObjectIdentifier})],Lg.prototype,"oriType",void 0),Op([Ip({type:jh.Any})],Lg.prototype,"oriValue",void 0);let Dg=class{constructor(e={}){Object.assign(this,e)}};var Ug;Op([Ip({type:Ng,optional:!0})],Dg.prototype,"ktri",void 0),Op([Ip({type:Rg,context:1,implicit:!0,optional:!0})],Dg.prototype,"kari",void 0),Op([Ip({type:Bg,context:2,implicit:!0,optional:!0})],Dg.prototype,"kekri",void 0),Op([Ip({type:Pg,context:3,implicit:!0,optional:!0})],Dg.prototype,"pwri",void 0),Op([Ip({type:Lg,context:4,implicit:!0,optional:!0})],Dg.prototype,"ori",void 0),Dg=Op([Sp({type:Mh.Choice})],Dg);let Fg=Ug=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,Ug.prototype)}};var Mg;Fg=Ug=Op([Sp({type:Mh.Set,itemType:Dg})],Fg);class jg{constructor(e={}){this.otherRevInfoFormat="",this.otherRevInfo=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:jh.ObjectIdentifier})],jg.prototype,"otherRevInfoFormat",void 0),Op([Ip({type:jh.Any})],jg.prototype,"otherRevInfo",void 0);let Hg=class{constructor(e={}){this.other=new jg,Object.assign(this,e)}};Op([Ip({type:jg,context:1,implicit:!0})],Hg.prototype,"other",void 0),Hg=Op([Sp({type:Mh.Choice})],Hg);let Wg=Mg=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,Mg.prototype)}};Wg=Mg=Op([Sp({type:Mh.Set,itemType:Hg})],Wg);class Qg{constructor(e={}){Object.assign(this,e)}}var Vg;Op([Ip({type:ag,context:0,implicit:!0,optional:!0})],Qg.prototype,"certs",void 0),Op([Ip({type:Wg,context:1,implicit:!0,optional:!0})],Qg.prototype,"crls",void 0);let zg=Vg=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,Vg.prototype)}};zg=Vg=Op([Sp({type:Mh.Set,itemType:kf})],zg);class qg{constructor(e={}){this.version=ug.v0,this.recipientInfos=new Fg,this.encryptedContentInfo=new bg,Object.assign(this,e)}}Op([Ip({type:jh.Integer})],qg.prototype,"version",void 0),Op([Ip({type:Qg,context:0,implicit:!0,optional:!0})],qg.prototype,"originatorInfo",void 0),Op([Ip({type:Fg})],qg.prototype,"recipientInfos",void 0),Op([Ip({type:bg})],qg.prototype,"encryptedContentInfo",void 0),Op([Ip({type:zg,context:1,implicit:!0,optional:!0})],qg.prototype,"unprotectedAttrs",void 0);const Gg="1.2.840.113549.1.7.2";let Kg=class{constructor(e={}){Object.assign(this,e)}};var Xg;Op([Ip({type:lf,context:0,implicit:!0})],Kg.prototype,"subjectKeyIdentifier",void 0),Op([Ip({type:Ag})],Kg.prototype,"issuerAndSerialNumber",void 0),Kg=Op([Sp({type:Mh.Choice})],Kg);class Yg{constructor(e={}){this.version=ug.v0,this.sid=new Kg,this.digestAlgorithm=new pg,this.signatureAlgorithm=new dg,this.signature=new Ku,Object.assign(this,e)}}Op([Ip({type:jh.Integer})],Yg.prototype,"version",void 0),Op([Ip({type:Kg})],Yg.prototype,"sid",void 0),Op([Ip({type:pg})],Yg.prototype,"digestAlgorithm",void 0),Op([Ip({type:kf,repeated:"set",context:0,implicit:!0,optional:!0})],Yg.prototype,"signedAttrs",void 0),Op([Ip({type:dg})],Yg.prototype,"signatureAlgorithm",void 0),Op([Ip({type:Ku})],Yg.prototype,"signature",void 0),Op([Ip({type:kf,repeated:"set",context:1,implicit:!0,optional:!0})],Yg.prototype,"unsignedAttrs",void 0);let Jg=Xg=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,Xg.prototype)}};var Zg;Jg=Xg=Op([Sp({type:Mh.Set,itemType:Yg})],Jg);let $g=Zg=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,Zg.prototype)}};$g=Zg=Op([Sp({type:Mh.Set,itemType:pg})],$g);class em{constructor(e={}){this.version=ug.v0,this.digestAlgorithms=new $g,this.encapContentInfo=new hg,this.signerInfos=new Jg,Object.assign(this,e)}}Op([Ip({type:jh.Integer})],em.prototype,"version",void 0),Op([Ip({type:$g})],em.prototype,"digestAlgorithms",void 0),Op([Ip({type:hg})],em.prototype,"encapContentInfo",void 0),Op([Ip({type:ag,context:0,implicit:!0,optional:!0})],em.prototype,"certificates",void 0),Op([Ip({type:Hg,context:1,implicit:!0,optional:!0})],em.prototype,"crls",void 0),Op([Ip({type:Jg})],em.prototype,"signerInfos",void 0);const tm="1.2.840.10045.2.1",nm="1.2.840.10045.4.1",rm="1.2.840.10045.4.3.1",im="1.2.840.10045.4.3.2",sm="1.2.840.10045.4.3.3",om="1.2.840.10045.4.3.4",am="1.2.840.10045.3.1.7",cm="1.3.132.0.34",lm="1.3.132.0.35";function hm(e){return new mf({algorithm:e})}const um=hm(nm),pm=(hm(rm),hm(im)),dm=hm(sm),fm=hm(om);let gm=class{constructor(e={}){Object.assign(this,e)}};Op([Ip({type:jh.ObjectIdentifier})],gm.prototype,"namedCurve",void 0),gm=Op([Sp({type:Mh.Choice})],gm);class mm{constructor(e={}){this.version=1,this.privateKey=new Ku,Object.assign(this,e)}}Op([Ip({type:jh.Integer})],mm.prototype,"version",void 0),Op([Ip({type:Ku})],mm.prototype,"privateKey",void 0),Op([Ip({type:gm,context:0,optional:!0})],mm.prototype,"parameters",void 0),Op([Ip({type:jh.BitString,context:1,optional:!0})],mm.prototype,"publicKey",void 0);class wm{constructor(e={}){this.r=new ArrayBuffer(0),this.s=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:jh.Integer,converter:Zu})],wm.prototype,"r",void 0),Op([Ip({type:jh.Integer,converter:Zu})],wm.prototype,"s",void 0);const ym="1.2.840.113549.1.1",bm=`${ym}.1`,Am=`${ym}.7`,vm=`${ym}.9`,_m=`${ym}.10`,Em=`${ym}.2`,xm=`${ym}.4`,Sm=`${ym}.5`,Im=`${ym}.14`,Tm=`${ym}.11`,Cm=`${ym}.12`,Rm=`${ym}.13`,km=`${ym}.15`,Nm=`${ym}.16`,Om="1.3.14.3.2.26",Bm="2.16.840.1.101.3.4.2.4",Pm="2.16.840.1.101.3.4.2.1",Lm="2.16.840.1.101.3.4.2.2",Dm="2.16.840.1.101.3.4.2.3",Um=`${ym}.8`;function Fm(e){return new mf({algorithm:e,parameters:null})}Fm("1.2.840.113549.2.2"),Fm("1.2.840.113549.2.5");const Mm=Fm(Om),jm=(Fm(Bm),Fm(Pm),Fm(Lm),Fm(Dm),Fm("2.16.840.1.101.3.4.2.5"),Fm("2.16.840.1.101.3.4.2.6"),new mf({algorithm:Um,parameters:Np.serialize(Mm)})),Hm=new mf({algorithm:vm,parameters:Np.serialize(np.toASN(new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]).buffer))});Fm(bm),Fm(Em),Fm(xm),Fm(Sm),Fm(km),Fm(Nm),Fm(Cm),Fm(Rm),Fm(km),Fm(Nm);class Wm{constructor(e={}){this.hashAlgorithm=new mf(Mm),this.maskGenAlgorithm=new mf({algorithm:Um,parameters:Np.serialize(Mm)}),this.pSourceAlgorithm=new mf(Hm),Object.assign(this,e)}}Op([Ip({type:mf,context:0,defaultValue:Mm})],Wm.prototype,"hashAlgorithm",void 0),Op([Ip({type:mf,context:1,defaultValue:jm})],Wm.prototype,"maskGenAlgorithm",void 0),Op([Ip({type:mf,context:2,defaultValue:Hm})],Wm.prototype,"pSourceAlgorithm",void 0),new mf({algorithm:Am,parameters:Np.serialize(new Wm)});class Qm{constructor(e={}){this.hashAlgorithm=new mf(Mm),this.maskGenAlgorithm=new mf({algorithm:Um,parameters:Np.serialize(Mm)}),this.saltLength=20,this.trailerField=1,Object.assign(this,e)}}Op([Ip({type:mf,context:0,defaultValue:Mm})],Qm.prototype,"hashAlgorithm",void 0),Op([Ip({type:mf,context:1,defaultValue:jm})],Qm.prototype,"maskGenAlgorithm",void 0),Op([Ip({type:jh.Integer,context:2,defaultValue:20})],Qm.prototype,"saltLength",void 0),Op([Ip({type:jh.Integer,context:3,defaultValue:1})],Qm.prototype,"trailerField",void 0),new mf({algorithm:_m,parameters:Np.serialize(new Qm)});class Vm{constructor(e={}){this.digestAlgorithm=new mf,this.digest=new Ku,Object.assign(this,e)}}var zm;Op([Ip({type:mf})],Vm.prototype,"digestAlgorithm",void 0),Op([Ip({type:Ku})],Vm.prototype,"digest",void 0);class qm{constructor(e={}){this.prime=new ArrayBuffer(0),this.exponent=new ArrayBuffer(0),this.coefficient=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:jh.Integer,converter:Zu})],qm.prototype,"prime",void 0),Op([Ip({type:jh.Integer,converter:Zu})],qm.prototype,"exponent",void 0),Op([Ip({type:jh.Integer,converter:Zu})],qm.prototype,"coefficient",void 0);let Gm=zm=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,zm.prototype)}};Gm=zm=Op([Sp({type:Mh.Sequence,itemType:qm})],Gm);class Km{constructor(e={}){this.version=0,this.modulus=new ArrayBuffer(0),this.publicExponent=new ArrayBuffer(0),this.privateExponent=new ArrayBuffer(0),this.prime1=new ArrayBuffer(0),this.prime2=new ArrayBuffer(0),this.exponent1=new ArrayBuffer(0),this.exponent2=new ArrayBuffer(0),this.coefficient=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:jh.Integer})],Km.prototype,"version",void 0),Op([Ip({type:jh.Integer,converter:Zu})],Km.prototype,"modulus",void 0),Op([Ip({type:jh.Integer,converter:Zu})],Km.prototype,"publicExponent",void 0),Op([Ip({type:jh.Integer,converter:Zu})],Km.prototype,"privateExponent",void 0),Op([Ip({type:jh.Integer,converter:Zu})],Km.prototype,"prime1",void 0),Op([Ip({type:jh.Integer,converter:Zu})],Km.prototype,"prime2",void 0),Op([Ip({type:jh.Integer,converter:Zu})],Km.prototype,"exponent1",void 0),Op([Ip({type:jh.Integer,converter:Zu})],Km.prototype,"exponent2",void 0),Op([Ip({type:jh.Integer,converter:Zu})],Km.prototype,"coefficient",void 0),Op([Ip({type:Gm,optional:!0})],Km.prototype,"otherPrimeInfos",void 0);class Xm{constructor(e={}){this.modulus=new ArrayBuffer(0),this.publicExponent=new ArrayBuffer(0),Object.assign(this,e)}}function Ym(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}var Jm;Op([Ip({type:jh.Integer,converter:Zu})],Xm.prototype,"modulus",void 0),Op([Ip({type:jh.Integer,converter:Zu})],Xm.prototype,"publicExponent",void 0),Object.create,Object.create,function(e){e[e.Transient=0]="Transient",e[e.Singleton=1]="Singleton",e[e.ResolutionScoped=2]="ResolutionScoped",e[e.ContainerScoped=3]="ContainerScoped"}(Jm||(Jm={}));const Zm=Jm;
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var $m=function(e,t){return $m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},$m(e,t)};function ew(e,t){function n(){this.constructor=e}$m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function tw(e,t,n,r){return new(n||(n=Promise))(function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,a)}c((r=r.apply(e,t||[])).next())})}function nw(e,t){var n,r,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function rw(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function iw(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,s=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return o}function sw(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(iw(arguments[t]));return e}function ow(e){return!!e.useClass}function aw(e){return!!e.useFactory}var cw=function(){function e(e){this.wrap=e,this.reflectMethods=["get","getPrototypeOf","setPrototypeOf","getOwnPropertyDescriptor","defineProperty","has","set","deleteProperty","apply","construct","ownKeys"]}return e.prototype.createProxy=function(e){var t,n=this,r=!1;return new Proxy({},this.createHandler(function(){return r||(t=e(n.wrap()),r=!0),t}))},e.prototype.createHandler=function(e){var t={};return this.reflectMethods.forEach(function(n){t[n]=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return t[0]=e(),Reflect[n].apply(void 0,sw(t))}}),t},e}();function lw(e){return"string"==typeof e||"symbol"==typeof e}function hw(e){return"object"==typeof e&&"token"in e&&"transform"in e}function uw(e){return!!e.useToken}function pw(e){return null!=e.useValue}const dw=function(){function e(){this._registryMap=new Map}return e.prototype.entries=function(){return this._registryMap.entries()},e.prototype.getAll=function(e){return this.ensure(e),this._registryMap.get(e)},e.prototype.get=function(e){this.ensure(e);var t=this._registryMap.get(e);return t[t.length-1]||null},e.prototype.set=function(e,t){this.ensure(e),this._registryMap.get(e).push(t)},e.prototype.setAll=function(e,t){this._registryMap.set(e,t)},e.prototype.has=function(e){return this.ensure(e),this._registryMap.get(e).length>0},e.prototype.clear=function(){this._registryMap.clear()},e.prototype.ensure=function(e){this._registryMap.has(e)||this._registryMap.set(e,[])},e}(),fw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ew(t,e),t}(dw),gw=function(){this.scopedResolutions=new Map};function mw(e,t,n){var r,i,s=iw(e.toString().match(/constructor\(([\w, ]+)\)/)||[],2)[1],o=function(e,t){return null===e?"at position #"+t:'"'+e.split(",")[t].trim()+'" at position #'+t}(void 0===s?null:s,t);return r="Cannot inject the dependency "+o+' of "'+e.name+'" constructor. Reason:',void 0===i&&(i=" "),sw([r],n.message.split("\n").map(function(e){return i+e})).join("\n")}var ww=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ew(t,e),t}(dw),yw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ew(t,e),t}(dw);const bw=function(){this.preResolution=new ww,this.postResolution=new yw};var Aw=new Map,vw=function(){function e(e){this.parent=e,this._registry=new fw,this.interceptors=new bw,this.disposed=!1,this.disposables=new Set}return e.prototype.register=function(e,t,n){var r;if(void 0===n&&(n={lifecycle:Zm.Transient}),this.ensureNotDisposed(),r=function(e){return ow(e)||pw(e)||uw(e)||aw(e)}(t)?t:{useClass:t},uw(r))for(var i=[e],s=r;null!=s;){var o=s.useToken;if(i.includes(o))throw new Error("Token registration cycle detected! "+sw(i,[o]).join(" -> "));i.push(o);var a=this._registry.get(o);s=a&&uw(a.provider)?a.provider:null}if((n.lifecycle===Zm.Singleton||n.lifecycle==Zm.ContainerScoped||n.lifecycle==Zm.ResolutionScoped)&&(pw(r)||aw(r)))throw new Error('Cannot use lifecycle "'+Zm[n.lifecycle]+'" with ValueProviders or FactoryProviders');return this._registry.set(e,{provider:r,options:n}),this},e.prototype.registerType=function(e,t){return this.ensureNotDisposed(),lw(t)?this.register(e,{useToken:t}):this.register(e,{useClass:t})},e.prototype.registerInstance=function(e,t){return this.ensureNotDisposed(),this.register(e,{useValue:t})},e.prototype.registerSingleton=function(e,t){if(this.ensureNotDisposed(),lw(e)){if(lw(t))return this.register(e,{useToken:t},{lifecycle:Zm.Singleton});if(t)return this.register(e,{useClass:t},{lifecycle:Zm.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}var n=e;return t&&!lw(t)&&(n=t),this.register(e,{useClass:n},{lifecycle:Zm.Singleton})},e.prototype.resolve=function(e,t){void 0===t&&(t=new gw),this.ensureNotDisposed();var n=this.getRegistration(e);if(!n&&lw(e))throw new Error('Attempted to resolve unregistered dependency token: "'+e.toString()+'"');if(this.executePreResolutionInterceptor(e,"Single"),n){var r=this.resolveRegistration(n,t);return this.executePostResolutionInterceptor(e,r,"Single"),r}if(function(e){return"function"==typeof e||e instanceof cw}(e))return r=this.construct(e,t),this.executePostResolutionInterceptor(e,r,"Single"),r;throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.")},e.prototype.executePreResolutionInterceptor=function(e,t){var n,r;if(this.interceptors.preResolution.has(e)){var i=[];try{for(var s=rw(this.interceptors.preResolution.getAll(e)),o=s.next();!o.done;o=s.next()){var a=o.value;"Once"!=a.options.frequency&&i.push(a),a.callback(e,t)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}this.interceptors.preResolution.setAll(e,i)}},e.prototype.executePostResolutionInterceptor=function(e,t,n){var r,i;if(this.interceptors.postResolution.has(e)){var s=[];try{for(var o=rw(this.interceptors.postResolution.getAll(e)),a=o.next();!a.done;a=o.next()){var c=a.value;"Once"!=c.options.frequency&&s.push(c),c.callback(e,t,n)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}this.interceptors.postResolution.setAll(e,s)}},e.prototype.resolveRegistration=function(e,t){if(this.ensureNotDisposed(),e.options.lifecycle===Zm.ResolutionScoped&&t.scopedResolutions.has(e))return t.scopedResolutions.get(e);var n,r=e.options.lifecycle===Zm.Singleton,i=e.options.lifecycle===Zm.ContainerScoped,s=r||i;return n=pw(e.provider)?e.provider.useValue:uw(e.provider)?s?e.instance||(e.instance=this.resolve(e.provider.useToken,t)):this.resolve(e.provider.useToken,t):ow(e.provider)?s?e.instance||(e.instance=this.construct(e.provider.useClass,t)):this.construct(e.provider.useClass,t):aw(e.provider)?e.provider.useFactory(this):this.construct(e.provider,t),e.options.lifecycle===Zm.ResolutionScoped&&t.scopedResolutions.set(e,n),n},e.prototype.resolveAll=function(e,t){var n=this;void 0===t&&(t=new gw),this.ensureNotDisposed();var r=this.getAllRegistrations(e);if(!r&&lw(e))throw new Error('Attempted to resolve unregistered dependency token: "'+e.toString()+'"');if(this.executePreResolutionInterceptor(e,"All"),r){var i=r.map(function(e){return n.resolveRegistration(e,t)});return this.executePostResolutionInterceptor(e,i,"All"),i}var s=[this.construct(e,t)];return this.executePostResolutionInterceptor(e,s,"All"),s},e.prototype.isRegistered=function(e,t){return void 0===t&&(t=!1),this.ensureNotDisposed(),this._registry.has(e)||t&&(this.parent||!1)&&this.parent.isRegistered(e,!0)},e.prototype.reset=function(){this.ensureNotDisposed(),this._registry.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()},e.prototype.clearInstances=function(){var e,t;this.ensureNotDisposed();try{for(var n=rw(this._registry.entries()),r=n.next();!r.done;r=n.next()){var i=iw(r.value,2),s=i[0],o=i[1];this._registry.setAll(s,o.filter(function(e){return!pw(e.provider)}).map(function(e){return e.instance=void 0,e}))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},e.prototype.createChildContainer=function(){var t,n;this.ensureNotDisposed();var r=new e(this);try{for(var i=rw(this._registry.entries()),s=i.next();!s.done;s=i.next()){var o=iw(s.value,2),a=o[0],c=o[1];c.some(function(e){return e.options.lifecycle===Zm.ContainerScoped})&&r._registry.setAll(a,c.map(function(e){return e.options.lifecycle===Zm.ContainerScoped?{provider:e.provider,options:e.options}:e}))}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},e.prototype.beforeResolution=function(e,t,n){void 0===n&&(n={frequency:"Always"}),this.interceptors.preResolution.set(e,{callback:t,options:n})},e.prototype.afterResolution=function(e,t,n){void 0===n&&(n={frequency:"Always"}),this.interceptors.postResolution.set(e,{callback:t,options:n})},e.prototype.dispose=function(){return tw(this,void 0,void 0,function(){var e;return nw(this,function(t){switch(t.label){case 0:return this.disposed=!0,e=[],this.disposables.forEach(function(t){var n=t.dispose();n&&e.push(n)}),[4,Promise.all(e)];case 1:return t.sent(),[2]}})})},e.prototype.getRegistration=function(e){return this.isRegistered(e)?this._registry.get(e):this.parent?this.parent.getRegistration(e):null},e.prototype.getAllRegistrations=function(e){return this.isRegistered(e)?this._registry.getAll(e):this.parent?this.parent.getAllRegistrations(e):null},e.prototype.construct=function(e,t){var n=this;if(e instanceof cw)return e.createProxy(function(e){return n.resolve(e,t)});var r,i=function(){var r=Aw.get(e);if(!r||0===r.length){if(0===e.length)return new e;throw new Error('TypeInfo not known for "'+e.name+'"')}var i=r.map(n.resolveParams(t,e));return new(e.bind.apply(e,sw([void 0],i)))}();return"function"!=typeof(r=i).dispose||r.dispose.length>0||this.disposables.add(i),i},e.prototype.resolveParams=function(e,t){var n=this;return function(r,i){var s,o,a,c;try{return"object"==typeof(c=r)&&"token"in c&&"multiple"in c?hw(r)?r.multiple?(s=n.resolve(r.transform)).transform.apply(s,sw([n.resolveAll(r.token)],r.transformArgs)):(o=n.resolve(r.transform)).transform.apply(o,sw([n.resolve(r.token,e)],r.transformArgs)):r.multiple?n.resolveAll(r.token):n.resolve(r.token,e):hw(r)?(a=n.resolve(r.transform,e)).transform.apply(a,sw([n.resolve(r.token,e)],r.transformArgs)):n.resolve(r,e)}catch(e){throw new Error(mw(t,i,e))}}},e.prototype.ensureNotDisposed=function(){if(this.disposed)throw new Error("This container has been disposed, you cannot interact with a disposed container")},e}(),_w=new vw,Ew="injectionTokens";const xw=function(){return function(e){Aw.set(e,function(e){var t=Reflect.getMetadata("design:paramtypes",e)||[],n=Reflect.getOwnMetadata(Ew,e)||{};return Object.keys(n).forEach(function(e){t[+e]=n[e]}),t}(e))}};if("undefined"==typeof Reflect||!Reflect.getMetadata)throw new Error("tsyringe requires a reflect polyfill. Please add 'import \"reflect-metadata\"' to the top of your entry point.");var Sw;class Iw{constructor(e={}){this.attrId="",this.attrValues=[],Object.assign(e)}}Op([Ip({type:jh.ObjectIdentifier})],Iw.prototype,"attrId",void 0),Op([Ip({type:jh.Any,repeated:"set"})],Iw.prototype,"attrValues",void 0);let Tw=Sw=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,Sw.prototype)}};var Cw;Tw=Sw=Op([Sp({type:Mh.Sequence,itemType:Iw})],Tw);let Rw=Cw=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,Cw.prototype)}};Rw=Cw=Op([Sp({type:Mh.Sequence,itemType:cg})],Rw);class kw{constructor(e={}){this.certId="",this.certValue=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:jh.ObjectIdentifier})],kw.prototype,"certId",void 0),Op([Ip({type:jh.Any,context:0})],kw.prototype,"certValue",void 0);class Nw{constructor(e={}){this.crlId="",this.crltValue=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:jh.ObjectIdentifier})],Nw.prototype,"crlId",void 0),Op([Ip({type:jh.Any,context:0})],Nw.prototype,"crltValue",void 0);class Ow extends Ku{}class Bw{constructor(e={}){this.encryptionAlgorithm=new mf,this.encryptedData=new Ow,Object.assign(this,e)}}var Pw,Lw;Op([Ip({type:mf})],Bw.prototype,"encryptionAlgorithm",void 0),Op([Ip({type:Ow})],Bw.prototype,"encryptedData",void 0),function(e){e[e.v1=0]="v1"}(Lw||(Lw={}));class Dw extends Ku{}let Uw=Pw=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,Pw.prototype)}};Uw=Pw=Op([Sp({type:Mh.Sequence,itemType:sf})],Uw);class Fw{constructor(e={}){this.version=Lw.v1,this.privateKeyAlgorithm=new mf,this.privateKey=new Dw,Object.assign(this,e)}}Op([Ip({type:jh.Integer})],Fw.prototype,"version",void 0),Op([Ip({type:mf})],Fw.prototype,"privateKeyAlgorithm",void 0),Op([Ip({type:Dw})],Fw.prototype,"privateKey",void 0),Op([Ip({type:Uw,implicit:!0,context:0,optional:!0})],Fw.prototype,"attributes",void 0);let Mw=class extends Fw{};Mw=Op([Sp({type:Mh.Sequence})],Mw);let jw=class extends Bw{};jw=Op([Sp({type:Mh.Sequence})],jw);class Hw{constructor(e={}){this.secretTypeId="",this.secretValue=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:jh.ObjectIdentifier})],Hw.prototype,"secretTypeId",void 0),Op([Ip({type:jh.Any,context:0})],Hw.prototype,"secretValue",void 0);class Ww{constructor(e={}){this.mac=new Vm,this.macSalt=new Ku,this.iterations=1,Object.assign(this,e)}}Op([Ip({type:Vm})],Ww.prototype,"mac",void 0),Op([Ip({type:Ku})],Ww.prototype,"macSalt",void 0),Op([Ip({type:jh.Integer,defaultValue:1})],Ww.prototype,"iterations",void 0);class Qw{constructor(e={}){this.version=3,this.authSafe=new cg,this.macData=new Ww,Object.assign(this,e)}}var Vw;Op([Ip({type:jh.Integer})],Qw.prototype,"version",void 0),Op([Ip({type:cg})],Qw.prototype,"authSafe",void 0),Op([Ip({type:Ww,optional:!0})],Qw.prototype,"macData",void 0);class zw{constructor(e={}){this.bagId="",this.bagValue=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:jh.ObjectIdentifier})],zw.prototype,"bagId",void 0),Op([Ip({type:jh.Any,context:0})],zw.prototype,"bagValue",void 0),Op([Ip({type:Iw,repeated:"set",optional:!0})],zw.prototype,"bagAttributes",void 0);let qw=Vw=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,Vw.prototype)}};var Gw,Kw,Xw;qw=Vw=Op([Sp({type:Mh.Sequence,itemType:zw})],qw);const Yw="1.2.840.113549.1.9",Jw=`${Yw}.7`,Zw=`${Yw}.14`;let $w=class extends Fp{constructor(e={}){super(e)}toString(){return{}.toString(),this.ia5String||super.toString()}};Op([Ip({type:jh.IA5String})],$w.prototype,"ia5String",void 0),$w=Op([Sp({type:Mh.Choice})],$w);let ey=class extends cg{};ey=Op([Sp({type:Mh.Sequence})],ey);let ty=class extends Qw{};ty=Op([Sp({type:Mh.Sequence})],ty);let ny=class extends Bw{};ny=Op([Sp({type:Mh.Sequence})],ny);let ry=class{constructor(e=""){this.value=e}toString(){return this.value}};Op([Ip({type:jh.IA5String})],ry.prototype,"value",void 0),ry=Op([Sp({type:Mh.Choice})],ry);let iy=class extends $w{};iy=Op([Sp({type:Mh.Choice})],iy);let sy=class extends Fp{};sy=Op([Sp({type:Mh.Choice})],sy);let oy=class{constructor(e=new Date){this.value=e}};Op([Ip({type:jh.GeneralizedTime})],oy.prototype,"value",void 0),oy=Op([Sp({type:Mh.Choice})],oy);let ay=class extends Fp{};ay=Op([Sp({type:Mh.Choice})],ay);let cy=class{constructor(e="M"){this.value=e}toString(){return this.value}};Op([Ip({type:jh.PrintableString})],cy.prototype,"value",void 0),cy=Op([Sp({type:Mh.Choice})],cy);let ly=class{constructor(e=""){this.value=e}toString(){return this.value}};Op([Ip({type:jh.PrintableString})],ly.prototype,"value",void 0),ly=Op([Sp({type:Mh.Choice})],ly);let hy=class extends ly{};hy=Op([Sp({type:Mh.Choice})],hy);let uy=class extends Fp{};uy=Op([Sp({type:Mh.Choice})],uy);let py=class{constructor(e=""){this.value=e}toString(){return this.value}};Op([Ip({type:jh.ObjectIdentifier})],py.prototype,"value",void 0),py=Op([Sp({type:Mh.Choice})],py);let dy=class extends yf{};dy=Op([Sp({type:Mh.Choice})],dy);let fy=class{constructor(e=0){this.value=e}toString(){return this.value.toString()}};Op([Ip({type:jh.Integer})],fy.prototype,"value",void 0),fy=Op([Sp({type:Mh.Choice})],fy);let gy=class extends Yg{};gy=Op([Sp({type:Mh.Sequence})],gy);let my=class extends Fp{};my=Op([Sp({type:Mh.Choice})],my);let wy=Gw=class extends _f{constructor(e){super(e),Object.setPrototypeOf(this,Gw.prototype)}};wy=Gw=Op([Sp({type:Mh.Sequence})],wy);let yy=Kw=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,Kw.prototype)}};yy=Kw=Op([Sp({type:Mh.Set,itemType:kf})],yy);let by=class{constructor(e=""){this.value=e}toString(){return this.value}};Op([Ip({type:jh.BmpString})],by.prototype,"value",void 0),by=Op([Sp({type:Mh.Choice})],by);let Ay=class extends mf{};Ay=Op([Sp({type:Mh.Sequence})],Ay);let vy=Xw=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,Xw.prototype)}};var _y;vy=Xw=Op([Sp({type:Mh.Sequence,itemType:Ay})],vy);let Ey=_y=class extends kp{constructor(e){super(e),Object.setPrototypeOf(this,_y.prototype)}};Ey=_y=Op([Sp({type:Mh.Sequence,itemType:sf})],Ey);class xy{constructor(e={}){this.version=0,this.subject=new Qp,this.subjectPKInfo=new wf,this.attributes=new Ey,Object.assign(this,e)}}Op([Ip({type:jh.Integer})],xy.prototype,"version",void 0),Op([Ip({type:Qp})],xy.prototype,"subject",void 0),Op([Ip({type:wf})],xy.prototype,"subjectPKInfo",void 0),Op([Ip({type:Ey,implicit:!0,context:0})],xy.prototype,"attributes",void 0);class Sy{constructor(e={}){this.certificationRequestInfo=new xy,this.signatureAlgorithm=new mf,this.signature=new ArrayBuffer(0),Object.assign(this,e)}}Op([Ip({type:xy})],Sy.prototype,"certificationRequestInfo",void 0),Op([Ip({type:mf})],Sy.prototype,"signatureAlgorithm",void 0),Op([Ip({type:jh.BitString})],Sy.prototype,"signature",void 0);
/*!
* MIT License
*
* Copyright (c) Peculiar Ventures. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
const Iy="crypto.algorithm",Ty="crypto.algorithmProvider";var Cy;_w.registerSingleton(Ty,class{getAlgorithms(){return _w.resolveAll(Iy)}toAsnAlgorithm(e){for(const t of this.getAlgorithms()){const n=t.toAsnAlgorithm(e);if(n)return n}if(/[0-9.]+/.test(e.name)){const t=new mf({algorithm:e.name});if("parameters"in e){const n=e;t.parameters=n.parameters}return t}throw new Error("Cannot convert WebCrypto algorithm to ASN.1 algorithm")}toWebAlgorithm(e){for(const t of this.getAlgorithms()){const n=t.toWebAlgorithm(e);if(n)return n}return{name:e.algorithm,parameters:e.parameters}}});const Ry="1.3.36.3.3.2.8.1.1",ky=`${Ry}.1`,Ny=`${Ry}.2`,Oy=`${Ry}.3`,By=`${Ry}.4`,Py=`${Ry}.5`,Ly=`${Ry}.6`,Dy=`${Ry}.7`,Uy=`${Ry}.8`,Fy=`${Ry}.9`,My=`${Ry}.10`,jy=`${Ry}.11`,Hy=`${Ry}.12`,Wy=`${Ry}.13`,Qy=`${Ry}.14`,Vy="brainpoolP160r1",zy="brainpoolP160t1",qy="brainpoolP192r1",Gy="brainpoolP192t1",Ky="brainpoolP224r1",Xy="brainpoolP224t1",Yy="brainpoolP256r1",Jy="brainpoolP256t1",Zy="brainpoolP320r1",$y="brainpoolP320t1",eb="brainpoolP384r1",tb="brainpoolP384t1",nb="brainpoolP512r1",rb="brainpoolP512t1",ib="ECDSA";let sb=Cy=class{toAsnAlgorithm(e){if(e.name.toLowerCase()===ib.toLowerCase())if("hash"in e)switch(("string"==typeof e.hash?e.hash:e.hash.name).toLowerCase()){case"sha-1":return um;case"sha-256":return pm;case"sha-384":return dm;case"sha-512":return fm}else if("namedCurve"in e){let t="";switch(e.namedCurve){case"P-256":t=am;break;case"K-256":t=Cy.SECP256K1;break;case"P-384":t=cm;break;case"P-521":t=lm;break;case Vy:t=ky;break;case zy:t=Ny;break;case qy:t=Oy;break;case Gy:t=By;break;case Ky:t=Py;break;case Xy:t=Ly;break;case Yy:t=Dy;break;case Jy:t=Uy;break;case Zy:t=Fy;break;case $y:t=My;break;case eb:t=jy;break;case tb:t=Hy;break;case nb:t=Wy;break;case rb:t=Qy}if(t)return new mf({algorithm:tm,parameters:Np.serialize(new gm({namedCurve:t}))})}return null}toWebAlgorithm(e){switch(e.algorithm){case nm:return{name:ib,hash:{name:"SHA-1"}};case im:return{name:ib,hash:{name:"SHA-256"}};case sm:return{name:ib,hash:{name:"SHA-384"}};case om:return{name:ib,hash:{name:"SHA-512"}};case tm:if(!e.parameters)throw new TypeError("Cannot get required parameters from EC algorithm");switch(Np.parse(e.parameters,gm).namedCurve){case am:return{name:ib,namedCurve:"P-256"};case Cy.SECP256K1:return{name:ib,namedCurve:"K-256"};case cm:return{name:ib,namedCurve:"P-384"};case lm:return{name:ib,namedCurve:"P-521"};case ky:return{name:ib,namedCurve:Vy};case Ny:return{name:ib,namedCurve:zy};case Oy:return{name:ib,namedCurve:qy};case By:return{name:ib,namedCurve:Gy};case Py:return{name:ib,namedCurve:Ky};case Ly:return{name:ib,namedCurve:Xy};case Dy:return{name:ib,namedCurve:Yy};case Uy:return{name:ib,namedCurve:Jy};case Fy:return{name:ib,namedCurve:Zy};case My:return{name:ib,namedCurve:$y};case jy:return{name:ib,namedCurve:eb};case Hy:return{name:ib,namedCurve:tb};case Wy:return{name:ib,namedCurve:nb};case Qy:return{name:ib,namedCurve:rb}}}return null}};sb.SECP256K1="1.3.132.0.10",sb=Cy=Ym([xw()],sb),_w.registerSingleton(Iy,sb);const ob=Symbol("name"),ab=Symbol("value");class cb{constructor(e,t={},n=""){this[ob]=e,this[ab]=n;for(const e in t)this[e]=t[e]}}cb.NAME=ob,cb.VALUE=ab;class lb{static toString(e){return this.items[e]||e}}lb.items={[Om]:"sha1",[Bm]:"sha224",[Pm]:"sha256",[Lm]:"sha384",[Dm]:"sha512",[bm]:"rsaEncryption",[Sm]:"sha1WithRSAEncryption",[Im]:"sha224WithRSAEncryption",[Tm]:"sha256WithRSAEncryption",[Cm]:"sha384WithRSAEncryption",[Rm]:"sha512WithRSAEncryption",[tm]:"ecPublicKey",[nm]:"ecdsaWithSHA1",[rm]:"ecdsaWithSHA224",[im]:"ecdsaWithSHA256",[sm]:"ecdsaWithSHA384",[om]:"ecdsaWithSHA512",[Pd]:"TLS WWW server authentication",[Ld]:"TLS WWW client authentication",[Dd]:"Code Signing",[Ud]:"E-mail Protection",[Fd]:"Time Stamping",[Md]:"OCSP Signing",[Gg]:"Signed Data"};class hb{static serialize(e){return this.serializeObj(e).join("\n")}static pad(e=0){return"".padStart(2*e," ")}static serializeObj(e,t=0){const n=[];let r=this.pad(t++),i="";const s=e[cb.VALUE];s&&(i=` ${s}`),n.push(`${r}${e[cb.NAME]}:${i}`),r=this.pad(t);for(const i in e){if("symbol"==typeof i)continue;const s=e[i],o=i?`${i}: `:"";if("string"==typeof s||"number"==typeof s||"boolean"==typeof s)n.push(`${r}${o}${s}`);else if(s instanceof Date)n.push(`${r}${o}${s.toUTCString()}`);else if(Array.isArray(s))for(const e of s)e[cb.NAME]=i,n.push(...this.serializeObj(e,t));else if(s instanceof cb)s[cb.NAME]=i,n.push(...this.serializeObj(s,t));else if(_l._H.isBufferSource(s))i?(n.push(`${r}${o}`),n.push(...this.serializeBufferSource(s,t+1))):n.push(...this.serializeBufferSource(s,t));else{if(!("toTextObject"in s))throw new TypeError("Cannot serialize data in text format. Unsupported type.");{const e=s.toTextObject();e[cb.NAME]=i,n.push(...this.serializeObj(e,t))}}}return n}static serializeBufferSource(e,t=0){const n=this.pad(t),r=_l._H.toUint8Array(e),i=[];for(let e=0;e<r.length;){const t=[];for(let n=0;n<16&&e<r.length;n++){8===n&&t.push("");const i=r[e++].toString(16).padStart(2,"0");t.push(i)}i.push(`${n}${t.join(" ")}`)}return i}static serializeAlgorithm(e){return this.algorithmSerializer.toTextObject(e)}}hb.oidSerializer=lb,hb.algorithmSerializer=class{static toTextObject(e){const t=new cb("Algorithm Identifier",{},lb.toString(e.algorithm));if(e.parameters)switch(e.algorithm){case tm:{const n=(new sb).toWebAlgorithm(e);n&&"namedCurve"in n?t["Named Curve"]=n.namedCurve:t.Parameters=e.parameters;break}default:t.Parameters=e.parameters}return t}};class ub{constructor(...e){if(1===e.length){const t=e[0];this.rawData=Np.serialize(t),this.onInit(t)}else{const t=Np.parse(e[0],e[1]);this.rawData=_l._H.toArrayBuffer(e[0]),this.onInit(t)}}equal(e){return e instanceof ub&&(0,_l.n4)(e.rawData,this.rawData)}toString(e="text"){switch(e){case"asn":return Np.toString(this.rawData);case"text":return hb.serialize(this.toTextObject());case"hex":return _l.U$.ToHex(this.rawData);case"base64":return _l.U$.ToBase64(this.rawData);case"base64url":return _l.U$.ToBase64Url(this.rawData);default:throw TypeError("Argument 'format' is unsupported value")}}getTextName(){return this.constructor.NAME}toTextObject(){const e=this.toTextObjectEmpty();return e[""]=this.rawData,e}toTextObjectEmpty(e){return new cb(this.getTextName(),{},e)}}ub.NAME="ASN";class pb extends ub{constructor(...e){let t;t=_l._H.isBufferSource(e[0])?_l._H.toArrayBuffer(e[0]):Np.serialize(new vf({extnID:e[0],critical:e[1],extnValue:new Ku(_l._H.toArrayBuffer(e[2]))})),super(t,vf)}onInit(e){this.type=e.extnID,this.critical=e.critical,this.value=e.extnValue.buffer}toTextObject(){const e=this.toTextObjectWithoutValue();return e[""]=this.value,e}toTextObjectWithoutValue(){const e=this.toTextObjectEmpty(this.critical?"critical":void 0);return e[cb.NAME]===pb.NAME&&(e[cb.NAME]=lb.toString(this.type)),e}}var db;class fb{constructor(){this.items=new Map,this[db]="CryptoProvider","undefined"!=typeof self&&"undefined"!=typeof crypto&&this.set(fb.DEFAULT,crypto)}static isCryptoKeyPair(e){return e&&e.privateKey&&e.publicKey}static isCryptoKey(e){return e&&e.usages&&e.type&&e.algorithm&&void 0!==e.extractable}clear(){this.items.clear()}delete(e){return this.items.delete(e)}forEach(e,t){return this.items.forEach(e,t)}has(e){return this.items.has(e)}get size(){return this.items.size}entries(){return this.items.entries()}keys(){return this.items.keys()}values(){return this.items.values()}[Symbol.iterator](){return this.items[Symbol.iterator]()}get(e=fb.DEFAULT){const t=this.items.get(e.toLowerCase());if(!t)throw new Error(`Cannot get Crypto by name '${e}'`);return t}set(e,t){if("string"==typeof e){if(!t)throw new TypeError("Argument 'value' is required");this.items.set(e.toLowerCase(),t)}else this.items.set(fb.DEFAULT,e);return this}}db=Symbol.toStringTag,fb.DEFAULT="default";const gb=new fb,mb=/^[0-2](?:\.[1-9][0-9]*)+$/;class wb{constructor(e={}){this.items={};for(const t in e)this.register(t,e[t])}get(e){return this.items[e]||null}findId(e){return t=e,new RegExp(mb).test(t)?e:this.get(e);var t}register(e,t){this.items[e]=t,this.items[t]=e}}const yb=new wb;function bb(e,t){return`\\${_l.U$.ToHex(_l.U$.FromUtf8String(t)).toUpperCase()}`}yb.register("CN","2.5.4.3"),yb.register("L","2.5.4.7"),yb.register("ST","2.5.4.8"),yb.register("O","2.5.4.10"),yb.register("OU","2.5.4.11"),yb.register("C","2.5.4.6"),yb.register("DC","0.9.2342.19200300.100.1.25"),yb.register("E","1.2.840.113549.1.9.1"),yb.register("G","2.5.4.42"),yb.register("I","2.5.4.43"),yb.register("SN","2.5.4.4"),yb.register("T","2.5.4.12");class Ab{constructor(e,t={}){this.extraNames=new wb,this.asn=new Qp;for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];this.extraNames.register(e,n)}"string"==typeof e?this.asn=this.fromString(e):e instanceof Qp?this.asn=e:_l._H.isBufferSource(e)?this.asn=Np.parse(e,Qp):this.asn=this.fromJSON(e)}static isASCII(e){for(let t=0;t<e.length;t++)if(e.charCodeAt(t)>255)return!1;return!0}getField(e){const t=this.extraNames.findId(e)||yb.findId(e),n=[];for(const e of this.asn)for(const r of e)r.type===t&&n.push(r.value.toString());return n}getName(e){return this.extraNames.get(e)||yb.get(e)}toString(){return this.asn.map(e=>e.map(e=>`${this.getName(e.type)||e.type}=${e.value.anyValue?`#${_l.U$.ToHex(e.value.anyValue)}`:function(e){return e.replace(/([,+"\\<>;])/g,"\\$1").replace(/^([ #])/,"\\$1").replace(/([ ]$)/,"\\$1").replace(/([\r\n\t])/,bb)}(e.value.toString())}`).join("+")).join(", ")}toJSON(){var e;const t=[];for(const n of this.asn){const r={};for(const t of n){const n=this.getName(t.type)||t.type;null!==(e=r[n])&&void 0!==e||(r[n]=[]),r[n].push(t.value.anyValue?`#${_l.U$.ToHex(t.value.anyValue)}`:t.value.toString())}t.push(r)}return t}fromString(e){const t=new Qp,n=/(\d\.[\d.]*\d|[A-Za-z]+)=((?:"")|(?:".*?[^\\]")|(?:[^,+].*?(?:[^\\][,+]))|(?:))([,+])?/g;let r=null,i=",";for(;r=n.exec(`${e},`);){let[,e,n]=r;const s=n[n.length-1];","!==s&&"+"!==s||(n=n.slice(0,n.length-1),r[3]=s);const o=r[3];if(/[\d.]+/.test(e)||(e=this.getName(e)||""),!e)throw new Error(`Cannot get OID for name type '${e}'`);const a=new jp({type:e});if("#"===n.charAt(0))a.value.anyValue=_l.U$.FromHex(n.slice(1));else{const t=/"(.*?[^\\])?"/.exec(n);t&&(n=t[1]),n=n.replace(/\\0a/gi,"\n").replace(/\\0d/gi,"\r").replace(/\\0g/gi,"\t").replace(/\\(.)/g,"$1"),e===this.getName("E")||e===this.getName("DC")?a.value.ia5String=n:Ab.isASCII(n)?a.value.printableString=n:a.value.utf8String=n}"+"===i?t[t.length-1].push(a):t.push(new Hp([a])),i=o}return t}fromJSON(e){const t=new Qp;for(const n of e){const e=new Hp;for(const t in n){let r=t;if(/[\d.]+/.test(t)||(r=this.getName(t)||""),!r)throw new Error(`Cannot get OID for name type '${t}'`);const i=n[t];for(const t of i){const n=new jp({type:r});if("object"==typeof t)for(const e in t)switch(e){case"ia5String":n.value.ia5String=t[e];break;case"utf8String":n.value.utf8String=t[e];break;case"universalString":n.value.universalString=t[e];break;case"bmpString":n.value.bmpString=t[e];break;case"printableString":n.value.printableString=t[e]}else"#"===t[0]?n.value.anyValue=_l.U$.FromHex(t.slice(1)):r===this.getName("E")||r===this.getName("DC")?n.value.ia5String=t:n.value.printableString=t;e.push(n)}}t.push(e)}return t}toArrayBuffer(){return Np.serialize(this.asn)}async getThumbprint(...e){var t;let n,r="SHA-1";return e.length>=1&&!(null===(t=e[0])||void 0===t?void 0:t.subtle)?(r=e[0]||r,n=e[1]||gb.get()):n=e[0]||gb.get(),await n.subtle.digest(r,this.toArrayBuffer())}}const vb="Cannot initialize GeneralName from ASN.1 data.",_b=`${vb} Unsupported string format in use.`,Eb=`${vb} Value doesn't match to GUID regular expression.`,xb=/^([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})$/i,Sb="1.3.6.1.4.1.311.25.1",Ib="1.3.6.1.4.1.311.20.2.3",Tb="dns",Cb="dn",Rb="email",kb="ip",Nb="url",Ob="guid",Bb="upn",Pb="id";class Lb extends ub{constructor(...e){let t;if(2===e.length)switch(e[0]){case Cb:{const n=new Ab(e[1]).toArrayBuffer(),r=Np.parse(n,Qp);t=new Gp({directoryName:r});break}case Tb:t=new Gp({dNSName:e[1]});break;case Rb:t=new Gp({rfc822Name:e[1]});break;case Ob:{const n=new RegExp(xb,"i").exec(e[1]);if(!n)throw new Error("Cannot parse GUID value. Value doesn't match to regular expression");const r=n.slice(1).map((e,t)=>t<3?_l.U$.ToHex(new Uint8Array(_l.U$.FromHex(e)).reverse()):e).join("");t=new Gp({otherName:new zp({typeId:Sb,value:Np.serialize(new Ku(_l.U$.FromHex(r)))})});break}case kb:t=new Gp({iPAddress:e[1]});break;case Pb:t=new Gp({registeredID:e[1]});break;case Bb:t=new Gp({otherName:new zp({typeId:Ib,value:Np.serialize(sp.toASN(e[1]))})});break;case Nb:t=new Gp({uniformResourceIdentifier:e[1]});break;default:throw new Error("Cannot create GeneralName. Unsupported type of the name")}else t=_l._H.isBufferSource(e[0])?Np.parse(e[0],Gp):e[0];super(t)}onInit(e){if(null!=e.dNSName)this.type=Tb,this.value=e.dNSName;else if(null!=e.rfc822Name)this.type=Rb,this.value=e.rfc822Name;else if(null!=e.iPAddress)this.type=kb,this.value=e.iPAddress;else if(null!=e.uniformResourceIdentifier)this.type=Nb,this.value=e.uniformResourceIdentifier;else if(null!=e.registeredID)this.type=Pb,this.value=e.registeredID;else if(null!=e.directoryName)this.type=Cb,this.value=new Ab(e.directoryName).toString();else{if(null==e.otherName)throw new Error(_b);if(e.otherName.typeId===Sb){this.type=Ob;const t=Np.parse(e.otherName.value,Ku),n=new RegExp(xb,"i").exec(_l.U$.ToHex(t));if(!n)throw new Error(Eb);this.value=n.slice(1).map((e,t)=>t<3?_l.U$.ToHex(new Uint8Array(_l.U$.FromHex(e)).reverse()):e).join("-")}else{if(e.otherName.typeId!==Ib)throw new Error(_b);this.type=Bb,this.value=Np.parse(e.otherName.value,Fp).toString()}}}toJSON(){return{type:this.type,value:this.value}}toTextObject(){let e;switch(this.type){case Cb:case Tb:case Ob:case kb:case Pb:case Bb:case Nb:e=this.type.toUpperCase();break;case Rb:e="Email";break;default:throw new Error("Unsupported GeneralName type")}let t=this.value;return this.type===Pb&&(t=lb.toString(t)),new cb(e,void 0,t)}}class Db extends ub{constructor(e){let t;if(e instanceof od)t=e;else if(Array.isArray(e)){const n=[];for(const t of e)if(t instanceof Gp)n.push(t);else{const e=Np.parse(new Lb(t.type,t.value).rawData,Gp);n.push(e)}t=new od(n)}else{if(!_l._H.isBufferSource(e))throw new Error("Cannot initialize GeneralNames. Incorrect incoming arguments");t=Np.parse(e,od)}super(t)}onInit(e){const t=[];for(const n of e){let e=null;try{e=new Lb(n)}catch{continue}t.push(e)}this.items=t}toJSON(){return this.items.map(e=>e.toJSON())}toTextObject(){const e=super.toTextObjectEmpty();for(const t of this.items){const n=t.toTextObject();let r=e[n[cb.NAME]];Array.isArray(r)||(r=[],e[n[cb.NAME]]=r),r.push(n)}return e}}Db.NAME="GeneralNames";const Ub="-{5}",Fb="\\n",Mb="\\n",jb=`${Ub}BEGIN ([^${Fb}]+(?=${Ub}))${Ub}${Mb}(?:((?:[^:${Fb}]+: (?:[^${Fb}]+${Mb}(?: +[^${Fb}]+${Mb})*))+))?${Mb}?((?:[a-zA-Z0-9=+/]+${Mb})+)${Ub}END \\1${Ub}`;class Hb{static isPem(e){return"string"==typeof e&&new RegExp(jb,"g").test(e)}static decodeWithHeaders(e){e=e.replace(/\r/g,"");const t=new RegExp(jb,"g"),n=[];let r=null;for(;r=t.exec(e);){const e=r[3].replace(new RegExp(`[${Fb}]+`,"g"),""),t={type:r[1],headers:[],rawData:_l.U$.FromBase64(e)},i=r[2];if(i){const e=i.split(new RegExp(Mb,"g"));let n=null;for(const r of e){const[e,i]=r.split(/:(.*)/);if(void 0===i){if(!n)throw new Error("Cannot parse PEM string. Incorrect header value");n.value+=e.trim()}else n&&t.headers.push(n),n={key:e,value:i.trim()}}n&&t.headers.push(n)}n.push(t)}return n}static decode(e){return this.decodeWithHeaders(e).map(e=>e.rawData)}static decodeFirst(e){const t=this.decode(e);if(!t.length)throw new RangeError("PEM string doesn't contain any objects");return t[0]}static encode(e,t){if(Array.isArray(e)){const n=new Array;return t?e.forEach(e=>{if(!_l._H.isBufferSource(e))throw new TypeError("Cannot encode array of BufferSource in PEM format. Not all items of the array are BufferSource");n.push(this.encodeStruct({type:t,rawData:_l._H.toArrayBuffer(e)}))}):e.forEach(e=>{if(!("type"in e))throw new TypeError("Cannot encode array of PemStruct in PEM format. Not all items of the array are PemStrut");n.push(this.encodeStruct(e))}),n.join("\n")}if(!t)throw new Error("Required argument 'tag' is missed");return this.encodeStruct({type:t,rawData:_l._H.toArrayBuffer(e)})}static encodeStruct(e){var t;const n=e.type.toLocaleUpperCase(),r=[];if(r.push(`-----BEGIN ${n}-----`),null===(t=e.headers)||void 0===t?void 0:t.length){for(const t of e.headers)r.push(`${t.key}: ${t.value}`);r.push("")}const i=_l.U$.ToBase64(e.rawData);let s,o=0;const a=Array();for(;o<i.length&&(i.length-o<64?s=i.substring(o):(s=i.substring(o,o+64),o+=64),0!==s.length)&&(a.push(s),!(s.length<64)););return r.push(...a),r.push(`-----END ${n}-----`),r.join("\n")}}Hb.CertificateTag="CERTIFICATE",Hb.CrlTag="CRL",Hb.CertificateRequestTag="CERTIFICATE REQUEST",Hb.PublicKeyTag="PUBLIC KEY",Hb.PrivateKeyTag="PRIVATE KEY";class Wb extends ub{static isAsnEncoded(e){return _l._H.isBufferSource(e)||"string"==typeof e}static toArrayBuffer(e){if("string"==typeof e){if(Hb.isPem(e))return Hb.decode(e)[0];if(_l.U$.isHex(e))return _l.U$.FromHex(e);if(_l.U$.isBase64(e))return _l.U$.FromBase64(e);if(_l.U$.isBase64Url(e))return _l.U$.FromBase64Url(e);throw new TypeError("Unsupported format of 'raw' argument. Must be one of DER, PEM, HEX, Base64, or Base4Url")}{const t=_l.U$.ToBinary(e);return Hb.isPem(t)?Hb.decode(t)[0]:_l.U$.isHex(t)?_l.U$.FromHex(t):_l.U$.isBase64(t)?_l.U$.FromBase64(t):_l.U$.isBase64Url(t)?_l.U$.FromBase64Url(t):_l._H.toArrayBuffer(e)}}constructor(...e){Wb.isAsnEncoded(e[0])?super(Wb.toArrayBuffer(e[0]),e[1]):super(e[0])}toString(e="pem"){return"pem"===e?Hb.encode(this.rawData,this.tag):super.toString(e)}}class Qb extends Wb{constructor(e){Wb.isAsnEncoded(e)?super(e,wf):super(e),this.tag=Hb.PublicKeyTag}async export(...e){let t,n=["verify"],r={hash:"SHA-256",...this.algorithm};return e.length>1?(r=e[0]||r,n=e[1]||n,t=e[2]||gb.get()):t=e[0]||gb.get(),t.subtle.importKey("spki",this.rawData,r,!0,n)}onInit(e){const t=_w.resolve(Ty),n=this.algorithm=t.toWebAlgorithm(e.algorithm);switch(e.algorithm.algorithm){case bm:{const t=Np.parse(e.subjectPublicKey,Xm),r=_l._H.toUint8Array(t.modulus);n.publicExponent=_l._H.toUint8Array(t.publicExponent),n.modulusLength=(r[0]?r:r.slice(1)).byteLength<<3;break}}}async getThumbprint(...e){var t;let n,r="SHA-1";return e.length>=1&&!(null===(t=e[0])||void 0===t?void 0:t.subtle)?(r=e[0]||r,n=e[1]||gb.get()):n=e[0]||gb.get(),await n.subtle.digest(r,this.rawData)}async getKeyIdentifier(e){e||(e=gb.get());const t=Np.parse(this.rawData,wf);return await e.subtle.digest("SHA-1",t.subjectPublicKey)}toTextObject(){const e=this.toTextObjectEmpty(),t=Np.parse(this.rawData,wf);return e.Algorithm=hb.serializeAlgorithm(t.algorithm),t.algorithm.algorithm===tm?e["EC Point"]=t.subjectPublicKey:e["Raw Data"]=t.subjectPublicKey,e}}class Vb{static register(e,t){this.items.set(e,t)}static create(e){const t=new pb(e),n=this.items.get(t.type);return n?new n(e):t}}Vb.items=new Map;const zb="crypto.signatureFormatter";class qb extends Wb{constructor(e){Wb.isAsnEncoded(e)?super(e,If):super(e),this.tag=Hb.CertificateTag}onInit(e){const t=e.tbsCertificate;this.tbs=Np.serialize(t),this.serialNumber=_l.U$.ToHex(t.serialNumber),this.subjectName=new Ab(t.subject),this.subject=new Ab(t.subject).toString(),this.issuerName=new Ab(t.issuer),this.issuer=this.issuerName.toString();const n=_w.resolve(Ty);this.signatureAlgorithm=n.toWebAlgorithm(e.signatureAlgorithm),this.signature=e.signatureValue;const r=t.validity.notBefore.utcTime||t.validity.notBefore.generalTime;if(!r)throw new Error("Cannot get 'notBefore' value");this.notBefore=r;const i=t.validity.notAfter.utcTime||t.validity.notAfter.generalTime;if(!i)throw new Error("Cannot get 'notAfter' value");this.notAfter=i,this.extensions=[],t.extensions&&(this.extensions=t.extensions.map(e=>Vb.create(Np.serialize(e)))),this.publicKey=new Qb(t.subjectPublicKeyInfo)}getExtension(e){for(const t of this.extensions)if("string"==typeof e){if(t.type===e)return t}else if(t instanceof e)return t;return null}getExtensions(e){return this.extensions.filter(t=>"string"==typeof e?t.type===e:t instanceof e)}async verify(e={},t=gb.get()){let n,r;const i=e.publicKey;try{if(i)if("publicKey"in i)n={...i.publicKey.algorithm,...this.signatureAlgorithm},r=await i.publicKey.export(n,["verify"]);else if(i instanceof Qb)n={...i.algorithm,...this.signatureAlgorithm},r=await i.export(n,["verify"]);else if(_l._H.isBufferSource(i)){const e=new Qb(i);n={...e.algorithm,...this.signatureAlgorithm},r=await e.export(n,["verify"])}else n={...i.algorithm,...this.signatureAlgorithm},r=i;else n={...this.publicKey.algorithm,...this.signatureAlgorithm},r=await this.publicKey.export(n,["verify"],t)}catch(e){return!1}const s=_w.resolveAll(zb).reverse();let o=null;for(const e of s)if(o=e.toWebSignature(n,this.signature),o)break;if(!o)throw Error("Cannot convert ASN.1 signature value to WebCrypto format");const a=await t.subtle.verify(this.signatureAlgorithm,r,o,this.tbs);if(e.signatureOnly)return a;{const t=(e.date||new Date).getTime();return a&&this.notBefore.getTime()<t&&t<this.notAfter.getTime()}}async getThumbprint(...e){let t,n="SHA-1";return e[0]&&(e[0].subtle?t=e[0]:(n=e[0]||n,t=e[1])),null!=t||(t=gb.get()),await t.subtle.digest(n,this.rawData)}async isSelfSigned(e=gb.get()){return this.subject===this.issuer&&await this.verify({signatureOnly:!0},e)}toTextObject(){const e=this.toTextObjectEmpty(),t=Np.parse(this.rawData,If),n=t.tbsCertificate,r=new cb("",{Version:`${Ef[n.version]} (${n.version})`,"Serial Number":n.serialNumber,"Signature Algorithm":hb.serializeAlgorithm(n.signature),Issuer:this.issuer,Validity:new cb("",{"Not Before":n.validity.notBefore.getTime(),"Not After":n.validity.notAfter.getTime()}),Subject:this.subject,"Subject Public Key Info":this.publicKey});if(n.issuerUniqueID&&(r["Issuer Unique ID"]=n.issuerUniqueID),n.subjectUniqueID&&(r["Subject Unique ID"]=n.subjectUniqueID),this.extensions.length){const e=new cb("");for(const t of this.extensions){const n=t.toTextObject();e[n[cb.NAME]]=n}r.Extensions=e}return e.Data=r,e.Signature=new cb("",{Algorithm:hb.serializeAlgorithm(t.signatureAlgorithm),"":t.signatureValue}),e}}qb.NAME="Certificate";class Gb extends pb{constructor(...e){if(_l._H.isBufferSource(e[0]))super(e[0]);else if("string"==typeof e[0]){const t=new nd({keyIdentifier:new td(_l.U$.FromHex(e[0]))});super(ed,e[1],Np.serialize(t))}else{const t=e[0],n=t.name instanceof Db?Np.parse(t.name.rawData,od):t.name,r=new nd({authorityCertIssuer:n,authorityCertSerialNumber:_l.U$.FromHex(t.serialNumber)});super(ed,e[1],Np.serialize(r))}}static async create(e,t=!1,n=gb.get()){if(e instanceof qb||fb.isCryptoKey(e)){const r=e instanceof qb?await e.publicKey.export(n):e,i=await n.subtle.exportKey("spki",r),s=new Qb(i),o=await s.getKeyIdentifier(n);return new Gb(_l.U$.ToHex(o),t)}return new Gb(e,t)}onInit(e){super.onInit(e);const t=Np.parse(e.extnValue,nd);t.keyIdentifier&&(this.keyId=_l.U$.ToHex(t.keyIdentifier)),t.authorityCertIssuer&&t.authorityCertSerialNumber&&(this.certId={name:t.authorityCertIssuer,serialNumber:_l.U$.ToHex(t.authorityCertSerialNumber)})}toTextObject(){const e=this.toTextObjectWithoutValue(),t=Np.parse(this.value,nd);return t.authorityCertIssuer&&(e["Authority Issuer"]=new Db(t.authorityCertIssuer).toTextObject()),t.authorityCertSerialNumber&&(e["Authority Serial Number"]=t.authorityCertSerialNumber),t.keyIdentifier&&(e[""]=t.keyIdentifier),e}}Gb.NAME="Authority Key Identifier";class Kb extends pb{constructor(...e){if(_l._H.isBufferSource(e[0])){super(e[0]);const t=Np.parse(this.value,id);this.ca=t.cA,this.pathLength=t.pathLenConstraint}else{const t=new id({cA:e[0],pathLenConstraint:e[1]});super(rd,e[2],Np.serialize(t)),this.ca=e[0],this.pathLength=e[1]}}toTextObject(){const e=this.toTextObjectWithoutValue();return this.ca&&(e.CA=this.ca),void 0!==this.pathLength&&(e["Path Length"]=this.pathLength),e}}var Xb,Yb;Kb.NAME="Basic Constraints",function(e){e.serverAuth="1.3.6.1.5.5.7.3.1",e.clientAuth="1.3.6.1.5.5.7.3.2",e.codeSigning="1.3.6.1.5.5.7.3.3",e.emailProtection="1.3.6.1.5.5.7.3.4",e.timeStamping="1.3.6.1.5.5.7.3.8",e.ocspSigning="1.3.6.1.5.5.7.3.9"}(Xb||(Xb={}));class Jb extends pb{constructor(...e){if(_l._H.isBufferSource(e[0])){super(e[0]);const t=Np.parse(this.value,Bd);this.usages=t.map(e=>e)}else{const t=new Bd(e[0]);super(Od,e[1],Np.serialize(t)),this.usages=e[0]}}toTextObject(){const e=this.toTextObjectWithoutValue();return e[""]=this.usages.map(e=>lb.toString(e)).join(", "),e}}Jb.NAME="Extended Key Usages",function(e){e[e.digitalSignature=1]="digitalSignature",e[e.nonRepudiation=2]="nonRepudiation",e[e.keyEncipherment=4]="keyEncipherment",e[e.dataEncipherment=8]="dataEncipherment",e[e.keyAgreement=16]="keyAgreement",e[e.keyCertSign=32]="keyCertSign",e[e.cRLSign=64]="cRLSign",e[e.encipherOnly=128]="encipherOnly",e[e.decipherOnly=256]="decipherOnly"}(Yb||(Yb={}));class Zb extends pb{constructor(...e){if(_l._H.isBufferSource(e[0])){super(e[0]);const t=Np.parse(this.value,Gd);this.usages=t.toNumber()}else{const t=new Gd(e[0]);super(Vd,e[1],Np.serialize(t)),this.usages=e[0]}}toTextObject(){const e=this.toTextObjectWithoutValue(),t=Np.parse(this.value,Gd);return e[""]=t.toJSON().join(", "),e}}Zb.NAME="Key Usages";class $b extends pb{constructor(...e){if(_l._H.isBufferSource(e[0])){super(e[0]);const t=Np.parse(this.value,lf);this.keyId=_l.U$.ToHex(t)}else{const t="string"==typeof e[0]?_l.U$.FromHex(e[0]):e[0],n=new lf(t);super(cf,e[1],Np.serialize(n)),this.keyId=_l.U$.ToHex(t)}}static async create(e,t=!1,n=gb.get()){let r;r=e instanceof Qb?e.rawData:"publicKey"in e?e.publicKey.rawData:_l._H.isBufferSource(e)?e:await n.subtle.exportKey("spki",e);const i=new Qb(r),s=await i.getKeyIdentifier(n);return new $b(_l.U$.ToHex(s),t)}toTextObject(){const e=this.toTextObjectWithoutValue(),t=Np.parse(this.value,lf);return e[""]=t,e}}$b.NAME="Subject Key Identifier";class eA extends pb{constructor(...e){_l._H.isBufferSource(e[0])?super(e[0]):super(nf,e[1],new Db(e[0]||[]).rawData)}onInit(e){super.onInit(e);const t=Np.parse(e.extnValue,rf);this.names=new Db(t)}toTextObject(){const e=this.toTextObjectWithoutValue(),t=this.names.toTextObject();for(const n in t)e[n]=t[n];return e}}eA.NAME="Subject Alternative Name";class tA extends pb{constructor(...e){var t;if(_l._H.isBufferSource(e[0])){super(e[0]);const t=Np.parse(this.value,wd);this.policies=t.map(e=>e.policyIdentifier)}else{const n=e[0],r=null!==(t=e[1])&&void 0!==t&&t,i=new wd(n.map(e=>new md({policyIdentifier:e})));super(hd,r,Np.serialize(i)),this.policies=n}}toTextObject(){const e=this.toTextObjectWithoutValue();return e.Policy=this.policies.map(e=>new cb("",{},lb.toString(e))),e}}tA.NAME="Certificate Policies",Vb.register(hd,tA);class nA extends ub{constructor(...e){let t;if(_l._H.isBufferSource(e[0]))t=_l._H.toArrayBuffer(e[0]);else{const n=e[0],r=Array.isArray(e[1])?e[1].map(e=>_l._H.toArrayBuffer(e)):[];t=Np.serialize(new sf({type:n,values:r}))}super(t,sf)}onInit(e){this.type=e.type,this.values=e.values}toTextObject(){const e=this.toTextObjectWithoutValue();return e.Value=this.values.map(e=>new cb("",{"":e})),e}toTextObjectWithoutValue(){const e=this.toTextObjectEmpty();return e[cb.NAME]===nA.NAME&&(e[cb.NAME]=lb.toString(this.type)),e}}nA.NAME="Attribute";class rA extends nA{constructor(...e){var t;if(_l._H.isBufferSource(e[0]))super(e[0]);else{const t=new my({printableString:e[0]});super(Jw,[Np.serialize(t)])}null!==(t=this.password)&&void 0!==t||(this.password="")}onInit(e){if(super.onInit(e),this.values[0]){const e=Np.parse(this.values[0],my);this.password=e.toString()}}toTextObject(){const e=this.toTextObjectWithoutValue();return e[cb.VALUE]=this.password,e}}rA.NAME="Challenge Password";class iA extends nA{constructor(...e){var t;if(_l._H.isBufferSource(e[0]))super(e[0]);else{const t=e[0],n=new _f;for(const e of t)n.push(Np.parse(e.rawData,vf));super(Zw,[Np.serialize(n)])}null!==(t=this.items)&&void 0!==t||(this.items=[])}onInit(e){if(super.onInit(e),this.values[0]){const e=Np.parse(this.values[0],_f);this.items=e.map(e=>Vb.create(Np.serialize(e)))}}toTextObject(){const e=this.toTextObjectWithoutValue(),t=this.items.map(e=>e.toTextObject());for(const n of t)e[n[cb.NAME]]=n;return e}}iA.NAME="Extensions";class sA{static register(e,t){this.items.set(e,t)}static create(e){const t=new nA(e),n=this.items.get(t.type);return n?new n(e):t}}sA.items=new Map;let oA=class{toAsnAlgorithm(e){if("rsassa-pkcs1-v1_5"===e.name.toLowerCase()){if(!e.hash)return new mf({algorithm:bm,parameters:null});switch(e.hash.name.toLowerCase()){case"sha-1":return new mf({algorithm:Sm,parameters:null});case"sha-256":return new mf({algorithm:Tm,parameters:null});case"sha-384":return new mf({algorithm:Cm,parameters:null});case"sha-512":return new mf({algorithm:Rm,parameters:null})}}return null}toWebAlgorithm(e){switch(e.algorithm){case bm:return{name:"RSASSA-PKCS1-v1_5"};case Sm:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-1"}};case Tm:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case Cm:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}};case Rm:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}}}return null}};oA=Ym([xw()],oA),_w.registerSingleton(Iy,oA);class aA{addPadding(e,t){const n=_l._H.toUint8Array(t),r=new Uint8Array(e);return r.set(n,e-n.length),r}removePadding(e,t=!1){let n=_l._H.toUint8Array(e);for(let e=0;e<n.length;e++)if(n[e]){n=n.slice(e);break}if(t&&n[0]>127){const e=new Uint8Array(n.length+1);return e.set(n,1),e.buffer}return n.buffer}toAsnSignature(e,t){if("ECDSA"===e.name){const n=e.namedCurve,r=aA.namedCurveSize.get(n)||aA.defaultNamedCurveSize,i=new wm,s=_l._H.toUint8Array(t);return i.r=this.removePadding(s.slice(0,r),!0),i.s=this.removePadding(s.slice(r,r+r),!0),Np.serialize(i)}return null}toWebSignature(e,t){if("ECDSA"===e.name){const n=Np.parse(t,wm),r=e.namedCurve,i=aA.namedCurveSize.get(r)||aA.defaultNamedCurveSize,s=this.addPadding(i,this.removePadding(n.r)),o=this.addPadding(i,this.removePadding(n.s));return(0,_l.kg)(s,o)}return null}}aA.namedCurveSize=new Map,aA.defaultNamedCurveSize=32;const cA="1.3.101.110",lA="1.3.101.111",hA="1.3.101.112",uA="1.3.101.113";let pA=class{toAsnAlgorithm(e){let t=null;switch(e.name.toLowerCase()){case"eddsa":switch(e.namedCurve.toLowerCase()){case"ed25519":t=hA;break;case"ed448":t=uA}break;case"ecdh-es":switch(e.namedCurve.toLowerCase()){case"x25519":t=cA;break;case"x448":t=lA}}return t?new mf({algorithm:t}):null}toWebAlgorithm(e){switch(e.algorithm){case hA:return{name:"EdDSA",namedCurve:"Ed25519"};case uA:return{name:"EdDSA",namedCurve:"Ed448"};case cA:return{name:"ECDH-ES",namedCurve:"X25519"};case lA:return{name:"ECDH-ES",namedCurve:"X448"}}return null}};pA=Ym([xw()],pA),_w.registerSingleton(Iy,pA);class dA extends Wb{constructor(e){Wb.isAsnEncoded(e)?super(e,Sy):super(e),this.tag=Hb.CertificateRequestTag}onInit(e){this.tbs=Np.serialize(e.certificationRequestInfo),this.publicKey=new Qb(e.certificationRequestInfo.subjectPKInfo);const t=_w.resolve(Ty);this.signatureAlgorithm=t.toWebAlgorithm(e.signatureAlgorithm),this.signature=e.signature,this.attributes=e.certificationRequestInfo.attributes.map(e=>sA.create(Np.serialize(e)));const n=this.getAttribute(Zw);this.extensions=[],n instanceof iA&&(this.extensions=n.items),this.subjectName=new Ab(e.certificationRequestInfo.subject),this.subject=this.subjectName.toString()}getAttribute(e){for(const t of this.attributes)if(t.type===e)return t;return null}getAttributes(e){return this.attributes.filter(t=>t.type===e)}getExtension(e){for(const t of this.extensions)if(t.type===e)return t;return null}getExtensions(e){return this.extensions.filter(t=>t.type===e)}async verify(e=gb.get()){const t={...this.publicKey.algorithm,...this.signatureAlgorithm},n=await this.publicKey.export(t,["verify"],e),r=_w.resolveAll(zb).reverse();let i=null;for(const e of r)if(i=e.toWebSignature(t,this.signature),i)break;if(!i)throw Error("Cannot convert WebCrypto signature value to ASN.1 format");return await e.subtle.verify(this.signatureAlgorithm,n,i,this.tbs)}toTextObject(){const e=this.toTextObjectEmpty(),t=Np.parse(this.rawData,Sy),n=t.certificationRequestInfo,r=new cb("",{Version:`${Ef[n.version]} (${n.version})`,Subject:this.subject,"Subject Public Key Info":this.publicKey});if(this.attributes.length){const e=new cb("");for(const t of this.attributes){const n=t.toTextObject();e[n[cb.NAME]]=n}r.Attributes=e}return e.Data=r,e.Signature=new cb("",{Algorithm:hb.serializeAlgorithm(t.signatureAlgorithm),"":t.signature}),e}}var fA;dA.NAME="PKCS#10 Certificate Request",function(e){e[e.unspecified=0]="unspecified",e[e.keyCompromise=1]="keyCompromise",e[e.cACompromise=2]="cACompromise",e[e.affiliationChanged=3]="affiliationChanged",e[e.superseded=4]="superseded",e[e.cessationOfOperation=5]="cessationOfOperation",e[e.certificateHold=6]="certificateHold",e[e.removeFromCRL=8]="removeFromCRL",e[e.privilegeWithdrawn=9]="privilegeWithdrawn",e[e.aACompromise=10]="aACompromise"}(fA||(fA={})),Vb.register(rd,Kb),Vb.register(Od,Jb),Vb.register(Vd,Zb),Vb.register(cf,$b),Vb.register(ed,Gb),Vb.register(nf,eA),sA.register(Jw,rA),sA.register(Zw,iA),_w.registerSingleton(zb,class{toAsnSignature(e,t){return _l._H.toArrayBuffer(t)}toWebSignature(e,t){return _l._H.toArrayBuffer(t)}}),_w.registerSingleton(zb,aA),aA.namedCurveSize.set("P-256",32),aA.namedCurveSize.set("K-256",32),aA.namedCurveSize.set("P-384",48),aA.namedCurveSize.set("P-521",66);const gA=/-{5}(BEGIN|END) .*-{5}/gm,mA="pages/pages.jsonl",wA="pages/extraPages.jsonl",yA="datapackage.json",bA="datapackage-digest.json",AA="webarchive.yaml";class vA{store;file;isRoot;waczname;constructor(e,t,n=!0){this.file=t,this.waczname=t.waczname||"",this.store=e,this.isRoot=n}async loadFileFromWACZ(e,t){return this.store.loadFileFromWACZ?await this.store.loadFileFromWACZ(this.file,e,t):await this.file.loadFile(e,t)}async load(){let e,t=null;return this.file.containsFile(bA)&&(t=await this.loadDigestData(bA)),this.file.containsFile(yA)?e=await this.loadPackage(yA,t):this.file.containsFile(AA)&&(e=await this.loadOldPackageYAML(AA)),e||{}}async loadTextFileFromWACZ(e,t=""){const{reader:n,hasher:r}=await this.loadFileFromWACZ(e,{computeHash:!!t});if(!n)return"";const i=(new TextDecoder).decode(await n.readFully());return t&&r&&await this.store.addVerifyData(this.waczname,e,t,r.getHash()),i}async loadDigestData(e){try{const t=JSON.parse(await this.loadTextFileFromWACZ(e));let n;t.path===yA&&t.hash&&(n=t.hash);const r=this.store,i=this.isRoot?"":this.waczname+":";if(!t.signedData||t.signedData.hash!==n)return void await r.addVerifyData(i,"signature","");await r.addVerifyData(i,"datapackageHash",n);const s=await async function({hash:e,signature:t,publicKey:n,domain:r,domainCert:i,created:s,software:o}){let a;const c=[],l=(0,vl.toByteArray)(t);let h;if(i&&r&&!n){const e=i.split("\n\n"),t=(0,vl.toByteArray)(e[0].replace(gA,"").replace(/\s/gm,"")),n=Q(await crypto.subtle.digest("SHA-256",t));c.push({id:"certFingerprint",expected:n,matched:null});const r=new qb(t);h=await r.publicKey.export();const s=(0,vl.fromByteArray)(new Uint8Array(r.publicKey.rawData));c.push({id:"publicKey",expected:s,matched:null}),r.subject&&r.subject.startsWith("CN=")&&(a=r.subject.substring(3))}else{const e={name:"ECDSA",namedCurve:"P-384"};c.push({id:"publicKey",expected:n,matched:null}),h=await crypto.subtle.importKey("spki",(0,vl.toByteArray)(n),e,!0,["verify"])}const u=new TextEncoder,p=await crypto.subtle.verify({name:"ECDSA",hash:"SHA-256"},h,l,u.encode(e));return c.push({id:"signature",expected:!0,matched:p}),s&&c.push({id:"created",expected:s,matched:null}),o&&c.push({id:"software",expected:o,matched:null}),r&&c.push({id:"domain",expected:r,matched:a}),c}(t.signedData);return await r.addVerifyDataList(i,s),n}catch(e){console.warn(e)}}async loadPackage(e,t){const n=await this.loadTextFileFromWACZ(e,t),r=JSON.parse(n);switch(this.isRoot&&void 0!==r.config&&this.store.initConfig(r.config),r.profile){case"data-package":case"wacz-package":case void 0:case null:return await this.loadLeafWACZPackage(r);case"multi-wacz-package":return await this.loadMultiWACZPackage(r);default:throw new Error(`Unknown package profile: ${r.profile}`)}}async loadMultiWACZPackage(e){return this.file.markAsMultiWACZ(),await this.store.loadWACZFiles(e,this.file),this.store.maxFallbackLookups=-1,e}async loadLeafWACZPackage(e){const t=e.metadata||{};let n=null;for(const t of e.resources)t.path===mA?(n=t.hash,await this.store.addVerifyData(this.waczname,t.path,t.hash)):(t.path.endsWith(".idx")||t.path.endsWith(".cdx"))&&await this.store.addVerifyData(this.waczname,t.path,t.hash);return this.file.containsFile(mA)&&(await this.loadPages(mA,n)).hasText&&(this.store.textIndex=t.textIndex=mA),this.file.containsFile(wA)&&(this.store.textIndex=t.textIndex=wA),t}async loadOldPackageYAML(e){const t=await this.loadTextFileFromWACZ(e),n=ol.load(t),r={desc:n.desc,title:n.title};n.textIndex&&(r.textIndex=n.textIndex,n.config||(n.config={}),n.config.textIndex=n.textIndex),this.isRoot&&void 0!==n.config&&this.store.initConfig(n.config),r.title||(r.title=this.store.config.sourceName);const i=n.pages||[];i?.length&&await this.store.addPages(i);const s=n.pageLists||[];return s?.length&&await this.store.addCuratedPageLists(s,"pages","show"),r}async loadPages(e=mA,t=null){const{reader:n,hasher:r}=await this.loadFileFromWACZ(e,{unzip:!0,computeHash:!0});if(!n)return[];let i=null,s=[];for await(const e of n.iterLines()){const t=JSON.parse(e);this.waczname&&(t.wacz=this.waczname),i?(s.push(t),500===s.length&&(await this.store.addPages(s),s=[])):i=t}return s.length&&await this.store.addPages(s),r&&t&&await this.store.addVerifyData(this.waczname,e,t,r.getHash()),i}}class _A{loader;loadId=null;loadUrl;constructor(e,t,n=null){this.loader=e,this.loadId=n,this.loadUrl=t.loadUrl}async load(e){const t=this.loader;e.fullConfig&&t.arrayBuffer&&t.arrayBuffer.byteLength<=B&&(e.fullConfig.extra||(e.fullConfig.extra={}),e.fullConfig.extra.arrayBuffer=t.arrayBuffer);const n=this.loadUrl;return await e.addNewWACZ({name:"default",path:n,loader:t})}}class EA{loader;loadId=null;config;constructor(e,t,n=null){this.config=t,this.loadId=n,this.loader=e}async load(e,t=null,n=0){const r=new Ma({loader:this.loader});await r.init();const i=r.zipreader,s=new vA(e,r),o=await s.load();let a=0;const c=(e,r,i)=>{i+=a,t&&n&&t(Math.round(100*i/n),null,i,n)};for(const t of r.iterContainedFiles()){const n=i.getCompressedSize(t);(t.endsWith(".warc.gz")||t.endsWith(".warc"))&&await this.loadWARC(e,i,t,c,n),a+=n}return o||{}}async loadWARC(e,t,n,r,i){const{reader:s}=await t.loadFile(n,{unzip:!0});if(!s)throw new Error("no WARC found");const o=new cr(s,null,n);return o.detectPages=!1,await o.load(e,r,i)}}class xA{response;constructor(e){this.response=e}async load(e){try{return await e.loadFromJSON(this.response)}catch(e){return{}}}}class SA{prefix;proxyPathOnly;isLive;archivePrefix;archiveMod;cloneResponse;allowBody;hostProxy;hostProxyOnly;messageOnProxyErrors;constructor(e,{cloneResponse:t=!1,allowBody:n=!1,hostProxyOnly:r=!1}={}){if(e=e||{},this.prefix=e.prefix||"",this.proxyPathOnly=e.proxyPathOnly||!1,this.isLive=void 0===e.isLive||e.isLive,this.archivePrefix=e.archivePrefix||"",this.archiveMod=e.archiveMod||"id_",this.cloneResponse=t,this.allowBody=n||this.isLive||!!e.noPostToGet,this.messageOnProxyErrors=e.messageOnProxyErrors||!1,this.hostProxy=e.hostProxy,this.hostProxy instanceof Array){const e={};for(const t of this.hostProxy)e[t.host]=t;this.hostProxy=e}this.hostProxyOnly=r}async getAllPages(){return[]}getFetchUrl(e,t,n){let r;if(this.hostProxy){r=new URL(e);const t=this.hostProxy[r.host];if(t)return n.set("X-Proxy-Host",r.host),t.prefix+(t.pathOnly?r.pathname+r.search:e)}return this.hostProxyOnly?null:this.proxyPathOnly?(r||(r=new URL(e)),this.prefix+r.pathname+r.search):this.isLive||!t.timestamp&&!this.archivePrefix?this.prefix+e:this.prefix+this.archivePrefix+t.timestamp+this.archiveMod+"/"+e}async getResource(e,t){const{headers:n,credentials:r,url:i}=e.prepareProxyRequest(t,!0),s=this.getFetchUrl(i,e,n);if(!s)return null;let o=null;const a="POST"===e.method||"PUT"===e.method||"DELETE"===e.method;a&&(this.allowBody?o=await e.getBody():this.sendProxyError("post-request-attempt",i,e.method));let c=await fetch(s,{method:e.method,body:o,headers:n,credentials:r,mode:"cors",redirect:"follow"}),l=!1;a&&c.status>=400?this.sendProxyError("post-request-failed",i,e.method,c.status):429===c.status&&this.sendProxyError("rate-limited",i,e.method,c.status),c.status>400&&404!==c.status&&["","document","iframe"].includes(e.destination)&&(c=ua(i,c.status),l=!0);try{const e=new URL(s,self.location.href).href;if(c.ok&&c.url&&c.url!==e){const e=c.url.indexOf("/http"),t=c.url.slice(e+1);i!==t&&(c=Response.redirect(t))}}catch(e){}let h=null;this.cloneResponse&&(h=c.clone());const u=Lt.fromResponse({url:i,response:c,date:new Date,noRW:l,isLive:this.isLive,archivePrefix:this.archivePrefix});return h&&(u.clonedResponse=h),u}async sendProxyError(e,t,n,r){if(!this.messageOnProxyErrors)return;const i=await self.clients.matchAll({type:"window"});for(const s of i)if(new URL(s.url).searchParams.get("source")===this.prefix){s.postMessage({type:e,url:t,method:n,status:r});break}}async delete(){}}const IA=/^([\w-]+,)*[\w-]+(:\d+)?,?\)\//;class TA extends ai{config;waczfiles;waczNameForHash;ziploadercache;updating;rootSourceType;sourceLoader;externalSource;textIndex;fuzzyUrlRules;pagesQueryUrl="";referrerMap=new Map;notAPage=new Set;maxFallbackLookups=3;totalPages=void 0;preloadResources=[];seedPageWACZs=new Map;constructor(e,t,n="wacz"){if(super(e.dbname,e.noCache),this.config=e,this.waczfiles={},this.waczNameForHash={},this.ziploadercache={},this.updating=null,this.rootSourceType=n,this.sourceLoader=t,this.externalSource=null,this.fuzzyUrlRules=[],this.textIndex=e.metadata?.textIndex||wA,e.extraConfig&&this.initConfig(e.extraConfig),e.metadata){if(this.pagesQueryUrl=e.metadata.pagesQueryUrl||"",e.metadata.preloadResources?.length)for(const{name:t}of e.metadata.preloadResources)this.preloadResources.push(t);"number"==typeof e.metadata.totalPages&&(this.totalPages=e.metadata.totalPages)}}initConfig(e){if(void 0!==e.decodeResponses&&(this.config.decode=!!e.decodeResponses),e.hostProxy&&(this.externalSource=new SA(e,{hostProxyOnly:!0})),e.fuzzy)for(const[t,n]of e.fuzzy){const e=new RegExp(t);this.fuzzyUrlRules.push({match:e,replace:n})}e.textIndex&&(this.textIndex=e.textIndex)}updateHeaders(e){this.sourceLoader&&(this.sourceLoader.headers=e),this.checkUpdates().catch(()=>console.warn("Error updating JSON even after auth update"))}_initDB(e,t,n,r){super._initDB(e,t,n,r),t||(e.createObjectStore("ziplines",{keyPath:["waczname","prefix"]}),e.createObjectStore("waczfiles",{keyPath:"waczname"}),e.createObjectStore("verification",{keyPath:"id"})),2===t&&this.convertV2WACZDB(e,r),3===t&&e.createObjectStore("verification",{keyPath:"id"})}async convertV2WACZDB(e,t){try{const n=await t.objectStore("ziplines").getAll(),r=await t.objectStore("zipEntries").getAll();e.deleteObjectStore("ziplines"),e.deleteObjectStore("zipEntries"),e.createObjectStore("ziplines",{keyPath:["waczname","prefix"]}),e.createObjectStore("waczfiles",{keyPath:"waczname"}),e.createObjectStore("verification",{keyPath:"id"});const i=this.config.loadUrl;for(const e of n)e.waczname=i,t.objectStore("ziplines").put(e);const s=n.length>0?2:1,o=await this.computeFileHash(i,""),a=new Ma({waczname:i,hash:o,path:i,entries:r,indexType:s});t.objectStore("waczfiles").put(a.serialize()),await t.done}catch(e){console.warn(e)}}addWACZFile(e){const t=new Ma(e);return this.waczfiles[e.waczname]=t,this.waczNameForHash[e.hash]=e.waczname,t}async init(){await super.init();const e=await this.db.getAll("waczfiles")||[];for(const t of e)this.addWACZFile({...t,parent:this});for(const[e,t]of Object.entries(this.waczfiles)){t.path=t.path||e;const n=t.path.lastIndexOf("#!/");if(n>0){const e=t.path.slice(0,n),r=this.waczfiles[e];t.parent=r}else"json"!==this.rootSourceType&&(t.loader=this.sourceLoader)}}async close(){super.close(),caches.delete("cache:"+this.name.slice(3))}async clearZipData(){const e=["waczfiles","ziplines"];for(const t of e)await this.db.clear(t)}async addVerifyData(e="",t,n,r=null,i=!1){let s=!1;e&&(t=e+t),r&&(s=n===r,i&&console.log(`verify ${t}: ${s}`)),await this.db.put("verification",{id:t,expected:n,matched:s})}async addVerifyDataList(e,t){const n=this.db.transaction("verification","readwrite");for(const r of t)e&&(r.id=e+r.id),n.store.put(r);try{await n.done}catch(e){console.warn(e)}}async getVerifyInfo(){const e=await this.db.getAll("verification");let t=0,n=0;const r={},i=["domain","created","certFingerprint","software","datapackageHash","publicKey"];for(const s of e)i.includes(s.id)?r[s.id]=s.expected:"signature"===s.id||!0===s.matched?t++:!1===s.matched&&n++;return r.numInvalid=n,r.numValid=t,r}async getVerifyExpected(e){const t=await this.db.get("verification",e);return t?.expected}async clearAll(){await super.clearAll(),await this.clearZipData()}async loadRecordFromSource(e){const{start:t,length:n,path:r,wacz:i}=e.source,s={offset:t,length:n,unzip:!0,computeHash:!0},o=i,{reader:a,hasher:c}=await this.loadFileFromNamedWACZ(o,"archive/"+r,s),l=new lr(a);await this.waczfiles[o].save(this.db);const h=await l.load();return e[Ta]&&h?.respHeaders&&(h.respHeaders["x-wabac-preset-cookie"]=e[Ta]),{remote:h,hasher:c}}async loadIndex(e){if(!this.waczfiles[e])throw new Error("unknown waczfile: "+e);if(this.waczfiles[e].entries||await this.waczfiles[e].init(),this.waczfiles[e].indexType)return{indexType:this.waczfiles[e].indexType,isNew:!1};let t=0;for(const n of this.waczfiles[e].iterContainedFiles())n.endsWith(".cdx")||n.endsWith(".cdxj")?(console.log(`Loading CDX for ${e}`),await this.loadCDX(n,e),t=1):n.endsWith(".idx")&&(console.log(`Loading IDX for ${e}`),await this.loadIDX(n,e),t=2);return this.waczfiles[e].indexType=t,await this.waczfiles[e].save(this.db,!0),{indexType:t,isNew:!0}}async loadCDX(e,t,n,r){const{reader:i,hasher:s}=await this.loadFileFromNamedWACZ(t,e,{computeHash:!0}),o=new ka(i,null,t,{wacz:t}),a=await o.load(this,n,r);if(s){const n=await this.getVerifyExpected(e);n&&this.addVerifyData(t,e,n,s.getHash())}return a}async loadIDX(e,t,n,r){const{reader:i,hasher:s}=await this.loadFileFromNamedWACZ(t,e,{computeHash:!0}),o=[];let a="",c=!0,l=0;for await(const e of i.iterLines()){if(l+=e.length,l===e.length&&e.startsWith("!meta")){const t=e.indexOf(" {");if(t<0){console.warn("Invalid Meta Line: "+e);continue}const n=JSON.parse(e.slice(t));n.filename&&(a=n.filename),"cdxj-gzip-1.0"!==n.format&&console.log(`Unknown CDXJ format "${n.format}", archive may not parse correctly`);continue}let i;if(e.indexOf("\t")>0){const[n,r,s,o]=e.split("\t");i={waczname:t,prefix:n,filename:r,offset:Number(s),length:Number(o),loaded:!1},c=!1}else{const n=e.indexOf(" {");if(n<0){console.log("Invalid Index Line: "+e);continue}const r=e.slice(0,n);let{offset:s,length:o,filename:l,digest:h}=JSON.parse(e.slice(n));c=c&&!IA.test(r),l=l||a,i={waczname:t,prefix:r,filename:l,offset:s,length:o,digest:h,loaded:!1}}n&&r&&n(l/r,l,r),o.push(i)}if(s){const n=await this.getVerifyExpected(e);n&&this.addVerifyData(t,e,n,s.getHash())}const h=this.db.transaction("ziplines","readwrite");for(const e of o)h.store.put(e);try{await h.done}catch(e){console.log("Error loading ziplines index: ",e)}c&&c!==this.waczfiles[t].nonSurt&&(this.waczfiles[t].nonSurt=c,await this.waczfiles[t].save(this.db,!0))}async loadCDXFromIDX(e,t,n=0,r=!1,i=!1){const s=this.waczfiles[e].nonSurt?t:Fe(t),o=r?this.prefixUpperBound(s):s+" 9999",a=IDBKeyRange.upperBound([e,o],!0),c=this.db.transaction("ziplines","readonly"),l=[],h=s.split("?")[0],u=i?s:h;for await(const t of c.store.iterate(a,"prev")){const n=t.value;if(!n||n.waczname!==e)break;const r=n.prefix.split(" ")[0];if(l.unshift(n),!r.startsWith(u))break}for await(const t of c.store.iterate(IDBKeyRange.lowerBound([e,s]),"next")){const n=t.value;if(!n||n.waczname!==e)break;-1===l.indexOf(n)&&l.push(n);break}await c.done;const p=[];u===s&&l.length>6&&n&&l.sort((e,t)=>{const r=e.prefix.split(" ")[1],i=t.prefix.split(" ")[1];if(!r||!i)return 0;const s=Math.abs(H(r).getTime()-n),o=Math.abs(H(i).getTime()-n);return s===o?0:s<o?-1:1});let d=0;for(const t of l){if(t.loaded)continue;const n=e+":"+t.filename+":"+t.offset;let r=this.ziploadercache[n];if(r||(r=this.doCDXLoad(n,t,e),this.ziploadercache[n]=r),p.push(r),++d>6)break}return p.length&&await Promise.allSettled(p),await this.waczfiles[e].save(this.db),p.length>0}async doCDXLoad(e,t,n){try{const e="indexes/"+t.filename,r={offset:t.offset,length:t.length,unzip:!0,computeHash:!!t.digest},{reader:i,hasher:s}=await this.loadFileFromNamedWACZ(n,e,r),o=new ka(i,null,"",{wacz:n});if(await o.load(this),s){const r=s.getHash(),i=`${e}:${t.offset}-${t.length}`;await this.addVerifyData(n,i,t.digest||"",r)}t.loaded=!0,await this.db.put("ziplines",t)}catch(e){await $(e,this.config)||console.warn(e)}finally{delete this.ziploadercache[e]}}async findPageAtUrl(e,t){const n=await this.db.getAllFromIndex("pages","url",e);let r=null,i=Number.MAX_SAFE_INTEGER;for(const e of n){const n=Math.abs(e.ts-t);if(n<1e3)return e;n<i&&(r=e,i=n)}return r}async lookupUrl(e,t,n={waczname:""}){const{waczname:r,noRevisits:i,isPage:s}=n,o=i||s||!1;r&&"local"!==r&&await this.preloadUrlFromWACZ(r,e,t,o);let a=await super.lookupUrl(e,t,n),c=0;if(!a&&n.noRevisits&&this.waczfiles[r]?.reqFiles.length)for(const i of this.waczfiles[r].reqFiles)if(await this.preloadUrlFromWACZ(i,e,t,o)){if(a=await super.lookupUrl(e,t,n),a)return a;if(c++>=12)break}return a}async preloadUrlFromWACZ(e,t,n,r){try{const{indexType:i,isNew:s}=await this.loadIndex(e);switch(i){case 2:if(!await this.loadCDXFromIDX(e,t,n,!1,r))return!1;break;case 1:if(!s)return!1;break;default:return!1}return!0}catch(e){return!1}}async resourcesByUrlAndMime(e,...t){let n=await super.resourcesByUrlAndMime(e,...t);if(n.length>0)return n;for(const r of Object.keys(this.waczfiles))if(r&&"local"!==r){const{indexType:i,isNew:s}=await this.loadIndex(r);switch(i){case 2:if(!await this.loadCDXFromIDX(r,e,0,!0))continue;break;case 1:if(!s)continue;break;default:continue}const o=await super.resourcesByUrlAndMime(e,...t);o&&o.length&&(n=n.concat(o))}return n}async loadFileFromWACZ(e,t,n,r=0){try{return await e.loadFile(t,n)}catch(i){if(r<=3&&await this.retryLoad(i))return await this.loadFileFromWACZ(e,t,n,r+1);throw i}}async loadFileFromNamedWACZ(e,t,n){const r=this.waczfiles[e];if(!r)throw new Error("No WACZ Found for: "+e);return await this.loadFileFromWACZ(r,t,n)}async computeFileHash(e,t){return t?t.indexOf(":")>0&&(t=t.split(":")[1]):t=await V(e,"sha-256",""),t}async addNewWACZ({name:e,hash:t,path:n,crawlId:r,parent:i,loader:s=null}){const o=e||n||"";t=await this.computeFileHash(o,t);const a=this.addWACZFile({waczname:o,hash:t,crawlId:r,path:n,parent:i,loader:s});let c={};if(!this.pagesQueryUrl){await a.init();const e=new vA(this,a,!i);c=await e.load()}return await a.save(this.db,!0),c}async loadWACZFiles(e,t=this){const n=[],r=async(e,t)=>{const n=this.waczfiles[e];n&&(this.pagesQueryUrl?await n.init(t):n.path=t,await n.save(this.db,!0))},i=e.resources.map(e=>{const n=t.getLoadPath(e.path);return{name:t.getName(e.name),hash:e.hash,path:n,crawlId:e.crawlId}});for(const{name:e,hash:s,path:o,crawlId:a}of i)this.waczfiles[e]?this.waczfiles[e].path!==o&&n.push(r(e,o)):n.push(this.addNewWACZ({name:e,hash:s,path:o,parent:t,crawlId:a}));if(n.length&&await Promise.allSettled(n),e.preloadResources?.length)for(const{name:t}of e.preloadResources)this.preloadResources.push(t);e.initialPages?.length&&await this.addInitialPages(e.initialPages),"number"==typeof e.totalPages&&(this.totalPages=e.totalPages)}async addInitialPages(e){const t=[];for(const{id:n,url:r,title:i,ts:s,mime:o,status:a,depth:c,favIconUrl:l,filename:h,isSeed:u,crawl_id:p}of e){const e=this.waczfiles[h],d=e?e.hash:"";if(t.push({id:n,url:r,title:i,ts:s,mime:o,status:a,depth:c,favIconUrl:l,wacz:h,waczhash:d,isSeed:u}),u){const e=this.seedPageWACZs.get(p||"")||new Set;e.add(h),this.seedPageWACZs.set(p||"",e)}}return await this.addPages(t)}async getTextIndex(){const e={"Content-Type":"application/ndjson"},t=Object.keys(this.waczfiles);if(this.pagesQueryUrl||!this.textIndex||!t.length)return new Response("",{headers:e});const n=1048576;if(1===t.length){const r=t[0];let i;try{i=await this.loadFileFromNamedWACZ(r,this.textIndex,{unzip:!0,offset:0,length:n})}catch(t){return new Response("",{headers:e})}const{reader:s}=i,o=this.waczfiles[r].getSizeOf(this.textIndex);return o>0&&(e["Content-Length"]=""+Math.min(o,n)),new Response(s.getReadableStream(),{headers:e})}{const n=[];for(const r of t)try{const{reader:e}=await this.loadFileFromNamedWACZ(r,this.textIndex,{unzip:!0});e&&n.push(e)}catch(e){continue}const r=new ReadableStream({async pull(e){for(const t of n)for await(const n of t)e.enqueue(n);e.close()}});return new Response(r,{headers:e})}}async getResource(e,t,n,{pageId:r,noRedirect:i}={}){if(await this.initing,this.externalSource){const n=await this.externalSource.getResource(e,t);if(n)return n}const s="document"===e.destination||"iframe"===e.destination,o=r;let a=null,c=null;if(o){if(a=this.waczNameForHash[o],!a)return null;if(c=await super.getResource(e,t,n,{waczname:a,skip5xx:e.isProxyOrigin,isPage:s}),c)return c}const l=await this.getWACZFilesToTry(e,a);if(!l.length)return null;const h=new Map;for(const r of l){const i=this.waczfiles[r];if(i&&i.fileType===Fa&&i.hash!==o&&(c=await super.getResource(e,t,n,{waczname:r,noFuzzyCheck:!e.isProxyOrigin,skip5xx:e.isProxyOrigin,isPage:s}),c)){const e=c,t=e.date.getTime();h.set(t,{name:r,hash:i.hash,resp:e})}}if(h.size>0){const n=H(e.timestamp);let r,s,o,c=-1;for(const e of h.keys()){const t=Math.abs(e-n.getTime());if(c<0||t<c){const{name:n,hash:i,resp:l}=h.get(e);a=n,s=i,r=j(l.date.toISOString()),c=t,o=l}}return i?o:Response.redirect(`${t}:${s}/${r}${e.mod}/${e.url}`)}if(this.fuzzyUrlRules.length)for(const{match:r,replace:i}of this.fuzzyUrlRules){const s=decodeURIComponent(e.url.replace(r,i));if(s&&s!==e.url){e.url=s;const r=await super.getResource(e,t,n);if(r)return r}}return null}async retryLoad(e){if("json"!==this.rootSourceType)return!1;if(!(e instanceof re||e instanceof te))return await $(e,this.config);try{return await this.checkUpdates(),!0}catch(e){return!1}}async queryPages(e="",t=1,n=25){const r=new URLSearchParams;e&&r.set("search",e),r.set("page",t+""),r.set("pageSize",n+"");const i=await fetch(this.pagesQueryUrl+"?"+r.toString(),{headers:this.sourceLoader?.headers});if(200!==i.status)return{pages:[],total:0};const s=await i.json();if(!s)return{pages:[],total:0};const o=s.total,a=s.items.map(e=>{e.wacz=e.filename;const t=this.waczfiles[e.filename];return t&&(e.waczhash=t.hash),"string"==typeof e.ts&&(e.ts=new Date(e.ts).getTime()),e});return{pages:a,total:o}}async getWACZFilesToTry(e,t){let n,r=[];if(this.preloadResources.length&&(r=[...this.preloadResources]),!this.pagesQueryUrl||"document"!==e.destination&&"iframe"!==e.destination){if(this.pagesQueryUrl&&e.url.startsWith("urn:")){const t=e.url.indexOf("http");t>0&&(n=e.url.slice(t))}else if(e.isProxyOrigin&&e.referrer&&"document"!==e.destination){n=e.referrer,this.referrerMap.set(e.url,n);let t="";for(;n&&(t=this.referrerMap.get(n),t&&t!==n);)n=t}}else n=e.url;if(n&&this.pagesQueryUrl){n.startsWith("//")&&(n=(e.referrer&&e.referrer.indexOf("/http:")>0?"http:":"https:")+n);let t=await this.getWACZFilesForPagesQuery(n);if(t)return r=[...r,...t],r;if(n.startsWith("https://www.")){const e=new URL(n);if("/"===e.pathname&&(e.hostname=e.hostname.replace("www.",""),t=await this.getWACZFilesForPagesQuery(e.href),t))return r=[...r,...t],r}}if(t){const e=this.waczfiles[t];if(e?.crawlId){const t=this.seedPageWACZs.get(e.crawlId);if(t)return r=[...r,...t.values()],r}}const i=Object.keys(this.waczfiles);return this.maxFallbackLookups>0&&"json"===this.rootSourceType&&this.pagesQueryUrl?i.slice(0,this.maxFallbackLookups):i}async getWACZFilesForPagesQuery(e){const t=[];if(!this.pagesQueryUrl)return null;const n=await this.getPagesByUrl(e);for(const e of n)e.wacz&&t.push(e.wacz);if(t.length)return t;if(this.notAPage.has(e))return null;const r=new URLSearchParams,i=new URL(e);i.hash="",r.set("url",i.href),r.set("pageSize","25");let s=await fetch(this.pagesQueryUrl+"?"+r.toString(),{headers:this.sourceLoader?.headers});if(200!==s.status)return null;let o=await s.json();!o?.items.length&&i.search&&(i.search="",r.delete("url"),r.set("search",i.href),s=await fetch(this.pagesQueryUrl+"?"+r.toString(),{headers:this.sourceLoader?.headers}),o=await s.json());const a=o.items;for(const e of a){if(!e.url.startsWith(i.href))break;e.filename&&t.push(e.filename)}return t.length?(this.addInitialPages(o.items).catch(e=>console.log(e,"additional page add failed")),t):(this.notAPage.add(e),null)}async checkUpdates(){if("json"!==this.rootSourceType)return;this.updating||(this.updating=(async()=>{try{return void await this.loadFromJSON()}catch(e){await oe(500)}throw new se})());try{await this.updating}finally{this.updating=null}}async loadFromJSON(e=null){if(!e){const t=await this.sourceLoader.doInitialFetch(!1,!1);e=t&&t.response}if(!e||206!==e.status&&200!==e.status)throw console.warn("WACZ update failed from: "+(this.config.loadUrl||this.config.sourceUrl)),new re;const t=await e.json();return t.pagesQueryUrl&&(this.pagesQueryUrl=t.pagesQueryUrl),t.profile,await this.loadWACZFiles(t),t}getLoadPath(e){return new URL(e,this.config.loadUrl).href}getName(e){return e}async createLoader(e){return await Yr(e)}}class CA{sourceUrl;type;notFoundPageUrl;constructor(e){const t=e.extraConfig||{};this.sourceUrl=t.prefix,this.type=t.sourceType||"kiwix",this.notFoundPageUrl=t.notFoundPageUrl}async getAllPages(){return[]}async getResource(e,t){const{url:n,headers:r}=e.prepareProxyRequest(t);let i=r;if("kiwix"===this.type){let t=await this.resolveHeaders(n);if(!t)for(const e of Nt.getFuzzyCanonsWithArgs(n))if(e!==n&&(t=await this.resolveHeaders(e),t))break;if(!t){if(this.notFoundPageUrl&&"navigate"===e.mode){const e=await fetch(this.notFoundPageUrl);if(200===e.status){const t={"Content-Type":"text/html"},r=await e.text();return new Response(r.replace("$URL",n),{status:404,headers:t})}}return null}let{headers:r,encodedUrl:s,date:o,status:a,statusText:c,hasPayload:l}=t;if(i.has("Range")){const e=i.get("Range");e&&(i={Range:e})}let h=null,u=null;if(r||(r=new Headers),l&&(u=await fetch(this.sourceUrl+"A/"+s,{headers:i}),u.body&&(h=new et(u.body.getReader(),null,!1)),206===u.status)){const e=u.headers.get("Content-Length"),t=u.headers.get("Content-Range");e&&t&&(a=206,c="Partial Content",r.set("Content-Length",e),r.set("Content-Range",t),r.set("Accept-Ranges","bytes"))}return h||(h=new Uint8Array([])),o||(o=new Date),new Lt({payload:h,status:a,statusText:c,headers:r,url:n,date:o,noRW:!1,isLive:!1})}return null}async resolveHeaders(e){const t=e.slice(e.indexOf("//")+2);let n=encodeURI(t);n=encodeURIComponent(t);const r=await fetch(this.sourceUrl+"H/"+n);if(200!==r.status)return null;let i=null,s=null,o=200,a="OK",c=!1;try{const t=await mt.parse(r.body);if(!t)return null;if("revisit"===t.warcType){const n=t.warcHeaders.headers.get("WARC-Refers-To-Target-URI");if(n&&n!==e)return await this.resolveHeaders(n)}s=new Date(t.warcDate),t.httpHeaders?(i=t.httpHeaders.headers,o=Number(t.httpHeaders.statusCode),a=t.httpHeaders.statusText||"",c="0"!==t.httpHeaders.headers.get("Content-Length")):"resource"===t.warcType&&(i=new Headers,i.set("Content-Type",t.warcContentType||""),i.set("Content-Length",t.warcContentLength+""),o=200,a="OK",c=t.warcContentLength>0),o||(o=200)}catch(t){console.warn(t),console.warn("Ignoring headers, error parsing headers response for: "+e)}return{encodedUrl:n,headers:i,date:s,status:o,statusText:a,hasPayload:c}}async delete(){}}globalThis.self||(globalThis.self=globalThis);const RA={};self.interruptLoads=RA;class kA{root=null;colldb=null;checkIpfs=!0;_init_db;_fileHandles=null;constructor(){this._init_db=this._initDB()}async _initDB(){this.colldb=await y("collDB",3,{upgrade:(e,t)=>{t<1&&e.createObjectStore("colls",{keyPath:"name"}).createIndex("type","type");try{e.createObjectStore("settings")}catch(e){}}})}async loadAll(e){if(await this._init_db,e)for(const t of e.split(",")){const e=t.split(":");if(2===e.length){const t={dbname:e[1],sourceName:e[1],decode:!1,sourceUrl:""},n={name:e[0],type:"archive",config:t};console.log("Adding Coll: "+JSON.stringify(n)),await this.colldb.put("colls",n)}}try{const e=await this.listAll(),t=[],n=e.map(async e=>this._initColl(e,t));await Promise.all(n),t.length&&this.deleteExpireMultiWACZs(t)}catch(e){console.warn(e.toString())}return!0}async listAll(){return await this._init_db,await this.colldb.getAll("colls")}async loadColl(e){await this._init_db;const t=await this.colldb.get("colls",e);return t?await this._initColl(t):null}async reload(e){return this.loadColl(e)}async deleteColl(e){await this._init_db;const t=await this.colldb.get("colls",e);if(!t)return!1;if(t.config.dbname)try{await b(t.config.dbname,{blocked(e,n){console.log(`Unable to delete ${t.config.dbname}, blocked: ${n}`)}})}catch(e){return console.warn(e),!1}return await this.colldb.delete("colls",e),!0}async deleteExpireMultiWACZs(e){const t=await(this.colldb?.get("settings","lastCleanupRun"));if(t&&Date.now()-t<864e5)console.log("Skipping cleanup run, ran recently");else{for(const n of e){const e=n.config.loadUrl||n.config.sourceUrl;if(!e.startsWith("https://")&&!e.startsWith("http://"))continue;const r=n.name.startsWith("db:")?n.name.slice(3):n.name;try{await n.checkUpdates()}catch(t){t instanceof se&&(console.warn("Deleting expired/invalid coll for "+e),this.deleteColl(r))}await oe(2e3)}await this.colldb.put("settings",Date.now(),"lastCleanupRun")}}async updateAuth(e,t){await this._init_db;const n=await this.colldb.get("colls",e);return!!n&&(n.config.headers=t,await this.colldb.put("colls",n),!0)}async updateMetadata(e,t){await this._init_db;const n=await this.colldb.get("colls",e);return!!n&&(n.config.metadata={...n.config.metadata,...t},await this.colldb.put("colls",n),n.config.metadata)}async updateSize(e,t,n,r){await this._init_db;const i=await this.colldb.get("colls",e);if(!i)return!1;const s=i.config.metadata||{};return s.fullSize=(s.fullSize||0)+t,s.size=(s.size||0)+n,s.mtime=(new Date).getTime(),void 0!==r&&(i.config.decode=r),await this.colldb.put("colls",i),s}async initNewColl(e,t={},n="archive"){await this._init_db;const r=G(),i="local://"+r,s={name:r,type:n,config:{dbname:"db:"+r,ctime:(new Date).getTime(),decode:!1,metadata:e,sourceUrl:i,extraConfig:t}},o=await this._initColl(s);return await this.colldb.put("colls",s),o}async _initColl(e,t=null){const n=await this._initStore(e.type||"",e.config),r=e.name,i=e.config;return e.config.root&&!this.root&&(this.root=r||null),t&&n instanceof TA&&t.push(n),this._createCollection({name:r,store:n,config:i})}async _initStore(e,t){let n,r=null;switch(e){case"archive":r=new Ft(t.dbname);break;case"remotesource":n=await Yr({url:t.loadUrl,headers:t.headers,size:t.size,extra:t.extra}),r=new li(t.dbname,n,t.noCache);break;case"remoteprefix":r=new hi(t.dbname,t.remotePrefix,t.headers,t.noCache);break;case"wacz":case"remotezip":case"multiwacz":n=await Yr({url:t.loadUrl||t.sourceUrl,headers:t.headers,extra:t.extra}),r=new TA(t,n,"multiwacz"===e?"json":"wacz");break;case"remotewarcproxy":r=new CA(t);break;case"live":r=new SA(t.extraConfig)}if(!r)throw new Error("no store found: "+e);return r.initing&&await r.initing,r}_createCollection(e){return e}}class NA extends kA{constructor(e){super(),this.registerListener(e)}async hasCollection(e){return await this._init_db,null!=await this.colldb.getKey("colls",e)}registerListener(e){e.addEventListener("message",e=>{e.waitUntil?e.waitUntil(this._handleMessage(e)):this._handleMessage(e)})}async _handleMessage(e){await this._init_db;const t=e.source||self;switch(e.data.msg_type){case"addColl":{const n=e.data.name,r=(e,r,i,s,o=null,a=null)=>{t.postMessage({msg_type:"collProgress",name:n,percent:e,error:r,currentSize:i,totalSize:s,fileHandle:o,extraMsg:a})};let i;try{if(i=await this.colldb.get("colls",n),i?e.data.skipExisting||(await this.deleteColl(n),i=await this.addCollection(e.data,r)):i=await this.addCollection(e.data,r),!i){if(e.data.name)try{await b("db:"+e.data.name,{blocked(t,n){console.log(`Load failed and unable to delete ${e.data.name}: ${n}`)}})}catch(e){console.warn(e)}return}}catch(e){if(e instanceof ne)return console.warn(e),void r(0,"permission_needed",null,null,e.info?.fileHandle);if("ConstraintError"!==e.name)return console.warn(e),void r(0,"An unexpected error occured: "+e.toString(),null,null);console.log("already being added, just continue..."),i=await this.colldb.get("colls",n)}t.postMessage({msg_type:"collAdded",name:n,sourceUrl:i?.config.sourceUrl});break}case"cancelLoad":{const t=e.data.name,n=new Promise(e=>RA[t]=e);await n,await this.deleteColl(t),delete RA[t];break}case"removeColl":{const n=e.data.name;await this.hasCollection(n)&&(await this.deleteColl(n),this.doListAll(t));break}case"listAll":this.doListAll(t);break;case"reload":this.reload(e.data.name)}}async doListAll(e){const t=[],n=await this.listAll();for(const e of n)t.push({name:e.name,prefix:e.name,pageList:[],sourceName:e.config.sourceName});e.postMessage({msg_type:"listAll",colls:t})}async addCollection(e,t){let n=e.name,r="";const i={root:e.root||!1};let s,o=null;const a=e.file;if(!a?.sourceUrl)return t(0,"Invalid Load Request"),!1;if(i.dbname="db:"+n,a.sourceUrl.startsWith("proxy:"))i.sourceUrl=a.sourceUrl.slice(6),i.extraConfig=e.extraConfig,i.extraConfig.prefix||(i.extraConfig.prefix=i.sourceUrl),i.topTemplateUrl=e.topTemplateUrl,i.metadata={},r=e.type||i.extraConfig.type||"remotewarcproxy",s=await this._initStore(r,i);else{let c=null,l=null;if(a.newFullImport&&(n=G(),a.loadUrl=a.loadUrl||a.sourceUrl,a.name=a.name||a.sourceUrl,a.sourceUrl="local://"+n),r="archive",a.newFullImport&&a.importCollId){const e=await this.colldb.get("colls",a.importCollId);if(!e||"archive"!==e.type)return t(0,"Invalid Existing Collection: "+a.importCollId),!1;i.dbname=e.config.dbname,o=e.config,o&&(o.decode=!0)}let h=a.loadUrl||a.sourceUrl;h.match(/[\w]+:\/\//)||(h=new URL(h,self.location.href).href),i.decode=!0,i.onDemand=!1,i.loadUrl=h,i.sourceUrl=a.sourceUrl;let u=a.name||a.sourceUrl;try{if(u.match(/https?:\/\//)){const e=new URL(u);u=e.pathname+e.hash}}catch(e){}if(i.sourceName=u.slice(u.lastIndexOf("/")+1),i.size="number"==typeof a.size?a.size:null,i.extra=a.extra,i.loadUrl.startsWith("file://")&&!a.blob&&!i.extra){if(!this._fileHandles||!this._fileHandles[i.sourceUrl])return t(0,"missing_local_file"),!1;i.extra={fileHandle:this._fileHandles[i.sourceUrl]}}i.extraConfig=e.extraConfig,i.headers=a.headers||i.extraConfig?.headers,i.noCache=a.noCache;let p=await Yr({url:h,headers:i.headers,size:a.size,extra:i.extra,blob:a.blob});if(a.loadEager){const{response:e}=await p.doInitialFetch(!1,!0),t={arrayBuffer:new Uint8Array(await e.arrayBuffer())};a.newFullImport=!0,p=await Yr({url:h,headers:i.headers,size:a.size,extra:t})}let d=function(e){const t=[".warc",".warc.gz",".cdx",".cdxj",".har",".json",".wacz"];for(const n of t)if(e.endsWith(n))return n;if(e.endsWith(".wacz.zip"))return".wacz"}(i.sourceName);const{abort:f,response:g}=await p.doInitialFetch(".wacz"===d,!1);d||(d=await xa(await g.clone()));const m=g.body;if(i.onDemand=p.canLoadOnDemand&&!a.newFullImport,!p.isValid){const e=p.length&&p.length<=1e3?await g.text():"";return t(0,`Sorry, this URL could not be loaded.\nMake sure this is a valid URL and you have access to this file.\nStatus: ${g.status} ${g.statusText}\nError Details:\n${e}`),f&&f.abort(),!1}if(!p.length)return t(0,"Sorry, this URL could not be loaded because the size of the file is not accessible.\nMake sure this is a valid URL and you have access to this file."),f&&f.abort(),!1;const w=p.length;if(".wacz"===d){if(i.onDemand)c=new _A(p,i,n),l=new TA(i,p,"wacz"),r="wacz";else{if(!p.canLoadOnDemand||!a.newFullImport)return t(0,"Sorry, can't load this WACZ file due to lack of range request support on the server"),f&&f.abort(),!1;c=new EA(p,i,n),l=null,delete i.extra}const e=p.getFullBuffer();e&&(i.extra={arrayBuffer:e,...i.extra||{}})}else!m||".warc"!==d&&".warc.gz"!==d?!m||".cdx"!==d&&".cdxj"!==d?".har"===d?(c=new Ia(await g.json()),i.decode=!1):".json"===d&&(l=new TA(i,p,"json"),c=new xA(g),r="multiwacz"):(i.remotePrefix=e.remotePrefix||h.slice(0,h.lastIndexOf("/")+1),c=new ka(m,f,n),r="remoteprefix",l=new hi(i.dbname,i.remotePrefix,i.headers,i.noCache)):i.noCache||!(w<B)&&i.onDemand?(c=new Ra(m,f,n),r="remotesource",l=new li(i.dbname,p,i.noCache)):c=new cr(m,f,n);if(!c)return t(0,`The ${i.sourceName} is not a known archive format that could be loaded.`),f&&f.abort(),!1;l||(l=new Ft(i.dbname)),await l.initing;try{i.metadata=await c.load(l,t,w)}catch(e){return e instanceof ie||(t(0,`Unexpected Loading Error: ${e.toString()}`),console.warn(e)),!1}if(o)return await this.updateSize(a.importCollId,w,w,o.decode),{config:o,type:"",name:"",store:l};i.metadata.size||(i.metadata.size=w),i.metadata.title||(i.metadata.title=i.sourceName),s=l}i.ctime=(new Date).getTime(),this._fileHandles&&i.extra?.fileHandle&&delete this._fileHandles[i.sourceUrl];const c={name:n,type:r,config:i};return await this.colldb.add("colls",c),{...c,store:s}}}let OA;class BA{timeRanges={};updateStats(e,t,n,r){const i=r.clientId||r.resultingClientId;if(!i||!e)return;if(!n.url||n.url.indexOf("mp_/")<0)return;if("document"===n.destination&&t>300&&t<400)return;let s;void 0===this.timeRanges[i]?(s={count:0,children:new Set},this.timeRanges[i]=s,n.referrer.indexOf("mp_/")>0&&OA.clients.matchAll({type:"window"}).then(e=>this.updateStatsParent(i,n.referrer,e))):s=this.timeRanges[i];const o=e.getTime();(!s.min||o<s.min)&&(s.min=o),(!s.max||o>s.max)&&(s.max=o),s.count++}updateStatsParent(e,t,n){for(const r of n)if(r.url===t){this.timeRanges[r.id]||(this.timeRanges[r.id]={count:0,children:new Set}),this.timeRanges[r.id].children.add(e);break}}async getStats(e){const t=new URL(e.request.url);let n="";const r=new URLSearchParams(t.search).get("url"),i=await OA.clients.matchAll({type:"window"}),s={};for(const e of i)e.url===r&&(n=e.id),s[e.id]=1;const o=this.timeRanges[n]||{},a={count:o.count||0,min:o.min,max:o.max},c=this.timeRanges[n]&&this.timeRanges[n].children;for(const e of c.values()){const t=this.timeRanges[e];t&&(t.min&&(!a.min||t.min<a.min)&&(a.min=t.min),t.max&&(!a.max||t.max>a.max)&&(a.max=t.max),a.count+=t.count)}for(const e of Object.keys(this.timeRanges))s[e]||delete this.timeRanges[e];return new Response(JSON.stringify(a),{headers:{"Content-Type":"application/json"}})}}var PA=function(){return PA=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},PA.apply(this,arguments)},LA=function(e){return void 0===e&&(e={}),{arrayFormat:e.arrayFormat||"none",booleanFormat:e.booleanFormat||"none",nullFormat:e.nullFormat||"default"}},DA=function(e){return encodeURIComponent(e)},UA=function(e){return decodeURIComponent(e)},FA=function(e,t,n){return null===t?function(e,t){return"hidden"===t.nullFormat?"":"string"===t.nullFormat?e+"=null":e}(e,n):"boolean"==typeof t?function(e,t,n){return"empty-true"===n.booleanFormat&&t?e:e+"="+("unicode"===n.booleanFormat?t?"✓":"✗":t.toString())}(e,t,n):Array.isArray(t)?function(e,t,n){var r=function(e){return"index"===e.arrayFormat?function(e,t){return e+"["+t+"]"}:"brackets"===e.arrayFormat?function(e){return e+"[]"}:function(e){return e}}(n);return t.map(function(t,n){return r(e,n)+"="+DA(t)}).join("&")}(e,t,n):e+"="+DA(t)},MA=function(e){var t=e.indexOf("?");return-1===t?e:e.slice(t+1)},jA=function(e){var t=e.indexOf("["),n=-1!==t;return{hasBrackets:n,name:n?e.slice(0,t):e}},HA=function(e,t){var n=LA(t);return MA(e).split("&").reduce(function(e,t){var r=t.split("="),i=r[0],s=r[1],o=jA(i),a=o.hasBrackets,c=o.name,l=e[c],h=function(e,t){if(void 0===e)return"empty-true"===t.booleanFormat||null;if("string"===t.booleanFormat){if("true"===e)return!0;if("false"===e)return!1}if("unicode"===t.booleanFormat){if("✓"===UA(e))return!0;if("✗"===UA(e))return!1}return"string"===t.nullFormat&&"null"===e?null:UA(e)}(s,n);return e[c]=void 0===l?a?[h]:h:(Array.isArray(l)?l:[l]).concat(h),e},{})},WA=/[^!$'()*+,;|:]/g,QA=function(e){return e.replace(WA,function(e){return encodeURIComponent(e)})},VA={default:QA,uri:encodeURI,uriComponent:encodeURIComponent,none:function(e){return e},legacy:encodeURI},zA={default:decodeURIComponent,uri:decodeURI,uriComponent:decodeURIComponent,none:function(e){return e},legacy:decodeURIComponent},qA=function(e,t,n){var r=VA[t]||QA;return n?String(e).split("/").map(r).join("/"):r(String(e))},GA=function(e){return"("+(e?e.replace(/(^<|>$)/g,""):"[a-zA-Z0-9-_.~%':|=+\\*@$]+")+")"},KA=[{name:"url-parameter",pattern:/^:([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})(<(.+?)>)?/,regex:function(e){return new RegExp(GA(e[2]))}},{name:"url-parameter-splat",pattern:/^\*([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})/,regex:/([^?]*)/},{name:"url-parameter-matrix",pattern:/^;([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})(<(.+?)>)?/,regex:function(e){return new RegExp(";"+e[1]+"="+GA(e[2]))}},{name:"query-parameter",pattern:/^(?:\?|&)(?::)?([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})/},{name:"delimiter",pattern:/^(\/|\?)/,regex:function(e){return new RegExp("\\"+e[0])}},{name:"sub-delimiter",pattern:/^(!|&|-|_|\.|;)/,regex:function(e){return new RegExp(e[0])}},{name:"fragment",pattern:/^([0-9a-zA-Z]+)/,regex:function(e){return new RegExp(e[0])}}],XA=function e(t,n){if(void 0===n&&(n=[]),!KA.some(function(r){var i=t.match(r.pattern);return!!i&&(n.push({type:r.name,match:i[0],val:i.slice(1,2),otherVal:i.slice(2),regex:r.regex instanceof Function?r.regex(i):r.regex}),i[0].length<t.length&&(n=e(t.substr(i[0].length),n)),!0)}))throw new Error("Could not parse path '"+t+"'");return n},YA=function(e){return null!=e},JA={urlParamsEncoding:"default"},ZA=function(){function e(e,t){if(!e)throw new Error("Missing path in Path constructor");this.path=e,this.options=PA(PA({},JA),t),this.tokens=XA(e),this.hasUrlParams=this.tokens.filter(function(e){return/^url-parameter/.test(e.type)}).length>0,this.hasSpatParam=this.tokens.filter(function(e){return/splat$/.test(e.type)}).length>0,this.hasMatrixParams=this.tokens.filter(function(e){return/matrix$/.test(e.type)}).length>0,this.hasQueryParams=this.tokens.filter(function(e){return/^query-parameter/.test(e.type)}).length>0,this.spatParams=this.getParams("url-parameter-splat"),this.urlParams=this.getParams(/^url-parameter/),this.queryParams=this.getParams("query-parameter"),this.params=this.urlParams.concat(this.queryParams),this.source=this.tokens.filter(function(e){return void 0!==e.regex}).map(function(e){return e.regex.source}).join("")}return e.createPath=function(t,n){return new e(t,n)},e.prototype.isQueryParam=function(e){return-1!==this.queryParams.indexOf(e)},e.prototype.isSpatParam=function(e){return-1!==this.spatParams.indexOf(e)},e.prototype.test=function(e,t){var n=this,r=PA(PA({caseSensitive:!1,strictTrailingSlash:!1},this.options),t),i=function(e,t){return t||"\\/"===e?e:e.replace(/\\\/$/,"")+"(?:\\/)?"}(this.source,r.strictTrailingSlash),s=this.urlTest(e,i+(this.hasQueryParams?"(\\?.*$|$)":"$"),r.caseSensitive,r.urlParamsEncoding);if(!s||!this.hasQueryParams)return s;var o=HA(e,r.queryParams),a=Object.keys(o).filter(function(e){return!n.isQueryParam(e)});return 0===a.length?(Object.keys(o).forEach(function(e){return s[e]=o[e]}),s):null},e.prototype.partialTest=function(e,t){var n=this,r=PA(PA({caseSensitive:!1,delimited:!0},this.options),t),i=function(e,t){return t?/(\/)$/.test(e)?e:e+"(\\/|\\?|\\.|;|$)":e}(this.source,r.delimited),s=this.urlTest(e,i,r.caseSensitive,r.urlParamsEncoding);if(!s)return s;if(!this.hasQueryParams)return s;var o=HA(e,r.queryParams);return Object.keys(o).filter(function(e){return n.isQueryParam(e)}).forEach(function(e){return function(e,t,n){void 0===n&&(n="");var r=e[t];return e[t]=void 0===r?n:Array.isArray(r)?r.concat(n):[r,n],e}(s,e,o[e])}),s},e.prototype.build=function(e,t){var n=this;void 0===e&&(e={});var r=PA(PA({ignoreConstraints:!1,ignoreSearch:!1,queryParams:{}},this.options),t),i=Object.keys(e).filter(function(e){return!n.isQueryParam(e)}).reduce(function(t,i){if(!YA(e[i]))return t;var s=e[i],o=n.isSpatParam(i);return"boolean"==typeof s?t[i]=s:Array.isArray(s)?t[i]=s.map(function(e){return qA(e,r.urlParamsEncoding,o)}):t[i]=qA(s,r.urlParamsEncoding,o),t},{});if(this.urlParams.some(function(t){return!YA(e[t])})){var s=this.urlParams.filter(function(t){return!YA(e[t])});throw new Error("Cannot build path: '"+this.path+"' requires missing parameters { "+s.join(", ")+" }")}if(!r.ignoreConstraints&&!this.tokens.filter(function(e){return/^url-parameter/.test(e.type)&&!/-splat$/.test(e.type)}).every(function(e){return new RegExp("^"+GA(e.otherVal[0])+"$").test(i[e.val])}))throw new Error("Some parameters of '"+this.path+"' are of invalid format");var o=this.tokens.filter(function(e){return!1===/^query-parameter/.test(e.type)}).map(function(e){return"url-parameter-matrix"===e.type?";"+e.val+"="+i[e.val[0]]:/^url-parameter/.test(e.type)?i[e.val[0]]:e.match}).join("");if(r.ignoreSearch)return o;var a=this.queryParams.filter(function(t){return-1!==Object.keys(e).indexOf(t)}).reduce(function(t,n){return t[n]=e[n],t},{}),c=function(e,t){var n=LA(t);return Object.keys(e).filter(function(t){return void 0!==e[t]}).map(function(t){return FA(t,e[t],n)}).filter(Boolean).join("&")}(a,r.queryParams);return c?o+"?"+c:o},e.prototype.getParams=function(e){var t=e instanceof RegExp?function(t){return e.test(t.type)}:function(t){return t.type===e};return this.tokens.filter(t).map(function(e){return e.val[0]})},e.prototype.urlTest=function(e,t,n,r){var i=this,s=new RegExp("^"+t,n?"":"i"),o=e.match(s);return o?this.urlParams.length?o.slice(1,this.urlParams.length+1).reduce(function(e,t,n){return e[i.urlParams[n]]=(zA[r]||decodeURIComponent)(t),e},{}):{}:null},e}();class $A{routes={};constructor(e){for(const[t,n]of Object.entries(e)){let e,r;n instanceof Array?(e=n[0],r=n[1]||"GET"):(e=n,r="GET"),this.routes[r]=this.routes[r]||{},this.routes[r][t]=new ZA(e)}}match(e,t="GET"){for(const[n,r]of Object.entries(this.routes[t]||[])){const t=e.split("?",2),i=t[0],s=r.test(i);if(s)return s._route=n,s._query=new URLSearchParams(2===t.length?t[1]:""),s}return{_route:null}}}class ev{router;collections;constructor(e){this.router=new $A(this.routes),this.collections=e}get routes(){return{index:"coll-index",coll:"c/:coll",urls:"c/:coll/urls",urlsTs:"c/:coll/ts/",createColl:["c/create","POST"],deleteColl:["c/:coll","DELETE"],updateAuth:["c/:coll/updateAuth","POST"],updateMetadata:["c/:coll/metadata","POST"],curated:"c/:coll/curated/:list",pages:"c/:coll/pages",textIndex:"c/:coll/textIndex",deletePage:["c/:coll/page/:page","DELETE"]}}async apiResponse(e,t,n){const r=this.router.match(e,t.method),i=await this.handleApi(t,r,n);if(i instanceof Response)return i;const s=i.error?404:200;return this.makeResponse(i,s)}async handleApi(e,t,n){switch(t._route){case"index":return await this.listAll(t._query.get("filter"));case"createColl":{const t=await e.json();return ee(await this.collections.initNewColl(t.metadata||{},t.extraConfig||{}))}case"coll":{const e=await this.collections.getColl(t.coll);if(!e)return{error:"collection_not_found"};const n=ee(e),r=e.store instanceof Ft?e.store:null,i=r?.db;return"1"===t._query.get("all")?(i?(n.pages=await r.getAllPages(),n.lists=await i.getAll("pageLists"),n.curatedPages=await i.getAll("curatedPages"),e.store instanceof TA&&(n.canQueryPages=!!e.store.pagesQueryUrl)):(n.pages=[],n.lists=[],n.curatedPages=[]),n.verify=await(r?.getVerifyInfo())):i?(n.numLists=await i.count("pageLists"),n.numPages=await i.count("pages")):(n.numLists=0,n.numPages=0),e.config.metadata.ipfsPins&&(n.ipfsPins=e.config.metadata.ipfsPins),n}case"deleteColl":{const e="1"===t._query.get("reload");return await this.collections.deleteColl(t.coll,e)?await this.listAll():{error:"collection_not_found"}}case"updateAuth":{const n=await e.json();return{success:await this.collections.updateAuth(t.coll,n.headers)}}case"updateMetadata":{const n=await e.json();return{metadata:await this.collections.updateMetadata(t.coll,n)}}case"urls":{const e=await this.collections.getColl(t.coll);if(!e)return{error:"collection_not_found"};const n=t._query.get("url"),r=Number(t._query.get("count")||100),i=t._query.get("mime"),s="1"===t._query.get("prefix"),o=t._query.get("fromUrl"),a=t._query.get("fromTs"),c=t._query.get("fromMime"),l=Number(t._query.get("fromStatus")||0),h=e.store instanceof Ft?e.store:null;if(!h)return{urls:[]};let u;return u=n?await h.resourcesByUrlAndMime(n,i,r,s,o,a):await h.resourcesByMime(i,r,c,o,l),u=u||[],{urls:u}}case"urlsTs":{const e=await this.collections.getColl(t.coll);if(!e)return{error:"collection_not_found"};const n=t._query.get("url"),r=e.store instanceof Ft?e.store:null;return{timestamps:await(r?.getTimestampsByURL(n))}}case"pages":{const e=await this.collections.getColl(t.coll);if(!e)return{error:"collection_not_found"};let n,r=[];if(e.store instanceof TA){const r=t._query.get("search"),i=Number(t._query.get("page"))||1,s=Number(t._query.get("pageSize"))||25;if(r||i>1){const{pages:t,total:n}=await e.store.queryPages(r,i,s);return{pages:t,total:n}}n=e.store.totalPages}return e.store instanceof Ft&&(r=await e.store.getAllPages()),{pages:r,total:n}}case"textIndex":{const e=await this.collections.getColl(t.coll);return e?e.store.getTextIndex?await e.store.getTextIndex():{}:{error:"collection_not_found"}}case"curated":{const e=await this.collections.getColl(t.coll);if(!e)return{error:"collection_not_found"};const n=Number(t.list),r=e.store instanceof Ft?e.store:null;return r?.db?{curated:await r.db.getAllFromIndex("curatedPages","listPages",IDBKeyRange.bound([n],[n+1]))}:{curated:[]}}case"deletePage":{const e=await this.collections.getColl(t.coll);if(!e)return{error:"collection_not_found"};const n=e.store instanceof Ft?e.store:null;if(!n)return{pageSize:0,dedupSize:0};const{pageSize:r,dedupSize:i}=await n.deletePage(t.page);return this.collections.updateSize(t.coll,r,i),{pageSize:r,dedupSize:i}}default:return{error:"not_found"}}}async listAll(e){const t=await this.collections.listAll(),n=[];return t.forEach(t=>{"live"!==t.type&&"remoteproxy"!==t.type&&(e&&!t.type.startsWith(e)||n.push(ee(t)))}),{colls:n}}makeResponse(e,t=200){return new Response(JSON.stringify(e),{status:t,headers:{"Content-Type":"application/json"}})}}const tv=/^(?::([\w-]+)\/)?(\d*)([a-z]+_|[$][a-z0-9:.-]+)?(?:\/|\||%7C|%7c)(.+)/;class nv{url="";timestamp="";mod="";pageId="";hash="";cookie="";isProxyOrigin=!1;proxyOrigin;proxyScheme="";localOrigin;httpToHttpsNeeded=!1;altProxyOrigins;proxyTLD;localTLD;request;method;mode;_proxyReferrer="";_postToGetConverted=!1;constructor(e,t,{isRoot:n=!1,mod:r="",ts:i="",proxyOrigin:s,localOrigin:o,proxyTLD:a,localTLD:c,defaultReplayMode:l=!1,altProxyOrigins:h}={}){const u=tv.exec(e);if(this.timestamp=i,this.mod=r,this.request=t,this.method=t.method,this.mode=t.mode,!u&&(e.startsWith("https:")||e.startsWith("http:")||e.startsWith("blob:")))this.url=e;else if(!u&&n)this.url="https://"+e;else{if(!u)return void(this.url="");this.pageId=u[1]||"",this.timestamp=u[2]||"",this.mod=u[3]||"",this.url=u[4]||""}s&&o&&!l&&(this.url=rv(s,o,this.url),this.request.referrer&&(this._proxyReferrer=rv(s,o,this.request.referrer)),this.isProxyOrigin=!0,this.proxyOrigin=s,this.altProxyOrigins=h,this.proxyScheme=s?new URL(s).protocol.slice(0,-1):"",this.localOrigin=o,this.httpToHttpsNeeded="http"===this.proxyScheme&&o.startsWith("https:"),this.proxyTLD=a||"",this.localTLD=c||"");const p=this.url.indexOf("#");p>0&&(this.hash=this.url.slice(p),this.url=this.url.substring(0,p))}get headers(){return this.request.headers}get destination(){return this.request.destination}get referrer(){return this._proxyReferrer||this.request.referrer}async convertPostToGet(){if(this._postToGetConverted)return this.url;const e=this.request;if("POST"!==e.method&&"PUT"!==e.method)return this.url;const t={method:e.method,postData:await e.text(),headers:e.headers,url:this.url};return Me(t)&&(this.url=t.url,this.method="GET",this.mode="navigate"===this.request.mode?"same-origin":this.request.mode,this._postToGetConverted=!0),this.url}prepareProxyRequest(e,t=!0){let n,r,i;if(t){n=new Headers(this.request.headers),r=this.request.referrer;const t=r.indexOf("/http",e.length-1);t>0&&(r=r.slice(t+1),n.set("X-Proxy-Referer",r)),i=this.request.credentials,this.cookie&&n.set("X-Proxy-Cookie",this.cookie)}else n=new Headers,i="omit";let s=this.url;if(s.startsWith("//")&&r)try{s=new URL(r).protocol+s}catch(e){s="https:"+s}return{referrer:r,headers:n,credentials:i,url:s}}async getBody(){const e=this.request.clone();return new Uint8Array(await e.arrayBuffer())}}function rv(e,t,n){const r=new URL(n);return r.origin===t?e+r.pathname+(r.search?r.search:""):n}const iv="x-wabac-is-ajax-req";class sv extends NA{prefixes;colls;inited;root;defaultConfig;constructor(e,t=null,n={}){super(self),this.prefixes=e,this.colls={},this.inited=null,this.root=t,this.defaultConfig=n,this._fileHandles={}}_createCollection(e){return new Sa(e,this.prefixes,this.defaultConfig)}async loadAll(e){return this.colls={},this.inited=super.loadAll(e),this.inited}async getColl(e){return this.colls[e]||(this.colls[e]=await this.loadColl(e)),this.colls[e]}async reload(e){delete this.colls[e],await this.getColl(e)}async addCollection(e,t){const n=await super.addCollection(e,t);return n&&n.name&&(this.root===n.name&&(n.config.root=!0),this.colls[n.name]=this._createCollection(n)),n}async deleteColl(e,t=!1){return this.colls[e]&&(await this.colls[e].store.delete(),this._fileHandles&&t&&this.colls[e].config.extra?.fileHandle&&(this._fileHandles[this.colls[e].config.sourceUrl]=this.colls[e].config.extra.fileHandle)),!!await super.deleteColl(e)&&(delete this.colls[e],!0)}async initNewColl(e,t={},n="archive"){const r=await super.initNewColl(e,t,n);return r&&(this.colls[r.name]=r),r}async updateAuth(e,t){return this.colls[e]&&this.colls[e].store.updateHeaders&&this.colls[e].store.updateHeaders(t),await super.updateAuth(e,t)}async updateMetadata(e,t){const n=await super.updateMetadata(e,t);return this.colls[e]&&n&&(this.colls[e].config.metadata=n,this.colls[e].metadata=n),n}async updateSize(e,t,n,r){const i=await super.updateSize(e,t,n,r);return this.colls[e]&&i&&(this.colls[e].config.metadata=i,this.colls[e].metadata=i),void 0!==r&&this.colls[e]&&(this.colls[e].config.decode=r),i}}class ov{prefix;replayPrefix;staticPrefix;distPrefix;proxyPrefix;staticData;collections;proxyOriginMode;api;apiPrefix;allowRewrittenCache;topFramePassthrough=!1;allowProxyPassthrough=!1;stats;constructor({staticData:e=null,ApiClass:t=ev,defaultConfig:n={},CollectionsClass:r=sv}={}){this.prefix=self.registration?self.registration.scope:"";const i=new URLSearchParams(self.location.search);if(this.proxyOriginMode=!!i.get("proxyOriginMode"),this.proxyOriginMode)this.replayPrefix=this.prefix+"__wb_proxy/",this.staticPrefix=this.replayPrefix+"static/",this.proxyPrefix="https://wab.ac/proxy/",this.apiPrefix="https://wab.ac/api/";else{const e=i.get("replayPrefix")??"w";this.topFramePassthrough=!e,this.replayPrefix=this.prefix+e+(e?"/":""),this.staticPrefix=this.prefix+"static/",this.proxyPrefix=this.staticPrefix+"proxy/",this.apiPrefix=this.replayPrefix+"api/"}var s;if(s=this.replayPrefix,U+=`; frame-src data: about: blob: ${self.location.origin}${self.location.pathname} ${s}`,this.distPrefix=this.prefix+"dist/",this.staticData=e||new Map,this.staticData.set(this.staticPrefix+"wombat.js",{type:"application/javascript",content:"/******/ (() => { // webpackBootstrap\n/******/ \t\"use strict\";\n\n;// ./node_modules/@webrecorder/wombat/src/funcMap.js\n/**\n * A class that manages event listeners for the override applied to\n * EventTarget.[addEventListener, removeEventListener]\n */\nfunction FuncMap() {\n /**\n * @type {Array<Function[]>}\n * @private\n */\n this._map = [];\n}\n\n/**\n * Adds a mapping of original listener -> wrapped original listener\n * @param {Function} fnKey - The original listener function\n * @param {Function} fnValue - The wrapped original listener function\n */\nFuncMap.prototype.set = function(fnKey, fnValue) {\n this._map.push([fnKey, fnValue]);\n};\n\n/**\n * Returns the wrapped original listener that is mapped to the supplied function\n * if it exists in the FuncMap's mapping\n * @param {Function} fnKey - The original listener function\n * @return {?Function}\n */\nFuncMap.prototype.get = function(fnKey) {\n for (var i = 0; i < this._map.length; i++) {\n if (this._map[i][0] === fnKey) {\n return this._map[i][1];\n }\n }\n return null;\n};\n\n/**\n * Returns the index of the wrapper for the supplied original function\n * if it exists in the FuncMap's mapping\n * @param {Function} fnKey - The original listener function\n * @return {number}\n */\nFuncMap.prototype.find = function(fnKey) {\n for (var i = 0; i < this._map.length; i++) {\n if (this._map[i][0] === fnKey) {\n return i;\n }\n }\n return -1;\n};\n\n/**\n * Returns the wrapped original listener function for the supplied original\n * listener function. If the wrapped original listener does not exist in\n * FuncMap's mapping it is added.\n * @param {Function} func - The original listener function\n * @param {Function} initter - The a function that returns a wrapped version\n * of the original listener function\n * @return {?Function}\n */\nFuncMap.prototype.add_or_get = function(func, initter) {\n var fnValue = this.get(func);\n if (!fnValue) {\n fnValue = initter();\n this.set(func, fnValue);\n }\n return fnValue;\n};\n\n/**\n * Removes the mapping of the original listener function to its wrapped counter part\n * @param {Function} func - The original listener function\n * @return {?Function}\n */\nFuncMap.prototype.remove = function(func) {\n var idx = this.find(func);\n if (idx >= 0) {\n var fnMapping = this._map.splice(idx, 1);\n return fnMapping[0][1];\n }\n return null;\n};\n\n/**\n * Calls all wrapped listener functions contained in the FuncMap's mapping\n * with the supplied param\n * @param {*} param\n */\nFuncMap.prototype.map = function(param) {\n for (var i = 0; i < this._map.length; i++) {\n this._map[i][1](param);\n }\n};\n\n;// ./node_modules/@webrecorder/wombat/src/wombatUtils.js\n/**\n * Ensures the supplied argument is a number or if it is not (can not be coerced to a number)\n * this function returns null.\n * @param {*} maybeNumber\n * @return {?number}\n */\nfunction ensureNumber(maybeNumber) {\n try {\n switch (typeof maybeNumber) {\n case 'number':\n case 'bigint':\n return maybeNumber;\n }\n var converted = Number(maybeNumber);\n return !isNaN(converted) ? converted : null;\n } catch (e) {}\n return null;\n}\n\n/**\n * Sets the supplied object's toStringTag IFF\n * self.Symbol && self.Symbol.toStringTag are defined\n * @param {Object} clazz\n * @param {string} tag\n */\nfunction addToStringTagToClass(clazz, tag) {\n if (\n typeof self.Symbol !== 'undefined' &&\n typeof self.Symbol.toStringTag !== 'undefined'\n ) {\n Object.defineProperty(clazz.prototype, self.Symbol.toStringTag, {\n value: tag,\n enumerable: false\n });\n }\n}\n\n/**\n * Binds every function this, except the constructor, of the supplied object\n * to the instance of the supplied object\n * @param {Object} clazz\n */\nfunction autobind(clazz) {\n var proto = clazz.__proto__ || clazz.constructor.prototype || clazz.prototype;\n var clazzProps = Object.getOwnPropertyNames(proto);\n var len = clazzProps.length;\n var prop;\n var propValue;\n for (var i = 0; i < len; i++) {\n prop = clazzProps[i];\n propValue = clazz[prop];\n if (prop !== 'constructor' && typeof propValue === 'function') {\n clazz[prop] = propValue.bind(clazz);\n }\n }\n}\n\n/**\n * Because we overriding specific interfaces (e.g. Storage) that do not expose\n * an constructor only an interface object with our own we must have a way\n * to indicate to our overrides when it is proper to throw exceptions\n * @type {{yes: boolean}}\n */\nvar ThrowExceptions = { yes: false };\n\n;// ./node_modules/@webrecorder/wombat/src/customStorage.js\n\n\nvar WOMBAT = Symbol('__wb__storage_WOMBAT');\nvar TYPE = Symbol('__wb__storage_TYPE');\n\n/**\n * A re-implementation of the Storage interface.\n * This re-implementation is required for replay in order to ensure\n * that web pages that require local or session storage work as expected as\n * there is sometimes a limit on the amount of storage space that can be used.\n * This re-implementation ensures that limit is unlimited as it would be in\n * the live-web.\n * @param {Wombat} wombat\n * @param {string} type\n * @param {object} initData\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Storage\n * @see https://html.spec.whatwg.org/multipage/webstorage.html#the-storage-interface\n */\nfunction Storage(wombat, type, initData) {\n if (ThrowExceptions.yes) {\n // there is no constructor exposed for this interface however there is an\n // interface object exposed, thus we must throw an TypeError if userland\n // attempts to create us\n throw new TypeError('Illegal constructor');\n }\n\n if (initData && initData.length) {\n for (var i = 0; i < initData.length; i++) {\n this[initData[i][0]] = initData[i][1].toString();\n }\n }\n\n Object.defineProperty(this, WOMBAT, {\n value: wombat,\n enumerable: false\n });\n\n Object.defineProperty(this, TYPE, {\n value: type,\n enumerable: false\n });\n\n var props = {};\n}\n\nfunction storageProxyHandler() {\n return {\n get: function(target, prop) {\n var proto = target.__proto__;\n\n if (prop === '__proto__') {\n return proto;\n }\n\n if (\n proto.hasOwnProperty(prop) ||\n (proto.__proto__ && proto.__proto__.hasOwnProperty(prop))\n ) {\n var res = target[prop];\n\n if (typeof res === 'function') {\n res = res.bind(target);\n }\n\n return res;\n }\n\n return target.hasOwnProperty(prop) ? target.getItem(prop) : undefined;\n },\n\n set: function(target, prop, value) {\n if (target.__proto__.hasOwnProperty(prop)) {\n target[prop] = value;\n return true;\n }\n\n target.setItem(prop, value);\n return true;\n }\n };\n}\n\nfunction createStorage(wombat, type, initData) {\n var storage = new Storage(wombat, type, initData);\n\n if (wombat.$wbwindow.Proxy) {\n storage = new wombat.$wbwindow.Proxy(storage, storageProxyHandler());\n }\n\n wombat.defGetterProp(wombat.$wbwindow, type, function() {\n return storage;\n });\n\n return storage;\n}\n\n/**\n * When passed a key name, will return that key's value\n * @param {string} name\n * @return {*}\n */\nStorage.prototype.getItem = function getItem(name) {\n return this.hasOwnProperty(name) ? this[name] : null;\n};\n\n/**\n * When passed a key name and value, will add that key to the storage,\n * or update that key's value if it already exists\n * @param {string} name\n * @param {*} value\n * @return {*}\n */\nStorage.prototype.setItem = function setItem(name, value) {\n var sname = String(name);\n var svalue = String(value);\n var old = this.getItem(sname);\n this[sname] = value;\n this.fireEvent(sname, old, svalue);\n return undefined;\n};\n\nStorage.prototype._deleteItem = function(item) {\n delete this[item];\n};\n\n/**\n * When passed a key name, will remove that key from the storage\n * @param {string} name\n * @return {undefined}\n */\nStorage.prototype.removeItem = function removeItem(name) {\n var old = this.getItem(name);\n this._deleteItem(name);\n this.fireEvent(name, old, null);\n return undefined;\n};\n\n/**\n * When invoked, will empty all keys out of the storage\n * @return {undefined}\n */\nStorage.prototype.clear = function clear() {\n for (var member in this) {\n delete this[member];\n }\n\n this.fireEvent(null, null, null);\n return undefined;\n};\n\n/**\n * When passed a number n, this method will return the name of the nth key in the storage\n * @param {number} index\n * @return {*}\n */\nStorage.prototype.key = function key(index) {\n var n = ensureNumber(index);\n if (n == null || n < 0) return null;\n var keys = Object.keys(this);\n if (n < keys.length) return keys[n];\n return null;\n};\n\n/**\n * Because we are re-implementing the storage interface we must fire StorageEvent\n * ourselves, this function does just that.\n * @param {?string} key\n * @param {*} oldValue\n * @param {*} newValue\n * @see https://html.spec.whatwg.org/multipage/webstorage.html#send-a-storage-notification\n */\nStorage.prototype.fireEvent = function fireEvent(key, oldValue, newValue) {\n var sevent = new StorageEvent('storage', {\n key: key,\n newValue: newValue,\n oldValue: oldValue,\n url: this[WOMBAT].$wbwindow.WB_wombat_location.href\n });\n // storage is a read only property of StorageEvent\n // that must be on the fired instance of the event\n Object.defineProperty(sevent, 'storageArea', {\n value: this,\n writable: false,\n configurable: false\n });\n sevent._storageArea = this;\n this[WOMBAT].storage_listeners.map(sevent);\n};\n\n/**\n * An override of the valueOf function that returns wombat's Proxy for the\n * specific storage this class is for, either local or session storage.\n * @return {Proxy<Storage>}\n */\nStorage.prototype.valueOf = function valueOf() {\n return this[WOMBAT].$wbwindow[this[TYPE]];\n};\n\n/**\n * An override of toString to return '[object Storage]'\n **/\nStorage.prototype.toString = function() {\n return '[object Storage]';\n};\n\n// the length getter is on the prototype (__proto__ modern browsers)\nObject.defineProperty(Storage.prototype, 'length', {\n enumerable: false,\n get: function length() {\n return Object.keys(this).length;\n }\n});\n\naddToStringTagToClass(Storage, 'Storage');\n\n;// ./node_modules/@webrecorder/wombat/src/wombatLocation.js\n/* eslint-disable camelcase */\n\n\n/**\n * A re-implementation of the Location interface that ensure that operations\n * on the location interface behaves as expected during replay.\n * @param {Location} orig_loc\n * @param {Wombat} wombat\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Location\n * @see https://html.spec.whatwg.org/multipage/browsers.html#the-location-interface\n */\nfunction WombatLocation(orig_loc, wombat) {\n // hide our values from enumeration, spreed, et al\n Object.defineProperties(this, {\n _orig_loc: {\n configurable: true,\n enumerable: false,\n value: orig_loc\n },\n wombat: {\n configurable: true,\n enumerable: false,\n value: wombat\n },\n orig_getter: {\n enumerable: false,\n value: function(prop) {\n return this._orig_loc[prop];\n }\n },\n orig_setter: {\n enumerable: false,\n value: function(prop, value) {\n if (this._orig_loc[prop] != value) {\n this._orig_loc[prop] = value;\n }\n }\n }\n });\n\n wombat.initLocOverride(this, this.orig_setter, this.orig_getter);\n\n wombat.setLoc(this, orig_loc.href);\n\n for (var prop in orig_loc) {\n if (!this.hasOwnProperty(prop) && typeof orig_loc[prop] !== 'function') {\n this[prop] = orig_loc[prop];\n }\n }\n}\n\n/**\n * Replaces the current resource with the one at the provided URL.\n * The difference from the assign() method is that after using replace() the\n * current page will not be saved in session History, meaning the user won't\n * be able to use the back button to navigate to it.\n * @param {string} url\n * @return {*}\n */\nWombatLocation.prototype.replace = function replace(url) {\n var new_url = this.wombat.rewriteUrl(url);\n var orig = this.wombat.extractOriginalURL(new_url);\n if (orig === this.href) {\n return orig;\n }\n return this._orig_loc.replace(new_url);\n};\n\n/**\n * Loads the resource at the URL provided in parameter\n * @param {string} url\n * @return {*}\n */\nWombatLocation.prototype.assign = function assign(url) {\n var new_url = this.wombat.rewriteUrl(url);\n var orig = this.wombat.extractOriginalURL(new_url);\n if (orig === this.href) {\n return orig;\n }\n return this._orig_loc.assign(new_url);\n};\n\n/**\n * Reloads the resource from the current URL. Its optional unique parameter\n * is a Boolean, which, when it is true, causes the page to always be reloaded\n * from the server. If it is false or not specified, the browser may reload\n * the page from its cache.\n * @param {boolean} [forcedReload = false]\n * @return {*}\n */\nWombatLocation.prototype.reload = function reload(forcedReload) {\n //return this._orig_loc.reload(forcedReload || false);\n return;\n};\n\n/**\n * @return {string}\n */\nWombatLocation.prototype.toString = function toString() {\n return this.href;\n};\n\n/**\n * @return {WombatLocation}\n */\nWombatLocation.prototype.valueOf = function valueOf() {\n return this;\n};\n\naddToStringTagToClass(WombatLocation, 'Location');\n\n;// ./node_modules/@webrecorder/wombat/src/autoFetcher.js\n/* eslint-disable camelcase */\n\n\n/**\n * Create a new instance of AutoFetcher\n * @param {Wombat} wombat\n * @param {{isTop: boolean, workerURL: string}} config\n */\nfunction AutoFetcher(wombat, config) {\n if (!(this instanceof AutoFetcher)) {\n return new AutoFetcher(wombat, config);\n }\n // specifically target the elements we desire\n this.elemSelector =\n 'img[srcset], img[data-srcset], img[data-src], video[srcset], video[data-srcset], video[data-src], audio[srcset], audio[data-srcset], audio[data-src], ' +\n 'picture > source[srcset], picture > source[data-srcset], picture > source[data-src], ' +\n 'video > source[srcset], video > source[data-srcset], video > source[data-src], ' +\n 'audio > source[srcset], audio > source[data-srcset], audio > source[data-src]';\n\n /** @type {Wombat} */\n this.wombat = wombat;\n /** @type {Window} */\n this.$wbwindow = wombat.$wbwindow;\n\n /** @type {?Worker|Object} */\n this.worker = null;\n autobind(this);\n this._initWorker(config);\n}\n\n/**\n * Initializes the backing worker IFF the execution context we are in is\n * the replay tops otherwise creates a dummy worker that simply bounces the\n * message that would have been sent to the backing worker to replay top.\n *\n * If creation of the worker fails, likely due to the execution context we\n * are currently in having an null origin, we fallback to dummy worker creation.\n * @param {{isTop: boolean, workerURL: string}} config\n * @private\n */\nAutoFetcher.prototype._initWorker = function(config) {\n var wombat = this.wombat;\n if (config.isTop) {\n // we are top and can will own this worker\n // setup URL for the kewl case\n // Normal replay and preservation mode pworker setup, its all one origin so YAY!\n try {\n this.worker = new Worker(config.workerURL, {\n type: 'classic',\n credentials: 'include'\n });\n } catch (e) {\n // it is likely we are in some kind of horrid iframe setup\n // and the execution context we are currently in has a null origin\n console.error('Failed to create auto fetch worker\\n', e);\n }\n return;\n }\n\n // add only the portions of the worker interface we use since we are not top\n // and if in proxy mode start check polling\n this.worker = {\n postMessage: function(msg) {\n if (!msg.wb_type) {\n msg = { wb_type: 'aaworker', msg: msg };\n }\n wombat.$wbwindow.__WB_replay_top.__orig_postMessage(msg, '*');\n },\n terminate: function() {}\n };\n};\n\n/**\n * Extracts the media rules from the supplied CSSStyleSheet object if any\n * are present and returns an array of the media cssText\n * @param {CSSStyleSheet} sheet\n * @return {Array<string>}\n */\nAutoFetcher.prototype.extractMediaRulesFromSheet = function(sheet) {\n var rules;\n var media = [];\n try {\n rules = sheet.cssRules || sheet.rules;\n } catch (e) {\n return media;\n }\n\n // loop through each rule of the stylesheet\n for (var i = 0; i < rules.length; ++i) {\n var rule = rules[i];\n if (rule.type === CSSRule.MEDIA_RULE) {\n // we are a media rule so get its text\n media.push(rule.cssText);\n }\n }\n return media;\n};\n\n/**\n * Extracts the media rules from the supplied CSSStyleSheet object if any\n * are present after a tick of the event loop sending the results of the\n * extraction to the backing worker\n * @param {CSSStyleSheet|StyleSheet} sheet\n */\nAutoFetcher.prototype.deferredSheetExtraction = function(sheet) {\n var afw = this;\n // defer things until next time the Promise.resolve Qs are cleared\n Promise.resolve().then(function() {\n // loop through each rule of the stylesheet\n var media = afw.extractMediaRulesFromSheet(sheet);\n if (media.length > 0) {\n // we have some media rules to preserve\n afw.preserveMedia(media);\n }\n });\n};\n\n/**\n * Terminates the backing worker. This is a no op when we are not\n * operating in the execution context of replay top\n */\nAutoFetcher.prototype.terminate = function() {\n // terminate the worker, a no op when not replay top\n this.worker.terminate();\n};\n\n/**\n * Sends the supplied array of URLs to the backing worker\n * @param {Array<string>} urls\n */\nAutoFetcher.prototype.justFetch = function(urls) {\n this.worker.postMessage({ type: 'fetch-all', values: urls });\n};\n\n/**\n * Sends the supplied url with extra options to indicate\n * that this is a page to backing worker\n * @param {string} url\n * @param {string} originalUrl\n * @param {string} [title]\n */\nAutoFetcher.prototype.fetchAsPage = function(url, originalUrl, title) {\n if (!url) {\n return;\n }\n\n var headers = { 'X-Wombat-History-Page': originalUrl };\n if (title) {\n var encodedTitle = encodeURIComponent(title.trim());\n if (title) {\n headers['X-Wombat-History-Title'] = encodedTitle;\n }\n }\n\n var fetchData = {\n url: url,\n options: { headers: headers, cache: 'no-store' }\n };\n\n this.justFetch([fetchData]);\n};\n\n/**\n * Sends a message to backing worker. If deferred is true\n * the message is sent after one tick of the event loop\n * @param {Object} msg\n * @param {boolean} [deferred]\n */\nAutoFetcher.prototype.postMessage = function(msg, deferred) {\n if (deferred) {\n var afWorker = this;\n Promise.resolve().then(function() {\n afWorker.worker.postMessage(msg);\n });\n return;\n }\n this.worker.postMessage(msg);\n};\n\n/**\n * Sends the supplied srcset value to the backing worker for preservation\n * @param {string|Array<string>} srcset\n * @param {string} [mod]\n */\nAutoFetcher.prototype.preserveSrcset = function(srcset, mod) {\n // send values from rewriteSrcset to the worker\n this.postMessage(\n {\n type: 'values',\n srcset: { value: srcset, mod: mod, presplit: true }\n },\n true\n );\n};\n\n/**\n * Send the value of the supplied elements data-srcset attribute to the\n * backing worker for preservation\n * @param {Node} elem\n */\nAutoFetcher.prototype.preserveDataSrcset = function(elem) {\n // send values from rewriteAttr srcset to the worker deferred\n // to ensure the page viewer sees the images first\n this.postMessage(\n {\n type: 'values',\n srcset: {\n value: elem.dataset.srcset,\n mod: this.rwMod(elem),\n presplit: false\n }\n },\n true\n );\n};\n\n/**\n * Sends the supplied array of cssText from media rules to the backing worker\n * @param {Array<string>} media\n */\nAutoFetcher.prototype.preserveMedia = function(media) {\n // send CSSMediaRule values to the worker\n this.postMessage({ type: 'values', media: media }, true);\n};\n\n/**\n * Extracts the value of the srcset property if it exists from the supplied\n * element\n * @param {Element} elem\n * @return {?string}\n */\nAutoFetcher.prototype.getSrcset = function(elem) {\n if (this.wombat.wb_getAttribute) {\n return this.wombat.wb_getAttribute.call(elem, 'srcset');\n }\n return elem.getAttribute('srcset');\n};\n\n/**\n * Returns the correct rewrite modifier for the supplied element\n * @param {Element} elem\n * @return {string}\n */\nAutoFetcher.prototype.rwMod = function(elem) {\n switch (elem.tagName) {\n case 'SOURCE':\n if (elem.parentElement && elem.parentElement.tagName === 'PICTURE') {\n return 'im_';\n }\n return 'oe_';\n case 'IMG':\n return 'im_';\n }\n return 'oe_';\n};\n\n/**\n * Extracts the media rules from stylesheets and the (data-)srcset URLs from\n * image elements the current context's document contains\n */\nAutoFetcher.prototype.extractFromLocalDoc = function() {\n // get the values to be preserved from the documents stylesheets\n // and all img, video, audio elements with (data-)?srcset or data-src\n var afw = this;\n Promise.resolve().then(function() {\n var msg = {\n type: 'values',\n context: { docBaseURI: document.baseURI }\n };\n var media = [];\n var i = 0;\n var sheets = document.styleSheets;\n for (; i < sheets.length; ++i) {\n media = media.concat(afw.extractMediaRulesFromSheet(sheets[i]));\n }\n var elems = document.querySelectorAll(afw.elemSelector);\n var srcset = { values: [], presplit: false };\n var src = { values: [] };\n var elem, srcv, mod;\n for (i = 0; i < elems.length; ++i) {\n elem = elems[i];\n // we want the original src value in order to resolve URLs in the worker when needed\n srcv = elem.src ? elem.src : null;\n // a from value of 1 indicates images and a 2 indicates audio/video\n mod = afw.rwMod(elem);\n if (elem.srcset) {\n srcset.values.push({\n srcset: afw.getSrcset(elem),\n mod: mod,\n tagSrc: srcv\n });\n }\n if (elem.dataset.srcset) {\n srcset.values.push({\n srcset: elem.dataset.srcset,\n mod: mod,\n tagSrc: srcv\n });\n }\n if (elem.dataset.src) {\n src.values.push({ src: elem.dataset.src, mod: mod });\n }\n if (elem.tagName === 'SOURCE' && srcv) {\n src.values.push({ src: srcv, mod: mod });\n }\n }\n if (media.length) {\n msg.media = media;\n }\n if (srcset.values.length) {\n msg.srcset = srcset;\n }\n if (src.values.length) {\n msg.src = src;\n }\n if (msg.media || msg.srcset || msg.src) {\n afw.postMessage(msg);\n }\n });\n};\n\n;// ./node_modules/@webrecorder/wombat/src/syncxhr.js\nclass SyncXHRCache {\n constructor(wombat, orig_url, args, headers) {\n this.syncXHRCachePending = wombat.syncXHRCachePending;\n this.url = args[1];\n this.method = args[0];\n this.headers = headers;\n this.store = wombat.__sessionStorage;\n this.key = this.getKey(orig_url, wombat);\n this.win = wombat.$wbwindow;\n this.reload_url =\n wombat.wb_info.prefix +\n wombat.wb_info.request_ts +\n 'mp_/' +\n wombat.wb_info.url;\n this.throwNeeded = false;\n this.wombat = wombat;\n }\n\n getKey(orig_url, wombat) {\n const url = new URL(orig_url, wombat.$wbwindow.WB_wombat_location.origin);\n for (const name of url.searchParams.keys()) {\n if (name.startsWith('_')) {\n url.searchParams.delete(name);\n }\n }\n return url.href;\n //return wombat.wb_info.timestamp + '/ ' + url.href;\n }\n\n addToStorage(hash, dataUri) {\n if (!this.store.getItem('__wb_xhr_data:hash:' + hash)) {\n this.store.setItem('__wb_xhr_data:hash:' + hash, dataUri);\n }\n this.store.setItem('__wb_xhr_data:url:' + this.key, hash);\n this.syncXHRCachePending.delete(this.key);\n }\n\n getFromStorage() {\n if (!this.store) {\n return;\n }\n const hash = this.store.getItem('__wb_xhr_data:url:' + this.key);\n if (!hash) {\n return;\n }\n return this.store.getItem('__wb_xhr_data:hash:' + hash);\n }\n\n async fetchToBlob() {\n const url = this.url;\n const method = this.method;\n const headers = {\n ...this.headers,\n 'X-Pywb-Requested-With': 'XMLHttpRequest'\n };\n const resp = await fetch(url, { method, headers });\n const blob = await resp.blob();\n\n // use etag if available\n let hash = resp.headers.get('x-archive-orig-etag');\n if (!hash) {\n try {\n const buff = await crypto.subtle.digest(\n 'SHA-1',\n await blob.arrayBuffer()\n );\n const hashArray = Array.from(new Uint8Array(buff));\n hash = hashArray.map(b => b.toString(16).padStart(2, '0')).join('');\n } catch (e) {\n console.log(e);\n return;\n }\n }\n\n // convert to data URI using FileReader.readAsDataURL()\n const dataUri = await new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n resolve(reader.result);\n };\n reader.onerror = reject;\n reader.readAsDataURL(blob);\n });\n\n if (!this.store) {\n this.syncXHRCachePending.delete(this.key);\n return;\n }\n\n try {\n this.addToStorage(hash, dataUri);\n } catch (e) {\n if (e.name === 'QuotaExceededError') {\n for (const key of Array.from(Object.keys(this.store))) {\n if (key.startsWith('__wb_xhr_data:')) {\n this.store.removeItem(key);\n }\n }\n }\n this.addToStorage(hash, dataUri);\n }\n\n if (this.wombat.syncXHRReloadNeeded && !this.syncXHRCachePending.size) {\n this.win.location.href = this.reload_url;\n }\n }\n\n addCacheOverride(xhr) {\n const dataUri = this.getFromStorage();\n if (dataUri) {\n xhr.__WB_xhr_open_arguments[1] = dataUri;\n xhr.__WB_xhr_open_arguments[0] = 'GET';\n return true;\n }\n\n this.syncXHRCachePending.add(this.key);\n this.fetchPromise = this.fetchToBlob().catch(e => console.log(e));\n this.throwNeeded = true;\n }\n\n async finishCacheAndReload() {\n if (!this.fetchPromise) {\n return;\n }\n this.wombat.syncXHRReloadNeeded = true;\n await this.fetchPromise;\n\n if (!this.syncXHRCachePending.size) {\n this.win.location.href = this.reload_url;\n }\n }\n\n reloadIfNeeded() {\n if (this.throwNeeded) {\n this.finishCacheAndReload().catch(e => console.log(e));\n throw new DOMException('NetworkError', 'Sync XHR not allowed');\n }\n }\n}\n\n;// ./node_modules/@webrecorder/wombat/src/listeners.js\n/* eslint-disable camelcase */\n\n/**\n *\n * @param {Function} origListener\n * @param {Window} win\n * @return {Function}\n */\nfunction wrapSameOriginEventListener(origListener, win) {\n return function wrappedSameOriginEventListener(event) {\n if (window != win) {\n return;\n }\n return origListener(event);\n };\n}\n\n/**\n * @param {Function} origListener\n * @param {Object} obj\n * @param {Wombat} wombat\n * @return {Function}\n */\nfunction wrapEventListener(origListener, obj, wombat) {\n var origListenerFunc;\n\n // if a function, just use that\n if (typeof origListener === 'function') {\n origListenerFunc = origListener;\n // if an EventHandler object, use its handleEvent() bound method\n } else if (typeof origListener === 'object') {\n origListenerFunc = origListener.handleEvent.bind(origListener);\n // else do nothing!\n } else {\n origListenerFunc = function() {};\n }\n\n return function wrappedEventListener(event) {\n var ne;\n\n if (event.data && event.data.from && event.data.message) {\n if (\n event.data.to_origin !== '*' &&\n obj.WB_wombat_location &&\n !wombat.startsWith(event.data.to_origin, obj.WB_wombat_location.origin)\n ) {\n console.warn(\n 'Skipping message event to ' +\n event.data.to_origin +\n ' doesn\\'t start with origin ' +\n obj.WB_wombat_location.origin\n );\n return;\n }\n\n var source = event.source;\n\n if (event.data.from_top) {\n source = obj.__WB_top_frame;\n } else if (\n event.data.src_id &&\n obj.__WB_win_id &&\n obj.__WB_win_id[event.data.src_id]\n ) {\n source = obj.__WB_win_id[event.data.src_id];\n }\n\n ne = new MessageEvent('message', {\n bubbles: event.bubbles,\n cancelable: event.cancelable,\n data: event.data.message,\n origin: event.data.from,\n lastEventId: event.lastEventId,\n source: wombat.proxyToObj(source),\n ports: event.ports\n });\n\n ne._target = event.target;\n ne._srcElement = event.srcElement;\n ne._currentTarget = event.currentTarget;\n ne._eventPhase = event.eventPhase;\n } else {\n ne = event;\n }\n\n return origListenerFunc(ne);\n };\n}\n\n;// ./node_modules/warcio/dist/utils.js\nfunction y(t){let e;typeof t==\"string\"?e=t:t?.length?e=t.reduce((r,o)=>(r+=String.fromCharCode(o),r),\"\"):t?e=t.toString():e=\"\";try{return\"__wb_post_data=\"+btoa(e)}catch{return\"__wb_post_data=\"}}function R(t){try{if(!t.startsWith(\"https:\")&&!t.startsWith(\"http:\"))return t;t=t.replace(/^(https?:\\/\\/)www\\d*\\./,\"$1\");let e=t.toLowerCase(),r=new URL(e),s=r.hostname.split(\".\").reverse().join(\",\");if(r.port&&(s+=\":\"+r.port),s+=\")\",s+=r.pathname,r.search){let u=r.search.slice(1).split(\"&\");u.sort(),s+=\"?\"+u.join(\"&\")}return s}catch{return t}}function b(t,e=0){let{method:r,headers:o,postData:s=\"\"}=t;if(r===\"GET\")return!1;let n=(c=>{let d=c.get(\"content-type\");if(d)return d;if(!(c instanceof Headers)){for(let[g,U]of c.entries())if(g&&g.toLowerCase()===\"content-type\")return U}return\"\"})(o),f=n.split(\";\")[0];function a(c){return c instanceof Uint8Array&&(c=new TextDecoder().decode(c)),c}let i=\"\";switch(f){case\"application/x-www-form-urlencoded\":i=a(s);break;case\"application/json\":i=p(a(s));break;case\"text/plain\":try{i=p(a(s),!1)}catch{i=y(s)}break;case\"multipart/form-data\":{if(!n)throw new Error(\"utils cannot call postToGetURL when missing content-type header\");i=x(a(s),n);break}default:i=y(s)}if(i!=null){e>0&&i.length>e&&(i=i.slice(0,e)),t.requestBody=i;try{i=decodeURI(i)}catch{i=\"\"}return t.url=m(t.url,i,t.method),t.method=\"GET\",!0}return!1}function m(t,e,r){if(!r)return t;let o=t.indexOf(\"?\")>0?\"&\":\"?\";return`${t}${o}__wb_method=${r}&${e}`}function _(t,e=!0){if(typeof t==\"string\")try{t=JSON.parse(t)}catch{t={}}let r=new URLSearchParams,o={},s=n=>r.has(n)?(n in o||(o[n]=1),n+\".\"+ ++o[n]+\"_\"):n,u=(n,f=\"\")=>{let a=\"\";if(typeof n==\"object\"&&!(n instanceof Array))try{for(let[i,c]of Object.entries(n))u(c,i)}catch{n===null&&(a=\"null\")}else if(n instanceof Array)for(let i=0;i<n.length;i++)u(n[i],f);[\"string\",\"number\",\"boolean\"].includes(typeof n)&&(a=n.toString()),a&&r.set(s(f),a)};try{u(t)}catch(n){if(!e)throw n}return r}function A(t=\"\",e){let r=new URLSearchParams;t instanceof Uint8Array&&(t=new TextDecoder().decode(t));try{let o=e.split(\"boundary=\")[1],s=t.split(new RegExp(\"-*\"+o+\"-*\",\"mi\"));for(let u of s){let n=u.trim().match(/name=\"([^\"]+)\"\\r\\n\\r\\n(.*)/im);n&&r.set(n[1],n[2])}}catch{}return r}function p(t=\"\",e=!0){return _(t,e).toString()}function x(t,e){return A(t,e).toString()}function C(t,e){if(t.length===1)return t[0];let r=new Uint8Array(e),o=0;for(let s of t)r.set(s,o),o+=s.byteLength;return r}function S(t,e){return[t.slice(0,e),t.slice(e)]}var T=[\"warc-concurrent-to\",\"warc-protocol\"],V=[\"warc-json-metadata\"],l=\",,,\";function h(t){let e=t.toLowerCase();if(e.startsWith(\"warc-\")&&!T.includes(e))throw new Error(\"Invalid multi value WARC header: \"+t);return!0}var w=class extends Map{constructor(e){if(e instanceof Array){super();for(let r of e)if(r instanceof Array){let o=r[0],s=r[1];this.append(o,s)}}else super(e?Object.entries(e):void 0)}isMultiValue(e,r){return V.includes(e.toLowerCase())?!1:r.indexOf(l)>0&&h(e)}getMultiple(e){let r=super.get(e);if(r)return this.isMultiValue(e,r)?r.split(l):[r]}append(e,r){let o=this.get(e);o?(h(e),this.set(e,o+l+r)):this.set(e,r)}*[Symbol.iterator](){for(let[e,r]of super[Symbol.iterator]())if(this.isMultiValue(e,r))for(let o of r.split(l))yield[e,o];else yield[e,r]}};\n\n;// ./node_modules/@webrecorder/wombat/src/wombat.js\n/* eslint-disable camelcase */\n\n\n\n\n\n\n\n\n\n\n/**\n * @param {Window} $wbwindow\n * @param {Object} wbinfo\n */\nfunction Wombat($wbwindow, wbinfo) {\n if (!(this instanceof Wombat)) return new Wombat($wbwindow, wbinfo);\n\n /** @type {boolean} */\n this.debug_rw = false;\n\n /** @type {Window} */\n this.$wbwindow = $wbwindow;\n this.WBWindow = Window;\n this.URL = URL;\n\n this.origHost = $wbwindow.location.host;\n this.origHostname = $wbwindow.location.hostname;\n this.origProtocol = $wbwindow.location.protocol;\n\n /** @type {string} */\n this.HTTP_PREFIX = 'http://';\n\n /** @type {string} */\n this.HTTPS_PREFIX = 'https://';\n\n /** @type {string} */\n this.REL_PREFIX = '//';\n\n /** @type {Array<string>} */\n this.VALID_PREFIXES = [this.HTTP_PREFIX, this.HTTPS_PREFIX, this.REL_PREFIX];\n\n /** @type {Array<string>} */\n this.IGNORE_PREFIXES = [\n '#',\n 'about:',\n 'data:',\n 'blob:',\n 'mailto:',\n 'javascript:',\n '{',\n '*'\n ];\n if ('ignore_prefixes' in wbinfo) {\n this.IGNORE_PREFIXES = this.IGNORE_PREFIXES.concat(wbinfo.ignore_prefixes);\n }\n\n this.WB_CHECK_THIS_FUNC = '_____WB$wombat$check$this$function_____';\n this.WB_ASSIGN_FUNC = '_____WB$wombat$assign$function_____';\n\n this.SKIP_OWN_FUNC_PROPS = [\n 'name',\n 'length',\n '__WB_is_native_func__',\n 'arguments',\n 'caller',\n 'callee',\n 'prototype'\n ];\n\n this.OVERRIDE_PROPS = [\n 'window',\n 'self',\n 'document',\n 'location',\n 'top',\n 'parent',\n 'frames',\n 'opener'\n ];\n\n /** @type {function(qualifiedName: string, value: string): void} */\n this.wb_setAttribute = $wbwindow.Element.prototype.setAttribute;\n\n /** @type {function(qualifiedName: string): ?string} */\n this.wb_getAttribute = $wbwindow.Element.prototype.getAttribute;\n\n /** @type {function(): string} */\n this.wb_funToString = Function.prototype.toString;\n\n /** @type {AutoFetcher} */\n this.WBAutoFetchWorker = null;\n\n /** @type {boolean} */\n this.wbUseAFWorker =\n wbinfo.enable_auto_fetch && $wbwindow.Worker != null && wbinfo.is_live;\n\n /** @type {string} */\n this.wb_rel_prefix = '';\n\n /** @type {boolean} */\n this.wb_wombat_updating = false;\n\n /** @type {FuncMap} */\n this.message_listeners = new FuncMap();\n\n /** @type {FuncMap} */\n this.storage_listeners = new FuncMap();\n\n /**\n * rewrite modifiers for <link href=\"URL\" rel=\"import|preload\" as=\"x\">\n * expressed as as-value -> modifier\n * @type {Object}\n */\n this.linkAsTypes = {\n script: 'js_',\n worker: 'js_',\n style: 'cs_',\n image: 'im_',\n document: 'if_',\n fetch: 'mp_',\n font: 'oe_',\n audio: 'oe_',\n video: 'oe_',\n embed: 'oe_',\n object: 'oe_',\n track: 'oe_',\n // the following cover the default case\n '': 'mp_',\n null: 'mp_',\n undefined: 'mp_'\n };\n\n /**\n * rewrite modifiers for <link href=\"URL\" rel=\"x\"> and or\n * <link href=\"URL\" rel=\"x\" as=\"y\"> expressed as a mapping of\n * rel -> modifier or rel -> as -> modifier\n * @type {Object}\n */\n this.linkTagMods = {\n linkRelToAs: {\n import: this.linkAsTypes,\n preload: this.linkAsTypes\n },\n stylesheet: 'cs_',\n // the following cover the default case\n null: 'mp_',\n undefined: 'mp_',\n '': 'mp_'\n };\n\n /**\n * pre-computed modifiers for each tag\n * @type {Object}\n */\n this.tagToMod = {\n A: { href: 'mp_' },\n AREA: { href: 'mp_' },\n AUDIO: { src: 'oe_', poster: 'im_' },\n BASE: { href: 'mp_' },\n EMBED: { src: 'oe_' },\n FORM: { action: 'mp_' },\n FRAME: { src: 'fr_' },\n IFRAME: { src: 'if_' },\n IMAGE: { href: 'im_', 'xlink:href': 'im_' },\n IMG: { src: 'im_', srcset: 'im_' },\n INPUT: { src: 'oe_' },\n INS: { cite: 'mp_' },\n META: { content: 'mp_' },\n OBJECT: { data: 'oe_', codebase: 'oe_' },\n Q: { cite: 'mp_' },\n // covers both HTML and SVG script element,\n SCRIPT: { src: 'js_', 'xlink:href': 'js_' },\n SOURCE: { src: 'oe_', srcset: 'oe_' },\n TRACK: { src: 'oe_' },\n VIDEO: { src: 'oe_', poster: 'im_' },\n image: { href: 'im_', 'xlink:href': 'im_' }\n };\n\n /** @type {Array<string>} */\n this.URL_PROPS = [\n 'href',\n 'hash',\n 'pathname',\n 'host',\n 'hostname',\n 'protocol',\n 'origin',\n 'search',\n 'port'\n ];\n\n /** @type {Object} */\n this.wb_info = wbinfo;\n\n /**\n * custom options\n * @type {Object}\n */\n this.wb_opts = wbinfo.wombat_opts;\n\n /** @type {string} */\n this.wb_replay_prefix = wbinfo.prefix;\n\n /** @type {boolean} */\n this.wb_is_proxy = this.wb_info.proxy_magic || !this.wb_replay_prefix;\n\n /** @type {string} */\n this.wb_info.top_host = this.wb_info.top_host || '*';\n\n /** @type {string} */\n this.wb_curr_host =\n $wbwindow.location.protocol + '//' + $wbwindow.location.host;\n\n /** @type {Object} */\n this.wb_info.wombat_opts = this.wb_info.wombat_opts || {};\n\n /** @type {string} */\n this.wb_orig_scheme = this.wb_info.wombat_scheme + '://';\n /** @type {string} */\n this.wb_orig_origin = this.wb_orig_scheme + this.wb_info.wombat_host;\n\n /** @type {string} */\n this.wb_abs_prefix = this.wb_replay_prefix;\n\n /** @type {string} */\n this.wb_capture_date_part = '';\n if (!this.wb_info.is_live && this.wb_info.wombat_ts) {\n this.wb_capture_date_part = '/' + this.wb_info.wombat_ts + '/';\n }\n\n /** @type {Array<string>} */\n this.BAD_PREFIXES = [\n 'http:' + this.wb_replay_prefix,\n 'https:' + this.wb_replay_prefix,\n 'http:/' + this.wb_replay_prefix,\n 'https:/' + this.wb_replay_prefix\n ];\n\n /** @type {RegExp} */\n this.hostnamePortRe = /^[\\w-]+(\\.[\\w-_]+)+(:\\d+)(\\/|$)/;\n\n /** @type {RegExp} */\n this.ipPortRe = /^\\d+\\.\\d+\\.\\d+\\.\\d+(:\\d+)?(\\/|$)/;\n\n /** @type {RegExp} */\n this.workerBlobRe = /__WB_pmw\\(.*?\\)\\.(?=postMessage\\()/g;\n /** @type {RegExp} */\n this.rmCheckThisInjectRe = /_____WB\\$wombat\\$check\\$this\\$function_____\\(.*?\\)/g;\n\n /** @type {RegExp} */\n this.STYLE_REGEX = /(url\\s*\\(\\s*[\\\\\"']*)([^)'\"]+)([\\\\\"']*\\s*\\)?)/gi;\n\n /** @type {RegExp} */\n this.IMPORT_REGEX = /(@import\\s*[\\\\\"']*)([^)'\";]+)([\\\\\"']*\\s*;?)/gi;\n\n /** @type {RegExp} */\n this.IMPORT_JS_REGEX = /^(import\\s*\\(['\"]+)([^'\"]+)([\"'])/i;\n\n /** @type {RegExp} */\n this.IMPORT_JS_CALL = /[^$.]\\bimport\\s*\\(/g;\n\n /** @type {RegExp} */\n this.no_wombatRe = /WB_wombat_/g;\n\n /** @type {RegExp} */\n this.srcsetRe = /\\s*(\\S*\\s+[\\d.]+[wx]),|(?:\\s*,(?:\\s+|(?=https?:)))/;\n\n /** @type {RegExp} */\n this.cookie_path_regex = /\\bPath='?\"?([^;'\"\\s]+)/i;\n\n /** @type {RegExp} */\n this.cookie_domain_regex = /\\bDomain=([^;'\"\\s]+)/i;\n\n /** @type {RegExp} */\n this.cookie_expires_regex = /\\bExpires=([^;'\"]+)/gi;\n\n /** @type {RegExp} */\n this.SetCookieRe = /,(?![|])/;\n\n /** @type {RegExp} */\n this.IP_RX = /^(\\d)+\\.(\\d)+\\.(\\d)+\\.(\\d)+$/;\n\n /** @type {RegExp} */\n this.REPLACE_MOD = /(\\/[\\d]*)([\\w]+_)(?=\\/)/;\n\n /** @type {RegExp} */\n this.FullHTMLRegex = /^\\s*<(?:html|head|body|frameset|frame|!doctype html)/i;\n\n /** @type {RegExp} */\n this.IsTagRegex = /^\\s*</;\n\n /** @type {RegExp} */\n this.DotPostMessageRe = /(\\.postMessage\\s*\\()/;\n\n /** @type {RegExp} */\n this.extractPageUnderModifierRE = /\\/(?:[0-9]{14})?([a-z]{2, 3}_)\\//;\n\n /** @type {string} */\n this.write_buff = '';\n\n var eTargetProto = ($wbwindow.EventTarget || {}).prototype;\n /** @type {Object} */\n this.utilFns = {\n cspViolationListener: function(e) {\n console.group('CSP Violation');\n console.log('Replayed Page URL', window.WB_wombat_location.href);\n console.log('The documentURI', e.documentURI);\n console.log('The blocked URL', e.blockedURI);\n console.log('The directive violated', e.violatedDirective);\n console.log('Our policy', e.originalPolicy);\n if (e.sourceFile) {\n var fileInfo = 'File: ' + e.sourceFile;\n if (e.lineNumber && e.columnNumber) {\n fileInfo += ' @ ' + e.lineNumber + ':' + e.columnNumber;\n } else if (e.lineNumber) {\n fileInfo += ' @ ' + e.lineNumber;\n }\n console.log(fileInfo);\n }\n console.groupEnd();\n },\n addEventListener: eTargetProto.addEventListener,\n removeEventListener: eTargetProto.removeEventListener,\n // some sites do funky things with the toString function\n // (e.g. if used throw error or deny operation) hence we\n // need a surefire and safe way to tell us what an object\n // or function is hence Objects native toString\n objToString: Object.prototype.toString,\n wbSheetMediaQChecker: null,\n XHRopen: null,\n XHRsend: null\n };\n /**\n * @type {{yesNo: boolean, added: boolean}}\n */\n this.showCSPViolations = { yesNo: false, added: false };\n autobind(this);\n // this._addRemoveCSPViolationListener(true);\n}\n\n/**\n * Performs the initialization of wombat's internals:\n * - {@link initTopFrame}\n * - {@link initWombatLoc}\n * - {@link initWombatTop}\n * - {@link initAutoFetchWorker}\n * - initializes the wb_rel_prefix property\n * - initializes the wb_unrewrite_rx property\n * - if we are in framed replay mode and the wb_info mod is not bn_\n * {@link initTopFrameNotify} is called\n * @private\n */\nWombat.prototype._internalInit = function() {\n this.initTopFrame(this.$wbwindow);\n this.initWombatLoc(this.$wbwindow);\n this.initWombatTop(this.$wbwindow);\n // updated wb_unrewrite_rx for imgur.com\n var wb_origin = this.$wbwindow.__WB_replay_top.location.origin;\n var wb_host = this.$wbwindow.__WB_replay_top.location.host;\n var wb_proto = this.$wbwindow.__WB_replay_top.location.protocol;\n if (this.wb_replay_prefix && this.wb_replay_prefix.indexOf(wb_origin) === 0) {\n this.wb_rel_prefix = this.wb_replay_prefix.substring(wb_origin.length);\n } else {\n this.wb_rel_prefix = this.wb_replay_prefix;\n }\n this.wb_prefixes = [this.wb_abs_prefix, this.wb_rel_prefix];\n\n // make the protocol and host optional now\n var rx =\n '((' + wb_proto + ')?//' + wb_host + ')?' + this.wb_rel_prefix + '[^/]+/';\n this.wb_unrewrite_rx = new RegExp(rx, 'g');\n\n if (this.wb_info.is_framed && this.wb_info.mod !== 'bn_') {\n this.initTopFrameNotify(this.wb_info);\n }\n this.initAutoFetchWorker();\n};\n\n/**\n * Internal function that adds a \"securitypolicyviolation\" event listener\n * to the document that will log any CSP violations in a nicer way than\n * is the default\n *\n * If the yesNo argument is true, the event listener is added, otherwise\n * it is removed\n * @param {boolean} yesNo\n * @private\n */\nWombat.prototype._addRemoveCSPViolationListener = function(yesNo) {\n this.showCSPViolations.yesNo = yesNo;\n if (this.showCSPViolations.yesNo && !this.showCSPViolations.added) {\n this.showCSPViolations.added = true;\n this._addEventListener(\n document,\n 'securitypolicyviolation',\n this.utilFns.cspViolationListener\n );\n } else {\n this.showCSPViolations.added = false;\n this._removeEventListener(\n document,\n 'securitypolicyviolation',\n this.utilFns.cspViolationListener\n );\n }\n};\n\n/**\n * Adds the supplied event listener on the supplied event target\n * @param {Object} obj\n * @param {string} event\n * @param {Function} fun\n * @return {*}\n * @private\n */\nWombat.prototype._addEventListener = function(obj, event, fun) {\n if (this.utilFns.addEventListener) {\n return this.utilFns.addEventListener.call(obj, event, fun);\n }\n obj.addEventListener(event, fun);\n};\n\n/**\n * Removes the supplied event listener on the supplied event target\n * @param {Object} obj\n * @param {string} event\n * @param {Function} fun\n * @return {*}\n * @private\n */\nWombat.prototype._removeEventListener = function(obj, event, fun) {\n if (this.utilFns.removeEventListener) {\n return this.utilFns.removeEventListener.call(obj, event, fun);\n }\n obj.removeEventListener(event, fun);\n};\n\n/**\n * Extracts the modifier (i.e. mp\\_, if\\_, ...) the page is under that wombat is\n * operating in. If extracting the modifier fails for some reason mp\\_ is returned.\n * Used to ensure the correct modifier is used for rewriting the service workers scope.\n * @return {string}\n */\nWombat.prototype.getPageUnderModifier = function() {\n try {\n var pageUnderModifier = this.extractPageUnderModifierRE.exec(\n location.pathname\n );\n if (pageUnderModifier && pageUnderModifier[1]) {\n var mod = pageUnderModifier[1].trim();\n return mod || 'mp_';\n }\n } catch (e) {}\n return 'mp_';\n};\n\n/**\n * Returns T/F indicating if the supplied function is a native function\n * or not. The test checks for the presence of the substring `'[native code]'`\n * in the result of calling `toString` on the function\n * @param {Function} funToTest - The function to be tested\n * @return {boolean}\n */\nWombat.prototype.isNativeFunction = function(funToTest) {\n if (!funToTest || typeof funToTest !== 'function') return false;\n var str = this.wb_funToString.call(funToTest);\n\n if (str.indexOf('[native code]') == -1) {\n return false;\n }\n if (funToTest.__WB_is_native_func__ !== undefined) {\n return !!funToTest.__WB_is_native_func__;\n }\n return true;\n};\n\n/**\n * Returns T/F indicating if the supplied argument is a string or not\n * @param {*} arg\n * @return {boolean}\n */\nWombat.prototype.isString = function(arg) {\n return arg != null && Object.getPrototypeOf(arg) === String.prototype;\n};\n\n/**\n * Create blob for content, convert to service-worker based blob URL\n * set iframe to remove blob URL on unload\n *\n */\n\nWombat.prototype.blobUrlForIframe = function(iframe, string) {\n var blob = new Blob([string], { type: 'text/html' });\n var url = this.URL.createObjectURL(blob);\n var URL = this.URL;\n\n iframe.__wb_blobSrc = url;\n iframe.addEventListener(\n 'load',\n function() {\n if (iframe.__wb_blobSrc) {\n URL.revokeObjectURL(iframe.__wb_blobSrc);\n iframe.__wb_blobSrc = null;\n }\n },\n { once: true }\n );\n\n iframe.__wb_origSrc = iframe.src;\n var blobIdUrl = url.slice(url.lastIndexOf('/') + 1) + '/' + this.wb_info.url;\n iframe.src =\n this.wb_info.prefix + this.wb_info.request_ts + 'mp_/blob:' + blobIdUrl;\n};\n\n/**\n * Returns T/F indicating if the supplied element may have attributes that\n * are auto-fetched\n * @param {Element} elem\n * @return {boolean}\n */\nWombat.prototype.isSavedSrcSrcset = function(elem) {\n switch (elem.tagName) {\n case 'IMG':\n case 'VIDEO':\n case 'AUDIO':\n return true;\n case 'SOURCE':\n if (!elem.parentElement) return false;\n switch (elem.parentElement.tagName) {\n case 'PICTURE':\n case 'VIDEO':\n case 'AUDIO':\n return true;\n default:\n return false;\n }\n default:\n return false;\n }\n};\n\n/**\n * Returns T/F indicating if the supplied element is an Image element that\n * may have srcset values to be sent to the backing auto-fetch worker\n * @param {Element} elem\n * @return {boolean}\n */\nWombat.prototype.isSavedDataSrcSrcset = function(elem) {\n if (elem.dataset && elem.dataset.srcset != null) {\n return this.isSavedSrcSrcset(elem);\n }\n return false;\n};\n\n/**\n * Determines if the supplied string is an host URL\n * @param {string} str\n * @return {boolean}\n */\nWombat.prototype.isHostUrl = function(str) {\n // Good guess that's its a hostname\n if (str.indexOf('www.') === 0) {\n return true;\n }\n\n // hostname:port (port required)\n var matches = str.match(this.hostnamePortRe);\n if (matches && matches[0].length < 64) {\n return true;\n }\n\n // ip:port\n matches = str.match(this.ipPortRe);\n if (matches) {\n return matches[0].length < 64;\n }\n return false;\n};\n\n/**\n * Returns T/F indicating if the supplied object is the arguments object\n * @param {*} maybeArgumentsObj\n * @return {boolean}\n */\nWombat.prototype.isArgumentsObj = function(maybeArgumentsObj) {\n if (\n !maybeArgumentsObj ||\n !(typeof maybeArgumentsObj.toString === 'function')\n ) {\n return false;\n }\n try {\n return (\n this.utilFns.objToString.call(maybeArgumentsObj) === '[object Arguments]'\n );\n } catch (e) {\n return false;\n }\n};\n\n/**\n * Ensures that each element in the supplied arguments object or\n * array is deproxied handling cases where we can not modify the\n * supplied object returning a new or modified object with the\n * exect elements/properties\n * @param {*} maybeArgumentsObj\n * @return {*}\n */\nWombat.prototype.deproxyArrayHandlingArgumentsObj = function(\n maybeArgumentsObj\n) {\n if (\n !maybeArgumentsObj ||\n maybeArgumentsObj instanceof NodeList ||\n !maybeArgumentsObj.length\n ) {\n return maybeArgumentsObj;\n }\n var args = this.isArgumentsObj(maybeArgumentsObj)\n ? new Array(maybeArgumentsObj.length)\n : maybeArgumentsObj;\n for (var i = 0; i < maybeArgumentsObj.length; ++i) {\n const res = this.proxyToObj(maybeArgumentsObj[i]);\n if (res !== args[i]) {\n args[i] = res;\n }\n }\n return args;\n};\n\n/**\n * Determines if a string starts with the supplied prefix.\n * If it does the matching prefix is returned otherwise undefined.\n * @param {?string} string\n * @param {string} prefix\n * @return {?string}\n */\nWombat.prototype.startsWith = function(string, prefix) {\n if (!string) return undefined;\n return string.indexOf(prefix) === 0 ? prefix : undefined;\n};\n\n/**\n * Determines if a string starts with the supplied array of prefixes.\n * If it does the matching prefix is returned otherwise undefined.\n * @param {?string} string\n * @param {Array<string>} prefixes\n * @return {?string}\n */\nWombat.prototype.startsWithOneOf = function(string, prefixes) {\n if (!string) return undefined;\n for (var i = 0; i < prefixes.length; i++) {\n if (string.indexOf(prefixes[i]) === 0) {\n return prefixes[i];\n }\n }\n return undefined;\n};\n\n/**\n * Determines if a string ends with the supplied suffix.\n * If it does the suffix is returned otherwise undefined.\n * @param {?string} str\n * @param {string} suffix\n * @return {?string}\n */\nWombat.prototype.endsWith = function(str, suffix) {\n if (!str) return undefined;\n if (str.indexOf(suffix, str.length - suffix.length) !== -1) {\n return suffix;\n }\n return undefined;\n};\n\n/**\n * Returns T/F indicating if the supplied tag name and attribute name\n * combination are to be rewritten\n * @param {string} tagName\n * @param {string} attr\n * @return {boolean}\n */\nWombat.prototype.shouldRewriteAttr = function(tagName, attr) {\n switch (attr) {\n case 'href':\n case 'src':\n case 'xlink:href':\n return true;\n }\n if (\n tagName &&\n this.tagToMod[tagName] &&\n this.tagToMod[tagName][attr] !== undefined\n ) {\n return true;\n }\n return (\n (tagName === 'VIDEO' && attr === 'poster') ||\n (tagName === 'META' && attr === 'content')\n );\n};\n\n/**\n * Returns T/F indicating if the script tag being rewritten should not\n * have its text contents wrapped based on the supplied script type.\n * @param {?string} scriptType\n * @return {boolean}\n */\nWombat.prototype.skipWrapScriptBasedOnType = function(scriptType) {\n if (!scriptType) return false;\n if (\n scriptType.indexOf('javascript') >= 0 ||\n scriptType.indexOf('ecmascript') >= 0\n )\n return false;\n if (scriptType.indexOf('json') >= 0) return true;\n if (scriptType.indexOf('text/') >= 0) return true;\n return false;\n};\n\n/**\n * Returns T/F indicating if the script tag being rewritten should not\n * have its text contents wrapped based on heuristic analysis of its\n * text contents.\n * @param {?string} text\n * @return {boolean}\n */\nWombat.prototype.skipWrapScriptTextBasedOnText = function(text, excludes) {\n if (\n !text ||\n text.indexOf(this.WB_ASSIGN_FUNC) >= 0 ||\n text.indexOf('<') === 0\n ) {\n return true;\n }\n\n let found = false;\n\n for (const prop of this.OVERRIDE_PROPS) {\n const inx = text.indexOf(prop);\n if (inx >= 0) {\n if (text.indexOf('var ' + prop) >= 0) {\n excludes.push(prop);\n }\n found = true;\n }\n }\n\n return !found;\n};\n\n/**\n * Returns T/F indicating if the supplied DOM Node has child Elements/Nodes.\n * Note this function should be used when the Node(s) being considered can\n * be null/undefined.\n * @param {Node} node\n * @return {boolean}\n */\nWombat.prototype.nodeHasChildren = function(node) {\n if (!node) return false;\n if (typeof node.hasChildNodes === 'function') return node.hasChildNodes();\n var kids = node.children || node.childNodes;\n if (kids) return kids.length > 0;\n return false;\n};\n\n/**\n * Returns the correct rewrite modifier for the supplied element and\n * attribute combination if one exists otherwise mp_.\n * Used by\n * - {@link performAttributeRewrite}\n * - {@link rewriteFrameSrc}\n * - {@link initElementGetSetAttributeOverride}\n * - {@link overrideHrefAttr}\n *\n * @param {*} elem\n * @param {string} attrName\n * @return {?string}\n */\nWombat.prototype.rwModForElement = function(elem, attrName) {\n if (!elem) return undefined;\n // the default modifier, if none is supplied to rewrite_url, is mp_\n var mod = 'mp_';\n if (elem.tagName === 'LINK' && attrName === 'href') {\n // link types are always ASCII case-insensitive, and must be compared as such.\n // https://html.spec.whatwg.org/multipage/links.html#linkTypes\n if (elem.rel) {\n var relV = elem.rel.trim().toLowerCase();\n var asV = this.wb_getAttribute.call(elem, 'as');\n if (asV && this.linkTagMods.linkRelToAs[relV] != null) {\n var asMods = this.linkTagMods.linkRelToAs[relV];\n mod = asMods[asV.toLowerCase()];\n } else if (this.linkTagMods[relV] != null) {\n mod = this.linkTagMods[relV];\n }\n }\n } else if (elem.tagName === 'SCRIPT') {\n return elem.type === 'module' ? 'esm_' : 'js_';\n } else {\n // check if this element has an rewrite modifiers and set mod to it if it does\n var maybeMod = this.tagToMod[elem.tagName];\n if (maybeMod != null) {\n mod = maybeMod[attrName];\n }\n }\n return mod;\n};\n\n/**\n * If the supplied element is a script tag and has the server-side rewrite added\n * property \"__wb_orig_src\" it is removed and the \"__$removedWBOSRC$__\" property\n * is added to element as an internal flag indicating no further checks are to be\n * made.\n *\n * See also {@link retrieveWBOSRC}\n * @param {Element} elem\n */\nWombat.prototype.removeWBOSRC = function(elem) {\n if (elem.tagName === 'SCRIPT' && !elem.__$removedWBOSRC$__) {\n if (elem.hasAttribute('__wb_orig_src')) {\n elem.removeAttribute('__wb_orig_src');\n }\n elem.__$removedWBOSRC$__ = true;\n }\n};\n\n/**\n * If the supplied element is a script tag and has the server-side rewrite added\n * property \"__wb_orig_src\" its value is returned otherwise undefined is returned.\n * If the element did not have the \"__wb_orig_src\" property the\n * \"__$removedWBOSRC$__\" property is added to element as an internal flag\n * indicating no further checks are to be made.\n *\n * See also {@link removeWBOSRC}\n * @param {Element} elem\n * @return {?string}\n */\nWombat.prototype.retrieveWBOSRC = function(elem) {\n if (elem.tagName === 'SCRIPT' && !elem.__$removedWBOSRC$__) {\n var maybeWBOSRC;\n if (this.wb_getAttribute) {\n maybeWBOSRC = this.wb_getAttribute.call(elem, '__wb_orig_src');\n } else {\n maybeWBOSRC = elem.getAttribute('__wb_orig_src');\n }\n if (maybeWBOSRC == null) elem.__$removedWBOSRC$__ = true;\n return maybeWBOSRC;\n }\n return undefined;\n};\n\n/**\n * Wraps the supplied text contents of a script tag with the required Wombat setup\n * @param {?string} scriptText\n * @return {string}\n */\nWombat.prototype.wrapScriptTextJsProxy = function(scriptText, excludes = []) {\n let prefix =\n 'var _____WB$wombat$assign$function_____ = function(name) {return ' +\n '(self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };\\n' +\n 'if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { ' +\n 'this.__WB_source = obj; return this; } }\\n{\\n';\n\n for (const prop of this.OVERRIDE_PROPS) {\n if (!excludes.includes(prop)) {\n prefix += `let ${prop} = _____WB$wombat$assign$function_____(\"${prop}\");\\n`;\n }\n }\n\n prefix += '{\\n';\n\n scriptText = scriptText.replace(this.IMPORT_JS_CALL, x =>\n x.replace('import', '____wb_rewrite_import__')\n );\n scriptText = scriptText.replace(\n this.DotPostMessageRe,\n '.__WB_pmw(self.window)$1'\n );\n\n return prefix + scriptText + '\\n\\n}}';\n};\n\n/**\n * Calls the supplied function when the supplied element undergoes mutations\n * @param elem\n * @param func\n * @return {boolean}\n */\nWombat.prototype.watchElem = function(elem, func) {\n if (!this.$wbwindow.MutationObserver) {\n return false;\n }\n var m = new this.$wbwindow.MutationObserver(function(records, observer) {\n for (var i = 0; i < records.length; i++) {\n var r = records[i];\n if (r.type === 'childList') {\n for (var j = 0; j < r.addedNodes.length; j++) {\n func(r.addedNodes[j]);\n }\n }\n }\n });\n\n m.observe(elem, {\n childList: true,\n subtree: true\n });\n};\n\n/**\n * Reconstructs the doctype string if the supplied doctype object\n * is non null/undefined. This function is used by {@link rewriteHtmlFull}\n * in order to ensure correctness of rewriting full string of HTML that\n * started with <!doctype ...> since the innerHTML and outerHTML properties\n * do not include that.\n * @param {DocumentType} doctype\n * @return {string}\n */\nWombat.prototype.reconstructDocType = function(doctype) {\n if (doctype == null) return '';\n return (\n '<!doctype ' +\n doctype.name +\n (doctype.publicId ? ' PUBLIC \"' + doctype.publicId + '\"' : '') +\n (!doctype.publicId && doctype.systemId ? ' SYSTEM' : '') +\n (doctype.systemId ? ' \"' + doctype.systemId + '\"' : '') +\n '>'\n );\n};\n\n/**\n * Constructs the final URL for the URL rewriting process\n * @param {boolean} useRel\n * @param {string} mod\n * @param {string} url\n * @return {string}\n */\nWombat.prototype.getFinalUrl = function(useRel, mod, url) {\n var prefix = useRel ? this.wb_rel_prefix : this.wb_abs_prefix;\n\n if (mod == null) {\n mod = this.wb_info.mod;\n }\n\n // if live, don't add the timestamp\n if (!this.wb_info.is_live) {\n prefix += this.wb_info.wombat_ts;\n }\n\n prefix += mod;\n\n if (prefix[prefix.length - 1] !== '/') {\n prefix += '/';\n }\n\n return prefix + url;\n};\n\n/**\n * Converts the supplied relative URL to an absolute URL using URL class\n * @param {string} url\n * @param {?Document} doc\n * @return {string}\n */\nWombat.prototype.resolveRelUrl = function(url, doc) {\n var wombat = this;\n\n function isValidBaseURI(doc) {\n if (!doc || !doc.baseURI) {\n return false;\n }\n return (\n doc.baseURI.startsWith(wombat.HTTPS_PREFIX) ||\n doc.baseURI.startsWith(wombat.HTTP_PREFIX)\n );\n }\n\n var baseURI = null;\n if (isValidBaseURI(doc)) {\n baseURI = doc.baseURI;\n } else if (isValidBaseURI(this.$wbwindow.document)) {\n baseURI = this.$wbwindow.document.baseURI;\n } else {\n baseURI = this.$wbwindow.__WB_replay_top.document.baseURI;\n }\n\n return new this.URL(url, baseURI).href;\n};\n\n/**\n * Extracts the original URL from the supplied rewritten URL\n * @param {?string} rewrittenUrl\n * @return {string}\n */\nWombat.prototype.extractOriginalURL = function(rewrittenUrl) {\n if (!rewrittenUrl) {\n return '';\n } else if (this.wb_is_proxy) {\n // proxy mode: no extraction needed\n return rewrittenUrl;\n }\n\n var rwURLString = rewrittenUrl.toString();\n\n var url = rwURLString;\n\n // ignore certain urls\n if (this.startsWithOneOf(url, this.IGNORE_PREFIXES)) {\n return url;\n }\n\n if (url.startsWith(this.wb_info.static_prefix)) {\n return url;\n }\n\n var start;\n\n if (this.startsWith(url, this.wb_abs_prefix)) {\n start = this.wb_abs_prefix.length;\n } else if (this.wb_rel_prefix && this.startsWith(url, this.wb_rel_prefix)) {\n start = this.wb_rel_prefix.length;\n } else {\n // if no coll, start from beginning, otherwise could be part of coll..\n start = this.wb_rel_prefix ? 1 : 0;\n }\n\n var index = url.indexOf('/http', start);\n if (index < 0) {\n index = url.indexOf('///', start);\n }\n if (index < 0) {\n index = url.indexOf('/blob:', start);\n }\n if (index < 0) {\n index = url.indexOf('/about:blank', start);\n }\n\n // extract original url from wburl\n if (index >= 0) {\n url = url.substr(index + 1);\n } else {\n index = url.indexOf(this.wb_replay_prefix);\n if (index >= 0) {\n url = url.substr(index + this.wb_replay_prefix.length);\n }\n if (url.length > 4 && url.charAt(2) === '_' && url.charAt(3) === '/') {\n url = url.substr(4);\n }\n\n if (\n url !== rwURLString &&\n !this.startsWithOneOf(url, this.VALID_PREFIXES) &&\n !this.startsWith(url, 'blob:')\n ) {\n url = this.wb_orig_scheme + url;\n }\n }\n\n if (\n rwURLString.charAt(0) === '/' &&\n rwURLString.charAt(1) !== '/' &&\n this.startsWith(url, this.wb_orig_origin)\n ) {\n url = url.substr(this.wb_orig_origin.length);\n }\n\n if (this.startsWith(url, this.REL_PREFIX)) {\n return this.wb_info.wombat_scheme + ':' + url;\n }\n\n return url;\n};\n\n/**\n * Creates and returns an A tag ready for parsing the original URL\n * part of the supplied URL.\n * @param {string} maybeRewrittenURL\n * @param {?Document} doc\n * @return {HTMLAnchorElement}\n */\nWombat.prototype.makeParser = function(maybeRewrittenURL, doc) {\n var originalURL = this.extractOriginalURL(maybeRewrittenURL);\n var docElem = doc;\n if (!doc) {\n // special case: for newly opened blank windows, use the opener\n // to create parser to have the proper baseURI\n if (\n this.$wbwindow.location.href === 'about:blank' &&\n this.$wbwindow.opener\n ) {\n docElem = this.$wbwindow.opener.document;\n } else {\n docElem = this.$wbwindow.document;\n }\n }\n\n return this._makeURLParser(originalURL, docElem);\n};\n\nWombat.prototype._makeURLParser = function(url, docElem) {\n try {\n return new this.URL(url, docElem.baseURI);\n } catch (e) {}\n\n var p = docElem.createElement('a');\n p._no_rewrite = true;\n p.href = url;\n return p;\n};\n\n/**\n * Defines a new getter and optional setter for the property on the supplied\n * object returning T/F to indicate if the new property was successfully defined\n * @param {Object} obj\n * @param {string} prop\n * @param {?function(value: *): *} setFunc\n * @param {function(): *} getFunc\n * @param {?boolean} [enumerable]\n * @return {boolean}\n */\nWombat.prototype.defProp = function(obj, prop, setFunc, getFunc, enumerable) {\n // if the property is marked as non-configurable in the current\n // browser, skip the override\n var existingDescriptor = Object.getOwnPropertyDescriptor(obj, prop);\n if (existingDescriptor && !existingDescriptor.configurable) {\n return false;\n }\n\n // if no getter function was supplied, skip the override.\n // See https://github.com/webrecorder/pywb/issues/147 for context\n if (!getFunc) {\n return false;\n }\n\n var descriptor = {\n configurable: true,\n enumerable: enumerable || false,\n get: getFunc\n };\n\n if (setFunc) {\n descriptor.set = setFunc;\n }\n\n try {\n Object.defineProperty(obj, prop, descriptor);\n return true;\n } catch (e) {\n console.warn('Failed to redefine property %s', prop, e.message);\n return false;\n }\n};\n\n/**\n * Defines a new getter for the property on the supplied object returning\n * T/F to indicate if the new property was successfully defined\n * @param {Object} obj\n * @param {string} prop\n * @param {function(): *} getFunc\n * @param {?boolean} [enumerable]\n * @return {boolean}\n */\nWombat.prototype.defGetterProp = function(obj, prop, getFunc, enumerable) {\n var existingDescriptor = Object.getOwnPropertyDescriptor(obj, prop);\n if (existingDescriptor && !existingDescriptor.configurable) {\n return false;\n }\n // if no getter function was supplied, skip the override.\n // See https://github.com/webrecorder/pywb/issues/147 for context\n if (!getFunc) return false;\n\n try {\n Object.defineProperty(obj, prop, {\n configurable: true,\n enumerable: enumerable || false,\n get: getFunc\n });\n return true;\n } catch (e) {\n console.warn('Failed to redefine property %s', prop, e.message);\n return false;\n }\n};\n\n/**\n * Returns the original getter function for the supplied object's property\n * @param {Object} obj\n * @param {string} prop\n * @return {function(): *}\n */\nWombat.prototype.getOrigGetter = function(obj, prop) {\n var orig_getter;\n\n if (obj.__lookupGetter__) {\n orig_getter = obj.__lookupGetter__(prop);\n }\n\n if (!orig_getter && Object.getOwnPropertyDescriptor) {\n var props = Object.getOwnPropertyDescriptor(obj, prop);\n if (props) {\n orig_getter = props.get;\n }\n }\n\n return orig_getter;\n};\n\n/**\n * Returns the original setter function for the supplied object's property\n * @param {Object} obj\n * @param {string} prop\n * @return {function(): *}\n */\nWombat.prototype.getOrigSetter = function(obj, prop) {\n var orig_setter;\n\n if (obj.__lookupSetter__) {\n orig_setter = obj.__lookupSetter__(prop);\n }\n\n if (!orig_setter && Object.getOwnPropertyDescriptor) {\n var props = Object.getOwnPropertyDescriptor(obj, prop);\n if (props) {\n orig_setter = props.set;\n }\n }\n\n return orig_setter;\n};\n\n/**\n * Returns an array containing the names of all the properties\n * that exist on the supplied object\n * @param {Object} obj\n * @return {Array<string>}\n */\nWombat.prototype.getAllOwnProps = function(obj) {\n /** @type {Array<string>} */\n var ownProps = [];\n\n var props = Object.getOwnPropertyNames(obj);\n var i = 0;\n for (; i < props.length; i++) {\n var prop = props[i];\n\n try {\n if (obj[prop] && !obj[prop].prototype) {\n ownProps.push(prop);\n }\n } catch (e) {}\n }\n\n var traverseObj = Object.getPrototypeOf(obj);\n\n while (traverseObj) {\n props = Object.getOwnPropertyNames(traverseObj);\n for (i = 0; i < props.length; i++) {\n ownProps.push(props[i]);\n }\n traverseObj = Object.getPrototypeOf(traverseObj);\n }\n\n return ownProps;\n};\n\n/**\n * Sends the supplied message to __WB_top_frame\n * @param {*} message\n * @param {boolean} [skipTopCheck]\n */\nWombat.prototype.sendTopMessage = function(message, skipTopCheck, win) {\n win = win || this.$wbwindow;\n if (!win.__WB_top_frame) return;\n if (!skipTopCheck && win != win.__WB_replay_top) {\n return;\n }\n win.__WB_top_frame.postMessage(message, this.wb_info.top_host);\n};\n\n/**\n * Notifies __WB_top_frame of an history update\n * @param {?string} url\n * @param {?string} title\n */\nWombat.prototype.sendHistoryUpdate = function(url, title, win) {\n this.sendTopMessage(\n {\n url: url,\n ts: this.wb_info.timestamp,\n request_ts: this.wb_info.request_ts,\n is_live: this.wb_info.is_live,\n title: title,\n wb_type: 'replace-url'\n },\n false,\n win\n );\n};\n\n/**\n * Updates the real location object with the results of rewriting the supplied URL\n * @param {?string} reqHref\n * @param {string} origHref\n * @param {Location} actualLocation\n */\nWombat.prototype.updateLocation = function(reqHref, origHref, actualLocation) {\n if (!reqHref || reqHref === origHref) return;\n\n var ext_orig = this.extractOriginalURL(origHref);\n var ext_req = this.extractOriginalURL(reqHref);\n\n if (!ext_orig || ext_orig === ext_req) return;\n\n var final_href = this.rewriteUrl(reqHref);\n\n console.log(actualLocation.href + ' -> ' + final_href);\n\n actualLocation.href = final_href;\n};\n\n/**\n * Updates the real location with a change\n * @param {*} wombatLoc\n * @param {boolean} isTop\n */\nWombat.prototype.checkLocationChange = function(wombatLoc, isTop) {\n var locType = typeof wombatLoc;\n\n var actual_location = isTop\n ? this.$wbwindow.__WB_replay_top.location\n : this.$wbwindow.location;\n\n // String has been assigned to location, so assign it\n if (locType === 'string') {\n this.updateLocation(wombatLoc, actual_location.href, actual_location);\n } else if (locType === 'object') {\n this.updateLocation(wombatLoc.href, wombatLoc._orig_href, actual_location);\n }\n};\n\n/**\n * Checks for a location change, either this browser context or top and updates\n * accordingly\n * @return {boolean}\n */\nWombat.prototype.checkAllLocations = function() {\n if (this.wb_wombat_updating) {\n return false;\n }\n\n this.wb_wombat_updating = true;\n\n this.checkLocationChange(this.$wbwindow.WB_wombat_location, false);\n\n // Only check top if its a different $wbwindow\n if (\n this.$wbwindow.WB_wombat_location !=\n this.$wbwindow.__WB_replay_top.WB_wombat_location\n ) {\n this.checkLocationChange(\n this.$wbwindow.__WB_replay_top.WB_wombat_location,\n true\n );\n }\n\n this.wb_wombat_updating = false;\n};\n\n/**\n * Returns the Object the Proxy was proxying if it exists otherwise\n * the original object\n * @param {*} source\n * @return {?Object}\n */\nWombat.prototype.proxyToObj = function(source) {\n if (source) {\n try {\n var proxyRealObj = source.__WBProxyRealObj__;\n if (proxyRealObj) return proxyRealObj;\n } catch (e) {}\n }\n return source;\n};\n\n/**\n * Returns the Proxy object for the supplied Object if it exists otherwise\n * the original object\n * @param {?Object} obj\n * @return {Proxy|?Object}\n */\nWombat.prototype.objToProxy = function(obj) {\n if (obj) {\n try {\n var maybeWbProxy = obj._WB_wombat_obj_proxy;\n if (maybeWbProxy) return maybeWbProxy;\n } catch (e) {}\n }\n return obj;\n};\n\n/**\n * Returns the value of supplied object that is being Proxied\n * @param {*} obj\n * @param {*} prop\n * @param {Array<string>} ownProps\n * @param {Object} fnCache\n * @return {*}\n */\nWombat.prototype.defaultProxyGet = function(obj, prop, ownProps, fnCache) {\n switch (prop) {\n case '__WBProxyRealObj__':\n return obj;\n case 'location':\n case 'WB_wombat_location':\n return obj.WB_wombat_location;\n case '_WB_wombat_obj_proxy':\n return obj._WB_wombat_obj_proxy;\n case '__WB_pmw':\n case this.WB_ASSIGN_FUNC:\n case this.WB_CHECK_THIS_FUNC:\n return obj[prop];\n\n case 'origin':\n return obj.WB_wombat_location.origin;\n\n case 'constructor':\n // allow tests that check constructor name/equality to work\n // you can't create a new instance of window, document or location using the constructors\n return obj.constructor;\n }\n var retVal = Reflect.get(obj, prop);\n var propDesc = Object.getOwnPropertyDescriptor(obj, prop);\n\n // Frozen own data properties must be returned as-is to satisfy Proxy invariants.\n if (\n propDesc !== undefined && // If it's an own property, and\n 'value' in propDesc && // is a data property, and\n propDesc.writable === false && // is non-writable, and\n propDesc.configurable === false // is non-configurable\n ) {\n return retVal;\n }\n\n var type = typeof retVal;\n\n if (type === 'string' && retVal) {\n var asNum = parseInt(prop);\n\n if (retVal && !isNaN(asNum)) {\n // frames array access\n try {\n this.initNewWindowWombat(retVal);\n return retVal._WB_wombat_obj_proxy;\n } catch (e) {}\n }\n } else if (type === 'function' && ownProps.indexOf(prop) !== -1) {\n // certain sites (e.g. facebook) are applying polyfills to native functions\n // treating the polyfill as a native function [fn.bind(obj)] causes incorrect execution of the polyfill\n // also depending on the site, the site can detect we \"tampered\" with the polyfill by binding it to obj\n // to avoid these situations, we do not bind the returned fn if we detect they were polyfilled\n switch (prop) {\n case 'requestAnimationFrame':\n case 'cancelAnimationFrame': {\n if (!this.isNativeFunction(retVal)) {\n return retVal;\n }\n break;\n }\n\n case 'eval':\n if (this.isNativeFunction(retVal)) {\n return this.wrappedEval(retVal);\n }\n break;\n }\n // due to specific use cases involving native functions\n // we must return the\n var cachedFN = fnCache[prop];\n if (!cachedFN || cachedFN.original !== retVal) {\n const boundFn = retVal.bind(obj);\n for (const ownProp of Object.getOwnPropertyNames(retVal)) {\n if (!this.SKIP_OWN_FUNC_PROPS.includes(ownProp)) {\n try {\n boundFn[ownProp] = retVal[ownProp];\n } catch (e) {\n // ignore\n }\n }\n }\n fnCache[prop] = {\n original: retVal,\n boundFn\n };\n return boundFn;\n }\n return cachedFN.boundFn;\n } else if (type === 'object' && retVal && retVal._WB_wombat_obj_proxy) {\n if (retVal instanceof this.WBWindow) {\n this.initNewWindowWombat(retVal);\n }\n return retVal._WB_wombat_obj_proxy;\n }\n\n return retVal;\n};\n\n/**\n * Set the location properties for either an instance of WombatLocation\n * or an anchor tag\n * @param {HTMLAnchorElement|WombatLocation} loc\n * @param {string} originalURL\n */\nWombat.prototype.setLoc = function(loc, originalURL) {\n var parser = this.makeParser(originalURL, loc.ownerDocument);\n\n loc._orig_href = originalURL;\n loc._parser = parser;\n\n var href = parser.href;\n loc._hash = parser.hash;\n\n loc._href = href;\n\n loc._host = parser.host;\n loc._hostname = parser.hostname;\n\n if (parser.origin) {\n loc._origin = parser.host ? parser.origin : 'null';\n } else {\n loc._origin =\n parser.protocol +\n '//' +\n parser.hostname +\n (parser.port ? ':' + parser.port : '');\n }\n\n loc._pathname = parser.pathname;\n loc._port = parser.port;\n // this.protocol = parser.protocol;\n loc._protocol = parser.protocol;\n loc._search = parser.search;\n\n if (!Object.defineProperty) {\n loc.href = href;\n loc.hash = parser.hash;\n\n loc.host = loc._host;\n loc.hostname = loc._hostname;\n loc.origin = loc._origin;\n loc.pathname = loc._pathname;\n loc.port = loc._port;\n loc.protocol = loc._protocol;\n loc.search = loc._search;\n }\n};\n\n/**\n * Returns a function for retrieving some property on an instance of either\n * WombatLocation or an anchor tag\n * @param {string} prop\n * @param {function(): string} origGetter\n * @return {function(): string}\n */\nWombat.prototype.makeGetLocProp = function(prop, origGetter) {\n var wombat = this;\n return function newGetLocProp() {\n if (this._no_rewrite) return origGetter.call(this, prop);\n\n if (prop === 'maybeHref') {\n prop = 'href';\n }\n\n var curr_orig_href = origGetter.call(this, 'href');\n\n if (prop === 'href') {\n return wombat.extractOriginalURL(curr_orig_href);\n }\n\n if (prop === 'ancestorOrigins') {\n return [];\n }\n\n if (this._orig_href !== curr_orig_href) {\n wombat.setLoc(this, curr_orig_href);\n }\n return this['_' + prop];\n };\n};\n\n/**\n * Returns a function for setting some property on an instance of either\n * WombatLocation or an anchor tag\n * @param {string} prop\n * @param {function (value: *): *} origSetter\n * @param {function(): *} origGetter\n * @return {function (value: *): *}\n */\nWombat.prototype.makeSetLocProp = function(prop, origSetter, origGetter) {\n var wombat = this;\n return function newSetLocProp(value) {\n if (this._no_rewrite) {\n return origSetter.call(this, prop, value);\n }\n if (prop === 'maybeHref') {\n // probably not a location assignment, so just return\n // will be passed through automatically\n if (typeof value !== 'string') {\n return value;\n }\n prop = 'href';\n }\n if (this['_' + prop] === value) return;\n\n this['_' + prop] = value;\n\n var href = origGetter.call(this);\n var parser = wombat.makeParser(href, this.ownerDocument);\n\n var rel = false;\n\n // Special case for assigning href to a relative path\n if (prop === 'href' && typeof value === 'string') {\n if (value && parser instanceof wombat.URL) {\n try {\n value = new wombat.URL(value, parser).href;\n } catch (e) {\n console.warn('Error resolving URL', e);\n }\n } else if (value) {\n if (value[0] === '.' || value[0] === '#') {\n value = wombat.resolveRelUrl(value, this.ownerDocument);\n } else if (value[0] === '/') {\n if (value.length > 1 && value[1] === '/') {\n value = parser.protocol + value;\n } else {\n rel = true;\n value = WB_wombat_location.origin + value;\n }\n }\n }\n }\n\n try {\n parser[prop] = value;\n } catch (e) {\n console.log('Error setting ' + prop + ' = ' + value);\n }\n\n if (prop === 'hash') {\n value = parser[prop];\n origSetter.call(this, 'hash', value);\n } else {\n rel = rel || value === parser.pathname;\n value = wombat.rewriteUrl(parser.href, rel);\n origSetter.call(this, 'href', value);\n }\n };\n};\n\n/**\n * Function used for rewriting URL's contained in CSS style definitions\n * @param {Object} match\n * @param {string} n1\n * @param {string} n2\n * @param {string} n3\n * @param {number} offset\n * @param {string} string\n * @return {string}\n */\nWombat.prototype.styleReplacer = function(match, n1, n2, n3, offset, string) {\n return n1 + this.rewriteUrl(n2) + n3;\n};\n\n/**\n * Due to the fact that we override specific DOM constructors, e.g. Worker,\n * the normal TypeErrors are not thrown if the pre-conditions for those\n * constructors are not met.\n *\n * Code that performs polyfills or browser feature detection based\n * on those TypeErrors will not work as expected if we do not perform\n * those checks ourselves (Note we use Chrome's error messages)\n *\n * This function checks for those pre-conditions and throws an TypeError\n * with the appropriate message if a pre-condition is not met\n * - `this` instanceof Window is false (requires new)\n * - supplied required arguments\n *\n * @param {Object} thisObj\n * @param {string} what\n * @param {Object} [args]\n * @param {number} [numRequiredArgs]\n */\nWombat.prototype.domConstructorErrorChecker = function(\n thisObj,\n what,\n args,\n numRequiredArgs\n) {\n var needArgs = typeof numRequiredArgs === 'number' ? numRequiredArgs : 1;\n var errorMsg;\n if (thisObj instanceof this.WBWindow) {\n errorMsg =\n 'Failed to construct \\'' +\n what +\n '\\': Please use the \\'new\\' operator, this DOM object constructor cannot be called as a function.';\n } else if (args && args.length < needArgs) {\n errorMsg =\n 'Failed to construct \\'' +\n what +\n '\\': ' +\n needArgs +\n ' argument required, but only 0 present.';\n }\n if (errorMsg) {\n throw new TypeError(errorMsg);\n }\n};\n\n/**\n * Rewrites the arguments supplied to an function of the Node interface\n * @param {Object} fnThis\n * @param {function} originalFn\n * @param {Node} newNode\n * @param {Node} [oldNode]\n */\nWombat.prototype.rewriteNodeFuncArgs = function(\n fnThis,\n originalFn,\n newNode,\n oldNode\n) {\n if (newNode) {\n switch (newNode.nodeType) {\n case Node.ELEMENT_NODE:\n this.rewriteElemComplete(newNode);\n break;\n case Node.TEXT_NODE:\n // newNode is the new child of fnThis (the parent node)\n if (\n fnThis.tagName === 'STYLE' ||\n (newNode.parentNode && newNode.parentNode.tagName === 'STYLE')\n ) {\n newNode.textContent = this.rewriteStyle(newNode.textContent);\n }\n break;\n case Node.DOCUMENT_FRAGMENT_NODE:\n this.recurseRewriteElem(newNode);\n break;\n }\n }\n var created = originalFn.call(fnThis, newNode, oldNode);\n if (created && created.tagName === 'IFRAME') {\n const currentAllow = created.allow ? `; ${created.allow}` : '';\n created.allow = `autoplay 'self'; fullscreen 'self'${currentAllow}`;\n\n this.initIframeWombat(created);\n }\n return created;\n};\n\n/**\n * Mini url rewriter specifically for rewriting web sockets\n * @param {?string} originalURL\n * @return {string}\n */\nWombat.prototype.rewriteWSURL = function(originalURL) {\n // If undefined, just return it\n if (!originalURL) return originalURL;\n\n var urltype_ = typeof originalURL;\n var url = originalURL;\n\n // If object, use toString\n if (urltype_ === 'object') {\n url = originalURL.toString();\n } else if (urltype_ !== 'string') {\n return originalURL;\n }\n\n // empty string check\n if (!url) return url;\n\n var wsScheme = 'ws://';\n var wssScheme = 'wss://';\n\n // proxy mode: If no wb_replay_prefix, only rewrite scheme\n if (this.wb_is_proxy) {\n if (\n this.wb_orig_scheme === this.HTTP_PREFIX &&\n this.startsWith(url, wssScheme)\n ) {\n return wsScheme + url.substr(wssScheme.length);\n } else if (\n this.wb_orig_scheme === this.HTTPS_PREFIX &&\n this.startsWith(url, wsScheme)\n ) {\n return wssScheme + url.substr(wsScheme.length);\n } else {\n return url;\n }\n }\n\n var wbSecure = this.wb_abs_prefix.indexOf(this.HTTPS_PREFIX) === 0;\n var wbPrefix = this.wb_abs_prefix.replace(\n wbSecure ? this.HTTPS_PREFIX : this.HTTP_PREFIX,\n wbSecure ? wssScheme : wsScheme\n );\n wbPrefix += this.wb_info.wombat_ts + 'ws_';\n if (url[url.length - 1] !== '/') {\n wbPrefix += '/';\n }\n return wbPrefix + url.replace('WB_wombat_', '');\n};\n\n/**\n * Rewrites the supplied URL returning the rewritten URL\n * @param {?string} originalURL\n * @param {?boolean} [useRel]\n * @param {?string} [mod]\n * @param {?Document} [doc]\n * @return {?string}\n * @private\n */\nWombat.prototype.rewriteUrl_ = function(originalURL, useRel, mod, doc) {\n // If undefined, just return it\n if (!originalURL) return originalURL;\n\n var urltype_ = typeof originalURL;\n var url;\n\n // If object, use toString\n if (urltype_ === 'object') {\n url = originalURL.toString();\n } else if (urltype_ !== 'string') {\n return originalURL;\n } else {\n url = originalURL.trim();\n }\n\n // empty string check\n if (!url) return url;\n\n // proxy mode: If no wb_replay_prefix, only rewrite scheme\n if (this.wb_is_proxy) {\n if (\n this.wb_orig_scheme === this.HTTP_PREFIX &&\n this.startsWith(url, this.HTTPS_PREFIX)\n ) {\n return this.HTTP_PREFIX + url.substr(this.HTTPS_PREFIX.length);\n } else if (\n this.wb_orig_scheme === this.HTTPS_PREFIX &&\n this.startsWith(url, this.HTTP_PREFIX)\n ) {\n return this.HTTPS_PREFIX + url.substr(this.HTTP_PREFIX.length);\n } else {\n return url;\n }\n }\n\n // just in case _wombat reference made it into url!\n url = url.replace('WB_wombat_', '');\n\n if (mod === 'if_' && this.wb_info.isSW && this.startsWith(url, 'blob:')) {\n return this.wb_info.prefix + this.wb_info.request_ts + 'if_/' + url;\n }\n\n // ignore anchors, about, data\n if (this.startsWithOneOf(url.toLowerCase(), this.IGNORE_PREFIXES)) {\n return url;\n }\n\n // OPTS: additional ignore prefixes\n if (\n this.wb_opts.no_rewrite_prefixes &&\n this.startsWithOneOf(url, this.wb_opts.no_rewrite_prefixes)\n ) {\n return url;\n }\n\n // If starts with prefix, no rewriting needed\n // Only check replay prefix (no date) as date may be different for each\n // capture\n\n // if scheme relative, prepend current scheme\n var check_url;\n\n if (url.indexOf('//') === 0) {\n check_url = this.origProtocol + url;\n } else {\n check_url = url;\n }\n\n //var originalLoc = this.$wbwindow.location;\n if (\n this.startsWith(check_url, this.wb_abs_prefix) ||\n this.startsWith(check_url, this.wb_rel_prefix)\n ) {\n return url;\n }\n\n // A special case where the port somehow gets dropped\n // Check for this and add it back in, eg http://localhost/path/ -> http://localhost:8080/path/\n if (\n this.origHost !== this.origHostname &&\n this.startsWith(url, this.origProtocol + '//' + this.origHostname + '/')\n ) {\n return url.replace(\n '/' + this.origHostname + '/',\n '/' + this.origHost + '/'\n );\n }\n\n // If server relative url, add prefix and original host\n if (url.charAt(0) === '/' && !this.startsWith(url, this.REL_PREFIX)) {\n // Already a relative url, don't make any changes!\n if (\n this.wb_capture_date_part &&\n url.indexOf(this.wb_capture_date_part) >= 0\n ) {\n return url;\n }\n\n // relative collection\n if (url.indexOf(this.wb_rel_prefix) === 0 && url.indexOf('http') > 1) {\n var scheme_sep = url.indexOf(':/');\n if (scheme_sep > 0 && url[scheme_sep + 2] !== '/') {\n return (\n url.substring(0, scheme_sep + 2) + '/' + url.substring(scheme_sep + 2)\n );\n }\n return url;\n }\n\n return this.getFinalUrl(true, mod, this.wb_orig_origin + url);\n }\n\n // Use a parser\n if (url.charAt(0) === '.') {\n url = this.resolveRelUrl(url, doc);\n }\n\n // If full url starting with http://, https:// or //\n // add rewrite prefix, we convert to lower case for this check\n // due to the fact that the URL's scheme could be HTTP(S) LUL\n var prefix = this.startsWithOneOf(url.toLowerCase(), this.VALID_PREFIXES);\n\n if (prefix) {\n //var orig_host = this.$wbwindow.__WB_replay_top.location.host;\n //var orig_protocol = this.$wbwindow.__WB_replay_top.location.protocol;\n var orig_host = this.replayTopHost;\n var orig_protocol = this.replayTopProtocol;\n\n var prefix_host = prefix + orig_host + '/';\n\n // if already rewritten url, must still check scheme\n if (this.startsWith(url, prefix_host)) {\n if (this.startsWith(url, this.wb_replay_prefix)) {\n return url;\n }\n\n var curr_scheme = orig_protocol + '//';\n var path = url.substring(prefix_host.length);\n var rebuild = false;\n\n if (path.indexOf(this.wb_rel_prefix) < 0 && url.indexOf('/static/') < 0) {\n path = this.getFinalUrl(\n true,\n mod,\n WB_wombat_location.origin + '/' + path\n );\n rebuild = true;\n }\n\n // replace scheme to ensure using the correct server scheme\n // if (starts_with(url, wb_orig_scheme) && (wb_orig_scheme != curr_scheme)) {\n if (prefix !== curr_scheme && prefix !== this.REL_PREFIX) {\n rebuild = true;\n }\n\n if (rebuild) {\n if (!useRel) {\n url = curr_scheme + orig_host;\n } else {\n url = '';\n }\n if (path && path[0] !== '/') {\n url += '/';\n }\n url += path;\n }\n\n return url;\n }\n return this.getFinalUrl(useRel, mod, url);\n }\n // Check for common bad prefixes and remove them\n prefix = this.startsWithOneOf(url, this.BAD_PREFIXES);\n\n if (prefix) {\n return this.getFinalUrl(useRel, mod, this.extractOriginalURL(url));\n }\n\n // May or may not be a hostname, call function to determine\n // If it is, add the prefix and make sure port is removed\n //if (this.isHostUrl(url) && !this.startsWith(url, originalLoc.host + '/')) {\n // return this.getFinalUrl(useRel, mod, this.wb_orig_scheme + url);\n //}\n\n return url;\n};\n\n/**\n * Rewrites the supplied URL returning the rewritten URL.\n * If wombat is in debug mode the rewrite is logged to the console\n * @param {*} url\n * @param {?boolean} [useRel]\n * @param {?string} [mod]\n * @param {?Document} [doc]\n * @return {?string}\n */\nWombat.prototype.rewriteUrl = function(url, useRel, mod, doc) {\n var rewritten;\n if (this.wb_info.rewrite_function) {\n rewritten = this.wb_info.rewrite_function(url, useRel, mod, doc);\n } else {\n rewritten = this.rewriteUrl_(url, useRel, mod, doc);\n }\n if (this.debug_rw) {\n if (url !== rewritten) {\n console.log('REWRITE: ' + url + ' -> ' + rewritten);\n } else {\n console.log('NOT REWRITTEN ' + url);\n }\n }\n return rewritten;\n};\n\n/**\n * Rewrites the value of the supplied elements attribute returning its rewritten value.\n * Used by {@link newAttrObjGetSet} and {@link rewriteAttr}\n *\n * @param {Element} elem\n * @param {string} name\n * @param {*} value\n * @param {boolean} [absUrlOnly]\n * @return {*}\n */\nWombat.prototype.performAttributeRewrite = function(\n elem,\n name,\n value,\n ownerDoc,\n absUrlOnly\n) {\n switch (name) {\n // inner and outer HTML are for the overrides applied by newAttrObjGetSet\n case 'innerHTML':\n case 'outerHTML':\n return this.rewriteHtml(value);\n case 'filter': // for svg filter attribute which is url(...)\n return this.rewriteInlineStyle(value);\n case 'style':\n return this.rewriteStyle(value);\n case 'srcset':\n return this.rewriteSrcset(value, elem);\n }\n // Only rewrite if absolute url\n if (absUrlOnly && !this.startsWithOneOf(value, this.VALID_PREFIXES)) {\n return value;\n }\n var mod = this.rwModForElement(elem, name);\n if (\n elem &&\n this.wbUseAFWorker &&\n this.WBAutoFetchWorker &&\n this.isSavedDataSrcSrcset(elem)\n ) {\n this.WBAutoFetchWorker.preserveDataSrcset(elem);\n }\n var result = this.rewriteUrl(value, false, mod, ownerDoc);\n if (mod === 'esm_' && result && result.indexOf('esm_/') < 0) {\n // replace current modifier with esm_ if already rewritten\n result = result.replace(this.REPLACE_MOD, '$1esm_');\n }\n return result;\n};\n\n/**\n * Rewrites an element attribute's value\n * @param {Element} elem\n * @param {string} name\n * @param {boolean} [absUrlOnly]\n * @return {boolean}\n */\nWombat.prototype.rewriteAttr = function(elem, name, absUrlOnly) {\n var changed = false;\n if (\n !elem ||\n !elem.getAttribute ||\n elem._no_rewrite ||\n elem['_' + name] ||\n (elem.tagName && elem.tagName.indexOf('-') > 0)\n ) {\n return changed;\n }\n\n var value = this.wb_getAttribute.call(this.proxyToObj(elem), name);\n\n if (!value || this.startsWith(value, 'javascript:')) return changed;\n\n var new_value = this.performAttributeRewrite(\n elem,\n name,\n value,\n elem.ownerDocument,\n absUrlOnly\n );\n\n if (new_value !== value) {\n this.removeWBOSRC(elem);\n this.wb_setAttribute.call(elem, name, new_value);\n changed = true;\n }\n\n return changed;\n};\n\n/**\n * {@link rewriteStyle} wrapped in a try catch\n * @param {string|Object} style\n * @return {string|Object|null}\n */\nWombat.prototype.noExceptRewriteStyle = function(style) {\n try {\n return this.rewriteStyle(style);\n } catch (e) {\n return style;\n }\n};\n\n/**\n * Rewrites the supplied CSS style definitions\n * @param {string|Object} style\n * @return {string|Object|null}\n */\nWombat.prototype.rewriteStyle = function(style) {\n if (!style) return style;\n\n var value = style;\n if (typeof style === 'object') {\n value = style.toString();\n }\n\n if (typeof value === 'string') {\n return value\n .replace(this.STYLE_REGEX, this.styleReplacer)\n .replace(this.IMPORT_REGEX, this.styleReplacer)\n .replace(this.no_wombatRe, '');\n }\n\n return value;\n};\n\n/**\n * Rewrites the supplied srcset string returning the rewritten results.\n * If the element is one the srcset values are auto-fetched they are sent\n * to the backing auto-fetch worker\n * @param {string} value\n * @param {Element} elem\n * @return {string}\n */\nWombat.prototype.rewriteSrcset = function(value, elem) {\n if (!value) return '';\n if (typeof(value) !== 'string') {\n value = value.toString();\n }\n\n var split = value.split(this.srcsetRe);\n var values = [];\n var mod = this.rwModForElement(elem, 'srcset');\n for (var i = 0; i < split.length; i++) {\n // Filter removes non-truthy values like null, undefined, and \"\"\n var v = split[i];\n if (v) {\n var parts = v.trim().split(' ');\n parts[0] = this.rewriteUrl(parts[0], true, mod);\n values.push(parts.join(' '));\n }\n }\n\n if (\n this.wbUseAFWorker &&\n this.WBAutoFetchWorker &&\n this.isSavedSrcSrcset(elem)\n ) {\n // send post split values to preservation worker\n this.WBAutoFetchWorker.preserveSrcset(\n values,\n this.WBAutoFetchWorker.rwMod(elem)\n );\n }\n\n return values.join(', ');\n};\n\n/**\n * Rewrites the URL supplied to the setter of an (i)frame's src attribute\n * @param {Element} elem\n * @param {string} attrName\n * @return {boolean}\n */\nWombat.prototype.rewriteFrameSrc = function(elem, attrName) {\n var value = this.wb_getAttribute.call(elem, attrName);\n var new_value;\n\n // special case for rewriting javascript: urls that contain WB_wombat_\n // must insert _wombat init first!\n if (this.startsWith(value, 'javascript:')) {\n if (value.indexOf('WB_wombat_') >= 0) {\n var JS = 'javascript:';\n new_value =\n JS +\n 'window.parent._wb_wombat.initNewWindowWombat(window);' +\n value.substr(JS.length);\n }\n }\n\n if (!new_value) {\n new_value = this.rewriteUrl(\n value,\n false,\n this.rwModForElement(elem, attrName)\n );\n }\n\n if (new_value !== value) {\n this.wb_setAttribute.call(elem, attrName, new_value);\n return true;\n }\n\n return false;\n};\n\n/**\n * Rewrites either the URL contained in the src attribute or the text contents\n * of the supplied script element. Returns T/F indicating if a rewrite occurred\n * @param elem\n * @return {boolean}\n */\nWombat.prototype.rewriteScript = function(elem) {\n if (elem.hasAttribute('src') || !elem.textContent || !this.$wbwindow.Proxy) {\n return this.rewriteAttr(elem, 'src');\n }\n if (this.skipWrapScriptBasedOnType(elem.type)) return false;\n var text = elem.textContent.trim();\n var excludes = [];\n if (this.skipWrapScriptTextBasedOnText(text, excludes)) return false;\n elem.textContent = this.wrapScriptTextJsProxy(text, excludes);\n if (this.wb_info.injectDocClose && elem.textContent.trim().length) {\n elem.textContent += ';document.close();';\n }\n return true;\n};\n\n/**\n * Rewrites the supplied SVG element returning T/F indicating if a rewrite occurred\n * @param {SVGElement} elem\n * @return {boolean}\n */\nWombat.prototype.rewriteSVGElem = function(elem) {\n var changed = this.rewriteAttr(elem, 'filter');\n changed = this.rewriteAttr(elem, 'style') || changed;\n // xlink:href is deprecated since SVG 2 in favor of href\n // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href\n changed = this.rewriteAttr(elem, 'xlink:href') || changed;\n changed = this.rewriteAttr(elem, 'href') || changed;\n changed = this.rewriteAttr(elem, 'src') || changed;\n return changed;\n};\n\n/**\n * Rewrites the supplied element returning T/F indicating if a rewrite occurred\n * @param {Element|Node} elem - The element to be rewritten\n * @return {boolean}\n */\nWombat.prototype.rewriteElem = function(elem) {\n var changed = false;\n if (!elem) return changed;\n\n const rewriteObjectEmbed = isEmbed => {\n if (\n this.wb_info.isSW &&\n elem.parentElement &&\n // check for nested embed in object, avoid extra rewrite\n elem.parentElement.tagName !== 'IFRAME' &&\n elem.parentElement.tagName !== 'IMG'\n ) {\n var altElemName;\n\n let addSandbox = false;\n const type = elem.getAttribute('type') || '';\n\n if (type === 'application/pdf') {\n altElemName = 'IFRAME';\n } else if (\n type === 'image/svg+xml' ||\n (isEmbed && type.startsWith('image/'))\n ) {\n altElemName = 'IMG';\n } else if (isEmbed && !type.startsWith('application/')) {\n altElemName = 'IFRAME';\n addSandbox = true;\n }\n\n if (altElemName) {\n var newElem = this.$wbwindow.document.createElement(altElemName);\n for (var i = 0; i < elem.attributes.length; i++) {\n var attr = elem.attributes[i];\n var name = attr.name;\n if (name === 'data') {\n name = 'src';\n }\n this.wb_setAttribute.call(newElem, name, attr.value);\n }\n if (altElemName === 'IFRAME') {\n this.wb_setAttribute.call(newElem, 'style', 'border: none');\n if (addSandbox) {\n this.wb_setAttribute.call(\n newElem,\n 'sandbox',\n 'allow-same-origin allow-scripts'\n );\n }\n }\n\n elem.parentElement.replaceChild(newElem, elem);\n return true;\n }\n }\n return false;\n };\n\n if (elem instanceof SVGElement) {\n changed = this.rewriteSVGElem(elem);\n } else {\n switch (elem.tagName) {\n case 'META':\n var maybeCSP = this.wb_getAttribute.call(elem, 'http-equiv');\n if (maybeCSP && maybeCSP.toLowerCase() === 'content-security-policy') {\n this.wb_setAttribute.call(elem, 'http-equiv', '_' + maybeCSP);\n changed = true;\n }\n break;\n case 'STYLE':\n var new_content = this.rewriteStyle(elem.textContent);\n if (elem.textContent !== new_content) {\n elem.textContent = new_content;\n changed = true;\n if (\n this.wbUseAFWorker &&\n this.WBAutoFetchWorker &&\n elem.sheet != null\n ) {\n // we have a stylesheet so lets be nice to UI thread\n // and defer extraction\n this.WBAutoFetchWorker.deferredSheetExtraction(elem.sheet);\n }\n }\n break;\n case 'LINK':\n changed = this.rewriteAttr(elem, 'href');\n if (this.wbUseAFWorker && elem.rel === 'stylesheet') {\n // we can only check link[rel='stylesheet'] when it loads\n this._addEventListener(\n elem,\n 'load',\n this.utilFns.wbSheetMediaQChecker\n );\n }\n break;\n case 'IMG':\n changed = this.rewriteAttr(elem, 'src');\n changed = this.rewriteAttr(elem, 'srcset') || changed;\n changed = this.rewriteAttr(elem, 'style') || changed;\n if (\n this.wbUseAFWorker &&\n this.WBAutoFetchWorker &&\n elem.dataset.srcset\n ) {\n this.WBAutoFetchWorker.preserveDataSrcset(elem);\n }\n break;\n case 'OBJECT':\n changed = rewriteObjectEmbed(false);\n changed = this.rewriteAttr(elem, 'data', true);\n changed = this.rewriteAttr(elem, 'style') || changed;\n break;\n case 'EMBED':\n changed = rewriteObjectEmbed(true);\n changed = this.rewriteAttr(elem, 'style') || changed;\n break;\n\n case 'FORM':\n changed = this.rewriteAttr(elem, 'poster');\n changed = this.rewriteAttr(elem, 'action') || changed;\n changed = this.rewriteAttr(elem, 'style') || changed;\n break;\n case 'IFRAME':\n changed = this.rewriteFrameSrc(elem, 'src');\n if (this.wb_info.isSW && !changed) {\n var srcdoc = elem.getAttribute('srcdoc');\n if (elem.hasAttribute('srcdoc')) {\n elem.removeAttribute('srcdoc');\n }\n if (srcdoc) {\n this.blobUrlForIframe(elem, srcdoc);\n } else {\n var src = elem.getAttribute('src');\n if (!src || src === 'about:blank') {\n if (!src) {\n elem.__WB_blank = true;\n }\n elem.src =\n this.wb_info.prefix +\n this.wb_info.request_ts +\n 'mp_/about:blank';\n }\n }\n }\n changed = this.rewriteAttr(elem, 'style') || changed;\n break;\n case 'FRAME':\n changed = this.rewriteFrameSrc(elem, 'src');\n changed = this.rewriteAttr(elem, 'style') || changed;\n break;\n case 'SCRIPT':\n changed = this.rewriteScript(elem);\n break;\n case 'A':\n changed = this.rewriteAttr(elem, 'href') || changed;\n changed = this.rewriteAttr(elem, 'style') || changed;\n if (elem.hasAttribute('target')) {\n var newTarget = this.rewriteAttrTarget(elem.target);\n if (newTarget !== elem.target) {\n elem.target = newTarget;\n changed = true;\n }\n }\n break;\n\n default: {\n changed = this.rewriteAttr(elem, 'src');\n changed = this.rewriteAttr(elem, 'srcset') || changed;\n changed = this.rewriteAttr(elem, 'href') || changed;\n changed = this.rewriteAttr(elem, 'style') || changed;\n changed = this.rewriteAttr(elem, 'poster') || changed;\n // for old html\n changed = this.rewriteAttr(elem, 'background') || changed;\n break;\n }\n }\n }\n\n if (elem.hasAttribute && elem.removeAttribute && !elem._no_rewrite) {\n if (elem.hasAttribute('crossorigin')) {\n elem.removeAttribute('crossorigin');\n changed = true;\n }\n\n if (elem.hasAttribute('integrity')) {\n elem.removeAttribute('integrity');\n changed = true;\n }\n }\n return changed;\n};\n\n/**\n * Rewrites all the children and there descendants of the supplied Node\n * returning T/F if a rewrite occurred\n * @param {Node} curr\n * @return {boolean}\n */\nWombat.prototype.recurseRewriteElem = function(curr) {\n if (!this.nodeHasChildren(curr)) return false;\n var changed = false;\n var rewriteQ = [curr.children || curr.childNodes];\n\n while (rewriteQ.length > 0) {\n var children = rewriteQ.shift();\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (child.nodeType === Node.ELEMENT_NODE) {\n changed = this.rewriteElem(child) || changed;\n if (this.nodeHasChildren(child)) {\n rewriteQ.push(child.children || child.childNodes);\n }\n }\n }\n }\n\n return changed;\n};\n\n/**\n * Rewrites the supplied element and all its children if any.\n * See {@link rewriteElem} and {@link recurseRewriteElem} for more details\n * @param {Node} elem\n * @return {boolean}\n */\nWombat.prototype.rewriteElemComplete = function(elem) {\n if (!elem) return false;\n var changed = this.rewriteElem(elem);\n var changedRecursively = this.recurseRewriteElem(elem);\n return changed || changedRecursively;\n};\n\n/**\n * Rewrites any elements found in the supplied arguments object returning\n * a new array containing the original contents of the supplied arguments\n * object after rewriting.\n * @param {Object} originalArguments\n * @return {Array<*>}\n */\nWombat.prototype.rewriteElementsInArguments = function(originalArguments) {\n var argArr = new Array(originalArguments.length);\n for (var i = 0; i < originalArguments.length; i++) {\n var argElem = originalArguments[i];\n if (argElem instanceof Node) {\n this.rewriteElemComplete(argElem);\n argArr[i] = argElem;\n } else if (typeof argElem === 'string') {\n argArr[i] = this.rewriteHtml(argElem);\n } else {\n argArr[i] = argElem;\n }\n }\n return argArr;\n};\n\n/**\n * Rewrites the supplied string containing HTML, if the supplied string\n * is full HTML (starts with <HTML, <DOCUMENT...) the string is rewritten\n * using {@link Wombat#rewriteHtmlFull}\n * @param {string} string\n * @param {boolean} [checkEndTag]\n * @return {?string}\n */\nWombat.prototype.rewriteHtml = function(string, checkEndTag) {\n if (!string) {\n return string;\n }\n var rwString = string;\n if (typeof string !== 'string') {\n rwString = string.toString();\n }\n\n if (this.write_buff) {\n rwString = this.write_buff + rwString;\n this.write_buff = '';\n }\n\n if (rwString.indexOf('<script') <= 0 && rwString.indexOf('WB_wombat_') >= 0) {\n // string = string.replace(/WB_wombat_/g, \"\");\n rwString = rwString.replace(/((id|class)=\".*)WB_wombat_([^\"]+)/, '$1$3');\n }\n\n if (\n !this.$wbwindow.HTMLTemplateElement ||\n this.FullHTMLRegex.test(rwString)\n ) {\n return this.rewriteHtmlFull(rwString, checkEndTag);\n }\n\n var inner_doc = new DOMParser().parseFromString(\n '<template>' + rwString + '</template>',\n 'text/html'\n );\n\n if (\n !inner_doc ||\n !this.nodeHasChildren(inner_doc.head) ||\n !inner_doc.head.children[0].content\n ) {\n return rwString;\n }\n\n var template = inner_doc.head.children[0];\n template._no_rewrite = true;\n if (this.recurseRewriteElem(template.content)) {\n var new_html = template.innerHTML;\n if (checkEndTag) {\n var first_elem =\n template.content.children && template.content.children[0];\n if (first_elem) {\n var end_tag = '</' + first_elem.tagName.toLowerCase() + '>';\n // check if new_html has an extra ending tag while original did not\n // eg. <div>... rewritten to </div>, then we strip out the ending tag\n if (\n this.endsWith(new_html, end_tag) &&\n !this.endsWith(rwString.toLowerCase(), end_tag)\n ) {\n new_html = new_html.substring(0, new_html.length - end_tag.length);\n // similarly, check if original had extra ending tags that rewritten did not\n // eg. <a>...</a></div> rewritten to <a>...</a>, then we add the remaining </div>\n // currently only works with different tags\n } else if (\n new_html.trimEnd().endsWith(end_tag) &&\n !rwString.trimEnd().endsWith(end_tag)\n ) {\n var lastInx = rwString.lastIndexOf(end_tag);\n if (lastInx > 0) {\n new_html += rwString.slice(lastInx + end_tag.length);\n }\n }\n } else if (rwString[0] !== '<' || rwString[rwString.length - 1] !== '>') {\n this.write_buff += rwString;\n return undefined;\n }\n }\n return new_html;\n }\n\n return rwString;\n};\n\n/**\n * Rewrites the supplied string containing full HTML\n * @param {string} string\n * @param {boolean} [checkEndTag]\n * @return {?string}\n */\nWombat.prototype.rewriteHtmlFull = function(string, checkEndTag) {\n var inner_doc = new DOMParser().parseFromString(string, 'text/html');\n if (!inner_doc) return string;\n\n var changed = false;\n\n for (var i = 0; i < inner_doc.all.length; i++) {\n changed = this.rewriteElem(inner_doc.all[i]) || changed;\n }\n\n if (changed) {\n var new_html;\n // if original had <html> tag, add full document HTML\n if (string && string.indexOf('<html') >= 0) {\n inner_doc.documentElement._no_rewrite = true;\n new_html =\n this.reconstructDocType(inner_doc.doctype) +\n inner_doc.documentElement.outerHTML;\n } else {\n //\n inner_doc.head._no_rewrite = true;\n inner_doc.body._no_rewrite = true;\n // hasChildNodes includes text nodes\n var headHasKids = this.nodeHasChildren(inner_doc.head);\n var bodyHasKids = this.nodeHasChildren(inner_doc.body);\n new_html =\n (headHasKids ? inner_doc.head.outerHTML : '') +\n (bodyHasKids ? inner_doc.body.outerHTML : '');\n if (checkEndTag) {\n if (inner_doc.all.length > 3) {\n var end_tag = '</' + inner_doc.all[3].tagName.toLowerCase() + '>';\n if (\n this.endsWith(new_html, end_tag) &&\n !this.endsWith(string.toLowerCase(), end_tag)\n ) {\n new_html = new_html.substring(0, new_html.length - end_tag.length);\n }\n } else if (string[0] !== '<' || string[string.length - 1] !== '>') {\n this.write_buff += string;\n return;\n }\n }\n new_html = this.reconstructDocType(inner_doc.doctype) + new_html;\n }\n\n return new_html;\n }\n\n return string;\n};\n\n/**\n * Rewrites a CSS style string found in the style property of an element or\n * FontFace\n * @param {string} orig\n * @return {string}\n */\nWombat.prototype.rewriteInlineStyle = function(orig) {\n var decoded;\n\n try {\n decoded = decodeURIComponent(orig);\n } catch (e) {\n decoded = orig;\n }\n\n if (decoded !== orig) {\n var parts = this.rewriteStyle(decoded).split(',', 2);\n return parts[0] + ',' + encodeURIComponent(parts[1]);\n }\n\n return this.rewriteStyle(orig);\n};\n\n/**\n * Rewrites the supplied cookie\n * @param {string} cookie\n * @return {string}\n */\nWombat.prototype.rewriteCookie = function(cookie) {\n var wombat = this;\n var rwCookie = cookie\n .replace(this.wb_abs_prefix, '')\n .replace(this.wb_rel_prefix, '');\n rwCookie = rwCookie\n .replace(this.cookie_domain_regex, function(m, m1) {\n // rewrite domain\n var message = {\n domain: m1,\n cookie: rwCookie,\n wb_type: 'cookie'\n };\n\n // notify of cookie setting to allow server-side tracking\n wombat.sendTopMessage(message, true);\n\n // if no subdomain, eg. \"localhost\", just remove domain altogether\n if (\n wombat.$wbwindow.location.hostname.indexOf('.') >= 0 &&\n !wombat.IP_RX.test(wombat.$wbwindow.location.hostname)\n ) {\n return 'Domain=.' + wombat.$wbwindow.location.hostname;\n }\n return '';\n })\n .replace(this.cookie_path_regex, function(m, m1) {\n // rewrite path\n var rewritten = wombat.rewriteUrl(m1);\n\n if (rewritten.indexOf(wombat.wb_curr_host) === 0) {\n rewritten = rewritten.substring(wombat.wb_curr_host.length);\n }\n\n return 'Path=' + rewritten;\n });\n\n // rewrite secure, if needed\n if (wombat.$wbwindow.location.protocol !== 'https:') {\n rwCookie = rwCookie.replace('secure', '');\n }\n\n return rwCookie.replace(',|', ',');\n};\n\n/**\n * Rewrites the supplied web worker URL\n * @param {string} workerUrl\n * @return {string}\n */\nWombat.prototype.rewriteWorker = function(workerUrl, opts) {\n if (!workerUrl) return workerUrl;\n workerUrl = workerUrl.toString();\n var isBlob = workerUrl.indexOf('blob:') === 0;\n var isJS = workerUrl.indexOf('javascript:') === 0;\n var isModule = opts && opts.type === 'module';\n var mod = isModule ? 'wkrm_' : 'wkr_';\n if (!isBlob && !isJS) {\n if (this.startsWithOneOf(workerUrl, this.wb_prefixes)) {\n return workerUrl.replace(this.REPLACE_MOD, '$1' + mod);\n }\n if (\n !this.startsWithOneOf(workerUrl, this.VALID_PREFIXES) &&\n !this.startsWith(workerUrl, '/') &&\n !this.startsWithOneOf(workerUrl, this.BAD_PREFIXES)\n ) {\n // super relative url assets/js/xyz.js\n var rurl = this.resolveRelUrl(workerUrl, this.$wbwindow.document);\n return this.rewriteUrl(rurl, false, mod, this.$wbwindow.document);\n }\n return this.rewriteUrl(workerUrl, false, mod, this.$wbwindow.document);\n }\n\n var workerCode = isJS ? workerUrl.replace('javascript:', '') : null;\n if (isBlob) {\n // fetching only skipped if it was JS url\n var x = new XMLHttpRequest();\n // use sync ajax request to get the contents, remove postMessage() rewriting\n this.utilFns.XHRopen.call(x, 'GET', workerUrl, false);\n this.utilFns.XHRsend.call(x);\n workerCode = x.responseText\n .replace(this.workerBlobRe, '')\n // resolving blobs hit our sever side rewriting so we gotta\n // ensure we good\n .replace(this.rmCheckThisInjectRe, 'this');\n }\n\n if (this.wb_info.static_prefix || this.wb_info.ww_rw_script) {\n var originalURL = this.$wbwindow.document.baseURI;\n // if we are here we can must return blob so set makeBlob to true\n var ww_rw =\n this.wb_info.ww_rw_script ||\n this.wb_info.static_prefix + 'wombatWorkers.js';\n var rw =\n '(function() { self.importScripts(\\'' +\n ww_rw +\n '\\'); new WBWombat({\\'prefix\\': \\'' +\n this.wb_abs_prefix +\n '\\', \\'prefixMod\\': \\'' +\n this.wb_abs_prefix +\n 'wkrf_/\\', \\'originalURL\\': ' +\n JSON.stringify(originalURL) +\n '}); })();';\n\n workerCode = rw + workerCode;\n }\n var blob = new Blob([workerCode], { type: 'application/javascript' });\n return this.URL.createObjectURL(blob);\n};\n\n/**\n * Rewrite the arguments supplied to a function of the Text interface in order\n * to ensure CSS is rewritten when a text node is the child of the style tag\n * @param {Object} fnThis\n * @param {function} originalFn\n * @param {Object} argsObj\n */\nWombat.prototype.rewriteTextNodeFn = function(fnThis, originalFn, argsObj) {\n var deproxiedThis = this.proxyToObj(fnThis);\n var args;\n if (\n argsObj.length > 0 &&\n deproxiedThis.parentElement &&\n deproxiedThis.parentElement.tagName === 'STYLE'\n ) {\n // appendData(DOMString data); dataIndex = 0\n // insertData(unsigned long offset, DOMString data); dataIndex = 1\n // replaceData(unsigned long offset, unsigned long count, DOMString data); dataIndex = 2\n args = new Array(argsObj.length);\n var dataIndex = argsObj.length - 1;\n if (dataIndex === 2) {\n args[0] = argsObj[0];\n args[1] = argsObj[1];\n } else if (dataIndex === 1) {\n args[0] = argsObj[0];\n }\n args[dataIndex] = this.rewriteStyle(argsObj[dataIndex]);\n } else {\n args = argsObj;\n }\n if (originalFn.__WB_orig_apply) {\n return originalFn.__WB_orig_apply(deproxiedThis, args);\n }\n return originalFn.apply(deproxiedThis, args);\n};\n\n/**\n * Rewrite the arguments supplied to a function of the ChildNode interface\n * in order to ensure that elements are rewritten\n * @param {Object} fnThis\n * @param {function} originalFn\n * @param {Object} argsObj\n */\nWombat.prototype.rewriteChildNodeFn = function(fnThis, originalFn, argsObj) {\n var thisObj = this.proxyToObj(fnThis);\n if (argsObj.length === 0) return originalFn.call(thisObj);\n var newArgs = this.rewriteElementsInArguments(argsObj);\n if (originalFn.__WB_orig_apply) {\n return originalFn.__WB_orig_apply(thisObj, newArgs);\n }\n return originalFn.apply(thisObj, newArgs);\n};\n\n/**\n * Rewrites the arguments supplied to Element.[insertAdjacentElement, insertAdjacentHTML].\n * If rwHTML is true the rewrite performed is done by {@link rewriteHtml} other wise\n * {@link rewriteElemComplete}\n * @param {Object} fnThis\n * @param {function} originalFn\n * @param {number} position\n * @param {string|Node} textOrElem\n * @param {boolean} rwHTML\n * @return {*}\n */\nWombat.prototype.rewriteInsertAdjHTMLOrElemArgs = function(\n fnThis,\n originalFn,\n position,\n textOrElem,\n rwHTML\n) {\n var fnThisObj = this.proxyToObj(fnThis);\n if (fnThisObj._no_rewrite) {\n return originalFn.call(fnThisObj, position, textOrElem);\n }\n if (rwHTML) {\n return originalFn.call(fnThisObj, position, this.rewriteHtml(textOrElem));\n }\n this.rewriteElemComplete(textOrElem);\n return originalFn.call(fnThisObj, position, textOrElem);\n};\n\n/**\n * Rewrites the arguments of either setTimeout or setInterval because\n * [setTimeout|setInterval]('document.location.href = \"xyz.com\"', time)\n * is legal and used\n * @param {Object} fnThis\n * @param {function} originalFn\n * @param {Object} argsObj\n * @return {*}\n */\nWombat.prototype.rewriteSetTimeoutInterval = function(\n fnThis,\n originalFn,\n argsObj\n) {\n // strings are primitives with a prototype or __proto__ of String depending on the browser\n var rw = this.isString(argsObj[0]);\n // do not mess with the arguments object unless you want instant de-optimization\n var args = rw ? new Array(argsObj.length) : argsObj;\n if (rw) {\n if (this.$wbwindow.Proxy) {\n args[0] = this.wrapScriptTextJsProxy(argsObj[0]);\n } else {\n args[0] = argsObj[0].replace(/\\blocation\\b/g, 'WB_wombat_$&');\n }\n for (var i = 1; i < argsObj.length; ++i) {\n args[i] = this.proxyToObj(argsObj[i]);\n }\n }\n // setTimeout|setInterval does not require its this arg to be window so just in case\n // someone got funky with it\n var thisObj = this.proxyToObj(fnThis);\n if (originalFn.__WB_orig_apply) {\n return originalFn.__WB_orig_apply(thisObj, args);\n }\n return originalFn.apply(thisObj, args);\n};\n\n/**\n * Rewrites the value of used in to set SomeElement.[innerHTML|outerHTML]\n * iframe.srcdoc, or style.textContent handling edge cases e.g. script tags.\n *\n * If the element is a style tag and it has a sheet after the new value is set\n * it, the sheet, is checked for media rules.\n *\n * @param {Object} thisObj\n * @param {Function} oSetter\n * @param {?string} newValue\n */\nWombat.prototype.rewriteHTMLAssign = function(thisObj, oSetter, newValue) {\n var res = newValue;\n var tagName = thisObj.tagName;\n if (\n !thisObj._no_rewrite &&\n !(thisObj instanceof this.$wbwindow.HTMLTemplateElement)\n ) {\n if (tagName === 'STYLE') {\n res = this.rewriteStyle(newValue);\n } else if (tagName === 'SCRIPT') {\n // script tags are used to hold HTML for later use\n // check if this contains tags or a script\n\n if (newValue && this.IsTagRegex.test(newValue)) {\n res = this.rewriteHtml(newValue);\n }\n\n var excludes = [];\n\n // likely actual JS, not tags\n if (res === newValue) {\n if (\n !this.skipWrapScriptBasedOnType(thisObj.type) &&\n !this.skipWrapScriptTextBasedOnText(newValue, excludes)\n ) {\n res = this.wrapScriptTextJsProxy(res, excludes);\n }\n }\n } else {\n res = this.rewriteHtml(newValue);\n }\n }\n oSetter.call(thisObj, res);\n if (\n this.wbUseAFWorker &&\n this.WBAutoFetchWorker &&\n tagName === 'STYLE' &&\n thisObj.sheet != null\n ) {\n // got to preserve all the things\n this.WBAutoFetchWorker.deferredSheetExtraction(thisObj.sheet);\n }\n};\n\n/**\n * Rewrites the value to be supplied to eval or our injected wrapper\n * @param {Function} rawEvalOrWrapper\n * @param {*} evalArg\n * @return {*}\n */\nWombat.prototype.rewriteEvalArg = function(\n rawEvalOrWrapper,\n evalArg,\n extraArg\n) {\n if (\n this.$wbwindow.TrustedScript &&\n evalArg instanceof this.$wbwindow.TrustedScript\n ) {\n evalArg = evalArg.toString();\n }\n var excludes = [];\n var toBeEvald =\n this.isString(evalArg) &&\n !this.skipWrapScriptTextBasedOnText(evalArg, excludes)\n ? this.wrapScriptTextJsProxy(evalArg, excludes)\n : this.otherEvalRewrite(evalArg);\n return rawEvalOrWrapper(toBeEvald, extraArg);\n};\n\n/**\n * Apply other eval specific rewriting\n * Currently just rewrite import('')\n *\n */\n\nWombat.prototype.otherEvalRewrite = function(value) {\n if (typeof value !== 'string') {\n return value;\n }\n return value.replace(this.IMPORT_JS_REGEX, this.styleReplacer);\n};\n\n/**\n * Applies an Event property getter override for the supplied property\n * @param {string} attr\n * @param {Object} [eventProto]\n */\nWombat.prototype.addEventOverride = function(attr, eventProto) {\n var theProto = eventProto;\n if (!eventProto) {\n theProto = this.$wbwindow.MessageEvent.prototype;\n }\n var origGetter = this.getOrigGetter(theProto, attr);\n if (!origGetter) return;\n this.defGetterProp(theProto, attr, function() {\n if (this['_' + attr] != null) {\n return this['_' + attr];\n }\n return origGetter.call(this);\n });\n};\n\n/**\n * Returns T/F indicating if the supplied attribute node is to be rewritten\n * @param {Object} attr\n * @return {boolean}\n */\nWombat.prototype.isAttrObjRewrite = function(attr) {\n if (!attr) return false;\n var tagName = attr.ownerElement && attr.ownerElement.tagName;\n return this.shouldRewriteAttr(tagName, attr.nodeName);\n};\n\n/**\n * Defines a new getter and setter function for the supplied\n * property of the Attr interface\n * @param {Object} attrProto\n * @param {string} prop\n */\nWombat.prototype.newAttrObjGetSet = function(attrProto, prop) {\n var wombat = this;\n var oGetter = this.getOrigGetter(attrProto, prop);\n var oSetter = this.getOrigSetter(attrProto, prop);\n this.defProp(\n attrProto,\n prop,\n function newAttrObjSetter(newValue) {\n var obj = wombat.proxyToObj(this);\n var res = newValue;\n if (wombat.isAttrObjRewrite(obj)) {\n res = wombat.performAttributeRewrite(\n obj.ownerElement,\n obj.name,\n newValue,\n obj.ownerDocument,\n false\n );\n }\n return oSetter.call(obj, res);\n },\n function newAttrObjGetter() {\n var obj = wombat.proxyToObj(this);\n var res = oGetter.call(obj);\n if (wombat.isAttrObjRewrite(obj)) {\n return wombat.extractOriginalURL(res);\n }\n return res;\n }\n );\n};\n\n/**\n * Overrides the nodeValue property of the Attr interface\n */\nWombat.prototype.overrideAttrProps = function() {\n var attrProto = this.$wbwindow.Attr.prototype;\n this.newAttrObjGetSet(attrProto, 'value');\n this.newAttrObjGetSet(attrProto, 'nodeValue');\n this.newAttrObjGetSet(attrProto, 'textContent');\n};\n\n/**\n * Applies an override the attribute get/set override\n * @param {Object} obj\n * @param {string} attr\n * @param {string} mod\n */\nWombat.prototype.overrideAttr = function(obj, attr, mod) {\n var orig_getter = this.getOrigGetter(obj, attr);\n var orig_setter = this.getOrigSetter(obj, attr);\n var wombat = this;\n\n var setter = function newAttrPropSetter(orig) {\n if (mod === 'js_') {\n if (!this.__$removedWBOSRC$__) {\n wombat.removeWBOSRC(this);\n }\n }\n var val = wombat.rewriteUrl(\n orig,\n false,\n this.type === 'module' ? 'esm_' : mod\n );\n if (orig_setter) {\n return orig_setter.call(this, val);\n } else if (wombat.wb_setAttribute) {\n return wombat.wb_setAttribute.call(this, attr, val);\n }\n };\n\n var getter = function newAttrPropGetter() {\n var res;\n if (orig_getter) {\n res = orig_getter.call(this);\n } else if (wombat.wb_getAttribute) {\n res = wombat.wb_getAttribute.call(this, attr);\n }\n res = wombat.extractOriginalURL(res);\n if (this.__WB_blank && res === 'about:blank') {\n return '';\n }\n return res;\n };\n\n this.defProp(obj, attr, setter, getter);\n};\n\n/**\n * Applies an attribute getter override IFF an original getter exists\n * @param {Object} proto\n * @param {string} prop\n * @param {*} [cond]\n */\nWombat.prototype.overridePropExtract = function(proto, prop) {\n var orig_getter = this.getOrigGetter(proto, prop);\n var wombat = this;\n if (orig_getter) {\n var new_getter = function() {\n var obj = wombat.proxyToObj(this);\n var res = orig_getter.call(obj);\n if (obj.__WB_no_unrewrite) {\n return res;\n }\n return wombat.extractOriginalURL(res);\n };\n this.defGetterProp(proto, prop, new_getter);\n }\n};\n\n/**\n * Applies an attribute setter override to de-proxy the prop\n * @param {Object} proto\n * @param {string} prop\n * @param {*} [cond]\n */\nWombat.prototype.overrideDeProxyPropAssign = function(proto, prop) {\n var orig_setter = this.getOrigSetter(proto, prop);\n var orig_getter = this.getOrigGetter(proto, prop);\n var wombat = this;\n if (orig_setter) {\n var new_setter = function(value) {\n return orig_setter.call(\n wombat.proxyToObj(this),\n wombat.proxyToObj(value)\n );\n };\n this.defProp(proto, prop, new_setter, orig_getter);\n }\n};\n\n/**\n * Overrides referrer -- if top-replay frame, referrer should be \"\", otherwise extractOriginURL\n * @param {Object} proto\n * @param {string} prop\n * @param {*} [cond]\n */\nWombat.prototype.overrideReferrer = function($document) {\n var orig_getter = this.getOrigGetter($document, 'referrer');\n var wombat = this;\n if (orig_getter) {\n var new_getter = function() {\n var obj = wombat.proxyToObj(this);\n\n var $win = this.defaultView;\n\n // if top replay-frame, referrer should always be \"\"\n if ($win === $win.__WB_replay_top) {\n return '';\n }\n\n var res = orig_getter.call(obj);\n\n return wombat.extractOriginalURL(res);\n };\n this.defGetterProp($document, 'referrer', new_getter);\n }\n};\n\n/**\n * Applies an attribute getter override IFF an original getter exists that\n * ensures that the results of retrieving the attributes value is not a\n * wombat Proxy\n * @param {Object} proto\n * @param {string} prop\n */\nWombat.prototype.overridePropToProxy = function(proto, prop) {\n var orig_getter = this.getOrigGetter(proto, prop);\n if (orig_getter) {\n var wombat = this;\n var new_getter = function overridePropToProxyNewGetter() {\n return wombat.objToProxy(orig_getter.call(this));\n };\n this.defGetterProp(proto, prop, new_getter);\n }\n};\n\n/**\n * Applies an override to supplied history function name IFF it exists\n * @param {string} funcName\n * @return {?function}\n */\nWombat.prototype.overrideHistoryFunc = function(funcName) {\n if (!this.$wbwindow.history) return undefined;\n var orig_func = this.$wbwindow.history[funcName];\n if (!orig_func) return undefined;\n\n this.$wbwindow.history['_orig_' + funcName] = orig_func;\n\n this.$wbwindow.history.___wb_ownWindow = this.$wbwindow;\n\n var wombat = this;\n\n var rewrittenFunc = function histNewFunc(stateObj, title, url) {\n // in case functions rebound to different history obj!\n var historyWin = this.___wb_ownWindow || wombat.$wbwindow;\n\n url = wombat.extractOriginalURL(url);\n\n var wombatLocation = historyWin.WB_wombat_location;\n var rewritten_url;\n var resolvedURL;\n if (url) {\n var parser = wombat._makeURLParser(url, historyWin.document);\n resolvedURL = parser.href;\n\n rewritten_url = wombat.rewriteUrl(resolvedURL);\n\n if (\n resolvedURL !== wombatLocation.origin &&\n wombatLocation.href !== 'about:blank' &&\n !wombat.startsWith(resolvedURL, wombatLocation.origin + '/')\n ) {\n throw new DOMException('Invalid history change: ' + resolvedURL);\n }\n } else {\n resolvedURL = wombatLocation.href;\n }\n\n orig_func.call(this, stateObj, title, rewritten_url);\n\n var origTitle = historyWin.document.title;\n\n if (wombat.WBAutoFetchWorker) {\n historyWin.setTimeout(function() {\n if (!title && historyWin.document.title !== origTitle) {\n title = historyWin.document.title;\n }\n\n wombat.WBAutoFetchWorker.fetchAsPage(rewritten_url, resolvedURL, title);\n }, 100);\n }\n\n wombat.sendHistoryUpdate(resolvedURL, title, historyWin);\n };\n\n this.$wbwindow.history[funcName] = rewrittenFunc;\n if (this.$wbwindow.History && this.$wbwindow.History.prototype) {\n this.$wbwindow.History.prototype[funcName] = rewrittenFunc;\n }\n\n return rewrittenFunc;\n};\n\n/**\n * Applies an getter/setter override to the supplied style interface's attribute\n * and prop name combination\n * @param {Object} obj\n * @param {string} attr\n * @param {string} [propName]\n */\nWombat.prototype.overrideStyleAttr = function(obj, attr, propName) {\n var orig_getter = this.getOrigGetter(obj, attr);\n var orig_setter = this.getOrigSetter(obj, attr);\n\n var wombat = this;\n\n var setter = function overrideStyleAttrSetter(orig) {\n var val = wombat.rewriteStyle(orig);\n if (orig_setter) {\n orig_setter.call(this, val);\n } else {\n this.setProperty(propName, val);\n }\n return val;\n };\n\n var getter = orig_getter;\n\n var extractUrl = function(_, p1, p2, p3, p4) {\n return p1 + (p2 || '') + wombat.extractOriginalURL(p3) + p4;\n };\n\n var EXTRACT_URL_RX = /(url\\()(['\"])?(.*?)(\\2\\))/;\n\n if (!orig_getter) {\n getter = function overrideStyleAttrGetter() {\n var res = this.getPropertyValue(propName);\n if (res && res.startsWith('url(')) {\n res = res.replace(EXTRACT_URL_RX, extractUrl);\n }\n return res;\n };\n }\n\n if ((orig_setter && orig_getter) || propName) {\n this.defProp(obj, attr, setter, getter);\n }\n};\n\n/**\n * Applies an override to the setProperty function\n * @param style_proto\n */\nWombat.prototype.overrideStyleSetProp = function(style_proto) {\n var orig_setProp = style_proto.setProperty;\n var wombat = this;\n style_proto.setProperty = function rwSetProperty(name, value, priority) {\n var rwvalue = wombat.rewriteStyle(value);\n return orig_setProp.call(this, name, rwvalue, priority);\n };\n};\n\n/**\n * Overrides the getter and setter functions for the properties listed in\n * {@link Wombat#URL_PROPS} for the `a` and `area` tags\n * @param {Object} whichObj\n */\nWombat.prototype.overrideAnchorAreaElem = function(whichObj) {\n if (!whichObj || !whichObj.prototype) return;\n var originalGetSets = {};\n var originalProto = whichObj.prototype;\n\n var anchorAreaSetter = function anchorAreaSetter(prop, value) {\n var func = originalGetSets['set_' + prop];\n if (func) return func.call(this, value);\n return '';\n };\n\n var anchorAreaGetter = function anchorAreaGetter(prop) {\n var func = originalGetSets['get_' + prop];\n if (func) return func.call(this);\n return '';\n };\n\n for (var i = 0; i < this.URL_PROPS.length; i++) {\n var prop = this.URL_PROPS[i];\n originalGetSets['get_' + prop] = this.getOrigGetter(originalProto, prop);\n originalGetSets['set_' + prop] = this.getOrigSetter(originalProto, prop);\n if (Object.defineProperty) {\n this.defProp(\n originalProto,\n prop,\n this.makeSetLocProp(prop, anchorAreaSetter, anchorAreaGetter),\n this.makeGetLocProp(prop, anchorAreaGetter),\n true\n );\n }\n }\n\n originalProto.toString = function toString() {\n return this.href;\n };\n};\n\n/**\n * Overrides the getter and setter functions for the `innerHTML` and `outerHTML`\n * properties of the supplied element\n * @param {Object} elem\n * @param {string} prop\n * @param {boolean} [rewriteGetter]\n */\nWombat.prototype.overrideHtmlAssign = function(elem, prop, rewriteGetter) {\n if (!this.$wbwindow.DOMParser || !elem || !elem.prototype) {\n return;\n }\n\n var obj = elem.prototype;\n\n var orig_getter = this.getOrigGetter(obj, prop);\n var orig_setter = this.getOrigSetter(obj, prop);\n\n if (!orig_setter) return;\n\n var rewriteFn = this.rewriteHTMLAssign;\n\n var setter = function overrideHTMLAssignSetter(orig) {\n return rewriteFn(this, orig_setter, orig);\n };\n\n var wb_unrewrite_rx = this.wb_unrewrite_rx;\n\n var getter = function overrideHTMLAssignGetter() {\n var res = orig_getter.call(this);\n if (!this._no_rewrite) {\n return res.replace(wb_unrewrite_rx, '');\n }\n return res;\n };\n\n this.defProp(obj, prop, setter, rewriteGetter ? getter : orig_getter);\n};\n\nWombat.prototype.overrideHtmlAssignSrcDoc = function(elem, prop) {\n var obj = elem.prototype;\n\n var orig_getter = this.getOrigGetter(obj, prop);\n var orig_setter = this.getOrigSetter(obj, prop);\n\n var wombat = this;\n\n var setter = function overrideSetter(orig) {\n this.__wb_srcdoc = orig;\n\n if (wombat.wb_info.isSW) {\n wombat.blobUrlForIframe(this, orig);\n return orig;\n } else {\n return wombat.rewriteHTMLAssign(this, orig_setter, orig);\n }\n };\n\n var getter = function overrideGetter() {\n return this.__wb_srcdoc;\n };\n\n this.defProp(obj, prop, setter, getter);\n};\n\n/**\n * Override .dataset attribute on element and wraps in a proxy that unrewrites URLs\n */\nWombat.prototype.overrideDataSet = function() {\n var obj = this.$wbwindow.HTMLElement.prototype;\n var orig_getter = this.getOrigGetter(obj, 'dataset');\n\n var wombat = this;\n\n var getter = function wrapDataSet() {\n var dataset = orig_getter.call(this);\n\n var proxy = new Proxy(dataset, {\n get(target, prop, receiver) {\n var result = target[prop];\n\n if (\n typeof result === 'string' &&\n wombat.startsWithOneOf(result, wombat.wb_prefixes)\n ) {\n return wombat.extractOriginalURL(result);\n }\n\n return result;\n }\n });\n\n return proxy;\n };\n\n this.defProp(obj, 'dataset', null, getter);\n};\n\n/**\n * Override .style attribute on element and wraps in a proxy that unrewrites URLs\n */\nWombat.prototype.overrideStyleProxy = function(overrideProps) {\n var obj = this.$wbwindow.HTMLElement.prototype;\n var orig_setter = this.getOrigSetter(obj, 'style');\n var orig_getter = this.getOrigGetter(obj, 'style');\n\n var wombat = this;\n\n var getter = function wrapStyle() {\n var style = orig_getter.call(this);\n\n var fnCache = {};\n\n var proxy = new Proxy(style, {\n set(target, prop, value) {\n if (overrideProps.includes(prop)) {\n value = wombat.rewriteStyle(value);\n }\n\n target[prop] = value;\n return true;\n },\n\n get(target, prop, receiver) {\n var value = target[prop];\n\n if (\n typeof value === 'function' &&\n (prop === 'setProperty' || wombat.isNativeFunction(value))\n ) {\n if (!fnCache[prop]) {\n fnCache[prop] = value.bind(style);\n }\n return fnCache[prop];\n }\n\n return value;\n }\n });\n\n return proxy;\n };\n\n this.defProp(obj, 'style', orig_setter, getter);\n};\n\n/**\n * Overrides the getter and setter functions for the supplied property\n * on the HTMLIFrameElement\n * @param {string} prop\n */\nWombat.prototype.overrideIframeContentAccess = function(prop) {\n if (\n !this.$wbwindow.HTMLIFrameElement ||\n !this.$wbwindow.HTMLIFrameElement.prototype\n ) {\n return;\n }\n\n var obj = this.$wbwindow.HTMLIFrameElement.prototype;\n var orig_getter = this.getOrigGetter(obj, prop);\n\n if (!orig_getter) return;\n\n var orig_setter = this.getOrigSetter(obj, prop);\n var wombat = this;\n var getter = function overrideIframeContentAccessGetter() {\n wombat.initIframeWombat(this);\n return wombat.objToProxy(orig_getter.call(this));\n };\n\n this.defProp(obj, prop, orig_setter, getter);\n obj['_get_' + prop] = orig_getter;\n};\n\nWombat.prototype.overrideSWAccess = function($wbwindow) {\n if (\n !$wbwindow.navigator.serviceWorker ||\n !$wbwindow.navigator.serviceWorker.controller\n ) {\n return;\n }\n\n $wbwindow._WB_wombat_sw = $wbwindow.navigator.serviceWorker;\n\n var overrideSW = {\n controller: null,\n ready: Promise.resolve({ unregister: function() {} }),\n register: function() {\n return Promise.reject();\n },\n addEventListener: function() {},\n removeEventListener: function() {},\n onmessage: null,\n oncontrollerchange: null,\n getRegistrations: function() {\n return Promise.resolve([]);\n },\n getRegistration: function() {\n return Promise.resolve(undefined);\n },\n startMessages: function() {}\n };\n\n this.defGetterProp($wbwindow.navigator, 'serviceWorker', function() {\n return overrideSW;\n });\n};\n\n/**\n * Overrides the supplied method in order to ensure that the `this` argument\n * of the function is not one of the JS Proxy objects used by wombat.\n * @param {object} cls\n * @param {string} method\n * @param {Object} [obj]\n */\nWombat.prototype.overrideFuncThisProxyToObj = function(cls, method, obj) {\n if (!cls) return;\n\n var ovrObj = obj;\n if (!obj && cls.prototype && cls.prototype[method]) {\n ovrObj = cls.prototype;\n } else if (!obj && cls[method]) {\n ovrObj = cls;\n }\n\n if (!ovrObj) return;\n\n var wombat = this;\n var orig = ovrObj[method];\n ovrObj[method] = function deproxyThis() {\n return orig.apply(wombat.proxyToObj(this), arguments);\n };\n};\n\n/**\n * Applies an function override that ensures that the argument the supplied index\n * is not one of the JS Proxy objects used by wombat.\n * @param {Object} cls\n * @param {string} method\n * @param {number} [argumentIdx]\n */\nWombat.prototype.overrideFuncArgProxyToObj = function(\n cls,\n method,\n argumentIdx\n) {\n if (!cls || !cls.prototype) return;\n var argIndex = argumentIdx || 0;\n var orig = cls.prototype[method];\n if (!orig) return;\n var wombat = this;\n cls.prototype[method] = function deproxyFnArg() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n if (i === argIndex) {\n args[i] = wombat.proxyToObj(arguments[i]);\n } else {\n args[i] = arguments[i];\n }\n }\n var thisObj = wombat.proxyToObj(this);\n if (orig.__WB_orig_apply) {\n return orig.__WB_orig_apply(thisObj, args);\n }\n return orig.apply(thisObj, args);\n };\n};\n\n/**\n * Overrides Function.prototype.apply in order to ensure that none of the\n * arguments of `native` functions are one of the JS Proxy objects used by wombat.\n * @param {Window} $wbwindow\n */\nWombat.prototype.overrideFunctionApply = function($wbwindow) {\n if ($wbwindow.Function.prototype.__WB_orig_apply) {\n return;\n }\n var orig_apply = $wbwindow.Function.prototype.apply;\n Object.defineProperty($wbwindow.Function.prototype, '__WB_orig_apply', {\n value: orig_apply,\n enumarable: false\n });\n var wombat = this;\n $wbwindow.Function.prototype.apply = function apply(obj, args) {\n // if native function, de-proxy\n if (wombat.isNativeFunction(this)) {\n obj = wombat.proxyToObj(obj);\n args = wombat.deproxyArrayHandlingArgumentsObj(args);\n }\n\n return this.__WB_orig_apply(obj, args);\n };\n\n this.wb_funToString.apply = orig_apply;\n};\n\n/**\n * Overrides Function.prototype.call in order to ensure that none of the\n * arguments of `native` functions are one of the JS Proxy objects used by wombat.\n * @param {Window} $wbwindow\n */\nWombat.prototype.overrideFunctionCall = function($wbwindow) {\n if ($wbwindow.Function.prototype.__WB_orig_call) {\n return;\n }\n var orig_call = $wbwindow.Function.prototype.call;\n Object.defineProperty($wbwindow.Function.prototype, '__WB_orig_call', {\n value: orig_call,\n enumarable: false\n });\n var wombat = this;\n $wbwindow.Function.prototype.call = function call(obj, ...args) {\n // if native function, de-proxy\n if (wombat.isNativeFunction(this)) {\n obj = wombat.proxyToObj(obj);\n args = wombat.deproxyArrayHandlingArgumentsObj(args);\n }\n\n return this.__WB_orig_call(obj, ...args);\n };\n\n this.wb_funToString.call = orig_call;\n};\n/**\n * Override Function.prototype.bind to deproxy the param target\n * in case of native functions\n *\n */\nWombat.prototype.overrideFunctionBind = function($wbwindow) {\n if ($wbwindow.Function.prototype.__WB_orig_bind) {\n return;\n }\n var orig_bind = $wbwindow.Function.prototype.bind;\n Object.defineProperty($wbwindow.Function.prototype, '__WB_orig_bind', {\n value: orig_bind,\n enumarable: false\n });\n var wombat = this;\n $wbwindow.Function.prototype.bind = function bind(obj) {\n var isNative = wombat.isNativeFunction(this);\n var result = isNative\n ? this.__WB_orig_bind.apply(this, arguments)\n : this.__WB_orig_bind.__WB_orig_apply(this, arguments);\n result.__WB_is_native_func__ = isNative;\n return result;\n };\n};\n\n/**\n * Overrides the getter and setter functions for the `srcset` property\n * of the supplied Object in order to rewrite accesses and retrievals\n * @param {Object} obj\n * @param {string} [mod]\n */\nWombat.prototype.overrideSrcsetAttr = function(obj, mod) {\n var prop = 'srcset';\n var orig_getter = this.getOrigGetter(obj, prop);\n var orig_setter = this.getOrigSetter(obj, prop);\n var wombat = this;\n\n var setter = function srcset(orig) {\n var val = wombat.rewriteSrcset(orig, this);\n if (orig_setter) {\n return orig_setter.call(this, val);\n } else if (wombat.wb_setAttribute) {\n return wombat.wb_setAttribute.call(this, prop, val);\n }\n };\n\n var getter = function srcset() {\n var res;\n if (orig_getter) {\n res = orig_getter.call(this);\n } else if (wombat.wb_getAttribute) {\n res = wombat.wb_getAttribute.call(this, prop);\n }\n res = wombat.extractOriginalURL(res);\n return res;\n };\n\n this.defProp(obj, prop, setter, getter);\n};\n\n/**\n * Overrides the getter and setter functions for the `href` property\n * of the supplied Object in order to rewrite accesses and retrievals\n * @param {Object} obj\n * @param {string} mod\n */\nWombat.prototype.overrideHrefAttr = function(obj, mod) {\n var orig_getter = this.getOrigGetter(obj, 'href');\n var orig_setter = this.getOrigSetter(obj, 'href');\n\n var wombat = this;\n\n var setter = function href(orig) {\n var val;\n if (typeof orig !== 'string') {\n orig = String(orig);\n }\n if (mod === 'cs_' && orig.indexOf('data:text/css') === 0) {\n val = wombat.rewriteInlineStyle(orig);\n } else if (this.tagName === 'LINK') {\n val = wombat.rewriteUrl(\n orig,\n false,\n wombat.rwModForElement(this, 'href')\n );\n } else {\n val = wombat.rewriteUrl(orig, false, mod, this.ownerDocument);\n }\n if (orig_setter) {\n return orig_setter.call(this, val);\n } else if (wombat.wb_setAttribute) {\n return wombat.wb_setAttribute.call(this, 'href', val);\n }\n };\n\n var getter = function href() {\n var res;\n if (orig_getter) {\n res = orig_getter.call(this);\n } else if (wombat.wb_getAttribute) {\n res = wombat.wb_getAttribute.call(this, 'href');\n }\n if (!this._no_rewrite) return wombat.extractOriginalURL(res);\n return res;\n };\n\n this.defProp(obj, 'href', setter, getter);\n};\n\n/**\n * Overrides the getter and setter functions for a property of the Text\n * interface in order to rewrite accesses and retrievals when a text node\n * is the child of the style tag\n * @param {Object} textProto\n * @param {string} whichProp\n */\nWombat.prototype.overrideTextProtoGetSet = function(textProto, whichProp) {\n var orig_getter = this.getOrigGetter(textProto, whichProp);\n var wombat = this;\n var setter;\n // data, from CharacterData, is both readable and writable whereas wholeText, from Text, is not\n if (whichProp === 'data') {\n var orig_setter = this.getOrigSetter(textProto, whichProp);\n setter = function rwTextProtoSetter(orig) {\n var res = orig;\n if (\n !this._no_rewrite &&\n this.parentElement &&\n this.parentElement.tagName === 'STYLE'\n ) {\n res = wombat.rewriteStyle(orig);\n }\n return orig_setter.call(this, res);\n };\n }\n var getter = function rwTextProtoGetter() {\n var res = orig_getter.call(this);\n if (\n !this._no_rewrite &&\n this.parentElement &&\n this.parentElement.tagName === 'STYLE'\n ) {\n return res.replace(wombat.wb_unrewrite_rx, '');\n }\n return res;\n };\n this.defProp(textProto, whichProp, setter, getter);\n};\n\n/**\n * Overrides the constructor of an UIEvent object in order to ensure\n * that the `view`, `relatedTarget`, and `target` arguments of the\n * constructor are not a JS Proxy used by wombat.\n * @param {string} which\n */\nWombat.prototype.overrideAnUIEvent = function(which) {\n var didOverrideKey = '__wb_' + which + '_overridden';\n var ConstructorFN = this.$wbwindow[which];\n if (\n !ConstructorFN ||\n !ConstructorFN.prototype ||\n ConstructorFN.prototype[didOverrideKey]\n )\n return;\n // ensure if and when view is accessed it is proxied\n var wombat = this;\n this.overridePropToProxy(ConstructorFN.prototype, 'view');\n var initFNKey = 'init' + which;\n if (ConstructorFN.prototype[initFNKey]) {\n var originalInitFn = ConstructorFN.prototype[initFNKey];\n ConstructorFN.prototype[initFNKey] = function() {\n var thisObj = wombat.proxyToObj(this);\n if (arguments.length === 0 || arguments.length < 3) {\n if (originalInitFn.__WB_orig_apply) {\n return originalInitFn.__WB_orig_apply(thisObj, arguments);\n }\n return originalInitFn.apply(thisObj, arguments);\n }\n var newArgs = new Array(arguments.length);\n for (var i = 0; i < arguments.length; i++) {\n if (i === 3) {\n newArgs[i] = wombat.proxyToObj(arguments[i]);\n } else {\n newArgs[i] = arguments[i];\n }\n }\n if (originalInitFn.__WB_orig_apply) {\n return originalInitFn.__WB_orig_apply(thisObj, newArgs);\n }\n return originalInitFn.apply(thisObj, newArgs);\n };\n }\n this.$wbwindow[which] = (function(EventConstructor) {\n return function NewEventConstructor(type, init) {\n wombat.domConstructorErrorChecker(this, which, arguments);\n if (init) {\n if (init.view != null) {\n init.view = wombat.proxyToObj(init.view);\n }\n if (init.relatedTarget != null) {\n init.relatedTarget = wombat.proxyToObj(init.relatedTarget);\n }\n if (init.target != null) {\n init.target = wombat.proxyToObj(init.target);\n }\n }\n return new EventConstructor(type, init);\n };\n })(ConstructorFN);\n this.$wbwindow[which].prototype = ConstructorFN.prototype;\n Object.defineProperty(this.$wbwindow[which].prototype, 'constructor', {\n value: this.$wbwindow[which]\n });\n this.$wbwindow[which].prototype[didOverrideKey] = true;\n};\n\n/**\n * Rewrites the arguments supplied to the functions of the ParentNode interface\n * @param {Object} fnThis\n * @param {function} originalFn\n * @param {Object} argsObj\n * @return {*}\n */\nWombat.prototype.rewriteParentNodeFn = function(fnThis, originalFn, argsObj) {\n var argArr = this._no_rewrite\n ? argsObj\n : this.rewriteElementsInArguments(argsObj);\n var thisObj = this.proxyToObj(fnThis);\n if (originalFn.__WB_orig_apply) {\n return originalFn.__WB_orig_apply(thisObj, argArr);\n }\n return originalFn.apply(thisObj, argArr);\n};\n\n/**\n * Overrides the append and prepend functions on the supplied object in order\n * to ensure that the elements or string of HTML supplied as arguments to these\n * functions are rewritten\n * @param {Object} obj\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/append\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/prepend\n */\nWombat.prototype.overrideParentNodeAppendPrepend = function(obj) {\n var rewriteParentNodeFn = this.rewriteParentNodeFn;\n if (obj.prototype.append) {\n var originalAppend = obj.prototype.append;\n obj.prototype.append = function append() {\n return rewriteParentNodeFn(this, originalAppend, arguments);\n };\n }\n if (obj.prototype.prepend) {\n var originalPrepend = obj.prototype.prepend;\n obj.prototype.prepend = function prepend() {\n return rewriteParentNodeFn(this, originalPrepend, arguments);\n };\n }\n};\n\n/**\n * Overrides the `innerHTML` property and `append`, `prepend` functions\n * on the ShadowRoot interface in order to ensure any HTML elements\n * added via these methods are rewritten\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot\n */\nWombat.prototype.overrideShadowDom = function() {\n if (!this.$wbwindow.ShadowRoot || !this.$wbwindow.ShadowRoot.prototype) {\n return;\n }\n // shadow root inherits from DocumentFragment, Node, and ParentNode not Element\n this.overrideHtmlAssign(this.$wbwindow.ShadowRoot, 'innerHTML', true);\n this.overrideParentNodeAppendPrepend(this.$wbwindow.ShadowRoot);\n};\n\n/**\n * Applies an override to the ChildNode interface that is inherited by\n * the supplied Object. If the textIface argument is truthy the rewrite function\n * used is {@link rewriteChildNodeFn} otherwise {@link rewriteTextNodeFn}\n * @param {*} ifaceWithChildNode\n * @param {boolean} [textIface]\n */\nWombat.prototype.overrideChildNodeInterface = function(\n ifaceWithChildNode,\n textIface\n) {\n if (!ifaceWithChildNode || !ifaceWithChildNode.prototype) return;\n var rewriteFn = textIface ? this.rewriteTextNodeFn : this.rewriteChildNodeFn;\n if (ifaceWithChildNode.prototype.before) {\n var originalBefore = ifaceWithChildNode.prototype.before;\n ifaceWithChildNode.prototype.before = function before() {\n return rewriteFn(this, originalBefore, arguments);\n };\n }\n if (ifaceWithChildNode.prototype.after) {\n var originalAfter = ifaceWithChildNode.prototype.after;\n ifaceWithChildNode.prototype.after = function after() {\n return rewriteFn(this, originalAfter, arguments);\n };\n }\n if (ifaceWithChildNode.prototype.replaceWith) {\n var originalReplaceWith = ifaceWithChildNode.prototype.replaceWith;\n ifaceWithChildNode.prototype.replaceWith = function replaceWith() {\n return rewriteFn(this, originalReplaceWith, arguments);\n };\n }\n};\n\n/**\n * Applies overrides to the `appendData`, `insertData`, and `replaceData` functions\n * and `data` and `wholeText` properties on the Text interface in order to ensure\n * CSS strings are rewritten when Text nodes are children of the style tag\n */\nWombat.prototype.initTextNodeOverrides = function() {\n var Text = this.$wbwindow.Text;\n if (!Text || !Text.prototype) return;\n // https://dom.spec.whatwg.org/#characterdata and https://dom.spec.whatwg.org/#interface-text\n // depending on the JS frameworks used some pages include JS that will append a single text node child\n // to a style tag and then progressively modify that text nodes data for changing the css values that\n // style tag contains\n var textProto = Text.prototype;\n // override inherited CharacterData functions\n var rewriteTextProtoFunction = this.rewriteTextNodeFn;\n if (textProto.appendData) {\n var originalAppendData = textProto.appendData;\n textProto.appendData = function appendData() {\n return rewriteTextProtoFunction(this, originalAppendData, arguments);\n };\n }\n if (textProto.insertData) {\n var originalInsertData = textProto.insertData;\n textProto.insertData = function insertData() {\n return rewriteTextProtoFunction(this, originalInsertData, arguments);\n };\n }\n if (textProto.replaceData) {\n var originalReplaceData = textProto.replaceData;\n textProto.replaceData = function replaceData() {\n return rewriteTextProtoFunction(this, originalReplaceData, arguments);\n };\n }\n this.overrideChildNodeInterface(Text, true);\n // override property getters and setters\n this.overrideTextProtoGetSet(textProto, 'data');\n this.overrideTextProtoGetSet(textProto, 'wholeText');\n};\n\n/**\n * Applies attribute getter and setter function overrides to the HTML elements\n * and CSS properties that are URLs are rewritten\n */\nWombat.prototype.initAttrOverrides = function() {\n // href attr overrides\n this.overrideHrefAttr(this.$wbwindow.HTMLLinkElement.prototype, 'cs_');\n this.overrideHrefAttr(this.$wbwindow.CSSStyleSheet.prototype, 'cs_');\n this.overrideHrefAttr(this.$wbwindow.HTMLBaseElement.prototype, 'mp_');\n // srcset attr overrides\n this.overrideSrcsetAttr(this.$wbwindow.HTMLImageElement.prototype, 'im_');\n this.overrideSrcsetAttr(this.$wbwindow.HTMLSourceElement.prototype, 'oe_');\n // poster attr overrides\n this.overrideAttr(this.$wbwindow.HTMLVideoElement.prototype, 'poster', 'im_');\n this.overrideAttr(this.$wbwindow.HTMLAudioElement.prototype, 'poster', 'im_');\n // src attr overrides\n this.overrideAttr(this.$wbwindow.HTMLImageElement.prototype, 'src', 'im_');\n this.overrideAttr(this.$wbwindow.HTMLInputElement.prototype, 'src', 'oe_');\n this.overrideAttr(this.$wbwindow.HTMLEmbedElement.prototype, 'src', 'oe_');\n this.overrideAttr(this.$wbwindow.HTMLMediaElement.prototype, 'src', 'oe_');\n this.overrideAttr(this.$wbwindow.HTMLVideoElement.prototype, 'src', 'oe_');\n this.overrideAttr(this.$wbwindow.HTMLAudioElement.prototype, 'src', 'oe_');\n this.overrideAttr(this.$wbwindow.HTMLSourceElement.prototype, 'src', 'oe_');\n if (window.HTMLTrackElement && window.HTMLTrackElement.prototype) {\n this.overrideAttr(this.$wbwindow.HTMLTrackElement.prototype, 'src', 'oe_');\n }\n this.overrideAttr(this.$wbwindow.HTMLIFrameElement.prototype, 'src', 'if_');\n if (\n this.$wbwindow.HTMLFrameElement &&\n this.$wbwindow.HTMLFrameElement.prototype\n ) {\n this.overrideAttr(this.$wbwindow.HTMLFrameElement.prototype, 'src', 'fr_');\n }\n this.overrideAttr(this.$wbwindow.HTMLScriptElement.prototype, 'src', 'js_');\n // other attr overrides\n this.overrideAttr(this.$wbwindow.HTMLObjectElement.prototype, 'data', 'oe_');\n this.overrideAttr(\n this.$wbwindow.HTMLObjectElement.prototype,\n 'codebase',\n 'oe_'\n );\n this.overrideAttr(this.$wbwindow.HTMLMetaElement.prototype, 'content', 'mp_');\n this.overrideAttr(this.$wbwindow.HTMLFormElement.prototype, 'action', 'mp_');\n this.overrideAttr(this.$wbwindow.HTMLQuoteElement.prototype, 'cite', 'mp_');\n this.overrideAttr(this.$wbwindow.HTMLModElement.prototype, 'cite', 'mp_');\n // a, area tag overrides\n this.overrideAnchorAreaElem(this.$wbwindow.HTMLAnchorElement);\n this.overrideAnchorAreaElem(this.$wbwindow.HTMLAreaElement);\n\n var style_proto = this.$wbwindow.CSSStyleDeclaration.prototype;\n\n var cssAttrToProps = {\n background: 'background',\n backgroundImage: 'background-image',\n cursor: 'cursor',\n listStyle: 'list-style',\n listStyleImage: 'list-style-image',\n border: 'border',\n borderImage: 'border-image',\n borderImageSource: 'border-image-source',\n maskImage: 'mask-image'\n };\n\n this.overrideStyleProxy(Object.values(cssAttrToProps));\n\n // For FF < 144\n if (this.$wbwindow.CSS2Properties) {\n style_proto = this.$wbwindow.CSS2Properties.prototype;\n }\n // For FF >= 144\n if (this.$wbwindow.CSSStyleProperties) {\n style_proto = this.$wbwindow.CSSStyleProperties.prototype;\n }\n\n this.overrideStyleAttr(style_proto, 'cssText');\n\n for (var [attr, prop] of Object.entries(cssAttrToProps)) {\n this.overrideStyleAttr(style_proto, attr, prop);\n }\n\n this.overrideStyleSetProp(style_proto);\n\n if (this.$wbwindow.CSSStyleSheet && this.$wbwindow.CSSStyleSheet.prototype) {\n // https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/insertRule\n // ruleText is a string of raw css....\n var wombat = this;\n var oInsertRule = this.$wbwindow.CSSStyleSheet.prototype.insertRule;\n this.$wbwindow.CSSStyleSheet.prototype.insertRule = function insertRule(\n ruleText,\n index\n ) {\n return oInsertRule.call(this, wombat.rewriteStyle(ruleText), index);\n };\n }\n\n if (this.$wbwindow.CSSRule && this.$wbwindow.CSSRule.prototype) {\n this.overrideStyleAttr(this.$wbwindow.CSSRule.prototype, 'cssText');\n }\n};\n\n/**\n * Applies overrides to CSSStyleValue.[parse,parseAll], CSSKeywordValue, and\n * StylePropertyMap in order to ensure the URLs these interfaces operate on\n * are rewritten. Gotta love Chrome.\n * @see https://drafts.css-houdini.org/css-typed-om-1/\n */\nWombat.prototype.initCSSOMOverrides = function() {\n var wombat = this;\n if (this.$wbwindow.CSSStyleValue) {\n var cssStyleValueOverride = function(CSSSV, which) {\n var oFN = CSSSV[which];\n CSSSV[which] = function parseOrParseAllOverride(property, cssText) {\n if (cssText == null) return oFN.call(this, property, cssText);\n var rwCSSText = wombat.noExceptRewriteStyle(cssText);\n return oFN.call(this, property, rwCSSText);\n };\n };\n\n if (\n this.$wbwindow.CSSStyleValue.parse &&\n this.$wbwindow.CSSStyleValue.parse.toString().indexOf('[native code]') > 0\n ) {\n cssStyleValueOverride(this.$wbwindow.CSSStyleValue, 'parse');\n }\n\n if (\n this.$wbwindow.CSSStyleValue.parseAll &&\n this.$wbwindow.CSSStyleValue.parseAll\n .toString()\n .indexOf('[native code]') > 0\n ) {\n cssStyleValueOverride(this.$wbwindow.CSSStyleValue, 'parseAll');\n }\n }\n\n if (\n this.$wbwindow.CSSKeywordValue &&\n this.$wbwindow.CSSKeywordValue.prototype\n ) {\n var oCSSKV = this.$wbwindow.CSSKeywordValue;\n this.$wbwindow.CSSKeywordValue = (function(CSSKeywordValue_) {\n return function CSSKeywordValue(cssValue) {\n wombat.domConstructorErrorChecker(this, 'CSSKeywordValue', arguments);\n return new CSSKeywordValue_(wombat.rewriteStyle(cssValue));\n };\n })(this.$wbwindow.CSSKeywordValue);\n this.$wbwindow.CSSKeywordValue.prototype = oCSSKV.prototype;\n Object.defineProperty(\n this.$wbwindow.CSSKeywordValue.prototype,\n 'constructor',\n {\n value: this.$wbwindow.CSSKeywordValue\n }\n );\n addToStringTagToClass(this.$wbwindow.CSSKeywordValue, 'CSSKeywordValue');\n }\n\n if (\n this.$wbwindow.StylePropertyMap &&\n this.$wbwindow.StylePropertyMap.prototype\n ) {\n var originalSet = this.$wbwindow.StylePropertyMap.prototype.set;\n this.$wbwindow.StylePropertyMap.prototype.set = function set() {\n if (arguments.length <= 1) {\n if (originalSet.__WB_orig_apply) {\n return originalSet.__WB_orig_apply(this, arguments);\n }\n return originalSet.apply(this, arguments);\n }\n var newArgs = new Array(arguments.length);\n newArgs[0] = arguments[0];\n for (var i = 1; i < arguments.length; i++) {\n newArgs[i] = wombat.noExceptRewriteStyle(arguments[i]);\n }\n if (originalSet.__WB_orig_apply) {\n return originalSet.__WB_orig_apply(this, newArgs);\n }\n return originalSet.apply(this, newArgs);\n };\n\n var originalAppend = this.$wbwindow.StylePropertyMap.prototype.append;\n this.$wbwindow.StylePropertyMap.prototype.append = function append() {\n if (arguments.length <= 1) {\n if (originalSet.__WB_orig_apply) {\n return originalAppend.__WB_orig_apply(this, arguments);\n }\n return originalAppend.apply(this, arguments);\n }\n var newArgs = new Array(arguments.length);\n newArgs[0] = arguments[0];\n for (var i = 1; i < arguments.length; i++) {\n newArgs[i] = wombat.noExceptRewriteStyle(arguments[i]);\n }\n if (originalAppend.__WB_orig_apply) {\n return originalAppend.__WB_orig_apply(this, newArgs);\n }\n return originalAppend.apply(this, newArgs);\n };\n }\n};\n\n/**\n * Applies an overrides to the Audio constructor in order to ensure its URL\n * argument is rewritten\n */\nWombat.prototype.initAudioOverride = function() {\n if (!this.$wbwindow.Audio) return;\n var orig_audio = this.$wbwindow.Audio;\n var wombat = this;\n this.$wbwindow.Audio = (function(Audio_) {\n return function Audio(url) {\n wombat.domConstructorErrorChecker(this, 'Audio');\n return new Audio_(wombat.rewriteUrl(url, true, 'oe_'));\n };\n })(this.$wbwindow.Audio);\n\n this.$wbwindow.Audio.prototype = orig_audio.prototype;\n Object.defineProperty(this.$wbwindow.Audio.prototype, 'constructor', {\n value: this.$wbwindow.Audio\n });\n addToStringTagToClass(this.$wbwindow.Audio, 'HTMLAudioElement');\n};\n\n/**\n * Initializes the BAD_PREFIXES array using the supplied prefix\n * @param {string} prefix\n */\nWombat.prototype.initBadPrefixes = function(prefix) {\n this.BAD_PREFIXES = [\n 'http:' + prefix,\n 'https:' + prefix,\n 'http:/' + prefix,\n 'https:/' + prefix\n ];\n};\n\n/**\n * Applies an override to crypto.getRandomValues in order to make\n * the values it returns are deterministic during replay\n */\nWombat.prototype.initCryptoRandom = function() {\n if (!this.$wbwindow.crypto || !this.$wbwindow.Crypto) return;\n var wombat = this;\n var new_getrandom = function getRandomValues(array) {\n for (var i = 0; i < array.length; i++) {\n array[i] = parseInt(wombat.$wbwindow.Math.random() * 4294967296);\n }\n return array;\n };\n this.$wbwindow.Crypto.prototype.getRandomValues = new_getrandom;\n this.$wbwindow.crypto.getRandomValues = new_getrandom;\n};\n\n/**\n * Applies an override to the Date object in order to ensure that\n * all Dates used during replay are in the datetime of replay\n * @param {string} timestamp\n */\nWombat.prototype.initDateOverride = function(timestamp) {\n if (this.$wbwindow.__wb_Date_now) return;\n var newTimestamp = parseInt(timestamp) * 1000;\n // var timezone = new Date().getTimezoneOffset() * 60 * 1000;\n // Already UTC!\n var timezone = 0;\n var start_now = this.$wbwindow.Date.now();\n var timediff = start_now - (newTimestamp - timezone);\n\n var orig_date = this.$wbwindow.Date;\n\n var orig_utc = this.$wbwindow.Date.UTC;\n var orig_parse = this.$wbwindow.Date.parse;\n var orig_now = this.$wbwindow.Date.now;\n\n this.$wbwindow.__wb_Date_now = orig_now;\n\n this.$wbwindow.Date = (function(Date_) {\n return function Date(A, B, C, D, E, F, G) {\n // [native code]\n // Apply doesn't work for constructors and Date doesn't\n // seem to like undefined args, so must explicitly\n // call constructor for each possible args 0..7\n if (A === undefined) {\n return new Date_(orig_now() - timediff);\n } else if (B === undefined) {\n return new Date_(A);\n } else if (C === undefined) {\n return new Date_(A, B);\n } else if (D === undefined) {\n return new Date_(A, B, C);\n } else if (E === undefined) {\n return new Date_(A, B, C, D);\n } else if (F === undefined) {\n return new Date_(A, B, C, D, E);\n } else if (G === undefined) {\n return new Date_(A, B, C, D, E, F);\n } else {\n return new Date_(A, B, C, D, E, F, G);\n }\n };\n })(this.$wbwindow.Date);\n\n this.$wbwindow.Date.prototype = orig_date.prototype;\n\n this.$wbwindow.Date.now = function now() {\n return orig_now() - timediff;\n };\n\n this.$wbwindow.Date.UTC = orig_utc;\n this.$wbwindow.Date.parse = orig_parse;\n\n this.$wbwindow.Date.__WB_timediff = timediff;\n\n this.$wbwindow.Date.prototype.getTimezoneOffset = function() {\n return 0;\n };\n\n var orig_toString = this.$wbwindow.Date.prototype.toString;\n this.$wbwindow.Date.prototype.toString = function() {\n var string = orig_toString.call(this).split(' GMT')[0];\n if (string === 'Invalid Date') {\n return string;\n }\n return string + ' GMT+0000 (Coordinated Universal Time)';\n };\n\n var orig_toTimeString = this.$wbwindow.Date.prototype.toTimeString;\n this.$wbwindow.Date.prototype.toTimeString = function() {\n var string = orig_toTimeString.call(this).split(' GMT')[0];\n return string + ' GMT+0000 (Coordinated Universal Time)';\n };\n\n Object.defineProperty(this.$wbwindow.Date.prototype, 'constructor', {\n value: this.$wbwindow.Date\n });\n};\n\nWombat.prototype.initBlobOverride = function() {\n // don't use for SW replay as blob: iframes won't have access to SW\n if (!this.$wbwindow.Blob || this.wb_info.isSW) {\n return;\n }\n\n var orig_blob = this.$wbwindow.Blob;\n\n var wombat = this;\n\n this.$wbwindow.Blob = (function(Blob_) {\n return function Blob(array, options) {\n if (\n options &&\n (options.type === 'application/xhtml+xml' ||\n options.type === 'text/html')\n ) {\n // for now, just handle single string case\n if (\n array.length === 1 &&\n typeof array[0] === 'string' &&\n wombat.startsWith(array[0], '<!DOCTYPE html>')\n ) {\n array[0] = wombat.rewriteHtml(array[0]);\n options.type = 'text/html';\n }\n }\n\n return new Blob_(array, options);\n };\n })(this.$wbwindow.Blob);\n\n this.$wbwindow.Blob.prototype = orig_blob.prototype;\n};\n\nWombat.prototype.initIntersectionObsOverride = function() {\n var orig_iobs = this.$wbwindow.IntersectionObserver;\n\n var wombat = this;\n\n this.$wbwindow.IntersectionObserver = (function(IObs) {\n return function(callback, options) {\n if (options && options.root) {\n options.root = wombat.proxyToObj(options.root);\n }\n\n return new IObs(callback, options);\n };\n })(this.$wbwindow.IntersectionObserver);\n\n this.$wbwindow.IntersectionObserver.prototype = orig_iobs.prototype;\n\n Object.defineProperty(\n this.$wbwindow.IntersectionObserver.prototype,\n 'constructor',\n {\n value: this.$wbwindow.IntersectionObserver\n }\n );\n};\n\nWombat.prototype.initWSOverride = function() {\n if (!this.$wbwindow.WebSocket || !this.$wbwindow.WebSocket.prototype) {\n return;\n }\n\n this.$wbwindow.WebSocket = (function(WebSocket_) {\n function WebSocket(url, protocols) {\n this.openCallbacks = [];\n var ws = this;\n\n this.addEventListener = function(type, callback) {\n if (type === 'open') {\n ws.openCallbacks.push(callback);\n }\n };\n this.removeEventListener = function() {};\n this.close = function() {};\n this.send = function(data) {\n console.log('ws send', data);\n };\n\n this.protocol = protocols && protocols.length ? protocols[0] : '';\n this.url = url;\n this.readyState = 1;\n\n function simOpen() {\n var ev = new CustomEvent('open');\n if (ws.onopen) {\n ws.onopen(ev);\n }\n ws.openCallbacks.forEach(callback => callback(ev));\n }\n\n setTimeout(simOpen, 500);\n }\n\n WebSocket.CONNECTING = 0;\n WebSocket.OPEN = 1;\n WebSocket.CLOSING = 2;\n WebSocket.CLOSED = 3;\n\n return WebSocket;\n })(this.$wbwindow.WebSocket);\n\n Object.defineProperty(this.$wbwindow.WebSocket.prototype, 'constructor', {\n value: this.$wbwindow.WebSocket\n });\n\n addToStringTagToClass(this.$wbwindow.WebSocket, 'WebSocket');\n};\n\n/**\n * Applies an override to the document.title property in order to ensure\n * that actual top (archive top frame containing the replay iframe) receives\n * document.title updates\n */\nWombat.prototype.initDocTitleOverride = function() {\n var orig_get_title = this.getOrigGetter(this.$wbwindow.document, 'title');\n var orig_set_title = this.getOrigSetter(this.$wbwindow.document, 'title');\n var wombat = this;\n var set_title = function title(value) {\n var res = orig_set_title.call(this, value);\n var message = { wb_type: 'title', title: value };\n wombat.sendTopMessage(message);\n return res;\n };\n this.defProp(this.$wbwindow.document, 'title', set_title, orig_get_title);\n};\n\n/**\n * Applies an override to the FontFace constructor in order to ensure font URLs\n * are rewritten\n * @see https://drafts.csswg.org/css-font-loading/#FontFace-interface\n */\nWombat.prototype.initFontFaceOverride = function() {\n if (!this.$wbwindow.FontFace) {\n return;\n }\n var wombat = this;\n var origFontFace = this.$wbwindow.FontFace;\n this.$wbwindow.FontFace = (function(FontFace_) {\n return function FontFace(family, source, descriptors) {\n wombat.domConstructorErrorChecker(this, 'FontFace', arguments, 2);\n var rwSource = source;\n if (source != null) {\n if (typeof source !== 'string') {\n // is CSSOMString or ArrayBuffer or ArrayBufferView\n rwSource = wombat.rewriteInlineStyle(source.toString());\n } else {\n rwSource = wombat.rewriteInlineStyle(source);\n }\n }\n return new FontFace_(family, rwSource, descriptors);\n };\n })(this.$wbwindow.FontFace);\n this.$wbwindow.FontFace.prototype = origFontFace.prototype;\n Object.defineProperty(this.$wbwindow.FontFace.prototype, 'constructor', {\n value: this.$wbwindow.FontFace\n });\n addToStringTagToClass(this.$wbwindow.FontFace, 'FontFace');\n};\n\n/**\n * Forces, when possible, the devicePixelRatio property of window to 1\n * in order to ensure deterministic replay\n */\nWombat.prototype.initFixedRatio = function(value) {\n try {\n // otherwise, just set it\n this.$wbwindow.devicePixelRatio = value;\n } catch (e) {}\n\n // prevent changing, if possible\n if (Object.defineProperty) {\n try {\n // fixed pix ratio\n Object.defineProperty(this.$wbwindow, 'devicePixelRatio', {\n value: value,\n writable: false\n });\n } catch (e) {}\n }\n};\n\n/**\n * Initializes wombats path information from the supplied wbinfo object\n * @param {Object} wbinfo\n */\nWombat.prototype.initPaths = function(wbinfo) {\n wbinfo.wombat_opts = wbinfo.wombat_opts || {};\n //this.wb_info = wbinfo;\n Object.assign(this.wb_info, wbinfo);\n this.wb_opts = wbinfo.wombat_opts;\n this.wb_replay_prefix = wbinfo.prefix;\n this.wb_is_proxy = wbinfo.proxy_magic || !this.wb_replay_prefix;\n this.wb_info.top_host = this.wb_info.top_host || '*';\n this.wb_curr_host =\n this.$wbwindow.location.protocol + '//' + this.$wbwindow.location.host;\n this.wb_info.wombat_opts = this.wb_info.wombat_opts || {};\n this.wb_orig_scheme = wbinfo.wombat_scheme + '://';\n this.wb_orig_origin = this.wb_orig_scheme + wbinfo.wombat_host;\n this.wb_abs_prefix = this.wb_replay_prefix;\n if (!wbinfo.is_live && wbinfo.wombat_ts) {\n this.wb_capture_date_part = '/' + wbinfo.wombat_ts + '/';\n } else {\n this.wb_capture_date_part = '';\n }\n this.initBadPrefixes(this.wb_replay_prefix);\n this.initCookiePreset();\n};\n\n/**\n * Applies an override to Math.seed and Math.random using the supplied\n * seed in order to ensure that random numbers are deterministic during\n * replay\n * @param {string} seed\n */\nWombat.prototype.initSeededRandom = function(seed) {\n // Adapted from:\n // http://indiegamr.com/generate-repeatable-random-numbers-in-js/\n this.$wbwindow.Math.seed = parseInt(seed);\n var wombat = this;\n this.$wbwindow.Math.random = function random() {\n wombat.$wbwindow.Math.seed =\n (wombat.$wbwindow.Math.seed * 9301 + 49297) % 233280;\n return wombat.$wbwindow.Math.seed / 233280;\n };\n};\n\n/**\n * Applies overrides to history.pushState and history.replaceState in order\n * to ensure that URLs used for browser history manipulation are rewritten.\n * Also adds a `popstate` listener to window of the browser context wombat is in\n * in order to ensure that actual top (archive top frame containing the replay iframe)\n * browser history is updated IFF the history manipulation happens in the replay top\n */\nWombat.prototype.initHistoryOverrides = function() {\n this.overrideHistoryFunc('pushState');\n this.overrideHistoryFunc('replaceState');\n var wombat = this;\n this.$wbwindow.addEventListener('popstate', function(event) {\n wombat.sendHistoryUpdate(\n wombat.$wbwindow.WB_wombat_location.href,\n wombat.$wbwindow.document.title\n );\n });\n};\n\n/**\n * If cookie preset if passed in via wb_info, set parse and set cookies on the document\n */\nWombat.prototype.initCookiePreset = function() {\n if (this.wb_info.presetCookie) {\n var splitCookies = this.wb_info.presetCookie.split(';');\n for (var i = 0; i < splitCookies.length; i++) {\n this.$wbwindow.document.cookie =\n splitCookies[i].trim() + '; Path=' + this.rewriteUrl('./', true);\n }\n }\n};\n\n/**\n * Applies overrides to the XMLHttpRequest.open and XMLHttpRequest.responseURL\n * in order to ensure URLs are rewritten.\n *\n * Applies an override to window.fetch in order to rewrite URLs and URLs of\n * the supplied Request objects used as arguments to fetch.\n *\n * Applies overrides to window.Request, window.Response, window.EventSource,\n * and window.WebSocket in order to ensure URLs they operate on are rewritten.\n *\n * @see https://xhr.spec.whatwg.org/\n * @see https://fetch.spec.whatwg.org/\n * @see https://html.spec.whatwg.org/multipage/web-sockets.html#websocket\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface\n */\nWombat.prototype.initHTTPOverrides = function() {\n var wombat = this;\n\n // responseURL override\n this.overridePropExtract(\n this.$wbwindow.XMLHttpRequest.prototype,\n 'responseURL'\n );\n\n var convertToGet = !!this.wb_info.convert_post_to_get;\n\n if (!this.wb_info.isSW && !convertToGet) {\n if (this.$wbwindow.XMLHttpRequest.prototype.open) {\n var origXMLHttpOpen = this.$wbwindow.XMLHttpRequest.prototype.open;\n this.utilFns.XHRopen = origXMLHttpOpen;\n this.utilFns.XHRsend = this.$wbwindow.XMLHttpRequest.prototype.send;\n this.$wbwindow.XMLHttpRequest.prototype.open = function open(\n method,\n url,\n async,\n user,\n password\n ) {\n var rwURL = !this._no_rewrite ? wombat.rewriteUrl(url) : url;\n var openAsync = true;\n if (async != null && !async) openAsync = false;\n origXMLHttpOpen.call(this, method, rwURL, openAsync, user, password);\n if (!wombat.startsWith(rwURL, 'data:')) {\n this.setRequestHeader('X-Pywb-Requested-With', 'XMLHttpRequest');\n }\n };\n }\n } else {\n var origOpen = this.$wbwindow.XMLHttpRequest.prototype.open;\n var origSetRequestHeader = this.$wbwindow.XMLHttpRequest.prototype\n .setRequestHeader;\n var origSend = this.$wbwindow.XMLHttpRequest.prototype.send;\n this.utilFns.XHRopen = origOpen;\n this.utilFns.XHRsend = origSend;\n\n this.$wbwindow.XMLHttpRequest.prototype.open = function() {\n this.__WB_xhr_open_arguments = arguments;\n this.__WB_xhr_headers = new Headers();\n };\n\n this.$wbwindow.XMLHttpRequest.prototype.setAttributionReporting = function() {};\n\n this.$wbwindow.XMLHttpRequest.prototype.setRequestHeader = function(\n name,\n value\n ) {\n this.__WB_xhr_headers.set(name, value);\n };\n\n var wombat = this;\n\n var needSyncXHRCache =\n this.wb_info.isSW && navigator.userAgent.indexOf('Firefox') === -1;\n\n if (needSyncXHRCache) {\n this.syncXHRCachePending = new Set();\n }\n\n this.$wbwindow.XMLHttpRequest.prototype.send = async function(value) {\n if (\n convertToGet &&\n (this.__WB_xhr_open_arguments[0] === 'POST' ||\n this.__WB_xhr_open_arguments[0] === 'PUT')\n ) {\n var request = {\n url: this.__WB_xhr_open_arguments[1],\n method: this.__WB_xhr_open_arguments[0],\n headers: this.__WB_xhr_headers,\n postData: value\n };\n\n if (b(request)) {\n this.__WB_xhr_open_arguments[1] = request.url;\n this.__WB_xhr_open_arguments[0] = 'GET';\n value = null;\n }\n }\n\n const orig_url = this.__WB_xhr_open_arguments[1];\n\n if (!this._no_rewrite) {\n this.__WB_xhr_open_arguments[1] = wombat.rewriteUrl(\n this.__WB_xhr_open_arguments[1]\n );\n }\n\n // sync mode: disable unless Firefox\n // sync xhr with service workers supported only in FF at the moment\n // https://wpt.fyi/results/service-workers/service-worker/fetch-request-xhr-sync.https.html\n if (\n needSyncXHRCache &&\n this.__WB_xhr_open_arguments.length > 2 &&\n !this.__WB_xhr_open_arguments[2]\n ) {\n console.warn(\n 'wombat.js: Sync XHR not supported in SW-based replay in this browser, attempt to fetch async and store as data: URI for reuse'\n );\n\n const sync_xhr = new SyncXHRCache(\n wombat,\n orig_url,\n this.__WB_xhr_open_arguments,\n this.__WB_xhr_headers\n );\n\n if (!sync_xhr.addCacheOverride(this)) {\n function xhrResponseOverride(obj, attr) {\n var orig_getter = wombat.getOrigGetter(obj, attr);\n\n const getter = () => {\n sync_xhr.reloadIfNeeded();\n return orig_getter.call(this);\n };\n\n const setter = value => {\n return orig_setter.call(this, value);\n };\n\n wombat.defProp(obj, attr, setter, getter);\n }\n\n xhrResponseOverride(this, 'response');\n xhrResponseOverride(this, 'responseText');\n xhrResponseOverride(this, 'responseXML');\n return;\n }\n }\n\n origOpen.apply(this, this.__WB_xhr_open_arguments);\n\n if (!wombat.startsWith(this.__WB_xhr_open_arguments[1], 'data:')) {\n for (const [name, value] of this.__WB_xhr_headers.entries()) {\n origSetRequestHeader.call(this, name, value);\n }\n\n origSetRequestHeader.call(\n this,\n 'X-Pywb-Requested-With',\n 'XMLHttpRequest'\n );\n }\n\n return origSend.call(this, value);\n };\n }\n\n if (this.$wbwindow.fetch) {\n var orig_fetch = this.$wbwindow.fetch;\n this.$wbwindow.fetch = function fetch(input, init_opts) {\n var request;\n\n if (input instanceof Request) {\n var new_url = wombat.rewriteUrl(input.url);\n input.__WB_no_unrewrite = true;\n if (new_url === input.url) {\n request = input;\n } else {\n request = new Request(new_url, input);\n }\n delete input.__WB_no_unrewrite;\n } else {\n input = wombat.rewriteUrl(input.toString());\n request = new Request(input, init_opts);\n }\n\n return orig_fetch.call(wombat.proxyToObj(this), request);\n };\n }\n\n if (this.$wbwindow.Request && this.$wbwindow.Request.prototype) {\n var orig_request = this.$wbwindow.Request;\n this.$wbwindow.Request = (function(Request_) {\n return function Request(input, init_opts) {\n wombat.domConstructorErrorChecker(this, 'Request', arguments);\n var newInitOpts = init_opts || {};\n var newInput = input;\n var inputType = typeof input;\n switch (inputType) {\n case 'string':\n newInput = wombat.rewriteUrl(input);\n break;\n case 'object':\n newInput = input;\n if (input.url) {\n var new_url = wombat.rewriteUrl(input.url);\n if (new_url !== input.url) {\n // not much we can do here Request.url is read only\n // https://developer.mozilla.org/en-US/docs/Web/API/Request/url\n newInput = new Request_(new_url, input);\n }\n } else if (input.href) {\n // it is likely that input is either window.location or window.URL\n newInput = wombat.rewriteUrl(input.toString(), true);\n }\n break;\n }\n let unrwSet = false;\n // make a duplicate object to override referrer\n if (newInitOpts && newInitOpts.referrer) {\n var newReferrer = wombat.rewriteUrl(newInitOpts.referrer);\n if (newReferrer !== newInitOpts.referrer) {\n if (newInitOpts instanceof Request) {\n newInitOpts.__WB_no_unrewrite = true;\n unrwSet = true;\n } else {\n newInitOpts.referrer = newReferrer;\n }\n }\n }\n\n var request = new Request_(newInput, newInitOpts);\n if (unrwSet) {\n delete newInitOpts.__WB_no_unrewrite;\n }\n return request;\n };\n })(this.$wbwindow.Request);\n\n this.$wbwindow.Request.prototype = orig_request.prototype;\n Object.defineProperty(this.$wbwindow.Request.prototype, 'constructor', {\n value: this.$wbwindow.Request\n });\n\n // override Request.url\n this.overridePropExtract(this.$wbwindow.Request.prototype, 'url');\n\n // override Request.referrer\n this.overridePropExtract(this.$wbwindow.Request.prototype, 'referrer');\n }\n\n if (this.$wbwindow.Response && this.$wbwindow.Response.prototype) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Response/redirect\n var originalRedirect = this.$wbwindow.Response.prototype.redirect;\n this.$wbwindow.Response.prototype.redirect = function redirect(\n url,\n status\n ) {\n var rwURL = wombat.rewriteUrl(url, true, null, wombat.$wbwindow.document);\n return originalRedirect.call(this, rwURL, status);\n };\n\n // override Response.url\n this.overridePropExtract(this.$wbwindow.Response.prototype, 'url');\n }\n\n if (this.$wbwindow.EventSource && this.$wbwindow.EventSource.prototype) {\n var origEventSource = this.$wbwindow.EventSource;\n this.$wbwindow.EventSource = (function(EventSource_) {\n return function EventSource(url, configuration) {\n wombat.domConstructorErrorChecker(this, 'EventSource', arguments);\n var rwURL = url;\n if (url != null) {\n rwURL = wombat.rewriteUrl(url);\n }\n return new EventSource_(rwURL, configuration);\n };\n })(this.$wbwindow.EventSource);\n this.$wbwindow.EventSource.prototype = origEventSource.prototype;\n Object.defineProperty(this.$wbwindow.EventSource.prototype, 'constructor', {\n value: this.$wbwindow.EventSource\n });\n addToStringTagToClass(this.$wbwindow.EventSource, 'EventSource');\n }\n};\n\n/**\n * Applies an override to Element.[getAttribute, setAttribute] in order to\n * ensure that operations on properties that contain URLs are rewritten\n * @see https://www.w3.org/TR/dom/#interface-element\n */\nWombat.prototype.initElementGetSetAttributeOverride = function() {\n if (\n this.wb_opts.skip_setAttribute ||\n (!this.$wbwindow.Element || !this.$wbwindow.Element.prototype)\n ) {\n return;\n }\n\n var wombat = this;\n var ElementProto = this.$wbwindow.Element.prototype;\n\n if (ElementProto.setAttribute) {\n var orig_setAttribute = ElementProto.setAttribute;\n ElementProto._orig_setAttribute = orig_setAttribute;\n ElementProto.setAttribute = function setAttribute(name, value) {\n var rwValue = value;\n if (name && typeof rwValue === 'string') {\n var lowername = name.toLowerCase();\n if (\n this.tagName === 'LINK' &&\n lowername === 'href' &&\n rwValue.indexOf('data:text/css') === 0\n ) {\n rwValue = wombat.rewriteInlineStyle(value);\n } else if (lowername === 'style') {\n rwValue = wombat.rewriteStyle(value);\n } else if (\n lowername === 'srcset' ||\n (lowername === 'imagesrcset' && this.tagName === 'LINK')\n ) {\n rwValue = wombat.rewriteSrcset(value, this);\n } else if (lowername === 'target' && this.tagName === 'A') {\n rwValue = wombat.rewriteAttrTarget(value);\n } else {\n var shouldRW = wombat.shouldRewriteAttr(this.tagName, lowername);\n if (shouldRW) {\n wombat.removeWBOSRC(this);\n if (!this._no_rewrite) {\n rwValue = wombat.rewriteUrl(\n value,\n false,\n wombat.rwModForElement(this, lowername)\n );\n }\n }\n }\n }\n return orig_setAttribute.call(this, name, rwValue);\n };\n }\n\n if (ElementProto.getAttribute) {\n var orig_getAttribute = ElementProto.getAttribute;\n this.wb_getAttribute = orig_getAttribute;\n ElementProto.getAttribute = function getAttribute(name) {\n var result = orig_getAttribute.call(this, name);\n if (result === null) {\n return result;\n }\n var lowerName = name;\n if (name) {\n lowerName = name.toLowerCase();\n }\n if (wombat.shouldRewriteAttr(this.tagName, lowerName)) {\n var maybeWBOSRC = wombat.retrieveWBOSRC(this);\n if (maybeWBOSRC) return maybeWBOSRC;\n return wombat.extractOriginalURL(result);\n } else if (\n wombat.startsWith(lowerName, 'data-') &&\n wombat.startsWithOneOf(result, wombat.wb_prefixes)\n ) {\n return wombat.extractOriginalURL(result);\n }\n\n return result;\n };\n }\n};\n\n/**\n * Applies an override to the getAttribute[NS] and setAttribute[NS] functions\n * of the SVGImageElement interface in order to ensure that the URLs of the\n * href and xlink:href properties are rewritten\n */\nWombat.prototype.initSvgImageOverrides = function() {\n if (!this.$wbwindow.SVGImageElement) {\n return;\n }\n var svgImgProto = this.$wbwindow.SVGImageElement.prototype;\n\n var orig_getAttr = svgImgProto.getAttribute;\n var orig_getAttrNS = svgImgProto.getAttributeNS;\n var orig_setAttr = svgImgProto.setAttribute;\n var orig_setAttrNS = svgImgProto.setAttributeNS;\n var wombat = this;\n\n svgImgProto.getAttribute = function getAttribute(name) {\n var value = orig_getAttr.call(this, name);\n if (name.indexOf('xlink:href') >= 0 || name === 'href') {\n return wombat.extractOriginalURL(value);\n }\n return value;\n };\n\n svgImgProto.getAttributeNS = function getAttributeNS(ns, name) {\n var value = orig_getAttrNS.call(this, ns, name);\n if (name.indexOf('xlink:href') >= 0 || name === 'href') {\n return wombat.extractOriginalURL(value);\n }\n return value;\n };\n\n svgImgProto.setAttribute = function setAttribute(name, value) {\n var rwValue = value;\n if (name.indexOf('xlink:href') >= 0 || name === 'href') {\n rwValue = wombat.rewriteUrl(value);\n }\n return orig_setAttr.call(this, name, rwValue);\n };\n\n svgImgProto.setAttributeNS = function setAttributeNS(ns, name, value) {\n var rwValue = value;\n if (name.indexOf('xlink:href') >= 0 || name === 'href') {\n rwValue = wombat.rewriteUrl(value);\n }\n return orig_setAttrNS.call(this, ns, name, rwValue);\n };\n};\n\n/**\n * Applies an override to document.createElementNS in order to ensure that the\n * nameSpaceURI argument is un-rewritten\n */\nWombat.prototype.initCreateElementNSFix = function() {\n if (\n !this.$wbwindow.document.createElementNS ||\n !this.$wbwindow.Document.prototype.createElementNS\n ) {\n return;\n }\n var orig_createElementNS = this.$wbwindow.document.createElementNS;\n var wombat = this;\n\n var createElementNS = function createElementNS(namespaceURI, qualifiedName) {\n return orig_createElementNS.call(\n wombat.proxyToObj(this),\n wombat.extractOriginalURL(namespaceURI),\n qualifiedName\n );\n };\n\n this.$wbwindow.Document.prototype.createElementNS = createElementNS;\n this.$wbwindow.document.createElementNS = createElementNS;\n};\n\n/**\n * Applies an override to document.querySelector()\n * to override exact/prefix 'src' / 'href' queries\n */\nWombat.prototype.initQuerySelectorOverride = function() {\n if (\n !this.$wbwindow.document.querySelector ||\n !this.$wbwindow.Document.prototype.querySelector\n ) {\n return;\n }\n\n function rewriteQuery(query) {\n if (typeof query === 'string') {\n try {\n query = query.replace(\n /((?:^|\\s)\\b\\w+\\[(?:src|href|data-href))[\\^]?(=['\"]?(?:https?[:])?\\/\\/)/,\n '$1*$2'\n );\n } catch (e) {\n // ignore\n }\n }\n\n return query;\n }\n\n var wombat = this;\n\n var orig_QS = this.$wbwindow.document.querySelector;\n\n var querySelector = function(query) {\n return orig_QS.call(wombat.proxyToObj(this), rewriteQuery(query));\n };\n\n var orig_QSA = this.$wbwindow.document.querySelectorAll;\n\n var querySelectorAll = function(query) {\n return orig_QSA.call(wombat.proxyToObj(this), rewriteQuery(query));\n };\n\n this.$wbwindow.Document.prototype.querySelector = querySelector;\n this.$wbwindow.document.querySelector = querySelector;\n\n this.$wbwindow.Document.prototype.querySelectorAll = querySelectorAll;\n this.$wbwindow.document.querySelectorAll = querySelectorAll;\n};\n\n/**\n * Applies an override to Element.insertAdjacentHTML in order to ensure\n * that the strings of HTML to be inserted are rewritten and to\n * Element.insertAdjacentElement in order to ensure that the Elements to\n * be inserted are rewritten\n */\nWombat.prototype.initInsertAdjacentElementHTMLOverrides = function() {\n var Element = this.$wbwindow.Element;\n if (!Element || !Element.prototype) return;\n var elementProto = Element.prototype;\n var rewriteFn = this.rewriteInsertAdjHTMLOrElemArgs;\n if (elementProto.insertAdjacentHTML) {\n var origInsertAdjacentHTML = elementProto.insertAdjacentHTML;\n elementProto.insertAdjacentHTML = function insertAdjacentHTML(\n position,\n text\n ) {\n return rewriteFn(this, origInsertAdjacentHTML, position, text, true);\n };\n }\n if (elementProto.insertAdjacentElement) {\n var origIAdjElem = elementProto.insertAdjacentElement;\n elementProto.insertAdjacentElement = function insertAdjacentElement(\n position,\n element\n ) {\n return rewriteFn(this, origIAdjElem, position, element, false);\n };\n }\n};\n\n/**\n * Applies overrides to Node.[appendChild, insertBefore, replaceChild] and\n * [Element, DocumentFragment].[append, prepend) in order to ensure the that\n * the elements added by these functions are rewritten.\n * Also applies an override to the Node.ownerDocument, HTMLHtmlElement.parentNode,\n * and Event.target getter functions do not return a JS Proxy object used by wombat\n * @see https://www.w3.org/TR/dom/#node\n */\nWombat.prototype.initDomOverride = function() {\n var Node = this.$wbwindow.Node;\n if (Node && Node.prototype) {\n var rewriteFn = this.rewriteNodeFuncArgs;\n if (Node.prototype.appendChild) {\n var originalAppendChild = Node.prototype.appendChild;\n Node.prototype.appendChild = function appendChild(newNode, oldNode) {\n return rewriteFn(this, originalAppendChild, newNode, oldNode);\n };\n }\n if (Node.prototype.insertBefore) {\n var originalInsertBefore = Node.prototype.insertBefore;\n Node.prototype.insertBefore = function insertBefore(newNode, oldNode) {\n return rewriteFn(this, originalInsertBefore, newNode, oldNode);\n };\n }\n if (Node.prototype.replaceChild) {\n var originalReplaceChild = Node.prototype.replaceChild;\n Node.prototype.replaceChild = function replaceChild(newNode, oldNode) {\n return rewriteFn(this, originalReplaceChild, newNode, oldNode);\n };\n }\n this.overridePropToProxy(Node.prototype, 'ownerDocument');\n this.overridePropToProxy(\n this.$wbwindow.HTMLHtmlElement.prototype,\n 'parentNode'\n );\n this.overridePropToProxy(this.$wbwindow.Event.prototype, 'target');\n\n // getRootNode() override\n var orig_getRootNode = Node.prototype.getRootNode;\n var wombat = this;\n\n Node.prototype.getRootNode = function() {\n return wombat.objToProxy(orig_getRootNode.call(this));\n };\n }\n\n if (this.$wbwindow.Element && this.$wbwindow.Element.prototype) {\n this.overrideParentNodeAppendPrepend(this.$wbwindow.Element);\n this.overrideChildNodeInterface(this.$wbwindow.Element, false);\n }\n\n if (\n this.$wbwindow.DocumentFragment &&\n this.$wbwindow.DocumentFragment.prototype\n ) {\n this.overrideParentNodeAppendPrepend(this.$wbwindow.DocumentFragment);\n }\n};\n\n/**\n * Applies overrides to document.referrer, document.origin, document.domain, and\n * window.origin in order to ensure their getters and setters behave as expected\n * on the live web\n * @param {Document} $document\n */\nWombat.prototype.initDocOverrides = function($document) {\n if (!Object.defineProperty) return;\n\n // referrer\n this.overrideReferrer($document);\n\n // origin\n this.defGetterProp($document, 'origin', function origin() {\n return this.WB_wombat_location.origin;\n });\n // https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/origin, chrome 59+ and ff 54+\n this.defGetterProp(this.$wbwindow, 'origin', function origin() {\n return this.WB_wombat_location.origin;\n });\n\n var wombat = this;\n // domain\n var domain_setter = function domain(val) {\n var loc = this.WB_wombat_location;\n if (loc && wombat.endsWith(loc.hostname, val)) {\n this.__wb_domain = val;\n }\n };\n\n var domain_getter = function domain() {\n return this.__wb_domain || this.WB_wombat_location.hostname;\n };\n\n this.defProp($document, 'domain', domain_setter, domain_getter);\n};\n\n/**\n * Apples overrides to document.[write, writeln, open, close] in order\n * to ensure that the values they operate on or create are rewritten and\n * wombat is initialized in the new documents/windows.\n * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html\n * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-document-open-window\n * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-document-close\n * @see https://html.spec.whatwg.org/multipage/dom.html#dom-document-body\n */\nWombat.prototype.initDocWriteOpenCloseOverride = function() {\n if (!this.$wbwindow.DOMParser) {\n return;\n }\n\n // for both document.write and document.writeln, all arguments are treated as a string and concatenated together\n // https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html\n\n var DocumentProto = this.$wbwindow.Document.prototype;\n var $wbDocument = this.$wbwindow.document;\n\n this._writeBuff = '';\n\n var wombat = this;\n\n function isSWLoad() {\n return wombat.wb_info.isSW && wombat.$wbwindow.frameElement;\n }\n\n function prepForWrite(args) {\n var string;\n\n if (args.length === 0) {\n return '';\n }\n\n if (args.length === 1) {\n string = args[0];\n } else {\n // use Array.join rather than Array.apply because join works with array like objects\n string = Array.prototype.join.call(args, '');\n }\n\n return string;\n }\n\n /**\n * Rewrite the arguments supplied to document.[write, writeln] in order\n * to ensure that the string of HTML is rewritten\n * @param {Object} fnThis\n * @param {function} originalFn\n * @param {Object} rewritten string\n */\n function docWrite(fnThis, originalFn, string) {\n var win = wombat.$wbwindow;\n var thisObj = wombat.proxyToObj(fnThis);\n\n if (fnThis.readyState === 'loading') {\n // skip if seems to be part of an open comment\n // if an open comment exists after end of comment (or -1)\n if (string && string.indexOf('\x3c!--') > string.indexOf('--\x3e')) {\n return originalFn.call(thisObj, string);\n }\n }\n\n if (\n isSWLoad() ||\n (fnThis.readyState === 'loading' && wombat.wb_info.injectDocClose)\n ) {\n wombat._writeBuff += string;\n return;\n }\n\n string = wombat.rewriteHtml(string, true);\n var thisObj = wombat.proxyToObj(fnThis);\n var res = originalFn.call(thisObj, string);\n wombat.initNewWindowWombat(thisObj.defaultView);\n return res;\n }\n\n // Write\n var orig_doc_write = $wbDocument.write;\n var new_write = function write() {\n return docWrite(this, orig_doc_write, prepForWrite(arguments));\n };\n $wbDocument.write = new_write;\n DocumentProto.write = new_write;\n\n // Writeln\n var orig_doc_writeln = $wbDocument.writeln;\n var new_writeln = function writeln() {\n return docWrite(this, orig_doc_writeln, prepForWrite(arguments));\n };\n $wbDocument.writeln = new_writeln;\n DocumentProto.writeln = new_writeln;\n\n // Open\n var orig_doc_open = $wbDocument.open;\n var new_open = function open() {\n var thisObj = wombat.proxyToObj(this);\n var res;\n if (arguments.length === 3) {\n // we have the case where a new window will be opened\n // https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-document-open-window\n var rwUrl = wombat.rewriteUrl(arguments[0], false, 'mp_');\n res = orig_doc_open.call(thisObj, rwUrl, arguments[1], arguments[2]);\n wombat.initNewWindowWombat(res, arguments[0]);\n } else {\n res = orig_doc_open.call(thisObj);\n if (isSWLoad()) {\n // only clear writeBuff if open() cleared the document, eg. starting a new document\n if (!thisObj.documentElement) {\n wombat._writeBuff = '';\n }\n } else {\n wombat.initNewWindowWombat(thisObj.defaultView);\n }\n }\n return res;\n };\n\n $wbDocument.open = new_open;\n DocumentProto.open = new_open;\n\n // we override close in order to ensure wombat is init'd\n // https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-document-close\n var originalClose = $wbDocument.close;\n var newClose = function close() {\n var thisObj = wombat.proxyToObj(this);\n if (wombat._writeBuff) {\n // Clear the global state before calling the native orig_doc_write because\n // injectDocClose means that document.write('<script>...<\/script>')\n // will call this function again before the first call returns.\n const writeBuff = wombat._writeBuff;\n wombat._writeBuff = '';\n\n let nativeWriteReplacedDocument = false;\n\n // possible options here are:\n //\n // 1) initial page load: oldDocumentElement is non-null, calling write doesn't change element\n // 2) new document: doc.open(), doc.write() and then doc.close() called:\n // oldDocumentElement is null, replaced with new document\n // 3) new document: doc.write() and doc.close() called without doc.open()\n // oldDocumentElement is non-null old doc, replaced with new document\n\n // First, always call native .write() and .close() as sync code may attempt to access\n // then new document after .close()\n const oldDocumentElement = thisObj.documentElement;\n orig_doc_write.call(thisObj, wombat.rewriteHtml(writeBuff, true));\n nativeWriteReplacedDocument =\n thisObj.documentElement !== oldDocumentElement;\n\n // Chromium and sometimes Firefox have an issue where it does not route requests from replaced\n // iframe documents to the service worker, so as a workaround if\n // document.write() or document.open() replaced the document we create a\n // blob URL from the buffer contents and navigate the iframe to it.\n if (isSWLoad() && nativeWriteReplacedDocument) {\n wombat.blobUrlForIframe(wombat.$wbwindow.frameElement, writeBuff);\n\n const doc = this;\n\n try {\n // catch any sync changes to doc being replaced, and create updated blob\n if (doc.documentElement) {\n const m = new wombat.$wbwindow.MutationObserver((mut, obs) => {\n wombat.blobUrlForIframe(\n wombat.$wbwindow.frameElement,\n doc.documentElement.outerHTML\n );\n });\n m.observe(doc.documentElement, { childList: true, subtree: true });\n }\n } catch (e) {\n // ignore\n }\n }\n return;\n }\n wombat.initNewWindowWombat(thisObj.defaultView);\n if (originalClose.__WB_orig_apply) {\n return originalClose.__WB_orig_apply(thisObj, arguments);\n }\n return originalClose.apply(thisObj, arguments);\n };\n\n $wbDocument.close = newClose;\n DocumentProto.close = newClose;\n\n // we override the setter for document.body because it is settable\n // to either an instance of HTMLBodyElement or HTMLFrameSetElement and\n // there are ways to get un-rewritten elements into replay we must allow\n // https://html.spec.whatwg.org/multipage/dom.html#dom-document-body\n var oBodyGetter = this.getOrigGetter(DocumentProto, 'body');\n var oBodySetter = this.getOrigSetter(DocumentProto, 'body');\n if (oBodyGetter && oBodySetter) {\n this.defProp(\n DocumentProto,\n 'body',\n function body(newBody) {\n if (\n newBody &&\n (newBody instanceof HTMLBodyElement ||\n newBody instanceof HTMLFrameSetElement)\n ) {\n wombat.rewriteElemComplete(newBody);\n }\n return oBodySetter.call(wombat.proxyToObj(this), newBody);\n },\n oBodyGetter\n );\n }\n};\n\n/**\n * Inits wombat in the supplied iframe\n * @param {HTMLIFrameElement} iframe\n */\nWombat.prototype.initIframeWombat = function(iframe) {\n var win;\n\n if (iframe._get_contentWindow) {\n win = iframe._get_contentWindow.call(iframe); // eslint-disable-line no-useless-call\n } else {\n win = iframe.contentWindow;\n }\n\n try {\n if (!win || win === this.$wbwindow || win._skip_wombat || win._wb_wombat) {\n return;\n }\n } catch (e) {\n return;\n }\n\n var src = iframe.src;\n //var src = this.wb_getAttribute.call(iframe, 'src');\n\n this.initNewWindowWombat(win, src);\n};\n\n/**\n * Initializes wombat in the supplied window IFF the src URL of the window is\n * not the empty string, about:blank, or a \"javascript:\" URL\n * @param {Window} win\n * @param {string} [src] unrewritten url\n */\nWombat.prototype.initNewWindowWombat = function(win, src) {\n var fullWombat = false;\n\n if (!win || win._wb_wombat) return;\n\n if (\n !src ||\n src === '' ||\n this.startsWithOneOf(src, ['about:blank', 'javascript:'])\n ) {\n fullWombat = true;\n }\n\n if (!fullWombat && this.wb_info.isSW) {\n var origURL = this.extractOriginalURL(src);\n if (\n origURL === 'about:blank' ||\n origURL.startsWith('srcdoc:') ||\n origURL.startsWith('blob:')\n ) {\n fullWombat = true;\n }\n }\n\n if (fullWombat) {\n // win._WBWombat = wombat_internal(win);\n // win._wb_wombat = new win._WBWombat(wb_info);\n var newInfo = {};\n Object.assign(newInfo, this.wb_info);\n var wombat = new Wombat(win, newInfo);\n win._wb_wombat = wombat.wombatInit();\n } else {\n // These should get overridden when content is loaded, but just in case...\n // win._WB_wombat_location = win.location;\n // win.document.WB_wombat_location = win.document.location;\n // win._WB_wombat_top = $wbwindow.WB_wombat_top;\n\n this.initProtoPmOrigin(win);\n this.initPostMessageOverride(win);\n this.initMessageEventOverride(win);\n this.initCheckThisFunc(win);\n this.initImportWrapperFunc(win);\n }\n};\n\n/**\n * Applies an override to either window.[setTimeout, setInterval] functions\n * in order to ensure that usage such as [setTimeout|setInterval]('document.location.href = \"xyz.com\"', time)\n * behaves as expected during replay.\n *\n * In this case the supplied string is eval'd in the current context skipping\n * the surrounding scope\n */\nWombat.prototype.initTimeoutIntervalOverrides = function() {\n var rewriteFn = this.rewriteSetTimeoutInterval;\n if (this.$wbwindow.setTimeout && !this.$wbwindow.setTimeout.__$wbpatched$__) {\n var originalSetTimeout = this.$wbwindow.setTimeout;\n this.$wbwindow.setTimeout = function setTimeout() {\n return rewriteFn(this, originalSetTimeout, arguments);\n };\n this.$wbwindow.setTimeout.__$wbpatched$__ = true;\n }\n\n if (\n this.$wbwindow.setInterval &&\n !this.$wbwindow.setInterval.__$wbpatched$__\n ) {\n var originalSetInterval = this.$wbwindow.setInterval;\n this.$wbwindow.setInterval = function setInterval() {\n return rewriteFn(this, originalSetInterval, arguments);\n };\n this.$wbwindow.setInterval.__$wbpatched$__ = true;\n }\n};\n\n/**\n * Applies an overrides to the constructor of window.[Worker, SharedWorker] in\n * order to ensure that the URL argument is rewritten.\n *\n * Applies an override to ServiceWorkerContainer.register in order to ensure\n * that the URLs used in ServiceWorker registration are rewritten.\n *\n * Applies an override to Worklet.addModule in order to ensure that URL\n * to the worklet module is rewritten\n * @see https://html.spec.whatwg.org/multipage/workers.html\n * @see https://w3c.github.io/ServiceWorker/\n * @see https://drafts.css-houdini.org/worklets/#worklet\n */\nWombat.prototype.initWorkerOverrides = function() {\n var wombat = this;\n\n if (this.$wbwindow.Worker && !this.$wbwindow.Worker._wb_worker_overridden) {\n // Worker unrewrite postMessage\n var orig_worker = this.$wbwindow.Worker;\n this.$wbwindow.Worker = (function(Worker_) {\n return function Worker(url, options) {\n wombat.domConstructorErrorChecker(this, 'Worker', arguments);\n return new Worker_(wombat.rewriteWorker(url, options), options);\n };\n })(orig_worker);\n\n this.$wbwindow.Worker.prototype = orig_worker.prototype;\n Object.defineProperty(this.$wbwindow.Worker.prototype, 'constructor', {\n value: this.$wbwindow.Worker\n });\n this.$wbwindow.Worker._wb_worker_overridden = true;\n }\n\n if (\n this.$wbwindow.SharedWorker &&\n !this.$wbwindow.SharedWorker.__wb_sharedWorker_overridden\n ) {\n // per https://html.spec.whatwg.org/multipage/workers.html#sharedworker\n var oSharedWorker = this.$wbwindow.SharedWorker;\n this.$wbwindow.SharedWorker = (function(SharedWorker_) {\n return function SharedWorker(url, options) {\n wombat.domConstructorErrorChecker(this, 'SharedWorker', arguments);\n return new SharedWorker_(wombat.rewriteWorker(url, options), options);\n };\n })(oSharedWorker);\n\n this.$wbwindow.SharedWorker.prototype = oSharedWorker.prototype;\n Object.defineProperty(\n this.$wbwindow.SharedWorker.prototype,\n 'constructor',\n {\n value: this.$wbwindow.SharedWorker\n }\n );\n this.$wbwindow.SharedWorker.__wb_sharedWorker_overridden = true;\n }\n\n if (\n this.$wbwindow.ServiceWorkerContainer &&\n this.$wbwindow.ServiceWorkerContainer.prototype &&\n this.$wbwindow.ServiceWorkerContainer.prototype.register\n ) {\n // https://w3c.github.io/ServiceWorker/\n var orig_register = this.$wbwindow.ServiceWorkerContainer.prototype\n .register;\n this.$wbwindow.ServiceWorkerContainer.prototype.register = function register(\n scriptURL,\n options\n ) {\n var newScriptURL = new wombat.URL(\n scriptURL,\n wombat.$wbwindow.document.baseURI\n ).href;\n var mod = wombat.getPageUnderModifier();\n if (options && options.scope) {\n options.scope = wombat.rewriteUrl(options.scope, false, mod);\n } else {\n options = { scope: wombat.rewriteUrl('/', false, mod) };\n }\n return orig_register.call(\n this,\n wombat.rewriteUrl(newScriptURL, false, 'sw_'),\n options\n );\n };\n }\n\n if (\n this.$wbwindow.Worklet &&\n this.$wbwindow.Worklet.prototype &&\n this.$wbwindow.Worklet.prototype.addModule &&\n !this.$wbwindow.Worklet.__wb_workerlet_overridden\n ) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Worklet/addModule\n var oAddModule = this.$wbwindow.Worklet.prototype.addModule;\n this.$wbwindow.Worklet.prototype.addModule = function addModule(\n moduleURL,\n options\n ) {\n var rwModuleURL = wombat.rewriteUrl(moduleURL, false, 'js_');\n return oAddModule.call(this, rwModuleURL, options);\n };\n this.$wbwindow.Worklet.__wb_workerlet_overridden = true;\n }\n};\n\n/**\n * Applies overrides to the getter setter functions of the supplied object\n * for the properties defined in {@link Wombat#URL_PROPS} IFF\n * Object.defineProperty is defined\n * @param {Object} loc\n * @param {function} oSetter\n * @param {function} oGetter\n */\nWombat.prototype.initLocOverride = function(loc, oSetter, oGetter) {\n var prop;\n if (Object.defineProperty) {\n for (var i = 0; i < this.URL_PROPS.length; i++) {\n prop = this.URL_PROPS[i];\n this.defProp(\n loc,\n prop,\n this.makeSetLocProp(prop, oSetter, oGetter),\n this.makeGetLocProp(prop, oGetter),\n true\n );\n }\n }\n\n prop = 'maybeHref';\n this.defProp(\n loc,\n prop,\n this.makeSetLocProp(prop, oSetter, oGetter),\n this.makeGetLocProp(prop, oGetter),\n false\n );\n};\n\n/**\n * Initialized WombatLocation on the supplied window object and adds the\n * __WB_pmw function on the window, as well as, defines WB_wombat_location\n * as property on the prototype of Object and adds the _WB_wombat_location\n * and __WB_check_loc properties to the supplied window\n * @param {Window} win\n */\nWombat.prototype.initWombatLoc = function(win) {\n if (!win || (win.WB_wombat_location && win.document.WB_wombat_location)) {\n return;\n }\n\n // Location\n var wombat_location = new WombatLocation(win.location, this);\n\n var wombat = this;\n\n if (Object.defineProperty) {\n var setter = function(value) {\n var loc =\n this._WB_wombat_location ||\n (this.defaultView && this.defaultView._WB_wombat_location);\n\n if (loc) {\n loc.href = value;\n }\n win.location = wombat.rewriteUrl(value);\n };\n\n var getter = function() {\n return (\n this._WB_wombat_location ||\n (this.defaultView && this.defaultView._WB_wombat_location) ||\n this.location\n );\n };\n\n this.defProp(win.Object.prototype, 'WB_wombat_location', setter, getter);\n\n this.initProtoPmOrigin(win);\n\n win._WB_wombat_location = wombat_location;\n } else {\n win.WB_wombat_location = wombat_location;\n\n // Check quickly after page load\n setTimeout(this.checkAllLocations, 500);\n\n // Check periodically every few seconds\n setInterval(this.checkAllLocations, 500);\n }\n};\n\n/**\n * Adds the __WB_pmw property to prototype of Object and adds the\n * __WB_check_loc property to window\n * @param {Window} win\n */\nWombat.prototype.initProtoPmOrigin = function(win) {\n if (win.Object.prototype.__WB_pmw) return;\n\n var pm_origin = function pm_origin(origin_window) {\n this.__WB_source = origin_window;\n return this;\n };\n\n try {\n win.Object.defineProperty(win.Object.prototype, '__WB_pmw', {\n get: function() {\n return pm_origin;\n },\n set: function() {},\n configurable: true,\n enumerable: false\n });\n } catch (e) {}\n\n win.__WB_check_loc = function(loc, args) {\n if (loc instanceof Location || loc instanceof WombatLocation) {\n // args, if provided, should be the 'arguments' from calling function\n // check if the location is actually a locally passed in argument,\n // if so, don't assign to global location\n if (args) {\n for (var i = 0; i < args.length; i++) {\n if (loc === args[i]) {\n return {};\n }\n }\n }\n return this.WB_wombat_location;\n } else {\n return {};\n }\n };\n};\n\n/**\n * Add proxy object globals, assign func and 'this' wrapper, to global Object.prototype\n *\n */\n\nWombat.prototype.initCheckThisFunc = function(win) {\n try {\n if (!win.Object.prototype[this.WB_CHECK_THIS_FUNC]) {\n win.Object.defineProperty(win.Object.prototype, this.WB_CHECK_THIS_FUNC, {\n configutable: false,\n enumerable: false,\n value: function(thisObj) {\n try {\n return thisObj && thisObj._WB_wombat_obj_proxy\n ? thisObj._WB_wombat_obj_proxy\n : thisObj;\n } catch (e) {\n return thisObj;\n }\n }\n });\n }\n } catch (e) {}\n};\n\nWombat.prototype.initImportWrapperFunc = function(win) {\n var wombat = this;\n\n const isImportMapped = url => {\n for (const map of document.querySelectorAll('script[type=\"importmap\"]')) {\n try {\n const mapData = JSON.parse(map.textContent);\n if (mapData.imports && mapData.imports[url]) {\n return true;\n }\n if (mapData.scopes) {\n for (const scope of Object.keys(mapData.scopes)) {\n if (url.startsWith(scope)) {\n return true;\n }\n }\n }\n } catch (e) {\n // ignore\n }\n }\n return false;\n };\n\n win.____wb_rewrite_import__ = function(base, url) {\n if (base) {\n base = wombat.extractOriginalURL(base);\n }\n\n // if esm and base provided (set to import.meta.url), use that as base for imports\n if (url && base) {\n // don't do extra rewriting if importmap exists and this url\n // is already mapped\n if (!isImportMapped(url)) {\n url = new wombat.URL(url, base).href;\n }\n // non-esm single param call, url is base\n } else if (base && url === undefined) {\n url = base;\n }\n return import(\n /*webpackIgnore: true*/ wombat.rewriteUrl(url, false, 'esm_')\n );\n };\n};\n\n/**\n * Override Object.getOwnPropertyNames() to filter out special wombat-added properties\n *\n */\n\nWombat.prototype.overrideGetOwnPropertyNames = function(win) {\n var orig_getOwnPropertyNames = win.Object.getOwnPropertyNames;\n\n var removeProps = [\n this.WB_CHECK_THIS_FUNC,\n 'WB_wombat_location',\n '__WB_pmw',\n 'WB_wombat_top',\n 'WB_wombat_eval',\n 'WB_wombat_runEval'\n ];\n\n try {\n win.Object.defineProperty(win.Object, 'getOwnPropertyNames', {\n value: function(object) {\n var props = orig_getOwnPropertyNames(object);\n\n for (var i = 0; i < removeProps.length; i++) {\n var foundInx = props.indexOf(removeProps[i]);\n if (foundInx >= 0) {\n props.splice(foundInx, 1);\n }\n }\n\n return props;\n }\n });\n } catch (e) {\n console.log(e);\n }\n};\n\n/**\n * Adds listeners for `message` and `hashchange` to window of the browser context wombat is in\n * in order to ensure that actual top (archive top frame containing the replay iframe)\n * browser history is updated IFF the history manipulation happens in the replay top\n */\nWombat.prototype.initHashChange = function() {\n if (!this.$wbwindow.__WB_top_frame) return;\n\n var wombat = this;\n\n var receive_hash_change = function receive_hash_change(event) {\n if (!event.data || !event.data.from_top) {\n return;\n }\n\n var message = event.data.message;\n\n if (!message.wb_type) return;\n\n if (message.wb_type === 'outer_hashchange') {\n if (wombat.$wbwindow.location.hash != message.hash) {\n wombat.$wbwindow.location.hash = message.hash;\n }\n }\n };\n\n var send_hash_change = function send_hash_change() {\n var message = {\n wb_type: 'hashchange',\n hash: wombat.$wbwindow.location.hash\n };\n\n wombat.sendTopMessage(message);\n };\n\n this.$wbwindow.addEventListener('message', receive_hash_change);\n\n this.$wbwindow.addEventListener('hashchange', send_hash_change);\n};\n\n/**\n * Overrides window.postMessage in order to ensure that messages sent\n * via this function are routed to the correct window, especially that\n * messages sent to the \"top frame\" do not go to archive top but replay top.\n *\n * This function also applies an override to EventTarget.[addEventListener, removeEventListener]\n * to ensure that listening to events behaves correctly during replay.\n *\n * This function is the place where the `onmessage` and `onstorage` setter functions\n * are overridden.\n * @param {Window} $wbwindow\n */\nWombat.prototype.initPostMessageOverride = function($wbwindow) {\n if (!$wbwindow.postMessage || $wbwindow.__orig_postMessage) {\n return;\n }\n\n var orig = $wbwindow.postMessage;\n var wombat = this;\n\n $wbwindow.__orig_postMessage = orig;\n\n // use this_obj.__WB_source not window to fix google calendar embeds, pm_origin sets this.__WB_source\n var postmessage_rewritten = function postMessage(\n message,\n targetOrigin_or_options,\n transfer,\n from_top\n ) {\n var from;\n var src_id;\n var this_obj = wombat.proxyToObj(this);\n if (!this_obj) {\n this_obj = $wbwindow;\n this_obj.__WB_source = $wbwindow;\n }\n if (this_obj.__WB_source && this_obj.__WB_source.WB_wombat_location) {\n var source = this_obj.__WB_source;\n\n from = source.WB_wombat_location.origin;\n if (!this_obj.__WB_win_id) {\n this_obj.__WB_win_id = {};\n this_obj.__WB_counter = 0;\n }\n\n if (!source.__WB_id) {\n var id = this_obj.__WB_counter;\n source.__WB_id = id + source.WB_wombat_location.href;\n this_obj.__WB_counter += 1;\n }\n this_obj.__WB_win_id[source.__WB_id] = source;\n\n src_id = source.__WB_id;\n\n this_obj.__WB_source = undefined;\n } else {\n from = window.WB_wombat_location.origin;\n }\n\n var targetOrigin;\n\n if (typeof targetOrigin_or_options === 'object') {\n targetOrigin = targetOrigin_or_options.targetOrigin;\n transfer = targetOrigin_or_options.transfer;\n } else {\n targetOrigin = targetOrigin_or_options;\n }\n\n var to_origin = targetOrigin;\n\n // if passed in origin is the replay (rewriting missed somewhere?)\n // set origin to current 'from' origin\n if (to_origin === this_obj.location.origin) {\n to_origin = from;\n }\n\n var new_message = {\n from: from,\n to_origin: to_origin,\n src_id: src_id,\n message: message,\n from_top: from_top\n };\n\n // set to 'real' origin if not '*'\n if (targetOrigin !== '*') {\n // if target origin is null (about:blank) or empty, don't pass event at all\n // as it would never succeed\n if (\n this_obj.location.origin === 'null' ||\n this_obj.location.origin === ''\n ) {\n return;\n }\n // set to actual (rewritten) origin\n targetOrigin = this_obj.location.origin;\n }\n\n // console.log(`Sending ${from} -> ${to_origin} (${targetOrigin}) ${message}`);\n\n return orig.call(this_obj, new_message, targetOrigin, transfer);\n };\n\n $wbwindow.postMessage = postmessage_rewritten;\n $wbwindow.Window.prototype.postMessage = postmessage_rewritten;\n\n var eventTarget = null;\n if ($wbwindow.EventTarget && $wbwindow.EventTarget.prototype) {\n eventTarget = $wbwindow.EventTarget.prototype;\n } else {\n eventTarget = $wbwindow;\n }\n\n // ADD\n var _oAddEventListener = eventTarget.addEventListener;\n eventTarget.addEventListener = function addEventListener(\n type,\n listener,\n useCapture\n ) {\n var obj = wombat.proxyToObj(this);\n var rwListener;\n if (type === 'message') {\n rwListener = wombat.message_listeners.add_or_get(listener, function() {\n return wrapEventListener(listener, obj, wombat);\n });\n } else if (type === 'storage') {\n wombat.storage_listeners.add_or_get(listener, function() {\n return wrapSameOriginEventListener(listener, obj);\n });\n } else if (type === 'online' || type === 'offline') {\n // do nothing, don't allow these events\n } else {\n rwListener = listener;\n }\n if (rwListener) {\n return _oAddEventListener.call(obj, type, rwListener, useCapture);\n }\n };\n\n // REMOVE\n var _oRemoveEventListener = eventTarget.removeEventListener;\n eventTarget.removeEventListener = function removeEventListener(\n type,\n listener,\n useCapture\n ) {\n var obj = wombat.proxyToObj(this);\n var rwListener;\n\n if (type === 'message') {\n rwListener = wombat.message_listeners.remove(listener);\n } else if (type === 'storage') {\n wombat.storage_listeners.remove(listener);\n } else {\n rwListener = listener;\n }\n\n if (rwListener) {\n return _oRemoveEventListener.call(obj, type, rwListener, useCapture);\n }\n };\n\n // ONMESSAGE & ONSTORAGE\n var override_on_prop = function(onevent, wrapperFN) {\n // var orig_getter = _wombat.getOrigGetter($wbwindow, onevent)\n var orig_setter = wombat.getOrigSetter($wbwindow, onevent);\n\n var setter = function(value) {\n this['__orig_' + onevent] = value;\n var obj = wombat.proxyToObj(this);\n var listener = value ? wrapperFN(value, obj, wombat) : value;\n return orig_setter.call(obj, listener);\n };\n\n var getter = function() {\n return this['__orig_' + onevent];\n };\n\n wombat.defProp($wbwindow, onevent, setter, getter);\n };\n override_on_prop('onmessage', wrapEventListener);\n override_on_prop('onstorage', wrapSameOriginEventListener);\n};\n\n/**\n * Applies overrides to the MessageEvent.[target, srcElement, currentTarget, eventPhase, path, source]\n * in order to ensure they are not a JS Proxy used by wombat\n * @param {Window} $wbwindow\n */\nWombat.prototype.initMessageEventOverride = function($wbwindow) {\n if (!$wbwindow.MessageEvent || $wbwindow.MessageEvent.prototype.__extended) {\n return;\n }\n this.addEventOverride('target');\n this.addEventOverride('srcElement');\n this.addEventOverride('currentTarget');\n this.addEventOverride('eventPhase');\n this.addEventOverride('path');\n this.overridePropToProxy($wbwindow.MessageEvent.prototype, 'source');\n $wbwindow.MessageEvent.prototype.__extended = true;\n};\n\n/**\n * Applies overrides to the constructors\n * - UIEvent\n * - MouseEvent\n * - TouchEvent\n * - KeyboardEvent\n * - WheelEvent\n * - InputEvent\n * - CompositionEvent\n *\n * in order to ensure the proper behavior of the events when wombat is using\n * an JS Proxy\n */\nWombat.prototype.initUIEventsOverrides = function() {\n this.overrideAnUIEvent('UIEvent');\n this.overrideAnUIEvent('MouseEvent');\n this.overrideAnUIEvent('TouchEvent');\n this.overrideAnUIEvent('FocusEvent');\n this.overrideAnUIEvent('KeyboardEvent');\n this.overrideAnUIEvent('WheelEvent');\n this.overrideAnUIEvent('InputEvent');\n this.overrideAnUIEvent('CompositionEvent');\n};\n\n/**\n * Applies an override to window.open in order to ensure the URL argument is rewritten.\n * Also applies the same override to the open function of all frames returned by\n * window.frames\n */\nWombat.prototype.initOpenOverride = function() {\n var orig = this.$wbwindow.open;\n\n if (this.$wbwindow.Window.prototype.open) {\n orig = this.$wbwindow.Window.prototype.open;\n }\n\n var wombat = this;\n\n var open_rewritten = function open(strUrl, strWindowName, strWindowFeatures) {\n strWindowName = wombat.rewriteAttrTarget(strWindowName);\n var rwStrUrl = wombat.rewriteUrl(strUrl, false);\n var res = orig.call(\n wombat.proxyToObj(this),\n rwStrUrl,\n strWindowName,\n strWindowFeatures\n );\n wombat.initNewWindowWombat(res, strUrl);\n return wombat.objToProxy(res);\n };\n\n this.$wbwindow.open = open_rewritten;\n\n if (this.$wbwindow.Window.prototype.open) {\n this.$wbwindow.Window.prototype.open = open_rewritten;\n }\n\n for (var i = 0; i < this.$wbwindow.frames.length; i++) {\n try {\n this.$wbwindow.frames[i].open = open_rewritten;\n } catch (e) {\n console.log(e);\n }\n }\n};\n\n/**\n * Rewrite 'target' for anchor tag or window.open\n */\n\nWombat.prototype.rewriteAttrTarget = function(target) {\n if (!this.wb_info.target_frame) {\n return target;\n }\n\n if (!target || target === '_blank' || target === '_parent' || target === '_top') {\n return this.wb_info.target_frame;\n }\n\n // if target is a different name, and we are the top frame, assume intent\n // is to open a new window, and not some iframe\n // (a further check could also be to check list of iframes to see if the target matches)\n if (target && this.$wbwindow === this.$wbwindow.__WB_replay_top) {\n return this.wb_info.target_frame;\n }\n\n return target;\n};\n\n/**\n * Applies an override to the getter and setter functions of document.cookie\n * in order to ensure that cookies are rewritten\n */\nWombat.prototype.initCookiesOverride = function() {\n var orig_get_cookie = this.getOrigGetter(this.$wbwindow.document, 'cookie');\n var orig_set_cookie = this.getOrigSetter(this.$wbwindow.document, 'cookie');\n\n if (!orig_get_cookie) {\n orig_get_cookie = this.getOrigGetter(\n this.$wbwindow.Document.prototype,\n 'cookie'\n );\n }\n if (!orig_set_cookie) {\n orig_set_cookie = this.getOrigSetter(\n this.$wbwindow.Document.prototype,\n 'cookie'\n );\n }\n\n var rwCookieReplacer = function(m, d1) {\n var date = new Date(d1);\n if (isNaN(date.getTime())) {\n return 'Expires=Thu,| 01 Jan 1970 00:00:00 GMT';\n }\n var finalDate = new Date(date.getTime() + Date.__WB_timediff);\n return 'Expires=' + finalDate.toUTCString().replace(',', ',|');\n };\n\n var wombat = this;\n var set_cookie = function cookie(value) {\n if (!value) return;\n var newValue = value.replace(wombat.cookie_expires_regex, rwCookieReplacer);\n var cookies = newValue.split(wombat.SetCookieRe);\n for (var i = 0; i < cookies.length; i++) {\n cookies[i] = wombat.rewriteCookie(cookies[i]);\n }\n return orig_set_cookie.call(wombat.proxyToObj(this), cookies.join(','));\n };\n\n var get_cookie = function cookie() {\n return orig_get_cookie.call(wombat.proxyToObj(this));\n };\n\n this.defProp(this.$wbwindow.document, 'cookie', set_cookie, get_cookie);\n};\n\n/**\n * Applies an override to navigator.[registerProtocolHandler, unregisterProtocolHandler] in order to\n * ensure that the URI argument is rewritten\n */\nWombat.prototype.initRegisterUnRegPHOverride = function() {\n var wombat = this;\n var winNavigator = this.$wbwindow.navigator;\n if (winNavigator.registerProtocolHandler) {\n var orig_registerPH = winNavigator.registerProtocolHandler;\n winNavigator.registerProtocolHandler = function registerProtocolHandler(\n protocol,\n uri,\n title\n ) {\n return orig_registerPH.call(\n this,\n protocol,\n wombat.rewriteUrl(uri),\n title\n );\n };\n }\n\n if (winNavigator.unregisterProtocolHandler) {\n var origUnregPH = winNavigator.unregisterProtocolHandler;\n winNavigator.unregisterProtocolHandler = function unregisterProtocolHandler(\n scheme,\n url\n ) {\n return origUnregPH.call(this, scheme, wombat.rewriteUrl(url));\n };\n }\n};\n\nWombat.prototype.initMiscNavigatorOverrides = function() {\n if (this.$wbwindow.navigator.sendBeacon) {\n this.$wbwindow.navigator.sendBeacon = function() {\n return true;\n };\n }\n Object.defineProperty(navigator, 'onLine', { value: true });\n if (this.$wbwindow.navigator.mediaDevices) {\n this.$wbwindow.navigator.mediaDevices.setCaptureHandleConfig = function() {};\n }\n if (this.$wbwindow.navigator.getInstalledRelatedApps) {\n this.$wbwindow.navigator.getInstalledRelatedApps = function() {\n return Promise.resolve([]);\n };\n }\n};\n\n/**\n * Applies an override to the constructor of the PresentationRequest interface object\n * in order to rewrite its URL(s) arguments\n * @see https://w3c.github.io/presentation-api/#constructing-a-presentationrequest\n */\nWombat.prototype.initPresentationRequestOverride = function() {\n if (\n this.$wbwindow.PresentationRequest &&\n this.$wbwindow.PresentationRequest.prototype\n ) {\n var wombat = this;\n var origPresentationRequest = this.$wbwindow.PresentationRequest;\n this.$wbwindow.PresentationRequest = (function(PresentationRequest_) {\n return function PresentationRequest(url) {\n wombat.domConstructorErrorChecker(\n this,\n 'PresentationRequest',\n arguments\n );\n var rwURL = url;\n if (url != null) {\n if (Array.isArray(rwURL)) {\n for (var i = 0; i < rwURL.length; i++) {\n rwURL[i] = wombat.rewriteUrl(rwURL[i], true, 'mp_');\n }\n } else {\n rwURL = wombat.rewriteUrl(url, true, 'mp_');\n }\n }\n return new PresentationRequest_(rwURL);\n };\n })(this.$wbwindow.PresentationRequest);\n this.$wbwindow.PresentationRequest.prototype =\n origPresentationRequest.prototype;\n Object.defineProperty(\n this.$wbwindow.PresentationRequest.prototype,\n 'constructor',\n {\n value: this.$wbwindow.PresentationRequest\n }\n );\n }\n};\n\n/**\n * Applies an override that disables the pages ability to send OS native\n * notifications. Also disables the ability of the replayed page to retrieve the geolocation\n * of the view.\n *\n * This is done in order to ensure that no malicious abuse of these functions\n * can happen during replay.\n */\nWombat.prototype.initDisableNotificationsGeoLocation = function() {\n if (window.Notification) {\n window.Notification.requestPermission = function requestPermission(\n callback\n ) {\n if (callback) {\n callback('denied');\n }\n\n return Promise.resolve('denied');\n };\n }\n\n var applyOverride = function(on) {\n if (!on) return;\n if (on.getCurrentPosition) {\n on.getCurrentPosition = function getCurrentPosition(\n success,\n error,\n options\n ) {\n if (error) {\n error({ code: 2, message: 'not available' });\n }\n };\n }\n if (on.watchPosition) {\n on.watchPosition = function watchPosition(success, error, options) {\n if (error) {\n error({ code: 2, message: 'not available' });\n }\n };\n }\n };\n if (window.geolocation) {\n applyOverride(window.geolocation);\n }\n if (window.navigator.geolocation) {\n applyOverride(window.navigator.geolocation);\n }\n};\n\n/**\n * Applies an override to window.[localStorage, sessionStorage] storage in order to ensure\n * that the replayed page can use both interfaces as expected during replay.\n */\nWombat.prototype.initStorageOverride = function() {\n this.addEventOverride('storageArea', this.$wbwindow.StorageEvent.prototype);\n\n ThrowExceptions.yes = false;\n\n var initStorage = {};\n\n if (this.wb_info.storage) {\n try {\n initStorage = JSON.parse(this.wb_info.storage);\n } catch (e) {\n console.warn('Error parsing storage, storages not loaded');\n }\n }\n\n this.__sessionStorage = this.$wbwindow.sessionStorage;\n this.__localStorage = this.$wbwindow.localStorage;\n\n createStorage(this, 'localStorage', initStorage.local);\n createStorage(this, 'sessionStorage', initStorage.session);\n\n // ensure localStorage instanceof Storage works\n this.$wbwindow.Storage = Storage;\n ThrowExceptions.yes = true;\n};\n\nWombat.prototype.initIndexedDBOverride = function() {\n if (!this.$wbwindow.IDBFactory) {\n return;\n }\n\n var proto = this.$wbwindow.IDBFactory.prototype;\n\n var prefix = 'wb-' + this.wb_orig_origin + '-';\n\n var orig_open = proto.open;\n proto.open = function(dbName, version) {\n return orig_open.call(this, prefix + dbName, version);\n };\n\n var orig_delete = proto.deleteDatabase;\n proto.delete = function(dbName) {\n return orig_delete.call(this, prefix + dbName, options);\n };\n\n var orig_databases = proto.databases;\n proto.databases = function() {\n var func = this;\n return new Promise(function(resolve, reject) {\n orig_databases\n .call(func)\n .then(function(dbList) {\n var keys = [];\n for (var i = 0; i < dbList.length; i++) {\n if (dbList[i].name.indexOf(prefix) === 0) {\n keys.push({\n name: dbList[i].name.substring(prefix.length),\n version: dbList[i].version\n });\n }\n }\n resolve(keys);\n })\n .catch(function(err) {\n reject(err);\n });\n });\n };\n};\n\nWombat.prototype.initCachesOverride = function() {\n if (!this.$wbwindow.Cache) {\n return;\n }\n\n var proto = this.$wbwindow.Cache.prototype;\n\n proto.match = function() {\n return Promise.resolve(undefined);\n };\n\n proto.matchAll = function() {\n return Promise.resolve([]);\n };\n\n proto.add = function() {\n return Promise.resolve(undefined);\n };\n\n proto.put = function() {\n return Promise.resolve(undefined);\n };\n\n proto.delete = function() {\n return Promise.resolve(false);\n };\n\n proto.keys = function() {\n return Promise.resolve([]);\n };\n};\n\nWombat.prototype.initCacheStorageOverride = function() {\n if (!this.$wbwindow.CacheStorage) {\n return;\n }\n\n // disable access to extension apis\n if (this.$wbwindow.chrome) {\n this.$wbwindow.chrome = {};\n }\n\n var proto = this.$wbwindow.CacheStorage.prototype;\n\n var prefix = 'wb-' + this.wb_orig_origin + '-';\n\n var orig_open = proto.open;\n proto.open = function(cacheName) {\n return orig_open.call(this, prefix + cacheName);\n };\n\n var orig_has = proto.has;\n proto.has = function(cacheName) {\n return orig_has.call(this, prefix + cacheName);\n };\n\n var orig_delete = proto.delete;\n proto.delete = function(cacheName) {\n return orig_delete.call(this, prefix + cacheName);\n };\n\n var orig_keys = proto.keys;\n proto.keys = function() {\n var func = this;\n return new Promise(function(resolve, reject) {\n orig_keys\n .call(func)\n .then(function(keyList) {\n var keys = [];\n for (var i = 0; i < keyList.length; i++) {\n if (keyList[i].indexOf(prefix) === 0) {\n keys.push(keyList[i].substring(prefix.length));\n }\n }\n resolve(keys);\n })\n .catch(function(err) {\n reject(err);\n });\n });\n };\n\n var orig_match = proto.match;\n proto.match = function match(request, opts) {\n var caches = this;\n\n return this.keys().then(function(cacheNames) {\n var match;\n\n return cacheNames.reduce(function(chain, cacheName) {\n return chain.then(function() {\n return (\n match ||\n caches\n .open(cacheName)\n .then(function(cache) {\n return cache.match(request, opts);\n })\n .then(function(response) {\n match = response;\n return match;\n })\n );\n });\n }, Promise.resolve());\n });\n };\n};\n\n/**\n * Initializes the wombat window JS Proxy object IFF JS Proxies are available.\n * @param {Window} $wbwindow\n * @return {Proxy<Window>}\n */\nWombat.prototype.initWindowObjProxy = function($wbwindow) {\n if (!$wbwindow.Proxy) return undefined;\n\n var ownProps = this.getAllOwnProps($wbwindow);\n var funCache = {};\n var wombat = this;\n var windowProxy = new $wbwindow.Proxy(\n {},\n {\n get: function(target, prop) {\n switch (prop) {\n case 'top':\n return wombat.$wbwindow.WB_wombat_top._WB_wombat_obj_proxy;\n case 'parent':\n // if at replay top, return the top object proxy\n if (wombat.$wbwindow === wombat.$wbwindow.WB_wombat_top) {\n return wombat.$wbwindow.WB_wombat_top._WB_wombat_obj_proxy;\n }\n // attempt to get the object proxy from parent, may throw if cross-origin\n try {\n var parentProxy = wombat.$wbwindow.parent._WB_wombat_obj_proxy;\n if (parentProxy) return parentProxy;\n } catch (e) {}\n\n // default to replay-top object proxy if all else fails\n return wombat.$wbwindow.WB_wombat_top._WB_wombat_obj_proxy;\n }\n return wombat.defaultProxyGet($wbwindow, prop, ownProps, funCache);\n },\n set: function(target, prop, value) {\n switch (prop) {\n case 'location':\n $wbwindow.WB_wombat_location = value;\n return true;\n case 'postMessage':\n case 'document':\n return true;\n }\n try {\n if (!Reflect.set(target, prop, value)) {\n return false;\n }\n } catch (e) {}\n return Reflect.set($wbwindow, prop, value);\n },\n has: function(target, prop) {\n return prop in $wbwindow;\n },\n ownKeys: function(target) {\n return Object.getOwnPropertyNames($wbwindow).concat(\n Object.getOwnPropertySymbols($wbwindow)\n );\n },\n getOwnPropertyDescriptor: function(target, key) {\n // first try the underlying object's descriptor\n // (to match defineProperty() behavior)\n var descriptor = Object.getOwnPropertyDescriptor(target, key);\n if (!descriptor) {\n descriptor = Object.getOwnPropertyDescriptor($wbwindow, key);\n // if using window's descriptor, must ensure it's configurable\n if (descriptor) {\n descriptor.configurable = true;\n }\n }\n return descriptor;\n },\n getPrototypeOf: function(target) {\n return Object.getPrototypeOf($wbwindow);\n },\n setPrototypeOf: function(target, newProto) {\n return false;\n },\n isExtensible: function(target) {\n return Object.isExtensible($wbwindow);\n },\n preventExtensions: function(target) {\n Object.preventExtensions($wbwindow);\n return true;\n },\n deleteProperty: function(target, prop) {\n var propDescriptor = Object.getOwnPropertyDescriptor($wbwindow, prop);\n if (propDescriptor === undefined) {\n return true;\n }\n if (propDescriptor.configurable === false) {\n return false;\n }\n delete target[prop];\n delete $wbwindow[prop];\n return true;\n },\n defineProperty: function(target, prop, desc) {\n var ndesc = desc || {};\n if (\n !ndesc.hasOwnProperty('value') &&\n !ndesc.hasOwnProperty('get') &&\n !ndesc.hasOwnProperty('set')\n ) {\n ndesc.value = $wbwindow[prop];\n }\n Reflect.defineProperty($wbwindow, prop, ndesc);\n return Reflect.defineProperty(target, prop, ndesc);\n }\n }\n );\n $wbwindow._WB_wombat_obj_proxy = windowProxy;\n return windowProxy;\n};\n\n/**\n * Initializes the wombat document JS Proxy object IFF JS Proxies are available.\n * This function also applies the {@link initDocOverrides} overrides regardless\n * if JS Proxies are available.\n * @param {Document} $document\n * @return {Proxy<Document>}\n */\nWombat.prototype.initDocumentObjProxy = function($document) {\n this.initDocOverrides($document);\n if (!this.$wbwindow.Proxy) return undefined;\n var funCache = {};\n var ownProps = this.getAllOwnProps($document);\n var wombat = this;\n var documentProxy = new this.$wbwindow.Proxy($document, {\n get: function(target, prop) {\n return wombat.defaultProxyGet($document, prop, ownProps, funCache);\n },\n set: function(target, prop, value) {\n if (prop === 'location') {\n $document.WB_wombat_location = value;\n return true;\n } else {\n return Reflect.set(target, prop, value);\n }\n }\n });\n $document._WB_wombat_obj_proxy = documentProxy;\n return documentProxy;\n};\n\n/**\n * Initializes and starts the auto-fetch worker IFF wbUseAFWorker is true\n */\nWombat.prototype.initAutoFetchWorker = function() {\n if (!this.wbUseAFWorker) return;\n var af = new AutoFetcher(this, {\n isTop: this.$wbwindow === this.$wbwindow.__WB_replay_top,\n workerURL:\n (this.wb_info.auto_fetch_worker_prefix || this.wb_info.static_prefix) +\n 'autoFetchWorker.js?init=' +\n encodeURIComponent(\n JSON.stringify({\n mod: this.wb_info.mod,\n prefix: this.wb_abs_prefix,\n rwRe: this.wb_unrewrite_rx.source\n })\n )\n });\n this.WBAutoFetchWorker = af;\n this.$wbwindow.$WBAutoFetchWorker$ = af;\n var wombat = this;\n this.utilFns.wbSheetMediaQChecker = function checkStyle() {\n // used only for link[rel='stylesheet'] so we remove our listener\n wombat._removeEventListener(\n this,\n 'load',\n wombat.utilFns.wbSheetMediaQChecker\n );\n // check no op condition\n if (this.sheet == null) return;\n // defer extraction to be nice :)\n if (wombat.WBAutoFetchWorker) {\n wombat.WBAutoFetchWorker.deferredSheetExtraction(this.sheet);\n }\n };\n};\n\n/**\n * Initializes the listener for when the document.readyState is \"complete\" in\n * order to send archive top the information about the title of the page and\n * have it add any favicons of the replayed page to its own markup.\n *\n * The wb_type=\"load\" message is sent to archive top IFF the page it originates\n * is replay top\n * @param {Object} wbinfo\n */\nWombat.prototype.initTopFrameNotify = function(wbinfo) {\n var wombat = this;\n\n var notify_top = function notify_top(event) {\n if (!wombat.$wbwindow.__WB_top_frame) {\n var hash = wombat.$wbwindow.location.hash;\n wombat.$wbwindow.location.replace(wbinfo.top_url + hash);\n return;\n }\n\n if (!wombat.$wbwindow.WB_wombat_location) return;\n\n var url = wombat.$wbwindow.WB_wombat_location.href;\n\n if (\n typeof url !== 'string' ||\n url === 'about:blank' ||\n url.indexOf('javascript:') === 0\n ) {\n return;\n }\n\n if (\n wombat.$wbwindow.document.readyState === 'complete' &&\n wombat.wbUseAFWorker &&\n wombat.WBAutoFetchWorker\n ) {\n wombat.WBAutoFetchWorker.extractFromLocalDoc();\n }\n\n if (wombat.$wbwindow !== wombat.$wbwindow.__WB_replay_top) {\n return;\n }\n\n var icons = [];\n var hicons = wombat.$wbwindow.document.querySelectorAll(\n 'link[rel*=\\'icon\\']'\n );\n\n for (var i = 0; i < hicons.length; i++) {\n var hicon = hicons[i];\n icons.push({\n rel: hicon.rel,\n href: wombat.wb_getAttribute.call(hicon, 'href')\n });\n }\n\n icons.push({\n rel: 'icon',\n href: wombat.rewriteUrl('/favicon.ico')\n });\n\n var message = {\n icons: icons,\n url: wombat.$wbwindow.WB_wombat_location.href,\n ts: wombat.wb_info.timestamp,\n request_ts: wombat.wb_info.request_ts,\n is_live: wombat.wb_info.is_live,\n title: wombat.$wbwindow.document ? wombat.$wbwindow.document.title : '',\n readyState: wombat.$wbwindow.document.readyState,\n wb_type: 'load'\n };\n\n wombat.sendTopMessage(message);\n };\n\n if (this.$wbwindow.document.readyState === 'complete') {\n notify_top();\n } else if (this.$wbwindow.addEventListener) {\n this.$wbwindow.document.addEventListener('readystatechange', notify_top);\n } else if (this.$wbwindow.attachEvent) {\n this.$wbwindow.document.attachEvent('onreadystatechange', notify_top);\n }\n};\n\n/**\n * Initialises the _WB_replay_top and _WB_top_frame properties on window\n * @param {Window} $wbwindow\n */\nWombat.prototype.initTopFrame = function($wbwindow) {\n // proxy mode\n if (this.wb_is_proxy) {\n $wbwindow.__WB_replay_top = $wbwindow.top;\n $wbwindow.__WB_top_frame = undefined;\n this.replayTopHost = replay_top.location.host;\n this.replayTopProtocol = replay_top.location.protocol;\n return;\n }\n\n var next_parent = function(win) {\n try {\n if (!win) return false;\n // if no wbinfo, see if _wb_wombat was set (eg. if about:blank page)\n if (!win.wbinfo) {\n return win._wb_wombat != null;\n } else {\n // otherwise, ensure that it is not a top container frame\n return win.wbinfo.is_framed;\n }\n } catch (e) {\n return false;\n }\n };\n\n var replay_top = $wbwindow;\n while (replay_top.parent != replay_top && next_parent(replay_top.parent)) {\n replay_top = replay_top.parent;\n }\n\n $wbwindow.__WB_replay_top = replay_top;\n this.replayTopHost = replay_top.location.host;\n this.replayTopProtocol = replay_top.location.protocol;\n\n var real_parent = replay_top.parent;\n // Check to ensure top frame is different window and directly accessible (later refactor to support postMessage)\n if (real_parent == $wbwindow || !this.wb_info.is_framed) {\n real_parent = undefined;\n }\n\n if (real_parent) {\n $wbwindow.__WB_top_frame = real_parent;\n this.initFrameElementOverride($wbwindow);\n } else {\n $wbwindow.__WB_top_frame = undefined;\n }\n\n // if not top-replay frame and using auto-fetch workers, register listener\n // messaging here\n if (!this.wb_opts.embedded && replay_top == $wbwindow) {\n if (this.wbUseAFWorker) {\n var wombat = this;\n this.$wbwindow.addEventListener(\n 'message',\n function(event) {\n if (\n event.data &&\n event.data.wb_type === 'aaworker' &&\n wombat.WBAutoFetchWorker\n ) {\n wombat.WBAutoFetchWorker.postMessage(event.data.msg);\n }\n },\n false\n );\n }\n //removed to rely on proxy object override to ensure 'parent' and 'top' overridden together\n //$wbwindow.__WB_orig_parent = $wbwindow.parent;\n //$wbwindow.parent = replay_top;\n }\n};\n\n/**\n * Applies an override to window.frameElement IFF the supplied windows\n * __WB_replay_top property is equal to the window object of the browser context\n * wombat is currently operating in\n * @param {Window} $wbwindow\n */\nWombat.prototype.initFrameElementOverride = function($wbwindow) {\n if (!Object.defineProperty) return;\n // Also try disabling frameElement directly, though may no longer be supported in all browsers\n if (\n this.proxyToObj($wbwindow.__WB_replay_top) == this.proxyToObj($wbwindow)\n ) {\n try {\n Object.defineProperty($wbwindow, 'frameElement', {\n value: null,\n configurable: false\n });\n } catch (e) {}\n }\n};\n\n/**\n * Adds the WB_wombat_top property to the prototype of Object\n * @param {Window} $wbwindow\n */\nWombat.prototype.initWombatTop = function($wbwindow) {\n if (!Object.defineProperty) return;\n\n // from http://stackoverflow.com/a/6229603\n var isWindow = function isWindow(obj) {\n if (typeof window.constructor === 'undefined') {\n return obj instanceof window.constructor;\n }\n return obj.window == obj;\n };\n\n var getter = function top() {\n if (this.__WB_replay_top) {\n return this.__WB_replay_top;\n } else if (isWindow(this)) {\n return this;\n }\n return this.top;\n };\n\n var setter = function top(val) {\n this.top = val;\n };\n\n this.defProp($wbwindow.Object.prototype, 'WB_wombat_top', setter, getter);\n};\n\n/**\n * To quote the MDN: 'Do not ever use eval'\n */\nWombat.prototype.initEvalOverride = function() {\n var rewriteEvalArg = this.rewriteEvalArg;\n var setNoop = function() {};\n\n this.wrappedEval = function(evalFunc) {\n return function(arg) {\n return rewriteEvalArg(evalFunc, arg);\n };\n };\n\n var wombat = this;\n\n var runEval = function runEval(func) {\n var obj = this;\n\n if (obj && obj.eval && obj.eval !== eval) {\n return {\n eval: function() {\n return obj.eval.__WB_orig_apply(obj, arguments);\n }\n };\n } else {\n return {\n eval: function(arg) {\n return rewriteEvalArg(func, arg);\n }\n };\n }\n };\n\n // with additional global opt\n var runEval2 = function runEval(func) {\n var obj = this;\n\n if (obj && obj.eval && obj.eval !== eval) {\n return {\n eval: function() {\n // should have at least 2 arguments as 2 are injected\n return obj.eval.__WB_orig_apply(obj, [].slice.call(arguments, 2));\n }\n };\n } else {\n return {\n eval: function(thisObj, args, evalparam) {\n // ensure this === window\n var isGlobal = thisObj === wombat.proxyToObj(wombat.$wbwindow);\n // wrap in try/catch in the off chance case we're in strict mode, and then treat as non-global\n try {\n isGlobal = isGlobal && !args.callee.caller;\n } catch (e) {\n isGlobal = false;\n }\n return rewriteEvalArg(func, evalparam, isGlobal);\n }\n };\n }\n };\n\n this.defProp(\n this.$wbwindow.Object.prototype,\n 'WB_wombat_runEval',\n setNoop,\n function() {\n return runEval;\n }\n );\n\n // for extra global eval option\n this.defProp(\n this.$wbwindow.Object.prototype,\n 'WB_wombat_runEval2',\n setNoop,\n function() {\n return runEval2;\n }\n );\n};\n\n/**\n * Initialize wombat's internal state and apply all overrides\n * @return {Object}\n */\nWombat.prototype.wombatInit = function() {\n // wombat init\n this._internalInit();\n\n this.initCookiePreset();\n\n // History\n this.initHistoryOverrides();\n\n this.overrideFunctionApply(this.$wbwindow);\n this.overrideFunctionCall(this.$wbwindow);\n this.overrideFunctionBind(this.$wbwindow);\n\n // Doc Title\n this.initDocTitleOverride();\n this.initHashChange();\n\n // postMessage\n // OPT skip\n if (!this.wb_opts.skip_postmessage) {\n this.initPostMessageOverride(this.$wbwindow);\n this.initMessageEventOverride(this.$wbwindow);\n }\n\n // proxy check this func\n this.initCheckThisFunc(this.$wbwindow);\n\n // add __wb_import__ for modules\n this.initImportWrapperFunc(this.$wbwindow);\n\n // override getOwnPropertyNames\n this.overrideGetOwnPropertyNames(this.$wbwindow);\n\n this.initUIEventsOverrides();\n\n // write\n this.initDocWriteOpenCloseOverride();\n\n // eval\n this.initEvalOverride();\n\n // Ajax, Fetch, Request, Response, EventSource, WebSocket\n this.initHTTPOverrides();\n\n // Audio\n this.initAudioOverride();\n\n // FontFace\n this.initFontFaceOverride(this.$wbwindow);\n\n // Worker override (experimental)\n this.initWorkerOverrides();\n\n // text node overrides for js frameworks doing funky things with CSS\n this.initTextNodeOverrides();\n this.initCSSOMOverrides();\n\n // innerHTML & outerHTML can be overridden on prototype!\n // we must override innerHTML & outerHTML on Element otherwise un-rewritten HTML\n // can get into replay\n this.overrideHtmlAssign(this.$wbwindow.Element, 'innerHTML', true);\n this.overrideHtmlAssign(this.$wbwindow.Element, 'outerHTML', true);\n this.overrideHtmlAssignSrcDoc(\n this.$wbwindow.HTMLIFrameElement,\n 'srcdoc',\n true\n );\n this.overrideHtmlAssign(this.$wbwindow.HTMLStyleElement, 'textContent');\n this.overrideShadowDom();\n\n // Document.URL override\n this.overridePropExtract(this.$wbwindow.Document.prototype, 'URL');\n this.overridePropExtract(this.$wbwindow.Document.prototype, 'documentURI');\n\n // Node.baseURI override\n this.overridePropExtract(this.$wbwindow.Node.prototype, 'baseURI');\n\n // Attr nodeValue and value\n this.overrideAttrProps();\n\n // Override dataset access and wrap in proxy\n this.overrideDataSet();\n\n // init insertAdjacent[Element, HTML] override\n this.initInsertAdjacentElementHTMLOverrides();\n\n // iframe.contentWindow and iframe.contentDocument overrides to\n // ensure _wombat is inited on the iframe $wbwindow!\n this.overrideIframeContentAccess('contentWindow');\n this.overrideIframeContentAccess('contentDocument');\n\n // IntersectionObserver constructor override\n this.initIntersectionObsOverride();\n\n // override funcs to convert first arg proxy->obj\n this.overrideFuncArgProxyToObj(this.$wbwindow.MutationObserver, 'observe');\n this.overrideFuncArgProxyToObj(\n this.$wbwindow.Node,\n 'compareDocumentPosition'\n );\n this.overrideFuncArgProxyToObj(this.$wbwindow.Node, 'contains');\n this.overrideFuncArgProxyToObj(this.$wbwindow.Document, 'createTreeWalker');\n this.overrideFuncArgProxyToObj(this.$wbwindow.Document, 'evaluate', 1);\n this.overrideFuncArgProxyToObj(\n this.$wbwindow.XSLTProcessor,\n 'transformToFragment',\n 1\n );\n\n this.overrideFuncThisProxyToObj(\n this.$wbwindow,\n 'getComputedStyle',\n this.$wbwindow\n );\n\n this.overrideFuncThisProxyToObj(this.$wbwindow, 'clearTimeout');\n this.overrideFuncThisProxyToObj(this.$wbwindow, 'clearInterval');\n\n this.overrideFuncThisProxyToObj(\n this.$wbwindow.EventTarget.prototype,\n 'dispatchEvent'\n );\n\n this.overrideDeProxyPropAssign(\n this.$wbwindow.TreeWalker.prototype,\n 'currentNode'\n );\n\n this.initTimeoutIntervalOverrides();\n\n this.initQuerySelectorOverride();\n\n this.overrideSWAccess(this.$wbwindow);\n\n // setAttribute\n this.initElementGetSetAttributeOverride();\n\n this.initSvgImageOverrides();\n\n // override href and src attrs\n this.initAttrOverrides();\n\n // Cookies\n this.initCookiesOverride();\n\n // ensure namespace urls are NOT rewritten\n this.initCreateElementNSFix();\n\n // DOM\n // OPT skip\n if (!this.wb_opts.skip_dom) {\n this.initDomOverride();\n }\n\n // registerProtocolHandler override\n this.initRegisterUnRegPHOverride();\n this.initPresentationRequestOverride();\n\n // additional navigator. overrides\n this.initMiscNavigatorOverrides();\n\n // other overrides\n // proxy mode: only using these overrides\n\n // Random\n this.initSeededRandom(this.wb_info.wombat_sec);\n\n // Crypto Random\n this.initCryptoRandom();\n\n // set fixed pixel ratio\n this.initFixedRatio(this.wb_info.pixel_ratio || 1);\n\n // Date\n this.initDateOverride(this.wb_info.wombat_sec);\n\n // Blob\n this.initBlobOverride();\n\n // WebSocket\n this.initWSOverride();\n\n // open\n this.initOpenOverride();\n\n // disable notifications\n this.initDisableNotificationsGeoLocation();\n\n // custom storage\n this.initStorageOverride();\n\n // wrap caches to ensure only host sandboxed caches are available\n this.initCacheStorageOverride();\n this.initCachesOverride();\n\n // wraps indexeddb access to ensure only host sandboxed dbs are available\n this.initIndexedDBOverride();\n\n // add window and document obj proxies, if available\n this.initWindowObjProxy(this.$wbwindow);\n this.initDocumentObjProxy(this.$wbwindow.document);\n\n var wombat = this;\n return {\n extract_orig: this.extractOriginalURL,\n rewrite_url: this.rewriteUrl,\n watch_elem: this.watchElem,\n init_new_window_wombat: this.initNewWindowWombat,\n init_paths: this.initPaths,\n local_init: function(name) {\n var res = wombat.$wbwindow._WB_wombat_obj_proxy[name];\n if (name === 'document' && res && !res._WB_wombat_obj_proxy) {\n return wombat.initDocumentObjProxy(res) || res;\n }\n return res;\n },\n showCSPViolations: function(yesNo) {\n wombat._addRemoveCSPViolationListener(yesNo);\n }\n };\n};\n\n/* harmony default export */ const src_wombat = (Wombat);\n\n;// ./node_modules/@webrecorder/wombat/src/wbWombat.js\n\n\nwindow._WBWombat = src_wombat;\nwindow._WBWombatInit = function(wbinfo) {\n if (!this._wb_wombat) {\n var wombat = new src_wombat(this, wbinfo);\n this._wb_wombat = wombat.wombatInit();\n } else {\n this._wb_wombat.init_paths(wbinfo);\n }\n};\n\n/******/ })()\n;"}),this.staticData.set(this.staticPrefix+"wombatWorkers.js",{type:"application/javascript",content:"/******/ (() => { // webpackBootstrap\n/**\n * Mini wombat for performing URL rewriting within the\n * Web/Shared/Service Worker context\n * @param {Object} info\n * @return {WBWombat}\n */\nfunction WBWombat(info) {\n if (!(this instanceof WBWombat)) return new WBWombat(info);\n /** @type {Object} */\n this.info = info;\n this.prefixMod = this.info.prefixMod\n ? this.info.prefixMod\n : this.info.prefix + (this.info.mod || 'wkrf_') + '/';\n\n this.initImportScriptsRewrite();\n this.initHTTPOverrides();\n this.initClientApisOverride();\n this.initCacheApisOverride();\n this.initSelfOverrides();\n}\n\n/**\n * Returns T/F indicating if the supplied URL is not to be rewritten\n * @param {string} url\n * @return {boolean}\n */\nWBWombat.prototype.noRewrite = function(url) {\n return (\n !url ||\n url.indexOf('blob:') === 0 ||\n url.indexOf('javascript:') === 0 ||\n url.indexOf('data:') === 0 ||\n url.indexOf(this.info.prefix) === 0\n );\n};\n\n/**\n * Returns T/F indicating if the supplied URL is an relative URL\n * @param {string} url\n * @return {boolean}\n */\nWBWombat.prototype.isRelURL = function(url) {\n return (\n url.indexOf('/') === 0 ||\n (!url.startsWith('http:') && !url.startsWith('https:'))\n );\n};\n\n/**\n * Attempts to resolve the supplied relative URL against\n * the origin this worker was created on\n * @param {string} maybeRelURL\n * @param {string} against\n * @return {string}\n */\nWBWombat.prototype.maybeResolveURL = function(maybeRelURL, against) {\n if (!against) return maybeRelURL;\n try {\n var resolved = new URL(maybeRelURL, against);\n return resolved.href;\n } catch (e) {}\n return maybeRelURL;\n};\n\n/**\n * Returns null to indicate that the supplied URL is not to be rewritten.\n * Otherwise returns a URL that can be rewritten\n * @param {*} url\n * @param {string} resolveAgainst\n * @return {?string}\n */\nWBWombat.prototype.ensureURL = function(url, resolveAgainst) {\n if (!url) return url;\n var newURL;\n switch (typeof url) {\n case 'string':\n newURL = url;\n break;\n case 'object':\n newURL = url.toString();\n break;\n default:\n return null;\n }\n if (this.noRewrite(newURL)) return null;\n if (this.isRelURL(newURL)) {\n return this.maybeResolveURL(newURL, resolveAgainst);\n }\n\n // if url starts with current origin, but not properly rewritten, rewrite against current baseUr\n if (newURL.indexOf(self.location.origin) === 0) {\n return this.maybeResolveURL(\n newURL.slice(self.location.origin.length),\n resolveAgainst\n );\n }\n return newURL;\n};\n\n/**\n * Rewrites the supplied URL\n * @param {string} url\n * @return {string}\n */\nWBWombat.prototype.rewriteURL = function(url) {\n var rwURL = this.ensureURL(url, this.info.originalURL);\n if (!rwURL) return url;\n if (this.prefixMod) {\n return this.prefixMod + rwURL;\n }\n return rwURL;\n};\n\n/**\n * Extract original URL\n */\nWBWombat.prototype.extractOriginalURL = function(url) {\n if (url && url.startsWith(this.prefixMod)) {\n return url.slice(this.prefixMod.length);\n }\n\n return url;\n};\n\n/**\n * Rewrites the supplied URL of an controlled page using the mp\\_ modifier\n * @param {string} url\n * @param {WindowClient} [client]\n * @return {string}\n */\nWBWombat.prototype.rewriteClientWindowURL = function(url, client) {\n var rwURL = this.ensureURL(url, client ? client.url : this.info.originalURL);\n if (!rwURL) return url;\n if (this.info.prefix) {\n return this.info.prefix + 'mp_/' + rwURL;\n }\n return rwURL;\n};\n\n/**\n * Mini url rewriter specifically for rewriting web sockets\n * @param {?string} originalURL\n * @return {string}\n */\nWBWombat.prototype.rewriteWSURL = function(originalURL) {\n // If undefined, just return it\n if (!originalURL) return originalURL;\n\n var urltype_ = typeof originalURL;\n var url = originalURL;\n\n // If object, use toString\n if (urltype_ === 'object') {\n url = originalURL.toString();\n } else if (urltype_ !== 'string') {\n return originalURL;\n }\n\n // empty string check\n if (!url) return url;\n\n var wsScheme = 'ws://';\n var wssScheme = 'wss://';\n var https = 'https://';\n\n var wbSecure = this.info.prefix.indexOf(https) === 0;\n var wbPrefix =\n this.info.prefix.replace(\n wbSecure ? https : 'http://',\n wbSecure ? wssScheme : wsScheme\n ) + 'ws_/';\n return wbPrefix + url;\n};\n\n/**\n * Rewrites all URLs in the supplied arguments object\n * @param {Object} argsObj\n * @return {Array<string>}\n */\nWBWombat.prototype.rewriteArgs = function(argsObj) {\n // recreate the original arguments object just with URLs rewritten\n var newArgObj = new Array(argsObj.length);\n for (var i = 0; i < newArgObj.length; i++) {\n newArgObj[i] = this.rewriteURL(argsObj[i]);\n }\n return newArgObj;\n};\n\n/**\n * Rewrites the input to one of the Fetch APIs\n * @param {*|string|Request} input\n * @return {*|string|Request}\n */\nWBWombat.prototype.rewriteFetchApi = function(input) {\n var rwInput = input;\n switch (typeof input) {\n case 'string':\n rwInput = this.rewriteURL(input);\n break;\n case 'object':\n if (input.url) {\n var new_url = this.rewriteURL(input.url);\n if (new_url !== input.url) {\n // not much we can do here Request.url is read only\n // https://developer.mozilla.org/en-US/docs/Web/API/Request/url\n rwInput = new Request(new_url, input);\n }\n } else if (input.href) {\n rwInput = this.rewriteURL(input.href);\n }\n break;\n }\n return rwInput;\n};\n\n/**\n * Rewrites the input to one of the Cache APIs\n * @param {*|string|Request} request\n * @return {*|string|Request}\n */\nWBWombat.prototype.rewriteCacheApi = function(request) {\n var rwRequest = request;\n if (typeof request === 'string') {\n rwRequest = this.rewriteURL(request);\n }\n return rwRequest;\n};\n\n/**\n * Applies an override to the importScripts function\n * @see https://html.spec.whatwg.org/multipage/workers.html#dom-workerglobalscope-importscripts\n */\nWBWombat.prototype.initImportScriptsRewrite = function() {\n if (!self.importScripts) return;\n var wombat = this;\n var origImportScripts = self.importScripts;\n self.importScripts = function importScripts() {\n // rewrite the arguments object and call original function via fn.apply\n var rwArgs = wombat.rewriteArgs(arguments);\n return origImportScripts.apply(this, rwArgs);\n };\n};\n\nWBWombat.prototype.initSelfOverrides = function() {\n //self.__WB_pmw = function() { return this; };\n\n var wombat = this;\n\n self._WB_wombat_location = new Proxy(self.location, {\n get(target, prop, receiver) {\n if (prop === 'href') {\n return wombat.extractOriginalURL(target[prop]);\n }\n\n return target[prop];\n }\n });\n\n self.____wb_rewrite_import__ = function(base, url) {\n if (base) {\n base = wombat.extractOriginalURL(base);\n }\n\n // if esm and base provided (set to import.meta.url), use that as base for imports\n if (url && base) {\n //if (!isImportMapped(url)) {\n url = new URL(url, base).href;\n //}\n // non-esm single param call, url is base\n } else if (base && url === undefined) {\n url = base;\n }\n return import(/*webpackIgnore: true*/ wombat.rewriteURL(url));\n };\n\n var pm_origin = function pm_origin(origin_self) {\n this.__WB_source = origin_self;\n return this;\n };\n\n try {\n self.Object.defineProperty(self.Object.prototype, '__WB_pmw', {\n get: function() {\n return pm_origin;\n },\n set: function() {},\n configurable: true,\n enumerable: false\n });\n } catch (e) {}\n\n const WB_CHECK_THIS_FUNC = '_____WB$wombat$check$this$function_____';\n\n self.Object.defineProperty(self.Object.prototype, WB_CHECK_THIS_FUNC, {\n configutable: false,\n enumerable: false,\n value: function(thisObj) {\n try {\n return thisObj && thisObj._WB_wombat_obj_proxy\n ? thisObj._WB_wombat_obj_proxy\n : thisObj;\n } catch (e) {\n return thisObj;\n }\n }\n });\n};\n\n/**\n * Applies overrides to the XMLHttpRequest.open and XMLHttpRequest.responseURL\n * in order to ensure URLs are rewritten.\n *\n * Applies an override to window.fetch in order to rewrite URLs and URLs of\n * the supplied Request objects used as arguments to fetch.\n *\n * Applies overrides to window.Request, window.Response, window.EventSource,\n * and window.WebSocket in order to ensure URLs they operate on are rewritten.\n *\n * @see https://xhr.spec.whatwg.org/\n * @see https://fetch.spec.whatwg.org/\n * @see https://html.spec.whatwg.org/multipage/web-sockets.html#websocket\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface\n */\nWBWombat.prototype.initHTTPOverrides = function() {\n var wombat = this;\n if (\n self.XMLHttpRequest &&\n self.XMLHttpRequest.prototype &&\n self.XMLHttpRequest.prototype.open\n ) {\n var oXHROpen = self.XMLHttpRequest.prototype.open;\n self.XMLHttpRequest.prototype.open = function open(\n method,\n url,\n async,\n user,\n password\n ) {\n var rwURL = wombat.rewriteURL(url);\n var openAsync = true;\n if (async != null && !async) openAsync = false;\n oXHROpen.call(this, method, rwURL, openAsync, user, password);\n if (rwURL.indexOf('data:') === -1) {\n this.setRequestHeader('X-Pywb-Requested-With', 'XMLHttpRequest');\n }\n };\n }\n\n if (self.fetch != null) {\n // this fetch is Worker.fetch\n var orig_fetch = self.fetch;\n self.fetch = function fetch(input, init_opts) {\n var rwInput = wombat.rewriteFetchApi(input);\n var newInitOpts = init_opts || {};\n newInitOpts['credentials'] = 'include';\n return orig_fetch.call(this, rwInput, newInitOpts);\n };\n }\n\n if (self.Request && self.Request.prototype) {\n var orig_request = self.Request;\n self.Request = (function(Request_) {\n return function Request(input, init_opts) {\n var newInitOpts = init_opts || {};\n var newInput = wombat.rewriteFetchApi(input);\n newInitOpts['credentials'] = 'include';\n return new Request_(newInput, newInitOpts);\n };\n })(self.Request);\n self.Request.prototype = orig_request.prototype;\n }\n\n if (self.Response && self.Response.prototype) {\n var originalRedirect = self.Response.prototype.redirect;\n self.Response.prototype.redirect = function redirect(url, status) {\n var rwURL = wombat.rewriteURL(url);\n return originalRedirect.call(this, rwURL, status);\n };\n }\n\n if (self.EventSource && self.EventSource.prototype) {\n var origEventSource = self.EventSource;\n self.EventSource = (function(EventSource_) {\n return function EventSource(url, configuration) {\n var rwURL = url;\n if (url != null) {\n rwURL = wombat.rewriteURL(url);\n }\n return new EventSource_(rwURL, configuration);\n };\n })(self.EventSource);\n self.EventSource.prototype = origEventSource.prototype;\n Object.defineProperty(self.EventSource.prototype, 'constructor', {\n value: self.EventSource\n });\n }\n\n if (self.WebSocket && self.WebSocket.prototype) {\n var origWebSocket = self.WebSocket;\n self.WebSocket = (function(WebSocket_) {\n return function WebSocket(url, configuration) {\n var rwURL = url;\n if (url != null) {\n rwURL = wombat.rewriteWSURL(url);\n }\n return new WebSocket_(rwURL, configuration);\n };\n })(self.WebSocket);\n self.WebSocket.prototype = origWebSocket.prototype;\n Object.defineProperty(self.WebSocket.prototype, 'constructor', {\n value: self.WebSocket\n });\n }\n};\n\n/**\n * Applies an override to Clients.openWindow and WindowClient.navigate that rewrites\n * the supplied URL that represents a controlled window\n * @see https://w3c.github.io/ServiceWorker/#window-client-interface\n * @see https://w3c.github.io/ServiceWorker/#clients-interface\n */\nWBWombat.prototype.initClientApisOverride = function() {\n var wombat = this;\n if (\n self.Clients &&\n self.Clients.prototype &&\n self.Clients.prototype.openWindow\n ) {\n var oClientsOpenWindow = self.Clients.prototype.openWindow;\n self.Clients.prototype.openWindow = function openWindow(url) {\n var rwURL = wombat.rewriteClientWindowURL(url);\n return oClientsOpenWindow.call(this, rwURL);\n };\n }\n\n if (\n self.WindowClient &&\n self.WindowClient.prototype &&\n self.WindowClient.prototype.navigate\n ) {\n var oWinClientNavigate = self.WindowClient.prototype.navigate;\n self.WindowClient.prototype.navigate = function navigate(url) {\n var rwURL = wombat.rewriteClientWindowURL(url, this);\n return oWinClientNavigate.call(this, rwURL);\n };\n }\n};\n\n/**\n * Applies overrides to the CacheStorage and Cache interfaces in order\n * to rewrite the URLs they operate on\n * @see https://w3c.github.io/ServiceWorker/#cachestorage\n * @see https://w3c.github.io/ServiceWorker/#cache-interface\n */\nWBWombat.prototype.initCacheApisOverride = function() {\n var wombat = this;\n if (\n self.CacheStorage &&\n self.CacheStorage.prototype &&\n self.CacheStorage.prototype.match\n ) {\n var oCacheStorageMatch = self.CacheStorage.prototype.match;\n self.CacheStorage.prototype.match = function match(request, options) {\n var rwRequest = wombat.rewriteCacheApi(request);\n return oCacheStorageMatch.call(this, rwRequest, options);\n };\n }\n\n if (self.Cache && self.Cache.prototype) {\n if (self.Cache.prototype.match) {\n var oCacheMatch = self.Cache.prototype.match;\n self.Cache.prototype.match = function match(request, options) {\n var rwRequest = wombat.rewriteCacheApi(request);\n return oCacheMatch.call(this, rwRequest, options);\n };\n }\n\n if (self.Cache.prototype.matchAll) {\n var oCacheMatchAll = self.Cache.prototype.matchAll;\n self.Cache.prototype.matchAll = function matchAll(request, options) {\n var rwRequest = wombat.rewriteCacheApi(request);\n return oCacheMatchAll.call(this, rwRequest, options);\n };\n }\n\n if (self.Cache.prototype.add) {\n var oCacheAdd = self.Cache.prototype.add;\n self.Cache.prototype.add = function add(request, options) {\n var rwRequest = wombat.rewriteCacheApi(request);\n return oCacheAdd.call(this, rwRequest, options);\n };\n }\n\n if (self.Cache.prototype.addAll) {\n var oCacheAddAll = self.Cache.prototype.addAll;\n self.Cache.prototype.addAll = function addAll(requests) {\n var rwRequests = requests;\n if (Array.isArray(requests)) {\n rwRequests = new Array(requests.length);\n for (var i = 0; i < requests.length; i++) {\n rwRequests[i] = wombat.rewriteCacheApi(requests[i]);\n }\n }\n return oCacheAddAll.call(this, rwRequests);\n };\n }\n\n if (self.Cache.prototype.put) {\n var oCachePut = self.Cache.prototype.put;\n self.Cache.prototype.put = function put(request, response) {\n var rwRequest = wombat.rewriteCacheApi(request);\n return oCachePut.call(this, rwRequest, response);\n };\n }\n\n if (self.Cache.prototype.delete) {\n var oCacheDelete = self.Cache.prototype.delete;\n self.Cache.prototype.delete = function newCacheDelete(request, options) {\n var rwRequest = wombat.rewriteCacheApi(request);\n return oCacheDelete.call(this, rwRequest, options);\n };\n }\n\n if (self.Cache.prototype.keys) {\n var oCacheKeys = self.Cache.prototype.keys;\n self.Cache.prototype.keys = function keys(request, options) {\n var rwRequest = wombat.rewriteCacheApi(request);\n return oCacheKeys.call(this, rwRequest, options);\n };\n }\n }\n};\n\nself.WBWombat = WBWombat;\n\n/******/ })()\n;"}),this.staticData.set(this.staticPrefix+"wombatProxy.js",{type:"application/javascript",content:'/******/ (() => { // webpackBootstrap\n/******/ \t"use strict";\n\n// Mini Wombat for proxy replay, includes:\n// - window.open override for rewriting links to subdomain\n// - dom override for rewriting A links to subdomains, IFRAME src to direct replay mode\nclass ProxyWombatRewrite {\n proxyOrigin;\n localOrigin;\n proxyTLD;\n localTLD;\n localScheme;\n proxyScheme;\n httpToHttpsNeeded;\n prefix;\n relPrefix = "";\n schemeRelPrefix = "";\n constructor() {\n this.openOverride();\n this.domOverride();\n this.overrideInsertAdjacentHTML();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const wbinfo = self.__wbinfo;\n this.initDateOverride(wbinfo.seconds);\n this.initAnchorElemOverride();\n this.overrideSWAccess();\n this.proxyOrigin = wbinfo.proxyOrigin;\n this.localOrigin = wbinfo.localOrigin;\n this.proxyTLD = wbinfo.proxyTLD;\n this.localTLD = wbinfo.localTLD;\n this.localScheme = new URL(this.localOrigin).protocol;\n this.proxyScheme = new URL(this.proxyOrigin).protocol;\n this.httpToHttpsNeeded =\n this.proxyScheme === "http:" && this.localScheme === "https:";\n this.prefix = wbinfo.prefix || "";\n if (this.prefix) {\n const parsed = new URL(this.prefix);\n this.relPrefix = parsed.pathname;\n this.schemeRelPrefix = this.prefix.slice(parsed.protocol.length);\n }\n if (wbinfo.presetCookie) {\n this.initPresetCookie(wbinfo.presetCookie);\n }\n }\n initPresetCookie(presetCookie) {\n const splitCookies = presetCookie.split(";");\n for (const cookie of splitCookies) {\n document.cookie = cookie.trim();\n }\n }\n recurseRewriteElem(curr) {\n this.rewriteElem(curr);\n if (!curr.hasChildNodes()) {\n return;\n }\n const rewriteQ = [curr.childNodes];\n while (rewriteQ.length > 0) {\n const children = rewriteQ.shift();\n for (const child of children || []) {\n if (child.nodeType === Node.ELEMENT_NODE) {\n const childElem = child;\n this.rewriteElem(childElem);\n if (curr.hasChildNodes()) {\n rewriteQ.push(childElem.childNodes);\n }\n }\n }\n }\n }\n rewriteElem(curr) {\n switch (curr.tagName) {\n case "IFRAME":\n {\n const value = curr.getAttribute("src");\n if (value) {\n const newValue = this.fullRewriteUrl(value);\n if (value !== newValue) {\n curr.setAttribute("src", newValue);\n }\n }\n }\n break;\n case "A":\n {\n const value = curr.getAttribute("href");\n if (value) {\n const newValue = this.rewriteUrl(value);\n if (value !== newValue) {\n curr.setAttribute("href", newValue);\n }\n }\n }\n break;\n case "SCRIPT":\n if (this.httpToHttpsNeeded) {\n const value = curr.getAttribute("src");\n if (value) {\n const newValue = this.rewriteUrl(value);\n if (value !== newValue) {\n curr.setAttribute("src", newValue);\n }\n }\n }\n break;\n }\n }\n domOverride() {\n const rwNode = (node) => {\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n case Node.DOCUMENT_FRAGMENT_NODE:\n this.recurseRewriteElem(node);\n break;\n }\n };\n const rewriteFunc = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fnThis, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n originalFn, newNode, oldNode) => {\n rwNode(newNode);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return originalFn.call(fnThis, newNode, oldNode);\n };\n const rewriteArrayFunc = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fnThis, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n originalFn, newNodes) => {\n for (const node of newNodes) {\n rwNode(node);\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return originalFn.call(fnThis, ...newNodes);\n };\n const orig_appendChild = Node.prototype.appendChild;\n Node.prototype.appendChild = function (newNode) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return rewriteFunc(this, orig_appendChild, newNode);\n };\n const orig_insertBefore = Node.prototype.insertBefore;\n Node.prototype.insertBefore = function (newNode, refNode) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return rewriteFunc(this, orig_insertBefore, newNode, refNode);\n };\n const orig_replaceChild = Node.prototype.replaceChild;\n Node.prototype.replaceChild = function (newNode, oldNode) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return rewriteFunc(this, orig_replaceChild, newNode, oldNode);\n };\n const orig_replaceWith = Element.prototype.replaceWith;\n Element.prototype.replaceWith = function (...newNodes) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return rewriteArrayFunc(this, orig_replaceWith, newNodes);\n };\n const orig_append = DocumentFragment.prototype.append;\n DocumentFragment.prototype.append = function (...newNodes) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return rewriteArrayFunc(this, orig_append, newNodes);\n };\n const orig_prepend = DocumentFragment.prototype.prepend;\n DocumentFragment.prototype.prepend = function (...newNodes) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return rewriteArrayFunc(this, orig_prepend, newNodes);\n };\n }\n openOverride() {\n let orig = window.open;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (Window.prototype.open) {\n orig = Window.prototype.open;\n }\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const rewriter = this;\n function openRW(strUrl, strWindowName, strWindowFeatures) {\n const rwStrUrl = strUrl ? rewriter.rewriteUrl(strUrl.toString()) : "";\n const res = orig.call(\n // @ts-ignore\n this, rwStrUrl, strWindowName, strWindowFeatures);\n return res;\n }\n window.open = openRW;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (Window.prototype.open) {\n Window.prototype.open = openRW;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < window.frames.length; i++) {\n try {\n window.frames[i].open = openRW;\n }\n catch (e) {\n console.log(e);\n }\n }\n }\n overrideInsertAdjacentHTML() {\n const orig = HTMLElement.prototype.insertAdjacentHTML;\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const rewriter = this;\n HTMLElement.prototype.insertAdjacentHTML = function (position, text) {\n text = rewriter.rewriteRxHtml(text);\n return orig.call(this, position, text);\n };\n }\n rewriteRxHtml(text) {\n return text.replace(/<\\s*(a|iframe)\\s+(?:src|href)[=][\'"](.*?)[\'"]/gi, (match, p1, p2) => {\n let rw = "";\n switch (p1) {\n case "a":\n rw = this.rewriteUrl(p2);\n break;\n case "iframe":\n rw = this.fullRewriteUrl(p2);\n break;\n }\n if (rw && rw !== match) {\n return match.replace(p2, rw);\n }\n return match;\n });\n }\n convUrl(urlStr, fromOrigin, toOrigin, fromTLD, toTLD, fromSep, toSep, toScheme, httpToHttpsNeeded = false) {\n if (fromOrigin && urlStr.startsWith(fromOrigin)) {\n return toOrigin + urlStr.slice(fromOrigin.length);\n }\n if (fromTLD && toTLD && urlStr.indexOf(fromTLD) > 0) {\n const url = new URL(urlStr);\n if (url.host.endsWith(fromTLD)) {\n let host = url.host.slice(0, -fromTLD.length);\n if (fromSep && toSep) {\n host = host.replace(fromSep, toSep);\n }\n const newUrl = toScheme + "//" + host + toTLD + url.href.slice(url.origin.length);\n return newUrl;\n }\n }\n if (httpToHttpsNeeded) {\n return urlStr.replace("http:", "https:");\n }\n return urlStr;\n }\n rewriteUrl(urlStr) {\n return this.convUrl(urlStr, this.proxyOrigin, this.localOrigin, this.proxyTLD, this.localTLD, ".", "-", this.localScheme, this.httpToHttpsNeeded);\n }\n unrewriteUrl(urlStr) {\n return this.convUrl(urlStr, this.localOrigin, this.proxyOrigin, this.localTLD, this.proxyTLD, "-", ".", this.proxyScheme);\n }\n fullRewriteUrl(url, mod = "if_") {\n const origUrl = url;\n if (this.proxyOrigin && url.startsWith(this.proxyOrigin)) {\n return this.localOrigin + url.slice(this.proxyOrigin.length);\n }\n url = url.trim();\n if (!url ||\n !this.isRewritableUrl(url) ||\n url.startsWith(this.prefix) ||\n url.startsWith(this.relPrefix)) {\n return origUrl;\n }\n if (url.startsWith("http:") ||\n url.startsWith("https:") ||\n url.startsWith("https\\\\3a/")) {\n return this.prefix + mod + "/" + url;\n }\n if (url.startsWith("//") || url.startsWith("\\\\/\\\\/")) {\n return this.schemeRelPrefix + mod + "/" + url;\n }\n return origUrl;\n }\n isRewritableUrl(url) {\n const NO_REWRITE_URI_PREFIX = [\n "#",\n "javascript:",\n "data:",\n "mailto:",\n "about:",\n "file:",\n "blob:",\n "{",\n ];\n for (const prefix of NO_REWRITE_URI_PREFIX) {\n if (url.startsWith(prefix)) {\n return false;\n }\n }\n return true;\n }\n initAnchorElemOverride() {\n const origHref = Object.getOwnPropertyDescriptor(HTMLAnchorElement.prototype, "href");\n if (!origHref?.get) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const rw = this;\n const origHrefGet = origHref.get;\n const overrideProp = (propName) => {\n const origProp = Object.getOwnPropertyDescriptor(HTMLAnchorElement.prototype, propName);\n if (!origProp?.set) {\n return;\n }\n const origPropSet = origProp.set;\n Object.defineProperty(HTMLAnchorElement.prototype, propName, {\n set(v) {\n const url = new URL(rw.rewriteUrl(v), rw.proxyOrigin);\n return origPropSet.call(this, url[propName]);\n },\n get() {\n const url = new URL(rw.unrewriteUrl(origHrefGet.call(this)), rw.proxyOrigin);\n return url[propName];\n },\n });\n };\n overrideProp("href");\n overrideProp("hostname");\n overrideProp("host");\n overrideProp("protocol");\n overrideProp("origin");\n }\n initDateOverride(timestamp) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (self.__wb_Date_now)\n return;\n const newTimestamp = parseInt(timestamp) * 1000;\n // var timezone = new Date().getTimezoneOffset() * 60 * 1000;\n // Already UTC!\n const timezone = 0;\n const start_now = Date.now();\n const timediff = start_now - (newTimestamp - timezone);\n const orig_date = Date;\n const orig_utc = Date.UTC;\n const orig_parse = Date.parse;\n const orig_now = Date.now;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n self.__wb_Date_now = orig_now;\n // @ts-ignore old-style override\n window.Date = (function (Date_) {\n return function Date(A, B, C, D, E, F, G) {\n // Apply doesn\'t work for constructors and Date doesn\'t\n // seem to like undefined args, so must explicitly\n // call constructor for each possible args 0..7\n if (A === undefined) {\n return new Date_(orig_now() - timediff);\n }\n else if (B === undefined) {\n return new Date_(A);\n }\n else if (C === undefined) {\n return new Date_(A, B);\n }\n else if (D === undefined) {\n return new Date_(A, B, C);\n }\n else if (E === undefined) {\n return new Date_(A, B, C, D);\n }\n else if (F === undefined) {\n return new Date_(A, B, C, D, E);\n }\n else if (G === undefined) {\n return new Date_(A, B, C, D, E, F);\n }\n else {\n return new Date_(A, B, C, D, E, F, G);\n }\n };\n })(Date);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Date.prototype = orig_date.prototype;\n Date.now = function now() {\n return orig_now() - timediff;\n };\n Date.UTC = orig_utc;\n Date.parse = orig_parse;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Date.__WB_timediff = timediff;\n Date.prototype.getTimezoneOffset = function () {\n return 0;\n };\n const orig_toString = Date.prototype.toString;\n Date.prototype.toString = function () {\n const string = orig_toString.call(this).split(" GMT")[0];\n return string + " GMT+0000 (GMT)";\n };\n const orig_toTimeString = Date.prototype.toTimeString;\n Date.prototype.toTimeString = function () {\n const string = orig_toTimeString.call(this).split(" GMT")[0];\n return string + " GMT+0000 (GMT)";\n };\n Object.defineProperty(Date.prototype, "constructor", {\n value: Date,\n });\n }\n overrideSWAccess() {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n self.__WB_wombat_sw = window.navigator.serviceWorker;\n const overrideSW = {\n controller: null,\n ready: Promise.resolve({ unregister: function () { } }),\n register: async () => Promise.reject(),\n addEventListener: function () { },\n removeEventListener: function () { },\n onmessage: null,\n oncontrollerchange: null,\n getRegistrations: async () => Promise.resolve([]),\n getRegistration: async () => Promise.resolve(undefined),\n startMessages: function () { },\n };\n Object.defineProperty(window.navigator, "serviceWorker", {\n get: () => overrideSW,\n });\n }\n}\nnew ProxyWombatRewrite();\n\n/******/ })()\n;'}),i.has("serveIndex")){const e={type:"text/html",content:this.getIndexHtml(i)};this.staticData.set(this.prefix,e),this.staticData.set(this.prefix+"index.html",e)}if(i.has("injectScripts")){const e=i.get("injectScripts").split(",");n.injectScripts=n.injectScripts?[...e,...n.injectScripts]:e}n.injectScripts&&ce(n.injectScripts),i.has("allowProxyPaths")&&ce(i.get("allowProxyPaths").split(",")),i.get("allowProxyPassthrough")&&(this.allowProxyPassthrough=!0),i.has("adblockUrl")&&(n.adblockUrl=i.get("adblockUrl")||""),"1"===i.get("useHashCheck")&&(Pa=!0),i.has("notFoundTemplateUrl")&&async function(e){try{const t=await fetch(e);oa=await t.text()}catch(e){console.error("not found template fetch failed",e)}}(i.get("notFoundTemplateUrl"));const o={static:this.staticPrefix,root:this.prefix,main:this.replayPrefix,proxy:this.proxyPrefix,api:this.apiPrefix};this.collections=new r(o,i.get("root"),n),this.collections.loadAll(i.get("dbColl")),this.api=new t(this.collections),this.allowRewrittenCache=!!i.get("allowCache"),this.stats=i.get("stats")?new BA:null,self.addEventListener("install",()=>{self.skipWaiting()}),self.addEventListener("activate",e=>{e.waitUntil(self.clients.claim()),console.log("Activate!")}),self.addEventListener("fetch",e=>{e.respondWith(this.handleFetch(e))}),self.addEventListener("message",e=>{"reload_all"===e.data.msg_type&&e.waitUntil(this.collections.loadAll())})}getIndexHtml(e){const t=e.get("indexScript")||"./ui.js",n=e.get("indexAppTag")||"replay-app-main";return`\n <!doctype html>\n <html>\n <head><script src="${t}"><\/script></head>\n <body>\n <${n}></${n}>\n </body></html>`}isFromReplay(e){return e.url.startsWith(this.replayPrefix)||e.referrer.startsWith(this.replayPrefix)}async handleFetch(e){const t=e.request,n=t.url;if(this.proxyOriginMode){if(n.startsWith(this.proxyPrefix))return this.staticPathProxy(n,t);if(ae.size&&this.allowProxyPassthrough){const e=await this.doLiveProxy(n,t);if(e)return e}if(!n.startsWith(this.staticPrefix))return this.getResponseFor(t,e)}else{if(!n.startsWith(this.prefix))return"chrome-extension://invalid/"===n?aa(t,"Invalid URL"):this.isFromReplay(t)?aa(t):this.defaultFetch(t);if(this.collections.root&&n.slice(this.prefix.length).indexOf("/")<0)return this.defaultFetch(t);if(n.startsWith(this.proxyPrefix))return this.staticPathProxy(n,t);if(n.startsWith(this.replayPrefix)&&!n.startsWith(this.staticPrefix))return this.getResponseFor(t,e)}const r=new URL(n);r.search="",r.hash="";const i=r.href;for(const e of this.staticData.keys())if(e===i){const{content:n,type:r}=this.staticData.get(e),i=new Headers({"Content-Type":r});return this.isFromReplay(t)&&i.set("Content-Security-Policy",F()),new Response(n,{headers:i})}if(!this.topFramePassthrough&&!n.startsWith(this.staticPrefix)&&t.referrer.startsWith(this.replayPrefix)){const e=function(e,t){const n=t.indexOf("/http");if(n<0)return null;const r=new URL(e).origin,i=e.slice(r.length),s=t.slice(n+1),o=new URL(i,s);return t.slice(0,n+1)+o.href}(n,t.referrer);return e?Response.redirect(e):aa(t)}return("http:"==r.protocol||"https:"==r.protocol)&&r.pathname.indexOf("/",1)<0?this.wrapCSPForFrame(await this.handleOffline(t),t):this.wrapCSPForFrame(await this.defaultFetch(t),t)}async staticPathProxy(e,t){e=e.slice(this.proxyPrefix.length),e=new URL(e,self.location.href).href;return await this.doLiveProxy(e,t)||aa(t)}async doLiveProxy(e,t){let n=!1;for(const t of ae)if(e.startsWith(t)){n=!0;break}if(!n)return null;const{method:r}=t,i="GET"!==r?await t.arrayBuffer():null,s={cache:"no-store",headers:t.headers,method:r,mode:"no-cors",..."GET"!==r&&{body:i}},o=await this.defaultFetch(e,s);return this.wrapCSPForFrame(o,t)}async wrapCSPForFrame(e,t){if(!t.destination.endsWith("frame"))return e;const{status:n,statusText:r}=e,i=new Headers(e.headers);return i.set("Content-Security-Policy",F()),new Response(e.body,{status:n,statusText:r,headers:i})}async defaultFetch(e,t={}){return t.cache||"string"==typeof e||e instanceof URL||"only-if-cached"!==e.cache||"same-origin"===e.mode||(t.cache="default"),self.fetch(e,t)}async ensureCached(e){const t=await caches.open("wabac-offline");for(let n of e){n=new URL(n,self.location.href).href;let r=await t.match(n,{ignoreSearch:!0});if(!r)try{r=await this.defaultFetch(new Request(n)),await t.put(n,r)}catch(e){console.warn(`Failed to Auto Cache: ${n}`,e)}}}async handleOffline(e){let t=null;const n=await caches.open("wabac-offline");try{t=await this.defaultFetch(e)}catch(r){return t=await n.match(e,{ignoreSearch:!0}),t||(t=aa(e,"Sorry, this url was not cached for offline use")),t}if(e.url.startsWith(this.prefix+"?"))return t;if(200===t.status){const r=t.clone();await n.put(e,r)}else console.warn(`Not Cacheing ${e.url} - Status ${t.status}`);return t}async getResponseFor(e,t){if(e.url.startsWith(this.apiPrefix))return this.stats&&e.url.startsWith(this.apiPrefix+"stats.json")?await this.stats.getStats(t):await this.api.apiResponse(e.url.slice(this.apiPrefix.length),e,t);await this.collections.inited;const n=Z(e),r=e.headers.get("range");try{if(this.allowRewrittenCache&&!r){const t=await self.caches.match(e);if(t&&!!t.headers.get(iv)===n)return t}}catch(e){}let i=this.collections.root;i||(i=e.url.slice(this.replayPrefix.length).split("/",1)[0]);const s=await this.collections.getColl(i);if(!s&&(this.proxyOriginMode||this.topFramePassthrough))return this.defaultFetch(e);if(!s)return aa(e);if(!this.collections.root&&!this.proxyOriginMode&&!e.url.startsWith(s.prefix))return aa(e);let o,a=!1;e.url.startsWith(s.prefix)||!this.proxyOriginMode?(o=e.url.substring(s.prefix.length),a=!0):o=e.url;const c={isRoot:!!this.collections.root,defaultReplayMode:a};if(this.proxyOriginMode&&!a){c.mod="id_";const e=s.config.extraConfig||{};c.proxyOrigin=e.proxyOrigin,c.altProxyOrigins=e.altProxyOrigins,c.proxyTLD=e.proxyTLD,c.localTLD=e.localTLD,c.ts=e.proxyTs||"",c.localOrigin=self.location.origin}const l=new nv(o,e,c);if(this.topFramePassthrough&&(!l.url||!l.mod))return this.defaultFetch(e);if(!l.url)return aa(e,`Replay URL ${o} not found`);const h=await s.handleRequest(l,t);if(h){if(this.stats&&this.stats.updateStats(h,h.status,e,t),this.allowRewrittenCache&&200===h.status)try{const t=await self.caches.open("wabac-"+s.name);n&&h.headers.set(iv,"true");const r=h.clone();await t.put(e,r)}catch(e){console.warn(e)}return h}return r&&console.log("Not Found Range!: "+r),aa(e)}}self.registration?(self.sw=new ov,console.log("sw init")):self.postMessage&&(new NA(self),console.log("ww init"));