var Et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function gs(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Sa={exports:{}},Ge=Sa.exports={},pt,ht;function _n(){throw new Error("setTimeout has not been defined")}function Sn(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?pt=setTimeout:pt=_n}catch{pt=_n}try{typeof clearTimeout=="function"?ht=clearTimeout:ht=Sn}catch{ht=Sn}})();function Aa(r){if(pt===setTimeout)return setTimeout(r,0);if((pt===_n||!pt)&&setTimeout)return pt=setTimeout,setTimeout(r,0);try{return pt(r,0)}catch{try{return pt.call(null,r,0)}catch{return pt.call(this,r,0)}}}function ys(r){if(ht===clearTimeout)return clearTimeout(r);if((ht===Sn||!ht)&&clearTimeout)return ht=clearTimeout,clearTimeout(r);try{return ht(r)}catch{try{return ht.call(null,r)}catch{return ht.call(this,r)}}}var yt=[],Pt=!1,St,or=-1;function ms(){!Pt||!St||(Pt=!1,St.length?yt=St.concat(yt):or=-1,yt.length&&Oa())}function Oa(){if(!Pt){var r=Aa(ms);Pt=!0;for(var o=yt.length;o;){for(St=yt,yt=[];++or1)for(var f=1;fconsole.error("SEMVER",...o):()=>{},dr}var gr,Qn;function Na(){if(Qn)return gr;Qn=1;const r="2.0.0",o=256,f=Number.MAX_SAFE_INTEGER||9007199254740991,g=16,R=o-6;return gr={MAX_LENGTH:o,MAX_SAFE_COMPONENT_LENGTH:g,MAX_SAFE_BUILD_LENGTH:R,MAX_SAFE_INTEGER:f,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:r,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},gr}var yr={exports:{}},Zn;function Es(){return Zn||(Zn=1,(function(r,o){const{MAX_SAFE_COMPONENT_LENGTH:f,MAX_SAFE_BUILD_LENGTH:g,MAX_LENGTH:R}=Na(),y=Ia();o=r.exports={};const T=o.re=[],b=o.safeRe=[],d=o.src=[],M=o.safeSrc=[],u=o.t={};let L=0;const j="[a-zA-Z0-9-]",ee=[["\\s",1],["\\d",R],[j,g]],X=J=>{for(const[_,S]of ee)J=J.split(`${_}*`).join(`${_}{0,${S}}`).split(`${_}+`).join(`${_}{1,${S}}`);return J},q=(J,_,S)=>{const C=X(_),E=L++;y(J,E,_),u[J]=E,d[E]=_,M[E]=C,T[E]=new RegExp(_,S?"g":void 0),b[E]=new RegExp(C,S?"g":void 0)};q("NUMERICIDENTIFIER","0|[1-9]\\d*"),q("NUMERICIDENTIFIERLOOSE","\\d+"),q("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${j}*`),q("MAINVERSION",`(${d[u.NUMERICIDENTIFIER]})\\.(${d[u.NUMERICIDENTIFIER]})\\.(${d[u.NUMERICIDENTIFIER]})`),q("MAINVERSIONLOOSE",`(${d[u.NUMERICIDENTIFIERLOOSE]})\\.(${d[u.NUMERICIDENTIFIERLOOSE]})\\.(${d[u.NUMERICIDENTIFIERLOOSE]})`),q("PRERELEASEIDENTIFIER",`(?:${d[u.NONNUMERICIDENTIFIER]}|${d[u.NUMERICIDENTIFIER]})`),q("PRERELEASEIDENTIFIERLOOSE",`(?:${d[u.NONNUMERICIDENTIFIER]}|${d[u.NUMERICIDENTIFIERLOOSE]})`),q("PRERELEASE",`(?:-(${d[u.PRERELEASEIDENTIFIER]}(?:\\.${d[u.PRERELEASEIDENTIFIER]})*))`),q("PRERELEASELOOSE",`(?:-?(${d[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${d[u.PRERELEASEIDENTIFIERLOOSE]})*))`),q("BUILDIDENTIFIER",`${j}+`),q("BUILD",`(?:\\+(${d[u.BUILDIDENTIFIER]}(?:\\.${d[u.BUILDIDENTIFIER]})*))`),q("FULLPLAIN",`v?${d[u.MAINVERSION]}${d[u.PRERELEASE]}?${d[u.BUILD]}?`),q("FULL",`^${d[u.FULLPLAIN]}$`),q("LOOSEPLAIN",`[v=\\s]*${d[u.MAINVERSIONLOOSE]}${d[u.PRERELEASELOOSE]}?${d[u.BUILD]}?`),q("LOOSE",`^${d[u.LOOSEPLAIN]}$`),q("GTLT","((?:<|>)?=?)"),q("XRANGEIDENTIFIERLOOSE",`${d[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),q("XRANGEIDENTIFIER",`${d[u.NUMERICIDENTIFIER]}|x|X|\\*`),q("XRANGEPLAIN",`[v=\\s]*(${d[u.XRANGEIDENTIFIER]})(?:\\.(${d[u.XRANGEIDENTIFIER]})(?:\\.(${d[u.XRANGEIDENTIFIER]})(?:${d[u.PRERELEASE]})?${d[u.BUILD]}?)?)?`),q("XRANGEPLAINLOOSE",`[v=\\s]*(${d[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[u.XRANGEIDENTIFIERLOOSE]})(?:${d[u.PRERELEASELOOSE]})?${d[u.BUILD]}?)?)?`),q("XRANGE",`^${d[u.GTLT]}\\s*${d[u.XRANGEPLAIN]}$`),q("XRANGELOOSE",`^${d[u.GTLT]}\\s*${d[u.XRANGEPLAINLOOSE]}$`),q("COERCEPLAIN",`(^|[^\\d])(\\d{1,${f}})(?:\\.(\\d{1,${f}}))?(?:\\.(\\d{1,${f}}))?`),q("COERCE",`${d[u.COERCEPLAIN]}(?:$|[^\\d])`),q("COERCEFULL",d[u.COERCEPLAIN]+`(?:${d[u.PRERELEASE]})?(?:${d[u.BUILD]})?(?:$|[^\\d])`),q("COERCERTL",d[u.COERCE],!0),q("COERCERTLFULL",d[u.COERCEFULL],!0),q("LONETILDE","(?:~>?)"),q("TILDETRIM",`(\\s*)${d[u.LONETILDE]}\\s+`,!0),o.tildeTrimReplace="$1~",q("TILDE",`^${d[u.LONETILDE]}${d[u.XRANGEPLAIN]}$`),q("TILDELOOSE",`^${d[u.LONETILDE]}${d[u.XRANGEPLAINLOOSE]}$`),q("LONECARET","(?:\\^)"),q("CARETTRIM",`(\\s*)${d[u.LONECARET]}\\s+`,!0),o.caretTrimReplace="$1^",q("CARET",`^${d[u.LONECARET]}${d[u.XRANGEPLAIN]}$`),q("CARETLOOSE",`^${d[u.LONECARET]}${d[u.XRANGEPLAINLOOSE]}$`),q("COMPARATORLOOSE",`^${d[u.GTLT]}\\s*(${d[u.LOOSEPLAIN]})$|^$`),q("COMPARATOR",`^${d[u.GTLT]}\\s*(${d[u.FULLPLAIN]})$|^$`),q("COMPARATORTRIM",`(\\s*)${d[u.GTLT]}\\s*(${d[u.LOOSEPLAIN]}|${d[u.XRANGEPLAIN]})`,!0),o.comparatorTrimReplace="$1$2$3",q("HYPHENRANGE",`^\\s*(${d[u.XRANGEPLAIN]})\\s+-\\s+(${d[u.XRANGEPLAIN]})\\s*$`),q("HYPHENRANGELOOSE",`^\\s*(${d[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${d[u.XRANGEPLAINLOOSE]})\\s*$`),q("STAR","(<|>)?=?\\s*\\*"),q("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),q("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(yr,yr.exports)),yr.exports}var mr,Jn;function vs(){if(Jn)return mr;Jn=1;const r=Object.freeze({loose:!0}),o=Object.freeze({});return mr=f=>f?typeof f!="object"?r:f:o,mr}var br,ei;function ws(){if(ei)return br;ei=1;const r=/^[0-9]+$/,o=(f,g)=>{if(typeof f=="number"&&typeof g=="number")return f===g?0:fo(g,f)},br}var Er,ti;function La(){if(ti)return Er;ti=1;const r=Ia(),{MAX_LENGTH:o,MAX_SAFE_INTEGER:f}=Na(),{safeRe:g,t:R}=Es(),y=vs(),{compareIdentifiers:T}=ws(),b=(M,u)=>{const L=u.split(".");if(L.length>M.length)return!1;for(let j=0;jo)throw new TypeError(`version is longer than ${o} characters`);r("SemVer",u,L),this.options=L,this.loose=!!L.loose,this.includePrerelease=!!L.includePrerelease;const j=u.trim().match(L.loose?g[R.LOOSE]:g[R.FULL]);if(!j)throw new TypeError(`Invalid Version: ${u}`);if(this.raw=u,this.major=+j[1],this.minor=+j[2],this.patch=+j[3],this.major>f||this.major<0)throw new TypeError("Invalid major version");if(this.minor>f||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>f||this.patch<0)throw new TypeError("Invalid patch version");j[4]?this.prerelease=j[4].split(".").map(ee=>{if(/^[0-9]+$/.test(ee)){const X=+ee;if(X>=0&&Xu.major?1:this.minoru.minor?1:this.patchu.patch?1:0}comparePre(u){if(u instanceof d||(u=new d(u,this.options)),this.prerelease.length&&!u.prerelease.length)return-1;if(!this.prerelease.length&&u.prerelease.length)return 1;if(!this.prerelease.length&&!u.prerelease.length)return 0;let L=0;do{const j=this.prerelease[L],ee=u.prerelease[L];if(r("prerelease compare",L,j,ee),j===void 0&&ee===void 0)return 0;if(ee===void 0)return 1;if(j===void 0)return-1;if(j!==ee)return T(j,ee)}while(++L)}compareBuild(u){u instanceof d||(u=new d(u,this.options));let L=0;do{const j=this.build[L],ee=u.build[L];if(r("build compare",L,j,ee),j===void 0&&ee===void 0)return 0;if(ee===void 0)return 1;if(j===void 0)return-1;if(j!==ee)return T(j,ee)}while(++L)}inc(u,L,j){if(u.startsWith("pre")){if(!L&&j===!1)throw new Error("invalid increment argument: identifier is empty");if(L){const ee=`-${L}`.match(this.options.loose?g[R.PRERELEASELOOSE]:g[R.PRERELEASE]);if(!ee||ee[1]!==L)throw new Error(`invalid identifier: ${L}`)}}switch(u){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",L,j);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",L,j);break;case"prepatch":this.prerelease.length=0,this.inc("patch",L,j),this.inc("pre",L,j);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",L,j),this.inc("pre",L,j);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const ee=Number(j)?1:0;if(this.prerelease.length===0)this.prerelease=[ee];else{let X=this.prerelease.length;for(;--X>=0;)typeof this.prerelease[X]=="number"&&(this.prerelease[X]++,X=-2);if(X===-1){if(L===this.prerelease.join(".")&&j===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(ee)}}if(L){let X=[L,ee];if(j===!1&&(X=[L]),b(this.prerelease,L)){const q=this.prerelease[L.split(".").length];isNaN(q)&&(this.prerelease=X)}else this.prerelease=X}break}default:throw new Error(`invalid increment argument: ${u}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Er=d,Er}var vr,ri;function Ts(){if(ri)return vr;ri=1;const r=La();return vr=(o,f)=>new r(o,f).major,vr}var _s=Ts();const ni=Nn(_s);var wr,ii;function Ss(){if(ii)return wr;ii=1;const r=La();return wr=(o,f,g=!1)=>{if(o instanceof r)return o;try{return new r(o,f)}catch(R){if(!g)return null;throw R}},wr}var Tr,oi;function As(){if(oi)return Tr;oi=1;const r=Ss();return Tr=(o,f)=>{const g=r(o,f);return g?g.version:null},Tr}var Os=As();const Rs=Nn(Os);class Is{bus;constructor(o){typeof o.getVersion!="function"||!Rs(o.getVersion())?console.warn("Proxying an event bus with an unknown or invalid version"):ni(o.getVersion())!==ni(this.getVersion())&&console.warn("Proxying an event bus of version "+o.getVersion()+" with "+this.getVersion()),this.bus=o}getVersion(){return"3.3.3"}subscribe(o,f){this.bus.subscribe(o,f)}unsubscribe(o,f){this.bus.unsubscribe(o,f)}emit(o,...f){this.bus.emit(o,...f)}}class Ns{handlers=new Map;getVersion(){return"3.3.3"}subscribe(o,f){this.handlers.set(o,(this.handlers.get(o)||[]).concat(f))}unsubscribe(o,f){this.handlers.set(o,(this.handlers.get(o)||[]).filter(g=>g!==f))}emit(o,...f){(this.handlers.get(o)||[]).forEach(g=>{try{g(f[0])}catch(R){console.error("could not invoke event listener",R)}})}}let Ut=null;function Ba(){return Ut!==null?Ut:typeof window>"u"?new Proxy({},{get:()=>()=>console.error("Window not available, EventBus can not be established!")}):(window.OC?._eventBus&&typeof window._nc_event_bus>"u"&&(console.warn("found old event bus instance at OC._eventBus. Update your version!"),window._nc_event_bus=window.OC._eventBus),typeof window?._nc_event_bus<"u"?Ut=new Is(window._nc_event_bus):Ut=window._nc_event_bus=new Ns,Ut)}function Ls(r,o){Ba().subscribe(r,o)}function Bs(r,...o){Ba().emit(r,...o)}class sr{static GLOBAL_SCOPE_VOLATILE="nextcloud_vol";static GLOBAL_SCOPE_PERSISTENT="nextcloud_per";scope;wrapped;constructor(o,f,g){this.scope=`${g?sr.GLOBAL_SCOPE_PERSISTENT:sr.GLOBAL_SCOPE_VOLATILE}_${btoa(o)}_`,this.wrapped=f}scopeKey(o){return`${this.scope}${o}`}setItem(o,f){this.wrapped.setItem(this.scopeKey(o),f)}getItem(o){return this.wrapped.getItem(this.scopeKey(o))}removeItem(o){this.wrapped.removeItem(this.scopeKey(o))}clear(){Object.keys(this.wrapped).filter(o=>o.startsWith(this.scope)).map(this.wrapped.removeItem.bind(this.wrapped))}}class Cs{appId;persisted=!1;clearedOnLogout=!1;constructor(o){this.appId=o}persist(o=!0){return this.persisted=o,this}clearOnLogout(o=!0){return this.clearedOnLogout=o,this}build(){return new sr(this.appId,this.persisted?window.localStorage:window.sessionStorage,!this.clearedOnLogout)}}function Ps(r){return new Cs(r)}Ds();function xs(r){if(!r||typeof r!="string")throw new Error("Invalid CSRF token given",{cause:{token:r}});globalThis._nc_auth_requestToken!==r&&(globalThis._nc_auth_requestToken=r,globalThis.document&&(document.head.dataset.requesttoken=r),Bs("csrf-token-update",{token:r,_internal:!0}))}function Ds(){Ls("csrf-token-update",({token:r,_internal:o})=>{o||xs(r)})}Ps("public").persist().build();let Nt;function ai(r,o){return r?r.getAttribute(o):null}function Ms(){if(Nt!==void 0)return Nt;const r=document?.getElementsByTagName("head")[0];if(!r)return null;const o=ai(r,"data-user");return o===null?(Nt=null,Nt):(Nt={uid:o,displayName:ai(r,"data-user-displayname"),isAdmin:!!window._oc_isadmin},Nt)}var Ve=(r=>(r[r.Debug=0]="Debug",r[r.Info=1]="Info",r[r.Warn=2]="Warn",r[r.Error=3]="Error",r[r.Fatal=4]="Fatal",r))(Ve||{});class js{context;constructor(o){this.context=o||{}}formatMessage(o,f,g){let R="["+Ve[f].toUpperCase()+"] ";return g&&g.app&&(R+=g.app+": "),typeof o=="string"?R+o:(R+=`Unexpected ${o.name}`,o.message&&(R+=` "${o.message}"`),f===Ve.Debug&&o.stack&&(R+=` Stack trace: ${o.stack}`),R)}log(o,f,g){if(!(typeof this.context?.level=="number"&&o{document.readyState==="complete"||document.readyState==="interactive"?(o.context.level=window._oc_config?.loglevel??Ve.Warn,window._oc_debug&&(o.context.level=Ve.Debug),document.removeEventListener("readystatechange",f)):document.addEventListener("readystatechange",f)};return f(),this}build(){return this.context.level===void 0&&this.detectLogLevel(),this.factory(this.context)}}function Us(){return new Fs(ks)}window._nc_files_scope??={},window._nc_files_scope.v4_0??={};const ct=window._nc_files_scope.v4_0,Vt=Us().setApp("@nextcloud/files").detectUser().build(),qs=Object.freeze({NONE:0,READ:1,UPDATE:2,CREATE:4,WRITE:4,DELETE:8,SHARE:16,ALL:31});var Gs=class extends EventTarget{dispatchTypedEvent(r,o){return super.dispatchEvent(o)}},Ca={},ar={};ar.byteLength=Vs,ar.toByteArray=zs,ar.fromByteArray=Ks;for(var dt=[],ot=[],$s=typeof Uint8Array<"u"?Uint8Array:Array,_r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Lt=0,Ws=_r.length;Lt0)throw new Error("Invalid string. Length must be a multiple of 4");var f=r.indexOf("=");f===-1&&(f=o);var g=f===o?0:4-f%4;return[f,g]}function Vs(r){var o=Pa(r),f=o[0],g=o[1];return(f+g)*3/4-g}function Ys(r,o,f){return(o+f)*3/4-f}function zs(r){var o,f=Pa(r),g=f[0],R=f[1],y=new $s(Ys(r,g,R)),T=0,b=R>0?g-4:g,d;for(d=0;d>16&255,y[T++]=o>>8&255,y[T++]=o&255;return R===2&&(o=ot[r.charCodeAt(d)]<<2|ot[r.charCodeAt(d+1)]>>4,y[T++]=o&255),R===1&&(o=ot[r.charCodeAt(d)]<<10|ot[r.charCodeAt(d+1)]<<4|ot[r.charCodeAt(d+2)]>>2,y[T++]=o>>8&255,y[T++]=o&255),y}function Hs(r){return dt[r>>18&63]+dt[r>>12&63]+dt[r>>6&63]+dt[r&63]}function Xs(r,o,f){for(var g,R=[],y=o;yb?b:T+y));return g===1?(o=r[f-1],R.push(dt[o>>2]+dt[o<<4&63]+"==")):g===2&&(o=(r[f-2]<<8)+r[f-1],R.push(dt[o>>10]+dt[o>>4&63]+dt[o<<2&63]+"=")),R.join("")}var An={};An.read=function(r,o,f,g,R){var y,T,b=R*8-g-1,d=(1<>1,u=-7,L=f?R-1:0,j=f?-1:1,ee=r[o+L];for(L+=j,y=ee&(1<<-u)-1,ee>>=-u,u+=b;u>0;y=y*256+r[o+L],L+=j,u-=8);for(T=y&(1<<-u)-1,y>>=-u,u+=g;u>0;T=T*256+r[o+L],L+=j,u-=8);if(y===0)y=1-M;else{if(y===d)return T?NaN:(ee?-1:1)*(1/0);T=T+Math.pow(2,g),y=y-M}return(ee?-1:1)*T*Math.pow(2,y-g)},An.write=function(r,o,f,g,R,y){var T,b,d,M=y*8-R-1,u=(1<>1,j=R===23?Math.pow(2,-24)-Math.pow(2,-77):0,ee=g?0:y-1,X=g?1:-1,q=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(b=isNaN(o)?1:0,T=u):(T=Math.floor(Math.log(o)/Math.LN2),o*(d=Math.pow(2,-T))<1&&(T--,d*=2),T+L>=1?o+=j/d:o+=j*Math.pow(2,1-L),o*d>=2&&(T++,d/=2),T+L>=u?(b=0,T=u):T+L>=1?(b=(o*d-1)*Math.pow(2,R),T=T+L):(b=o*Math.pow(2,L-1)*Math.pow(2,R),T=0));R>=8;r[f+ee]=b&255,ee+=X,b/=256,R-=8);for(T=T<0;r[f+ee]=T&255,ee+=X,T/=256,M-=8);r[f+ee-X]|=q*128};(function(r){const o=ar,f=An,g=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=u,r.SlowBuffer=B,r.INSPECT_MAX_BYTES=50;const R=2147483647;r.kMaxLength=R;const{Uint8Array:y,ArrayBuffer:T,SharedArrayBuffer:b}=globalThis;u.TYPED_ARRAY_SUPPORT=d(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function d(){try{const e=new y(1),n={foo:function(){return 42}};return Object.setPrototypeOf(n,y.prototype),Object.setPrototypeOf(e,n),e.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function M(e){if(e>R)throw new RangeError('The value "'+e+'" is invalid for option "size"');const n=new y(e);return Object.setPrototypeOf(n,u.prototype),n}function u(e,n,c){if(typeof e=="number"){if(typeof n=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return X(e)}return L(e,n,c)}u.poolSize=8192;function L(e,n,c){if(typeof e=="string")return q(e,n);if(T.isView(e))return _(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Ue(e,T)||e&&Ue(e.buffer,T)||typeof b<"u"&&(Ue(e,b)||e&&Ue(e.buffer,b)))return S(e,n,c);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const N=e.valueOf&&e.valueOf();if(N!=null&&N!==e)return u.from(N,n,c);const x=C(e);if(x)return x;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return u.from(e[Symbol.toPrimitive]("string"),n,c);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}u.from=function(e,n,c){return L(e,n,c)},Object.setPrototypeOf(u.prototype,y.prototype),Object.setPrototypeOf(u,y);function j(e){if(typeof e!="number")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 ee(e,n,c){return j(e),e<=0?M(e):n!==void 0?typeof c=="string"?M(e).fill(n,c):M(e).fill(n):M(e)}u.alloc=function(e,n,c){return ee(e,n,c)};function X(e){return j(e),M(e<0?0:E(e)|0)}u.allocUnsafe=function(e){return X(e)},u.allocUnsafeSlow=function(e){return X(e)};function q(e,n){if((typeof n!="string"||n==="")&&(n="utf8"),!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);const c=k(e,n)|0;let N=M(c);const x=N.write(e,n);return x!==c&&(N=N.slice(0,x)),N}function J(e){const n=e.length<0?0:E(e.length)|0,c=M(n);for(let N=0;N=R)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+R.toString(16)+" bytes");return e|0}function B(e){return+e!=e&&(e=0),u.alloc(+e)}u.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==u.prototype},u.compare=function(e,n){if(Ue(e,y)&&(e=u.from(e,e.offset,e.byteLength)),Ue(n,y)&&(n=u.from(n,n.offset,n.byteLength)),!u.isBuffer(e)||!u.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===n)return 0;let c=e.length,N=n.length;for(let x=0,H=Math.min(c,N);xN.length?(u.isBuffer(H)||(H=u.from(H)),H.copy(N,x)):y.prototype.set.call(N,H,x);else if(u.isBuffer(H))H.copy(N,x);else throw new TypeError('"list" argument must be an Array of Buffers');x+=H.length}return N};function k(e,n){if(u.isBuffer(e))return e.length;if(T.isView(e)||Ue(e,T))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const c=e.length,N=arguments.length>2&&arguments[2]===!0;if(!N&&c===0)return 0;let x=!1;for(;;)switch(n){case"ascii":case"latin1":case"binary":return c;case"utf8":case"utf-8":return ye(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c*2;case"hex":return c>>>1;case"base64":return pe(e).length;default:if(x)return N?-1:ye(e).length;n=(""+n).toLowerCase(),x=!0}}u.byteLength=k;function Y(e,n,c){let N=!1;if((n===void 0||n<0)&&(n=0),n>this.length||((c===void 0||c>this.length)&&(c=this.length),c<=0)||(c>>>=0,n>>>=0,c<=n))return"";for(e||(e="utf8");;)switch(e){case"hex":return le(this,n,c);case"utf8":case"utf-8":return he(this,n,c);case"ascii":return Ee(this,n,c);case"latin1":case"binary":return $e(this,n,c);case"base64":return Te(this,n,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,n,c);default:if(N)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),N=!0}}u.prototype._isBuffer=!0;function G(e,n,c){const N=e[n];e[n]=e[c],e[c]=N}u.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 n=0;nn&&(e+=" ... "),""},g&&(u.prototype[g]=u.prototype.inspect),u.prototype.compare=function(e,n,c,N,x){if(Ue(e,y)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(n===void 0&&(n=0),c===void 0&&(c=e?e.length:0),N===void 0&&(N=0),x===void 0&&(x=this.length),n<0||c>e.length||N<0||x>this.length)throw new RangeError("out of range index");if(N>=x&&n>=c)return 0;if(N>=x)return-1;if(n>=c)return 1;if(n>>>=0,c>>>=0,N>>>=0,x>>>=0,this===e)return 0;let H=x-N,oe=c-n;const Re=Math.min(H,oe),ke=this.slice(N,x),Ne=e.slice(n,c);for(let Ae=0;Ae2147483647?c=2147483647:c<-2147483648&&(c=-2147483648),c=+c,He(c)&&(c=x?0:e.length-1),c<0&&(c=e.length+c),c>=e.length){if(x)return-1;c=e.length-1}else if(c<0)if(x)c=0;else return-1;if(typeof n=="string"&&(n=u.from(n,N)),u.isBuffer(n))return n.length===0?-1:w(e,n,c,N,x);if(typeof n=="number")return n=n&255,typeof y.prototype.indexOf=="function"?x?y.prototype.indexOf.call(e,n,c):y.prototype.lastIndexOf.call(e,n,c):w(e,[n],c,N,x);throw new TypeError("val must be string, number or Buffer")}function w(e,n,c,N,x){let H=1,oe=e.length,Re=n.length;if(N!==void 0&&(N=String(N).toLowerCase(),N==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(e.length<2||n.length<2)return-1;H=2,oe/=2,Re/=2,c/=2}function ke(Ae,xe){return H===1?Ae[xe]:Ae.readUInt16BE(xe*H)}let Ne;if(x){let Ae=-1;for(Ne=c;Neoe&&(c=oe-Re),Ne=c;Ne>=0;Ne--){let Ae=!0;for(let xe=0;xex&&(N=x)):N=x;const H=n.length;N>H/2&&(N=H/2);let oe;for(oe=0;oe>>0,isFinite(c)?(c=c>>>0,N===void 0&&(N="utf8")):(N=c,c=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const x=this.length-n;if((c===void 0||c>x)&&(c=x),e.length>0&&(c<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");N||(N="utf8");let H=!1;for(;;)switch(N){case"hex":return ue(this,e,n,c);case"utf8":case"utf-8":return P(this,e,n,c);case"ascii":case"latin1":case"binary":return ge(this,e,n,c);case"base64":return me(this,e,n,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Se(this,e,n,c);default:if(H)throw new TypeError("Unknown encoding: "+N);N=(""+N).toLowerCase(),H=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Te(e,n,c){return n===0&&c===e.length?o.fromByteArray(e):o.fromByteArray(e.slice(n,c))}function he(e,n,c){c=Math.min(e.length,c);const N=[];let x=n;for(;x239?4:H>223?3:H>191?2:1;if(x+Re<=c){let ke,Ne,Ae,xe;switch(Re){case 1:H<128&&(oe=H);break;case 2:ke=e[x+1],(ke&192)===128&&(xe=(H&31)<<6|ke&63,xe>127&&(oe=xe));break;case 3:ke=e[x+1],Ne=e[x+2],(ke&192)===128&&(Ne&192)===128&&(xe=(H&15)<<12|(ke&63)<<6|Ne&63,xe>2047&&(xe<55296||xe>57343)&&(oe=xe));break;case 4:ke=e[x+1],Ne=e[x+2],Ae=e[x+3],(ke&192)===128&&(Ne&192)===128&&(Ae&192)===128&&(xe=(H&15)<<18|(ke&63)<<12|(Ne&63)<<6|Ae&63,xe>65535&&xe<1114112&&(oe=xe))}}oe===null?(oe=65533,Re=1):oe>65535&&(oe-=65536,N.push(oe>>>10&1023|55296),oe=56320|oe&1023),N.push(oe),x+=Re}return Be(N)}const Oe=4096;function Be(e){const n=e.length;if(n<=Oe)return String.fromCharCode.apply(String,e);let c="",N=0;for(;NN)&&(c=N);let x="";for(let H=n;Hc&&(e=c),n<0?(n+=c,n<0&&(n=0)):n>c&&(n=c),nc)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(e,n,c){e=e>>>0,n=n>>>0,c||V(e,n,this.length);let N=this[e],x=1,H=0;for(;++H>>0,n=n>>>0,c||V(e,n,this.length);let N=this[e+--n],x=1;for(;n>0&&(x*=256);)N+=this[e+--n]*x;return N},u.prototype.readUint8=u.prototype.readUInt8=function(e,n){return e=e>>>0,n||V(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,n){return e=e>>>0,n||V(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,n){return e=e>>>0,n||V(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,n){return e=e>>>0,n||V(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,n){return e=e>>>0,n||V(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Ie(function(e){e=e>>>0,v(e,"offset");const n=this[e],c=this[e+7];(n===void 0||c===void 0)&&ne(e,this.length-8);const N=n+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,x=this[++e]+this[++e]*2**8+this[++e]*2**16+c*2**24;return BigInt(N)+(BigInt(x)<>>0,v(e,"offset");const n=this[e],c=this[e+7];(n===void 0||c===void 0)&&ne(e,this.length-8);const N=n*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],x=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+c;return(BigInt(N)<>>0,n=n>>>0,c||V(e,n,this.length);let N=this[e],x=1,H=0;for(;++H=x&&(N-=Math.pow(2,8*n)),N},u.prototype.readIntBE=function(e,n,c){e=e>>>0,n=n>>>0,c||V(e,n,this.length);let N=n,x=1,H=this[e+--N];for(;N>0&&(x*=256);)H+=this[e+--N]*x;return x*=128,H>=x&&(H-=Math.pow(2,8*n)),H},u.prototype.readInt8=function(e,n){return e=e>>>0,n||V(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},u.prototype.readInt16LE=function(e,n){e=e>>>0,n||V(e,2,this.length);const c=this[e]|this[e+1]<<8;return c&32768?c|4294901760:c},u.prototype.readInt16BE=function(e,n){e=e>>>0,n||V(e,2,this.length);const c=this[e+1]|this[e]<<8;return c&32768?c|4294901760:c},u.prototype.readInt32LE=function(e,n){return e=e>>>0,n||V(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,n){return e=e>>>0,n||V(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Ie(function(e){e=e>>>0,v(e,"offset");const n=this[e],c=this[e+7];(n===void 0||c===void 0)&&ne(e,this.length-8);const N=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(c<<24);return(BigInt(N)<>>0,v(e,"offset");const n=this[e],c=this[e+7];(n===void 0||c===void 0)&&ne(e,this.length-8);const N=(n<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(N)<>>0,n||V(e,4,this.length),f.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,n){return e=e>>>0,n||V(e,4,this.length),f.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,n){return e=e>>>0,n||V(e,8,this.length),f.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,n){return e=e>>>0,n||V(e,8,this.length),f.read(this,e,!1,52,8)};function z(e,n,c,N,x,H){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>x||ne.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,n,c,N){if(e=+e,n=n>>>0,c=c>>>0,!N){const oe=Math.pow(2,8*c)-1;z(this,e,n,c,oe,0)}let x=1,H=0;for(this[n]=e&255;++H>>0,c=c>>>0,!N){const oe=Math.pow(2,8*c)-1;z(this,e,n,c,oe,0)}let x=c-1,H=1;for(this[n+x]=e&255;--x>=0&&(H*=256);)this[n+x]=e/H&255;return n+c},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,n,c){return e=+e,n=n>>>0,c||z(this,e,n,1,255,0),this[n]=e&255,n+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,n,c){return e=+e,n=n>>>0,c||z(this,e,n,2,65535,0),this[n]=e&255,this[n+1]=e>>>8,n+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,n,c){return e=+e,n=n>>>0,c||z(this,e,n,2,65535,0),this[n]=e>>>8,this[n+1]=e&255,n+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,n,c){return e=+e,n=n>>>0,c||z(this,e,n,4,4294967295,0),this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=e&255,n+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,n,c){return e=+e,n=n>>>0,c||z(this,e,n,4,4294967295,0),this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=e&255,n+4};function I(e,n,c,N,x){O(n,N,x,e,c,7);let H=Number(n&BigInt(4294967295));e[c++]=H,H=H>>8,e[c++]=H,H=H>>8,e[c++]=H,H=H>>8,e[c++]=H;let oe=Number(n>>BigInt(32)&BigInt(4294967295));return e[c++]=oe,oe=oe>>8,e[c++]=oe,oe=oe>>8,e[c++]=oe,oe=oe>>8,e[c++]=oe,c}function U(e,n,c,N,x){O(n,N,x,e,c,7);let H=Number(n&BigInt(4294967295));e[c+7]=H,H=H>>8,e[c+6]=H,H=H>>8,e[c+5]=H,H=H>>8,e[c+4]=H;let oe=Number(n>>BigInt(32)&BigInt(4294967295));return e[c+3]=oe,oe=oe>>8,e[c+2]=oe,oe=oe>>8,e[c+1]=oe,oe=oe>>8,e[c]=oe,c+8}u.prototype.writeBigUInt64LE=Ie(function(e,n=0){return I(this,e,n,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=Ie(function(e,n=0){return U(this,e,n,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(e,n,c,N){if(e=+e,n=n>>>0,!N){const Re=Math.pow(2,8*c-1);z(this,e,n,c,Re-1,-Re)}let x=0,H=1,oe=0;for(this[n]=e&255;++x>0)-oe&255;return n+c},u.prototype.writeIntBE=function(e,n,c,N){if(e=+e,n=n>>>0,!N){const Re=Math.pow(2,8*c-1);z(this,e,n,c,Re-1,-Re)}let x=c-1,H=1,oe=0;for(this[n+x]=e&255;--x>=0&&(H*=256);)e<0&&oe===0&&this[n+x+1]!==0&&(oe=1),this[n+x]=(e/H>>0)-oe&255;return n+c},u.prototype.writeInt8=function(e,n,c){return e=+e,n=n>>>0,c||z(this,e,n,1,127,-128),e<0&&(e=255+e+1),this[n]=e&255,n+1},u.prototype.writeInt16LE=function(e,n,c){return e=+e,n=n>>>0,c||z(this,e,n,2,32767,-32768),this[n]=e&255,this[n+1]=e>>>8,n+2},u.prototype.writeInt16BE=function(e,n,c){return e=+e,n=n>>>0,c||z(this,e,n,2,32767,-32768),this[n]=e>>>8,this[n+1]=e&255,n+2},u.prototype.writeInt32LE=function(e,n,c){return e=+e,n=n>>>0,c||z(this,e,n,4,2147483647,-2147483648),this[n]=e&255,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24,n+4},u.prototype.writeInt32BE=function(e,n,c){return e=+e,n=n>>>0,c||z(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=e&255,n+4},u.prototype.writeBigInt64LE=Ie(function(e,n=0){return I(this,e,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=Ie(function(e,n=0){return U(this,e,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function K(e,n,c,N,x,H){if(c+N>e.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("Index out of range")}function te(e,n,c,N,x){return n=+n,c=c>>>0,x||K(e,n,c,4),f.write(e,n,c,N,23,4),c+4}u.prototype.writeFloatLE=function(e,n,c){return te(this,e,n,!0,c)},u.prototype.writeFloatBE=function(e,n,c){return te(this,e,n,!1,c)};function ie(e,n,c,N,x){return n=+n,c=c>>>0,x||K(e,n,c,8),f.write(e,n,c,N,52,8),c+8}u.prototype.writeDoubleLE=function(e,n,c){return ie(this,e,n,!0,c)},u.prototype.writeDoubleBE=function(e,n,c){return ie(this,e,n,!1,c)},u.prototype.copy=function(e,n,c,N){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(c||(c=0),!N&&N!==0&&(N=this.length),n>=e.length&&(n=e.length),n||(n=0),N>0&&N=this.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("sourceEnd out of bounds");N>this.length&&(N=this.length),e.length-n>>0,c=c===void 0?this.length:c>>>0,e||(e=0);let x;if(typeof e=="number")for(x=n;x2**32?x=s(String(c)):typeof c=="bigint"&&(x=String(c),(c>BigInt(2)**BigInt(32)||c<-(BigInt(2)**BigInt(32)))&&(x=s(x)),x+="n"),N+=` It must be ${n}. Received ${x}`,N},RangeError);function s(e){let n="",c=e.length;const N=e[0]==="-"?1:0;for(;c>=N+4;c-=3)n=`_${e.slice(c-3,c)}${n}`;return`${e.slice(0,c)}${n}`}function a(e,n,c){v(n,"offset"),(e[n]===void 0||e[n+c]===void 0)&&ne(n,e.length-(c+1))}function O(e,n,c,N,x,H){if(e>c||e= 0${oe} and < 2${oe} ** ${(H+1)*8}${oe}`:Re=`>= -(2${oe} ** ${(H+1)*8-1}${oe}) and < 2 ** ${(H+1)*8-1}${oe}`,new h.ERR_OUT_OF_RANGE("value",Re,e)}a(N,x,H)}function v(e,n){if(typeof e!="number")throw new h.ERR_INVALID_ARG_TYPE(n,"number",e)}function ne(e,n,c){throw Math.floor(e)!==e?(v(e,c),new h.ERR_OUT_OF_RANGE("offset","an integer",e)):n<0?new h.ERR_BUFFER_OUT_OF_BOUNDS:new h.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${n}`,e)}const be=/[^+/0-9A-Za-z-_]/g;function $(e){if(e=e.split("=")[0],e=e.trim().replace(be,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function ye(e,n){n=n||1/0;let c;const N=e.length;let x=null;const H=[];for(let oe=0;oe55295&&c<57344){if(!x){if(c>56319){(n-=3)>-1&&H.push(239,191,189);continue}else if(oe+1===N){(n-=3)>-1&&H.push(239,191,189);continue}x=c;continue}if(c<56320){(n-=3)>-1&&H.push(239,191,189),x=c;continue}c=(x-55296<<10|c-56320)+65536}else x&&(n-=3)>-1&&H.push(239,191,189);if(x=null,c<128){if((n-=1)<0)break;H.push(c)}else if(c<2048){if((n-=2)<0)break;H.push(c>>6|192,c&63|128)}else if(c<65536){if((n-=3)<0)break;H.push(c>>12|224,c>>6&63|128,c&63|128)}else if(c<1114112){if((n-=4)<0)break;H.push(c>>18|240,c>>12&63|128,c>>6&63|128,c&63|128)}else throw new Error("Invalid code point")}return H}function Ce(e){const n=[];for(let c=0;c>8,x=c%256,H.push(x),H.push(N);return H}function pe(e){return o.toByteArray($(e))}function Me(e,n,c,N){let x;for(x=0;x=n.length||x>=e.length);++x)n[x+c]=e[x];return x}function Ue(e,n){return e instanceof n||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===n.name}function He(e){return e!==e}const je=(function(){const e="0123456789abcdef",n=new Array(256);for(let c=0;c<16;++c){const N=c*16;for(let x=0;x<16;++x)n[N+x]=e[c]+e[x]}return n})();function Ie(e){return typeof BigInt>"u"?Qe:e}function Qe(){throw new Error("BigInt not supported")}})(Ca);const Bt=Ca.Buffer;var si={},nr={exports:{}},ui;function Ln(){if(ui)return nr.exports;ui=1;var r=typeof Reflect=="object"?Reflect:null,o=r&&typeof r.apply=="function"?r.apply:function(E,B,k){return Function.prototype.apply.call(E,B,k)},f;r&&typeof r.ownKeys=="function"?f=r.ownKeys:Object.getOwnPropertySymbols?f=function(E){return Object.getOwnPropertyNames(E).concat(Object.getOwnPropertySymbols(E))}:f=function(E){return Object.getOwnPropertyNames(E)};function g(E){console&&console.warn&&console.warn(E)}var R=Number.isNaN||function(E){return E!==E};function y(){y.init.call(this)}nr.exports=y,nr.exports.once=_,y.EventEmitter=y,y.prototype._events=void 0,y.prototype._eventsCount=0,y.prototype._maxListeners=void 0;var T=10;function b(E){if(typeof E!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof E)}Object.defineProperty(y,"defaultMaxListeners",{enumerable:!0,get:function(){return T},set:function(E){if(typeof E!="number"||E<0||R(E))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+E+".");T=E}}),y.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},y.prototype.setMaxListeners=function(E){if(typeof E!="number"||E<0||R(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};function d(E){return E._maxListeners===void 0?y.defaultMaxListeners:E._maxListeners}y.prototype.getMaxListeners=function(){return d(this)},y.prototype.emit=function(E){for(var B=[],k=1;k0&&(re=B[0]),re instanceof Error)throw re;var w=new Error("Unhandled error."+(re?" ("+re.message+")":""));throw w.context=re,w}var ue=G[E];if(ue===void 0)return!1;if(typeof ue=="function")o(ue,this,B);else for(var P=ue.length,ge=X(ue,P),k=0;k0&&w.length>G&&!w.warned){w.warned=!0;var ue=new Error("Possible EventEmitter memory leak detected. "+w.length+" "+String(B)+" listeners added. Use emitter.setMaxListeners() to increase limit");ue.name="MaxListenersExceededWarning",ue.emitter=E,ue.type=B,ue.count=w.length,g(ue)}return E}y.prototype.addListener=function(E,B){return M(this,E,B,!1)},y.prototype.on=y.prototype.addListener,y.prototype.prependListener=function(E,B){return M(this,E,B,!0)};function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function L(E,B,k){var Y={fired:!1,wrapFn:void 0,target:E,type:B,listener:k},G=u.bind(Y);return G.listener=k,Y.wrapFn=G,G}y.prototype.once=function(E,B){return b(B),this.on(E,L(this,E,B)),this},y.prototype.prependOnceListener=function(E,B){return b(B),this.prependListener(E,L(this,E,B)),this},y.prototype.removeListener=function(E,B){var k,Y,G,re,w;if(b(B),Y=this._events,Y===void 0)return this;if(k=Y[E],k===void 0)return this;if(k===B||k.listener===B)--this._eventsCount===0?this._events=Object.create(null):(delete Y[E],Y.removeListener&&this.emit("removeListener",E,k.listener||B));else if(typeof k!="function"){for(G=-1,re=k.length-1;re>=0;re--)if(k[re]===B||k[re].listener===B){w=k[re].listener,G=re;break}if(G<0)return this;G===0?k.shift():q(k,G),k.length===1&&(Y[E]=k[0]),Y.removeListener!==void 0&&this.emit("removeListener",E,w||B)}return this},y.prototype.off=y.prototype.removeListener,y.prototype.removeAllListeners=function(E){var B,k,Y;if(k=this._events,k===void 0)return this;if(k.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):k[E]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete k[E]),this;if(arguments.length===0){var G=Object.keys(k),re;for(Y=0;Y=0;Y--)this.removeListener(E,B[Y]);return this};function j(E,B,k){var Y=E._events;if(Y===void 0)return[];var G=Y[B];return G===void 0?[]:typeof G=="function"?k?[G.listener||G]:[G]:k?J(G):X(G,G.length)}y.prototype.listeners=function(E){return j(this,E,!0)},y.prototype.rawListeners=function(E){return j(this,E,!1)},y.listenerCount=function(E,B){return typeof E.listenerCount=="function"?E.listenerCount(B):ee.call(E,B)},y.prototype.listenerCount=ee;function ee(E){var B=this._events;if(B!==void 0){var k=B[E];if(typeof k=="function")return 1;if(k!==void 0)return k.length}return 0}y.prototype.eventNames=function(){return this._eventsCount>0?f(this._events):[]};function X(E,B){for(var k=new Array(B),Y=0;Y0)throw new Error("Invalid string. Length must be a multiple of 4");var E=S.indexOf("=");E===-1&&(E=C);var B=E===C?0:4-E%4;return[E,B]}function u(S){var C=M(S),E=C[0],B=C[1];return(E+B)*3/4-B}function L(S,C,E){return(C+E)*3/4-E}function j(S){var C,E=M(S),B=E[0],k=E[1],Y=new y(L(S,B,k)),G=0,re=k>0?B-4:B,w;for(w=0;w>16&255,Y[G++]=C>>8&255,Y[G++]=C&255;return k===2&&(C=R[S.charCodeAt(w)]<<2|R[S.charCodeAt(w+1)]>>4,Y[G++]=C&255),k===1&&(C=R[S.charCodeAt(w)]<<10|R[S.charCodeAt(w+1)]<<4|R[S.charCodeAt(w+2)]>>2,Y[G++]=C>>8&255,Y[G++]=C&255),Y}function ee(S){return g[S>>18&63]+g[S>>12&63]+g[S>>6&63]+g[S&63]}function X(S,C,E){for(var B,k=[],Y=C;Yre?re:G+Y));return B===1?(C=S[E-1],k.push(g[C>>2]+g[C<<4&63]+"==")):B===2&&(C=(S[E-2]<<8)+S[E-1],k.push(g[C>>10]+g[C>>4&63]+g[C<<2&63]+"=")),k.join("")}var J={};J.read=function(S,C,E,B,k){var Y,G,re=k*8-B-1,w=(1<>1,P=-7,ge=E?k-1:0,me=E?-1:1,Se=S[C+ge];for(ge+=me,Y=Se&(1<<-P)-1,Se>>=-P,P+=re;P>0;Y=Y*256+S[C+ge],ge+=me,P-=8);for(G=Y&(1<<-P)-1,Y>>=-P,P+=B;P>0;G=G*256+S[C+ge],ge+=me,P-=8);if(Y===0)Y=1-ue;else{if(Y===w)return G?NaN:(Se?-1:1)*(1/0);G=G+Math.pow(2,B),Y=Y-ue}return(Se?-1:1)*G*Math.pow(2,Y-B)},J.write=function(S,C,E,B,k,Y){var G,re,w,ue=Y*8-k-1,P=(1<>1,me=k===23?Math.pow(2,-24)-Math.pow(2,-77):0,Se=B?0:Y-1,Te=B?1:-1,he=C<0||C===0&&1/C<0?1:0;for(C=Math.abs(C),isNaN(C)||C===1/0?(re=isNaN(C)?1:0,G=P):(G=Math.floor(Math.log(C)/Math.LN2),C*(w=Math.pow(2,-G))<1&&(G--,w*=2),G+ge>=1?C+=me/w:C+=me*Math.pow(2,1-ge),C*w>=2&&(G++,w/=2),G+ge>=P?(re=0,G=P):G+ge>=1?(re=(C*w-1)*Math.pow(2,k),G=G+ge):(re=C*Math.pow(2,ge-1)*Math.pow(2,k),G=0));k>=8;S[E+Se]=re&255,Se+=Te,re/=256,k-=8);for(G=G<0;S[E+Se]=G&255,Se+=Te,G/=256,ue-=8);S[E+Se-Te]|=he*128},(function(S){const C=f,E=J,B=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;S.Buffer=P,S.SlowBuffer=F,S.INSPECT_MAX_BYTES=50;const k=2147483647;S.kMaxLength=k;const{Uint8Array:Y,ArrayBuffer:G,SharedArrayBuffer:re}=globalThis;P.TYPED_ARRAY_SUPPORT=w(),!P.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function w(){try{const t=new Y(1),i={foo:function(){return 42}};return Object.setPrototypeOf(i,Y.prototype),Object.setPrototypeOf(t,i),t.foo()===42}catch{return!1}}Object.defineProperty(P.prototype,"parent",{enumerable:!0,get:function(){if(P.isBuffer(this))return this.buffer}}),Object.defineProperty(P.prototype,"offset",{enumerable:!0,get:function(){if(P.isBuffer(this))return this.byteOffset}});function ue(t){if(t>k)throw new RangeError('The value "'+t+'" is invalid for option "size"');const i=new Y(t);return Object.setPrototypeOf(i,P.prototype),i}function P(t,i,l){if(typeof t=="number"){if(typeof i=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Te(t)}return ge(t,i,l)}P.poolSize=8192;function ge(t,i,l){if(typeof t=="string")return he(t,i);if(G.isView(t))return Be(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Ke(t,G)||t&&Ke(t.buffer,G)||typeof re<"u"&&(Ke(t,re)||t&&Ke(t.buffer,re)))return Ee(t,i,l);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const A=t.valueOf&&t.valueOf();if(A!=null&&A!==t)return P.from(A,i,l);const D=$e(t);if(D)return D;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return P.from(t[Symbol.toPrimitive]("string"),i,l);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}P.from=function(t,i,l){return ge(t,i,l)},Object.setPrototypeOf(P.prototype,Y.prototype),Object.setPrototypeOf(P,Y);function me(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function Se(t,i,l){return me(t),t<=0?ue(t):i!==void 0?typeof l=="string"?ue(t).fill(i,l):ue(t).fill(i):ue(t)}P.alloc=function(t,i,l){return Se(t,i,l)};function Te(t){return me(t),ue(t<0?0:le(t)|0)}P.allocUnsafe=function(t){return Te(t)},P.allocUnsafeSlow=function(t){return Te(t)};function he(t,i){if((typeof i!="string"||i==="")&&(i="utf8"),!P.isEncoding(i))throw new TypeError("Unknown encoding: "+i);const l=V(t,i)|0;let A=ue(l);const D=A.write(t,i);return D!==l&&(A=A.slice(0,D)),A}function Oe(t){const i=t.length<0?0:le(t.length)|0,l=ue(i);for(let A=0;A=k)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+k.toString(16)+" bytes");return t|0}function F(t){return+t!=t&&(t=0),P.alloc(+t)}P.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==P.prototype},P.compare=function(t,i){if(Ke(t,Y)&&(t=P.from(t,t.offset,t.byteLength)),Ke(i,Y)&&(i=P.from(i,i.offset,i.byteLength)),!P.isBuffer(t)||!P.isBuffer(i))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===i)return 0;let l=t.length,A=i.length;for(let D=0,Q=Math.min(l,A);DA.length?(P.isBuffer(Q)||(Q=P.from(Q)),Q.copy(A,D)):Y.prototype.set.call(A,Q,D);else if(P.isBuffer(Q))Q.copy(A,D);else throw new TypeError('"list" argument must be an Array of Buffers');D+=Q.length}return A};function V(t,i){if(P.isBuffer(t))return t.length;if(G.isView(t)||Ke(t,G))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const l=t.length,A=arguments.length>2&&arguments[2]===!0;if(!A&&l===0)return 0;let D=!1;for(;;)switch(i){case"ascii":case"latin1":case"binary":return l;case"utf8":case"utf-8":return ke(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l*2;case"hex":return l>>>1;case"base64":return xe(t).length;default:if(D)return A?-1:ke(t).length;i=(""+i).toLowerCase(),D=!0}}P.byteLength=V;function z(t,i,l){let A=!1;if((i===void 0||i<0)&&(i=0),i>this.length||((l===void 0||l>this.length)&&(l=this.length),l<=0)||(l>>>=0,i>>>=0,l<=i))return"";for(t||(t="utf8");;)switch(t){case"hex":return ye(this,i,l);case"utf8":case"utf-8":return O(this,i,l);case"ascii":return be(this,i,l);case"latin1":case"binary":return $(this,i,l);case"base64":return a(this,i,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ce(this,i,l);default:if(A)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),A=!0}}P.prototype._isBuffer=!0;function I(t,i,l){const A=t[i];t[i]=t[l],t[l]=A}P.prototype.swap16=function(){const t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let i=0;ii&&(t+=" ... "),""},B&&(P.prototype[B]=P.prototype.inspect),P.prototype.compare=function(t,i,l,A,D){if(Ke(t,Y)&&(t=P.from(t,t.offset,t.byteLength)),!P.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(i===void 0&&(i=0),l===void 0&&(l=t?t.length:0),A===void 0&&(A=0),D===void 0&&(D=this.length),i<0||l>t.length||A<0||D>this.length)throw new RangeError("out of range index");if(A>=D&&i>=l)return 0;if(A>=D)return-1;if(i>=l)return 1;if(i>>>=0,l>>>=0,A>>>=0,D>>>=0,this===t)return 0;let Q=D-A,ae=l-i;const De=Math.min(Q,ae),We=this.slice(A,D),Pe=t.slice(i,l);for(let Le=0;Le2147483647?l=2147483647:l<-2147483648&&(l=-2147483648),l=+l,Ot(l)&&(l=D?0:t.length-1),l<0&&(l=t.length+l),l>=t.length){if(D)return-1;l=t.length-1}else if(l<0)if(D)l=0;else return-1;if(typeof i=="string"&&(i=P.from(i,A)),P.isBuffer(i))return i.length===0?-1:K(t,i,l,A,D);if(typeof i=="number")return i=i&255,typeof Y.prototype.indexOf=="function"?D?Y.prototype.indexOf.call(t,i,l):Y.prototype.lastIndexOf.call(t,i,l):K(t,[i],l,A,D);throw new TypeError("val must be string, number or Buffer")}function K(t,i,l,A,D){let Q=1,ae=t.length,De=i.length;if(A!==void 0&&(A=String(A).toLowerCase(),A==="ucs2"||A==="ucs-2"||A==="utf16le"||A==="utf-16le")){if(t.length<2||i.length<2)return-1;Q=2,ae/=2,De/=2,l/=2}function We(Le,Fe){return Q===1?Le[Fe]:Le.readUInt16BE(Fe*Q)}let Pe;if(D){let Le=-1;for(Pe=l;Peae&&(l=ae-De),Pe=l;Pe>=0;Pe--){let Le=!0;for(let Fe=0;FeD&&(A=D)):A=D;const Q=i.length;A>Q/2&&(A=Q/2);let ae;for(ae=0;ae>>0,isFinite(l)?(l=l>>>0,A===void 0&&(A="utf8")):(A=l,l=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const D=this.length-i;if((l===void 0||l>D)&&(l=D),t.length>0&&(l<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");A||(A="utf8");let Q=!1;for(;;)switch(A){case"hex":return te(this,t,i,l);case"utf8":case"utf-8":return ie(this,t,i,l);case"ascii":case"latin1":case"binary":return h(this,t,i,l);case"base64":return m(this,t,i,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s(this,t,i,l);default:if(Q)throw new TypeError("Unknown encoding: "+A);A=(""+A).toLowerCase(),Q=!0}},P.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function a(t,i,l){return i===0&&l===t.length?C.fromByteArray(t):C.fromByteArray(t.slice(i,l))}function O(t,i,l){l=Math.min(t.length,l);const A=[];let D=i;for(;D239?4:Q>223?3:Q>191?2:1;if(D+De<=l){let We,Pe,Le,Fe;switch(De){case 1:Q<128&&(ae=Q);break;case 2:We=t[D+1],(We&192)===128&&(Fe=(Q&31)<<6|We&63,Fe>127&&(ae=Fe));break;case 3:We=t[D+1],Pe=t[D+2],(We&192)===128&&(Pe&192)===128&&(Fe=(Q&15)<<12|(We&63)<<6|Pe&63,Fe>2047&&(Fe<55296||Fe>57343)&&(ae=Fe));break;case 4:We=t[D+1],Pe=t[D+2],Le=t[D+3],(We&192)===128&&(Pe&192)===128&&(Le&192)===128&&(Fe=(Q&15)<<18|(We&63)<<12|(Pe&63)<<6|Le&63,Fe>65535&&Fe<1114112&&(ae=Fe))}}ae===null?(ae=65533,De=1):ae>65535&&(ae-=65536,A.push(ae>>>10&1023|55296),ae=56320|ae&1023),A.push(ae),D+=De}return ne(A)}const v=4096;function ne(t){const i=t.length;if(i<=v)return String.fromCharCode.apply(String,t);let l="",A=0;for(;AA)&&(l=A);let D="";for(let Q=i;Ql&&(t=l),i<0?(i+=l,i<0&&(i=0)):i>l&&(i=l),il)throw new RangeError("Trying to access beyond buffer length")}P.prototype.readUintLE=P.prototype.readUIntLE=function(t,i,l){t=t>>>0,i=i>>>0,l||fe(t,i,this.length);let A=this[t],D=1,Q=0;for(;++Q>>0,i=i>>>0,l||fe(t,i,this.length);let A=this[t+--i],D=1;for(;i>0&&(D*=256);)A+=this[t+--i]*D;return A},P.prototype.readUint8=P.prototype.readUInt8=function(t,i){return t=t>>>0,i||fe(t,1,this.length),this[t]},P.prototype.readUint16LE=P.prototype.readUInt16LE=function(t,i){return t=t>>>0,i||fe(t,2,this.length),this[t]|this[t+1]<<8},P.prototype.readUint16BE=P.prototype.readUInt16BE=function(t,i){return t=t>>>0,i||fe(t,2,this.length),this[t]<<8|this[t+1]},P.prototype.readUint32LE=P.prototype.readUInt32LE=function(t,i){return t=t>>>0,i||fe(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},P.prototype.readUint32BE=P.prototype.readUInt32BE=function(t,i){return t=t>>>0,i||fe(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},P.prototype.readBigUInt64LE=st(function(t){t=t>>>0,x(t,"offset");const i=this[t],l=this[t+7];(i===void 0||l===void 0)&&H(t,this.length-8);const A=i+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,D=this[++t]+this[++t]*2**8+this[++t]*2**16+l*2**24;return BigInt(A)+(BigInt(D)<>>0,x(t,"offset");const i=this[t],l=this[t+7];(i===void 0||l===void 0)&&H(t,this.length-8);const A=i*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],D=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+l;return(BigInt(A)<>>0,i=i>>>0,l||fe(t,i,this.length);let A=this[t],D=1,Q=0;for(;++Q=D&&(A-=Math.pow(2,8*i)),A},P.prototype.readIntBE=function(t,i,l){t=t>>>0,i=i>>>0,l||fe(t,i,this.length);let A=i,D=1,Q=this[t+--A];for(;A>0&&(D*=256);)Q+=this[t+--A]*D;return D*=128,Q>=D&&(Q-=Math.pow(2,8*i)),Q},P.prototype.readInt8=function(t,i){return t=t>>>0,i||fe(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},P.prototype.readInt16LE=function(t,i){t=t>>>0,i||fe(t,2,this.length);const l=this[t]|this[t+1]<<8;return l&32768?l|4294901760:l},P.prototype.readInt16BE=function(t,i){t=t>>>0,i||fe(t,2,this.length);const l=this[t+1]|this[t]<<8;return l&32768?l|4294901760:l},P.prototype.readInt32LE=function(t,i){return t=t>>>0,i||fe(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},P.prototype.readInt32BE=function(t,i){return t=t>>>0,i||fe(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},P.prototype.readBigInt64LE=st(function(t){t=t>>>0,x(t,"offset");const i=this[t],l=this[t+7];(i===void 0||l===void 0)&&H(t,this.length-8);const A=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(l<<24);return(BigInt(A)<>>0,x(t,"offset");const i=this[t],l=this[t+7];(i===void 0||l===void 0)&&H(t,this.length-8);const A=(i<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(A)<>>0,i||fe(t,4,this.length),E.read(this,t,!0,23,4)},P.prototype.readFloatBE=function(t,i){return t=t>>>0,i||fe(t,4,this.length),E.read(this,t,!1,23,4)},P.prototype.readDoubleLE=function(t,i){return t=t>>>0,i||fe(t,8,this.length),E.read(this,t,!0,52,8)},P.prototype.readDoubleBE=function(t,i){return t=t>>>0,i||fe(t,8,this.length),E.read(this,t,!1,52,8)};function pe(t,i,l,A,D,Q){if(!P.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>D||it.length)throw new RangeError("Index out of range")}P.prototype.writeUintLE=P.prototype.writeUIntLE=function(t,i,l,A){if(t=+t,i=i>>>0,l=l>>>0,!A){const ae=Math.pow(2,8*l)-1;pe(this,t,i,l,ae,0)}let D=1,Q=0;for(this[i]=t&255;++Q>>0,l=l>>>0,!A){const ae=Math.pow(2,8*l)-1;pe(this,t,i,l,ae,0)}let D=l-1,Q=1;for(this[i+D]=t&255;--D>=0&&(Q*=256);)this[i+D]=t/Q&255;return i+l},P.prototype.writeUint8=P.prototype.writeUInt8=function(t,i,l){return t=+t,i=i>>>0,l||pe(this,t,i,1,255,0),this[i]=t&255,i+1},P.prototype.writeUint16LE=P.prototype.writeUInt16LE=function(t,i,l){return t=+t,i=i>>>0,l||pe(this,t,i,2,65535,0),this[i]=t&255,this[i+1]=t>>>8,i+2},P.prototype.writeUint16BE=P.prototype.writeUInt16BE=function(t,i,l){return t=+t,i=i>>>0,l||pe(this,t,i,2,65535,0),this[i]=t>>>8,this[i+1]=t&255,i+2},P.prototype.writeUint32LE=P.prototype.writeUInt32LE=function(t,i,l){return t=+t,i=i>>>0,l||pe(this,t,i,4,4294967295,0),this[i+3]=t>>>24,this[i+2]=t>>>16,this[i+1]=t>>>8,this[i]=t&255,i+4},P.prototype.writeUint32BE=P.prototype.writeUInt32BE=function(t,i,l){return t=+t,i=i>>>0,l||pe(this,t,i,4,4294967295,0),this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=t&255,i+4};function Me(t,i,l,A,D){N(i,A,D,t,l,7);let Q=Number(i&BigInt(4294967295));t[l++]=Q,Q=Q>>8,t[l++]=Q,Q=Q>>8,t[l++]=Q,Q=Q>>8,t[l++]=Q;let ae=Number(i>>BigInt(32)&BigInt(4294967295));return t[l++]=ae,ae=ae>>8,t[l++]=ae,ae=ae>>8,t[l++]=ae,ae=ae>>8,t[l++]=ae,l}function Ue(t,i,l,A,D){N(i,A,D,t,l,7);let Q=Number(i&BigInt(4294967295));t[l+7]=Q,Q=Q>>8,t[l+6]=Q,Q=Q>>8,t[l+5]=Q,Q=Q>>8,t[l+4]=Q;let ae=Number(i>>BigInt(32)&BigInt(4294967295));return t[l+3]=ae,ae=ae>>8,t[l+2]=ae,ae=ae>>8,t[l+1]=ae,ae=ae>>8,t[l]=ae,l+8}P.prototype.writeBigUInt64LE=st(function(t,i=0){return Me(this,t,i,BigInt(0),BigInt("0xffffffffffffffff"))}),P.prototype.writeBigUInt64BE=st(function(t,i=0){return Ue(this,t,i,BigInt(0),BigInt("0xffffffffffffffff"))}),P.prototype.writeIntLE=function(t,i,l,A){if(t=+t,i=i>>>0,!A){const De=Math.pow(2,8*l-1);pe(this,t,i,l,De-1,-De)}let D=0,Q=1,ae=0;for(this[i]=t&255;++D>0)-ae&255;return i+l},P.prototype.writeIntBE=function(t,i,l,A){if(t=+t,i=i>>>0,!A){const De=Math.pow(2,8*l-1);pe(this,t,i,l,De-1,-De)}let D=l-1,Q=1,ae=0;for(this[i+D]=t&255;--D>=0&&(Q*=256);)t<0&&ae===0&&this[i+D+1]!==0&&(ae=1),this[i+D]=(t/Q>>0)-ae&255;return i+l},P.prototype.writeInt8=function(t,i,l){return t=+t,i=i>>>0,l||pe(this,t,i,1,127,-128),t<0&&(t=255+t+1),this[i]=t&255,i+1},P.prototype.writeInt16LE=function(t,i,l){return t=+t,i=i>>>0,l||pe(this,t,i,2,32767,-32768),this[i]=t&255,this[i+1]=t>>>8,i+2},P.prototype.writeInt16BE=function(t,i,l){return t=+t,i=i>>>0,l||pe(this,t,i,2,32767,-32768),this[i]=t>>>8,this[i+1]=t&255,i+2},P.prototype.writeInt32LE=function(t,i,l){return t=+t,i=i>>>0,l||pe(this,t,i,4,2147483647,-2147483648),this[i]=t&255,this[i+1]=t>>>8,this[i+2]=t>>>16,this[i+3]=t>>>24,i+4},P.prototype.writeInt32BE=function(t,i,l){return t=+t,i=i>>>0,l||pe(this,t,i,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=t&255,i+4},P.prototype.writeBigInt64LE=st(function(t,i=0){return Me(this,t,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),P.prototype.writeBigInt64BE=st(function(t,i=0){return Ue(this,t,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function He(t,i,l,A,D,Q){if(l+A>t.length)throw new RangeError("Index out of range");if(l<0)throw new RangeError("Index out of range")}function je(t,i,l,A,D){return i=+i,l=l>>>0,D||He(t,i,l,4),E.write(t,i,l,A,23,4),l+4}P.prototype.writeFloatLE=function(t,i,l){return je(this,t,i,!0,l)},P.prototype.writeFloatBE=function(t,i,l){return je(this,t,i,!1,l)};function Ie(t,i,l,A,D){return i=+i,l=l>>>0,D||He(t,i,l,8),E.write(t,i,l,A,52,8),l+8}P.prototype.writeDoubleLE=function(t,i,l){return Ie(this,t,i,!0,l)},P.prototype.writeDoubleBE=function(t,i,l){return Ie(this,t,i,!1,l)},P.prototype.copy=function(t,i,l,A){if(!P.isBuffer(t))throw new TypeError("argument should be a Buffer");if(l||(l=0),!A&&A!==0&&(A=this.length),i>=t.length&&(i=t.length),i||(i=0),A>0&&A=this.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("sourceEnd out of bounds");A>this.length&&(A=this.length),t.length-i>>0,l=l===void 0?this.length:l>>>0,t||(t=0);let D;if(typeof t=="number")for(D=i;D2**32?D=n(String(l)):typeof l=="bigint"&&(D=String(l),(l>BigInt(2)**BigInt(32)||l<-(BigInt(2)**BigInt(32)))&&(D=n(D)),D+="n"),A+=` It must be ${i}. Received ${D}`,A},RangeError);function n(t){let i="",l=t.length;const A=t[0]==="-"?1:0;for(;l>=A+4;l-=3)i=`_${t.slice(l-3,l)}${i}`;return`${t.slice(0,l)}${i}`}function c(t,i,l){x(i,"offset"),(t[i]===void 0||t[i+l]===void 0)&&H(i,t.length-(l+1))}function N(t,i,l,A,D,Q){if(t>l||t= 0${ae} and < 2${ae} ** ${(Q+1)*8}${ae}`:De=`>= -(2${ae} ** ${(Q+1)*8-1}${ae}) and < 2 ** ${(Q+1)*8-1}${ae}`,new Qe.ERR_OUT_OF_RANGE("value",De,t)}c(A,D,Q)}function x(t,i){if(typeof t!="number")throw new Qe.ERR_INVALID_ARG_TYPE(i,"number",t)}function H(t,i,l){throw Math.floor(t)!==t?(x(t,l),new Qe.ERR_OUT_OF_RANGE("offset","an integer",t)):i<0?new Qe.ERR_BUFFER_OUT_OF_BOUNDS:new Qe.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${i}`,t)}const oe=/[^+/0-9A-Za-z-_]/g;function Re(t){if(t=t.split("=")[0],t=t.trim().replace(oe,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function ke(t,i){i=i||1/0;let l;const A=t.length;let D=null;const Q=[];for(let ae=0;ae55295&&l<57344){if(!D){if(l>56319){(i-=3)>-1&&Q.push(239,191,189);continue}else if(ae+1===A){(i-=3)>-1&&Q.push(239,191,189);continue}D=l;continue}if(l<56320){(i-=3)>-1&&Q.push(239,191,189),D=l;continue}l=(D-55296<<10|l-56320)+65536}else D&&(i-=3)>-1&&Q.push(239,191,189);if(D=null,l<128){if((i-=1)<0)break;Q.push(l)}else if(l<2048){if((i-=2)<0)break;Q.push(l>>6|192,l&63|128)}else if(l<65536){if((i-=3)<0)break;Q.push(l>>12|224,l>>6&63|128,l&63|128)}else if(l<1114112){if((i-=4)<0)break;Q.push(l>>18|240,l>>12&63|128,l>>6&63|128,l&63|128)}else throw new Error("Invalid code point")}return Q}function Ne(t){const i=[];for(let l=0;l>8,D=l%256,Q.push(D),Q.push(A);return Q}function xe(t){return C.toByteArray(Re(t))}function at(t,i,l,A){let D;for(D=0;D=i.length||D>=t.length);++D)i[D+l]=t[D];return D}function Ke(t,i){return t instanceof i||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===i.name}function Ot(t){return t!==t}const Xt=(function(){const t="0123456789abcdef",i=new Array(256);for(let l=0;l<16;++l){const A=l*16;for(let D=0;D<16;++D)i[A+D]=t[l]+t[D]}return i})();function st(t){return typeof BigInt>"u"?Kt:t}function Kt(){throw new Error("BigInt not supported")}})(o);const _=o.Buffer;r.Blob=o.Blob,r.BlobOptions=o.BlobOptions,r.Buffer=o.Buffer,r.File=o.File,r.FileOptions=o.FileOptions,r.INSPECT_MAX_BYTES=o.INSPECT_MAX_BYTES,r.SlowBuffer=o.SlowBuffer,r.TranscodeEncoding=o.TranscodeEncoding,r.atob=o.atob,r.btoa=o.btoa,r.constants=o.constants,r.default=_,r.isAscii=o.isAscii,r.isUtf8=o.isUtf8,r.kMaxLength=o.kMaxLength,r.kStringMaxLength=o.kStringMaxLength,r.resolveObjectURL=o.resolveObjectURL,r.transcode=o.transcode})(pi)),pi}var di={},gi={},yi,mi;function Da(){return mi||(mi=1,yi=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},o=Symbol("test"),f=Object(o);if(typeof o=="string"||Object.prototype.toString.call(o)!=="[object Symbol]"||Object.prototype.toString.call(f)!=="[object Symbol]")return!1;var g=42;r[o]=g;for(var R in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var y=Object.getOwnPropertySymbols(r);if(y.length!==1||y[0]!==o||!Object.prototype.propertyIsEnumerable.call(r,o))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var T=Object.getOwnPropertyDescriptor(r,o);if(T.value!==g||T.enumerable!==!0)return!1}return!0}),yi}var Ar,bi;function cr(){if(bi)return Ar;bi=1;var r=Da();return Ar=function(){return r()&&!!Symbol.toStringTag},Ar}var Ei,vi;function Ma(){return vi||(vi=1,Ei=Object),Ei}var wi,Ti;function Qs(){return Ti||(Ti=1,wi=Error),wi}var _i,Si;function Zs(){return Si||(Si=1,_i=EvalError),_i}var Ai,Oi;function Js(){return Oi||(Oi=1,Ai=RangeError),Ai}var Ri,Ii;function eu(){return Ii||(Ii=1,Ri=ReferenceError),Ri}var Ni,Li;function ja(){return Li||(Li=1,Ni=SyntaxError),Ni}var Bi,Ci;function Yt(){return Ci||(Ci=1,Bi=TypeError),Bi}var Pi,xi;function tu(){return xi||(xi=1,Pi=URIError),Pi}var Di,Mi;function ru(){return Mi||(Mi=1,Di=Math.abs),Di}var ji,ki;function nu(){return ki||(ki=1,ji=Math.floor),ji}var Fi,Ui;function iu(){return Ui||(Ui=1,Fi=Math.max),Fi}var qi,Gi;function ou(){return Gi||(Gi=1,qi=Math.min),qi}var $i,Wi;function au(){return Wi||(Wi=1,$i=Math.pow),$i}var Vi,Yi;function su(){return Yi||(Yi=1,Vi=Math.round),Vi}var zi,Hi;function uu(){return Hi||(Hi=1,zi=Number.isNaN||function(r){return r!==r}),zi}var Or,Xi;function cu(){if(Xi)return Or;Xi=1;var r=uu();return Or=function(o){return r(o)||o===0?o:o<0?-1:1},Or}var Ki,Qi;function lu(){return Qi||(Qi=1,Ki=Object.getOwnPropertyDescriptor),Ki}var Rr,Zi;function Mt(){if(Zi)return Rr;Zi=1;var r=lu();if(r)try{r([],"length")}catch{r=null}return Rr=r,Rr}var Ir,Ji;function lr(){if(Ji)return Ir;Ji=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return Ir=r,Ir}var Nr,eo;function fu(){if(eo)return Nr;eo=1;var r=typeof Symbol<"u"&&Symbol,o=Da();return Nr=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:o()},Nr}var to,ro;function ka(){return ro||(ro=1,to=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),to}var Lr,no;function Fa(){if(no)return Lr;no=1;var r=Ma();return Lr=r.getPrototypeOf||null,Lr}var Br,io;function pu(){if(io)return Br;io=1;var r="Function.prototype.bind called on incompatible ",o=Object.prototype.toString,f=Math.max,g="[object Function]",R=function(b,d){for(var M=[],u=0;u"u"||!Y?r:Y(Uint8Array),me={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":k&&Y?Y([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":P,"%AsyncGenerator%":P,"%AsyncGeneratorFunction%":P,"%AsyncIteratorPrototype%":P,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":f,"%eval%":eval,"%EvalError%":g,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":J,"%GeneratorFunction%":P,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":k&&Y?Y(Y([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!k||!Y?r:Y(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":S,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":R,"%ReferenceError%":y,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!k||!Y?r:Y(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":k&&Y?Y(""[Symbol.iterator]()):r,"%Symbol%":k?Symbol:r,"%SyntaxError%":T,"%ThrowTypeError%":B,"%TypedArray%":ge,"%TypeError%":b,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":d,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":ue,"%Function.prototype.apply%":w,"%Object.defineProperty%":C,"%Object.getPrototypeOf%":G,"%Math.abs%":M,"%Math.floor%":u,"%Math.max%":L,"%Math.min%":j,"%Math.pow%":ee,"%Math.round%":X,"%Math.sign%":q,"%Reflect.getPrototypeOf%":re};if(Y)try{null.error}catch(te){var Se=Y(Y(te));me["%Error.prototype%"]=Se}var Te=function te(ie){var h;if(ie==="%AsyncFunction%")h=_("async function () {}");else if(ie==="%GeneratorFunction%")h=_("function* () {}");else if(ie==="%AsyncGeneratorFunction%")h=_("async function* () {}");else if(ie==="%AsyncGenerator%"){var m=te("%AsyncGeneratorFunction%");m&&(h=m.prototype)}else if(ie==="%AsyncIteratorPrototype%"){var s=te("%AsyncGenerator%");s&&Y&&(h=Y(s.prototype))}return me[ie]=h,h},he={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Oe=zt(),Be=qa(),Ee=Oe.call(ue,Array.prototype.concat),$e=Oe.call(w,Array.prototype.splice),le=Oe.call(ue,String.prototype.replace),F=Oe.call(ue,String.prototype.slice),V=Oe.call(ue,RegExp.prototype.exec),z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,I=/\\(\\)?/g,U=function(te){var ie=F(te,0,1),h=F(te,-1);if(ie==="%"&&h!=="%")throw new T("invalid intrinsic syntax, expected closing `%`");if(h==="%"&&ie!=="%")throw new T("invalid intrinsic syntax, expected opening `%`");var m=[];return le(te,z,function(s,a,O,v){m[m.length]=O?le(v,I,"$1"):a||s}),m},K=function(te,ie){var h=te,m;if(Be(he,h)&&(m=he[h],h="%"+m[0]+"%"),Be(me,h)){var s=me[h];if(s===P&&(s=Te(h)),typeof s>"u"&&!ie)throw new b("intrinsic "+te+" exists, but is not available. Please file an issue!");return{alias:m,name:h,value:s}}throw new T("intrinsic "+te+" does not exist!")};return kr=function(te,ie){if(typeof te!="string"||te.length===0)throw new b("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ie!="boolean")throw new b('"allowMissing" argument must be a boolean');if(V(/^%?[^%]*%?$/,te)===null)throw new T("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var h=U(te),m=h.length>0?h[0]:"",s=K("%"+m+"%",ie),a=s.name,O=s.value,v=!1,ne=s.alias;ne&&(m=ne[0],$e(h,Ee([0,1],ne)));for(var be=1,$=!0;be=h.length){var pe=S(O,ye);$=!!pe,$&&"get"in pe&&!("originalValue"in pe.get)?O=pe.get:O=O[ye]}else $=Be(O,ye),O=O[ye];$&&!v&&(me[a]=O)}}return O},kr}var Fr,Eo;function Ht(){if(Eo)return Fr;Eo=1;var r=Ga(),o=Pn(),f=o([r("%String.prototype.indexOf%")]);return Fr=function(g,R){var y=r(g,!!R);return typeof y=="function"&&f(g,".prototype.")>-1?o([y]):y},Fr}var Ur,vo;function gu(){if(vo)return Ur;vo=1;var r=cr()(),o=Ht(),f=o("Object.prototype.toString"),g=function(T){return r&&T&&typeof T=="object"&&Symbol.toStringTag in T?!1:f(T)==="[object Arguments]"},R=function(T){return g(T)?!0:T!==null&&typeof T=="object"&&"length"in T&&typeof T.length=="number"&&T.length>=0&&f(T)!=="[object Array]"&&"callee"in T&&f(T.callee)==="[object Function]"},y=(function(){return g(arguments)})();return g.isLegacyArguments=R,Ur=y?g:R,Ur}var qr,wo;function yu(){if(wo)return qr;wo=1;var r=Ht(),o=cr()(),f=qa(),g=Mt(),R;if(o){var y=r("RegExp.prototype.exec"),T={},b=function(){throw T},d={toString:b,valueOf:b};typeof Symbol.toPrimitive=="symbol"&&(d[Symbol.toPrimitive]=b),R=function(L){if(!L||typeof L!="object")return!1;var j=g(L,"lastIndex"),ee=j&&f(j,"value");if(!ee)return!1;try{y(L,d)}catch(X){return X===T}}}else{var M=r("Object.prototype.toString"),u="[object RegExp]";R=function(L){return!L||typeof L!="object"&&typeof L!="function"?!1:M(L)===u}}return qr=R,qr}var Gr,To;function mu(){if(To)return Gr;To=1;var r=Ht(),o=yu(),f=r("RegExp.prototype.exec"),g=Yt();return Gr=function(R){if(!o(R))throw new g("`regex` must be a RegExp");return function(y){return f(R,y)!==null}},Gr}var $r,_o;function bu(){if(_o)return $r;_o=1;const r=function*(){}.constructor;return $r=()=>r,$r}var Wr,So;function Eu(){if(So)return Wr;So=1;var r=Ht(),o=mu(),f=o(/^\s*(?:function)?\*/),g=cr()(),R=xn(),y=r("Object.prototype.toString"),T=r("Function.prototype.toString"),b=bu();return Wr=function(d){if(typeof d!="function")return!1;if(f(T(d)))return!0;if(!g){var M=y(d);return M==="[object GeneratorFunction]"}if(!R)return!1;var u=b();return u&&R(d)===u.prototype},Wr}var Vr,Ao;function vu(){if(Ao)return Vr;Ao=1;var r=Function.prototype.toString,o=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,f,g;if(typeof o=="function"&&typeof Object.defineProperty=="function")try{f=Object.defineProperty({},"length",{get:function(){throw g}}),g={},o(function(){throw 42},null,f)}catch(S){S!==g&&(o=null)}else o=null;var R=/^\s*class\b/,y=function(S){try{var C=r.call(S);return R.test(C)}catch{return!1}},T=function(S){try{return y(S)?!1:(r.call(S),!0)}catch{return!1}},b=Object.prototype.toString,d="[object Object]",M="[object Function]",u="[object GeneratorFunction]",L="[object HTMLAllCollection]",j="[object HTML document.all class]",ee="[object HTMLCollection]",X=typeof Symbol=="function"&&!!Symbol.toStringTag,q=!(0 in[,]),J=function(){return!1};if(typeof document=="object"){var _=document.all;b.call(_)===b.call(document.all)&&(J=function(S){if((q||!S)&&(typeof S>"u"||typeof S=="object"))try{var C=b.call(S);return(C===L||C===j||C===ee||C===d)&&S("")==null}catch{}return!1})}return Vr=o?function(S){if(J(S))return!0;if(!S||typeof S!="function"&&typeof S!="object")return!1;try{o(S,null,f)}catch(C){if(C!==g)return!1}return!y(S)&&T(S)}:function(S){if(J(S))return!0;if(!S||typeof S!="function"&&typeof S!="object")return!1;if(X)return T(S);if(y(S))return!1;var C=b.call(S);return C!==M&&C!==u&&!/^\[object HTML/.test(C)?!1:T(S)},Vr}var Yr,Oo;function wu(){if(Oo)return Yr;Oo=1;var r=vu(),o=Object.prototype.toString,f=Object.prototype.hasOwnProperty,g=function(b,d,M){for(var u=0,L=b.length;u=3&&(u=M),T(b)?g(b,d,u):typeof b=="string"?R(b,d,u):y(b,d,u)},Yr}var Ro,Io;function Tu(){return Io||(Io=1,Ro=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Ro}var zr,No;function _u(){if(No)return zr;No=1;var r=Tu(),o=typeof globalThis>"u"?Et:globalThis;return zr=function(){for(var f=[],g=0;g3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new f("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new f("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new f("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new f("`loose`, if provided, must be a boolean");var b=arguments.length>3?arguments[3]:null,d=arguments.length>4?arguments[4]:null,M=arguments.length>5?arguments[5]:null,u=arguments.length>6?arguments[6]:!1,L=!!g&&g(R,y);if(r)r(R,y,{configurable:M===null&&L?L.configurable:!M,enumerable:b===null&&L?L.enumerable:!b,value:T,writable:d===null&&L?L.writable:!d});else if(u||!b&&!d&&!M)R[y]=T;else throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Hr}var Xr,Co;function Au(){if(Co)return Xr;Co=1;var r=lr(),o=function(){return!!r};return o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return r([],"length",{value:1}).length!==1}catch{return!0}},Xr=o,Xr}var Kr,Po;function Ou(){if(Po)return Kr;Po=1;var r=Ga(),o=Su(),f=Au()(),g=Mt(),R=Yt(),y=r("%Math.floor%");return Kr=function(T,b){if(typeof T!="function")throw new R("`fn` is not a function");if(typeof b!="number"||b<0||b>4294967295||y(b)!==b)throw new R("`length` must be a positive 32-bit integer");var d=arguments.length>2&&!!arguments[2],M=!0,u=!0;if("length"in T&&g){var L=g(T,"length");L&&!L.configurable&&(M=!1),L&&!L.writable&&(u=!1)}return(M||u||!d)&&(f?o(T,"length",b,!0,!0):o(T,"length",b)),T},Kr}var Qr,xo;function Ru(){if(xo)return Qr;xo=1;var r=zt(),o=Cn(),f=Ua();return Qr=function(){return f(r,o,arguments)},Qr}var Do;function Iu(){return Do||(Do=1,(function(r){var o=Ou(),f=lr(),g=Pn(),R=Ru();r.exports=function(y){var T=g(arguments),b=1+y.length-(arguments.length-1);return o(T,b>0?b:0,!0)},f?f(r.exports,"apply",{value:R}):r.exports.apply=R})(Lo)),Lo.exports}var Zr,Mo;function $a(){if(Mo)return Zr;Mo=1;var r=wu(),o=_u(),f=Iu(),g=Ht(),R=Mt(),y=xn(),T=g("Object.prototype.toString"),b=cr()(),d=typeof globalThis>"u"?Et:globalThis,M=o(),u=g("String.prototype.slice"),L=g("Array.prototype.indexOf",!0)||function(_,S){for(var C=0;C<_.length;C+=1)if(_[C]===S)return C;return-1},j={__proto__:null};b&&R&&y?r(M,function(_){var S=new d[_];if(Symbol.toStringTag in S&&y){var C=y(S),E=R(C,Symbol.toStringTag);if(!E&&C){var B=y(C);E=R(B,Symbol.toStringTag)}if(E&&E.get){var k=f(E.get);j["$"+_]=k}}}):r(M,function(_){var S=new d[_],C=S.slice||S.set;if(C){var E=f(C);j["$"+_]=E}});function ee(_){var S=!1;return r(j,function(C,E){if(!S)try{"$"+C(_)===E&&(S=u(E,1))}catch{}}),S}function X(_){var S=!1;return r(j,function(C,E){if(!S)try{C(_),S=u(E,1)}catch{}}),S}function q(_){return L(M,_)>-1}function J(_){if(!_||typeof _!="object")return!1;if(!b){var S=u(T(_),8,-1);return q(S)?S:S!=="Object"?!1:X(_)}return R?ee(_):null}return Zr=J,Zr}var Jr,jo;function Nu(){if(jo)return Jr;jo=1;var r=$a();return Jr=function(o){return!!r(o)},Jr}var ko;function Lu(){return ko||(ko=1,(function(r){var o=gu(),f=Eu(),g=$a(),R=Nu();function y($){return $.call.bind($)}var T=typeof BigInt<"u",b=typeof Symbol<"u",d=y(Object.prototype.toString),M=y(Number.prototype.valueOf),u=y(String.prototype.valueOf),L=y(Boolean.prototype.valueOf);if(T)var j=y(BigInt.prototype.valueOf);if(b)var ee=y(Symbol.prototype.valueOf);function X($,ye){if(typeof $!="object")return!1;try{return ye($),!0}catch{return!1}}r.isArgumentsObject=o,r.isGeneratorFunction=f,r.isTypedArray=R;function q($){return typeof Promise<"u"&&$ instanceof Promise||$!==null&&typeof $=="object"&&typeof $.then=="function"&&typeof $.catch=="function"}r.isPromise=q;function J($){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView($):R($)||F($)}r.isArrayBufferView=J;function _($){return g($)==="Uint8Array"}r.isUint8Array=_;function S($){return g($)==="Uint8ClampedArray"}r.isUint8ClampedArray=S;function C($){return g($)==="Uint16Array"}r.isUint16Array=C;function E($){return g($)==="Uint32Array"}r.isUint32Array=E;function B($){return g($)==="Int8Array"}r.isInt8Array=B;function k($){return g($)==="Int16Array"}r.isInt16Array=k;function Y($){return g($)==="Int32Array"}r.isInt32Array=Y;function G($){return g($)==="Float32Array"}r.isFloat32Array=G;function re($){return g($)==="Float64Array"}r.isFloat64Array=re;function w($){return g($)==="BigInt64Array"}r.isBigInt64Array=w;function ue($){return g($)==="BigUint64Array"}r.isBigUint64Array=ue;function P($){return d($)==="[object Map]"}P.working=typeof Map<"u"&&P(new Map);function ge($){return typeof Map>"u"?!1:P.working?P($):$ instanceof Map}r.isMap=ge;function me($){return d($)==="[object Set]"}me.working=typeof Set<"u"&&me(new Set);function Se($){return typeof Set>"u"?!1:me.working?me($):$ instanceof Set}r.isSet=Se;function Te($){return d($)==="[object WeakMap]"}Te.working=typeof WeakMap<"u"&&Te(new WeakMap);function he($){return typeof WeakMap>"u"?!1:Te.working?Te($):$ instanceof WeakMap}r.isWeakMap=he;function Oe($){return d($)==="[object WeakSet]"}Oe.working=typeof WeakSet<"u"&&Oe(new WeakSet);function Be($){return Oe($)}r.isWeakSet=Be;function Ee($){return d($)==="[object ArrayBuffer]"}Ee.working=typeof ArrayBuffer<"u"&&Ee(new ArrayBuffer);function $e($){return typeof ArrayBuffer>"u"?!1:Ee.working?Ee($):$ instanceof ArrayBuffer}r.isArrayBuffer=$e;function le($){return d($)==="[object DataView]"}le.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&le(new DataView(new ArrayBuffer(1),0,1));function F($){return typeof DataView>"u"?!1:le.working?le($):$ instanceof DataView}r.isDataView=F;var V=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function z($){return d($)==="[object SharedArrayBuffer]"}function I($){return typeof V>"u"?!1:(typeof z.working>"u"&&(z.working=z(new V)),z.working?z($):$ instanceof V)}r.isSharedArrayBuffer=I;function U($){return d($)==="[object AsyncFunction]"}r.isAsyncFunction=U;function K($){return d($)==="[object Map Iterator]"}r.isMapIterator=K;function te($){return d($)==="[object Set Iterator]"}r.isSetIterator=te;function ie($){return d($)==="[object Generator]"}r.isGeneratorObject=ie;function h($){return d($)==="[object WebAssembly.Module]"}r.isWebAssemblyCompiledModule=h;function m($){return X($,M)}r.isNumberObject=m;function s($){return X($,u)}r.isStringObject=s;function a($){return X($,L)}r.isBooleanObject=a;function O($){return T&&X($,j)}r.isBigIntObject=O;function v($){return b&&X($,ee)}r.isSymbolObject=v;function ne($){return m($)||s($)||a($)||O($)||v($)}r.isBoxedPrimitive=ne;function be($){return typeof Uint8Array<"u"&&($e($)||I($))}r.isAnyArrayBuffer=be,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function($){Object.defineProperty(r,$,{enumerable:!1,value:function(){throw new Error($+" is not supported in userland")}})})})(gi)),gi}var Fo,Uo;function Bu(){return Uo||(Uo=1,Fo=function(r){return r&&typeof r=="object"&&typeof r.copy=="function"&&typeof r.fill=="function"&&typeof r.readUInt8=="function"}),Fo}var qo;function Wa(){return qo||(qo=1,(function(r){var o={},f=Object.getOwnPropertyDescriptors||function(F){for(var V=Object.keys(F),z={},I=0;I=U)return h;switch(h){case"%s":return String(I[z++]);case"%d":return Number(I[z++]);case"%j":try{return JSON.stringify(I[z++])}catch{return"[Circular]"}default:return h}}),te=I[z];z"u")return function(){return r.deprecate(F,V).apply(this,arguments)};var z=!1;function I(){if(!z){if(ve.throwDeprecation)throw new Error(V);ve.traceDeprecation?console.trace(V):console.error(V),z=!0}return F.apply(this,arguments)}return I};var R={},y=/^$/;if(o.NODE_DEBUG){var T=o.NODE_DEBUG;T=T.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),y=new RegExp("^"+T+"$","i")}r.debuglog=function(F){if(F=F.toUpperCase(),!R[F])if(y.test(F)){var V=ve.pid;R[F]=function(){var z=r.format.apply(r,arguments);console.error("%s %d: %s",F,V,z)}}else R[F]=function(){};return R[F]};function b(F,V){var z={seen:[],stylize:M};return arguments.length>=3&&(z.depth=arguments[2]),arguments.length>=4&&(z.colors=arguments[3]),S(V)?z.showHidden=V:V&&r._extend(z,V),G(z.showHidden)&&(z.showHidden=!1),G(z.depth)&&(z.depth=2),G(z.colors)&&(z.colors=!1),G(z.customInspect)&&(z.customInspect=!0),z.colors&&(z.stylize=d),L(z,F,z.depth)}r.inspect=b,b.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},b.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function d(F,V){var z=b.styles[V];return z?"\x1B["+b.colors[z][0]+"m"+F+"\x1B["+b.colors[z][1]+"m":F}function M(F,V){return F}function u(F){var V={};return F.forEach(function(z,I){V[z]=!0}),V}function L(F,V,z){if(F.customInspect&&V&&ge(V.inspect)&&V.inspect!==r.inspect&&!(V.constructor&&V.constructor.prototype===V)){var I=V.inspect(z,F);return k(I)||(I=L(F,I,z)),I}var U=j(F,V);if(U)return U;var K=Object.keys(V),te=u(K);if(F.showHidden&&(K=Object.getOwnPropertyNames(V)),P(V)&&(K.indexOf("message")>=0||K.indexOf("description")>=0))return ee(V);if(K.length===0){if(ge(V)){var ie=V.name?": "+V.name:"";return F.stylize("[Function"+ie+"]","special")}if(re(V))return F.stylize(RegExp.prototype.toString.call(V),"regexp");if(ue(V))return F.stylize(Date.prototype.toString.call(V),"date");if(P(V))return ee(V)}var h="",m=!1,s=["{","}"];if(_(V)&&(m=!0,s=["[","]"]),ge(V)){var a=V.name?": "+V.name:"";h=" [Function"+a+"]"}if(re(V)&&(h=" "+RegExp.prototype.toString.call(V)),ue(V)&&(h=" "+Date.prototype.toUTCString.call(V)),P(V)&&(h=" "+ee(V)),K.length===0&&(!m||V.length==0))return s[0]+h+s[1];if(z<0)return re(V)?F.stylize(RegExp.prototype.toString.call(V),"regexp"):F.stylize("[Object]","special");F.seen.push(V);var O;return m?O=X(F,V,z,te,K):O=K.map(function(v){return q(F,V,z,te,v,m)}),F.seen.pop(),J(O,h,s)}function j(F,V){if(G(V))return F.stylize("undefined","undefined");if(k(V)){var z="'"+JSON.stringify(V).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return F.stylize(z,"string")}if(B(V))return F.stylize(""+V,"number");if(S(V))return F.stylize(""+V,"boolean");if(C(V))return F.stylize("null","null")}function ee(F){return"["+Error.prototype.toString.call(F)+"]"}function X(F,V,z,I,U){for(var K=[],te=0,ie=V.length;te-1&&(K?ie=ie.split(` `).map(function(m){return" "+m}).join(` `).slice(2):ie=` `+ie.split(` `).map(function(m){return" "+m}).join(` `))):ie=F.stylize("[Circular]","special")),G(te)){if(K&&U.match(/^\d+$/))return ie;te=JSON.stringify(""+U),te.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(te=te.slice(1,-1),te=F.stylize(te,"name")):(te=te.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),te=F.stylize(te,"string"))}return te+": "+ie}function J(F,V,z){var I=F.reduce(function(U,K){return K.indexOf(` `)>=0,U+K.replace(/\u001b\[\d\d?m/g,"").length+1},0);return I>60?z[0]+(V===""?"":V+` `)+" "+F.join(`, `)+" "+z[1]:z[0]+V+" "+F.join(", ")+" "+z[1]}r.types=Lu();function _(F){return Array.isArray(F)}r.isArray=_;function S(F){return typeof F=="boolean"}r.isBoolean=S;function C(F){return F===null}r.isNull=C;function E(F){return F==null}r.isNullOrUndefined=E;function B(F){return typeof F=="number"}r.isNumber=B;function k(F){return typeof F=="string"}r.isString=k;function Y(F){return typeof F=="symbol"}r.isSymbol=Y;function G(F){return F===void 0}r.isUndefined=G;function re(F){return w(F)&&Se(F)==="[object RegExp]"}r.isRegExp=re,r.types.isRegExp=re;function w(F){return typeof F=="object"&&F!==null}r.isObject=w;function ue(F){return w(F)&&Se(F)==="[object Date]"}r.isDate=ue,r.types.isDate=ue;function P(F){return w(F)&&(Se(F)==="[object Error]"||F instanceof Error)}r.isError=P,r.types.isNativeError=P;function ge(F){return typeof F=="function"}r.isFunction=ge;function me(F){return F===null||typeof F=="boolean"||typeof F=="number"||typeof F=="string"||typeof F=="symbol"||typeof F>"u"}r.isPrimitive=me,r.isBuffer=Bu();function Se(F){return Object.prototype.toString.call(F)}function Te(F){return F<10?"0"+F.toString(10):F.toString(10)}var he=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Oe(){var F=new Date,V=[Te(F.getHours()),Te(F.getMinutes()),Te(F.getSeconds())].join(":");return[F.getDate(),he[F.getMonth()],V].join(" ")}r.log=function(){console.log("%s - %s",Oe(),r.format.apply(r,arguments))},r.inherits=At(),r._extend=function(F,V){if(!V||!w(V))return F;for(var z=Object.keys(V),I=z.length;I--;)F[z[I]]=V[z[I]];return F};function Be(F,V){return Object.prototype.hasOwnProperty.call(F,V)}var Ee=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;r.promisify=function(F){if(typeof F!="function")throw new TypeError('The "original" argument must be of type Function');if(Ee&&F[Ee]){var V=F[Ee];if(typeof V!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(V,Ee,{value:V,enumerable:!1,writable:!1,configurable:!0}),V}function V(){for(var z,I,U=new Promise(function(ie,h){z=ie,I=h}),K=[],te=0;te0?this.tail.next=J:this.head=J,this.tail=J,++this.length}},{key:"unshift",value:function(q){var J={data:q,next:this.head};this.length===0&&(this.tail=J),this.head=J,++this.length}},{key:"shift",value:function(){if(this.length!==0){var q=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,q}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(q){if(this.length===0)return"";for(var J=this.head,_=""+J.data;J=J.next;)_+=q+J.data;return _}},{key:"concat",value:function(q){if(this.length===0)return M.alloc(0);for(var J=M.allocUnsafe(q>>>0),_=this.head,S=0;_;)ee(_.data,J,S),S+=_.data.length,_=_.next;return J}},{key:"consume",value:function(q,J){var _;return qC.length?C.length:q;if(E===C.length?S+=C:S+=C.slice(0,q),q-=E,q===0){E===C.length?(++_,J.next?this.head=J.next:this.head=this.tail=null):(this.head=J,J.data=C.slice(E));break}++_}return this.length-=_,S}},{key:"_getBuffer",value:function(q){var J=M.allocUnsafe(q),_=this.head,S=1;for(_.data.copy(J),q-=_.data.length;_=_.next;){var C=_.data,E=q>C.length?C.length:q;if(C.copy(J,J.length-q,0,E),q-=E,q===0){E===C.length?(++S,_.next?this.head=_.next:this.head=this.tail=null):(this.head=_,_.data=C.slice(E));break}++S}return this.length-=S,J}},{key:j,value:function(q,J){return L(this,o(o({},J),{},{depth:0,customInspect:!1}))}}]),X})(),en}var tn,$o;function Va(){if($o)return tn;$o=1;function r(T,b){var d=this,M=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return M||u?(b?b(T):T&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,ve.nextTick(R,this,T)):ve.nextTick(R,this,T)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(T||null,function(L){!b&&L?d._writableState?d._writableState.errorEmitted?ve.nextTick(f,d):(d._writableState.errorEmitted=!0,ve.nextTick(o,d,L)):ve.nextTick(o,d,L):b?(ve.nextTick(f,d),b(L)):ve.nextTick(f,d)}),this)}function o(T,b){R(T,b),f(T)}function f(T){T._writableState&&!T._writableState.emitClose||T._readableState&&!T._readableState.emitClose||T.emit("close")}function g(){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)}function R(T,b){T.emit("error",b)}function y(T,b){var d=T._readableState,M=T._writableState;d&&d.autoDestroy||M&&M.autoDestroy?T.destroy(b):T.emit("error",b)}return tn={destroy:r,undestroy:g,errorOrDestroy:y},tn}var rn={},Wo;function jt(){if(Wo)return rn;Wo=1;function r(b,d){b.prototype=Object.create(d.prototype),b.prototype.constructor=b,b.__proto__=d}var o={};function f(b,d,M){M||(M=Error);function u(j,ee,X){return typeof d=="string"?d:d(j,ee,X)}var L=(function(j){r(ee,j);function ee(X,q,J){return j.call(this,u(X,q,J))||this}return ee})(M);L.prototype.name=M.name,L.prototype.code=b,o[b]=L}function g(b,d){if(Array.isArray(b)){var M=b.length;return b=b.map(function(u){return String(u)}),M>2?"one of ".concat(d," ").concat(b.slice(0,M-1).join(", "),", or ")+b[M-1]:M===2?"one of ".concat(d," ").concat(b[0]," or ").concat(b[1]):"of ".concat(d," ").concat(b[0])}else return"of ".concat(d," ").concat(String(b))}function R(b,d,M){return b.substr(0,d.length)===d}function y(b,d,M){return(M===void 0||M>b.length)&&(M=b.length),b.substring(M-d.length,M)===d}function T(b,d,M){return typeof M!="number"&&(M=0),M+d.length>b.length?!1:b.indexOf(d,M)!==-1}return f("ERR_INVALID_OPT_VALUE",function(b,d){return'The value "'+d+'" is invalid for option "'+b+'"'},TypeError),f("ERR_INVALID_ARG_TYPE",function(b,d,M){var u;typeof d=="string"&&R(d,"not ")?(u="must not be",d=d.replace(/^not /,"")):u="must be";var L;if(y(b," argument"))L="The ".concat(b," ").concat(u," ").concat(g(d,"type"));else{var j=T(b,".")?"property":"argument";L='The "'.concat(b,'" ').concat(j," ").concat(u," ").concat(g(d,"type"))}return L+=". Received type ".concat(typeof M),L},TypeError),f("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),f("ERR_METHOD_NOT_IMPLEMENTED",function(b){return"The "+b+" method is not implemented"}),f("ERR_STREAM_PREMATURE_CLOSE","Premature close"),f("ERR_STREAM_DESTROYED",function(b){return"Cannot call "+b+" after a stream was destroyed"}),f("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),f("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),f("ERR_STREAM_WRITE_AFTER_END","write after end"),f("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),f("ERR_UNKNOWN_ENCODING",function(b){return"Unknown encoding: "+b},TypeError),f("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),rn.codes=o,rn}var nn,Vo;function Ya(){if(Vo)return nn;Vo=1;var r=jt().codes.ERR_INVALID_OPT_VALUE;function o(g,R,y){return g.highWaterMark!=null?g.highWaterMark:R?g[y]:null}function f(g,R,y,T){var b=o(R,T,y);if(b!=null){if(!(isFinite(b)&&Math.floor(b)===b)||b<0){var d=T?y:"highWaterMark";throw new r(d,b)}return Math.floor(b)}return g.objectMode?16:16*1024}return nn={getHighWaterMark:f},nn}var on,Yo;function Pu(){if(Yo)return on;Yo=1,on=r;function r(f,g){if(o("noDeprecation"))return f;var R=!1;function y(){if(!R){if(o("throwDeprecation"))throw new Error(g);o("traceDeprecation")?console.trace(g):console.warn(g),R=!0}return f.apply(this,arguments)}return y}function o(f){try{if(!Et.localStorage)return!1}catch{return!1}var g=Et.localStorage[f];return g==null?!1:String(g).toLowerCase()==="true"}return on}var an,zo;function za(){if(zo)return an;zo=1,an=G;function r(I){var U=this;this.next=null,this.entry=null,this.finish=function(){z(U,I)}}var o;G.WritableState=k;var f={deprecate:Pu()},g=xa(),R=ur().Buffer,y=(typeof Et<"u"?Et:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function T(I){return R.from(I)}function b(I){return R.isBuffer(I)||I instanceof y}var d=Va(),M=Ya(),u=M.getHighWaterMark,L=jt().codes,j=L.ERR_INVALID_ARG_TYPE,ee=L.ERR_METHOD_NOT_IMPLEMENTED,X=L.ERR_MULTIPLE_CALLBACK,q=L.ERR_STREAM_CANNOT_PIPE,J=L.ERR_STREAM_DESTROYED,_=L.ERR_STREAM_NULL_VALUES,S=L.ERR_STREAM_WRITE_AFTER_END,C=L.ERR_UNKNOWN_ENCODING,E=d.errorOrDestroy;At()(G,g);function B(){}function k(I,U,K){o=o||Dt(),I=I||{},typeof K!="boolean"&&(K=U instanceof o),this.objectMode=!!I.objectMode,K&&(this.objectMode=this.objectMode||!!I.writableObjectMode),this.highWaterMark=u(this,I,"writableHighWaterMark",K),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var te=I.decodeStrings===!1;this.decodeStrings=!te,this.defaultEncoding=I.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ie){Te(U,ie)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=I.emitClose!==!1,this.autoDestroy=!!I.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}k.prototype.getBuffer=function(){for(var I=this.bufferedRequest,U=[];I;)U.push(I),I=I.next;return U},(function(){try{Object.defineProperty(k.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Y;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Y=Function.prototype[Symbol.hasInstance],Object.defineProperty(G,Symbol.hasInstance,{value:function(I){return Y.call(this,I)?!0:this!==G?!1:I&&I._writableState instanceof k}})):Y=function(I){return I instanceof this};function G(I){o=o||Dt();var U=this instanceof o;if(!U&&!Y.call(G,this))return new G(I);this._writableState=new k(I,this,U),this.writable=!0,I&&(typeof I.write=="function"&&(this._write=I.write),typeof I.writev=="function"&&(this._writev=I.writev),typeof I.destroy=="function"&&(this._destroy=I.destroy),typeof I.final=="function"&&(this._final=I.final)),g.call(this)}G.prototype.pipe=function(){E(this,new q)};function re(I,U){var K=new S;E(I,K),ve.nextTick(U,K)}function w(I,U,K,te){var ie;return K===null?ie=new _:typeof K!="string"&&!U.objectMode&&(ie=new j("chunk",["string","Buffer"],K)),ie?(E(I,ie),ve.nextTick(te,ie),!1):!0}G.prototype.write=function(I,U,K){var te=this._writableState,ie=!1,h=!te.objectMode&&b(I);return h&&!R.isBuffer(I)&&(I=T(I)),typeof U=="function"&&(K=U,U=null),h?U="buffer":U||(U=te.defaultEncoding),typeof K!="function"&&(K=B),te.ending?re(this,K):(h||w(this,te,I,K))&&(te.pendingcb++,ie=P(this,te,h,I,U,K)),ie},G.prototype.cork=function(){this._writableState.corked++},G.prototype.uncork=function(){var I=this._writableState;I.corked&&(I.corked--,!I.writing&&!I.corked&&!I.bufferProcessing&&I.bufferedRequest&&Be(this,I))},G.prototype.setDefaultEncoding=function(I){if(typeof I=="string"&&(I=I.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((I+"").toLowerCase())>-1))throw new C(I);return this._writableState.defaultEncoding=I,this},Object.defineProperty(G.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function ue(I,U,K){return!I.objectMode&&I.decodeStrings!==!1&&typeof U=="string"&&(U=R.from(U,K)),U}Object.defineProperty(G.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function P(I,U,K,te,ie,h){if(!K){var m=ue(U,te,ie);te!==m&&(K=!0,ie="buffer",te=m)}var s=U.objectMode?1:te.length;U.length+=s;var a=U.length>5===6?2:_>>4===14?3:_>>3===30?4:_>>6===2?-1:-2}function T(_,S,C){var E=S.length-1;if(E=0?(B>0&&(_.lastNeed=B-1),B):--E=0?(B>0&&(_.lastNeed=B-2),B):--E=0?(B>0&&(B===2?B=0:_.lastNeed=B-3),B):0))}function b(_,S,C){if((S[0]&192)!==128)return _.lastNeed=0,"�";if(_.lastNeed>1&&S.length>1){if((S[1]&192)!==128)return _.lastNeed=1,"�";if(_.lastNeed>2&&S.length>2&&(S[2]&192)!==128)return _.lastNeed=2,"�"}}function d(_){var S=this.lastTotal-this.lastNeed,C=b(this,_);if(C!==void 0)return C;if(this.lastNeed<=_.length)return _.copy(this.lastChar,S,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);_.copy(this.lastChar,S,0,_.length),this.lastNeed-=_.length}function M(_,S){var C=T(this,_,S);if(!this.lastNeed)return _.toString("utf8",S);this.lastTotal=C;var E=_.length-(C-this.lastNeed);return _.copy(this.lastChar,0,E),_.toString("utf8",S,E)}function u(_){var S=_&&_.length?this.write(_):"";return this.lastNeed?S+"�":S}function L(_,S){if((_.length-S)%2===0){var C=_.toString("utf16le",S);if(C){var E=C.charCodeAt(C.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=_[_.length-2],this.lastChar[1]=_[_.length-1],C.slice(0,-1)}return C}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=_[_.length-1],_.toString("utf16le",S,_.length-1)}function j(_){var S=_&&_.length?this.write(_):"";if(this.lastNeed){var C=this.lastTotal-this.lastNeed;return S+this.lastChar.toString("utf16le",0,C)}return S}function ee(_,S){var C=(_.length-S)%3;return C===0?_.toString("base64",S):(this.lastNeed=3-C,this.lastTotal=3,C===1?this.lastChar[0]=_[_.length-1]:(this.lastChar[0]=_[_.length-2],this.lastChar[1]=_[_.length-1]),_.toString("base64",S,_.length-C))}function X(_){var S=_&&_.length?this.write(_):"";return this.lastNeed?S+this.lastChar.toString("base64",0,3-this.lastNeed):S}function q(_){return _.toString(this.encoding)}function J(_){return _&&_.length?this.write(_):""}return un}var ln,Zo;function Dn(){if(Zo)return ln;Zo=1;var r=jt().codes.ERR_STREAM_PREMATURE_CLOSE;function o(y){var T=!1;return function(){if(!T){T=!0;for(var b=arguments.length,d=new Array(b),M=0;M0)if(typeof m!="string"&&!v.objectMode&&Object.getPrototypeOf(m)!==g.prototype&&(m=y(m)),a)v.endEmitted?B(h,new _):ue(h,v,m,!0);else if(v.ended)B(h,new q);else{if(v.destroyed)return!1;v.reading=!1,v.decoder&&!s?(m=v.decoder.write(m),v.objectMode||m.length!==0?ue(h,v,m,!1):Be(h,v)):ue(h,v,m,!1)}else a||(v.reading=!1,Be(h,v))}return!v.ended&&(v.length=ge?h=ge:(h--,h|=h>>>1,h|=h>>>2,h|=h>>>4,h|=h>>>8,h|=h>>>16,h++),h}function Se(h,m){return h<=0||m.length===0&&m.ended?0:m.objectMode?1:h!==h?m.flowing&&m.length?m.buffer.head.data.length:m.length:(h>m.highWaterMark&&(m.highWaterMark=me(h)),h<=m.length?h:m.ended?m.length:(m.needReadable=!0,0))}re.prototype.read=function(h){d("read",h),h=parseInt(h,10);var m=this._readableState,s=h;if(h!==0&&(m.emittedReadable=!1),h===0&&m.needReadable&&((m.highWaterMark!==0?m.length>=m.highWaterMark:m.length>0)||m.ended))return d("read: emitReadable",m.length,m.ended),m.length===0&&m.ended?K(this):he(this),null;if(h=Se(h,m),h===0&&m.ended)return m.length===0&&K(this),null;var a=m.needReadable;d("need readable",a),(m.length===0||m.length-h0?O=U(h,m):O=null,O===null?(m.needReadable=m.length<=m.highWaterMark,h=0):(m.length-=h,m.awaitDrain=0),m.length===0&&(m.ended||(m.needReadable=!0),s!==h&&m.ended&&K(this)),O!==null&&this.emit("data",O),O};function Te(h,m){if(d("onEofChunk"),!m.ended){if(m.decoder){var s=m.decoder.end();s&&s.length&&(m.buffer.push(s),m.length+=m.objectMode?1:s.length)}m.ended=!0,m.sync?he(h):(m.needReadable=!1,m.emittedReadable||(m.emittedReadable=!0,Oe(h)))}}function he(h){var m=h._readableState;d("emitReadable",m.needReadable,m.emittedReadable),m.needReadable=!1,m.emittedReadable||(d("emitReadable",m.flowing),m.emittedReadable=!0,ve.nextTick(Oe,h))}function Oe(h){var m=h._readableState;d("emitReadable_",m.destroyed,m.length,m.ended),!m.destroyed&&(m.length||m.ended)&&(h.emit("readable"),m.emittedReadable=!1),m.needReadable=!m.flowing&&!m.ended&&m.length<=m.highWaterMark,I(h)}function Be(h,m){m.readingMore||(m.readingMore=!0,ve.nextTick(Ee,h,m))}function Ee(h,m){for(;!m.reading&&!m.ended&&(m.length1&&ie(a.pipes,h)!==-1)&&!ye&&(d("false write response, pause",a.awaitDrain),a.awaitDrain++),s.pause())}function pe(je){d("onerror",je),He(),h.removeListener("error",pe),o(h,"error")===0&&B(h,je)}Y(h,"error",pe);function Me(){h.removeListener("finish",Ue),He()}h.once("close",Me);function Ue(){d("onfinish"),h.removeListener("close",Me),He()}h.once("finish",Ue);function He(){d("unpipe"),s.unpipe(h)}return h.emit("pipe",s),a.flowing||(d("pipe resume"),s.resume()),h};function $e(h){return function(){var m=h._readableState;d("pipeOnDrain",m.awaitDrain),m.awaitDrain&&m.awaitDrain--,m.awaitDrain===0&&o(h,"data")&&(m.flowing=!0,I(h))}}re.prototype.unpipe=function(h){var m=this._readableState,s={hasUnpiped:!1};if(m.pipesCount===0)return this;if(m.pipesCount===1)return h&&h!==m.pipes?this:(h||(h=m.pipes),m.pipes=null,m.pipesCount=0,m.flowing=!1,h&&h.emit("unpipe",this,s),this);if(!h){var a=m.pipes,O=m.pipesCount;m.pipes=null,m.pipesCount=0,m.flowing=!1;for(var v=0;v0,a.flowing!==!1&&this.resume()):h==="readable"&&!a.endEmitted&&!a.readableListening&&(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,d("on readable",a.length,a.reading),a.length?he(this):a.reading||ve.nextTick(F,this)),s},re.prototype.addListener=re.prototype.on,re.prototype.removeListener=function(h,m){var s=f.prototype.removeListener.call(this,h,m);return h==="readable"&&ve.nextTick(le,this),s},re.prototype.removeAllListeners=function(h){var m=f.prototype.removeAllListeners.apply(this,arguments);return(h==="readable"||h===void 0)&&ve.nextTick(le,this),m};function le(h){var m=h._readableState;m.readableListening=h.listenerCount("readable")>0,m.resumeScheduled&&!m.paused?m.flowing=!0:h.listenerCount("data")>0&&h.resume()}function F(h){d("readable nexttick read 0"),h.read(0)}re.prototype.resume=function(){var h=this._readableState;return h.flowing||(d("resume"),h.flowing=!h.readableListening,V(this,h)),h.paused=!1,this};function V(h,m){m.resumeScheduled||(m.resumeScheduled=!0,ve.nextTick(z,h,m))}function z(h,m){d("resume",m.reading),m.reading||h.read(0),m.resumeScheduled=!1,h.emit("resume"),I(h),m.flowing&&!m.reading&&h.read(0)}re.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function I(h){var m=h._readableState;for(d("flow",m.flowing);m.flowing&&h.read()!==null;);}re.prototype.wrap=function(h){var m=this,s=this._readableState,a=!1;h.on("end",function(){if(d("wrapped end"),s.decoder&&!s.ended){var ne=s.decoder.end();ne&&ne.length&&m.push(ne)}m.push(null)}),h.on("data",function(ne){if(d("wrapped data"),s.decoder&&(ne=s.decoder.write(ne)),!(s.objectMode&&ne==null)&&!(!s.objectMode&&(!ne||!ne.length))){var be=m.push(ne);be||(a=!0,h.pause())}});for(var O in h)this[O]===void 0&&typeof h[O]=="function"&&(this[O]=(function(ne){return function(){return h[ne].apply(h,arguments)}})(O));for(var v=0;v=m.length?(m.decoder?s=m.buffer.join(""):m.buffer.length===1?s=m.buffer.first():s=m.buffer.concat(m.length),m.buffer.clear()):s=m.buffer.consume(h,m.decoder),s}function K(h){var m=h._readableState;d("endReadable",m.endEmitted),m.endEmitted||(m.ended=!0,ve.nextTick(te,m,h))}function te(h,m){if(d("endReadableNT",h.endEmitted,h.length),!h.endEmitted&&h.length===0&&(h.endEmitted=!0,m.readable=!1,m.emit("end"),h.autoDestroy)){var s=m._writableState;(!s||s.autoDestroy&&s.finished)&&m.destroy()}}typeof Symbol=="function"&&(re.from=function(h,m){return E===void 0&&(E=Mu()),E(re,h,m)});function ie(h,m){for(var s=0,a=h.length;s0;return b(S,E,B,function(k){J||(J=k),k&&_.forEach(d),!E&&(_.forEach(d),q(J))})});return ee.reduce(M)}return gn=L,gn}var yn,aa;function Fu(){if(aa)return yn;aa=1,yn=f;var r=Ln().EventEmitter,o=At();o(f,r),f.Readable=Ha(),f.Writable=za(),f.Duplex=Dt(),f.Transform=Xa(),f.PassThrough=ju(),f.finished=Dn(),f.pipeline=ku(),f.Stream=f;function f(){r.call(this)}return f.prototype.pipe=function(g,R){var y=this;function T(ee){g.writable&&g.write(ee)===!1&&y.pause&&y.pause()}y.on("data",T);function b(){y.readable&&y.resume&&y.resume()}g.on("drain",b),!g._isStdio&&(!R||R.end!==!1)&&(y.on("end",M),y.on("close",u));var d=!1;function M(){d||(d=!0,g.end())}function u(){d||(d=!0,typeof g.destroy=="function"&&g.destroy())}function L(ee){if(j(),r.listenerCount(this,"error")===0)throw ee}y.on("error",L),g.on("error",L);function j(){y.removeListener("data",T),g.removeListener("drain",b),y.removeListener("end",M),y.removeListener("close",u),y.removeListener("error",L),g.removeListener("error",L),y.removeListener("end",j),y.removeListener("close",j),g.removeListener("close",j)}return y.on("end",j),y.on("close",j),g.on("close",j),g.emit("pipe",y),g},yn}var sa;function Uu(){return sa||(sa=1,(function(r){(function(o){o.parser=function(s,a){return new g(s,a)},o.SAXParser=g,o.SAXStream=L,o.createStream=M,o.MAX_BUFFER_LENGTH=64*1024;var f=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];o.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function g(s,a){if(!(this instanceof g))return new g(s,a);var O=this;y(O),O.q=O.c="",O.bufferCheckPosition=o.MAX_BUFFER_LENGTH,O.encoding=null,O.opt=a||{},O.opt.lowercase=O.opt.lowercase||O.opt.lowercasetags,O.looseCase=O.opt.lowercase?"toLowerCase":"toUpperCase",O.opt.maxEntityCount=O.opt.maxEntityCount||512,O.opt.maxEntityDepth=O.opt.maxEntityDepth||4,O.entityCount=O.entityDepth=0,O.tags=[],O.closed=O.closedRoot=O.sawRoot=!1,O.tag=O.error=null,O.strict=!!s,O.noscript=!!(s||O.opt.noscript),O.state=w.BEGIN,O.strictEntities=O.opt.strictEntities,O.ENTITIES=O.strictEntities?Object.create(o.XML_ENTITIES):Object.create(o.ENTITIES),O.attribList=[],O.opt.xmlns&&(O.ns=Object.create(J)),O.opt.unquotedAttributeValues===void 0&&(O.opt.unquotedAttributeValues=!s),O.trackPosition=O.opt.position!==!1,O.trackPosition&&(O.position=O.line=O.column=0),P(O,"onready")}Object.create||(Object.create=function(s){function a(){}a.prototype=s;var O=new a;return O}),Object.keys||(Object.keys=function(s){var a=[];for(var O in s)s.hasOwnProperty(O)&&a.push(O);return a});function R(s){for(var a=Math.max(o.MAX_BUFFER_LENGTH,10),O=0,v=0,ne=f.length;va)switch(f[v]){case"textNode":Oe(s);break;case"cdata":he(s,"oncdata",s.cdata),s.cdata="";break;case"script":he(s,"onscript",s.script),s.script="";break;default:Ee(s,"Max buffer length exceeded: "+f[v])}O=Math.max(O,be)}var $=o.MAX_BUFFER_LENGTH-O;s.bufferCheckPosition=$+s.position}function y(s){for(var a=0,O=f.length;a=2){if(s[0]===255&&s[1]===254)return"utf-16le";if(s[0]===254&&s[1]===255)return"utf-16be"}return s.length>=3&&s[0]===239&&s[1]===187&&s[2]===191?"utf8":s.length>=4?s[0]===60&&s[1]===0&&s[2]===63&&s[3]===0?"utf-16le":s[0]===0&&s[1]===60&&s[2]===0&&s[3]===63?"utf-16be":"utf8":a?"utf8":null}function L(s,a){if(!(this instanceof L))return new L(s,a);b.apply(this),this._parser=new g(s,a),this.writable=!0,this.readable=!0;var O=this;this._parser.onend=function(){O.emit("end")},this._parser.onerror=function(v){O.emit("error",v),O._parser.error=null},this._decoder=null,this._decoderBuffer=null,d.forEach(function(v){Object.defineProperty(O,"on"+v,{get:function(){return O._parser["on"+v]},set:function(ne){if(!ne)return O.removeAllListeners(v),O._parser["on"+v]=ne,ne;O.on(v,ne)},enumerable:!0,configurable:!1})})}L.prototype=Object.create(b.prototype,{constructor:{value:L}}),L.prototype._decodeBuffer=function(s,a){if(this._decoderBuffer&&(s=Bt.concat([this._decoderBuffer,s]),this._decoderBuffer=null),!this._decoder){var O=u(s,a);if(!O)return this._decoderBuffer=s,"";this._parser.encoding=O,this._decoder=new TextDecoder(O)}return this._decoder.decode(s,{stream:!a})},L.prototype.write=function(s){if(typeof Bt=="function"&&typeof Bt.isBuffer=="function"&&Bt.isBuffer(s))s=this._decodeBuffer(s,!1);else if(this._decoderBuffer){var a=this._decodeBuffer(Bt.alloc(0),!0);a&&(this._parser.write(a),this.emit("data",a))}return this._parser.write(s.toString()),this.emit("data",s),!0},L.prototype.end=function(s){if(s&&s.length&&this.write(s),this._decoderBuffer){var a=this._decodeBuffer(Bt.alloc(0),!0);a&&(this._parser.write(a),this.emit("data",a))}else if(this._decoder){var O=this._decoder.decode();O&&(this._parser.write(O),this.emit("data",O))}return this._parser.end(),!0},L.prototype.on=function(s,a){var O=this;return!O._parser["on"+s]&&d.indexOf(s)!==-1&&(O._parser["on"+s]=function(){var v=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);v.splice(0,0,s),O.emit.apply(O,v)}),b.prototype.on.call(O,s,a)};var j=/^\[CDATA\[$/i,ee=/^DOCTYPE$/i,X="http://www.w3.org/XML/1998/namespace",q="http://www.w3.org/2000/xmlns/",J={xml:X,xmlns:q},_=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,S=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,C=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,E=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function B(s){return s===" "||s===` `||s==="\r"||s===" "}function k(s){return s==='"'||s==="'"}function Y(s){return s===">"||B(s)}function G(s,a){return s.test(a)}function re(s,a){return!G(s,a)}var w=0;o.STATE={BEGIN:w++,BEGIN_WHITESPACE:w++,TEXT:w++,TEXT_ENTITY:w++,OPEN_WAKA:w++,SGML_DECL:w++,SGML_DECL_QUOTED:w++,DOCTYPE:w++,DOCTYPE_QUOTED:w++,DOCTYPE_DTD:w++,DOCTYPE_DTD_QUOTED:w++,COMMENT_STARTING:w++,COMMENT:w++,COMMENT_ENDING:w++,COMMENT_ENDED:w++,CDATA:w++,CDATA_ENDING:w++,CDATA_ENDING_2:w++,PROC_INST:w++,PROC_INST_BODY:w++,PROC_INST_ENDING:w++,OPEN_TAG:w++,OPEN_TAG_SLASH:w++,ATTRIB:w++,ATTRIB_NAME:w++,ATTRIB_NAME_SAW_WHITE:w++,ATTRIB_VALUE:w++,ATTRIB_VALUE_QUOTED:w++,ATTRIB_VALUE_CLOSED:w++,ATTRIB_VALUE_UNQUOTED:w++,ATTRIB_VALUE_ENTITY_Q:w++,ATTRIB_VALUE_ENTITY_U:w++,CLOSE_TAG:w++,CLOSE_TAG_SAW_WHITE:w++,SCRIPT:w++,SCRIPT_ENDING:w++},o.XML_ENTITIES=Object.assign(Object.create(null),{amp:"&",gt:">",lt:"<",quot:'"',apos:"'"}),o.ENTITIES=Object.assign(Object.create(null),{amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830}),Object.keys(o.ENTITIES).forEach(function(s){var a=o.ENTITIES[s],O=typeof a=="number"?String.fromCharCode(a):a;o.ENTITIES[s]=O});for(var ue in o.STATE)o.STATE[o.STATE[ue]]=ue;w=o.STATE;function P(s,a,O){s[a]&&s[a](O)}function ge(s){var a=s&&s.match(/(?:^|\s)encoding\s*=\s*(['"])([^'"]+)\1/i);return a?a[2]:null}function me(s){return s?s.toLowerCase().replace(/[^a-z0-9]/g,""):null}function Se(s,a){const O=me(s),v=me(a);return!O||!v?!0:v==="utf16"?O==="utf16le"||O==="utf16be":O===v}function Te(s,a){if(!(!s.strict||!s.encoding||!a||a.name!=="xml")){var O=ge(a.body);O&&!Se(s.encoding,O)&&le(s,"XML declaration encoding "+O+" does not match detected stream encoding "+s.encoding.toUpperCase())}}function he(s,a,O){s.textNode&&Oe(s),P(s,a,O)}function Oe(s){s.textNode=Be(s.opt,s.textNode),s.textNode&&P(s,"ontext",s.textNode),s.textNode=""}function Be(s,a){return s.trim&&(a=a.trim()),s.normalize&&(a=a.replace(/\s+/g," ")),a}function Ee(s,a){return Oe(s),s.trackPosition&&(a+=` Line: `+s.line+` Column: `+s.column+` Char: `+s.c),a=new Error(a),s.error=a,P(s,"onerror",a),s}function $e(s){return s.sawRoot&&!s.closedRoot&&le(s,"Unclosed root tag"),s.state!==w.BEGIN&&s.state!==w.BEGIN_WHITESPACE&&s.state!==w.TEXT&&Ee(s,"Unexpected end"),Oe(s),s.c="",s.closed=!0,P(s,"onend"),g.call(s,s.strict,s.opt),s}function le(s,a){if(typeof s!="object"||!(s instanceof g))throw new Error("bad call to strictFail");s.strict&&Ee(s,a)}function F(s){s.strict||(s.tagName=s.tagName[s.looseCase]());var a=s.tags[s.tags.length-1]||s,O=s.tag={name:s.tagName,attributes:{}};s.opt.xmlns&&(O.ns=a.ns),s.attribList.length=0,he(s,"onopentagstart",O)}function V(s,a){var O=s.indexOf(":"),v=O<0?["",s]:s.split(":"),ne=v[0],be=v[1];return a&&s==="xmlns"&&(ne="xmlns",be=""),{prefix:ne,local:be}}function z(s){if(s.strict||(s.attribName=s.attribName[s.looseCase]()),s.attribList.indexOf(s.attribName)!==-1||s.tag.attributes.hasOwnProperty(s.attribName)){s.attribName=s.attribValue="";return}if(s.opt.xmlns){var a=V(s.attribName,!0),O=a.prefix,v=a.local;if(O==="xmlns")if(v==="xml"&&s.attribValue!==X)le(s,"xml: prefix must be bound to "+X+` Actual: `+s.attribValue);else if(v==="xmlns"&&s.attribValue!==q)le(s,"xmlns: prefix must be bound to "+q+` Actual: `+s.attribValue);else{var ne=s.tag,be=s.tags[s.tags.length-1]||s;ne.ns===be.ns&&(ne.ns=Object.create(be.ns)),ne.ns[v]=s.attribValue}s.attribList.push([s.attribName,s.attribValue])}else s.tag.attributes[s.attribName]=s.attribValue,he(s,"onattribute",{name:s.attribName,value:s.attribValue});s.attribName=s.attribValue=""}function I(s,a){if(s.opt.xmlns){var O=s.tag,v=V(s.tagName);O.prefix=v.prefix,O.local=v.local,O.uri=O.ns[v.prefix]||"",O.prefix&&!O.uri&&(le(s,"Unbound namespace prefix: "+JSON.stringify(s.tagName)),O.uri=v.prefix);var ne=s.tags[s.tags.length-1]||s;O.ns&&ne.ns!==O.ns&&Object.keys(O.ns).forEach(function(Ie){he(s,"onopennamespace",{prefix:Ie,uri:O.ns[Ie]})});for(var be=0,$=s.attribList.length;be<$;be++){var ye=s.attribList[be],Ce=ye[0],fe=ye[1],pe=V(Ce,!0),Me=pe.prefix,Ue=pe.local,He=Me===""?"":O.ns[Me]||"",je={name:Ce,value:fe,prefix:Me,local:Ue,uri:He};Me&&Me!=="xmlns"&&!He&&(le(s,"Unbound namespace prefix: "+JSON.stringify(Me)),je.uri=Me),s.tag.attributes[Ce]=je,he(s,"onattribute",je)}s.attribList.length=0}s.tag.isSelfClosing=!!a,s.sawRoot=!0,s.tags.push(s.tag),he(s,"onopentag",s.tag),a||(!s.noscript&&s.tagName.toLowerCase()==="script"?s.state=w.SCRIPT:s.state=w.TEXT,s.tag=null,s.tagName=""),s.attribName=s.attribValue="",s.attribList.length=0}function U(s){if(!s.tagName){le(s,"Weird empty close tag."),s.textNode+="",s.state=w.TEXT;return}if(s.script){if(s.tagName!=="script"){s.script+="",s.tagName="",s.state=w.SCRIPT;return}he(s,"onscript",s.script),s.script=""}var a=s.tags.length,O=s.tagName;s.strict||(O=O[s.looseCase]());for(var v=O;a--;){var ne=s.tags[a];if(ne.name!==v)le(s,"Unexpected close tag");else break}if(a<0){le(s,"Unmatched closing tag: "+s.tagName),s.textNode+="",s.state=w.TEXT;return}s.tagName=O;for(var be=s.tags.length;be-- >a;){var $=s.tag=s.tags.pop();s.tagName=s.tag.name,he(s,"onclosetag",s.tagName);var ye={};for(var Ce in $.ns)ye[Ce]=$.ns[Ce];var fe=s.tags[s.tags.length-1]||s;s.opt.xmlns&&$.ns!==fe.ns&&Object.keys($.ns).forEach(function(pe){var Me=$.ns[pe];he(s,"onclosenamespace",{prefix:pe,uri:Me})})}a===0&&(s.closedRoot=!0),s.tagName=s.attribValue=s.attribName="",s.attribList.length=0,s.state=w.TEXT}function K(s){var a=s.entity,O=a.toLowerCase(),v,ne="";return s.ENTITIES[a]?s.ENTITIES[a]:s.ENTITIES[O]?s.ENTITIES[O]:(a=O,a.charAt(0)==="#"&&(a.charAt(1)==="x"?(a=a.slice(2),v=parseInt(a,16),ne=v.toString(16)):(a=a.slice(1),v=parseInt(a,10),ne=v.toString(10))),a=a.replace(/^0+/,""),isNaN(v)||ne.toLowerCase()!==a||v<0||v>1114111||!te(v)?(le(s,"Invalid character entity"),"&"+s.entity+";"):String.fromCodePoint(v))}function te(s){return s===9||s===10||s===13||s>=32&&s<=55295||s>=57344&&s<=65533||s>=65536&&s<=1114111}function ie(s,a){a==="<"?(s.state=w.OPEN_WAKA,s.startTagPosition=s.position):B(a)||(le(s,"Non-whitespace before first tag."),s.textNode=a,s.state=w.TEXT)}function h(s,a){var O="";return a"?(he(a,"onsgmldeclaration",a.sgmlDecl),a.sgmlDecl="",a.state=w.TEXT):(k(v)&&(a.state=w.SGML_DECL_QUOTED),a.sgmlDecl+=v);continue;case w.SGML_DECL_QUOTED:v===a.q&&(a.state=w.SGML_DECL,a.q=""),a.sgmlDecl+=v;continue;case w.DOCTYPE:v===">"?(a.state=w.TEXT,he(a,"ondoctype",a.doctype),a.doctype=!0):(a.doctype+=v,v==="["?a.state=w.DOCTYPE_DTD:k(v)&&(a.state=w.DOCTYPE_QUOTED,a.q=v));continue;case w.DOCTYPE_QUOTED:a.doctype+=v,v===a.q&&(a.q="",a.state=w.DOCTYPE);continue;case w.DOCTYPE_DTD:v==="]"?(a.doctype+=v,a.state=w.DOCTYPE):v==="<"?(a.state=w.OPEN_WAKA,a.startTagPosition=a.position):k(v)?(a.doctype+=v,a.state=w.DOCTYPE_DTD_QUOTED,a.q=v):a.doctype+=v;continue;case w.DOCTYPE_DTD_QUOTED:a.doctype+=v,v===a.q&&(a.state=w.DOCTYPE_DTD,a.q="");continue;case w.COMMENT:v==="-"?a.state=w.COMMENT_ENDING:a.comment+=v;continue;case w.COMMENT_ENDING:v==="-"?(a.state=w.COMMENT_ENDED,a.comment=Be(a.opt,a.comment),a.comment&&he(a,"oncomment",a.comment),a.comment=""):(a.comment+="-"+v,a.state=w.COMMENT);continue;case w.COMMENT_ENDED:v!==">"?(le(a,"Malformed comment"),a.comment+="--"+v,a.state=w.COMMENT):a.doctype&&a.doctype!==!0?a.state=w.DOCTYPE_DTD:a.state=w.TEXT;continue;case w.CDATA:for(var ne=O-1;v&&v!=="]";)v=h(s,O++),v&&a.trackPosition&&(a.position++,v===` `?(a.line++,a.column=0):a.column++);a.cdata+=s.substring(ne,O-1),v==="]"&&(a.state=w.CDATA_ENDING);continue;case w.CDATA_ENDING:v==="]"?a.state=w.CDATA_ENDING_2:(a.cdata+="]"+v,a.state=w.CDATA);continue;case w.CDATA_ENDING_2:v===">"?(a.cdata&&he(a,"oncdata",a.cdata),he(a,"onclosecdata"),a.cdata="",a.state=w.TEXT):v==="]"?a.cdata+="]":(a.cdata+="]]"+v,a.state=w.CDATA);continue;case w.PROC_INST:v==="?"?a.state=w.PROC_INST_ENDING:B(v)?a.state=w.PROC_INST_BODY:a.procInstName+=v;continue;case w.PROC_INST_BODY:if(!a.procInstBody&&B(v))continue;v==="?"?a.state=w.PROC_INST_ENDING:a.procInstBody+=v;continue;case w.PROC_INST_ENDING:if(v===">"){const fe={name:a.procInstName,body:a.procInstBody};Te(a,fe),he(a,"onprocessinginstruction",fe),a.procInstName=a.procInstBody="",a.state=w.TEXT}else a.procInstBody+="?"+v,a.state=w.PROC_INST_BODY;continue;case w.OPEN_TAG:G(S,v)?a.tagName+=v:(F(a),v===">"?I(a):v==="/"?a.state=w.OPEN_TAG_SLASH:(B(v)||le(a,"Invalid character in tag name"),a.state=w.ATTRIB));continue;case w.OPEN_TAG_SLASH:v===">"?(I(a,!0),U(a)):(le(a,"Forward-slash in opening tag not followed by >"),a.state=w.ATTRIB);continue;case w.ATTRIB:if(B(v))continue;v===">"?I(a):v==="/"?a.state=w.OPEN_TAG_SLASH:G(_,v)?(a.attribName=v,a.attribValue="",a.state=w.ATTRIB_NAME):le(a,"Invalid attribute name");continue;case w.ATTRIB_NAME:v==="="?a.state=w.ATTRIB_VALUE:v===">"?(le(a,"Attribute without value"),a.attribValue=a.attribName,z(a),I(a)):B(v)?a.state=w.ATTRIB_NAME_SAW_WHITE:G(S,v)?a.attribName+=v:le(a,"Invalid attribute name");continue;case w.ATTRIB_NAME_SAW_WHITE:if(v==="=")a.state=w.ATTRIB_VALUE;else{if(B(v))continue;le(a,"Attribute without value"),a.tag.attributes[a.attribName]="",a.attribValue="",he(a,"onattribute",{name:a.attribName,value:""}),a.attribName="",v===">"?I(a):G(_,v)?(a.attribName=v,a.state=w.ATTRIB_NAME):(le(a,"Invalid attribute name"),a.state=w.ATTRIB)}continue;case w.ATTRIB_VALUE:if(B(v))continue;k(v)?(a.q=v,a.state=w.ATTRIB_VALUE_QUOTED):(a.opt.unquotedAttributeValues||Ee(a,"Unquoted attribute value"),a.state=w.ATTRIB_VALUE_UNQUOTED,a.attribValue=v);continue;case w.ATTRIB_VALUE_QUOTED:if(v!==a.q){v==="&"?a.state=w.ATTRIB_VALUE_ENTITY_Q:a.attribValue+=v;continue}z(a),a.q="",a.state=w.ATTRIB_VALUE_CLOSED;continue;case w.ATTRIB_VALUE_CLOSED:B(v)?a.state=w.ATTRIB:v===">"?I(a):v==="/"?a.state=w.OPEN_TAG_SLASH:G(_,v)?(le(a,"No whitespace between attributes"),a.attribName=v,a.attribValue="",a.state=w.ATTRIB_NAME):le(a,"Invalid attribute name");continue;case w.ATTRIB_VALUE_UNQUOTED:if(!Y(v)){v==="&"?a.state=w.ATTRIB_VALUE_ENTITY_U:a.attribValue+=v;continue}z(a),v===">"?I(a):a.state=w.ATTRIB;continue;case w.CLOSE_TAG:if(a.tagName)v===">"?U(a):G(S,v)?a.tagName+=v:a.script?(a.script+=""?U(a):le(a,"Invalid characters in closing tag");continue;case w.TEXT_ENTITY:case w.ATTRIB_VALUE_ENTITY_Q:case w.ATTRIB_VALUE_ENTITY_U:var $,ye;switch(a.state){case w.TEXT_ENTITY:$=w.TEXT,ye="textNode";break;case w.ATTRIB_VALUE_ENTITY_Q:$=w.ATTRIB_VALUE_QUOTED,ye="attribValue";break;case w.ATTRIB_VALUE_ENTITY_U:$=w.ATTRIB_VALUE_UNQUOTED,ye="attribValue";break}if(v===";"){var Ce=K(a);a.opt.unparsedEntities&&!Object.values(o.XML_ENTITIES).includes(Ce)?((a.entityCount+=1)>a.opt.maxEntityCount&&Ee(a,"Parsed entity count exceeds max entity count"),(a.entityDepth+=1)>a.opt.maxEntityDepth&&Ee(a,"Parsed entity depth exceeds max entity depth"),a.entity="",a.state=$,a.write(Ce),a.entityDepth-=1):(a[ye]+=Ce,a.entity="",a.state=$)}else G(a.entity.length?E:C,v)?a.entity+=v:(le(a,"Invalid character in entity name"),a[ye]+="&"+a.entity+v,a.entity="",a.state=$);continue;default:throw new Error(a,"Unknown state: "+a.state)}return a.position>=a.bufferCheckPosition&&R(a),a}String.fromCodePoint||(function(){var s=String.fromCharCode,a=Math.floor,O=function(){var v=16384,ne=[],be,$,ye=-1,Ce=arguments.length;if(!Ce)return"";for(var fe="";++ye1114111||a(pe)!==pe)throw RangeError("Invalid code point: "+pe);pe<=65535?ne.push(pe):(pe-=65536,be=(pe>>10)+55296,$=pe%1024+56320,ne.push(be,$)),(ye+1===Ce||ne.length>v)&&(fe+=s.apply(null,ne),ne.length=0)}return fe};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:O,configurable:!0,writable:!0}):String.fromCodePoint=O})()})(r)})(si)),si}var qu=Uu();const Gu=Nn(qu),$u={"http://www.w3.org/2000/svg":{ext:"svg",mime:"image/svg+xml"},"http://www.w3.org/1999/xhtml":{ext:"xhtml",mime:"application/xhtml+xml"},"http://www.opengis.net/kml/2.2":{ext:"kml",mime:"application/vnd.google-earth.kml+xml"},"http://www.opengis.net/gml":{ext:"gml",mime:"application/gml+xml"}},Wu={rss:{ext:"rss",mime:"application/rss+xml"},"score-partwise":{ext:"musicxml",mime:"application/vnd.recordare.musicxml+xml"},svg:{ext:"svg",mime:"image/svg+xml"}};class Vu{constructor(o){this.options=o??{},this.firstTag=!0,this.onEnd=!1,this.parser=Gu.parser(!0,{xmlns:!0}),this.nesting=0,this.parser.onerror=f=>{f.message.startsWith("Invalid character entity")||(this.fileType=void 0,this.onEnd=!0)},this.parser.onopentag=f=>{++this.nesting,!(!this.firstTag||this.onEnd)&&(this.firstTag=!1,f.uri?this.fileType=$u[f.uri]:f.name&&(this.fileType=Wu[f.name.toLowerCase()]),this.fileType&&!this.options.fullScan&&(this.onEnd=!0))},this.parser.onclosetag=()=>{--this.nesting}}write(o){this.parser.write(o)}close(){this.parser.close(),this.onEnd=!0}isValid(){return this.nesting===0}}function Yu(r,{validate:o=!0}={}){if(typeof r!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof r}\``);if(r=r.trim(),r.length===0)return!1;const f=new Vu({fullScan:o});if(o){if(f.write(r),!f.isValid())return!1}else{let g=0;for(;r.length>g&&!f.onEnd;)f.write(r.slice(g,Math.min(g+128,r.length))),g+=128}return f.fileType?.ext==="svg"}function zu(r,o,f){const g=`#initial-state-${r}-${o}`;if(window._nc_initial_state?.has(g))return window._nc_initial_state.get(g);window._nc_initial_state||(window._nc_initial_state=new Map);const R=document.querySelector(g);if(R===null)return f;try{const y=JSON.parse(atob(R.value));return window._nc_initial_state.set(g,y),y}catch(y){return console.error("[@nextcloud/initial-state] Could not parse initial state",{key:o,app:r,error:y}),f}}function ua(r,o){(o==null||o>r.length)&&(o=r.length);for(var f=0,g=Array(o);f2?f-2:0),R=2;R1?o-1:0),g=1;g"u"?null:Ye(BigInt.prototype.toString),da=typeof Symbol>"u"?null:Ye(Symbol.prototype.toString),tt=Ye(Object.prototype.hasOwnProperty),$t=Ye(Object.prototype.toString),Je=Ye(RegExp.prototype.test),Tt=sc(TypeError);function Ye(r){return function(o){o instanceof RegExp&&(o.lastIndex=0);for(var f=arguments.length,g=new Array(f>1?f-1:0),R=1;R2&&arguments[2]!==void 0?arguments[2]:Wt;if(ca&&ca(r,null),!xt(o))return r;let g=o.length;for(;g--;){let R=o[g];if(typeof R=="string"){const y=f(R);y!==R&&(Ju(o)||(o[g]=y),R=y)}r[R]=!0}return r}function uc(r){for(let o=0;o/g),gc=Xe(/\${[\w\W]*/g),yc=Xe(/^data-[\-\w.\u00B7-\uFFFF]+$/),mc=Xe(/^aria-[\-\w]+$/),Ea=Xe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),bc=Xe(/^(?:\w+script|data):/i),Ec=Xe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),vc=Xe(/^html$/i),wc=Xe(/^[a-z][.\w]*(-[.\w]+)+$/i),va=Xe(/<[/\w!]/g),wa=Xe(/<[/\w]/g),Tc=Xe(/<\/no(script|embed|frames)/i),_c=Xe(/\/>/i),rt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Za=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Sc=ze(_e({},Za)),Ac=(function(){const r={};return _t(Za,o=>{r[o]=Xe(new RegExp("])","i"))}),ze(r)})(),Oc=function(){return typeof window>"u"?null:window},Rc=function(r,o){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let f=null;const g="data-tt-policy-suffix";o&&o.hasAttribute(g)&&(f=o.getAttribute(g));const R="dompurify"+(f?"#"+f:"");try{return r.createPolicy(R,{createHTML(y){return y},createScriptURL(y){return y}})}catch{return console.warn("TrustedTypes policy "+R+" could not be created."),null}},Ta=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},bt=function(r,o,f,g){return tt(r,o)&&xt(r[o])?_e(g.base?nt(g.base):{},r[o],g.transform):f},Tn=function(r,o,f){const g=tt(r,o)?r[o]:void 0;return g&&typeof g=="object"?nt(g):f()};function Ja(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Oc();const o=p=>Ja(p);if(o.version="3.4.15",o.removed=[],!r||!r.document||r.document.nodeType!==rt.document||!r.Element)return o.isSupported=!1,o;let f=r.document;const g=f,R=g.currentScript;r.DocumentFragment;const y=r.HTMLTemplateElement,T=r.Node,b=r.Element,d=r.NodeFilter;r.NamedNodeMap===void 0&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;const u=r.DOMParser,L=r.trustedTypes,j=b.prototype,ee=it(j,"cloneNode"),X=it(j,"remove"),q=it(j,"removeAttributeNode"),J=it(j,"nextSibling"),_=it(j,"childNodes"),S=it(j,"parentNode"),C=it(j,"shadowRoot"),E=it(j,"attributes"),B=T&&T.prototype?it(T.prototype,"nodeType"):null,k=T&&T.prototype?it(T.prototype,"nodeName"):null,Y=T&&T.prototype?it(T.prototype,"ownerDocument"):null,G=function(p){return B?B(p):p.nodeType},re=function(p){return k?k(p):p.nodeName};if(typeof y=="function"){const p=f.createElement("template");p.content&&p.content.ownerDocument&&(f=p.content.ownerDocument)}let w,ue="",P,ge=!1,me=0;const Se=function(){if(me>0)throw Tt('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Te=function(p){Se(),me++;try{return w.createHTML(p)}finally{me--}},he=function(p){Se(),me++;try{return w.createScriptURL(p)}finally{me--}},Oe=function(){return ge||(P=Rc(L,R),ge=!0),P},Be=f,Ee=Be.implementation,$e=Be.createNodeIterator,le=Be.createDocumentFragment,F=Be.getElementsByTagName,V=g.importNode;let z=Ta();o.isSupported=typeof Ka=="function"&&typeof S=="function"&&Ee&&Ee.createHTMLDocument!==void 0;const I=hc,U=dc,K=gc,te=yc,ie=mc,h=bc,m=Ec,s=wc;let a=Ea,O=null;const v=_e({},[...ga,...bn,...En,...vn,...ya]);let ne=null;const be=_e({},[...ma,...wn,...ba,...ir]);let $=Object.seal(Ct(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ye=null,Ce=null;const fe=Object.seal(Ct(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let pe=!0,Me=!0,Ue=!1,He=!0,je=!1,Ie=!0,Qe=!1,e=!1,n=null,c=null,N=!1,x=!1,H=!1,oe=!1,Re=!0,ke=!1;const Ne="user-content-";let Ae=!0,xe=!1,at={},Ke=null;const Ot=_e({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Xt=null;const st=_e({},["audio","video","img","source","image","track"]);let Kt=null;const t=_e({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),i="http://www.w3.org/1998/Math/MathML",l="http://www.w3.org/2000/svg",A="http://www.w3.org/1999/xhtml";let D=A,Q=!1,ae=null;const De=_e({},[i,l,A],mn),We=ze(["mi","mo","mn","ms","mtext"]);let Pe=_e({},We);const Le=ze(["annotation-xml"]);let Fe=_e({},Le);const es=_e({},["title","style","font","a","script"]);let kt=null;const ts=["application/xhtml+xml","text/html"],rs="text/html";let qe=null,Rt=null;const ns=f.createElement("form"),Mn=function(p){return p instanceof RegExp||p instanceof Function},fr=function(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Rt&&Rt===p)return;(!p||typeof p!="object")&&(p={}),p=nt(p),kt=ts.indexOf(p.PARSER_MEDIA_TYPE)===-1?rs:p.PARSER_MEDIA_TYPE,qe=kt==="application/xhtml+xml"?mn:Wt,O=bt(p,"ALLOWED_TAGS",v,{transform:qe}),ne=bt(p,"ALLOWED_ATTR",be,{transform:qe}),ae=bt(p,"ALLOWED_NAMESPACES",De,{transform:mn}),Kt=bt(p,"ADD_URI_SAFE_ATTR",t,{transform:qe,base:t}),Xt=bt(p,"ADD_DATA_URI_TAGS",st,{transform:qe,base:st}),Ke=bt(p,"FORBID_CONTENTS",Ot,{transform:qe}),ye=bt(p,"FORBID_TAGS",nt({}),{transform:qe}),Ce=bt(p,"FORBID_ATTR",nt({}),{transform:qe}),at=tt(p,"USE_PROFILES")?p.USE_PROFILES&&typeof p.USE_PROFILES=="object"?nt(p.USE_PROFILES):p.USE_PROFILES:!1,pe=p.ALLOW_ARIA_ATTR!==!1,Me=p.ALLOW_DATA_ATTR!==!1,Ue=p.ALLOW_UNKNOWN_PROTOCOLS||!1,He=p.ALLOW_SELF_CLOSE_IN_ATTR!==!1,je=p.SAFE_FOR_TEMPLATES||!1,Ie=p.SAFE_FOR_XML!==!1,Qe=p.WHOLE_DOCUMENT||!1,x=p.RETURN_DOM||!1,H=p.RETURN_DOM_FRAGMENT||!1,oe=p.RETURN_TRUSTED_TYPE||!1,N=p.FORCE_BODY||!1,Re=p.SANITIZE_DOM!==!1,ke=p.SANITIZE_NAMED_PROPS||!1,Ae=p.KEEP_CONTENT!==!1,xe=p.IN_PLACE||!1,a=lc(p.ALLOWED_URI_REGEXP)?p.ALLOWED_URI_REGEXP:Ea,D=typeof p.NAMESPACE=="string"?p.NAMESPACE:A,Pe=Tn(p,"MATHML_TEXT_INTEGRATION_POINTS",()=>_e({},We)),Fe=Tn(p,"HTML_INTEGRATION_POINTS",()=>_e({},Le));const W=Tn(p,"CUSTOM_ELEMENT_HANDLING",()=>Ct(null));if($=Ct(null),tt(W,"tagNameCheck")&&Mn(W.tagNameCheck)&&($.tagNameCheck=W.tagNameCheck),tt(W,"attributeNameCheck")&&Mn(W.attributeNameCheck)&&($.attributeNameCheck=W.attributeNameCheck),tt(W,"allowCustomizedBuiltInElements")&&typeof W.allowCustomizedBuiltInElements=="boolean"&&($.allowCustomizedBuiltInElements=W.allowCustomizedBuiltInElements),Xe($),je&&(Me=!1),H&&(x=!0),at&&(O=_e({},ya),ne=Ct(null),at.html===!0&&(_e(O,ga),_e(ne,ma)),at.svg===!0&&(_e(O,bn),_e(ne,wn),_e(ne,ir)),at.svgFilters===!0&&(_e(O,En),_e(ne,wn),_e(ne,ir)),at.mathMl===!0&&(_e(O,vn),_e(ne,ba),_e(ne,ir))),fe.tagCheck=null,fe.attributeCheck=null,tt(p,"ADD_TAGS")&&(typeof p.ADD_TAGS=="function"?fe.tagCheck=p.ADD_TAGS:xt(p.ADD_TAGS)&&(O===v&&(O=nt(O)),_e(O,p.ADD_TAGS,qe))),tt(p,"ADD_ATTR")&&(typeof p.ADD_ATTR=="function"?fe.attributeCheck=p.ADD_ATTR:xt(p.ADD_ATTR)&&(ne===be&&(ne=nt(ne)),_e(ne,p.ADD_ATTR,qe))),tt(p,"ADD_FORBID_CONTENTS")&&xt(p.ADD_FORBID_CONTENTS)&&(Ke===Ot&&(Ke=nt(Ke)),_e(Ke,p.ADD_FORBID_CONTENTS,qe)),Ae&&(O["#text"]=!0),Qe&&_e(O,["html","head","body"]),O.table&&(_e(O,["tbody"]),delete ye.tbody),p.TRUSTED_TYPES_POLICY){if(typeof p.TRUSTED_TYPES_POLICY.createHTML!="function")throw Tt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof p.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Tt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Z=w;w=p.TRUSTED_TYPES_POLICY;try{ue=Te("")}catch(se){throw w=Z,se}}else p.TRUSTED_TYPES_POLICY===null?(w=void 0,ue=""):(w===void 0&&(w=Oe()),w&&typeof ue=="string"&&(ue=Te("")));ze&&ze(p),Rt=p},jn=_e({},[...bn,...En,...fc]),kn=_e({},[...vn,...pc]),is=function(p,W,Z){return W.namespaceURI===A?p==="svg":W.namespaceURI===i?p==="svg"&&(Z==="annotation-xml"||Pe[Z]):!!jn[p]},os=function(p,W,Z){return W.namespaceURI===A?p==="math":W.namespaceURI===l?p==="math"&&Fe[Z]:!!kn[p]},as=function(p,W,Z){return W.namespaceURI===l&&!Fe[Z]||W.namespaceURI===i&&!Pe[Z]?!1:!kn[p]&&(es[p]||!jn[p])},ss=function(p){let W=S(p);(!W||!W.tagName)&&(W={namespaceURI:D,tagName:"template"});const Z=Wt(p.tagName),se=Wt(W.tagName);return ae[p.namespaceURI]?p.namespaceURI===l?is(Z,W,se):p.namespaceURI===i?os(Z,W,se):p.namespaceURI===A?as(Z,W,se):!!(kt==="application/xhtml+xml"&&ae[p.namespaceURI]):!1},vt=function(p){qt(o.removed,{element:p});try{S(p).removeChild(p)}catch{if(X(p),!S(p))throw Tt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Fn=function(p,W,Z){try{q(p,W)}catch{try{p.removeAttribute(Z)}catch{}}},Qt=function(p){Zt(p);const W=_(p);if(W){const se=[];_t(W,ce=>{qt(se,ce)}),_t(se,ce=>{try{X(ce)}catch{}})}const Z=E(p);if(Z)for(let se=Z.length-1;se>=0;--se){const ce=Z[se],de=ce&&ce.name;typeof de=="string"&&Fn(p,ce,de)}},wt=function(p,W,Z){if(!Z)try{Z=W.getAttributeNode(p)}catch{Z=null}qt(o.removed,{attribute:Z||null,from:W});try{Z?q(W,Z):W.removeAttribute(p)}catch{try{W.removeAttribute(p)}catch{}}if(p==="is")if(x||H)try{vt(W)}catch{}else try{W.setAttribute(p,"")}catch{}},us=function(p){const W=E(p);if(W)for(let Z=W.length-1;Z>=0;--Z){const se=W[Z],ce=se&&se.name;typeof ce!="string"||ne[qe(ce)]||Fn(p,se,ce)}},Zt=function(p){const W=[p];for(;W.length>0;){const Z=W.pop();G(Z)===rt.element&&us(Z);const se=_(Z);if(se)for(let ce=se.length-1;ce>=0;--ce)W.push(se[ce])}},Un=function(p,W){return Ie?p==="patchsrc"?!0:p==="for"&&W!=="label"&&W!=="output":!1},cs=function(p){if(!Ie)return;const W=[p];for(;W.length>0;){const Z=W.pop(),se=G(Z);if(se===rt.processingInstruction||se===rt.comment&&Je(wa,Z.data)){try{X(Z)}catch{}continue}if(se===rt.element){const de=Z,we=qe(re(Z));try{de.hasAttribute&&de.hasAttribute("patchsrc")&&de.removeAttribute("patchsrc"),de.hasAttribute&&de.hasAttribute("for")&&Un("for",we)&&de.removeAttribute("for")}catch{}}const ce=_(Z);if(ce)for(let de=ce.length-1;de>=0;--de)W.push(ce[de])}},qn=function(p){let W=null,Z=null;if(N)p=""+p;else{const de=fa(p,/^[\r\n\t ]+/);Z=de&&de[0]}kt==="application/xhtml+xml"&&D===A&&(p=''+p+"");const se=w?Te(p):p;if(D===A)try{W=new u().parseFromString(se,kt)}catch{}if(!W||!W.documentElement){W=Ee.createDocument(D,"template",null);try{W.documentElement.innerHTML=Q?ue:se}catch{}}const ce=W.body||W.documentElement;return p&&Z&&ce.insertBefore(f.createTextNode(Z),ce.childNodes[0]||null),D===A?F.call(W,Qe?"html":"body")[0]:Qe?W.documentElement:ce},Gn=function(p){const W=Y?Y(p):p.ownerDocument;return $e.call(W||p,p,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Jt=function(p){return p=Gt(p,I," "),p=Gt(p,U," "),p=Gt(p,K," "),p},pr=function(p){var W;p.normalize();const Z=Y?Y(p):p.ownerDocument,se=$e.call(Z||p,p,d.SHOW_TEXT|d.SHOW_COMMENT|d.SHOW_CDATA_SECTION|d.SHOW_PROCESSING_INSTRUCTION,null);let ce=se.nextNode();for(;ce;)ce.data=Jt(ce.data),ce=se.nextNode();const de=(W=p.querySelectorAll)===null||W===void 0?void 0:W.call(p,"template");de&&_t(de,we=>{It(we.content)&&pr(we.content)})},er=function(p){const W=k?k(p):null;return typeof W!="string"||qe(W)!=="form"?!1:typeof p.nodeName!="string"||typeof p.textContent!="string"||typeof p.removeChild!="function"||p.attributes!==E(p)||typeof p.removeAttribute!="function"||typeof p.removeAttributeNode!="function"||typeof p.getAttributeNode!="function"||typeof p.setAttribute!="function"||typeof p.namespaceURI!="string"||typeof p.insertBefore!="function"||typeof p.hasChildNodes!="function"||p.nodeType!==B(p)||p.childNodes!==_(p)},It=function(p){if(!B||typeof p!="object"||p===null)return!1;try{return B(p)===rt.documentFragment}catch{return!1}},Ft=function(p){if(!B||typeof p!="object"||p===null)return!1;try{return typeof B(p)=="number"}catch{return!1}};function lt(p,W,Z){p.length!==0&&_t(p,se=>{se.call(o,W,Z,Rt)})}const ls=function(p,W){return!!(Ie&&p.hasChildNodes()&&!Ft(p.firstElementChild)&&Je(va,p.textContent)&&Je(va,p.innerHTML)||Ie&&p.namespaceURI===A&&Sc[W]&&(Ft(p.firstElementChild)||typeof p.textContent=="string"&&Je(Ac[W],p.textContent))||p.nodeType===rt.processingInstruction||Ie&&p.nodeType===rt.comment&&Je(wa,p.data))},tr=function(p,W){if(p instanceof RegExp)return Je(p,W);if(p instanceof Function){for(var Z=arguments.length,se=new Array(Z>2?Z-2:0),ce=2;ce=0;--we){const ft=p===Z?ee(ce[we],!0):ce[we];se.insertBefore(ft,J(p))}}}return vt(p),!0},$n=function(p,W,Z,se){return p.length===0?W:W===Z||W===se?nt(W):W},Wn=function(p,W){return p===W||S(p)!==null?!1:(xe&&Zt(p),!0)},Vn=function(p,W){if(lt(z.beforeSanitizeElements,p,null),Wn(p,W))return!0;if(er(p))return vt(p),!0;const Z=qe(re(p));if(O=$n(z.uponSanitizeElement,O,v,n),lt(z.uponSanitizeElement,p,{tagName:Z,allowedTags:O}),Wn(p,W))return!0;if(ls(p,Z))return vt(p),!0;if(ye[Z]||!(fe.tagCheck instanceof Function&&fe.tagCheck(Z))&&!O[Z]){const se=fs(p,Z,W);return se===!1&<(z.afterSanitizeElements,p,null),se}if(G(p)===rt.element&&!ss(p)||(Z==="noscript"||Z==="noembed"||Z==="noframes")&&Je(Tc,p.innerHTML))return vt(p),!0;if(je&&p.nodeType===rt.text){const se=Jt(p.textContent);p.textContent!==se&&(qt(o.removed,{element:p.cloneNode()}),p.textContent=se)}return lt(z.afterSanitizeElements,p,null),!1},Yn=function(p,W,Z){if(Ce[W]||Un(W,p)||Re&&(W==="id"||W==="name")&&(Z in f||Z in ns))return!1;const se=ne[W]||fe.attributeCheck instanceof Function&&fe.attributeCheck(W,p);return Me&&Je(te,W)||pe&&Je(ie,W)?!0:se?Kt[W]||Je(a,Gt(Z,m,""))||(W==="src"||W==="xlink:href"||W==="href")&&p!=="script"&&pa(Z,"data:")===0&&Xt[p]||Ue&&!Je(h,Gt(Z,m,""))?!0:!Z:zn(p)&&tr($.tagNameCheck,p)&&tr($.attributeNameCheck,W,p)||W==="is"&&$.allowCustomizedBuiltInElements&&tr($.tagNameCheck,Z)},ps=_e({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),zn=function(p){return!ps[Wt(p)]&&Je(s,p)},hs=function(p,W,Z,se){if(w&&typeof L=="object"&&typeof L.getAttributeType=="function"&&!Z)switch(L.getAttributeType(p,W)){case"TrustedHTML":return Te(se);case"TrustedScriptURL":return he(se)}return se},ds=function(p,W,Z,se){try{return Z?p.setAttributeNS(Z,W,se):p.setAttribute(W,se),er(p)?(vt(p),!1):!0}catch{return wt(W,p),!1}},Hn=function(p){lt(z.beforeSanitizeAttributes,p,null);const W=p.attributes;if(!W||er(p))return;ne=$n(z.uponSanitizeAttribute,ne,be,c);const Z={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ne,forceKeepAttr:void 0};let se=W.length;const ce=qe(p.nodeName);for(;se--;){const de=W[se],we=de.name,ft=de.namespaceURI,mt=de.value,Ze=qe(we),ut=mt;let et=we==="value"?ut:ic(ut),Xn=!1;if(Z.attrName=Ze,Z.attrValue=et,Z.keepAttr=!0,Z.forceKeepAttr=void 0,lt(z.uponSanitizeAttribute,p,Z),et=Z.attrValue,ke&&(Ze==="id"||Ze==="name")&&pa(et,Ne)!==0&&(wt(we,p,de),et=Ne+et,Xn=!0),Ie&&Je(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,et)){wt(we,p,de);continue}if(Ze==="attributename"&&fa(et,"href")){wt(we,p,de);continue}if(!Z.forceKeepAttr){if(!Z.keepAttr){wt(we,p,de);continue}if(!He&&Je(_c,et)){wt(we,p,de);continue}if(je&&(et=Jt(et)),!Yn(ce,Ze,et)){wt(we,p,de);continue}et=hs(ce,Ze,ft,et),et!==ut&&ds(p,we,ft,et)&&Xn&&la(o.removed)}}lt(z.afterSanitizeAttributes,p,null)},rr=function(p){let W=null;const Z=Gn(p);for(lt(z.beforeSanitizeShadowDOM,p,null);W=Z.nextNode();)if(lt(z.uponSanitizeShadowNode,W,null),Vn(W,p),Hn(W),It(W.content)&&rr(W.content),G(W)===rt.element){const se=C(W);It(se)&&(hr(se),rr(se))}lt(z.afterSanitizeShadowDOM,p,null)},hr=function(p){const W=[{node:p,shadow:null}];for(;W.length>0;){const Z=W.pop();if(Z.shadow){rr(Z.shadow);continue}const se=Z.node,ce=G(se)===rt.element,de=_(se);if(de)for(let we=de.length-1;we>=0;--we)W.push({node:de[we],shadow:null});if(ce){const we=k?k(se):null;if(typeof we=="string"&&qe(we)==="template"){const ft=se.content;It(ft)&&W.push({node:ft,shadow:null})}}if(ce){const we=C(se);It(we)&&W.push({node:null,shadow:we},{node:we,shadow:null})}}};return o.sanitize=function(p){let W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,se=null,ce=null,de=null;if(Q=!p,Q&&(p=""),typeof p!="string"&&!Ft(p)&&(p=cc(p),typeof p!="string"))throw Tt("dirty is not a string, aborting");if(!o.isSupported)return p;e?(O=n,ne=c):fr(W),(z.uponSanitizeElement.length>0||z.uponSanitizeAttribute.length>0)&&(O=nt(O)),z.uponSanitizeAttribute.length>0&&(ne=nt(ne)),o.removed=[];const we=xe&&typeof p!="string"&&Ft(p);if(we){cs(p);const Ze=re(p);if(typeof Ze=="string"){const ut=qe(Ze);if(!O[ut]||ye[ut])throw Qt(p),Tt("root node is forbidden and cannot be sanitized in-place")}if(er(p))throw Qt(p),Tt("root node is clobbered and cannot be sanitized in-place");try{hr(p)}catch(ut){throw Qt(p),ut}}else if(Ft(p))Z=qn(""),se=Z.ownerDocument.importNode(p,!0),se.nodeType===rt.element&&se.nodeName==="BODY"||se.nodeName==="HTML"?Z=se:Z.appendChild(se),hr(Z);else{if(!x&&!je&&!Qe&&p.indexOf("<")===-1)return w&&oe?Te(p):p;if(Z=qn(p),!Z)return x?null:oe?ue:""}Z&&N&&vt(Z.firstChild);const ft=we?p:Z;try{const Ze=Gn(ft);for(;ce=Ze.nextNode();)Vn(ce,ft),Hn(ce),It(ce.content)&&rr(ce.content)}catch(Ze){throw we&&(Qt(p),_t(o.removed,ut=>{ut.element&&Zt(ut.element)})),Ze}if(we)return _t(o.removed,Ze=>{Ze.element&&Zt(Ze.element)}),je&&pr(p),p;if(x){if(je&&pr(Z),H)for(de=le.call(Z.ownerDocument);Z.firstChild;)de.appendChild(Z.firstChild);else de=Z;return(ne.shadowroot||ne.shadowrootmode)&&(de=V.call(g,de,!0)),de}let mt=Qe?Z.outerHTML:Z.innerHTML;return Qe&&O["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&Je(vc,Z.ownerDocument.doctype.name)&&(mt=" `+mt),je&&(mt=Jt(mt)),w&&oe?Te(mt):mt},o.setConfig=function(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};fr(p),e=!0,n=O,c=ne},o.clearConfig=function(){Rt=null,e=!1,n=null,c=null,w=P,ue=""},o.isValidAttribute=function(p,W,Z){Rt||fr({});const se=qe(p),ce=qe(W);return Yn(se,ce,Z)},o.addHook=function(p,W){typeof W=="function"&&tt(z,p)&&qt(z[p],W)},o.removeHook=function(p,W){if(tt(z,p)){if(W!==void 0){const Z=rc(z[p],W);return Z===-1?void 0:nc(z[p],Z,1)[0]}return la(z[p])}},o.removeHooks=function(p){tt(z,p)&&(z[p]=[])},o.removeAllHooks=function(){z=Ta()},o}Ja(),globalThis._nc_l10n_locale??=typeof document<"u"&&document.documentElement.dataset.locale||Intl.DateTimeFormat().resolvedOptions().locale.replaceAll(/-/g,"_"),globalThis._nc_l10n_language??=typeof document<"u"&&document.documentElement.lang||(globalThis.navigator?.language??"en"),globalThis._oc_l10n_registry_translations??={},globalThis._oc_l10n_registry_plural_functions??={};class Ic extends Gs{}function Nc(){return ct.registry??=new Ic,ct.registry}const Lc=Object.freeze({DEFAULT:"default",HIDDEN:"hidden"});function Bc(r){if(Cc(r),ct.fileActions??=new Map,ct.fileActions.has(r.id)){Vt.error(`FileAction ${r.id} already registered`,{action:r});return}ct.fileActions.set(r.id,r),Nc().dispatchTypedEvent("register:action",new CustomEvent("register:action",{detail:r}))}function Cc(r){if(!r.id||typeof r.id!="string")throw new Error("Invalid id");if(!r.displayName||typeof r.displayName!="function")throw new Error("Invalid displayName function");if("title"in r&&typeof r.title!="function")throw new Error("Invalid title function");if(!r.iconSvgInline||typeof r.iconSvgInline!="function")throw new Error("Invalid iconSvgInline function");if(!r.exec||typeof r.exec!="function")throw new Error("Invalid exec function");if("enabled"in r&&typeof r.enabled!="function")throw new Error("Invalid enabled function");if("execBatch"in r&&typeof r.execBatch!="function")throw new Error("Invalid execBatch function");if("order"in r&&typeof r.order!="number")throw new Error("Invalid order");if(r.destructive!==void 0&&typeof r.destructive!="boolean")throw new Error("Invalid destructive flag");if("parent"in r&&typeof r.parent!="string")throw new Error("Invalid parent");if(r.default&&!Object.values(Lc).includes(r.default))throw new Error("Invalid default");if("inline"in r&&typeof r.inline!="function")throw new Error("Invalid inline function");if("renderInline"in r&&typeof r.renderInline!="function")throw new Error("Invalid renderInline function");if("hotkey"in r&&r.hotkey!==void 0){if(typeof r.hotkey!="object")throw new Error("Invalid hotkey configuration");if(typeof r.hotkey.key!="string"||!r.hotkey.key)throw new Error("Missing or invalid hotkey key");if(typeof r.hotkey.description!="string"||!r.hotkey.description)throw new Error("Missing or invalid hotkey description")}}function Pc(r){if(xc(r),ct.filesSidebarActions??=new Map,ct.filesSidebarActions.has(r.id)){Vt.warn(`Sidebar action with id "${r.id}" already registered. Skipping.`);return}ct.filesSidebarActions.set(r.id,r),Vt.debug(`New sidebar action with id "${r.id}" registered.`)}function xc(r){if(typeof r!="object")throw new Error("Sidebar action is not an object");if(!r.id||typeof r.id!="string"||r.id!==CSS.escape(r.id))throw new Error("Sidebar actions need to have an id conforming to the HTML id attribute specifications");if(!r.displayName||typeof r.displayName!="function")throw new Error("Sidebar actions need to have a displayName function");if(!r.iconSvgInline||typeof r.iconSvgInline!="function")throw new Error("Sidebar actions need to have a iconSvgInline function");if(!r.enabled||typeof r.enabled!="function")throw new Error("Sidebar actions need to have an enabled function");if(!r.onClick||typeof r.onClick!="function")throw new Error("Sidebar actions need to have an onClick function")}function Dc(r){if(Mc(r),ct.filesSidebarTabs??=new Map,ct.filesSidebarTabs.has(r.id)){Vt.warn(`Sidebar tab with id "${r.id}" already registered. Skipping.`);return}ct.filesSidebarTabs.set(r.id,r),Vt.debug(`New sidebar tab with id "${r.id}" registered.`)}function Mc(r){if(typeof r!="object")throw new Error("Sidebar tab is not an object");if(!r.id||typeof r.id!="string"||r.id!==CSS.escape(r.id))throw new Error("Sidebar tabs need to have an id conforming to the HTML id attribute specifications");if(!r.tagName||typeof r.tagName!="string")throw new Error("Sidebar tabs need to have the tagName name set");if(!r.tagName.match(/^[a-z][a-z0-9-_]+$/))throw new Error('Sidebar tab "tagName" is invalid');if(!r.displayName||typeof r.displayName!="string")throw new Error("Sidebar tabs need to have a name set");if(typeof r.iconSvgInline!="string"||!Yu(r.iconSvgInline))throw new Error("Sidebar tabs need to have an valid SVG icon");if(typeof r.order!="number")throw new Error("Sidebar tabs need to have a numeric order set");if(r.enabled&&typeof r.enabled!="function")throw new Error('Sidebar tab "enabled" is not a function');if(r.onInit&&typeof r.onInit!="function")throw new Error('Sidebar tab "onInit" is not a function')}class jc{get#e(){return window.OCA?.Files?._sidebar?.()}get available(){return!!this.#e}get isOpen(){return this.#e?.isOpen??!1}get activeTab(){return this.#e?.activeTab}get node(){return this.#e?.node}open(o,f){this.#e?.open(o,f)}close(){this.#e?.close()}setActiveTab(o){this.#e?.setActiveTab(o)}registerTab(o){Dc(o)}getTabs(o){return this.#e?.getTabs(o)??[]}getActions(o){return this.#e?.getActions(o)??[]}registerAction(o){Pc(o)}}function In(){return new jc}const kc='';function _a(r){const[o]=r.nodes;if(!o)return;const f=In().getTabs({node:o,folder:r.folder,view:r.view});if(zu("comments","activityEnabled",!1)&&f.some(({id:g})=>g==="activity"))return"activity";if(f.some(({id:g})=>g==="comments"))return"comments"}const Fc={id:"korean-comments-action",displayName:()=>"댓글",title:()=>"댓글",iconSvgInline:()=>kc,enabled(r){const[o]=r.nodes;return r.nodes.length===1&&o!==void 0&&o.root.startsWith("/files/")&&o.permissions!==qs.NONE&&In().available&&_a(r)!==void 0},async exec(r){const[o]=r.nodes,f=_a(r);if(!o||!f)return!1;try{const g=In();return g.isOpen&&g.node?.source===o.source?g.setActiveTab(f):g.open(o,f),null}catch(g){return console.error("Could not open the comments sidebar",g),!1}},inline:()=>!0,order:-45};Bc(Fc); //# sourceMappingURL=korean_comments_action-main.mjs.map