import{s as ie,l as de}from"./public-Sa--me8z.chunk.mjs";import{h as ce,p as Y,f as Gn}from"./index-Bndk0DrU.chunk.mjs";import{a as wt,r as vt,B as Re}from"./string_decoder-BO00msnV.chunk.mjs";import{a as Hn}from"./translation-DoG5ZELJ-Bni_xMHF.chunk.mjs";var Tn=class extends EventTarget{dispatchTypedEvent(t,c){return super.dispatchEvent(c)}},Nt={},_e={exports:{}},Ot;function _t(){if(Ot)return _e.exports;Ot=1;var t=typeof Reflect=="object"?Reflect:null,c=t&&typeof t.apply=="function"?t.apply:function(f,w,S){return Function.prototype.apply.call(f,w,S)},h;t&&typeof t.ownKeys=="function"?h=t.ownKeys:Object.getOwnPropertySymbols?h=function(f){return Object.getOwnPropertyNames(f).concat(Object.getOwnPropertySymbols(f))}:h=function(f){return Object.getOwnPropertyNames(f)};function g(f){console&&console.warn&&console.warn(f)}var O=Number.isNaN||function(f){return f!==f};function p(){p.init.call(this)}_e.exports=p,_e.exports.once=D,p.EventEmitter=p,p.prototype._events=void 0,p.prototype._eventsCount=0,p.prototype._maxListeners=void 0;var b=10;function s(f){if(typeof f!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof f)}Object.defineProperty(p,"defaultMaxListeners",{enumerable:!0,get:function(){return b},set:function(f){if(typeof f!="number"||f<0||O(f))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+f+".");b=f}}),p.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},p.prototype.setMaxListeners=function(f){if(typeof f!="number"||f<0||O(f))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+f+".");return this._maxListeners=f,this};function d(f){return f._maxListeners===void 0?p.defaultMaxListeners:f._maxListeners}p.prototype.getMaxListeners=function(){return d(this)},p.prototype.emit=function(f){for(var w=[],S=1;S0&&(a=w[0]),a instanceof Error)throw a;var q=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw q.context=a,q}var H=k[f];if(H===void 0)return!1;if(typeof H=="function")c(H,this,w);else for(var W=H.length,z=j(H,W),S=0;S0&&q.length>k&&!q.warned){q.warned=!0;var H=new Error("Possible EventEmitter memory leak detected. "+q.length+" "+String(w)+" listeners added. Use emitter.setMaxListeners() to increase limit");H.name="MaxListenersExceededWarning",H.emitter=f,H.type=w,H.count=q.length,g(H)}return f}p.prototype.addListener=function(f,w){return v(this,f,w,!1)},p.prototype.on=p.prototype.addListener,p.prototype.prependListener=function(f,w){return v(this,f,w,!0)};function m(){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 E(f,w,S){var M={fired:!1,wrapFn:void 0,target:f,type:w,listener:S},k=m.bind(M);return k.listener=S,M.wrapFn=k,k}p.prototype.once=function(f,w){return s(w),this.on(f,E(this,f,w)),this},p.prototype.prependOnceListener=function(f,w){return s(w),this.prependListener(f,E(this,f,w)),this},p.prototype.removeListener=function(f,w){var S,M,k,a,q;if(s(w),M=this._events,M===void 0)return this;if(S=M[f],S===void 0)return this;if(S===w||S.listener===w)--this._eventsCount===0?this._events=Object.create(null):(delete M[f],M.removeListener&&this.emit("removeListener",f,S.listener||w));else if(typeof S!="function"){for(k=-1,a=S.length-1;a>=0;a--)if(S[a]===w||S[a].listener===w){q=S[a].listener,k=a;break}if(k<0)return this;k===0?S.shift():R(S,k),S.length===1&&(M[f]=S[0]),M.removeListener!==void 0&&this.emit("removeListener",f,q||w)}return this},p.prototype.off=p.prototype.removeListener,p.prototype.removeAllListeners=function(f){var w,S,M;if(S=this._events,S===void 0)return this;if(S.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):S[f]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete S[f]),this;if(arguments.length===0){var k=Object.keys(S),a;for(M=0;M=0;M--)this.removeListener(f,w[M]);return this};function I(f,w,S){var M=f._events;if(M===void 0)return[];var k=M[w];return k===void 0?[]:typeof k=="function"?S?[k.listener||k]:[k]:S?A(k):j(k,k.length)}p.prototype.listeners=function(f){return I(this,f,!0)},p.prototype.rawListeners=function(f){return I(this,f,!1)},p.listenerCount=function(f,w){return typeof f.listenerCount=="function"?f.listenerCount(w):F.call(f,w)},p.prototype.listenerCount=F;function F(f){var w=this._events;if(w!==void 0){var S=w[f];if(typeof S=="function")return 1;if(S!==void 0)return S.length}return 0}p.prototype.eventNames=function(){return this._eventsCount>0?h(this._events):[]};function j(f,w){for(var S=new Array(w),M=0;M"u"||!M?t:M(Uint8Array),$={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?t:ArrayBuffer,"%ArrayIteratorPrototype%":S&&M?M([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":W,"%AsyncGenerator%":W,"%AsyncGeneratorFunction%":W,"%AsyncIteratorPrototype%":W,"%Atomics%":typeof Atomics>"u"?t:Atomics,"%BigInt%":typeof BigInt>"u"?t:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?t:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":h,"%eval%":eval,"%EvalError%":g,"%Float16Array%":typeof Float16Array>"u"?t:Float16Array,"%Float32Array%":typeof Float32Array>"u"?t:Float32Array,"%Float64Array%":typeof Float64Array>"u"?t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?t:FinalizationRegistry,"%Function%":A,"%GeneratorFunction%":W,"%Int8Array%":typeof Int8Array>"u"?t:Int8Array,"%Int16Array%":typeof Int16Array>"u"?t:Int16Array,"%Int32Array%":typeof Int32Array>"u"?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S&&M?M(M([][Symbol.iterator]())):t,"%JSON%":typeof JSON=="object"?JSON:t,"%Map%":typeof Map>"u"?t:Map,"%MapIteratorPrototype%":typeof Map>"u"||!S||!M?t:M(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":c,"%Object.getOwnPropertyDescriptor%":P,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?t:Promise,"%Proxy%":typeof Proxy>"u"?t:Proxy,"%RangeError%":O,"%ReferenceError%":p,"%Reflect%":typeof Reflect>"u"?t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?t:Set,"%SetIteratorPrototype%":typeof Set>"u"||!S||!M?t:M(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&M?M(""[Symbol.iterator]()):t,"%Symbol%":S?Symbol:t,"%SyntaxError%":b,"%ThrowTypeError%":w,"%TypedArray%":z,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?t:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?t:Uint32Array,"%URIError%":d,"%WeakMap%":typeof WeakMap>"u"?t:WeakMap,"%WeakRef%":typeof WeakRef>"u"?t:WeakRef,"%WeakSet%":typeof WeakSet>"u"?t:WeakSet,"%Function.prototype.call%":H,"%Function.prototype.apply%":q,"%Object.defineProperty%":L,"%Object.getPrototypeOf%":k,"%Math.abs%":v,"%Math.floor%":m,"%Math.max%":E,"%Math.min%":I,"%Math.pow%":F,"%Math.round%":j,"%Math.sign%":R,"%Reflect.getPrototypeOf%":a};if(M)try{null.error}catch(u){var K=M(M(u));$["%Error.prototype%"]=K}var re=function u(o){var n;if(o==="%AsyncFunction%")n=D("async function () {}");else if(o==="%GeneratorFunction%")n=D("function* () {}");else if(o==="%AsyncGeneratorFunction%")n=D("async function* () {}");else if(o==="%AsyncGenerator%"){var i=u("%AsyncGeneratorFunction%");i&&(n=i.prototype)}else if(o==="%AsyncIteratorPrototype%"){var _=u("%AsyncGenerator%");_&&M&&(n=M(_.prototype))}return $[o]=n,n},G={__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"]},Z=ve(),J=jn(),X=Z.call(H,Array.prototype.concat),ee=Z.call(q,Array.prototype.splice),te=Z.call(H,String.prototype.replace),y=Z.call(H,String.prototype.slice),T=Z.call(H,RegExp.prototype.exec),C=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,l=/\\(\\)?/g,r=function(u){var o=y(u,0,1),n=y(u,-1);if(o==="%"&&n!=="%")throw new b("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&o!=="%")throw new b("invalid intrinsic syntax, expected opening `%`");var i=[];return te(u,C,function(_,x,B,U){i[i.length]=B?te(U,l,"$1"):x||_}),i},e=function(u,o){var n=u,i;if(J(G,n)&&(i=G[n],n="%"+i[0]+"%"),J($,n)){var _=$[n];if(_===W&&(_=re(n)),typeof _>"u"&&!o)throw new s("intrinsic "+u+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:_}}throw new b("intrinsic "+u+" does not exist!")};return Ve=function(u,o){if(typeof u!="string"||u.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof o!="boolean")throw new s('"allowMissing" argument must be a boolean');if(T(/^%?[^%]*%?$/,u)===null)throw new b("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=r(u),i=n.length>0?n[0]:"",_=e("%"+i+"%",o),x=_.name,B=_.value,U=!1,V=_.alias;V&&(i=V[0],ee(n,X([0,1],V)));for(var Q=1,N=!0;Q=n.length){var se=P(B,ne);N=!!se,N&&"get"in se&&!("originalValue"in se.get)?B=se.get:B=B[ne]}else N=J(B,ne),B=B[ne];N&&!U&&($[x]=B)}}return B},Ve}var We,Lr;function we(){if(Lr)return We;Lr=1;var t=Pn(),c=St(),h=c([t("%String.prototype.indexOf%")]);return We=function(g,O){var p=t(g,!!O);return typeof p=="function"&&h(g,".prototype.")>-1?c([p]):p},We}var qe,kr;function li(){if(kr)return qe;kr=1;var t=Ee()(),c=we(),h=c("Object.prototype.toString"),g=function(b){return t&&b&&typeof b=="object"&&Symbol.toStringTag in b?!1:h(b)==="[object Arguments]"},O=function(b){return g(b)?!0:b!==null&&typeof b=="object"&&"length"in b&&typeof b.length=="number"&&b.length>=0&&h(b)!=="[object Array]"&&"callee"in b&&h(b.callee)==="[object Function]"},p=(function(){return g(arguments)})();return g.isLegacyArguments=O,qe=p?g:O,qe}var Ge,Fr;function fi(){if(Fr)return Ge;Fr=1;var t=we(),c=Ee()(),h=jn(),g=ye(),O;if(c){var p=t("RegExp.prototype.exec"),b={},s=function(){throw b},d={toString:s,valueOf:s};typeof Symbol.toPrimitive=="symbol"&&(d[Symbol.toPrimitive]=s),O=function(E){if(!E||typeof E!="object")return!1;var I=g(E,"lastIndex"),F=I&&h(I,"value");if(!F)return!1;try{p(E,d)}catch(j){return j===b}}}else{var v=t("Object.prototype.toString"),m="[object RegExp]";O=function(E){return!E||typeof E!="object"&&typeof E!="function"?!1:v(E)===m}}return Ge=O,Ge}var He,Br;function pi(){if(Br)return He;Br=1;var t=we(),c=fi(),h=t("RegExp.prototype.exec"),g=me();return He=function(O){if(!c(O))throw new g("`regex` must be a RegExp");return function(p){return h(O,p)!==null}},He}var Ye,Ur;function di(){if(Ur)return Ye;Ur=1;const t=function*(){}.constructor;return Ye=()=>t,Ye}var ze,Vr;function hi(){if(Vr)return ze;Vr=1;var t=we(),c=pi(),h=c(/^\s*(?:function)?\*/),g=Ee()(),O=At(),p=t("Object.prototype.toString"),b=t("Function.prototype.toString"),s=di();return ze=function(d){if(typeof d!="function")return!1;if(h(b(d)))return!0;if(!g){var v=p(d);return v==="[object GeneratorFunction]"}if(!O)return!1;var m=s();return m&&O(d)===m.prototype},ze}var Xe,Wr;function yi(){if(Wr)return Xe;Wr=1;var t=Function.prototype.toString,c=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,h,g;if(typeof c=="function"&&typeof Object.defineProperty=="function")try{h=Object.defineProperty({},"length",{get:function(){throw g}}),g={},c(function(){throw 42},null,h)}catch(P){P!==g&&(c=null)}else c=null;var O=/^\s*class\b/,p=function(P){try{var L=t.call(P);return O.test(L)}catch{return!1}},b=function(P){try{return p(P)?!1:(t.call(P),!0)}catch{return!1}},s=Object.prototype.toString,d="[object Object]",v="[object Function]",m="[object GeneratorFunction]",E="[object HTMLAllCollection]",I="[object HTML document.all class]",F="[object HTMLCollection]",j=typeof Symbol=="function"&&!!Symbol.toStringTag,R=!(0 in[,]),A=function(){return!1};if(typeof document=="object"){var D=document.all;s.call(D)===s.call(document.all)&&(A=function(P){if((R||!P)&&(typeof P>"u"||typeof P=="object"))try{var L=s.call(P);return(L===E||L===I||L===F||L===d)&&P("")==null}catch{}return!1})}return Xe=c?function(P){if(A(P))return!0;if(!P||typeof P!="function"&&typeof P!="object")return!1;try{c(P,null,h)}catch(L){if(L!==g)return!1}return!p(P)&&b(P)}:function(P){if(A(P))return!0;if(!P||typeof P!="function"&&typeof P!="object")return!1;if(j)return b(P);if(p(P))return!1;var L=s.call(P);return L!==v&&L!==m&&!/^\[object HTML/.test(L)?!1:b(P)},Xe}var $e,qr;function gi(){if(qr)return $e;qr=1;var t=yi(),c=Object.prototype.toString,h=Object.prototype.hasOwnProperty,g=function(s,d,v){for(var m=0,E=s.length;m=3&&(m=v),b(s)?g(s,d,m):typeof s=="string"?O(s,d,m):p(s,d,m)},$e}var Gr,Hr;function bi(){return Hr||(Hr=1,Gr=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Gr}var Qe,Yr;function mi(){if(Yr)return Qe;Yr=1;var t=bi(),c=typeof globalThis>"u"?ce:globalThis;return Qe=function(){for(var h=[],g=0;g3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new h("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new h("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new h("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new h("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,d=arguments.length>4?arguments[4]:null,v=arguments.length>5?arguments[5]:null,m=arguments.length>6?arguments[6]:!1,E=!!g&&g(O,p);if(t)t(O,p,{configurable:v===null&&E?E.configurable:!v,enumerable:s===null&&E?E.enumerable:!s,value:b,writable:d===null&&E?E.writable:!d});else if(m||!s&&!d&&!v)O[p]=b;else throw new c("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Je}var Ke,$r;function wi(){if($r)return Ke;$r=1;var t=Te(),c=function(){return!!t};return c.hasArrayLengthDefineBug=function(){if(!t)return null;try{return t([],"length",{value:1}).length!==1}catch{return!0}},Ke=c,Ke}var Ze,Qr;function _i(){if(Qr)return Ze;Qr=1;var t=Pn(),c=vi(),h=wi()(),g=ye(),O=me(),p=t("%Math.floor%");return Ze=function(b,s){if(typeof b!="function")throw new O("`fn` is not a function");if(typeof s!="number"||s<0||s>4294967295||p(s)!==s)throw new O("`length` must be a positive 32-bit integer");var d=arguments.length>2&&!!arguments[2],v=!0,m=!0;if("length"in b&&g){var E=g(b,"length");E&&!E.configurable&&(v=!1),E&&!E.writable&&(m=!1)}return(v||m||!d)&&(h?c(b,"length",s,!0,!0):c(b,"length",s)),b},Ze}var et,Jr;function Ei(){if(Jr)return et;Jr=1;var t=ve(),c=Tt(),h=Dn();return et=function(){return h(t,c,arguments)},et}var Kr;function Ti(){return Kr||(Kr=1,(function(t){var c=_i(),h=Te(),g=St(),O=Ei();t.exports=function(p){var b=g(arguments),s=p.length-(arguments.length-1);return c(b,1+(s>0?s:0),!0)},h?h(t.exports,"apply",{value:O}):t.exports.apply=O})(zr)),zr.exports}var tt,Zr;function xn(){if(Zr)return tt;Zr=1;var t=gi(),c=mi(),h=Ti(),g=we(),O=ye(),p=At(),b=g("Object.prototype.toString"),s=Ee()(),d=typeof globalThis>"u"?ce:globalThis,v=c(),m=g("String.prototype.slice"),E=g("Array.prototype.indexOf",!0)||function(R,A){for(var D=0;D-1?A:A!=="Object"?!1:j(R)}return O?F(R):null},tt}var rt,en;function Si(){if(en)return rt;en=1;var t=xn();return rt=function(c){return!!t(c)},rt}var tn;function Ai(){return tn||(tn=1,(function(t){var c=li(),h=hi(),g=xn(),O=Si();function p(N){return N.call.bind(N)}var b=typeof BigInt<"u",s=typeof Symbol<"u",d=p(Object.prototype.toString),v=p(Number.prototype.valueOf),m=p(String.prototype.valueOf),E=p(Boolean.prototype.valueOf);if(b)var I=p(BigInt.prototype.valueOf);if(s)var F=p(Symbol.prototype.valueOf);function j(N,ne){if(typeof N!="object")return!1;try{return ne(N),!0}catch{return!1}}t.isArgumentsObject=c,t.isGeneratorFunction=h,t.isTypedArray=O;function R(N){return typeof Promise<"u"&&N instanceof Promise||N!==null&&typeof N=="object"&&typeof N.then=="function"&&typeof N.catch=="function"}t.isPromise=R;function A(N){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(N):O(N)||y(N)}t.isArrayBufferView=A;function D(N){return g(N)==="Uint8Array"}t.isUint8Array=D;function P(N){return g(N)==="Uint8ClampedArray"}t.isUint8ClampedArray=P;function L(N){return g(N)==="Uint16Array"}t.isUint16Array=L;function f(N){return g(N)==="Uint32Array"}t.isUint32Array=f;function w(N){return g(N)==="Int8Array"}t.isInt8Array=w;function S(N){return g(N)==="Int16Array"}t.isInt16Array=S;function M(N){return g(N)==="Int32Array"}t.isInt32Array=M;function k(N){return g(N)==="Float32Array"}t.isFloat32Array=k;function a(N){return g(N)==="Float64Array"}t.isFloat64Array=a;function q(N){return g(N)==="BigInt64Array"}t.isBigInt64Array=q;function H(N){return g(N)==="BigUint64Array"}t.isBigUint64Array=H;function W(N){return d(N)==="[object Map]"}W.working=typeof Map<"u"&&W(new Map);function z(N){return typeof Map>"u"?!1:W.working?W(N):N instanceof Map}t.isMap=z;function $(N){return d(N)==="[object Set]"}$.working=typeof Set<"u"&&$(new Set);function K(N){return typeof Set>"u"?!1:$.working?$(N):N instanceof Set}t.isSet=K;function re(N){return d(N)==="[object WeakMap]"}re.working=typeof WeakMap<"u"&&re(new WeakMap);function G(N){return typeof WeakMap>"u"?!1:re.working?re(N):N instanceof WeakMap}t.isWeakMap=G;function Z(N){return d(N)==="[object WeakSet]"}Z.working=typeof WeakSet<"u"&&Z(new WeakSet);function J(N){return Z(N)}t.isWeakSet=J;function X(N){return d(N)==="[object ArrayBuffer]"}X.working=typeof ArrayBuffer<"u"&&X(new ArrayBuffer);function ee(N){return typeof ArrayBuffer>"u"?!1:X.working?X(N):N instanceof ArrayBuffer}t.isArrayBuffer=ee;function te(N){return d(N)==="[object DataView]"}te.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&te(new DataView(new ArrayBuffer(1),0,1));function y(N){return typeof DataView>"u"?!1:te.working?te(N):N instanceof DataView}t.isDataView=y;var T=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function C(N){return d(N)==="[object SharedArrayBuffer]"}function l(N){return typeof T>"u"?!1:(typeof C.working>"u"&&(C.working=C(new T)),C.working?C(N):N instanceof T)}t.isSharedArrayBuffer=l;function r(N){return d(N)==="[object AsyncFunction]"}t.isAsyncFunction=r;function e(N){return d(N)==="[object Map Iterator]"}t.isMapIterator=e;function u(N){return d(N)==="[object Set Iterator]"}t.isSetIterator=u;function o(N){return d(N)==="[object Generator]"}t.isGeneratorObject=o;function n(N){return d(N)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=n;function i(N){return j(N,v)}t.isNumberObject=i;function _(N){return j(N,m)}t.isStringObject=_;function x(N){return j(N,E)}t.isBooleanObject=x;function B(N){return b&&j(N,I)}t.isBigIntObject=B;function U(N){return s&&j(N,F)}t.isSymbolObject=U;function V(N){return i(N)||_(N)||x(N)||B(N)||U(N)}t.isBoxedPrimitive=V;function Q(N){return typeof Uint8Array<"u"&&(ee(N)||l(N))}t.isAnyArrayBuffer=Q,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(N){Object.defineProperty(t,N,{enumerable:!1,value:function(){throw new Error(N+" is not supported in userland")}})})})(xt)),xt}var rn,nn;function Ri(){return nn||(nn=1,rn=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}),rn}var on;function Cn(){return on||(on=1,(function(t){var c={},h=Object.getOwnPropertyDescriptors||function(y){for(var T=Object.keys(y),C={},l=0;l=r)return n;switch(n){case"%s":return String(l[C++]);case"%d":return Number(l[C++]);case"%j":try{return JSON.stringify(l[C++])}catch{return"[Circular]"}default:return n}}),u=l[C];C"u")return function(){return t.deprecate(y,T).apply(this,arguments)};var C=!1;function l(){if(!C){if(Y.throwDeprecation)throw new Error(T);Y.traceDeprecation?console.trace(T):console.error(T),C=!0}return y.apply(this,arguments)}return l};var O={},p=/^$/;if(c.NODE_DEBUG){var b=c.NODE_DEBUG;b=b.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),p=new RegExp("^"+b+"$","i")}t.debuglog=function(y){if(y=y.toUpperCase(),!O[y])if(p.test(y)){var T=Y.pid;O[y]=function(){var C=t.format.apply(t,arguments);console.error("%s %d: %s",y,T,C)}}else O[y]=function(){};return O[y]};function s(y,T){var C={seen:[],stylize:v};return arguments.length>=3&&(C.depth=arguments[2]),arguments.length>=4&&(C.colors=arguments[3]),P(T)?C.showHidden=T:T&&t._extend(C,T),k(C.showHidden)&&(C.showHidden=!1),k(C.depth)&&(C.depth=2),k(C.colors)&&(C.colors=!1),k(C.customInspect)&&(C.customInspect=!0),C.colors&&(C.stylize=d),E(C,y,C.depth)}t.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function d(y,T){var C=s.styles[T];return C?"\x1B["+s.colors[C][0]+"m"+y+"\x1B["+s.colors[C][1]+"m":y}function v(y,T){return y}function m(y){var T={};return y.forEach(function(C,l){T[C]=!0}),T}function E(y,T,C){if(y.customInspect&&T&&z(T.inspect)&&T.inspect!==t.inspect&&!(T.constructor&&T.constructor.prototype===T)){var l=T.inspect(C,y);return S(l)||(l=E(y,l,C)),l}var r=I(y,T);if(r)return r;var e=Object.keys(T),u=m(e);if(y.showHidden&&(e=Object.getOwnPropertyNames(T)),W(T)&&(e.indexOf("message")>=0||e.indexOf("description")>=0))return F(T);if(e.length===0){if(z(T)){var o=T.name?": "+T.name:"";return y.stylize("[Function"+o+"]","special")}if(a(T))return y.stylize(RegExp.prototype.toString.call(T),"regexp");if(H(T))return y.stylize(Date.prototype.toString.call(T),"date");if(W(T))return F(T)}var n="",i=!1,_=["{","}"];if(D(T)&&(i=!0,_=["[","]"]),z(T)){var x=T.name?": "+T.name:"";n=" [Function"+x+"]"}if(a(T)&&(n=" "+RegExp.prototype.toString.call(T)),H(T)&&(n=" "+Date.prototype.toUTCString.call(T)),W(T)&&(n=" "+F(T)),e.length===0&&(!i||T.length==0))return _[0]+n+_[1];if(C<0)return a(T)?y.stylize(RegExp.prototype.toString.call(T),"regexp"):y.stylize("[Object]","special");y.seen.push(T);var B;return i?B=j(y,T,C,u,e):B=e.map(function(U){return R(y,T,C,u,U,i)}),y.seen.pop(),A(B,n,_)}function I(y,T){if(k(T))return y.stylize("undefined","undefined");if(S(T)){var C="'"+JSON.stringify(T).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return y.stylize(C,"string")}if(w(T))return y.stylize(""+T,"number");if(P(T))return y.stylize(""+T,"boolean");if(L(T))return y.stylize("null","null")}function F(y){return"["+Error.prototype.toString.call(y)+"]"}function j(y,T,C,l,r){for(var e=[],u=0,o=T.length;u-1&&(e?o=o.split(` `).map(function(i){return" "+i}).join(` `).slice(2):o=` `+o.split(` `).map(function(i){return" "+i}).join(` `))):o=y.stylize("[Circular]","special")),k(u)){if(e&&r.match(/^\d+$/))return o;u=JSON.stringify(""+r),u.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.slice(1,-1),u=y.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=y.stylize(u,"string"))}return u+": "+o}function A(y,T,C){var l=y.reduce(function(r,e){return e.indexOf(` `)>=0,r+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return l>60?C[0]+(T===""?"":T+` `)+" "+y.join(`, `)+" "+C[1]:C[0]+T+" "+y.join(", ")+" "+C[1]}t.types=Ai();function D(y){return Array.isArray(y)}t.isArray=D;function P(y){return typeof y=="boolean"}t.isBoolean=P;function L(y){return y===null}t.isNull=L;function f(y){return y==null}t.isNullOrUndefined=f;function w(y){return typeof y=="number"}t.isNumber=w;function S(y){return typeof y=="string"}t.isString=S;function M(y){return typeof y=="symbol"}t.isSymbol=M;function k(y){return y===void 0}t.isUndefined=k;function a(y){return q(y)&&K(y)==="[object RegExp]"}t.isRegExp=a,t.types.isRegExp=a;function q(y){return typeof y=="object"&&y!==null}t.isObject=q;function H(y){return q(y)&&K(y)==="[object Date]"}t.isDate=H,t.types.isDate=H;function W(y){return q(y)&&(K(y)==="[object Error]"||y instanceof Error)}t.isError=W,t.types.isNativeError=W;function z(y){return typeof y=="function"}t.isFunction=z;function $(y){return y===null||typeof y=="boolean"||typeof y=="number"||typeof y=="string"||typeof y=="symbol"||typeof y>"u"}t.isPrimitive=$,t.isBuffer=Ri();function K(y){return Object.prototype.toString.call(y)}function re(y){return y<10?"0"+y.toString(10):y.toString(10)}var G=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Z(){var y=new Date,T=[re(y.getHours()),re(y.getMinutes()),re(y.getSeconds())].join(":");return[y.getDate(),G[y.getMonth()],T].join(" ")}t.log=function(){console.log("%s - %s",Z(),t.format.apply(t,arguments))},t.inherits=le(),t._extend=function(y,T){if(!T||!q(T))return y;for(var C=Object.keys(T),l=C.length;l--;)y[C[l]]=T[C[l]];return y};function J(y,T){return Object.prototype.hasOwnProperty.call(y,T)}var X=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;t.promisify=function(y){if(typeof y!="function")throw new TypeError('The "original" argument must be of type Function');if(X&&y[X]){var T=y[X];if(typeof T!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(T,X,{value:T,enumerable:!1,writable:!1,configurable:!0}),T}function T(){for(var C,l,r=new Promise(function(o,n){C=o,l=n}),e=[],u=0;u0?this.tail.next=A:this.head=A,this.tail=A,++this.length}},{key:"unshift",value:function(R){var A={data:R,next:this.head};this.length===0&&(this.tail=A),this.head=A,++this.length}},{key:"shift",value:function(){if(this.length!==0){var R=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,R}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(R){if(this.length===0)return"";for(var A=this.head,D=""+A.data;A=A.next;)D+=R+A.data;return D}},{key:"concat",value:function(R){if(this.length===0)return v.alloc(0);for(var A=v.allocUnsafe(R>>>0),D=this.head,P=0;D;)F(D.data,A,P),P+=D.data.length,D=D.next;return A}},{key:"consume",value:function(R,A){var D;return RL.length?L.length:R;if(f===L.length?P+=L:P+=L.slice(0,R),R-=f,R===0){f===L.length?(++D,A.next?this.head=A.next:this.head=this.tail=null):(this.head=A,A.data=L.slice(f));break}++D}return this.length-=D,P}},{key:"_getBuffer",value:function(R){var A=v.allocUnsafe(R),D=this.head,P=1;for(D.data.copy(A),R-=D.data.length;D=D.next;){var L=D.data,f=R>L.length?L.length:R;if(L.copy(A,A.length-R,0,f),R-=f,R===0){f===L.length?(++P,D.next?this.head=D.next:this.head=this.tail=null):(this.head=D,D.data=L.slice(f));break}++P}return this.length-=P,A}},{key:I,value:function(R,A){return E(this,c(c({},A),{},{depth:0,customInspect:!1}))}}]),j})(),nt}var it,un;function Mn(){if(un)return it;un=1;function t(b,s){var d=this,v=this._readableState&&this._readableState.destroyed,m=this._writableState&&this._writableState.destroyed;return v||m?(s?s(b):b&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Y.nextTick(O,this,b)):Y.nextTick(O,this,b)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(b||null,function(E){!s&&E?d._writableState?d._writableState.errorEmitted?Y.nextTick(h,d):(d._writableState.errorEmitted=!0,Y.nextTick(c,d,E)):Y.nextTick(c,d,E):s?(Y.nextTick(h,d),s(E)):Y.nextTick(h,d)}),this)}function c(b,s){O(b,s),h(b)}function h(b){b._writableState&&!b._writableState.emitClose||b._readableState&&!b._readableState.emitClose||b.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 O(b,s){b.emit("error",s)}function p(b,s){var d=b._readableState,v=b._writableState;d&&d.autoDestroy||v&&v.autoDestroy?b.destroy(s):b.emit("error",s)}return it={destroy:t,undestroy:g,errorOrDestroy:p},it}var ot={},sn;function ge(){if(sn)return ot;sn=1;function t(s,d){s.prototype=Object.create(d.prototype),s.prototype.constructor=s,s.__proto__=d}var c={};function h(s,d,v){v||(v=Error);function m(I,F,j){return typeof d=="string"?d:d(I,F,j)}var E=(function(I){t(F,I);function F(j,R,A){return I.call(this,m(j,R,A))||this}return F})(v);E.prototype.name=v.name,E.prototype.code=s,c[s]=E}function g(s,d){if(Array.isArray(s)){var v=s.length;return s=s.map(function(m){return String(m)}),v>2?"one of ".concat(d," ").concat(s.slice(0,v-1).join(", "),", or ")+s[v-1]:v===2?"one of ".concat(d," ").concat(s[0]," or ").concat(s[1]):"of ".concat(d," ").concat(s[0])}else return"of ".concat(d," ").concat(String(s))}function O(s,d,v){return s.substr(0,d.length)===d}function p(s,d,v){return(v===void 0||v>s.length)&&(v=s.length),s.substring(v-d.length,v)===d}function b(s,d,v){return typeof v!="number"&&(v=0),v+d.length>s.length?!1:s.indexOf(d,v)!==-1}return h("ERR_INVALID_OPT_VALUE",function(s,d){return'The value "'+d+'" is invalid for option "'+s+'"'},TypeError),h("ERR_INVALID_ARG_TYPE",function(s,d,v){var m;typeof d=="string"&&O(d,"not ")?(m="must not be",d=d.replace(/^not /,"")):m="must be";var E;if(p(s," argument"))E="The ".concat(s," ").concat(m," ").concat(g(d,"type"));else{var I=b(s,".")?"property":"argument";E='The "'.concat(s,'" ').concat(I," ").concat(m," ").concat(g(d,"type"))}return E+=". Received type ".concat(typeof v),E},TypeError),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),h("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),h("ERR_STREAM_PREMATURE_CLOSE","Premature close"),h("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),h("ERR_STREAM_WRITE_AFTER_END","write after end"),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),ot.codes=c,ot}var at,cn;function Ln(){if(cn)return at;cn=1;var t=ge().codes.ERR_INVALID_OPT_VALUE;function c(g,O,p){return g.highWaterMark!=null?g.highWaterMark:O?g[p]:null}function h(g,O,p,b){var s=c(O,b,p);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var d=b?p:"highWaterMark";throw new t(d,s)}return Math.floor(s)}return g.objectMode?16:16*1024}return at={getHighWaterMark:h},at}var ut,ln;function Oi(){if(ln)return ut;ln=1,ut=t;function t(h,g){if(c("noDeprecation"))return h;var O=!1;function p(){if(!O){if(c("throwDeprecation"))throw new Error(g);c("traceDeprecation")?console.trace(g):console.warn(g),O=!0}return h.apply(this,arguments)}return p}function c(h){try{if(!ce.localStorage)return!1}catch{return!1}var g=ce.localStorage[h];return g==null?!1:String(g).toLowerCase()==="true"}return ut}var st,fn;function kn(){if(fn)return st;fn=1,st=k;function t(l){var r=this;this.next=null,this.entry=null,this.finish=function(){C(r,l)}}var c;k.WritableState=S;var h={deprecate:Oi()},g=Sn(),O=wt().Buffer,p=(typeof ce<"u"?ce:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function b(l){return O.from(l)}function s(l){return O.isBuffer(l)||l instanceof p}var d=Mn(),v=Ln(),m=v.getHighWaterMark,E=ge().codes,I=E.ERR_INVALID_ARG_TYPE,F=E.ERR_METHOD_NOT_IMPLEMENTED,j=E.ERR_MULTIPLE_CALLBACK,R=E.ERR_STREAM_CANNOT_PIPE,A=E.ERR_STREAM_DESTROYED,D=E.ERR_STREAM_NULL_VALUES,P=E.ERR_STREAM_WRITE_AFTER_END,L=E.ERR_UNKNOWN_ENCODING,f=d.errorOrDestroy;le()(k,g);function w(){}function S(l,r,e){c=c||he(),l=l||{},typeof e!="boolean"&&(e=r instanceof c),this.objectMode=!!l.objectMode,e&&(this.objectMode=this.objectMode||!!l.writableObjectMode),this.highWaterMark=m(this,l,"writableHighWaterMark",e),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var u=l.decodeStrings===!1;this.decodeStrings=!u,this.defaultEncoding=l.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){re(r,o)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=l.emitClose!==!1,this.autoDestroy=!!l.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}S.prototype.getBuffer=function(){for(var l=this.bufferedRequest,r=[];l;)r.push(l),l=l.next;return r},(function(){try{Object.defineProperty(S.prototype,"buffer",{get:h.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var M;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(M=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(l){return M.call(this,l)?!0:this!==k?!1:l&&l._writableState instanceof S}})):M=function(l){return l instanceof this};function k(l){c=c||he();var r=this instanceof c;if(!r&&!M.call(k,this))return new k(l);this._writableState=new S(l,this,r),this.writable=!0,l&&(typeof l.write=="function"&&(this._write=l.write),typeof l.writev=="function"&&(this._writev=l.writev),typeof l.destroy=="function"&&(this._destroy=l.destroy),typeof l.final=="function"&&(this._final=l.final)),g.call(this)}k.prototype.pipe=function(){f(this,new R)};function a(l,r){var e=new P;f(l,e),Y.nextTick(r,e)}function q(l,r,e,u){var o;return e===null?o=new D:typeof e!="string"&&!r.objectMode&&(o=new I("chunk",["string","Buffer"],e)),o?(f(l,o),Y.nextTick(u,o),!1):!0}k.prototype.write=function(l,r,e){var u=this._writableState,o=!1,n=!u.objectMode&&s(l);return n&&!O.isBuffer(l)&&(l=b(l)),typeof r=="function"&&(e=r,r=null),n?r="buffer":r||(r=u.defaultEncoding),typeof e!="function"&&(e=w),u.ending?a(this,e):(n||q(this,u,l,e))&&(u.pendingcb++,o=W(this,u,n,l,r,e)),o},k.prototype.cork=function(){this._writableState.corked++},k.prototype.uncork=function(){var l=this._writableState;l.corked&&(l.corked--,!l.writing&&!l.corked&&!l.bufferProcessing&&l.bufferedRequest&&J(this,l))},k.prototype.setDefaultEncoding=function(l){if(typeof l=="string"&&(l=l.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((l+"").toLowerCase())>-1))throw new L(l);return this._writableState.defaultEncoding=l,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function H(l,r,e){return!l.objectMode&&l.decodeStrings!==!1&&typeof r=="string"&&(r=O.from(r,e)),r}Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function W(l,r,e,u,o,n){if(!e){var i=H(r,u,o);u!==i&&(e=!0,o="buffer",u=i)}var _=r.objectMode?1:u.length;r.length+=_;var x=r.length0)if(typeof i!="string"&&!U.objectMode&&Object.getPrototypeOf(i)!==g.prototype&&(i=p(i)),x)U.endEmitted?w(n,new D):H(n,U,i,!0);else if(U.ended)w(n,new R);else{if(U.destroyed)return!1;U.reading=!1,U.decoder&&!_?(i=U.decoder.write(i),U.objectMode||i.length!==0?H(n,U,i,!1):J(n,U)):H(n,U,i,!1)}else x||(U.reading=!1,J(n,U))}return!U.ended&&(U.length=z?n=z:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function K(n,i){return n<=0||i.length===0&&i.ended?0:i.objectMode?1:n!==n?i.flowing&&i.length?i.buffer.head.data.length:i.length:(n>i.highWaterMark&&(i.highWaterMark=$(n)),n<=i.length?n:i.ended?i.length:(i.needReadable=!0,0))}a.prototype.read=function(n){d("read",n),n=parseInt(n,10);var i=this._readableState,_=n;if(n!==0&&(i.emittedReadable=!1),n===0&&i.needReadable&&((i.highWaterMark!==0?i.length>=i.highWaterMark:i.length>0)||i.ended))return d("read: emitReadable",i.length,i.ended),i.length===0&&i.ended?e(this):G(this),null;if(n=K(n,i),n===0&&i.ended)return i.length===0&&e(this),null;var x=i.needReadable;d("need readable",x),(i.length===0||i.length-n0?B=r(n,i):B=null,B===null?(i.needReadable=i.length<=i.highWaterMark,n=0):(i.length-=n,i.awaitDrain=0),i.length===0&&(i.ended||(i.needReadable=!0),_!==n&&i.ended&&e(this)),B!==null&&this.emit("data",B),B};function re(n,i){if(d("onEofChunk"),!i.ended){if(i.decoder){var _=i.decoder.end();_&&_.length&&(i.buffer.push(_),i.length+=i.objectMode?1:_.length)}i.ended=!0,i.sync?G(n):(i.needReadable=!1,i.emittedReadable||(i.emittedReadable=!0,Z(n)))}}function G(n){var i=n._readableState;d("emitReadable",i.needReadable,i.emittedReadable),i.needReadable=!1,i.emittedReadable||(d("emitReadable",i.flowing),i.emittedReadable=!0,Y.nextTick(Z,n))}function Z(n){var i=n._readableState;d("emitReadable_",i.destroyed,i.length,i.ended),!i.destroyed&&(i.length||i.ended)&&(n.emit("readable"),i.emittedReadable=!1),i.needReadable=!i.flowing&&!i.ended&&i.length<=i.highWaterMark,l(n)}function J(n,i){i.readingMore||(i.readingMore=!0,Y.nextTick(X,n,i))}function X(n,i){for(;!i.reading&&!i.ended&&(i.length1&&o(x.pipes,n)!==-1)&&!ne&&(d("false write response, pause",x.awaitDrain),x.awaitDrain++),_.pause())}function se(fe){d("onerror",fe),be(),n.removeListener("error",se),c(n,"error")===0&&w(n,fe)}M(n,"error",se);function Se(){n.removeListener("finish",Ae),be()}n.once("close",Se);function Ae(){d("onfinish"),n.removeListener("close",Se),be()}n.once("finish",Ae);function be(){d("unpipe"),_.unpipe(n)}return n.emit("pipe",_),x.flowing||(d("pipe resume"),_.resume()),n};function ee(n){return function(){var i=n._readableState;d("pipeOnDrain",i.awaitDrain),i.awaitDrain&&i.awaitDrain--,i.awaitDrain===0&&c(n,"data")&&(i.flowing=!0,l(n))}}a.prototype.unpipe=function(n){var i=this._readableState,_={hasUnpiped:!1};if(i.pipesCount===0)return this;if(i.pipesCount===1)return n&&n!==i.pipes?this:(n||(n=i.pipes),i.pipes=null,i.pipesCount=0,i.flowing=!1,n&&n.emit("unpipe",this,_),this);if(!n){var x=i.pipes,B=i.pipesCount;i.pipes=null,i.pipesCount=0,i.flowing=!1;for(var U=0;U0,x.flowing!==!1&&this.resume()):n==="readable"&&!x.endEmitted&&!x.readableListening&&(x.readableListening=x.needReadable=!0,x.flowing=!1,x.emittedReadable=!1,d("on readable",x.length,x.reading),x.length?G(this):x.reading||Y.nextTick(y,this)),_},a.prototype.addListener=a.prototype.on,a.prototype.removeListener=function(n,i){var _=h.prototype.removeListener.call(this,n,i);return n==="readable"&&Y.nextTick(te,this),_},a.prototype.removeAllListeners=function(n){var i=h.prototype.removeAllListeners.apply(this,arguments);return(n==="readable"||n===void 0)&&Y.nextTick(te,this),i};function te(n){var i=n._readableState;i.readableListening=n.listenerCount("readable")>0,i.resumeScheduled&&!i.paused?i.flowing=!0:n.listenerCount("data")>0&&n.resume()}function y(n){d("readable nexttick read 0"),n.read(0)}a.prototype.resume=function(){var n=this._readableState;return n.flowing||(d("resume"),n.flowing=!n.readableListening,T(this,n)),n.paused=!1,this};function T(n,i){i.resumeScheduled||(i.resumeScheduled=!0,Y.nextTick(C,n,i))}function C(n,i){d("resume",i.reading),i.reading||n.read(0),i.resumeScheduled=!1,n.emit("resume"),l(n),i.flowing&&!i.reading&&n.read(0)}a.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 l(n){var i=n._readableState;for(d("flow",i.flowing);i.flowing&&n.read()!==null;);}a.prototype.wrap=function(n){var i=this,_=this._readableState,x=!1;n.on("end",function(){if(d("wrapped end"),_.decoder&&!_.ended){var V=_.decoder.end();V&&V.length&&i.push(V)}i.push(null)}),n.on("data",function(V){if(d("wrapped data"),_.decoder&&(V=_.decoder.write(V)),!(_.objectMode&&V==null)&&!(!_.objectMode&&(!V||!V.length))){var Q=i.push(V);Q||(x=!0,n.pause())}});for(var B in n)this[B]===void 0&&typeof n[B]=="function"&&(this[B]=(function(V){return function(){return n[V].apply(n,arguments)}})(B));for(var U=0;U=i.length?(i.decoder?_=i.buffer.join(""):i.buffer.length===1?_=i.buffer.first():_=i.buffer.concat(i.length),i.buffer.clear()):_=i.buffer.consume(n,i.decoder),_}function e(n){var i=n._readableState;d("endReadable",i.endEmitted),i.endEmitted||(i.ended=!0,Y.nextTick(u,i,n))}function u(n,i){if(d("endReadableNT",n.endEmitted,n.length),!n.endEmitted&&n.length===0&&(n.endEmitted=!0,i.readable=!1,i.emit("end"),n.autoDestroy)){var _=i._writableState;(!_||_.autoDestroy&&_.finished)&&i.destroy()}}typeof Symbol=="function"&&(a.from=function(n,i){return f===void 0&&(f=Di()),f(a,n,i)});function o(n,i){for(var _=0,x=n.length;_0;return s(P,f,w,function(S){A||(A=S),S&&D.forEach(d),!f&&(D.forEach(d),R(A))})});return F.reduce(v)}return yt=E,yt}var gt,_n;function xi(){if(_n)return gt;_n=1,gt=h;var t=_t().EventEmitter,c=le();c(h,t),h.Readable=Fn(),h.Writable=kn(),h.Duplex=he(),h.Transform=Bn(),h.PassThrough=ji(),h.finished=Rt(),h.pipeline=Pi(),h.Stream=h;function h(){t.call(this)}return h.prototype.pipe=function(g,O){var p=this;function b(F){g.writable&&g.write(F)===!1&&p.pause&&p.pause()}p.on("data",b);function s(){p.readable&&p.resume&&p.resume()}g.on("drain",s),!g._isStdio&&(!O||O.end!==!1)&&(p.on("end",v),p.on("close",m));var d=!1;function v(){d||(d=!0,g.end())}function m(){d||(d=!0,typeof g.destroy=="function"&&g.destroy())}function E(F){if(I(),t.listenerCount(this,"error")===0)throw F}p.on("error",E),g.on("error",E);function I(){p.removeListener("data",b),g.removeListener("drain",s),p.removeListener("end",v),p.removeListener("close",m),p.removeListener("error",E),g.removeListener("error",E),p.removeListener("end",I),p.removeListener("close",I),g.removeListener("close",I)}return p.on("end",I),p.on("close",I),g.on("close",I),g.emit("pipe",p),g},gt}var En;function Ci(){return En||(En=1,(function(t){(function(c){c.parser=function(r,e){return new g(r,e)},c.SAXParser=g,c.SAXStream=m,c.createStream=v,c.MAX_BUFFER_LENGTH=64*1024;var h=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];c.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function g(r,e){if(!(this instanceof g))return new g(r,e);var u=this;p(u),u.q=u.c="",u.bufferCheckPosition=c.MAX_BUFFER_LENGTH,u.opt=e||{},u.opt.lowercase=u.opt.lowercase||u.opt.lowercasetags,u.looseCase=u.opt.lowercase?"toLowerCase":"toUpperCase",u.tags=[],u.closed=u.closedRoot=u.sawRoot=!1,u.tag=u.error=null,u.strict=!!r,u.noscript=!!(r||u.opt.noscript),u.state=a.BEGIN,u.strictEntities=u.opt.strictEntities,u.ENTITIES=u.strictEntities?Object.create(c.XML_ENTITIES):Object.create(c.ENTITIES),u.attribList=[],u.opt.xmlns&&(u.ns=Object.create(R)),u.opt.unquotedAttributeValues===void 0&&(u.opt.unquotedAttributeValues=!r),u.trackPosition=u.opt.position!==!1,u.trackPosition&&(u.position=u.line=u.column=0),H(u,"onready")}Object.create||(Object.create=function(r){function e(){}e.prototype=r;var u=new e;return u}),Object.keys||(Object.keys=function(r){var e=[];for(var u in r)r.hasOwnProperty(u)&&e.push(u);return e});function O(r){for(var e=Math.max(c.MAX_BUFFER_LENGTH,10),u=0,o=0,n=h.length;oe)switch(h[o]){case"textNode":z(r);break;case"cdata":W(r,"oncdata",r.cdata),r.cdata="";break;case"script":W(r,"onscript",r.script),r.script="";break;default:K(r,"Max buffer length exceeded: "+h[o])}u=Math.max(u,i)}var _=c.MAX_BUFFER_LENGTH-u;r.bufferCheckPosition=_+r.position}function p(r){for(var e=0,u=h.length;e"||f(r)}function M(r,e){return r.test(e)}function k(r,e){return!M(r,e)}var a=0;c.STATE={BEGIN:a++,BEGIN_WHITESPACE:a++,TEXT:a++,TEXT_ENTITY:a++,OPEN_WAKA:a++,SGML_DECL:a++,SGML_DECL_QUOTED:a++,DOCTYPE:a++,DOCTYPE_QUOTED:a++,DOCTYPE_DTD:a++,DOCTYPE_DTD_QUOTED:a++,COMMENT_STARTING:a++,COMMENT:a++,COMMENT_ENDING:a++,COMMENT_ENDED:a++,CDATA:a++,CDATA_ENDING:a++,CDATA_ENDING_2:a++,PROC_INST:a++,PROC_INST_BODY:a++,PROC_INST_ENDING:a++,OPEN_TAG:a++,OPEN_TAG_SLASH:a++,ATTRIB:a++,ATTRIB_NAME:a++,ATTRIB_NAME_SAW_WHITE:a++,ATTRIB_VALUE:a++,ATTRIB_VALUE_QUOTED:a++,ATTRIB_VALUE_CLOSED:a++,ATTRIB_VALUE_UNQUOTED:a++,ATTRIB_VALUE_ENTITY_Q:a++,ATTRIB_VALUE_ENTITY_U:a++,CLOSE_TAG:a++,CLOSE_TAG_SAW_WHITE:a++,SCRIPT:a++,SCRIPT_ENDING:a++},c.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},c.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(c.ENTITIES).forEach(function(r){var e=c.ENTITIES[r],u=typeof e=="number"?String.fromCharCode(e):e;c.ENTITIES[r]=u});for(var q in c.STATE)c.STATE[c.STATE[q]]=q;a=c.STATE;function H(r,e,u){r[e]&&r[e](u)}function W(r,e,u){r.textNode&&z(r),H(r,e,u)}function z(r){r.textNode=$(r.opt,r.textNode),r.textNode&&H(r,"ontext",r.textNode),r.textNode=""}function $(r,e){return r.trim&&(e=e.trim()),r.normalize&&(e=e.replace(/\s+/g," ")),e}function K(r,e){return z(r),r.trackPosition&&(e+=` Line: `+r.line+` Column: `+r.column+` Char: `+r.c),e=new Error(e),r.error=e,H(r,"onerror",e),r}function re(r){return r.sawRoot&&!r.closedRoot&&G(r,"Unclosed root tag"),r.state!==a.BEGIN&&r.state!==a.BEGIN_WHITESPACE&&r.state!==a.TEXT&&K(r,"Unexpected end"),z(r),r.c="",r.closed=!0,H(r,"onend"),g.call(r,r.strict,r.opt),r}function G(r,e){if(typeof r!="object"||!(r instanceof g))throw new Error("bad call to strictFail");r.strict&&K(r,e)}function Z(r){r.strict||(r.tagName=r.tagName[r.looseCase]());var e=r.tags[r.tags.length-1]||r,u=r.tag={name:r.tagName,attributes:{}};r.opt.xmlns&&(u.ns=e.ns),r.attribList.length=0,W(r,"onopentagstart",u)}function J(r,e){var u=r.indexOf(":"),o=u<0?["",r]:r.split(":"),n=o[0],i=o[1];return e&&r==="xmlns"&&(n="xmlns",i=""),{prefix:n,local:i}}function X(r){if(r.strict||(r.attribName=r.attribName[r.looseCase]()),r.attribList.indexOf(r.attribName)!==-1||r.tag.attributes.hasOwnProperty(r.attribName)){r.attribName=r.attribValue="";return}if(r.opt.xmlns){var e=J(r.attribName,!0),u=e.prefix,o=e.local;if(u==="xmlns")if(o==="xml"&&r.attribValue!==F)G(r,"xml: prefix must be bound to "+F+` Actual: `+r.attribValue);else if(o==="xmlns"&&r.attribValue!==j)G(r,"xmlns: prefix must be bound to "+j+` Actual: `+r.attribValue);else{var n=r.tag,i=r.tags[r.tags.length-1]||r;n.ns===i.ns&&(n.ns=Object.create(i.ns)),n.ns[o]=r.attribValue}r.attribList.push([r.attribName,r.attribValue])}else r.tag.attributes[r.attribName]=r.attribValue,W(r,"onattribute",{name:r.attribName,value:r.attribValue});r.attribName=r.attribValue=""}function ee(r,e){if(r.opt.xmlns){var u=r.tag,o=J(r.tagName);u.prefix=o.prefix,u.local=o.local,u.uri=u.ns[o.prefix]||"",u.prefix&&!u.uri&&(G(r,"Unbound namespace prefix: "+JSON.stringify(r.tagName)),u.uri=o.prefix);var n=r.tags[r.tags.length-1]||r;u.ns&&n.ns!==u.ns&&Object.keys(u.ns).forEach(function(ue){W(r,"onopennamespace",{prefix:ue,uri:u.ns[ue]})});for(var i=0,_=r.attribList.length;i<_;i++){var x=r.attribList[i],B=x[0],U=x[1],V=J(B,!0),Q=V.prefix,N=V.local,ne=Q===""?"":u.ns[Q]||"",ae={name:B,value:U,prefix:Q,local:N,uri:ne};Q&&Q!=="xmlns"&&!ne&&(G(r,"Unbound namespace prefix: "+JSON.stringify(Q)),ae.uri=Q),r.tag.attributes[B]=ae,W(r,"onattribute",ae)}r.attribList.length=0}r.tag.isSelfClosing=!!e,r.sawRoot=!0,r.tags.push(r.tag),W(r,"onopentag",r.tag),e||(!r.noscript&&r.tagName.toLowerCase()==="script"?r.state=a.SCRIPT:r.state=a.TEXT,r.tag=null,r.tagName=""),r.attribName=r.attribValue="",r.attribList.length=0}function te(r){if(!r.tagName){G(r,"Weird empty close tag."),r.textNode+="",r.state=a.TEXT;return}if(r.script){if(r.tagName!=="script"){r.script+="",r.tagName="",r.state=a.SCRIPT;return}W(r,"onscript",r.script),r.script=""}var e=r.tags.length,u=r.tagName;r.strict||(u=u[r.looseCase]());for(var o=u;e--;){var n=r.tags[e];if(n.name!==o)G(r,"Unexpected close tag");else break}if(e<0){G(r,"Unmatched closing tag: "+r.tagName),r.textNode+="",r.state=a.TEXT;return}r.tagName=u;for(var i=r.tags.length;i-- >e;){var _=r.tag=r.tags.pop();r.tagName=r.tag.name,W(r,"onclosetag",r.tagName);var x={};for(var B in _.ns)x[B]=_.ns[B];var U=r.tags[r.tags.length-1]||r;r.opt.xmlns&&_.ns!==U.ns&&Object.keys(_.ns).forEach(function(V){var Q=_.ns[V];W(r,"onclosenamespace",{prefix:V,uri:Q})})}e===0&&(r.closedRoot=!0),r.tagName=r.attribValue=r.attribName="",r.attribList.length=0,r.state=a.TEXT}function y(r){var e=r.entity,u=e.toLowerCase(),o,n="";return r.ENTITIES[e]?r.ENTITIES[e]:r.ENTITIES[u]?r.ENTITIES[u]:(e=u,e.charAt(0)==="#"&&(e.charAt(1)==="x"?(e=e.slice(2),o=parseInt(e,16),n=o.toString(16)):(e=e.slice(1),o=parseInt(e,10),n=o.toString(10))),e=e.replace(/^0+/,""),isNaN(o)||n.toLowerCase()!==e?(G(r,"Invalid character entity"),"&"+r.entity+";"):String.fromCodePoint(o))}function T(r,e){e==="<"?(r.state=a.OPEN_WAKA,r.startTagPosition=r.position):f(e)||(G(r,"Non-whitespace before first tag."),r.textNode=e,r.state=a.TEXT)}function C(r,e){var u="";return e"?(W(e,"onsgmldeclaration",e.sgmlDecl),e.sgmlDecl="",e.state=a.TEXT):(w(o)&&(e.state=a.SGML_DECL_QUOTED),e.sgmlDecl+=o);continue;case a.SGML_DECL_QUOTED:o===e.q&&(e.state=a.SGML_DECL,e.q=""),e.sgmlDecl+=o;continue;case a.DOCTYPE:o===">"?(e.state=a.TEXT,W(e,"ondoctype",e.doctype),e.doctype=!0):(e.doctype+=o,o==="["?e.state=a.DOCTYPE_DTD:w(o)&&(e.state=a.DOCTYPE_QUOTED,e.q=o));continue;case a.DOCTYPE_QUOTED:e.doctype+=o,o===e.q&&(e.q="",e.state=a.DOCTYPE);continue;case a.DOCTYPE_DTD:o==="]"?(e.doctype+=o,e.state=a.DOCTYPE):o==="<"?(e.state=a.OPEN_WAKA,e.startTagPosition=e.position):w(o)?(e.doctype+=o,e.state=a.DOCTYPE_DTD_QUOTED,e.q=o):e.doctype+=o;continue;case a.DOCTYPE_DTD_QUOTED:e.doctype+=o,o===e.q&&(e.state=a.DOCTYPE_DTD,e.q="");continue;case a.COMMENT:o==="-"?e.state=a.COMMENT_ENDING:e.comment+=o;continue;case a.COMMENT_ENDING:o==="-"?(e.state=a.COMMENT_ENDED,e.comment=$(e.opt,e.comment),e.comment&&W(e,"oncomment",e.comment),e.comment=""):(e.comment+="-"+o,e.state=a.COMMENT);continue;case a.COMMENT_ENDED:o!==">"?(G(e,"Malformed comment"),e.comment+="--"+o,e.state=a.COMMENT):e.doctype&&e.doctype!==!0?e.state=a.DOCTYPE_DTD:e.state=a.TEXT;continue;case a.CDATA:o==="]"?e.state=a.CDATA_ENDING:e.cdata+=o;continue;case a.CDATA_ENDING:o==="]"?e.state=a.CDATA_ENDING_2:(e.cdata+="]"+o,e.state=a.CDATA);continue;case a.CDATA_ENDING_2:o===">"?(e.cdata&&W(e,"oncdata",e.cdata),W(e,"onclosecdata"),e.cdata="",e.state=a.TEXT):o==="]"?e.cdata+="]":(e.cdata+="]]"+o,e.state=a.CDATA);continue;case a.PROC_INST:o==="?"?e.state=a.PROC_INST_ENDING:f(o)?e.state=a.PROC_INST_BODY:e.procInstName+=o;continue;case a.PROC_INST_BODY:if(!e.procInstBody&&f(o))continue;o==="?"?e.state=a.PROC_INST_ENDING:e.procInstBody+=o;continue;case a.PROC_INST_ENDING:o===">"?(W(e,"onprocessinginstruction",{name:e.procInstName,body:e.procInstBody}),e.procInstName=e.procInstBody="",e.state=a.TEXT):(e.procInstBody+="?"+o,e.state=a.PROC_INST_BODY);continue;case a.OPEN_TAG:M(D,o)?e.tagName+=o:(Z(e),o===">"?ee(e):o==="/"?e.state=a.OPEN_TAG_SLASH:(f(o)||G(e,"Invalid character in tag name"),e.state=a.ATTRIB));continue;case a.OPEN_TAG_SLASH:o===">"?(ee(e,!0),te(e)):(G(e,"Forward-slash in opening tag not followed by >"),e.state=a.ATTRIB);continue;case a.ATTRIB:if(f(o))continue;o===">"?ee(e):o==="/"?e.state=a.OPEN_TAG_SLASH:M(A,o)?(e.attribName=o,e.attribValue="",e.state=a.ATTRIB_NAME):G(e,"Invalid attribute name");continue;case a.ATTRIB_NAME:o==="="?e.state=a.ATTRIB_VALUE:o===">"?(G(e,"Attribute without value"),e.attribValue=e.attribName,X(e),ee(e)):f(o)?e.state=a.ATTRIB_NAME_SAW_WHITE:M(D,o)?e.attribName+=o:G(e,"Invalid attribute name");continue;case a.ATTRIB_NAME_SAW_WHITE:if(o==="=")e.state=a.ATTRIB_VALUE;else{if(f(o))continue;G(e,"Attribute without value"),e.tag.attributes[e.attribName]="",e.attribValue="",W(e,"onattribute",{name:e.attribName,value:""}),e.attribName="",o===">"?ee(e):M(A,o)?(e.attribName=o,e.state=a.ATTRIB_NAME):(G(e,"Invalid attribute name"),e.state=a.ATTRIB)}continue;case a.ATTRIB_VALUE:if(f(o))continue;w(o)?(e.q=o,e.state=a.ATTRIB_VALUE_QUOTED):(e.opt.unquotedAttributeValues||K(e,"Unquoted attribute value"),e.state=a.ATTRIB_VALUE_UNQUOTED,e.attribValue=o);continue;case a.ATTRIB_VALUE_QUOTED:if(o!==e.q){o==="&"?e.state=a.ATTRIB_VALUE_ENTITY_Q:e.attribValue+=o;continue}X(e),e.q="",e.state=a.ATTRIB_VALUE_CLOSED;continue;case a.ATTRIB_VALUE_CLOSED:f(o)?e.state=a.ATTRIB:o===">"?ee(e):o==="/"?e.state=a.OPEN_TAG_SLASH:M(A,o)?(G(e,"No whitespace between attributes"),e.attribName=o,e.attribValue="",e.state=a.ATTRIB_NAME):G(e,"Invalid attribute name");continue;case a.ATTRIB_VALUE_UNQUOTED:if(!S(o)){o==="&"?e.state=a.ATTRIB_VALUE_ENTITY_U:e.attribValue+=o;continue}X(e),o===">"?ee(e):e.state=a.ATTRIB;continue;case a.CLOSE_TAG:if(e.tagName)o===">"?te(e):M(D,o)?e.tagName+=o:e.script?(e.script+=""?te(e):G(e,"Invalid characters in closing tag");continue;case a.TEXT_ENTITY:case a.ATTRIB_VALUE_ENTITY_Q:case a.ATTRIB_VALUE_ENTITY_U:var _,x;switch(e.state){case a.TEXT_ENTITY:_=a.TEXT,x="textNode";break;case a.ATTRIB_VALUE_ENTITY_Q:_=a.ATTRIB_VALUE_QUOTED,x="attribValue";break;case a.ATTRIB_VALUE_ENTITY_U:_=a.ATTRIB_VALUE_UNQUOTED,x="attribValue";break}if(o===";"){var B=y(e);e.opt.unparsedEntities&&!Object.values(c.XML_ENTITIES).includes(B)?(e.entity="",e.state=_,e.write(B)):(e[x]+=B,e.entity="",e.state=_)}else M(e.entity.length?L:P,o)?e.entity+=o:(G(e,"Invalid character in entity name"),e[x]+="&"+e.entity+o,e.entity="",e.state=_);continue;default:throw new Error(e,"Unknown state: "+e.state)}return e.position>=e.bufferCheckPosition&&O(e),e}String.fromCodePoint||(function(){var r=String.fromCharCode,e=Math.floor,u=function(){var o=16384,n=[],i,_,x=-1,B=arguments.length;if(!B)return"";for(var U="";++x1114111||e(V)!==V)throw RangeError("Invalid code point: "+V);V<=65535?n.push(V):(V-=65536,i=(V>>10)+55296,_=V%1024+56320,n.push(i,_)),(x+1===B||n.length>o)&&(U+=r.apply(null,n),n.length=0)}return U};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:u,configurable:!0,writable:!0}):String.fromCodePoint=u})()})(t)})(Nt)),Nt}var Mi=Ci();const Li=Gn(Mi),ki={"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"}},Fi={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 Bi{constructor(c){this.options=c??{},this.firstTag=!0,this.onEnd=!1,this.parser=Li.parser(!0,{xmlns:!0}),this.nesting=0,this.parser.onerror=h=>{h.message.startsWith("Invalid character entity")||(this.fileType=void 0,this.onEnd=!0)},this.parser.onopentag=h=>{++this.nesting,!(!this.firstTag||this.onEnd)&&(this.firstTag=!1,h.uri?this.fileType=ki[h.uri]:h.name&&(this.fileType=Fi[h.name.toLowerCase()]),this.fileType&&!this.options.fullScan&&(this.onEnd=!0))},this.parser.onclosetag=()=>{--this.nesting}}write(c){this.parser.write(c)}close(){this.parser.close(),this.onEnd=!0}isValid(){return this.nesting===0}}function Un(t,{validate:c=!0}={}){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);if(t=t.trim(),t.length===0)return!1;const h=new Bi({fullScan:c});if(c){if(h.write(t),!h.isValid())return!1}else{let g=0;for(;t.length>g&&!h.onEnd;)h.write(t.slice(g,Math.min(g+128,t.length))),g+=128}return h.fileType?.ext==="svg"}class Ui extends Tn{}function Vn(){return ie.registry??=new Ui,ie.registry}const Vi=Object.freeze({DEFAULT:"default",HIDDEN:"hidden"});function Ji(t){if(Wi(t),ie.fileActions??=new Map,ie.fileActions.has(t.id)){de.error(`FileAction ${t.id} already registered`,{action:t});return}ie.fileActions.set(t.id,t),Vn().dispatchTypedEvent("register:action",new CustomEvent("register:action",{detail:t}))}function Wi(t){if(!t.id||typeof t.id!="string")throw new Error("Invalid id");if(!t.displayName||typeof t.displayName!="function")throw new Error("Invalid displayName function");if("title"in t&&typeof t.title!="function")throw new Error("Invalid title function");if(!t.iconSvgInline||typeof t.iconSvgInline!="function")throw new Error("Invalid iconSvgInline function");if(!t.exec||typeof t.exec!="function")throw new Error("Invalid exec function");if("enabled"in t&&typeof t.enabled!="function")throw new Error("Invalid enabled function");if("execBatch"in t&&typeof t.execBatch!="function")throw new Error("Invalid execBatch function");if("order"in t&&typeof t.order!="number")throw new Error("Invalid order");if(t.destructive!==void 0&&typeof t.destructive!="boolean")throw new Error("Invalid destructive flag");if("parent"in t&&typeof t.parent!="string")throw new Error("Invalid parent");if(t.default&&!Object.values(Vi).includes(t.default))throw new Error("Invalid default");if("inline"in t&&typeof t.inline!="function")throw new Error("Invalid inline function");if("renderInline"in t&&typeof t.renderInline!="function")throw new Error("Invalid renderInline function");if("hotkey"in t&&t.hotkey!==void 0){if(typeof t.hotkey!="object")throw new Error("Invalid hotkey configuration");if(typeof t.hotkey.key!="string"||!t.hotkey.key)throw new Error("Missing or invalid hotkey key");if(typeof t.hotkey.description!="string"||!t.hotkey.description)throw new Error("Missing or invalid hotkey description")}}function Ki(t){if(qi(t),ie.fileListActions??=new Map,ie.fileListActions.has(t.id)){de.error(`FileListAction with id "${t.id}" is already registered`,{action:t});return}ie.fileListActions.set(t.id,t),Vn().dispatchTypedEvent("register:listAction",new CustomEvent("register:listAction",{detail:t}))}function qi(t){if(!t.id||typeof t.id!="string")throw new Error("Invalid id");if(!t.displayName||typeof t.displayName!="function")throw new Error("Invalid displayName function");if("iconSvgInline"in t&&typeof t.iconSvgInline!="function")throw new Error("Invalid iconSvgInline function");if("order"in t&&typeof t.order!="number")throw new Error("Invalid order");if("enabled"in t&&typeof t.enabled!="function")throw new Error("Invalid enabled function");if(!t.exec||typeof t.exec!="function")throw new Error("Invalid exec function")}function oe(t,c,h){if(typeof t[c]<"u")if(h==="array"){if(!Array.isArray(t[c]))throw new Error(`View ${c} must be an array`)}else{if(typeof t[c]!==h)throw new Error(`View ${c} must be a ${h}`);if(h==="object"&&(t[c]===null||Array.isArray(t[c])))throw new Error(`View ${c} must be an object`)}}class Zi{_column;constructor(c){Wn(c),this._column=c}get id(){return this._column.id}get title(){return this._column.title}get render(){return this._column.render}get sort(){return this._column.sort}get summary(){return this._column.summary}}function Wn(t){if(typeof t!="object"||t===null)throw new Error("View column must be an object");if(!t.id||typeof t.id!="string")throw new Error("A column id is required");if(!t.title||typeof t.title!="string")throw new Error("A column title is required");if(!t.render||typeof t.render!="function")throw new Error("A render function is required");oe(t,"sort","function"),oe(t,"summary","function")}class eo{_view;constructor(c){qn(c),this._view=c}get id(){return this._view.id}get name(){return this._view.name}get caption(){return this._view.caption}get emptyTitle(){return this._view.emptyTitle}get emptyCaption(){return this._view.emptyCaption}get getContents(){return this._view.getContents}get hidden(){return this._view.hidden}get icon(){return this._view.icon}set icon(c){this._view.icon=c}get order(){return this._view.order}set order(c){this._view.order=c}get params(){return this._view.params}set params(c){this._view.params=c}get columns(){return this._view.columns}get emptyView(){return this._view.emptyView}get parent(){return this._view.parent}get sticky(){return this._view.sticky}get expanded(){return this._view.expanded}set expanded(c){this._view.expanded=c}get defaultSortKey(){return this._view.defaultSortKey}get loadChildViews(){return this._view.loadChildViews}}function qn(t){if(!t.icon||typeof t.icon!="string"||!Un(t.icon))throw new Error("View icon is required and must be a valid svg string");if(!t.id||typeof t.id!="string")throw new Error("View id is required and must be a string");if(!t.getContents||typeof t.getContents!="function")throw new Error("View getContents is required and must be a function");if(!t.name||typeof t.name!="string")throw new Error("View name is required and must be a string");if(oe(t,"caption","string"),oe(t,"columns","array"),oe(t,"defaultSortKey","string"),oe(t,"emptyCaption","string"),oe(t,"emptyTitle","string"),oe(t,"emptyView","function"),oe(t,"expanded","boolean"),oe(t,"hidden","boolean"),oe(t,"loadChildViews","function"),oe(t,"order","number"),oe(t,"params","object"),oe(t,"parent","string"),oe(t,"sticky","boolean"),t.columns&&(t.columns.forEach(Wn),t.columns.reduce((c,h)=>c.add(h.id),new Set).size!==t.columns.length))throw new Error("View columns must have unique ids")}class Gi extends Tn{_views=[];_currentView=null;register(...c){for(const h of c){if(this._views.find(g=>g.id===h.id))throw new Error(`IView id ${h.id} is already registered`);qn(h)}this._views.push(...c),this.dispatchTypedEvent("update",new CustomEvent("update"))}remove(c){const h=this._views.findIndex(g=>g.id===c);h!==-1&&(this._views.splice(h,1),this.dispatchTypedEvent("update",new CustomEvent("update")))}setActive(c){if(c===null)this._currentView=null;else{const g=this._views.find(({id:O})=>O===c);if(!g)throw new Error(`No view with ${c} registered`);this._currentView=g}const h=new CustomEvent("updateActive",{detail:this._currentView});this.dispatchTypedEvent("updateActive",h)}get active(){return this._currentView}get views(){return this._views}}function to(){return ie.navigation??=new Gi,ie.navigation}function ro(t){if(Hi(t),ie.filesSidebarActions??=new Map,ie.filesSidebarActions.has(t.id)){de.warn(`Sidebar action with id "${t.id}" already registered. Skipping.`);return}ie.filesSidebarActions.set(t.id,t),de.debug(`New sidebar action with id "${t.id}" registered.`)}function Hi(t){if(typeof t!="object")throw new Error("Sidebar action is not an object");if(!t.id||typeof t.id!="string"||t.id!==CSS.escape(t.id))throw new Error("Sidebar actions need to have an id conforming to the HTML id attribute specifications");if(!t.displayName||typeof t.displayName!="function")throw new Error("Sidebar actions need to have a displayName function");if(!t.iconSvgInline||typeof t.iconSvgInline!="function")throw new Error("Sidebar actions need to have a iconSvgInline function");if(!t.enabled||typeof t.enabled!="function")throw new Error("Sidebar actions need to have an enabled function");if(!t.onClick||typeof t.onClick!="function")throw new Error("Sidebar actions need to have an onClick function")}function no(t){if(Yi(t),ie.filesSidebarTabs??=new Map,ie.filesSidebarTabs.has(t.id)){de.warn(`Sidebar tab with id "${t.id}" already registered. Skipping.`);return}ie.filesSidebarTabs.set(t.id,t),de.debug(`New sidebar tab with id "${t.id}" registered.`)}function Yi(t){if(typeof t!="object")throw new Error("Sidebar tab is not an object");if(!t.id||typeof t.id!="string"||t.id!==CSS.escape(t.id))throw new Error("Sidebar tabs need to have an id conforming to the HTML id attribute specifications");if(!t.tagName||typeof t.tagName!="string")throw new Error("Sidebar tabs need to have the tagName name set");if(!t.tagName.match(/^[a-z][a-z0-9-_]+$/))throw new Error('Sidebar tab "tagName" is invalid');if(!t.displayName||typeof t.displayName!="string")throw new Error("Sidebar tabs need to have a name set");if(typeof t.iconSvgInline!="string"||!Un(t.iconSvgInline))throw new Error("Sidebar tabs need to have an valid SVG icon");if(typeof t.order!="number")throw new Error("Sidebar tabs need to have a numeric order set");if(t.enabled&&typeof t.enabled!="function")throw new Error('Sidebar tab "enabled" is not a function');if(t.onInit&&typeof t.onInit!="function")throw new Error('Sidebar tab "onInit" is not a function')}const bt=["B","KB","MB","GB","TB","PB"],mt=["B","KiB","MiB","GiB","TiB","PiB"];function io(t,c=!1,h=!1,g=!1){h=h&&!g,typeof t=="string"&&(t=Number(t));let O=t>0?Math.floor(Math.log(t)/Math.log(g?1e3:1024)):0;O=Math.min((h?mt.length:bt.length)-1,O);const p=h?mt[O]:bt[O];let b=(t/Math.pow(g?1e3:1024,O)).toFixed(1);return c===!0&&O===0?(b!=="0.0"?"< 1 ":"0 ")+(h?mt[1]:bt[1]):(O<2?b=parseFloat(b).toFixed(0):b=parseFloat(b).toLocaleString(Hn()),b+" "+p)}export{Zi as C,Vi as D,eo as V,Ki as a,Ji as b,ro as c,io as f,to as g,no as r}; //# sourceMappingURL=index-CuwFxdv0.chunk.mjs.map