factoriomod-debug 2.1.3 → 2.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/fmtk-cli.js CHANGED
@@ -3,98 +3,98 @@
3
3
  import {createRequire} from 'module'
4
4
  const require = createRequire(import.meta.url)
5
5
 
6
- import{A as Kl,B as Yl,C as Li,D as Ke,E as ts,F as Ad,G as Bn,H as ns,J as Cd,K as Id,L as Od,M as Pd,a as K,b as R,c as rS,d as ae,f as Sd,g as Ed,h as Ge,i as zt,j as qn,k as Pi,l as ye,m as kd,n as Dd,q as iS,r as jn,t as Td,u as Xo,v as Q,w as es,x as nn,y as Ar,z as Rd}from"./chunk-XEN7L2DC.js";var Yd=R((gq,Kd)=>{"use strict";Kd.exports=DS;function kS(t){let e={defaultWidth:0,output:process.stdout,tty:K("tty")};return t?(Object.keys(e).forEach(function(n){t[n]||(t[n]=e[n])}),t):e}function DS(t){let e=kS(t);if(e.output.getWindowSize)return e.output.getWindowSize()[0]||e.defaultWidth;if(e.tty.getWindowSize)return e.tty.getWindowSize()[1]||e.defaultWidth;if(e.output.columns)return e.output.columns;if(process.env.CLI_WIDTH){let n=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(n)&&n!==0)return n}return e.defaultWidth}});var hh=R((Tq,dh)=>{"use strict";var BS=K("stream"),su=class extends BS{#r=null;constructor(e={}){super(e),this.writable=this.readable=!0,this.muted=!1,this.on("pipe",this._onpipe),this.replace=e.replace,this._prompt=e.prompt||null,this._hadControl=!1}#n(e,n){return this._dest?this._dest[e]:this._src?this._src[e]:n}#t(e,...n){typeof this._dest?.[e]=="function"&&this._dest[e](...n),typeof this._src?.[e]=="function"&&this._src[e](...n)}get isTTY(){return this.#r!==null?this.#r:this.#n("isTTY",!1)}set isTTY(e){this.#r=e}get rows(){return this.#n("rows")}get columns(){return this.#n("columns")}mute(){this.muted=!0}unmute(){this.muted=!1}_onpipe(e){this._src=e}pipe(e,n){return this._dest=e,super.pipe(e,n)}pause(){if(this._src)return this._src.pause()}resume(){if(this._src)return this._src.resume()}write(e){if(this.muted){if(!this.replace)return!0;if(e.match(/^\u001b/))return e.indexOf(this._prompt)===0&&(e=e.slice(this._prompt.length),e=e.replace(/./g,this.replace),e=this._prompt+e),this._hadControl=!0,this.emit("data",e);this._prompt&&this._hadControl&&e.indexOf(this._prompt)===0&&(this._hadControl=!1,this.emit("data",this._prompt),e=e.slice(this._prompt.length)),e=e.toString().replace(/./g,this.replace)}this.emit("data",e)}end(e){this.muted&&(e&&this.replace?e=e.toString().replace(/./g,this.replace):e=null),e&&this.emit("data",e),this.emit("end")}destroy(...e){return this.#t("destroy",...e)}destroySoon(...e){return this.#t("destroySoon",...e)}close(...e){return this.#t("close",...e)}};dh.exports=su});var Hm=R((CU,$m)=>{"use strict";var Fs=Object.prototype.hasOwnProperty,Um=Object.prototype.toString,Fm=Object.defineProperty,qm=Object.getOwnPropertyDescriptor,jm=function(e){return typeof Array.isArray=="function"?Array.isArray(e):Um.call(e)==="[object Array]"},Bm=function(e){if(!e||Um.call(e)!=="[object Object]")return!1;var n=Fs.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Fs.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;var i;for(i in e);return typeof i>"u"||Fs.call(e,i)},Wm=function(e,n){Fm&&n.name==="__proto__"?Fm(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},zm=function(e,n){if(n==="__proto__")if(Fs.call(e,n)){if(qm)return qm(e,n).value}else return;return e[n]};$m.exports=function t(){var e,n,r,i,o,s,a=arguments[0],u=1,l=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},u=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});u<l;++u)if(e=arguments[u],e!=null)for(n in e)r=zm(a,n),i=zm(e,n),a!==i&&(c&&i&&(Bm(i)||(o=jm(i)))?(o?(o=!1,s=r&&jm(r)?r:[]):s=r&&Bm(r)?r:{},Wm(a,{name:n,newValue:t(c,s,i)})):typeof i<"u"&&Wm(a,{name:n,newValue:i}));return a}});var uc=R(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.SemanticTokensBuilder=dn.SemanticTokensDiff=dn.SemanticTokensFeature=void 0;var Us=ye(),p1=t=>class extends t{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(Us.SemanticTokensRefreshRequest.type),on:e=>{let n=Us.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:e=>{let n=Us.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:e=>{let n=Us.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};dn.SemanticTokensFeature=p1;var $s=class{originalSequence;modifiedSequence;constructor(e,n){this.originalSequence=e,this.modifiedSequence=n}computeDiff(){let e=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r<n&&r<e&&this.originalSequence[r]===this.modifiedSequence[r];)r++;if(r<n&&r<e){let i=e-1,o=n-1;for(;i>=r&&o>=r&&this.originalSequence[i]===this.modifiedSequence[o];)i--,o--;(i<r||o<r)&&(i++,o++);let s=i-r+1,a=this.modifiedSequence.slice(r,o+1);return a.length===1&&a[0]===this.originalSequence[i]?[{start:r,deleteCount:s-1}]:[{start:r,deleteCount:s,data:a}]}else return r<n?[{start:r,deleteCount:0,data:this.modifiedSequence.slice(r)}]:r<e?[{start:r,deleteCount:e-r}]:[]}};dn.SemanticTokensDiff=$s;var lc=class t{_id;_prevLine;_prevChar;_dataIsSortedAndDeltaEncoded;_data;_dataNonDelta;_dataLen;_prevData;constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataNonDelta=[],this._dataLen=0,this._dataIsSortedAndDeltaEncoded=!0}push(e,n,r,i,o){this._dataIsSortedAndDeltaEncoded&&(e<this._prevLine||e===this._prevLine&&n<this._prevChar)&&(this._dataIsSortedAndDeltaEncoded=!1,this._dataNonDelta=t._deltaDecode(this._data));let s=e,a=n;this._dataIsSortedAndDeltaEncoded&&this._dataLen>0&&(s-=this._prevLine,s===0&&(a-=this._prevChar));let u=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;u[this._dataLen++]=s,u[this._dataLen++]=a,u[this._dataLen++]=r,u[this._dataLen++]=i,u[this._dataLen++]=o,this._prevLine=e,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(e){let n=e.length/5|0,r=0,i=0,o=[];for(let s=0;s<n;s++){let a=5*s,u=e[a],l=e[a+1];u===0?(u=r,l+=i):u+=r;let c=e[a+2],f=e[a+3],p=e[a+4];o[a+0]=u,o[a+1]=l,o[a+2]=c,o[a+3]=f,o[a+4]=p,r=u,i=l}return o}static _sortAndDeltaEncode(e){let n=[],r=e.length/5|0;for(let a=0;a<r;a++)n[a]=a;n.sort((a,u)=>{let l=e[5*a],c=e[5*u];if(l===c){let f=e[5*a+1],p=e[5*u+1];return f-p}return l-c});let i=[],o=0,s=0;for(let a=0;a<r;a++){let u=5*n[a],l=e[u+0],c=e[u+1],f=e[u+2],p=e[u+3],d=e[u+4],b=l-o,g=b===0?c-s:c,S=5*a;i[S+0]=b,i[S+1]=g,i[S+2]=f,i[S+3]=p,i[S+4]=d,o=l,s=c}return i}getFinalDataDelta(){return this._dataIsSortedAndDeltaEncoded?this._data:t._sortAndDeltaEncode(this._dataNonDelta)}previousResult(e){this.id===e&&(this._prevData=this.getFinalDataDelta()),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this.getFinalDataDelta()}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData!==void 0?{resultId:this.id,edits:new $s(this._prevData,this.getFinalDataDelta()).computeDiff()}:this.build()}};dn.SemanticTokensBuilder=lc});var fc=R(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});Hs.TextDocuments=void 0;var tr=ye(),cc=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new tr.Emitter,this._onDidOpen=new tr.Emitter,this._onDidClose=new tr.Emitter,this._onDidSave=new tr.Emitter,this._onWillSave=new tr.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=tr.TextDocumentSyncKind.Incremental;let n=[];return n.push(e.onDidOpenTextDocument(r=>{let i=r.textDocument,o=this._configuration.create(i.uri,i.languageId,i.version,i.text);this._syncedDocuments.set(i.uri,o);let s=Object.freeze({document:o});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(e.onDidChangeTextDocument(r=>{let i=r.textDocument,o=r.contentChanges;if(o.length===0)return;let{version:s}=i;if(s==null)throw new Error(`Received document change event for ${i.uri} without valid version identifier`);let a=this._syncedDocuments.get(i.uri);a!==void 0&&(a=this._configuration.update(a,o,s),this._syncedDocuments.set(i.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(e.onDidCloseTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:i})))})),n.push(e.onWillSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onWillSave.fire(Object.freeze({document:i,reason:r.reason}))})),n.push(e.onWillSaveTextDocumentWaitUntil((r,i)=>{let o=this._syncedDocuments.get(r.textDocument.uri);return o!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:o,reason:r.reason}),i):[]})),n.push(e.onDidSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onDidSave.fire(Object.freeze({document:i}))})),tr.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};Hs.TextDocuments=cc});var hc=R(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.NotebookDocuments=jr.NotebookSyncFeature=void 0;var rt=ye(),eg=fc(),d1=t=>class extends t{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(rt.DidOpenNotebookDocumentNotification.type,n=>e(n)),onDidChangeNotebookDocument:e=>this.connection.onNotification(rt.DidChangeNotebookDocumentNotification.type,n=>e(n)),onDidSaveNotebookDocument:e=>this.connection.onNotification(rt.DidSaveNotebookDocumentNotification.type,n=>e(n)),onDidCloseNotebookDocument:e=>this.connection.onNotification(rt.DidCloseNotebookDocumentNotification.type,n=>e(n))}}};jr.NotebookSyncFeature=d1;var pc=class t{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(e){return this.openHandler=e,rt.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(e){return this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,rt.Disposable.create(()=>{this.changeHandler=e})}changeTextDocument(e){return this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,rt.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(e){return this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return t.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return t.NULL_DISPOSE}onDidSaveTextDocument(){return t.NULL_DISPOSE}},dc=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(e){e instanceof eg.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new eg.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new rt.Emitter,this._onDidChange=new rt.Emitter,this._onDidSave=new rt.Emitter,this._onDidClose=new rt.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){let n=this.notebookCellMap.get(e);return n&&n[0]}findNotebookDocumentForCell(e){let n=typeof e=="string"?e:e.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){let n=new pc,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(e.notebooks.synchronization.onDidOpenNotebookDocument(async i=>{this.notebookDocuments.set(i.notebookDocument.uri,i.notebookDocument);for(let o of i.cellTextDocuments)await n.openTextDocument({textDocument:o});this.updateCellMap(i.notebookDocument),this._onDidOpen.fire(i.notebookDocument)})),r.push(e.notebooks.synchronization.onDidChangeNotebookDocument(async i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);if(o===void 0)return;o.version=i.notebookDocument.version;let s=o.metadata,a=!1,u=i.change;u.metadata!==void 0&&(a=!0,o.metadata=u.metadata);let l=[],c=[],f=[],p=[];if(u.cells!==void 0){let y=u.cells;if(y.structure!==void 0){let h=y.structure.array;if(o.cells.splice(h.start,h.deleteCount,...h.cells!==void 0?h.cells:[]),y.structure.didOpen!==void 0)for(let m of y.structure.didOpen)await n.openTextDocument({textDocument:m}),l.push(m.uri);if(y.structure.didClose)for(let m of y.structure.didClose)await n.closeTextDocument({textDocument:m}),c.push(m.uri)}if(y.data!==void 0){let h=new Map(y.data.map(m=>[m.document,m]));for(let m=0;m<=o.cells.length;m++){let w=h.get(o.cells[m].document);if(w!==void 0){let T=o.cells.splice(m,1,w);if(f.push({old:T[0],new:w}),h.delete(w.document),h.size===0)break}}}if(y.textContent!==void 0)for(let h of y.textContent)await n.changeTextDocument({textDocument:h.document,contentChanges:h.changes}),p.push(h.document.uri)}this.updateCellMap(o);let d={notebookDocument:o};a&&(d.metadata={old:s,new:o.metadata});let b=[];for(let y of l)b.push(this.getNotebookCell(y));let g=[];for(let y of c)g.push(this.getNotebookCell(y));let S=[];for(let y of p)S.push(this.getNotebookCell(y));(b.length>0||g.length>0||f.length>0||S.length>0)&&(d.cells={added:b,removed:g,changed:{data:f,textContent:S}}),(d.metadata!==void 0||d.cells!==void 0)&&this._onDidChange.fire(d)})),r.push(e.notebooks.synchronization.onDidSaveNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);o!==void 0&&this._onDidSave.fire(o)})),r.push(e.notebooks.synchronization.onDidCloseNotebookDocument(async i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);if(o!==void 0){this._onDidClose.fire(o);for(let s of i.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(i.notebookDocument.uri);for(let s of o.cells)this.notebookCellMap.delete(s.document)}})),rt.Disposable.create(()=>{r.forEach(i=>i.dispose())})}updateCellMap(e){for(let n of e.cells)this.notebookCellMap.set(n.document,[n,e])}};jr.NotebookDocuments=dc});var Vs=R(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.boolean=h1;gt.string=tg;gt.number=m1;gt.error=g1;gt.func=ng;gt.array=rg;gt.stringArray=y1;gt.typedArray=b1;gt.thenable=x1;function h1(t){return t===!0||t===!1}function tg(t){return typeof t=="string"||t instanceof String}function m1(t){return typeof t=="number"||t instanceof Number}function g1(t){return t instanceof Error}function ng(t){return typeof t=="function"}function rg(t){return Array.isArray(t)}function y1(t){return rg(t)&&t.every(e=>tg(e))}function b1(t,e){return Array.isArray(t)&&t.every(e)}function x1(t){return t&&ng(t.then)}});var gc=R(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.empty=void 0;hn.v4=ig;hn.isUUID=og;hn.parse=w1;hn.generateUuid=v1;var Xi=class{_value;constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}},mc=class t extends Xi{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return t._oneOf(t._chars)}constructor(){super([t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-","4",t._randomHex(),t._randomHex(),t._randomHex(),"-",t._oneOf(t._timeHighBits),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex()].join(""))}};hn.empty=new Xi("00000000-0000-0000-0000-000000000000");function ig(){return new mc}var _1=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function og(t){return _1.test(t)}function w1(t){if(!og(t))throw new Error("invalid uuid");return new Xi(t)}function v1(){return ig().asHex()}});var sg=R(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.ProgressFeature=void 0;Wr.attachWorkDone=E1;Wr.attachPartialResult=D1;var mn=ye(),S1=gc(),Br=class t{_connection;_token;static Instances=new Map;constructor(e,n){this._connection=e,this._token=n,t.Instances.set(this._token,this)}begin(e,n,r,i){let o={kind:"begin",title:e,message:r,cancellable:i};typeof n=="number"&&(o.percentage=Math.round(n)),this._connection.sendProgress(mn.WorkDoneProgress.type,this._token,o)}report(e,n){let r={kind:"report"};typeof e=="number"?(r.percentage=Math.round(e),n!==void 0&&(r.message=n)):r.message=e,this._connection.sendProgress(mn.WorkDoneProgress.type,this._token,r)}done(){t.Instances.delete(this._token),this._connection.sendProgress(mn.WorkDoneProgress.type,this._token,{kind:"end"})}},Gs=class extends Br{_source;constructor(e,n){super(e,n),this._source=new mn.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},eo=class{constructor(){}begin(){}report(){}done(){}},Ks=class extends eo{_source;constructor(){super(),this._source=new mn.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function E1(t,e){if(e===void 0||e.workDoneToken===void 0)return new eo;let n=e.workDoneToken;return delete e.workDoneToken,new Br(t,n)}var k1=t=>class extends t{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(e){super.initialize(e),e?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(mn.WorkDoneProgressCancelNotification.type,n=>{let r=Br.Instances.get(n.token);(r instanceof Gs||r instanceof Ks)&&r.cancel()}))}attachWorkDoneProgress(e){return e===void 0?new eo:new Br(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){let e=(0,S1.generateUuid)();return this.connection.sendRequest(mn.WorkDoneProgressCreateRequest.type,{token:e}).then(()=>new Gs(this.connection,e))}else return Promise.resolve(new Ks)}};Wr.ProgressFeature=k1;var yc;(function(t){t.type=new mn.ProgressType})(yc||(yc={}));var bc=class{_connection;_token;constructor(e,n){this._connection=e,this._token=n}report(e){this._connection.sendProgress(yc.type,this._token,e)}};function D1(t,e){if(e===void 0||e.partialResultToken===void 0)return;let n=e.partialResultToken;return delete e.partialResultToken,new bc(t,n)}});var ag=R(Et=>{"use strict";var T1=Et&&Et.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),R1=Et&&Et.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),A1=Et&&Et.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&T1(n,e,r[i]);return R1(n,e),n}})();Object.defineProperty(Et,"__esModule",{value:!0});Et.ConfigurationFeature=void 0;var C1=ye(),I1=A1(Vs()),O1=t=>class extends t{getConfiguration(e){return e?I1.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let n={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(C1.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(e)?r:r[0]:Array.isArray(e)?[]:null)}};Et.ConfigurationFeature=O1});var lg=R(Qs=>{"use strict";Object.defineProperty(Qs,"__esModule",{value:!0});Qs.WorkspaceFoldersFeature=void 0;var Ys=ye(),P1=t=>class extends t{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);let n=e.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Ys.Emitter,this.connection.onNotification(Ys.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(e){super.fillServerCapabilities(e);let n=e.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Ys.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Ys.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Qs.WorkspaceFoldersFeature=P1});var ug=R(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});Zs.CallHierarchyFeature=void 0;var xc=ye(),L1=t=>class extends t{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(xc.CallHierarchyPrepareRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:e=>{let n=xc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:e=>{let n=xc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Zs.CallHierarchyFeature=L1});var cg=R(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});Js.ShowDocumentFeature=void 0;var N1=ye(),M1=t=>class extends t{showDocument(e){return this.connection.sendRequest(N1.ShowDocumentRequest.type,e)}};Js.ShowDocumentFeature=M1});var fg=R(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.FileOperationsFeature=void 0;var zr=ye(),F1=t=>class extends t{onDidCreateFiles(e){return this.connection.onNotification(zr.DidCreateFilesNotification.type,n=>e(n))}onDidRenameFiles(e){return this.connection.onNotification(zr.DidRenameFilesNotification.type,n=>e(n))}onDidDeleteFiles(e){return this.connection.onNotification(zr.DidDeleteFilesNotification.type,n=>e(n))}onWillCreateFiles(e){return this.connection.onRequest(zr.WillCreateFilesRequest.type,(n,r)=>e(n,r))}onWillRenameFiles(e){return this.connection.onRequest(zr.WillRenameFilesRequest.type,(n,r)=>e(n,r))}onWillDeleteFiles(e){return this.connection.onRequest(zr.WillDeleteFilesRequest.type,(n,r)=>e(n,r))}};Xs.FileOperationsFeature=F1});var pg=R(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.LinkedEditingRangeFeature=void 0;var q1=ye(),j1=t=>class extends t{onLinkedEditingRange(e){return this.connection.onRequest(q1.LinkedEditingRangeRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0))}};ea.LinkedEditingRangeFeature=j1});var dg=R(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.TypeHierarchyFeature=void 0;var _c=ye(),B1=t=>class extends t{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(_c.TypeHierarchyPrepareRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:e=>{let n=_c.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:e=>{let n=_c.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};ta.TypeHierarchyFeature=B1});var mg=R(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.InlineValueFeature=void 0;var hg=ye(),W1=t=>class extends t{get inlineValue(){return{refresh:()=>this.connection.sendRequest(hg.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(hg.InlineValueRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n)))}}};na.InlineValueFeature=W1});var yg=R(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});ra.FoldingRangeFeature=void 0;var gg=ye(),z1=t=>class extends t{get foldingRange(){return{refresh:()=>this.connection.sendRequest(gg.FoldingRangeRefreshRequest.type),on:e=>{let n=gg.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};ra.FoldingRangeFeature=z1});var bg=R(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.InlayHintFeature=void 0;var wc=ye(),U1=t=>class extends t{get inlayHint(){return{refresh:()=>this.connection.sendRequest(wc.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(wc.InlayHintRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n))),resolve:e=>this.connection.onRequest(wc.InlayHintResolveRequest.type,(n,r)=>e(n,r))}}};ia.InlayHintFeature=U1});var xg=R(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.DiagnosticFeature=void 0;var to=ye(),$1=t=>class extends t{get diagnostics(){return{refresh:()=>this.connection.sendRequest(to.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(to.DocumentDiagnosticRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(to.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:e=>this.connection.onRequest(to.WorkspaceDiagnosticRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(to.WorkspaceDiagnosticRequest.partialResult,n)))}}};oa.DiagnosticFeature=$1});var _g=R(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.MonikerFeature=void 0;var H1=ye(),V1=t=>class extends t{get moniker(){return{on:e=>{let n=H1.MonikerRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};sa.MonikerFeature=V1});var wg=R(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.InlineCompletionFeature=void 0;var G1=ye(),K1=t=>class extends t{get inlineCompletion(){return{on:e=>this.connection.onRequest(G1.InlineCompletionRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n)))}}};aa.InlineCompletionFeature=K1});var Sg=R(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});la.TextDocumentContentFeature=void 0;var vg=ye(),Y1=t=>class extends t{get textDocumentContent(){return{refresh:e=>this.connection.sendRequest(vg.TextDocumentContentRefreshRequest.type,{uri:e}),on:e=>this.connection.onRequest(vg.TextDocumentContentRequest.type,(n,r)=>e(n,r))}}};la.TextDocumentContentFeature=Y1});var Tc=R(X=>{"use strict";var Q1=X&&X.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),Z1=X&&X.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Cg=X&&X.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&Q1(n,e,r[i]);return Z1(n,e),n}})();Object.defineProperty(X,"__esModule",{value:!0});X._NotebooksImpl=X._LanguagesImpl=X.BulkUnregistration=X.BulkRegistration=X.ErrorMessageTracker=void 0;X.combineConsoleFeatures=Ig;X.combineTelemetryFeatures=Og;X.combineTracerFeatures=Pg;X.combineClientFeatures=Lg;X.combineWindowFeatures=Ng;X.combineWorkspaceFeatures=Mg;X.combineLanguagesFeatures=Fg;X.combineNotebooksFeatures=qg;X.combineFeatures=hD;X.createConnection=mD;var C=ye(),it=Cg(Vs()),Sc=Cg(gc()),q=sg(),J1=ag(),X1=lg(),eD=ug(),tD=uc(),nD=cg(),rD=fg(),iD=pg(),oD=dg(),sD=mg(),aD=yg(),lD=bg(),uD=xg(),cD=hc(),fD=_g(),pD=wg(),dD=Sg();function vc(t){if(t!==null)return t}var Ec=class{_messages;constructor(){this._messages=Object.create(null)}add(e){let n=this._messages[e];n||(n=0),n++,this._messages[e]=n}sendErrors(e){Object.keys(this._messages).forEach(n=>{e.window.showErrorMessage(n)})}};X.ErrorMessageTracker=Ec;var ua=class{_rawConnection;_connection;constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(C.MessageType.Error,e)}warn(e){this.send(C.MessageType.Warning,e)}info(e){this.send(C.MessageType.Info,e)}log(e){this.send(C.MessageType.Log,e)}debug(e){this.send(C.MessageType.Debug,e)}send(e,n){this._rawConnection&&this._rawConnection.sendNotification(C.LogMessageNotification.type,{type:e,message:n}).catch(()=>{(0,C.RAL)().console.error("Sending log message failed")})}},kc=class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...n){let r={type:C.MessageType.Error,message:e,actions:n};return this.connection.sendRequest(C.ShowMessageRequest.type,r).then(vc)}showWarningMessage(e,...n){let r={type:C.MessageType.Warning,message:e,actions:n};return this.connection.sendRequest(C.ShowMessageRequest.type,r).then(vc)}showInformationMessage(e,...n){let r={type:C.MessageType.Info,message:e,actions:n};return this.connection.sendRequest(C.ShowMessageRequest.type,r).then(vc)}},Eg=(0,nD.ShowDocumentFeature)((0,q.ProgressFeature)(kc)),kg;(function(t){function e(){return new ca}t.create=e})(kg||(X.BulkRegistration=kg={}));var ca=class{_registrations=[];_registered=new Set;add(e,n){let r=it.string(e)?e:e.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let i=Sc.generateUuid();this._registrations.push({id:i,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},Dg;(function(t){function e(){return new no(void 0,[])}t.create=e})(Dg||(X.BulkUnregistration=Dg={}));var no=class{_connection;_unregistrations=new Map;constructor(e,n){this._connection=e,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let r of this._unregistrations.values())e.push(r);let n={unregisterations:e};this._connection.sendRequest(C.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(e){let n=it.string(e)?e:e.method,r=this._unregistrations.get(n);if(!r)return!1;let i={unregisterations:[r]};return this._connection.sendRequest(C.UnregistrationRequest.type,i).then(()=>{this._unregistrations.delete(n)},o=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},fa=class{_connection;attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,n,r){return e instanceof ca?this.registerMany(e):e instanceof no?this.registerSingle1(e,n,r):this.registerSingle2(e,n)}registerSingle1(e,n,r){let i=it.string(n)?n:n.method,o=Sc.generateUuid(),s={registrations:[{id:o,method:i,registerOptions:r||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(C.RegistrationRequest.type,s).then(a=>(e.add({id:o,method:i}),e),a=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(a)))}registerSingle2(e,n){let r=it.string(e)?e:e.method,i=Sc.generateUuid(),o={registrations:[{id:i,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(C.RegistrationRequest.type,o).then(s=>C.Disposable.create(()=>{this.unregisterSingle(i,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${i} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(e,n){let r={unregisterations:[{id:e,method:n}]};return this.connection.sendRequest(C.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)})}registerMany(e){let n=e.asRegistrationParams();return this.connection.sendRequest(C.RegistrationRequest.type,n).then(()=>new no(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},Dc=class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){function n(i){return i&&!!i.edit}let r=n(e)?e:{edit:e};return this.connection.sendRequest(C.ApplyWorkspaceEditRequest.type,r)}},Tg=(0,dD.TextDocumentContentFeature)((0,rD.FileOperationsFeature)((0,X1.WorkspaceFoldersFeature)((0,J1.ConfigurationFeature)(Dc)))),pa=class{_trace;_connection;constructor(){this._trace=C.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,n){this._trace!==C.Trace.Off&&this.connection.sendNotification(C.LogTraceNotification.type,{message:e,verbose:this._trace===C.Trace.Verbose?n:void 0}).catch(()=>{})}},da=class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(C.TelemetryEventNotification.type,e).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},ha=class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,q.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,n){return(0,q.attachPartialResult)(this.connection,n)}};X._LanguagesImpl=ha;var Rg=(0,pD.InlineCompletionFeature)((0,aD.FoldingRangeFeature)((0,fD.MonikerFeature)((0,uD.DiagnosticFeature)((0,lD.InlayHintFeature)((0,sD.InlineValueFeature)((0,oD.TypeHierarchyFeature)((0,iD.LinkedEditingRangeFeature)((0,tD.SemanticTokensFeature)((0,eD.CallHierarchyFeature)(ha)))))))))),ma=class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,q.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,n){return(0,q.attachPartialResult)(this.connection,n)}};X._NotebooksImpl=ma;var Ag=(0,cD.NotebookSyncFeature)(ma);function Ig(t,e){return function(n){return e(t(n))}}function Og(t,e){return function(n){return e(t(n))}}function Pg(t,e){return function(n){return e(t(n))}}function Lg(t,e){return function(n){return e(t(n))}}function Ng(t,e){return function(n){return e(t(n))}}function Mg(t,e){return function(n){return e(t(n))}}function Fg(t,e){return function(n){return e(t(n))}}function qg(t,e){return function(n){return e(t(n))}}function hD(t,e){function n(i,o,s){return i&&o?s(i,o):i||o}return{__brand:"features",console:n(t.console,e.console,Ig),tracer:n(t.tracer,e.tracer,Pg),telemetry:n(t.telemetry,e.telemetry,Og),client:n(t.client,e.client,Lg),window:n(t.window,e.window,Ng),workspace:n(t.workspace,e.workspace,Mg),languages:n(t.languages,e.languages,Fg),notebooks:n(t.notebooks,e.notebooks,qg)}}function mD(t,e,n){let r=n&&n.console?new(n.console(ua)):new ua,i=t(r);r.rawAttach(i);let o=n&&n.tracer?new(n.tracer(pa)):new pa,s=n&&n.telemetry?new(n.telemetry(da)):new da,a=n&&n.client?new(n.client(fa)):new fa,u=n&&n.window?new(n.window(Eg)):new Eg,l=n&&n.workspace?new(n.workspace(Tg)):new Tg,c=n&&n.languages?new(n.languages(Rg)):new Rg,f=n&&n.notebooks?new(n.notebooks(Ag)):new Ag,p=[r,o,s,a,u,l,c,f];function d(h){return h instanceof Promise?h:it.thenable(h)?new Promise((m,w)=>{h.then(T=>m(T),T=>w(T))}):Promise.resolve(h)}let b,g,S,y={listen:()=>i.listen(),sendRequest:(h,...m)=>i.sendRequest(it.string(h)?h:h.method,...m),onRequest:(h,m)=>i.onRequest(h,m),sendNotification:(h,m)=>{let w=it.string(h)?h:h.method;return i.sendNotification(w,m)},onNotification:(h,m)=>i.onNotification(h,m),onProgress:i.onProgress,sendProgress:i.sendProgress,onInitialize:h=>(g=h,{dispose:()=>{g=void 0}}),onInitialized:h=>i.onNotification(C.InitializedNotification.type,h),onShutdown:h=>(b=h,{dispose:()=>{b=void 0}}),onExit:h=>(S=h,{dispose:()=>{S=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return o},get client(){return a},get window(){return u},get workspace(){return l},get languages(){return c},get notebooks(){return f},onDidChangeConfiguration:h=>i.onNotification(C.DidChangeConfigurationNotification.type,h),onDidChangeWatchedFiles:h=>i.onNotification(C.DidChangeWatchedFilesNotification.type,h),__textDocumentSync:void 0,onDidOpenTextDocument:h=>i.onNotification(C.DidOpenTextDocumentNotification.type,h),onDidChangeTextDocument:h=>i.onNotification(C.DidChangeTextDocumentNotification.type,h),onDidCloseTextDocument:h=>i.onNotification(C.DidCloseTextDocumentNotification.type,h),onWillSaveTextDocument:h=>i.onNotification(C.WillSaveTextDocumentNotification.type,h),onWillSaveTextDocumentWaitUntil:h=>i.onRequest(C.WillSaveTextDocumentWaitUntilRequest.type,h),onDidSaveTextDocument:h=>i.onNotification(C.DidSaveTextDocumentNotification.type,h),sendDiagnostics:h=>i.sendNotification(C.PublishDiagnosticsNotification.type,h),onHover:h=>i.onRequest(C.HoverRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),void 0)),onCompletion:h=>i.onRequest(C.CompletionRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onCompletionResolve:h=>i.onRequest(C.CompletionResolveRequest.type,h),onSignatureHelp:h=>i.onRequest(C.SignatureHelpRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),void 0)),onDeclaration:h=>i.onRequest(C.DeclarationRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onDefinition:h=>i.onRequest(C.DefinitionRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onTypeDefinition:h=>i.onRequest(C.TypeDefinitionRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onImplementation:h=>i.onRequest(C.ImplementationRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onReferences:h=>i.onRequest(C.ReferencesRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onDocumentHighlight:h=>i.onRequest(C.DocumentHighlightRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onDocumentSymbol:h=>i.onRequest(C.DocumentSymbolRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onWorkspaceSymbol:h=>i.onRequest(C.WorkspaceSymbolRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onWorkspaceSymbolResolve:h=>i.onRequest(C.WorkspaceSymbolResolveRequest.type,h),onCodeAction:h=>i.onRequest(C.CodeActionRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onCodeActionResolve:h=>i.onRequest(C.CodeActionResolveRequest.type,(m,w)=>h(m,w)),onCodeLens:h=>i.onRequest(C.CodeLensRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onCodeLensResolve:h=>i.onRequest(C.CodeLensResolveRequest.type,(m,w)=>h(m,w)),onDocumentFormatting:h=>i.onRequest(C.DocumentFormattingRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),void 0)),onDocumentRangeFormatting:h=>i.onRequest(C.DocumentRangeFormattingRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),void 0)),onDocumentOnTypeFormatting:h=>i.onRequest(C.DocumentOnTypeFormattingRequest.type,(m,w)=>h(m,w)),onRenameRequest:h=>i.onRequest(C.RenameRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),void 0)),onPrepareRename:h=>i.onRequest(C.PrepareRenameRequest.type,(m,w)=>h(m,w)),onDocumentLinks:h=>i.onRequest(C.DocumentLinkRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onDocumentLinkResolve:h=>i.onRequest(C.DocumentLinkResolveRequest.type,(m,w)=>h(m,w)),onDocumentColor:h=>i.onRequest(C.DocumentColorRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onColorPresentation:h=>i.onRequest(C.ColorPresentationRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onFoldingRanges:h=>i.onRequest(C.FoldingRangeRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onSelectionRanges:h=>i.onRequest(C.SelectionRangeRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onExecuteCommand:h=>i.onRequest(C.ExecuteCommandRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),void 0)),dispose:()=>i.dispose()};for(let h of p)h.attach(y);return i.onRequest(C.InitializeRequest.type,h=>{e.initialize(h),it.string(h.trace)&&(o.trace=C.Trace.fromString(h.trace));for(let m of p)m.initialize(h.capabilities);if(g){let m=g(h,new C.CancellationTokenSource().token,(0,q.attachWorkDone)(i,h),void 0);return d(m).then(w=>{if(w instanceof C.ResponseError)return w;let T=w;T||(T={capabilities:{}});let v=T.capabilities;v||(v={},T.capabilities=v),v.textDocumentSync===void 0||v.textDocumentSync===null?v.textDocumentSync=it.number(y.__textDocumentSync)?y.__textDocumentSync:C.TextDocumentSyncKind.None:!it.number(v.textDocumentSync)&&!it.number(v.textDocumentSync.change)&&(v.textDocumentSync.change=it.number(y.__textDocumentSync)?y.__textDocumentSync:C.TextDocumentSyncKind.None);for(let E of p)E.fillServerCapabilities(v);return T})}else{let m={capabilities:{textDocumentSync:C.TextDocumentSyncKind.None}};for(let w of p)w.fillServerCapabilities(m.capabilities);return m}}),i.onRequest(C.ShutdownRequest.type,()=>{if(e.shutdownReceived=!0,b)return b(new C.CancellationTokenSource().token)}),i.onNotification(C.ExitNotification.type,()=>{try{if(S)return S()}finally{e.shutdownReceived?e.exit(0):e.exit(1)}}),i.onNotification(C.SetTraceNotification.type,h=>{o.trace=C.Trace.fromString(h.value)}),y}});var ro=R(Ae=>{"use strict";var gD=Ae&&Ae.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),Bg=Ae&&Ae.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&gD(e,t,n)};Object.defineProperty(Ae,"__esModule",{value:!0});Ae.ProposedFeatures=Ae.NotebookDocuments=Ae.TextDocuments=Ae.SemanticTokensBuilder=void 0;var yD=uc();Object.defineProperty(Ae,"SemanticTokensBuilder",{enumerable:!0,get:function(){return yD.SemanticTokensBuilder}});Bg(ye(),Ae);var bD=fc();Object.defineProperty(Ae,"TextDocuments",{enumerable:!0,get:function(){return bD.TextDocuments}});var xD=hc();Object.defineProperty(Ae,"NotebookDocuments",{enumerable:!0,get:function(){return xD.NotebookDocuments}});Bg(Tc(),Ae);var jg;(function(t){t.all={__brand:"features"}})(jg||(Ae.ProposedFeatures=jg={}))});var lo=R((N6,Fc)=>{"use strict";typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?Fc.exports={nextTick:OT}:Fc.exports=process;function OT(t,e,n,r){if(typeof t!="function")throw new TypeError('"callback" argument must be a function');var i=arguments.length,o,s;switch(i){case 0:case 1:return process.nextTick(t);case 2:return process.nextTick(function(){t.call(null,e)});case 3:return process.nextTick(function(){t.call(null,e,n)});case 4:return process.nextTick(function(){t.call(null,e,n,r)});default:for(o=new Array(i-1),s=0;s<o.length;)o[s++]=arguments[s];return process.nextTick(function(){t.apply(null,o)})}}});var dy=R((M6,py)=>{"use strict";var PT={}.toString;py.exports=Array.isArray||function(t){return PT.call(t)=="[object Array]"}});var qc=R((F6,hy)=>{"use strict";hy.exports=K("stream")});var wa=R((jc,gy)=>{"use strict";var _a=K("buffer"),Dt=_a.Buffer;function my(t,e){for(var n in t)e[n]=t[n]}Dt.from&&Dt.alloc&&Dt.allocUnsafe&&Dt.allocUnsafeSlow?gy.exports=_a:(my(_a,jc),jc.Buffer=rr);function rr(t,e,n){return Dt(t,e,n)}rr.prototype=Object.create(Dt.prototype);my(Dt,rr);rr.from=function(t,e,n){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Dt(t,e,n)};rr.alloc=function(t,e,n){if(typeof t!="number")throw new TypeError("Argument must be a number");var r=Dt(t);return e!==void 0?typeof n=="string"?r.fill(e,n):r.fill(e):r.fill(0),r};rr.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Dt(t)};rr.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return _a.SlowBuffer(t)}});var Hr=R(Ie=>{"use strict";function LT(t){return Array.isArray?Array.isArray(t):va(t)==="[object Array]"}Ie.isArray=LT;function NT(t){return typeof t=="boolean"}Ie.isBoolean=NT;function MT(t){return t===null}Ie.isNull=MT;function FT(t){return t==null}Ie.isNullOrUndefined=FT;function qT(t){return typeof t=="number"}Ie.isNumber=qT;function jT(t){return typeof t=="string"}Ie.isString=jT;function BT(t){return typeof t=="symbol"}Ie.isSymbol=BT;function WT(t){return t===void 0}Ie.isUndefined=WT;function zT(t){return va(t)==="[object RegExp]"}Ie.isRegExp=zT;function UT(t){return typeof t=="object"&&t!==null}Ie.isObject=UT;function $T(t){return va(t)==="[object Date]"}Ie.isDate=$T;function HT(t){return va(t)==="[object Error]"||t instanceof Error}Ie.isError=HT;function VT(t){return typeof t=="function"}Ie.isFunction=VT;function GT(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}Ie.isPrimitive=GT;Ie.isBuffer=K("buffer").Buffer.isBuffer;function va(t){return Object.prototype.toString.call(t)}});var yy=R((j6,Bc)=>{"use strict";typeof Object.create=="function"?Bc.exports=function(e,n){n&&(e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Bc.exports=function(e,n){if(n){e.super_=n;var r=function(){};r.prototype=n.prototype,e.prototype=new r,e.prototype.constructor=e}}});var Vr=R((B6,zc)=>{"use strict";try{if(Wc=K("util"),typeof Wc.inherits!="function")throw"";zc.exports=Wc.inherits}catch{zc.exports=yy()}var Wc});var xy=R((W6,Uc)=>{"use strict";function KT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var by=wa().Buffer,uo=K("util");function YT(t,e,n){t.copy(e,n)}Uc.exports=(function(){function t(){KT(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(n){var r={data:n,next:null};this.length>0?this.tail.next=r:this.head=r,this.tail=r,++this.length},t.prototype.unshift=function(n){var r={data:n,next:this.head};this.length===0&&(this.tail=r),this.head=r,++this.length},t.prototype.shift=function(){if(this.length!==0){var n=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,n}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(n){if(this.length===0)return"";for(var r=this.head,i=""+r.data;r=r.next;)i+=n+r.data;return i},t.prototype.concat=function(n){if(this.length===0)return by.alloc(0);for(var r=by.allocUnsafe(n>>>0),i=this.head,o=0;i;)YT(i.data,r,o),o+=i.data.length,i=i.next;return r},t})();uo&&uo.inspect&&uo.inspect.custom&&(Uc.exports.prototype[uo.inspect.custom]=function(){var t=uo.inspect({length:this.length});return this.constructor.name+" "+t})});var $c=R((z6,_y)=>{"use strict";var Sa=lo();function QT(t,e){var n=this,r=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return r||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Sa.nextTick(Ea,this,t)):Sa.nextTick(Ea,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(o){!e&&o?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,Sa.nextTick(Ea,n,o)):Sa.nextTick(Ea,n,o):e&&e(o)}),this)}function ZT(){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 Ea(t,e){t.emit("error",e)}_y.exports={destroy:QT,undestroy:ZT}});var vy=R((U6,wy)=>{"use strict";wy.exports=K("util").deprecate});var Vc=R(($6,Cy)=>{"use strict";var ir=lo();Cy.exports=be;function Ey(t){var e=this;this.next=null,this.entry=null,this.finish=function(){mR(e,t)}}var JT=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:ir.nextTick,Gr;be.WritableState=fo;var ky=Object.create(Hr());ky.inherits=Vr();var XT={deprecate:vy()},Dy=qc(),Da=wa().Buffer,eR=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function tR(t){return Da.from(t)}function nR(t){return Da.isBuffer(t)||t instanceof eR}var Ty=$c();ky.inherits(be,Dy);function rR(){}function fo(t,e){Gr=Gr||or(),t=t||{};var n=e instanceof Gr;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var r=t.highWaterMark,i=t.writableHighWaterMark,o=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:n&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){cR(e,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Ey(this)}fo.prototype.getBuffer=function(){for(var e=this.bufferedRequest,n=[];e;)n.push(e),e=e.next;return n};(function(){try{Object.defineProperty(fo.prototype,"buffer",{get:XT.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var ka;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ka=Function.prototype[Symbol.hasInstance],Object.defineProperty(be,Symbol.hasInstance,{value:function(t){return ka.call(this,t)?!0:this!==be?!1:t&&t._writableState instanceof fo}})):ka=function(t){return t instanceof this};function be(t){if(Gr=Gr||or(),!ka.call(be,this)&&!(this instanceof Gr))return new be(t);this._writableState=new fo(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),Dy.call(this)}be.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function iR(t,e){var n=new Error("write after end");t.emit("error",n),ir.nextTick(e,n)}function oR(t,e,n,r){var i=!0,o=!1;return n===null?o=new TypeError("May not write null values to stream"):typeof n!="string"&&n!==void 0&&!e.objectMode&&(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),ir.nextTick(r,o),i=!1),i}be.prototype.write=function(t,e,n){var r=this._writableState,i=!1,o=!r.objectMode&&nR(t);return o&&!Da.isBuffer(t)&&(t=tR(t)),typeof e=="function"&&(n=e,e=null),o?e="buffer":e||(e=r.defaultEncoding),typeof n!="function"&&(n=rR),r.ended?iR(this,n):(o||oR(this,r,t,n))&&(r.pendingcb++,i=aR(this,r,o,t,e,n)),i};be.prototype.cork=function(){var t=this._writableState;t.corked++};be.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Ry(this,t))};be.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function sR(t,e,n){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Da.from(e,n)),e}Object.defineProperty(be.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function aR(t,e,n,r,i,o){if(!n){var s=sR(e,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=e.objectMode?1:r.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Hc(t,e,!1,a,r,i,o);return u}function Hc(t,e,n,r,i,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function lR(t,e,n,r,i){--e.pendingcb,n?(ir.nextTick(i,r),ir.nextTick(co,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),co(t,e))}function uR(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function cR(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(uR(n),e)lR(t,n,r,e,i);else{var o=Ay(n);!o&&!n.corked&&!n.bufferProcessing&&n.bufferedRequest&&Ry(t,n),r?JT(Sy,t,n,o,i):Sy(t,n,o,i)}}function Sy(t,e,n,r){n||fR(t,e),e.pendingcb--,r(),co(t,e)}function fR(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Ry(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),o=e.corkedRequestsFree;o.entry=n;for(var s=0,a=!0;n;)i[s]=n,n.isBuf||(a=!1),n=n.next,s+=1;i.allBuffers=a,Hc(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new Ey(e),e.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,l=n.encoding,c=n.callback,f=e.objectMode?1:u.length;if(Hc(t,e,!1,f,u,l,c),n=n.next,e.bufferedRequestCount--,e.writing)break}n===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}be.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))};be.prototype._writev=null;be.prototype.end=function(t,e,n){var r=this._writableState;typeof t=="function"?(n=t,t=null,e=null):typeof e=="function"&&(n=e,e=null),t!=null&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||hR(this,r,n)};function Ay(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function pR(t,e){t._final(function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),co(t,e)})}function dR(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,ir.nextTick(pR,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function co(t,e){var n=Ay(e);return n&&(dR(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),n}function hR(t,e,n){e.ending=!0,co(t,e),n&&(e.finished?ir.nextTick(n):t.once("finish",n)),e.ended=!0,t.writable=!1}function mR(t,e,n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree.next=t}Object.defineProperty(be.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});be.prototype.destroy=Ty.destroy;be.prototype._undestroy=Ty.undestroy;be.prototype._destroy=function(t,e){this.end(),e(t)}});var or=R((H6,Ly)=>{"use strict";var Iy=lo(),gR=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};Ly.exports=Vt;var Oy=Object.create(Hr());Oy.inherits=Vr();var Py=Yc(),Kc=Vc();Oy.inherits(Vt,Py);for(Gc=gR(Kc.prototype),Ta=0;Ta<Gc.length;Ta++)Ra=Gc[Ta],Vt.prototype[Ra]||(Vt.prototype[Ra]=Kc.prototype[Ra]);var Gc,Ra,Ta;function Vt(t){if(!(this instanceof Vt))return new Vt(t);Py.call(this,t),Kc.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",yR)}Object.defineProperty(Vt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function yR(){this.allowHalfOpen||this._writableState.ended||Iy.nextTick(bR,this)}function bR(t){t.end()}Object.defineProperty(Vt.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}});Vt.prototype._destroy=function(t,e){this.push(null),this.end(),Iy.nextTick(e,t)}});var Yc=R((G6,Vy)=>{"use strict";var Yr=lo();Vy.exports=ie;var xR=dy(),po;ie.ReadableState=Wy;var V6=K("events").EventEmitter,qy=function(t,e){return t.listeners(e).length},ef=qc(),ho=wa().Buffer,_R=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function wR(t){return ho.from(t)}function vR(t){return ho.isBuffer(t)||t instanceof _R}var jy=Object.create(Hr());jy.inherits=Vr();var Qc=K("util"),J=void 0;Qc&&Qc.debuglog?J=Qc.debuglog("stream"):J=function(){};var SR=xy(),By=$c(),Kr;jy.inherits(ie,ef);var Zc=["error","close","destroy","pause","resume"];function ER(t,e,n){if(typeof t.prependListener=="function")return t.prependListener(e,n);!t._events||!t._events[e]?t.on(e,n):xR(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]}function Wy(t,e){po=po||or(),t=t||{};var n=e instanceof po;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var r=t.highWaterMark,i=t.readableHighWaterMark,o=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:n&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new SR,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Kr||(Kr=K("string_decoder").StringDecoder),this.decoder=new Kr(t.encoding),this.encoding=t.encoding)}function ie(t){if(po=po||or(),!(this instanceof ie))return new ie(t);this._readableState=new Wy(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),ef.call(this)}Object.defineProperty(ie.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});ie.prototype.destroy=By.destroy;ie.prototype._undestroy=By.undestroy;ie.prototype._destroy=function(t,e){this.push(null),e(t)};ie.prototype.push=function(t,e){var n=this._readableState,r;return n.objectMode?r=!0:typeof t=="string"&&(e=e||n.defaultEncoding,e!==n.encoding&&(t=ho.from(t,e),e=""),r=!0),zy(this,t,e,!1,r)};ie.prototype.unshift=function(t){return zy(this,t,null,!0,!1)};function zy(t,e,n,r,i){var o=t._readableState;if(e===null)o.reading=!1,RR(t,o);else{var s;i||(s=kR(o,e)),s?t.emit("error",s):o.objectMode||e&&e.length>0?(typeof e!="string"&&!o.objectMode&&Object.getPrototypeOf(e)!==ho.prototype&&(e=wR(e)),r?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):Jc(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(e=o.decoder.write(e),o.objectMode||e.length!==0?Jc(t,o,e,!1):Uy(t,o)):Jc(t,o,e,!1))):r||(o.reading=!1)}return DR(o)}function Jc(t,e,n,r){e.flowing&&e.length===0&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&Aa(t)),Uy(t,e)}function kR(t,e){var n;return!vR(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(n=new TypeError("Invalid non-string/buffer chunk")),n}function DR(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}ie.prototype.isPaused=function(){return this._readableState.flowing===!1};ie.prototype.setEncoding=function(t){return Kr||(Kr=K("string_decoder").StringDecoder),this._readableState.decoder=new Kr(t),this._readableState.encoding=t,this};var Ny=8388608;function TR(t){return t>=Ny?t=Ny:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function My(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=TR(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}ie.prototype.read=function(t){J("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return J("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Xc(this):Aa(this),null;if(t=My(t,e),t===0&&e.ended)return e.length===0&&Xc(this),null;var r=e.needReadable;J("need readable",r),(e.length===0||e.length-t<e.highWaterMark)&&(r=!0,J("length less than watermark",r)),e.ended||e.reading?(r=!1,J("reading or ended",r)):r&&(J("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=My(n,e)));var i;return t>0?i=$y(t,e):i=null,i===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&Xc(this)),i!==null&&this.emit("data",i),i};function RR(t,e){if(!e.ended){if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,Aa(t)}}function Aa(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(J("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Yr.nextTick(Fy,t):Fy(t))}function Fy(t){J("emit readable"),t.emit("readable"),tf(t)}function Uy(t,e){e.readingMore||(e.readingMore=!0,Yr.nextTick(AR,t,e))}function AR(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(J("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}ie.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};ie.prototype.pipe=function(t,e){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t);break}r.pipesCount+=1,J("pipe count=%d opts=%j",r.pipesCount,e);var i=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,o=i?a:S;r.endEmitted?Yr.nextTick(o):n.once("end",o),t.on("unpipe",s);function s(y,h){J("onunpipe"),y===n&&h&&h.hasUnpiped===!1&&(h.hasUnpiped=!0,c())}function a(){J("onend"),t.end()}var u=CR(n);t.on("drain",u);var l=!1;function c(){J("cleanup"),t.removeListener("close",b),t.removeListener("finish",g),t.removeListener("drain",u),t.removeListener("error",d),t.removeListener("unpipe",s),n.removeListener("end",a),n.removeListener("end",S),n.removeListener("data",p),l=!0,r.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}var f=!1;n.on("data",p);function p(y){J("ondata"),f=!1;var h=t.write(y);h===!1&&!f&&((r.pipesCount===1&&r.pipes===t||r.pipesCount>1&&Hy(r.pipes,t)!==-1)&&!l&&(J("false write response, pause",r.awaitDrain),r.awaitDrain++,f=!0),n.pause())}function d(y){J("onerror",y),S(),t.removeListener("error",d),qy(t,"error")===0&&t.emit("error",y)}ER(t,"error",d);function b(){t.removeListener("finish",g),S()}t.once("close",b);function g(){J("onfinish"),t.removeListener("close",b),S()}t.once("finish",g);function S(){J("unpipe"),n.unpipe(t)}return t.emit("pipe",n),r.flowing||(J("pipe resume"),n.resume()),t};function CR(t){return function(){var e=t._readableState;J("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&qy(t,"data")&&(e.flowing=!0,tf(t))}}ie.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n),this);if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=Hy(e.pipes,t);return s===-1?this:(e.pipes.splice(s,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n),this)};ie.prototype.on=function(t,e){var n=ef.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var r=this._readableState;!r.endEmitted&&!r.readableListening&&(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&Aa(this):Yr.nextTick(IR,this))}return n};ie.prototype.addListener=ie.prototype.on;function IR(t){J("readable nexttick read 0"),t.read(0)}ie.prototype.resume=function(){var t=this._readableState;return t.flowing||(J("resume"),t.flowing=!0,OR(this,t)),this};function OR(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Yr.nextTick(PR,t,e))}function PR(t,e){e.reading||(J("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),tf(t),e.flowing&&!e.reading&&t.read(0)}ie.prototype.pause=function(){return J("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(J("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function tf(t){var e=t._readableState;for(J("flow",e.flowing);e.flowing&&t.read()!==null;);}ie.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;t.on("end",function(){if(J("wrapped end"),n.decoder&&!n.ended){var s=n.decoder.end();s&&s.length&&e.push(s)}e.push(null)}),t.on("data",function(s){if(J("wrapped data"),n.decoder&&(s=n.decoder.write(s)),!(n.objectMode&&s==null)&&!(!n.objectMode&&(!s||!s.length))){var a=e.push(s);a||(r=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=(function(s){return function(){return t[s].apply(t,arguments)}})(i));for(var o=0;o<Zc.length;o++)t.on(Zc[o],this.emit.bind(this,Zc[o]));return this._read=function(s){J("wrapped _read",s),r&&(r=!1,t.resume())},this};Object.defineProperty(ie.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});ie._fromList=$y;function $y(t,e){if(e.length===0)return null;var n;return e.objectMode?n=e.buffer.shift():!t||t>=e.length?(e.decoder?n=e.buffer.join(""):e.buffer.length===1?n=e.buffer.head.data:n=e.buffer.concat(e.length),e.buffer.clear()):n=LR(t,e.buffer,e.decoder),n}function LR(t,e,n){var r;return t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):t===e.head.data.length?r=e.shift():r=n?NR(t,e):MR(t,e),r}function NR(t,e){var n=e.head,r=1,i=n.data;for(t-=i.length;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),t-=s,t===0){s===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++r}return e.length-=r,i}function MR(t,e){var n=ho.allocUnsafe(t),r=e.head,i=1;for(r.data.copy(n),t-=r.data.length;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),t-=s,t===0){s===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++i}return e.length-=i,n}function Xc(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Yr.nextTick(FR,e,t))}function FR(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function Hy(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}});var nf=R((K6,Yy)=>{"use strict";Yy.exports=Gt;var Ca=or(),Ky=Object.create(Hr());Ky.inherits=Vr();Ky.inherits(Gt,Ca);function qR(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,e!=null&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Gt(t){if(!(this instanceof Gt))return new Gt(t);Ca.call(this,t),this._transformState={afterTransform:qR.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",jR)}function jR(){var t=this;typeof this._flush=="function"?this._flush(function(e,n){Gy(t,e,n)}):Gy(this,null,null)}Gt.prototype.push=function(t,e){return this._transformState.needTransform=!1,Ca.prototype.push.call(this,t,e)};Gt.prototype._transform=function(t,e,n){throw new Error("_transform() is not implemented")};Gt.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Gt.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Gt.prototype._destroy=function(t,e){var n=this;Ca.prototype._destroy.call(this,t,function(r){e(r),n.emit("close")})};function Gy(t,e,n){if(e)return t.emit("error",e);if(n!=null&&t.push(n),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}});var Xy=R((Y6,Jy)=>{"use strict";Jy.exports=mo;var Qy=nf(),Zy=Object.create(Hr());Zy.inherits=Vr();Zy.inherits(mo,Qy);function mo(t){if(!(this instanceof mo))return new mo(t);Qy.call(this,t)}mo.prototype._transform=function(t,e,n){n(null,t)}});var eb=R((De,Ia)=>{"use strict";var Tt=K("stream");process.env.READABLE_STREAM==="disable"&&Tt?(Ia.exports=Tt,De=Ia.exports=Tt.Readable,De.Readable=Tt.Readable,De.Writable=Tt.Writable,De.Duplex=Tt.Duplex,De.Transform=Tt.Transform,De.PassThrough=Tt.PassThrough,De.Stream=Tt):(De=Ia.exports=Yc(),De.Stream=Tt||De,De.Readable=De,De.Writable=Vc(),De.Duplex=or(),De.Transform=nf(),De.PassThrough=Xy())});var nb=R((Q6,tb)=>{"use strict";tb.exports=eb().PassThrough});var sb=R((Z6,ob)=>{"use strict";var rb=K("util"),La=nb();ob.exports={Readable:Oa,Writable:Pa};rb.inherits(Oa,La);rb.inherits(Pa,La);function ib(t,e,n){t[e]=function(){return delete t[e],n.apply(this,arguments),this[e].apply(this,arguments)}}function Oa(t,e){if(!(this instanceof Oa))return new Oa(t,e);La.call(this,e),ib(this,"_read",function(){var n=t.call(this,e),r=this.emit.bind(this,"error");n.on("error",r),n.pipe(this)}),this.emit("readable")}function Pa(t,e){if(!(this instanceof Pa))return new Pa(t,e);La.call(this,e),ib(this,"_write",function(){var n=t.call(this,e),r=this.emit.bind(this,"error");n.on("error",r),this.pipe(n)}),this.emit("writable")}});var ue=R((N5,vb)=>{"use strict";var uf=class extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError(`Expected input to be an Array, got ${typeof e}`);let n="";for(let r=0;r<e.length;r++)n+=` ${e[r].stack}
7
- `;super(n),this.name="AggregateError",this.errors=e}};vb.exports={AggregateError:uf,ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,n){return t.slice(e,n)},Error,FunctionPrototypeCall(t,e,...n){return t.call(e,...n)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,n){return Object.defineProperty(t,e,n)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,n){return t.then(e,n)},PromiseReject(t){return Promise.reject(t)},PromiseResolve(t){return Promise.resolve(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,n){return t.slice(e,n)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(t,e,n){return t.set(e,n)},Boolean,Uint8Array}});var cf=R((M5,Sb)=>{"use strict";Sb.exports={format(t,...e){return t.replace(/%([sdifj])/g,function(...[n,r]){let i=e.shift();return r==="f"?i.toFixed(6):r==="j"?JSON.stringify(i):r==="s"&&typeof i=="object"?`${i.constructor!==Object?i.constructor.name:""} {}`.trim():i.toString()})},inspect(t){switch(typeof t){case"string":if(t.includes("'"))if(t.includes('"')){if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}else return`"${t}"`;return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}}}});var Oe=R((F5,Db)=>{"use strict";var{format:$A,inspect:ja}=cf(),{AggregateError:HA}=ue(),VA=globalThis.AggregateError||HA,GA=Symbol("kIsNodeError"),KA=["string","function","number","object","Function","Object","boolean","bigint","symbol"],YA=/^([A-Z][a-z0-9]*)+$/,QA="__node_internal_",Ba={};function lr(t,e){if(!t)throw new Ba.ERR_INTERNAL_ASSERTION(e)}function Eb(t){let e="",n=t.length,r=t[0]==="-"?1:0;for(;n>=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function ZA(t,e,n){if(typeof e=="function")return lr(e.length<=n.length,`Code: ${t}; The provided arguments length (${n.length}) does not match the required ones (${e.length}).`),e(...n);let r=(e.match(/%[dfijoOs]/g)||[]).length;return lr(r===n.length,`Code: ${t}; The provided arguments length (${n.length}) does not match the required ones (${r}).`),n.length===0?e:$A(e,...n)}function Te(t,e,n){n||(n=Error);class r extends n{constructor(...o){super(ZA(t,e,o))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(r.prototype,{name:{value:n.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),r.prototype.code=t,r.prototype[GA]=!0,Ba[t]=r}function kb(t){let e=QA+t.name;return Object.defineProperty(t,"name",{value:e}),t}function JA(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let n=new VA([e,t],e.message);return n.code=e.code,n}return t||e}var ff=class extends Error{constructor(e="The operation was aborted",n=void 0){if(n!==void 0&&typeof n!="object")throw new Ba.ERR_INVALID_ARG_TYPE("options","Object",n);super(e,n),this.code="ABORT_ERR",this.name="AbortError"}};Te("ERR_ASSERTION","%s",Error);Te("ERR_INVALID_ARG_TYPE",(t,e,n)=>{lr(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let r="The ";t.endsWith(" argument")?r+=`${t} `:r+=`"${t}" ${t.includes(".")?"property":"argument"} `,r+="must be ";let i=[],o=[],s=[];for(let u of e)lr(typeof u=="string","All expected entries have to be of type string"),KA.includes(u)?i.push(u.toLowerCase()):YA.test(u)?o.push(u):(lr(u!=="object",'The value "object" should be written as "Object"'),s.push(u));if(o.length>0){let u=i.indexOf("object");u!==-1&&(i.splice(i,u,1),o.push("Object"))}if(i.length>0){switch(i.length){case 1:r+=`of type ${i[0]}`;break;case 2:r+=`one of type ${i[0]} or ${i[1]}`;break;default:{let u=i.pop();r+=`one of type ${i.join(", ")}, or ${u}`}}(o.length>0||s.length>0)&&(r+=" or ")}if(o.length>0){switch(o.length){case 1:r+=`an instance of ${o[0]}`;break;case 2:r+=`an instance of ${o[0]} or ${o[1]}`;break;default:{let u=o.pop();r+=`an instance of ${o.join(", ")}, or ${u}`}}s.length>0&&(r+=" or ")}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(r+="an "),r+=`${s[0]}`;break;case 2:r+=`one of ${s[0]} or ${s[1]}`;break;default:{let u=s.pop();r+=`one of ${s.join(", ")}, or ${u}`}}if(n==null)r+=`. Received ${n}`;else if(typeof n=="function"&&n.name)r+=`. Received function ${n.name}`;else if(typeof n=="object"){var a;if((a=n.constructor)!==null&&a!==void 0&&a.name)r+=`. Received an instance of ${n.constructor.name}`;else{let u=ja(n,{depth:-1});r+=`. Received ${u}`}}else{let u=ja(n,{colors:!1});u.length>25&&(u=`${u.slice(0,25)}...`),r+=`. Received type ${typeof n} (${u})`}return r},TypeError);Te("ERR_INVALID_ARG_VALUE",(t,e,n="is invalid")=>{let r=ja(e);return r.length>128&&(r=r.slice(0,128)+"..."),`The ${t.includes(".")?"property":"argument"} '${t}' ${n}. Received ${r}`},TypeError);Te("ERR_INVALID_RETURN_VALUE",(t,e,n)=>{var r;let i=n!=null&&(r=n.constructor)!==null&&r!==void 0&&r.name?`instance of ${n.constructor.name}`:`type ${typeof n}`;return`Expected ${t} to be returned from the "${e}" function but got ${i}.`},TypeError);Te("ERR_MISSING_ARGS",(...t)=>{lr(t.length>0,"At least one arg needs to be specified");let e,n=t.length;switch(t=(Array.isArray(t)?t:[t]).map(r=>`"${r}"`).join(" or "),n){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{let r=t.pop();e+=`The ${t.join(", ")}, and ${r} arguments`}break}return`${e} must be specified`},TypeError);Te("ERR_OUT_OF_RANGE",(t,e,n)=>{lr(e,'Missing "range" argument');let r;if(Number.isInteger(n)&&Math.abs(n)>2**32)r=Eb(String(n));else if(typeof n=="bigint"){r=String(n);let i=BigInt(2)**BigInt(32);(n>i||n<-i)&&(r=Eb(r)),r+="n"}else r=ja(n);return`The value of "${t}" is out of range. It must be ${e}. Received ${r}`},RangeError);Te("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);Te("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);Te("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);Te("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);Te("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);Te("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Te("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);Te("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);Te("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);Te("ERR_STREAM_WRITE_AFTER_END","write after end",Error);Te("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);Db.exports={AbortError:ff,aggregateTwoErrors:kb(JA),hideStackFrames:kb,codes:Ba}});var Mb=R((_o,xo)=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});var Ob=new WeakMap,pf=new WeakMap;function oe(t){let e=Ob.get(t);return console.assert(e!=null,"'this' is expected an Event object, but got",t),e}function Tb(t){if(t.passiveListener!=null){typeof console<"u"&&typeof console.error=="function"&&console.error("Unable to preventDefault inside passive event listener invocation.",t.passiveListener);return}t.event.cancelable&&(t.canceled=!0,typeof t.event.preventDefault=="function"&&t.event.preventDefault())}function Jr(t,e){Ob.set(this,{eventTarget:t,event:e,eventPhase:2,currentTarget:t,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:e.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let n=Object.keys(e);for(let r=0;r<n.length;++r){let i=n[r];i in this||Object.defineProperty(this,i,Pb(i))}}Jr.prototype={get type(){return oe(this).event.type},get target(){return oe(this).eventTarget},get currentTarget(){return oe(this).currentTarget},composedPath(){let t=oe(this).currentTarget;return t==null?[]:[t]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return oe(this).eventPhase},stopPropagation(){let t=oe(this);t.stopped=!0,typeof t.event.stopPropagation=="function"&&t.event.stopPropagation()},stopImmediatePropagation(){let t=oe(this);t.stopped=!0,t.immediateStopped=!0,typeof t.event.stopImmediatePropagation=="function"&&t.event.stopImmediatePropagation()},get bubbles(){return!!oe(this).event.bubbles},get cancelable(){return!!oe(this).event.cancelable},preventDefault(){Tb(oe(this))},get defaultPrevented(){return oe(this).canceled},get composed(){return!!oe(this).event.composed},get timeStamp(){return oe(this).timeStamp},get srcElement(){return oe(this).eventTarget},get cancelBubble(){return oe(this).stopped},set cancelBubble(t){if(!t)return;let e=oe(this);e.stopped=!0,typeof e.event.cancelBubble=="boolean"&&(e.event.cancelBubble=!0)},get returnValue(){return!oe(this).canceled},set returnValue(t){t||Tb(oe(this))},initEvent(){}};Object.defineProperty(Jr.prototype,"constructor",{value:Jr,configurable:!0,writable:!0});typeof window<"u"&&typeof window.Event<"u"&&(Object.setPrototypeOf(Jr.prototype,window.Event.prototype),pf.set(window.Event.prototype,Jr));function Pb(t){return{get(){return oe(this).event[t]},set(e){oe(this).event[t]=e},configurable:!0,enumerable:!0}}function XA(t){return{value(){let e=oe(this).event;return e[t].apply(e,arguments)},configurable:!0,enumerable:!0}}function eC(t,e){let n=Object.keys(e);if(n.length===0)return t;function r(i,o){t.call(this,i,o)}r.prototype=Object.create(t.prototype,{constructor:{value:r,configurable:!0,writable:!0}});for(let i=0;i<n.length;++i){let o=n[i];if(!(o in t.prototype)){let a=typeof Object.getOwnPropertyDescriptor(e,o).value=="function";Object.defineProperty(r.prototype,o,a?XA(o):Pb(o))}}return r}function Lb(t){if(t==null||t===Object.prototype)return Jr;let e=pf.get(t);return e==null&&(e=eC(Lb(Object.getPrototypeOf(t)),t),pf.set(t,e)),e}function tC(t,e){let n=Lb(Object.getPrototypeOf(e));return new n(t,e)}function nC(t){return oe(t).immediateStopped}function rC(t,e){oe(t).eventPhase=e}function iC(t,e){oe(t).currentTarget=e}function Rb(t,e){oe(t).passiveListener=e}var Nb=new WeakMap,Ab=1,Cb=2,Wa=3;function za(t){return t!==null&&typeof t=="object"}function bo(t){let e=Nb.get(t);if(e==null)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return e}function oC(t){return{get(){let n=bo(this).get(t);for(;n!=null;){if(n.listenerType===Wa)return n.listener;n=n.next}return null},set(e){typeof e!="function"&&!za(e)&&(e=null);let n=bo(this),r=null,i=n.get(t);for(;i!=null;)i.listenerType===Wa?r!==null?r.next=i.next:i.next!==null?n.set(t,i.next):n.delete(t):r=i,i=i.next;if(e!==null){let o={listener:e,listenerType:Wa,passive:!1,once:!1,next:null};r===null?n.set(t,o):r.next=o}},configurable:!0,enumerable:!0}}function df(t,e){Object.defineProperty(t,`on${e}`,oC(e))}function Ib(t){function e(){yt.call(this)}e.prototype=Object.create(yt.prototype,{constructor:{value:e,configurable:!0,writable:!0}});for(let n=0;n<t.length;++n)df(e.prototype,t[n]);return e}function yt(){if(this instanceof yt){Nb.set(this,new Map);return}if(arguments.length===1&&Array.isArray(arguments[0]))return Ib(arguments[0]);if(arguments.length>0){let t=new Array(arguments.length);for(let e=0;e<arguments.length;++e)t[e]=arguments[e];return Ib(t)}throw new TypeError("Cannot call a class as a function")}yt.prototype={addEventListener(t,e,n){if(e==null)return;if(typeof e!="function"&&!za(e))throw new TypeError("'listener' should be a function or an object.");let r=bo(this),i=za(n),s=(i?!!n.capture:!!n)?Ab:Cb,a={listener:e,listenerType:s,passive:i&&!!n.passive,once:i&&!!n.once,next:null},u=r.get(t);if(u===void 0){r.set(t,a);return}let l=null;for(;u!=null;){if(u.listener===e&&u.listenerType===s)return;l=u,u=u.next}l.next=a},removeEventListener(t,e,n){if(e==null)return;let r=bo(this),o=(za(n)?!!n.capture:!!n)?Ab:Cb,s=null,a=r.get(t);for(;a!=null;){if(a.listener===e&&a.listenerType===o){s!==null?s.next=a.next:a.next!==null?r.set(t,a.next):r.delete(t);return}s=a,a=a.next}},dispatchEvent(t){if(t==null||typeof t.type!="string")throw new TypeError('"event.type" should be a string.');let e=bo(this),n=t.type,r=e.get(n);if(r==null)return!0;let i=tC(this,t),o=null;for(;r!=null;){if(r.once?o!==null?o.next=r.next:r.next!==null?e.set(n,r.next):e.delete(n):o=r,Rb(i,r.passive?r.listener:null),typeof r.listener=="function")try{r.listener.call(this,i)}catch(s){typeof console<"u"&&typeof console.error=="function"&&console.error(s)}else r.listenerType!==Wa&&typeof r.listener.handleEvent=="function"&&r.listener.handleEvent(i);if(nC(i))break;r=r.next}return Rb(i,null),rC(i,0),iC(i,null),!i.defaultPrevented}};Object.defineProperty(yt.prototype,"constructor",{value:yt,configurable:!0,writable:!0});typeof window<"u"&&typeof window.EventTarget<"u"&&Object.setPrototypeOf(yt.prototype,window.EventTarget.prototype);_o.defineEventAttribute=df;_o.EventTarget=yt;_o.default=yt;xo.exports=yt;xo.exports.EventTarget=xo.exports.default=yt;xo.exports.defineEventAttribute=df});var Xr=R((vo,wo)=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});var hf=Mb(),xn=class extends hf.EventTarget{constructor(){throw super(),new TypeError("AbortSignal cannot be constructed directly")}get aborted(){let e=Ua.get(this);if(typeof e!="boolean")throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`);return e}};hf.defineEventAttribute(xn.prototype,"abort");function sC(){let t=Object.create(xn.prototype);return hf.EventTarget.call(t),Ua.set(t,!1),t}function aC(t){Ua.get(t)===!1&&(Ua.set(t,!0),t.dispatchEvent({type:"abort"}))}var Ua=new WeakMap;Object.defineProperties(xn.prototype,{aborted:{enumerable:!0}});typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(xn.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});var _n=class{constructor(){qb.set(this,sC())}get signal(){return Fb(this)}abort(){aC(Fb(this))}},qb=new WeakMap;function Fb(t){let e=qb.get(t);if(e==null)throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${t===null?"null":typeof t}`);return e}Object.defineProperties(_n.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}});typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(_n.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"});vo.AbortController=_n;vo.AbortSignal=xn;vo.default=_n;wo.exports=_n;wo.exports.AbortController=wo.exports.default=_n;wo.exports.AbortSignal=xn});var qe=R((q5,gf)=>{"use strict";var lC=K("buffer"),{format:uC,inspect:cC}=cf(),{codes:{ERR_INVALID_ARG_TYPE:mf}}=Oe(),{kResistStopPropagation:fC,AggregateError:pC,SymbolDispose:dC}=ue(),hC=globalThis.AbortSignal||Xr().AbortSignal,mC=globalThis.AbortController||Xr().AbortController,gC=Object.getPrototypeOf(async function(){}).constructor,jb=globalThis.Blob||lC.Blob,yC=typeof jb<"u"?function(e){return e instanceof jb}:function(e){return!1},Bb=(t,e)=>{if(t!==void 0&&(t===null||typeof t!="object"||!("aborted"in t)))throw new mf(e,"AbortSignal",t)},bC=(t,e)=>{if(typeof t!="function")throw new mf(e,"Function",t)};gf.exports={AggregateError:pC,kEmptyObject:Object.freeze({}),once(t){let e=!1;return function(...n){e||(e=!0,t.apply(this,n))}},createDeferredPromise:function(){let t,e;return{promise:new Promise((r,i)=>{t=r,e=i}),resolve:t,reject:e}},promisify(t){return new Promise((e,n)=>{t((r,...i)=>r?n(r):e(...i))})},debuglog(){return function(){}},format:uC,inspect:cC,types:{isAsyncFunction(t){return t instanceof gC},isArrayBufferView(t){return ArrayBuffer.isView(t)}},isBlob:yC,deprecate(t,e){return t},addAbortListener:K("events").addAbortListener||function(e,n){if(e===void 0)throw new mf("signal","AbortSignal",e);Bb(e,"signal"),bC(n,"listener");let r;return e.aborted?queueMicrotask(()=>n()):(e.addEventListener("abort",n,{__proto__:null,once:!0,[fC]:!0}),r=()=>{e.removeEventListener("abort",n)}),{__proto__:null,[dC](){var i;(i=r)===null||i===void 0||i()}}},AbortSignalAny:hC.any||function(e){if(e.length===1)return e[0];let n=new mC,r=()=>n.abort();return e.forEach(i=>{Bb(i,"signals"),i.addEventListener("abort",r,{once:!0})}),n.signal.addEventListener("abort",()=>{e.forEach(i=>i.removeEventListener("abort",r))},{once:!0}),n.signal}};gf.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")});var ti=R((j5,Qb)=>{"use strict";var{ArrayIsArray:bf,ArrayPrototypeIncludes:$b,ArrayPrototypeJoin:Hb,ArrayPrototypeMap:xC,NumberIsInteger:xf,NumberIsNaN:_C,NumberMAX_SAFE_INTEGER:wC,NumberMIN_SAFE_INTEGER:vC,NumberParseInt:SC,ObjectPrototypeHasOwnProperty:EC,RegExpPrototypeExec:Vb,String:kC,StringPrototypeToUpperCase:DC,StringPrototypeTrim:TC}=ue(),{hideStackFrames:st,codes:{ERR_SOCKET_BAD_PORT:RC,ERR_INVALID_ARG_TYPE:Pe,ERR_INVALID_ARG_VALUE:ei,ERR_OUT_OF_RANGE:ur,ERR_UNKNOWN_SIGNAL:Wb}}=Oe(),{normalizeEncoding:AC}=qe(),{isAsyncFunction:CC,isArrayBufferView:IC}=qe().types,zb={};function OC(t){return t===(t|0)}function PC(t){return t===t>>>0}var LC=/^[0-7]+$/,NC="must be a 32-bit unsigned integer or an octal string";function MC(t,e,n){if(typeof t>"u"&&(t=n),typeof t=="string"){if(Vb(LC,t)===null)throw new ei(e,t,NC);t=SC(t,8)}return Gb(t,e),t}var FC=st((t,e,n=vC,r=wC)=>{if(typeof t!="number")throw new Pe(e,"number",t);if(!xf(t))throw new ur(e,"an integer",t);if(t<n||t>r)throw new ur(e,`>= ${n} && <= ${r}`,t)}),qC=st((t,e,n=-2147483648,r=2147483647)=>{if(typeof t!="number")throw new Pe(e,"number",t);if(!xf(t))throw new ur(e,"an integer",t);if(t<n||t>r)throw new ur(e,`>= ${n} && <= ${r}`,t)}),Gb=st((t,e,n=!1)=>{if(typeof t!="number")throw new Pe(e,"number",t);if(!xf(t))throw new ur(e,"an integer",t);let r=n?1:0,i=4294967295;if(t<r||t>i)throw new ur(e,`>= ${r} && <= ${i}`,t)});function _f(t,e){if(typeof t!="string")throw new Pe(e,"string",t)}function jC(t,e,n=void 0,r){if(typeof t!="number")throw new Pe(e,"number",t);if(n!=null&&t<n||r!=null&&t>r||(n!=null||r!=null)&&_C(t))throw new ur(e,`${n!=null?`>= ${n}`:""}${n!=null&&r!=null?" && ":""}${r!=null?`<= ${r}`:""}`,t)}var BC=st((t,e,n)=>{if(!$b(n,t)){let i="must be one of: "+Hb(xC(n,o=>typeof o=="string"?`'${o}'`:kC(o)),", ");throw new ei(e,t,i)}});function Kb(t,e){if(typeof t!="boolean")throw new Pe(e,"boolean",t)}function yf(t,e,n){return t==null||!EC(t,e)?n:t[e]}var WC=st((t,e,n=null)=>{let r=yf(n,"allowArray",!1),i=yf(n,"allowFunction",!1);if(!yf(n,"nullable",!1)&&t===null||!r&&bf(t)||typeof t!="object"&&(!i||typeof t!="function"))throw new Pe(e,"Object",t)}),zC=st((t,e)=>{if(t!=null&&typeof t!="object"&&typeof t!="function")throw new Pe(e,"a dictionary",t)}),$a=st((t,e,n=0)=>{if(!bf(t))throw new Pe(e,"Array",t);if(t.length<n){let r=`must be longer than ${n}`;throw new ei(e,t,r)}});function UC(t,e){$a(t,e);for(let n=0;n<t.length;n++)_f(t[n],`${e}[${n}]`)}function $C(t,e){$a(t,e);for(let n=0;n<t.length;n++)Kb(t[n],`${e}[${n}]`)}function HC(t,e){$a(t,e);for(let n=0;n<t.length;n++){let r=t[n],i=`${e}[${n}]`;if(r==null)throw new Pe(i,"AbortSignal",r);Yb(r,i)}}function VC(t,e="signal"){if(_f(t,e),zb[t]===void 0)throw zb[DC(t)]!==void 0?new Wb(t+" (signals must use all capital letters)"):new Wb(t)}var GC=st((t,e="buffer")=>{if(!IC(t))throw new Pe(e,["Buffer","TypedArray","DataView"],t)});function KC(t,e){let n=AC(e),r=t.length;if(n==="hex"&&r%2!==0)throw new ei("encoding",e,`is invalid for data of length ${r}`)}function YC(t,e="Port",n=!0){if(typeof t!="number"&&typeof t!="string"||typeof t=="string"&&TC(t).length===0||+t!==+t>>>0||t>65535||t===0&&!n)throw new RC(e,t,n);return t|0}var Yb=st((t,e)=>{if(t!==void 0&&(t===null||typeof t!="object"||!("aborted"in t)))throw new Pe(e,"AbortSignal",t)}),QC=st((t,e)=>{if(typeof t!="function")throw new Pe(e,"Function",t)}),ZC=st((t,e)=>{if(typeof t!="function"||CC(t))throw new Pe(e,"Function",t)}),JC=st((t,e)=>{if(t!==void 0)throw new Pe(e,"undefined",t)});function XC(t,e,n){if(!$b(n,t))throw new Pe(e,`('${Hb(n,"|")}')`,t)}var eI=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function Ub(t,e){if(typeof t>"u"||!Vb(eI,t))throw new ei(e,t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function tI(t){if(typeof t=="string")return Ub(t,"hints"),t;if(bf(t)){let e=t.length,n="";if(e===0)return n;for(let r=0;r<e;r++){let i=t[r];Ub(i,"hints"),n+=i,r!==e-1&&(n+=", ")}return n}throw new ei("hints",t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}Qb.exports={isInt32:OC,isUint32:PC,parseFileMode:MC,validateArray:$a,validateStringArray:UC,validateBooleanArray:$C,validateAbortSignalArray:HC,validateBoolean:Kb,validateBuffer:GC,validateDictionary:zC,validateEncoding:KC,validateFunction:QC,validateInt32:qC,validateInteger:FC,validateNumber:jC,validateObject:WC,validateOneOf:BC,validatePlainFunction:ZC,validatePort:YC,validateSignalName:VC,validateString:_f,validateUint32:Gb,validateUndefined:JC,validateUnion:XC,validateAbortSignal:Yb,validateLinkHeaderValue:tI}});var wn=R((B5,Zb)=>{"use strict";Zb.exports=global.process});var Ct=R((W5,px)=>{"use strict";var{SymbolAsyncIterator:Jb,SymbolIterator:Xb,SymbolFor:cr}=ue(),ex=cr("nodejs.stream.destroyed"),tx=cr("nodejs.stream.errored"),wf=cr("nodejs.stream.readable"),vf=cr("nodejs.stream.writable"),nx=cr("nodejs.stream.disturbed"),nI=cr("nodejs.webstream.isClosedPromise"),rI=cr("nodejs.webstream.controllerErrorFunction");function Ha(t,e=!1){var n;return!!(t&&typeof t.pipe=="function"&&typeof t.on=="function"&&(!e||typeof t.pause=="function"&&typeof t.resume=="function")&&(!t._writableState||((n=t._readableState)===null||n===void 0?void 0:n.readable)!==!1)&&(!t._writableState||t._readableState))}function Va(t){var e;return!!(t&&typeof t.write=="function"&&typeof t.on=="function"&&(!t._readableState||((e=t._writableState)===null||e===void 0?void 0:e.writable)!==!1))}function iI(t){return!!(t&&typeof t.pipe=="function"&&t._readableState&&typeof t.on=="function"&&typeof t.write=="function")}function At(t){return t&&(t._readableState||t._writableState||typeof t.write=="function"&&typeof t.on=="function"||typeof t.pipe=="function"&&typeof t.on=="function")}function rx(t){return!!(t&&!At(t)&&typeof t.pipeThrough=="function"&&typeof t.getReader=="function"&&typeof t.cancel=="function")}function ix(t){return!!(t&&!At(t)&&typeof t.getWriter=="function"&&typeof t.abort=="function")}function ox(t){return!!(t&&!At(t)&&typeof t.readable=="object"&&typeof t.writable=="object")}function oI(t){return rx(t)||ix(t)||ox(t)}function sI(t,e){return t==null?!1:e===!0?typeof t[Jb]=="function":e===!1?typeof t[Xb]=="function":typeof t[Jb]=="function"||typeof t[Xb]=="function"}function Ga(t){if(!At(t))return null;let e=t._writableState,n=t._readableState,r=e||n;return!!(t.destroyed||t[ex]||r!=null&&r.destroyed)}function sx(t){if(!Va(t))return null;if(t.writableEnded===!0)return!0;let e=t._writableState;return e!=null&&e.errored?!1:typeof e?.ended!="boolean"?null:e.ended}function aI(t,e){if(!Va(t))return null;if(t.writableFinished===!0)return!0;let n=t._writableState;return n!=null&&n.errored?!1:typeof n?.finished!="boolean"?null:!!(n.finished||e===!1&&n.ended===!0&&n.length===0)}function lI(t){if(!Ha(t))return null;if(t.readableEnded===!0)return!0;let e=t._readableState;return!e||e.errored?!1:typeof e?.ended!="boolean"?null:e.ended}function ax(t,e){if(!Ha(t))return null;let n=t._readableState;return n!=null&&n.errored?!1:typeof n?.endEmitted!="boolean"?null:!!(n.endEmitted||e===!1&&n.ended===!0&&n.length===0)}function lx(t){return t&&t[wf]!=null?t[wf]:typeof t?.readable!="boolean"?null:Ga(t)?!1:Ha(t)&&t.readable&&!ax(t)}function ux(t){return t&&t[vf]!=null?t[vf]:typeof t?.writable!="boolean"?null:Ga(t)?!1:Va(t)&&t.writable&&!sx(t)}function uI(t,e){return At(t)?Ga(t)?!0:!(e?.readable!==!1&&lx(t)||e?.writable!==!1&&ux(t)):null}function cI(t){var e,n;return At(t)?t.writableErrored?t.writableErrored:(e=(n=t._writableState)===null||n===void 0?void 0:n.errored)!==null&&e!==void 0?e:null:null}function fI(t){var e,n;return At(t)?t.readableErrored?t.readableErrored:(e=(n=t._readableState)===null||n===void 0?void 0:n.errored)!==null&&e!==void 0?e:null:null}function pI(t){if(!At(t))return null;if(typeof t.closed=="boolean")return t.closed;let e=t._writableState,n=t._readableState;return typeof e?.closed=="boolean"||typeof n?.closed=="boolean"?e?.closed||n?.closed:typeof t._closed=="boolean"&&cx(t)?t._closed:null}function cx(t){return typeof t._closed=="boolean"&&typeof t._defaultKeepAlive=="boolean"&&typeof t._removedConnection=="boolean"&&typeof t._removedContLen=="boolean"}function fx(t){return typeof t._sent100=="boolean"&&cx(t)}function dI(t){var e;return typeof t._consuming=="boolean"&&typeof t._dumped=="boolean"&&((e=t.req)===null||e===void 0?void 0:e.upgradeOrConnect)===void 0}function hI(t){if(!At(t))return null;let e=t._writableState,n=t._readableState,r=e||n;return!r&&fx(t)||!!(r&&r.autoDestroy&&r.emitClose&&r.closed===!1)}function mI(t){var e;return!!(t&&((e=t[nx])!==null&&e!==void 0?e:t.readableDidRead||t.readableAborted))}function gI(t){var e,n,r,i,o,s,a,u,l,c;return!!(t&&((e=(n=(r=(i=(o=(s=t[tx])!==null&&s!==void 0?s:t.readableErrored)!==null&&o!==void 0?o:t.writableErrored)!==null&&i!==void 0?i:(a=t._readableState)===null||a===void 0?void 0:a.errorEmitted)!==null&&r!==void 0?r:(u=t._writableState)===null||u===void 0?void 0:u.errorEmitted)!==null&&n!==void 0?n:(l=t._readableState)===null||l===void 0?void 0:l.errored)!==null&&e!==void 0?e:!((c=t._writableState)===null||c===void 0)&&c.errored))}px.exports={isDestroyed:Ga,kIsDestroyed:ex,isDisturbed:mI,kIsDisturbed:nx,isErrored:gI,kIsErrored:tx,isReadable:lx,kIsReadable:wf,kIsClosedPromise:nI,kControllerErrorFunction:rI,kIsWritable:vf,isClosed:pI,isDuplexNodeStream:iI,isFinished:uI,isIterable:sI,isReadableNodeStream:Ha,isReadableStream:rx,isReadableEnded:lI,isReadableFinished:ax,isReadableErrored:fI,isNodeStream:At,isWebStream:oI,isWritable:ux,isWritableNodeStream:Va,isWritableStream:ix,isWritableEnded:sx,isWritableFinished:aI,isWritableErrored:cI,isServerRequest:dI,isServerResponse:fx,willEmitClose:hI,isTransformStream:ox}});var Yt=R((z5,Tf)=>{"use strict";var vn=wn(),{AbortError:wx,codes:yI}=Oe(),{ERR_INVALID_ARG_TYPE:bI,ERR_STREAM_PREMATURE_CLOSE:dx}=yI,{kEmptyObject:Ef,once:kf}=qe(),{validateAbortSignal:xI,validateFunction:_I,validateObject:wI,validateBoolean:vI}=ti(),{Promise:SI,PromisePrototypeThen:EI,SymbolDispose:vx}=ue(),{isClosed:kI,isReadable:hx,isReadableNodeStream:Sf,isReadableStream:DI,isReadableFinished:mx,isReadableErrored:gx,isWritable:yx,isWritableNodeStream:bx,isWritableStream:TI,isWritableFinished:xx,isWritableErrored:_x,isNodeStream:RI,willEmitClose:AI,kIsClosedPromise:CI}=Ct(),ni;function II(t){return t.setHeader&&typeof t.abort=="function"}var Df=()=>{};function Sx(t,e,n){var r,i;if(arguments.length===2?(n=e,e=Ef):e==null?e=Ef:wI(e,"options"),_I(n,"callback"),xI(e.signal,"options.signal"),n=kf(n),DI(t)||TI(t))return OI(t,e,n);if(!RI(t))throw new bI("stream",["ReadableStream","WritableStream","Stream"],t);let o=(r=e.readable)!==null&&r!==void 0?r:Sf(t),s=(i=e.writable)!==null&&i!==void 0?i:bx(t),a=t._writableState,u=t._readableState,l=()=>{t.writable||p()},c=AI(t)&&Sf(t)===o&&bx(t)===s,f=xx(t,!1),p=()=>{f=!0,t.destroyed&&(c=!1),!(c&&(!t.readable||o))&&(!o||d)&&n.call(t)},d=mx(t,!1),b=()=>{d=!0,t.destroyed&&(c=!1),!(c&&(!t.writable||s))&&(!s||f)&&n.call(t)},g=T=>{n.call(t,T)},S=kI(t),y=()=>{S=!0;let T=_x(t)||gx(t);if(T&&typeof T!="boolean")return n.call(t,T);if(o&&!d&&Sf(t,!0)&&!mx(t,!1))return n.call(t,new dx);if(s&&!f&&!xx(t,!1))return n.call(t,new dx);n.call(t)},h=()=>{S=!0;let T=_x(t)||gx(t);if(T&&typeof T!="boolean")return n.call(t,T);n.call(t)},m=()=>{t.req.on("finish",p)};II(t)?(t.on("complete",p),c||t.on("abort",y),t.req?m():t.on("request",m)):s&&!a&&(t.on("end",l),t.on("close",l)),!c&&typeof t.aborted=="boolean"&&t.on("aborted",y),t.on("end",b),t.on("finish",p),e.error!==!1&&t.on("error",g),t.on("close",y),S?vn.nextTick(y):a!=null&&a.errorEmitted||u!=null&&u.errorEmitted?c||vn.nextTick(h):(!o&&(!c||hx(t))&&(f||yx(t)===!1)||!s&&(!c||yx(t))&&(d||hx(t)===!1)||u&&t.req&&t.aborted)&&vn.nextTick(h);let w=()=>{n=Df,t.removeListener("aborted",y),t.removeListener("complete",p),t.removeListener("abort",y),t.removeListener("request",m),t.req&&t.req.removeListener("finish",p),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",p),t.removeListener("end",b),t.removeListener("error",g),t.removeListener("close",y)};if(e.signal&&!S){let T=()=>{let v=n;w(),v.call(t,new wx(void 0,{cause:e.signal.reason}))};if(e.signal.aborted)vn.nextTick(T);else{ni=ni||qe().addAbortListener;let v=ni(e.signal,T),E=n;n=kf((...L)=>{v[vx](),E.apply(t,L)})}}return w}function OI(t,e,n){let r=!1,i=Df;if(e.signal)if(i=()=>{r=!0,n.call(t,new wx(void 0,{cause:e.signal.reason}))},e.signal.aborted)vn.nextTick(i);else{ni=ni||qe().addAbortListener;let s=ni(e.signal,i),a=n;n=kf((...u)=>{s[vx](),a.apply(t,u)})}let o=(...s)=>{r||vn.nextTick(()=>n.apply(t,s))};return EI(t[CI].promise,o,o),Df}function PI(t,e){var n;let r=!1;return e===null&&(e=Ef),(n=e)!==null&&n!==void 0&&n.cleanup&&(vI(e.cleanup,"cleanup"),r=e.cleanup),new SI((i,o)=>{let s=Sx(t,e,a=>{r&&s(),a?o(a):i()})})}Tf.exports=Sx;Tf.exports.finished=PI});var fr=R((U5,Ix)=>{"use strict";var It=wn(),{aggregateTwoErrors:LI,codes:{ERR_MULTIPLE_CALLBACK:NI},AbortError:MI}=Oe(),{Symbol:Dx}=ue(),{kIsDestroyed:FI,isDestroyed:qI,isFinished:jI,isServerRequest:BI}=Ct(),Tx=Dx("kDestroy"),Rf=Dx("kConstruct");function Rx(t,e,n){t&&(t.stack,e&&!e.errored&&(e.errored=t),n&&!n.errored&&(n.errored=t))}function WI(t,e){let n=this._readableState,r=this._writableState,i=r||n;return r!=null&&r.destroyed||n!=null&&n.destroyed?(typeof e=="function"&&e(),this):(Rx(t,r,n),r&&(r.destroyed=!0),n&&(n.destroyed=!0),i.constructed?Ex(this,t,e):this.once(Tx,function(o){Ex(this,LI(o,t),e)}),this)}function Ex(t,e,n){let r=!1;function i(o){if(r)return;r=!0;let s=t._readableState,a=t._writableState;Rx(o,a,s),a&&(a.closed=!0),s&&(s.closed=!0),typeof n=="function"&&n(o),o?It.nextTick(zI,t,o):It.nextTick(Ax,t)}try{t._destroy(e||null,i)}catch(o){i(o)}}function zI(t,e){Af(t,e),Ax(t)}function Ax(t){let e=t._readableState,n=t._writableState;n&&(n.closeEmitted=!0),e&&(e.closeEmitted=!0),(n!=null&&n.emitClose||e!=null&&e.emitClose)&&t.emit("close")}function Af(t,e){let n=t._readableState,r=t._writableState;r!=null&&r.errorEmitted||n!=null&&n.errorEmitted||(r&&(r.errorEmitted=!0),n&&(n.errorEmitted=!0),t.emit("error",e))}function UI(){let t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=t.readable===!1,t.endEmitted=t.readable===!1),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=e.writable===!1,e.ending=e.writable===!1,e.finished=e.writable===!1)}function Cf(t,e,n){let r=t._readableState,i=t._writableState;if(i!=null&&i.destroyed||r!=null&&r.destroyed)return this;r!=null&&r.autoDestroy||i!=null&&i.autoDestroy?t.destroy(e):e&&(e.stack,i&&!i.errored&&(i.errored=e),r&&!r.errored&&(r.errored=e),n?It.nextTick(Af,t,e):Af(t,e))}function $I(t,e){if(typeof t._construct!="function")return;let n=t._readableState,r=t._writableState;n&&(n.constructed=!1),r&&(r.constructed=!1),t.once(Rf,e),!(t.listenerCount(Rf)>1)&&It.nextTick(HI,t)}function HI(t){let e=!1;function n(r){if(e){Cf(t,r??new NI);return}e=!0;let i=t._readableState,o=t._writableState,s=o||i;i&&(i.constructed=!0),o&&(o.constructed=!0),s.destroyed?t.emit(Tx,r):r?Cf(t,r,!0):It.nextTick(VI,t)}try{t._construct(r=>{It.nextTick(n,r)})}catch(r){It.nextTick(n,r)}}function VI(t){t.emit(Rf)}function kx(t){return t?.setHeader&&typeof t.abort=="function"}function Cx(t){t.emit("close")}function GI(t,e){t.emit("error",e),It.nextTick(Cx,t)}function KI(t,e){!t||qI(t)||(!e&&!jI(t)&&(e=new MI),BI(t)?(t.socket=null,t.destroy(e)):kx(t)?t.abort():kx(t.req)?t.req.abort():typeof t.destroy=="function"?t.destroy(e):typeof t.close=="function"?t.close():e?It.nextTick(GI,t,e):It.nextTick(Cx,t),t.destroyed||(t[FI]=!0))}Ix.exports={construct:$I,destroyer:KI,destroy:WI,undestroy:UI,errorOrDestroy:Cf}});var Qa=R(($5,Px)=>{"use strict";var{ArrayIsArray:YI,ObjectSetPrototypeOf:Ox}=ue(),{EventEmitter:Ka}=K("events");function Ya(t){Ka.call(this,t)}Ox(Ya.prototype,Ka.prototype);Ox(Ya,Ka);Ya.prototype.pipe=function(t,e){let n=this;function r(c){t.writable&&t.write(c)===!1&&n.pause&&n.pause()}n.on("data",r);function i(){n.readable&&n.resume&&n.resume()}t.on("drain",i),!t._isStdio&&(!e||e.end!==!1)&&(n.on("end",s),n.on("close",a));let o=!1;function s(){o||(o=!0,t.end())}function a(){o||(o=!0,typeof t.destroy=="function"&&t.destroy())}function u(c){l(),Ka.listenerCount(this,"error")===0&&this.emit("error",c)}If(n,"error",u),If(t,"error",u);function l(){n.removeListener("data",r),t.removeListener("drain",i),n.removeListener("end",s),n.removeListener("close",a),n.removeListener("error",u),t.removeListener("error",u),n.removeListener("end",l),n.removeListener("close",l),t.removeListener("close",l)}return n.on("end",l),n.on("close",l),t.on("close",l),t.emit("pipe",n),t};function If(t,e,n){if(typeof t.prependListener=="function")return t.prependListener(e,n);!t._events||!t._events[e]?t.on(e,n):YI(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]}Px.exports={Stream:Ya,prependListener:If}});var So=R((H5,Za)=>{"use strict";var{SymbolDispose:QI}=ue(),{AbortError:Lx,codes:ZI}=Oe(),{isNodeStream:Nx,isWebStream:JI,kControllerErrorFunction:XI}=Ct(),eO=Yt(),{ERR_INVALID_ARG_TYPE:Mx}=ZI,Of,tO=(t,e)=>{if(typeof t!="object"||!("aborted"in t))throw new Mx(e,"AbortSignal",t)};Za.exports.addAbortSignal=function(e,n){if(tO(e,"signal"),!Nx(n)&&!JI(n))throw new Mx("stream",["ReadableStream","WritableStream","Stream"],n);return Za.exports.addAbortSignalNoValidate(e,n)};Za.exports.addAbortSignalNoValidate=function(t,e){if(typeof t!="object"||!("aborted"in t))return e;let n=Nx(e)?()=>{e.destroy(new Lx(void 0,{cause:t.reason}))}:()=>{e[XI](new Lx(void 0,{cause:t.reason}))};if(t.aborted)n();else{Of=Of||qe().addAbortListener;let r=Of(t,n);eO(e,r[QI])}return e}});var jx=R((G5,qx)=>{"use strict";var{StringPrototypeSlice:Fx,SymbolIterator:nO,TypedArrayPrototypeSet:Ja,Uint8Array:rO}=ue(),{Buffer:Pf}=K("buffer"),{inspect:iO}=qe();qx.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){let n={data:e,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}unshift(e){let n={data:e,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}shift(){if(this.length===0)return;let e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(this.length===0)return"";let n=this.head,r=""+n.data;for(;(n=n.next)!==null;)r+=e+n.data;return r}concat(e){if(this.length===0)return Pf.alloc(0);let n=Pf.allocUnsafe(e>>>0),r=this.head,i=0;for(;r;)Ja(n,r.data,i),i+=r.data.length,r=r.next;return n}consume(e,n){let r=this.head.data;if(e<r.length){let i=r.slice(0,e);return this.head.data=r.slice(e),i}return e===r.length?this.shift():n?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[nO](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let n="",r=this.head,i=0;do{let o=r.data;if(e>o.length)n+=o,e-=o.length;else{e===o.length?(n+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(n+=Fx(o,0,e),this.head=r,r.data=Fx(o,e));break}++i}while((r=r.next)!==null);return this.length-=i,n}_getBuffer(e){let n=Pf.allocUnsafe(e),r=e,i=this.head,o=0;do{let s=i.data;if(e>s.length)Ja(n,s,r-e),e-=s.length;else{e===s.length?(Ja(n,s,r-e),++o,i.next?this.head=i.next:this.head=this.tail=null):(Ja(n,new rO(s.buffer,s.byteOffset,e),r-e),this.head=i,i.data=s.slice(e));break}++o}while((i=i.next)!==null);return this.length-=o,n}[Symbol.for("nodejs.util.inspect.custom")](e,n){return iO(this,{...n,depth:0,customInspect:!1})}}});var Eo=R((K5,Ux)=>{"use strict";var{MathFloor:oO,NumberIsInteger:sO}=ue(),{validateInteger:aO}=ti(),{ERR_INVALID_ARG_VALUE:lO}=Oe().codes,Bx=16*1024,Wx=16;function uO(t,e,n){return t.highWaterMark!=null?t.highWaterMark:e?t[n]:null}function zx(t){return t?Wx:Bx}function cO(t,e){aO(e,"value",0),t?Wx=e:Bx=e}function fO(t,e,n,r){let i=uO(e,r,n);if(i!=null){if(!sO(i)||i<0){let o=r?`options.${n}`:"options.highWaterMark";throw new lO(o,i)}return oO(i)}return zx(t.objectMode)}Ux.exports={getHighWaterMark:fO,getDefaultHighWaterMark:zx,setDefaultHighWaterMark:cO}});var Lf=R((Y5,Gx)=>{"use strict";var $x=wn(),{PromisePrototypeThen:pO,SymbolAsyncIterator:Hx,SymbolIterator:Vx}=ue(),{Buffer:dO}=K("buffer"),{ERR_INVALID_ARG_TYPE:hO,ERR_STREAM_NULL_VALUES:mO}=Oe().codes;function gO(t,e,n){let r;if(typeof e=="string"||e instanceof dO)return new t({objectMode:!0,...n,read(){this.push(e),this.push(null)}});let i;if(e&&e[Hx])i=!0,r=e[Hx]();else if(e&&e[Vx])i=!1,r=e[Vx]();else throw new hO("iterable",["Iterable"],e);let o=new t({objectMode:!0,highWaterMark:1,...n}),s=!1;o._read=function(){s||(s=!0,u())},o._destroy=function(l,c){pO(a(l),()=>$x.nextTick(c,l),f=>$x.nextTick(c,f||l))};async function a(l){let c=l!=null,f=typeof r.throw=="function";if(c&&f){let{value:p,done:d}=await r.throw(l);if(await p,d)return}if(typeof r.return=="function"){let{value:p}=await r.return();await p}}async function u(){for(;;){try{let{value:l,done:c}=i?await r.next():r.next();if(c)o.push(null);else{let f=l&&typeof l.then=="function"?await l:l;if(f===null)throw s=!1,new mO;if(o.push(f))continue;s=!1}}catch(l){o.destroy(l)}break}}return o}Gx.exports=gO});var Do=R((Q5,f_)=>{"use strict";var bt=wn(),{ArrayPrototypeIndexOf:yO,NumberIsInteger:bO,NumberIsNaN:xO,NumberParseInt:_O,ObjectDefineProperties:zf,ObjectKeys:wO,ObjectSetPrototypeOf:Qx,Promise:Zx,SafeSet:vO,SymbolAsyncDispose:SO,SymbolAsyncIterator:EO,Symbol:kO}=ue();f_.exports=W;W.ReadableState=nl;var{EventEmitter:DO}=K("events"),{Stream:Sn,prependListener:TO}=Qa(),{Buffer:Nf}=K("buffer"),{addAbortSignal:RO}=So(),Jx=Yt(),V=qe().debuglog("stream",t=>{V=t}),AO=jx(),oi=fr(),{getHighWaterMark:CO,getDefaultHighWaterMark:IO}=Eo(),{aggregateTwoErrors:Kx,codes:{ERR_INVALID_ARG_TYPE:OO,ERR_METHOD_NOT_IMPLEMENTED:PO,ERR_OUT_OF_RANGE:LO,ERR_STREAM_PUSH_AFTER_EOF:NO,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:MO},AbortError:FO}=Oe(),{validateObject:qO}=ti(),pr=kO("kPaused"),{StringDecoder:Xx}=K("string_decoder"),jO=Lf();Qx(W.prototype,Sn.prototype);Qx(W,Sn);var Mf=()=>{},{errorOrDestroy:ri}=oi,ii=1,BO=2,e_=4,ko=8,t_=16,Xa=32,el=64,n_=128,WO=256,zO=512,UO=1024,Bf=2048,Wf=4096,$O=8192,HO=16384,VO=32768,r_=65536,GO=1<<17,KO=1<<18;function we(t){return{enumerable:!1,get(){return(this.state&t)!==0},set(e){e?this.state|=t:this.state&=~t}}}zf(nl.prototype,{objectMode:we(ii),ended:we(BO),endEmitted:we(e_),reading:we(ko),constructed:we(t_),sync:we(Xa),needReadable:we(el),emittedReadable:we(n_),readableListening:we(WO),resumeScheduled:we(zO),errorEmitted:we(UO),emitClose:we(Bf),autoDestroy:we(Wf),destroyed:we($O),closed:we(HO),closeEmitted:we(VO),multiAwaitDrain:we(r_),readingMore:we(GO),dataEmitted:we(KO)});function nl(t,e,n){typeof n!="boolean"&&(n=e instanceof Ot()),this.state=Bf|Wf|t_|Xa,t&&t.objectMode&&(this.state|=ii),n&&t&&t.readableObjectMode&&(this.state|=ii),this.highWaterMark=t?CO(this,t,"readableHighWaterMark",n):IO(!1),this.buffer=new AO,this.length=0,this.pipes=[],this.flowing=null,this[pr]=null,t&&t.emitClose===!1&&(this.state&=~Bf),t&&t.autoDestroy===!1&&(this.state&=~Wf),this.errored=null,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new Xx(t.encoding),this.encoding=t.encoding)}function W(t){if(!(this instanceof W))return new W(t);let e=this instanceof Ot();this._readableState=new nl(t,this,e),t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.construct=="function"&&(this._construct=t.construct),t.signal&&!e&&RO(t.signal,this)),Sn.call(this,t),oi.construct(this,()=>{this._readableState.needReadable&&tl(this,this._readableState)})}W.prototype.destroy=oi.destroy;W.prototype._undestroy=oi.undestroy;W.prototype._destroy=function(t,e){e(t)};W.prototype[DO.captureRejectionSymbol]=function(t){this.destroy(t)};W.prototype[SO]=function(){let t;return this.destroyed||(t=this.readableEnded?null:new FO,this.destroy(t)),new Zx((e,n)=>Jx(this,r=>r&&r!==t?n(r):e(null)))};W.prototype.push=function(t,e){return i_(this,t,e,!1)};W.prototype.unshift=function(t,e){return i_(this,t,e,!0)};function i_(t,e,n,r){V("readableAddChunk",e);let i=t._readableState,o;if((i.state&ii)===0&&(typeof e=="string"?(n=n||i.defaultEncoding,i.encoding!==n&&(r&&i.encoding?e=Nf.from(e,n).toString(i.encoding):(e=Nf.from(e,n),n=""))):e instanceof Nf?n="":Sn._isUint8Array(e)?(e=Sn._uint8ArrayToBuffer(e),n=""):e!=null&&(o=new OO("chunk",["string","Buffer","Uint8Array"],e))),o)ri(t,o);else if(e===null)i.state&=~ko,ZO(t,i);else if((i.state&ii)!==0||e&&e.length>0)if(r)if((i.state&e_)!==0)ri(t,new MO);else{if(i.destroyed||i.errored)return!1;Ff(t,i,e,!0)}else if(i.ended)ri(t,new NO);else{if(i.destroyed||i.errored)return!1;i.state&=~ko,i.decoder&&!n?(e=i.decoder.write(e),i.objectMode||e.length!==0?Ff(t,i,e,!1):tl(t,i)):Ff(t,i,e,!1)}else r||(i.state&=~ko,tl(t,i));return!i.ended&&(i.length<i.highWaterMark||i.length===0)}function Ff(t,e,n,r){e.flowing&&e.length===0&&!e.sync&&t.listenerCount("data")>0?((e.state&r_)!==0?e.awaitDrainWriters.clear():e.awaitDrainWriters=null,e.dataEmitted=!0,t.emit("data",n)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),(e.state&el)!==0&&rl(t)),tl(t,e)}W.prototype.isPaused=function(){let t=this._readableState;return t[pr]===!0||t.flowing===!1};W.prototype.setEncoding=function(t){let e=new Xx(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;let n=this._readableState.buffer,r="";for(let i of n)r+=e.write(i);return n.clear(),r!==""&&n.push(r),this._readableState.length=r.length,this};var YO=1073741824;function QO(t){if(t>YO)throw new LO("size","<= 1GiB",t);return t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++,t}function Yx(t,e){return t<=0||e.length===0&&e.ended?0:(e.state&ii)!==0?1:xO(t)?e.flowing&&e.length?e.buffer.first().length:e.length:t<=e.length?t:e.ended?e.length:0}W.prototype.read=function(t){V("read",t),t===void 0?t=NaN:bO(t)||(t=_O(t,10));let e=this._readableState,n=t;if(t>e.highWaterMark&&(e.highWaterMark=QO(t)),t!==0&&(e.state&=~n_),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return V("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?qf(this):rl(this),null;if(t=Yx(t,e),t===0&&e.ended)return e.length===0&&qf(this),null;let r=(e.state&el)!==0;if(V("need readable",r),(e.length===0||e.length-t<e.highWaterMark)&&(r=!0,V("length less than watermark",r)),e.ended||e.reading||e.destroyed||e.errored||!e.constructed)r=!1,V("reading, ended or constructing",r);else if(r){V("do read"),e.state|=ko|Xa,e.length===0&&(e.state|=el);try{this._read(e.highWaterMark)}catch(o){ri(this,o)}e.state&=~Xa,e.reading||(t=Yx(n,e))}let i;return t>0?i=u_(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null),e.length===0&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&qf(this)),i!==null&&!e.errorEmitted&&!e.closeEmitted&&(e.dataEmitted=!0,this.emit("data",i)),i};function ZO(t,e){if(V("onEofChunk"),!e.ended){if(e.decoder){let n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,e.sync?rl(t):(e.needReadable=!1,e.emittedReadable=!0,o_(t))}}function rl(t){let e=t._readableState;V("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(V("emitReadable",e.flowing),e.emittedReadable=!0,bt.nextTick(o_,t))}function o_(t){let e=t._readableState;V("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&!e.errored&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,a_(t)}function tl(t,e){!e.readingMore&&e.constructed&&(e.readingMore=!0,bt.nextTick(JO,t,e))}function JO(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){let n=e.length;if(V("maybeReadMore read 0"),t.read(0),n===e.length)break}e.readingMore=!1}W.prototype._read=function(t){throw new PO("_read()")};W.prototype.pipe=function(t,e){let n=this,r=this._readableState;r.pipes.length===1&&(r.multiAwaitDrain||(r.multiAwaitDrain=!0,r.awaitDrainWriters=new vO(r.awaitDrainWriters?[r.awaitDrainWriters]:[]))),r.pipes.push(t),V("pipe count=%d opts=%j",r.pipes.length,e);let o=(!e||e.end!==!1)&&t!==bt.stdout&&t!==bt.stderr?a:S;r.endEmitted?bt.nextTick(o):n.once("end",o),t.on("unpipe",s);function s(y,h){V("onunpipe"),y===n&&h&&h.hasUnpiped===!1&&(h.hasUnpiped=!0,c())}function a(){V("onend"),t.end()}let u,l=!1;function c(){V("cleanup"),t.removeListener("close",b),t.removeListener("finish",g),u&&t.removeListener("drain",u),t.removeListener("error",d),t.removeListener("unpipe",s),n.removeListener("end",a),n.removeListener("end",S),n.removeListener("data",p),l=!0,u&&r.awaitDrainWriters&&(!t._writableState||t._writableState.needDrain)&&u()}function f(){l||(r.pipes.length===1&&r.pipes[0]===t?(V("false write response, pause",0),r.awaitDrainWriters=t,r.multiAwaitDrain=!1):r.pipes.length>1&&r.pipes.includes(t)&&(V("false write response, pause",r.awaitDrainWriters.size),r.awaitDrainWriters.add(t)),n.pause()),u||(u=XO(n,t),t.on("drain",u))}n.on("data",p);function p(y){V("ondata");let h=t.write(y);V("dest.write",h),h===!1&&f()}function d(y){if(V("onerror",y),S(),t.removeListener("error",d),t.listenerCount("error")===0){let h=t._writableState||t._readableState;h&&!h.errorEmitted?ri(t,y):t.emit("error",y)}}TO(t,"error",d);function b(){t.removeListener("finish",g),S()}t.once("close",b);function g(){V("onfinish"),t.removeListener("close",b),S()}t.once("finish",g);function S(){V("unpipe"),n.unpipe(t)}return t.emit("pipe",n),t.writableNeedDrain===!0?f():r.flowing||(V("pipe resume"),n.resume()),t};function XO(t,e){return function(){let r=t._readableState;r.awaitDrainWriters===e?(V("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(V("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(e)),(!r.awaitDrainWriters||r.awaitDrainWriters.size===0)&&t.listenerCount("data")&&t.resume()}}W.prototype.unpipe=function(t){let e=this._readableState,n={hasUnpiped:!1};if(e.pipes.length===0)return this;if(!t){let i=e.pipes;e.pipes=[],this.pause();for(let o=0;o<i.length;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}let r=yO(e.pipes,t);return r===-1?this:(e.pipes.splice(r,1),e.pipes.length===0&&this.pause(),t.emit("unpipe",this,n),this)};W.prototype.on=function(t,e){let n=Sn.prototype.on.call(this,t,e),r=this._readableState;return t==="data"?(r.readableListening=this.listenerCount("readable")>0,r.flowing!==!1&&this.resume()):t==="readable"&&!r.endEmitted&&!r.readableListening&&(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,V("on readable",r.length,r.reading),r.length?rl(this):r.reading||bt.nextTick(eP,this)),n};W.prototype.addListener=W.prototype.on;W.prototype.removeListener=function(t,e){let n=Sn.prototype.removeListener.call(this,t,e);return t==="readable"&&bt.nextTick(s_,this),n};W.prototype.off=W.prototype.removeListener;W.prototype.removeAllListeners=function(t){let e=Sn.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&bt.nextTick(s_,this),e};function s_(t){let e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&e[pr]===!1?e.flowing=!0:t.listenerCount("data")>0?t.resume():e.readableListening||(e.flowing=null)}function eP(t){V("readable nexttick read 0"),t.read(0)}W.prototype.resume=function(){let t=this._readableState;return t.flowing||(V("resume"),t.flowing=!t.readableListening,tP(this,t)),t[pr]=!1,this};function tP(t,e){e.resumeScheduled||(e.resumeScheduled=!0,bt.nextTick(nP,t,e))}function nP(t,e){V("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),a_(t),e.flowing&&!e.reading&&t.read(0)}W.prototype.pause=function(){return V("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(V("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[pr]=!0,this};function a_(t){let e=t._readableState;for(V("flow",e.flowing);e.flowing&&t.read()!==null;);}W.prototype.wrap=function(t){let e=!1;t.on("data",r=>{!this.push(r)&&t.pause&&(e=!0,t.pause())}),t.on("end",()=>{this.push(null)}),t.on("error",r=>{ri(this,r)}),t.on("close",()=>{this.destroy()}),t.on("destroy",()=>{this.destroy()}),this._read=()=>{e&&t.resume&&(e=!1,t.resume())};let n=wO(t);for(let r=1;r<n.length;r++){let i=n[r];this[i]===void 0&&typeof t[i]=="function"&&(this[i]=t[i].bind(t))}return this};W.prototype[EO]=function(){return l_(this)};W.prototype.iterator=function(t){return t!==void 0&&qO(t,"options"),l_(this,t)};function l_(t,e){typeof t.read!="function"&&(t=W.wrap(t,{objectMode:!0}));let n=rP(t,e);return n.stream=t,n}async function*rP(t,e){let n=Mf;function r(s){this===t?(n(),n=Mf):n=s}t.on("readable",r);let i,o=Jx(t,{writable:!1},s=>{i=s?Kx(i,s):null,n(),n=Mf});try{for(;;){let s=t.destroyed?null:t.read();if(s!==null)yield s;else{if(i)throw i;if(i===null)return;await new Zx(r)}}}catch(s){throw i=Kx(i,s),i}finally{(i||e?.destroyOnReturn!==!1)&&(i===void 0||t._readableState.autoDestroy)?oi.destroyer(t,null):(t.off("readable",r),o())}}zf(W.prototype,{readable:{__proto__:null,get(){let t=this._readableState;return!!t&&t.readable!==!1&&!t.destroyed&&!t.errorEmitted&&!t.endEmitted},set(t){this._readableState&&(this._readableState.readable=!!t)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(t){this._readableState&&(this._readableState.destroyed=t)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}});zf(nl.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[pr]!==!1},set(t){this[pr]=!!t}}});W._fromList=u_;function u_(t,e){if(e.length===0)return null;let n;return e.objectMode?n=e.buffer.shift():!t||t>=e.length?(e.decoder?n=e.buffer.join(""):e.buffer.length===1?n=e.buffer.first():n=e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n}function qf(t){let e=t._readableState;V("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,bt.nextTick(iP,e,t))}function iP(t,e){if(V("endReadableNT",t.endEmitted,t.length),!t.errored&&!t.closeEmitted&&!t.endEmitted&&t.length===0){if(t.endEmitted=!0,e.emit("end"),e.writable&&e.allowHalfOpen===!1)bt.nextTick(oP,e);else if(t.autoDestroy){let n=e._writableState;(!n||n.autoDestroy&&(n.finished||n.writable===!1))&&e.destroy()}}}function oP(t){t.writable&&!t.writableEnded&&!t.destroyed&&t.end()}W.from=function(t,e){return jO(W,t,e)};var jf;function c_(){return jf===void 0&&(jf={}),jf}W.fromWeb=function(t,e){return c_().newStreamReadableFromReadableStream(t,e)};W.toWeb=function(t,e){return c_().newReadableStreamFromStreamReadable(t,e)};W.wrap=function(t,e){var n,r;return new W({objectMode:(n=(r=t.readableObjectMode)!==null&&r!==void 0?r:t.objectMode)!==null&&n!==void 0?n:!0,...e,destroy(i,o){oi.destroyer(t,i),o(i)}}).wrap(t)}});var ll=R((Z5,S_)=>{"use strict";var dr=wn(),{ArrayPrototypeSlice:h_,Error:sP,FunctionPrototypeSymbolHasInstance:m_,ObjectDefineProperty:g_,ObjectDefineProperties:aP,ObjectSetPrototypeOf:y_,StringPrototypeToLowerCase:lP,Symbol:uP,SymbolHasInstance:cP}=ue();S_.exports=ce;ce.WritableState=Ao;var{EventEmitter:fP}=K("events"),To=Qa().Stream,{Buffer:il}=K("buffer"),al=fr(),{addAbortSignal:pP}=So(),{getHighWaterMark:dP,getDefaultHighWaterMark:hP}=Eo(),{ERR_INVALID_ARG_TYPE:mP,ERR_METHOD_NOT_IMPLEMENTED:gP,ERR_MULTIPLE_CALLBACK:b_,ERR_STREAM_CANNOT_PIPE:yP,ERR_STREAM_DESTROYED:Ro,ERR_STREAM_ALREADY_FINISHED:bP,ERR_STREAM_NULL_VALUES:xP,ERR_STREAM_WRITE_AFTER_END:_P,ERR_UNKNOWN_ENCODING:x_}=Oe().codes,{errorOrDestroy:si}=al;y_(ce.prototype,To.prototype);y_(ce,To);function Hf(){}var ai=uP("kOnFinished");function Ao(t,e,n){typeof n!="boolean"&&(n=e instanceof Ot()),this.objectMode=!!(t&&t.objectMode),n&&(this.objectMode=this.objectMode||!!(t&&t.writableObjectMode)),this.highWaterMark=t?dP(this,t,"writableHighWaterMark",n):hP(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let r=!!(t&&t.decodeStrings===!1);this.decodeStrings=!r,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=vP.bind(void 0,e),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,sl(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||t.emitClose!==!1,this.autoDestroy=!t||t.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[ai]=[]}function sl(t){t.buffered=[],t.bufferedIndex=0,t.allBuffers=!0,t.allNoop=!0}Ao.prototype.getBuffer=function(){return h_(this.buffered,this.bufferedIndex)};g_(Ao.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function ce(t){let e=this instanceof Ot();if(!e&&!m_(ce,this))return new ce(t);this._writableState=new Ao(t,this,e),t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final),typeof t.construct=="function"&&(this._construct=t.construct),t.signal&&pP(t.signal,this)),To.call(this,t),al.construct(this,()=>{let n=this._writableState;n.writing||Gf(this,n),Kf(this,n)})}g_(ce,cP,{__proto__:null,value:function(t){return m_(this,t)?!0:this!==ce?!1:t&&t._writableState instanceof Ao}});ce.prototype.pipe=function(){si(this,new yP)};function __(t,e,n,r){let i=t._writableState;if(typeof n=="function")r=n,n=i.defaultEncoding;else{if(!n)n=i.defaultEncoding;else if(n!=="buffer"&&!il.isEncoding(n))throw new x_(n);typeof r!="function"&&(r=Hf)}if(e===null)throw new xP;if(!i.objectMode)if(typeof e=="string")i.decodeStrings!==!1&&(e=il.from(e,n),n="buffer");else if(e instanceof il)n="buffer";else if(To._isUint8Array(e))e=To._uint8ArrayToBuffer(e),n="buffer";else throw new mP("chunk",["string","Buffer","Uint8Array"],e);let o;return i.ending?o=new _P:i.destroyed&&(o=new Ro("write")),o?(dr.nextTick(r,o),si(t,o,!0),o):(i.pendingcb++,wP(t,i,e,n,r))}ce.prototype.write=function(t,e,n){return __(this,t,e,n)===!0};ce.prototype.cork=function(){this._writableState.corked++};ce.prototype.uncork=function(){let t=this._writableState;t.corked&&(t.corked--,t.writing||Gf(this,t))};ce.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=lP(e)),!il.isEncoding(e))throw new x_(e);return this._writableState.defaultEncoding=e,this};function wP(t,e,n,r,i){let o=e.objectMode?1:n.length;e.length+=o;let s=e.length<e.highWaterMark;return s||(e.needDrain=!0),e.writing||e.corked||e.errored||!e.constructed?(e.buffered.push({chunk:n,encoding:r,callback:i}),e.allBuffers&&r!=="buffer"&&(e.allBuffers=!1),e.allNoop&&i!==Hf&&(e.allNoop=!1)):(e.writelen=o,e.writecb=i,e.writing=!0,e.sync=!0,t._write(n,r,e.onwrite),e.sync=!1),s&&!e.errored&&!e.destroyed}function p_(t,e,n,r,i,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Ro("write")):n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function d_(t,e,n,r){--e.pendingcb,r(n),Vf(e),si(t,n)}function vP(t,e){let n=t._writableState,r=n.sync,i=n.writecb;if(typeof i!="function"){si(t,new b_);return}n.writing=!1,n.writecb=null,n.length-=n.writelen,n.writelen=0,e?(e.stack,n.errored||(n.errored=e),t._readableState&&!t._readableState.errored&&(t._readableState.errored=e),r?dr.nextTick(d_,t,n,e,i):d_(t,n,e,i)):(n.buffered.length>n.bufferedIndex&&Gf(t,n),r?n.afterWriteTickInfo!==null&&n.afterWriteTickInfo.cb===i?n.afterWriteTickInfo.count++:(n.afterWriteTickInfo={count:1,cb:i,stream:t,state:n},dr.nextTick(SP,n.afterWriteTickInfo)):w_(t,n,1,i))}function SP({stream:t,state:e,count:n,cb:r}){return e.afterWriteTickInfo=null,w_(t,e,n,r)}function w_(t,e,n,r){for(!e.ending&&!t.destroyed&&e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"));n-- >0;)e.pendingcb--,r();e.destroyed&&Vf(e),Kf(t,e)}function Vf(t){if(t.writing)return;for(let i=t.bufferedIndex;i<t.buffered.length;++i){var e;let{chunk:o,callback:s}=t.buffered[i],a=t.objectMode?1:o.length;t.length-=a,s((e=t.errored)!==null&&e!==void 0?e:new Ro("write"))}let n=t[ai].splice(0);for(let i=0;i<n.length;i++){var r;n[i]((r=t.errored)!==null&&r!==void 0?r:new Ro("end"))}sl(t)}function Gf(t,e){if(e.corked||e.bufferProcessing||e.destroyed||!e.constructed)return;let{buffered:n,bufferedIndex:r,objectMode:i}=e,o=n.length-r;if(!o)return;let s=r;if(e.bufferProcessing=!0,o>1&&t._writev){e.pendingcb-=o-1;let a=e.allNoop?Hf:l=>{for(let c=s;c<n.length;++c)n[c].callback(l)},u=e.allNoop&&s===0?n:h_(n,s);u.allBuffers=e.allBuffers,p_(t,e,!0,e.length,u,"",a),sl(e)}else{do{let{chunk:a,encoding:u,callback:l}=n[s];n[s++]=null;let c=i?1:a.length;p_(t,e,!1,c,a,u,l)}while(s<n.length&&!e.writing);s===n.length?sl(e):s>256?(n.splice(0,s),e.bufferedIndex=0):e.bufferedIndex=s}e.bufferProcessing=!1}ce.prototype._write=function(t,e,n){if(this._writev)this._writev([{chunk:t,encoding:e}],n);else throw new gP("_write()")};ce.prototype._writev=null;ce.prototype.end=function(t,e,n){let r=this._writableState;typeof t=="function"?(n=t,t=null,e=null):typeof e=="function"&&(n=e,e=null);let i;if(t!=null){let o=__(this,t,e);o instanceof sP&&(i=o)}return r.corked&&(r.corked=1,this.uncork()),i||(!r.errored&&!r.ending?(r.ending=!0,Kf(this,r,!0),r.ended=!0):r.finished?i=new bP("end"):r.destroyed&&(i=new Ro("end"))),typeof n=="function"&&(i||r.finished?dr.nextTick(n,i):r[ai].push(n)),this};function ol(t){return t.ending&&!t.destroyed&&t.constructed&&t.length===0&&!t.errored&&t.buffered.length===0&&!t.finished&&!t.writing&&!t.errorEmitted&&!t.closeEmitted}function EP(t,e){let n=!1;function r(i){if(n){si(t,i??b_());return}if(n=!0,e.pendingcb--,i){let o=e[ai].splice(0);for(let s=0;s<o.length;s++)o[s](i);si(t,i,e.sync)}else ol(e)&&(e.prefinished=!0,t.emit("prefinish"),e.pendingcb++,dr.nextTick($f,t,e))}e.sync=!0,e.pendingcb++;try{t._final(r)}catch(i){r(i)}e.sync=!1}function kP(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.finalCalled=!0,EP(t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Kf(t,e,n){ol(e)&&(kP(t,e),e.pendingcb===0&&(n?(e.pendingcb++,dr.nextTick((r,i)=>{ol(i)?$f(r,i):i.pendingcb--},t,e)):ol(e)&&(e.pendingcb++,$f(t,e))))}function $f(t,e){e.pendingcb--,e.finished=!0;let n=e[ai].splice(0);for(let r=0;r<n.length;r++)n[r]();if(t.emit("finish"),e.autoDestroy){let r=t._readableState;(!r||r.autoDestroy&&(r.endEmitted||r.readable===!1))&&t.destroy()}}aP(ce.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(t){this._writableState&&(this._writableState.destroyed=t)}},writable:{__proto__:null,get(){let t=this._writableState;return!!t&&t.writable!==!1&&!t.destroyed&&!t.errored&&!t.ending&&!t.ended},set(t){this._writableState&&(this._writableState.writable=!!t)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let t=this._writableState;return t?!t.destroyed&&!t.ending&&t.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var DP=al.destroy;ce.prototype.destroy=function(t,e){let n=this._writableState;return!n.destroyed&&(n.bufferedIndex<n.buffered.length||n[ai].length)&&dr.nextTick(Vf,n),DP.call(this,t,e),this};ce.prototype._undestroy=al.undestroy;ce.prototype._destroy=function(t,e){e(t)};ce.prototype[fP.captureRejectionSymbol]=function(t){this.destroy(t)};var Uf;function v_(){return Uf===void 0&&(Uf={}),Uf}ce.fromWeb=function(t,e){return v_().newStreamWritableFromWritableStream(t,e)};ce.toWeb=function(t){return v_().newWritableStreamFromStreamWritable(t)}});var q_=R((J5,F_)=>{"use strict";var Yf=wn(),TP=K("buffer"),{isReadable:RP,isWritable:AP,isIterable:E_,isNodeStream:CP,isReadableNodeStream:k_,isWritableNodeStream:D_,isDuplexNodeStream:IP,isReadableStream:T_,isWritableStream:R_}=Ct(),A_=Yt(),{AbortError:N_,codes:{ERR_INVALID_ARG_TYPE:OP,ERR_INVALID_RETURN_VALUE:C_}}=Oe(),{destroyer:ui}=fr(),PP=Ot(),M_=Do(),LP=ll(),{createDeferredPromise:I_}=qe(),O_=Lf(),P_=globalThis.Blob||TP.Blob,NP=typeof P_<"u"?function(e){return e instanceof P_}:function(e){return!1},MP=globalThis.AbortController||Xr().AbortController,{FunctionPrototypeCall:L_}=ue(),En=class extends PP{constructor(e){super(e),e?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),e?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};F_.exports=function t(e,n){if(IP(e))return e;if(k_(e))return li({readable:e});if(D_(e))return li({writable:e});if(CP(e))return li({writable:!1,readable:!1});if(T_(e))return li({readable:M_.fromWeb(e)});if(R_(e))return li({writable:LP.fromWeb(e)});if(typeof e=="function"){let{value:i,write:o,final:s,destroy:a}=FP(e);if(E_(i))return O_(En,i,{objectMode:!0,write:o,final:s,destroy:a});let u=i?.then;if(typeof u=="function"){let l,c=L_(u,i,f=>{if(f!=null)throw new C_("nully","body",f)},f=>{ui(l,f)});return l=new En({objectMode:!0,readable:!1,write:o,final(f){s(async()=>{try{await c,Yf.nextTick(f,null)}catch(p){Yf.nextTick(f,p)}})},destroy:a})}throw new C_("Iterable, AsyncIterable or AsyncFunction",n,i)}if(NP(e))return t(e.arrayBuffer());if(E_(e))return O_(En,e,{objectMode:!0,writable:!1});if(T_(e?.readable)&&R_(e?.writable))return En.fromWeb(e);if(typeof e?.writable=="object"||typeof e?.readable=="object"){let i=e!=null&&e.readable?k_(e?.readable)?e?.readable:t(e.readable):void 0,o=e!=null&&e.writable?D_(e?.writable)?e?.writable:t(e.writable):void 0;return li({readable:i,writable:o})}let r=e?.then;if(typeof r=="function"){let i;return L_(r,e,o=>{o!=null&&i.push(o),i.push(null)},o=>{ui(i,o)}),i=new En({objectMode:!0,writable:!1,read(){}})}throw new OP(n,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],e)};function FP(t){let{promise:e,resolve:n}=I_(),r=new MP,i=r.signal;return{value:t((async function*(){for(;;){let s=e;e=null;let{chunk:a,done:u,cb:l}=await s;if(Yf.nextTick(l),u)return;if(i.aborted)throw new N_(void 0,{cause:i.reason});({promise:e,resolve:n}=I_()),yield a}})(),{signal:i}),write(s,a,u){let l=n;n=null,l({chunk:s,done:!1,cb:u})},final(s){let a=n;n=null,a({done:!0,cb:s})},destroy(s,a){r.abort(),a(s)}}}function li(t){let e=t.readable&&typeof t.readable.read!="function"?M_.wrap(t.readable):t.readable,n=t.writable,r=!!RP(e),i=!!AP(n),o,s,a,u,l;function c(f){let p=u;u=null,p?p(f):f&&l.destroy(f)}return l=new En({readableObjectMode:!!(e!=null&&e.readableObjectMode),writableObjectMode:!!(n!=null&&n.writableObjectMode),readable:r,writable:i}),i&&(A_(n,f=>{i=!1,f&&ui(e,f),c(f)}),l._write=function(f,p,d){n.write(f,p)?d():o=d},l._final=function(f){n.end(),s=f},n.on("drain",function(){if(o){let f=o;o=null,f()}}),n.on("finish",function(){if(s){let f=s;s=null,f()}})),r&&(A_(e,f=>{r=!1,f&&ui(e,f),c(f)}),e.on("readable",function(){if(a){let f=a;a=null,f()}}),e.on("end",function(){l.push(null)}),l._read=function(){for(;;){let f=e.read();if(f===null){a=l._read;return}if(!l.push(f))return}}),l._destroy=function(f,p){!f&&u!==null&&(f=new N_),a=null,o=null,s=null,u===null?p(f):(u=p,ui(n,f),ui(e,f))},l}});var Ot=R((X5,W_)=>{"use strict";var{ObjectDefineProperties:qP,ObjectGetOwnPropertyDescriptor:Qt,ObjectKeys:jP,ObjectSetPrototypeOf:j_}=ue();W_.exports=xt;var Jf=Do(),at=ll();j_(xt.prototype,Jf.prototype);j_(xt,Jf);{let t=jP(at.prototype);for(let e=0;e<t.length;e++){let n=t[e];xt.prototype[n]||(xt.prototype[n]=at.prototype[n])}}function xt(t){if(!(this instanceof xt))return new xt(t);Jf.call(this,t),at.call(this,t),t?(this.allowHalfOpen=t.allowHalfOpen!==!1,t.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),t.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}qP(xt.prototype,{writable:{__proto__:null,...Qt(at.prototype,"writable")},writableHighWaterMark:{__proto__:null,...Qt(at.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...Qt(at.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...Qt(at.prototype,"writableBuffer")},writableLength:{__proto__:null,...Qt(at.prototype,"writableLength")},writableFinished:{__proto__:null,...Qt(at.prototype,"writableFinished")},writableCorked:{__proto__:null,...Qt(at.prototype,"writableCorked")},writableEnded:{__proto__:null,...Qt(at.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...Qt(at.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(t){this._readableState&&this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}});var Qf;function B_(){return Qf===void 0&&(Qf={}),Qf}xt.fromWeb=function(t,e){return B_().newStreamDuplexFromReadableWritablePair(t,e)};xt.toWeb=function(t){return B_().newReadableWritablePairFromDuplex(t)};var Zf;xt.from=function(t){return Zf||(Zf=q_()),Zf(t,"body")}});var tp=R((eH,U_)=>{"use strict";var{ObjectSetPrototypeOf:z_,Symbol:BP}=ue();U_.exports=Zt;var{ERR_METHOD_NOT_IMPLEMENTED:WP}=Oe().codes,ep=Ot(),{getHighWaterMark:zP}=Eo();z_(Zt.prototype,ep.prototype);z_(Zt,ep);var Co=BP("kCallback");function Zt(t){if(!(this instanceof Zt))return new Zt(t);let e=t?zP(this,t,"readableHighWaterMark",!0):null;e===0&&(t={...t,highWaterMark:null,readableHighWaterMark:e,writableHighWaterMark:t.writableHighWaterMark||0}),ep.call(this,t),this._readableState.sync=!1,this[Co]=null,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",UP)}function Xf(t){typeof this._flush=="function"&&!this.destroyed?this._flush((e,n)=>{if(e){t?t(e):this.destroy(e);return}n!=null&&this.push(n),this.push(null),t&&t()}):(this.push(null),t&&t())}function UP(){this._final!==Xf&&Xf.call(this)}Zt.prototype._final=Xf;Zt.prototype._transform=function(t,e,n){throw new WP("_transform()")};Zt.prototype._write=function(t,e,n){let r=this._readableState,i=this._writableState,o=r.length;this._transform(t,e,(s,a)=>{if(s){n(s);return}a!=null&&this.push(a),i.ended||o===r.length||r.length<r.highWaterMark?n():this[Co]=n})};Zt.prototype._read=function(){if(this[Co]){let t=this[Co];this[Co]=null,t()}}});var rp=R((tH,H_)=>{"use strict";var{ObjectSetPrototypeOf:$_}=ue();H_.exports=ci;var np=tp();$_(ci.prototype,np.prototype);$_(ci,np);function ci(t){if(!(this instanceof ci))return new ci(t);np.call(this,t)}ci.prototype._transform=function(t,e,n){n(null,t)}});var pl=R((nH,Q_)=>{"use strict";var Io=wn(),{ArrayIsArray:$P,Promise:HP,SymbolAsyncIterator:VP,SymbolDispose:GP}=ue(),fl=Yt(),{once:KP}=qe(),YP=fr(),V_=Ot(),{aggregateTwoErrors:QP,codes:{ERR_INVALID_ARG_TYPE:pp,ERR_INVALID_RETURN_VALUE:ip,ERR_MISSING_ARGS:ZP,ERR_STREAM_DESTROYED:JP,ERR_STREAM_PREMATURE_CLOSE:XP},AbortError:eL}=Oe(),{validateFunction:tL,validateAbortSignal:nL}=ti(),{isIterable:hr,isReadable:op,isReadableNodeStream:cl,isNodeStream:G_,isTransformStream:fi,isWebStream:rL,isReadableStream:sp,isReadableFinished:iL}=Ct(),oL=globalThis.AbortController||Xr().AbortController,ap,lp,up;function K_(t,e,n){let r=!1;t.on("close",()=>{r=!0});let i=fl(t,{readable:e,writable:n},o=>{r=!o});return{destroy:o=>{r||(r=!0,YP.destroyer(t,o||new JP("pipe")))},cleanup:i}}function sL(t){return tL(t[t.length-1],"streams[stream.length - 1]"),t.pop()}function cp(t){if(hr(t))return t;if(cl(t))return aL(t);throw new pp("val",["Readable","Iterable","AsyncIterable"],t)}async function*aL(t){lp||(lp=Do()),yield*lp.prototype[VP].call(t)}async function ul(t,e,n,{end:r}){let i,o=null,s=l=>{if(l&&(i=l),o){let c=o;o=null,c()}},a=()=>new HP((l,c)=>{i?c(i):o=()=>{i?c(i):l()}});e.on("drain",s);let u=fl(e,{readable:!1},s);try{e.writableNeedDrain&&await a();for await(let l of t)e.write(l)||await a();r&&(e.end(),await a()),n()}catch(l){n(i!==l?QP(i,l):l)}finally{u(),e.off("drain",s)}}async function fp(t,e,n,{end:r}){fi(e)&&(e=e.writable);let i=e.getWriter();try{for await(let o of t)await i.ready,i.write(o).catch(()=>{});await i.ready,r&&await i.close(),n()}catch(o){try{await i.abort(o),n(o)}catch(s){n(s)}}}function lL(...t){return Y_(t,KP(sL(t)))}function Y_(t,e,n){if(t.length===1&&$P(t[0])&&(t=t[0]),t.length<2)throw new ZP("streams");let r=new oL,i=r.signal,o=n?.signal,s=[];nL(o,"options.signal");function a(){b(new eL)}up=up||qe().addAbortListener;let u;o&&(u=up(o,a));let l,c,f=[],p=0;function d(m){b(m,--p===0)}function b(m,w){var T;if(m&&(!l||l.code==="ERR_STREAM_PREMATURE_CLOSE")&&(l=m),!(!l&&!w)){for(;f.length;)f.shift()(l);(T=u)===null||T===void 0||T[GP](),r.abort(),w&&(l||s.forEach(v=>v()),Io.nextTick(e,l,c))}}let g;for(let m=0;m<t.length;m++){let w=t[m],T=m<t.length-1,v=m>0,E=T||n?.end!==!1,L=m===t.length-1;if(G_(w)){let k=function(I){I&&I.name!=="AbortError"&&I.code!=="ERR_STREAM_PREMATURE_CLOSE"&&d(I)};var h=k;if(E){let{destroy:I,cleanup:N}=K_(w,T,v);f.push(I),op(w)&&L&&s.push(N)}w.on("error",k),op(w)&&L&&s.push(()=>{w.removeListener("error",k)})}if(m===0)if(typeof w=="function"){if(g=w({signal:i}),!hr(g))throw new ip("Iterable, AsyncIterable or Stream","source",g)}else hr(w)||cl(w)||fi(w)?g=w:g=V_.from(w);else if(typeof w=="function"){if(fi(g)){var S;g=cp((S=g)===null||S===void 0?void 0:S.readable)}else g=cp(g);if(g=w(g,{signal:i}),T){if(!hr(g,!0))throw new ip("AsyncIterable",`transform[${m-1}]`,g)}else{var y;ap||(ap=rp());let k=new ap({objectMode:!0}),I=(y=g)===null||y===void 0?void 0:y.then;if(typeof I=="function")p++,I.call(g,P=>{c=P,P!=null&&k.write(P),E&&k.end(),Io.nextTick(d)},P=>{k.destroy(P),Io.nextTick(d,P)});else if(hr(g,!0))p++,ul(g,k,d,{end:E});else if(sp(g)||fi(g)){let P=g.readable||g;p++,ul(P,k,d,{end:E})}else throw new ip("AsyncIterable or Promise","destination",g);g=k;let{destroy:N,cleanup:M}=K_(g,!1,!0);f.push(N),L&&s.push(M)}}else if(G_(w)){if(cl(g)){p+=2;let k=uL(g,w,d,{end:E});op(w)&&L&&s.push(k)}else if(fi(g)||sp(g)){let k=g.readable||g;p++,ul(k,w,d,{end:E})}else if(hr(g))p++,ul(g,w,d,{end:E});else throw new pp("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],g);g=w}else if(rL(w)){if(cl(g))p++,fp(cp(g),w,d,{end:E});else if(sp(g)||hr(g))p++,fp(g,w,d,{end:E});else if(fi(g))p++,fp(g.readable,w,d,{end:E});else throw new pp("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],g);g=w}else g=V_.from(w)}return(i!=null&&i.aborted||o!=null&&o.aborted)&&Io.nextTick(a),g}function uL(t,e,n,{end:r}){let i=!1;if(e.on("close",()=>{i||n(new XP)}),t.pipe(e,{end:!1}),r){let s=function(){i=!0,e.end()};var o=s;iL(t)?Io.nextTick(s):t.once("end",s)}else n();return fl(t,{readable:!0,writable:!1},s=>{let a=t._readableState;s&&s.code==="ERR_STREAM_PREMATURE_CLOSE"&&a&&a.ended&&!a.errored&&!a.errorEmitted?t.once("end",n).once("error",n):n(s)}),fl(e,{readable:!1,writable:!0},n)}Q_.exports={pipelineImpl:Y_,pipeline:lL}});var hp=R((rH,nw)=>{"use strict";var{pipeline:cL}=pl(),dl=Ot(),{destroyer:fL}=fr(),{isNodeStream:hl,isReadable:Z_,isWritable:J_,isWebStream:dp,isTransformStream:mr,isWritableStream:X_,isReadableStream:ew}=Ct(),{AbortError:pL,codes:{ERR_INVALID_ARG_VALUE:tw,ERR_MISSING_ARGS:dL}}=Oe(),hL=Yt();nw.exports=function(...e){if(e.length===0)throw new dL("streams");if(e.length===1)return dl.from(e[0]);let n=[...e];if(typeof e[0]=="function"&&(e[0]=dl.from(e[0])),typeof e[e.length-1]=="function"){let d=e.length-1;e[d]=dl.from(e[d])}for(let d=0;d<e.length;++d)if(!(!hl(e[d])&&!dp(e[d]))){if(d<e.length-1&&!(Z_(e[d])||ew(e[d])||mr(e[d])))throw new tw(`streams[${d}]`,n[d],"must be readable");if(d>0&&!(J_(e[d])||X_(e[d])||mr(e[d])))throw new tw(`streams[${d}]`,n[d],"must be writable")}let r,i,o,s,a;function u(d){let b=s;s=null,b?b(d):d?a.destroy(d):!p&&!f&&a.destroy()}let l=e[0],c=cL(e,u),f=!!(J_(l)||X_(l)||mr(l)),p=!!(Z_(c)||ew(c)||mr(c));if(a=new dl({writableObjectMode:!!(l!=null&&l.writableObjectMode),readableObjectMode:!!(c!=null&&c.readableObjectMode),writable:f,readable:p}),f){if(hl(l))a._write=function(b,g,S){l.write(b,g)?S():r=S},a._final=function(b){l.end(),i=b},l.on("drain",function(){if(r){let b=r;r=null,b()}});else if(dp(l)){let g=(mr(l)?l.writable:l).getWriter();a._write=async function(S,y,h){try{await g.ready,g.write(S).catch(()=>{}),h()}catch(m){h(m)}},a._final=async function(S){try{await g.ready,g.close().catch(()=>{}),i=S}catch(y){S(y)}}}let d=mr(c)?c.readable:c;hL(d,()=>{if(i){let b=i;i=null,b()}})}if(p){if(hl(c))c.on("readable",function(){if(o){let d=o;o=null,d()}}),c.on("end",function(){a.push(null)}),a._read=function(){for(;;){let d=c.read();if(d===null){o=a._read;return}if(!a.push(d))return}};else if(dp(c)){let b=(mr(c)?c.readable:c).getReader();a._read=async function(){for(;;)try{let{value:g,done:S}=await b.read();if(!a.push(g))return;if(S){a.push(null);return}}catch{return}}}}return a._destroy=function(d,b){!d&&s!==null&&(d=new pL),o=null,r=null,i=null,s===null?b(d):(s=b,hl(c)&&fL(c,d))},a}});var pw=R((iH,yp)=>{"use strict";var mL=globalThis.AbortController||Xr().AbortController,{codes:{ERR_INVALID_ARG_VALUE:gL,ERR_INVALID_ARG_TYPE:Oo,ERR_MISSING_ARGS:yL,ERR_OUT_OF_RANGE:bL},AbortError:Pt}=Oe(),{validateAbortSignal:gr,validateInteger:rw,validateObject:yr}=ti(),xL=ue().Symbol("kWeak"),_L=ue().Symbol("kResistStopPropagation"),{finished:wL}=Yt(),vL=hp(),{addAbortSignalNoValidate:SL}=So(),{isWritable:EL,isNodeStream:kL}=Ct(),{deprecate:DL}=qe(),{ArrayPrototypePush:TL,Boolean:RL,MathFloor:iw,Number:AL,NumberIsNaN:CL,Promise:ow,PromiseReject:sw,PromiseResolve:IL,PromisePrototypeThen:aw,Symbol:uw}=ue(),ml=uw("kEmpty"),lw=uw("kEof");function OL(t,e){if(e!=null&&yr(e,"options"),e?.signal!=null&&gr(e.signal,"options.signal"),kL(t)&&!EL(t))throw new gL("stream",t,"must be writable");let n=vL(this,t);return e!=null&&e.signal&&SL(e.signal,n),n}function gl(t,e){if(typeof t!="function")throw new Oo("fn",["Function","AsyncFunction"],t);e!=null&&yr(e,"options"),e?.signal!=null&&gr(e.signal,"options.signal");let n=1;e?.concurrency!=null&&(n=iw(e.concurrency));let r=n-1;return e?.highWaterMark!=null&&(r=iw(e.highWaterMark)),rw(n,"options.concurrency",1),rw(r,"options.highWaterMark",0),r+=n,async function*(){let o=qe().AbortSignalAny([e?.signal].filter(RL)),s=this,a=[],u={signal:o},l,c,f=!1,p=0;function d(){f=!0,b()}function b(){p-=1,g()}function g(){c&&!f&&p<n&&a.length<r&&(c(),c=null)}async function S(){try{for await(let y of s){if(f)return;if(o.aborted)throw new Pt;try{if(y=t(y,u),y===ml)continue;y=IL(y)}catch(h){y=sw(h)}p+=1,aw(y,b,d),a.push(y),l&&(l(),l=null),!f&&(a.length>=r||p>=n)&&await new ow(h=>{c=h})}a.push(lw)}catch(y){let h=sw(y);aw(h,b,d),a.push(h)}finally{f=!0,l&&(l(),l=null)}}S();try{for(;;){for(;a.length>0;){let y=await a[0];if(y===lw)return;if(o.aborted)throw new Pt;y!==ml&&(yield y),a.shift(),g()}await new ow(y=>{l=y})}}finally{f=!0,c&&(c(),c=null)}}.call(this)}function PL(t=void 0){return t!=null&&yr(t,"options"),t?.signal!=null&&gr(t.signal,"options.signal"),async function*(){let n=0;for await(let i of this){var r;if(t!=null&&(r=t.signal)!==null&&r!==void 0&&r.aborted)throw new Pt({cause:t.signal.reason});yield[n++,i]}}.call(this)}async function cw(t,e=void 0){for await(let n of gp.call(this,t,e))return!0;return!1}async function LL(t,e=void 0){if(typeof t!="function")throw new Oo("fn",["Function","AsyncFunction"],t);return!await cw.call(this,async(...n)=>!await t(...n),e)}async function NL(t,e){for await(let n of gp.call(this,t,e))return n}async function ML(t,e){if(typeof t!="function")throw new Oo("fn",["Function","AsyncFunction"],t);async function n(r,i){return await t(r,i),ml}for await(let r of gl.call(this,n,e));}function gp(t,e){if(typeof t!="function")throw new Oo("fn",["Function","AsyncFunction"],t);async function n(r,i){return await t(r,i)?r:ml}return gl.call(this,n,e)}var mp=class extends yL{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function FL(t,e,n){var r;if(typeof t!="function")throw new Oo("reducer",["Function","AsyncFunction"],t);n!=null&&yr(n,"options"),n?.signal!=null&&gr(n.signal,"options.signal");let i=arguments.length>1;if(n!=null&&(r=n.signal)!==null&&r!==void 0&&r.aborted){let l=new Pt(void 0,{cause:n.signal.reason});throw this.once("error",()=>{}),await wL(this.destroy(l)),l}let o=new mL,s=o.signal;if(n!=null&&n.signal){let l={once:!0,[xL]:this,[_L]:!0};n.signal.addEventListener("abort",()=>o.abort(),l)}let a=!1;try{for await(let l of this){var u;if(a=!0,n!=null&&(u=n.signal)!==null&&u!==void 0&&u.aborted)throw new Pt;i?e=await t(e,l,{signal:s}):(e=l,i=!0)}if(!a&&!i)throw new mp}finally{o.abort()}return e}async function qL(t){t!=null&&yr(t,"options"),t?.signal!=null&&gr(t.signal,"options.signal");let e=[];for await(let r of this){var n;if(t!=null&&(n=t.signal)!==null&&n!==void 0&&n.aborted)throw new Pt(void 0,{cause:t.signal.reason});TL(e,r)}return e}function jL(t,e){let n=gl.call(this,t,e);return async function*(){for await(let i of n)yield*i}.call(this)}function fw(t){if(t=AL(t),CL(t))return 0;if(t<0)throw new bL("number",">= 0",t);return t}function BL(t,e=void 0){return e!=null&&yr(e,"options"),e?.signal!=null&&gr(e.signal,"options.signal"),t=fw(t),async function*(){var r;if(e!=null&&(r=e.signal)!==null&&r!==void 0&&r.aborted)throw new Pt;for await(let o of this){var i;if(e!=null&&(i=e.signal)!==null&&i!==void 0&&i.aborted)throw new Pt;t--<=0&&(yield o)}}.call(this)}function WL(t,e=void 0){return e!=null&&yr(e,"options"),e?.signal!=null&&gr(e.signal,"options.signal"),t=fw(t),async function*(){var r;if(e!=null&&(r=e.signal)!==null&&r!==void 0&&r.aborted)throw new Pt;for await(let o of this){var i;if(e!=null&&(i=e.signal)!==null&&i!==void 0&&i.aborted)throw new Pt;if(t-- >0&&(yield o),t<=0)return}}.call(this)}yp.exports.streamReturningOperators={asIndexedPairs:DL(PL,"readable.asIndexedPairs will be removed in a future version."),drop:BL,filter:gp,flatMap:jL,map:gl,take:WL,compose:OL};yp.exports.promiseReturningOperators={every:LL,forEach:ML,reduce:FL,toArray:qL,some:cw,find:NL}});var bp=R((oH,dw)=>{"use strict";var{ArrayPrototypePop:zL,Promise:UL}=ue(),{isIterable:$L,isNodeStream:HL,isWebStream:VL}=Ct(),{pipelineImpl:GL}=pl(),{finished:KL}=Yt();xp();function YL(...t){return new UL((e,n)=>{let r,i,o=t[t.length-1];if(o&&typeof o=="object"&&!HL(o)&&!$L(o)&&!VL(o)){let s=zL(t);r=s.signal,i=s.end}GL(t,(s,a)=>{s?n(s):e(a)},{signal:r,end:i})})}dw.exports={finished:KL,pipeline:YL}});var xp=R((sH,vw)=>{"use strict";var{Buffer:QL}=K("buffer"),{ObjectDefineProperty:Jt,ObjectKeys:gw,ReflectApply:yw}=ue(),{promisify:{custom:bw}}=qe(),{streamReturningOperators:hw,promiseReturningOperators:mw}=pw(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:xw}}=Oe(),ZL=hp(),{setDefaultHighWaterMark:JL,getDefaultHighWaterMark:XL}=Eo(),{pipeline:_w}=pl(),{destroyer:eN}=fr(),ww=Yt(),_p=bp(),Po=Ct(),se=vw.exports=Qa().Stream;se.isDestroyed=Po.isDestroyed;se.isDisturbed=Po.isDisturbed;se.isErrored=Po.isErrored;se.isReadable=Po.isReadable;se.isWritable=Po.isWritable;se.Readable=Do();for(let t of gw(hw)){let n=function(...r){if(new.target)throw xw();return se.Readable.from(yw(e,this,r))},e=hw[t];Jt(n,"name",{__proto__:null,value:e.name}),Jt(n,"length",{__proto__:null,value:e.length}),Jt(se.Readable.prototype,t,{__proto__:null,value:n,enumerable:!1,configurable:!0,writable:!0})}for(let t of gw(mw)){let n=function(...r){if(new.target)throw xw();return yw(e,this,r)},e=mw[t];Jt(n,"name",{__proto__:null,value:e.name}),Jt(n,"length",{__proto__:null,value:e.length}),Jt(se.Readable.prototype,t,{__proto__:null,value:n,enumerable:!1,configurable:!0,writable:!0})}se.Writable=ll();se.Duplex=Ot();se.Transform=tp();se.PassThrough=rp();se.pipeline=_w;var{addAbortSignal:tN}=So();se.addAbortSignal=tN;se.finished=ww;se.destroy=eN;se.compose=ZL;se.setDefaultHighWaterMark=JL;se.getDefaultHighWaterMark=XL;Jt(se,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return _p}});Jt(_w,bw,{__proto__:null,enumerable:!0,get(){return _p.pipeline}});Jt(ww,bw,{__proto__:null,enumerable:!0,get(){return _p.finished}});se.Stream=se;se._isUint8Array=function(e){return e instanceof Uint8Array};se._uint8ArrayToBuffer=function(e){return QL.from(e.buffer,e.byteOffset,e.byteLength)}});var br=R((aH,H)=>{"use strict";var ve=K("stream");if(ve&&process.env.READABLE_STREAM==="disable"){let t=ve.promises;H.exports._uint8ArrayToBuffer=ve._uint8ArrayToBuffer,H.exports._isUint8Array=ve._isUint8Array,H.exports.isDisturbed=ve.isDisturbed,H.exports.isErrored=ve.isErrored,H.exports.isReadable=ve.isReadable,H.exports.Readable=ve.Readable,H.exports.Writable=ve.Writable,H.exports.Duplex=ve.Duplex,H.exports.Transform=ve.Transform,H.exports.PassThrough=ve.PassThrough,H.exports.addAbortSignal=ve.addAbortSignal,H.exports.finished=ve.finished,H.exports.destroy=ve.destroy,H.exports.pipeline=ve.pipeline,H.exports.compose=ve.compose,Object.defineProperty(ve,"promises",{configurable:!0,enumerable:!0,get(){return t}}),H.exports.Stream=ve.Stream}else{let t=xp(),e=bp(),n=t.Readable.destroy;H.exports=t.Readable,H.exports._uint8ArrayToBuffer=t._uint8ArrayToBuffer,H.exports._isUint8Array=t._isUint8Array,H.exports.isDisturbed=t.isDisturbed,H.exports.isErrored=t.isErrored,H.exports.isReadable=t.isReadable,H.exports.Readable=t.Readable,H.exports.Writable=t.Writable,H.exports.Duplex=t.Duplex,H.exports.Transform=t.Transform,H.exports.PassThrough=t.PassThrough,H.exports.addAbortSignal=t.addAbortSignal,H.exports.finished=t.finished,H.exports.destroy=t.destroy,H.exports.destroy=n,H.exports.pipeline=t.pipeline,H.exports.compose=t.compose,Object.defineProperty(t,"promises",{configurable:!0,enumerable:!0,get(){return e}}),H.exports.Stream=t.Stream}H.exports.default=H.exports});var yl=R((lH,Sw)=>{"use strict";Sw.exports=function(t,e){if(typeof t!="string")throw new TypeError("expected path to be a string");if(t==="\\"||t==="/")return"/";var n=t.length;if(n<=1)return t;var r="";if(n>4&&t[3]==="\\"){var i=t[2];(i==="?"||i===".")&&t.slice(0,2)==="\\\\"&&(t=t.slice(2),r="//")}var o=t.split(/[/\\]+/);return e!==!1&&o[o.length-1]===""&&o.pop(),r+o.join("/")}});var _l=R(Rp=>{"use strict";var sv;(function(t){typeof DO_NOT_EXPORT_CRC>"u"?typeof Rp=="object"?t(Rp):typeof define=="function"&&define.amd?define(function(){var e={};return t(e),e}):t(sv={}):t(sv={})})(function(t){t.version="1.2.2";function e(){for(var E=0,L=new Array(256),k=0;k!=256;++k)E=k,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,L[k]=E;return typeof Int32Array<"u"?new Int32Array(L):L}var n=e();function r(E){var L=0,k=0,I=0,N=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(I=0;I!=256;++I)N[I]=E[I];for(I=0;I!=256;++I)for(k=E[I],L=256+I;L<4096;L+=256)k=N[L]=k>>>8^E[k&255];var M=[];for(I=1;I!=16;++I)M[I-1]=typeof Int32Array<"u"?N.subarray(I*256,I*256+256):N.slice(I*256,I*256+256);return M}var i=r(n),o=i[0],s=i[1],a=i[2],u=i[3],l=i[4],c=i[5],f=i[6],p=i[7],d=i[8],b=i[9],g=i[10],S=i[11],y=i[12],h=i[13],m=i[14];function w(E,L){for(var k=L^-1,I=0,N=E.length;I<N;)k=k>>>8^n[(k^E.charCodeAt(I++))&255];return~k}function T(E,L){for(var k=L^-1,I=E.length-15,N=0;N<I;)k=m[E[N++]^k&255]^h[E[N++]^k>>8&255]^y[E[N++]^k>>16&255]^S[E[N++]^k>>>24]^g[E[N++]]^b[E[N++]]^d[E[N++]]^p[E[N++]]^f[E[N++]]^c[E[N++]]^l[E[N++]]^u[E[N++]]^a[E[N++]]^s[E[N++]]^o[E[N++]]^n[E[N++]];for(I+=15;N<I;)k=k>>>8^n[(k^E[N++])&255];return~k}function v(E,L){for(var k=L^-1,I=0,N=E.length,M=0,P=0;I<N;)M=E.charCodeAt(I++),M<128?k=k>>>8^n[(k^M)&255]:M<2048?(k=k>>>8^n[(k^(192|M>>6&31))&255],k=k>>>8^n[(k^(128|M&63))&255]):M>=55296&&M<57344?(M=(M&1023)+64,P=E.charCodeAt(I++)&1023,k=k>>>8^n[(k^(240|M>>8&7))&255],k=k>>>8^n[(k^(128|M>>2&63))&255],k=k>>>8^n[(k^(128|P>>6&15|(M&3)<<4))&255],k=k>>>8^n[(k^(128|P&63))&255]):(k=k>>>8^n[(k^(224|M>>12&15))&255],k=k>>>8^n[(k^(128|M>>6&63))&255],k=k>>>8^n[(k^(128|M&63))&255]);return~k}t.table=n,t.bstr=w,t.buf=T,t.str=v})});var mv=R((c8,hv)=>{"use strict";hv.exports=K("events")});var yv=R((p8,gv)=>{"use strict";gv.exports=class{constructor(e){if(!(e>0)||(e-1&e)!==0)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(e),this.mask=e-1,this.top=0,this.btm=0,this.next=null}clear(){this.top=this.btm=0,this.next=null,this.buffer.fill(void 0)}push(e){return this.buffer[this.top]!==void 0?!1:(this.buffer[this.top]=e,this.top=this.top+1&this.mask,!0)}shift(){let e=this.buffer[this.btm];if(e!==void 0)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,e}peek(){return this.buffer[this.btm]}isEmpty(){return this.buffer[this.btm]===void 0}}});var Ap=R((h8,xv)=>{"use strict";var bv=yv();xv.exports=class{constructor(e){this.hwm=e||16,this.head=new bv(this.hwm),this.tail=this.head,this.length=0}clear(){this.head=this.tail,this.head.clear(),this.length=0}push(e){if(this.length++,!this.head.push(e)){let n=this.head;this.head=n.next=new bv(2*this.head.buffer.length),this.head.push(e)}}shift(){this.length!==0&&this.length--;let e=this.tail.shift();if(e===void 0&&this.tail.next){let n=this.tail.next;return this.tail.next=null,this.tail=n,this.tail.shift()}return e}peek(){let e=this.tail.peek();return e===void 0&&this.tail.next?this.tail.next.peek():e}isEmpty(){return this.length===0}}});var bi=R((m8,_v)=>{"use strict";function hN(t){return Buffer.isBuffer(t)||t instanceof Uint8Array}function mN(t){return Buffer.isEncoding(t)}function gN(t,e,n){return Buffer.alloc(t,e,n)}function yN(t){return Buffer.allocUnsafe(t)}function bN(t){return Buffer.allocUnsafeSlow(t)}function xN(t,e){return Buffer.byteLength(t,e)}function _N(t,e){return Buffer.compare(t,e)}function wN(t,e){return Buffer.concat(t,e)}function vN(t,e,n,r,i){return ee(t).copy(e,n,r,i)}function SN(t,e){return ee(t).equals(e)}function EN(t,e,n,r,i){return ee(t).fill(e,n,r,i)}function kN(t,e,n){return Buffer.from(t,e,n)}function DN(t,e,n,r){return ee(t).includes(e,n,r)}function TN(t,e,n,r){return ee(t).indexOf(e,n,r)}function RN(t,e,n,r){return ee(t).lastIndexOf(e,n,r)}function AN(t){return ee(t).swap16()}function CN(t){return ee(t).swap32()}function IN(t){return ee(t).swap64()}function ee(t){return Buffer.isBuffer(t)?t:Buffer.from(t.buffer,t.byteOffset,t.byteLength)}function ON(t,e,n,r){return ee(t).toString(e,n,r)}function PN(t,e,n,r,i){return ee(t).write(e,n,r,i)}function LN(t,e){return ee(t).readDoubleBE(e)}function NN(t,e){return ee(t).readDoubleLE(e)}function MN(t,e){return ee(t).readFloatBE(e)}function FN(t,e){return ee(t).readFloatLE(e)}function qN(t,e){return ee(t).readInt32BE(e)}function jN(t,e){return ee(t).readInt32LE(e)}function BN(t,e){return ee(t).readUInt32BE(e)}function WN(t,e){return ee(t).readUInt32LE(e)}function zN(t,e,n){return ee(t).writeDoubleBE(e,n)}function UN(t,e,n){return ee(t).writeDoubleLE(e,n)}function $N(t,e,n){return ee(t).writeFloatBE(e,n)}function HN(t,e,n){return ee(t).writeFloatLE(e,n)}function VN(t,e,n){return ee(t).writeInt32BE(e,n)}function GN(t,e,n){return ee(t).writeInt32LE(e,n)}function KN(t,e,n){return ee(t).writeUInt32BE(e,n)}function YN(t,e,n){return ee(t).writeUInt32LE(e,n)}_v.exports={isBuffer:hN,isEncoding:mN,alloc:gN,allocUnsafe:yN,allocUnsafeSlow:bN,byteLength:xN,compare:_N,concat:wN,copy:vN,equals:SN,fill:EN,from:kN,includes:DN,indexOf:TN,lastIndexOf:RN,swap16:AN,swap32:CN,swap64:IN,toBuffer:ee,toString:ON,write:PN,readDoubleBE:LN,readDoubleLE:NN,readFloatBE:MN,readFloatLE:FN,readInt32BE:qN,readInt32LE:jN,readUInt32BE:BN,readUInt32LE:WN,writeDoubleBE:zN,writeDoubleLE:UN,writeFloatBE:$N,writeFloatLE:HN,writeInt32BE:VN,writeInt32LE:GN,writeUInt32BE:KN,writeUInt32LE:YN}});var vv=R((y8,wv)=>{"use strict";var QN=bi();wv.exports=class{constructor(e){this.encoding=e}get remaining(){return 0}decode(e){return QN.toString(e,this.encoding)}flush(){return""}}});var Dv=R((x8,kv)=>{"use strict";var Sv=bi();kv.exports=class{constructor(){this._reset()}get remaining(){return this.bytesSeen}decode(e){if(e.byteLength===0)return"";if(this.bytesNeeded===0&&Ev(e,0)===0)return this.bytesSeen=ZN(e),Sv.toString(e,"utf8");let n="",r=0;if(this.bytesNeeded>0){for(;r<e.byteLength;){let s=e[r];if(s<this.lowerBoundary||s>this.upperBoundary){n+="\uFFFD",this._reset();break}if(this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|s&63,this.bytesSeen++,r++,this.bytesSeen===this.bytesNeeded){n+=String.fromCodePoint(this.codePoint),this._reset();break}}if(this.bytesNeeded>0)return n}let i=Ev(e,r),o=e.byteLength-i;o>r&&(n+=Sv.toString(e,"utf8",r,o));for(let s=o;s<e.byteLength;s++){let a=e[s];if(this.bytesNeeded===0){a<=127?(this.bytesSeen=0,n+=String.fromCharCode(a)):a>=194&&a<=223?(this.bytesNeeded=2,this.bytesSeen=1,this.codePoint=a&31):a>=224&&a<=239?(a===224?this.lowerBoundary=160:a===237&&(this.upperBoundary=159),this.bytesNeeded=3,this.bytesSeen=1,this.codePoint=a&15):a>=240&&a<=244?(a===240?this.lowerBoundary=144:a===244&&(this.upperBoundary=143),this.bytesNeeded=4,this.bytesSeen=1,this.codePoint=a&7):(this.bytesSeen=1,n+="\uFFFD");continue}if(a<this.lowerBoundary||a>this.upperBoundary){n+="\uFFFD",s--,this._reset();continue}this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|a&63,this.bytesSeen++,this.bytesSeen===this.bytesNeeded&&(n+=String.fromCodePoint(this.codePoint),this._reset())}return n}flush(){let e=this.bytesNeeded>0?"\uFFFD":"";return this._reset(),e}_reset(){this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191}};function Ev(t,e){let n=t.byteLength;if(n<=e)return 0;let r=Math.max(e,n-4),i=n-1;for(;i>r&&(t[i]&192)===128;)i--;if(i<e)return 0;let o=t[i],s;if(o<=127)return 0;if(o>=194&&o<=223)s=2;else if(o>=224&&o<=239)s=3;else if(o>=240&&o<=244)s=4;else return 0;let a=n-i;return a<s?a:0}function ZN(t){let e=t.byteLength;if(e===0)return 0;let n=t[e-1];if(n<=127)return 0;if((n&192)!==128)return 1;let r=Math.max(0,e-4),i=e-2;for(;i>=r&&(t[i]&192)===128;)i--;if(i<0)return 1;let o=t[i],s;if(o>=194&&o<=223)s=2;else if(o>=224&&o<=239)s=3;else if(o>=240&&o<=244)s=4;else return 1;if(e-i!==s)return 1;if(s>=3){let a=t[i+1];if(o===224&&a<160||o===237&&a>159||o===240&&a<144||o===244&&a>143)return 1}return 0}});var Rv=R((w8,Tv)=>{"use strict";var JN=vv(),XN=Dv();Tv.exports=class{constructor(e="utf8"){switch(this.encoding=eM(e),this.encoding){case"utf8":this.decoder=new XN;break;case"utf16le":case"base64":throw new Error("Unsupported encoding: "+this.encoding);default:this.decoder=new JN(this.encoding)}}get remaining(){return this.decoder.remaining}push(e){return typeof e=="string"?e:this.decoder.decode(e)}write(e){return this.push(e)}end(e){let n="";return e&&(n=this.push(e)),n+=this.decoder.flush(),n}};function eM(t){switch(t=t.toLowerCase(),t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:throw new Error("Unknown encoding: "+t)}}});var Hp=R((v8,Zv)=>{"use strict";var{EventEmitter:tM}=mv(),Dl=new Error("Stream was destroyed"),Cp=new Error("Premature close"),Lv=Ap(),nM=Rv(),Ip=typeof queueMicrotask>"u"?t=>global.process.nextTick(t):queueMicrotask,pe=(1<<29)-1,Lt=1,qp=2,Xt=4,jo=8,Nv=pe^Lt,rM=pe^qp,$o=16,xi=32,vi=64,Tn=128,Ho=256,jp=512,Rn=1024,Op=2048,Bp=4096,Wp=8192,_t=16384,Dn=32768,Tl=65536,_r=131072,Mv=Ho|jp,iM=$o|Tl,oM=vi|$o,sM=Bp|Tn,zp=Ho|_r,aM=pe^$o,lM=pe^vi,uM=pe^(vi|Tl),Av=pe^Tl,cM=pe^Ho,fM=pe^(Tn|Wp),pM=pe^Rn,Cv=pe^Mv,Fv=pe^Dn,dM=pe^xi,qv=pe^_r,hM=pe^zp,en=1<<18,wi=2<<18,Vo=4<<18,wr=8<<18,Go=16<<18,Cn=32<<18,Pp=64<<18,_i=128<<18,Up=256<<18,An=512<<18,Rl=1024<<18,mM=pe^(en|Up),jv=pe^Vo,gM=pe^(en|An),yM=pe^Go,bM=pe^wr,Bv=pe^_i,xM=pe^wi,Wv=pe^Rl,Bo=$o|en,zv=pe^Bo,$p=_t|Cn,Nt=Xt|jo|qp,Je=Nt|Lt,Uv=Nt|$p,_M=jv&lM,Al=_i|Dn,wM=Al&zv,$v=Je|wM,vM=Je|Rn|_t,Iv=Je|_t|Tn,SM=Je|Rn|Tn,EM=Je|Bp|Tn|Wp,kM=Je|$o|Rn|_t|Tl|_r,DM=Nt|Rn|_t,TM=xi|Je|Dn|vi,RM=Dn|Lt,AM=Je|An|Cn,CM=wr|Go,Hv=wr|en,IM=wr|Go|Je|en,Ov=Je|en|wr|Rl,OM=Vo|en,PM=en|Up,LM=Je|An|Hv|Cn,NM=Go|Nt|An|Cn,MM=wi|Je|_i|Vo,FM=An|Cn|Nt,wl=Symbol.asyncIterator||Symbol("asyncIterator"),vl=class{constructor(e,{highWaterMark:n=16384,map:r=null,mapWritable:i,byteLength:o,byteLengthWritable:s}={}){this.stream=e,this.queue=new Lv,this.highWaterMark=n,this.buffered=0,this.error=null,this.pipeline=null,this.drains=null,this.byteLength=s||o||Qv,this.map=i||r,this.afterWrite=BM.bind(this),this.afterUpdateNextTick=UM.bind(this)}get ending(){return(this.stream._duplexState&An)!==0}get ended(){return(this.stream._duplexState&Cn)!==0}push(e){return(this.stream._duplexState&FM)!==0?!1:(this.map!==null&&(e=this.map(e)),this.buffered+=this.byteLength(e),this.queue.push(e),this.buffered<this.highWaterMark?(this.stream._duplexState|=wr,!0):(this.stream._duplexState|=CM,!1))}shift(){let e=this.queue.shift();return this.buffered-=this.byteLength(e),this.buffered===0&&(this.stream._duplexState&=bM),e}end(e){typeof e=="function"?this.stream.once("finish",e):e!=null&&this.push(e),this.stream._duplexState=(this.stream._duplexState|An)&jv}autoBatch(e,n){let r=[],i=this.stream;for(r.push(e);(i._duplexState&Ov)===Hv;)r.push(i._writableState.shift());if((i._duplexState&Je)!==0)return n(null);i._writev(r,n)}update(){let e=this.stream;e._duplexState|=wi;do{for(;(e._duplexState&Ov)===wr;){let n=this.shift();e._duplexState|=PM,e._write(n,this.afterWrite)}(e._duplexState&OM)===0&&this.updateNonPrimary()}while(this.continueUpdate()===!0);e._duplexState&=xM}updateNonPrimary(){let e=this.stream;if((e._duplexState&LM)===An){e._duplexState=e._duplexState|en,e._final(jM.bind(this));return}if((e._duplexState&Nt)===Xt){(e._duplexState&Al)===0&&(e._duplexState|=Bo,e._destroy(Vv.bind(this)));return}(e._duplexState&$v)===Lt&&(e._duplexState=(e._duplexState|Bo)&Nv,e._open(Gv.bind(this)))}continueUpdate(){return(this.stream._duplexState&_i)===0?!1:(this.stream._duplexState&=Bv,!0)}updateCallback(){(this.stream._duplexState&MM)===Vo?this.update():this.updateNextTick()}updateNextTick(){(this.stream._duplexState&_i)===0&&(this.stream._duplexState|=_i,(this.stream._duplexState&wi)===0&&Ip(this.afterUpdateNextTick))}},Lp=class{constructor(e,{highWaterMark:n=16384,map:r=null,mapReadable:i,byteLength:o,byteLengthReadable:s}={}){this.stream=e,this.queue=new Lv,this.highWaterMark=n===0?1:n,this.buffered=0,this.readAhead=n>0,this.error=null,this.pipeline=null,this.byteLength=s||o||Qv,this.map=i||r,this.pipeTo=null,this.afterRead=WM.bind(this),this.afterUpdateNextTick=zM.bind(this)}get ending(){return(this.stream._duplexState&Rn)!==0}get ended(){return(this.stream._duplexState&_t)!==0}pipe(e,n){if(this.pipeTo!==null)throw new Error("Can only pipe to one destination");if(typeof n!="function"&&(n=null),this.stream._duplexState|=jp,this.pipeTo=e,this.pipeline=new Mp(this.stream,e,n),n&&this.stream.on("error",Pv),Uo(e))e._writableState.pipeline=this.pipeline,n&&e.on("error",Pv),e.on("finish",this.pipeline.finished.bind(this.pipeline));else{let r=this.pipeline.done.bind(this.pipeline,e),i=this.pipeline.done.bind(this.pipeline,e,null);e.on("error",r),e.on("close",i),e.on("finish",this.pipeline.finished.bind(this.pipeline))}e.on("drain",qM.bind(this)),this.stream.emit("piping",e),e.emit("pipe",this.stream)}push(e){let n=this.stream;return e===null?(this.highWaterMark=0,n._duplexState=(n._duplexState|Rn)&uM,!1):this.map!==null&&(e=this.map(e),e===null)?(n._duplexState&=Av,this.buffered<this.highWaterMark):(this.buffered+=this.byteLength(e),this.queue.push(e),n._duplexState=(n._duplexState|Tn)&Av,this.buffered<this.highWaterMark)}shift(){let e=this.queue.shift();return this.buffered-=this.byteLength(e),this.buffered===0&&(this.stream._duplexState&=fM),e}unshift(e){let n=[this.map!==null?this.map(e):e];for(;this.buffered>0;)n.push(this.shift());for(let r=0;r<n.length-1;r++){let i=n[r];this.buffered+=this.byteLength(i),this.queue.push(i)}this.push(n[n.length-1])}read(){let e=this.stream;if((e._duplexState&Iv)===Tn){let n=this.shift();return this.pipeTo!==null&&this.pipeTo.write(n)===!1&&(e._duplexState&=Cv),(e._duplexState&Op)!==0&&e.emit("data",n),n}return this.readAhead===!1&&(e._duplexState|=_r,this.updateNextTick()),null}drain(){let e=this.stream;for(;(e._duplexState&Iv)===Tn&&(e._duplexState&Mv)!==0;){let n=this.shift();this.pipeTo!==null&&this.pipeTo.write(n)===!1&&(e._duplexState&=Cv),(e._duplexState&Op)!==0&&e.emit("data",n)}}update(){let e=this.stream;e._duplexState|=xi;do{for(this.drain();this.buffered<this.highWaterMark&&(e._duplexState&kM)===_r;)e._duplexState|=iM,e._read(this.afterRead),this.drain();(e._duplexState&EM)===sM&&(e._duplexState|=Wp,e.emit("readable")),(e._duplexState&oM)===0&&this.updateNonPrimary()}while(this.continueUpdate()===!0);e._duplexState&=dM}updateNonPrimary(){let e=this.stream;if((e._duplexState&SM)===Rn&&(e._duplexState=(e._duplexState|_t)&pM,e.emit("end"),(e._duplexState&Uv)===$p&&(e._duplexState|=Xt),this.pipeTo!==null&&this.pipeTo.end()),(e._duplexState&Nt)===Xt){(e._duplexState&Al)===0&&(e._duplexState|=Bo,e._destroy(Vv.bind(this)));return}(e._duplexState&$v)===Lt&&(e._duplexState=(e._duplexState|Bo)&Nv,e._open(Gv.bind(this)))}continueUpdate(){return(this.stream._duplexState&Dn)===0?!1:(this.stream._duplexState&=Fv,!0)}updateCallback(){(this.stream._duplexState&TM)===vi?this.update():this.updateNextTick()}updateNextTickIfOpen(){(this.stream._duplexState&RM)===0&&(this.stream._duplexState|=Dn,(this.stream._duplexState&xi)===0&&Ip(this.afterUpdateNextTick))}updateNextTick(){(this.stream._duplexState&Dn)===0&&(this.stream._duplexState|=Dn,(this.stream._duplexState&xi)===0&&Ip(this.afterUpdateNextTick))}},Np=class{constructor(e){this.data=null,this.afterTransform=HM.bind(e),this.afterFinal=null}},Mp=class{constructor(e,n,r){this.from=e,this.to=n,this.afterPipe=r,this.error=null,this.pipeToFinished=!1}finished(){this.pipeToFinished=!0}done(e,n){if(n&&(this.error=n),e===this.to&&(this.to=null,this.from!==null)){((this.from._duplexState&_t)===0||!this.pipeToFinished)&&this.from.destroy(this.error||new Error("Writable stream closed prematurely"));return}if(e===this.from&&(this.from=null,this.to!==null)){(e._duplexState&_t)===0&&this.to.destroy(this.error||new Error("Readable stream closed before ending"));return}this.afterPipe!==null&&this.afterPipe(this.error),this.to=this.from=this.afterPipe=null}};function qM(){this.stream._duplexState|=jp,this.updateCallback()}function jM(t){let e=this.stream;t&&e.destroy(t),(e._duplexState&Nt)===0&&(e._duplexState|=Cn,e.emit("finish")),(e._duplexState&Uv)===$p&&(e._duplexState|=Xt),e._duplexState&=gM,(e._duplexState&wi)===0?this.update():this.updateNextTick()}function Vv(t){let e=this.stream;!t&&this.error!==Dl&&(t=this.error),t&&e.emit("error",t),e._duplexState|=jo,e.emit("close");let n=e._readableState,r=e._writableState;if(n!==null&&n.pipeline!==null&&n.pipeline.done(e,t),r!==null){for(;r.drains!==null&&r.drains.length>0;)r.drains.shift().resolve(!1);r.pipeline!==null&&r.pipeline.done(e,t)}}function BM(t){let e=this.stream;t&&e.destroy(t),e._duplexState&=mM,this.drains!==null&&$M(this.drains),(e._duplexState&IM)===Go&&(e._duplexState&=yM,(e._duplexState&Pp)===Pp&&e.emit("drain")),this.updateCallback()}function WM(t){t&&this.stream.destroy(t),this.stream._duplexState&=aM,this.readAhead===!1&&(this.stream._duplexState&Ho)===0&&(this.stream._duplexState&=qv),this.updateCallback()}function zM(){(this.stream._duplexState&xi)===0&&(this.stream._duplexState&=Fv,this.update())}function UM(){(this.stream._duplexState&wi)===0&&(this.stream._duplexState&=Bv,this.update())}function $M(t){for(let e=0;e<t.length;e++)--t[e].writes===0&&(t.shift().resolve(!0),e--)}function Gv(t){let e=this.stream;t&&e.destroy(t),(e._duplexState&Xt)===0&&((e._duplexState&vM)===0&&(e._duplexState|=vi),(e._duplexState&AM)===0&&(e._duplexState|=Vo),e.emit("open")),e._duplexState&=zv,e._writableState!==null&&e._writableState.updateCallback(),e._readableState!==null&&e._readableState.updateCallback()}function HM(t,e){e!=null&&this.push(e),this._writableState.afterWrite(t)}function VM(t){this._readableState!==null&&(t==="data"&&(this._duplexState|=Op|zp,this._readableState.updateNextTick()),t==="readable"&&(this._duplexState|=Bp,this._readableState.updateNextTick())),this._writableState!==null&&t==="drain"&&(this._duplexState|=Pp,this._writableState.updateNextTick())}var Wo=class extends tM{constructor(e){super(),this._duplexState=0,this._readableState=null,this._writableState=null,e&&(e.open&&(this._open=e.open),e.destroy&&(this._destroy=e.destroy),e.predestroy&&(this._predestroy=e.predestroy),e.signal&&e.signal.addEventListener("abort",iF.bind(this))),this.on("newListener",VM)}_open(e){e(null)}_destroy(e){e(null)}_predestroy(){}get readable(){return this._readableState!==null?!0:void 0}get writable(){return this._writableState!==null?!0:void 0}get destroyed(){return(this._duplexState&jo)!==0}get destroying(){return(this._duplexState&Nt)!==0}destroy(e){(this._duplexState&Nt)===0&&(e||(e=Dl),this._duplexState=(this._duplexState|Xt)&_M,this._readableState!==null&&(this._readableState.highWaterMark=0,this._readableState.error=e),this._writableState!==null&&(this._writableState.highWaterMark=0,this._writableState.error=e),this._duplexState|=qp,this._predestroy(),this._duplexState&=rM,this._readableState!==null&&this._readableState.updateNextTick(),this._writableState!==null&&this._writableState.updateNextTick())}},Sl=class t extends Wo{constructor(e){super(e),this._duplexState|=Lt|Cn|_r,this._readableState=new Lp(this,e),e&&(this._readableState.readAhead===!1&&(this._duplexState&=qv),e.read&&(this._read=e.read),e.eagerOpen&&this._readableState.updateNextTick(),e.encoding&&this.setEncoding(e.encoding))}setEncoding(e){let n=new nM(e),r=this._readableState.map||YM;return this._readableState.map=i,this;function i(o){let s=n.push(o);return s===""&&(o.byteLength!==0||n.remaining>0)?null:r(s)}}_read(e){e(null)}pipe(e,n){return this._readableState.updateNextTick(),this._readableState.pipe(e,n),e}read(){return this._readableState.updateNextTick(),this._readableState.read()}push(e){return this._readableState.updateNextTickIfOpen(),this._readableState.push(e)}unshift(e){return this._readableState.updateNextTickIfOpen(),this._readableState.unshift(e)}resume(){return this._duplexState|=zp,this._readableState.updateNextTick(),this}pause(){return this._duplexState&=this._readableState.readAhead===!1?hM:cM,this}static _fromAsyncIterator(e,n){let r,i=new t({...n,read(s){e.next().then(o).then(s.bind(null,null)).catch(s)},predestroy(){r=e.return()},destroy(s){if(!r)return s(null);r.then(s.bind(null,null)).catch(s)}});return i;function o(s){s.done?i.push(null):i.push(s.value)}}static from(e,n){if(tF(e))return e;if(e[wl])return this._fromAsyncIterator(e[wl](),n);Array.isArray(e)||(e=e===void 0?[]:[e]);let r=0;return new t({...n,read(i){this.push(r===e.length?null:e[r++]),i(null)}})}static isBackpressured(e){return(e._duplexState&DM)!==0||e._readableState.buffered>=e._readableState.highWaterMark}static isPaused(e){return(e._duplexState&Ho)===0}[wl](){let e=this,n=null,r=null,i=null;return this.on("error",l=>{n=l}),this.on("readable",o),this.on("close",s),{[wl](){return this},next(){return new Promise(function(l,c){r=l,i=c;let f=e.read();f!==null?a(f):(e._duplexState&jo)!==0&&a(null)})},return(){return u(null)},throw(l){return u(l)}};function o(){r!==null&&a(e.read())}function s(){r!==null&&a(null)}function a(l){i!==null&&(n?i(n):l===null&&(e._duplexState&_t)===0?i(Dl):r({value:l,done:l===null}),i=r=null)}function u(l){return e.destroy(l),new Promise((c,f)=>{if(e._duplexState&jo)return c({value:void 0,done:!0});e.once("close",function(){l?f(l):c({value:void 0,done:!0})})})}}},El=class extends Wo{constructor(e){super(e),this._duplexState|=Lt|_t,this._writableState=new vl(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final),e.eagerOpen&&this._writableState.updateNextTick())}cork(){this._duplexState|=Rl}uncork(){this._duplexState&=Wv,this._writableState.updateNextTick()}_writev(e,n){n(null)}_write(e,n){this._writableState.autoBatch(e,n)}_final(e){e(null)}static isBackpressured(e){return(e._duplexState&NM)!==0}static drained(e){if(e.destroyed)return Promise.resolve(!1);let n=e._writableState,i=(oF(e)?Math.min(1,n.queue.length):n.queue.length)+(e._duplexState&Up?1:0);return i===0?Promise.resolve(!0):(n.drains===null&&(n.drains=[]),new Promise(o=>{n.drains.push({writes:i,resolve:o})}))}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},zo=class extends Sl{constructor(e){super(e),this._duplexState=Lt|this._duplexState&_r,this._writableState=new vl(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final))}cork(){this._duplexState|=Rl}uncork(){this._duplexState&=Wv,this._writableState.updateNextTick()}_writev(e,n){n(null)}_write(e,n){this._writableState.autoBatch(e,n)}_final(e){e(null)}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},kl=class extends zo{constructor(e){super(e),this._transformState=new Np(this),e&&(e.transform&&(this._transform=e.transform),e.flush&&(this._flush=e.flush))}_write(e,n){this._readableState.buffered>=this._readableState.highWaterMark?this._transformState.data=e:this._transform(e,this._transformState.afterTransform)}_read(e){if(this._transformState.data!==null){let n=this._transformState.data;this._transformState.data=null,e(null),this._transform(n,this._transformState.afterTransform)}else e(null)}destroy(e){super.destroy(e),this._transformState.data!==null&&(this._transformState.data=null,this._transformState.afterTransform())}_transform(e,n){n(null,e)}_flush(e){e(null)}_final(e){this._transformState.afterFinal=e,this._flush(GM.bind(this))}},Fp=class extends kl{};function GM(t,e){let n=this._transformState.afterFinal;if(t)return n(t);e!=null&&this.push(e),this.push(null),n(null)}function KM(...t){return new Promise((e,n)=>Kv(...t,r=>{if(r)return n(r);e()}))}function Kv(t,...e){let n=Array.isArray(t)?[...t,...e]:[t,...e],r=n.length&&typeof n[n.length-1]=="function"?n.pop():null;if(n.length<2)throw new Error("Pipeline requires at least 2 streams");let i=n[0],o=null,s=null;for(let l=1;l<n.length;l++)o=n[l],Uo(i)?i.pipe(o,u):(a(i,!0,l>1,u),i.pipe(o)),i=o;if(r){let l=!1,c=Uo(o)||!!(o._writableState&&o._writableState.autoDestroy);o.on("error",f=>{s===null&&(s=f)}),o.on("finish",()=>{l=!0,c||r(s)}),c&&o.on("close",()=>r(s||(l?null:Cp)))}return o;function a(l,c,f,p){l.on("error",p),l.on("close",d);function d(){if(c&&l._readableState&&!l._readableState.ended||f&&l._writableState&&!l._writableState.ended)return p(Cp)}}function u(l){if(!(!l||s)){s=l;for(let c of n)c.destroy(l)}}}function YM(t){return t}function Yv(t){return!!t._readableState||!!t._writableState}function Uo(t){return typeof t._duplexState=="number"&&Yv(t)}function QM(t){return!!t._readableState&&t._readableState.ending}function ZM(t){return!!t._readableState&&t._readableState.ended}function JM(t){return!!t._writableState&&t._writableState.ending}function XM(t){return!!t._writableState&&t._writableState.ended}function eF(t,e={}){let n=t._readableState&&t._readableState.error||t._writableState&&t._writableState.error;return!e.all&&n===Dl?null:n}function tF(t){return Uo(t)&&t.readable}function nF(t){return(t._duplexState&Lt)!==Lt||(t._duplexState&Xt)===Xt||(t._duplexState&Al)!==0}function rF(t){return typeof t=="object"&&t!==null&&typeof t.byteLength=="number"}function Qv(t){return rF(t)?t.byteLength:1024}function Pv(){}function iF(){this.destroy(new Error("Stream aborted."))}function oF(t){return t._writev!==El.prototype._writev&&t._writev!==zo.prototype._writev}Zv.exports={pipeline:Kv,pipelinePromise:KM,isStream:Yv,isStreamx:Uo,isEnding:QM,isEnded:ZM,isFinishing:JM,isFinished:XM,isDisturbed:nF,getStreamError:eF,Stream:Wo,Writable:El,Readable:Sl,Duplex:zo,Transform:kl,PassThrough:Fp}});var Kp=R(Ei=>{"use strict";var Y=bi(),sF="0000000000000000000",aF="7777777777777777777",Cl=48,Jv=Y.from([117,115,116,97,114,0]),lF=Y.from([Cl,Cl]),uF=Y.from([117,115,116,97,114,32]),cF=Y.from([32,0]),fF=4095,Ko=257,Gp=263;Ei.decodeLongPath=function(e,n){return Si(e,0,e.length,n)};Ei.encodePax=function(e){let n="";e.name&&(n+=Vp(" path="+e.name+`
6
+ import{A as Li,B as Ke,C as ts,D as Ad,E as jn,F as Cd,H as Id,I as Od,J as Pd,K as Ld,a as K,c as R,d as aS,e as ae,g as Ed,h as kd,i as Ge,j as zt,k as qn,l as Pi,m as ye,n as Dd,o as Td,r as lS,s as Xo,t as J,u as es,v as nn,w as Ar,x as Rd,y as Kl,z as Yl}from"./chunk-KPUB7KA2.js";var Qd=R((wq,Yd)=>{"use strict";Yd.exports=CS;function AS(t){let e={defaultWidth:0,output:process.stdout,tty:K("tty")};return t?(Object.keys(e).forEach(function(n){t[n]||(t[n]=e[n])}),t):e}function CS(t){let e=AS(t);if(e.output.getWindowSize)return e.output.getWindowSize()[0]||e.defaultWidth;if(e.tty.getWindowSize)return e.tty.getWindowSize()[1]||e.defaultWidth;if(e.output.columns)return e.output.columns;if(process.env.CLI_WIDTH){let n=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(n)&&n!==0)return n}return e.defaultWidth}});var mh=R((Oq,hh)=>{"use strict";var $S=K("stream"),su=class extends $S{#r=null;constructor(e={}){super(e),this.writable=this.readable=!0,this.muted=!1,this.on("pipe",this._onpipe),this.replace=e.replace,this._prompt=e.prompt||null,this._hadControl=!1}#n(e,n){return this._dest?this._dest[e]:this._src?this._src[e]:n}#t(e,...n){typeof this._dest?.[e]=="function"&&this._dest[e](...n),typeof this._src?.[e]=="function"&&this._src[e](...n)}get isTTY(){return this.#r!==null?this.#r:this.#n("isTTY",!1)}set isTTY(e){this.#r=e}get rows(){return this.#n("rows")}get columns(){return this.#n("columns")}mute(){this.muted=!0}unmute(){this.muted=!1}_onpipe(e){this._src=e}pipe(e,n){return this._dest=e,super.pipe(e,n)}pause(){if(this._src)return this._src.pause()}resume(){if(this._src)return this._src.resume()}write(e){if(this.muted){if(!this.replace)return!0;if(e.match(/^\u001b/))return e.indexOf(this._prompt)===0&&(e=e.slice(this._prompt.length),e=e.replace(/./g,this.replace),e=this._prompt+e),this._hadControl=!0,this.emit("data",e);this._prompt&&this._hadControl&&e.indexOf(this._prompt)===0&&(this._hadControl=!1,this.emit("data",this._prompt),e=e.slice(this._prompt.length)),e=e.toString().replace(/./g,this.replace)}this.emit("data",e)}end(e){this.muted&&(e&&this.replace?e=e.toString().replace(/./g,this.replace):e=null),e&&this.emit("data",e),this.emit("end")}destroy(...e){return this.#t("destroy",...e)}destroySoon(...e){return this.#t("destroySoon",...e)}close(...e){return this.#t("close",...e)}};hh.exports=su});var Vm=R((NU,Hm)=>{"use strict";var Ms=Object.prototype.hasOwnProperty,$m=Object.prototype.toString,qm=Object.defineProperty,jm=Object.getOwnPropertyDescriptor,Bm=function(e){return typeof Array.isArray=="function"?Array.isArray(e):$m.call(e)==="[object Array]"},Wm=function(e){if(!e||$m.call(e)!=="[object Object]")return!1;var n=Ms.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Ms.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;var i;for(i in e);return typeof i>"u"||Ms.call(e,i)},zm=function(e,n){qm&&n.name==="__proto__"?qm(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},Um=function(e,n){if(n==="__proto__")if(Ms.call(e,n)){if(jm)return jm(e,n).value}else return;return e[n]};Hm.exports=function t(){var e,n,r,i,o,s,a=arguments[0],u=1,l=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},u=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});u<l;++u)if(e=arguments[u],e!=null)for(n in e)r=Um(a,n),i=Um(e,n),a!==i&&(c&&i&&(Wm(i)||(o=Bm(i)))?(o?(o=!1,s=r&&Bm(r)?r:[]):s=r&&Wm(r)?r:{},zm(a,{name:n,newValue:t(c,s,i)})):typeof i<"u"&&zm(a,{name:n,newValue:i}));return a}});var uc=R(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.SemanticTokensBuilder=dn.SemanticTokensDiff=dn.SemanticTokensFeature=void 0;var zs=ye(),g1=t=>class extends t{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(zs.SemanticTokensRefreshRequest.type),on:e=>{let n=zs.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:e=>{let n=zs.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:e=>{let n=zs.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};dn.SemanticTokensFeature=g1;var Us=class{originalSequence;modifiedSequence;constructor(e,n){this.originalSequence=e,this.modifiedSequence=n}computeDiff(){let e=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r<n&&r<e&&this.originalSequence[r]===this.modifiedSequence[r];)r++;if(r<n&&r<e){let i=e-1,o=n-1;for(;i>=r&&o>=r&&this.originalSequence[i]===this.modifiedSequence[o];)i--,o--;(i<r||o<r)&&(i++,o++);let s=i-r+1,a=this.modifiedSequence.slice(r,o+1);return a.length===1&&a[0]===this.originalSequence[i]?[{start:r,deleteCount:s-1}]:[{start:r,deleteCount:s,data:a}]}else return r<n?[{start:r,deleteCount:0,data:this.modifiedSequence.slice(r)}]:r<e?[{start:r,deleteCount:e-r}]:[]}};dn.SemanticTokensDiff=Us;var lc=class t{_id;_prevLine;_prevChar;_dataIsSortedAndDeltaEncoded;_data;_dataNonDelta;_dataLen;_prevData;constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataNonDelta=[],this._dataLen=0,this._dataIsSortedAndDeltaEncoded=!0}push(e,n,r,i,o){this._dataIsSortedAndDeltaEncoded&&(e<this._prevLine||e===this._prevLine&&n<this._prevChar)&&(this._dataIsSortedAndDeltaEncoded=!1,this._dataNonDelta=t._deltaDecode(this._data));let s=e,a=n;this._dataIsSortedAndDeltaEncoded&&this._dataLen>0&&(s-=this._prevLine,s===0&&(a-=this._prevChar));let u=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;u[this._dataLen++]=s,u[this._dataLen++]=a,u[this._dataLen++]=r,u[this._dataLen++]=i,u[this._dataLen++]=o,this._prevLine=e,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(e){let n=e.length/5|0,r=0,i=0,o=[];for(let s=0;s<n;s++){let a=5*s,u=e[a],l=e[a+1];u===0?(u=r,l+=i):u+=r;let c=e[a+2],f=e[a+3],p=e[a+4];o[a+0]=u,o[a+1]=l,o[a+2]=c,o[a+3]=f,o[a+4]=p,r=u,i=l}return o}static _sortAndDeltaEncode(e){let n=[],r=e.length/5|0;for(let a=0;a<r;a++)n[a]=a;n.sort((a,u)=>{let l=e[5*a],c=e[5*u];if(l===c){let f=e[5*a+1],p=e[5*u+1];return f-p}return l-c});let i=[],o=0,s=0;for(let a=0;a<r;a++){let u=5*n[a],l=e[u+0],c=e[u+1],f=e[u+2],p=e[u+3],d=e[u+4],b=l-o,g=b===0?c-s:c,S=5*a;i[S+0]=b,i[S+1]=g,i[S+2]=f,i[S+3]=p,i[S+4]=d,o=l,s=c}return i}getFinalDataDelta(){return this._dataIsSortedAndDeltaEncoded?this._data:t._sortAndDeltaEncode(this._dataNonDelta)}previousResult(e){this.id===e&&(this._prevData=this.getFinalDataDelta()),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this.getFinalDataDelta()}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData!==void 0?{resultId:this.id,edits:new Us(this._prevData,this.getFinalDataDelta()).computeDiff()}:this.build()}};dn.SemanticTokensBuilder=lc});var fc=R($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});$s.TextDocuments=void 0;var er=ye(),cc=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new er.Emitter,this._onDidOpen=new er.Emitter,this._onDidClose=new er.Emitter,this._onDidSave=new er.Emitter,this._onWillSave=new er.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=er.TextDocumentSyncKind.Incremental;let n=[];return n.push(e.onDidOpenTextDocument(r=>{let i=r.textDocument,o=this._configuration.create(i.uri,i.languageId,i.version,i.text);this._syncedDocuments.set(i.uri,o);let s=Object.freeze({document:o});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(e.onDidChangeTextDocument(r=>{let i=r.textDocument,o=r.contentChanges;if(o.length===0)return;let{version:s}=i;if(s==null)throw new Error(`Received document change event for ${i.uri} without valid version identifier`);let a=this._syncedDocuments.get(i.uri);a!==void 0&&(a=this._configuration.update(a,o,s),this._syncedDocuments.set(i.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(e.onDidCloseTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:i})))})),n.push(e.onWillSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onWillSave.fire(Object.freeze({document:i,reason:r.reason}))})),n.push(e.onWillSaveTextDocumentWaitUntil((r,i)=>{let o=this._syncedDocuments.get(r.textDocument.uri);return o!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:o,reason:r.reason}),i):[]})),n.push(e.onDidSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onDidSave.fire(Object.freeze({document:i}))})),er.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};$s.TextDocuments=cc});var hc=R(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.NotebookDocuments=jr.NotebookSyncFeature=void 0;var rt=ye(),tg=fc(),y1=t=>class extends t{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(rt.DidOpenNotebookDocumentNotification.type,n=>e(n)),onDidChangeNotebookDocument:e=>this.connection.onNotification(rt.DidChangeNotebookDocumentNotification.type,n=>e(n)),onDidSaveNotebookDocument:e=>this.connection.onNotification(rt.DidSaveNotebookDocumentNotification.type,n=>e(n)),onDidCloseNotebookDocument:e=>this.connection.onNotification(rt.DidCloseNotebookDocumentNotification.type,n=>e(n))}}};jr.NotebookSyncFeature=y1;var pc=class t{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(e){return this.openHandler=e,rt.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(e){return this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,rt.Disposable.create(()=>{this.changeHandler=e})}changeTextDocument(e){return this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,rt.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(e){return this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return t.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return t.NULL_DISPOSE}onDidSaveTextDocument(){return t.NULL_DISPOSE}},dc=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(e){e instanceof tg.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new tg.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new rt.Emitter,this._onDidChange=new rt.Emitter,this._onDidSave=new rt.Emitter,this._onDidClose=new rt.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){let n=this.notebookCellMap.get(e);return n&&n[0]}findNotebookDocumentForCell(e){let n=typeof e=="string"?e:e.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){let n=new pc,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(e.notebooks.synchronization.onDidOpenNotebookDocument(async i=>{this.notebookDocuments.set(i.notebookDocument.uri,i.notebookDocument);for(let o of i.cellTextDocuments)await n.openTextDocument({textDocument:o});this.updateCellMap(i.notebookDocument),this._onDidOpen.fire(i.notebookDocument)})),r.push(e.notebooks.synchronization.onDidChangeNotebookDocument(async i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);if(o===void 0)return;o.version=i.notebookDocument.version;let s=o.metadata,a=!1,u=i.change;u.metadata!==void 0&&(a=!0,o.metadata=u.metadata);let l=[],c=[],f=[],p=[];if(u.cells!==void 0){let y=u.cells;if(y.structure!==void 0){let h=y.structure.array;if(o.cells.splice(h.start,h.deleteCount,...h.cells!==void 0?h.cells:[]),y.structure.didOpen!==void 0)for(let m of y.structure.didOpen)await n.openTextDocument({textDocument:m}),l.push(m.uri);if(y.structure.didClose)for(let m of y.structure.didClose)await n.closeTextDocument({textDocument:m}),c.push(m.uri)}if(y.data!==void 0){let h=new Map(y.data.map(m=>[m.document,m]));for(let m=0;m<=o.cells.length;m++){let w=h.get(o.cells[m].document);if(w!==void 0){let T=o.cells.splice(m,1,w);if(f.push({old:T[0],new:w}),h.delete(w.document),h.size===0)break}}}if(y.textContent!==void 0)for(let h of y.textContent)await n.changeTextDocument({textDocument:h.document,contentChanges:h.changes}),p.push(h.document.uri)}this.updateCellMap(o);let d={notebookDocument:o};a&&(d.metadata={old:s,new:o.metadata});let b=[];for(let y of l)b.push(this.getNotebookCell(y));let g=[];for(let y of c)g.push(this.getNotebookCell(y));let S=[];for(let y of p)S.push(this.getNotebookCell(y));(b.length>0||g.length>0||f.length>0||S.length>0)&&(d.cells={added:b,removed:g,changed:{data:f,textContent:S}}),(d.metadata!==void 0||d.cells!==void 0)&&this._onDidChange.fire(d)})),r.push(e.notebooks.synchronization.onDidSaveNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);o!==void 0&&this._onDidSave.fire(o)})),r.push(e.notebooks.synchronization.onDidCloseNotebookDocument(async i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);if(o!==void 0){this._onDidClose.fire(o);for(let s of i.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(i.notebookDocument.uri);for(let s of o.cells)this.notebookCellMap.delete(s.document)}})),rt.Disposable.create(()=>{r.forEach(i=>i.dispose())})}updateCellMap(e){for(let n of e.cells)this.notebookCellMap.set(n.document,[n,e])}};jr.NotebookDocuments=dc});var Hs=R(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.boolean=b1;gt.string=ng;gt.number=x1;gt.error=_1;gt.func=rg;gt.array=ig;gt.stringArray=w1;gt.typedArray=v1;gt.thenable=S1;function b1(t){return t===!0||t===!1}function ng(t){return typeof t=="string"||t instanceof String}function x1(t){return typeof t=="number"||t instanceof Number}function _1(t){return t instanceof Error}function rg(t){return typeof t=="function"}function ig(t){return Array.isArray(t)}function w1(t){return ig(t)&&t.every(e=>ng(e))}function v1(t,e){return Array.isArray(t)&&t.every(e)}function S1(t){return t&&rg(t.then)}});var gc=R(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.empty=void 0;hn.v4=og;hn.isUUID=sg;hn.parse=k1;hn.generateUuid=D1;var Xi=class{_value;constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}},mc=class t extends Xi{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return t._oneOf(t._chars)}constructor(){super([t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-","4",t._randomHex(),t._randomHex(),t._randomHex(),"-",t._oneOf(t._timeHighBits),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex()].join(""))}};hn.empty=new Xi("00000000-0000-0000-0000-000000000000");function og(){return new mc}var E1=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function sg(t){return E1.test(t)}function k1(t){if(!sg(t))throw new Error("invalid uuid");return new Xi(t)}function D1(){return og().asHex()}});var ag=R(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.ProgressFeature=void 0;Wr.attachWorkDone=R1;Wr.attachPartialResult=C1;var mn=ye(),T1=gc(),Br=class t{_connection;_token;static Instances=new Map;constructor(e,n){this._connection=e,this._token=n,t.Instances.set(this._token,this)}begin(e,n,r,i){let o={kind:"begin",title:e,message:r,cancellable:i};typeof n=="number"&&(o.percentage=Math.round(n)),this._connection.sendProgress(mn.WorkDoneProgress.type,this._token,o)}report(e,n){let r={kind:"report"};typeof e=="number"?(r.percentage=Math.round(e),n!==void 0&&(r.message=n)):r.message=e,this._connection.sendProgress(mn.WorkDoneProgress.type,this._token,r)}done(){t.Instances.delete(this._token),this._connection.sendProgress(mn.WorkDoneProgress.type,this._token,{kind:"end"})}},Vs=class extends Br{_source;constructor(e,n){super(e,n),this._source=new mn.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},eo=class{constructor(){}begin(){}report(){}done(){}},Gs=class extends eo{_source;constructor(){super(),this._source=new mn.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function R1(t,e){if(e===void 0||e.workDoneToken===void 0)return new eo;let n=e.workDoneToken;return delete e.workDoneToken,new Br(t,n)}var A1=t=>class extends t{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(e){super.initialize(e),e?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(mn.WorkDoneProgressCancelNotification.type,n=>{let r=Br.Instances.get(n.token);(r instanceof Vs||r instanceof Gs)&&r.cancel()}))}attachWorkDoneProgress(e){return e===void 0?new eo:new Br(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){let e=(0,T1.generateUuid)();return this.connection.sendRequest(mn.WorkDoneProgressCreateRequest.type,{token:e}).then(()=>new Vs(this.connection,e))}else return Promise.resolve(new Gs)}};Wr.ProgressFeature=A1;var yc;(function(t){t.type=new mn.ProgressType})(yc||(yc={}));var bc=class{_connection;_token;constructor(e,n){this._connection=e,this._token=n}report(e){this._connection.sendProgress(yc.type,this._token,e)}};function C1(t,e){if(e===void 0||e.partialResultToken===void 0)return;let n=e.partialResultToken;return delete e.partialResultToken,new bc(t,n)}});var lg=R(Et=>{"use strict";var I1=Et&&Et.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),O1=Et&&Et.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),P1=Et&&Et.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&I1(n,e,r[i]);return O1(n,e),n}})();Object.defineProperty(Et,"__esModule",{value:!0});Et.ConfigurationFeature=void 0;var L1=ye(),N1=P1(Hs()),M1=t=>class extends t{getConfiguration(e){return e?N1.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let n={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(L1.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(e)?r:r[0]:Array.isArray(e)?[]:null)}};Et.ConfigurationFeature=M1});var ug=R(Ys=>{"use strict";Object.defineProperty(Ys,"__esModule",{value:!0});Ys.WorkspaceFoldersFeature=void 0;var Ks=ye(),F1=t=>class extends t{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);let n=e.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Ks.Emitter,this.connection.onNotification(Ks.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(e){super.fillServerCapabilities(e);let n=e.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Ks.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Ks.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Ys.WorkspaceFoldersFeature=F1});var cg=R(Qs=>{"use strict";Object.defineProperty(Qs,"__esModule",{value:!0});Qs.CallHierarchyFeature=void 0;var xc=ye(),q1=t=>class extends t{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(xc.CallHierarchyPrepareRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:e=>{let n=xc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:e=>{let n=xc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Qs.CallHierarchyFeature=q1});var fg=R(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});Zs.ShowDocumentFeature=void 0;var j1=ye(),B1=t=>class extends t{showDocument(e){return this.connection.sendRequest(j1.ShowDocumentRequest.type,e)}};Zs.ShowDocumentFeature=B1});var pg=R(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});Js.FileOperationsFeature=void 0;var zr=ye(),W1=t=>class extends t{onDidCreateFiles(e){return this.connection.onNotification(zr.DidCreateFilesNotification.type,n=>e(n))}onDidRenameFiles(e){return this.connection.onNotification(zr.DidRenameFilesNotification.type,n=>e(n))}onDidDeleteFiles(e){return this.connection.onNotification(zr.DidDeleteFilesNotification.type,n=>e(n))}onWillCreateFiles(e){return this.connection.onRequest(zr.WillCreateFilesRequest.type,(n,r)=>e(n,r))}onWillRenameFiles(e){return this.connection.onRequest(zr.WillRenameFilesRequest.type,(n,r)=>e(n,r))}onWillDeleteFiles(e){return this.connection.onRequest(zr.WillDeleteFilesRequest.type,(n,r)=>e(n,r))}};Js.FileOperationsFeature=W1});var dg=R(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.LinkedEditingRangeFeature=void 0;var z1=ye(),U1=t=>class extends t{onLinkedEditingRange(e){return this.connection.onRequest(z1.LinkedEditingRangeRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0))}};Xs.LinkedEditingRangeFeature=U1});var hg=R(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.TypeHierarchyFeature=void 0;var _c=ye(),$1=t=>class extends t{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(_c.TypeHierarchyPrepareRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:e=>{let n=_c.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:e=>{let n=_c.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};ea.TypeHierarchyFeature=$1});var gg=R(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.InlineValueFeature=void 0;var mg=ye(),H1=t=>class extends t{get inlineValue(){return{refresh:()=>this.connection.sendRequest(mg.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(mg.InlineValueRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n)))}}};ta.InlineValueFeature=H1});var bg=R(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.FoldingRangeFeature=void 0;var yg=ye(),V1=t=>class extends t{get foldingRange(){return{refresh:()=>this.connection.sendRequest(yg.FoldingRangeRefreshRequest.type),on:e=>{let n=yg.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};na.FoldingRangeFeature=V1});var xg=R(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});ra.InlayHintFeature=void 0;var wc=ye(),G1=t=>class extends t{get inlayHint(){return{refresh:()=>this.connection.sendRequest(wc.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(wc.InlayHintRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n))),resolve:e=>this.connection.onRequest(wc.InlayHintResolveRequest.type,(n,r)=>e(n,r))}}};ra.InlayHintFeature=G1});var _g=R(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.DiagnosticFeature=void 0;var to=ye(),K1=t=>class extends t{get diagnostics(){return{refresh:()=>this.connection.sendRequest(to.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(to.DocumentDiagnosticRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(to.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:e=>this.connection.onRequest(to.WorkspaceDiagnosticRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(to.WorkspaceDiagnosticRequest.partialResult,n)))}}};ia.DiagnosticFeature=K1});var wg=R(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.MonikerFeature=void 0;var Y1=ye(),Q1=t=>class extends t{get moniker(){return{on:e=>{let n=Y1.MonikerRequest.type;return this.connection.onRequest(n,(r,i)=>e(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};oa.MonikerFeature=Q1});var vg=R(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.InlineCompletionFeature=void 0;var Z1=ye(),J1=t=>class extends t{get inlineCompletion(){return{on:e=>this.connection.onRequest(Z1.InlineCompletionRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n)))}}};sa.InlineCompletionFeature=J1});var Eg=R(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.TextDocumentContentFeature=void 0;var Sg=ye(),X1=t=>class extends t{get textDocumentContent(){return{refresh:e=>this.connection.sendRequest(Sg.TextDocumentContentRefreshRequest.type,{uri:e}),on:e=>this.connection.onRequest(Sg.TextDocumentContentRequest.type,(n,r)=>e(n,r))}}};aa.TextDocumentContentFeature=X1});var Tc=R(X=>{"use strict";var eD=X&&X.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),tD=X&&X.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Ig=X&&X.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&eD(n,e,r[i]);return tD(n,e),n}})();Object.defineProperty(X,"__esModule",{value:!0});X._NotebooksImpl=X._LanguagesImpl=X.BulkUnregistration=X.BulkRegistration=X.ErrorMessageTracker=void 0;X.combineConsoleFeatures=Og;X.combineTelemetryFeatures=Pg;X.combineTracerFeatures=Lg;X.combineClientFeatures=Ng;X.combineWindowFeatures=Mg;X.combineWorkspaceFeatures=Fg;X.combineLanguagesFeatures=qg;X.combineNotebooksFeatures=jg;X.combineFeatures=bD;X.createConnection=xD;var C=ye(),it=Ig(Hs()),Sc=Ig(gc()),q=ag(),nD=lg(),rD=ug(),iD=cg(),oD=uc(),sD=fg(),aD=pg(),lD=dg(),uD=hg(),cD=gg(),fD=bg(),pD=xg(),dD=_g(),hD=hc(),mD=wg(),gD=vg(),yD=Eg();function vc(t){if(t!==null)return t}var Ec=class{_messages;constructor(){this._messages=Object.create(null)}add(e){let n=this._messages[e];n||(n=0),n++,this._messages[e]=n}sendErrors(e){Object.keys(this._messages).forEach(n=>{e.window.showErrorMessage(n)})}};X.ErrorMessageTracker=Ec;var la=class{_rawConnection;_connection;constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(C.MessageType.Error,e)}warn(e){this.send(C.MessageType.Warning,e)}info(e){this.send(C.MessageType.Info,e)}log(e){this.send(C.MessageType.Log,e)}debug(e){this.send(C.MessageType.Debug,e)}send(e,n){this._rawConnection&&this._rawConnection.sendNotification(C.LogMessageNotification.type,{type:e,message:n}).catch(()=>{(0,C.RAL)().console.error("Sending log message failed")})}},kc=class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...n){let r={type:C.MessageType.Error,message:e,actions:n};return this.connection.sendRequest(C.ShowMessageRequest.type,r).then(vc)}showWarningMessage(e,...n){let r={type:C.MessageType.Warning,message:e,actions:n};return this.connection.sendRequest(C.ShowMessageRequest.type,r).then(vc)}showInformationMessage(e,...n){let r={type:C.MessageType.Info,message:e,actions:n};return this.connection.sendRequest(C.ShowMessageRequest.type,r).then(vc)}},kg=(0,sD.ShowDocumentFeature)((0,q.ProgressFeature)(kc)),Dg;(function(t){function e(){return new ua}t.create=e})(Dg||(X.BulkRegistration=Dg={}));var ua=class{_registrations=[];_registered=new Set;add(e,n){let r=it.string(e)?e:e.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let i=Sc.generateUuid();this._registrations.push({id:i,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},Tg;(function(t){function e(){return new no(void 0,[])}t.create=e})(Tg||(X.BulkUnregistration=Tg={}));var no=class{_connection;_unregistrations=new Map;constructor(e,n){this._connection=e,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let r of this._unregistrations.values())e.push(r);let n={unregisterations:e};this._connection.sendRequest(C.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(e){let n=it.string(e)?e:e.method,r=this._unregistrations.get(n);if(!r)return!1;let i={unregisterations:[r]};return this._connection.sendRequest(C.UnregistrationRequest.type,i).then(()=>{this._unregistrations.delete(n)},o=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},ca=class{_connection;attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,n,r){return e instanceof ua?this.registerMany(e):e instanceof no?this.registerSingle1(e,n,r):this.registerSingle2(e,n)}registerSingle1(e,n,r){let i=it.string(n)?n:n.method,o=Sc.generateUuid(),s={registrations:[{id:o,method:i,registerOptions:r||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(C.RegistrationRequest.type,s).then(a=>(e.add({id:o,method:i}),e),a=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(a)))}registerSingle2(e,n){let r=it.string(e)?e:e.method,i=Sc.generateUuid(),o={registrations:[{id:i,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(C.RegistrationRequest.type,o).then(s=>C.Disposable.create(()=>{this.unregisterSingle(i,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${i} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(e,n){let r={unregisterations:[{id:e,method:n}]};return this.connection.sendRequest(C.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)})}registerMany(e){let n=e.asRegistrationParams();return this.connection.sendRequest(C.RegistrationRequest.type,n).then(()=>new no(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},Dc=class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){function n(i){return i&&!!i.edit}let r=n(e)?e:{edit:e};return this.connection.sendRequest(C.ApplyWorkspaceEditRequest.type,r)}},Rg=(0,yD.TextDocumentContentFeature)((0,aD.FileOperationsFeature)((0,rD.WorkspaceFoldersFeature)((0,nD.ConfigurationFeature)(Dc)))),fa=class{_trace;_connection;constructor(){this._trace=C.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,n){this._trace!==C.Trace.Off&&this.connection.sendNotification(C.LogTraceNotification.type,{message:e,verbose:this._trace===C.Trace.Verbose?n:void 0}).catch(()=>{})}},pa=class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(C.TelemetryEventNotification.type,e).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},da=class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,q.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,n){return(0,q.attachPartialResult)(this.connection,n)}};X._LanguagesImpl=da;var Ag=(0,gD.InlineCompletionFeature)((0,fD.FoldingRangeFeature)((0,mD.MonikerFeature)((0,dD.DiagnosticFeature)((0,pD.InlayHintFeature)((0,cD.InlineValueFeature)((0,uD.TypeHierarchyFeature)((0,lD.LinkedEditingRangeFeature)((0,oD.SemanticTokensFeature)((0,iD.CallHierarchyFeature)(da)))))))))),ha=class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,q.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,n){return(0,q.attachPartialResult)(this.connection,n)}};X._NotebooksImpl=ha;var Cg=(0,hD.NotebookSyncFeature)(ha);function Og(t,e){return function(n){return e(t(n))}}function Pg(t,e){return function(n){return e(t(n))}}function Lg(t,e){return function(n){return e(t(n))}}function Ng(t,e){return function(n){return e(t(n))}}function Mg(t,e){return function(n){return e(t(n))}}function Fg(t,e){return function(n){return e(t(n))}}function qg(t,e){return function(n){return e(t(n))}}function jg(t,e){return function(n){return e(t(n))}}function bD(t,e){function n(i,o,s){return i&&o?s(i,o):i||o}return{__brand:"features",console:n(t.console,e.console,Og),tracer:n(t.tracer,e.tracer,Lg),telemetry:n(t.telemetry,e.telemetry,Pg),client:n(t.client,e.client,Ng),window:n(t.window,e.window,Mg),workspace:n(t.workspace,e.workspace,Fg),languages:n(t.languages,e.languages,qg),notebooks:n(t.notebooks,e.notebooks,jg)}}function xD(t,e,n){let r=n&&n.console?new(n.console(la)):new la,i=t(r);r.rawAttach(i);let o=n&&n.tracer?new(n.tracer(fa)):new fa,s=n&&n.telemetry?new(n.telemetry(pa)):new pa,a=n&&n.client?new(n.client(ca)):new ca,u=n&&n.window?new(n.window(kg)):new kg,l=n&&n.workspace?new(n.workspace(Rg)):new Rg,c=n&&n.languages?new(n.languages(Ag)):new Ag,f=n&&n.notebooks?new(n.notebooks(Cg)):new Cg,p=[r,o,s,a,u,l,c,f];function d(h){return h instanceof Promise?h:it.thenable(h)?new Promise((m,w)=>{h.then(T=>m(T),T=>w(T))}):Promise.resolve(h)}let b,g,S,y={listen:()=>i.listen(),sendRequest:(h,...m)=>i.sendRequest(it.string(h)?h:h.method,...m),onRequest:(h,m)=>i.onRequest(h,m),sendNotification:(h,m)=>{let w=it.string(h)?h:h.method;return i.sendNotification(w,m)},onNotification:(h,m)=>i.onNotification(h,m),onProgress:i.onProgress,sendProgress:i.sendProgress,onInitialize:h=>(g=h,{dispose:()=>{g=void 0}}),onInitialized:h=>i.onNotification(C.InitializedNotification.type,h),onShutdown:h=>(b=h,{dispose:()=>{b=void 0}}),onExit:h=>(S=h,{dispose:()=>{S=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return o},get client(){return a},get window(){return u},get workspace(){return l},get languages(){return c},get notebooks(){return f},onDidChangeConfiguration:h=>i.onNotification(C.DidChangeConfigurationNotification.type,h),onDidChangeWatchedFiles:h=>i.onNotification(C.DidChangeWatchedFilesNotification.type,h),__textDocumentSync:void 0,onDidOpenTextDocument:h=>i.onNotification(C.DidOpenTextDocumentNotification.type,h),onDidChangeTextDocument:h=>i.onNotification(C.DidChangeTextDocumentNotification.type,h),onDidCloseTextDocument:h=>i.onNotification(C.DidCloseTextDocumentNotification.type,h),onWillSaveTextDocument:h=>i.onNotification(C.WillSaveTextDocumentNotification.type,h),onWillSaveTextDocumentWaitUntil:h=>i.onRequest(C.WillSaveTextDocumentWaitUntilRequest.type,h),onDidSaveTextDocument:h=>i.onNotification(C.DidSaveTextDocumentNotification.type,h),sendDiagnostics:h=>i.sendNotification(C.PublishDiagnosticsNotification.type,h),onHover:h=>i.onRequest(C.HoverRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),void 0)),onCompletion:h=>i.onRequest(C.CompletionRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onCompletionResolve:h=>i.onRequest(C.CompletionResolveRequest.type,h),onSignatureHelp:h=>i.onRequest(C.SignatureHelpRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),void 0)),onDeclaration:h=>i.onRequest(C.DeclarationRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onDefinition:h=>i.onRequest(C.DefinitionRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onTypeDefinition:h=>i.onRequest(C.TypeDefinitionRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onImplementation:h=>i.onRequest(C.ImplementationRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onReferences:h=>i.onRequest(C.ReferencesRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onDocumentHighlight:h=>i.onRequest(C.DocumentHighlightRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onDocumentSymbol:h=>i.onRequest(C.DocumentSymbolRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onWorkspaceSymbol:h=>i.onRequest(C.WorkspaceSymbolRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onWorkspaceSymbolResolve:h=>i.onRequest(C.WorkspaceSymbolResolveRequest.type,h),onCodeAction:h=>i.onRequest(C.CodeActionRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onCodeActionResolve:h=>i.onRequest(C.CodeActionResolveRequest.type,(m,w)=>h(m,w)),onCodeLens:h=>i.onRequest(C.CodeLensRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onCodeLensResolve:h=>i.onRequest(C.CodeLensResolveRequest.type,(m,w)=>h(m,w)),onDocumentFormatting:h=>i.onRequest(C.DocumentFormattingRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),void 0)),onDocumentRangeFormatting:h=>i.onRequest(C.DocumentRangeFormattingRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),void 0)),onDocumentOnTypeFormatting:h=>i.onRequest(C.DocumentOnTypeFormattingRequest.type,(m,w)=>h(m,w)),onRenameRequest:h=>i.onRequest(C.RenameRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),void 0)),onPrepareRename:h=>i.onRequest(C.PrepareRenameRequest.type,(m,w)=>h(m,w)),onDocumentLinks:h=>i.onRequest(C.DocumentLinkRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onDocumentLinkResolve:h=>i.onRequest(C.DocumentLinkResolveRequest.type,(m,w)=>h(m,w)),onDocumentColor:h=>i.onRequest(C.DocumentColorRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onColorPresentation:h=>i.onRequest(C.ColorPresentationRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onFoldingRanges:h=>i.onRequest(C.FoldingRangeRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onSelectionRanges:h=>i.onRequest(C.SelectionRangeRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),(0,q.attachPartialResult)(i,m))),onExecuteCommand:h=>i.onRequest(C.ExecuteCommandRequest.type,(m,w)=>h(m,w,(0,q.attachWorkDone)(i,m),void 0)),dispose:()=>i.dispose()};for(let h of p)h.attach(y);return i.onRequest(C.InitializeRequest.type,h=>{e.initialize(h),it.string(h.trace)&&(o.trace=C.Trace.fromString(h.trace));for(let m of p)m.initialize(h.capabilities);if(g){let m=g(h,new C.CancellationTokenSource().token,(0,q.attachWorkDone)(i,h),void 0);return d(m).then(w=>{if(w instanceof C.ResponseError)return w;let T=w;T||(T={capabilities:{}});let v=T.capabilities;v||(v={},T.capabilities=v),v.textDocumentSync===void 0||v.textDocumentSync===null?v.textDocumentSync=it.number(y.__textDocumentSync)?y.__textDocumentSync:C.TextDocumentSyncKind.None:!it.number(v.textDocumentSync)&&!it.number(v.textDocumentSync.change)&&(v.textDocumentSync.change=it.number(y.__textDocumentSync)?y.__textDocumentSync:C.TextDocumentSyncKind.None);for(let E of p)E.fillServerCapabilities(v);return T})}else{let m={capabilities:{textDocumentSync:C.TextDocumentSyncKind.None}};for(let w of p)w.fillServerCapabilities(m.capabilities);return m}}),i.onRequest(C.ShutdownRequest.type,()=>{if(e.shutdownReceived=!0,b)return b(new C.CancellationTokenSource().token)}),i.onNotification(C.ExitNotification.type,()=>{try{if(S)return S()}finally{e.shutdownReceived?e.exit(0):e.exit(1)}}),i.onNotification(C.SetTraceNotification.type,h=>{o.trace=C.Trace.fromString(h.value)}),y}});var ro=R(Ae=>{"use strict";var _D=Ae&&Ae.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),Wg=Ae&&Ae.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&_D(e,t,n)};Object.defineProperty(Ae,"__esModule",{value:!0});Ae.ProposedFeatures=Ae.NotebookDocuments=Ae.TextDocuments=Ae.SemanticTokensBuilder=void 0;var wD=uc();Object.defineProperty(Ae,"SemanticTokensBuilder",{enumerable:!0,get:function(){return wD.SemanticTokensBuilder}});Wg(ye(),Ae);var vD=fc();Object.defineProperty(Ae,"TextDocuments",{enumerable:!0,get:function(){return vD.TextDocuments}});var SD=hc();Object.defineProperty(Ae,"NotebookDocuments",{enumerable:!0,get:function(){return SD.NotebookDocuments}});Wg(Tc(),Ae);var Bg;(function(t){t.all={__brand:"features"}})(Bg||(Ae.ProposedFeatures=Bg={}))});var lo=R((B6,Fc)=>{"use strict";typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?Fc.exports={nextTick:MT}:Fc.exports=process;function MT(t,e,n,r){if(typeof t!="function")throw new TypeError('"callback" argument must be a function');var i=arguments.length,o,s;switch(i){case 0:case 1:return process.nextTick(t);case 2:return process.nextTick(function(){t.call(null,e)});case 3:return process.nextTick(function(){t.call(null,e,n)});case 4:return process.nextTick(function(){t.call(null,e,n,r)});default:for(o=new Array(i-1),s=0;s<o.length;)o[s++]=arguments[s];return process.nextTick(function(){t.apply(null,o)})}}});var hy=R((W6,dy)=>{"use strict";var FT={}.toString;dy.exports=Array.isArray||function(t){return FT.call(t)=="[object Array]"}});var qc=R((z6,my)=>{"use strict";my.exports=K("stream")});var _a=R((jc,yy)=>{"use strict";var xa=K("buffer"),Dt=xa.Buffer;function gy(t,e){for(var n in t)e[n]=t[n]}Dt.from&&Dt.alloc&&Dt.allocUnsafe&&Dt.allocUnsafeSlow?yy.exports=xa:(gy(xa,jc),jc.Buffer=nr);function nr(t,e,n){return Dt(t,e,n)}nr.prototype=Object.create(Dt.prototype);gy(Dt,nr);nr.from=function(t,e,n){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Dt(t,e,n)};nr.alloc=function(t,e,n){if(typeof t!="number")throw new TypeError("Argument must be a number");var r=Dt(t);return e!==void 0?typeof n=="string"?r.fill(e,n):r.fill(e):r.fill(0),r};nr.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Dt(t)};nr.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return xa.SlowBuffer(t)}});var Hr=R(Ie=>{"use strict";function qT(t){return Array.isArray?Array.isArray(t):wa(t)==="[object Array]"}Ie.isArray=qT;function jT(t){return typeof t=="boolean"}Ie.isBoolean=jT;function BT(t){return t===null}Ie.isNull=BT;function WT(t){return t==null}Ie.isNullOrUndefined=WT;function zT(t){return typeof t=="number"}Ie.isNumber=zT;function UT(t){return typeof t=="string"}Ie.isString=UT;function $T(t){return typeof t=="symbol"}Ie.isSymbol=$T;function HT(t){return t===void 0}Ie.isUndefined=HT;function VT(t){return wa(t)==="[object RegExp]"}Ie.isRegExp=VT;function GT(t){return typeof t=="object"&&t!==null}Ie.isObject=GT;function KT(t){return wa(t)==="[object Date]"}Ie.isDate=KT;function YT(t){return wa(t)==="[object Error]"||t instanceof Error}Ie.isError=YT;function QT(t){return typeof t=="function"}Ie.isFunction=QT;function ZT(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}Ie.isPrimitive=ZT;Ie.isBuffer=K("buffer").Buffer.isBuffer;function wa(t){return Object.prototype.toString.call(t)}});var by=R(($6,Bc)=>{"use strict";typeof Object.create=="function"?Bc.exports=function(e,n){n&&(e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Bc.exports=function(e,n){if(n){e.super_=n;var r=function(){};r.prototype=n.prototype,e.prototype=new r,e.prototype.constructor=e}}});var Vr=R((H6,zc)=>{"use strict";try{if(Wc=K("util"),typeof Wc.inherits!="function")throw"";zc.exports=Wc.inherits}catch{zc.exports=by()}var Wc});var _y=R((V6,Uc)=>{"use strict";function JT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var xy=_a().Buffer,uo=K("util");function XT(t,e,n){t.copy(e,n)}Uc.exports=(function(){function t(){JT(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(n){var r={data:n,next:null};this.length>0?this.tail.next=r:this.head=r,this.tail=r,++this.length},t.prototype.unshift=function(n){var r={data:n,next:this.head};this.length===0&&(this.tail=r),this.head=r,++this.length},t.prototype.shift=function(){if(this.length!==0){var n=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,n}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(n){if(this.length===0)return"";for(var r=this.head,i=""+r.data;r=r.next;)i+=n+r.data;return i},t.prototype.concat=function(n){if(this.length===0)return xy.alloc(0);for(var r=xy.allocUnsafe(n>>>0),i=this.head,o=0;i;)XT(i.data,r,o),o+=i.data.length,i=i.next;return r},t})();uo&&uo.inspect&&uo.inspect.custom&&(Uc.exports.prototype[uo.inspect.custom]=function(){var t=uo.inspect({length:this.length});return this.constructor.name+" "+t})});var $c=R((G6,wy)=>{"use strict";var va=lo();function eR(t,e){var n=this,r=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return r||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,va.nextTick(Sa,this,t)):va.nextTick(Sa,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(o){!e&&o?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,va.nextTick(Sa,n,o)):va.nextTick(Sa,n,o):e&&e(o)}),this)}function tR(){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 Sa(t,e){t.emit("error",e)}wy.exports={destroy:eR,undestroy:tR}});var Sy=R((K6,vy)=>{"use strict";vy.exports=K("util").deprecate});var Vc=R((Y6,Iy)=>{"use strict";var rr=lo();Iy.exports=be;function ky(t){var e=this;this.next=null,this.entry=null,this.finish=function(){xR(e,t)}}var nR=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:rr.nextTick,Gr;be.WritableState=fo;var Dy=Object.create(Hr());Dy.inherits=Vr();var rR={deprecate:Sy()},Ty=qc(),ka=_a().Buffer,iR=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function oR(t){return ka.from(t)}function sR(t){return ka.isBuffer(t)||t instanceof iR}var Ry=$c();Dy.inherits(be,Ty);function aR(){}function fo(t,e){Gr=Gr||ir(),t=t||{};var n=e instanceof Gr;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var r=t.highWaterMark,i=t.writableHighWaterMark,o=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:n&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){hR(e,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new ky(this)}fo.prototype.getBuffer=function(){for(var e=this.bufferedRequest,n=[];e;)n.push(e),e=e.next;return n};(function(){try{Object.defineProperty(fo.prototype,"buffer",{get:rR.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Ea;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Ea=Function.prototype[Symbol.hasInstance],Object.defineProperty(be,Symbol.hasInstance,{value:function(t){return Ea.call(this,t)?!0:this!==be?!1:t&&t._writableState instanceof fo}})):Ea=function(t){return t instanceof this};function be(t){if(Gr=Gr||ir(),!Ea.call(be,this)&&!(this instanceof Gr))return new be(t);this._writableState=new fo(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),Ty.call(this)}be.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function lR(t,e){var n=new Error("write after end");t.emit("error",n),rr.nextTick(e,n)}function uR(t,e,n,r){var i=!0,o=!1;return n===null?o=new TypeError("May not write null values to stream"):typeof n!="string"&&n!==void 0&&!e.objectMode&&(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),rr.nextTick(r,o),i=!1),i}be.prototype.write=function(t,e,n){var r=this._writableState,i=!1,o=!r.objectMode&&sR(t);return o&&!ka.isBuffer(t)&&(t=oR(t)),typeof e=="function"&&(n=e,e=null),o?e="buffer":e||(e=r.defaultEncoding),typeof n!="function"&&(n=aR),r.ended?lR(this,n):(o||uR(this,r,t,n))&&(r.pendingcb++,i=fR(this,r,o,t,e,n)),i};be.prototype.cork=function(){var t=this._writableState;t.corked++};be.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Ay(this,t))};be.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function cR(t,e,n){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=ka.from(e,n)),e}Object.defineProperty(be.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function fR(t,e,n,r,i,o){if(!n){var s=cR(e,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=e.objectMode?1:r.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Hc(t,e,!1,a,r,i,o);return u}function Hc(t,e,n,r,i,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function pR(t,e,n,r,i){--e.pendingcb,n?(rr.nextTick(i,r),rr.nextTick(co,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),co(t,e))}function dR(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function hR(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(dR(n),e)pR(t,n,r,e,i);else{var o=Cy(n);!o&&!n.corked&&!n.bufferProcessing&&n.bufferedRequest&&Ay(t,n),r?nR(Ey,t,n,o,i):Ey(t,n,o,i)}}function Ey(t,e,n,r){n||mR(t,e),e.pendingcb--,r(),co(t,e)}function mR(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Ay(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),o=e.corkedRequestsFree;o.entry=n;for(var s=0,a=!0;n;)i[s]=n,n.isBuf||(a=!1),n=n.next,s+=1;i.allBuffers=a,Hc(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new ky(e),e.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,l=n.encoding,c=n.callback,f=e.objectMode?1:u.length;if(Hc(t,e,!1,f,u,l,c),n=n.next,e.bufferedRequestCount--,e.writing)break}n===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}be.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))};be.prototype._writev=null;be.prototype.end=function(t,e,n){var r=this._writableState;typeof t=="function"?(n=t,t=null,e=null):typeof e=="function"&&(n=e,e=null),t!=null&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||bR(this,r,n)};function Cy(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function gR(t,e){t._final(function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),co(t,e)})}function yR(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,rr.nextTick(gR,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function co(t,e){var n=Cy(e);return n&&(yR(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),n}function bR(t,e,n){e.ending=!0,co(t,e),n&&(e.finished?rr.nextTick(n):t.once("finish",n)),e.ended=!0,t.writable=!1}function xR(t,e,n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree.next=t}Object.defineProperty(be.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});be.prototype.destroy=Ry.destroy;be.prototype._undestroy=Ry.undestroy;be.prototype._destroy=function(t,e){this.end(),e(t)}});var ir=R((Q6,Ny)=>{"use strict";var Oy=lo(),_R=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};Ny.exports=Vt;var Py=Object.create(Hr());Py.inherits=Vr();var Ly=Yc(),Kc=Vc();Py.inherits(Vt,Ly);for(Gc=_R(Kc.prototype),Da=0;Da<Gc.length;Da++)Ta=Gc[Da],Vt.prototype[Ta]||(Vt.prototype[Ta]=Kc.prototype[Ta]);var Gc,Ta,Da;function Vt(t){if(!(this instanceof Vt))return new Vt(t);Ly.call(this,t),Kc.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",wR)}Object.defineProperty(Vt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function wR(){this.allowHalfOpen||this._writableState.ended||Oy.nextTick(vR,this)}function vR(t){t.end()}Object.defineProperty(Vt.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}});Vt.prototype._destroy=function(t,e){this.push(null),this.end(),Oy.nextTick(e,t)}});var Yc=R((J6,Gy)=>{"use strict";var Yr=lo();Gy.exports=ie;var SR=hy(),po;ie.ReadableState=zy;var Z6=K("events").EventEmitter,jy=function(t,e){return t.listeners(e).length},ef=qc(),ho=_a().Buffer,ER=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function kR(t){return ho.from(t)}function DR(t){return ho.isBuffer(t)||t instanceof ER}var By=Object.create(Hr());By.inherits=Vr();var Qc=K("util"),Z=void 0;Qc&&Qc.debuglog?Z=Qc.debuglog("stream"):Z=function(){};var TR=_y(),Wy=$c(),Kr;By.inherits(ie,ef);var Zc=["error","close","destroy","pause","resume"];function RR(t,e,n){if(typeof t.prependListener=="function")return t.prependListener(e,n);!t._events||!t._events[e]?t.on(e,n):SR(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]}function zy(t,e){po=po||ir(),t=t||{};var n=e instanceof po;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var r=t.highWaterMark,i=t.readableHighWaterMark,o=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:n&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new TR,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Kr||(Kr=K("string_decoder").StringDecoder),this.decoder=new Kr(t.encoding),this.encoding=t.encoding)}function ie(t){if(po=po||ir(),!(this instanceof ie))return new ie(t);this._readableState=new zy(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),ef.call(this)}Object.defineProperty(ie.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});ie.prototype.destroy=Wy.destroy;ie.prototype._undestroy=Wy.undestroy;ie.prototype._destroy=function(t,e){this.push(null),e(t)};ie.prototype.push=function(t,e){var n=this._readableState,r;return n.objectMode?r=!0:typeof t=="string"&&(e=e||n.defaultEncoding,e!==n.encoding&&(t=ho.from(t,e),e=""),r=!0),Uy(this,t,e,!1,r)};ie.prototype.unshift=function(t){return Uy(this,t,null,!0,!1)};function Uy(t,e,n,r,i){var o=t._readableState;if(e===null)o.reading=!1,OR(t,o);else{var s;i||(s=AR(o,e)),s?t.emit("error",s):o.objectMode||e&&e.length>0?(typeof e!="string"&&!o.objectMode&&Object.getPrototypeOf(e)!==ho.prototype&&(e=kR(e)),r?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):Jc(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(e=o.decoder.write(e),o.objectMode||e.length!==0?Jc(t,o,e,!1):$y(t,o)):Jc(t,o,e,!1))):r||(o.reading=!1)}return CR(o)}function Jc(t,e,n,r){e.flowing&&e.length===0&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&Ra(t)),$y(t,e)}function AR(t,e){var n;return!DR(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(n=new TypeError("Invalid non-string/buffer chunk")),n}function CR(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}ie.prototype.isPaused=function(){return this._readableState.flowing===!1};ie.prototype.setEncoding=function(t){return Kr||(Kr=K("string_decoder").StringDecoder),this._readableState.decoder=new Kr(t),this._readableState.encoding=t,this};var My=8388608;function IR(t){return t>=My?t=My:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Fy(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=IR(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}ie.prototype.read=function(t){Z("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return Z("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Xc(this):Ra(this),null;if(t=Fy(t,e),t===0&&e.ended)return e.length===0&&Xc(this),null;var r=e.needReadable;Z("need readable",r),(e.length===0||e.length-t<e.highWaterMark)&&(r=!0,Z("length less than watermark",r)),e.ended||e.reading?(r=!1,Z("reading or ended",r)):r&&(Z("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Fy(n,e)));var i;return t>0?i=Hy(t,e):i=null,i===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&Xc(this)),i!==null&&this.emit("data",i),i};function OR(t,e){if(!e.ended){if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,Ra(t)}}function Ra(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(Z("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Yr.nextTick(qy,t):qy(t))}function qy(t){Z("emit readable"),t.emit("readable"),tf(t)}function $y(t,e){e.readingMore||(e.readingMore=!0,Yr.nextTick(PR,t,e))}function PR(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(Z("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}ie.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};ie.prototype.pipe=function(t,e){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t);break}r.pipesCount+=1,Z("pipe count=%d opts=%j",r.pipesCount,e);var i=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,o=i?a:S;r.endEmitted?Yr.nextTick(o):n.once("end",o),t.on("unpipe",s);function s(y,h){Z("onunpipe"),y===n&&h&&h.hasUnpiped===!1&&(h.hasUnpiped=!0,c())}function a(){Z("onend"),t.end()}var u=LR(n);t.on("drain",u);var l=!1;function c(){Z("cleanup"),t.removeListener("close",b),t.removeListener("finish",g),t.removeListener("drain",u),t.removeListener("error",d),t.removeListener("unpipe",s),n.removeListener("end",a),n.removeListener("end",S),n.removeListener("data",p),l=!0,r.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}var f=!1;n.on("data",p);function p(y){Z("ondata"),f=!1;var h=t.write(y);h===!1&&!f&&((r.pipesCount===1&&r.pipes===t||r.pipesCount>1&&Vy(r.pipes,t)!==-1)&&!l&&(Z("false write response, pause",r.awaitDrain),r.awaitDrain++,f=!0),n.pause())}function d(y){Z("onerror",y),S(),t.removeListener("error",d),jy(t,"error")===0&&t.emit("error",y)}RR(t,"error",d);function b(){t.removeListener("finish",g),S()}t.once("close",b);function g(){Z("onfinish"),t.removeListener("close",b),S()}t.once("finish",g);function S(){Z("unpipe"),n.unpipe(t)}return t.emit("pipe",n),r.flowing||(Z("pipe resume"),n.resume()),t};function LR(t){return function(){var e=t._readableState;Z("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&jy(t,"data")&&(e.flowing=!0,tf(t))}}ie.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n),this);if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=Vy(e.pipes,t);return s===-1?this:(e.pipes.splice(s,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n),this)};ie.prototype.on=function(t,e){var n=ef.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var r=this._readableState;!r.endEmitted&&!r.readableListening&&(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&Ra(this):Yr.nextTick(NR,this))}return n};ie.prototype.addListener=ie.prototype.on;function NR(t){Z("readable nexttick read 0"),t.read(0)}ie.prototype.resume=function(){var t=this._readableState;return t.flowing||(Z("resume"),t.flowing=!0,MR(this,t)),this};function MR(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Yr.nextTick(FR,t,e))}function FR(t,e){e.reading||(Z("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),tf(t),e.flowing&&!e.reading&&t.read(0)}ie.prototype.pause=function(){return Z("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Z("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function tf(t){var e=t._readableState;for(Z("flow",e.flowing);e.flowing&&t.read()!==null;);}ie.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;t.on("end",function(){if(Z("wrapped end"),n.decoder&&!n.ended){var s=n.decoder.end();s&&s.length&&e.push(s)}e.push(null)}),t.on("data",function(s){if(Z("wrapped data"),n.decoder&&(s=n.decoder.write(s)),!(n.objectMode&&s==null)&&!(!n.objectMode&&(!s||!s.length))){var a=e.push(s);a||(r=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=(function(s){return function(){return t[s].apply(t,arguments)}})(i));for(var o=0;o<Zc.length;o++)t.on(Zc[o],this.emit.bind(this,Zc[o]));return this._read=function(s){Z("wrapped _read",s),r&&(r=!1,t.resume())},this};Object.defineProperty(ie.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});ie._fromList=Hy;function Hy(t,e){if(e.length===0)return null;var n;return e.objectMode?n=e.buffer.shift():!t||t>=e.length?(e.decoder?n=e.buffer.join(""):e.buffer.length===1?n=e.buffer.head.data:n=e.buffer.concat(e.length),e.buffer.clear()):n=qR(t,e.buffer,e.decoder),n}function qR(t,e,n){var r;return t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):t===e.head.data.length?r=e.shift():r=n?jR(t,e):BR(t,e),r}function jR(t,e){var n=e.head,r=1,i=n.data;for(t-=i.length;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),t-=s,t===0){s===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++r}return e.length-=r,i}function BR(t,e){var n=ho.allocUnsafe(t),r=e.head,i=1;for(r.data.copy(n),t-=r.data.length;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),t-=s,t===0){s===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++i}return e.length-=i,n}function Xc(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Yr.nextTick(WR,e,t))}function WR(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function Vy(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}});var nf=R((X6,Qy)=>{"use strict";Qy.exports=Gt;var Aa=ir(),Yy=Object.create(Hr());Yy.inherits=Vr();Yy.inherits(Gt,Aa);function zR(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,e!=null&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Gt(t){if(!(this instanceof Gt))return new Gt(t);Aa.call(this,t),this._transformState={afterTransform:zR.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",UR)}function UR(){var t=this;typeof this._flush=="function"?this._flush(function(e,n){Ky(t,e,n)}):Ky(this,null,null)}Gt.prototype.push=function(t,e){return this._transformState.needTransform=!1,Aa.prototype.push.call(this,t,e)};Gt.prototype._transform=function(t,e,n){throw new Error("_transform() is not implemented")};Gt.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Gt.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Gt.prototype._destroy=function(t,e){var n=this;Aa.prototype._destroy.call(this,t,function(r){e(r),n.emit("close")})};function Ky(t,e,n){if(e)return t.emit("error",e);if(n!=null&&t.push(n),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}});var eb=R((e5,Xy)=>{"use strict";Xy.exports=mo;var Zy=nf(),Jy=Object.create(Hr());Jy.inherits=Vr();Jy.inherits(mo,Zy);function mo(t){if(!(this instanceof mo))return new mo(t);Zy.call(this,t)}mo.prototype._transform=function(t,e,n){n(null,t)}});var tb=R((De,Ca)=>{"use strict";var Tt=K("stream");process.env.READABLE_STREAM==="disable"&&Tt?(Ca.exports=Tt,De=Ca.exports=Tt.Readable,De.Readable=Tt.Readable,De.Writable=Tt.Writable,De.Duplex=Tt.Duplex,De.Transform=Tt.Transform,De.PassThrough=Tt.PassThrough,De.Stream=Tt):(De=Ca.exports=Yc(),De.Stream=Tt||De,De.Readable=De,De.Writable=Vc(),De.Duplex=ir(),De.Transform=nf(),De.PassThrough=eb())});var rb=R((t5,nb)=>{"use strict";nb.exports=tb().PassThrough});var ab=R((n5,sb)=>{"use strict";var ib=K("util"),Pa=rb();sb.exports={Readable:Ia,Writable:Oa};ib.inherits(Ia,Pa);ib.inherits(Oa,Pa);function ob(t,e,n){t[e]=function(){return delete t[e],n.apply(this,arguments),this[e].apply(this,arguments)}}function Ia(t,e){if(!(this instanceof Ia))return new Ia(t,e);Pa.call(this,e),ob(this,"_read",function(){var n=t.call(this,e),r=this.emit.bind(this,"error");n.on("error",r),n.pipe(this)}),this.emit("readable")}function Oa(t,e){if(!(this instanceof Oa))return new Oa(t,e);Pa.call(this,e),ob(this,"_write",function(){var n=t.call(this,e),r=this.emit.bind(this,"error");n.on("error",r),this.pipe(n)}),this.emit("writable")}});var ue=R((B5,Sb)=>{"use strict";var uf=class extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError(`Expected input to be an Array, got ${typeof e}`);let n="";for(let r=0;r<e.length;r++)n+=` ${e[r].stack}
7
+ `;super(n),this.name="AggregateError",this.errors=e}};Sb.exports={AggregateError:uf,ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,n){return t.slice(e,n)},Error,FunctionPrototypeCall(t,e,...n){return t.call(e,...n)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,n){return Object.defineProperty(t,e,n)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,n){return t.then(e,n)},PromiseReject(t){return Promise.reject(t)},PromiseResolve(t){return Promise.resolve(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,n){return t.slice(e,n)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(t,e,n){return t.set(e,n)},Boolean,Uint8Array}});var cf=R((W5,Eb)=>{"use strict";Eb.exports={format(t,...e){return t.replace(/%([sdifj])/g,function(...[n,r]){let i=e.shift();return r==="f"?i.toFixed(6):r==="j"?JSON.stringify(i):r==="s"&&typeof i=="object"?`${i.constructor!==Object?i.constructor.name:""} {}`.trim():i.toString()})},inspect(t){switch(typeof t){case"string":if(t.includes("'"))if(t.includes('"')){if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}else return`"${t}"`;return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}}}});var Oe=R((z5,Tb)=>{"use strict";var{format:KA,inspect:qa}=cf(),{AggregateError:YA}=ue(),QA=globalThis.AggregateError||YA,ZA=Symbol("kIsNodeError"),JA=["string","function","number","object","Function","Object","boolean","bigint","symbol"],XA=/^([A-Z][a-z0-9]*)+$/,eC="__node_internal_",ja={};function ar(t,e){if(!t)throw new ja.ERR_INTERNAL_ASSERTION(e)}function kb(t){let e="",n=t.length,r=t[0]==="-"?1:0;for(;n>=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function tC(t,e,n){if(typeof e=="function")return ar(e.length<=n.length,`Code: ${t}; The provided arguments length (${n.length}) does not match the required ones (${e.length}).`),e(...n);let r=(e.match(/%[dfijoOs]/g)||[]).length;return ar(r===n.length,`Code: ${t}; The provided arguments length (${n.length}) does not match the required ones (${r}).`),n.length===0?e:KA(e,...n)}function Te(t,e,n){n||(n=Error);class r extends n{constructor(...o){super(tC(t,e,o))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(r.prototype,{name:{value:n.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),r.prototype.code=t,r.prototype[ZA]=!0,ja[t]=r}function Db(t){let e=eC+t.name;return Object.defineProperty(t,"name",{value:e}),t}function nC(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let n=new QA([e,t],e.message);return n.code=e.code,n}return t||e}var ff=class extends Error{constructor(e="The operation was aborted",n=void 0){if(n!==void 0&&typeof n!="object")throw new ja.ERR_INVALID_ARG_TYPE("options","Object",n);super(e,n),this.code="ABORT_ERR",this.name="AbortError"}};Te("ERR_ASSERTION","%s",Error);Te("ERR_INVALID_ARG_TYPE",(t,e,n)=>{ar(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let r="The ";t.endsWith(" argument")?r+=`${t} `:r+=`"${t}" ${t.includes(".")?"property":"argument"} `,r+="must be ";let i=[],o=[],s=[];for(let u of e)ar(typeof u=="string","All expected entries have to be of type string"),JA.includes(u)?i.push(u.toLowerCase()):XA.test(u)?o.push(u):(ar(u!=="object",'The value "object" should be written as "Object"'),s.push(u));if(o.length>0){let u=i.indexOf("object");u!==-1&&(i.splice(i,u,1),o.push("Object"))}if(i.length>0){switch(i.length){case 1:r+=`of type ${i[0]}`;break;case 2:r+=`one of type ${i[0]} or ${i[1]}`;break;default:{let u=i.pop();r+=`one of type ${i.join(", ")}, or ${u}`}}(o.length>0||s.length>0)&&(r+=" or ")}if(o.length>0){switch(o.length){case 1:r+=`an instance of ${o[0]}`;break;case 2:r+=`an instance of ${o[0]} or ${o[1]}`;break;default:{let u=o.pop();r+=`an instance of ${o.join(", ")}, or ${u}`}}s.length>0&&(r+=" or ")}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(r+="an "),r+=`${s[0]}`;break;case 2:r+=`one of ${s[0]} or ${s[1]}`;break;default:{let u=s.pop();r+=`one of ${s.join(", ")}, or ${u}`}}if(n==null)r+=`. Received ${n}`;else if(typeof n=="function"&&n.name)r+=`. Received function ${n.name}`;else if(typeof n=="object"){var a;if((a=n.constructor)!==null&&a!==void 0&&a.name)r+=`. Received an instance of ${n.constructor.name}`;else{let u=qa(n,{depth:-1});r+=`. Received ${u}`}}else{let u=qa(n,{colors:!1});u.length>25&&(u=`${u.slice(0,25)}...`),r+=`. Received type ${typeof n} (${u})`}return r},TypeError);Te("ERR_INVALID_ARG_VALUE",(t,e,n="is invalid")=>{let r=qa(e);return r.length>128&&(r=r.slice(0,128)+"..."),`The ${t.includes(".")?"property":"argument"} '${t}' ${n}. Received ${r}`},TypeError);Te("ERR_INVALID_RETURN_VALUE",(t,e,n)=>{var r;let i=n!=null&&(r=n.constructor)!==null&&r!==void 0&&r.name?`instance of ${n.constructor.name}`:`type ${typeof n}`;return`Expected ${t} to be returned from the "${e}" function but got ${i}.`},TypeError);Te("ERR_MISSING_ARGS",(...t)=>{ar(t.length>0,"At least one arg needs to be specified");let e,n=t.length;switch(t=(Array.isArray(t)?t:[t]).map(r=>`"${r}"`).join(" or "),n){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{let r=t.pop();e+=`The ${t.join(", ")}, and ${r} arguments`}break}return`${e} must be specified`},TypeError);Te("ERR_OUT_OF_RANGE",(t,e,n)=>{ar(e,'Missing "range" argument');let r;if(Number.isInteger(n)&&Math.abs(n)>2**32)r=kb(String(n));else if(typeof n=="bigint"){r=String(n);let i=BigInt(2)**BigInt(32);(n>i||n<-i)&&(r=kb(r)),r+="n"}else r=qa(n);return`The value of "${t}" is out of range. It must be ${e}. Received ${r}`},RangeError);Te("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);Te("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);Te("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);Te("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);Te("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);Te("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Te("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);Te("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);Te("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);Te("ERR_STREAM_WRITE_AFTER_END","write after end",Error);Te("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);Tb.exports={AbortError:ff,aggregateTwoErrors:Db(nC),hideStackFrames:Db,codes:ja}});var Fb=R((_o,xo)=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});var Pb=new WeakMap,pf=new WeakMap;function oe(t){let e=Pb.get(t);return console.assert(e!=null,"'this' is expected an Event object, but got",t),e}function Rb(t){if(t.passiveListener!=null){typeof console<"u"&&typeof console.error=="function"&&console.error("Unable to preventDefault inside passive event listener invocation.",t.passiveListener);return}t.event.cancelable&&(t.canceled=!0,typeof t.event.preventDefault=="function"&&t.event.preventDefault())}function Jr(t,e){Pb.set(this,{eventTarget:t,event:e,eventPhase:2,currentTarget:t,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:e.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let n=Object.keys(e);for(let r=0;r<n.length;++r){let i=n[r];i in this||Object.defineProperty(this,i,Lb(i))}}Jr.prototype={get type(){return oe(this).event.type},get target(){return oe(this).eventTarget},get currentTarget(){return oe(this).currentTarget},composedPath(){let t=oe(this).currentTarget;return t==null?[]:[t]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return oe(this).eventPhase},stopPropagation(){let t=oe(this);t.stopped=!0,typeof t.event.stopPropagation=="function"&&t.event.stopPropagation()},stopImmediatePropagation(){let t=oe(this);t.stopped=!0,t.immediateStopped=!0,typeof t.event.stopImmediatePropagation=="function"&&t.event.stopImmediatePropagation()},get bubbles(){return!!oe(this).event.bubbles},get cancelable(){return!!oe(this).event.cancelable},preventDefault(){Rb(oe(this))},get defaultPrevented(){return oe(this).canceled},get composed(){return!!oe(this).event.composed},get timeStamp(){return oe(this).timeStamp},get srcElement(){return oe(this).eventTarget},get cancelBubble(){return oe(this).stopped},set cancelBubble(t){if(!t)return;let e=oe(this);e.stopped=!0,typeof e.event.cancelBubble=="boolean"&&(e.event.cancelBubble=!0)},get returnValue(){return!oe(this).canceled},set returnValue(t){t||Rb(oe(this))},initEvent(){}};Object.defineProperty(Jr.prototype,"constructor",{value:Jr,configurable:!0,writable:!0});typeof window<"u"&&typeof window.Event<"u"&&(Object.setPrototypeOf(Jr.prototype,window.Event.prototype),pf.set(window.Event.prototype,Jr));function Lb(t){return{get(){return oe(this).event[t]},set(e){oe(this).event[t]=e},configurable:!0,enumerable:!0}}function rC(t){return{value(){let e=oe(this).event;return e[t].apply(e,arguments)},configurable:!0,enumerable:!0}}function iC(t,e){let n=Object.keys(e);if(n.length===0)return t;function r(i,o){t.call(this,i,o)}r.prototype=Object.create(t.prototype,{constructor:{value:r,configurable:!0,writable:!0}});for(let i=0;i<n.length;++i){let o=n[i];if(!(o in t.prototype)){let a=typeof Object.getOwnPropertyDescriptor(e,o).value=="function";Object.defineProperty(r.prototype,o,a?rC(o):Lb(o))}}return r}function Nb(t){if(t==null||t===Object.prototype)return Jr;let e=pf.get(t);return e==null&&(e=iC(Nb(Object.getPrototypeOf(t)),t),pf.set(t,e)),e}function oC(t,e){let n=Nb(Object.getPrototypeOf(e));return new n(t,e)}function sC(t){return oe(t).immediateStopped}function aC(t,e){oe(t).eventPhase=e}function lC(t,e){oe(t).currentTarget=e}function Ab(t,e){oe(t).passiveListener=e}var Mb=new WeakMap,Cb=1,Ib=2,Ba=3;function Wa(t){return t!==null&&typeof t=="object"}function bo(t){let e=Mb.get(t);if(e==null)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return e}function uC(t){return{get(){let n=bo(this).get(t);for(;n!=null;){if(n.listenerType===Ba)return n.listener;n=n.next}return null},set(e){typeof e!="function"&&!Wa(e)&&(e=null);let n=bo(this),r=null,i=n.get(t);for(;i!=null;)i.listenerType===Ba?r!==null?r.next=i.next:i.next!==null?n.set(t,i.next):n.delete(t):r=i,i=i.next;if(e!==null){let o={listener:e,listenerType:Ba,passive:!1,once:!1,next:null};r===null?n.set(t,o):r.next=o}},configurable:!0,enumerable:!0}}function df(t,e){Object.defineProperty(t,`on${e}`,uC(e))}function Ob(t){function e(){yt.call(this)}e.prototype=Object.create(yt.prototype,{constructor:{value:e,configurable:!0,writable:!0}});for(let n=0;n<t.length;++n)df(e.prototype,t[n]);return e}function yt(){if(this instanceof yt){Mb.set(this,new Map);return}if(arguments.length===1&&Array.isArray(arguments[0]))return Ob(arguments[0]);if(arguments.length>0){let t=new Array(arguments.length);for(let e=0;e<arguments.length;++e)t[e]=arguments[e];return Ob(t)}throw new TypeError("Cannot call a class as a function")}yt.prototype={addEventListener(t,e,n){if(e==null)return;if(typeof e!="function"&&!Wa(e))throw new TypeError("'listener' should be a function or an object.");let r=bo(this),i=Wa(n),s=(i?!!n.capture:!!n)?Cb:Ib,a={listener:e,listenerType:s,passive:i&&!!n.passive,once:i&&!!n.once,next:null},u=r.get(t);if(u===void 0){r.set(t,a);return}let l=null;for(;u!=null;){if(u.listener===e&&u.listenerType===s)return;l=u,u=u.next}l.next=a},removeEventListener(t,e,n){if(e==null)return;let r=bo(this),o=(Wa(n)?!!n.capture:!!n)?Cb:Ib,s=null,a=r.get(t);for(;a!=null;){if(a.listener===e&&a.listenerType===o){s!==null?s.next=a.next:a.next!==null?r.set(t,a.next):r.delete(t);return}s=a,a=a.next}},dispatchEvent(t){if(t==null||typeof t.type!="string")throw new TypeError('"event.type" should be a string.');let e=bo(this),n=t.type,r=e.get(n);if(r==null)return!0;let i=oC(this,t),o=null;for(;r!=null;){if(r.once?o!==null?o.next=r.next:r.next!==null?e.set(n,r.next):e.delete(n):o=r,Ab(i,r.passive?r.listener:null),typeof r.listener=="function")try{r.listener.call(this,i)}catch(s){typeof console<"u"&&typeof console.error=="function"&&console.error(s)}else r.listenerType!==Ba&&typeof r.listener.handleEvent=="function"&&r.listener.handleEvent(i);if(sC(i))break;r=r.next}return Ab(i,null),aC(i,0),lC(i,null),!i.defaultPrevented}};Object.defineProperty(yt.prototype,"constructor",{value:yt,configurable:!0,writable:!0});typeof window<"u"&&typeof window.EventTarget<"u"&&Object.setPrototypeOf(yt.prototype,window.EventTarget.prototype);_o.defineEventAttribute=df;_o.EventTarget=yt;_o.default=yt;xo.exports=yt;xo.exports.EventTarget=xo.exports.default=yt;xo.exports.defineEventAttribute=df});var Xr=R((vo,wo)=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});var hf=Fb(),xn=class extends hf.EventTarget{constructor(){throw super(),new TypeError("AbortSignal cannot be constructed directly")}get aborted(){let e=za.get(this);if(typeof e!="boolean")throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`);return e}};hf.defineEventAttribute(xn.prototype,"abort");function cC(){let t=Object.create(xn.prototype);return hf.EventTarget.call(t),za.set(t,!1),t}function fC(t){za.get(t)===!1&&(za.set(t,!0),t.dispatchEvent({type:"abort"}))}var za=new WeakMap;Object.defineProperties(xn.prototype,{aborted:{enumerable:!0}});typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(xn.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});var _n=class{constructor(){jb.set(this,cC())}get signal(){return qb(this)}abort(){fC(qb(this))}},jb=new WeakMap;function qb(t){let e=jb.get(t);if(e==null)throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${t===null?"null":typeof t}`);return e}Object.defineProperties(_n.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}});typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(_n.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"});vo.AbortController=_n;vo.AbortSignal=xn;vo.default=_n;wo.exports=_n;wo.exports.AbortController=wo.exports.default=_n;wo.exports.AbortSignal=xn});var qe=R((U5,gf)=>{"use strict";var pC=K("buffer"),{format:dC,inspect:hC}=cf(),{codes:{ERR_INVALID_ARG_TYPE:mf}}=Oe(),{kResistStopPropagation:mC,AggregateError:gC,SymbolDispose:yC}=ue(),bC=globalThis.AbortSignal||Xr().AbortSignal,xC=globalThis.AbortController||Xr().AbortController,_C=Object.getPrototypeOf(async function(){}).constructor,Bb=globalThis.Blob||pC.Blob,wC=typeof Bb<"u"?function(e){return e instanceof Bb}:function(e){return!1},Wb=(t,e)=>{if(t!==void 0&&(t===null||typeof t!="object"||!("aborted"in t)))throw new mf(e,"AbortSignal",t)},vC=(t,e)=>{if(typeof t!="function")throw new mf(e,"Function",t)};gf.exports={AggregateError:gC,kEmptyObject:Object.freeze({}),once(t){let e=!1;return function(...n){e||(e=!0,t.apply(this,n))}},createDeferredPromise:function(){let t,e;return{promise:new Promise((r,i)=>{t=r,e=i}),resolve:t,reject:e}},promisify(t){return new Promise((e,n)=>{t((r,...i)=>r?n(r):e(...i))})},debuglog(){return function(){}},format:dC,inspect:hC,types:{isAsyncFunction(t){return t instanceof _C},isArrayBufferView(t){return ArrayBuffer.isView(t)}},isBlob:wC,deprecate(t,e){return t},addAbortListener:K("events").addAbortListener||function(e,n){if(e===void 0)throw new mf("signal","AbortSignal",e);Wb(e,"signal"),vC(n,"listener");let r;return e.aborted?queueMicrotask(()=>n()):(e.addEventListener("abort",n,{__proto__:null,once:!0,[mC]:!0}),r=()=>{e.removeEventListener("abort",n)}),{__proto__:null,[yC](){var i;(i=r)===null||i===void 0||i()}}},AbortSignalAny:bC.any||function(e){if(e.length===1)return e[0];let n=new xC,r=()=>n.abort();return e.forEach(i=>{Wb(i,"signals"),i.addEventListener("abort",r,{once:!0})}),n.signal.addEventListener("abort",()=>{e.forEach(i=>i.removeEventListener("abort",r))},{once:!0}),n.signal}};gf.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")});var ti=R(($5,Zb)=>{"use strict";var{ArrayIsArray:bf,ArrayPrototypeIncludes:Hb,ArrayPrototypeJoin:Vb,ArrayPrototypeMap:SC,NumberIsInteger:xf,NumberIsNaN:EC,NumberMAX_SAFE_INTEGER:kC,NumberMIN_SAFE_INTEGER:DC,NumberParseInt:TC,ObjectPrototypeHasOwnProperty:RC,RegExpPrototypeExec:Gb,String:AC,StringPrototypeToUpperCase:CC,StringPrototypeTrim:IC}=ue(),{hideStackFrames:st,codes:{ERR_SOCKET_BAD_PORT:OC,ERR_INVALID_ARG_TYPE:Pe,ERR_INVALID_ARG_VALUE:ei,ERR_OUT_OF_RANGE:lr,ERR_UNKNOWN_SIGNAL:zb}}=Oe(),{normalizeEncoding:PC}=qe(),{isAsyncFunction:LC,isArrayBufferView:NC}=qe().types,Ub={};function MC(t){return t===(t|0)}function FC(t){return t===t>>>0}var qC=/^[0-7]+$/,jC="must be a 32-bit unsigned integer or an octal string";function BC(t,e,n){if(typeof t>"u"&&(t=n),typeof t=="string"){if(Gb(qC,t)===null)throw new ei(e,t,jC);t=TC(t,8)}return Kb(t,e),t}var WC=st((t,e,n=DC,r=kC)=>{if(typeof t!="number")throw new Pe(e,"number",t);if(!xf(t))throw new lr(e,"an integer",t);if(t<n||t>r)throw new lr(e,`>= ${n} && <= ${r}`,t)}),zC=st((t,e,n=-2147483648,r=2147483647)=>{if(typeof t!="number")throw new Pe(e,"number",t);if(!xf(t))throw new lr(e,"an integer",t);if(t<n||t>r)throw new lr(e,`>= ${n} && <= ${r}`,t)}),Kb=st((t,e,n=!1)=>{if(typeof t!="number")throw new Pe(e,"number",t);if(!xf(t))throw new lr(e,"an integer",t);let r=n?1:0,i=4294967295;if(t<r||t>i)throw new lr(e,`>= ${r} && <= ${i}`,t)});function _f(t,e){if(typeof t!="string")throw new Pe(e,"string",t)}function UC(t,e,n=void 0,r){if(typeof t!="number")throw new Pe(e,"number",t);if(n!=null&&t<n||r!=null&&t>r||(n!=null||r!=null)&&EC(t))throw new lr(e,`${n!=null?`>= ${n}`:""}${n!=null&&r!=null?" && ":""}${r!=null?`<= ${r}`:""}`,t)}var $C=st((t,e,n)=>{if(!Hb(n,t)){let i="must be one of: "+Vb(SC(n,o=>typeof o=="string"?`'${o}'`:AC(o)),", ");throw new ei(e,t,i)}});function Yb(t,e){if(typeof t!="boolean")throw new Pe(e,"boolean",t)}function yf(t,e,n){return t==null||!RC(t,e)?n:t[e]}var HC=st((t,e,n=null)=>{let r=yf(n,"allowArray",!1),i=yf(n,"allowFunction",!1);if(!yf(n,"nullable",!1)&&t===null||!r&&bf(t)||typeof t!="object"&&(!i||typeof t!="function"))throw new Pe(e,"Object",t)}),VC=st((t,e)=>{if(t!=null&&typeof t!="object"&&typeof t!="function")throw new Pe(e,"a dictionary",t)}),Ua=st((t,e,n=0)=>{if(!bf(t))throw new Pe(e,"Array",t);if(t.length<n){let r=`must be longer than ${n}`;throw new ei(e,t,r)}});function GC(t,e){Ua(t,e);for(let n=0;n<t.length;n++)_f(t[n],`${e}[${n}]`)}function KC(t,e){Ua(t,e);for(let n=0;n<t.length;n++)Yb(t[n],`${e}[${n}]`)}function YC(t,e){Ua(t,e);for(let n=0;n<t.length;n++){let r=t[n],i=`${e}[${n}]`;if(r==null)throw new Pe(i,"AbortSignal",r);Qb(r,i)}}function QC(t,e="signal"){if(_f(t,e),Ub[t]===void 0)throw Ub[CC(t)]!==void 0?new zb(t+" (signals must use all capital letters)"):new zb(t)}var ZC=st((t,e="buffer")=>{if(!NC(t))throw new Pe(e,["Buffer","TypedArray","DataView"],t)});function JC(t,e){let n=PC(e),r=t.length;if(n==="hex"&&r%2!==0)throw new ei("encoding",e,`is invalid for data of length ${r}`)}function XC(t,e="Port",n=!0){if(typeof t!="number"&&typeof t!="string"||typeof t=="string"&&IC(t).length===0||+t!==+t>>>0||t>65535||t===0&&!n)throw new OC(e,t,n);return t|0}var Qb=st((t,e)=>{if(t!==void 0&&(t===null||typeof t!="object"||!("aborted"in t)))throw new Pe(e,"AbortSignal",t)}),eI=st((t,e)=>{if(typeof t!="function")throw new Pe(e,"Function",t)}),tI=st((t,e)=>{if(typeof t!="function"||LC(t))throw new Pe(e,"Function",t)}),nI=st((t,e)=>{if(t!==void 0)throw new Pe(e,"undefined",t)});function rI(t,e,n){if(!Hb(n,t))throw new Pe(e,`('${Vb(n,"|")}')`,t)}var iI=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function $b(t,e){if(typeof t>"u"||!Gb(iI,t))throw new ei(e,t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function oI(t){if(typeof t=="string")return $b(t,"hints"),t;if(bf(t)){let e=t.length,n="";if(e===0)return n;for(let r=0;r<e;r++){let i=t[r];$b(i,"hints"),n+=i,r!==e-1&&(n+=", ")}return n}throw new ei("hints",t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}Zb.exports={isInt32:MC,isUint32:FC,parseFileMode:BC,validateArray:Ua,validateStringArray:GC,validateBooleanArray:KC,validateAbortSignalArray:YC,validateBoolean:Yb,validateBuffer:ZC,validateDictionary:VC,validateEncoding:JC,validateFunction:eI,validateInt32:zC,validateInteger:WC,validateNumber:UC,validateObject:HC,validateOneOf:$C,validatePlainFunction:tI,validatePort:XC,validateSignalName:QC,validateString:_f,validateUint32:Kb,validateUndefined:nI,validateUnion:rI,validateAbortSignal:Qb,validateLinkHeaderValue:oI}});var wn=R((H5,Jb)=>{"use strict";Jb.exports=global.process});var Ct=R((V5,dx)=>{"use strict";var{SymbolAsyncIterator:Xb,SymbolIterator:ex,SymbolFor:ur}=ue(),tx=ur("nodejs.stream.destroyed"),nx=ur("nodejs.stream.errored"),wf=ur("nodejs.stream.readable"),vf=ur("nodejs.stream.writable"),rx=ur("nodejs.stream.disturbed"),sI=ur("nodejs.webstream.isClosedPromise"),aI=ur("nodejs.webstream.controllerErrorFunction");function $a(t,e=!1){var n;return!!(t&&typeof t.pipe=="function"&&typeof t.on=="function"&&(!e||typeof t.pause=="function"&&typeof t.resume=="function")&&(!t._writableState||((n=t._readableState)===null||n===void 0?void 0:n.readable)!==!1)&&(!t._writableState||t._readableState))}function Ha(t){var e;return!!(t&&typeof t.write=="function"&&typeof t.on=="function"&&(!t._readableState||((e=t._writableState)===null||e===void 0?void 0:e.writable)!==!1))}function lI(t){return!!(t&&typeof t.pipe=="function"&&t._readableState&&typeof t.on=="function"&&typeof t.write=="function")}function At(t){return t&&(t._readableState||t._writableState||typeof t.write=="function"&&typeof t.on=="function"||typeof t.pipe=="function"&&typeof t.on=="function")}function ix(t){return!!(t&&!At(t)&&typeof t.pipeThrough=="function"&&typeof t.getReader=="function"&&typeof t.cancel=="function")}function ox(t){return!!(t&&!At(t)&&typeof t.getWriter=="function"&&typeof t.abort=="function")}function sx(t){return!!(t&&!At(t)&&typeof t.readable=="object"&&typeof t.writable=="object")}function uI(t){return ix(t)||ox(t)||sx(t)}function cI(t,e){return t==null?!1:e===!0?typeof t[Xb]=="function":e===!1?typeof t[ex]=="function":typeof t[Xb]=="function"||typeof t[ex]=="function"}function Va(t){if(!At(t))return null;let e=t._writableState,n=t._readableState,r=e||n;return!!(t.destroyed||t[tx]||r!=null&&r.destroyed)}function ax(t){if(!Ha(t))return null;if(t.writableEnded===!0)return!0;let e=t._writableState;return e!=null&&e.errored?!1:typeof e?.ended!="boolean"?null:e.ended}function fI(t,e){if(!Ha(t))return null;if(t.writableFinished===!0)return!0;let n=t._writableState;return n!=null&&n.errored?!1:typeof n?.finished!="boolean"?null:!!(n.finished||e===!1&&n.ended===!0&&n.length===0)}function pI(t){if(!$a(t))return null;if(t.readableEnded===!0)return!0;let e=t._readableState;return!e||e.errored?!1:typeof e?.ended!="boolean"?null:e.ended}function lx(t,e){if(!$a(t))return null;let n=t._readableState;return n!=null&&n.errored?!1:typeof n?.endEmitted!="boolean"?null:!!(n.endEmitted||e===!1&&n.ended===!0&&n.length===0)}function ux(t){return t&&t[wf]!=null?t[wf]:typeof t?.readable!="boolean"?null:Va(t)?!1:$a(t)&&t.readable&&!lx(t)}function cx(t){return t&&t[vf]!=null?t[vf]:typeof t?.writable!="boolean"?null:Va(t)?!1:Ha(t)&&t.writable&&!ax(t)}function dI(t,e){return At(t)?Va(t)?!0:!(e?.readable!==!1&&ux(t)||e?.writable!==!1&&cx(t)):null}function hI(t){var e,n;return At(t)?t.writableErrored?t.writableErrored:(e=(n=t._writableState)===null||n===void 0?void 0:n.errored)!==null&&e!==void 0?e:null:null}function mI(t){var e,n;return At(t)?t.readableErrored?t.readableErrored:(e=(n=t._readableState)===null||n===void 0?void 0:n.errored)!==null&&e!==void 0?e:null:null}function gI(t){if(!At(t))return null;if(typeof t.closed=="boolean")return t.closed;let e=t._writableState,n=t._readableState;return typeof e?.closed=="boolean"||typeof n?.closed=="boolean"?e?.closed||n?.closed:typeof t._closed=="boolean"&&fx(t)?t._closed:null}function fx(t){return typeof t._closed=="boolean"&&typeof t._defaultKeepAlive=="boolean"&&typeof t._removedConnection=="boolean"&&typeof t._removedContLen=="boolean"}function px(t){return typeof t._sent100=="boolean"&&fx(t)}function yI(t){var e;return typeof t._consuming=="boolean"&&typeof t._dumped=="boolean"&&((e=t.req)===null||e===void 0?void 0:e.upgradeOrConnect)===void 0}function bI(t){if(!At(t))return null;let e=t._writableState,n=t._readableState,r=e||n;return!r&&px(t)||!!(r&&r.autoDestroy&&r.emitClose&&r.closed===!1)}function xI(t){var e;return!!(t&&((e=t[rx])!==null&&e!==void 0?e:t.readableDidRead||t.readableAborted))}function _I(t){var e,n,r,i,o,s,a,u,l,c;return!!(t&&((e=(n=(r=(i=(o=(s=t[nx])!==null&&s!==void 0?s:t.readableErrored)!==null&&o!==void 0?o:t.writableErrored)!==null&&i!==void 0?i:(a=t._readableState)===null||a===void 0?void 0:a.errorEmitted)!==null&&r!==void 0?r:(u=t._writableState)===null||u===void 0?void 0:u.errorEmitted)!==null&&n!==void 0?n:(l=t._readableState)===null||l===void 0?void 0:l.errored)!==null&&e!==void 0?e:!((c=t._writableState)===null||c===void 0)&&c.errored))}dx.exports={isDestroyed:Va,kIsDestroyed:tx,isDisturbed:xI,kIsDisturbed:rx,isErrored:_I,kIsErrored:nx,isReadable:ux,kIsReadable:wf,kIsClosedPromise:sI,kControllerErrorFunction:aI,kIsWritable:vf,isClosed:gI,isDuplexNodeStream:lI,isFinished:dI,isIterable:cI,isReadableNodeStream:$a,isReadableStream:ix,isReadableEnded:pI,isReadableFinished:lx,isReadableErrored:mI,isNodeStream:At,isWebStream:uI,isWritable:cx,isWritableNodeStream:Ha,isWritableStream:ox,isWritableEnded:ax,isWritableFinished:fI,isWritableErrored:hI,isServerRequest:yI,isServerResponse:px,willEmitClose:bI,isTransformStream:sx}});var Yt=R((G5,Tf)=>{"use strict";var vn=wn(),{AbortError:vx,codes:wI}=Oe(),{ERR_INVALID_ARG_TYPE:vI,ERR_STREAM_PREMATURE_CLOSE:hx}=wI,{kEmptyObject:Ef,once:kf}=qe(),{validateAbortSignal:SI,validateFunction:EI,validateObject:kI,validateBoolean:DI}=ti(),{Promise:TI,PromisePrototypeThen:RI,SymbolDispose:Sx}=ue(),{isClosed:AI,isReadable:mx,isReadableNodeStream:Sf,isReadableStream:CI,isReadableFinished:gx,isReadableErrored:yx,isWritable:bx,isWritableNodeStream:xx,isWritableStream:II,isWritableFinished:_x,isWritableErrored:wx,isNodeStream:OI,willEmitClose:PI,kIsClosedPromise:LI}=Ct(),ni;function NI(t){return t.setHeader&&typeof t.abort=="function"}var Df=()=>{};function Ex(t,e,n){var r,i;if(arguments.length===2?(n=e,e=Ef):e==null?e=Ef:kI(e,"options"),EI(n,"callback"),SI(e.signal,"options.signal"),n=kf(n),CI(t)||II(t))return MI(t,e,n);if(!OI(t))throw new vI("stream",["ReadableStream","WritableStream","Stream"],t);let o=(r=e.readable)!==null&&r!==void 0?r:Sf(t),s=(i=e.writable)!==null&&i!==void 0?i:xx(t),a=t._writableState,u=t._readableState,l=()=>{t.writable||p()},c=PI(t)&&Sf(t)===o&&xx(t)===s,f=_x(t,!1),p=()=>{f=!0,t.destroyed&&(c=!1),!(c&&(!t.readable||o))&&(!o||d)&&n.call(t)},d=gx(t,!1),b=()=>{d=!0,t.destroyed&&(c=!1),!(c&&(!t.writable||s))&&(!s||f)&&n.call(t)},g=T=>{n.call(t,T)},S=AI(t),y=()=>{S=!0;let T=wx(t)||yx(t);if(T&&typeof T!="boolean")return n.call(t,T);if(o&&!d&&Sf(t,!0)&&!gx(t,!1))return n.call(t,new hx);if(s&&!f&&!_x(t,!1))return n.call(t,new hx);n.call(t)},h=()=>{S=!0;let T=wx(t)||yx(t);if(T&&typeof T!="boolean")return n.call(t,T);n.call(t)},m=()=>{t.req.on("finish",p)};NI(t)?(t.on("complete",p),c||t.on("abort",y),t.req?m():t.on("request",m)):s&&!a&&(t.on("end",l),t.on("close",l)),!c&&typeof t.aborted=="boolean"&&t.on("aborted",y),t.on("end",b),t.on("finish",p),e.error!==!1&&t.on("error",g),t.on("close",y),S?vn.nextTick(y):a!=null&&a.errorEmitted||u!=null&&u.errorEmitted?c||vn.nextTick(h):(!o&&(!c||mx(t))&&(f||bx(t)===!1)||!s&&(!c||bx(t))&&(d||mx(t)===!1)||u&&t.req&&t.aborted)&&vn.nextTick(h);let w=()=>{n=Df,t.removeListener("aborted",y),t.removeListener("complete",p),t.removeListener("abort",y),t.removeListener("request",m),t.req&&t.req.removeListener("finish",p),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",p),t.removeListener("end",b),t.removeListener("error",g),t.removeListener("close",y)};if(e.signal&&!S){let T=()=>{let v=n;w(),v.call(t,new vx(void 0,{cause:e.signal.reason}))};if(e.signal.aborted)vn.nextTick(T);else{ni=ni||qe().addAbortListener;let v=ni(e.signal,T),E=n;n=kf((...L)=>{v[Sx](),E.apply(t,L)})}}return w}function MI(t,e,n){let r=!1,i=Df;if(e.signal)if(i=()=>{r=!0,n.call(t,new vx(void 0,{cause:e.signal.reason}))},e.signal.aborted)vn.nextTick(i);else{ni=ni||qe().addAbortListener;let s=ni(e.signal,i),a=n;n=kf((...u)=>{s[Sx](),a.apply(t,u)})}let o=(...s)=>{r||vn.nextTick(()=>n.apply(t,s))};return RI(t[LI].promise,o,o),Df}function FI(t,e){var n;let r=!1;return e===null&&(e=Ef),(n=e)!==null&&n!==void 0&&n.cleanup&&(DI(e.cleanup,"cleanup"),r=e.cleanup),new TI((i,o)=>{let s=Ex(t,e,a=>{r&&s(),a?o(a):i()})})}Tf.exports=Ex;Tf.exports.finished=FI});var cr=R((K5,Ox)=>{"use strict";var It=wn(),{aggregateTwoErrors:qI,codes:{ERR_MULTIPLE_CALLBACK:jI},AbortError:BI}=Oe(),{Symbol:Tx}=ue(),{kIsDestroyed:WI,isDestroyed:zI,isFinished:UI,isServerRequest:$I}=Ct(),Rx=Tx("kDestroy"),Rf=Tx("kConstruct");function Ax(t,e,n){t&&(t.stack,e&&!e.errored&&(e.errored=t),n&&!n.errored&&(n.errored=t))}function HI(t,e){let n=this._readableState,r=this._writableState,i=r||n;return r!=null&&r.destroyed||n!=null&&n.destroyed?(typeof e=="function"&&e(),this):(Ax(t,r,n),r&&(r.destroyed=!0),n&&(n.destroyed=!0),i.constructed?kx(this,t,e):this.once(Rx,function(o){kx(this,qI(o,t),e)}),this)}function kx(t,e,n){let r=!1;function i(o){if(r)return;r=!0;let s=t._readableState,a=t._writableState;Ax(o,a,s),a&&(a.closed=!0),s&&(s.closed=!0),typeof n=="function"&&n(o),o?It.nextTick(VI,t,o):It.nextTick(Cx,t)}try{t._destroy(e||null,i)}catch(o){i(o)}}function VI(t,e){Af(t,e),Cx(t)}function Cx(t){let e=t._readableState,n=t._writableState;n&&(n.closeEmitted=!0),e&&(e.closeEmitted=!0),(n!=null&&n.emitClose||e!=null&&e.emitClose)&&t.emit("close")}function Af(t,e){let n=t._readableState,r=t._writableState;r!=null&&r.errorEmitted||n!=null&&n.errorEmitted||(r&&(r.errorEmitted=!0),n&&(n.errorEmitted=!0),t.emit("error",e))}function GI(){let t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=t.readable===!1,t.endEmitted=t.readable===!1),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=e.writable===!1,e.ending=e.writable===!1,e.finished=e.writable===!1)}function Cf(t,e,n){let r=t._readableState,i=t._writableState;if(i!=null&&i.destroyed||r!=null&&r.destroyed)return this;r!=null&&r.autoDestroy||i!=null&&i.autoDestroy?t.destroy(e):e&&(e.stack,i&&!i.errored&&(i.errored=e),r&&!r.errored&&(r.errored=e),n?It.nextTick(Af,t,e):Af(t,e))}function KI(t,e){if(typeof t._construct!="function")return;let n=t._readableState,r=t._writableState;n&&(n.constructed=!1),r&&(r.constructed=!1),t.once(Rf,e),!(t.listenerCount(Rf)>1)&&It.nextTick(YI,t)}function YI(t){let e=!1;function n(r){if(e){Cf(t,r??new jI);return}e=!0;let i=t._readableState,o=t._writableState,s=o||i;i&&(i.constructed=!0),o&&(o.constructed=!0),s.destroyed?t.emit(Rx,r):r?Cf(t,r,!0):It.nextTick(QI,t)}try{t._construct(r=>{It.nextTick(n,r)})}catch(r){It.nextTick(n,r)}}function QI(t){t.emit(Rf)}function Dx(t){return t?.setHeader&&typeof t.abort=="function"}function Ix(t){t.emit("close")}function ZI(t,e){t.emit("error",e),It.nextTick(Ix,t)}function JI(t,e){!t||zI(t)||(!e&&!UI(t)&&(e=new BI),$I(t)?(t.socket=null,t.destroy(e)):Dx(t)?t.abort():Dx(t.req)?t.req.abort():typeof t.destroy=="function"?t.destroy(e):typeof t.close=="function"?t.close():e?It.nextTick(ZI,t,e):It.nextTick(Ix,t),t.destroyed||(t[WI]=!0))}Ox.exports={construct:KI,destroyer:JI,destroy:HI,undestroy:GI,errorOrDestroy:Cf}});var Ya=R((Y5,Lx)=>{"use strict";var{ArrayIsArray:XI,ObjectSetPrototypeOf:Px}=ue(),{EventEmitter:Ga}=K("events");function Ka(t){Ga.call(this,t)}Px(Ka.prototype,Ga.prototype);Px(Ka,Ga);Ka.prototype.pipe=function(t,e){let n=this;function r(c){t.writable&&t.write(c)===!1&&n.pause&&n.pause()}n.on("data",r);function i(){n.readable&&n.resume&&n.resume()}t.on("drain",i),!t._isStdio&&(!e||e.end!==!1)&&(n.on("end",s),n.on("close",a));let o=!1;function s(){o||(o=!0,t.end())}function a(){o||(o=!0,typeof t.destroy=="function"&&t.destroy())}function u(c){l(),Ga.listenerCount(this,"error")===0&&this.emit("error",c)}If(n,"error",u),If(t,"error",u);function l(){n.removeListener("data",r),t.removeListener("drain",i),n.removeListener("end",s),n.removeListener("close",a),n.removeListener("error",u),t.removeListener("error",u),n.removeListener("end",l),n.removeListener("close",l),t.removeListener("close",l)}return n.on("end",l),n.on("close",l),t.on("close",l),t.emit("pipe",n),t};function If(t,e,n){if(typeof t.prependListener=="function")return t.prependListener(e,n);!t._events||!t._events[e]?t.on(e,n):XI(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]}Lx.exports={Stream:Ka,prependListener:If}});var So=R((Q5,Qa)=>{"use strict";var{SymbolDispose:eO}=ue(),{AbortError:Nx,codes:tO}=Oe(),{isNodeStream:Mx,isWebStream:nO,kControllerErrorFunction:rO}=Ct(),iO=Yt(),{ERR_INVALID_ARG_TYPE:Fx}=tO,Of,oO=(t,e)=>{if(typeof t!="object"||!("aborted"in t))throw new Fx(e,"AbortSignal",t)};Qa.exports.addAbortSignal=function(e,n){if(oO(e,"signal"),!Mx(n)&&!nO(n))throw new Fx("stream",["ReadableStream","WritableStream","Stream"],n);return Qa.exports.addAbortSignalNoValidate(e,n)};Qa.exports.addAbortSignalNoValidate=function(t,e){if(typeof t!="object"||!("aborted"in t))return e;let n=Mx(e)?()=>{e.destroy(new Nx(void 0,{cause:t.reason}))}:()=>{e[rO](new Nx(void 0,{cause:t.reason}))};if(t.aborted)n();else{Of=Of||qe().addAbortListener;let r=Of(t,n);iO(e,r[eO])}return e}});var Bx=R((J5,jx)=>{"use strict";var{StringPrototypeSlice:qx,SymbolIterator:sO,TypedArrayPrototypeSet:Za,Uint8Array:aO}=ue(),{Buffer:Pf}=K("buffer"),{inspect:lO}=qe();jx.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){let n={data:e,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}unshift(e){let n={data:e,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}shift(){if(this.length===0)return;let e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(this.length===0)return"";let n=this.head,r=""+n.data;for(;(n=n.next)!==null;)r+=e+n.data;return r}concat(e){if(this.length===0)return Pf.alloc(0);let n=Pf.allocUnsafe(e>>>0),r=this.head,i=0;for(;r;)Za(n,r.data,i),i+=r.data.length,r=r.next;return n}consume(e,n){let r=this.head.data;if(e<r.length){let i=r.slice(0,e);return this.head.data=r.slice(e),i}return e===r.length?this.shift():n?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[sO](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let n="",r=this.head,i=0;do{let o=r.data;if(e>o.length)n+=o,e-=o.length;else{e===o.length?(n+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(n+=qx(o,0,e),this.head=r,r.data=qx(o,e));break}++i}while((r=r.next)!==null);return this.length-=i,n}_getBuffer(e){let n=Pf.allocUnsafe(e),r=e,i=this.head,o=0;do{let s=i.data;if(e>s.length)Za(n,s,r-e),e-=s.length;else{e===s.length?(Za(n,s,r-e),++o,i.next?this.head=i.next:this.head=this.tail=null):(Za(n,new aO(s.buffer,s.byteOffset,e),r-e),this.head=i,i.data=s.slice(e));break}++o}while((i=i.next)!==null);return this.length-=o,n}[Symbol.for("nodejs.util.inspect.custom")](e,n){return lO(this,{...n,depth:0,customInspect:!1})}}});var Eo=R((X5,$x)=>{"use strict";var{MathFloor:uO,NumberIsInteger:cO}=ue(),{validateInteger:fO}=ti(),{ERR_INVALID_ARG_VALUE:pO}=Oe().codes,Wx=16*1024,zx=16;function dO(t,e,n){return t.highWaterMark!=null?t.highWaterMark:e?t[n]:null}function Ux(t){return t?zx:Wx}function hO(t,e){fO(e,"value",0),t?zx=e:Wx=e}function mO(t,e,n,r){let i=dO(e,r,n);if(i!=null){if(!cO(i)||i<0){let o=r?`options.${n}`:"options.highWaterMark";throw new pO(o,i)}return uO(i)}return Ux(t.objectMode)}$x.exports={getHighWaterMark:mO,getDefaultHighWaterMark:Ux,setDefaultHighWaterMark:hO}});var Lf=R((eH,Kx)=>{"use strict";var Hx=wn(),{PromisePrototypeThen:gO,SymbolAsyncIterator:Vx,SymbolIterator:Gx}=ue(),{Buffer:yO}=K("buffer"),{ERR_INVALID_ARG_TYPE:bO,ERR_STREAM_NULL_VALUES:xO}=Oe().codes;function _O(t,e,n){let r;if(typeof e=="string"||e instanceof yO)return new t({objectMode:!0,...n,read(){this.push(e),this.push(null)}});let i;if(e&&e[Vx])i=!0,r=e[Vx]();else if(e&&e[Gx])i=!1,r=e[Gx]();else throw new bO("iterable",["Iterable"],e);let o=new t({objectMode:!0,highWaterMark:1,...n}),s=!1;o._read=function(){s||(s=!0,u())},o._destroy=function(l,c){gO(a(l),()=>Hx.nextTick(c,l),f=>Hx.nextTick(c,f||l))};async function a(l){let c=l!=null,f=typeof r.throw=="function";if(c&&f){let{value:p,done:d}=await r.throw(l);if(await p,d)return}if(typeof r.return=="function"){let{value:p}=await r.return();await p}}async function u(){for(;;){try{let{value:l,done:c}=i?await r.next():r.next();if(c)o.push(null);else{let f=l&&typeof l.then=="function"?await l:l;if(f===null)throw s=!1,new xO;if(o.push(f))continue;s=!1}}catch(l){o.destroy(l)}break}}return o}Kx.exports=_O});var Do=R((tH,p_)=>{"use strict";var bt=wn(),{ArrayPrototypeIndexOf:wO,NumberIsInteger:vO,NumberIsNaN:SO,NumberParseInt:EO,ObjectDefineProperties:zf,ObjectKeys:kO,ObjectSetPrototypeOf:Zx,Promise:Jx,SafeSet:DO,SymbolAsyncDispose:TO,SymbolAsyncIterator:RO,Symbol:AO}=ue();p_.exports=W;W.ReadableState=tl;var{EventEmitter:CO}=K("events"),{Stream:Sn,prependListener:IO}=Ya(),{Buffer:Nf}=K("buffer"),{addAbortSignal:OO}=So(),Xx=Yt(),V=qe().debuglog("stream",t=>{V=t}),PO=Bx(),oi=cr(),{getHighWaterMark:LO,getDefaultHighWaterMark:NO}=Eo(),{aggregateTwoErrors:Yx,codes:{ERR_INVALID_ARG_TYPE:MO,ERR_METHOD_NOT_IMPLEMENTED:FO,ERR_OUT_OF_RANGE:qO,ERR_STREAM_PUSH_AFTER_EOF:jO,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:BO},AbortError:WO}=Oe(),{validateObject:zO}=ti(),fr=AO("kPaused"),{StringDecoder:e_}=K("string_decoder"),UO=Lf();Zx(W.prototype,Sn.prototype);Zx(W,Sn);var Mf=()=>{},{errorOrDestroy:ri}=oi,ii=1,$O=2,t_=4,ko=8,n_=16,Ja=32,Xa=64,r_=128,HO=256,VO=512,GO=1024,Bf=2048,Wf=4096,KO=8192,YO=16384,QO=32768,i_=65536,ZO=1<<17,JO=1<<18;function we(t){return{enumerable:!1,get(){return(this.state&t)!==0},set(e){e?this.state|=t:this.state&=~t}}}zf(tl.prototype,{objectMode:we(ii),ended:we($O),endEmitted:we(t_),reading:we(ko),constructed:we(n_),sync:we(Ja),needReadable:we(Xa),emittedReadable:we(r_),readableListening:we(HO),resumeScheduled:we(VO),errorEmitted:we(GO),emitClose:we(Bf),autoDestroy:we(Wf),destroyed:we(KO),closed:we(YO),closeEmitted:we(QO),multiAwaitDrain:we(i_),readingMore:we(ZO),dataEmitted:we(JO)});function tl(t,e,n){typeof n!="boolean"&&(n=e instanceof Ot()),this.state=Bf|Wf|n_|Ja,t&&t.objectMode&&(this.state|=ii),n&&t&&t.readableObjectMode&&(this.state|=ii),this.highWaterMark=t?LO(this,t,"readableHighWaterMark",n):NO(!1),this.buffer=new PO,this.length=0,this.pipes=[],this.flowing=null,this[fr]=null,t&&t.emitClose===!1&&(this.state&=~Bf),t&&t.autoDestroy===!1&&(this.state&=~Wf),this.errored=null,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new e_(t.encoding),this.encoding=t.encoding)}function W(t){if(!(this instanceof W))return new W(t);let e=this instanceof Ot();this._readableState=new tl(t,this,e),t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.construct=="function"&&(this._construct=t.construct),t.signal&&!e&&OO(t.signal,this)),Sn.call(this,t),oi.construct(this,()=>{this._readableState.needReadable&&el(this,this._readableState)})}W.prototype.destroy=oi.destroy;W.prototype._undestroy=oi.undestroy;W.prototype._destroy=function(t,e){e(t)};W.prototype[CO.captureRejectionSymbol]=function(t){this.destroy(t)};W.prototype[TO]=function(){let t;return this.destroyed||(t=this.readableEnded?null:new WO,this.destroy(t)),new Jx((e,n)=>Xx(this,r=>r&&r!==t?n(r):e(null)))};W.prototype.push=function(t,e){return o_(this,t,e,!1)};W.prototype.unshift=function(t,e){return o_(this,t,e,!0)};function o_(t,e,n,r){V("readableAddChunk",e);let i=t._readableState,o;if((i.state&ii)===0&&(typeof e=="string"?(n=n||i.defaultEncoding,i.encoding!==n&&(r&&i.encoding?e=Nf.from(e,n).toString(i.encoding):(e=Nf.from(e,n),n=""))):e instanceof Nf?n="":Sn._isUint8Array(e)?(e=Sn._uint8ArrayToBuffer(e),n=""):e!=null&&(o=new MO("chunk",["string","Buffer","Uint8Array"],e))),o)ri(t,o);else if(e===null)i.state&=~ko,tP(t,i);else if((i.state&ii)!==0||e&&e.length>0)if(r)if((i.state&t_)!==0)ri(t,new BO);else{if(i.destroyed||i.errored)return!1;Ff(t,i,e,!0)}else if(i.ended)ri(t,new jO);else{if(i.destroyed||i.errored)return!1;i.state&=~ko,i.decoder&&!n?(e=i.decoder.write(e),i.objectMode||e.length!==0?Ff(t,i,e,!1):el(t,i)):Ff(t,i,e,!1)}else r||(i.state&=~ko,el(t,i));return!i.ended&&(i.length<i.highWaterMark||i.length===0)}function Ff(t,e,n,r){e.flowing&&e.length===0&&!e.sync&&t.listenerCount("data")>0?((e.state&i_)!==0?e.awaitDrainWriters.clear():e.awaitDrainWriters=null,e.dataEmitted=!0,t.emit("data",n)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),(e.state&Xa)!==0&&nl(t)),el(t,e)}W.prototype.isPaused=function(){let t=this._readableState;return t[fr]===!0||t.flowing===!1};W.prototype.setEncoding=function(t){let e=new e_(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;let n=this._readableState.buffer,r="";for(let i of n)r+=e.write(i);return n.clear(),r!==""&&n.push(r),this._readableState.length=r.length,this};var XO=1073741824;function eP(t){if(t>XO)throw new qO("size","<= 1GiB",t);return t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++,t}function Qx(t,e){return t<=0||e.length===0&&e.ended?0:(e.state&ii)!==0?1:SO(t)?e.flowing&&e.length?e.buffer.first().length:e.length:t<=e.length?t:e.ended?e.length:0}W.prototype.read=function(t){V("read",t),t===void 0?t=NaN:vO(t)||(t=EO(t,10));let e=this._readableState,n=t;if(t>e.highWaterMark&&(e.highWaterMark=eP(t)),t!==0&&(e.state&=~r_),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return V("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?qf(this):nl(this),null;if(t=Qx(t,e),t===0&&e.ended)return e.length===0&&qf(this),null;let r=(e.state&Xa)!==0;if(V("need readable",r),(e.length===0||e.length-t<e.highWaterMark)&&(r=!0,V("length less than watermark",r)),e.ended||e.reading||e.destroyed||e.errored||!e.constructed)r=!1,V("reading, ended or constructing",r);else if(r){V("do read"),e.state|=ko|Ja,e.length===0&&(e.state|=Xa);try{this._read(e.highWaterMark)}catch(o){ri(this,o)}e.state&=~Ja,e.reading||(t=Qx(n,e))}let i;return t>0?i=c_(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null),e.length===0&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&qf(this)),i!==null&&!e.errorEmitted&&!e.closeEmitted&&(e.dataEmitted=!0,this.emit("data",i)),i};function tP(t,e){if(V("onEofChunk"),!e.ended){if(e.decoder){let n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,e.sync?nl(t):(e.needReadable=!1,e.emittedReadable=!0,s_(t))}}function nl(t){let e=t._readableState;V("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(V("emitReadable",e.flowing),e.emittedReadable=!0,bt.nextTick(s_,t))}function s_(t){let e=t._readableState;V("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&!e.errored&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,l_(t)}function el(t,e){!e.readingMore&&e.constructed&&(e.readingMore=!0,bt.nextTick(nP,t,e))}function nP(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){let n=e.length;if(V("maybeReadMore read 0"),t.read(0),n===e.length)break}e.readingMore=!1}W.prototype._read=function(t){throw new FO("_read()")};W.prototype.pipe=function(t,e){let n=this,r=this._readableState;r.pipes.length===1&&(r.multiAwaitDrain||(r.multiAwaitDrain=!0,r.awaitDrainWriters=new DO(r.awaitDrainWriters?[r.awaitDrainWriters]:[]))),r.pipes.push(t),V("pipe count=%d opts=%j",r.pipes.length,e);let o=(!e||e.end!==!1)&&t!==bt.stdout&&t!==bt.stderr?a:S;r.endEmitted?bt.nextTick(o):n.once("end",o),t.on("unpipe",s);function s(y,h){V("onunpipe"),y===n&&h&&h.hasUnpiped===!1&&(h.hasUnpiped=!0,c())}function a(){V("onend"),t.end()}let u,l=!1;function c(){V("cleanup"),t.removeListener("close",b),t.removeListener("finish",g),u&&t.removeListener("drain",u),t.removeListener("error",d),t.removeListener("unpipe",s),n.removeListener("end",a),n.removeListener("end",S),n.removeListener("data",p),l=!0,u&&r.awaitDrainWriters&&(!t._writableState||t._writableState.needDrain)&&u()}function f(){l||(r.pipes.length===1&&r.pipes[0]===t?(V("false write response, pause",0),r.awaitDrainWriters=t,r.multiAwaitDrain=!1):r.pipes.length>1&&r.pipes.includes(t)&&(V("false write response, pause",r.awaitDrainWriters.size),r.awaitDrainWriters.add(t)),n.pause()),u||(u=rP(n,t),t.on("drain",u))}n.on("data",p);function p(y){V("ondata");let h=t.write(y);V("dest.write",h),h===!1&&f()}function d(y){if(V("onerror",y),S(),t.removeListener("error",d),t.listenerCount("error")===0){let h=t._writableState||t._readableState;h&&!h.errorEmitted?ri(t,y):t.emit("error",y)}}IO(t,"error",d);function b(){t.removeListener("finish",g),S()}t.once("close",b);function g(){V("onfinish"),t.removeListener("close",b),S()}t.once("finish",g);function S(){V("unpipe"),n.unpipe(t)}return t.emit("pipe",n),t.writableNeedDrain===!0?f():r.flowing||(V("pipe resume"),n.resume()),t};function rP(t,e){return function(){let r=t._readableState;r.awaitDrainWriters===e?(V("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(V("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(e)),(!r.awaitDrainWriters||r.awaitDrainWriters.size===0)&&t.listenerCount("data")&&t.resume()}}W.prototype.unpipe=function(t){let e=this._readableState,n={hasUnpiped:!1};if(e.pipes.length===0)return this;if(!t){let i=e.pipes;e.pipes=[],this.pause();for(let o=0;o<i.length;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}let r=wO(e.pipes,t);return r===-1?this:(e.pipes.splice(r,1),e.pipes.length===0&&this.pause(),t.emit("unpipe",this,n),this)};W.prototype.on=function(t,e){let n=Sn.prototype.on.call(this,t,e),r=this._readableState;return t==="data"?(r.readableListening=this.listenerCount("readable")>0,r.flowing!==!1&&this.resume()):t==="readable"&&!r.endEmitted&&!r.readableListening&&(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,V("on readable",r.length,r.reading),r.length?nl(this):r.reading||bt.nextTick(iP,this)),n};W.prototype.addListener=W.prototype.on;W.prototype.removeListener=function(t,e){let n=Sn.prototype.removeListener.call(this,t,e);return t==="readable"&&bt.nextTick(a_,this),n};W.prototype.off=W.prototype.removeListener;W.prototype.removeAllListeners=function(t){let e=Sn.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&bt.nextTick(a_,this),e};function a_(t){let e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&e[fr]===!1?e.flowing=!0:t.listenerCount("data")>0?t.resume():e.readableListening||(e.flowing=null)}function iP(t){V("readable nexttick read 0"),t.read(0)}W.prototype.resume=function(){let t=this._readableState;return t.flowing||(V("resume"),t.flowing=!t.readableListening,oP(this,t)),t[fr]=!1,this};function oP(t,e){e.resumeScheduled||(e.resumeScheduled=!0,bt.nextTick(sP,t,e))}function sP(t,e){V("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),l_(t),e.flowing&&!e.reading&&t.read(0)}W.prototype.pause=function(){return V("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(V("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[fr]=!0,this};function l_(t){let e=t._readableState;for(V("flow",e.flowing);e.flowing&&t.read()!==null;);}W.prototype.wrap=function(t){let e=!1;t.on("data",r=>{!this.push(r)&&t.pause&&(e=!0,t.pause())}),t.on("end",()=>{this.push(null)}),t.on("error",r=>{ri(this,r)}),t.on("close",()=>{this.destroy()}),t.on("destroy",()=>{this.destroy()}),this._read=()=>{e&&t.resume&&(e=!1,t.resume())};let n=kO(t);for(let r=1;r<n.length;r++){let i=n[r];this[i]===void 0&&typeof t[i]=="function"&&(this[i]=t[i].bind(t))}return this};W.prototype[RO]=function(){return u_(this)};W.prototype.iterator=function(t){return t!==void 0&&zO(t,"options"),u_(this,t)};function u_(t,e){typeof t.read!="function"&&(t=W.wrap(t,{objectMode:!0}));let n=aP(t,e);return n.stream=t,n}async function*aP(t,e){let n=Mf;function r(s){this===t?(n(),n=Mf):n=s}t.on("readable",r);let i,o=Xx(t,{writable:!1},s=>{i=s?Yx(i,s):null,n(),n=Mf});try{for(;;){let s=t.destroyed?null:t.read();if(s!==null)yield s;else{if(i)throw i;if(i===null)return;await new Jx(r)}}}catch(s){throw i=Yx(i,s),i}finally{(i||e?.destroyOnReturn!==!1)&&(i===void 0||t._readableState.autoDestroy)?oi.destroyer(t,null):(t.off("readable",r),o())}}zf(W.prototype,{readable:{__proto__:null,get(){let t=this._readableState;return!!t&&t.readable!==!1&&!t.destroyed&&!t.errorEmitted&&!t.endEmitted},set(t){this._readableState&&(this._readableState.readable=!!t)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(t){this._readableState&&(this._readableState.destroyed=t)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}});zf(tl.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[fr]!==!1},set(t){this[fr]=!!t}}});W._fromList=c_;function c_(t,e){if(e.length===0)return null;let n;return e.objectMode?n=e.buffer.shift():!t||t>=e.length?(e.decoder?n=e.buffer.join(""):e.buffer.length===1?n=e.buffer.first():n=e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n}function qf(t){let e=t._readableState;V("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,bt.nextTick(lP,e,t))}function lP(t,e){if(V("endReadableNT",t.endEmitted,t.length),!t.errored&&!t.closeEmitted&&!t.endEmitted&&t.length===0){if(t.endEmitted=!0,e.emit("end"),e.writable&&e.allowHalfOpen===!1)bt.nextTick(uP,e);else if(t.autoDestroy){let n=e._writableState;(!n||n.autoDestroy&&(n.finished||n.writable===!1))&&e.destroy()}}}function uP(t){t.writable&&!t.writableEnded&&!t.destroyed&&t.end()}W.from=function(t,e){return UO(W,t,e)};var jf;function f_(){return jf===void 0&&(jf={}),jf}W.fromWeb=function(t,e){return f_().newStreamReadableFromReadableStream(t,e)};W.toWeb=function(t,e){return f_().newReadableStreamFromStreamReadable(t,e)};W.wrap=function(t,e){var n,r;return new W({objectMode:(n=(r=t.readableObjectMode)!==null&&r!==void 0?r:t.objectMode)!==null&&n!==void 0?n:!0,...e,destroy(i,o){oi.destroyer(t,i),o(i)}}).wrap(t)}});var al=R((nH,E_)=>{"use strict";var pr=wn(),{ArrayPrototypeSlice:m_,Error:cP,FunctionPrototypeSymbolHasInstance:g_,ObjectDefineProperty:y_,ObjectDefineProperties:fP,ObjectSetPrototypeOf:b_,StringPrototypeToLowerCase:pP,Symbol:dP,SymbolHasInstance:hP}=ue();E_.exports=ce;ce.WritableState=Ao;var{EventEmitter:mP}=K("events"),To=Ya().Stream,{Buffer:rl}=K("buffer"),sl=cr(),{addAbortSignal:gP}=So(),{getHighWaterMark:yP,getDefaultHighWaterMark:bP}=Eo(),{ERR_INVALID_ARG_TYPE:xP,ERR_METHOD_NOT_IMPLEMENTED:_P,ERR_MULTIPLE_CALLBACK:x_,ERR_STREAM_CANNOT_PIPE:wP,ERR_STREAM_DESTROYED:Ro,ERR_STREAM_ALREADY_FINISHED:vP,ERR_STREAM_NULL_VALUES:SP,ERR_STREAM_WRITE_AFTER_END:EP,ERR_UNKNOWN_ENCODING:__}=Oe().codes,{errorOrDestroy:si}=sl;b_(ce.prototype,To.prototype);b_(ce,To);function Hf(){}var ai=dP("kOnFinished");function Ao(t,e,n){typeof n!="boolean"&&(n=e instanceof Ot()),this.objectMode=!!(t&&t.objectMode),n&&(this.objectMode=this.objectMode||!!(t&&t.writableObjectMode)),this.highWaterMark=t?yP(this,t,"writableHighWaterMark",n):bP(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let r=!!(t&&t.decodeStrings===!1);this.decodeStrings=!r,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=DP.bind(void 0,e),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,ol(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||t.emitClose!==!1,this.autoDestroy=!t||t.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[ai]=[]}function ol(t){t.buffered=[],t.bufferedIndex=0,t.allBuffers=!0,t.allNoop=!0}Ao.prototype.getBuffer=function(){return m_(this.buffered,this.bufferedIndex)};y_(Ao.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function ce(t){let e=this instanceof Ot();if(!e&&!g_(ce,this))return new ce(t);this._writableState=new Ao(t,this,e),t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final),typeof t.construct=="function"&&(this._construct=t.construct),t.signal&&gP(t.signal,this)),To.call(this,t),sl.construct(this,()=>{let n=this._writableState;n.writing||Gf(this,n),Kf(this,n)})}y_(ce,hP,{__proto__:null,value:function(t){return g_(this,t)?!0:this!==ce?!1:t&&t._writableState instanceof Ao}});ce.prototype.pipe=function(){si(this,new wP)};function w_(t,e,n,r){let i=t._writableState;if(typeof n=="function")r=n,n=i.defaultEncoding;else{if(!n)n=i.defaultEncoding;else if(n!=="buffer"&&!rl.isEncoding(n))throw new __(n);typeof r!="function"&&(r=Hf)}if(e===null)throw new SP;if(!i.objectMode)if(typeof e=="string")i.decodeStrings!==!1&&(e=rl.from(e,n),n="buffer");else if(e instanceof rl)n="buffer";else if(To._isUint8Array(e))e=To._uint8ArrayToBuffer(e),n="buffer";else throw new xP("chunk",["string","Buffer","Uint8Array"],e);let o;return i.ending?o=new EP:i.destroyed&&(o=new Ro("write")),o?(pr.nextTick(r,o),si(t,o,!0),o):(i.pendingcb++,kP(t,i,e,n,r))}ce.prototype.write=function(t,e,n){return w_(this,t,e,n)===!0};ce.prototype.cork=function(){this._writableState.corked++};ce.prototype.uncork=function(){let t=this._writableState;t.corked&&(t.corked--,t.writing||Gf(this,t))};ce.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=pP(e)),!rl.isEncoding(e))throw new __(e);return this._writableState.defaultEncoding=e,this};function kP(t,e,n,r,i){let o=e.objectMode?1:n.length;e.length+=o;let s=e.length<e.highWaterMark;return s||(e.needDrain=!0),e.writing||e.corked||e.errored||!e.constructed?(e.buffered.push({chunk:n,encoding:r,callback:i}),e.allBuffers&&r!=="buffer"&&(e.allBuffers=!1),e.allNoop&&i!==Hf&&(e.allNoop=!1)):(e.writelen=o,e.writecb=i,e.writing=!0,e.sync=!0,t._write(n,r,e.onwrite),e.sync=!1),s&&!e.errored&&!e.destroyed}function d_(t,e,n,r,i,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Ro("write")):n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function h_(t,e,n,r){--e.pendingcb,r(n),Vf(e),si(t,n)}function DP(t,e){let n=t._writableState,r=n.sync,i=n.writecb;if(typeof i!="function"){si(t,new x_);return}n.writing=!1,n.writecb=null,n.length-=n.writelen,n.writelen=0,e?(e.stack,n.errored||(n.errored=e),t._readableState&&!t._readableState.errored&&(t._readableState.errored=e),r?pr.nextTick(h_,t,n,e,i):h_(t,n,e,i)):(n.buffered.length>n.bufferedIndex&&Gf(t,n),r?n.afterWriteTickInfo!==null&&n.afterWriteTickInfo.cb===i?n.afterWriteTickInfo.count++:(n.afterWriteTickInfo={count:1,cb:i,stream:t,state:n},pr.nextTick(TP,n.afterWriteTickInfo)):v_(t,n,1,i))}function TP({stream:t,state:e,count:n,cb:r}){return e.afterWriteTickInfo=null,v_(t,e,n,r)}function v_(t,e,n,r){for(!e.ending&&!t.destroyed&&e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"));n-- >0;)e.pendingcb--,r();e.destroyed&&Vf(e),Kf(t,e)}function Vf(t){if(t.writing)return;for(let i=t.bufferedIndex;i<t.buffered.length;++i){var e;let{chunk:o,callback:s}=t.buffered[i],a=t.objectMode?1:o.length;t.length-=a,s((e=t.errored)!==null&&e!==void 0?e:new Ro("write"))}let n=t[ai].splice(0);for(let i=0;i<n.length;i++){var r;n[i]((r=t.errored)!==null&&r!==void 0?r:new Ro("end"))}ol(t)}function Gf(t,e){if(e.corked||e.bufferProcessing||e.destroyed||!e.constructed)return;let{buffered:n,bufferedIndex:r,objectMode:i}=e,o=n.length-r;if(!o)return;let s=r;if(e.bufferProcessing=!0,o>1&&t._writev){e.pendingcb-=o-1;let a=e.allNoop?Hf:l=>{for(let c=s;c<n.length;++c)n[c].callback(l)},u=e.allNoop&&s===0?n:m_(n,s);u.allBuffers=e.allBuffers,d_(t,e,!0,e.length,u,"",a),ol(e)}else{do{let{chunk:a,encoding:u,callback:l}=n[s];n[s++]=null;let c=i?1:a.length;d_(t,e,!1,c,a,u,l)}while(s<n.length&&!e.writing);s===n.length?ol(e):s>256?(n.splice(0,s),e.bufferedIndex=0):e.bufferedIndex=s}e.bufferProcessing=!1}ce.prototype._write=function(t,e,n){if(this._writev)this._writev([{chunk:t,encoding:e}],n);else throw new _P("_write()")};ce.prototype._writev=null;ce.prototype.end=function(t,e,n){let r=this._writableState;typeof t=="function"?(n=t,t=null,e=null):typeof e=="function"&&(n=e,e=null);let i;if(t!=null){let o=w_(this,t,e);o instanceof cP&&(i=o)}return r.corked&&(r.corked=1,this.uncork()),i||(!r.errored&&!r.ending?(r.ending=!0,Kf(this,r,!0),r.ended=!0):r.finished?i=new vP("end"):r.destroyed&&(i=new Ro("end"))),typeof n=="function"&&(i||r.finished?pr.nextTick(n,i):r[ai].push(n)),this};function il(t){return t.ending&&!t.destroyed&&t.constructed&&t.length===0&&!t.errored&&t.buffered.length===0&&!t.finished&&!t.writing&&!t.errorEmitted&&!t.closeEmitted}function RP(t,e){let n=!1;function r(i){if(n){si(t,i??x_());return}if(n=!0,e.pendingcb--,i){let o=e[ai].splice(0);for(let s=0;s<o.length;s++)o[s](i);si(t,i,e.sync)}else il(e)&&(e.prefinished=!0,t.emit("prefinish"),e.pendingcb++,pr.nextTick($f,t,e))}e.sync=!0,e.pendingcb++;try{t._final(r)}catch(i){r(i)}e.sync=!1}function AP(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.finalCalled=!0,RP(t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Kf(t,e,n){il(e)&&(AP(t,e),e.pendingcb===0&&(n?(e.pendingcb++,pr.nextTick((r,i)=>{il(i)?$f(r,i):i.pendingcb--},t,e)):il(e)&&(e.pendingcb++,$f(t,e))))}function $f(t,e){e.pendingcb--,e.finished=!0;let n=e[ai].splice(0);for(let r=0;r<n.length;r++)n[r]();if(t.emit("finish"),e.autoDestroy){let r=t._readableState;(!r||r.autoDestroy&&(r.endEmitted||r.readable===!1))&&t.destroy()}}fP(ce.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(t){this._writableState&&(this._writableState.destroyed=t)}},writable:{__proto__:null,get(){let t=this._writableState;return!!t&&t.writable!==!1&&!t.destroyed&&!t.errored&&!t.ending&&!t.ended},set(t){this._writableState&&(this._writableState.writable=!!t)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let t=this._writableState;return t?!t.destroyed&&!t.ending&&t.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var CP=sl.destroy;ce.prototype.destroy=function(t,e){let n=this._writableState;return!n.destroyed&&(n.bufferedIndex<n.buffered.length||n[ai].length)&&pr.nextTick(Vf,n),CP.call(this,t,e),this};ce.prototype._undestroy=sl.undestroy;ce.prototype._destroy=function(t,e){e(t)};ce.prototype[mP.captureRejectionSymbol]=function(t){this.destroy(t)};var Uf;function S_(){return Uf===void 0&&(Uf={}),Uf}ce.fromWeb=function(t,e){return S_().newStreamWritableFromWritableStream(t,e)};ce.toWeb=function(t){return S_().newWritableStreamFromStreamWritable(t)}});var j_=R((rH,q_)=>{"use strict";var Yf=wn(),IP=K("buffer"),{isReadable:OP,isWritable:PP,isIterable:k_,isNodeStream:LP,isReadableNodeStream:D_,isWritableNodeStream:T_,isDuplexNodeStream:NP,isReadableStream:R_,isWritableStream:A_}=Ct(),C_=Yt(),{AbortError:M_,codes:{ERR_INVALID_ARG_TYPE:MP,ERR_INVALID_RETURN_VALUE:I_}}=Oe(),{destroyer:ui}=cr(),FP=Ot(),F_=Do(),qP=al(),{createDeferredPromise:O_}=qe(),P_=Lf(),L_=globalThis.Blob||IP.Blob,jP=typeof L_<"u"?function(e){return e instanceof L_}:function(e){return!1},BP=globalThis.AbortController||Xr().AbortController,{FunctionPrototypeCall:N_}=ue(),En=class extends FP{constructor(e){super(e),e?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),e?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};q_.exports=function t(e,n){if(NP(e))return e;if(D_(e))return li({readable:e});if(T_(e))return li({writable:e});if(LP(e))return li({writable:!1,readable:!1});if(R_(e))return li({readable:F_.fromWeb(e)});if(A_(e))return li({writable:qP.fromWeb(e)});if(typeof e=="function"){let{value:i,write:o,final:s,destroy:a}=WP(e);if(k_(i))return P_(En,i,{objectMode:!0,write:o,final:s,destroy:a});let u=i?.then;if(typeof u=="function"){let l,c=N_(u,i,f=>{if(f!=null)throw new I_("nully","body",f)},f=>{ui(l,f)});return l=new En({objectMode:!0,readable:!1,write:o,final(f){s(async()=>{try{await c,Yf.nextTick(f,null)}catch(p){Yf.nextTick(f,p)}})},destroy:a})}throw new I_("Iterable, AsyncIterable or AsyncFunction",n,i)}if(jP(e))return t(e.arrayBuffer());if(k_(e))return P_(En,e,{objectMode:!0,writable:!1});if(R_(e?.readable)&&A_(e?.writable))return En.fromWeb(e);if(typeof e?.writable=="object"||typeof e?.readable=="object"){let i=e!=null&&e.readable?D_(e?.readable)?e?.readable:t(e.readable):void 0,o=e!=null&&e.writable?T_(e?.writable)?e?.writable:t(e.writable):void 0;return li({readable:i,writable:o})}let r=e?.then;if(typeof r=="function"){let i;return N_(r,e,o=>{o!=null&&i.push(o),i.push(null)},o=>{ui(i,o)}),i=new En({objectMode:!0,writable:!1,read(){}})}throw new MP(n,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],e)};function WP(t){let{promise:e,resolve:n}=O_(),r=new BP,i=r.signal;return{value:t((async function*(){for(;;){let s=e;e=null;let{chunk:a,done:u,cb:l}=await s;if(Yf.nextTick(l),u)return;if(i.aborted)throw new M_(void 0,{cause:i.reason});({promise:e,resolve:n}=O_()),yield a}})(),{signal:i}),write(s,a,u){let l=n;n=null,l({chunk:s,done:!1,cb:u})},final(s){let a=n;n=null,a({done:!0,cb:s})},destroy(s,a){r.abort(),a(s)}}}function li(t){let e=t.readable&&typeof t.readable.read!="function"?F_.wrap(t.readable):t.readable,n=t.writable,r=!!OP(e),i=!!PP(n),o,s,a,u,l;function c(f){let p=u;u=null,p?p(f):f&&l.destroy(f)}return l=new En({readableObjectMode:!!(e!=null&&e.readableObjectMode),writableObjectMode:!!(n!=null&&n.writableObjectMode),readable:r,writable:i}),i&&(C_(n,f=>{i=!1,f&&ui(e,f),c(f)}),l._write=function(f,p,d){n.write(f,p)?d():o=d},l._final=function(f){n.end(),s=f},n.on("drain",function(){if(o){let f=o;o=null,f()}}),n.on("finish",function(){if(s){let f=s;s=null,f()}})),r&&(C_(e,f=>{r=!1,f&&ui(e,f),c(f)}),e.on("readable",function(){if(a){let f=a;a=null,f()}}),e.on("end",function(){l.push(null)}),l._read=function(){for(;;){let f=e.read();if(f===null){a=l._read;return}if(!l.push(f))return}}),l._destroy=function(f,p){!f&&u!==null&&(f=new M_),a=null,o=null,s=null,u===null?p(f):(u=p,ui(n,f),ui(e,f))},l}});var Ot=R((iH,z_)=>{"use strict";var{ObjectDefineProperties:zP,ObjectGetOwnPropertyDescriptor:Qt,ObjectKeys:UP,ObjectSetPrototypeOf:B_}=ue();z_.exports=xt;var Jf=Do(),at=al();B_(xt.prototype,Jf.prototype);B_(xt,Jf);{let t=UP(at.prototype);for(let e=0;e<t.length;e++){let n=t[e];xt.prototype[n]||(xt.prototype[n]=at.prototype[n])}}function xt(t){if(!(this instanceof xt))return new xt(t);Jf.call(this,t),at.call(this,t),t?(this.allowHalfOpen=t.allowHalfOpen!==!1,t.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),t.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}zP(xt.prototype,{writable:{__proto__:null,...Qt(at.prototype,"writable")},writableHighWaterMark:{__proto__:null,...Qt(at.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...Qt(at.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...Qt(at.prototype,"writableBuffer")},writableLength:{__proto__:null,...Qt(at.prototype,"writableLength")},writableFinished:{__proto__:null,...Qt(at.prototype,"writableFinished")},writableCorked:{__proto__:null,...Qt(at.prototype,"writableCorked")},writableEnded:{__proto__:null,...Qt(at.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...Qt(at.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(t){this._readableState&&this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}});var Qf;function W_(){return Qf===void 0&&(Qf={}),Qf}xt.fromWeb=function(t,e){return W_().newStreamDuplexFromReadableWritablePair(t,e)};xt.toWeb=function(t){return W_().newReadableWritablePairFromDuplex(t)};var Zf;xt.from=function(t){return Zf||(Zf=j_()),Zf(t,"body")}});var tp=R((oH,$_)=>{"use strict";var{ObjectSetPrototypeOf:U_,Symbol:$P}=ue();$_.exports=Zt;var{ERR_METHOD_NOT_IMPLEMENTED:HP}=Oe().codes,ep=Ot(),{getHighWaterMark:VP}=Eo();U_(Zt.prototype,ep.prototype);U_(Zt,ep);var Co=$P("kCallback");function Zt(t){if(!(this instanceof Zt))return new Zt(t);let e=t?VP(this,t,"readableHighWaterMark",!0):null;e===0&&(t={...t,highWaterMark:null,readableHighWaterMark:e,writableHighWaterMark:t.writableHighWaterMark||0}),ep.call(this,t),this._readableState.sync=!1,this[Co]=null,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",GP)}function Xf(t){typeof this._flush=="function"&&!this.destroyed?this._flush((e,n)=>{if(e){t?t(e):this.destroy(e);return}n!=null&&this.push(n),this.push(null),t&&t()}):(this.push(null),t&&t())}function GP(){this._final!==Xf&&Xf.call(this)}Zt.prototype._final=Xf;Zt.prototype._transform=function(t,e,n){throw new HP("_transform()")};Zt.prototype._write=function(t,e,n){let r=this._readableState,i=this._writableState,o=r.length;this._transform(t,e,(s,a)=>{if(s){n(s);return}a!=null&&this.push(a),i.ended||o===r.length||r.length<r.highWaterMark?n():this[Co]=n})};Zt.prototype._read=function(){if(this[Co]){let t=this[Co];this[Co]=null,t()}}});var rp=R((sH,V_)=>{"use strict";var{ObjectSetPrototypeOf:H_}=ue();V_.exports=ci;var np=tp();H_(ci.prototype,np.prototype);H_(ci,np);function ci(t){if(!(this instanceof ci))return new ci(t);np.call(this,t)}ci.prototype._transform=function(t,e,n){n(null,t)}});var fl=R((aH,Z_)=>{"use strict";var Io=wn(),{ArrayIsArray:KP,Promise:YP,SymbolAsyncIterator:QP,SymbolDispose:ZP}=ue(),cl=Yt(),{once:JP}=qe(),XP=cr(),G_=Ot(),{aggregateTwoErrors:eL,codes:{ERR_INVALID_ARG_TYPE:pp,ERR_INVALID_RETURN_VALUE:ip,ERR_MISSING_ARGS:tL,ERR_STREAM_DESTROYED:nL,ERR_STREAM_PREMATURE_CLOSE:rL},AbortError:iL}=Oe(),{validateFunction:oL,validateAbortSignal:sL}=ti(),{isIterable:dr,isReadable:op,isReadableNodeStream:ul,isNodeStream:K_,isTransformStream:fi,isWebStream:aL,isReadableStream:sp,isReadableFinished:lL}=Ct(),uL=globalThis.AbortController||Xr().AbortController,ap,lp,up;function Y_(t,e,n){let r=!1;t.on("close",()=>{r=!0});let i=cl(t,{readable:e,writable:n},o=>{r=!o});return{destroy:o=>{r||(r=!0,XP.destroyer(t,o||new nL("pipe")))},cleanup:i}}function cL(t){return oL(t[t.length-1],"streams[stream.length - 1]"),t.pop()}function cp(t){if(dr(t))return t;if(ul(t))return fL(t);throw new pp("val",["Readable","Iterable","AsyncIterable"],t)}async function*fL(t){lp||(lp=Do()),yield*lp.prototype[QP].call(t)}async function ll(t,e,n,{end:r}){let i,o=null,s=l=>{if(l&&(i=l),o){let c=o;o=null,c()}},a=()=>new YP((l,c)=>{i?c(i):o=()=>{i?c(i):l()}});e.on("drain",s);let u=cl(e,{readable:!1},s);try{e.writableNeedDrain&&await a();for await(let l of t)e.write(l)||await a();r&&(e.end(),await a()),n()}catch(l){n(i!==l?eL(i,l):l)}finally{u(),e.off("drain",s)}}async function fp(t,e,n,{end:r}){fi(e)&&(e=e.writable);let i=e.getWriter();try{for await(let o of t)await i.ready,i.write(o).catch(()=>{});await i.ready,r&&await i.close(),n()}catch(o){try{await i.abort(o),n(o)}catch(s){n(s)}}}function pL(...t){return Q_(t,JP(cL(t)))}function Q_(t,e,n){if(t.length===1&&KP(t[0])&&(t=t[0]),t.length<2)throw new tL("streams");let r=new uL,i=r.signal,o=n?.signal,s=[];sL(o,"options.signal");function a(){b(new iL)}up=up||qe().addAbortListener;let u;o&&(u=up(o,a));let l,c,f=[],p=0;function d(m){b(m,--p===0)}function b(m,w){var T;if(m&&(!l||l.code==="ERR_STREAM_PREMATURE_CLOSE")&&(l=m),!(!l&&!w)){for(;f.length;)f.shift()(l);(T=u)===null||T===void 0||T[ZP](),r.abort(),w&&(l||s.forEach(v=>v()),Io.nextTick(e,l,c))}}let g;for(let m=0;m<t.length;m++){let w=t[m],T=m<t.length-1,v=m>0,E=T||n?.end!==!1,L=m===t.length-1;if(K_(w)){let k=function(I){I&&I.name!=="AbortError"&&I.code!=="ERR_STREAM_PREMATURE_CLOSE"&&d(I)};var h=k;if(E){let{destroy:I,cleanup:N}=Y_(w,T,v);f.push(I),op(w)&&L&&s.push(N)}w.on("error",k),op(w)&&L&&s.push(()=>{w.removeListener("error",k)})}if(m===0)if(typeof w=="function"){if(g=w({signal:i}),!dr(g))throw new ip("Iterable, AsyncIterable or Stream","source",g)}else dr(w)||ul(w)||fi(w)?g=w:g=G_.from(w);else if(typeof w=="function"){if(fi(g)){var S;g=cp((S=g)===null||S===void 0?void 0:S.readable)}else g=cp(g);if(g=w(g,{signal:i}),T){if(!dr(g,!0))throw new ip("AsyncIterable",`transform[${m-1}]`,g)}else{var y;ap||(ap=rp());let k=new ap({objectMode:!0}),I=(y=g)===null||y===void 0?void 0:y.then;if(typeof I=="function")p++,I.call(g,P=>{c=P,P!=null&&k.write(P),E&&k.end(),Io.nextTick(d)},P=>{k.destroy(P),Io.nextTick(d,P)});else if(dr(g,!0))p++,ll(g,k,d,{end:E});else if(sp(g)||fi(g)){let P=g.readable||g;p++,ll(P,k,d,{end:E})}else throw new ip("AsyncIterable or Promise","destination",g);g=k;let{destroy:N,cleanup:M}=Y_(g,!1,!0);f.push(N),L&&s.push(M)}}else if(K_(w)){if(ul(g)){p+=2;let k=dL(g,w,d,{end:E});op(w)&&L&&s.push(k)}else if(fi(g)||sp(g)){let k=g.readable||g;p++,ll(k,w,d,{end:E})}else if(dr(g))p++,ll(g,w,d,{end:E});else throw new pp("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],g);g=w}else if(aL(w)){if(ul(g))p++,fp(cp(g),w,d,{end:E});else if(sp(g)||dr(g))p++,fp(g,w,d,{end:E});else if(fi(g))p++,fp(g.readable,w,d,{end:E});else throw new pp("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],g);g=w}else g=G_.from(w)}return(i!=null&&i.aborted||o!=null&&o.aborted)&&Io.nextTick(a),g}function dL(t,e,n,{end:r}){let i=!1;if(e.on("close",()=>{i||n(new rL)}),t.pipe(e,{end:!1}),r){let s=function(){i=!0,e.end()};var o=s;lL(t)?Io.nextTick(s):t.once("end",s)}else n();return cl(t,{readable:!0,writable:!1},s=>{let a=t._readableState;s&&s.code==="ERR_STREAM_PREMATURE_CLOSE"&&a&&a.ended&&!a.errored&&!a.errorEmitted?t.once("end",n).once("error",n):n(s)}),cl(e,{readable:!1,writable:!0},n)}Z_.exports={pipelineImpl:Q_,pipeline:pL}});var hp=R((lH,rw)=>{"use strict";var{pipeline:hL}=fl(),pl=Ot(),{destroyer:mL}=cr(),{isNodeStream:dl,isReadable:J_,isWritable:X_,isWebStream:dp,isTransformStream:hr,isWritableStream:ew,isReadableStream:tw}=Ct(),{AbortError:gL,codes:{ERR_INVALID_ARG_VALUE:nw,ERR_MISSING_ARGS:yL}}=Oe(),bL=Yt();rw.exports=function(...e){if(e.length===0)throw new yL("streams");if(e.length===1)return pl.from(e[0]);let n=[...e];if(typeof e[0]=="function"&&(e[0]=pl.from(e[0])),typeof e[e.length-1]=="function"){let d=e.length-1;e[d]=pl.from(e[d])}for(let d=0;d<e.length;++d)if(!(!dl(e[d])&&!dp(e[d]))){if(d<e.length-1&&!(J_(e[d])||tw(e[d])||hr(e[d])))throw new nw(`streams[${d}]`,n[d],"must be readable");if(d>0&&!(X_(e[d])||ew(e[d])||hr(e[d])))throw new nw(`streams[${d}]`,n[d],"must be writable")}let r,i,o,s,a;function u(d){let b=s;s=null,b?b(d):d?a.destroy(d):!p&&!f&&a.destroy()}let l=e[0],c=hL(e,u),f=!!(X_(l)||ew(l)||hr(l)),p=!!(J_(c)||tw(c)||hr(c));if(a=new pl({writableObjectMode:!!(l!=null&&l.writableObjectMode),readableObjectMode:!!(c!=null&&c.readableObjectMode),writable:f,readable:p}),f){if(dl(l))a._write=function(b,g,S){l.write(b,g)?S():r=S},a._final=function(b){l.end(),i=b},l.on("drain",function(){if(r){let b=r;r=null,b()}});else if(dp(l)){let g=(hr(l)?l.writable:l).getWriter();a._write=async function(S,y,h){try{await g.ready,g.write(S).catch(()=>{}),h()}catch(m){h(m)}},a._final=async function(S){try{await g.ready,g.close().catch(()=>{}),i=S}catch(y){S(y)}}}let d=hr(c)?c.readable:c;bL(d,()=>{if(i){let b=i;i=null,b()}})}if(p){if(dl(c))c.on("readable",function(){if(o){let d=o;o=null,d()}}),c.on("end",function(){a.push(null)}),a._read=function(){for(;;){let d=c.read();if(d===null){o=a._read;return}if(!a.push(d))return}};else if(dp(c)){let b=(hr(c)?c.readable:c).getReader();a._read=async function(){for(;;)try{let{value:g,done:S}=await b.read();if(!a.push(g))return;if(S){a.push(null);return}}catch{return}}}}return a._destroy=function(d,b){!d&&s!==null&&(d=new gL),o=null,r=null,i=null,s===null?b(d):(s=b,dl(c)&&mL(c,d))},a}});var dw=R((uH,yp)=>{"use strict";var xL=globalThis.AbortController||Xr().AbortController,{codes:{ERR_INVALID_ARG_VALUE:_L,ERR_INVALID_ARG_TYPE:Oo,ERR_MISSING_ARGS:wL,ERR_OUT_OF_RANGE:vL},AbortError:Pt}=Oe(),{validateAbortSignal:mr,validateInteger:iw,validateObject:gr}=ti(),SL=ue().Symbol("kWeak"),EL=ue().Symbol("kResistStopPropagation"),{finished:kL}=Yt(),DL=hp(),{addAbortSignalNoValidate:TL}=So(),{isWritable:RL,isNodeStream:AL}=Ct(),{deprecate:CL}=qe(),{ArrayPrototypePush:IL,Boolean:OL,MathFloor:ow,Number:PL,NumberIsNaN:LL,Promise:sw,PromiseReject:aw,PromiseResolve:NL,PromisePrototypeThen:lw,Symbol:cw}=ue(),hl=cw("kEmpty"),uw=cw("kEof");function ML(t,e){if(e!=null&&gr(e,"options"),e?.signal!=null&&mr(e.signal,"options.signal"),AL(t)&&!RL(t))throw new _L("stream",t,"must be writable");let n=DL(this,t);return e!=null&&e.signal&&TL(e.signal,n),n}function ml(t,e){if(typeof t!="function")throw new Oo("fn",["Function","AsyncFunction"],t);e!=null&&gr(e,"options"),e?.signal!=null&&mr(e.signal,"options.signal");let n=1;e?.concurrency!=null&&(n=ow(e.concurrency));let r=n-1;return e?.highWaterMark!=null&&(r=ow(e.highWaterMark)),iw(n,"options.concurrency",1),iw(r,"options.highWaterMark",0),r+=n,async function*(){let o=qe().AbortSignalAny([e?.signal].filter(OL)),s=this,a=[],u={signal:o},l,c,f=!1,p=0;function d(){f=!0,b()}function b(){p-=1,g()}function g(){c&&!f&&p<n&&a.length<r&&(c(),c=null)}async function S(){try{for await(let y of s){if(f)return;if(o.aborted)throw new Pt;try{if(y=t(y,u),y===hl)continue;y=NL(y)}catch(h){y=aw(h)}p+=1,lw(y,b,d),a.push(y),l&&(l(),l=null),!f&&(a.length>=r||p>=n)&&await new sw(h=>{c=h})}a.push(uw)}catch(y){let h=aw(y);lw(h,b,d),a.push(h)}finally{f=!0,l&&(l(),l=null)}}S();try{for(;;){for(;a.length>0;){let y=await a[0];if(y===uw)return;if(o.aborted)throw new Pt;y!==hl&&(yield y),a.shift(),g()}await new sw(y=>{l=y})}}finally{f=!0,c&&(c(),c=null)}}.call(this)}function FL(t=void 0){return t!=null&&gr(t,"options"),t?.signal!=null&&mr(t.signal,"options.signal"),async function*(){let n=0;for await(let i of this){var r;if(t!=null&&(r=t.signal)!==null&&r!==void 0&&r.aborted)throw new Pt({cause:t.signal.reason});yield[n++,i]}}.call(this)}async function fw(t,e=void 0){for await(let n of gp.call(this,t,e))return!0;return!1}async function qL(t,e=void 0){if(typeof t!="function")throw new Oo("fn",["Function","AsyncFunction"],t);return!await fw.call(this,async(...n)=>!await t(...n),e)}async function jL(t,e){for await(let n of gp.call(this,t,e))return n}async function BL(t,e){if(typeof t!="function")throw new Oo("fn",["Function","AsyncFunction"],t);async function n(r,i){return await t(r,i),hl}for await(let r of ml.call(this,n,e));}function gp(t,e){if(typeof t!="function")throw new Oo("fn",["Function","AsyncFunction"],t);async function n(r,i){return await t(r,i)?r:hl}return ml.call(this,n,e)}var mp=class extends wL{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function WL(t,e,n){var r;if(typeof t!="function")throw new Oo("reducer",["Function","AsyncFunction"],t);n!=null&&gr(n,"options"),n?.signal!=null&&mr(n.signal,"options.signal");let i=arguments.length>1;if(n!=null&&(r=n.signal)!==null&&r!==void 0&&r.aborted){let l=new Pt(void 0,{cause:n.signal.reason});throw this.once("error",()=>{}),await kL(this.destroy(l)),l}let o=new xL,s=o.signal;if(n!=null&&n.signal){let l={once:!0,[SL]:this,[EL]:!0};n.signal.addEventListener("abort",()=>o.abort(),l)}let a=!1;try{for await(let l of this){var u;if(a=!0,n!=null&&(u=n.signal)!==null&&u!==void 0&&u.aborted)throw new Pt;i?e=await t(e,l,{signal:s}):(e=l,i=!0)}if(!a&&!i)throw new mp}finally{o.abort()}return e}async function zL(t){t!=null&&gr(t,"options"),t?.signal!=null&&mr(t.signal,"options.signal");let e=[];for await(let r of this){var n;if(t!=null&&(n=t.signal)!==null&&n!==void 0&&n.aborted)throw new Pt(void 0,{cause:t.signal.reason});IL(e,r)}return e}function UL(t,e){let n=ml.call(this,t,e);return async function*(){for await(let i of n)yield*i}.call(this)}function pw(t){if(t=PL(t),LL(t))return 0;if(t<0)throw new vL("number",">= 0",t);return t}function $L(t,e=void 0){return e!=null&&gr(e,"options"),e?.signal!=null&&mr(e.signal,"options.signal"),t=pw(t),async function*(){var r;if(e!=null&&(r=e.signal)!==null&&r!==void 0&&r.aborted)throw new Pt;for await(let o of this){var i;if(e!=null&&(i=e.signal)!==null&&i!==void 0&&i.aborted)throw new Pt;t--<=0&&(yield o)}}.call(this)}function HL(t,e=void 0){return e!=null&&gr(e,"options"),e?.signal!=null&&mr(e.signal,"options.signal"),t=pw(t),async function*(){var r;if(e!=null&&(r=e.signal)!==null&&r!==void 0&&r.aborted)throw new Pt;for await(let o of this){var i;if(e!=null&&(i=e.signal)!==null&&i!==void 0&&i.aborted)throw new Pt;if(t-- >0&&(yield o),t<=0)return}}.call(this)}yp.exports.streamReturningOperators={asIndexedPairs:CL(FL,"readable.asIndexedPairs will be removed in a future version."),drop:$L,filter:gp,flatMap:UL,map:ml,take:HL,compose:ML};yp.exports.promiseReturningOperators={every:qL,forEach:BL,reduce:WL,toArray:zL,some:fw,find:jL}});var bp=R((cH,hw)=>{"use strict";var{ArrayPrototypePop:VL,Promise:GL}=ue(),{isIterable:KL,isNodeStream:YL,isWebStream:QL}=Ct(),{pipelineImpl:ZL}=fl(),{finished:JL}=Yt();xp();function XL(...t){return new GL((e,n)=>{let r,i,o=t[t.length-1];if(o&&typeof o=="object"&&!YL(o)&&!KL(o)&&!QL(o)){let s=VL(t);r=s.signal,i=s.end}ZL(t,(s,a)=>{s?n(s):e(a)},{signal:r,end:i})})}hw.exports={finished:JL,pipeline:XL}});var xp=R((fH,Sw)=>{"use strict";var{Buffer:eN}=K("buffer"),{ObjectDefineProperty:Jt,ObjectKeys:yw,ReflectApply:bw}=ue(),{promisify:{custom:xw}}=qe(),{streamReturningOperators:mw,promiseReturningOperators:gw}=dw(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:_w}}=Oe(),tN=hp(),{setDefaultHighWaterMark:nN,getDefaultHighWaterMark:rN}=Eo(),{pipeline:ww}=fl(),{destroyer:iN}=cr(),vw=Yt(),_p=bp(),Po=Ct(),se=Sw.exports=Ya().Stream;se.isDestroyed=Po.isDestroyed;se.isDisturbed=Po.isDisturbed;se.isErrored=Po.isErrored;se.isReadable=Po.isReadable;se.isWritable=Po.isWritable;se.Readable=Do();for(let t of yw(mw)){let n=function(...r){if(new.target)throw _w();return se.Readable.from(bw(e,this,r))},e=mw[t];Jt(n,"name",{__proto__:null,value:e.name}),Jt(n,"length",{__proto__:null,value:e.length}),Jt(se.Readable.prototype,t,{__proto__:null,value:n,enumerable:!1,configurable:!0,writable:!0})}for(let t of yw(gw)){let n=function(...r){if(new.target)throw _w();return bw(e,this,r)},e=gw[t];Jt(n,"name",{__proto__:null,value:e.name}),Jt(n,"length",{__proto__:null,value:e.length}),Jt(se.Readable.prototype,t,{__proto__:null,value:n,enumerable:!1,configurable:!0,writable:!0})}se.Writable=al();se.Duplex=Ot();se.Transform=tp();se.PassThrough=rp();se.pipeline=ww;var{addAbortSignal:oN}=So();se.addAbortSignal=oN;se.finished=vw;se.destroy=iN;se.compose=tN;se.setDefaultHighWaterMark=nN;se.getDefaultHighWaterMark=rN;Jt(se,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return _p}});Jt(ww,xw,{__proto__:null,enumerable:!0,get(){return _p.pipeline}});Jt(vw,xw,{__proto__:null,enumerable:!0,get(){return _p.finished}});se.Stream=se;se._isUint8Array=function(e){return e instanceof Uint8Array};se._uint8ArrayToBuffer=function(e){return eN.from(e.buffer,e.byteOffset,e.byteLength)}});var yr=R((pH,H)=>{"use strict";var ve=K("stream");if(ve&&process.env.READABLE_STREAM==="disable"){let t=ve.promises;H.exports._uint8ArrayToBuffer=ve._uint8ArrayToBuffer,H.exports._isUint8Array=ve._isUint8Array,H.exports.isDisturbed=ve.isDisturbed,H.exports.isErrored=ve.isErrored,H.exports.isReadable=ve.isReadable,H.exports.Readable=ve.Readable,H.exports.Writable=ve.Writable,H.exports.Duplex=ve.Duplex,H.exports.Transform=ve.Transform,H.exports.PassThrough=ve.PassThrough,H.exports.addAbortSignal=ve.addAbortSignal,H.exports.finished=ve.finished,H.exports.destroy=ve.destroy,H.exports.pipeline=ve.pipeline,H.exports.compose=ve.compose,Object.defineProperty(ve,"promises",{configurable:!0,enumerable:!0,get(){return t}}),H.exports.Stream=ve.Stream}else{let t=xp(),e=bp(),n=t.Readable.destroy;H.exports=t.Readable,H.exports._uint8ArrayToBuffer=t._uint8ArrayToBuffer,H.exports._isUint8Array=t._isUint8Array,H.exports.isDisturbed=t.isDisturbed,H.exports.isErrored=t.isErrored,H.exports.isReadable=t.isReadable,H.exports.Readable=t.Readable,H.exports.Writable=t.Writable,H.exports.Duplex=t.Duplex,H.exports.Transform=t.Transform,H.exports.PassThrough=t.PassThrough,H.exports.addAbortSignal=t.addAbortSignal,H.exports.finished=t.finished,H.exports.destroy=t.destroy,H.exports.destroy=n,H.exports.pipeline=t.pipeline,H.exports.compose=t.compose,Object.defineProperty(t,"promises",{configurable:!0,enumerable:!0,get(){return e}}),H.exports.Stream=t.Stream}H.exports.default=H.exports});var gl=R((dH,Ew)=>{"use strict";Ew.exports=function(t,e){if(typeof t!="string")throw new TypeError("expected path to be a string");if(t==="\\"||t==="/")return"/";var n=t.length;if(n<=1)return t;var r="";if(n>4&&t[3]==="\\"){var i=t[2];(i==="?"||i===".")&&t.slice(0,2)==="\\\\"&&(t=t.slice(2),r="//")}var o=t.split(/[/\\]+/);return e!==!1&&o[o.length-1]===""&&o.pop(),r+o.join("/")}});var xl=R(Rp=>{"use strict";var av;(function(t){typeof DO_NOT_EXPORT_CRC>"u"?typeof Rp=="object"?t(Rp):typeof define=="function"&&define.amd?define(function(){var e={};return t(e),e}):t(av={}):t(av={})})(function(t){t.version="1.2.2";function e(){for(var E=0,L=new Array(256),k=0;k!=256;++k)E=k,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,L[k]=E;return typeof Int32Array<"u"?new Int32Array(L):L}var n=e();function r(E){var L=0,k=0,I=0,N=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(I=0;I!=256;++I)N[I]=E[I];for(I=0;I!=256;++I)for(k=E[I],L=256+I;L<4096;L+=256)k=N[L]=k>>>8^E[k&255];var M=[];for(I=1;I!=16;++I)M[I-1]=typeof Int32Array<"u"?N.subarray(I*256,I*256+256):N.slice(I*256,I*256+256);return M}var i=r(n),o=i[0],s=i[1],a=i[2],u=i[3],l=i[4],c=i[5],f=i[6],p=i[7],d=i[8],b=i[9],g=i[10],S=i[11],y=i[12],h=i[13],m=i[14];function w(E,L){for(var k=L^-1,I=0,N=E.length;I<N;)k=k>>>8^n[(k^E.charCodeAt(I++))&255];return~k}function T(E,L){for(var k=L^-1,I=E.length-15,N=0;N<I;)k=m[E[N++]^k&255]^h[E[N++]^k>>8&255]^y[E[N++]^k>>16&255]^S[E[N++]^k>>>24]^g[E[N++]]^b[E[N++]]^d[E[N++]]^p[E[N++]]^f[E[N++]]^c[E[N++]]^l[E[N++]]^u[E[N++]]^a[E[N++]]^s[E[N++]]^o[E[N++]]^n[E[N++]];for(I+=15;N<I;)k=k>>>8^n[(k^E[N++])&255];return~k}function v(E,L){for(var k=L^-1,I=0,N=E.length,M=0,P=0;I<N;)M=E.charCodeAt(I++),M<128?k=k>>>8^n[(k^M)&255]:M<2048?(k=k>>>8^n[(k^(192|M>>6&31))&255],k=k>>>8^n[(k^(128|M&63))&255]):M>=55296&&M<57344?(M=(M&1023)+64,P=E.charCodeAt(I++)&1023,k=k>>>8^n[(k^(240|M>>8&7))&255],k=k>>>8^n[(k^(128|M>>2&63))&255],k=k>>>8^n[(k^(128|P>>6&15|(M&3)<<4))&255],k=k>>>8^n[(k^(128|P&63))&255]):(k=k>>>8^n[(k^(224|M>>12&15))&255],k=k>>>8^n[(k^(128|M>>6&63))&255],k=k>>>8^n[(k^(128|M&63))&255]);return~k}t.table=n,t.bstr=w,t.buf=T,t.str=v})});var gv=R((m8,mv)=>{"use strict";mv.exports=K("events")});var bv=R((y8,yv)=>{"use strict";yv.exports=class{constructor(e){if(!(e>0)||(e-1&e)!==0)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(e),this.mask=e-1,this.top=0,this.btm=0,this.next=null}clear(){this.top=this.btm=0,this.next=null,this.buffer.fill(void 0)}push(e){return this.buffer[this.top]!==void 0?!1:(this.buffer[this.top]=e,this.top=this.top+1&this.mask,!0)}shift(){let e=this.buffer[this.btm];if(e!==void 0)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,e}peek(){return this.buffer[this.btm]}isEmpty(){return this.buffer[this.btm]===void 0}}});var Ap=R((x8,_v)=>{"use strict";var xv=bv();_v.exports=class{constructor(e){this.hwm=e||16,this.head=new xv(this.hwm),this.tail=this.head,this.length=0}clear(){this.head=this.tail,this.head.clear(),this.length=0}push(e){if(this.length++,!this.head.push(e)){let n=this.head;this.head=n.next=new xv(2*this.head.buffer.length),this.head.push(e)}}shift(){this.length!==0&&this.length--;let e=this.tail.shift();if(e===void 0&&this.tail.next){let n=this.tail.next;return this.tail.next=null,this.tail=n,this.tail.shift()}return e}peek(){let e=this.tail.peek();return e===void 0&&this.tail.next?this.tail.next.peek():e}isEmpty(){return this.length===0}}});var bi=R((_8,wv)=>{"use strict";function bN(t){return Buffer.isBuffer(t)||t instanceof Uint8Array}function xN(t){return Buffer.isEncoding(t)}function _N(t,e,n){return Buffer.alloc(t,e,n)}function wN(t){return Buffer.allocUnsafe(t)}function vN(t){return Buffer.allocUnsafeSlow(t)}function SN(t,e){return Buffer.byteLength(t,e)}function EN(t,e){return Buffer.compare(t,e)}function kN(t,e){return Buffer.concat(t,e)}function DN(t,e,n,r,i){return ee(t).copy(e,n,r,i)}function TN(t,e){return ee(t).equals(e)}function RN(t,e,n,r,i){return ee(t).fill(e,n,r,i)}function AN(t,e,n){return Buffer.from(t,e,n)}function CN(t,e,n,r){return ee(t).includes(e,n,r)}function IN(t,e,n,r){return ee(t).indexOf(e,n,r)}function ON(t,e,n,r){return ee(t).lastIndexOf(e,n,r)}function PN(t){return ee(t).swap16()}function LN(t){return ee(t).swap32()}function NN(t){return ee(t).swap64()}function ee(t){return Buffer.isBuffer(t)?t:Buffer.from(t.buffer,t.byteOffset,t.byteLength)}function MN(t,e,n,r){return ee(t).toString(e,n,r)}function FN(t,e,n,r,i){return ee(t).write(e,n,r,i)}function qN(t,e){return ee(t).readDoubleBE(e)}function jN(t,e){return ee(t).readDoubleLE(e)}function BN(t,e){return ee(t).readFloatBE(e)}function WN(t,e){return ee(t).readFloatLE(e)}function zN(t,e){return ee(t).readInt32BE(e)}function UN(t,e){return ee(t).readInt32LE(e)}function $N(t,e){return ee(t).readUInt32BE(e)}function HN(t,e){return ee(t).readUInt32LE(e)}function VN(t,e,n){return ee(t).writeDoubleBE(e,n)}function GN(t,e,n){return ee(t).writeDoubleLE(e,n)}function KN(t,e,n){return ee(t).writeFloatBE(e,n)}function YN(t,e,n){return ee(t).writeFloatLE(e,n)}function QN(t,e,n){return ee(t).writeInt32BE(e,n)}function ZN(t,e,n){return ee(t).writeInt32LE(e,n)}function JN(t,e,n){return ee(t).writeUInt32BE(e,n)}function XN(t,e,n){return ee(t).writeUInt32LE(e,n)}wv.exports={isBuffer:bN,isEncoding:xN,alloc:_N,allocUnsafe:wN,allocUnsafeSlow:vN,byteLength:SN,compare:EN,concat:kN,copy:DN,equals:TN,fill:RN,from:AN,includes:CN,indexOf:IN,lastIndexOf:ON,swap16:PN,swap32:LN,swap64:NN,toBuffer:ee,toString:MN,write:FN,readDoubleBE:qN,readDoubleLE:jN,readFloatBE:BN,readFloatLE:WN,readInt32BE:zN,readInt32LE:UN,readUInt32BE:$N,readUInt32LE:HN,writeDoubleBE:VN,writeDoubleLE:GN,writeFloatBE:KN,writeFloatLE:YN,writeInt32BE:QN,writeInt32LE:ZN,writeUInt32BE:JN,writeUInt32LE:XN}});var Sv=R((v8,vv)=>{"use strict";var eM=bi();vv.exports=class{constructor(e){this.encoding=e}get remaining(){return 0}decode(e){return eM.toString(e,this.encoding)}flush(){return""}}});var Tv=R((E8,Dv)=>{"use strict";var Ev=bi();Dv.exports=class{constructor(){this._reset()}get remaining(){return this.bytesSeen}decode(e){if(e.byteLength===0)return"";if(this.bytesNeeded===0&&kv(e,0)===0)return this.bytesSeen=tM(e),Ev.toString(e,"utf8");let n="",r=0;if(this.bytesNeeded>0){for(;r<e.byteLength;){let s=e[r];if(s<this.lowerBoundary||s>this.upperBoundary){n+="\uFFFD",this._reset();break}if(this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|s&63,this.bytesSeen++,r++,this.bytesSeen===this.bytesNeeded){n+=String.fromCodePoint(this.codePoint),this._reset();break}}if(this.bytesNeeded>0)return n}let i=kv(e,r),o=e.byteLength-i;o>r&&(n+=Ev.toString(e,"utf8",r,o));for(let s=o;s<e.byteLength;s++){let a=e[s];if(this.bytesNeeded===0){a<=127?(this.bytesSeen=0,n+=String.fromCharCode(a)):a>=194&&a<=223?(this.bytesNeeded=2,this.bytesSeen=1,this.codePoint=a&31):a>=224&&a<=239?(a===224?this.lowerBoundary=160:a===237&&(this.upperBoundary=159),this.bytesNeeded=3,this.bytesSeen=1,this.codePoint=a&15):a>=240&&a<=244?(a===240?this.lowerBoundary=144:a===244&&(this.upperBoundary=143),this.bytesNeeded=4,this.bytesSeen=1,this.codePoint=a&7):(this.bytesSeen=1,n+="\uFFFD");continue}if(a<this.lowerBoundary||a>this.upperBoundary){n+="\uFFFD",s--,this._reset();continue}this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|a&63,this.bytesSeen++,this.bytesSeen===this.bytesNeeded&&(n+=String.fromCodePoint(this.codePoint),this._reset())}return n}flush(){let e=this.bytesNeeded>0?"\uFFFD":"";return this._reset(),e}_reset(){this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191}};function kv(t,e){let n=t.byteLength;if(n<=e)return 0;let r=Math.max(e,n-4),i=n-1;for(;i>r&&(t[i]&192)===128;)i--;if(i<e)return 0;let o=t[i],s;if(o<=127)return 0;if(o>=194&&o<=223)s=2;else if(o>=224&&o<=239)s=3;else if(o>=240&&o<=244)s=4;else return 0;let a=n-i;return a<s?a:0}function tM(t){let e=t.byteLength;if(e===0)return 0;let n=t[e-1];if(n<=127)return 0;if((n&192)!==128)return 1;let r=Math.max(0,e-4),i=e-2;for(;i>=r&&(t[i]&192)===128;)i--;if(i<0)return 1;let o=t[i],s;if(o>=194&&o<=223)s=2;else if(o>=224&&o<=239)s=3;else if(o>=240&&o<=244)s=4;else return 1;if(e-i!==s)return 1;if(s>=3){let a=t[i+1];if(o===224&&a<160||o===237&&a>159||o===240&&a<144||o===244&&a>143)return 1}return 0}});var Av=R((D8,Rv)=>{"use strict";var nM=Sv(),rM=Tv();Rv.exports=class{constructor(e="utf8"){switch(this.encoding=iM(e),this.encoding){case"utf8":this.decoder=new rM;break;case"utf16le":case"base64":throw new Error("Unsupported encoding: "+this.encoding);default:this.decoder=new nM(this.encoding)}}get remaining(){return this.decoder.remaining}push(e){return typeof e=="string"?e:this.decoder.decode(e)}write(e){return this.push(e)}end(e){let n="";return e&&(n=this.push(e)),n+=this.decoder.flush(),n}};function iM(t){switch(t=t.toLowerCase(),t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:throw new Error("Unknown encoding: "+t)}}});var Hp=R((T8,Jv)=>{"use strict";var{EventEmitter:oM}=gv(),kl=new Error("Stream was destroyed"),Cp=new Error("Premature close"),Nv=Ap(),sM=Av(),Ip=typeof queueMicrotask>"u"?t=>global.process.nextTick(t):queueMicrotask,pe=(1<<29)-1,Lt=1,qp=2,Xt=4,jo=8,Mv=pe^Lt,aM=pe^qp,$o=16,xi=32,vi=64,Tn=128,Ho=256,jp=512,Rn=1024,Op=2048,Bp=4096,Wp=8192,_t=16384,Dn=32768,Dl=65536,xr=131072,Fv=Ho|jp,lM=$o|Dl,uM=vi|$o,cM=Bp|Tn,zp=Ho|xr,fM=pe^$o,pM=pe^vi,dM=pe^(vi|Dl),Cv=pe^Dl,hM=pe^Ho,mM=pe^(Tn|Wp),gM=pe^Rn,Iv=pe^Fv,qv=pe^Dn,yM=pe^xi,jv=pe^xr,bM=pe^zp,en=1<<18,wi=2<<18,Vo=4<<18,_r=8<<18,Go=16<<18,Cn=32<<18,Pp=64<<18,_i=128<<18,Up=256<<18,An=512<<18,Tl=1024<<18,xM=pe^(en|Up),Bv=pe^Vo,_M=pe^(en|An),wM=pe^Go,vM=pe^_r,Wv=pe^_i,SM=pe^wi,zv=pe^Tl,Bo=$o|en,Uv=pe^Bo,$p=_t|Cn,Nt=Xt|jo|qp,Je=Nt|Lt,$v=Nt|$p,EM=Bv&pM,Rl=_i|Dn,kM=Rl&Uv,Hv=Je|kM,DM=Je|Rn|_t,Ov=Je|_t|Tn,TM=Je|Rn|Tn,RM=Je|Bp|Tn|Wp,AM=Je|$o|Rn|_t|Dl|xr,CM=Nt|Rn|_t,IM=xi|Je|Dn|vi,OM=Dn|Lt,PM=Je|An|Cn,LM=_r|Go,Vv=_r|en,NM=_r|Go|Je|en,Pv=Je|en|_r|Tl,MM=Vo|en,FM=en|Up,qM=Je|An|Vv|Cn,jM=Go|Nt|An|Cn,BM=wi|Je|_i|Vo,WM=An|Cn|Nt,_l=Symbol.asyncIterator||Symbol("asyncIterator"),wl=class{constructor(e,{highWaterMark:n=16384,map:r=null,mapWritable:i,byteLength:o,byteLengthWritable:s}={}){this.stream=e,this.queue=new Nv,this.highWaterMark=n,this.buffered=0,this.error=null,this.pipeline=null,this.drains=null,this.byteLength=s||o||Zv,this.map=i||r,this.afterWrite=$M.bind(this),this.afterUpdateNextTick=GM.bind(this)}get ending(){return(this.stream._duplexState&An)!==0}get ended(){return(this.stream._duplexState&Cn)!==0}push(e){return(this.stream._duplexState&WM)!==0?!1:(this.map!==null&&(e=this.map(e)),this.buffered+=this.byteLength(e),this.queue.push(e),this.buffered<this.highWaterMark?(this.stream._duplexState|=_r,!0):(this.stream._duplexState|=LM,!1))}shift(){let e=this.queue.shift();return this.buffered-=this.byteLength(e),this.buffered===0&&(this.stream._duplexState&=vM),e}end(e){typeof e=="function"?this.stream.once("finish",e):e!=null&&this.push(e),this.stream._duplexState=(this.stream._duplexState|An)&Bv}autoBatch(e,n){let r=[],i=this.stream;for(r.push(e);(i._duplexState&Pv)===Vv;)r.push(i._writableState.shift());if((i._duplexState&Je)!==0)return n(null);i._writev(r,n)}update(){let e=this.stream;e._duplexState|=wi;do{for(;(e._duplexState&Pv)===_r;){let n=this.shift();e._duplexState|=FM,e._write(n,this.afterWrite)}(e._duplexState&MM)===0&&this.updateNonPrimary()}while(this.continueUpdate()===!0);e._duplexState&=SM}updateNonPrimary(){let e=this.stream;if((e._duplexState&qM)===An){e._duplexState=e._duplexState|en,e._final(UM.bind(this));return}if((e._duplexState&Nt)===Xt){(e._duplexState&Rl)===0&&(e._duplexState|=Bo,e._destroy(Gv.bind(this)));return}(e._duplexState&Hv)===Lt&&(e._duplexState=(e._duplexState|Bo)&Mv,e._open(Kv.bind(this)))}continueUpdate(){return(this.stream._duplexState&_i)===0?!1:(this.stream._duplexState&=Wv,!0)}updateCallback(){(this.stream._duplexState&BM)===Vo?this.update():this.updateNextTick()}updateNextTick(){(this.stream._duplexState&_i)===0&&(this.stream._duplexState|=_i,(this.stream._duplexState&wi)===0&&Ip(this.afterUpdateNextTick))}},Lp=class{constructor(e,{highWaterMark:n=16384,map:r=null,mapReadable:i,byteLength:o,byteLengthReadable:s}={}){this.stream=e,this.queue=new Nv,this.highWaterMark=n===0?1:n,this.buffered=0,this.readAhead=n>0,this.error=null,this.pipeline=null,this.byteLength=s||o||Zv,this.map=i||r,this.pipeTo=null,this.afterRead=HM.bind(this),this.afterUpdateNextTick=VM.bind(this)}get ending(){return(this.stream._duplexState&Rn)!==0}get ended(){return(this.stream._duplexState&_t)!==0}pipe(e,n){if(this.pipeTo!==null)throw new Error("Can only pipe to one destination");if(typeof n!="function"&&(n=null),this.stream._duplexState|=jp,this.pipeTo=e,this.pipeline=new Mp(this.stream,e,n),n&&this.stream.on("error",Lv),Uo(e))e._writableState.pipeline=this.pipeline,n&&e.on("error",Lv),e.on("finish",this.pipeline.finished.bind(this.pipeline));else{let r=this.pipeline.done.bind(this.pipeline,e),i=this.pipeline.done.bind(this.pipeline,e,null);e.on("error",r),e.on("close",i),e.on("finish",this.pipeline.finished.bind(this.pipeline))}e.on("drain",zM.bind(this)),this.stream.emit("piping",e),e.emit("pipe",this.stream)}push(e){let n=this.stream;return e===null?(this.highWaterMark=0,n._duplexState=(n._duplexState|Rn)&dM,!1):this.map!==null&&(e=this.map(e),e===null)?(n._duplexState&=Cv,this.buffered<this.highWaterMark):(this.buffered+=this.byteLength(e),this.queue.push(e),n._duplexState=(n._duplexState|Tn)&Cv,this.buffered<this.highWaterMark)}shift(){let e=this.queue.shift();return this.buffered-=this.byteLength(e),this.buffered===0&&(this.stream._duplexState&=mM),e}unshift(e){let n=[this.map!==null?this.map(e):e];for(;this.buffered>0;)n.push(this.shift());for(let r=0;r<n.length-1;r++){let i=n[r];this.buffered+=this.byteLength(i),this.queue.push(i)}this.push(n[n.length-1])}read(){let e=this.stream;if((e._duplexState&Ov)===Tn){let n=this.shift();return this.pipeTo!==null&&this.pipeTo.write(n)===!1&&(e._duplexState&=Iv),(e._duplexState&Op)!==0&&e.emit("data",n),n}return this.readAhead===!1&&(e._duplexState|=xr,this.updateNextTick()),null}drain(){let e=this.stream;for(;(e._duplexState&Ov)===Tn&&(e._duplexState&Fv)!==0;){let n=this.shift();this.pipeTo!==null&&this.pipeTo.write(n)===!1&&(e._duplexState&=Iv),(e._duplexState&Op)!==0&&e.emit("data",n)}}update(){let e=this.stream;e._duplexState|=xi;do{for(this.drain();this.buffered<this.highWaterMark&&(e._duplexState&AM)===xr;)e._duplexState|=lM,e._read(this.afterRead),this.drain();(e._duplexState&RM)===cM&&(e._duplexState|=Wp,e.emit("readable")),(e._duplexState&uM)===0&&this.updateNonPrimary()}while(this.continueUpdate()===!0);e._duplexState&=yM}updateNonPrimary(){let e=this.stream;if((e._duplexState&TM)===Rn&&(e._duplexState=(e._duplexState|_t)&gM,e.emit("end"),(e._duplexState&$v)===$p&&(e._duplexState|=Xt),this.pipeTo!==null&&this.pipeTo.end()),(e._duplexState&Nt)===Xt){(e._duplexState&Rl)===0&&(e._duplexState|=Bo,e._destroy(Gv.bind(this)));return}(e._duplexState&Hv)===Lt&&(e._duplexState=(e._duplexState|Bo)&Mv,e._open(Kv.bind(this)))}continueUpdate(){return(this.stream._duplexState&Dn)===0?!1:(this.stream._duplexState&=qv,!0)}updateCallback(){(this.stream._duplexState&IM)===vi?this.update():this.updateNextTick()}updateNextTickIfOpen(){(this.stream._duplexState&OM)===0&&(this.stream._duplexState|=Dn,(this.stream._duplexState&xi)===0&&Ip(this.afterUpdateNextTick))}updateNextTick(){(this.stream._duplexState&Dn)===0&&(this.stream._duplexState|=Dn,(this.stream._duplexState&xi)===0&&Ip(this.afterUpdateNextTick))}},Np=class{constructor(e){this.data=null,this.afterTransform=YM.bind(e),this.afterFinal=null}},Mp=class{constructor(e,n,r){this.from=e,this.to=n,this.afterPipe=r,this.error=null,this.pipeToFinished=!1}finished(){this.pipeToFinished=!0}done(e,n){if(n&&(this.error=n),e===this.to&&(this.to=null,this.from!==null)){((this.from._duplexState&_t)===0||!this.pipeToFinished)&&this.from.destroy(this.error||new Error("Writable stream closed prematurely"));return}if(e===this.from&&(this.from=null,this.to!==null)){(e._duplexState&_t)===0&&this.to.destroy(this.error||new Error("Readable stream closed before ending"));return}this.afterPipe!==null&&this.afterPipe(this.error),this.to=this.from=this.afterPipe=null}};function zM(){this.stream._duplexState|=jp,this.updateCallback()}function UM(t){let e=this.stream;t&&e.destroy(t),(e._duplexState&Nt)===0&&(e._duplexState|=Cn,e.emit("finish")),(e._duplexState&$v)===$p&&(e._duplexState|=Xt),e._duplexState&=_M,(e._duplexState&wi)===0?this.update():this.updateNextTick()}function Gv(t){let e=this.stream;!t&&this.error!==kl&&(t=this.error),t&&e.emit("error",t),e._duplexState|=jo,e.emit("close");let n=e._readableState,r=e._writableState;if(n!==null&&n.pipeline!==null&&n.pipeline.done(e,t),r!==null){for(;r.drains!==null&&r.drains.length>0;)r.drains.shift().resolve(!1);r.pipeline!==null&&r.pipeline.done(e,t)}}function $M(t){let e=this.stream;t&&e.destroy(t),e._duplexState&=xM,this.drains!==null&&KM(this.drains),(e._duplexState&NM)===Go&&(e._duplexState&=wM,(e._duplexState&Pp)===Pp&&e.emit("drain")),this.updateCallback()}function HM(t){t&&this.stream.destroy(t),this.stream._duplexState&=fM,this.readAhead===!1&&(this.stream._duplexState&Ho)===0&&(this.stream._duplexState&=jv),this.updateCallback()}function VM(){(this.stream._duplexState&xi)===0&&(this.stream._duplexState&=qv,this.update())}function GM(){(this.stream._duplexState&wi)===0&&(this.stream._duplexState&=Wv,this.update())}function KM(t){for(let e=0;e<t.length;e++)--t[e].writes===0&&(t.shift().resolve(!0),e--)}function Kv(t){let e=this.stream;t&&e.destroy(t),(e._duplexState&Xt)===0&&((e._duplexState&DM)===0&&(e._duplexState|=vi),(e._duplexState&PM)===0&&(e._duplexState|=Vo),e.emit("open")),e._duplexState&=Uv,e._writableState!==null&&e._writableState.updateCallback(),e._readableState!==null&&e._readableState.updateCallback()}function YM(t,e){e!=null&&this.push(e),this._writableState.afterWrite(t)}function QM(t){this._readableState!==null&&(t==="data"&&(this._duplexState|=Op|zp,this._readableState.updateNextTick()),t==="readable"&&(this._duplexState|=Bp,this._readableState.updateNextTick())),this._writableState!==null&&t==="drain"&&(this._duplexState|=Pp,this._writableState.updateNextTick())}var Wo=class extends oM{constructor(e){super(),this._duplexState=0,this._readableState=null,this._writableState=null,e&&(e.open&&(this._open=e.open),e.destroy&&(this._destroy=e.destroy),e.predestroy&&(this._predestroy=e.predestroy),e.signal&&e.signal.addEventListener("abort",lF.bind(this))),this.on("newListener",QM)}_open(e){e(null)}_destroy(e){e(null)}_predestroy(){}get readable(){return this._readableState!==null?!0:void 0}get writable(){return this._writableState!==null?!0:void 0}get destroyed(){return(this._duplexState&jo)!==0}get destroying(){return(this._duplexState&Nt)!==0}destroy(e){(this._duplexState&Nt)===0&&(e||(e=kl),this._duplexState=(this._duplexState|Xt)&EM,this._readableState!==null&&(this._readableState.highWaterMark=0,this._readableState.error=e),this._writableState!==null&&(this._writableState.highWaterMark=0,this._writableState.error=e),this._duplexState|=qp,this._predestroy(),this._duplexState&=aM,this._readableState!==null&&this._readableState.updateNextTick(),this._writableState!==null&&this._writableState.updateNextTick())}},vl=class t extends Wo{constructor(e){super(e),this._duplexState|=Lt|Cn|xr,this._readableState=new Lp(this,e),e&&(this._readableState.readAhead===!1&&(this._duplexState&=jv),e.read&&(this._read=e.read),e.eagerOpen&&this._readableState.updateNextTick(),e.encoding&&this.setEncoding(e.encoding))}setEncoding(e){let n=new sM(e),r=this._readableState.map||XM;return this._readableState.map=i,this;function i(o){let s=n.push(o);return s===""&&(o.byteLength!==0||n.remaining>0)?null:r(s)}}_read(e){e(null)}pipe(e,n){return this._readableState.updateNextTick(),this._readableState.pipe(e,n),e}read(){return this._readableState.updateNextTick(),this._readableState.read()}push(e){return this._readableState.updateNextTickIfOpen(),this._readableState.push(e)}unshift(e){return this._readableState.updateNextTickIfOpen(),this._readableState.unshift(e)}resume(){return this._duplexState|=zp,this._readableState.updateNextTick(),this}pause(){return this._duplexState&=this._readableState.readAhead===!1?bM:hM,this}static _fromAsyncIterator(e,n){let r,i=new t({...n,read(s){e.next().then(o).then(s.bind(null,null)).catch(s)},predestroy(){r=e.return()},destroy(s){if(!r)return s(null);r.then(s.bind(null,null)).catch(s)}});return i;function o(s){s.done?i.push(null):i.push(s.value)}}static from(e,n){if(oF(e))return e;if(e[_l])return this._fromAsyncIterator(e[_l](),n);Array.isArray(e)||(e=e===void 0?[]:[e]);let r=0;return new t({...n,read(i){this.push(r===e.length?null:e[r++]),i(null)}})}static isBackpressured(e){return(e._duplexState&CM)!==0||e._readableState.buffered>=e._readableState.highWaterMark}static isPaused(e){return(e._duplexState&Ho)===0}[_l](){let e=this,n=null,r=null,i=null;return this.on("error",l=>{n=l}),this.on("readable",o),this.on("close",s),{[_l](){return this},next(){return new Promise(function(l,c){r=l,i=c;let f=e.read();f!==null?a(f):(e._duplexState&jo)!==0&&a(null)})},return(){return u(null)},throw(l){return u(l)}};function o(){r!==null&&a(e.read())}function s(){r!==null&&a(null)}function a(l){i!==null&&(n?i(n):l===null&&(e._duplexState&_t)===0?i(kl):r({value:l,done:l===null}),i=r=null)}function u(l){return e.destroy(l),new Promise((c,f)=>{if(e._duplexState&jo)return c({value:void 0,done:!0});e.once("close",function(){l?f(l):c({value:void 0,done:!0})})})}}},Sl=class extends Wo{constructor(e){super(e),this._duplexState|=Lt|_t,this._writableState=new wl(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final),e.eagerOpen&&this._writableState.updateNextTick())}cork(){this._duplexState|=Tl}uncork(){this._duplexState&=zv,this._writableState.updateNextTick()}_writev(e,n){n(null)}_write(e,n){this._writableState.autoBatch(e,n)}_final(e){e(null)}static isBackpressured(e){return(e._duplexState&jM)!==0}static drained(e){if(e.destroyed)return Promise.resolve(!1);let n=e._writableState,i=(uF(e)?Math.min(1,n.queue.length):n.queue.length)+(e._duplexState&Up?1:0);return i===0?Promise.resolve(!0):(n.drains===null&&(n.drains=[]),new Promise(o=>{n.drains.push({writes:i,resolve:o})}))}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},zo=class extends vl{constructor(e){super(e),this._duplexState=Lt|this._duplexState&xr,this._writableState=new wl(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final))}cork(){this._duplexState|=Tl}uncork(){this._duplexState&=zv,this._writableState.updateNextTick()}_writev(e,n){n(null)}_write(e,n){this._writableState.autoBatch(e,n)}_final(e){e(null)}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},El=class extends zo{constructor(e){super(e),this._transformState=new Np(this),e&&(e.transform&&(this._transform=e.transform),e.flush&&(this._flush=e.flush))}_write(e,n){this._readableState.buffered>=this._readableState.highWaterMark?this._transformState.data=e:this._transform(e,this._transformState.afterTransform)}_read(e){if(this._transformState.data!==null){let n=this._transformState.data;this._transformState.data=null,e(null),this._transform(n,this._transformState.afterTransform)}else e(null)}destroy(e){super.destroy(e),this._transformState.data!==null&&(this._transformState.data=null,this._transformState.afterTransform())}_transform(e,n){n(null,e)}_flush(e){e(null)}_final(e){this._transformState.afterFinal=e,this._flush(ZM.bind(this))}},Fp=class extends El{};function ZM(t,e){let n=this._transformState.afterFinal;if(t)return n(t);e!=null&&this.push(e),this.push(null),n(null)}function JM(...t){return new Promise((e,n)=>Yv(...t,r=>{if(r)return n(r);e()}))}function Yv(t,...e){let n=Array.isArray(t)?[...t,...e]:[t,...e],r=n.length&&typeof n[n.length-1]=="function"?n.pop():null;if(n.length<2)throw new Error("Pipeline requires at least 2 streams");let i=n[0],o=null,s=null;for(let l=1;l<n.length;l++)o=n[l],Uo(i)?i.pipe(o,u):(a(i,!0,l>1,u),i.pipe(o)),i=o;if(r){let l=!1,c=Uo(o)||!!(o._writableState&&o._writableState.autoDestroy);o.on("error",f=>{s===null&&(s=f)}),o.on("finish",()=>{l=!0,c||r(s)}),c&&o.on("close",()=>r(s||(l?null:Cp)))}return o;function a(l,c,f,p){l.on("error",p),l.on("close",d);function d(){if(c&&l._readableState&&!l._readableState.ended||f&&l._writableState&&!l._writableState.ended)return p(Cp)}}function u(l){if(!(!l||s)){s=l;for(let c of n)c.destroy(l)}}}function XM(t){return t}function Qv(t){return!!t._readableState||!!t._writableState}function Uo(t){return typeof t._duplexState=="number"&&Qv(t)}function eF(t){return!!t._readableState&&t._readableState.ending}function tF(t){return!!t._readableState&&t._readableState.ended}function nF(t){return!!t._writableState&&t._writableState.ending}function rF(t){return!!t._writableState&&t._writableState.ended}function iF(t,e={}){let n=t._readableState&&t._readableState.error||t._writableState&&t._writableState.error;return!e.all&&n===kl?null:n}function oF(t){return Uo(t)&&t.readable}function sF(t){return(t._duplexState&Lt)!==Lt||(t._duplexState&Xt)===Xt||(t._duplexState&Rl)!==0}function aF(t){return typeof t=="object"&&t!==null&&typeof t.byteLength=="number"}function Zv(t){return aF(t)?t.byteLength:1024}function Lv(){}function lF(){this.destroy(new Error("Stream aborted."))}function uF(t){return t._writev!==Sl.prototype._writev&&t._writev!==zo.prototype._writev}Jv.exports={pipeline:Yv,pipelinePromise:JM,isStream:Qv,isStreamx:Uo,isEnding:eF,isEnded:tF,isFinishing:nF,isFinished:rF,isDisturbed:sF,getStreamError:iF,Stream:Wo,Writable:Sl,Readable:vl,Duplex:zo,Transform:El,PassThrough:Fp}});var Kp=R(Ei=>{"use strict";var Y=bi(),cF="0000000000000000000",fF="7777777777777777777",Al=48,Xv=Y.from([117,115,116,97,114,0]),pF=Y.from([Al,Al]),dF=Y.from([117,115,116,97,114,32]),hF=Y.from([32,0]),mF=4095,Ko=257,Gp=263;Ei.decodeLongPath=function(e,n){return Si(e,0,e.length,n)};Ei.encodePax=function(e){let n="";e.name&&(n+=Vp(" path="+e.name+`
8
8
  `)),e.linkname&&(n+=Vp(" linkpath="+e.linkname+`
9
9
  `));let r=e.pax;if(r)for(let i in r)n+=Vp(" "+i+"="+r[i]+`
10
- `);return Y.from(n)};Ei.decodePax=function(e){let n={};for(;e.length;){let r=0;for(;r<e.length&&e[r]!==32;)r++;let i=parseInt(Y.toString(e.subarray(0,r)),10);if(!i)return n;let o=Y.toString(e.subarray(r+1,i-1)),s=o.indexOf("=");if(s===-1)return n;n[o.slice(0,s)]=o.slice(s+1),e=e.subarray(i)}return n};Ei.encode=function(e){let n=Y.alloc(512),r=e.name,i="";if(e.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Y.byteLength(r)!==r.length)return null;for(;Y.byteLength(r)>100;){let o=r.indexOf("/");if(o===-1)return null;i+=i?"/"+r.slice(0,o):r.slice(0,o),r=r.slice(o+1)}return Y.byteLength(r)>100||Y.byteLength(i)>155||e.linkname&&Y.byteLength(e.linkname)>100?null:(Y.write(n,r),Y.write(n,On(e.mode&fF,6),100),Y.write(n,On(e.uid,6),108),Y.write(n,On(e.gid,6),116),bF(e.size,n,124),Y.write(n,On(e.mtime.getTime()/1e3|0,11),136),n[156]=Cl+gF(e.type),e.linkname&&Y.write(n,e.linkname,157),Y.copy(Jv,n,Ko),Y.copy(lF,n,Gp),e.uname&&Y.write(n,e.uname,265),e.gname&&Y.write(n,e.gname,297),Y.write(n,On(e.devmajor||0,6),329),Y.write(n,On(e.devminor||0,6),337),i&&Y.write(n,i,345),Y.write(n,On(e0(n),6),148),n)};Ei.decode=function(e,n,r){let i=e[156]===0?0:e[156]-Cl,o=Si(e,0,100,n),s=In(e,100,8),a=In(e,108,8),u=In(e,116,8),l=In(e,124,12),c=In(e,136,12),f=mF(i),p=e[157]===0?null:Si(e,157,100,n),d=Si(e,265,32),b=Si(e,297,32),g=In(e,329,8),S=In(e,337,8),y=e0(e);if(y===256)return null;if(y!==In(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(pF(e))e[345]&&(o=Si(e,345,155,n)+"/"+o);else if(!dF(e)){if(!r)throw new Error("Invalid tar header: unknown format.")}return i===0&&o&&o[o.length-1]==="/"&&(i=5),{name:o,mode:s,uid:a,gid:u,size:l,byteOffset:0,mtime:new Date(1e3*c),type:f,linkname:p,uname:d,gname:b,devmajor:g,devminor:S,pax:null}};function pF(t){return Y.equals(Jv,t.subarray(Ko,Ko+6))}function dF(t){return Y.equals(uF,t.subarray(Ko,Ko+6))&&Y.equals(cF,t.subarray(Gp,Gp+2))}function hF(t,e,n){return typeof t!="number"?n:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)}function mF(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}function gF(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}function Xv(t,e,n,r){for(;n<r;n++)if(t[n]===e)return n;return r}function e0(t){let e=256;for(let n=0;n<148;n++)e+=t[n];for(let n=156;n<512;n++)e+=t[n];return e}function On(t,e){return t=t.toString(8),t.length>e?aF.slice(0,e)+" ":sF.slice(0,e-t.length)+t+" "}function yF(t,e,n){e[n]=128;for(let r=11;r>0;r--)e[n+r]=t&255,t=Math.floor(t/256)}function bF(t,e,n){t.toString(8).length>11?yF(t,e,n):Y.write(e,On(t,11),n)}function xF(t){let e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;let n=[],r;for(r=t.length-1;r>0;r--){let s=t[r];e?n.push(s):n.push(255-s)}let i=0,o=n.length;for(r=0;r<o;r++)i+=n[r]*Math.pow(256,r);return e?i:-1*i}function In(t,e,n){if(t=t.subarray(e,e+n),e=0,t[e]&128)return xF(t);{for(;e<t.length&&t[e]===32;)e++;let r=hF(Xv(t,32,e,t.length),t.length,t.length);for(;e<r&&t[e]===0;)e++;return r===e?0:parseInt(Y.toString(t.subarray(e,r)),8)}}function Si(t,e,n,r){return Y.toString(t.subarray(e,Xv(t,0,e,e+n)),r)}function Vp(t){let e=Y.byteLength(t),n=Math.floor(Math.log(e)/Math.log(10))+1;return e+n>=Math.pow(10,n)&&n++,e+n+t}});var o0=R((E8,i0)=>{"use strict";var{Writable:_F,Readable:wF,getStreamError:t0}=Hp(),vF=Ap(),n0=bi(),ki=Kp(),SF=n0.alloc(0),EF=4*1024*1024,Qp=class{constructor(){this.buffered=0,this.shifted=0,this.queue=new vF,this._offset=0}push(e){this.buffered+=e.byteLength,this.queue.push(e)}shiftFirst(e){return this.buffered===0?null:this._next(e)}shift(e){if(e>this.buffered)return null;if(e===0)return SF;let n=this._next(e);if(e===n.byteLength)return n;let r=[n];for(;(e-=n.byteLength)>0;)n=this._next(e),r.push(n);return n0.concat(r)}_next(e){let n=this.queue.peek(),r=n.byteLength-this._offset;if(e>=r){let i=this._offset?n.subarray(this._offset,n.byteLength):n;return this.queue.shift(),this._offset=0,this.buffered-=r,this.shifted+=r,i}return this.buffered-=e,this.shifted+=e,n.subarray(this._offset,this._offset+=e)}},Zp=class extends wF{constructor(e,n,r){super(),this.header=n,this.offset=r,this._parent=e}_read(e){this.header.size===0&&this.push(null),this._parent._stream===this&&this._parent._update(),e(null)}_predestroy(){this._parent.destroy(t0(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=r0(this.header.size),this._parent._update())}_destroy(e){this._detach(),e(null)}},Jp=class extends _F{constructor(e){super(e),e||(e={}),this._buffer=new Qp,this._offset=0,this._header=null,this._stream=null,this._missing=0,this._longHeader=!1,this._callback=Yp,this._locked=!1,this._finished=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null,this._filenameEncoding=e.filenameEncoding||"utf-8",this._allowUnknownFormat=!!e.allowUnknownFormat,this._unlockBound=this._unlock.bind(this)}_unlock(e){if(this._locked=!1,e){this.destroy(e),this._continueWrite(e);return}this._update()}_consumeHeader(){if(this._locked)return!1;this._offset=this._buffer.shifted;try{this._header=ki.decode(this._buffer.shift(512),this._filenameEncoding,this._allowUnknownFormat)}catch(e){return this._continueWrite(e),!1}if(!this._header)return!0;switch(this._header.byteOffset=this._buffer.shifted,this._header.type){case"gnu-long-path":case"gnu-long-link-path":case"pax-global-header":case"pax-header":return this._longHeader=!0,this._missing=this._header.size,this._missing>EF?(this._continueWrite(new Error("Header exceeds max size")),!1):!0}return this._locked=!0,this._applyLongHeaders(),this._header.size>=0?this._header.size===0||this._header.type==="directory"?(this.emit("entry",this._header,this._createStream(),this._unlockBound),!0):(this._stream=this._createStream(),this._missing=this._header.size,this.emit("entry",this._header,this._stream,this._unlockBound),!0):(this._continueWrite(new Error("Invalid header")),!1)}_applyLongHeaders(){this._gnuLongPath&&(this._header.name=this._gnuLongPath,this._gnuLongPath=null),this._gnuLongLinkPath&&(this._header.linkname=this._gnuLongLinkPath,this._gnuLongLinkPath=null),this._pax&&(this._pax.path&&(this._header.name=this._pax.path),this._pax.linkpath&&(this._header.linkname=this._pax.linkpath),this._pax.size&&(this._header.size=parseInt(this._pax.size,10)),this._header.pax=this._pax,this._pax=null)}_decodeLongHeader(e){switch(this._header.type){case"gnu-long-path":this._gnuLongPath=ki.decodeLongPath(e,this._filenameEncoding);break;case"gnu-long-link-path":this._gnuLongLinkPath=ki.decodeLongPath(e,this._filenameEncoding);break;case"pax-global-header":this._paxGlobal=ki.decodePax(e);break;case"pax-header":this._pax=this._paxGlobal===null?ki.decodePax(e):Object.assign({},this._paxGlobal,ki.decodePax(e));break}}_consumeLongHeader(){this._longHeader=!1,this._missing=r0(this._header.size);let e=this._buffer.shift(this._header.size);try{this._decodeLongHeader(e)}catch(n){return this._continueWrite(n),!1}return!0}_consumeStream(){let e=this._buffer.shiftFirst(this._missing);if(e===null)return!1;this._missing-=e.byteLength;let n=this._stream.push(e);return this._missing===0?(this._stream.push(null),n&&this._stream._detach(),n&&this._locked===!1):n}_createStream(){return new Zp(this,this._header,this._offset)}_update(){for(;this._buffer.buffered>0&&!this.destroying;){if(this._missing>0){if(this._stream!==null){if(this._consumeStream()===!1)return;continue}if(this._longHeader===!0){if(this._missing>this._buffer.buffered)break;if(this._consumeLongHeader()===!1)return!1;continue}let e=this._buffer.shiftFirst(this._missing);e!==null&&(this._missing-=e.byteLength);continue}if(this._buffer.buffered<512)break;if(this._stream!==null||this._consumeHeader()===!1)return}this._continueWrite(null)}_continueWrite(e){let n=this._callback;this._callback=Yp,n(e)}_write(e,n){this._callback=n,this._buffer.push(e),this._update()}_final(e){this._finished=this._missing===0&&this._buffer.buffered===0,e(this._finished?null:new Error("Unexpected end of data"))}_predestroy(){this._continueWrite(null)}_destroy(e){this._stream&&this._stream.destroy(t0(this)),e(null)}[Symbol.asyncIterator](){let e=null,n=null,r=null,i=null,o=null,s=this;return this.on("entry",l),this.on("error",p=>{e=p}),this.on("close",c),{[Symbol.asyncIterator](){return this},next(){return new Promise(u)},return(){return f(null)},throw(p){return f(p)}};function a(p){if(!o)return;let d=o;o=null,d(p)}function u(p,d){if(e)return d(e);if(i){p({value:i,done:!1}),i=null;return}n=p,r=d,a(null),s._finished&&n&&(n({value:void 0,done:!0}),n=r=null)}function l(p,d,b){o=b,d.on("error",Yp),n?(n({value:d,done:!1}),n=r=null):i=d}function c(){a(e),n&&(e?r(e):n({value:void 0,done:!0}),n=r=null)}function f(p){return s.destroy(p),a(p),new Promise((d,b)=>{if(s.destroyed)return d({value:void 0,done:!0});s.once("close",function(){p?b(p):d({value:void 0,done:!0})})})}}};i0.exports=function(e){return new Jp(e)};function Yp(){}function r0(t){return t&=511,t&&512-t}});var a0=R((k8,Xp)=>{"use strict";var s0={S_IFMT:61440,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960};try{Xp.exports=K("fs").constants||s0}catch{Xp.exports=s0}});var p0=R((D8,f0)=>{"use strict";var{Readable:kF,Writable:DF,getStreamError:l0}=Hp(),vr=bi(),Di=a0(),Il=Kp(),TF=493,RF=420,u0=vr.alloc(1024),td=class extends DF{constructor(e,n,r){super({mapWritable:CF,eagerOpen:!0}),this.written=0,this.header=n,this._callback=r,this._linkname=null,this._isLinkname=n.type==="symlink"&&!n.linkname,this._isVoid=n.type!=="file"&&n.type!=="contiguous-file",this._finished=!1,this._pack=e,this._openCallback=null,this._pack._stream===null?this._pack._stream=this:this._pack._pending.push(this)}_open(e){this._openCallback=e,this._pack._stream===this&&this._continueOpen()}_continuePack(e){if(this._callback===null)return;let n=this._callback;this._callback=null,n(e)}_continueOpen(){this._pack._stream===null&&(this._pack._stream=this);let e=this._openCallback;if(this._openCallback=null,e!==null){if(this._pack.destroying)return e(new Error("pack stream destroyed"));if(this._pack._finalized)return e(new Error("pack stream is already finalized"));this._pack._stream=this,this._isLinkname||this._pack._encode(this.header),this._isVoid&&(this._finish(),this._continuePack(null)),e(null)}}_write(e,n){if(this._isLinkname)return this._linkname=this._linkname?vr.concat([this._linkname,e]):e,n(null);if(this._isVoid)return e.byteLength>0?n(new Error("No body allowed for this entry")):n();if(this.written+=e.byteLength,this._pack.push(e))return n();this._pack._drain=n}_finish(){this._finished||(this._finished=!0,this._isLinkname&&(this.header.linkname=this._linkname?vr.toString(this._linkname,"utf-8"):"",this._pack._encode(this.header)),c0(this._pack,this.header.size),this._pack._done(this))}_final(e){if(this.written!==this.header.size)return e(new Error("Size mismatch"));this._finish(),e(null)}_getError(){return l0(this)||new Error("tar entry destroyed")}_predestroy(){this._pack.destroy(this._getError())}_destroy(e){this._pack._done(this),this._continuePack(this._finished?null:this._getError()),e()}},nd=class extends kF{constructor(e){super(e),this._drain=ed,this._finalized=!1,this._finalizing=!1,this._pending=[],this._stream=null}entry(e,n,r){if(this._finalized||this.destroying)throw new Error("already finalized or destroyed");typeof n=="function"&&(r=n,n=null),r||(r=ed),(!e.size||e.type==="symlink")&&(e.size=0),e.type||(e.type=AF(e.mode)),e.mode||(e.mode=e.type==="directory"?TF:RF),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),typeof n=="string"&&(n=vr.from(n));let i=new td(this,e,r);return vr.isBuffer(n)?(e.size=n.byteLength,i.write(n),i.end(),i):(i._isVoid,i)}finalize(){if(this._stream||this._pending.length>0){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(u0),this.push(null))}_done(e){e===this._stream&&(this._stream=null,this._finalizing&&this.finalize(),this._pending.length&&this._pending.shift()._continueOpen())}_encode(e){if(!e.pax){let n=Il.encode(e);if(n){this.push(n);return}}this._encodePax(e)}_encodePax(e){let n=Il.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),r={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:n.byteLength,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(Il.encode(r)),this.push(n),c0(this,n.byteLength),r.size=e.size,r.type=e.type,this.push(Il.encode(r))}_doDrain(){let e=this._drain;this._drain=ed,e()}_predestroy(){let e=l0(this);for(this._stream&&this._stream.destroy(e);this._pending.length;){let n=this._pending.shift();n.destroy(e),n._continueOpen()}this._doDrain()}_read(e){this._doDrain(),e()}};f0.exports=function(e){return new nd(e)};function AF(t){switch(t&Di.S_IFMT){case Di.S_IFBLK:return"block-device";case Di.S_IFCHR:return"character-device";case Di.S_IFDIR:return"directory";case Di.S_IFIFO:return"fifo";case Di.S_IFLNK:return"symlink"}return"file"}function ed(){}function c0(t,e){e&=511,e&&t.push(u0.subarray(0,512-e))}function CF(t){return vr.isBuffer(t)?t:vr.from(t)}});var d0=R(rd=>{"use strict";rd.extract=o0();rd.pack=p0()});var L0=R(je=>{"use strict";var KF=je&&je.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),YF=je&&je.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),cd=je&&je.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&KF(n,e,r[i]);return YF(n,e),n}})();Object.defineProperty(je,"__esModule",{value:!0});je.FileSystem=void 0;je.uriToFilePath=ZF;je.resolve=Wl;je.resolveGlobalNodePath=ld;je.resolveGlobalYarnPath=JF;je.resolveModulePath=XF;var QF=cd(K("url")),wt=cd(K("path")),sd=cd(K("fs")),fd=K("child_process");function ZF(t){let e=QF.parse(t);if(e.protocol!=="file:"||!e.path)return;let n=e.path.split("/");for(let r=0,i=n.length;r<i;r++)n[r]=decodeURIComponent(n[r]);if(process.platform==="win32"&&n.length>1){let r=n[0],i=n[1];r.length===0&&i.length>1&&i[1]===":"&&n.shift()}return wt.normalize(n.join("/"))}function ad(){return process.platform==="win32"}function Wl(t,e,n,r){let i="NODE_PATH",o=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,a)=>{let u=process.env,l=Object.create(null);Object.keys(u).forEach(c=>l[c]=u[c]),e&&sd.existsSync(e)&&(l[i]?l[i]=e+wt.delimiter+l[i]:l[i]=e,r&&r(`NODE_PATH value is: ${l[i]}`)),l.ELECTRON_RUN_AS_NODE="1";try{let c=(0,fd.fork)("",[],{cwd:n,env:l,execArgv:["-e",o]});if(c.pid===void 0){a(new Error(`Starting process to resolve node module ${t} failed`));return}c.on("error",p=>{a(p)}),c.on("message",p=>{p.c==="r"&&(c.send({c:"e"}),p.s?s(p.r):a(new Error(`Failed to resolve module: ${t}`)))});let f={c:"rs",a:t};c.send(f)}catch(c){a(c)}})}function ld(t){let e="npm",n=Object.create(null);Object.keys(process.env).forEach(o=>n[o]=process.env[o]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};ad()&&(e="npm.cmd",r.shell=!0);let i=()=>{};try{process.on("SIGPIPE",i);let o=(0,fd.spawnSync)(e,["config","get","prefix"],r).stdout;if(!o){t&&t("'npm config get prefix' didn't return a value.");return}let s=o.trim();return t&&t(`'npm config get prefix' value is: ${s}`),s.length>0?ad()?wt.join(s,"node_modules"):wt.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",i)}}function JF(t){let e="yarn",n={encoding:"utf8"};ad()&&(e="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let i=(0,fd.spawnSync)(e,["global","dir","--json"],n),o=i.stdout;if(!o){t&&(t("'yarn global dir' didn't return a value."),i.stderr&&t(i.stderr));return}let s=o.trim().split(/\r?\n/);for(let a of s)try{let u=JSON.parse(a);if(u.type==="log")return wt.join(u.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var ud;(function(t){let e;function n(){return e!==void 0||(process.platform==="win32"?e=!1:e=!sd.existsSync(__filename.toUpperCase())||!sd.existsSync(__filename.toLowerCase())),e}t.isCaseSensitive=n;function r(i,o){return n()?wt.normalize(o).indexOf(wt.normalize(i))===0:wt.normalize(o).toLowerCase().indexOf(wt.normalize(i).toLowerCase())===0}t.isParent=r})(ud||(je.FileSystem=ud={}));function XF(t,e,n,r){return n?(wt.isAbsolute(n)||(n=wt.join(t,n)),Wl(e,n,n,r).then(i=>ud.isParent(n,i)?i:Promise.reject(new Error(`Failed to load ${e} from node path location.`))).then(void 0,i=>Wl(e,ld(r),t,r))):Wl(e,ld(r),t,r)}});var Ul=R(Be=>{"use strict";var q0=Be&&Be.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),e2=Be&&Be.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),j0=Be&&Be.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&q0(n,e,r[i]);return e2(n,e),n}})(),B0=Be&&Be.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&q0(e,t,n)};Object.defineProperty(Be,"__esModule",{value:!0});Be.Files=void 0;Be.createConnection=i2;var N0=K("node:util"),pd=j0(Vs()),t2=Tc(),Qo=j0(L0()),Sr=Od();B0(Od(),Be);B0(ro(),Be);var M0;(function(t){t.uriToFilePath=Qo.uriToFilePath,t.resolveGlobalNodePath=Qo.resolveGlobalNodePath,t.resolveGlobalYarnPath=Qo.resolveGlobalYarnPath,t.resolve=Qo.resolve,t.resolveModulePath=Qo.resolveModulePath})(M0||(Be.Files=M0={}));var F0;function zl(){if(F0!==void 0)try{F0.end()}catch{}}var Ai=!1,W0;function n2(){let t="--clientProcessId";function e(n){try{let r=parseInt(n);isNaN(r)||(W0=setInterval(()=>{try{process.kill(r,0)}catch{zl(),process.exit(Ai?0:1)}},3e3))}catch{}}for(let n=2;n<process.argv.length;n++){let r=process.argv[n];if(r===t&&n+1<process.argv.length){e(process.argv[n+1]);return}else{let i=r.split("=");i[0]===t&&e(i[1])}}}n2();var r2={initialize:t=>{let e=t.processId;pd.number(e)&&W0===void 0&&setInterval(()=>{try{process.kill(e,0)}catch{process.exit(Ai?0:1)}},3e3)},get shutdownReceived(){return Ai},set shutdownReceived(t){Ai=t},exit:t=>{zl(),process.exit(t)}};function i2(t,e,n,r){let i,o,s,a;return t!==void 0&&t.__brand==="features"&&(i=t,t=e,e=n,n=r),Sr.ConnectionStrategy.is(t)||Sr.ConnectionOptions.is(t)?a=t:(o=t,s=e,a=n),o2(o,s,a,i)}function o2(t,e,n,r){let i=!1;if(!t&&!e&&process.argv.length>2){let a,u,l=process.argv.slice(2);for(let c=0;c<l.length;c++){let f=l[c];if(f==="--node-ipc"){t=new Sr.IPCMessageReader(process),e=new Sr.IPCMessageWriter(process);break}else if(f==="--stdio"){i=!0,t=process.stdin,e=process.stdout;break}else if(f==="--socket"){a=parseInt(l[c+1]);break}else if(f==="--pipe"){u=l[c+1];break}else{let p=f.split("=");if(p[0]==="--socket"){a=parseInt(p[1]);break}else if(p[0]==="--pipe"){u=p[1];break}}}if(a){let c=(0,Sr.createServerSocketTransport)(a);t=c[0],e=c[1]}else if(u){let c=(0,Sr.createServerPipeTransport)(u);t=c[0],e=c[1]}}let o="Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'";if(!t)throw new Error("Connection input stream is not set. "+o);if(!e)throw new Error("Connection output stream is not set. "+o);if(pd.func(t.read)&&pd.func(t.on)){let a=t;a.on("end",()=>{zl(),process.exit(Ai?0:1)}),a.on("close",()=>{zl(),process.exit(Ai?0:1)})}let s=a=>{let u=(0,Sr.createProtocolConnection)(t,e,a,n);return i&&s2(a),u};return(0,t2.createConnection)(s,r2,r)}function s2(t){function e(r){return r.map(i=>typeof i=="string"?i:(0,N0.inspect)(i)).join(" ")}let n=new Map;console.assert=function(i,...o){if(!i)if(o.length===0)t.error("Assertion failed");else{let[s,...a]=o;t.error(`Assertion failed: ${s} ${e(a)}`)}},console.count=function(i="default"){let o=String(i),s=n.get(o)??0;s+=1,n.set(o,s),t.log(`${o}: ${o}`)},console.countReset=function(i){i===void 0?n.clear():n.delete(String(i))},console.debug=function(...i){t.log(e(i))},console.dir=function(i,o){t.log((0,N0.inspect)(i,o))},console.log=function(...i){t.log(e(i))},console.error=function(...i){t.error(e(i))},console.trace=function(...i){let o=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";i.length!==0&&(s+=`: ${e(i)}`),t.log(`${s}
11
- ${o}`)},console.warn=function(...i){t.warn(e(i))}}});var rn=class extends Error{constructor(e,n,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=n,this.exitCode=e,this.nestedError=void 0}},Wn=class extends rn{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};var Ni=class{constructor(e,n){switch(this.description=n||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,n){return n===this.defaultValue||!Array.isArray(n)?[e]:(n.push(e),n)}default(e,n){return this.defaultValue=e,this.defaultValueDescription=n,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,r)=>{if(!this.argChoices.includes(n))throw new Wn(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(n,r):n},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function rs(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}import{EventEmitter as lS}from"node:events";import Zl from"node:child_process";import Ut from"node:path";import os from"node:fs";import Z from"node:process";import{stripVTControlCharacters as uS}from"node:util";import{stripVTControlCharacters as oS}from"node:util";var Mi=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let n=e.commands.filter(i=>!i._hidden),r=e._getHelpCommand();return r&&!r._hidden&&n.push(r),this.sortSubcommands&&n.sort((i,o)=>i.name().localeCompare(o.name())),n}compareOptions(e,n){let r=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return r(e).localeCompare(r(n))}visibleOptions(e){let n=e.options.filter(i=>!i.hidden),r=e._getHelpOption();if(r&&!r.hidden){let i=r.short&&e._findOption(r.short),o=r.long&&e._findOption(r.long);!i&&!o?n.push(r):r.long&&!o?n.push(e.createOption(r.long,r.description)):r.short&&!i&&n.push(e.createOption(r.short,r.description))}return this.sortOptions&&n.sort(this.compareOptions),n}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let n=[];for(let r=e.parent;r;r=r.parent){let i=r.options.filter(o=>!o.hidden);n.push(...i)}return this.sortOptions&&n.sort(this.compareOptions),n}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(n=>{n.description=n.description||e._argsDescription[n.name()]||""}),e.registeredArguments.find(n=>n.description)?e.registeredArguments:[]}subcommandTerm(e){let n=e.registeredArguments.map(r=>rs(r)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(n?" "+n:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,n){return n.visibleCommands(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleSubcommandTerm(n.subcommandTerm(i)))),0)}longestOptionTermLength(e,n){return n.visibleOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleOptionTerm(n.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,n){return n.visibleGlobalOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleOptionTerm(n.optionTerm(i)))),0)}longestArgumentTermLength(e,n){return n.visibleArguments(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleArgumentTerm(n.argumentTerm(i)))),0)}commandUsage(e){let n=e._name;e._aliases[0]&&(n=n+"|"+e._aliases[0]);let r="";for(let i=e.parent;i;i=i.parent)r=i.name()+" "+r;return r+n+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let n=[];if(e.argChoices&&n.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&n.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&n.push(`env: ${e.envVar}`),n.length>0){let r=`(${n.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}argumentDescription(e){let n=[];if(e.argChoices&&n.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),n.length>0){let r=`(${n.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatItemList(e,n,r){return n.length===0?[]:[r.styleTitle(e),...n,""]}groupItems(e,n,r){let i=new Map;return e.forEach(o=>{let s=r(o);i.has(s)||i.set(s,[])}),n.forEach(o=>{let s=r(o);i.has(s)||i.set(s,[]),i.get(s).push(o)}),i}formatHelp(e,n){let r=n.padWidth(e,n),i=n.helpWidth??80;function o(f,p){return n.formatItem(f,r,p,n)}let s=[`${n.styleTitle("Usage:")} ${n.styleUsage(n.commandUsage(e))}`,""],a=n.commandDescription(e);a.length>0&&(s=s.concat([n.boxWrap(n.styleCommandDescription(a),i),""]));let u=n.visibleArguments(e).map(f=>o(n.styleArgumentTerm(n.argumentTerm(f)),n.styleArgumentDescription(n.argumentDescription(f))));if(s=s.concat(this.formatItemList("Arguments:",u,n)),this.groupItems(e.options,n.visibleOptions(e),f=>f.helpGroupHeading??"Options:").forEach((f,p)=>{let d=f.map(b=>o(n.styleOptionTerm(n.optionTerm(b)),n.styleOptionDescription(n.optionDescription(b))));s=s.concat(this.formatItemList(p,d,n))}),n.showGlobalOptions){let f=n.visibleGlobalOptions(e).map(p=>o(n.styleOptionTerm(n.optionTerm(p)),n.styleOptionDescription(n.optionDescription(p))));s=s.concat(this.formatItemList("Global Options:",f,n))}return this.groupItems(e.commands,n.visibleCommands(e),f=>f.helpGroup()||"Commands:").forEach((f,p)=>{let d=f.map(b=>o(n.styleSubcommandTerm(n.subcommandTerm(b)),n.styleSubcommandDescription(n.subcommandDescription(b))));s=s.concat(this.formatItemList(p,d,n))}),s.join(`
12
- `)}displayWidth(e){return oS(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(n=>n==="[options]"?this.styleOptionText(n):n==="[command]"?this.styleSubcommandText(n):n[0]==="["||n[0]==="<"?this.styleArgumentText(n):this.styleCommandText(n)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(n=>n==="[options]"?this.styleOptionText(n):n[0]==="["||n[0]==="<"?this.styleArgumentText(n):this.styleSubcommandText(n)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,n){return Math.max(n.longestOptionTermLength(e,n),n.longestGlobalOptionTermLength(e,n),n.longestSubcommandTermLength(e,n),n.longestArgumentTermLength(e,n))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,n,r,i){let s=" ".repeat(2);if(!r)return s+e;let a=e.padEnd(n+e.length-i.displayWidth(e)),u=2,c=(this.helpWidth??80)-n-u-2,f;return c<this.minWidthToWrap||i.preformatted(r)?f=r:f=i.boxWrap(r,c).replace(/\n/g,`
10
+ `);return Y.from(n)};Ei.decodePax=function(e){let n={};for(;e.length;){let r=0;for(;r<e.length&&e[r]!==32;)r++;let i=parseInt(Y.toString(e.subarray(0,r)),10);if(!i)return n;let o=Y.toString(e.subarray(r+1,i-1)),s=o.indexOf("=");if(s===-1)return n;n[o.slice(0,s)]=o.slice(s+1),e=e.subarray(i)}return n};Ei.encode=function(e){let n=Y.alloc(512),r=e.name,i="";if(e.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Y.byteLength(r)!==r.length)return null;for(;Y.byteLength(r)>100;){let o=r.indexOf("/");if(o===-1)return null;i+=i?"/"+r.slice(0,o):r.slice(0,o),r=r.slice(o+1)}return Y.byteLength(r)>100||Y.byteLength(i)>155||e.linkname&&Y.byteLength(e.linkname)>100?null:(Y.write(n,r),Y.write(n,On(e.mode&mF,6),100),Y.write(n,On(e.uid,6),108),Y.write(n,On(e.gid,6),116),vF(e.size,n,124),Y.write(n,On(e.mtime.getTime()/1e3|0,11),136),n[156]=Al+_F(e.type),e.linkname&&Y.write(n,e.linkname,157),Y.copy(Xv,n,Ko),Y.copy(pF,n,Gp),e.uname&&Y.write(n,e.uname,265),e.gname&&Y.write(n,e.gname,297),Y.write(n,On(e.devmajor||0,6),329),Y.write(n,On(e.devminor||0,6),337),i&&Y.write(n,i,345),Y.write(n,On(t0(n),6),148),n)};Ei.decode=function(e,n,r){let i=e[156]===0?0:e[156]-Al,o=Si(e,0,100,n),s=In(e,100,8),a=In(e,108,8),u=In(e,116,8),l=In(e,124,12),c=In(e,136,12),f=xF(i),p=e[157]===0?null:Si(e,157,100,n),d=Si(e,265,32),b=Si(e,297,32),g=In(e,329,8),S=In(e,337,8),y=t0(e);if(y===256)return null;if(y!==In(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(gF(e))e[345]&&(o=Si(e,345,155,n)+"/"+o);else if(!yF(e)){if(!r)throw new Error("Invalid tar header: unknown format.")}return i===0&&o&&o[o.length-1]==="/"&&(i=5),{name:o,mode:s,uid:a,gid:u,size:l,byteOffset:0,mtime:new Date(1e3*c),type:f,linkname:p,uname:d,gname:b,devmajor:g,devminor:S,pax:null}};function gF(t){return Y.equals(Xv,t.subarray(Ko,Ko+6))}function yF(t){return Y.equals(dF,t.subarray(Ko,Ko+6))&&Y.equals(hF,t.subarray(Gp,Gp+2))}function bF(t,e,n){return typeof t!="number"?n:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)}function xF(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}function _F(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}function e0(t,e,n,r){for(;n<r;n++)if(t[n]===e)return n;return r}function t0(t){let e=256;for(let n=0;n<148;n++)e+=t[n];for(let n=156;n<512;n++)e+=t[n];return e}function On(t,e){return t=t.toString(8),t.length>e?fF.slice(0,e)+" ":cF.slice(0,e-t.length)+t+" "}function wF(t,e,n){e[n]=128;for(let r=11;r>0;r--)e[n+r]=t&255,t=Math.floor(t/256)}function vF(t,e,n){t.toString(8).length>11?wF(t,e,n):Y.write(e,On(t,11),n)}function SF(t){let e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;let n=[],r;for(r=t.length-1;r>0;r--){let s=t[r];e?n.push(s):n.push(255-s)}let i=0,o=n.length;for(r=0;r<o;r++)i+=n[r]*Math.pow(256,r);return e?i:-1*i}function In(t,e,n){if(t=t.subarray(e,e+n),e=0,t[e]&128)return SF(t);{for(;e<t.length&&t[e]===32;)e++;let r=bF(e0(t,32,e,t.length),t.length,t.length);for(;e<r&&t[e]===0;)e++;return r===e?0:parseInt(Y.toString(t.subarray(e,r)),8)}}function Si(t,e,n,r){return Y.toString(t.subarray(e,e0(t,0,e,e+n)),r)}function Vp(t){let e=Y.byteLength(t),n=Math.floor(Math.log(e)/Math.log(10))+1;return e+n>=Math.pow(10,n)&&n++,e+n+t}});var s0=R((A8,o0)=>{"use strict";var{Writable:EF,Readable:kF,getStreamError:n0}=Hp(),DF=Ap(),r0=bi(),ki=Kp(),TF=r0.alloc(0),RF=4*1024*1024,Qp=class{constructor(){this.buffered=0,this.shifted=0,this.queue=new DF,this._offset=0}push(e){this.buffered+=e.byteLength,this.queue.push(e)}shiftFirst(e){return this.buffered===0?null:this._next(e)}shift(e){if(e>this.buffered)return null;if(e===0)return TF;let n=this._next(e);if(e===n.byteLength)return n;let r=[n];for(;(e-=n.byteLength)>0;)n=this._next(e),r.push(n);return r0.concat(r)}_next(e){let n=this.queue.peek(),r=n.byteLength-this._offset;if(e>=r){let i=this._offset?n.subarray(this._offset,n.byteLength):n;return this.queue.shift(),this._offset=0,this.buffered-=r,this.shifted+=r,i}return this.buffered-=e,this.shifted+=e,n.subarray(this._offset,this._offset+=e)}},Zp=class extends kF{constructor(e,n,r){super(),this.header=n,this.offset=r,this._parent=e}_read(e){this.header.size===0&&this.push(null),this._parent._stream===this&&this._parent._update(),e(null)}_predestroy(){this._parent.destroy(n0(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=i0(this.header.size),this._parent._update())}_destroy(e){this._detach(),e(null)}},Jp=class extends EF{constructor(e){super(e),e||(e={}),this._buffer=new Qp,this._offset=0,this._header=null,this._stream=null,this._missing=0,this._longHeader=!1,this._callback=Yp,this._locked=!1,this._finished=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null,this._filenameEncoding=e.filenameEncoding||"utf-8",this._allowUnknownFormat=!!e.allowUnknownFormat,this._unlockBound=this._unlock.bind(this)}_unlock(e){if(this._locked=!1,e){this.destroy(e),this._continueWrite(e);return}this._update()}_consumeHeader(){if(this._locked)return!1;this._offset=this._buffer.shifted;try{this._header=ki.decode(this._buffer.shift(512),this._filenameEncoding,this._allowUnknownFormat)}catch(e){return this._continueWrite(e),!1}if(!this._header)return!0;switch(this._header.byteOffset=this._buffer.shifted,this._header.type){case"gnu-long-path":case"gnu-long-link-path":case"pax-global-header":case"pax-header":return this._longHeader=!0,this._missing=this._header.size,this._missing>RF?(this._continueWrite(new Error("Header exceeds max size")),!1):!0}return this._locked=!0,this._applyLongHeaders(),this._header.size>=0?this._header.size===0||this._header.type==="directory"?(this.emit("entry",this._header,this._createStream(),this._unlockBound),!0):(this._stream=this._createStream(),this._missing=this._header.size,this.emit("entry",this._header,this._stream,this._unlockBound),!0):(this._continueWrite(new Error("Invalid header")),!1)}_applyLongHeaders(){this._gnuLongPath&&(this._header.name=this._gnuLongPath,this._gnuLongPath=null),this._gnuLongLinkPath&&(this._header.linkname=this._gnuLongLinkPath,this._gnuLongLinkPath=null),this._pax&&(this._pax.path&&(this._header.name=this._pax.path),this._pax.linkpath&&(this._header.linkname=this._pax.linkpath),this._pax.size&&(this._header.size=parseInt(this._pax.size,10)),this._header.pax=this._pax,this._pax=null)}_decodeLongHeader(e){switch(this._header.type){case"gnu-long-path":this._gnuLongPath=ki.decodeLongPath(e,this._filenameEncoding);break;case"gnu-long-link-path":this._gnuLongLinkPath=ki.decodeLongPath(e,this._filenameEncoding);break;case"pax-global-header":this._paxGlobal=ki.decodePax(e);break;case"pax-header":this._pax=this._paxGlobal===null?ki.decodePax(e):Object.assign({},this._paxGlobal,ki.decodePax(e));break}}_consumeLongHeader(){this._longHeader=!1,this._missing=i0(this._header.size);let e=this._buffer.shift(this._header.size);try{this._decodeLongHeader(e)}catch(n){return this._continueWrite(n),!1}return!0}_consumeStream(){let e=this._buffer.shiftFirst(this._missing);if(e===null)return!1;this._missing-=e.byteLength;let n=this._stream.push(e);return this._missing===0?(this._stream.push(null),n&&this._stream._detach(),n&&this._locked===!1):n}_createStream(){return new Zp(this,this._header,this._offset)}_update(){for(;this._buffer.buffered>0&&!this.destroying;){if(this._missing>0){if(this._stream!==null){if(this._consumeStream()===!1)return;continue}if(this._longHeader===!0){if(this._missing>this._buffer.buffered)break;if(this._consumeLongHeader()===!1)return!1;continue}let e=this._buffer.shiftFirst(this._missing);e!==null&&(this._missing-=e.byteLength);continue}if(this._buffer.buffered<512)break;if(this._stream!==null||this._consumeHeader()===!1)return}this._continueWrite(null)}_continueWrite(e){let n=this._callback;this._callback=Yp,n(e)}_write(e,n){this._callback=n,this._buffer.push(e),this._update()}_final(e){this._finished=this._missing===0&&this._buffer.buffered===0,e(this._finished?null:new Error("Unexpected end of data"))}_predestroy(){this._continueWrite(null)}_destroy(e){this._stream&&this._stream.destroy(n0(this)),e(null)}[Symbol.asyncIterator](){let e=null,n=null,r=null,i=null,o=null,s=this;return this.on("entry",l),this.on("error",p=>{e=p}),this.on("close",c),{[Symbol.asyncIterator](){return this},next(){return new Promise(u)},return(){return f(null)},throw(p){return f(p)}};function a(p){if(!o)return;let d=o;o=null,d(p)}function u(p,d){if(e)return d(e);if(i){p({value:i,done:!1}),i=null;return}n=p,r=d,a(null),s._finished&&n&&(n({value:void 0,done:!0}),n=r=null)}function l(p,d,b){o=b,d.on("error",Yp),n?(n({value:d,done:!1}),n=r=null):i=d}function c(){a(e),n&&(e?r(e):n({value:void 0,done:!0}),n=r=null)}function f(p){return s.destroy(p),a(p),new Promise((d,b)=>{if(s.destroyed)return d({value:void 0,done:!0});s.once("close",function(){p?b(p):d({value:void 0,done:!0})})})}}};o0.exports=function(e){return new Jp(e)};function Yp(){}function i0(t){return t&=511,t&&512-t}});var l0=R((C8,Xp)=>{"use strict";var a0={S_IFMT:61440,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960};try{Xp.exports=K("fs").constants||a0}catch{Xp.exports=a0}});var d0=R((I8,p0)=>{"use strict";var{Readable:AF,Writable:CF,getStreamError:u0}=Hp(),wr=bi(),Di=l0(),Cl=Kp(),IF=493,OF=420,c0=wr.alloc(1024),td=class extends CF{constructor(e,n,r){super({mapWritable:LF,eagerOpen:!0}),this.written=0,this.header=n,this._callback=r,this._linkname=null,this._isLinkname=n.type==="symlink"&&!n.linkname,this._isVoid=n.type!=="file"&&n.type!=="contiguous-file",this._finished=!1,this._pack=e,this._openCallback=null,this._pack._stream===null?this._pack._stream=this:this._pack._pending.push(this)}_open(e){this._openCallback=e,this._pack._stream===this&&this._continueOpen()}_continuePack(e){if(this._callback===null)return;let n=this._callback;this._callback=null,n(e)}_continueOpen(){this._pack._stream===null&&(this._pack._stream=this);let e=this._openCallback;if(this._openCallback=null,e!==null){if(this._pack.destroying)return e(new Error("pack stream destroyed"));if(this._pack._finalized)return e(new Error("pack stream is already finalized"));this._pack._stream=this,this._isLinkname||this._pack._encode(this.header),this._isVoid&&(this._finish(),this._continuePack(null)),e(null)}}_write(e,n){if(this._isLinkname)return this._linkname=this._linkname?wr.concat([this._linkname,e]):e,n(null);if(this._isVoid)return e.byteLength>0?n(new Error("No body allowed for this entry")):n();if(this.written+=e.byteLength,this._pack.push(e))return n();this._pack._drain=n}_finish(){this._finished||(this._finished=!0,this._isLinkname&&(this.header.linkname=this._linkname?wr.toString(this._linkname,"utf-8"):"",this._pack._encode(this.header)),f0(this._pack,this.header.size),this._pack._done(this))}_final(e){if(this.written!==this.header.size)return e(new Error("Size mismatch"));this._finish(),e(null)}_getError(){return u0(this)||new Error("tar entry destroyed")}_predestroy(){this._pack.destroy(this._getError())}_destroy(e){this._pack._done(this),this._continuePack(this._finished?null:this._getError()),e()}},nd=class extends AF{constructor(e){super(e),this._drain=ed,this._finalized=!1,this._finalizing=!1,this._pending=[],this._stream=null}entry(e,n,r){if(this._finalized||this.destroying)throw new Error("already finalized or destroyed");typeof n=="function"&&(r=n,n=null),r||(r=ed),(!e.size||e.type==="symlink")&&(e.size=0),e.type||(e.type=PF(e.mode)),e.mode||(e.mode=e.type==="directory"?IF:OF),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),typeof n=="string"&&(n=wr.from(n));let i=new td(this,e,r);return wr.isBuffer(n)?(e.size=n.byteLength,i.write(n),i.end(),i):(i._isVoid,i)}finalize(){if(this._stream||this._pending.length>0){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(c0),this.push(null))}_done(e){e===this._stream&&(this._stream=null,this._finalizing&&this.finalize(),this._pending.length&&this._pending.shift()._continueOpen())}_encode(e){if(!e.pax){let n=Cl.encode(e);if(n){this.push(n);return}}this._encodePax(e)}_encodePax(e){let n=Cl.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),r={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:n.byteLength,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(Cl.encode(r)),this.push(n),f0(this,n.byteLength),r.size=e.size,r.type=e.type,this.push(Cl.encode(r))}_doDrain(){let e=this._drain;this._drain=ed,e()}_predestroy(){let e=u0(this);for(this._stream&&this._stream.destroy(e);this._pending.length;){let n=this._pending.shift();n.destroy(e),n._continueOpen()}this._doDrain()}_read(e){this._doDrain(),e()}};p0.exports=function(e){return new nd(e)};function PF(t){switch(t&Di.S_IFMT){case Di.S_IFBLK:return"block-device";case Di.S_IFCHR:return"character-device";case Di.S_IFDIR:return"directory";case Di.S_IFIFO:return"fifo";case Di.S_IFLNK:return"symlink"}return"file"}function ed(){}function f0(t,e){e&=511,e&&t.push(c0.subarray(0,512-e))}function LF(t){return wr.isBuffer(t)?t:wr.from(t)}});var h0=R(rd=>{"use strict";rd.extract=s0();rd.pack=d0()});var q0=R(je=>{"use strict";var XF=je&&je.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),e2=je&&je.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),fd=je&&je.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&XF(n,e,r[i]);return e2(n,e),n}})();Object.defineProperty(je,"__esModule",{value:!0});je.FileSystem=void 0;je.uriToFilePath=n2;je.resolve=Wl;je.resolveGlobalNodePath=ud;je.resolveGlobalYarnPath=r2;je.resolveModulePath=i2;var t2=fd(K("url")),wt=fd(K("path")),ad=fd(K("fs")),pd=K("child_process");function n2(t){let e=t2.parse(t);if(e.protocol!=="file:"||!e.path)return;let n=e.path.split("/");for(let r=0,i=n.length;r<i;r++)n[r]=decodeURIComponent(n[r]);if(process.platform==="win32"&&n.length>1){let r=n[0],i=n[1];r.length===0&&i.length>1&&i[1]===":"&&n.shift()}return wt.normalize(n.join("/"))}function ld(){return process.platform==="win32"}function Wl(t,e,n,r){let i="NODE_PATH",o=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((s,a)=>{let u=process.env,l=Object.create(null);Object.keys(u).forEach(c=>l[c]=u[c]),e&&ad.existsSync(e)&&(l[i]?l[i]=e+wt.delimiter+l[i]:l[i]=e,r&&r(`NODE_PATH value is: ${l[i]}`)),l.ELECTRON_RUN_AS_NODE="1";try{let c=(0,pd.fork)("",[],{cwd:n,env:l,execArgv:["-e",o]});if(c.pid===void 0){a(new Error(`Starting process to resolve node module ${t} failed`));return}c.on("error",p=>{a(p)}),c.on("message",p=>{p.c==="r"&&(c.send({c:"e"}),p.s?s(p.r):a(new Error(`Failed to resolve module: ${t}`)))});let f={c:"rs",a:t};c.send(f)}catch(c){a(c)}})}function ud(t){let e="npm",n=Object.create(null);Object.keys(process.env).forEach(o=>n[o]=process.env[o]),n.NO_UPDATE_NOTIFIER="true";let r={encoding:"utf8",env:n};ld()&&(e="npm.cmd",r.shell=!0);let i=()=>{};try{process.on("SIGPIPE",i);let o=(0,pd.spawnSync)(e,["config","get","prefix"],r).stdout;if(!o){t&&t("'npm config get prefix' didn't return a value.");return}let s=o.trim();return t&&t(`'npm config get prefix' value is: ${s}`),s.length>0?ld()?wt.join(s,"node_modules"):wt.join(s,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",i)}}function r2(t){let e="yarn",n={encoding:"utf8"};ld()&&(e="yarn.cmd",n.shell=!0);let r=()=>{};try{process.on("SIGPIPE",r);let i=(0,pd.spawnSync)(e,["global","dir","--json"],n),o=i.stdout;if(!o){t&&(t("'yarn global dir' didn't return a value."),i.stderr&&t(i.stderr));return}let s=o.trim().split(/\r?\n/);for(let a of s)try{let u=JSON.parse(a);if(u.type==="log")return wt.join(u.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",r)}}var cd;(function(t){let e;function n(){return e!==void 0||(process.platform==="win32"?e=!1:e=!ad.existsSync(__filename.toUpperCase())||!ad.existsSync(__filename.toLowerCase())),e}t.isCaseSensitive=n;function r(i,o){return n()?wt.normalize(o).indexOf(wt.normalize(i))===0:wt.normalize(o).toLowerCase().indexOf(wt.normalize(i).toLowerCase())===0}t.isParent=r})(cd||(je.FileSystem=cd={}));function i2(t,e,n,r){return n?(wt.isAbsolute(n)||(n=wt.join(t,n)),Wl(e,n,n,r).then(i=>cd.isParent(n,i)?i:Promise.reject(new Error(`Failed to load ${e} from node path location.`))).then(void 0,i=>Wl(e,ud(r),t,r))):Wl(e,ud(r),t,r)}});var Ul=R(Be=>{"use strict";var z0=Be&&Be.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]})),o2=Be&&Be.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),U0=Be&&Be.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&z0(n,e,r[i]);return o2(n,e),n}})(),$0=Be&&Be.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&z0(e,t,n)};Object.defineProperty(Be,"__esModule",{value:!0});Be.Files=void 0;Be.createConnection=u2;var j0=K("node:util"),dd=U0(Hs()),s2=Tc(),Qo=U0(q0()),Sr=Pd();$0(Pd(),Be);$0(ro(),Be);var B0;(function(t){t.uriToFilePath=Qo.uriToFilePath,t.resolveGlobalNodePath=Qo.resolveGlobalNodePath,t.resolveGlobalYarnPath=Qo.resolveGlobalYarnPath,t.resolve=Qo.resolve,t.resolveModulePath=Qo.resolveModulePath})(B0||(Be.Files=B0={}));var W0;function zl(){if(W0!==void 0)try{W0.end()}catch{}}var Ai=!1,H0;function a2(){let t="--clientProcessId";function e(n){try{let r=parseInt(n);isNaN(r)||(H0=setInterval(()=>{try{process.kill(r,0)}catch{zl(),process.exit(Ai?0:1)}},3e3))}catch{}}for(let n=2;n<process.argv.length;n++){let r=process.argv[n];if(r===t&&n+1<process.argv.length){e(process.argv[n+1]);return}else{let i=r.split("=");i[0]===t&&e(i[1])}}}a2();var l2={initialize:t=>{let e=t.processId;dd.number(e)&&H0===void 0&&setInterval(()=>{try{process.kill(e,0)}catch{process.exit(Ai?0:1)}},3e3)},get shutdownReceived(){return Ai},set shutdownReceived(t){Ai=t},exit:t=>{zl(),process.exit(t)}};function u2(t,e,n,r){let i,o,s,a;return t!==void 0&&t.__brand==="features"&&(i=t,t=e,e=n,n=r),Sr.ConnectionStrategy.is(t)||Sr.ConnectionOptions.is(t)?a=t:(o=t,s=e,a=n),c2(o,s,a,i)}function c2(t,e,n,r){let i=!1;if(!t&&!e&&process.argv.length>2){let a,u,l=process.argv.slice(2);for(let c=0;c<l.length;c++){let f=l[c];if(f==="--node-ipc"){t=new Sr.IPCMessageReader(process),e=new Sr.IPCMessageWriter(process);break}else if(f==="--stdio"){i=!0,t=process.stdin,e=process.stdout;break}else if(f==="--socket"){a=parseInt(l[c+1]);break}else if(f==="--pipe"){u=l[c+1];break}else{let p=f.split("=");if(p[0]==="--socket"){a=parseInt(p[1]);break}else if(p[0]==="--pipe"){u=p[1];break}}}if(a){let c=(0,Sr.createServerSocketTransport)(a);t=c[0],e=c[1]}else if(u){let c=(0,Sr.createServerPipeTransport)(u);t=c[0],e=c[1]}}let o="Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'";if(!t)throw new Error("Connection input stream is not set. "+o);if(!e)throw new Error("Connection output stream is not set. "+o);if(dd.func(t.read)&&dd.func(t.on)){let a=t;a.on("end",()=>{zl(),process.exit(Ai?0:1)}),a.on("close",()=>{zl(),process.exit(Ai?0:1)})}let s=a=>{let u=(0,Sr.createProtocolConnection)(t,e,a,n);return i&&f2(a),u};return(0,s2.createConnection)(s,l2,r)}function f2(t){function e(r){return r.map(i=>typeof i=="string"?i:(0,j0.inspect)(i)).join(" ")}let n=new Map;console.assert=function(i,...o){if(!i)if(o.length===0)t.error("Assertion failed");else{let[s,...a]=o;t.error(`Assertion failed: ${s} ${e(a)}`)}},console.count=function(i="default"){let o=String(i),s=n.get(o)??0;s+=1,n.set(o,s),t.log(`${o}: ${o}`)},console.countReset=function(i){i===void 0?n.clear():n.delete(String(i))},console.debug=function(...i){t.log(e(i))},console.dir=function(i,o){t.log((0,j0.inspect)(i,o))},console.log=function(...i){t.log(e(i))},console.error=function(...i){t.error(e(i))},console.trace=function(...i){let o=new Error().stack.replace(/(.+\n){2}/,""),s="Trace";i.length!==0&&(s+=`: ${e(i)}`),t.log(`${s}
11
+ ${o}`)},console.warn=function(...i){t.warn(e(i))}}});var rn=class extends Error{constructor(e,n,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=n,this.exitCode=e,this.nestedError=void 0}},Bn=class extends rn{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};var Ni=class{constructor(e,n){switch(this.description=n||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,n){return n===this.defaultValue||!Array.isArray(n)?[e]:(n.push(e),n)}default(e,n){return this.defaultValue=e,this.defaultValueDescription=n,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,r)=>{if(!this.argChoices.includes(n))throw new Bn(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(n,r):n},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function ns(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}import{EventEmitter as pS}from"node:events";import Zl from"node:child_process";import Ut from"node:path";import is from"node:fs";import Q from"node:process";import{stripVTControlCharacters as dS}from"node:util";import{stripVTControlCharacters as uS}from"node:util";var Mi=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let n=e.commands.filter(i=>!i._hidden),r=e._getHelpCommand();return r&&!r._hidden&&n.push(r),this.sortSubcommands&&n.sort((i,o)=>i.name().localeCompare(o.name())),n}compareOptions(e,n){let r=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return r(e).localeCompare(r(n))}visibleOptions(e){let n=e.options.filter(i=>!i.hidden),r=e._getHelpOption();if(r&&!r.hidden){let i=r.short&&e._findOption(r.short),o=r.long&&e._findOption(r.long);!i&&!o?n.push(r):r.long&&!o?n.push(e.createOption(r.long,r.description)):r.short&&!i&&n.push(e.createOption(r.short,r.description))}return this.sortOptions&&n.sort(this.compareOptions),n}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let n=[];for(let r=e.parent;r;r=r.parent){let i=r.options.filter(o=>!o.hidden);n.push(...i)}return this.sortOptions&&n.sort(this.compareOptions),n}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(n=>{n.description=n.description||e._argsDescription[n.name()]||""}),e.registeredArguments.find(n=>n.description)?e.registeredArguments:[]}subcommandTerm(e){let n=e.registeredArguments.map(r=>ns(r)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(n?" "+n:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,n){return n.visibleCommands(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleSubcommandTerm(n.subcommandTerm(i)))),0)}longestOptionTermLength(e,n){return n.visibleOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleOptionTerm(n.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,n){return n.visibleGlobalOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleOptionTerm(n.optionTerm(i)))),0)}longestArgumentTermLength(e,n){return n.visibleArguments(e).reduce((r,i)=>Math.max(r,this.displayWidth(n.styleArgumentTerm(n.argumentTerm(i)))),0)}commandUsage(e){let n=e._name;e._aliases[0]&&(n=n+"|"+e._aliases[0]);let r="";for(let i=e.parent;i;i=i.parent)r=i.name()+" "+r;return r+n+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let n=[];if(e.argChoices&&n.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&n.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&n.push(`env: ${e.envVar}`),n.length>0){let r=`(${n.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}argumentDescription(e){let n=[];if(e.argChoices&&n.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),n.length>0){let r=`(${n.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatItemList(e,n,r){return n.length===0?[]:[r.styleTitle(e),...n,""]}groupItems(e,n,r){let i=new Map;return e.forEach(o=>{let s=r(o);i.has(s)||i.set(s,[])}),n.forEach(o=>{let s=r(o);i.has(s)||i.set(s,[]),i.get(s).push(o)}),i}formatHelp(e,n){let r=n.padWidth(e,n),i=n.helpWidth??80;function o(f,p){return n.formatItem(f,r,p,n)}let s=[`${n.styleTitle("Usage:")} ${n.styleUsage(n.commandUsage(e))}`,""],a=n.commandDescription(e);a.length>0&&(s=s.concat([n.boxWrap(n.styleCommandDescription(a),i),""]));let u=n.visibleArguments(e).map(f=>o(n.styleArgumentTerm(n.argumentTerm(f)),n.styleArgumentDescription(n.argumentDescription(f))));if(s=s.concat(this.formatItemList("Arguments:",u,n)),this.groupItems(e.options,n.visibleOptions(e),f=>f.helpGroupHeading??"Options:").forEach((f,p)=>{let d=f.map(b=>o(n.styleOptionTerm(n.optionTerm(b)),n.styleOptionDescription(n.optionDescription(b))));s=s.concat(this.formatItemList(p,d,n))}),n.showGlobalOptions){let f=n.visibleGlobalOptions(e).map(p=>o(n.styleOptionTerm(n.optionTerm(p)),n.styleOptionDescription(n.optionDescription(p))));s=s.concat(this.formatItemList("Global Options:",f,n))}return this.groupItems(e.commands,n.visibleCommands(e),f=>f.helpGroup()||"Commands:").forEach((f,p)=>{let d=f.map(b=>o(n.styleSubcommandTerm(n.subcommandTerm(b)),n.styleSubcommandDescription(n.subcommandDescription(b))));s=s.concat(this.formatItemList(p,d,n))}),s.join(`
12
+ `)}displayWidth(e){return uS(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(n=>n==="[options]"?this.styleOptionText(n):n==="[command]"?this.styleSubcommandText(n):n[0]==="["||n[0]==="<"?this.styleArgumentText(n):this.styleCommandText(n)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(n=>n==="[options]"?this.styleOptionText(n):n[0]==="["||n[0]==="<"?this.styleArgumentText(n):this.styleSubcommandText(n)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,n){return Math.max(n.longestOptionTermLength(e,n),n.longestGlobalOptionTermLength(e,n),n.longestSubcommandTermLength(e,n),n.longestArgumentTermLength(e,n))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,n,r,i){let s=" ".repeat(2);if(!r)return s+e;let a=e.padEnd(n+e.length-i.displayWidth(e)),u=2,c=(this.helpWidth??80)-n-u-2,f;return c<this.minWidthToWrap||i.preformatted(r)?f=r:f=i.boxWrap(r,c).replace(/\n/g,`
13
13
  `+" ".repeat(n+u)),s+a+" ".repeat(u)+f.replace(/\n/g,`
14
14
  ${s}`)}boxWrap(e,n){if(n<this.minWidthToWrap)return e;let r=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,o=[];return r.forEach(s=>{let a=s.match(i);if(a===null){o.push("");return}let u=[a.shift()],l=this.displayWidth(u[0]);a.forEach(c=>{let f=this.displayWidth(c);if(l+f<=n){u.push(c),l+=f;return}o.push(u.join(""));let p=c.trimStart();u=[p],l=this.displayWidth(p)}),o.push(u.join(""))}),o.join(`
15
- `)}};var Cr=class{constructor(e,n){this.flags=e,this.description=n||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let r=sS(e);this.short=r.shortFlag,this.long=r.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,n){return this.defaultValue=e,this.defaultValueDescription=n,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let n=e;return typeof e=="string"&&(n={[e]:!0}),this.implied=Object.assign(this.implied||{},n),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,n){return n===this.defaultValue||!Array.isArray(n)?[e]:(n.push(e),n)}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,r)=>{if(!this.argChoices.includes(n))throw new Wn(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(n,r):n},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Ld(this.name().replace(/^no-/,"")):Ld(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},is=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(n=>{n.negate?this.negativeOptions.set(n.attributeName(),n):this.positiveOptions.set(n.attributeName(),n)}),this.negativeOptions.forEach((n,r)=>{this.positiveOptions.has(r)&&this.dualOptions.add(r)})}valueFromOption(e,n){let r=n.attributeName();if(!this.dualOptions.has(r))return!0;let i=this.negativeOptions.get(r).presetArg,o=i!==void 0?i:!1;return n.negate===(o===e)}};function Ld(t){return t.split("-").reduce((e,n)=>e+n[0].toUpperCase()+n.slice(1))}function sS(t){let e,n,r=/^-[^-]$/,i=/^--[^-]/,o=t.split(/[ |,]+/).concat("guard");if(r.test(o[0])&&(e=o.shift()),i.test(o[0])&&(n=o.shift()),!e&&r.test(o[0])&&(e=o.shift()),!e&&i.test(o[0])&&(e=n,n=o.shift()),o[0].startsWith("-")){let s=o[0],a=`option creation failed due to '${s}' in option flags '${t}'`;throw/^-[^-][^-]/.test(s)?new Error(`${a}
15
+ `)}};var Cr=class{constructor(e,n){this.flags=e,this.description=n||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let r=cS(e);this.short=r.shortFlag,this.long=r.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,n){return this.defaultValue=e,this.defaultValueDescription=n,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let n=e;return typeof e=="string"&&(n={[e]:!0}),this.implied=Object.assign(this.implied||{},n),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,n){return n===this.defaultValue||!Array.isArray(n)?[e]:(n.push(e),n)}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,r)=>{if(!this.argChoices.includes(n))throw new Bn(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(n,r):n},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Nd(this.name().replace(/^no-/,"")):Nd(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},rs=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(n=>{n.negate?this.negativeOptions.set(n.attributeName(),n):this.positiveOptions.set(n.attributeName(),n)}),this.negativeOptions.forEach((n,r)=>{this.positiveOptions.has(r)&&this.dualOptions.add(r)})}valueFromOption(e,n){let r=n.attributeName();if(!this.dualOptions.has(r))return!0;let i=this.negativeOptions.get(r).presetArg,o=i!==void 0?i:!1;return n.negate===(o===e)}};function Nd(t){return t.split("-").reduce((e,n)=>e+n[0].toUpperCase()+n.slice(1))}function cS(t){let e,n,r=/^-[^-]$/,i=/^--[^-]/,o=t.split(/[ |,]+/).concat("guard");if(r.test(o[0])&&(e=o.shift()),i.test(o[0])&&(n=o.shift()),!e&&r.test(o[0])&&(e=o.shift()),!e&&i.test(o[0])&&(e=n,n=o.shift()),o[0].startsWith("-")){let s=o[0],a=`option creation failed due to '${s}' in option flags '${t}'`;throw/^-[^-][^-]/.test(s)?new Error(`${a}
16
16
  - a short flag is a single dash and a single character
17
17
  - either use a single dash and a single character (for a short flag)
18
18
  - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):r.test(s)?new Error(`${a}
19
19
  - too many short flags`):i.test(s)?new Error(`${a}
20
20
  - too many long flags`):new Error(`${a}
21
- - unrecognised flag format`)}if(e===void 0&&n===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return{shortFlag:e,longFlag:n}}function aS(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let n=[];for(let r=0;r<=t.length;r++)n[r]=[r];for(let r=0;r<=e.length;r++)n[0][r]=r;for(let r=1;r<=e.length;r++)for(let i=1;i<=t.length;i++){let o;t[i-1]===e[r-1]?o=0:o=1,n[i][r]=Math.min(n[i-1][r]+1,n[i][r-1]+1,n[i-1][r-1]+o),i>1&&r>1&&t[i-1]===e[r-2]&&t[i-2]===e[r-1]&&(n[i][r]=Math.min(n[i][r],n[i-2][r-2]+1))}return n[t.length][e.length]}function Ql(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let n=t.startsWith("--");n&&(t=t.slice(2),e=e.map(s=>s.slice(2)));let r=[],i=3,o=.4;return e.forEach(s=>{if(s.length<=1)return;let a=aS(t,s),u=Math.max(t.length,s.length);(u-a)/u>o&&(a<i?(i=a,r=[s]):a===i&&r.push(s))}),r.sort((s,a)=>s.localeCompare(a)),n&&(r=r.map(s=>`--${s}`)),r.length>1?`
21
+ - unrecognised flag format`)}if(e===void 0&&n===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return{shortFlag:e,longFlag:n}}function fS(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let n=[];for(let r=0;r<=t.length;r++)n[r]=[r];for(let r=0;r<=e.length;r++)n[0][r]=r;for(let r=1;r<=e.length;r++)for(let i=1;i<=t.length;i++){let o;t[i-1]===e[r-1]?o=0:o=1,n[i][r]=Math.min(n[i-1][r]+1,n[i][r-1]+1,n[i-1][r-1]+o),i>1&&r>1&&t[i-1]===e[r-2]&&t[i-2]===e[r-1]&&(n[i][r]=Math.min(n[i][r],n[i-2][r-2]+1))}return n[t.length][e.length]}function Ql(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let n=t.startsWith("--");n&&(t=t.slice(2),e=e.map(s=>s.slice(2)));let r=[],i=3,o=.4;return e.forEach(s=>{if(s.length<=1)return;let a=fS(t,s),u=Math.max(t.length,s.length);(u-a)/u>o&&(a<i?(i=a,r=[s]):a===i&&r.push(s))}),r.sort((s,a)=>s.localeCompare(a)),n&&(r=r.map(s=>`--${s}`)),r.length>1?`
22
22
  (Did you mean one of ${r.join(", ")}?)`:r.length===1?`
23
- (Did you mean ${r[0]}?)`:""}var ss=class t extends lS{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:n=>Z.stdout.write(n),writeErr:n=>Z.stderr.write(n),outputError:(n,r)=>r(n),getOutHelpWidth:()=>Z.stdout.isTTY?Z.stdout.columns:void 0,getErrHelpWidth:()=>Z.stderr.isTTY?Z.stderr.columns:void 0,getOutHasColors:()=>Md()??(Z.stdout.isTTY&&Z.stdout.hasColors?.()),getErrHasColors:()=>Md()??(Z.stderr.isTTY&&Z.stderr.hasColors?.()),stripColor:n=>uS(n)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let n=this;n;n=n.parent)e.push(n);return e}command(e,n,r){let i=n,o=r;typeof i=="object"&&i!==null&&(o=i,i=null),o=o||{};let[,s,a]=e.match(/([^ ]+) *(.*)/),u=this.createCommand(s);return i&&(u.description(i),u._executableHandler=!0),o.isDefault&&(this._defaultCommandName=u._name),u._hidden=!!(o.noHelp||o.hidden),u._executableFile=o.executableFile||null,a&&u.arguments(a),this._registerCommand(u),u.parent=this,u.copyInheritedSettings(this),i?this:u}createCommand(e){return new t(e)}createHelp(){return Object.assign(new Mi,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,n){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
23
+ (Did you mean ${r[0]}?)`:""}var os=class t extends pS{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:n=>Q.stdout.write(n),writeErr:n=>Q.stderr.write(n),outputError:(n,r)=>r(n),getOutHelpWidth:()=>Q.stdout.isTTY?Q.stdout.columns:void 0,getErrHelpWidth:()=>Q.stderr.isTTY?Q.stderr.columns:void 0,getOutHasColors:()=>Fd()??(Q.stdout.isTTY&&Q.stdout.hasColors?.()),getErrHasColors:()=>Fd()??(Q.stderr.isTTY&&Q.stderr.hasColors?.()),stripColor:n=>dS(n)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let n=this;n;n=n.parent)e.push(n);return e}command(e,n,r){let i=n,o=r;typeof i=="object"&&i!==null&&(o=i,i=null),o=o||{};let[,s,a]=e.match(/([^ ]+) *(.*)/),u=this.createCommand(s);return i&&(u.description(i),u._executableHandler=!0),o.isDefault&&(this._defaultCommandName=u._name),u._hidden=!!(o.noHelp||o.hidden),u._executableFile=o.executableFile||null,a&&u.arguments(a),this._registerCommand(u),u.parent=this,u.copyInheritedSettings(this),i?this:u}createCommand(e){return new t(e)}createHelp(){return Object.assign(new Mi,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,n){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
24
24
  - specify the name in Command constructor or using .name()`);return n=n||{},n.isDefault&&(this._defaultCommandName=e._name),(n.noHelp||n.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,n){return new Ni(e,n)}argument(e,n,r,i){let o=this.createArgument(e,n);return typeof r=="function"?o.default(i).argParser(r):o.default(r),this.addArgument(o),this}arguments(e){return e.trim().split(/ +/).forEach(n=>{this.argument(n)}),this}addArgument(e){let n=this.registeredArguments.slice(-1)[0];if(n?.variadic)throw new Error(`only the last argument can be variadic '${n.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,n){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let r=e??"help [command]",[,i,o]=r.match(/([^ ]+) *(.*)/),s=n??"display help for command",a=this.createCommand(i);return a.helpOption(!1),o&&a.arguments(o),s&&a.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||n)&&this._initCommandGroup(a),this}addHelpCommand(e,n){return typeof e!="object"?(this.helpCommand(e,n),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,n){let r=["preSubcommand","preAction","postAction"];if(!r.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
25
- Expecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(n):this._lifeCycleHooks[e]=[n],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=n=>{if(n.code!=="commander.executeSubCommandAsync")throw n},this}_exit(e,n,r){this._exitCallback&&this._exitCallback(new rn(e,n,r)),Z.exit(e)}action(e){let n=r=>{let i=this.registeredArguments.length,o=r.slice(0,i);return this._storeOptionsAsProperties?o[i]=this:o[i]=this.opts(),o.push(this),e.apply(this,o)};return this._actionHandler=n,this}createOption(e,n){return new Cr(e,n)}_callParseArg(e,n,r,i){try{return e.parseArg(n,r)}catch(o){if(o.code==="commander.invalidArgument"){let s=`${i} ${o.message}`;this.error(s,{exitCode:o.exitCode,code:o.code})}throw o}}_registerOption(e){let n=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(n){let r=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${r}'
26
- - already used by option '${n.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let n=i=>[i.name()].concat(i.aliases()),r=n(e).find(i=>this._findCommand(i));if(r){let i=n(this._findCommand(r)).join("|"),o=n(e).join("|");throw new Error(`cannot add command '${o}' as already have command '${i}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let n=e.name(),r=e.attributeName();e.defaultValue!==void 0&&this.setOptionValueWithSource(r,e.defaultValue,"default");let i=(o,s,a)=>{o==null&&e.presetArg!==void 0&&(o=e.presetArg);let u=this.getOptionValue(r);o!==null&&e.parseArg?o=this._callParseArg(e,o,u,s):o!==null&&e.variadic&&(o=e._collectValue(o,u)),o==null&&(e.negate?o=!1:e.isBoolean()||e.optional?o=!0:o=""),this.setOptionValueWithSource(r,o,a)};return this.on("option:"+n,o=>{let s=`error: option '${e.flags}' argument '${o}' is invalid.`;i(o,s,"cli")}),e.envVar&&this.on("optionEnv:"+n,o=>{let s=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;i(o,s,"env")}),this}_optionEx(e,n,r,i,o){if(typeof n=="object"&&n instanceof Cr)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(n,r);if(s.makeOptionMandatory(!!e.mandatory),typeof i=="function")s.default(o).argParser(i);else if(i instanceof RegExp){let a=i;i=(u,l)=>{let c=a.exec(u);return c?c[0]:l},s.default(o).argParser(i)}else s.default(i);return this.addOption(s)}option(e,n,r,i){return this._optionEx({},e,n,r,i)}requiredOption(e,n,r,i){return this._optionEx({mandatory:!0},e,n,r,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,n){return this.setOptionValueWithSource(e,n,void 0)}setOptionValueWithSource(e,n,r){return this._storeOptionsAsProperties?this[e]=n:this._optionValues[e]=n,this._optionValueSources[e]=r,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let n;return this._getCommandAndAncestors().forEach(r=>{r.getOptionValueSource(e)!==void 0&&(n=r.getOptionValueSource(e))}),n}_prepareUserArgs(e,n){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(n=n||{},e===void 0&&n.from===void 0){Z.versions?.electron&&(n.from="electron");let i=Z.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(n.from="eval")}e===void 0&&(e=Z.argv),this.rawArgs=e.slice();let r;switch(n.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":Z.defaultApp?(this._scriptPath=e[1],r=e.slice(2)):r=e.slice(1);break;case"user":r=e.slice(0);break;case"eval":r=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${n.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",r}parse(e,n){this._prepareForParse();let r=this._prepareUserArgs(e,n);return this._parseCommand([],r),this}async parseAsync(e,n){this._prepareForParse();let r=this._prepareUserArgs(e,n);return await this._parseCommand([],r),this}_prepareForParse(){this._savedState===null?(this.options.filter(e=>e.negate&&e.defaultValue===void 0&&this.getOptionValue(e.attributeName())===void 0).forEach(e=>{let n=e.long.replace(/^--no-/,"--");this._findOption(n)||this.setOptionValueWithSource(e.attributeName(),!0,"default")}),this.saveStateBeforeParse()):this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
27
- - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,n,r){if(os.existsSync(e))return;let i=n?`searched for local subcommand relative to directory '${n}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",o=`'${e}' does not exist
25
+ Expecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(n):this._lifeCycleHooks[e]=[n],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=n=>{if(n.code!=="commander.executeSubCommandAsync")throw n},this}_exit(e,n,r){this._exitCallback&&this._exitCallback(new rn(e,n,r)),Q.exit(e)}action(e){let n=r=>{let i=this.registeredArguments.length,o=r.slice(0,i);return this._storeOptionsAsProperties?o[i]=this:o[i]=this.opts(),o.push(this),e.apply(this,o)};return this._actionHandler=n,this}createOption(e,n){return new Cr(e,n)}_callParseArg(e,n,r,i){try{return e.parseArg(n,r)}catch(o){if(o.code==="commander.invalidArgument"){let s=`${i} ${o.message}`;this.error(s,{exitCode:o.exitCode,code:o.code})}throw o}}_registerOption(e){let n=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(n){let r=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${r}'
26
+ - already used by option '${n.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let n=i=>[i.name()].concat(i.aliases()),r=n(e).find(i=>this._findCommand(i));if(r){let i=n(this._findCommand(r)).join("|"),o=n(e).join("|");throw new Error(`cannot add command '${o}' as already have command '${i}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let n=e.name(),r=e.attributeName();e.defaultValue!==void 0&&this.setOptionValueWithSource(r,e.defaultValue,"default");let i=(o,s,a)=>{o==null&&e.presetArg!==void 0&&(o=e.presetArg);let u=this.getOptionValue(r);o!==null&&e.parseArg?o=this._callParseArg(e,o,u,s):o!==null&&e.variadic&&(o=e._collectValue(o,u)),o==null&&(e.negate?o=!1:e.isBoolean()||e.optional?o=!0:o=""),this.setOptionValueWithSource(r,o,a)};return this.on("option:"+n,o=>{let s=`error: option '${e.flags}' argument '${o}' is invalid.`;i(o,s,"cli")}),e.envVar&&this.on("optionEnv:"+n,o=>{let s=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;i(o,s,"env")}),this}_optionEx(e,n,r,i,o){if(typeof n=="object"&&n instanceof Cr)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(n,r);if(s.makeOptionMandatory(!!e.mandatory),typeof i=="function")s.default(o).argParser(i);else if(i instanceof RegExp){let a=i;i=(u,l)=>{let c=a.exec(u);return c?c[0]:l},s.default(o).argParser(i)}else s.default(i);return this.addOption(s)}option(e,n,r,i){return this._optionEx({},e,n,r,i)}requiredOption(e,n,r,i){return this._optionEx({mandatory:!0},e,n,r,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,n){return this.setOptionValueWithSource(e,n,void 0)}setOptionValueWithSource(e,n,r){return this._storeOptionsAsProperties?this[e]=n:this._optionValues[e]=n,this._optionValueSources[e]=r,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let n;return this._getCommandAndAncestors().forEach(r=>{r.getOptionValueSource(e)!==void 0&&(n=r.getOptionValueSource(e))}),n}_prepareUserArgs(e,n){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(n=n||{},e===void 0&&n.from===void 0){Q.versions?.electron&&(n.from="electron");let i=Q.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(n.from="eval")}e===void 0&&(e=Q.argv),this.rawArgs=e.slice();let r;switch(n.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":Q.defaultApp?(this._scriptPath=e[1],r=e.slice(2)):r=e.slice(1);break;case"user":r=e.slice(0);break;case"eval":r=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${n.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",r}parse(e,n){this._prepareForParse();let r=this._prepareUserArgs(e,n);return this._parseCommand([],r),this}async parseAsync(e,n){this._prepareForParse();let r=this._prepareUserArgs(e,n);return await this._parseCommand([],r),this}_prepareForParse(){this._savedState===null?(this.options.filter(e=>e.negate&&e.defaultValue===void 0&&this.getOptionValue(e.attributeName())===void 0).forEach(e=>{let n=e.long.replace(/^--no-/,"--");this._findOption(n)||this.setOptionValueWithSource(e.attributeName(),!0,"default")}),this.saveStateBeforeParse()):this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
27
+ - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,n,r){if(is.existsSync(e))return;let i=n?`searched for local subcommand relative to directory '${n}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",o=`'${e}' does not exist
28
28
  - if '${r}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
29
29
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
30
- - ${i}`;throw new Error(o)}_executeSubCommand(e,n){n=n.slice();let r=[".js",".ts",".tsx",".mjs",".cjs"];function i(c,f){let p=Ut.resolve(c,f);if(os.existsSync(p))return p;if(r.includes(Ut.extname(f)))return;let d=r.find(b=>os.existsSync(`${p}${b}`));if(d)return`${p}${d}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,s=this._executableDir||"";if(this._scriptPath){let c;try{c=os.realpathSync(this._scriptPath)}catch{c=this._scriptPath}s=Ut.resolve(Ut.dirname(c),s)}if(s){let c=i(s,o);if(!c&&!e._executableFile&&this._scriptPath){let f=Ut.basename(this._scriptPath,Ut.extname(this._scriptPath));f!==this._name&&(c=i(s,`${f}-${e._name}`))}o=c||o}let a=r.includes(Ut.extname(o)),u;Z.platform!=="win32"?a?(n.unshift(o),n=Nd(Z.execArgv).concat(n),u=Zl.spawn(Z.argv[0],n,{stdio:"inherit"})):u=Zl.spawn(o,n,{stdio:"inherit"}):(this._checkForMissingExecutable(o,s,e._name),n.unshift(o),n=Nd(Z.execArgv).concat(n),u=Zl.spawn(Z.execPath,n,{stdio:"inherit"})),u.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(f=>{Z.on(f,()=>{u.killed===!1&&u.exitCode===null&&u.kill(f)})});let l=this._exitCallback;u.on("close",c=>{c=c??1,l?l(new rn(c,"commander.executeSubCommandAsync","(close)")):Z.exit(c)}),u.on("error",c=>{if(c.code==="ENOENT")this._checkForMissingExecutable(o,s,e._name);else if(c.code==="EACCES")throw new Error(`'${o}' not executable`);if(!l)Z.exit(1);else{let f=new rn(1,"commander.executeSubCommandAsync","(error)");f.nestedError=c,l(f)}}),this.runningCommand=u}_dispatchSubcommand(e,n,r){let i=this._findCommand(e);i||this.help({error:!0}),i._prepareForParse();let o;return o=this._chainOrCallSubCommandHook(o,i,"preSubcommand"),o=this._chainOrCall(o,()=>{if(i._executableHandler)this._executeSubCommand(i,n.concat(r));else return i._parseCommand(n,r)}),o}_dispatchHelpCommand(e){e||this.help();let n=this._findCommand(e);return n&&!n._executableHandler&&n.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,n)=>{e.required&&this.args[n]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(r,i,o)=>{let s=i;if(i!==null&&r.parseArg){let a=`error: command-argument value '${i}' is invalid for argument '${r.name()}'.`;s=this._callParseArg(r,i,o,a)}return s};this._checkNumberOfArguments();let n=[];this.registeredArguments.forEach((r,i)=>{let o=r.defaultValue;r.variadic?i<this.args.length?(o=this.args.slice(i),r.parseArg&&(o=o.reduce((s,a)=>e(r,a,s),r.defaultValue))):o===void 0&&(o=[]):i<this.args.length&&(o=this.args[i],r.parseArg&&(o=e(r,o,r.defaultValue))),n[i]=o}),this.processedArgs=n}_chainOrCall(e,n){return e?.then&&typeof e.then=="function"?e.then(()=>n()):n()}_chainOrCallHooks(e,n){let r=e,i=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[n]!==void 0).forEach(o=>{o._lifeCycleHooks[n].forEach(s=>{i.push({hookedCommand:o,callback:s})})}),n==="postAction"&&i.reverse(),i.forEach(o=>{r=this._chainOrCall(r,()=>o.callback(o.hookedCommand,this))}),r}_chainOrCallSubCommandHook(e,n,r){let i=e;return this._lifeCycleHooks[r]!==void 0&&this._lifeCycleHooks[r].forEach(o=>{i=this._chainOrCall(i,()=>o(this,n))}),i}_parseCommand(e,n){let r=this.parseOptions(n);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(r.operands),n=r.unknown,this.args=e.concat(n),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),n);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(n),this._dispatchSubcommand(this._defaultCommandName,e,n);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(r.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{r.unknown.length>0&&this.unknownOption(r.unknown[0])},o=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(o,e,n)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent?.listenerCount(o))i(),this._processArguments(),this.parent.emit(o,e,n);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,n);this.listenerCount("command:*")?this.emit("command:*",e,n):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(n=>n._name===e||n._aliases.includes(e))}_findOption(e){return this.options.find(n=>n.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(n=>{n.mandatory&&e.getOptionValue(n.attributeName())===void 0&&e.missingMandatoryOptionValue(n)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(r=>{let i=r.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(r=>r.conflictsWith.length>0).forEach(r=>{let i=e.find(o=>r.conflictsWith.includes(o.attributeName()));i&&this._conflictingOption(r,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let n=[],r=[],i=n;function o(c){return c.length>1&&c[0]==="-"}let s=c=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(c)?!this._getCommandAndAncestors().some(f=>f.options.map(p=>p.short).some(p=>/^-\d$/.test(p))):!1,a=null,u=null,l=0;for(;l<e.length||u;){let c=u??e[l++];if(u=null,c==="--"){i===r&&i.push(c),i.push(...e.slice(l));break}if(a&&(!o(c)||s(c))){this.emit(`option:${a.name()}`,c);continue}if(a=null,o(c)){let f=this._findOption(c);if(f){if(f.required){let p=e[l++];p===void 0&&this.optionMissingArgument(f),this.emit(`option:${f.name()}`,p)}else if(f.optional){let p=null;l<e.length&&(!o(e[l])||s(e[l]))&&(p=e[l++]),this.emit(`option:${f.name()}`,p)}else this.emit(`option:${f.name()}`);a=f.variadic?f:null;continue}}if(c.length>2&&c[0]==="-"&&c[1]!=="-"){let f=this._findOption(`-${c[1]}`);if(f){f.required||f.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${f.name()}`,c.slice(2)):(this.emit(`option:${f.name()}`),u=`-${c.slice(2)}`);continue}}if(/^--[^=]+=/.test(c)){let f=c.indexOf("="),p=this._findOption(c.slice(0,f));if(p&&(p.required||p.optional)){this.emit(`option:${p.name()}`,c.slice(f+1));continue}}if(i===n&&o(c)&&!(this.commands.length===0&&s(c))&&(i=r),(this._enablePositionalOptions||this._passThroughOptions)&&n.length===0&&r.length===0){if(this._findCommand(c)){n.push(c),r.push(...e.slice(l));break}else if(this._getHelpCommand()&&c===this._getHelpCommand().name()){n.push(c,...e.slice(l));break}else if(this._defaultCommandName){r.push(c,...e.slice(l));break}}if(this._passThroughOptions){i.push(c,...e.slice(l));break}i.push(c)}return{operands:n,unknown:r}}opts(){if(this._storeOptionsAsProperties){let e={},n=this.options.length;for(let r=0;r<n;r++){let i=this.options[r].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,n)=>Object.assign(e,n.opts()),{})}error(e,n){this._outputConfiguration.outputError(`${e}
30
+ - ${i}`;throw new Error(o)}_executeSubCommand(e,n){n=n.slice();let r=[".js",".ts",".tsx",".mjs",".cjs"];function i(c,f){let p=Ut.resolve(c,f);if(is.existsSync(p))return p;if(r.includes(Ut.extname(f)))return;let d=r.find(b=>is.existsSync(`${p}${b}`));if(d)return`${p}${d}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,s=this._executableDir||"";if(this._scriptPath){let c;try{c=is.realpathSync(this._scriptPath)}catch{c=this._scriptPath}s=Ut.resolve(Ut.dirname(c),s)}if(s){let c=i(s,o);if(!c&&!e._executableFile&&this._scriptPath){let f=Ut.basename(this._scriptPath,Ut.extname(this._scriptPath));f!==this._name&&(c=i(s,`${f}-${e._name}`))}o=c||o}let a=r.includes(Ut.extname(o)),u;Q.platform!=="win32"?a?(n.unshift(o),n=Md(Q.execArgv).concat(n),u=Zl.spawn(Q.argv[0],n,{stdio:"inherit"})):u=Zl.spawn(o,n,{stdio:"inherit"}):(this._checkForMissingExecutable(o,s,e._name),n.unshift(o),n=Md(Q.execArgv).concat(n),u=Zl.spawn(Q.execPath,n,{stdio:"inherit"})),u.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(f=>{Q.on(f,()=>{u.killed===!1&&u.exitCode===null&&u.kill(f)})});let l=this._exitCallback;u.on("close",c=>{c=c??1,l?l(new rn(c,"commander.executeSubCommandAsync","(close)")):Q.exit(c)}),u.on("error",c=>{if(c.code==="ENOENT")this._checkForMissingExecutable(o,s,e._name);else if(c.code==="EACCES")throw new Error(`'${o}' not executable`);if(!l)Q.exit(1);else{let f=new rn(1,"commander.executeSubCommandAsync","(error)");f.nestedError=c,l(f)}}),this.runningCommand=u}_dispatchSubcommand(e,n,r){let i=this._findCommand(e);i||this.help({error:!0}),i._prepareForParse();let o;return o=this._chainOrCallSubCommandHook(o,i,"preSubcommand"),o=this._chainOrCall(o,()=>{if(i._executableHandler)this._executeSubCommand(i,n.concat(r));else return i._parseCommand(n,r)}),o}_dispatchHelpCommand(e){e||this.help();let n=this._findCommand(e);return n&&!n._executableHandler&&n.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,n)=>{e.required&&this.args[n]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(r,i,o)=>{let s=i;if(i!==null&&r.parseArg){let a=`error: command-argument value '${i}' is invalid for argument '${r.name()}'.`;s=this._callParseArg(r,i,o,a)}return s};this._checkNumberOfArguments();let n=[];this.registeredArguments.forEach((r,i)=>{let o=r.defaultValue;r.variadic?i<this.args.length?(o=this.args.slice(i),r.parseArg&&(o=o.reduce((s,a)=>e(r,a,s),r.defaultValue))):o===void 0&&(o=[]):i<this.args.length&&(o=this.args[i],r.parseArg&&(o=e(r,o,r.defaultValue))),n[i]=o}),this.processedArgs=n}_chainOrCall(e,n){return e?.then&&typeof e.then=="function"?e.then(()=>n()):n()}_chainOrCallHooks(e,n){let r=e,i=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[n]!==void 0).forEach(o=>{o._lifeCycleHooks[n].forEach(s=>{i.push({hookedCommand:o,callback:s})})}),n==="postAction"&&i.reverse(),i.forEach(o=>{r=this._chainOrCall(r,()=>o.callback(o.hookedCommand,this))}),r}_chainOrCallSubCommandHook(e,n,r){let i=e;return this._lifeCycleHooks[r]!==void 0&&this._lifeCycleHooks[r].forEach(o=>{i=this._chainOrCall(i,()=>o(this,n))}),i}_parseCommand(e,n){let r=this.parseOptions(n);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(r.operands),n=r.unknown,this.args=e.concat(n),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),n);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(n),this._dispatchSubcommand(this._defaultCommandName,e,n);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(r.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{r.unknown.length>0&&this.unknownOption(r.unknown[0])},o=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(o,e,n)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent?.listenerCount(o))i(),this._processArguments(),this.parent.emit(o,e,n);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,n);this.listenerCount("command:*")?this.emit("command:*",e,n):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(n=>n._name===e||n._aliases.includes(e))}_findOption(e){return this.options.find(n=>n.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(n=>{n.mandatory&&e.getOptionValue(n.attributeName())===void 0&&e.missingMandatoryOptionValue(n)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(r=>{let i=r.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(r=>r.conflictsWith.length>0).forEach(r=>{let i=e.find(o=>r.conflictsWith.includes(o.attributeName()));i&&this._conflictingOption(r,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let n=[],r=[],i=n;function o(c){return c.length>1&&c[0]==="-"}let s=c=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(c)?!this._getCommandAndAncestors().some(f=>f.options.map(p=>p.short).some(p=>/^-\d$/.test(p))):!1,a=null,u=null,l=0;for(;l<e.length||u;){let c=u??e[l++];if(u=null,c==="--"){i===r&&i.push(c),i.push(...e.slice(l));break}if(a&&(!o(c)||s(c))){this.emit(`option:${a.name()}`,c);continue}if(a=null,o(c)){let f=this._findOption(c);if(f){if(f.required){let p=e[l++];p===void 0&&this.optionMissingArgument(f),this.emit(`option:${f.name()}`,p)}else if(f.optional){let p=null;l<e.length&&(!o(e[l])||s(e[l]))&&(p=e[l++]),this.emit(`option:${f.name()}`,p)}else this.emit(`option:${f.name()}`);a=f.variadic?f:null;continue}}if(c.length>2&&c[0]==="-"&&c[1]!=="-"){let f=this._findOption(`-${c[1]}`);if(f){f.required||f.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${f.name()}`,c.slice(2)):(this.emit(`option:${f.name()}`),u=`-${c.slice(2)}`);continue}}if(/^--[^=]+=/.test(c)){let f=c.indexOf("="),p=this._findOption(c.slice(0,f));if(p&&(p.required||p.optional)){this.emit(`option:${p.name()}`,c.slice(f+1));continue}}if(i===n&&o(c)&&!(this.commands.length===0&&s(c))&&(i=r),(this._enablePositionalOptions||this._passThroughOptions)&&n.length===0&&r.length===0){if(this._findCommand(c)){n.push(c),r.push(...e.slice(l));break}else if(this._getHelpCommand()&&c===this._getHelpCommand().name()){n.push(c,...e.slice(l));break}else if(this._defaultCommandName){r.push(c,...e.slice(l));break}}if(this._passThroughOptions){i.push(c,...e.slice(l));break}i.push(c)}return{operands:n,unknown:r}}opts(){if(this._storeOptionsAsProperties){let e={},n=this.options.length;for(let r=0;r<n;r++){let i=this.options[r].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,n)=>Object.assign(e,n.opts()),{})}error(e,n){this._outputConfiguration.outputError(`${e}
31
31
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
32
32
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
33
- `),this.outputHelp({error:!0}));let r=n||{},i=r.exitCode||1,o=r.code||"commander.error";this._exit(i,o,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in Z.env){let n=e.attributeName();(this.getOptionValue(n)===void 0||["default","config","env"].includes(this.getOptionValueSource(n)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,Z.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new is(this.options),n=r=>this.getOptionValue(r)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(r));this.options.filter(r=>r.implied!==void 0&&n(r.attributeName())&&e.valueFromOption(this.getOptionValue(r.attributeName()),r)).forEach(r=>{Object.keys(r.implied).filter(i=>!n(i)).forEach(i=>{this.setOptionValueWithSource(i,r.implied[i],"implied")})})}missingArgument(e){let n=`error: missing required argument '${e}'`;this.error(n,{code:"commander.missingArgument"})}optionMissingArgument(e){let n=`error: option '${e.flags}' argument missing`;this.error(n,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let n=`error: required option '${e.flags}' not specified`;this.error(n,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,n){let r=s=>{let a=s.attributeName(),u=this.getOptionValue(a),l=this.options.find(f=>f.negate&&a===f.attributeName()),c=this.options.find(f=>!f.negate&&a===f.attributeName());return l&&(l.presetArg===void 0&&u===!1||l.presetArg!==void 0&&u===l.presetArg)?l:c||s},i=s=>{let a=r(s),u=a.attributeName();return this.getOptionValueSource(u)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},o=`error: ${i(e)} cannot be used with ${i(n)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let n="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],o=this;do{let s=o.createHelp().visibleOptions(o).filter(a=>a.long).map(a=>a.long);i=i.concat(s),o=o.parent}while(o&&!o._enablePositionalOptions);n=Ql(e,i)}let r=`error: unknown option '${e}'${n}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let n=this.registeredArguments.length,r=n===1?"":"s",i=e.length,o=this.parent?` for '${this.name()}'`:"",s=e.join(", "),a=`error: too many arguments${o}. Expected ${n} argument${r} but got ${i}: ${s}.`;this.error(a,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],n="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(o=>{i.push(o.name()),o.alias()&&i.push(o.alias())}),n=Ql(e,i)}let r=`error: unknown command '${e}'${n}`;this.error(r,{code:"commander.unknownCommand"})}version(e,n,r){if(e===void 0)return this._version;this._version=e,n=n||"-V, --version",r=r||"output the version number";let i=this.createOption(n,r);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
34
- `),this._exit(0,"commander.version",e)}),this}description(e,n){return e===void 0&&n===void 0?this._description:(this._description=e,n&&(this._argsDescription=n),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let n=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(n=this.commands[this.commands.length-1]),e===n._name)throw new Error("Command alias can't be the same as its name");let r=this.parent?._findCommand(e);if(r){let i=[r.name()].concat(r.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return n._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(n=>this.alias(n)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let n=this.registeredArguments.map(r=>rs(r));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?n:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=Ut.basename(e,Ut.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let n=this.createHelp(),r=this._getOutputContext(e);n.prepareContext({error:r.error,helpWidth:r.helpWidth,outputHasColors:r.hasColors});let i=n.formatHelp(this,n);return r.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let n=!!e.error,r,i,o;return n?(r=a=>this._outputConfiguration.writeErr(a),i=this._outputConfiguration.getErrHasColors(),o=this._outputConfiguration.getErrHelpWidth()):(r=a=>this._outputConfiguration.writeOut(a),i=this._outputConfiguration.getOutHasColors(),o=this._outputConfiguration.getOutHelpWidth()),{error:n,write:a=>(i||(a=this._outputConfiguration.stripColor(a)),r(a)),hasColors:i,helpWidth:o}}outputHelp(e){let n;typeof e=="function"&&(n=e,e=void 0);let r=this._getOutputContext(e),i={error:r.error,write:r.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let o=this.helpInformation({error:r.error});if(n&&(o=n(o),typeof o!="string"&&!Buffer.isBuffer(o)))throw new Error("outputHelp callback must return a string or a Buffer");r.write(o),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",i))}helpOption(e,n){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",n??"display help for command"),(e||n)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let n=Number(Z.exitCode??0);n===0&&e&&typeof e!="function"&&e.error&&(n=1),this._exit(n,"commander.help","(outputHelp)")}addHelpText(e,n){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw new Error(`Unexpected value for position to addHelpText.
33
+ `),this.outputHelp({error:!0}));let r=n||{},i=r.exitCode||1,o=r.code||"commander.error";this._exit(i,o,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in Q.env){let n=e.attributeName();(this.getOptionValue(n)===void 0||["default","config","env"].includes(this.getOptionValueSource(n)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,Q.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new rs(this.options),n=r=>this.getOptionValue(r)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(r));this.options.filter(r=>r.implied!==void 0&&n(r.attributeName())&&e.valueFromOption(this.getOptionValue(r.attributeName()),r)).forEach(r=>{Object.keys(r.implied).filter(i=>!n(i)).forEach(i=>{this.setOptionValueWithSource(i,r.implied[i],"implied")})})}missingArgument(e){let n=`error: missing required argument '${e}'`;this.error(n,{code:"commander.missingArgument"})}optionMissingArgument(e){let n=`error: option '${e.flags}' argument missing`;this.error(n,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let n=`error: required option '${e.flags}' not specified`;this.error(n,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,n){let r=s=>{let a=s.attributeName(),u=this.getOptionValue(a),l=this.options.find(f=>f.negate&&a===f.attributeName()),c=this.options.find(f=>!f.negate&&a===f.attributeName());return l&&(l.presetArg===void 0&&u===!1||l.presetArg!==void 0&&u===l.presetArg)?l:c||s},i=s=>{let a=r(s),u=a.attributeName();return this.getOptionValueSource(u)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},o=`error: ${i(e)} cannot be used with ${i(n)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let n="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],o=this;do{let s=o.createHelp().visibleOptions(o).filter(a=>a.long).map(a=>a.long);i=i.concat(s),o=o.parent}while(o&&!o._enablePositionalOptions);n=Ql(e,i)}let r=`error: unknown option '${e}'${n}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let n=this.registeredArguments.length,r=n===1?"":"s",i=e.length,o=this.parent?` for '${this.name()}'`:"",s=e.join(", "),a=`error: too many arguments${o}. Expected ${n} argument${r} but got ${i}: ${s}.`;this.error(a,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],n="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(o=>{i.push(o.name()),o.alias()&&i.push(o.alias())}),n=Ql(e,i)}let r=`error: unknown command '${e}'${n}`;this.error(r,{code:"commander.unknownCommand"})}version(e,n,r){if(e===void 0)return this._version;this._version=e,n=n||"-V, --version",r=r||"output the version number";let i=this.createOption(n,r);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
34
+ `),this._exit(0,"commander.version",e)}),this}description(e,n){return e===void 0&&n===void 0?this._description:(this._description=e,n&&(this._argsDescription=n),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let n=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(n=this.commands[this.commands.length-1]),e===n._name)throw new Error("Command alias can't be the same as its name");let r=this.parent?._findCommand(e);if(r){let i=[r.name()].concat(r.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return n._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(n=>this.alias(n)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let n=this.registeredArguments.map(r=>ns(r));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?n:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=Ut.basename(e,Ut.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let n=this.createHelp(),r=this._getOutputContext(e);n.prepareContext({error:r.error,helpWidth:r.helpWidth,outputHasColors:r.hasColors});let i=n.formatHelp(this,n);return r.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let n=!!e.error,r,i,o;return n?(r=a=>this._outputConfiguration.writeErr(a),i=this._outputConfiguration.getErrHasColors(),o=this._outputConfiguration.getErrHelpWidth()):(r=a=>this._outputConfiguration.writeOut(a),i=this._outputConfiguration.getOutHasColors(),o=this._outputConfiguration.getOutHelpWidth()),{error:n,write:a=>(i||(a=this._outputConfiguration.stripColor(a)),r(a)),hasColors:i,helpWidth:o}}outputHelp(e){let n;typeof e=="function"&&(n=e,e=void 0);let r=this._getOutputContext(e),i={error:r.error,write:r.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let o=this.helpInformation({error:r.error});if(n&&(o=n(o),typeof o!="string"&&!Buffer.isBuffer(o)))throw new Error("outputHelp callback must return a string or a Buffer");r.write(o),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",i))}helpOption(e,n){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",n??"display help for command"),(e||n)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let n=Number(Q.exitCode??0);n===0&&e&&typeof e!="function"&&e.error&&(n=1),this._exit(n,"commander.help","(outputHelp)")}addHelpText(e,n){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw new Error(`Unexpected value for position to addHelpText.
35
35
  Expecting one of '${r.join("', '")}'`);let i=`${e}Help`;return this.on(i,o=>{let s;typeof n=="function"?s=n({error:o.error,command:o.command}):s=n,s&&o.write(`${s}
36
- `)}),this}_outputHelpIfRequested(e){let n=this._getHelpOption();n&&e.find(i=>n.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Nd(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let n,r="127.0.0.1",i="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?n=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(n=o[1],/^\d+$/.test(o[3])?i=o[3]:r=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(n=o[1],r=o[3],i=o[4]),n&&i!=="0"?`${n}=${r}:${parseInt(i)+1}`:e})}function Md(){if(Z.env.NO_COLOR||Z.env.FORCE_COLOR==="0"||Z.env.FORCE_COLOR==="false")return!1;if(Z.env.FORCE_COLOR||Z.env.CLICOLOR_FORCE!==void 0)return!0}var ne=new ss;var cS=["emacs","vim"],fS=new Set(cS);function pS(t){return fS.has(t)}function Fd(){let t=process.env.INQUIRER_KEYBINDINGS;return t?Array.from(new Set(t.toLowerCase().split(/[\s,]+/).filter(pS))):[]}var Jl=t=>t.name==="backspace",Xl=t=>t.name==="tab";var Fi=t=>t.name==="enter"||t.name==="return";var as=class extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(e){super(),this.cause=e?.cause}},ls=class extends Error{name="CancelPromptError";message="Prompt was canceled"},qi=class extends Error{name="ExitPromptError"},us=class extends Error{name="HookError"},cs=class extends Error{name="ValidationError"};import{AsyncResource as gS}from"node:async_hooks";import{AsyncLocalStorage as dS,AsyncResource as hS}from"node:async_hooks";var qd=new dS;function mS(t){return{rl:t,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function jd(t,e){let n=mS(t);return qd.run(n,()=>{function r(i){n.handleChange=()=>{n.index=0,i()},n.handleChange()}return e(r)})}function zn(){let t=qd.getStore();if(!t)throw new us("[Inquirer] Hook functions can only be called from within a prompt");return t}function eu(){return zn().rl}function tu(t){let e=(...n)=>{let r=zn(),i=!1,o=r.handleChange;r.handleChange=()=>{i=!0};let s=t(...n);return i&&o(),r.handleChange=o,s};return hS.bind(e)}function fs(t){let e=zn(),{index:n}=e,r={get(){return e.hooks[n]},set(o){e.hooks[n]=o},initialized:n in e.hooks},i=t(r);return e.index++,i}function Bd(){zn().handleChange()}var Un={queue(t){let e=zn(),{index:n}=e;e.hooksEffect.push(()=>{e.hooksCleanup[n]?.();let r=t(eu());if(r!=null&&typeof r!="function")throw new cs("useEffect return value must be a cleanup function or nothing.");e.hooksCleanup[n]=r})},run(){let t=zn();tu(()=>{t.hooksEffect.forEach(e=>{e()}),t.hooksEffect.length=0})()},clearAll(){let t=zn();t.hooksCleanup.forEach(e=>{e?.()}),t.hooksEffect.length=0,t.hooksCleanup.length=0}};function yS(t){return typeof t=="function"}function Le(t){return fs(e=>{let n=gS.bind(function(o){e.get()!==o&&(e.set(o),Bd())});if(e.initialized)return[e.get(),n];let r=yS(t)?t():t;return e.set(r),[r,n]})}function $n(t,e){fs(n=>{let r=n.get();(!Array.isArray(r)||e.some((o,s)=>!Object.is(o,r[s])))&&Un.queue(t),n.set(e)})}import{styleText as ht}from"node:util";import dt from"node:process";function bS(){return dt.platform.startsWith("win")?!!dt.env.CI||!!dt.env.WT_SESSION||!!dt.env.TERMINUS_SUBLIME||dt.env.ConEmuTask==="{cmd::Cmder}"||dt.env.TERM_PROGRAM==="Terminus-Sublime"||dt.env.TERM_PROGRAM==="vscode"||dt.env.TERM==="xterm-256color"||dt.env.TERM==="alacritty"||dt.env.TERMINAL_EMULATOR==="JetBrains-JediTerm":dt.env.TERM!=="linux"}var Wd={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},zd={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},xS={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},_S={...Wd,...zd},wS={...Wd,...xS},vS=bS(),SS=vS?_S:wS,Ud=SS,J2=Object.entries(zd);var ES={prefix:{idle:ht("blue","?"),done:ht("green",Ud.tick)},spinner:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"].map(t=>ht("yellow",t))},keybindings:[],style:{answer:t=>ht("cyan",t),message:t=>ht("bold",t),error:t=>ht("red",`> ${t}`),defaultAnswer:t=>ht("dim",`(${t})`),help:t=>ht("dim",t),highlight:t=>ht("cyan",t),key:t=>ht("cyan",ht("bold",`<${t}>`))}};function $d(){return{...ES,keybindings:Fd()}}function Hd(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Vd(...t){let e={};for(let n of t)for(let[r,i]of Object.entries(n)){let o=e[r];e[r]=Hd(o)&&Hd(i)?Vd(o,i):i}return e}function Hn(...t){let e=[$d(),...t.filter(n=>n!=null)];return Vd(...e)}function ji({status:t="idle",theme:e}){let[n,r]=Le(!1),[i,o]=Le(0),{prefix:s,spinner:a}=Hn(e);return $n(()=>{if(t==="loading"){let l,c=-1,f=setTimeout(()=>{r(!0),l=setInterval(()=>{c=c+1,o(c%a.frames.length)},a.interval)},300);return()=>{clearTimeout(f),clearInterval(l)}}else r(!1)},[t]),n?a.frames[i]:typeof s=="string"?s:s[t==="loading"?"idle":t]??s.idle}function Gd(t){return Le({current:t})[0]}function Bi(t){let e=Gd(t);e.current=t,$n(n=>{let r=!1,i=tu((o,s)=>{r||e.current(s,n)});return n.input.on("keypress",i),()=>{r=!0,n.input.removeListener("keypress",i)}},[])}var fh=ae(Yd(),1);var Qd=(()=>{let t=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return e=>{let n=0;for(t.lastIndex=0;t.test(e);)n+=1;return e.length-n}})(),Zd=t=>t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510,Jd=t=>t===8987||t===9001||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12771||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=19903||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t>=131072&&t<=196605||t>=196608&&t<=262141;var TS=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,RS=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Xd=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,AS=/\t{1,1000}/y,eh=new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*","yu"),CS=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,IS=new RegExp("\\p{M}+","gu"),OS={limit:1/0,ellipsis:""},th=(t,e={},n={})=>{let r=e.limit??1/0,i=e.ellipsis??"",o=e?.ellipsisWidth??(i?th(i,OS,n).width:0),s=0,a=n.controlWidth??0,u=n.tabWidth??8,l=n.emojiWidth??2,c=2,f=n.regularWidth??1,p=n.wideWidth??c,d=[[CS,f],[TS,s],[RS,a],[AS,u],[eh,l],[Xd,p]],b=0,g=0,S=t.length,y=0,h=!1,m=S,w=Math.max(0,r-o),T=0,v=0,E=0,L=0;e:for(;;){if(v>T||g>=S&&g>b){let k=t.slice(T,v)||t.slice(b,g);y=0;for(let I of k.replaceAll(IS,"")){let N=I.codePointAt(0)||0;if(Zd(N)?L=c:Jd(N)?L=p:L=f,E+L>w&&(m=Math.min(m,Math.max(T,b)+y)),E+L>r){h=!0;break e}y+=I.length,E+=L}T=v=0}if(g>=S)break e;for(let k=0,I=d.length;k<I;k++){let[N,M]=d[k];if(N.lastIndex=g,N.test(t)){if(y=N===Xd?Qd(t.slice(g,N.lastIndex)):N===eh?1:N.lastIndex-g,L=y*M,E+L>w&&(m=Math.min(m,g+Math.floor((w-E)/M))),E+L>r){h=!0;break e}E+=L,T=b,v=g,g=b=N.lastIndex;continue e}}g+=1}return{width:h?w:E,index:h?m:S,truncated:h,ellipsed:h&&r>=o}},nh=th;var PS={limit:1/0,ellipsis:"",ellipsisWidth:0},LS=(t,e={})=>nh(t,PS,e).width,$t=LS;var ps="\x1B",ah="\x9B",NS=39,ru="\x07",lh="[",MS="]",uh="m",iu=`${MS}8;;`,rh=new RegExp(`(?:\\${lh}(?<code>\\d+)m|\\${iu}(?<uri>.*)${ru})`,"y"),ih=t=>{if(t>=30&&t<=37||t>=90&&t<=97)return 39;if(t>=40&&t<=47||t>=100&&t<=107)return 49;if(t===1||t===2)return 22;if(t===3)return 23;if(t===4)return 24;if(t===7)return 27;if(t===8)return 28;if(t===9)return 29;if(t===0)return 0},oh=t=>`${ps}${lh}${t}${uh}`,sh=t=>`${ps}${iu}${t}${ru}`,nu=(t,e,n)=>{let r=e[Symbol.iterator](),i=!1,o=!1,s=t.at(-1),a=s===void 0?0:$t(s),u=r.next(),l=r.next(),c=0;for(;!u.done;){let f=u.value,p=$t(f);a+p<=n?t[t.length-1]+=f:(t.push(f),a=0),(f===ps||f===ah)&&(i=!0,o=e.startsWith(iu,c+1)),i?o?f===ru&&(i=!1,o=!1):f===uh&&(i=!1):(a+=p,a===n&&!l.done&&(t.push(""),a=0)),u=l,l=r.next(),c+=f.length}s=t.at(-1),!a&&s!==void 0&&s.length&&t.length>1&&(t[t.length-2]+=t.pop())},FS=t=>{let e=t.split(" "),n=e.length;for(;n&&!$t(e[n-1]);)n--;return n===e.length?t:e.slice(0,n).join(" ")+e.slice(n).join("")},qS=(t,e,n={})=>{if(n.trim!==!1&&t.trim()==="")return"";let r="",i,o,s=t.split(" "),a=[""],u=0;for(let f=0;f<s.length;f++){let p=s[f];if(n.trim!==!1){let b=a.at(-1)??"",g=b.trimStart();b.length!==g.length&&(a[a.length-1]=g,u=$t(g))}f!==0&&(u>=e&&(n.wordWrap===!1||n.trim===!1)&&(a.push(""),u=0),(u||n.trim===!1)&&(a[a.length-1]+=" ",u++));let d=$t(p);if(n.hard&&d>e){let b=e-u,g=1+Math.floor((d-b-1)/e);Math.floor((d-1)/e)<g&&a.push(""),nu(a,p,e),u=$t(a.at(-1)??"");continue}if(u+d>e&&u&&d){if(n.wordWrap===!1&&u<e){nu(a,p,e),u=$t(a.at(-1)??"");continue}a.push(""),u=0}if(u+d>e&&n.wordWrap===!1){nu(a,p,e),u=$t(a.at(-1)??"");continue}a[a.length-1]+=p,u+=d}n.trim!==!1&&(a=a.map(f=>FS(f)));let l=a.join(`
37
- `),c=!1;for(let f=0;f<l.length;f++){let p=l[f];if(r+=p,c)c=!1;else if(c=p>="\uD800"&&p<="\uDBFF",c)continue;if(p===ps||p===ah){rh.lastIndex=f+1;let b=rh.exec(l)?.groups;if(b?.code!==void 0){let g=Number.parseFloat(b.code);i=g===NS?void 0:g}else b?.uri!==void 0&&(o=b.uri.length===0?void 0:b.uri)}if(l[f+1]===`
38
- `){o&&(r+=sh(""));let d=i?ih(i):void 0;i&&d&&(r+=oh(d))}else p===`
39
- `&&(i&&ih(i)&&(r+=oh(i)),o&&(r+=sh(o)))}return r},jS=/\r?\n/;function ch(t,e,n){return String(t).normalize().split(jS).map(r=>qS(r,e,n)).join(`
36
+ `)}),this}_outputHelpIfRequested(e){let n=this._getHelpOption();n&&e.find(i=>n.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Md(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let n,r="127.0.0.1",i="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?n=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(n=o[1],/^\d+$/.test(o[3])?i=o[3]:r=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(n=o[1],r=o[3],i=o[4]),n&&i!=="0"?`${n}=${r}:${parseInt(i)+1}`:e})}function Fd(){if(Q.env.NO_COLOR||Q.env.FORCE_COLOR==="0"||Q.env.FORCE_COLOR==="false")return!1;if(Q.env.FORCE_COLOR||Q.env.CLICOLOR_FORCE!==void 0)return!0}var ne=new os;var hS=["emacs","vim"],mS=new Set(hS);function gS(t){return mS.has(t)}function qd(){let t=process.env.INQUIRER_KEYBINDINGS;return t?Array.from(new Set(t.toLowerCase().split(/[\s,]+/).filter(gS))):[]}var Jl=t=>t.name==="backspace",Xl=t=>t.name==="tab";var Fi=t=>t.name==="enter"||t.name==="return";var ss=class extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(e){super(),this.cause=e?.cause}},as=class extends Error{name="CancelPromptError";message="Prompt was canceled"},qi=class extends Error{name="ExitPromptError"},ls=class extends Error{name="HookError"},us=class extends Error{name="ValidationError"};import{AsyncResource as _S}from"node:async_hooks";import{AsyncLocalStorage as yS,AsyncResource as bS}from"node:async_hooks";var jd=new yS;function xS(t){return{rl:t,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function Bd(t,e){let n=xS(t);return jd.run(n,()=>{function r(i){n.handleChange=()=>{n.index=0,i()},n.handleChange()}return e(r)})}function Wn(){let t=jd.getStore();if(!t)throw new ls("[Inquirer] Hook functions can only be called from within a prompt");return t}function eu(){return Wn().rl}function tu(t){let e=(...n)=>{let r=Wn(),i=!1,o=r.handleChange;r.handleChange=()=>{i=!0};let s=t(...n);return i&&o(),r.handleChange=o,s};return bS.bind(e)}function cs(t){let e=Wn(),{index:n}=e,r={get(){return e.hooks[n]},set(o){e.hooks[n]=o},initialized:n in e.hooks},i=t(r);return e.index++,i}function Wd(){Wn().handleChange()}var zn={queue(t){let e=Wn(),{index:n}=e;e.hooksEffect.push(()=>{e.hooksCleanup[n]?.();let r=t(eu());if(r!=null&&typeof r!="function")throw new us("useEffect return value must be a cleanup function or nothing.");e.hooksCleanup[n]=r})},run(){let t=Wn();tu(()=>{t.hooksEffect.forEach(e=>{e()}),t.hooksEffect.length=0})()},clearAll(){let t=Wn();t.hooksCleanup.forEach(e=>{e?.()}),t.hooksEffect.length=0,t.hooksCleanup.length=0}};function wS(t){return typeof t=="function"}function Le(t){return cs(e=>{let n=_S.bind(function(o){e.get()!==o&&(e.set(o),Wd())});if(e.initialized)return[e.get(),n];let r=wS(t)?t():t;return e.set(r),[r,n]})}function Un(t,e){cs(n=>{let r=n.get();(!Array.isArray(r)||e.some((o,s)=>!Object.is(o,r[s])))&&zn.queue(t),n.set(e)})}import{styleText as ht}from"node:util";import dt from"node:process";function vS(){return dt.platform.startsWith("win")?!!dt.env.CI||!!dt.env.WT_SESSION||!!dt.env.TERMINUS_SUBLIME||dt.env.ConEmuTask==="{cmd::Cmder}"||dt.env.TERM_PROGRAM==="Terminus-Sublime"||dt.env.TERM_PROGRAM==="vscode"||dt.env.TERM==="xterm-256color"||dt.env.TERM==="alacritty"||dt.env.TERMINAL_EMULATOR==="JetBrains-JediTerm":dt.env.TERM!=="linux"}var zd={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},Ud={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},SS={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},ES={...zd,...Ud},kS={...zd,...SS},DS=vS(),TS=DS?ES:kS,$d=TS,rq=Object.entries(Ud);var RS={prefix:{idle:ht("blue","?"),done:ht("green",$d.tick)},spinner:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"].map(t=>ht("yellow",t))},keybindings:[],style:{answer:t=>ht("cyan",t),message:t=>ht("bold",t),error:t=>ht("red",`> ${t}`),defaultAnswer:t=>ht("dim",`(${t})`),help:t=>ht("dim",t),highlight:t=>ht("cyan",t),key:t=>ht("cyan",ht("bold",`<${t}>`))}};function Hd(){return{...RS,keybindings:qd()}}function Vd(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Gd(...t){let e={};for(let n of t)for(let[r,i]of Object.entries(n)){let o=e[r];e[r]=Vd(o)&&Vd(i)?Gd(o,i):i}return e}function $n(...t){let e=[Hd(),...t.filter(n=>n!=null)];return Gd(...e)}function ji({status:t="idle",theme:e}){let[n,r]=Le(!1),[i,o]=Le(0),{prefix:s,spinner:a}=$n(e);return Un(()=>{if(t==="loading"){let l,c=-1,f=setTimeout(()=>{r(!0),l=setInterval(()=>{c=c+1,o(c%a.frames.length)},a.interval)},300);return()=>{clearTimeout(f),clearInterval(l)}}else r(!1)},[t]),n?a.frames[i]:typeof s=="string"?s:s[t==="loading"?"idle":t]??s.idle}function Kd(t){return Le({current:t})[0]}function Bi(t){let e=Kd(t);e.current=t,Un(n=>{let r=!1,i=tu((o,s)=>{r||e.current(s,n)});return n.input.on("keypress",i),()=>{r=!0,n.input.removeListener("keypress",i)}},[])}var ph=ae(Qd(),1);var Zd=(()=>{let t=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return e=>{let n=0;for(t.lastIndex=0;t.test(e);)n+=1;return e.length-n}})(),Jd=t=>t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510,Xd=t=>t===8987||t===9001||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12771||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=19903||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t>=131072&&t<=196605||t>=196608&&t<=262141;var IS=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,OS=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,eh=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,PS=/\t{1,1000}/y,th=new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*","yu"),LS=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,NS=new RegExp("\\p{M}+","gu"),MS={limit:1/0,ellipsis:""},nh=(t,e={},n={})=>{let r=e.limit??1/0,i=e.ellipsis??"",o=e?.ellipsisWidth??(i?nh(i,MS,n).width:0),s=0,a=n.controlWidth??0,u=n.tabWidth??8,l=n.emojiWidth??2,c=2,f=n.regularWidth??1,p=n.wideWidth??c,d=[[LS,f],[IS,s],[OS,a],[PS,u],[th,l],[eh,p]],b=0,g=0,S=t.length,y=0,h=!1,m=S,w=Math.max(0,r-o),T=0,v=0,E=0,L=0;e:for(;;){if(v>T||g>=S&&g>b){let k=t.slice(T,v)||t.slice(b,g);y=0;for(let I of k.replaceAll(NS,"")){let N=I.codePointAt(0)||0;if(Jd(N)?L=c:Xd(N)?L=p:L=f,E+L>w&&(m=Math.min(m,Math.max(T,b)+y)),E+L>r){h=!0;break e}y+=I.length,E+=L}T=v=0}if(g>=S)break e;for(let k=0,I=d.length;k<I;k++){let[N,M]=d[k];if(N.lastIndex=g,N.test(t)){if(y=N===eh?Zd(t.slice(g,N.lastIndex)):N===th?1:N.lastIndex-g,L=y*M,E+L>w&&(m=Math.min(m,g+Math.floor((w-E)/M))),E+L>r){h=!0;break e}E+=L,T=b,v=g,g=b=N.lastIndex;continue e}}g+=1}return{width:h?w:E,index:h?m:S,truncated:h,ellipsed:h&&r>=o}},rh=nh;var FS={limit:1/0,ellipsis:"",ellipsisWidth:0},qS=(t,e={})=>rh(t,FS,e).width,$t=qS;var fs="\x1B",lh="\x9B",jS=39,ru="\x07",uh="[",BS="]",ch="m",iu=`${BS}8;;`,ih=new RegExp(`(?:\\${uh}(?<code>\\d+)m|\\${iu}(?<uri>.*)${ru})`,"y"),oh=t=>{if(t>=30&&t<=37||t>=90&&t<=97)return 39;if(t>=40&&t<=47||t>=100&&t<=107)return 49;if(t===1||t===2)return 22;if(t===3)return 23;if(t===4)return 24;if(t===7)return 27;if(t===8)return 28;if(t===9)return 29;if(t===0)return 0},sh=t=>`${fs}${uh}${t}${ch}`,ah=t=>`${fs}${iu}${t}${ru}`,nu=(t,e,n)=>{let r=e[Symbol.iterator](),i=!1,o=!1,s=t.at(-1),a=s===void 0?0:$t(s),u=r.next(),l=r.next(),c=0;for(;!u.done;){let f=u.value,p=$t(f);a+p<=n?t[t.length-1]+=f:(t.push(f),a=0),(f===fs||f===lh)&&(i=!0,o=e.startsWith(iu,c+1)),i?o?f===ru&&(i=!1,o=!1):f===ch&&(i=!1):(a+=p,a===n&&!l.done&&(t.push(""),a=0)),u=l,l=r.next(),c+=f.length}s=t.at(-1),!a&&s!==void 0&&s.length&&t.length>1&&(t[t.length-2]+=t.pop())},WS=t=>{let e=t.split(" "),n=e.length;for(;n&&!$t(e[n-1]);)n--;return n===e.length?t:e.slice(0,n).join(" ")+e.slice(n).join("")},zS=(t,e,n={})=>{if(n.trim!==!1&&t.trim()==="")return"";let r="",i,o,s=t.split(" "),a=[""],u=0;for(let f=0;f<s.length;f++){let p=s[f];if(n.trim!==!1){let b=a.at(-1)??"",g=b.trimStart();b.length!==g.length&&(a[a.length-1]=g,u=$t(g))}f!==0&&(u>=e&&(n.wordWrap===!1||n.trim===!1)&&(a.push(""),u=0),(u||n.trim===!1)&&(a[a.length-1]+=" ",u++));let d=$t(p);if(n.hard&&d>e){let b=e-u,g=1+Math.floor((d-b-1)/e);Math.floor((d-1)/e)<g&&a.push(""),nu(a,p,e),u=$t(a.at(-1)??"");continue}if(u+d>e&&u&&d){if(n.wordWrap===!1&&u<e){nu(a,p,e),u=$t(a.at(-1)??"");continue}a.push(""),u=0}if(u+d>e&&n.wordWrap===!1){nu(a,p,e),u=$t(a.at(-1)??"");continue}a[a.length-1]+=p,u+=d}n.trim!==!1&&(a=a.map(f=>WS(f)));let l=a.join(`
37
+ `),c=!1;for(let f=0;f<l.length;f++){let p=l[f];if(r+=p,c)c=!1;else if(c=p>="\uD800"&&p<="\uDBFF",c)continue;if(p===fs||p===lh){ih.lastIndex=f+1;let b=ih.exec(l)?.groups;if(b?.code!==void 0){let g=Number.parseFloat(b.code);i=g===jS?void 0:g}else b?.uri!==void 0&&(o=b.uri.length===0?void 0:b.uri)}if(l[f+1]===`
38
+ `){o&&(r+=ah(""));let d=i?oh(i):void 0;i&&d&&(r+=sh(d))}else p===`
39
+ `&&(i&&oh(i)&&(r+=sh(i)),o&&(r+=ah(o)))}return r},US=/\r?\n/;function fh(t,e,n){return String(t).normalize().split(US).map(r=>zS(r,e,n)).join(`
40
40
  `)}function ou(t,e){return t.split(`
41
- `).flatMap(n=>ch(n,e,{trim:!1,wordWrap:!1}).split(`
41
+ `).flatMap(n=>fh(n,e,{trim:!1,wordWrap:!1}).split(`
42
42
  `).map(r=>r.trimEnd())).join(`
43
- `)}function ph(){return(0,fh.default)({defaultWidth:80,output:eu().output})}var wh=ae(hh(),1);import*as _h from"node:readline";import{AsyncResource as VS}from"node:async_hooks";var Vn=[];Vn.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Vn.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Vn.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var ds=t=>!!t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function",au=Symbol.for("signal-exit emitter"),lu=globalThis,WS=Object.defineProperty.bind(Object),uu=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(lu[au])return lu[au];WS(lu,au,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,n){this.listeners[e].push(n)}removeListener(e,n){let r=this.listeners[e],i=r.indexOf(n);i!==-1&&(i===0&&r.length===1?r.length=0:r.splice(i,1))}emit(e,n,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let i=!1;for(let o of this.listeners[e])i=o(n,r)===!0||i;return e==="exit"&&(i=this.emit("afterExit",n,r)||i),i}},hs=class{},zS=t=>({onExit(e,n){return t.onExit(e,n)},load(){return t.load()},unload(){return t.unload()}}),cu=class extends hs{onExit(){return()=>{}}load(){}unload(){}},fu=class extends hs{#r=pu.platform==="win32"?"SIGINT":"SIGHUP";#n=new uu;#t;#e;#i;#o={};#s=!1;constructor(e){super(),this.#t=e,this.#o={};for(let n of Vn)this.#o[n]=()=>{let r=this.#t.listeners(n),{count:i}=this.#n,o=e;if(typeof o.__signal_exit_emitter__=="object"&&typeof o.__signal_exit_emitter__.count=="number"&&(i+=o.__signal_exit_emitter__.count),r.length===i){this.unload();let s=this.#n.emit("exit",null,n),a=n==="SIGHUP"?this.#r:n;s||e.kill(e.pid,a)}};this.#i=e.reallyExit,this.#e=e.emit}onExit(e,n){if(!ds(this.#t))return()=>{};this.#s===!1&&this.load();let r=n?.alwaysLast?"afterExit":"exit";return this.#n.on(r,e),()=>{this.#n.removeListener(r,e),this.#n.listeners.exit.length===0&&this.#n.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#s){this.#s=!0,this.#n.count+=1;for(let e of Vn)try{let n=this.#o[e];n&&this.#t.on(e,n)}catch{}this.#t.emit=(e,...n)=>this.#a(e,...n),this.#t.reallyExit=e=>this.#l(e)}}unload(){this.#s&&(this.#s=!1,Vn.forEach(e=>{let n=this.#o[e];if(!n)throw new Error("Listener not defined for signal: "+e);try{this.#t.removeListener(e,n)}catch{}}),this.#t.emit=this.#e,this.#t.reallyExit=this.#i,this.#n.count-=1)}#l(e){return ds(this.#t)?(this.#t.exitCode=e||0,this.#n.emit("exit",this.#t.exitCode,null),this.#i.call(this.#t,this.#t.exitCode)):0}#a(e,...n){let r=this.#e;if(e==="exit"&&ds(this.#t)){typeof n[0]=="number"&&(this.#t.exitCode=n[0]);let i=r.call(this.#t,e,...n);return this.#n.emit("exit",this.#t.exitCode,null),i}else return r.call(this.#t,e,...n)}},pu=globalThis.process,{onExit:mh,load:Cq,unload:Iq}=zS(ds(pu)?new fu(pu):new cu);import{stripVTControlCharacters as $S}from"node:util";var yh="\x1B[?25l",bh="\x1B[?25h",du=(t=1)=>t>0?`\x1B[${t}A`:"",hu=(t=1)=>t>0?`\x1B[${t}B`:"",mu=(t,e)=>typeof e=="number"&&!Number.isNaN(e)?`\x1B[${e+1};${t+1}H`:`\x1B[${t+1}G`,gh="\x1B[2K",gu=t=>t>0?(gh+du(1)).repeat(t-1)+gh+"\x1B[G":"";var xh=t=>t.split(`
44
- `).length,HS=t=>t.split(`
45
- `).pop()??"",Wi=class{height=0;extraLinesUnderPrompt=0;cursorPos;rl;constructor(e){this.rl=e,this.cursorPos=e.getCursorPos()}write(e){this.rl.output.unmute(),this.rl.output.write(e),this.rl.output.mute()}render(e,n=""){let r=HS(e),i=$S(r),o=i;this.rl.line.length>0&&(o=o.slice(0,-this.rl.line.length)),this.rl.setPrompt(o),this.cursorPos=this.rl.getCursorPos();let s=ph();e=ou(e,s),n=ou(n,s),i.length%s===0&&(e+=`
43
+ `)}function dh(){return(0,ph.default)({defaultWidth:80,output:eu().output})}var vh=ae(mh(),1);import*as wh from"node:readline";import{AsyncResource as QS}from"node:async_hooks";var Hn=[];Hn.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Hn.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Hn.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var ps=t=>!!t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function",au=Symbol.for("signal-exit emitter"),lu=globalThis,HS=Object.defineProperty.bind(Object),uu=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(lu[au])return lu[au];HS(lu,au,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,n){this.listeners[e].push(n)}removeListener(e,n){let r=this.listeners[e],i=r.indexOf(n);i!==-1&&(i===0&&r.length===1?r.length=0:r.splice(i,1))}emit(e,n,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let i=!1;for(let o of this.listeners[e])i=o(n,r)===!0||i;return e==="exit"&&(i=this.emit("afterExit",n,r)||i),i}},ds=class{},VS=t=>({onExit(e,n){return t.onExit(e,n)},load(){return t.load()},unload(){return t.unload()}}),cu=class extends ds{onExit(){return()=>{}}load(){}unload(){}},fu=class extends ds{#r=pu.platform==="win32"?"SIGINT":"SIGHUP";#n=new uu;#t;#e;#i;#o={};#s=!1;constructor(e){super(),this.#t=e,this.#o={};for(let n of Hn)this.#o[n]=()=>{let r=this.#t.listeners(n),{count:i}=this.#n,o=e;if(typeof o.__signal_exit_emitter__=="object"&&typeof o.__signal_exit_emitter__.count=="number"&&(i+=o.__signal_exit_emitter__.count),r.length===i){this.unload();let s=this.#n.emit("exit",null,n),a=n==="SIGHUP"?this.#r:n;s||e.kill(e.pid,a)}};this.#i=e.reallyExit,this.#e=e.emit}onExit(e,n){if(!ps(this.#t))return()=>{};this.#s===!1&&this.load();let r=n?.alwaysLast?"afterExit":"exit";return this.#n.on(r,e),()=>{this.#n.removeListener(r,e),this.#n.listeners.exit.length===0&&this.#n.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#s){this.#s=!0,this.#n.count+=1;for(let e of Hn)try{let n=this.#o[e];n&&this.#t.on(e,n)}catch{}this.#t.emit=(e,...n)=>this.#a(e,...n),this.#t.reallyExit=e=>this.#l(e)}}unload(){this.#s&&(this.#s=!1,Hn.forEach(e=>{let n=this.#o[e];if(!n)throw new Error("Listener not defined for signal: "+e);try{this.#t.removeListener(e,n)}catch{}}),this.#t.emit=this.#e,this.#t.reallyExit=this.#i,this.#n.count-=1)}#l(e){return ps(this.#t)?(this.#t.exitCode=e||0,this.#n.emit("exit",this.#t.exitCode,null),this.#i.call(this.#t,this.#t.exitCode)):0}#a(e,...n){let r=this.#e;if(e==="exit"&&ps(this.#t)){typeof n[0]=="number"&&(this.#t.exitCode=n[0]);let i=r.call(this.#t,e,...n);return this.#n.emit("exit",this.#t.exitCode,null),i}else return r.call(this.#t,e,...n)}},pu=globalThis.process,{onExit:gh,load:Nq,unload:Mq}=VS(ps(pu)?new fu(pu):new cu);import{stripVTControlCharacters as KS}from"node:util";var bh="\x1B[?25l",xh="\x1B[?25h",du=(t=1)=>t>0?`\x1B[${t}A`:"",hu=(t=1)=>t>0?`\x1B[${t}B`:"",mu=(t,e)=>typeof e=="number"&&!Number.isNaN(e)?`\x1B[${e+1};${t+1}H`:`\x1B[${t+1}G`,yh="\x1B[2K",gu=t=>t>0?(yh+du(1)).repeat(t-1)+yh+"\x1B[G":"";var _h=t=>t.split(`
44
+ `).length,YS=t=>t.split(`
45
+ `).pop()??"",Wi=class{height=0;extraLinesUnderPrompt=0;cursorPos;rl;constructor(e){this.rl=e,this.cursorPos=e.getCursorPos()}write(e){this.rl.output.unmute(),this.rl.output.write(e),this.rl.output.mute()}render(e,n=""){let r=YS(e),i=KS(r),o=i;this.rl.line.length>0&&(o=o.slice(0,-this.rl.line.length)),this.rl.setPrompt(o),this.cursorPos=this.rl.getCursorPos();let s=dh();e=ou(e,s),n=ou(n,s),i.length%s===0&&(e+=`
46
46
  `);let a=e+(n?`
47
- `+n:""),l=Math.floor(i.length/s)-this.cursorPos.rows+(n?xh(n):0);l>0&&(a+=du(l)),a+=mu(this.cursorPos.cols),this.write(hu(this.extraLinesUnderPrompt)+gu(this.height)+a),this.extraLinesUnderPrompt=l,this.height=xh(a)}checkCursorPos(){let e=this.rl.getCursorPos();e.cols!==this.cursorPos.cols&&(this.write(mu(e.cols)),this.cursorPos=e)}done({clearContent:e}){this.rl.setPrompt("");let n=hu(this.extraLinesUnderPrompt);n+=e?gu(this.height):`
48
- `,n+="\x1B[G",n+=bh,this.write(n),this.rl.close()}};var ms=class extends Promise{static withResolver(){let e,n;return{promise:new Promise((i,o)=>{e=i,n=o}),resolve:e,reject:n}}};import GS from"node:path";var KS=globalThis.setImmediate;function YS(){let t=Error.prepareStackTrace,e=[];try{Error.prepareStackTrace=(n,r)=>{let i=r.slice(1);return e=i,i},new Error().stack}catch{return e}return Error.prepareStackTrace=t,e}function zi(t){let e=YS();return(r,i={})=>{let{input:o=process.stdin,signal:s}=i,a=new Set,u=new wh.default;u.pipe(i.output??process.stdout);let l=_h.createInterface({terminal:!0,input:o,output:u});u.mute();let c=new Wi(l),{promise:f,resolve:p,reject:d}=ms.withResolver(),b=()=>d(new ls);if(s){let S=()=>d(new as({cause:s.reason}));if(s.aborted)return S(),Object.assign(f,{cancel:b});s.addEventListener("abort",S),a.add(()=>s.removeEventListener("abort",S))}a.add(mh((S,y)=>{d(new qi(`User force closed the prompt with ${S} ${y}`))}));let g=()=>d(new qi("User force closed the prompt with SIGINT"));return l.on("SIGINT",g),a.add(()=>l.removeListener("SIGINT",g)),jd(l,S=>{let y=VS.bind(()=>Un.clearAll());l.on("close",y),a.add(()=>l.removeListener("close",y));let h=()=>{let m=()=>c.checkCursorPos();l.input.on("keypress",m),a.add(()=>l.input.removeListener("keypress",m));let w=null;S(()=>{let T=!1;try{let v=t(r,k=>{T?p(k):w={value:k}});if(v===void 0){let k=e[1]?.getFileName();throw k&&!k.startsWith("file://")&&(k=GS.resolve(k)),new Error(`Prompt functions must return a string.
49
- at ${k}`)}let[E,L]=typeof v=="string"?[v]:v;c.render(E,L),Un.run()}catch(v){d(v)}if(T=!0,w!==null){let{value:v}=w;w=null,p(v)}})};return"readableFlowing"in o?KS(h):h(),Object.assign(f.then(m=>(Un.clearAll(),m),m=>{throw Un.clearAll(),m}).finally(()=>{a.forEach(m=>m()),c.done({clearContent:!!i.clearPromptOnDone}),u.end()}).then(()=>f),{cancel:b})})}}var QS={validationFailureMode:"keep"},vh=zi((t,e)=>{let{prefill:n="tab"}=t,r=Hn(QS,t.theme),[i,o]=Le("idle"),[s,a]=Le(String(t.default??"")),[u,l]=Le(),[c,f]=Le(""),p=ji({status:i,theme:r});async function d(h){let{required:m,pattern:w,patternError:T="Invalid input"}=t;return m&&!h?"You must provide a value":w&&!w.test(h)?T:typeof t.validate=="function"?await t.validate(h)||"You must provide a valid value":!0}Bi(async(h,m)=>{if(i==="idle")if(Fi(h)){let w=c||s;o("loading");let T=await d(w);T===!0?(f(w),o("done"),e(w)):(r.validationFailureMode==="clear"?f(""):m.write(c),l(T),o("idle"))}else Jl(h)&&!c?a(""):Xl(h)&&!c?(a(""),m.clearLine(0),m.write(s),f(s)):(f(m.line),l(void 0))}),$n(h=>{n==="editable"&&s&&(h.write(s),f(s))},[]);let b=r.style.message(t.message,i),g=c;typeof t.transformer=="function"?g=t.transformer(c,{isFinal:i==="done"}):i==="done"&&(g=r.style.answer(c));let S;s&&i!=="done"&&!c&&(S=r.style.defaultAnswer(s));let y="";return u&&(y=r.style.error(u)),[[p,b,S,g].filter(h=>h!==void 0).join(" "),y]});var ZS={style:{maskedText:"[input is masked]"}},gs=zi((t,e)=>{let{validate:n=()=>!0}=t,r=Hn(ZS,t.theme),[i,o]=Le("idle"),[s,a]=Le(),[u,l]=Le(""),c=ji({status:i,theme:r});Bi(async(g,S)=>{if(i==="idle")if(Fi(g)){let y=u;o("loading");let h=await n(y);h===!0?(l(y),o("done"),e(y)):(S.write(u),a(h||"You must provide a valid value"),o("idle"))}else l(S.line),a(void 0)});let f=r.style.message(t.message,i),p="",d;t.mask?p=(typeof t.mask=="string"?t.mask:"*").repeat(u.length):i!=="done"&&(d=`${r.style.help(r.style.maskedText)}${yh}`),i==="done"&&(p=r.style.answer(p));let b="";return s&&(b=r.style.error(s)),[[c,f,t.mask?p:d].join(" "),b]});import*as We from"fs/promises";import*as St from"path";var JS={};async function yu(t,e){let n=await fetch(`https://mods.factorio.com/api/mods/${t}${e?"/full":""}`);if(!n.ok)throw new Error(n.statusText);return await n.json()}var Gn=class{constructor(e,n){this.modsPath=e;this.playerdataPath=n;this.Loaded=this.reload()}modsPath;playerdataPath;modList={mods:[]};Loaded;async reload(){let e=St.resolve(this.modsPath,"./mod-list.json");try{this.modList=JSON.parse(await We.readFile(e,"utf8"))}catch{this.modList={mods:[]}}}async write(){let e=St.resolve(this.modsPath,"./mod-list.json");return We.writeFile(e,JSON.stringify(this.modList,null,2),"utf8")}async getDownloadCredentials(e){let n=this.playerdataPath??St.resolve(this.modsPath,"../player-data.json"),r=n?await We.readFile(n,"utf8").then(a=>JSON.parse(a)).catch(()=>{}):void 0;if(r?.["service-token"])return{username:r["service-username"],token:r["service-token"]};let i=await e(r?.["service-username"]),o=await fetch("https://auth.factorio.com/api-login",{method:"POST",body:new URLSearchParams({username:i.username,password:i.password,api_version:"4",require_game_ownership:"true"})});if(!o.ok)throw new Error(o.statusText);let s=await o.json();return r&&(r["service-username"]=s.username,r["service-token"]=s.token,await We.writeFile(n,JSON.stringify(r,void 0,2))),s}async findInstallSource(e,n){if(n.origin!=="portal"){let a=JS[e];if(a)return a;if(n.origin==="bundle")throw new Error(`No bundled package for ${e}`)}let r=await yu(e),i=r.releases[r.releases.length-1],o=await this.getDownloadCredentials(n.credentialPrompt),s=await fetch(`https://mods.factorio.com/${i.download_url}?username=${o.username}&token=${o.token}`);if(!s.ok)throw new Error(s.statusText);return{version:i.version,zip:await s.bytes()}}async installMod(e,n){let r=await this.findInstallSource(e,n),i=r.version,o=this.modList.mods.find(c=>c.name===e),s=o?.enabled?o.version??!0:o?.enabled;async function a(c){let f=St.resolve(c,"info.json");try{let p=await We.readFile(f,"utf8");if(p){let d=JSON.parse(p);if(d.name===e&&d.version===i)return!0}}catch{}return!1}if(!n.force){if(await a(St.resolve(this.modsPath,e)))return this.set(e,i),{using:i,from:"folder",previous:s};if(await a(St.resolve(this.modsPath,`${e}_${i}`)))return this.set(e,i),{using:i,from:"versioned_folder",previous:s};try{return await We.access(St.resolve(this.modsPath,`${e}_${i}.zip`)),this.set(e,i),{using:i,from:"existing",previous:s}}catch{}}let u=We.writeFile(St.resolve(this.modsPath,`${e}_${i}.zip`),r.zip),l;if(!n.keepOld){let c=(await We.readdir(this.modsPath,"utf8")).filter(f=>f.startsWith(e)&&f.endsWith(".zip")&&f.substring(e.length,f.length-4).match(/^_[\d\.]+$/)&&f!==`${e}_${i}.zip`);c.length===1&&(await We.unlink(St.resolve(this.modsPath,c[0])),l=c[0].substring(e.length+1,c[0].length-4))}return this.set(e,i),await u,{using:i,from:"installed",previous:s,replaced:l}}set(e,n){let r=!!n,i=typeof n=="string"?n:void 0,o=this.modList.mods.find(s=>s.name===e);o?(o.enabled=r,o.version=i):this.modList.mods.push({name:e,enabled:r,version:i})}disableAll(){this.modList.mods.forEach(e=>e.enabled=!1)}};var on=ne.command("mods").description("Mod management commands").option("--modsPath <modsPath>","mods directory to operate on",process.cwd());on.command("enable <modname> [version]").description("Enable a mod or select a specific version of it").action(async(t,e)=>{let n=new Gn(on.opts().modsPath);await n.Loaded,n.set(t,e??!0),await n.write()});on.command("disable <modname>").description("Disable a mod").action(async t=>{let e=new Gn(on.opts().modsPath);await e.Loaded,e.set(t,!1),await e.write()});on.command("install <modname>").description("Install a mod.").option("--keepOld","Don't remove old versions if present").option("--force","Install even if there is an existing mod of the correct version").option("--playerData <player-data.json>").action(async(t,e)=>{let n=new Gn(on.opts().modsPath,e.playerData);await n.Loaded,console.log(JSON.stringify(await n.installMod(t,{origin:"any",force:e.force,credentialPrompt:async r=>{r=await vh({message:"Username:",default:r});let i=await gs({message:"Password:"});return{username:r,password:i}}})))});on.command("adjust <changes...>").description("Configure multiple mods at once: modname=true|false|x.y.z").option("--allowDisableBase","Allow disabling the base mod").option("--disableExtra","Disable any mods not named in the changeset").action(async(t,e)=>{let n=new Gn(on.opts().modsPath);await n.Loaded,e.disableExtra&&(console.log("All Mods disabled"),n.disableAll());for(let r of t){let i=r.match(/^(.*)=(true|false|(?:\d+\.){2}\d+)$/);if(!i)console.log(`Doing nothing with invalid adjust arg "${r}"`);else{let o=i[1],s=i[2]==="true"?!0:i[2]==="false"?!1:i[2];n.set(o,s),console.log(`${o} ${s===!0?"enabled":s===!1?"disabled":"enabled version "+s}`)}}e.allowDisableBase||n.set("base",!0);try{await n.write()}catch(r){console.error(`Failed to save mod list:
50
- ${r}`),process.exit(1)}});import*as an from"fs/promises";var sn=ne.command("settings").description("Edit mod settings").option("--modsPath <modsPath>","mods directory to operate on",process.cwd());sn.command("list").description("List all current saved values").action(async()=>{let t=zt.joinPath(Ge.file(sn.opts().modsPath),"mod-settings.dat"),e=new Pi(new qn(await an.readFile(t.fsPath)));for(let n of e.list()){let r;switch(typeof n.value){case"string":r=`"${n.value}"`;break;case"object":r=`Color(${n.value.r}, ${n.value.g}, ${n.value.b}, ${n.value.a})`;break;default:r=n.value.toString();break}console.log(`${n.scope} ${n.setting} ${r}`)}});sn.command("get <scope> <name>").description("Get the saved value of a setting").action(async(t,e)=>{switch(t){case"startup":case"runtime-global":case"runtime-per-user":break;default:console.error(`Unknown scope "${t}"`),process.exit(1)}let n=zt.joinPath(Ge.file(sn.opts().modsPath),"mod-settings.dat"),i=new Pi(new qn(await an.readFile(n.fsPath))).get(t,e);if(!i){console.log("undefined");return}switch(i.type){case"bool":case"number":console.log(`${i.value}`);break;case"int":console.log(`${i.value}n`);break;case"string":console.log(`"${i.value}"`);break;case"color":console.log(`Color(${i.value.r}, ${i.value.g}, ${i.value.b}, ${i.value.a})`);break;default:console.error(`Unknown type ${i.type}`),process.exit(1)}});sn.command("set <scope> <name>").option("--type <type>","Force type (otherwise autodetect)").argument("<value>").description("Set the saved value of a setting").action(async(t,e,n,r)=>{switch(t){case"startup":case"runtime-global":case"runtime-per-user":break;default:console.error(`Unknown scope "${t}"`),process.exit(1)}let i=zt.joinPath(Ge.file(sn.opts().modsPath),"mod-settings.dat"),o=new Pi(new qn(await an.readFile(i.fsPath)));if(r.type)switch(r.type){case"bool":if(n==="true"||n==="false"){o.set(t,e,{type:"bool",value:n==="true"});break}else console.error(`invalid bool value ${n}`),process.exit(1);case"number":let s=Number(n);if(!isNaN(s)&&n!==""){o.set(t,e,{type:"number",value:s});break}else console.error(`invalid number value ${n}`),process.exit(1);case"color":let a=n.match(/(?:color:)?\(([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)(?:\s*,\s*([\d.]+)\s*)?\)/i);if(a){o.set(t,e,{type:"color",value:{r:Math.max(0,Math.min(1,parseFloat(a[1]))),g:Math.max(0,Math.min(1,parseFloat(a[2]))),b:Math.max(0,Math.min(1,parseFloat(a[3]))),a:a[4]?Math.max(0,Math.min(1,parseFloat(a[4]))):1}});break}if(a=n.match(/#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/),a){o.set(t,e,{type:"color",value:{r:parseInt(a[1],16)/255,g:parseInt(a[2],16)/255,b:parseInt(a[3],16)/255,a:a[4]?parseInt(a[4],16)/255:1}});break}console.error(`invalid color value ${n}`),process.exit(1);case"string":o.set(t,e,{type:"string",value:n});break;default:console.error(`Unknown type ${r.type}`),process.exit(1)}else if(n==="true"||n==="false")o.set(t,e,{type:"bool",value:n==="true"});else{let s=Number(n);!isNaN(s)&&n!==""?o.set(t,e,{type:"number",value:s}):o.set(t,e,{type:"string",value:n})}await an.writeFile(i.fsPath,o.save())});sn.command("unset <scope> <name>").description("Remove the saved value of a setting").action(async(t,e)=>{switch(t){case"startup":case"runtime-global":case"runtime-per-user":break;default:console.error(`Unknown scope "${t}"`),process.exit(1)}let n=zt.joinPath(Ge.file(sn.opts().modsPath),"mod-settings.dat"),r=new Pi(new qn(await an.readFile(n.fsPath)));r.set(t,e),await an.writeFile(n.fsPath,r.save())});import*as Mt from"fs/promises";import*as y0 from"crypto";var Sh={"application/prs.cww":["cww"],"application/prs.xsf+xml":["xsf"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["*xfdf"],"application/vnd.age":["age"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.autodesk.fbx":["fbx"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dcmp+xml":["dcmp"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["*fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.slides":["ggs"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.drawing":["gdraw"],"application/vnd.google-apps.form":["gform"],"application/vnd.google-apps.jam":["gjam"],"application/vnd.google-apps.map":["gmap"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.script":["gscript"],"application/vnd.google-apps.site":["gsite"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.gov.sk.xmldatacontainer+xml":["xdcf"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["*mpp","mpt"],"application/vnd.ms-visio.viewer":["vdx"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.nato.bindingdataobject+xml":["bdo"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.procrate.brushset":["brushset"],"application/vnd.procreate.brush":["brush"],"application/vnd.procreate.dream":["drm"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.pwg-xhtml-print+xml":["xhtm"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml","uo"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw","vsdx","vtx"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blender":["blend"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-compressed":["*rar"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-ipynb+json":["ipynb"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["*prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["*sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zip-compressed":["*zip"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["*aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif","btf"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.blockfact.facti":["facti"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-adobe-dng":["dng"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.bary":["bary"],"model/vnd.cld":["cld"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["*mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.pytha.pyox":["pyo","pyox"],"model/vnd.sap.vds":["vds"],"model/vnd.usda":["usda"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.familysearch.gedcom":["ged"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};Object.freeze(Sh);var Eh=Sh;var kh={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/dicom":["dcm"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg","one","onea"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"application/zip+dotlottie":["lottie"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a","m4b"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/ief":["ief"],"image/jaii":["jaii"],"image/jais":["jais"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpg","jpeg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxl":["jxl"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/pjpeg":["jfif"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime","mht","mhtml"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step":["step","stp","stpnc","p21","210"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts","m2t","m2ts","mts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(kh);var Dh=kh;var tt=function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Ir,Ui,Kn,bu=class{constructor(...e){Ir.set(this,new Map),Ui.set(this,new Map),Kn.set(this,new Map);for(let n of e)this.define(n)}define(e,n=!1){for(let[r,i]of Object.entries(e)){r=r.toLowerCase(),i=i.map(a=>a.toLowerCase()),tt(this,Kn,"f").has(r)||tt(this,Kn,"f").set(r,new Set);let o=tt(this,Kn,"f").get(r),s=!0;for(let a of i){let u=a.startsWith("*");if(a=u?a.slice(1):a,o?.add(a),s&&tt(this,Ui,"f").set(r,a),s=!1,u)continue;let l=tt(this,Ir,"f").get(a);if(l&&l!=r&&!n)throw new Error(`"${r} -> ${a}" conflicts with "${l} -> ${a}". Pass \`force=true\` to override this definition.`);tt(this,Ir,"f").set(a,r)}}return this}getType(e){if(typeof e!="string")return null;let n=e.replace(/^.*[/\\]/s,"").toLowerCase(),r=n.replace(/^.*\./s,"").toLowerCase(),i=n.length<e.length;return!(r.length<n.length-1)&&i?null:tt(this,Ir,"f").get(r)??null}getExtension(e){return typeof e!="string"?null:(e=e?.split?.(";")[0],(e&&tt(this,Ui,"f").get(e.trim().toLowerCase()))??null)}getAllExtensions(e){return typeof e!="string"?null:tt(this,Kn,"f").get(e.toLowerCase())??null}_freeze(){this.define=()=>{throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances")},Object.freeze(this);for(let e of tt(this,Kn,"f").values())Object.freeze(e);return this}_getTestState(){return{types:tt(this,Ir,"f"),extensions:tt(this,Ui,"f")}}};Ir=new WeakMap,Ui=new WeakMap,Kn=new WeakMap;var xu=bu;var Th=new xu(Dh,Eh)._freeze();import b0 from"path";import{spawn as x0}from"child_process";var Or=(function(t){if(t==null)return nE;if(typeof t=="function")return ys(t);if(typeof t=="object")return Array.isArray(t)?XS(t):eE(t);if(typeof t=="string")return tE(t);throw new Error("Expected function, string, or object as test")});function XS(t){let e=[],n=-1;for(;++n<t.length;)e[n]=Or(t[n]);return ys(r);function r(...i){let o=-1;for(;++o<e.length;)if(e[o].apply(this,i))return!0;return!1}}function eE(t){let e=t;return ys(n);function n(r){let i=r,o;for(o in t)if(i[o]!==e[o])return!1;return!0}}function tE(t){return ys(e);function e(n){return n&&n.type===t}}function ys(t){return e;function e(n,r,i){return!!(rE(n)&&t.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function nE(){return!0}function rE(t){return t!==null&&typeof t=="object"&&"type"in t}function Rh(t){return"\x1B[33m"+t+"\x1B[39m"}var Ah=[],bs=!0,Yn=!1,xs="skip";function ln(t,e,n,r){let i;typeof e=="function"&&typeof n!="function"?(r=n,n=e):i=e;let o=Or(i),s=r?-1:1;a(t,void 0,[])();function a(u,l,c){let f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){let d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+Rh(u.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=Ah,b,g,S;if((!e||o(u,l,c[c.length-1]||void 0))&&(d=iE(n(u,c)),d[0]===Yn))return d;if("children"in u&&u.children){let y=u;if(y.children&&d[0]!==xs)for(g=(r?y.children.length:-1)+s,S=c.concat(y);g>-1&&g<y.children.length;){let h=y.children[g];if(b=a(h,g,S)(),b[0]===Yn)return b;g=typeof b[1]=="number"?b[1]:g+s}}return d}}}function iE(t){return Array.isArray(t)?t:typeof t=="number"?[bs,t]:t==null?Ah:[t]}function nt(t,e,n,r){let i,o,s;typeof e=="function"&&typeof n!="function"?(o=void 0,s=e,i=n):(o=e,s=n,i=r),ln(t,o,a,i);function a(u,l){let c=l[l.length-1],f=c?c.children.indexOf(u):void 0;return s(u,f,c)}}var oE={};function Qn(t,e){let n=e||oE,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ih(t,r,i)}function Ih(t,e,n){if(sE(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Ch(t.children,e,n)}return Array.isArray(t)?Ch(t,e,n):""}function Ch(t,e,n){let r=[],i=-1;for(;++i<t.length;)r[i]=Ih(t[i],e,n);return r.join("")}function sE(t){return!!(t&&typeof t=="object")}var _u={AElig:"\xC6",AMP:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Aring:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",Bscr:"\u212C",Bumpeq:"\u224E",CHcy:"\u0427",COPY:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",Cayleys:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",CenterDot:"\xB7",Cfr:"\u212D",Chi:"\u03A7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",Colon:"\u2237",Colone:"\u2A74",Congruent:"\u2261",Conint:"\u222F",ContourIntegral:"\u222E",Copf:"\u2102",Coproduct:"\u2210",CounterClockwiseContourIntegral:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",DD:"\u2145",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",Diamond:"\u22C4",DifferentialD:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",Downarrow:"\u21D3",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrave:"\xC8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",Equilibrium:"\u21CC",Escr:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",ExponentialE:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",HilbertSpace:"\u210B",Hopf:"\u210D",HorizontalLine:"\u2500",Hscr:"\u210B",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrave:"\xCC",Im:"\u2111",Imacr:"\u012A",ImaginaryI:"\u2148",Implies:"\u21D2",Int:"\u222C",Integral:"\u222B",Intersection:"\u22C2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",LT:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Larr:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",LeftRightArrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",Leftarrow:"\u21D0",Leftrightarrow:"\u21D4",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",LongLeftRightArrow:"\u27F7",LongRightArrow:"\u27F6",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",Longrightarrow:"\u27F9",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",Mopf:"\u{1D544}",Mscr:"\u2133",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
51
- `,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",ZeroWidthSpace:"\u200B",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acute:"\xB4",acy:"\u0430",aelig:"\xE6",af:"\u2061",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",amp:"&",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",ap:"\u2248",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",apid:"\u224B",apos:"'",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",beta:"\u03B2",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",bprime:"\u2035",breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",bumpeq:"\u224F",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cedil:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledR:"\xAE",circledS:"\u24C8",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",conint:"\u222E",copf:"\u{1D554}",coprod:"\u2210",copy:"\xA9",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dArr:"\u21D3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",ddotseq:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",dharl:"\u21C3",dharr:"\u21C2",diam:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",dot:"\u02D9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eDDot:"\u2A77",eDot:"\u2251",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",ecirc:"\xEA",ecolon:"\u2255",ecy:"\u044D",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",equals:"=",equest:"\u225F",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",erarr:"\u2971",escr:"\u212F",esdot:"\u2250",esim:"\u2242",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",gE:"\u2267",gEl:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gammad:"\u03DD",gap:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",grave:"`",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hArr:"\u21D4",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",hbar:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hslash:"\u210F",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",ic:"\u2063",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",intcal:"\u22BA",integers:"\u2124",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",isin:"\u2208",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAarr:"\u21DA",lArr:"\u21D0",lAtail:"\u291B",lBarr:"\u290E",lE:"\u2266",lEg:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",laquo:"\xAB",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lceil:"\u2308",lcub:"{",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21A2",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",leftthreetimes:"\u22CB",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",measuredangle:"\u2221",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",mstpos:"\u223E",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nGtv:"\u226B\u0338",nLeftarrow:"\u21CD",nLeftrightarrow:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nLtv:"\u226A\u0338",nRightarrow:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",neArr:"\u21D7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",ngsim:"\u2275",ngt:"\u226F",ngtr:"\u226F",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",nlArr:"\u21CD",nlE:"\u2266\u0338",nlarr:"\u219A",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219A",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nlsim:"\u2274",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nmid:"\u2224",nopf:"\u{1D55F}",not:"\xAC",notin:"\u2209",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24C8",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",ocy:"\u043E",odash:"\u229D",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",oplus:"\u2295",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oscr:"\u2134",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimes:"\u2297",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",pr:"\u227A",prE:"\u2AB3",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",primes:"\u2119",prnE:"\u2AB5",prnap:"\u2AB9",prnsim:"\u22E8",prod:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',rAarr:"\u21DB",rArr:"\u21D2",rAtail:"\u291C",rBarr:"\u290F",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",rightarrow:"\u2192",rightarrowtail:"\u21A3",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",rightthreetimes:"\u22CC",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",rsaquo:"\u203A",rscr:"\u{1D4C7}",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",sbquo:"\u201A",sc:"\u227B",scE:"\u2AB4",scap:"\u2AB8",scaron:"\u0161",sccue:"\u227D",sce:"\u2AB0",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",scnap:"\u2ABA",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",seArr:"\u21D8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",subE:"\u2AC5",subdot:"\u2ABD",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",sum:"\u2211",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",supE:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tbrk:"\u23B4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",tilde:"\u02DC",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uArr:"\u21D1",uHar:"\u2963",uacute:"\xFA",uarr:"\u2191",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udarr:"\u21C5",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uml:"\xA8",uogon:"\u0173",uopf:"\u{1D566}",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",upsi:"\u03C5",upsih:"\u03D2",upsilon:"\u03C5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",uwangle:"\u29A7",vArr:"\u21D5",vBar:"\u2AE8",vBarv:"\u2AE9",vDash:"\u22A8",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vcy:"\u0432",vdash:"\u22A2",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",vert:"|",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeetrf:"\u2128",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"};var aE={}.hasOwnProperty;function Pr(t){return aE.call(_u,t)?_u[t]:!1}function ke(t,e,n,r){let i=t.length,o=0,s;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(e,n),t.splice(...s);else for(n&&t.splice(e,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(e,0),t.splice(...s),o+=1e4,e+=1e4}function Ne(t,e){return t.length>0?(ke(t,t.length,0,e),t):e}var Oh={}.hasOwnProperty;function Ph(t){let e={},n=-1;for(;++n<t.length;)lE(e,t[n]);return e}function lE(t,e){let n;for(n in e){let i=(Oh.call(t,n)?t[n]:void 0)||(t[n]={}),o=e[n],s;if(o)for(s in o){Oh.call(i,s)||(i[s]=[]);let a=o[s];uE(i[s],Array.isArray(a)?a:a?[a]:[])}}}function uE(t,e){let n=-1,r=[];for(;++n<e.length;)(e[n].add==="after"?t:r).push(e[n]);ke(t,0,0,r)}function _s(t,e){let n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCodePoint(n)}function Ht(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Ye=un(/[A-Za-z]/),Me=un(/[\dA-Za-z]/),Lh=un(/[#-'*+\--9=?A-Z^-~]/);function $i(t){return t!==null&&(t<32||t===127)}var Hi=un(/\d/),Nh=un(/[\dA-Fa-f]/),Mh=un(/[!-/:-@[-`{-~]/);function O(t){return t!==null&&t<-2}function he(t){return t!==null&&(t<0||t===32)}function F(t){return t===-2||t===-1||t===32}var Fh=un(new RegExp("\\p{P}|\\p{S}","u")),qh=un(/\s/);function un(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function B(t,e,n,r){let i=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(u){return F(u)?(t.enter(n),a(u)):e(u)}function a(u){return F(u)&&o++<i?(t.consume(u),a):(t.exit(n),e(u))}}var jh={tokenize:cE};function cE(t){let e=t.attempt(this.parser.constructs.contentInitial,r,i),n;return e;function r(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),B(t,e,"linePrefix")}function i(a){return t.enter("paragraph"),o(a)}function o(a){let u=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(a)}function s(a){if(a===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(a);return}return O(a)?(t.consume(a),t.exit("chunkText"),o):(t.consume(a),s)}}var Wh={tokenize:fE},Bh={tokenize:pE};function fE(t){let e=this,n=[],r=0,i,o,s;return a;function a(m){if(r<n.length){let w=n[r];return e.containerState=w[1],t.attempt(w[0].continuation,u,l)(m)}return l(m)}function u(m){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&h();let w=e.events.length,T=w,v;for(;T--;)if(e.events[T][0]==="exit"&&e.events[T][1].type==="chunkFlow"){v=e.events[T][1].end;break}y(r);let E=w;for(;E<e.events.length;)e.events[E][1].end={...v},E++;return ke(e.events,T+1,0,e.events.slice(w)),e.events.length=E,l(m)}return a(m)}function l(m){if(r===n.length){if(!i)return p(m);if(i.currentConstruct&&i.currentConstruct.concrete)return b(m);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(Bh,c,f)(m)}function c(m){return i&&h(),y(r),p(m)}function f(m){return e.parser.lazy[e.now().line]=r!==n.length,s=e.now().offset,b(m)}function p(m){return e.containerState={},t.attempt(Bh,d,b)(m)}function d(m){return r++,n.push([e.currentConstruct,e.containerState]),p(m)}function b(m){if(m===null){i&&h(),y(0),t.consume(m);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),g(m)}function g(m){if(m===null){S(t.exit("chunkFlow"),!0),y(0),t.consume(m);return}return O(m)?(t.consume(m),S(t.exit("chunkFlow")),r=0,e.interrupt=void 0,a):(t.consume(m),g)}function S(m,w){let T=e.sliceStream(m);if(w&&T.push(null),m.previous=o,o&&(o.next=m),o=m,i.defineSkip(m.start),i.write(T),e.parser.lazy[m.start.line]){let v=i.events.length;for(;v--;)if(i.events[v][1].start.offset<s&&(!i.events[v][1].end||i.events[v][1].end.offset>s))return;let E=e.events.length,L=E,k,I;for(;L--;)if(e.events[L][0]==="exit"&&e.events[L][1].type==="chunkFlow"){if(k){I=e.events[L][1].end;break}k=!0}for(y(r),v=E;v<e.events.length;)e.events[v][1].end={...I},v++;ke(e.events,L+1,0,e.events.slice(E)),e.events.length=v}}function y(m){let w=n.length;for(;w-- >m;){let T=n[w];e.containerState=T[1],T[0].exit.call(e,t)}n.length=m}function h(){i.write([null]),o=void 0,i=void 0,e.containerState._closeFlow=void 0}}function pE(t,e,n){return B(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Lr(t){if(t===null||he(t)||qh(t))return 1;if(Fh(t))return 2}function Nr(t,e,n){let r=[],i=-1;for(;++i<t.length;){let o=t[i].resolveAll;o&&!r.includes(o)&&(e=o(e,n),r.push(o))}return e}var Vi={name:"attention",resolveAll:dE,tokenize:hE};function dE(t,e){let n=-1,r,i,o,s,a,u,l,c;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(r=n;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&e.sliceSerialize(t[r][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[r][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;u=t[r][1].end.offset-t[r][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;let f={...t[r][1].end},p={...t[n][1].start};zh(f,-u),zh(p,u),s={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...t[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},t[r][1].end={...s.start},t[n][1].start={...a.end},l=[],t[r][1].end.offset-t[r][1].start.offset&&(l=Ne(l,[["enter",t[r][1],e],["exit",t[r][1],e]])),l=Ne(l,[["enter",i,e],["enter",s,e],["exit",s,e],["enter",o,e]]),l=Ne(l,Nr(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),l=Ne(l,[["exit",o,e],["enter",a,e],["exit",a,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(c=2,l=Ne(l,[["enter",t[n][1],e],["exit",t[n][1],e]])):c=0,ke(t,r-1,n-r+3,l),n=r+l.length-c-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function hE(t,e){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Lr(r),o;return s;function s(u){return o=u,t.enter("attentionSequence"),a(u)}function a(u){if(u===o)return t.consume(u),a;let l=t.exit("attentionSequence"),c=Lr(u),f=!c||c===2&&i||n.includes(u),p=!i||i===2&&c||n.includes(r);return l._open=!!(o===42?f:f&&(i||!p)),l._close=!!(o===42?p:p&&(c||!f)),e(u)}}function zh(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}var wu={name:"autolink",tokenize:mE};function mE(t,e,n){let r=0;return i;function i(d){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(d){return Ye(d)?(t.consume(d),s):d===64?n(d):l(d)}function s(d){return d===43||d===45||d===46||Me(d)?(r=1,a(d)):l(d)}function a(d){return d===58?(t.consume(d),r=0,u):(d===43||d===45||d===46||Me(d))&&r++<32?(t.consume(d),a):(r=0,l(d))}function u(d){return d===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.exit("autolink"),e):d===null||d===32||d===60||$i(d)?n(d):(t.consume(d),u)}function l(d){return d===64?(t.consume(d),c):Lh(d)?(t.consume(d),l):n(d)}function c(d){return Me(d)?f(d):n(d)}function f(d){return d===46?(t.consume(d),r=0,c):d===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.exit("autolink"),e):p(d)}function p(d){if((d===45||Me(d))&&r++<63){let b=d===45?p:f;return t.consume(d),b}return n(d)}}var cn={partial:!0,tokenize:gE};function gE(t,e,n){return r;function r(o){return F(o)?B(t,i,"linePrefix")(o):i(o)}function i(o){return o===null||O(o)?e(o):n(o)}}var ws={continuation:{tokenize:bE},exit:xE,name:"blockQuote",tokenize:yE};function yE(t,e,n){let r=this;return i;function i(s){if(s===62){let a=r.containerState;return a.open||(t.enter("blockQuote",{_container:!0}),a.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(s),t.exit("blockQuoteMarker"),o}return n(s)}function o(s){return F(s)?(t.enter("blockQuotePrefixWhitespace"),t.consume(s),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(s))}}function bE(t,e,n){let r=this;return i;function i(s){return F(s)?B(t,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return t.attempt(ws,e,n)(s)}}function xE(t){t.exit("blockQuote")}var vs={name:"characterEscape",tokenize:_E};function _E(t,e,n){return r;function r(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),i}function i(o){return Mh(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(o)}}var Ss={name:"characterReference",tokenize:wE};function wE(t,e,n){let r=this,i=0,o,s;return a;function a(f){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),u}function u(f){return f===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(f),t.exit("characterReferenceMarkerNumeric"),l):(t.enter("characterReferenceValue"),o=31,s=Me,c(f))}function l(f){return f===88||f===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(f),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,s=Nh,c):(t.enter("characterReferenceValue"),o=7,s=Hi,c(f))}function c(f){if(f===59&&i){let p=t.exit("characterReferenceValue");return s===Me&&!Pr(r.sliceSerialize(p))?n(f):(t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return s(f)&&i++<o?(t.consume(f),c):n(f)}}var Uh={partial:!0,tokenize:SE},Es={concrete:!0,name:"codeFenced",tokenize:vE};function vE(t,e,n){let r=this,i={partial:!0,tokenize:T},o=0,s=0,a;return u;function u(v){return l(v)}function l(v){let E=r.events[r.events.length-1];return o=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,a=v,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),c(v)}function c(v){return v===a?(s++,t.consume(v),c):s<3?n(v):(t.exit("codeFencedFenceSequence"),F(v)?B(t,f,"whitespace")(v):f(v))}function f(v){return v===null||O(v)?(t.exit("codeFencedFence"),r.interrupt?e(v):t.check(Uh,g,w)(v)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===null||O(v)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),f(v)):F(v)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),B(t,d,"whitespace")(v)):v===96&&v===a?n(v):(t.consume(v),p)}function d(v){return v===null||O(v)?f(v):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),b(v))}function b(v){return v===null||O(v)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),f(v)):v===96&&v===a?n(v):(t.consume(v),b)}function g(v){return t.attempt(i,w,S)(v)}function S(v){return t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),y}function y(v){return o>0&&F(v)?B(t,h,"linePrefix",o+1)(v):h(v)}function h(v){return v===null||O(v)?t.check(Uh,g,w)(v):(t.enter("codeFlowValue"),m(v))}function m(v){return v===null||O(v)?(t.exit("codeFlowValue"),h(v)):(t.consume(v),m)}function w(v){return t.exit("codeFenced"),e(v)}function T(v,E,L){let k=0;return I;function I(z){return v.enter("lineEnding"),v.consume(z),v.exit("lineEnding"),N}function N(z){return v.enter("codeFencedFence"),F(z)?B(v,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):M(z)}function M(z){return z===a?(v.enter("codeFencedFenceSequence"),P(z)):L(z)}function P(z){return z===a?(k++,v.consume(z),P):k>=s?(v.exit("codeFencedFenceSequence"),F(z)?B(v,$,"whitespace")(z):$(z)):L(z)}function $(z){return z===null||O(z)?(v.exit("codeFencedFence"),E(z)):L(z)}}}function SE(t,e,n){let r=this;return i;function i(s){return s===null?n(s):(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):e(s)}}var Gi={name:"codeIndented",tokenize:kE},EE={partial:!0,tokenize:DE};function kE(t,e,n){let r=this;return i;function i(l){return t.enter("codeIndented"),B(t,o,"linePrefix",5)(l)}function o(l){let c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(l):n(l)}function s(l){return l===null?u(l):O(l)?t.attempt(EE,s,u)(l):(t.enter("codeFlowValue"),a(l))}function a(l){return l===null||O(l)?(t.exit("codeFlowValue"),s(l)):(t.consume(l),a)}function u(l){return t.exit("codeIndented"),e(l)}}function DE(t,e,n){let r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):O(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i):B(t,o,"linePrefix",5)(s)}function o(s){let a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):O(s)?i(s):n(s)}}var vu={name:"codeText",previous:RE,resolve:TE,tokenize:AE};function TE(t){let e=t.length-4,n=3,r,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r<e;)if(t[r][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(r=n-1,e++;++r<=e;)i===void 0?r!==e&&t[r][1].type!=="lineEnding"&&(i=r):(r===e||t[r][1].type==="lineEnding")&&(t[i][1].type="codeTextData",r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),e-=r-i-2,r=i+2),i=void 0);return t}function RE(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function AE(t,e,n){let r=this,i=0,o,s;return a;function a(p){return t.enter("codeText"),t.enter("codeTextSequence"),u(p)}function u(p){return p===96?(t.consume(p),i++,u):(t.exit("codeTextSequence"),l(p))}function l(p){return p===null?n(p):p===32?(t.enter("space"),t.consume(p),t.exit("space"),l):p===96?(s=t.enter("codeTextSequence"),o=0,f(p)):O(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),l):(t.enter("codeTextData"),c(p))}function c(p){return p===null||p===32||p===96||O(p)?(t.exit("codeTextData"),l(p)):(t.consume(p),c)}function f(p){return p===96?(t.consume(p),o++,f):o===i?(t.exit("codeTextSequence"),t.exit("codeText"),e(p)):(s.type="codeTextData",c(p))}}var ks=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){let r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,n,r){let i=n||0;this.setCursor(Math.trunc(e));let o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ki(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Ki(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Ki(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let n=this.left.splice(e,Number.POSITIVE_INFINITY);Ki(this.right,n.reverse())}else{let n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Ki(this.left,n.reverse())}}};function Ki(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function Ds(t){let e={},n=-1,r,i,o,s,a,u,l,c=new ks(t);for(;++n<c.length;){for(;n in e;)n=e[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,CE(c,n)),n=e[n],l=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=c.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},a=c.slice(i,n),a.unshift(r),c.splice(i,n-i+1,a))}}return ke(t,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function CE(t,e){let n=t.get(e)[1],r=t.get(e)[2],i=e-1,o=[],s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let a=s.events,u=[],l={},c,f,p=-1,d=n,b=0,g=0,S=[g];for(;d;){for(;t.get(++i)[1]!==d;);o.push(i),d._tokenizer||(c=r.sliceStream(d),d.next||c.push(null),f&&s.defineSkip(d.start),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=n;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(g=p+1,S.push(g),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(s.events=[],d?(d._tokenizer=void 0,d.previous=void 0):S.pop(),p=S.length;p--;){let y=a.slice(S[p],S[p+1]),h=o.pop();u.push([h,h+y.length-1]),t.splice(h,2,y)}for(u.reverse(),p=-1;++p<u.length;)l[b+u[p][0]]=b+u[p][1],b+=u[p][1]-u[p][0]-1;return l}var Su={resolve:OE,tokenize:PE},IE={partial:!0,tokenize:LE};function OE(t){return Ds(t),t}function PE(t,e){let n;return r;function r(a){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):O(a)?t.check(IE,s,o)(a):(t.consume(a),i)}function o(a){return t.exit("chunkContent"),t.exit("content"),e(a)}function s(a){return t.consume(a),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function LE(t,e,n){let r=this;return i;function i(s){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),B(t,o,"linePrefix")}function o(s){if(s===null||O(s))return n(s);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):t.interrupt(r.parser.constructs.flow,n,e)(s)}}function Ts(t,e,n,r,i,o,s,a,u){let l=u||Number.POSITIVE_INFINITY,c=0;return f;function f(y){return y===60?(t.enter(r),t.enter(i),t.enter(o),t.consume(y),t.exit(o),p):y===null||y===32||y===41||$i(y)?n(y):(t.enter(r),t.enter(s),t.enter(a),t.enter("chunkString",{contentType:"string"}),g(y))}function p(y){return y===62?(t.enter(o),t.consume(y),t.exit(o),t.exit(i),t.exit(r),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===62?(t.exit("chunkString"),t.exit(a),p(y)):y===null||y===60||O(y)?n(y):(t.consume(y),y===92?b:d)}function b(y){return y===60||y===62||y===92?(t.consume(y),d):d(y)}function g(y){return!c&&(y===null||y===41||he(y))?(t.exit("chunkString"),t.exit(a),t.exit(s),t.exit(r),e(y)):c<l&&y===40?(t.consume(y),c++,g):y===41?(t.consume(y),c--,g):y===null||y===32||y===40||$i(y)?n(y):(t.consume(y),y===92?S:g)}function S(y){return y===40||y===41||y===92?(t.consume(y),g):g(y)}}function Rs(t,e,n,r,i,o){let s=this,a=0,u;return l;function l(d){return t.enter(r),t.enter(i),t.consume(d),t.exit(i),t.enter(o),c}function c(d){return a>999||d===null||d===91||d===93&&!u||d===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):d===93?(t.exit(o),t.enter(i),t.consume(d),t.exit(i),t.exit(r),e):O(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),c):(t.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||O(d)||a++>999?(t.exit("chunkString"),c(d)):(t.consume(d),u||(u=!F(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(t.consume(d),a++,f):f(d)}}function As(t,e,n,r,i,o){let s;return a;function a(p){return p===34||p===39||p===40?(t.enter(r),t.enter(i),t.consume(p),t.exit(i),s=p===40?41:p,u):n(p)}function u(p){return p===s?(t.enter(i),t.consume(p),t.exit(i),t.exit(r),e):(t.enter(o),l(p))}function l(p){return p===s?(t.exit(o),u(s)):p===null?n(p):O(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),B(t,l,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===s||p===null||O(p)?(t.exit("chunkString"),l(p)):(t.consume(p),p===92?f:c)}function f(p){return p===s||p===92?(t.consume(p),c):c(p)}}function Zn(t,e){let n;return r;function r(i){return O(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,r):F(i)?B(t,r,n?"linePrefix":"lineSuffix")(i):e(i)}}var Eu={name:"definition",tokenize:ME},NE={partial:!0,tokenize:FE};function ME(t,e,n){let r=this,i;return o;function o(d){return t.enter("definition"),s(d)}function s(d){return Rs.call(r,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function a(d){return i=Ht(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(t.enter("definitionMarker"),t.consume(d),t.exit("definitionMarker"),u):n(d)}function u(d){return he(d)?Zn(t,l)(d):l(d)}function l(d){return Ts(t,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return t.attempt(NE,f,f)(d)}function f(d){return F(d)?B(t,p,"whitespace")(d):p(d)}function p(d){return d===null||O(d)?(t.exit("definition"),r.parser.defined.push(i),e(d)):n(d)}}function FE(t,e,n){return r;function r(a){return he(a)?Zn(t,i)(a):n(a)}function i(a){return As(t,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return F(a)?B(t,s,"whitespace")(a):s(a)}function s(a){return a===null||O(a)?e(a):n(a)}}var ku={name:"hardBreakEscape",tokenize:qE};function qE(t,e,n){return r;function r(o){return t.enter("hardBreakEscape"),t.consume(o),i}function i(o){return O(o)?(t.exit("hardBreakEscape"),e(o)):n(o)}}var Du={name:"headingAtx",resolve:jE,tokenize:BE};function jE(t,e){let n=t.length-2,r=3,i,o;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},o={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},ke(t,r,n-r+1,[["enter",i,e],["enter",o,e],["exit",o,e],["exit",i,e]])),t}function BE(t,e,n){let r=0;return i;function i(c){return t.enter("atxHeading"),o(c)}function o(c){return t.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(t.consume(c),s):c===null||he(c)?(t.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(t.enter("atxHeadingSequence"),u(c)):c===null||O(c)?(t.exit("atxHeading"),e(c)):F(c)?B(t,a,"whitespace")(c):(t.enter("atxHeadingText"),l(c))}function u(c){return c===35?(t.consume(c),u):(t.exit("atxHeadingSequence"),a(c))}function l(c){return c===null||c===35||he(c)?(t.exit("atxHeadingText"),a(c)):(t.consume(c),l)}}var $h=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Tu=["pre","script","style","textarea"];var Ru={concrete:!0,name:"htmlFlow",resolveTo:UE,tokenize:$E},WE={partial:!0,tokenize:VE},zE={partial:!0,tokenize:HE};function UE(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function $E(t,e,n){let r=this,i,o,s,a,u;return l;function l(_){return c(_)}function c(_){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(_),f}function f(_){return _===33?(t.consume(_),p):_===47?(t.consume(_),o=!0,g):_===63?(t.consume(_),i=3,r.interrupt?e:x):Ye(_)?(t.consume(_),s=String.fromCharCode(_),S):n(_)}function p(_){return _===45?(t.consume(_),i=2,d):_===91?(t.consume(_),i=5,a=0,b):Ye(_)?(t.consume(_),i=4,r.interrupt?e:x):n(_)}function d(_){return _===45?(t.consume(_),r.interrupt?e:x):n(_)}function b(_){let He="CDATA[";return _===He.charCodeAt(a++)?(t.consume(_),a===He.length?r.interrupt?e:M:b):n(_)}function g(_){return Ye(_)?(t.consume(_),s=String.fromCharCode(_),S):n(_)}function S(_){if(_===null||_===47||_===62||he(_)){let He=_===47,Nn=s.toLowerCase();return!He&&!o&&Tu.includes(Nn)?(i=1,r.interrupt?e(_):M(_)):$h.includes(s.toLowerCase())?(i=6,He?(t.consume(_),y):r.interrupt?e(_):M(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):o?h(_):m(_))}return _===45||Me(_)?(t.consume(_),s+=String.fromCharCode(_),S):n(_)}function y(_){return _===62?(t.consume(_),r.interrupt?e:M):n(_)}function h(_){return F(_)?(t.consume(_),h):I(_)}function m(_){return _===47?(t.consume(_),I):_===58||_===95||Ye(_)?(t.consume(_),w):F(_)?(t.consume(_),m):I(_)}function w(_){return _===45||_===46||_===58||_===95||Me(_)?(t.consume(_),w):T(_)}function T(_){return _===61?(t.consume(_),v):F(_)?(t.consume(_),T):m(_)}function v(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(t.consume(_),u=_,E):F(_)?(t.consume(_),v):L(_)}function E(_){return _===u?(t.consume(_),u=null,k):_===null||O(_)?n(_):(t.consume(_),E)}function L(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||he(_)?T(_):(t.consume(_),L)}function k(_){return _===47||_===62||F(_)?m(_):n(_)}function I(_){return _===62?(t.consume(_),N):n(_)}function N(_){return _===null||O(_)?M(_):F(_)?(t.consume(_),N):n(_)}function M(_){return _===45&&i===2?(t.consume(_),de):_===60&&i===1?(t.consume(_),xe):_===62&&i===4?(t.consume(_),et):_===63&&i===3?(t.consume(_),x):_===93&&i===5?(t.consume(_),vt):O(_)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(WE,qt,P)(_)):_===null||O(_)?(t.exit("htmlFlowData"),P(_)):(t.consume(_),M)}function P(_){return t.check(zE,$,qt)(_)}function $(_){return t.enter("lineEnding"),t.consume(_),t.exit("lineEnding"),z}function z(_){return _===null||O(_)?P(_):(t.enter("htmlFlowData"),M(_))}function de(_){return _===45?(t.consume(_),x):M(_)}function xe(_){return _===47?(t.consume(_),s="",ft):M(_)}function ft(_){if(_===62){let He=s.toLowerCase();return Tu.includes(He)?(t.consume(_),et):M(_)}return Ye(_)&&s.length<8?(t.consume(_),s+=String.fromCharCode(_),ft):M(_)}function vt(_){return _===93?(t.consume(_),x):M(_)}function x(_){return _===62?(t.consume(_),et):_===45&&i===2?(t.consume(_),x):M(_)}function et(_){return _===null||O(_)?(t.exit("htmlFlowData"),qt(_)):(t.consume(_),et)}function qt(_){return t.exit("htmlFlow"),e(_)}}function HE(t,e,n){let r=this;return i;function i(s){return O(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):e(s)}}function VE(t,e,n){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(cn,e,n)}}var Au={name:"htmlText",tokenize:GE};function GE(t,e,n){let r=this,i,o,s;return a;function a(x){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(x),u}function u(x){return x===33?(t.consume(x),l):x===47?(t.consume(x),T):x===63?(t.consume(x),m):Ye(x)?(t.consume(x),L):n(x)}function l(x){return x===45?(t.consume(x),c):x===91?(t.consume(x),o=0,b):Ye(x)?(t.consume(x),h):n(x)}function c(x){return x===45?(t.consume(x),d):n(x)}function f(x){return x===null?n(x):x===45?(t.consume(x),p):O(x)?(s=f,xe(x)):(t.consume(x),f)}function p(x){return x===45?(t.consume(x),d):f(x)}function d(x){return x===62?de(x):x===45?p(x):f(x)}function b(x){let et="CDATA[";return x===et.charCodeAt(o++)?(t.consume(x),o===et.length?g:b):n(x)}function g(x){return x===null?n(x):x===93?(t.consume(x),S):O(x)?(s=g,xe(x)):(t.consume(x),g)}function S(x){return x===93?(t.consume(x),y):g(x)}function y(x){return x===62?de(x):x===93?(t.consume(x),y):g(x)}function h(x){return x===null||x===62?de(x):O(x)?(s=h,xe(x)):(t.consume(x),h)}function m(x){return x===null?n(x):x===63?(t.consume(x),w):O(x)?(s=m,xe(x)):(t.consume(x),m)}function w(x){return x===62?de(x):m(x)}function T(x){return Ye(x)?(t.consume(x),v):n(x)}function v(x){return x===45||Me(x)?(t.consume(x),v):E(x)}function E(x){return O(x)?(s=E,xe(x)):F(x)?(t.consume(x),E):de(x)}function L(x){return x===45||Me(x)?(t.consume(x),L):x===47||x===62||he(x)?k(x):n(x)}function k(x){return x===47?(t.consume(x),de):x===58||x===95||Ye(x)?(t.consume(x),I):O(x)?(s=k,xe(x)):F(x)?(t.consume(x),k):de(x)}function I(x){return x===45||x===46||x===58||x===95||Me(x)?(t.consume(x),I):N(x)}function N(x){return x===61?(t.consume(x),M):O(x)?(s=N,xe(x)):F(x)?(t.consume(x),N):k(x)}function M(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(t.consume(x),i=x,P):O(x)?(s=M,xe(x)):F(x)?(t.consume(x),M):(t.consume(x),$)}function P(x){return x===i?(t.consume(x),i=void 0,z):x===null?n(x):O(x)?(s=P,xe(x)):(t.consume(x),P)}function $(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||he(x)?k(x):(t.consume(x),$)}function z(x){return x===47||x===62||he(x)?k(x):n(x)}function de(x){return x===62?(t.consume(x),t.exit("htmlTextData"),t.exit("htmlText"),e):n(x)}function xe(x){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),ft}function ft(x){return F(x)?B(t,vt,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):vt(x)}function vt(x){return t.enter("htmlTextData"),s(x)}}var Jn={name:"labelEnd",resolveAll:ZE,resolveTo:JE,tokenize:XE},KE={tokenize:ek},YE={tokenize:tk},QE={tokenize:nk};function ZE(t){let e=-1,n=[];for(;++e<t.length;){let r=t[e][1];if(n.push(t[e]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){let i=r.type==="labelImage"?4:2;r.type="data",e+=i}}return t.length!==n.length&&ke(t,0,t.length,n),t}function JE(t,e){let n=t.length,r=0,i,o,s,a;for(;n--;)if(i=t[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(t[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);let u={type:t[o][1].type==="labelLink"?"link":"image",start:{...t[o][1].start},end:{...t[t.length-1][1].end}},l={type:"label",start:{...t[o][1].start},end:{...t[s][1].end}},c={type:"labelText",start:{...t[o+r+2][1].end},end:{...t[s-2][1].start}};return a=[["enter",u,e],["enter",l,e]],a=Ne(a,t.slice(o+1,o+r+3)),a=Ne(a,[["enter",c,e]]),a=Ne(a,Nr(e.parser.constructs.insideSpan.null,t.slice(o+r+4,s-3),e)),a=Ne(a,[["exit",c,e],t[s-2],t[s-1],["exit",l,e]]),a=Ne(a,t.slice(s+1)),a=Ne(a,[["exit",u,e]]),ke(t,o,t.length,a),t}function XE(t,e,n){let r=this,i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(p){return o?o._inactive?f(p):(s=r.parser.defined.includes(Ht(r.sliceSerialize({start:o.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(p),t.exit("labelMarker"),t.exit("labelEnd"),u):n(p)}function u(p){return p===40?t.attempt(KE,c,s?c:f)(p):p===91?t.attempt(YE,c,s?l:f)(p):s?c(p):f(p)}function l(p){return t.attempt(QE,c,f)(p)}function c(p){return e(p)}function f(p){return o._balanced=!0,n(p)}}function ek(t,e,n){return r;function r(f){return t.enter("resource"),t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),i}function i(f){return he(f)?Zn(t,o)(f):o(f)}function o(f){return f===41?c(f):Ts(t,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return he(f)?Zn(t,u)(f):c(f)}function a(f){return n(f)}function u(f){return f===34||f===39||f===40?As(t,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return he(f)?Zn(t,c)(f):c(f)}function c(f){return f===41?(t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),t.exit("resource"),e):n(f)}}function tk(t,e,n){let r=this;return i;function i(a){return Rs.call(r,t,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(Ht(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(a):n(a)}function s(a){return n(a)}}function nk(t,e,n){return r;function r(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),i}function i(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),e):n(o)}}var Cu={name:"labelStartImage",resolveAll:Jn.resolveAll,tokenize:rk};function rk(t,e,n){let r=this;return i;function i(a){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(a),t.exit("labelImageMarker"),o}function o(a){return a===91?(t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):e(a)}}var Iu={name:"labelStartLink",resolveAll:Jn.resolveAll,tokenize:ik};function ik(t,e,n){let r=this;return i;function i(s){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(s),t.exit("labelMarker"),t.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):e(s)}}var Yi={name:"lineEnding",tokenize:ok};function ok(t,e){return n;function n(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),B(t,e,"linePrefix")}}var Xn={name:"thematicBreak",tokenize:sk};function sk(t,e,n){let r=0,i;return o;function o(l){return t.enter("thematicBreak"),s(l)}function s(l){return i=l,a(l)}function a(l){return l===i?(t.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||O(l))?(t.exit("thematicBreak"),e(l)):n(l)}function u(l){return l===i?(t.consume(l),r++,u):(t.exit("thematicBreakSequence"),F(l)?B(t,a,"whitespace")(l):a(l))}}var Re={continuation:{tokenize:ck},exit:pk,name:"list",tokenize:uk},ak={partial:!0,tokenize:dk},lk={partial:!0,tokenize:fk};function uk(t,e,n){let r=this,i=r.events[r.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(d){let b=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:Hi(d)){if(r.containerState.type||(r.containerState.type=b,t.enter(b,{_container:!0})),b==="listUnordered")return t.enter("listItemPrefix"),d===42||d===45?t.check(Xn,n,l)(d):l(d);if(!r.interrupt||d===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),u(d)}return n(d)}function u(d){return Hi(d)&&++s<10?(t.consume(d),u):(!r.interrupt||s<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(t.exit("listItemValue"),l(d)):n(d)}function l(d){return t.enter("listItemMarker"),t.consume(d),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,t.check(cn,r.interrupt?n:c,t.attempt(ak,p,f))}function c(d){return r.containerState.initialBlankLine=!0,o++,p(d)}function f(d){return F(d)?(t.enter("listItemPrefixWhitespace"),t.consume(d),t.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=o+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(d)}}function ck(t,e,n){let r=this;return r.containerState._closeFlow=void 0,t.check(cn,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,B(t,e,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!F(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(lk,e,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,B(t,t.attempt(Re,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function fk(t,e,n){let r=this;return B(t,i,"listItemIndent",r.containerState.size+1);function i(o){let s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?e(o):n(o)}}function pk(t){t.exit(this.containerState.type)}function dk(t,e,n){let r=this;return B(t,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){let s=r.events[r.events.length-1];return!F(o)&&s&&s[1].type==="listItemPrefixWhitespace"?e(o):n(o)}}var Cs={name:"setextUnderline",resolveTo:hk,tokenize:mk};function hk(t,e){let n=t.length,r,i,o;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!o&&t[n][1].type==="definition"&&(o=n);let s={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",o?(t.splice(i,0,["enter",s,e]),t.splice(o+1,0,["exit",t[r][1],e]),t[r][1].end={...t[o][1].end}):t[r][1]=s,t.push(["exit",s,e]),t}function mk(t,e,n){let r=this,i;return o;function o(l){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(t.enter("setextHeadingLine"),i=l,s(l)):n(l)}function s(l){return t.enter("setextHeadingLineSequence"),a(l)}function a(l){return l===i?(t.consume(l),a):(t.exit("setextHeadingLineSequence"),F(l)?B(t,u,"lineSuffix")(l):u(l))}function u(l){return l===null||O(l)?(t.exit("setextHeadingLine"),e(l)):n(l)}}var Hh={tokenize:gk};function gk(t){let e=this,n=t.attempt(cn,r,t.attempt(this.parser.constructs.flowInitial,i,B(t,t.attempt(this.parser.constructs.flow,i,t.attempt(Su,i)),"linePrefix")));return n;function r(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,n}}var Vh={resolveAll:Qh()},Gh=Yh("string"),Kh=Yh("text");function Yh(t){return{resolveAll:Qh(t==="text"?yk:void 0),tokenize:e};function e(n){let r=this,i=this.parser.constructs[t],o=n.attempt(i,s,a);return s;function s(c){return l(c)?o(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),u}function u(c){return l(c)?(n.exit("data"),o(c)):(n.consume(c),u)}function l(c){if(c===null)return!0;let f=i[c],p=-1;if(f)for(;++p<f.length;){let d=f[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function Qh(t){return e;function e(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return t?t(n,r):n}}function yk(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){let r=t[n-1][1],i=e.sliceStream(r),o=i.length,s=-1,a=0,u;for(;o--;){let l=i[o];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(l===-2)u=!0,a++;else if(l!==-1){o++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(a=0),a){let l={type:n===t.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(t.splice(n,0,["enter",l,e],["exit",l,e]),n+=2)}n++}return t}var Ou={};rS(Ou,{attentionMarkers:()=>kk,contentInitial:()=>xk,disable:()=>Dk,document:()=>bk,flow:()=>wk,flowInitial:()=>_k,insideSpan:()=>Ek,string:()=>vk,text:()=>Sk});var bk={42:Re,43:Re,45:Re,48:Re,49:Re,50:Re,51:Re,52:Re,53:Re,54:Re,55:Re,56:Re,57:Re,62:ws},xk={91:Eu},_k={[-2]:Gi,[-1]:Gi,32:Gi},wk={35:Du,42:Xn,45:[Cs,Xn],60:Ru,61:Cs,95:Xn,96:Es,126:Es},vk={38:Ss,92:vs},Sk={[-5]:Yi,[-4]:Yi,[-3]:Yi,33:Cu,38:Ss,42:Vi,60:[wu,Au],91:Iu,92:[ku,vs],93:Jn,95:Vi,96:vu},Ek={null:[Vi,Vh]},kk={null:[42,95]},Dk={null:[]};function Zh(t,e,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},o=[],s=[],a=[],u=!0,l={attempt:k(E),check:k(L),consume:w,enter:T,exit:v,interrupt:k(L,{interrupt:!0})},c={code:null,containerState:{},defineSkip:y,events:[],now:S,parser:t,previous:null,sliceSerialize:b,sliceStream:g,write:d},f=e.tokenize.call(c,l),p;return e.resolveAll&&o.push(e),c;function d(P){return s=Ne(s,P),h(),s[s.length-1]!==null?[]:(I(e,0),c.events=Nr(o,c.events,c),c.events)}function b(P,$){return Rk(g(P),$)}function g(P){return Tk(s,P)}function S(){let{_bufferIndex:P,_index:$,line:z,column:de,offset:xe}=r;return{_bufferIndex:P,_index:$,line:z,column:de,offset:xe}}function y(P){i[P.line]=P.column,M()}function h(){let P;for(;r._index<s.length;){let $=s[r._index];if(typeof $=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<$.length;)m($.charCodeAt(r._bufferIndex));else m($)}}function m(P){u=void 0,p=P,f=f(P)}function w(P){O(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,M()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=P,u=!0}function T(P,$){let z=$||{};return z.type=P,z.start=S(),c.events.push(["enter",z,c]),a.push(z),z}function v(P){let $=a.pop();return $.end=S(),c.events.push(["exit",$,c]),$}function E(P,$){I(P,$.from)}function L(P,$){$.restore()}function k(P,$){return z;function z(de,xe,ft){let vt,x,et,qt;return Array.isArray(de)?He(de):"tokenize"in de?He([de]):_(de);function _(Ee){return Ci;function Ci(jt){let Mn=jt!==null&&Ee[jt],Tr=jt!==null&&Ee.null,Gl=[...Array.isArray(Mn)?Mn:Mn?[Mn]:[],...Array.isArray(Tr)?Tr:Tr?[Tr]:[]];return He(Gl)(jt)}}function He(Ee){return vt=Ee,x=0,Ee.length===0?ft:Nn(Ee[x])}function Nn(Ee){return Ci;function Ci(jt){return qt=N(),et=Ee,Ee.partial||(c.currentConstruct=Ee),Ee.name&&c.parser.constructs.disable.null.includes(Ee.name)?Jo(jt):Ee.tokenize.call($?Object.assign(Object.create(c),$):c,l,Vl,Jo)(jt)}}function Vl(Ee){return u=!0,P(et,qt),xe}function Jo(Ee){return u=!0,qt.restore(),++x<vt.length?Nn(vt[x]):ft}}}function I(P,$){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&ke(c.events,$,c.events.length-$,P.resolve(c.events.slice($),c)),P.resolveTo&&(c.events=P.resolveTo(c.events,c))}function N(){let P=S(),$=c.previous,z=c.currentConstruct,de=c.events.length,xe=Array.from(a);return{from:de,restore:ft};function ft(){r=P,c.previous=$,c.currentConstruct=z,c.events.length=de,a=xe,M()}}function M(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Tk(t,e){let n=e.start._index,r=e.start._bufferIndex,i=e.end._index,o=e.end._bufferIndex,s;if(n===i)s=[t[n].slice(r,o)];else{if(s=t.slice(n,i),r>-1){let a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(t[i].slice(0,o))}return s}function Rk(t,e){let n=-1,r=[],i;for(;++n<t.length;){let o=t[n],s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
47
+ `+n:""),l=Math.floor(i.length/s)-this.cursorPos.rows+(n?_h(n):0);l>0&&(a+=du(l)),a+=mu(this.cursorPos.cols),this.write(hu(this.extraLinesUnderPrompt)+gu(this.height)+a),this.extraLinesUnderPrompt=l,this.height=_h(a)}checkCursorPos(){let e=this.rl.getCursorPos();e.cols!==this.cursorPos.cols&&(this.write(mu(e.cols)),this.cursorPos=e)}done({clearContent:e}){this.rl.setPrompt("");let n=hu(this.extraLinesUnderPrompt);n+=e?gu(this.height):`
48
+ `,n+="\x1B[G",n+=xh,this.write(n),this.rl.close()}};var hs=class extends Promise{static withResolver(){let e,n;return{promise:new Promise((i,o)=>{e=i,n=o}),resolve:e,reject:n}}};import ZS from"node:path";var JS=globalThis.setImmediate;function XS(){let t=Error.prepareStackTrace,e=[];try{Error.prepareStackTrace=(n,r)=>{let i=r.slice(1);return e=i,i},new Error().stack}catch{return e}return Error.prepareStackTrace=t,e}function zi(t){let e=XS();return(r,i={})=>{let{input:o=process.stdin,signal:s}=i,a=new Set,u=new vh.default;u.pipe(i.output??process.stdout);let l=wh.createInterface({terminal:!0,input:o,output:u});u.mute();let c=new Wi(l),{promise:f,resolve:p,reject:d}=hs.withResolver(),b=()=>d(new as);if(s){let S=()=>d(new ss({cause:s.reason}));if(s.aborted)return S(),Object.assign(f,{cancel:b});s.addEventListener("abort",S),a.add(()=>s.removeEventListener("abort",S))}a.add(gh((S,y)=>{d(new qi(`User force closed the prompt with ${S} ${y}`))}));let g=()=>d(new qi("User force closed the prompt with SIGINT"));return l.on("SIGINT",g),a.add(()=>l.removeListener("SIGINT",g)),Bd(l,S=>{let y=QS.bind(()=>zn.clearAll());l.on("close",y),a.add(()=>l.removeListener("close",y));let h=()=>{let m=()=>c.checkCursorPos();l.input.on("keypress",m),a.add(()=>l.input.removeListener("keypress",m));let w=null;S(()=>{let T=!1;try{let v=t(r,k=>{T?p(k):w={value:k}});if(v===void 0){let k=e[1]?.getFileName();throw k&&!k.startsWith("file://")&&(k=ZS.resolve(k)),new Error(`Prompt functions must return a string.
49
+ at ${k}`)}let[E,L]=typeof v=="string"?[v]:v;c.render(E,L),zn.run()}catch(v){d(v)}if(T=!0,w!==null){let{value:v}=w;w=null,p(v)}})};return"readableFlowing"in o?JS(h):h(),Object.assign(f.then(m=>(zn.clearAll(),m),m=>{throw zn.clearAll(),m}).finally(()=>{a.forEach(m=>m()),c.done({clearContent:!!i.clearPromptOnDone}),u.end()}).then(()=>f),{cancel:b})})}}var eE={validationFailureMode:"keep"},Sh=zi((t,e)=>{let{prefill:n="tab"}=t,r=$n(eE,t.theme),[i,o]=Le("idle"),[s,a]=Le(String(t.default??"")),[u,l]=Le(),[c,f]=Le(""),p=ji({status:i,theme:r});async function d(h){let{required:m,pattern:w,patternError:T="Invalid input"}=t;return m&&!h?"You must provide a value":w&&!w.test(h)?T:typeof t.validate=="function"?await t.validate(h)||"You must provide a valid value":!0}Bi(async(h,m)=>{if(i==="idle")if(Fi(h)){let w=c||s;o("loading");let T=await d(w);T===!0?(f(w),o("done"),e(w)):(r.validationFailureMode==="clear"?f(""):m.write(c),l(T),o("idle"))}else Jl(h)&&!c?a(""):Xl(h)&&!c?(a(""),m.clearLine(0),m.write(s),f(s)):(f(m.line),l(void 0))}),Un(h=>{n==="editable"&&s&&(h.write(s),f(s))},[]);let b=r.style.message(t.message,i),g=c;typeof t.transformer=="function"?g=t.transformer(c,{isFinal:i==="done"}):i==="done"&&(g=r.style.answer(c));let S;s&&i!=="done"&&!c&&(S=r.style.defaultAnswer(s));let y="";return u&&(y=r.style.error(u)),[[p,b,S,g].filter(h=>h!==void 0).join(" "),y]});var tE={style:{maskedText:"[input is masked]"}},ms=zi((t,e)=>{let{validate:n=()=>!0}=t,r=$n(tE,t.theme),[i,o]=Le("idle"),[s,a]=Le(),[u,l]=Le(""),c=ji({status:i,theme:r});Bi(async(g,S)=>{if(i==="idle")if(Fi(g)){let y=u;o("loading");let h=await n(y);h===!0?(l(y),o("done"),e(y)):(S.write(u),a(h||"You must provide a valid value"),o("idle"))}else l(S.line),a(void 0)});let f=r.style.message(t.message,i),p="",d;t.mask?p=(typeof t.mask=="string"?t.mask:"*").repeat(u.length):i!=="done"&&(d=`${r.style.help(r.style.maskedText)}${bh}`),i==="done"&&(p=r.style.answer(p));let b="";return s&&(b=r.style.error(s)),[[c,f,t.mask?p:d].join(" "),b]});import*as We from"fs/promises";import*as St from"path";var nE={};async function yu(t,e){let n=await fetch(`https://mods.factorio.com/api/mods/${t}${e?"/full":""}`);if(!n.ok)throw new Error(n.statusText);return await n.json()}var Vn=class{constructor(e,n){this.modsPath=e;this.playerdataPath=n;this.Loaded=this.reload()}modsPath;playerdataPath;modList={mods:[]};Loaded;async reload(){let e=St.resolve(this.modsPath,"./mod-list.json");try{this.modList=JSON.parse(await We.readFile(e,"utf8"))}catch{this.modList={mods:[]}}}async write(){let e=St.resolve(this.modsPath,"./mod-list.json");return We.writeFile(e,JSON.stringify(this.modList,null,2),"utf8")}async getDownloadCredentials(e){let n=this.playerdataPath??St.resolve(this.modsPath,"../player-data.json"),r=n?await We.readFile(n,"utf8").then(a=>JSON.parse(a)).catch(()=>{}):void 0;if(r?.["service-token"])return{username:r["service-username"],token:r["service-token"]};let i=await e(r?.["service-username"]),o=await fetch("https://auth.factorio.com/api-login",{method:"POST",body:new URLSearchParams({username:i.username,password:i.password,api_version:"4",require_game_ownership:"true"})});if(!o.ok)throw new Error(o.statusText);let s=await o.json();return r&&(r["service-username"]=s.username,r["service-token"]=s.token,await We.writeFile(n,JSON.stringify(r,void 0,2))),s}async findInstallSource(e,n){if(n.origin!=="portal"){let a=nE[e];if(a)return a;if(n.origin==="bundle")throw new Error(`No bundled package for ${e}`)}let r=await yu(e),i=r.releases[r.releases.length-1],o=await this.getDownloadCredentials(n.credentialPrompt),s=await fetch(`https://mods.factorio.com/${i.download_url}?username=${o.username}&token=${o.token}`);if(!s.ok)throw new Error(s.statusText);return{version:i.version,zip:await s.bytes()}}async installMod(e,n){let r=await this.findInstallSource(e,n),i=r.version,o=this.modList.mods.find(c=>c.name===e),s=o?.enabled?o.version??!0:o?.enabled;async function a(c){let f=St.resolve(c,"info.json");try{let p=await We.readFile(f,"utf8");if(p){let d=JSON.parse(p);if(d.name===e&&d.version===i)return!0}}catch{}return!1}if(!n.force){if(await a(St.resolve(this.modsPath,e)))return this.set(e,i),{using:i,from:"folder",previous:s};if(await a(St.resolve(this.modsPath,`${e}_${i}`)))return this.set(e,i),{using:i,from:"versioned_folder",previous:s};try{return await We.access(St.resolve(this.modsPath,`${e}_${i}.zip`)),this.set(e,i),{using:i,from:"existing",previous:s}}catch{}}let u=We.writeFile(St.resolve(this.modsPath,`${e}_${i}.zip`),r.zip),l;if(!n.keepOld){let c=(await We.readdir(this.modsPath,"utf8")).filter(f=>f.startsWith(e)&&f.endsWith(".zip")&&f.substring(e.length,f.length-4).match(/^_[\d\.]+$/)&&f!==`${e}_${i}.zip`);c.length===1&&(await We.unlink(St.resolve(this.modsPath,c[0])),l=c[0].substring(e.length+1,c[0].length-4))}return this.set(e,i),await u,{using:i,from:"installed",previous:s,replaced:l}}set(e,n){let r=!!n,i=typeof n=="string"?n:void 0,o=this.modList.mods.find(s=>s.name===e);o?(o.enabled=r,o.version=i):this.modList.mods.push({name:e,enabled:r,version:i})}disableAll(){this.modList.mods.forEach(e=>e.enabled=!1)}};var on=ne.command("mods").description("Mod management commands").option("--modsPath <modsPath>","mods directory to operate on",process.cwd());on.command("enable <modname> [version]").description("Enable a mod or select a specific version of it").action(async(t,e)=>{let n=new Vn(on.opts().modsPath);await n.Loaded,n.set(t,e??!0),await n.write()});on.command("disable <modname>").description("Disable a mod").action(async t=>{let e=new Vn(on.opts().modsPath);await e.Loaded,e.set(t,!1),await e.write()});on.command("install <modname>").description("Install a mod.").option("--keepOld","Don't remove old versions if present").option("--force","Install even if there is an existing mod of the correct version").option("--playerData <player-data.json>").action(async(t,e)=>{let n=new Vn(on.opts().modsPath,e.playerData);await n.Loaded,console.log(JSON.stringify(await n.installMod(t,{origin:"any",force:e.force,credentialPrompt:async r=>{r=await Sh({message:"Username:",default:r});let i=await ms({message:"Password:"});return{username:r,password:i}}})))});on.command("adjust <changes...>").description("Configure multiple mods at once: modname=true|false|x.y.z").option("--allowDisableBase","Allow disabling the base mod").option("--disableExtra","Disable any mods not named in the changeset").action(async(t,e)=>{let n=new Vn(on.opts().modsPath);await n.Loaded,e.disableExtra&&(console.log("All Mods disabled"),n.disableAll());for(let r of t){let i=r.match(/^(.*)=(true|false|(?:\d+\.){2}\d+)$/);if(!i)console.log(`Doing nothing with invalid adjust arg "${r}"`);else{let o=i[1],s=i[2]==="true"?!0:i[2]==="false"?!1:i[2];n.set(o,s),console.log(`${o} ${s===!0?"enabled":s===!1?"disabled":"enabled version "+s}`)}}e.allowDisableBase||n.set("base",!0);try{await n.write()}catch(r){console.error(`Failed to save mod list:
50
+ ${r}`),process.exit(1)}});import*as an from"fs/promises";var sn=ne.command("settings").description("Edit mod settings").option("--modsPath <modsPath>","mods directory to operate on",process.cwd());sn.command("list").description("List all current saved values").action(async()=>{let t=zt.joinPath(Ge.file(sn.opts().modsPath),"mod-settings.dat"),e=new Pi(new qn(await an.readFile(t.fsPath)));for(let n of e.list()){let r;switch(typeof n.value){case"string":r=`"${n.value}"`;break;case"object":r=`Color(${n.value.r}, ${n.value.g}, ${n.value.b}, ${n.value.a})`;break;default:r=n.value.toString();break}console.log(`${n.scope} ${n.setting} ${r}`)}});sn.command("get <scope> <name>").description("Get the saved value of a setting").action(async(t,e)=>{switch(t){case"startup":case"runtime-global":case"runtime-per-user":break;default:console.error(`Unknown scope "${t}"`),process.exit(1)}let n=zt.joinPath(Ge.file(sn.opts().modsPath),"mod-settings.dat"),i=new Pi(new qn(await an.readFile(n.fsPath))).get(t,e);if(!i){console.log("undefined");return}switch(i.type){case"bool":case"number":console.log(`${i.value}`);break;case"int":console.log(`${i.value}n`);break;case"string":console.log(`"${i.value}"`);break;case"color":console.log(`Color(${i.value.r}, ${i.value.g}, ${i.value.b}, ${i.value.a})`);break;default:console.error(`Unknown type ${i.type}`),process.exit(1)}});sn.command("set <scope> <name>").option("--type <type>","Force type (otherwise autodetect)").argument("<value>").description("Set the saved value of a setting").action(async(t,e,n,r)=>{switch(t){case"startup":case"runtime-global":case"runtime-per-user":break;default:console.error(`Unknown scope "${t}"`),process.exit(1)}let i=zt.joinPath(Ge.file(sn.opts().modsPath),"mod-settings.dat"),o=new Pi(new qn(await an.readFile(i.fsPath)));if(r.type)switch(r.type){case"bool":if(n==="true"||n==="false"){o.set(t,e,{type:"bool",value:n==="true"});break}else console.error(`invalid bool value ${n}`),process.exit(1);case"number":let s=Number(n);if(!isNaN(s)&&n!==""){o.set(t,e,{type:"number",value:s});break}else console.error(`invalid number value ${n}`),process.exit(1);case"color":let a=n.match(/(?:color:)?\(([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)(?:\s*,\s*([\d.]+)\s*)?\)/i);if(a){o.set(t,e,{type:"color",value:{r:Math.max(0,Math.min(1,parseFloat(a[1]))),g:Math.max(0,Math.min(1,parseFloat(a[2]))),b:Math.max(0,Math.min(1,parseFloat(a[3]))),a:a[4]?Math.max(0,Math.min(1,parseFloat(a[4]))):1}});break}if(a=n.match(/#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/),a){o.set(t,e,{type:"color",value:{r:parseInt(a[1],16)/255,g:parseInt(a[2],16)/255,b:parseInt(a[3],16)/255,a:a[4]?parseInt(a[4],16)/255:1}});break}console.error(`invalid color value ${n}`),process.exit(1);case"string":o.set(t,e,{type:"string",value:n});break;default:console.error(`Unknown type ${r.type}`),process.exit(1)}else if(n==="true"||n==="false")o.set(t,e,{type:"bool",value:n==="true"});else{let s=Number(n);!isNaN(s)&&n!==""?o.set(t,e,{type:"number",value:s}):o.set(t,e,{type:"string",value:n})}await an.writeFile(i.fsPath,o.save())});sn.command("unset <scope> <name>").description("Remove the saved value of a setting").action(async(t,e)=>{switch(t){case"startup":case"runtime-global":case"runtime-per-user":break;default:console.error(`Unknown scope "${t}"`),process.exit(1)}let n=zt.joinPath(Ge.file(sn.opts().modsPath),"mod-settings.dat"),r=new Pi(new qn(await an.readFile(n.fsPath)));r.set(t,e),await an.writeFile(n.fsPath,r.save())});import*as Mt from"fs/promises";import*as w0 from"crypto";var Eh={"application/prs.cww":["cww"],"application/prs.xsf+xml":["xsf"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["*xfdf"],"application/vnd.age":["age"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.autodesk.fbx":["fbx"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dcmp+xml":["dcmp"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["*fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.slides":["ggs"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.drawing":["gdraw"],"application/vnd.google-apps.form":["gform"],"application/vnd.google-apps.jam":["gjam"],"application/vnd.google-apps.map":["gmap"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.script":["gscript"],"application/vnd.google-apps.site":["gsite"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.gov.sk.xmldatacontainer+xml":["xdcf"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["*mpp","mpt"],"application/vnd.ms-visio.viewer":["vdx"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.nato.bindingdataobject+xml":["bdo"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.procrate.brushset":["brushset"],"application/vnd.procreate.brush":["brush"],"application/vnd.procreate.dream":["drm"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.pwg-xhtml-print+xml":["xhtm"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml","uo"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw","vsdx","vtx"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blender":["blend"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-compressed":["*rar"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-ipynb+json":["ipynb"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["*prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["*sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zip-compressed":["*zip"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["*aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif","btf"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.blockfact.facti":["facti"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-adobe-dng":["dng"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.bary":["bary"],"model/vnd.cld":["cld"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["*mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.pytha.pyox":["pyo","pyox"],"model/vnd.sap.vds":["vds"],"model/vnd.usda":["usda"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.familysearch.gedcom":["ged"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};Object.freeze(Eh);var kh=Eh;var Dh={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/dicom":["dcm"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg","one","onea"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"application/zip+dotlottie":["lottie"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a","m4b"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/ief":["ief"],"image/jaii":["jaii"],"image/jais":["jais"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpg","jpeg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxl":["jxl"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/pjpeg":["jfif"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime","mht","mhtml"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step":["step","stp","stpnc","p21","210"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts","m2t","m2ts","mts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(Dh);var Th=Dh;var tt=function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Ir,Ui,Gn,bu=class{constructor(...e){Ir.set(this,new Map),Ui.set(this,new Map),Gn.set(this,new Map);for(let n of e)this.define(n)}define(e,n=!1){for(let[r,i]of Object.entries(e)){r=r.toLowerCase(),i=i.map(a=>a.toLowerCase()),tt(this,Gn,"f").has(r)||tt(this,Gn,"f").set(r,new Set);let o=tt(this,Gn,"f").get(r),s=!0;for(let a of i){let u=a.startsWith("*");if(a=u?a.slice(1):a,o?.add(a),s&&tt(this,Ui,"f").set(r,a),s=!1,u)continue;let l=tt(this,Ir,"f").get(a);if(l&&l!=r&&!n)throw new Error(`"${r} -> ${a}" conflicts with "${l} -> ${a}". Pass \`force=true\` to override this definition.`);tt(this,Ir,"f").set(a,r)}}return this}getType(e){if(typeof e!="string")return null;let n=e.replace(/^.*[/\\]/s,"").toLowerCase(),r=n.replace(/^.*\./s,"").toLowerCase(),i=n.length<e.length;return!(r.length<n.length-1)&&i?null:tt(this,Ir,"f").get(r)??null}getExtension(e){return typeof e!="string"?null:(e=e?.split?.(";")[0],(e&&tt(this,Ui,"f").get(e.trim().toLowerCase()))??null)}getAllExtensions(e){return typeof e!="string"?null:tt(this,Gn,"f").get(e.toLowerCase())??null}_freeze(){this.define=()=>{throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances")},Object.freeze(this);for(let e of tt(this,Gn,"f").values())Object.freeze(e);return this}_getTestState(){return{types:tt(this,Ir,"f"),extensions:tt(this,Ui,"f")}}};Ir=new WeakMap,Ui=new WeakMap,Gn=new WeakMap;var xu=bu;var Rh=new xu(Th,kh)._freeze();import v0 from"path";import{spawn as S0}from"child_process";var Or=(function(t){if(t==null)return sE;if(typeof t=="function")return gs(t);if(typeof t=="object")return Array.isArray(t)?rE(t):iE(t);if(typeof t=="string")return oE(t);throw new Error("Expected function, string, or object as test")});function rE(t){let e=[],n=-1;for(;++n<t.length;)e[n]=Or(t[n]);return gs(r);function r(...i){let o=-1;for(;++o<e.length;)if(e[o].apply(this,i))return!0;return!1}}function iE(t){let e=t;return gs(n);function n(r){let i=r,o;for(o in t)if(i[o]!==e[o])return!1;return!0}}function oE(t){return gs(e);function e(n){return n&&n.type===t}}function gs(t){return e;function e(n,r,i){return!!(aE(n)&&t.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function sE(){return!0}function aE(t){return t!==null&&typeof t=="object"&&"type"in t}function Ah(t){return"\x1B[33m"+t+"\x1B[39m"}var Ch=[],ys=!0,Kn=!1,bs="skip";function ln(t,e,n,r){let i;typeof e=="function"&&typeof n!="function"?(r=n,n=e):i=e;let o=Or(i),s=r?-1:1;a(t,void 0,[])();function a(u,l,c){let f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){let d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+Ah(u.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=Ch,b,g,S;if((!e||o(u,l,c[c.length-1]||void 0))&&(d=lE(n(u,c)),d[0]===Kn))return d;if("children"in u&&u.children){let y=u;if(y.children&&d[0]!==bs)for(g=(r?y.children.length:-1)+s,S=c.concat(y);g>-1&&g<y.children.length;){let h=y.children[g];if(b=a(h,g,S)(),b[0]===Kn)return b;g=typeof b[1]=="number"?b[1]:g+s}}return d}}}function lE(t){return Array.isArray(t)?t:typeof t=="number"?[ys,t]:t==null?Ch:[t]}function nt(t,e,n,r){let i,o,s;typeof e=="function"&&typeof n!="function"?(o=void 0,s=e,i=n):(o=e,s=n,i=r),ln(t,o,a,i);function a(u,l){let c=l[l.length-1],f=c?c.children.indexOf(u):void 0;return s(u,f,c)}}var uE={};function Yn(t,e){let n=e||uE,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Oh(t,r,i)}function Oh(t,e,n){if(cE(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Ih(t.children,e,n)}return Array.isArray(t)?Ih(t,e,n):""}function Ih(t,e,n){let r=[],i=-1;for(;++i<t.length;)r[i]=Oh(t[i],e,n);return r.join("")}function cE(t){return!!(t&&typeof t=="object")}var _u={AElig:"\xC6",AMP:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Aring:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",Bscr:"\u212C",Bumpeq:"\u224E",CHcy:"\u0427",COPY:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",Cayleys:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",CenterDot:"\xB7",Cfr:"\u212D",Chi:"\u03A7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",Colon:"\u2237",Colone:"\u2A74",Congruent:"\u2261",Conint:"\u222F",ContourIntegral:"\u222E",Copf:"\u2102",Coproduct:"\u2210",CounterClockwiseContourIntegral:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",DD:"\u2145",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",Diamond:"\u22C4",DifferentialD:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",Downarrow:"\u21D3",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrave:"\xC8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",Equilibrium:"\u21CC",Escr:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",ExponentialE:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",HilbertSpace:"\u210B",Hopf:"\u210D",HorizontalLine:"\u2500",Hscr:"\u210B",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrave:"\xCC",Im:"\u2111",Imacr:"\u012A",ImaginaryI:"\u2148",Implies:"\u21D2",Int:"\u222C",Integral:"\u222B",Intersection:"\u22C2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",LT:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Larr:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",LeftRightArrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",Leftarrow:"\u21D0",Leftrightarrow:"\u21D4",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",LongLeftRightArrow:"\u27F7",LongRightArrow:"\u27F6",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",Longrightarrow:"\u27F9",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",Mopf:"\u{1D544}",Mscr:"\u2133",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
51
+ `,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",ZeroWidthSpace:"\u200B",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acute:"\xB4",acy:"\u0430",aelig:"\xE6",af:"\u2061",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",amp:"&",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",ap:"\u2248",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",apid:"\u224B",apos:"'",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",beta:"\u03B2",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",bprime:"\u2035",breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",bumpeq:"\u224F",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cedil:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledR:"\xAE",circledS:"\u24C8",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",conint:"\u222E",copf:"\u{1D554}",coprod:"\u2210",copy:"\xA9",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dArr:"\u21D3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",ddotseq:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",dharl:"\u21C3",dharr:"\u21C2",diam:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",dot:"\u02D9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eDDot:"\u2A77",eDot:"\u2251",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",ecirc:"\xEA",ecolon:"\u2255",ecy:"\u044D",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",equals:"=",equest:"\u225F",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",erarr:"\u2971",escr:"\u212F",esdot:"\u2250",esim:"\u2242",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",gE:"\u2267",gEl:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gammad:"\u03DD",gap:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",grave:"`",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hArr:"\u21D4",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",hbar:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hslash:"\u210F",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",ic:"\u2063",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",intcal:"\u22BA",integers:"\u2124",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",isin:"\u2208",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAarr:"\u21DA",lArr:"\u21D0",lAtail:"\u291B",lBarr:"\u290E",lE:"\u2266",lEg:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",laquo:"\xAB",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lceil:"\u2308",lcub:"{",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21A2",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",leftthreetimes:"\u22CB",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",measuredangle:"\u2221",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",mstpos:"\u223E",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nGtv:"\u226B\u0338",nLeftarrow:"\u21CD",nLeftrightarrow:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nLtv:"\u226A\u0338",nRightarrow:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",neArr:"\u21D7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",ngsim:"\u2275",ngt:"\u226F",ngtr:"\u226F",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",nlArr:"\u21CD",nlE:"\u2266\u0338",nlarr:"\u219A",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219A",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nlsim:"\u2274",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nmid:"\u2224",nopf:"\u{1D55F}",not:"\xAC",notin:"\u2209",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24C8",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",ocy:"\u043E",odash:"\u229D",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",oplus:"\u2295",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oscr:"\u2134",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimes:"\u2297",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",pr:"\u227A",prE:"\u2AB3",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",primes:"\u2119",prnE:"\u2AB5",prnap:"\u2AB9",prnsim:"\u22E8",prod:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',rAarr:"\u21DB",rArr:"\u21D2",rAtail:"\u291C",rBarr:"\u290F",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",rightarrow:"\u2192",rightarrowtail:"\u21A3",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",rightthreetimes:"\u22CC",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",rsaquo:"\u203A",rscr:"\u{1D4C7}",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",sbquo:"\u201A",sc:"\u227B",scE:"\u2AB4",scap:"\u2AB8",scaron:"\u0161",sccue:"\u227D",sce:"\u2AB0",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",scnap:"\u2ABA",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",seArr:"\u21D8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",subE:"\u2AC5",subdot:"\u2ABD",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",sum:"\u2211",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",supE:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tbrk:"\u23B4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",tilde:"\u02DC",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uArr:"\u21D1",uHar:"\u2963",uacute:"\xFA",uarr:"\u2191",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udarr:"\u21C5",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uml:"\xA8",uogon:"\u0173",uopf:"\u{1D566}",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",upsi:"\u03C5",upsih:"\u03D2",upsilon:"\u03C5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",uwangle:"\u29A7",vArr:"\u21D5",vBar:"\u2AE8",vBarv:"\u2AE9",vDash:"\u22A8",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vcy:"\u0432",vdash:"\u22A2",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",vert:"|",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeetrf:"\u2128",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"};var fE={}.hasOwnProperty;function Pr(t){return fE.call(_u,t)?_u[t]:!1}function ke(t,e,n,r){let i=t.length,o=0,s;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(e,n),t.splice(...s);else for(n&&t.splice(e,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(e,0),t.splice(...s),o+=1e4,e+=1e4}function Ne(t,e){return t.length>0?(ke(t,t.length,0,e),t):e}var Ph={}.hasOwnProperty;function Lh(t){let e={},n=-1;for(;++n<t.length;)pE(e,t[n]);return e}function pE(t,e){let n;for(n in e){let i=(Ph.call(t,n)?t[n]:void 0)||(t[n]={}),o=e[n],s;if(o)for(s in o){Ph.call(i,s)||(i[s]=[]);let a=o[s];dE(i[s],Array.isArray(a)?a:a?[a]:[])}}}function dE(t,e){let n=-1,r=[];for(;++n<e.length;)(e[n].add==="after"?t:r).push(e[n]);ke(t,0,0,r)}function xs(t,e){let n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCodePoint(n)}function Ht(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Ye=un(/[A-Za-z]/),Me=un(/[\dA-Za-z]/),Nh=un(/[#-'*+\--9=?A-Z^-~]/);function $i(t){return t!==null&&(t<32||t===127)}var Hi=un(/\d/),Mh=un(/[\dA-Fa-f]/),Fh=un(/[!-/:-@[-`{-~]/);function O(t){return t!==null&&t<-2}function he(t){return t!==null&&(t<0||t===32)}function F(t){return t===-2||t===-1||t===32}var qh=un(new RegExp("\\p{P}|\\p{S}","u")),jh=un(/\s/);function un(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function B(t,e,n,r){let i=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(u){return F(u)?(t.enter(n),a(u)):e(u)}function a(u){return F(u)&&o++<i?(t.consume(u),a):(t.exit(n),e(u))}}var Bh={tokenize:hE};function hE(t){let e=t.attempt(this.parser.constructs.contentInitial,r,i),n;return e;function r(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),B(t,e,"linePrefix")}function i(a){return t.enter("paragraph"),o(a)}function o(a){let u=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(a)}function s(a){if(a===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(a);return}return O(a)?(t.consume(a),t.exit("chunkText"),o):(t.consume(a),s)}}var zh={tokenize:mE},Wh={tokenize:gE};function mE(t){let e=this,n=[],r=0,i,o,s;return a;function a(m){if(r<n.length){let w=n[r];return e.containerState=w[1],t.attempt(w[0].continuation,u,l)(m)}return l(m)}function u(m){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&h();let w=e.events.length,T=w,v;for(;T--;)if(e.events[T][0]==="exit"&&e.events[T][1].type==="chunkFlow"){v=e.events[T][1].end;break}y(r);let E=w;for(;E<e.events.length;)e.events[E][1].end={...v},E++;return ke(e.events,T+1,0,e.events.slice(w)),e.events.length=E,l(m)}return a(m)}function l(m){if(r===n.length){if(!i)return p(m);if(i.currentConstruct&&i.currentConstruct.concrete)return b(m);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(Wh,c,f)(m)}function c(m){return i&&h(),y(r),p(m)}function f(m){return e.parser.lazy[e.now().line]=r!==n.length,s=e.now().offset,b(m)}function p(m){return e.containerState={},t.attempt(Wh,d,b)(m)}function d(m){return r++,n.push([e.currentConstruct,e.containerState]),p(m)}function b(m){if(m===null){i&&h(),y(0),t.consume(m);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),g(m)}function g(m){if(m===null){S(t.exit("chunkFlow"),!0),y(0),t.consume(m);return}return O(m)?(t.consume(m),S(t.exit("chunkFlow")),r=0,e.interrupt=void 0,a):(t.consume(m),g)}function S(m,w){let T=e.sliceStream(m);if(w&&T.push(null),m.previous=o,o&&(o.next=m),o=m,i.defineSkip(m.start),i.write(T),e.parser.lazy[m.start.line]){let v=i.events.length;for(;v--;)if(i.events[v][1].start.offset<s&&(!i.events[v][1].end||i.events[v][1].end.offset>s))return;let E=e.events.length,L=E,k,I;for(;L--;)if(e.events[L][0]==="exit"&&e.events[L][1].type==="chunkFlow"){if(k){I=e.events[L][1].end;break}k=!0}for(y(r),v=E;v<e.events.length;)e.events[v][1].end={...I},v++;ke(e.events,L+1,0,e.events.slice(E)),e.events.length=v}}function y(m){let w=n.length;for(;w-- >m;){let T=n[w];e.containerState=T[1],T[0].exit.call(e,t)}n.length=m}function h(){i.write([null]),o=void 0,i=void 0,e.containerState._closeFlow=void 0}}function gE(t,e,n){return B(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Lr(t){if(t===null||he(t)||jh(t))return 1;if(qh(t))return 2}function Nr(t,e,n){let r=[],i=-1;for(;++i<t.length;){let o=t[i].resolveAll;o&&!r.includes(o)&&(e=o(e,n),r.push(o))}return e}var Vi={name:"attention",resolveAll:yE,tokenize:bE};function yE(t,e){let n=-1,r,i,o,s,a,u,l,c;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(r=n;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&e.sliceSerialize(t[r][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[r][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;u=t[r][1].end.offset-t[r][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;let f={...t[r][1].end},p={...t[n][1].start};Uh(f,-u),Uh(p,u),s={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...t[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},t[r][1].end={...s.start},t[n][1].start={...a.end},l=[],t[r][1].end.offset-t[r][1].start.offset&&(l=Ne(l,[["enter",t[r][1],e],["exit",t[r][1],e]])),l=Ne(l,[["enter",i,e],["enter",s,e],["exit",s,e],["enter",o,e]]),l=Ne(l,Nr(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),l=Ne(l,[["exit",o,e],["enter",a,e],["exit",a,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(c=2,l=Ne(l,[["enter",t[n][1],e],["exit",t[n][1],e]])):c=0,ke(t,r-1,n-r+3,l),n=r+l.length-c-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function bE(t,e){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Lr(r),o;return s;function s(u){return o=u,t.enter("attentionSequence"),a(u)}function a(u){if(u===o)return t.consume(u),a;let l=t.exit("attentionSequence"),c=Lr(u),f=!c||c===2&&i||n.includes(u),p=!i||i===2&&c||n.includes(r);return l._open=!!(o===42?f:f&&(i||!p)),l._close=!!(o===42?p:p&&(c||!f)),e(u)}}function Uh(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}var wu={name:"autolink",tokenize:xE};function xE(t,e,n){let r=0;return i;function i(d){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(d){return Ye(d)?(t.consume(d),s):d===64?n(d):l(d)}function s(d){return d===43||d===45||d===46||Me(d)?(r=1,a(d)):l(d)}function a(d){return d===58?(t.consume(d),r=0,u):(d===43||d===45||d===46||Me(d))&&r++<32?(t.consume(d),a):(r=0,l(d))}function u(d){return d===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.exit("autolink"),e):d===null||d===32||d===60||$i(d)?n(d):(t.consume(d),u)}function l(d){return d===64?(t.consume(d),c):Nh(d)?(t.consume(d),l):n(d)}function c(d){return Me(d)?f(d):n(d)}function f(d){return d===46?(t.consume(d),r=0,c):d===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.exit("autolink"),e):p(d)}function p(d){if((d===45||Me(d))&&r++<63){let b=d===45?p:f;return t.consume(d),b}return n(d)}}var cn={partial:!0,tokenize:_E};function _E(t,e,n){return r;function r(o){return F(o)?B(t,i,"linePrefix")(o):i(o)}function i(o){return o===null||O(o)?e(o):n(o)}}var _s={continuation:{tokenize:vE},exit:SE,name:"blockQuote",tokenize:wE};function wE(t,e,n){let r=this;return i;function i(s){if(s===62){let a=r.containerState;return a.open||(t.enter("blockQuote",{_container:!0}),a.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(s),t.exit("blockQuoteMarker"),o}return n(s)}function o(s){return F(s)?(t.enter("blockQuotePrefixWhitespace"),t.consume(s),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(s))}}function vE(t,e,n){let r=this;return i;function i(s){return F(s)?B(t,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return t.attempt(_s,e,n)(s)}}function SE(t){t.exit("blockQuote")}var ws={name:"characterEscape",tokenize:EE};function EE(t,e,n){return r;function r(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),i}function i(o){return Fh(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(o)}}var vs={name:"characterReference",tokenize:kE};function kE(t,e,n){let r=this,i=0,o,s;return a;function a(f){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),u}function u(f){return f===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(f),t.exit("characterReferenceMarkerNumeric"),l):(t.enter("characterReferenceValue"),o=31,s=Me,c(f))}function l(f){return f===88||f===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(f),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,s=Mh,c):(t.enter("characterReferenceValue"),o=7,s=Hi,c(f))}function c(f){if(f===59&&i){let p=t.exit("characterReferenceValue");return s===Me&&!Pr(r.sliceSerialize(p))?n(f):(t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return s(f)&&i++<o?(t.consume(f),c):n(f)}}var $h={partial:!0,tokenize:TE},Ss={concrete:!0,name:"codeFenced",tokenize:DE};function DE(t,e,n){let r=this,i={partial:!0,tokenize:T},o=0,s=0,a;return u;function u(v){return l(v)}function l(v){let E=r.events[r.events.length-1];return o=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,a=v,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),c(v)}function c(v){return v===a?(s++,t.consume(v),c):s<3?n(v):(t.exit("codeFencedFenceSequence"),F(v)?B(t,f,"whitespace")(v):f(v))}function f(v){return v===null||O(v)?(t.exit("codeFencedFence"),r.interrupt?e(v):t.check($h,g,w)(v)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===null||O(v)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),f(v)):F(v)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),B(t,d,"whitespace")(v)):v===96&&v===a?n(v):(t.consume(v),p)}function d(v){return v===null||O(v)?f(v):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),b(v))}function b(v){return v===null||O(v)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),f(v)):v===96&&v===a?n(v):(t.consume(v),b)}function g(v){return t.attempt(i,w,S)(v)}function S(v){return t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),y}function y(v){return o>0&&F(v)?B(t,h,"linePrefix",o+1)(v):h(v)}function h(v){return v===null||O(v)?t.check($h,g,w)(v):(t.enter("codeFlowValue"),m(v))}function m(v){return v===null||O(v)?(t.exit("codeFlowValue"),h(v)):(t.consume(v),m)}function w(v){return t.exit("codeFenced"),e(v)}function T(v,E,L){let k=0;return I;function I(z){return v.enter("lineEnding"),v.consume(z),v.exit("lineEnding"),N}function N(z){return v.enter("codeFencedFence"),F(z)?B(v,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):M(z)}function M(z){return z===a?(v.enter("codeFencedFenceSequence"),P(z)):L(z)}function P(z){return z===a?(k++,v.consume(z),P):k>=s?(v.exit("codeFencedFenceSequence"),F(z)?B(v,$,"whitespace")(z):$(z)):L(z)}function $(z){return z===null||O(z)?(v.exit("codeFencedFence"),E(z)):L(z)}}}function TE(t,e,n){let r=this;return i;function i(s){return s===null?n(s):(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):e(s)}}var Gi={name:"codeIndented",tokenize:AE},RE={partial:!0,tokenize:CE};function AE(t,e,n){let r=this;return i;function i(l){return t.enter("codeIndented"),B(t,o,"linePrefix",5)(l)}function o(l){let c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(l):n(l)}function s(l){return l===null?u(l):O(l)?t.attempt(RE,s,u)(l):(t.enter("codeFlowValue"),a(l))}function a(l){return l===null||O(l)?(t.exit("codeFlowValue"),s(l)):(t.consume(l),a)}function u(l){return t.exit("codeIndented"),e(l)}}function CE(t,e,n){let r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):O(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i):B(t,o,"linePrefix",5)(s)}function o(s){let a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):O(s)?i(s):n(s)}}var vu={name:"codeText",previous:OE,resolve:IE,tokenize:PE};function IE(t){let e=t.length-4,n=3,r,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r<e;)if(t[r][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(r=n-1,e++;++r<=e;)i===void 0?r!==e&&t[r][1].type!=="lineEnding"&&(i=r):(r===e||t[r][1].type==="lineEnding")&&(t[i][1].type="codeTextData",r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),e-=r-i-2,r=i+2),i=void 0);return t}function OE(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function PE(t,e,n){let r=this,i=0,o,s;return a;function a(p){return t.enter("codeText"),t.enter("codeTextSequence"),u(p)}function u(p){return p===96?(t.consume(p),i++,u):(t.exit("codeTextSequence"),l(p))}function l(p){return p===null?n(p):p===32?(t.enter("space"),t.consume(p),t.exit("space"),l):p===96?(s=t.enter("codeTextSequence"),o=0,f(p)):O(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),l):(t.enter("codeTextData"),c(p))}function c(p){return p===null||p===32||p===96||O(p)?(t.exit("codeTextData"),l(p)):(t.consume(p),c)}function f(p){return p===96?(t.consume(p),o++,f):o===i?(t.exit("codeTextSequence"),t.exit("codeText"),e(p)):(s.type="codeTextData",c(p))}}var Es=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){let r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,n,r){let i=n||0;this.setCursor(Math.trunc(e));let o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ki(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Ki(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Ki(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let n=this.left.splice(e,Number.POSITIVE_INFINITY);Ki(this.right,n.reverse())}else{let n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Ki(this.left,n.reverse())}}};function Ki(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function ks(t){let e={},n=-1,r,i,o,s,a,u,l,c=new Es(t);for(;++n<c.length;){for(;n in e;)n=e[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,LE(c,n)),n=e[n],l=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=c.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},a=c.slice(i,n),a.unshift(r),c.splice(i,n-i+1,a))}}return ke(t,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function LE(t,e){let n=t.get(e)[1],r=t.get(e)[2],i=e-1,o=[],s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let a=s.events,u=[],l={},c,f,p=-1,d=n,b=0,g=0,S=[g];for(;d;){for(;t.get(++i)[1]!==d;);o.push(i),d._tokenizer||(c=r.sliceStream(d),d.next||c.push(null),f&&s.defineSkip(d.start),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=n;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(g=p+1,S.push(g),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(s.events=[],d?(d._tokenizer=void 0,d.previous=void 0):S.pop(),p=S.length;p--;){let y=a.slice(S[p],S[p+1]),h=o.pop();u.push([h,h+y.length-1]),t.splice(h,2,y)}for(u.reverse(),p=-1;++p<u.length;)l[b+u[p][0]]=b+u[p][1],b+=u[p][1]-u[p][0]-1;return l}var Su={resolve:ME,tokenize:FE},NE={partial:!0,tokenize:qE};function ME(t){return ks(t),t}function FE(t,e){let n;return r;function r(a){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):O(a)?t.check(NE,s,o)(a):(t.consume(a),i)}function o(a){return t.exit("chunkContent"),t.exit("content"),e(a)}function s(a){return t.consume(a),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function qE(t,e,n){let r=this;return i;function i(s){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),B(t,o,"linePrefix")}function o(s){if(s===null||O(s))return n(s);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):t.interrupt(r.parser.constructs.flow,n,e)(s)}}function Ds(t,e,n,r,i,o,s,a,u){let l=u||Number.POSITIVE_INFINITY,c=0;return f;function f(y){return y===60?(t.enter(r),t.enter(i),t.enter(o),t.consume(y),t.exit(o),p):y===null||y===32||y===41||$i(y)?n(y):(t.enter(r),t.enter(s),t.enter(a),t.enter("chunkString",{contentType:"string"}),g(y))}function p(y){return y===62?(t.enter(o),t.consume(y),t.exit(o),t.exit(i),t.exit(r),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===62?(t.exit("chunkString"),t.exit(a),p(y)):y===null||y===60||O(y)?n(y):(t.consume(y),y===92?b:d)}function b(y){return y===60||y===62||y===92?(t.consume(y),d):d(y)}function g(y){return!c&&(y===null||y===41||he(y))?(t.exit("chunkString"),t.exit(a),t.exit(s),t.exit(r),e(y)):c<l&&y===40?(t.consume(y),c++,g):y===41?(t.consume(y),c--,g):y===null||y===32||y===40||$i(y)?n(y):(t.consume(y),y===92?S:g)}function S(y){return y===40||y===41||y===92?(t.consume(y),g):g(y)}}function Ts(t,e,n,r,i,o){let s=this,a=0,u;return l;function l(d){return t.enter(r),t.enter(i),t.consume(d),t.exit(i),t.enter(o),c}function c(d){return a>999||d===null||d===91||d===93&&!u||d===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):d===93?(t.exit(o),t.enter(i),t.consume(d),t.exit(i),t.exit(r),e):O(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),c):(t.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||O(d)||a++>999?(t.exit("chunkString"),c(d)):(t.consume(d),u||(u=!F(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(t.consume(d),a++,f):f(d)}}function Rs(t,e,n,r,i,o){let s;return a;function a(p){return p===34||p===39||p===40?(t.enter(r),t.enter(i),t.consume(p),t.exit(i),s=p===40?41:p,u):n(p)}function u(p){return p===s?(t.enter(i),t.consume(p),t.exit(i),t.exit(r),e):(t.enter(o),l(p))}function l(p){return p===s?(t.exit(o),u(s)):p===null?n(p):O(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),B(t,l,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===s||p===null||O(p)?(t.exit("chunkString"),l(p)):(t.consume(p),p===92?f:c)}function f(p){return p===s||p===92?(t.consume(p),c):c(p)}}function Qn(t,e){let n;return r;function r(i){return O(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,r):F(i)?B(t,r,n?"linePrefix":"lineSuffix")(i):e(i)}}var Eu={name:"definition",tokenize:BE},jE={partial:!0,tokenize:WE};function BE(t,e,n){let r=this,i;return o;function o(d){return t.enter("definition"),s(d)}function s(d){return Ts.call(r,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function a(d){return i=Ht(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(t.enter("definitionMarker"),t.consume(d),t.exit("definitionMarker"),u):n(d)}function u(d){return he(d)?Qn(t,l)(d):l(d)}function l(d){return Ds(t,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return t.attempt(jE,f,f)(d)}function f(d){return F(d)?B(t,p,"whitespace")(d):p(d)}function p(d){return d===null||O(d)?(t.exit("definition"),r.parser.defined.push(i),e(d)):n(d)}}function WE(t,e,n){return r;function r(a){return he(a)?Qn(t,i)(a):n(a)}function i(a){return Rs(t,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return F(a)?B(t,s,"whitespace")(a):s(a)}function s(a){return a===null||O(a)?e(a):n(a)}}var ku={name:"hardBreakEscape",tokenize:zE};function zE(t,e,n){return r;function r(o){return t.enter("hardBreakEscape"),t.consume(o),i}function i(o){return O(o)?(t.exit("hardBreakEscape"),e(o)):n(o)}}var Du={name:"headingAtx",resolve:UE,tokenize:$E};function UE(t,e){let n=t.length-2,r=3,i,o;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},o={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},ke(t,r,n-r+1,[["enter",i,e],["enter",o,e],["exit",o,e],["exit",i,e]])),t}function $E(t,e,n){let r=0;return i;function i(c){return t.enter("atxHeading"),o(c)}function o(c){return t.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(t.consume(c),s):c===null||he(c)?(t.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(t.enter("atxHeadingSequence"),u(c)):c===null||O(c)?(t.exit("atxHeading"),e(c)):F(c)?B(t,a,"whitespace")(c):(t.enter("atxHeadingText"),l(c))}function u(c){return c===35?(t.consume(c),u):(t.exit("atxHeadingSequence"),a(c))}function l(c){return c===null||c===35||he(c)?(t.exit("atxHeadingText"),a(c)):(t.consume(c),l)}}var Hh=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Tu=["pre","script","style","textarea"];var Ru={concrete:!0,name:"htmlFlow",resolveTo:GE,tokenize:KE},HE={partial:!0,tokenize:QE},VE={partial:!0,tokenize:YE};function GE(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function KE(t,e,n){let r=this,i,o,s,a,u;return l;function l(_){return c(_)}function c(_){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(_),f}function f(_){return _===33?(t.consume(_),p):_===47?(t.consume(_),o=!0,g):_===63?(t.consume(_),i=3,r.interrupt?e:x):Ye(_)?(t.consume(_),s=String.fromCharCode(_),S):n(_)}function p(_){return _===45?(t.consume(_),i=2,d):_===91?(t.consume(_),i=5,a=0,b):Ye(_)?(t.consume(_),i=4,r.interrupt?e:x):n(_)}function d(_){return _===45?(t.consume(_),r.interrupt?e:x):n(_)}function b(_){let He="CDATA[";return _===He.charCodeAt(a++)?(t.consume(_),a===He.length?r.interrupt?e:M:b):n(_)}function g(_){return Ye(_)?(t.consume(_),s=String.fromCharCode(_),S):n(_)}function S(_){if(_===null||_===47||_===62||he(_)){let He=_===47,Nn=s.toLowerCase();return!He&&!o&&Tu.includes(Nn)?(i=1,r.interrupt?e(_):M(_)):Hh.includes(s.toLowerCase())?(i=6,He?(t.consume(_),y):r.interrupt?e(_):M(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):o?h(_):m(_))}return _===45||Me(_)?(t.consume(_),s+=String.fromCharCode(_),S):n(_)}function y(_){return _===62?(t.consume(_),r.interrupt?e:M):n(_)}function h(_){return F(_)?(t.consume(_),h):I(_)}function m(_){return _===47?(t.consume(_),I):_===58||_===95||Ye(_)?(t.consume(_),w):F(_)?(t.consume(_),m):I(_)}function w(_){return _===45||_===46||_===58||_===95||Me(_)?(t.consume(_),w):T(_)}function T(_){return _===61?(t.consume(_),v):F(_)?(t.consume(_),T):m(_)}function v(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(t.consume(_),u=_,E):F(_)?(t.consume(_),v):L(_)}function E(_){return _===u?(t.consume(_),u=null,k):_===null||O(_)?n(_):(t.consume(_),E)}function L(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||he(_)?T(_):(t.consume(_),L)}function k(_){return _===47||_===62||F(_)?m(_):n(_)}function I(_){return _===62?(t.consume(_),N):n(_)}function N(_){return _===null||O(_)?M(_):F(_)?(t.consume(_),N):n(_)}function M(_){return _===45&&i===2?(t.consume(_),de):_===60&&i===1?(t.consume(_),xe):_===62&&i===4?(t.consume(_),et):_===63&&i===3?(t.consume(_),x):_===93&&i===5?(t.consume(_),vt):O(_)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(HE,qt,P)(_)):_===null||O(_)?(t.exit("htmlFlowData"),P(_)):(t.consume(_),M)}function P(_){return t.check(VE,$,qt)(_)}function $(_){return t.enter("lineEnding"),t.consume(_),t.exit("lineEnding"),z}function z(_){return _===null||O(_)?P(_):(t.enter("htmlFlowData"),M(_))}function de(_){return _===45?(t.consume(_),x):M(_)}function xe(_){return _===47?(t.consume(_),s="",ft):M(_)}function ft(_){if(_===62){let He=s.toLowerCase();return Tu.includes(He)?(t.consume(_),et):M(_)}return Ye(_)&&s.length<8?(t.consume(_),s+=String.fromCharCode(_),ft):M(_)}function vt(_){return _===93?(t.consume(_),x):M(_)}function x(_){return _===62?(t.consume(_),et):_===45&&i===2?(t.consume(_),x):M(_)}function et(_){return _===null||O(_)?(t.exit("htmlFlowData"),qt(_)):(t.consume(_),et)}function qt(_){return t.exit("htmlFlow"),e(_)}}function YE(t,e,n){let r=this;return i;function i(s){return O(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):e(s)}}function QE(t,e,n){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(cn,e,n)}}var Au={name:"htmlText",tokenize:ZE};function ZE(t,e,n){let r=this,i,o,s;return a;function a(x){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(x),u}function u(x){return x===33?(t.consume(x),l):x===47?(t.consume(x),T):x===63?(t.consume(x),m):Ye(x)?(t.consume(x),L):n(x)}function l(x){return x===45?(t.consume(x),c):x===91?(t.consume(x),o=0,b):Ye(x)?(t.consume(x),h):n(x)}function c(x){return x===45?(t.consume(x),d):n(x)}function f(x){return x===null?n(x):x===45?(t.consume(x),p):O(x)?(s=f,xe(x)):(t.consume(x),f)}function p(x){return x===45?(t.consume(x),d):f(x)}function d(x){return x===62?de(x):x===45?p(x):f(x)}function b(x){let et="CDATA[";return x===et.charCodeAt(o++)?(t.consume(x),o===et.length?g:b):n(x)}function g(x){return x===null?n(x):x===93?(t.consume(x),S):O(x)?(s=g,xe(x)):(t.consume(x),g)}function S(x){return x===93?(t.consume(x),y):g(x)}function y(x){return x===62?de(x):x===93?(t.consume(x),y):g(x)}function h(x){return x===null||x===62?de(x):O(x)?(s=h,xe(x)):(t.consume(x),h)}function m(x){return x===null?n(x):x===63?(t.consume(x),w):O(x)?(s=m,xe(x)):(t.consume(x),m)}function w(x){return x===62?de(x):m(x)}function T(x){return Ye(x)?(t.consume(x),v):n(x)}function v(x){return x===45||Me(x)?(t.consume(x),v):E(x)}function E(x){return O(x)?(s=E,xe(x)):F(x)?(t.consume(x),E):de(x)}function L(x){return x===45||Me(x)?(t.consume(x),L):x===47||x===62||he(x)?k(x):n(x)}function k(x){return x===47?(t.consume(x),de):x===58||x===95||Ye(x)?(t.consume(x),I):O(x)?(s=k,xe(x)):F(x)?(t.consume(x),k):de(x)}function I(x){return x===45||x===46||x===58||x===95||Me(x)?(t.consume(x),I):N(x)}function N(x){return x===61?(t.consume(x),M):O(x)?(s=N,xe(x)):F(x)?(t.consume(x),N):k(x)}function M(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(t.consume(x),i=x,P):O(x)?(s=M,xe(x)):F(x)?(t.consume(x),M):(t.consume(x),$)}function P(x){return x===i?(t.consume(x),i=void 0,z):x===null?n(x):O(x)?(s=P,xe(x)):(t.consume(x),P)}function $(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||he(x)?k(x):(t.consume(x),$)}function z(x){return x===47||x===62||he(x)?k(x):n(x)}function de(x){return x===62?(t.consume(x),t.exit("htmlTextData"),t.exit("htmlText"),e):n(x)}function xe(x){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),ft}function ft(x){return F(x)?B(t,vt,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):vt(x)}function vt(x){return t.enter("htmlTextData"),s(x)}}var Zn={name:"labelEnd",resolveAll:tk,resolveTo:nk,tokenize:rk},JE={tokenize:ik},XE={tokenize:ok},ek={tokenize:sk};function tk(t){let e=-1,n=[];for(;++e<t.length;){let r=t[e][1];if(n.push(t[e]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){let i=r.type==="labelImage"?4:2;r.type="data",e+=i}}return t.length!==n.length&&ke(t,0,t.length,n),t}function nk(t,e){let n=t.length,r=0,i,o,s,a;for(;n--;)if(i=t[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(t[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);let u={type:t[o][1].type==="labelLink"?"link":"image",start:{...t[o][1].start},end:{...t[t.length-1][1].end}},l={type:"label",start:{...t[o][1].start},end:{...t[s][1].end}},c={type:"labelText",start:{...t[o+r+2][1].end},end:{...t[s-2][1].start}};return a=[["enter",u,e],["enter",l,e]],a=Ne(a,t.slice(o+1,o+r+3)),a=Ne(a,[["enter",c,e]]),a=Ne(a,Nr(e.parser.constructs.insideSpan.null,t.slice(o+r+4,s-3),e)),a=Ne(a,[["exit",c,e],t[s-2],t[s-1],["exit",l,e]]),a=Ne(a,t.slice(s+1)),a=Ne(a,[["exit",u,e]]),ke(t,o,t.length,a),t}function rk(t,e,n){let r=this,i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(p){return o?o._inactive?f(p):(s=r.parser.defined.includes(Ht(r.sliceSerialize({start:o.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(p),t.exit("labelMarker"),t.exit("labelEnd"),u):n(p)}function u(p){return p===40?t.attempt(JE,c,s?c:f)(p):p===91?t.attempt(XE,c,s?l:f)(p):s?c(p):f(p)}function l(p){return t.attempt(ek,c,f)(p)}function c(p){return e(p)}function f(p){return o._balanced=!0,n(p)}}function ik(t,e,n){return r;function r(f){return t.enter("resource"),t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),i}function i(f){return he(f)?Qn(t,o)(f):o(f)}function o(f){return f===41?c(f):Ds(t,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return he(f)?Qn(t,u)(f):c(f)}function a(f){return n(f)}function u(f){return f===34||f===39||f===40?Rs(t,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return he(f)?Qn(t,c)(f):c(f)}function c(f){return f===41?(t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),t.exit("resource"),e):n(f)}}function ok(t,e,n){let r=this;return i;function i(a){return Ts.call(r,t,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(Ht(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(a):n(a)}function s(a){return n(a)}}function sk(t,e,n){return r;function r(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),i}function i(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),e):n(o)}}var Cu={name:"labelStartImage",resolveAll:Zn.resolveAll,tokenize:ak};function ak(t,e,n){let r=this;return i;function i(a){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(a),t.exit("labelImageMarker"),o}function o(a){return a===91?(t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):e(a)}}var Iu={name:"labelStartLink",resolveAll:Zn.resolveAll,tokenize:lk};function lk(t,e,n){let r=this;return i;function i(s){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(s),t.exit("labelMarker"),t.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):e(s)}}var Yi={name:"lineEnding",tokenize:uk};function uk(t,e){return n;function n(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),B(t,e,"linePrefix")}}var Jn={name:"thematicBreak",tokenize:ck};function ck(t,e,n){let r=0,i;return o;function o(l){return t.enter("thematicBreak"),s(l)}function s(l){return i=l,a(l)}function a(l){return l===i?(t.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||O(l))?(t.exit("thematicBreak"),e(l)):n(l)}function u(l){return l===i?(t.consume(l),r++,u):(t.exit("thematicBreakSequence"),F(l)?B(t,a,"whitespace")(l):a(l))}}var Re={continuation:{tokenize:hk},exit:gk,name:"list",tokenize:dk},fk={partial:!0,tokenize:yk},pk={partial:!0,tokenize:mk};function dk(t,e,n){let r=this,i=r.events[r.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(d){let b=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:Hi(d)){if(r.containerState.type||(r.containerState.type=b,t.enter(b,{_container:!0})),b==="listUnordered")return t.enter("listItemPrefix"),d===42||d===45?t.check(Jn,n,l)(d):l(d);if(!r.interrupt||d===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),u(d)}return n(d)}function u(d){return Hi(d)&&++s<10?(t.consume(d),u):(!r.interrupt||s<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(t.exit("listItemValue"),l(d)):n(d)}function l(d){return t.enter("listItemMarker"),t.consume(d),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,t.check(cn,r.interrupt?n:c,t.attempt(fk,p,f))}function c(d){return r.containerState.initialBlankLine=!0,o++,p(d)}function f(d){return F(d)?(t.enter("listItemPrefixWhitespace"),t.consume(d),t.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=o+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(d)}}function hk(t,e,n){let r=this;return r.containerState._closeFlow=void 0,t.check(cn,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,B(t,e,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!F(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(pk,e,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,B(t,t.attempt(Re,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function mk(t,e,n){let r=this;return B(t,i,"listItemIndent",r.containerState.size+1);function i(o){let s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?e(o):n(o)}}function gk(t){t.exit(this.containerState.type)}function yk(t,e,n){let r=this;return B(t,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){let s=r.events[r.events.length-1];return!F(o)&&s&&s[1].type==="listItemPrefixWhitespace"?e(o):n(o)}}var As={name:"setextUnderline",resolveTo:bk,tokenize:xk};function bk(t,e){let n=t.length,r,i,o;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!o&&t[n][1].type==="definition"&&(o=n);let s={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",o?(t.splice(i,0,["enter",s,e]),t.splice(o+1,0,["exit",t[r][1],e]),t[r][1].end={...t[o][1].end}):t[r][1]=s,t.push(["exit",s,e]),t}function xk(t,e,n){let r=this,i;return o;function o(l){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(t.enter("setextHeadingLine"),i=l,s(l)):n(l)}function s(l){return t.enter("setextHeadingLineSequence"),a(l)}function a(l){return l===i?(t.consume(l),a):(t.exit("setextHeadingLineSequence"),F(l)?B(t,u,"lineSuffix")(l):u(l))}function u(l){return l===null||O(l)?(t.exit("setextHeadingLine"),e(l)):n(l)}}var Vh={tokenize:_k};function _k(t){let e=this,n=t.attempt(cn,r,t.attempt(this.parser.constructs.flowInitial,i,B(t,t.attempt(this.parser.constructs.flow,i,t.attempt(Su,i)),"linePrefix")));return n;function r(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,n}}var Gh={resolveAll:Zh()},Kh=Qh("string"),Yh=Qh("text");function Qh(t){return{resolveAll:Zh(t==="text"?wk:void 0),tokenize:e};function e(n){let r=this,i=this.parser.constructs[t],o=n.attempt(i,s,a);return s;function s(c){return l(c)?o(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),u}function u(c){return l(c)?(n.exit("data"),o(c)):(n.consume(c),u)}function l(c){if(c===null)return!0;let f=i[c],p=-1;if(f)for(;++p<f.length;){let d=f[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function Zh(t){return e;function e(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return t?t(n,r):n}}function wk(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){let r=t[n-1][1],i=e.sliceStream(r),o=i.length,s=-1,a=0,u;for(;o--;){let l=i[o];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(l===-2)u=!0,a++;else if(l!==-1){o++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(a=0),a){let l={type:n===t.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(t.splice(n,0,["enter",l,e],["exit",l,e]),n+=2)}n++}return t}var Ou={};aS(Ou,{attentionMarkers:()=>Ak,contentInitial:()=>Sk,disable:()=>Ck,document:()=>vk,flow:()=>kk,flowInitial:()=>Ek,insideSpan:()=>Rk,string:()=>Dk,text:()=>Tk});var vk={42:Re,43:Re,45:Re,48:Re,49:Re,50:Re,51:Re,52:Re,53:Re,54:Re,55:Re,56:Re,57:Re,62:_s},Sk={91:Eu},Ek={[-2]:Gi,[-1]:Gi,32:Gi},kk={35:Du,42:Jn,45:[As,Jn],60:Ru,61:As,95:Jn,96:Ss,126:Ss},Dk={38:vs,92:ws},Tk={[-5]:Yi,[-4]:Yi,[-3]:Yi,33:Cu,38:vs,42:Vi,60:[wu,Au],91:Iu,92:[ku,ws],93:Zn,95:Vi,96:vu},Rk={null:[Vi,Gh]},Ak={null:[42,95]},Ck={null:[]};function Jh(t,e,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},o=[],s=[],a=[],u=!0,l={attempt:k(E),check:k(L),consume:w,enter:T,exit:v,interrupt:k(L,{interrupt:!0})},c={code:null,containerState:{},defineSkip:y,events:[],now:S,parser:t,previous:null,sliceSerialize:b,sliceStream:g,write:d},f=e.tokenize.call(c,l),p;return e.resolveAll&&o.push(e),c;function d(P){return s=Ne(s,P),h(),s[s.length-1]!==null?[]:(I(e,0),c.events=Nr(o,c.events,c),c.events)}function b(P,$){return Ok(g(P),$)}function g(P){return Ik(s,P)}function S(){let{_bufferIndex:P,_index:$,line:z,column:de,offset:xe}=r;return{_bufferIndex:P,_index:$,line:z,column:de,offset:xe}}function y(P){i[P.line]=P.column,M()}function h(){let P;for(;r._index<s.length;){let $=s[r._index];if(typeof $=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<$.length;)m($.charCodeAt(r._bufferIndex));else m($)}}function m(P){u=void 0,p=P,f=f(P)}function w(P){O(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,M()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=P,u=!0}function T(P,$){let z=$||{};return z.type=P,z.start=S(),c.events.push(["enter",z,c]),a.push(z),z}function v(P){let $=a.pop();return $.end=S(),c.events.push(["exit",$,c]),$}function E(P,$){I(P,$.from)}function L(P,$){$.restore()}function k(P,$){return z;function z(de,xe,ft){let vt,x,et,qt;return Array.isArray(de)?He(de):"tokenize"in de?He([de]):_(de);function _(Ee){return Ci;function Ci(jt){let Mn=jt!==null&&Ee[jt],Tr=jt!==null&&Ee.null,Gl=[...Array.isArray(Mn)?Mn:Mn?[Mn]:[],...Array.isArray(Tr)?Tr:Tr?[Tr]:[]];return He(Gl)(jt)}}function He(Ee){return vt=Ee,x=0,Ee.length===0?ft:Nn(Ee[x])}function Nn(Ee){return Ci;function Ci(jt){return qt=N(),et=Ee,Ee.partial||(c.currentConstruct=Ee),Ee.name&&c.parser.constructs.disable.null.includes(Ee.name)?Jo(jt):Ee.tokenize.call($?Object.assign(Object.create(c),$):c,l,Vl,Jo)(jt)}}function Vl(Ee){return u=!0,P(et,qt),xe}function Jo(Ee){return u=!0,qt.restore(),++x<vt.length?Nn(vt[x]):ft}}}function I(P,$){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&ke(c.events,$,c.events.length-$,P.resolve(c.events.slice($),c)),P.resolveTo&&(c.events=P.resolveTo(c.events,c))}function N(){let P=S(),$=c.previous,z=c.currentConstruct,de=c.events.length,xe=Array.from(a);return{from:de,restore:ft};function ft(){r=P,c.previous=$,c.currentConstruct=z,c.events.length=de,a=xe,M()}}function M(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Ik(t,e){let n=e.start._index,r=e.start._bufferIndex,i=e.end._index,o=e.end._bufferIndex,s;if(n===i)s=[t[n].slice(r,o)];else{if(s=t.slice(n,i),r>-1){let a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(t[i].slice(0,o))}return s}function Ok(t,e){let n=-1,r=[],i;for(;++n<t.length;){let o=t[n],s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
52
52
  `;break}case-3:{s=`\r
53
- `;break}case-2:{s=e?" ":" ";break}case-1:{if(!e&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function Pu(t){let r={constructs:Ph([Ou,...(t||{}).extensions||[]]),content:i(jh),defined:[],document:i(Wh),flow:i(Hh),lazy:{},string:i(Gh),text:i(Kh)};return r;function i(o){return s;function s(a){return Zh(r,o,a)}}}function Lu(t){for(;!Ds(t););return t}var Jh=/[\0\t\n\r]/g;function Nu(){let t=1,e="",n=!0,r;return i;function i(o,s,a){let u=[],l,c,f,p,d;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),f=0,e="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if(Jh.lastIndex=f,l=Jh.exec(o),p=l&&l.index!==void 0?l.index:o.length,d=o.charCodeAt(p),!l){e=o.slice(f);break}if(d===10&&f===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<p&&(u.push(o.slice(f,p)),t+=p-f),d){case 0:{u.push(65533),t++;break}case 9:{for(c=Math.ceil(t/4)*4,u.push(-2);t++<c;)u.push(-1);break}case 10:{u.push(-4),t=1;break}default:r=!0,t=1}f=p+1}return a&&(r&&u.push(-5),e&&u.push(e),u.push(null)),u}}var Ak=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Is(t){return t.replace(Ak,Ck)}function Ck(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){let i=n.charCodeAt(1),o=i===120||i===88;return _s(n.slice(o?2:1),o?16:10)}return Pr(n)||t}function fn(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Xh(t.position):"start"in t||"end"in t?Xh(t):"line"in t||"column"in t?Mu(t):""}function Mu(t){return em(t&&t.line)+":"+em(t&&t.column)}function Xh(t){return Mu(t&&t.start)+"-"+Mu(t&&t.end)}function em(t){return t&&typeof t=="number"?t:1}var nm={}.hasOwnProperty;function Fu(t,e,n){return e&&typeof e=="object"&&(n=e,e=void 0),Ik(n)(Lu(Pu(n).document().write(Nu()(t,e,!0))))}function Ik(t){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(wd),autolinkProtocol:k,autolinkEmail:k,atxHeading:o(bd),blockQuote:o(jt),characterEscape:k,characterReference:k,codeFenced:o(Mn),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(Mn,s),codeText:o(Tr,s),codeTextData:k,data:k,codeFlowValue:k,definition:o(Gl),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(Q0),hardBreakEscape:o(xd),hardBreakTrailing:o(xd),htmlFlow:o(_d,s),htmlFlowData:k,htmlText:o(_d,s),htmlTextData:k,image:o(Z0),label:s,link:o(wd),listItem:o(J0),listItemValue:p,listOrdered:o(vd,f),listUnordered:o(vd),paragraph:o(X0),reference:_,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(bd),strong:o(eS),thematicBreak:o(nS)},exit:{atxHeading:u(),atxHeadingSequence:T,autolink:u(),autolinkEmail:Ci,autolinkProtocol:Ee,blockQuote:u(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:Nn,characterReferenceMarkerNumeric:Nn,characterReferenceValue:Vl,characterReference:Jo,codeFenced:u(S),codeFencedFence:g,codeFencedFenceInfo:d,codeFencedFenceMeta:b,codeFlowValue:I,codeIndented:u(y),codeText:u(z),codeTextData:I,data:I,definition:u(),definitionDestinationString:w,definitionLabelString:h,definitionTitleString:m,emphasis:u(),hardBreakEscape:u(M),hardBreakTrailing:u(M),htmlFlow:u(P),htmlFlowData:I,htmlText:u($),htmlTextData:I,image:u(xe),label:vt,labelText:ft,lineEnding:N,link:u(de),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:He,resourceDestinationString:x,resourceTitleString:et,resource:qt,setextHeading:u(L),setextHeadingLineSequence:E,setextHeadingText:v,strong:u(),thematicBreak:u()}};rm(e,(t||{}).mdastExtensions||[]);let n={};return r;function r(D){let A={type:"root",children:[]},j={stack:[A],tokenStack:[],config:e,enter:a,exit:l,buffer:s,resume:c,data:n},G=[],te=-1;for(;++te<D.length;)if(D[te][1].type==="listOrdered"||D[te][1].type==="listUnordered")if(D[te][0]==="enter")G.push(te);else{let pt=G.pop();te=i(D,pt,te)}for(te=-1;++te<D.length;){let pt=e[D[te][0]];nm.call(pt,D[te][1].type)&&pt[D[te][1].type].call(Object.assign({sliceSerialize:D[te][2].sliceSerialize},j),D[te][1])}if(j.tokenStack.length>0){let pt=j.tokenStack[j.tokenStack.length-1];(pt[1]||tm).call(j,void 0,pt[0])}for(A.position={start:pn(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:pn(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},te=-1;++te<e.transforms.length;)A=e.transforms[te](A)||A;return A}function i(D,A,j){let G=A-1,te=-1,pt=!1,Fn,Bt,Ii,Oi;for(;++G<=j;){let Ve=D[G];switch(Ve[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ve[0]==="enter"?te++:te--,Oi=void 0;break}case"lineEndingBlank":{Ve[0]==="enter"&&(Fn&&!Oi&&!te&&!Ii&&(Ii=G),Oi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Oi=void 0}if(!te&&Ve[0]==="enter"&&Ve[1].type==="listItemPrefix"||te===-1&&Ve[0]==="exit"&&(Ve[1].type==="listUnordered"||Ve[1].type==="listOrdered")){if(Fn){let Rr=G;for(Bt=void 0;Rr--;){let Wt=D[Rr];if(Wt[1].type==="lineEnding"||Wt[1].type==="lineEndingBlank"){if(Wt[0]==="exit")continue;Bt&&(D[Bt][1].type="lineEndingBlank",pt=!0),Wt[1].type="lineEnding",Bt=Rr}else if(!(Wt[1].type==="linePrefix"||Wt[1].type==="blockQuotePrefix"||Wt[1].type==="blockQuotePrefixWhitespace"||Wt[1].type==="blockQuoteMarker"||Wt[1].type==="listItemIndent"))break}Ii&&(!Bt||Ii<Bt)&&(Fn._spread=!0),Fn.end=Object.assign({},Bt?D[Bt][1].start:Ve[1].end),D.splice(Bt||G,0,["exit",Fn,Ve[2]]),G++,j++}if(Ve[1].type==="listItemPrefix"){let Rr={type:"listItem",_spread:!1,start:Object.assign({},Ve[1].start),end:void 0};Fn=Rr,D.splice(G,0,["enter",Rr,Ve[2]]),G++,j++,Ii=void 0,Oi=!0}}}return D[A][1]._spread=pt,j}function o(D,A){return j;function j(G){a.call(this,D(G),G),A&&A.call(this,G)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(D,A,j){this.stack[this.stack.length-1].children.push(D),this.stack.push(D),this.tokenStack.push([A,j||void 0]),D.position={start:pn(A.start),end:void 0}}function u(D){return A;function A(j){D&&D.call(this,j),l.call(this,j)}}function l(D,A){let j=this.stack.pop(),G=this.tokenStack.pop();if(G)G[0].type!==D.type&&(A?A.call(this,D,G[0]):(G[1]||tm).call(this,D,G[0]));else throw new Error("Cannot close `"+D.type+"` ("+fn({start:D.start,end:D.end})+"): it\u2019s not open");j.position.end=pn(D.end)}function c(){return Qn(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(D){if(this.data.expectingFirstListItemValue){let A=this.stack[this.stack.length-2];A.start=Number.parseInt(this.sliceSerialize(D),10),this.data.expectingFirstListItemValue=void 0}}function d(){let D=this.resume(),A=this.stack[this.stack.length-1];A.lang=D}function b(){let D=this.resume(),A=this.stack[this.stack.length-1];A.meta=D}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){let D=this.resume(),A=this.stack[this.stack.length-1];A.value=D.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){let D=this.resume(),A=this.stack[this.stack.length-1];A.value=D.replace(/(\r?\n|\r)$/g,"")}function h(D){let A=this.resume(),j=this.stack[this.stack.length-1];j.label=A,j.identifier=Ht(this.sliceSerialize(D)).toLowerCase()}function m(){let D=this.resume(),A=this.stack[this.stack.length-1];A.title=D}function w(){let D=this.resume(),A=this.stack[this.stack.length-1];A.url=D}function T(D){let A=this.stack[this.stack.length-1];if(!A.depth){let j=this.sliceSerialize(D).length;A.depth=j}}function v(){this.data.setextHeadingSlurpLineEnding=!0}function E(D){let A=this.stack[this.stack.length-1];A.depth=this.sliceSerialize(D).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function k(D){let j=this.stack[this.stack.length-1].children,G=j[j.length-1];(!G||G.type!=="text")&&(G=tS(),G.position={start:pn(D.start),end:void 0},j.push(G)),this.stack.push(G)}function I(D){let A=this.stack.pop();A.value+=this.sliceSerialize(D),A.position.end=pn(D.end)}function N(D){let A=this.stack[this.stack.length-1];if(this.data.atHardBreak){let j=A.children[A.children.length-1];j.position.end=pn(D.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(A.type)&&(k.call(this,D),I.call(this,D))}function M(){this.data.atHardBreak=!0}function P(){let D=this.resume(),A=this.stack[this.stack.length-1];A.value=D}function $(){let D=this.resume(),A=this.stack[this.stack.length-1];A.value=D}function z(){let D=this.resume(),A=this.stack[this.stack.length-1];A.value=D}function de(){let D=this.stack[this.stack.length-1];if(this.data.inReference){let A=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=A,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function xe(){let D=this.stack[this.stack.length-1];if(this.data.inReference){let A=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=A,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function ft(D){let A=this.sliceSerialize(D),j=this.stack[this.stack.length-2];j.label=Is(A),j.identifier=Ht(A).toLowerCase()}function vt(){let D=this.stack[this.stack.length-1],A=this.resume(),j=this.stack[this.stack.length-1];if(this.data.inReference=!0,j.type==="link"){let G=D.children;j.children=G}else j.alt=A}function x(){let D=this.resume(),A=this.stack[this.stack.length-1];A.url=D}function et(){let D=this.resume(),A=this.stack[this.stack.length-1];A.title=D}function qt(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function He(D){let A=this.resume(),j=this.stack[this.stack.length-1];j.label=A,j.identifier=Ht(this.sliceSerialize(D)).toLowerCase(),this.data.referenceType="full"}function Nn(D){this.data.characterReferenceType=D.type}function Vl(D){let A=this.sliceSerialize(D),j=this.data.characterReferenceType,G;j?(G=_s(A,j==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):G=Pr(A);let te=this.stack[this.stack.length-1];te.value+=G}function Jo(D){let A=this.stack.pop();A.position.end=pn(D.end)}function Ee(D){I.call(this,D);let A=this.stack[this.stack.length-1];A.url=this.sliceSerialize(D)}function Ci(D){I.call(this,D);let A=this.stack[this.stack.length-1];A.url="mailto:"+this.sliceSerialize(D)}function jt(){return{type:"blockquote",children:[]}}function Mn(){return{type:"code",lang:null,meta:null,value:""}}function Tr(){return{type:"inlineCode",value:""}}function Gl(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Q0(){return{type:"emphasis",children:[]}}function bd(){return{type:"heading",depth:0,children:[]}}function xd(){return{type:"break"}}function _d(){return{type:"html",value:""}}function Z0(){return{type:"image",title:null,url:"",alt:null}}function wd(){return{type:"link",title:null,url:"",children:[]}}function vd(D){return{type:"list",ordered:D.type==="listOrdered",start:null,spread:D._spread,children:[]}}function J0(D){return{type:"listItem",spread:D._spread,checked:null,children:[]}}function X0(){return{type:"paragraph",children:[]}}function eS(){return{type:"strong",children:[]}}function tS(){return{type:"text",value:""}}function nS(){return{type:"thematicBreak"}}}function pn(t){return{line:t.line,column:t.column,offset:t.offset}}function rm(t,e){let n=-1;for(;++n<e.length;){let r=e[n];Array.isArray(r)?rm(t,r):Ok(t,r)}}function Ok(t,e){let n;for(n in e)if(nm.call(e,n))switch(n){case"canContainEols":{let r=e[n];r&&t[n].push(...r);break}case"transforms":{let r=e[n];r&&t[n].push(...r);break}case"enter":case"exit":{let r=e[n];r&&Object.assign(t[n],r);break}}}function tm(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+fn({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+fn({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+fn({start:e.start,end:e.end})+") is still open")}function Os(t){let e=this;e.parser=n;function n(r){return Fu(r,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}var im={}.hasOwnProperty;function om(t,e){let n=e||{};function r(i,...o){let s=r.invalid,a=r.handlers;if(i&&im.call(i,t)){let u=String(i[t]);s=im.call(a,u)?a[u]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Pk={}.hasOwnProperty;function qu(t,e){let n=-1,r;if(e.extensions)for(;++n<e.extensions.length;)qu(t,e.extensions[n]);for(r in e)if(Pk.call(e,r))switch(r){case"extensions":break;case"unsafe":{sm(t[r],e[r]);break}case"join":{sm(t[r],e[r]);break}case"handlers":{Lk(t[r],e[r]);break}default:t.options[r]=e[r]}return t}function sm(t,e){e&&t.push(...e)}function Lk(t,e){e&&Object.assign(t,e)}function am(t,e,n,r){let i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);let s=n.indentLines(n.containerFlow(t,o.current()),Nk);return i(),s}function Nk(t,e,n){return">"+(n?"":" ")+t}function Ps(t,e){return lm(t,e.inConstruct,!0)&&!lm(t,e.notInConstruct,!1)}function lm(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let r=-1;for(;++r<e.length;)if(t.includes(e[r]))return!0;return!1}function ju(t,e,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
54
- `&&Ps(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
55
- `}function um(t,e){let n=String(t),r=n.indexOf(e),i=r,o=0,s=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+e.length,r=n.indexOf(e,i);return s}function Qi(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function cm(t){let e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function fm(t,e,n,r){let i=cm(n),o=t.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Qi(t,n)){let f=n.enter("codeIndented"),p=n.indentLines(o,Mk);return f(),p}let a=n.createTracker(r),u=i.repeat(Math.max(um(o,i)+1,3)),l=n.enter("codeFenced"),c=a.move(u);if(t.lang){let f=n.enter(`codeFencedLang${s}`);c+=a.move(n.safe(t.lang,{before:c,after:" ",encode:["`"],...a.current()})),f()}if(t.lang&&t.meta){let f=n.enter(`codeFencedMeta${s}`);c+=a.move(" "),c+=a.move(n.safe(t.meta,{before:c,after:`
53
+ `;break}case-2:{s=e?" ":" ";break}case-1:{if(!e&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function Pu(t){let r={constructs:Lh([Ou,...(t||{}).extensions||[]]),content:i(Bh),defined:[],document:i(zh),flow:i(Vh),lazy:{},string:i(Kh),text:i(Yh)};return r;function i(o){return s;function s(a){return Jh(r,o,a)}}}function Lu(t){for(;!ks(t););return t}var Xh=/[\0\t\n\r]/g;function Nu(){let t=1,e="",n=!0,r;return i;function i(o,s,a){let u=[],l,c,f,p,d;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),f=0,e="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if(Xh.lastIndex=f,l=Xh.exec(o),p=l&&l.index!==void 0?l.index:o.length,d=o.charCodeAt(p),!l){e=o.slice(f);break}if(d===10&&f===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<p&&(u.push(o.slice(f,p)),t+=p-f),d){case 0:{u.push(65533),t++;break}case 9:{for(c=Math.ceil(t/4)*4,u.push(-2);t++<c;)u.push(-1);break}case 10:{u.push(-4),t=1;break}default:r=!0,t=1}f=p+1}return a&&(r&&u.push(-5),e&&u.push(e),u.push(null)),u}}var Pk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Cs(t){return t.replace(Pk,Lk)}function Lk(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){let i=n.charCodeAt(1),o=i===120||i===88;return xs(n.slice(o?2:1),o?16:10)}return Pr(n)||t}function fn(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?em(t.position):"start"in t||"end"in t?em(t):"line"in t||"column"in t?Mu(t):""}function Mu(t){return tm(t&&t.line)+":"+tm(t&&t.column)}function em(t){return Mu(t&&t.start)+"-"+Mu(t&&t.end)}function tm(t){return t&&typeof t=="number"?t:1}var rm={}.hasOwnProperty;function Fu(t,e,n){return e&&typeof e=="object"&&(n=e,e=void 0),Nk(n)(Lu(Pu(n).document().write(Nu()(t,e,!0))))}function Nk(t){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(vd),autolinkProtocol:k,autolinkEmail:k,atxHeading:o(xd),blockQuote:o(jt),characterEscape:k,characterReference:k,codeFenced:o(Mn),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(Mn,s),codeText:o(Tr,s),codeTextData:k,data:k,codeFlowValue:k,definition:o(Gl),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(eS),hardBreakEscape:o(_d),hardBreakTrailing:o(_d),htmlFlow:o(wd,s),htmlFlowData:k,htmlText:o(wd,s),htmlTextData:k,image:o(tS),label:s,link:o(vd),listItem:o(nS),listItemValue:p,listOrdered:o(Sd,f),listUnordered:o(Sd),paragraph:o(rS),reference:_,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(xd),strong:o(iS),thematicBreak:o(sS)},exit:{atxHeading:u(),atxHeadingSequence:T,autolink:u(),autolinkEmail:Ci,autolinkProtocol:Ee,blockQuote:u(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:Nn,characterReferenceMarkerNumeric:Nn,characterReferenceValue:Vl,characterReference:Jo,codeFenced:u(S),codeFencedFence:g,codeFencedFenceInfo:d,codeFencedFenceMeta:b,codeFlowValue:I,codeIndented:u(y),codeText:u(z),codeTextData:I,data:I,definition:u(),definitionDestinationString:w,definitionLabelString:h,definitionTitleString:m,emphasis:u(),hardBreakEscape:u(M),hardBreakTrailing:u(M),htmlFlow:u(P),htmlFlowData:I,htmlText:u($),htmlTextData:I,image:u(xe),label:vt,labelText:ft,lineEnding:N,link:u(de),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:He,resourceDestinationString:x,resourceTitleString:et,resource:qt,setextHeading:u(L),setextHeadingLineSequence:E,setextHeadingText:v,strong:u(),thematicBreak:u()}};im(e,(t||{}).mdastExtensions||[]);let n={};return r;function r(D){let A={type:"root",children:[]},j={stack:[A],tokenStack:[],config:e,enter:a,exit:l,buffer:s,resume:c,data:n},G=[],te=-1;for(;++te<D.length;)if(D[te][1].type==="listOrdered"||D[te][1].type==="listUnordered")if(D[te][0]==="enter")G.push(te);else{let pt=G.pop();te=i(D,pt,te)}for(te=-1;++te<D.length;){let pt=e[D[te][0]];rm.call(pt,D[te][1].type)&&pt[D[te][1].type].call(Object.assign({sliceSerialize:D[te][2].sliceSerialize},j),D[te][1])}if(j.tokenStack.length>0){let pt=j.tokenStack[j.tokenStack.length-1];(pt[1]||nm).call(j,void 0,pt[0])}for(A.position={start:pn(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:pn(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},te=-1;++te<e.transforms.length;)A=e.transforms[te](A)||A;return A}function i(D,A,j){let G=A-1,te=-1,pt=!1,Fn,Bt,Ii,Oi;for(;++G<=j;){let Ve=D[G];switch(Ve[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ve[0]==="enter"?te++:te--,Oi=void 0;break}case"lineEndingBlank":{Ve[0]==="enter"&&(Fn&&!Oi&&!te&&!Ii&&(Ii=G),Oi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Oi=void 0}if(!te&&Ve[0]==="enter"&&Ve[1].type==="listItemPrefix"||te===-1&&Ve[0]==="exit"&&(Ve[1].type==="listUnordered"||Ve[1].type==="listOrdered")){if(Fn){let Rr=G;for(Bt=void 0;Rr--;){let Wt=D[Rr];if(Wt[1].type==="lineEnding"||Wt[1].type==="lineEndingBlank"){if(Wt[0]==="exit")continue;Bt&&(D[Bt][1].type="lineEndingBlank",pt=!0),Wt[1].type="lineEnding",Bt=Rr}else if(!(Wt[1].type==="linePrefix"||Wt[1].type==="blockQuotePrefix"||Wt[1].type==="blockQuotePrefixWhitespace"||Wt[1].type==="blockQuoteMarker"||Wt[1].type==="listItemIndent"))break}Ii&&(!Bt||Ii<Bt)&&(Fn._spread=!0),Fn.end=Object.assign({},Bt?D[Bt][1].start:Ve[1].end),D.splice(Bt||G,0,["exit",Fn,Ve[2]]),G++,j++}if(Ve[1].type==="listItemPrefix"){let Rr={type:"listItem",_spread:!1,start:Object.assign({},Ve[1].start),end:void 0};Fn=Rr,D.splice(G,0,["enter",Rr,Ve[2]]),G++,j++,Ii=void 0,Oi=!0}}}return D[A][1]._spread=pt,j}function o(D,A){return j;function j(G){a.call(this,D(G),G),A&&A.call(this,G)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(D,A,j){this.stack[this.stack.length-1].children.push(D),this.stack.push(D),this.tokenStack.push([A,j||void 0]),D.position={start:pn(A.start),end:void 0}}function u(D){return A;function A(j){D&&D.call(this,j),l.call(this,j)}}function l(D,A){let j=this.stack.pop(),G=this.tokenStack.pop();if(G)G[0].type!==D.type&&(A?A.call(this,D,G[0]):(G[1]||nm).call(this,D,G[0]));else throw new Error("Cannot close `"+D.type+"` ("+fn({start:D.start,end:D.end})+"): it\u2019s not open");j.position.end=pn(D.end)}function c(){return Yn(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(D){if(this.data.expectingFirstListItemValue){let A=this.stack[this.stack.length-2];A.start=Number.parseInt(this.sliceSerialize(D),10),this.data.expectingFirstListItemValue=void 0}}function d(){let D=this.resume(),A=this.stack[this.stack.length-1];A.lang=D}function b(){let D=this.resume(),A=this.stack[this.stack.length-1];A.meta=D}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){let D=this.resume(),A=this.stack[this.stack.length-1];A.value=D.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){let D=this.resume(),A=this.stack[this.stack.length-1];A.value=D.replace(/(\r?\n|\r)$/g,"")}function h(D){let A=this.resume(),j=this.stack[this.stack.length-1];j.label=A,j.identifier=Ht(this.sliceSerialize(D)).toLowerCase()}function m(){let D=this.resume(),A=this.stack[this.stack.length-1];A.title=D}function w(){let D=this.resume(),A=this.stack[this.stack.length-1];A.url=D}function T(D){let A=this.stack[this.stack.length-1];if(!A.depth){let j=this.sliceSerialize(D).length;A.depth=j}}function v(){this.data.setextHeadingSlurpLineEnding=!0}function E(D){let A=this.stack[this.stack.length-1];A.depth=this.sliceSerialize(D).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function k(D){let j=this.stack[this.stack.length-1].children,G=j[j.length-1];(!G||G.type!=="text")&&(G=oS(),G.position={start:pn(D.start),end:void 0},j.push(G)),this.stack.push(G)}function I(D){let A=this.stack.pop();A.value+=this.sliceSerialize(D),A.position.end=pn(D.end)}function N(D){let A=this.stack[this.stack.length-1];if(this.data.atHardBreak){let j=A.children[A.children.length-1];j.position.end=pn(D.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(A.type)&&(k.call(this,D),I.call(this,D))}function M(){this.data.atHardBreak=!0}function P(){let D=this.resume(),A=this.stack[this.stack.length-1];A.value=D}function $(){let D=this.resume(),A=this.stack[this.stack.length-1];A.value=D}function z(){let D=this.resume(),A=this.stack[this.stack.length-1];A.value=D}function de(){let D=this.stack[this.stack.length-1];if(this.data.inReference){let A=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=A,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function xe(){let D=this.stack[this.stack.length-1];if(this.data.inReference){let A=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=A,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function ft(D){let A=this.sliceSerialize(D),j=this.stack[this.stack.length-2];j.label=Cs(A),j.identifier=Ht(A).toLowerCase()}function vt(){let D=this.stack[this.stack.length-1],A=this.resume(),j=this.stack[this.stack.length-1];if(this.data.inReference=!0,j.type==="link"){let G=D.children;j.children=G}else j.alt=A}function x(){let D=this.resume(),A=this.stack[this.stack.length-1];A.url=D}function et(){let D=this.resume(),A=this.stack[this.stack.length-1];A.title=D}function qt(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function He(D){let A=this.resume(),j=this.stack[this.stack.length-1];j.label=A,j.identifier=Ht(this.sliceSerialize(D)).toLowerCase(),this.data.referenceType="full"}function Nn(D){this.data.characterReferenceType=D.type}function Vl(D){let A=this.sliceSerialize(D),j=this.data.characterReferenceType,G;j?(G=xs(A,j==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):G=Pr(A);let te=this.stack[this.stack.length-1];te.value+=G}function Jo(D){let A=this.stack.pop();A.position.end=pn(D.end)}function Ee(D){I.call(this,D);let A=this.stack[this.stack.length-1];A.url=this.sliceSerialize(D)}function Ci(D){I.call(this,D);let A=this.stack[this.stack.length-1];A.url="mailto:"+this.sliceSerialize(D)}function jt(){return{type:"blockquote",children:[]}}function Mn(){return{type:"code",lang:null,meta:null,value:""}}function Tr(){return{type:"inlineCode",value:""}}function Gl(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function eS(){return{type:"emphasis",children:[]}}function xd(){return{type:"heading",depth:0,children:[]}}function _d(){return{type:"break"}}function wd(){return{type:"html",value:""}}function tS(){return{type:"image",title:null,url:"",alt:null}}function vd(){return{type:"link",title:null,url:"",children:[]}}function Sd(D){return{type:"list",ordered:D.type==="listOrdered",start:null,spread:D._spread,children:[]}}function nS(D){return{type:"listItem",spread:D._spread,checked:null,children:[]}}function rS(){return{type:"paragraph",children:[]}}function iS(){return{type:"strong",children:[]}}function oS(){return{type:"text",value:""}}function sS(){return{type:"thematicBreak"}}}function pn(t){return{line:t.line,column:t.column,offset:t.offset}}function im(t,e){let n=-1;for(;++n<e.length;){let r=e[n];Array.isArray(r)?im(t,r):Mk(t,r)}}function Mk(t,e){let n;for(n in e)if(rm.call(e,n))switch(n){case"canContainEols":{let r=e[n];r&&t[n].push(...r);break}case"transforms":{let r=e[n];r&&t[n].push(...r);break}case"enter":case"exit":{let r=e[n];r&&Object.assign(t[n],r);break}}}function nm(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+fn({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+fn({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+fn({start:e.start,end:e.end})+") is still open")}function Is(t){let e=this;e.parser=n;function n(r){return Fu(r,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}var om={}.hasOwnProperty;function sm(t,e){let n=e||{};function r(i,...o){let s=r.invalid,a=r.handlers;if(i&&om.call(i,t)){let u=String(i[t]);s=om.call(a,u)?a[u]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Fk={}.hasOwnProperty;function qu(t,e){let n=-1,r;if(e.extensions)for(;++n<e.extensions.length;)qu(t,e.extensions[n]);for(r in e)if(Fk.call(e,r))switch(r){case"extensions":break;case"unsafe":{am(t[r],e[r]);break}case"join":{am(t[r],e[r]);break}case"handlers":{qk(t[r],e[r]);break}default:t.options[r]=e[r]}return t}function am(t,e){e&&t.push(...e)}function qk(t,e){e&&Object.assign(t,e)}function lm(t,e,n,r){let i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);let s=n.indentLines(n.containerFlow(t,o.current()),jk);return i(),s}function jk(t,e,n){return">"+(n?"":" ")+t}function Os(t,e){return um(t,e.inConstruct,!0)&&!um(t,e.notInConstruct,!1)}function um(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let r=-1;for(;++r<e.length;)if(t.includes(e[r]))return!0;return!1}function ju(t,e,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
54
+ `&&Os(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
55
+ `}function cm(t,e){let n=String(t),r=n.indexOf(e),i=r,o=0,s=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+e.length,r=n.indexOf(e,i);return s}function Qi(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function fm(t){let e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function pm(t,e,n,r){let i=fm(n),o=t.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Qi(t,n)){let f=n.enter("codeIndented"),p=n.indentLines(o,Bk);return f(),p}let a=n.createTracker(r),u=i.repeat(Math.max(cm(o,i)+1,3)),l=n.enter("codeFenced"),c=a.move(u);if(t.lang){let f=n.enter(`codeFencedLang${s}`);c+=a.move(n.safe(t.lang,{before:c,after:" ",encode:["`"],...a.current()})),f()}if(t.lang&&t.meta){let f=n.enter(`codeFencedMeta${s}`);c+=a.move(" "),c+=a.move(n.safe(t.meta,{before:c,after:`
56
56
  `,encode:["`"],...a.current()})),f()}return c+=a.move(`
57
57
  `),o&&(c+=a.move(o+`
58
- `)),c+=a.move(u),l(),c}function Mk(t,e,n){return(n?"":" ")+t}function Mr(t){let e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function pm(t,e,n,r){let i=Mr(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition"),a=n.enter("label"),u=n.createTracker(r),l=u.move("[");return l+=u.move(n.safe(n.associationId(t),{before:l,after:"]",...u.current()})),l+=u.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(t.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(a=n.enter("destinationRaw"),l+=u.move(n.safe(t.url,{before:l,after:t.title?" ":`
59
- `,...u.current()}))),a(),t.title&&(a=n.enter(`title${o}`),l+=u.move(" "+i),l+=u.move(n.safe(t.title,{before:l,after:i,...u.current()})),l+=u.move(i),a()),s(),l}function dm(t){let e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function Qe(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Fr(t,e,n){let r=Lr(t),i=Lr(e);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Bu.peek=Fk;function Bu(t,e,n,r){let i=dm(n),o=n.enter("emphasis"),s=n.createTracker(r),a=s.move(i),u=s.move(n.containerPhrasing(t,{after:i,before:a,...s.current()})),l=u.charCodeAt(0),c=Fr(r.before.charCodeAt(r.before.length-1),l,i);c.inside&&(u=Qe(l)+u.slice(1));let f=u.charCodeAt(u.length-1),p=Fr(r.after.charCodeAt(0),f,i);p.inside&&(u=u.slice(0,-1)+Qe(f));let d=s.move(i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},a+u+d}function Fk(t,e,n){return n.options.emphasis||"*"}function Ls(t,e){let n=!1;return nt(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Yn}),!!((!t.depth||t.depth<3)&&Qn(t)&&(e.options.setext||n))}function hm(t,e,n,r){let i=Math.max(Math.min(6,t.depth||1),1),o=n.createTracker(r);if(Ls(t,n)){let c=n.enter("headingSetext"),f=n.enter("phrasing"),p=n.containerPhrasing(t,{...o.current(),before:`
58
+ `)),c+=a.move(u),l(),c}function Bk(t,e,n){return(n?"":" ")+t}function Mr(t){let e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function dm(t,e,n,r){let i=Mr(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition"),a=n.enter("label"),u=n.createTracker(r),l=u.move("[");return l+=u.move(n.safe(n.associationId(t),{before:l,after:"]",...u.current()})),l+=u.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(t.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(a=n.enter("destinationRaw"),l+=u.move(n.safe(t.url,{before:l,after:t.title?" ":`
59
+ `,...u.current()}))),a(),t.title&&(a=n.enter(`title${o}`),l+=u.move(" "+i),l+=u.move(n.safe(t.title,{before:l,after:i,...u.current()})),l+=u.move(i),a()),s(),l}function hm(t){let e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function Qe(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Fr(t,e,n){let r=Lr(t),i=Lr(e);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Bu.peek=Wk;function Bu(t,e,n,r){let i=hm(n),o=n.enter("emphasis"),s=n.createTracker(r),a=s.move(i),u=s.move(n.containerPhrasing(t,{after:i,before:a,...s.current()})),l=u.charCodeAt(0),c=Fr(r.before.charCodeAt(r.before.length-1),l,i);c.inside&&(u=Qe(l)+u.slice(1));let f=u.charCodeAt(u.length-1),p=Fr(r.after.charCodeAt(0),f,i);p.inside&&(u=u.slice(0,-1)+Qe(f));let d=s.move(i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},a+u+d}function Wk(t,e,n){return n.options.emphasis||"*"}function Ps(t,e){let n=!1;return nt(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Kn}),!!((!t.depth||t.depth<3)&&Yn(t)&&(e.options.setext||n))}function mm(t,e,n,r){let i=Math.max(Math.min(6,t.depth||1),1),o=n.createTracker(r);if(Ps(t,n)){let c=n.enter("headingSetext"),f=n.enter("phrasing"),p=n.containerPhrasing(t,{...o.current(),before:`
60
60
  `,after:`
61
61
  `});return f(),c(),p+`
62
62
  `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
63
63
  `))+1))}let s="#".repeat(i),a=n.enter("headingAtx"),u=n.enter("phrasing");o.move(s+" ");let l=n.containerPhrasing(t,{before:"# ",after:`
64
- `,...o.current()});return/^[\t ]/.test(l)&&(l=Qe(l.charCodeAt(0))+l.slice(1)),l=l?s+" "+l:s,n.options.closeAtx&&(l+=" "+s),u(),a(),l}Wu.peek=qk;function Wu(t){return t.value||""}function qk(){return"<"}zu.peek=jk;function zu(t,e,n,r){let i=Mr(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image"),a=n.enter("label"),u=n.createTracker(r),l=u.move("![");return l+=u.move(n.safe(t.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(t.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(a=n.enter("destinationRaw"),l+=u.move(n.safe(t.url,{before:l,after:t.title?" ":")",...u.current()}))),a(),t.title&&(a=n.enter(`title${o}`),l+=u.move(" "+i),l+=u.move(n.safe(t.title,{before:l,after:i,...u.current()})),l+=u.move(i),a()),l+=u.move(")"),s(),l}function jk(){return"!"}Uu.peek=Bk;function Uu(t,e,n,r){let i=t.referenceType,o=n.enter("imageReference"),s=n.enter("label"),a=n.createTracker(r),u=a.move("!["),l=n.safe(t.alt,{before:u,after:"]",...a.current()});u+=a.move(l+"]["),s();let c=n.stack;n.stack=[],s=n.enter("reference");let f=n.safe(n.associationId(t),{before:u,after:"]",...a.current()});return s(),n.stack=c,o(),i==="full"||!l||l!==f?u+=a.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function Bk(){return"!"}$u.peek=Wk;function $u(t,e,n){let r=t.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){let s=n.unsafe[o],a=n.compilePattern(s),u;if(s.atBreak)for(;u=a.exec(r);){let l=u.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(u.index+1)}}return i+r+i}function Wk(){return"`"}function Hu(t,e){let n=Qn(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}Vu.peek=zk;function Vu(t,e,n,r){let i=Mr(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r),a,u;if(Hu(t,n)){let c=n.stack;n.stack=[],a=n.enter("autolink");let f=s.move("<");return f+=s.move(n.containerPhrasing(t,{before:f,after:">",...s.current()})),f+=s.move(">"),a(),n.stack=c,f}a=n.enter("link"),u=n.enter("label");let l=s.move("[");return l+=s.move(n.containerPhrasing(t,{before:l,after:"](",...s.current()})),l+=s.move("]("),u(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(u=n.enter("destinationLiteral"),l+=s.move("<"),l+=s.move(n.safe(t.url,{before:l,after:">",...s.current()})),l+=s.move(">")):(u=n.enter("destinationRaw"),l+=s.move(n.safe(t.url,{before:l,after:t.title?" ":")",...s.current()}))),u(),t.title&&(u=n.enter(`title${o}`),l+=s.move(" "+i),l+=s.move(n.safe(t.title,{before:l,after:i,...s.current()})),l+=s.move(i),u()),l+=s.move(")"),a(),l}function zk(t,e,n){return Hu(t,n)?"<":"["}Gu.peek=Uk;function Gu(t,e,n,r){let i=t.referenceType,o=n.enter("linkReference"),s=n.enter("label"),a=n.createTracker(r),u=a.move("["),l=n.containerPhrasing(t,{before:u,after:"]",...a.current()});u+=a.move(l+"]["),s();let c=n.stack;n.stack=[],s=n.enter("reference");let f=n.safe(n.associationId(t),{before:u,after:"]",...a.current()});return s(),n.stack=c,o(),i==="full"||!l||l!==f?u+=a.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function Uk(){return"["}function qr(t){let e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function mm(t){let e=qr(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function gm(t){let e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function Ns(t){let e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function ym(t,e,n,r){let i=n.enter("list"),o=n.bulletCurrent,s=t.ordered?gm(n):qr(n),a=t.ordered?s==="."?")":".":mm(n),u=e&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!t.ordered){let c=t.children?t.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),Ns(n)===s&&c){let f=-1;for(;++f<t.children.length;){let p=t.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=a),n.bulletCurrent=s;let l=n.containerFlow(t,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),l}function bm(t){let e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function xm(t,e,n,r){let i=bm(n),o=n.bulletCurrent||qr(n);e&&e.type==="list"&&e.ordered&&(o=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(s=Math.ceil(s/4)*4);let a=n.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);let u=n.enter("listItem"),l=n.indentLines(n.containerFlow(t,a.current()),c);return u(),l;function c(f,p,d){return p?(d?"":" ".repeat(s))+f:(d?o:o+" ".repeat(s-o.length))+f}}function _m(t,e,n,r){let i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(t,r);return o(),i(),s}var Ku=Or(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function wm(t,e,n,r){return(t.children.some(function(s){return Ku(s)})?n.containerPhrasing:n.containerFlow).call(n,t,r)}function vm(t){let e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}Yu.peek=$k;function Yu(t,e,n,r){let i=vm(n),o=n.enter("strong"),s=n.createTracker(r),a=s.move(i+i),u=s.move(n.containerPhrasing(t,{after:i,before:a,...s.current()})),l=u.charCodeAt(0),c=Fr(r.before.charCodeAt(r.before.length-1),l,i);c.inside&&(u=Qe(l)+u.slice(1));let f=u.charCodeAt(u.length-1),p=Fr(r.after.charCodeAt(0),f,i);p.inside&&(u=u.slice(0,-1)+Qe(f));let d=s.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},a+u+d}function $k(t,e,n){return n.options.strong||"*"}function Sm(t,e,n,r){return n.safe(t.value,r)}function Em(t){let e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function km(t,e,n){let r=(Ns(n)+(n.options.ruleSpaces?" ":"")).repeat(Em(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Dm={blockquote:am,break:ju,code:fm,definition:pm,emphasis:Bu,hardBreak:ju,heading:hm,html:Wu,image:zu,imageReference:Uu,inlineCode:$u,link:Vu,linkReference:Gu,list:ym,listItem:xm,paragraph:_m,root:wm,strong:Yu,text:Sm,thematicBreak:km};var Tm=[Hk];function Hk(t,e,n,r){if(e.type==="code"&&Qi(e,r)&&(t.type==="list"||t.type===e.type&&Qi(t,r)))return!1;if("spread"in n&&typeof n.spread=="boolean")return t.type==="paragraph"&&(t.type===e.type||e.type==="definition"||e.type==="heading"&&Ls(e,r))?void 0:n.spread?1:0}var er=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],Rm=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
65
- `,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:er},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
66
- ]|$)`},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:er},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
67
- *])`},{character:"*",inConstruct:"phrasing",notInConstruct:er},{atBreak:!0,character:"+",after:`(?:[ \r
64
+ `,...o.current()});return/^[\t ]/.test(l)&&(l=Qe(l.charCodeAt(0))+l.slice(1)),l=l?s+" "+l:s,n.options.closeAtx&&(l+=" "+s),u(),a(),l}Wu.peek=zk;function Wu(t){return t.value||""}function zk(){return"<"}zu.peek=Uk;function zu(t,e,n,r){let i=Mr(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image"),a=n.enter("label"),u=n.createTracker(r),l=u.move("![");return l+=u.move(n.safe(t.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(t.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(a=n.enter("destinationRaw"),l+=u.move(n.safe(t.url,{before:l,after:t.title?" ":")",...u.current()}))),a(),t.title&&(a=n.enter(`title${o}`),l+=u.move(" "+i),l+=u.move(n.safe(t.title,{before:l,after:i,...u.current()})),l+=u.move(i),a()),l+=u.move(")"),s(),l}function Uk(){return"!"}Uu.peek=$k;function Uu(t,e,n,r){let i=t.referenceType,o=n.enter("imageReference"),s=n.enter("label"),a=n.createTracker(r),u=a.move("!["),l=n.safe(t.alt,{before:u,after:"]",...a.current()});u+=a.move(l+"]["),s();let c=n.stack;n.stack=[],s=n.enter("reference");let f=n.safe(n.associationId(t),{before:u,after:"]",...a.current()});return s(),n.stack=c,o(),i==="full"||!l||l!==f?u+=a.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function $k(){return"!"}$u.peek=Hk;function $u(t,e,n){let r=t.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){let s=n.unsafe[o],a=n.compilePattern(s),u;if(s.atBreak)for(;u=a.exec(r);){let l=u.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(u.index+1)}}return i+r+i}function Hk(){return"`"}function Hu(t,e){let n=Yn(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}Vu.peek=Vk;function Vu(t,e,n,r){let i=Mr(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r),a,u;if(Hu(t,n)){let c=n.stack;n.stack=[],a=n.enter("autolink");let f=s.move("<");return f+=s.move(n.containerPhrasing(t,{before:f,after:">",...s.current()})),f+=s.move(">"),a(),n.stack=c,f}a=n.enter("link"),u=n.enter("label");let l=s.move("[");return l+=s.move(n.containerPhrasing(t,{before:l,after:"](",...s.current()})),l+=s.move("]("),u(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(u=n.enter("destinationLiteral"),l+=s.move("<"),l+=s.move(n.safe(t.url,{before:l,after:">",...s.current()})),l+=s.move(">")):(u=n.enter("destinationRaw"),l+=s.move(n.safe(t.url,{before:l,after:t.title?" ":")",...s.current()}))),u(),t.title&&(u=n.enter(`title${o}`),l+=s.move(" "+i),l+=s.move(n.safe(t.title,{before:l,after:i,...s.current()})),l+=s.move(i),u()),l+=s.move(")"),a(),l}function Vk(t,e,n){return Hu(t,n)?"<":"["}Gu.peek=Gk;function Gu(t,e,n,r){let i=t.referenceType,o=n.enter("linkReference"),s=n.enter("label"),a=n.createTracker(r),u=a.move("["),l=n.containerPhrasing(t,{before:u,after:"]",...a.current()});u+=a.move(l+"]["),s();let c=n.stack;n.stack=[],s=n.enter("reference");let f=n.safe(n.associationId(t),{before:u,after:"]",...a.current()});return s(),n.stack=c,o(),i==="full"||!l||l!==f?u+=a.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function Gk(){return"["}function qr(t){let e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function gm(t){let e=qr(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function ym(t){let e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function Ls(t){let e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function bm(t,e,n,r){let i=n.enter("list"),o=n.bulletCurrent,s=t.ordered?ym(n):qr(n),a=t.ordered?s==="."?")":".":gm(n),u=e&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!t.ordered){let c=t.children?t.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),Ls(n)===s&&c){let f=-1;for(;++f<t.children.length;){let p=t.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=a),n.bulletCurrent=s;let l=n.containerFlow(t,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),l}function xm(t){let e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function _m(t,e,n,r){let i=xm(n),o=n.bulletCurrent||qr(n);e&&e.type==="list"&&e.ordered&&(o=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(s=Math.ceil(s/4)*4);let a=n.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);let u=n.enter("listItem"),l=n.indentLines(n.containerFlow(t,a.current()),c);return u(),l;function c(f,p,d){return p?(d?"":" ".repeat(s))+f:(d?o:o+" ".repeat(s-o.length))+f}}function wm(t,e,n,r){let i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(t,r);return o(),i(),s}var Ku=Or(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function vm(t,e,n,r){return(t.children.some(function(s){return Ku(s)})?n.containerPhrasing:n.containerFlow).call(n,t,r)}function Sm(t){let e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}Yu.peek=Kk;function Yu(t,e,n,r){let i=Sm(n),o=n.enter("strong"),s=n.createTracker(r),a=s.move(i+i),u=s.move(n.containerPhrasing(t,{after:i,before:a,...s.current()})),l=u.charCodeAt(0),c=Fr(r.before.charCodeAt(r.before.length-1),l,i);c.inside&&(u=Qe(l)+u.slice(1));let f=u.charCodeAt(u.length-1),p=Fr(r.after.charCodeAt(0),f,i);p.inside&&(u=u.slice(0,-1)+Qe(f));let d=s.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},a+u+d}function Kk(t,e,n){return n.options.strong||"*"}function Em(t,e,n,r){return n.safe(t.value,r)}function km(t){let e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function Dm(t,e,n){let r=(Ls(n)+(n.options.ruleSpaces?" ":"")).repeat(km(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Tm={blockquote:lm,break:ju,code:pm,definition:dm,emphasis:Bu,hardBreak:ju,heading:mm,html:Wu,image:zu,imageReference:Uu,inlineCode:$u,link:Vu,linkReference:Gu,list:bm,listItem:_m,paragraph:wm,root:vm,strong:Yu,text:Em,thematicBreak:Dm};var Rm=[Yk];function Yk(t,e,n,r){if(e.type==="code"&&Qi(e,r)&&(t.type==="list"||t.type===e.type&&Qi(t,r)))return!1;if("spread"in n&&typeof n.spread=="boolean")return t.type==="paragraph"&&(t.type===e.type||e.type==="definition"||e.type==="heading"&&Ps(e,r))?void 0:n.spread?1:0}var Xn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],Am=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
65
+ `,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:Xn},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
66
+ ]|$)`},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:Xn},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
67
+ *])`},{character:"*",inConstruct:"phrasing",notInConstruct:Xn},{atBreak:!0,character:"+",after:`(?:[ \r
68
68
  ])`},{atBreak:!0,character:"-",after:`(?:[ \r
69
69
  -])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
70
- ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:er},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:er},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:er},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:er},{atBreak:!0,character:"~"}];function Am(t){return t.label||!t.identifier?t.label||"":Is(t.identifier)}function Cm(t){if(!t._compiled){let e=(t.atBreak?"[\\r\\n][\\t ]*":"")+(t.before?"(?:"+t.before+")":"");t._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(t.character)?"\\":"")+t.character+(t.after?"(?:"+t.after+")":""),"g")}return t._compiled}function Im(t,e,n){let r=e.indexStack,i=t.children||[],o=[],s=-1,a=n.before,u;r.push(-1);let l=e.createTracker(n);for(;++s<i.length;){let c=i[s],f;if(r[r.length-1]=s,s+1<i.length){let b=e.handle.handlers[i[s+1].type];b&&b.peek&&(b=b.peek),f=b?b(i[s+1],t,e,{before:"",after:"",...l.current()}).charAt(0):""}else f=n.after;o.length>0&&(a==="\r"||a===`
71
- `)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=e.createTracker(n),l.move(o.join("")));let p=e.handle(c,t,e,{...l.current(),after:f,before:a});u&&u===p.slice(0,1)&&(p=Qe(u.charCodeAt(0))+p.slice(1));let d=e.attentionEncodeSurroundingInfo;e.attentionEncodeSurroundingInfo=void 0,u=void 0,d&&(o.length>0&&d.before&&a===o[o.length-1].slice(-1)&&(o[o.length-1]=o[o.length-1].slice(0,-1)+Qe(a.charCodeAt(0))),d.after&&(u=f)),l.move(p),o.push(p),a=p.slice(-1)}return r.pop(),o.join("")}function Om(t,e,n){let r=e.indexStack,i=t.children||[],o=e.createTracker(n),s=[],a=-1;for(r.push(-1);++a<i.length;){let u=i[a];r[r.length-1]=a,s.push(o.move(e.handle(u,t,e,{before:`
70
+ ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:Xn},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:Xn},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:Xn},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:Xn},{atBreak:!0,character:"~"}];function Cm(t){return t.label||!t.identifier?t.label||"":Cs(t.identifier)}function Im(t){if(!t._compiled){let e=(t.atBreak?"[\\r\\n][\\t ]*":"")+(t.before?"(?:"+t.before+")":"");t._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(t.character)?"\\":"")+t.character+(t.after?"(?:"+t.after+")":""),"g")}return t._compiled}function Om(t,e,n){let r=e.indexStack,i=t.children||[],o=[],s=-1,a=n.before,u;r.push(-1);let l=e.createTracker(n);for(;++s<i.length;){let c=i[s],f;if(r[r.length-1]=s,s+1<i.length){let b=e.handle.handlers[i[s+1].type];b&&b.peek&&(b=b.peek),f=b?b(i[s+1],t,e,{before:"",after:"",...l.current()}).charAt(0):""}else f=n.after;o.length>0&&(a==="\r"||a===`
71
+ `)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=e.createTracker(n),l.move(o.join("")));let p=e.handle(c,t,e,{...l.current(),after:f,before:a});u&&u===p.slice(0,1)&&(p=Qe(u.charCodeAt(0))+p.slice(1));let d=e.attentionEncodeSurroundingInfo;e.attentionEncodeSurroundingInfo=void 0,u=void 0,d&&(o.length>0&&d.before&&a===o[o.length-1].slice(-1)&&(o[o.length-1]=o[o.length-1].slice(0,-1)+Qe(a.charCodeAt(0))),d.after&&(u=f)),l.move(p),o.push(p),a=p.slice(-1)}return r.pop(),o.join("")}function Pm(t,e,n){let r=e.indexStack,i=t.children||[],o=e.createTracker(n),s=[],a=-1;for(r.push(-1);++a<i.length;){let u=i[a];r[r.length-1]=a,s.push(o.move(e.handle(u,t,e,{before:`
72
72
  `,after:`
73
- `,...o.current()}))),u.type!=="list"&&(e.bulletLastUsed=void 0),a<i.length-1&&s.push(o.move(Vk(u,i[a+1],t,e)))}return r.pop(),s.join("")}function Vk(t,e,n,r){let i=r.join.length;for(;i--;){let o=r.join[i](t,e,n,r);if(o===!0||o===1)break;if(typeof o=="number")return`
73
+ `,...o.current()}))),u.type!=="list"&&(e.bulletLastUsed=void 0),a<i.length-1&&s.push(o.move(Qk(u,i[a+1],t,e)))}return r.pop(),s.join("")}function Qk(t,e,n,r){let i=r.join.length;for(;i--;){let o=r.join[i](t,e,n,r);if(o===!0||o===1)break;if(typeof o=="number")return`
74
74
  `.repeat(1+o);if(o===!1)return`
75
75
 
76
76
  <!---->
77
77
 
78
78
  `}return`
79
79
 
80
- `}var Gk=/\r?\n|\r/g;function Pm(t,e){let n=[],r=0,i=0,o;for(;o=Gk.exec(t);)s(t.slice(r,o.index)),n.push(o[0]),r=o.index+o[0].length,i++;return s(t.slice(r)),n.join("");function s(a){n.push(e(a,i,!a))}}function Nm(t,e,n){let r=(n.before||"")+(e||"")+(n.after||""),i=[],o=[],s={},a=-1;for(;++a<t.unsafe.length;){let c=t.unsafe[a];if(!Ps(t.stack,c))continue;let f=t.compilePattern(c),p;for(;p=f.exec(r);){let d="before"in c||!!c.atBreak,b="after"in c,g=p.index+(d?p[1].length:0);i.includes(g)?(s[g].before&&!d&&(s[g].before=!1),s[g].after&&!b&&(s[g].after=!1)):(i.push(g),s[g]={before:d,after:b})}}i.sort(Kk);let u=n.before?n.before.length:0,l=r.length-(n.after?n.after.length:0);for(a=-1;++a<i.length;){let c=i[a];c<u||c>=l||c+1<l&&i[a+1]===c+1&&s[c].after&&!s[c+1].before&&!s[c+1].after||i[a-1]===c-1&&s[c].before&&!s[c-1].before&&!s[c-1].after||(u!==c&&o.push(Lm(r.slice(u,c),"\\")),u=c,/[!-/:-@[-`{-~]/.test(r.charAt(c))&&(!n.encode||!n.encode.includes(r.charAt(c)))?o.push("\\"):(o.push(Qe(r.charCodeAt(c))),u++))}return o.push(Lm(r.slice(u,l),n.after)),o.join("")}function Kk(t,e){return t-e}function Lm(t,e){let n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],o=t+e,s=-1,a=0,u;for(;u=n.exec(o);)r.push(u.index);for(;++s<r.length;)a!==r[s]&&i.push(t.slice(a,r[s])),i.push("\\"),a=r[s];return i.push(t.slice(a)),i.join("")}function Mm(t){let e=t||{},n=e.now||{},r=e.lineShift||0,i=n.line||1,o=n.column||1;return{move:u,current:s,shift:a};function s(){return{now:{line:i,column:o},lineShift:r}}function a(l){r+=l}function u(l){let c=l||"",f=c.split(/\r?\n|\r/g),p=f[f.length-1];return i+=f.length-1,o=f.length===1?o+p.length:1+p.length+r,c}}function Qu(t,e){let n=e||{},r={associationId:Am,containerPhrasing:Jk,containerFlow:Xk,createTracker:Mm,compilePattern:Cm,enter:o,handlers:{...Dm},handle:void 0,indentLines:Pm,indexStack:[],join:[...Tm],options:{},safe:e1,stack:[],unsafe:[...Rm]};qu(r,n),r.options.tightDefinitions&&r.join.push(Zk),r.handle=om("type",{invalid:Yk,unknown:Qk,handlers:r.handlers});let i=r.handle(t,void 0,r,{before:`
80
+ `}var Zk=/\r?\n|\r/g;function Lm(t,e){let n=[],r=0,i=0,o;for(;o=Zk.exec(t);)s(t.slice(r,o.index)),n.push(o[0]),r=o.index+o[0].length,i++;return s(t.slice(r)),n.join("");function s(a){n.push(e(a,i,!a))}}function Mm(t,e,n){let r=(n.before||"")+(e||"")+(n.after||""),i=[],o=[],s={},a=-1;for(;++a<t.unsafe.length;){let c=t.unsafe[a];if(!Os(t.stack,c))continue;let f=t.compilePattern(c),p;for(;p=f.exec(r);){let d="before"in c||!!c.atBreak,b="after"in c,g=p.index+(d?p[1].length:0);i.includes(g)?(s[g].before&&!d&&(s[g].before=!1),s[g].after&&!b&&(s[g].after=!1)):(i.push(g),s[g]={before:d,after:b})}}i.sort(Jk);let u=n.before?n.before.length:0,l=r.length-(n.after?n.after.length:0);for(a=-1;++a<i.length;){let c=i[a];c<u||c>=l||c+1<l&&i[a+1]===c+1&&s[c].after&&!s[c+1].before&&!s[c+1].after||i[a-1]===c-1&&s[c].before&&!s[c-1].before&&!s[c-1].after||(u!==c&&o.push(Nm(r.slice(u,c),"\\")),u=c,/[!-/:-@[-`{-~]/.test(r.charAt(c))&&(!n.encode||!n.encode.includes(r.charAt(c)))?o.push("\\"):(o.push(Qe(r.charCodeAt(c))),u++))}return o.push(Nm(r.slice(u,l),n.after)),o.join("")}function Jk(t,e){return t-e}function Nm(t,e){let n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],o=t+e,s=-1,a=0,u;for(;u=n.exec(o);)r.push(u.index);for(;++s<r.length;)a!==r[s]&&i.push(t.slice(a,r[s])),i.push("\\"),a=r[s];return i.push(t.slice(a)),i.join("")}function Fm(t){let e=t||{},n=e.now||{},r=e.lineShift||0,i=n.line||1,o=n.column||1;return{move:u,current:s,shift:a};function s(){return{now:{line:i,column:o},lineShift:r}}function a(l){r+=l}function u(l){let c=l||"",f=c.split(/\r?\n|\r/g),p=f[f.length-1];return i+=f.length-1,o=f.length===1?o+p.length:1+p.length+r,c}}function Qu(t,e){let n=e||{},r={associationId:Cm,containerPhrasing:n1,containerFlow:r1,createTracker:Fm,compilePattern:Im,enter:o,handlers:{...Tm},handle:void 0,indentLines:Lm,indexStack:[],join:[...Rm],options:{},safe:i1,stack:[],unsafe:[...Am]};qu(r,n),r.options.tightDefinitions&&r.join.push(t1),r.handle=sm("type",{invalid:Xk,unknown:e1,handlers:r.handlers});let i=r.handle(t,void 0,r,{before:`
81
81
  `,after:`
82
82
  `,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
83
- `),i;function o(s){return r.stack.push(s),a;function a(){r.stack.pop()}}}function Yk(t){throw new Error("Cannot handle value `"+t+"`, expected node")}function Qk(t){let e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}function Zk(t,e){if(t.type==="definition"&&t.type===e.type)return 0}function Jk(t,e){return Im(t,this,e)}function Xk(t,e){return Om(t,this,e)}function e1(t,e){return Nm(this,t,e)}function Ms(t){let e=this;e.compiler=n;function n(r){return Qu(r,{...e.data("settings"),...t,extensions:e.data("toMarkdownExtensions")||[]})}}function Zu(t){if(t)throw t}var Bs=ae(Hm(),1);function Zi(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Ju(){let t=[],e={run:n,use:r};return e;function n(...i){let o=-1,s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(u,...l){let c=t[++o],f=-1;if(u){s(u);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,c?Vm(c,a)(...l):s(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function Vm(t,e){let n;return r;function r(...s){let a=t.length>s.length,u;a&&s.push(i);try{u=t.apply(this,s)}catch(l){let c=l;if(a&&n)throw c;return i(c)}a||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(s,...a){n||(n=!0,e(s,...a))}function o(s){i(null,s)}}var Se=class extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof e=="string"?i=e:!o.cause&&e&&(s=!0,i=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof r=="string"){let u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){let u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}let a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=fn(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Se.prototype.file="";Se.prototype.name="";Se.prototype.reason="";Se.prototype.message="";Se.prototype.stack="";Se.prototype.column=void 0;Se.prototype.line=void 0;Se.prototype.ancestors=void 0;Se.prototype.cause=void 0;Se.prototype.fatal=void 0;Se.prototype.place=void 0;Se.prototype.ruleId=void 0;Se.prototype.source=void 0;import{default as mt}from"node:path";import{default as Gm}from"node:process";import{fileURLToPath as Km}from"node:url";function qs(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}var Xu=["history","path","basename","stem","extname","dirname"],Ji=class{constructor(e){let n;e?qs(e)?n={path:e}:typeof e=="string"||t1(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":Gm.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Xu.length;){let o=Xu[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Xu.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?mt.basename(this.path):void 0}set basename(e){tc(e,"basename"),ec(e,"basename"),this.path=mt.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?mt.dirname(this.path):void 0}set dirname(e){Ym(this.basename,"dirname"),this.path=mt.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?mt.extname(this.path):void 0}set extname(e){if(ec(e,"extname"),Ym(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=mt.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){qs(e)&&(e=Km(e)),tc(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?mt.basename(this.path,this.extname):void 0}set stem(e){tc(e,"stem"),ec(e,"stem"),this.path=mt.join(this.dirname||"",e+(this.extname||""))}fail(e,n,r){let i=this.message(e,n,r);throw i.fatal=!0,i}info(e,n,r){let i=this.message(e,n,r);return i.fatal=void 0,i}message(e,n,r){let i=new Se(e,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function ec(t,e){if(t&&t.includes(mt.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+mt.sep+"`")}function tc(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function Ym(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function t1(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var Qm=(function(t){let r=this.constructor.prototype,i=r[t],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o});var n1={}.hasOwnProperty,oc=class t extends Qm{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Ju()}copy(){let e=new t,n=-1;for(;++n<this.attachers.length;){let r=this.attachers[n];e.use(...r)}return e.data((0,Bs.default)(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(ic("data",this.frozen),this.namespace[e]=n,this):n1.call(this.namespace,e)&&this.namespace[e]||void 0:e?(ic("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);let i=n.call(e,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let n=js(e),r=this.parser||this.Parser;return nc("parse",r),r(String(n),n)}process(e,n){let r=this;return this.freeze(),nc("process",this.parser||this.Parser),rc("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){let a=js(e),u=r.parse(a);r.run(u,a,function(c,f,p){if(c||!f||!p)return l(c);let d=f,b=r.stringify(d,p);i1(b)?p.value=b:p.result=b,l(c,p)});function l(c,f){c||!f?s(c):o?o(f):n(void 0,f)}}}processSync(e){let n=!1,r;return this.freeze(),nc("processSync",this.parser||this.Parser),rc("processSync",this.compiler||this.Compiler),this.process(e,i),Jm("processSync","process",n),r;function i(o,s){n=!0,Zu(o),r=s}}run(e,n,r){Zm(e),this.freeze();let i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,a){let u=js(n);i.run(e,u,l);function l(c,f,p){let d=f||e;c?a(c):s?s(d):r(void 0,d,p)}}}runSync(e,n){let r=!1,i;return this.run(e,n,o),Jm("runSync","run",r),i;function o(s,a){Zu(s),i=a,r=!0}}stringify(e,n){this.freeze();let r=js(n),i=this.compiler||this.Compiler;return rc("stringify",i),Zm(e),i(e,r)}use(e,...n){let r=this.attachers,i=this.namespace;if(ic("use",this.frozen),e!=null)if(typeof e=="function")u(e,n);else if(typeof e=="object")Array.isArray(e)?a(e):s(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function o(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){let[c,...f]=l;u(c,f)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(l.plugins),l.settings&&(i.settings=(0,Bs.default)(!0,i.settings,l.settings))}function a(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){let f=l[c];o(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,c){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===l){p=f;break}if(p===-1)r.push([l,...c]);else if(c.length>0){let[d,...b]=c,g=r[p][1];Zi(g)&&Zi(d)&&(d=(0,Bs.default)(!0,g,d)),r[p]=[l,d,...b]}}}},sc=new oc().freeze();function nc(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function rc(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function ic(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Zm(t){if(!Zi(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Jm(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function js(t){return r1(t)?t:new Ji(t)}function r1(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function i1(t){return typeof t=="string"||o1(t)}function o1(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var Ws=sc().use(Os).use(Ms).freeze();var s1=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,a1=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,l1=/[^-+\dA-Z]/g;function ac(t,e,n,r){if(arguments.length===1&&typeof t=="string"&&!/\d/.test(t)&&(e=t,t=void 0),t=t||t===0?t:new Date,t instanceof Date||(t=new Date(t)),isNaN(t))throw TypeError("Invalid date");e=String(zs[e]||e||zs.default);var i=e.slice(0,4);(i==="UTC:"||i==="GMT:")&&(e=e.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},s=function(){return t[o()+"Date"]()},a=function(){return t[o()+"Day"]()},u=function(){return t[o()+"Month"]()},l=function(){return t[o()+"FullYear"]()},c=function(){return t[o()+"Hours"]()},f=function(){return t[o()+"Minutes"]()},p=function(){return t[o()+"Seconds"]()},d=function(){return t[o()+"Milliseconds"]()},b=function(){return n?0:t.getTimezoneOffset()},g=function(){return u1(t)},S=function(){return c1(t)},y={d:function(){return s()},dd:function(){return Ze(s())},ddd:function(){return ze.dayNames[a()]},DDD:function(){return Xm({y:l(),m:u(),d:s(),_:o(),dayName:ze.dayNames[a()],short:!0})},dddd:function(){return ze.dayNames[a()+7]},DDDD:function(){return Xm({y:l(),m:u(),d:s(),_:o(),dayName:ze.dayNames[a()+7]})},m:function(){return u()+1},mm:function(){return Ze(u()+1)},mmm:function(){return ze.monthNames[u()]},mmmm:function(){return ze.monthNames[u()+12]},yy:function(){return String(l()).slice(2)},yyyy:function(){return Ze(l(),4)},h:function(){return c()%12||12},hh:function(){return Ze(c()%12||12)},H:function(){return c()},HH:function(){return Ze(c())},M:function(){return f()},MM:function(){return Ze(f())},s:function(){return p()},ss:function(){return Ze(p())},l:function(){return Ze(d(),3)},L:function(){return Ze(Math.floor(d()/10))},t:function(){return c()<12?ze.timeNames[0]:ze.timeNames[1]},tt:function(){return c()<12?ze.timeNames[2]:ze.timeNames[3]},T:function(){return c()<12?ze.timeNames[4]:ze.timeNames[5]},TT:function(){return c()<12?ze.timeNames[6]:ze.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":f1(t)},o:function(){return(b()>0?"-":"+")+Ze(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+Ze(Math.floor(Math.abs(b())/60),2)+":"+Ze(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][s()%10>3?0:(s()%100-s()%10!=10)*s()%10]},W:function(){return g()},WW:function(){return Ze(g())},N:function(){return S()}};return e.replace(s1,function(h){return h in y?y[h]():h.slice(1,h.length-1)})}var zs={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},ze={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Ze=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(e).padStart(n,"0")},Xm=function(e){var n=e.y,r=e.m,i=e.d,o=e._,s=e.dayName,a=e.short,u=a===void 0?!1:a,l=new Date,c=new Date;c.setDate(c[o+"Date"]()-1);var f=new Date;f.setDate(f[o+"Date"]()+1);var p=function(){return l[o+"Date"]()},d=function(){return l[o+"Month"]()},b=function(){return l[o+"FullYear"]()},g=function(){return c[o+"Date"]()},S=function(){return c[o+"Month"]()},y=function(){return c[o+"FullYear"]()},h=function(){return f[o+"Date"]()},m=function(){return f[o+"Month"]()},w=function(){return f[o+"FullYear"]()};return b()===n&&d()===r&&p()===i?u?"Tdy":"Today":y()===n&&S()===r&&g()===i?u?"Ysd":"Yesterday":w()===n&&m()===r&&h()===i?u?"Tmw":"Tomorrow":s},u1=function(e){var n=new Date(e.getFullYear(),e.getMonth(),e.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},c1=function(e){var n=e.getDay();return n===0&&(n=7),n},f1=function(e){return(String(e).match(a1)||[""]).pop().replace(l1,"").replace(/GMT\+0000/g,"UTC")};var Ue=ae(ro(),1);function le(t,e,n){return{start:{line:t,character:e},end:{line:t,character:e+n}}}function _e(t,e,n,r,i){return{type:t,value:e,range:le(n,r,e.length),selectionRange:le(n,r,e.length),...i}}function gn(t,e){return e.map(n=>{if("newText"in n)return n;let r=t.getText(n.getText);return{range:n.range,newText:r}})}function Wg(t,e){return t.line<e.line?-1:t.line>e.line?1:t.character<e.character?-1:t.character>e.character?1:0}function ga(t,e){return!(Wg(t.end,e.start)<0||Wg(e.end,t.start)<0)}function ya(t){let e={type:"root",children:[],range:{start:{line:0,character:0},end:{line:t.lineCount,character:0}},selectionRange:le(0,0,0)},n,r,i=[];function o(a){let u={type:"section",range:le(a,0,0),selectionRange:le(a,0,0),children:[]};return e.children.push(u),n=u,r=void 0,i=[],u}let s=[{pattern:/^$/,parse(a,u){return!0}},{pattern:/^-+$/,parse(a,u){let l=o(u),c=_e("separator",a[0],u,0);return l.children.push(c),!0}},{pattern:/^\s*Version\s*:\s*(.+)\s*$/d,parse(a,u){let l=_e("version",a[1],u,a.indices[1][0],{full_line:a[0]});return l.range.start.character=0,(!n||n.children.find(c=>c.type==="version"))&&o(u),n.children.push(l),!0}},{pattern:/^\s*Date\s*:\s*(.+)\s*$/d,parse(a,u){let l=_e("date",a[1],u,a.indices[1][0],{full_line:a[0]});return l.range.start.character=0,n||o(u),n.children.push(l),!0}},{pattern:/^\s*([^\s\-].*?)\s*:?\s*$/d,parse(a,u){if(i.length>0&&a.indices[1][0]>=4)return!1;n||o(u);let l=_e("category",a[1],u,a.indices[1][0],{full_line:a[0],children:[]});return l.range.start.character=0,n.children.push(l),r=l,i=[],!0}},{pattern:/^\s*(-)\s*(.*)$/d,parse(a,u){if(n&&!r){let l=_e("category","",u,0,{full_line:"",children:[],missing:!0});n.children.push(l),r=l,i=[]}if(r){let l=_e("entry",a[2],u,a.indices[2][0],{full_line:a[0],rank:a.indices[1][0],children:[]});l.range.start.character=0,l.selectionRange.end=l.selectionRange.start;let c=i.filter(f=>f.rank<l.rank);return i=c,c.length===0?r.children.push(l):c[c.length-1].children.push(l),c.push(l),!0}return!1}},{pattern:/^\s*(.*)$/d,parse(a,u){if(i.length>0){let l=_e("entryext",a[1],u,a.indices[1][0],{full_line:a[0],rank:a.indices[1][0]});return l.range.start.character=0,l.selectionRange.end=l.selectionRange.start,i[i.length-1].children.push(l),!0}return!1}},{pattern:/^.*$/,parse(a,u){let l=_e("error",a[0],u,0);return(r??n??e).children.push(l),!0}}];for(let a=0;a<t.lineCount;a++){let u={start:{line:a,character:0},end:{line:a,character:1/0}},l=t.getText(u).replace(/\r*\n?$/,"");for(let c of s){let f=c.pattern.exec(l);if(f&&c.parse(f,a))break}}return ln(e,["entry","entryext"],(a,u)=>{(a.type==="entry"||a.type==="entryext")&&(a.rank=u.length-3)}),ln(e,(a,u)=>{let l=a.range.end;for(let c of u){let f=c.range.end;(l.line>f.line||l.line===f.line&&l.character>f.character)&&(c.range.end=l)}}),e}var io=ae(ro(),1);var _D=[{message:"Missing separator",code:"separator.missing",setup(t){return{section:(e,n,r)=>{e.children[0].type!=="separator"&&t.report({diag:{range:e.selectionRange},fix:[{range:{start:e.selectionRange.start,end:e.selectionRange.start},newText:`---------------------------------------------------------------------------------------------------
83
+ `),i;function o(s){return r.stack.push(s),a;function a(){r.stack.pop()}}}function Xk(t){throw new Error("Cannot handle value `"+t+"`, expected node")}function e1(t){let e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}function t1(t,e){if(t.type==="definition"&&t.type===e.type)return 0}function n1(t,e){return Om(t,this,e)}function r1(t,e){return Pm(t,this,e)}function i1(t,e){return Mm(this,t,e)}function Ns(t){let e=this;e.compiler=n;function n(r){return Qu(r,{...e.data("settings"),...t,extensions:e.data("toMarkdownExtensions")||[]})}}function Zu(t){if(t)throw t}var js=ae(Vm(),1);function Zi(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Ju(){let t=[],e={run:n,use:r};return e;function n(...i){let o=-1,s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(u,...l){let c=t[++o],f=-1;if(u){s(u);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,c?Gm(c,a)(...l):s(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function Gm(t,e){let n;return r;function r(...s){let a=t.length>s.length,u;a&&s.push(i);try{u=t.apply(this,s)}catch(l){let c=l;if(a&&n)throw c;return i(c)}a||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(s,...a){n||(n=!0,e(s,...a))}function o(s){i(null,s)}}var Se=class extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof e=="string"?i=e:!o.cause&&e&&(s=!0,i=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof r=="string"){let u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){let u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}let a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=fn(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Se.prototype.file="";Se.prototype.name="";Se.prototype.reason="";Se.prototype.message="";Se.prototype.stack="";Se.prototype.column=void 0;Se.prototype.line=void 0;Se.prototype.ancestors=void 0;Se.prototype.cause=void 0;Se.prototype.fatal=void 0;Se.prototype.place=void 0;Se.prototype.ruleId=void 0;Se.prototype.source=void 0;import{default as mt}from"node:path";import{default as Km}from"node:process";import{fileURLToPath as Ym}from"node:url";function Fs(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}var Xu=["history","path","basename","stem","extname","dirname"],Ji=class{constructor(e){let n;e?Fs(e)?n={path:e}:typeof e=="string"||o1(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":Km.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Xu.length;){let o=Xu[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Xu.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?mt.basename(this.path):void 0}set basename(e){tc(e,"basename"),ec(e,"basename"),this.path=mt.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?mt.dirname(this.path):void 0}set dirname(e){Qm(this.basename,"dirname"),this.path=mt.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?mt.extname(this.path):void 0}set extname(e){if(ec(e,"extname"),Qm(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=mt.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Fs(e)&&(e=Ym(e)),tc(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?mt.basename(this.path,this.extname):void 0}set stem(e){tc(e,"stem"),ec(e,"stem"),this.path=mt.join(this.dirname||"",e+(this.extname||""))}fail(e,n,r){let i=this.message(e,n,r);throw i.fatal=!0,i}info(e,n,r){let i=this.message(e,n,r);return i.fatal=void 0,i}message(e,n,r){let i=new Se(e,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function ec(t,e){if(t&&t.includes(mt.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+mt.sep+"`")}function tc(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function Qm(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function o1(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var Zm=(function(t){let r=this.constructor.prototype,i=r[t],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o});var s1={}.hasOwnProperty,oc=class t extends Zm{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Ju()}copy(){let e=new t,n=-1;for(;++n<this.attachers.length;){let r=this.attachers[n];e.use(...r)}return e.data((0,js.default)(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(ic("data",this.frozen),this.namespace[e]=n,this):s1.call(this.namespace,e)&&this.namespace[e]||void 0:e?(ic("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);let i=n.call(e,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let n=qs(e),r=this.parser||this.Parser;return nc("parse",r),r(String(n),n)}process(e,n){let r=this;return this.freeze(),nc("process",this.parser||this.Parser),rc("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){let a=qs(e),u=r.parse(a);r.run(u,a,function(c,f,p){if(c||!f||!p)return l(c);let d=f,b=r.stringify(d,p);l1(b)?p.value=b:p.result=b,l(c,p)});function l(c,f){c||!f?s(c):o?o(f):n(void 0,f)}}}processSync(e){let n=!1,r;return this.freeze(),nc("processSync",this.parser||this.Parser),rc("processSync",this.compiler||this.Compiler),this.process(e,i),Xm("processSync","process",n),r;function i(o,s){n=!0,Zu(o),r=s}}run(e,n,r){Jm(e),this.freeze();let i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,a){let u=qs(n);i.run(e,u,l);function l(c,f,p){let d=f||e;c?a(c):s?s(d):r(void 0,d,p)}}}runSync(e,n){let r=!1,i;return this.run(e,n,o),Xm("runSync","run",r),i;function o(s,a){Zu(s),i=a,r=!0}}stringify(e,n){this.freeze();let r=qs(n),i=this.compiler||this.Compiler;return rc("stringify",i),Jm(e),i(e,r)}use(e,...n){let r=this.attachers,i=this.namespace;if(ic("use",this.frozen),e!=null)if(typeof e=="function")u(e,n);else if(typeof e=="object")Array.isArray(e)?a(e):s(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function o(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){let[c,...f]=l;u(c,f)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(l.plugins),l.settings&&(i.settings=(0,js.default)(!0,i.settings,l.settings))}function a(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){let f=l[c];o(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,c){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===l){p=f;break}if(p===-1)r.push([l,...c]);else if(c.length>0){let[d,...b]=c,g=r[p][1];Zi(g)&&Zi(d)&&(d=(0,js.default)(!0,g,d)),r[p]=[l,d,...b]}}}},sc=new oc().freeze();function nc(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function rc(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function ic(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Jm(t){if(!Zi(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Xm(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function qs(t){return a1(t)?t:new Ji(t)}function a1(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function l1(t){return typeof t=="string"||u1(t)}function u1(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var Bs=sc().use(Is).use(Ns).freeze();var c1=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,f1=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,p1=/[^-+\dA-Z]/g;function ac(t,e,n,r){if(arguments.length===1&&typeof t=="string"&&!/\d/.test(t)&&(e=t,t=void 0),t=t||t===0?t:new Date,t instanceof Date||(t=new Date(t)),isNaN(t))throw TypeError("Invalid date");e=String(Ws[e]||e||Ws.default);var i=e.slice(0,4);(i==="UTC:"||i==="GMT:")&&(e=e.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},s=function(){return t[o()+"Date"]()},a=function(){return t[o()+"Day"]()},u=function(){return t[o()+"Month"]()},l=function(){return t[o()+"FullYear"]()},c=function(){return t[o()+"Hours"]()},f=function(){return t[o()+"Minutes"]()},p=function(){return t[o()+"Seconds"]()},d=function(){return t[o()+"Milliseconds"]()},b=function(){return n?0:t.getTimezoneOffset()},g=function(){return d1(t)},S=function(){return h1(t)},y={d:function(){return s()},dd:function(){return Ze(s())},ddd:function(){return ze.dayNames[a()]},DDD:function(){return eg({y:l(),m:u(),d:s(),_:o(),dayName:ze.dayNames[a()],short:!0})},dddd:function(){return ze.dayNames[a()+7]},DDDD:function(){return eg({y:l(),m:u(),d:s(),_:o(),dayName:ze.dayNames[a()+7]})},m:function(){return u()+1},mm:function(){return Ze(u()+1)},mmm:function(){return ze.monthNames[u()]},mmmm:function(){return ze.monthNames[u()+12]},yy:function(){return String(l()).slice(2)},yyyy:function(){return Ze(l(),4)},h:function(){return c()%12||12},hh:function(){return Ze(c()%12||12)},H:function(){return c()},HH:function(){return Ze(c())},M:function(){return f()},MM:function(){return Ze(f())},s:function(){return p()},ss:function(){return Ze(p())},l:function(){return Ze(d(),3)},L:function(){return Ze(Math.floor(d()/10))},t:function(){return c()<12?ze.timeNames[0]:ze.timeNames[1]},tt:function(){return c()<12?ze.timeNames[2]:ze.timeNames[3]},T:function(){return c()<12?ze.timeNames[4]:ze.timeNames[5]},TT:function(){return c()<12?ze.timeNames[6]:ze.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":m1(t)},o:function(){return(b()>0?"-":"+")+Ze(Math.floor(Math.abs(b())/60)*100+Math.abs(b())%60,4)},p:function(){return(b()>0?"-":"+")+Ze(Math.floor(Math.abs(b())/60),2)+":"+Ze(Math.floor(Math.abs(b())%60),2)},S:function(){return["th","st","nd","rd"][s()%10>3?0:(s()%100-s()%10!=10)*s()%10]},W:function(){return g()},WW:function(){return Ze(g())},N:function(){return S()}};return e.replace(c1,function(h){return h in y?y[h]():h.slice(1,h.length-1)})}var Ws={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},ze={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Ze=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(e).padStart(n,"0")},eg=function(e){var n=e.y,r=e.m,i=e.d,o=e._,s=e.dayName,a=e.short,u=a===void 0?!1:a,l=new Date,c=new Date;c.setDate(c[o+"Date"]()-1);var f=new Date;f.setDate(f[o+"Date"]()+1);var p=function(){return l[o+"Date"]()},d=function(){return l[o+"Month"]()},b=function(){return l[o+"FullYear"]()},g=function(){return c[o+"Date"]()},S=function(){return c[o+"Month"]()},y=function(){return c[o+"FullYear"]()},h=function(){return f[o+"Date"]()},m=function(){return f[o+"Month"]()},w=function(){return f[o+"FullYear"]()};return b()===n&&d()===r&&p()===i?u?"Tdy":"Today":y()===n&&S()===r&&g()===i?u?"Ysd":"Yesterday":w()===n&&m()===r&&h()===i?u?"Tmw":"Tomorrow":s},d1=function(e){var n=new Date(e.getFullYear(),e.getMonth(),e.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},h1=function(e){var n=e.getDay();return n===0&&(n=7),n},m1=function(e){return(String(e).match(f1)||[""]).pop().replace(p1,"").replace(/GMT\+0000/g,"UTC")};var Ue=ae(ro(),1);function le(t,e,n){return{start:{line:t,character:e},end:{line:t,character:e+n}}}function _e(t,e,n,r,i){return{type:t,value:e,range:le(n,r,e.length),selectionRange:le(n,r,e.length),...i}}function gn(t,e){return e.map(n=>{if("newText"in n)return n;let r=t.getText(n.getText);return{range:n.range,newText:r}})}function zg(t,e){return t.line<e.line?-1:t.line>e.line?1:t.character<e.character?-1:t.character>e.character?1:0}function ma(t,e){return!(zg(t.end,e.start)<0||zg(e.end,t.start)<0)}function ga(t){let e={type:"root",children:[],range:{start:{line:0,character:0},end:{line:t.lineCount,character:0}},selectionRange:le(0,0,0)},n,r,i=[];function o(a){let u={type:"section",range:le(a,0,0),selectionRange:le(a,0,0),children:[]};return e.children.push(u),n=u,r=void 0,i=[],u}let s=[{pattern:/^$/,parse(a,u){return!0}},{pattern:/^-+$/,parse(a,u){let l=o(u),c=_e("separator",a[0],u,0);return l.children.push(c),!0}},{pattern:/^\s*Version\s*:\s*(.+)\s*$/d,parse(a,u){let l=_e("version",a[1],u,a.indices[1][0],{full_line:a[0]});return l.range.start.character=0,(!n||n.children.find(c=>c.type==="version"))&&o(u),n.children.push(l),!0}},{pattern:/^\s*Date\s*:\s*(.+)\s*$/d,parse(a,u){let l=_e("date",a[1],u,a.indices[1][0],{full_line:a[0]});return l.range.start.character=0,n||o(u),n.children.push(l),!0}},{pattern:/^\s*([^\s\-].*?)\s*:?\s*$/d,parse(a,u){if(i.length>0&&a.indices[1][0]>=4)return!1;n||o(u);let l=_e("category",a[1],u,a.indices[1][0],{full_line:a[0],children:[]});return l.range.start.character=0,n.children.push(l),r=l,i=[],!0}},{pattern:/^\s*(-)\s*(.*)$/d,parse(a,u){if(n&&!r){let l=_e("category","",u,0,{full_line:"",children:[],missing:!0});n.children.push(l),r=l,i=[]}if(r){let l=_e("entry",a[2],u,a.indices[2][0],{full_line:a[0],rank:a.indices[1][0],children:[]});l.range.start.character=0,l.selectionRange.end=l.selectionRange.start;let c=i.filter(f=>f.rank<l.rank);return i=c,c.length===0?r.children.push(l):c[c.length-1].children.push(l),c.push(l),!0}return!1}},{pattern:/^\s*(.*)$/d,parse(a,u){if(i.length>0){let l=_e("entryext",a[1],u,a.indices[1][0],{full_line:a[0],rank:a.indices[1][0]});return l.range.start.character=0,l.selectionRange.end=l.selectionRange.start,i[i.length-1].children.push(l),!0}return!1}},{pattern:/^.*$/,parse(a,u){let l=_e("error",a[0],u,0);return(r??n??e).children.push(l),!0}}];for(let a=0;a<t.lineCount;a++){let u={start:{line:a,character:0},end:{line:a,character:1/0}},l=t.getText(u).replace(/\r*\n?$/,"");for(let c of s){let f=c.pattern.exec(l);if(f&&c.parse(f,a))break}}return ln(e,["entry","entryext"],(a,u)=>{(a.type==="entry"||a.type==="entryext")&&(a.rank=u.length-3)}),ln(e,(a,u)=>{let l=a.range.end;for(let c of u){let f=c.range.end;(l.line>f.line||l.line===f.line&&l.character>f.character)&&(c.range.end=l)}}),e}var io=ae(ro(),1);var ED=[{message:"Missing separator",code:"separator.missing",setup(t){return{section:(e,n,r)=>{e.children[0].type!=="separator"&&t.report({diag:{range:e.selectionRange},fix:[{range:{start:e.selectionRange.start,end:e.selectionRange.start},newText:`---------------------------------------------------------------------------------------------------
84
84
  `}]})}}}},{message:"Missing version",code:"version.missing",setup(t){return{section:(e,n,r)=>{if(!e.children.find(i=>i.type==="version")&&!(e.children.length===1&&e.children[0].type==="separator")){let i=e.children.find(o=>o.type==="date"||o.type==="category");i&&t.report({diag:{range:{start:i.range.start,end:i.range.start}},fix:[{range:{start:i.range.start,end:i.range.start},newText:`Version: 0.0.0
85
85
  `}]})}}}}},{message:"Separator line is incorrect length",code:"separator.length",setup(t){return{separator:(e,n,r)=>{e.value.length!==99&&t.report({diag:{range:e.range},fix:[{range:e.range,newText:"---------------------------------------------------------------------------------------------------"}]})}}}},{message:"Unexpected separator",code:"separator.extra",setup(t){return{separator:(e,n,r)=>{r.children.length===1&&t.report({diag:{range:e.range},fix:[{range:{start:e.range.start,end:{line:e.range.start.line+1,character:0}},newText:""}]})}}}},{message:"Version must be first line of block",code:"version.order",setup(t){return{version:(e,n,r)=>{(n>1||e.range.start.line>r.range.start.line+1)&&t.report({diag:{range:e.range}})}}}},{message:"Version line incorrectly formatted",code:"version.format",setup(t){return{version:(e,n,r)=>{e.full_line!==`Version: ${e.value}`&&t.report({diag:{range:e.range}})}}}},{message:"Expected two or three decimal numbers in version number",code:"version.value",setup(t){return{version:(e,n,r)=>{e.value.match(/^\d+\.\d+(\.\d+)?/)||t.report({diag:{range:e.selectionRange}})}}}},{message:"Duplicate Version",code:"version.duplicate",setup(t){let e=new Map;return{root:(n,r,i)=>{e.clear()},version:(n,r,i)=>{let o=e.get(n.value);o?t.report({diag:{range:n.selectionRange,relatedInformation:[{message:"First defined here",location:{range:o.selectionRange,uri:t.uri}}]}}):e.set(n.value,n)}}}},{message:"Date line must be immediately after Version line",code:"date.placement",setup(t){return{date:(e,n,r)=>{let i=r.children.findIndex(s=>s.type==="date"),o=r.children.findIndex(s=>s.type==="version");o!==-1&&n!==o+1&&i===n&&t.report({diag:{range:e.range}})}}}},{message:"Duplicate Date line in section",code:"date.duplicate",setup(t){return{date:(e,n,r)=>{let i=r.children.findIndex(o=>o.type==="date");i!==n&&t.report({diag:{range:e.range,relatedInformation:[{message:"First defined here",location:{range:r.children[i].range,uri:t.uri}}]},fix:[{range:{start:e.range.start,end:{line:e.range.start.line+1,character:0}},newText:""}]})}}}},{message:"Date line incorrectly formatted",code:"date.format",setup(t){return{date:(e,n,r)=>{e.full_line!==`Date: ${e.value}`&&t.report({diag:{range:e.range}})}}}},{message:"Missing Category",code:"category.missing",setup(t){return{category:(e,n,r)=>{e.missing&&t.report({diag:{range:e.range},fix:[{range:{start:e.range.start,end:e.range.start},newText:` Changes:
86
- `}]})}}}},{message:"Category line prefix incorrect",code:"category.prefix",setup(t){return{category:(e,n,r)=>{e.missing||e.full_line.startsWith(` ${e.value}`)||t.report({diag:{range:{start:e.range.start,end:{line:e.selectionRange.start.line,character:e.selectionRange.start.character}}},fix:[{range:{start:e.range.start,end:{line:e.selectionRange.start.line,character:e.selectionRange.start.character}},newText:" "}]})}}}},{message:"Category line suffix incorrect",code:"category.suffix",setup(t){return{category:(e,n,r)=>{e.missing||e.full_line.endsWith(`${e.value}:`)||t.report({diag:{range:{start:{line:e.selectionRange.end.line,character:e.selectionRange.end.character+1},end:e.range.end}},fix:[{range:{start:{line:e.selectionRange.end.line,character:e.selectionRange.end.character+1},end:e.range.end},newText:":"}]})}}}},{message:"Non-standard category name",code:"category.nonstandard",setup(t){return{category:(e,n,r)=>{if(e.missing)return;["Major Features","Features","Minor Features","Graphics","Sounds","Optimizations","Balancing","Combat Balancing","Circuit Network","Changes","Bugfixes","Modding","Scripting","Gui","Control","Translation","Debug","Ease of use","Info","Locale","Compatibility","Other"].includes(e.value)||t.report({diag:{range:e.selectionRange,severity:io.DiagnosticSeverity.Information}})}}}},{message:"Duplicate category",code:"category.duplicate",setup(t){let e=new Map;return{section:(n,r,i)=>{e.clear()},category:(n,r,i)=>{if(n.missing)return;let o=e.get(n.value);o?t.report({diag:{range:n.selectionRange,severity:io.DiagnosticSeverity.Warning,relatedInformation:[{message:"First defined here",location:{range:o.selectionRange,uri:t.uri}}]}}):e.set(n.value,n)}}}},{message:"Incorrect entry prefix",code:"entry.prefix",setup(t){return{entry:(e,n,r)=>{let i=" "+(e.rank===0?"- ":" ");if(e.rank===0&&!e.full_line.startsWith(i)){t.report({diag:{range:{start:e.range.start,end:e.selectionRange.start},data:{rank:e.rank}},fix:[{range:{start:e.range.start,end:e.selectionRange.start},newText:i}]});return}let o=e.full_line.slice(0,e.selectionRange.start.character),s=" "+" ".repeat(e.rank)+"- ";o!==s&&t.report({diag:{severity:e.full_line.startsWith(i)?io.DiagnosticSeverity.Warning:io.DiagnosticSeverity.Error,range:{start:e.range.start,end:e.selectionRange.start},data:{rank:e.rank}},fix:[{range:{start:e.range.start,end:e.selectionRange.start},newText:s}]})}}}},{message:"Duplicate entry",code:"entry.duplicate",setup(t){let e,n=new Map,r=(i,o,s)=>{let a=e;if(!a)return;let u=a.get(i.full_line);u?t.report({diag:{range:i.selectionRange,relatedInformation:[{message:"First defined here",location:{range:u.selectionRange,uri:t.uri}}]}}):a.set(i.full_line,i)};return{section:(i,o,s)=>{n.clear()},category:(i,o,s)=>{if(i.missing)return;let a=n.get(i.value);a?e=a:(e=new Map,n.set(i.value,e))},entry:r,entryext:r}}},{message:"Empty entry line",code:"entry.empty",setup(t){return{entry:(e,n,r)=>{e.value.length===0&&t.report({diag:{range:e.range}})}}}},{message:"Incorrect entry continuation prefix",code:"entryext.prefix",setup(t){return{entryext:(e,n,r)=>{e.full_line.startsWith(" ")||t.report({diag:{range:{start:e.range.start,end:{line:e.selectionRange.start.line,character:e.selectionRange.start.character}}},fix:[{range:{start:e.range.start,end:{line:e.selectionRange.start.line,character:e.selectionRange.start.character}},newText:" "}]})}}}},{message:"Invalid line",code:"error.unknown",setup(t){return{error:(e,n,r)=>{t.report({diag:{range:e.range}})}}}}];function Rc(t,e){let n=[],r={root:[],section:[],separator:[],version:[],date:[],category:[],entry:[],entryext:[],error:[]};for(let i of _D){let o={uri:e,report(a){n.push({message:i.message,code:i.code,...a})}},s=i.setup(o);for(let a in r){let u=a;u in s&&s[u]&&r[u].push(s[u])}}return nt(t,(i,o,s)=>{let a=r[i.type];for(let u of a)u(i,o??-1,s)}),n}function Ac(t){for(let e of t.children)if(e.type==="version")return e}function zg(t){for(let e of t.children)if(e.type==="date")return e}function wD(t,e){for(let n of t.children)if(n.type==="section"&&Ac(n)?.value===e)return n}function Ug(t,e,n){let r=wD(t,e);if(r){let i=zg(r);if(i)return{range:i.selectionRange,newText:n};{let o=Ac(r);return{range:{start:o.range.end,end:o.range.end},newText:`
87
- Date: ${n}`}}}}var ba=class{documentTrees=new Map;loadDocument(e){let n=ya(e);this.documentTrees.set(e.uri,n)}clearDocument(e){this.documentTrees.delete(e)}clearFolder(e){for(let n of this.documentTrees.keys())n.startsWith(e)&&this.documentTrees.delete(n)}diagnose(e){let n=this.documentTrees.get(e);if(!n)return[];let r=Rc(n,e),i=[];for(let o of r)i.push({message:o.message,code:o.code,source:"factorio-changelog",severity:Ue.DiagnosticSeverity.Error,...o.diag});return i}entrySymbol(e){return{name:e.value||"<empty>",detail:"",kind:Ue.SymbolKind.String,range:e.range,selectionRange:e.selectionRange,children:e.type==="entry"?e.children.map(n=>this.entrySymbol(n)):[]}}categorySymbol(e){return{name:e.value||"<empty>",detail:"",kind:Ue.SymbolKind.Class,range:e.range,selectionRange:e.selectionRange,children:e.children.filter(n=>n.type==="entry").map(n=>this.entrySymbol(n))}}dateSymbol(e){return{name:"Date",detail:e.value,kind:Ue.SymbolKind.Property,range:e.range,selectionRange:e.selectionRange}}onDocumentSymbol(e){let n=this.documentTrees.get(e.uri);if(!n)return[];let r=[];for(let i of n.children)if(i.type==="section"){let o=Ac(i);if(!o)continue;let s=zg(i),a=i.children.filter(u=>u.type==="category").map(u=>this.categorySymbol(u));s&&a.unshift(this.dateSymbol(s)),r.push({name:o.value||"<empty>",detail:"",kind:Ue.SymbolKind.Namespace,range:i.range,selectionRange:o.selectionRange,children:a})}return r}onCodeAction(e,n,r){if(e.languageId!=="factorio-changelog")return[];let i=this.documentTrees.get(e.uri);if(!i)return[];let o=Rc(i,e.uri).filter(l=>!!l.fix),s=o.filter(l=>ga(n,l.diag.range)),a=[],u=new Set;for(let l of s)if(a.push({title:`Fix this ${l.code}`,kind:Ue.CodeActionKind.QuickFix+"."+l.code,diagnostics:[{message:l.message,code:l.code,source:"factorio-changelog",severity:Ue.DiagnosticSeverity.Error,...l.diag}],isPreferred:!0,edit:{changes:{[e.uri]:gn(e,l.fix)}}}),!u.has(l.code)){u.add(l.code);let c=o.filter(f=>f.code===l.code);c.length>1&&a.push({title:`Fix all ${l.code} in file`,kind:Ue.CodeActionKind.QuickFix+"."+l.code+".all",diagnostics:c.map(f=>({message:f.message,code:f.code,source:"factorio-changelog",severity:Ue.DiagnosticSeverity.Error,...f.diag})),edit:{changes:{[e.uri]:gn(e,c.flatMap(f=>f.fix))}}})}return o.length>s.length&&a.push({title:"Fix all auto-fixable in file",kind:Ue.CodeActionKind.QuickFix+".all",diagnostics:o.map(l=>({message:l.message,code:l.code,source:"factorio-changelog",severity:Ue.DiagnosticSeverity.Error,...l.diag})),edit:{changes:{[e.uri]:gn(e,o.flatMap(l=>l.fix))}}}),a}};import{createReadStream as nN,lstat as rN,readlinkSync as iN,Stats as oN}from"fs";function yn(t,{checkOpen:e=!0}={}){return t!==null&&typeof t=="object"&&(t.writable||t.readable||!e||t.writable===void 0&&t.readable===void 0)&&typeof t.pipe=="function"}import*as Ur from"fs";import{EventEmitter as TT}from"events";var Cc=(t,e,n)=>{let r=t instanceof RegExp?$g(t,n):t,i=e instanceof RegExp?$g(e,n):e,o=r!==null&&i!=null&&SD(r,i,n);return o&&{start:o[0],end:o[1],pre:n.slice(0,o[0]),body:n.slice(o[0]+r.length,o[1]),post:n.slice(o[1]+i.length)}},$g=(t,e)=>{let n=e.match(t);return n?n[0]:null},SD=(t,e,n)=>{let r,i,o,s,a,u=n.indexOf(t),l=n.indexOf(e,u+1),c=u;if(u>=0&&l>0){if(t===e)return[u,l];for(r=[],o=n.length;c>=0&&!a;){if(c===u)r.push(c),u=n.indexOf(t,c+1);else if(r.length===1){let f=r.pop();f!==void 0&&(a=[f,l])}else i=r.pop(),i!==void 0&&i<o&&(o=i,s=l),l=n.indexOf(e,c+1);c=u<l&&u>=0?u:l}r.length&&s!==void 0&&(a=[o,s])}return a};var Hg="\0SLASH"+Math.random()+"\0",Vg="\0OPEN"+Math.random()+"\0",Oc="\0CLOSE"+Math.random()+"\0",Gg="\0COMMA"+Math.random()+"\0",Kg="\0PERIOD"+Math.random()+"\0",ED=new RegExp(Hg,"g"),kD=new RegExp(Vg,"g"),DD=new RegExp(Oc,"g"),TD=new RegExp(Gg,"g"),RD=new RegExp(Kg,"g"),AD=/\\\\/g,CD=/\\{/g,ID=/\\}/g,OD=/\\,/g,PD=/\\\./g,LD=1e5;function Ic(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function ND(t){return t.replace(AD,Hg).replace(CD,Vg).replace(ID,Oc).replace(OD,Gg).replace(PD,Kg)}function MD(t){return t.replace(ED,"\\").replace(kD,"{").replace(DD,"}").replace(TD,",").replace(RD,".")}function Yg(t){if(!t)return[""];let e=[],n=Cc("{","}",t);if(!n)return t.split(",");let{pre:r,body:i,post:o}=n,s=r.split(",");s[s.length-1]+="{"+i+"}";let a=Yg(o);return o.length&&(s[s.length-1]+=a.shift(),s.push.apply(s,a)),e.push.apply(e,s),e}function Qg(t,e={}){if(!t)return[];let{max:n=LD}=e;return t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),oo(ND(t),n,!0).map(MD)}function FD(t){return"{"+t+"}"}function qD(t){return/^-?0\d/.test(t)}function jD(t,e){return t<=e}function BD(t,e){return t>=e}function oo(t,e,n){let r=[],i=Cc("{","}",t);if(!i)return[t];let o=i.pre,s=i.post.length?oo(i.post,e,!1):[""];if(/\$$/.test(i.pre))for(let a=0;a<s.length&&a<e;a++){let u=o+"{"+i.body+"}"+s[a];r.push(u)}else{let a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),l=a||u,c=i.body.indexOf(",")>=0;if(!l&&!c)return i.post.match(/,(?!,).*\}/)?(t=i.pre+"{"+i.body+Oc+i.post,oo(t,e,!0)):[t];let f;if(l)f=i.body.split(/\.\./);else if(f=Yg(i.body),f.length===1&&f[0]!==void 0&&(f=oo(f[0],e,!1).map(FD),f.length===1))return s.map(d=>i.pre+f[0]+d);let p;if(l&&f[0]!==void 0&&f[1]!==void 0){let d=Ic(f[0]),b=Ic(f[1]),g=Math.max(f[0].length,f[1].length),S=f.length===3&&f[2]!==void 0?Math.max(Math.abs(Ic(f[2])),1):1,y=jD;b<d&&(S*=-1,y=BD);let m=f.some(qD);p=[];for(let w=d;y(w,b)&&p.length<e;w+=S){let T;if(u)T=String.fromCharCode(w),T==="\\"&&(T="");else if(T=String(w),m){let v=g-T.length;if(v>0){let E=new Array(v+1).join("0");w<0?T="-"+E+T.slice(1):T=E+T}}p.push(T)}}else{p=[];for(let d=0;d<f.length;d++)p.push.apply(p,oo(f[d],e,!1))}for(let d=0;d<p.length;d++)for(let b=0;b<s.length&&r.length<e;b++){let g=o+p[d]+s[b];(!n||l||g)&&r.push(g)}}return r}var so=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var WD={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ao=t=>t.replace(/[[\]\\-]/g,"\\$&"),zD=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Zg=t=>t.join(""),Jg=(t,e)=>{let n=e;if(t.charAt(n)!=="[")throw new Error("not in a brace expression");let r=[],i=[],o=n+1,s=!1,a=!1,u=!1,l=!1,c=n,f="";e:for(;o<t.length;){let g=t.charAt(o);if((g==="!"||g==="^")&&o===n+1){l=!0,o++;continue}if(g==="]"&&s&&!u){c=o+1;break}if(s=!0,g==="\\"&&!u){u=!0,o++;continue}if(g==="["&&!u){for(let[S,[y,h,m]]of Object.entries(WD))if(t.startsWith(S,o)){if(f)return["$.",!1,t.length-n,!0];o+=S.length,m?i.push(y):r.push(y),a=a||h;continue e}}if(u=!1,f){g>f?r.push(ao(f)+"-"+ao(g)):g===f&&r.push(ao(g)),f="",o++;continue}if(t.startsWith("-]",o+1)){r.push(ao(g+"-")),o+=2;continue}if(t.startsWith("-",o+1)){f=g,o+=2;continue}r.push(ao(g)),o++}if(c<o)return["",!1,0,!1];if(!r.length&&!i.length)return["$.",!1,t.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l){let g=r[0].length===2?r[0].slice(-1):r[0];return[zD(g),!1,c-n,!1]}let p="["+(l?"^":"")+Zg(r)+"]",d="["+(l?"":"^")+Zg(i)+"]";return[r.length&&i.length?"("+p+"|"+d+")":r.length?p:d,a,c-n,!0]};var bn=(t,{windowsPathsNoEscape:e=!1,magicalBraces:n=!0}={})=>n?e?t.replace(/\[([^/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):e?t.replace(/\[([^/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");var $e,UD=new Set(["!","?","+","*","@"]),Pc=t=>UD.has(t),Xg=t=>Pc(t.type),$D=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),HD=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),VD=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),ey=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),GD="(?!(?:^|/)\\.\\.?(?:$|/))",xa="(?!\\.)",KD=new Set(["[","."]),YD=new Set(["..","."]),QD=new Set("().*{}+?[]^$\\!"),ZD=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Lc="[^/]",ty=Lc+"*?",ny=Lc+"+?",JD=0,nr=class{type;#r;#n;#t=!1;#e=[];#i;#o;#s;#l=!1;#a;#u;#c=!1;id=++JD;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#r.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#e.length,parts:this.#e}}constructor(e,n,r={}){this.type=e,e&&(this.#n=!0),this.#i=n,this.#r=this.#i?this.#i.#r:this,this.#a=this.#r===this?r:this.#r.#a,this.#s=this.#r===this?[]:this.#r.#s,e==="!"&&!this.#r.#l&&this.#s.push(this),this.#o=this.#i?this.#i.#e.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(let e of this.#e)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#e.map(e=>String(e)).join("|")+")":this.#u=this.#e.map(e=>String(e)).join("")}#y(){if(this!==this.#r)throw new Error("should only call on root");if(this.#l)return this;this.toString(),this.#l=!0;let e;for(;e=this.#s.pop();){if(e.type!=="!")continue;let n=e,r=n.#i;for(;r;){for(let i=n.#o+1;!r.type&&i<r.#e.length;i++)for(let o of e.#e){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(r.#e[i])}n=r,r=n.#i}}return this}push(...e){for(let n of e)if(n!==""){if(typeof n!="string"&&!(n instanceof $e&&n.#i===this))throw new Error("invalid part: "+n);this.#e.push(n)}}toJSON(){let e=this.type===null?this.#e.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#e.map(n=>n.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#l&&this.#i?.type==="!")&&e.push({}),e}isStart(){if(this.#r===this)return!0;if(!this.#i?.isStart())return!1;if(this.#o===0)return!0;let e=this.#i;for(let n=0;n<this.#o;n++){let r=e.#e[n];if(!(r instanceof $e&&r.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#e.length:0;return this.#o===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let n=new $e(this.type,e);for(let r of this.#e)n.copyIn(r);return n}static#f(e,n,r,i,o){let s=i.maxExtglobRecursion??2,a=!1,u=!1,l=-1,c=!1;if(n.type===null){let g=r,S="";for(;g<e.length;){let y=e.charAt(g++);if(a||y==="\\"){a=!a,S+=y;continue}if(u){g===l+1?(y==="^"||y==="!")&&(c=!0):y==="]"&&!(g===l+2&&c)&&(u=!1),S+=y;continue}else if(y==="["){u=!0,l=g,c=!1,S+=y;continue}if(!i.noext&&Pc(y)&&e.charAt(g)==="("&&o<=s){n.push(S),S="";let m=new $e(y,n);g=$e.#f(e,m,g,i,o+1),n.push(m);continue}S+=y}return n.push(S),g}let f=r+1,p=new $e(null,n),d=[],b="";for(;f<e.length;){let g=e.charAt(f++);if(a||g==="\\"){a=!a,b+=g;continue}if(u){f===l+1?(g==="^"||g==="!")&&(c=!0):g==="]"&&!(f===l+2&&c)&&(u=!1),b+=g;continue}else if(g==="["){u=!0,l=f,c=!1,b+=g;continue}if(!i.noext&&Pc(g)&&e.charAt(f)==="("&&(o<=s||n&&n.#p(g))){let y=n&&n.#p(g)?0:1;p.push(b),b="";let h=new $e(g,p);p.push(h),f=$e.#f(e,h,f,i,o+y);continue}if(g==="|"){p.push(b),b="",d.push(p),p=new $e(null,n);continue}if(g===")")return b===""&&n.#e.length===0&&(n.#c=!0),p.push(b),b="",n.push(...d,p),f;b+=g}return n.type=null,n.#n=void 0,n.#e=[e.substring(r-1)],f}#b(e){return this.#h(e,HD)}#h(e,n=$D){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null)return!1;let r=e.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#p(r.type,n)}#p(e,n=VD){return!!n.get(this.type)?.includes(e)}#x(e,n){let r=e.#e[0],i=new $e(null,r,this.options);i.#e.push(""),r.push(i),this.#m(e,n)}#m(e,n){let r=e.#e[0];this.#e.splice(n,1,...r.#e);for(let i of r.#e)typeof i=="object"&&(i.#i=this);this.#u=void 0}#_(e){return!!ey.get(this.type)?.has(e)}#w(e){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let n=e.#e[0];return!n||typeof n!="object"||n.type===null?!1:this.#_(n.type)}#v(e){let n=ey.get(this.type),r=e.#e[0],i=n?.get(r.type);if(!i)return!1;this.#e=r.#e;for(let o of this.#e)typeof o=="object"&&(o.#i=this);this.type=i,this.#u=void 0,this.#c=!1}static fromGlob(e,n={}){let r=new $e(null,void 0,n);return $e.#f(e,r,0,n,0),r}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();let e=this.toString(),[n,r,i,o]=this.toRegExpSource();if(!(i||this.#n||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return r;let a=(this.#a.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${n}$`,a),{_src:n,_glob:e})}get options(){return this.#a}toRegExpSource(e){let n=e??!!this.#a.dot;if(this.#r===this&&(this.#d(),this.#y()),!Xg(this)){let u=this.isStart()&&this.isEnd()&&!this.#e.some(d=>typeof d!="string"),l=this.#e.map(d=>{let[b,g,S,y]=typeof d=="string"?$e.#S(d,this.#n,u):d.toRegExpSource(e);return this.#n=this.#n||S,this.#t=this.#t||y,b}).join(""),c="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&YD.has(this.#e[0]))){let b=KD,g=n&&b.has(l.charAt(0))||l.startsWith("\\.")&&b.has(l.charAt(2))||l.startsWith("\\.\\.")&&b.has(l.charAt(4)),S=!n&&!e&&b.has(l.charAt(0));c=g?GD:S?xa:""}let f="";return this.isEnd()&&this.#r.#l&&this.#i?.type==="!"&&(f="(?:$|\\/)"),[c+l+f,bn(l),this.#n=!!this.#n,this.#t]}let r=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#g(n);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let u=this.toString(),l=this;return l.#e=[u],l.type=null,l.#n=void 0,[u,bn(this.toString()),!1,!1]}let s=!r||e||n||!xa?"":this.#g(!0);s===o&&(s=""),s&&(o=`(?:${o})(?:${s})*?`);let a="";if(this.type==="!"&&this.#c)a=(this.isStart()&&!n?xa:"")+ny;else{let u=this.type==="!"?"))"+(this.isStart()&&!n&&!e?xa:"")+ty+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;a=i+o+u}return[a,bn(o),this.#n=!!this.#n,this.#t]}#d(){if(Xg(this)){let e=0,n=!1;do{n=!0;for(let r=0;r<this.#e.length;r++){let i=this.#e[r];typeof i=="object"&&(i.#d(),this.#h(i)?(n=!1,this.#m(i,r)):this.#b(i)?(n=!1,this.#x(i,r)):this.#w(i)&&(n=!1,this.#v(i)))}}while(!n&&++e<10)}else for(let e of this.#e)typeof e=="object"&&e.#d();this.#u=void 0}#g(e){return this.#e.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");let[r,i,o,s]=n.toRegExpSource(e);return this.#t=this.#t||s,r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#S(e,n,r=!1){let i=!1,o="",s=!1,a=!1;for(let u=0;u<e.length;u++){let l=e.charAt(u);if(i){i=!1,o+=(QD.has(l)?"\\":"")+l;continue}if(l==="*"){if(a)continue;a=!0,o+=r&&/^[*]+$/.test(e)?ny:ty,n=!0;continue}else a=!1;if(l==="\\"){u===e.length-1?o+="\\\\":i=!0;continue}if(l==="["){let[c,f,p,d]=Jg(e,u);if(p){o+=c,s=s||f,u+=p-1,n=n||d;continue}}if(l==="?"){o+=Lc,n=!0;continue}o+=ZD(l)}return[o,bn(e),!!n,s]}};$e=nr;var Nc=(t,{windowsPathsNoEscape:e=!1,magicalBraces:n=!1}={})=>n?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var Fe=(t,e,n={})=>(so(e),!n.nocomment&&e.charAt(0)==="#"?!1:new kt(e,n).match(t)),XD=/^\*+([^+@!?*[(]*)$/,eT=t=>e=>!e.startsWith(".")&&e.endsWith(t),tT=t=>e=>e.endsWith(t),nT=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),rT=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),iT=/^\*+\.\*+$/,oT=t=>!t.startsWith(".")&&t.includes("."),sT=t=>t!=="."&&t!==".."&&t.includes("."),aT=/^\.\*+$/,lT=t=>t!=="."&&t!==".."&&t.startsWith("."),uT=/^\*+$/,cT=t=>t.length!==0&&!t.startsWith("."),fT=t=>t.length!==0&&t!=="."&&t!=="..",pT=/^\?+([^+@!?*[(]*)?$/,dT=([t,e=""])=>{let n=oy([t]);return e?(e=e.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(e)):n},hT=([t,e=""])=>{let n=sy([t]);return e?(e=e.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(e)):n},mT=([t,e=""])=>{let n=sy([t]);return e?r=>n(r)&&r.endsWith(e):n},gT=([t,e=""])=>{let n=oy([t]);return e?r=>n(r)&&r.endsWith(e):n},oy=([t])=>{let e=t.length;return n=>n.length===e&&!n.startsWith(".")},sy=([t])=>{let e=t.length;return n=>n.length===e&&n!=="."&&n!==".."},ay=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",ry={win32:{sep:"\\"},posix:{sep:"/"}},yT=ay==="win32"?ry.win32.sep:ry.posix.sep;Fe.sep=yT;var Ce=Symbol("globstar **");Fe.GLOBSTAR=Ce;var bT="[^/]",xT=bT+"*?",_T="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",wT="(?:(?!(?:\\/|^)\\.).)*?",vT=(t,e={})=>n=>Fe(n,t,e);Fe.filter=vT;var ot=(t,e={})=>Object.assign({},t,e),ST=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return Fe;let e=Fe;return Object.assign((r,i,o={})=>e(r,i,ot(t,o)),{Minimatch:class extends e.Minimatch{constructor(i,o={}){super(i,ot(t,o))}static defaults(i){return e.defaults(ot(t,i)).Minimatch}},AST:class extends e.AST{constructor(i,o,s={}){super(i,o,ot(t,s))}static fromGlob(i,o={}){return e.AST.fromGlob(i,ot(t,o))}},unescape:(r,i={})=>e.unescape(r,ot(t,i)),escape:(r,i={})=>e.escape(r,ot(t,i)),filter:(r,i={})=>e.filter(r,ot(t,i)),defaults:r=>e.defaults(ot(t,r)),makeRe:(r,i={})=>e.makeRe(r,ot(t,i)),braceExpand:(r,i={})=>e.braceExpand(r,ot(t,i)),match:(r,i,o={})=>e.match(r,i,ot(t,o)),sep:e.sep,GLOBSTAR:Ce})};Fe.defaults=ST;var ly=(t,e={})=>(so(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:Qg(t,{max:e.braceExpandMax}));Fe.braceExpand=ly;var ET=(t,e={})=>new kt(t,e).makeRe();Fe.makeRe=ET;var kT=(t,e,n={})=>{let r=new kt(e,n);return t=t.filter(i=>r.match(i)),r.options.nonull&&!t.length&&t.push(e),t};Fe.match=kT;var iy=/[?*]|[+@!]\(.*?\)|\[|\]/,DT=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),kt=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,n={}){so(e),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=e,this.platform=n.platform||ay,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let n of e)if(typeof n!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,n=this.options;if(!n.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map((o,s,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let u=o[0]===""&&o[1]===""&&(o[2]==="?"||!iy.test(o[2]))&&!iy.test(o[3]),l=/^[a-z]:/i.test(o[0]);if(u)return[...o.slice(0,4),...o.slice(4).map(c=>this.parse(c))];if(l)return[o[0],...o.slice(1).map(c=>this.parse(c))]}return o.map(u=>this.parse(u))});if(this.debug(this.pattern,i),this.set=i.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let s=this.set[o];s[0]===""&&s[1]===""&&this.globParts[o][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let r of e)for(let i=0;i<r.length;i++)r[i]==="**"&&(r[i]="*");let{optimizationLevel:n=1}=this.options;return n>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):n>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let i=r;for(;n[i+1]==="**";)i++;i!==r&&n.splice(r,i-r)}return n})}levelOneOptimize(e){return e.map(n=>(n=n.reduce((r,i)=>{let o=r[r.length-1];return i==="**"&&o==="**"?r:i===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(r.pop(),r):(r.push(i),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){let o=e[i];i===1&&o===""&&e[0]===""||(o==="."||o==="")&&(n=!0,e.splice(i,1),i--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(n=!0,e.pop())}let r=0;for(;(r=e.indexOf("..",r+1))!==-1;){let i=e[r-1];i&&i!=="."&&i!==".."&&i!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(i))&&(n=!0,e.splice(r-1,2),r-=2)}}while(n);return e.length===0?[""]:e}firstPhasePreProcess(e){let n=!1;do{n=!1;for(let r of e){let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let s=i;for(;r[s+1]==="**";)s++;s>i&&r.splice(i+1,s-i);let a=r[i+1],u=r[i+2],l=r[i+3];if(a!==".."||!u||u==="."||u===".."||!l||l==="."||l==="..")continue;n=!0,r.splice(i,1);let c=r.slice(0);c[i]="**",e.push(c),i--}if(!this.preserveMultipleSlashes){for(let s=1;s<r.length-1;s++){let a=r[s];s===1&&a===""&&r[0]===""||(a==="."||a==="")&&(n=!0,r.splice(s,1),s--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let o=0;for(;(o=r.indexOf("..",o+1))!==-1;){let s=r[o-1];if(s&&s!=="."&&s!==".."&&s!=="**"){n=!0;let u=o===1&&r[o+1]==="**"?["."]:[];r.splice(o-1,2,...u),r.length===0&&r.push(""),o-=2}}}}while(n);return e}secondPhasePreProcess(e){for(let n=0;n<e.length-1;n++)for(let r=n+1;r<e.length;r++){let i=this.partsMatch(e[n],e[r],!this.preserveMultipleSlashes);if(i){e[n]=[],e[r]=i;break}}return e.filter(n=>n.length)}partsMatch(e,n,r=!1){let i=0,o=0,s=[],a="";for(;i<e.length&&o<n.length;)if(e[i]===n[o])s.push(a==="b"?n[o]:e[i]),i++,o++;else if(r&&e[i]==="**"&&n[o]===e[i+1])s.push(e[i]),i++;else if(r&&n[o]==="**"&&e[i]===n[o+1])s.push(n[o]),o++;else if(e[i]==="*"&&n[o]&&(this.options.dot||!n[o].startsWith("."))&&n[o]!=="**"){if(a==="b")return!1;a="a",s.push(e[i]),i++,o++}else if(n[o]==="*"&&e[i]&&(this.options.dot||!e[i].startsWith("."))&&e[i]!=="**"){if(a==="a")return!1;a="b",s.push(n[o]),i++,o++}else return!1;return e.length===n.length&&s}parseNegate(){if(this.nonegate)return;let e=this.pattern,n=!1,r=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)n=!n,r++;r&&(this.pattern=e.slice(r)),this.negate=n}matchOne(e,n,r=!1){let i=0,o=0;if(this.isWindows){let a=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),u=!a&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),l=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),c=!l&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),f=u?3:a?0:void 0,p=c?3:l?0:void 0;if(typeof f=="number"&&typeof p=="number"){let[d,b]=[e[f],n[p]];d.toLowerCase()===b.toLowerCase()&&(n[p]=d,o=p,i=f)}}let{optimizationLevel:s=1}=this.options;return s>=2&&(e=this.levelTwoFileOptimize(e)),n.includes(Ce)?this.#r(e,n,r,i,o):this.#t(e,n,r,i,o)}#r(e,n,r,i,o){let s=n.indexOf(Ce,o),a=n.lastIndexOf(Ce),[u,l,c]=r?[n.slice(o,s),n.slice(s+1),[]]:[n.slice(o,s),n.slice(s+1,a),n.slice(a+1)];if(u.length){let h=e.slice(i,i+u.length);if(!this.#t(h,u,r,0,0))return!1;i+=u.length,o+=u.length}let f=0;if(c.length){if(c.length+i>e.length)return!1;let h=e.length-c.length;if(this.#t(e,c,r,h,0))f=c.length;else{if(e[e.length-1]!==""||i+c.length===e.length||(h--,!this.#t(e,c,r,h,0)))return!1;f=c.length+1}}if(!l.length){let h=!!f;for(let m=i;m<e.length-f;m++){let w=String(e[m]);if(h=!0,w==="."||w===".."||!this.options.dot&&w.startsWith("."))return!1}return r||h}let p=[[[],0]],d=p[0],b=0,g=[0];for(let h of l)h===Ce?(g.push(b),d=[[],0],p.push(d)):(d[0].push(h),b++);let S=p.length-1,y=e.length-f;for(let h of p)h[1]=y-(g[S--]+h[0].length);return!!this.#n(e,p,i,0,r,0,!!f)}#n(e,n,r,i,o,s,a){let u=n[i];if(!u){for(let f=r;f<e.length;f++){a=!0;let p=e[f];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return a}let[l,c]=u;for(;r<=c;){if(this.#t(e.slice(0,r+l.length),l,o,r,0)&&s<this.maxGlobstarRecursion){let d=this.#n(e,n,r+l.length,i+1,o,s+1,a);if(d!==!1)return d}let p=e[r];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;r++}return o||null}#t(e,n,r,i,o){let s,a,u,l;for(s=i,a=o,l=e.length,u=n.length;s<l&&a<u;s++,a++){this.debug("matchOne loop");let c=n[a],f=e[s];if(this.debug(n,c,f),c===!1||c===Ce)return!1;let p;if(typeof c=="string"?(p=f===c,this.debug("string match",c,f,p)):(p=c.test(f),this.debug("pattern match",c,f,p)),!p)return!1}if(s===l&&a===u)return!0;if(s===l)return r;if(a===u)return s===l-1&&e[s]==="";throw new Error("wtf?")}braceExpand(){return ly(this.pattern,this.options)}parse(e){so(e);let n=this.options;if(e==="**")return Ce;if(e==="")return"";let r,i=null;(r=e.match(uT))?i=n.dot?fT:cT:(r=e.match(XD))?i=(n.nocase?n.dot?rT:nT:n.dot?tT:eT)(r[1]):(r=e.match(pT))?i=(n.nocase?n.dot?hT:dT:n.dot?mT:gT)(r):(r=e.match(iT))?i=n.dot?sT:oT:(r=e.match(aT))&&(i=lT);let o=nr.fromGlob(e,this.options).toMMPattern();return i&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:i}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?xT:n.dot?_T:wT,i=new Set(n.nocase?["i"]:[]),o=e.map(u=>{let l=u.map(f=>{if(f instanceof RegExp)for(let p of f.flags.split(""))i.add(p);return typeof f=="string"?DT(f):f===Ce?Ce:f._src});l.forEach((f,p)=>{let d=l[p+1],b=l[p-1];f!==Ce||b===Ce||(b===void 0?d!==void 0&&d!==Ce?l[p+1]="(?:\\/|"+r+"\\/)?"+d:l[p]=r:d===void 0?l[p-1]=b+"(?:\\/|\\/"+r+")?":d!==Ce&&(l[p-1]=b+"(?:\\/|\\/"+r+"\\/)"+d,l[p+1]=Ce))});let c=l.filter(f=>f!==Ce);if(this.partial&&c.length>=1){let f=[];for(let p=1;p<=c.length;p++)f.push(c.slice(0,p).join("/"));return"(?:"+f.join("|")+")"}return c.join("/")}).join("|"),[s,a]=e.length>1?["(?:",")"]:["",""];o="^"+s+o+a+"$",this.partial&&(o="^(?:\\/|"+s+o.slice(1,-1)+a+")$"),this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,n=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&n)return!0;let r=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let o=this.set;this.debug(this.pattern,"set",o);let s=i[i.length-1];if(!s)for(let a=i.length-2;!s&&a>=0;a--)s=i[a];for(let a of o){let u=i;if(r.matchBase&&a.length===1&&(u=[s]),this.matchOne(u,a,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(e){return Fe.defaults(e).Minimatch}};Fe.AST=nr;Fe.Minimatch=kt;Fe.escape=Nc;Fe.unescape=bn;import{resolve as RT}from"path";function AT(t,e){return new Promise((n,r)=>{Ur.readdir(t,{withFileTypes:!0},(i,o)=>{if(i)switch(i.code){case"ENOTDIR":e?r(i):n([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":n([]);break;default:r(i);break}else n(o)})})}function uy(t,e){return new Promise(n=>{(e?Ur.stat:Ur.lstat)(t,(i,o)=>{i?i.code==="ENOENT"?n(e?uy(t,!1):null):n(null):n(o)})})}async function*cy(t,e,n,r,i,o){let s=await AT(e+t,o);for(let a of s){let u=a.name,l=t+"/"+u,c=l.slice(1),f=e+"/"+c,p=a;(r||n)&&(p=await uy(f,n)??p),p.isDirectory()?i(c)||(yield{relative:c,absolute:f,stat:p},yield*cy(l,e,n,r,i,!1)):yield{relative:c,absolute:f,stat:p}}}async function*CT(t,e,n,r){yield*cy("",t,e,n,r,!0)}function IT(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}var fy=class extends TT{options;matchers;ignoreMatchers;skipMatchers;paused;aborted;inactive;iterator;constructor(t,e,n){if(super(),typeof e=="function"&&(n=e,e=void 0),this.options=IT(e||{}),this.matchers=[],this.options.pattern){let r=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=r.map(i=>new kt(i,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let r=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=r.map(i=>new kt(i,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let r=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=r.map(i=>new kt(i,{dot:!0}))}if(this.iterator=CT(RT(t||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,n){let r=n,i=[];this.on("match",o=>i.push(this.options.absolute?o.absolute:o.relative)),this.on("error",o=>r(o)),this.on("end",()=>r(null,i))}setTimeout(()=>this._next())}_shouldSkipDirectory(t){return this.skipMatchers.some(e=>e.match(t))}_fileMatches(t,e){let n=t+(e?"/":"");return(this.matchers.length===0||this.matchers.some(r=>r.match(n)))&&!this.ignoreMatchers.some(r=>r.match(n))&&(!this.options.nodir||!e)}_next(){!this.paused&&!this.aborted?this.iterator.next().then(t=>{if(t.done)this.emit("end");else{let e=t.value.stat.isDirectory();if(this._fileMatches(t.value.relative,e)){let n=t.value.relative,r=t.value.absolute;this.options.mark&&e&&(n+="/",r+="/"),this.options.stat?this.emit("match",{relative:n,absolute:r,stat:t.value.stat}):this.emit("match",{relative:n,absolute:r})}this._next()}}).catch(t=>{this.abort(),this.emit("error",t),!t.code&&!this.options.silent&&console.error(t)}):this.inactive=!0}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}},$r=(t,e,n)=>new fy(t,e,n);$r.ReaddirGlob=fy;var Mc=$r;var Aw=ae(sb(),1);function BR(t){return function(...e){var n=e.pop();return t.call(this,e,n)}}var WR=typeof queueMicrotask=="function"&&queueMicrotask,fb=typeof setImmediate=="function"&&setImmediate,pb=typeof process=="object"&&typeof process.nextTick=="function";function db(t){setTimeout(t,0)}function hb(t){return(e,...n)=>t(()=>e(...n))}var go;WR?go=queueMicrotask:fb?go=setImmediate:pb?go=process.nextTick:go=db;var yo=hb(go);function zR(t){return of(t)?function(...e){let n=e.pop(),r=t.apply(this,e);return ab(r,n)}:BR(function(e,n){var r;try{r=t.apply(this,e)}catch(i){return n(i)}if(r&&typeof r.then=="function")return ab(r,n);n(null,r)})}function ab(t,e){return t.then(n=>{lb(e,null,n)},n=>{lb(e,n&&(n instanceof Error||n.message)?n:new Error(n))})}function lb(t,e,n){try{t(e,n)}catch(r){yo(i=>{throw i},r)}}function of(t){return t[Symbol.toStringTag]==="AsyncFunction"}function UR(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function $R(t){return typeof t[Symbol.asyncIterator]=="function"}function re(t){if(typeof t!="function")throw new Error("expected a function");return of(t)?zR(t):t}function U(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");function n(...r){return typeof r[e-1]=="function"?t.apply(this,r):new Promise((i,o)=>{r[e-1]=(s,...a)=>{if(s)return o(s);i(a.length>1?a:a[0])},t.apply(this,r)})}return n}function mb(t){return function(n,...r){return U(function(o){var s=this;return t(n,(a,u)=>{re(a).apply(s,r.concat(u))},o)})}}function sf(t,e,n,r){e=e||[];var i=[],o=0,s=re(n);return t(e,(a,u,l)=>{var c=o++;s(a,(f,p)=>{i[c]=p,l(f)})},a=>{r(a,i)})}function Ma(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}var Fa={};function Qr(t){function e(...n){if(t!==null){var r=t;t=null,r.apply(this,n)}}return Object.assign(e,t),e}function HR(t){return t[Symbol.iterator]&&t[Symbol.iterator]()}function VR(t){var e=-1,n=t.length;return function(){return++e<n?{value:t[e],key:e}:null}}function GR(t){var e=-1;return function(){var r=t.next();return r.done?null:(e++,{value:r.value,key:e})}}function KR(t){var e=t?Object.keys(t):[],n=-1,r=e.length;return function i(){var o=e[++n];return o==="__proto__"?i():n<r?{value:t[o],key:o}:null}}function YR(t){if(Ma(t))return VR(t);var e=HR(t);return e?GR(e):KR(t)}function sr(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var n=t;t=null,n.apply(this,e)}}function ub(t,e,n,r){let i=!1,o=!1,s=!1,a=0,u=0;function l(){a>=e||s||i||(s=!0,t.next().then(({value:p,done:d})=>{if(!(o||i)){if(s=!1,d){i=!0,a<=0&&r(null);return}a++,n(p,u,c),u++,l()}}).catch(f))}function c(p,d){if(a-=1,!o){if(p)return f(p);if(p===!1){i=!0,o=!0;return}if(d===Fa||i&&a<=0)return i=!0,r(null);l()}}function f(p){o||(s=!1,i=!0,r(p))}l()}var Rt=t=>(e,n,r)=>{if(r=Qr(r),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return r(null);if(UR(e))return ub(e,t,n,r);if($R(e))return ub(e[Symbol.asyncIterator](),t,n,r);var i=YR(e),o=!1,s=!1,a=0,u=!1;function l(f,p){if(!s)if(a-=1,f)o=!0,r(f);else if(f===!1)o=!0,s=!0;else{if(p===Fa||o&&a<=0)return o=!0,r(null);u||c()}}function c(){for(u=!0;a<t&&!o;){var f=i();if(f===null){o=!0,a<=0&&r(null);return}a+=1,n(f.value,f.key,sr(l))}u=!1}c()};function QR(t,e,n,r){return Rt(e)(t,re(n),r)}var gb=U(QR,4);function ZR(t,e,n){n=Qr(n);var r=0,i=0,{length:o}=t,s=!1;o===0&&n(null);function a(u,l){u===!1&&(s=!0),s!==!0&&(u?n(u):(++i===o||l===Fa)&&n(null))}for(;r<o;r++)e(t[r],r,sr(a))}function JR(t,e,n){return gb(t,1/0,e,n)}function XR(t,e,n){var r=Ma(t)?ZR:JR;return r(t,re(e),n)}var ar=U(XR,3);function eA(t,e,n){return sf(ar,t,e,n)}var yb=U(eA,3),J6=mb(yb);function tA(t,e,n){return gb(t,1,e,n)}var Zr=U(tA,3);function nA(t,e,n){return sf(Zr,t,e,n)}var rA=U(nA,3),X6=mb(rA);var rf=class{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,n){n.prev=e,n.next=e.next,e.next?e.next.prev=n:this.tail=n,e.next=n,this.length+=1}insertBefore(e,n){n.prev=e.prev,n.next=e,e.prev?e.prev.next=n:this.head=n,e.prev=n,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):cb(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):cb(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var n=this.head;n;){var{next:r}=n;e(n)&&this.removeLink(n),n=r}return this}};function cb(t,e){t.length=1,t.head=t.tail=e}function iA(t,e,n){if(e==null)e=1;else if(e===0)throw new RangeError("Concurrency must not be zero");var r=re(t),i=0,o=[];let s={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(h,m){s[h].push(m)}function u(h,m){let w=(...T)=>{l(h,w),m(...T)};s[h].push(w)}function l(h,m){if(!h)return Object.keys(s).forEach(w=>s[w]=[]);if(!m)return s[h]=[];s[h]=s[h].filter(w=>w!==m)}function c(h,...m){s[h].forEach(w=>w(...m))}var f=!1;function p(h,m,w,T){if(T!=null&&typeof T!="function")throw new Error("task callback must be a function");y.started=!0;var v,E;function L(I,...N){if(I)return w?E(I):v();if(N.length<=1)return v(N[0]);v(N)}var k=y._createTaskItem(h,w?L:T||L);if(m?y._tasks.unshift(k):y._tasks.push(k),f||(f=!0,yo(()=>{f=!1,y.process()})),w||!T)return new Promise((I,N)=>{v=I,E=N})}function d(h){return function(m,...w){i-=1;for(var T=0,v=h.length;T<v;T++){var E=h[T],L=o.indexOf(E);L===0?o.shift():L>0&&o.splice(L,1),E.callback(m,...w),m!=null&&c("error",m,E.data)}i<=y.concurrency-y.buffer&&c("unsaturated"),y.idle()&&c("drain"),y.process()}}function b(h){return h.length===0&&y.idle()?(yo(()=>c("drain")),!0):!1}let g=h=>m=>{if(!m)return new Promise((w,T)=>{u(h,(v,E)=>{if(v)return T(v);w(E)})});l(h),a(h,m)};var S=!1,y={_tasks:new rf,_createTaskItem(h,m){return{data:h,callback:m}},*[Symbol.iterator](){yield*y._tasks[Symbol.iterator]()},concurrency:e,payload:n,buffer:e/4,started:!1,paused:!1,push(h,m){return Array.isArray(h)?b(h)?void 0:h.map(w=>p(w,!1,!1,m)):p(h,!1,!1,m)},pushAsync(h,m){return Array.isArray(h)?b(h)?void 0:h.map(w=>p(w,!1,!0,m)):p(h,!1,!0,m)},kill(){l(),y._tasks.empty()},unshift(h,m){return Array.isArray(h)?b(h)?void 0:h.map(w=>p(w,!0,!1,m)):p(h,!0,!1,m)},unshiftAsync(h,m){return Array.isArray(h)?b(h)?void 0:h.map(w=>p(w,!0,!0,m)):p(h,!0,!0,m)},remove(h){y._tasks.remove(h)},process(){if(!S){for(S=!0;!y.paused&&i<y.concurrency&&y._tasks.length;){var h=[],m=[],w=y._tasks.length;y.payload&&(w=Math.min(w,y.payload));for(var T=0;T<w;T++){var v=y._tasks.shift();h.push(v),o.push(v),m.push(v.data)}i+=1,y._tasks.length===0&&c("empty"),i===y.concurrency&&c("saturated");var E=sr(d(h));r(m,E)}S=!1}},length(){return y._tasks.length},running(){return i},workersList(){return o},idle(){return y._tasks.length+i===0},pause(){y.paused=!0},resume(){y.paused!==!1&&(y.paused=!1,yo(y.process))}};return Object.defineProperties(y,{saturated:{writable:!1,value:g("saturated")},unsaturated:{writable:!1,value:g("unsaturated")},empty:{writable:!1,value:g("empty")},drain:{writable:!1,value:g("drain")},error:{writable:!1,value:g("error")}}),y}function oA(t,e,n,r){r=Qr(r);var i=re(n);return Zr(t,(o,s,a)=>{i(e,o,(u,l)=>{e=l,a(u)})},o=>r(o,e))}var e5=U(oA,4);function sA(t,e,n,r){return sf(Rt(e),t,n,r)}var bb=U(sA,4);function aA(t,e,n,r){var i=re(n);return bb(t,e,(o,s)=>{i(o,(a,...u)=>a?s(a):s(a,u))},(o,s)=>{for(var a=[],u=0;u<s.length;u++)s[u]&&(a=a.concat(...s[u]));return r(o,a)})}var xb=U(aA,4);function lA(t,e,n){return xb(t,1/0,e,n)}var t5=U(lA,3);function uA(t,e,n){return xb(t,1,e,n)}var n5=U(uA,3);function Kt(t,e){return(n,r,i,o)=>{var s=!1,a;let u=re(i);n(r,(l,c,f)=>{u(l,(p,d)=>{if(p||p===!1)return f(p);if(t(d)&&!a)return s=!0,a=e(!0,l),f(null,Fa);f()})},l=>{if(l)return o(l);o(null,s?a:e(!1))})}}function cA(t,e,n){return Kt(r=>r,(r,i)=>i)(ar,t,e,n)}var r5=U(cA,3);function fA(t,e,n,r){return Kt(i=>i,(i,o)=>o)(Rt(e),t,n,r)}var i5=U(fA,4);function pA(t,e,n){return Kt(r=>r,(r,i)=>i)(Rt(1),t,e,n)}var o5=U(pA,3);function _b(t){return(e,...n)=>re(e)(...n,(r,...i)=>{typeof console=="object"&&(r?console.error&&console.error(r):console[t]&&i.forEach(o=>console[t](o)))})}var s5=_b("dir");function dA(t,e,n){n=sr(n);var r=re(t),i=re(e),o;function s(u,...l){if(u)return n(u);u!==!1&&(o=l,i(...l,a))}function a(u,l){if(u)return n(u);if(u!==!1){if(!l)return n(null,...o);r(s)}}return a(null,!0)}var a5=U(dA,3);function wb(t){return(e,n,r)=>t(e,r)}function hA(t,e,n){return ar(t,wb(re(e)),n)}var l5=U(hA,3);function mA(t,e,n,r){return Rt(e)(t,wb(re(n)),r)}var gA=U(mA,4);function yA(t,e,n){return gA(t,1,e,n)}var bA=U(yA,3);function xA(t){return of(t)?t:function(...e){var n=e.pop(),r=!0;e.push((...i)=>{r?yo(()=>n(...i)):n(...i)}),t.apply(this,e),r=!1}}function _A(t,e,n){return Kt(r=>!r,r=>!r)(ar,t,e,n)}var u5=U(_A,3);function wA(t,e,n,r){return Kt(i=>!i,i=>!i)(Rt(e),t,n,r)}var c5=U(wA,4);function vA(t,e,n){return Kt(r=>!r,r=>!r)(Zr,t,e,n)}var f5=U(vA,3);function SA(t,e,n,r){var i=new Array(e.length);t(e,(o,s,a)=>{n(o,(u,l)=>{i[s]=!!l,a(u)})},o=>{if(o)return r(o);for(var s=[],a=0;a<e.length;a++)i[a]&&s.push(e[a]);r(null,s)})}function EA(t,e,n,r){var i=[];t(e,(o,s,a)=>{n(o,(u,l)=>{if(u)return a(u);l&&i.push({index:s,value:o}),a(u)})},o=>{if(o)return r(o);r(null,i.sort((s,a)=>s.index-a.index).map(s=>s.value))})}function qa(t,e,n,r){var i=Ma(e)?SA:EA;return i(t,e,re(n),r)}function kA(t,e,n){return qa(ar,t,e,n)}var p5=U(kA,3);function DA(t,e,n,r){return qa(Rt(e),t,n,r)}var d5=U(DA,4);function TA(t,e,n){return qa(Zr,t,e,n)}var h5=U(TA,3);function RA(t,e){var n=sr(e),r=re(xA(t));function i(o){if(o)return n(o);o!==!1&&r(i)}return i()}var m5=U(RA,2);function AA(t,e,n,r){var i=re(n);return bb(t,e,(o,s)=>{i(o,(a,u)=>a?s(a):s(a,{key:u,val:o}))},(o,s)=>{for(var a={},{hasOwnProperty:u}=Object.prototype,l=0;l<s.length;l++)if(s[l]){var{key:c}=s[l],{val:f}=s[l];u.call(a,c)?a[c].push(f):a[c]=[f]}return r(o,a)})}var g5=U(AA,4);var y5=_b("log");function CA(t,e,n,r){r=Qr(r);var i={},o=re(n);return Rt(e)(t,(s,a,u)=>{o(s,a,(l,c)=>{if(l)return u(l);i[a]=c,u(l)})},s=>r(s,i))}var b5=U(CA,4);var Na;pb?Na=process.nextTick:fb?Na=setImmediate:Na=db;var x5=hb(Na),_5=U((t,e,n)=>{var r=Ma(e)?[]:{};t(e,(i,o,s)=>{re(i)((a,...u)=>{u.length<2&&([u]=u),r[o]=u,s(a)})},i=>n(i,r))},3);function af(t,e){var n=re(t);return iA((r,i)=>{n(r[0],i)},e,1)}function IA(t,e){if(e=Qr(e),!Array.isArray(t))return e(new TypeError("First argument to race must be an array of functions"));if(!t.length)return e();for(var n=0,r=t.length;n<r;n++)re(t[n])(e)}var w5=U(IA,2);function lf(t,e,n,r){let i=re(n);return qa(t,e,(o,s)=>{i(o,(a,u)=>{s(a,!u)})},r)}function OA(t,e,n){return lf(ar,t,e,n)}var v5=U(OA,3);function PA(t,e,n,r){return lf(Rt(e),t,n,r)}var S5=U(PA,4);function LA(t,e,n){return lf(Zr,t,e,n)}var E5=U(LA,3);function NA(t,e,n){return Kt(Boolean,r=>r)(ar,t,e,n)}var k5=U(NA,3);function MA(t,e,n,r){return Kt(Boolean,i=>i)(Rt(e),t,n,r)}var D5=U(MA,4);function FA(t,e,n){return Kt(Boolean,r=>r)(Zr,t,e,n)}var T5=U(FA,3);function qA(t,e,n){var r=re(e);return yb(t,(o,s)=>{r(o,(a,u)=>{if(a)return s(a);s(a,{value:o,criteria:u})})},(o,s)=>{if(o)return n(o);n(null,s.sort(i).map(a=>a.value))});function i(o,s){var a=o.criteria,u=s.criteria;return a<u?-1:a>u?1:0}}var R5=U(qA,3);function jA(t,e){var n=null,r;return bA(t,(i,o)=>{re(i)((s,...a)=>{if(s===!1)return o(s);a.length<2?[r]=a:r=a,n=s,o(s?null:{})})},()=>e(n,r))}var A5=U(jA);function BA(t,e,n){n=sr(n);var r=re(e),i=re(t),o=[];function s(u,...l){if(u)return n(u);o=l,u!==!1&&i(a)}function a(u,l){if(u)return n(u);if(u!==!1){if(!l)return n(null,...o);r(s)}}return i(a)}var C5=U(BA,3);function WA(t,e){if(e=Qr(e),!Array.isArray(t))return e(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return e();var n=0;function r(o){var s=re(t[n++]);s(...o,sr(i))}function i(o,...s){if(o!==!1){if(o||n===t.length)return e(o,...s);r(s)}}r([])}var I5=U(WA);import{dirname as sN,relative as aN,resolve as lN}from"path";import zA from"util";var UA={ABORTED:"archive was aborted",DIRECTORYDIRPATHREQUIRED:"diretory dirpath argument must be a non-empty string value",DIRECTORYFUNCTIONINVALIDDATA:"invalid data returned by directory custom data function",ENTRYNAMEREQUIRED:"entry name must be a non-empty string value",FILEFILEPATHREQUIRED:"file filepath argument must be a non-empty string value",FINALIZING:"archive already finalizing",QUEUECLOSED:"queue closed",NOENDMETHOD:"no suitable finalize/end method defined by module",DIRECTORYNOTSUPPORTED:"support for directory entries not defined by module",FORMATSET:"archive format already set",INPUTSTEAMBUFFERREQUIRED:"input source must be valid Stream or Buffer instance",MODULESET:"module already set",SYMLINKNOTSUPPORTED:"support for symlink entries not defined by module",SYMLINKFILEPATHREQUIRED:"symlink filepath argument must be a non-empty string value",SYMLINKTARGETREQUIRED:"symlink target argument must be a non-empty string value",ENTRYNOTSUPPORTED:"entry not supported"};function me(t,e){Error.captureStackTrace(this,this.constructor),this.message=UA[t]||t,this.code=t,this.data=e}zA.inherits(me,Error);var Cw=ae(br(),1);var Ew=ae(yl(),1),kw=ae(br(),1);function Dw(t){return t=t||new Date,t instanceof Date?t=t:typeof t=="string"?t=new Date(t):t=new Date,t}function Tw(t){return t===null?Buffer.alloc(0):typeof t=="string"?Buffer.from(t):yn(t)?t.pipe(new kw.PassThrough):t}function Rw(t){return(0,Ew.default)(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")}function wp(t){return t.slice(-1)!=="/"?t+"/":t}var{ReaddirGlob:uN}=Mc,vp=process.platform==="win32",Lo=class extends Cw.Transform{_supportsDirectory=!1;_supportsSymlink=!1;constructor(e){e={highWaterMark:1024*1024,statConcurrency:4,...e},super(e),this.options=e,this._format=!1,this._module=!1,this._pending=0,this._pointer=0,this._entriesCount=0,this._entriesProcessedCount=0,this._fsEntriesTotalBytes=0,this._fsEntriesProcessedBytes=0,this._queue=af(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=af(this._onStatQueueTask.bind(this),e.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]}_abort(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()}_append(e,n){n=n||{};let r={source:null,filepath:e};n.name||(n.name=e),n.sourcePath=e,r.data=n,this._entriesCount++,n.stats&&n.stats instanceof oN?(r=this._updateQueueTaskWithStats(r,n.stats),r&&(n.stats.size&&(this._fsEntriesTotalBytes+=n.stats.size),this._queue.push(r))):this._statQueue.push(r)}_finalize(){this._state.finalizing||this._state.finalized||this._state.aborted||(this._state.finalizing=!0,this._moduleFinalize(),this._state.finalizing=!1,this._state.finalized=!0)}_maybeFinalize(){return this._state.finalizing||this._state.finalized||this._state.aborted?!1:this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()?(this._finalize(),!0):!1}_moduleAppend(e,n,r){if(this._state.aborted){r();return}this._module.append(e,n,function(i){if(this._task=null,this._state.aborted){this._shutdown();return}if(i){this.emit("error",i),setImmediate(r);return}this.emit("entry",n),this._entriesProcessedCount++,n.stats&&n.stats.size&&(this._fsEntriesProcessedBytes+=n.stats.size),this.emit("progress",{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),setImmediate(r)}.bind(this))}_moduleFinalize(){typeof this._module.finalize=="function"?this._module.finalize():typeof this._module.end=="function"?this._module.end():this.emit("error",new me("NOENDMETHOD"))}_modulePipe(){this._module.on("error",this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0}_moduleUnpipe(){this._module.unpipe(this),this._state.modulePiped=!1}_normalizeEntryData(e,n){e={type:"file",name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1,...e},n&&e.stats===!1&&(e.stats=n);let r=e.type==="directory";return e.name&&(typeof e.prefix=="string"&&e.prefix!==""&&(e.name=e.prefix+"/"+e.name,e.prefix=null),e.name=Rw(e.name),e.type!=="symlink"&&e.name.slice(-1)==="/"?(r=!0,e.type="directory"):r&&(e.name+="/")),typeof e.mode=="number"?vp?e.mode&=511:e.mode&=4095:e.stats&&e.mode===null?(vp?e.mode=e.stats.mode&511:e.mode=e.stats.mode&4095,vp&&r&&(e.mode=493)):e.mode===null&&(e.mode=r?493:420),e.stats&&e.date===null?e.date=e.stats.mtime:e.date=Dw(e.date),e}_onModuleError(e){this.emit("error",e)}_onQueueDrain(){this._state.finalizing||this._state.finalized||this._state.aborted||this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize()}_onQueueTask(e,n){let r=()=>{e.data.callback&&e.data.callback(),n()};if(this._state.finalizing||this._state.finalized||this._state.aborted){r();return}this._task=e,this._moduleAppend(e.source,e.data,r)}_onStatQueueTask(e,n){if(this._state.finalizing||this._state.finalized||this._state.aborted){n();return}rN(e.filepath,function(r,i){if(this._state.aborted){setImmediate(n);return}if(r){this._entriesCount--,this.emit("warning",r),setImmediate(n);return}e=this._updateQueueTaskWithStats(e,i),e&&(i.size&&(this._fsEntriesTotalBytes+=i.size),this._queue.push(e)),setImmediate(n)}.bind(this))}_shutdown(){this._moduleUnpipe(),this.end()}_transform(e,n,r){e&&(this._pointer+=e.length),r(null,e)}_updateQueueTaskWithStats(e,n){if(n.isFile())e.data.type="file",e.data.sourceType="stream",e.source=new Aw.Readable(function(){return nN(e.filepath)});else if(n.isDirectory()&&this._supportsDirectory)e.data.name=wp(e.data.name),e.data.type="directory",e.data.sourcePath=wp(e.filepath),e.data.sourceType="buffer",e.source=Buffer.concat([]);else if(n.isSymbolicLink()&&this._supportsSymlink){let r=iN(e.filepath),i=sN(e.filepath);e.data.type="symlink",e.data.linkname=aN(i,lN(i,r)),e.data.sourceType="buffer",e.source=Buffer.concat([])}else return n.isDirectory()?this.emit("warning",new me("DIRECTORYNOTSUPPORTED",e.data)):n.isSymbolicLink()?this.emit("warning",new me("SYMLINKNOTSUPPORTED",e.data)):this.emit("warning",new me("ENTRYNOTSUPPORTED",e.data)),null;return e.data=this._normalizeEntryData(e.data,n),e}abort(){return this._state.aborted||this._state.finalized?this:(this._abort(),this)}append(e,n){if(this._state.finalize||this._state.aborted)return this.emit("error",new me("QUEUECLOSED")),this;if(n=this._normalizeEntryData(n),typeof n.name!="string"||n.name.length===0)return this.emit("error",new me("ENTRYNAMEREQUIRED")),this;if(n.type==="directory"&&!this._supportsDirectory)return this.emit("error",new me("DIRECTORYNOTSUPPORTED",{name:n.name})),this;if(e=Tw(e),Buffer.isBuffer(e))n.sourceType="buffer";else if(yn(e))n.sourceType="stream";else return this.emit("error",new me("INPUTSTEAMBUFFERREQUIRED",{name:n.name})),this;return this._entriesCount++,this._queue.push({data:n,source:e}),this}directory(e,n,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new me("QUEUECLOSED")),this;if(typeof e!="string"||e.length===0)return this.emit("error",new me("DIRECTORYDIRPATHREQUIRED")),this;this._pending++,n===!1?n="":typeof n!="string"&&(n=e);var i=!1;typeof r=="function"?(i=r,r={}):typeof r!="object"&&(r={});var o={stat:!0,dot:!0};function s(){this._pending--,this._maybeFinalize()}function a(c){this.emit("error",c)}function u(c){l.pause();let f=!1,p=Object.assign({},r);p.name=c.relative,p.prefix=n,p.stats=c.stat,p.callback=l.resume.bind(l);try{if(i){if(p=i(p),p===!1)f=!0;else if(typeof p!="object")throw new me("DIRECTORYFUNCTIONINVALIDDATA",{dirpath:e})}}catch(d){this.emit("error",d);return}if(f){l.resume();return}this._append(c.absolute,p)}let l=Mc(e,o);return l.on("error",a.bind(this)),l.on("match",u.bind(this)),l.on("end",s.bind(this)),this}file(e,n){return this._state.finalize||this._state.aborted?(this.emit("error",new me("QUEUECLOSED")),this):typeof e!="string"||e.length===0?(this.emit("error",new me("FILEFILEPATHREQUIRED")),this):(this._append(e,n),this)}glob(e,n,r){this._pending++,n={stat:!0,pattern:e,...n};function i(){this._pending--,this._maybeFinalize()}function o(u){this.emit("error",u)}function s(u){a.pause();let l=Object.assign({},r);l.callback=a.resume.bind(a),l.stats=u.stat,l.name=u.relative,this._append(u.absolute,l)}let a=new uN(n.cwd||".",n);return a.on("error",o.bind(this)),a.on("match",s.bind(this)),a.on("end",i.bind(this)),this}finalize(){if(this._state.aborted){var e=new me("ABORTED");return this.emit("error",e),Promise.reject(e)}if(this._state.finalize){var n=new me("FINALIZING");return this.emit("error",n),Promise.reject(n)}this._state.finalize=!0,this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var r=this;return new Promise(function(i,o){var s;r._module.on("end",function(){s||i()}),r._module.on("error",function(a){s=!0,o(a)})})}symlink(e,n,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new me("QUEUECLOSED")),this;if(typeof e!="string"||e.length===0)return this.emit("error",new me("SYMLINKFILEPATHREQUIRED")),this;if(typeof n!="string"||n.length===0)return this.emit("error",new me("SYMLINKTARGETREQUIRED",{filepath:e})),this;if(!this._supportsSymlink)return this.emit("error",new me("SYMLINKNOTSUPPORTED",{filepath:e})),this;var i={};return i.type="symlink",i.name=e.replace(/\\/g,"/"),i.linkname=n.replace(/\\/g,"/"),i.sourceType="buffer",typeof r=="number"&&(i.mode=r),this._entriesCount++,this._queue.push({data:i,source:Buffer.concat([])}),this}pointer(){return this._pointer}};var kn=class{getName(){}getSize(){}getLastModifiedDate(){}isDirectory(){}};var nv=ae(yl(),1);function Iw(t,e){e=e||!1;var n=e?t.getFullYear():t.getUTCFullYear();if(n<1980)return 2162688;if(n>=2044)return 2141175677;var r={year:n,month:e?t.getMonth():t.getUTCMonth(),date:e?t.getDate():t.getUTCDate(),hours:e?t.getHours():t.getUTCHours(),minutes:e?t.getMinutes():t.getUTCMinutes(),seconds:e?t.getSeconds():t.getUTCSeconds()};return r.year-1980<<25|r.month+1<<21|r.date<<16|r.hours<<11|r.minutes<<5|r.seconds/2}function Ow(t){return new Date((t>>25&127)+1980,(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(t&31)<<1)}function lt(t){var e=Buffer.alloc(8);return e.writeUInt32LE(t%4294967296,0),e.writeUInt32LE(t/4294967296|0,4),e}function ge(t){var e=Buffer.alloc(2);return e.writeUInt16LE((t&65535)>>>0,0),e}function Pw(t,e){return t.readUInt16LE(e)}function fe(t){var e=Buffer.alloc(4);return e.writeUInt32LE((t&4294967295)>>>0,0),e}var Lw=8,Nw=1,cN=4,fN=2,Mw=64,Fw=2048,pi=class t{constructor(){return this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this}encode(){return ge((this.descriptor?Lw:0)|(this.utf8?Fw:0)|(this.encryption?Nw:0)|(this.strongEncryption?Mw:0))}static parse(e,n){var r=Pw(e,n),i=new t;return i.useDataDescriptor((r&Lw)!==0),i.useUTF8ForNames((r&Fw)!==0),i.useStrongEncryption((r&Mw)!==0),i.useEncryption((r&Nw)!==0),i.setSlidingDictionarySize((r&fN)!==0?8192:4096),i.setNumberOfShannonFanoTrees((r&cN)!==0?3:2),i}setNumberOfShannonFanoTrees(e){this.numberOfShannonFanoTrees=e}getNumberOfShannonFanoTrees(){return this.numberOfShannonFanoTrees}setSlidingDictionarySize(e){this.slidingDictionarySize=e}getSlidingDictionarySize(){return this.slidingDictionarySize}useDataDescriptor(e){this.descriptor=e}usesDataDescriptor(){return this.descriptor}useEncryption(e){this.encryption=e}usesEncryption(){return this.encryption}useStrongEncryption(e){this.strongEncryption=e}usesStrongEncryption(){return this.strongEncryption}useUTF8ForNames(e){this.utf8=e}usesUTF8ForNames(){return this.utf8}};var Sp={PERM_MASK:4095,FILE_TYPE_FLAG:61440,LINK_FLAG:40960,FILE_FLAG:32768,DIR_FLAG:16384,DEFAULT_LINK_PERM:511,DEFAULT_DIR_PERM:493,DEFAULT_FILE_PERM:420};var qw=Buffer.alloc(0);var jw=65535,Ep=16,bl=Buffer.from(Array(2));var xr=Buffer.from(Array(4)),Bw=10,kp=20,No=45,Ww=45,xl=0,Mo=8,Dp=3,zw=0,Uw=67324752,$w=134695760,Hw=33639248,Vw=101010256,Gw=101075792,Kw=117853008,Tp=65535,ut=4294967295,Yw=1;var Qw=1;var Zw=4095;var Jw=16384;var Xw=32768;var ev=32,tv=16;var di=class extends kn{constructor(e){super(),this.platform=zw,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new pi,this.crc=0,this.time=-1,this.minver=Bw,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,e&&this.setName(e)}getCentralDirectoryExtra(){return this.getExtra()}getComment(){return this.comment!==null?this.comment:""}getCompressedSize(){return this.csize}getCrc(){return this.crc}getExternalAttributes=function(){return this.exattr};getExtra(){return this.extra!==null?this.extra:qw}getGeneralPurposeBit(){return this.gpb}getInternalAttributes(){return this.inattr}getLastModifiedDate(){return this.getTime()}getLocalFileDataExtra(){return this.getExtra()}getMethod(){return this.method}getName(){return this.name}getPlatform(){return this.platform}getSize(){return this.size}getTime(){return this.time!==-1?Ow(this.time):-1}getTimeDos(){return this.time!==-1?this.time:0}getUnixMode(){return this.platform!==Dp?0:this.getExternalAttributes()>>Ep&jw}getVersionNeededToExtract(){return this.minver}setComment(e){Buffer.byteLength(e)!==e.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.comment=e}setCompressedSize(e){if(e<0)throw new Error("invalid entry compressed size");this.csize=e}setCrc(e){if(e<0)throw new Error("invalid entry crc32");this.crc=e}setExternalAttributes(e){this.exattr=e>>>0}setExtra(e){this.extra=e}setGeneralPurposeBit(e){if(!(e instanceof pi))throw new Error("invalid entry GeneralPurposeBit");this.gpb=e}setInternalAttributes(e){this.inattr=e}setMethod(e){if(e<0)throw new Error("invalid entry compression method");this.method=e}setName(e,n=!1){e=(0,nv.default)(e,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,""),n&&(e=`/${e}`),Buffer.byteLength(e)!==e.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.name=e}setPlatform(e){this.platform=e}setSize(e){if(e<0)throw new Error("invalid entry size");this.size=e}setTime(e,n){if(!(e instanceof Date))throw new Error("invalid entry time");this.time=Iw(e,n)}setUnixMode(e){e|=this.isDirectory()?Jw:Xw;var n=0;n|=e<<Ep|(this.isDirectory()?tv:ev),this.setExternalAttributes(n),this.mode=e&Zw,this.platform=Dp}setVersionNeededToExtract(e){this.minver=e}isDirectory(){return this.getName().slice(-1)==="/"}isUnixSymlink(){return(this.getUnixMode()&Sp.FILE_TYPE_FLAG)===Sp.LINK_FLAG}isZip64(){return this.csize>ut||this.size>ut}};var ov=ae(br(),1);var rv=ae(br(),1);function iv(t){if(t===null)return Buffer.alloc(0);if(typeof t=="string")return Buffer.from(t);if(yn(t)&&!t._readableState){var e=new rv.PassThrough;return t.pipe(e),e}return t}var hi=class extends ov.Transform{constructor(e){super(e),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}}_appendBuffer(e,n,r){}_appendStream(e,n,r){}_emitErrorCallback=function(e){e&&this.emit("error",e)};_finish(e){}_normalizeEntry(e){}_transform(e,n,r){r(null,e)}entry(e,n,r){if(n=n||null,typeof r!="function"&&(r=this._emitErrorCallback.bind(this)),!(e instanceof kn)){r(new Error("not a valid instance of ArchiveEntry"));return}if(this._archive.finish||this._archive.finished){r(new Error("unacceptable entry after finish"));return}if(this._archive.processing){r(new Error("already processing an entry"));return}if(this._archive.processing=!0,this._normalizeEntry(e),this._entry=e,n=iv(n),Buffer.isBuffer(n))this._appendBuffer(e,n,r);else if(yn(n))this._appendStream(e,n,r);else{this._archive.processing=!1,r(new Error("input source must be valid Stream or Buffer instance"));return}return this}finish(){if(this._archive.processing){this._archive.finish=!0;return}this._finish()}getBytesWritten(){return this.offset}write(e,n){return e&&(this.offset+=e.length),super.write(e,n)}};var cv=ae(_l(),1);var av=ae(br(),1),lv=ae(_l(),1),mi=class extends av.Transform{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(e,n,r){e&&(this.checksum=lv.default.buf(e,this.checksum)>>>0,this.rawSize+=e.length),r(null,e)}digest(e){let n=Buffer.allocUnsafe(4);return n.writeUInt32BE(this.checksum>>>0,0),e?n.toString(e):n}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}};var uv=ae(_l(),1);import{DeflateRaw as pN}from"zlib";var gi=class extends pN{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(e,n){return e&&(this.compressedSize+=e.length),super.push(e,n)}_transform(e,n,r){e&&(this.checksum=uv.default.buf(e,this.checksum)>>>0,this.rawSize+=e.length),super._transform(e,n,r)}digest(e){let n=Buffer.allocUnsafe(4);return n.writeUInt32BE(this.checksum>>>0,0),e?n.toString(e):n}hex(){return this.digest("hex").toUpperCase()}size(e=!1){return e?this.compressedSize:this.rawSize}};function dN(t){return typeof t!="object"&&(t={}),typeof t.zlib!="object"&&(t.zlib={}),typeof t.zlib.level!="number"&&(t.zlib.level=Qw),t.forceZip64=!!t.forceZip64,t.forceLocalTime=!!t.forceLocalTime,t}var yi=class extends hi{constructor(e){let n=dN(e);super(n),this.options=n,this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:"",finish:!1,finished:!1,processing:!1,forceZip64:n.forceZip64,forceLocalTime:n.forceLocalTime}}_afterAppend(e){this._entries.push(e),e.getGeneralPurposeBit().usesDataDescriptor()&&this._writeDataDescriptor(e),this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished&&this._finish()}_appendBuffer(e,n,r){n.length===0&&e.setMethod(xl);var i=e.getMethod();if(i===xl&&(e.setSize(n.length),e.setCompressedSize(n.length),e.setCrc(cv.default.buf(n)>>>0)),this._writeLocalFileHeader(e),i===xl){this.write(n),this._afterAppend(e),r(null,e);return}else if(i===Mo){this._smartStream(e,r).end(n);return}else{r(new Error("compression method "+i+" not implemented"));return}}_appendStream(e,n,r){e.getGeneralPurposeBit().useDataDescriptor(!0),e.setVersionNeededToExtract(kp),this._writeLocalFileHeader(e);var i=this._smartStream(e,r);n.once("error",function(o){i.emit("error",o),i.end()}),n.pipe(i)}_finish(){this._archive.centralOffset=this.offset,this._entries.forEach(function(e){this._writeCentralFileHeader(e)}.bind(this)),this._archive.centralLength=this.offset-this._archive.centralOffset,this.isZip64()&&this._writeCentralDirectoryZip64(),this._writeCentralDirectoryEnd(),this._archive.processing=!1,this._archive.finish=!0,this._archive.finished=!0,this.end()}_normalizeEntry(e){e.getMethod()===-1&&e.setMethod(Mo),e.getMethod()===Mo&&(e.getGeneralPurposeBit().useDataDescriptor(!0),e.setVersionNeededToExtract(kp)),e.getTime()===-1&&e.setTime(new Date,this._archive.forceLocalTime),e._offsets={file:0,data:0,contents:0}}_smartStream(e,n){var r=e.getMethod()===Mo,i=r?new gi(this.options.zlib):new mi,o=null;function s(){var a=i.digest().readUInt32BE(0);e.setCrc(a),e.setSize(i.size()),e.setCompressedSize(i.size(!0)),this._afterAppend(e),n(o,e)}return i.once("end",s.bind(this)),i.once("error",function(a){o=a}),i.pipe(this,{end:!1}),i}_writeCentralDirectoryEnd(){var e=this._entries.length,n=this._archive.centralLength,r=this._archive.centralOffset;this.isZip64()&&(e=Tp,n=ut,r=ut),this.write(fe(Vw)),this.write(bl),this.write(bl),this.write(ge(e)),this.write(ge(e)),this.write(fe(n)),this.write(fe(r));var i=this.getComment(),o=Buffer.byteLength(i);this.write(ge(o)),this.write(i)}_writeCentralDirectoryZip64(){this.write(fe(Gw)),this.write(lt(44)),this.write(ge(No)),this.write(ge(No)),this.write(xr),this.write(xr),this.write(lt(this._entries.length)),this.write(lt(this._entries.length)),this.write(lt(this._archive.centralLength)),this.write(lt(this._archive.centralOffset)),this.write(fe(Kw)),this.write(xr),this.write(lt(this._archive.centralOffset+this._archive.centralLength)),this.write(fe(1))}_writeCentralFileHeader(e){var n=e.getGeneralPurposeBit(),r=e.getMethod(),i=e._offsets.file,o=e.getSize(),s=e.getCompressedSize();if(e.isZip64()||i>ut){o=ut,s=ut,i=ut,e.setVersionNeededToExtract(No);var a=Buffer.concat([ge(Yw),ge(24),lt(e.getSize()),lt(e.getCompressedSize()),lt(e._offsets.file)],28);e.setExtra(a)}this.write(fe(Hw)),this.write(ge(e.getPlatform()<<8|Ww)),this.write(ge(e.getVersionNeededToExtract())),this.write(n.encode()),this.write(ge(r)),this.write(fe(e.getTimeDos())),this.write(fe(e.getCrc())),this.write(fe(s)),this.write(fe(o));var u=e.getName(),l=e.getComment(),c=e.getCentralDirectoryExtra();n.usesUTF8ForNames()&&(u=Buffer.from(u),l=Buffer.from(l)),this.write(ge(u.length)),this.write(ge(c.length)),this.write(ge(l.length)),this.write(bl),this.write(ge(e.getInternalAttributes())),this.write(fe(e.getExternalAttributes())),this.write(fe(i)),this.write(u),this.write(c),this.write(l)}_writeDataDescriptor(e){this.write(fe($w)),this.write(fe(e.getCrc())),e.isZip64()?(this.write(lt(e.getCompressedSize())),this.write(lt(e.getSize()))):(this.write(fe(e.getCompressedSize())),this.write(fe(e.getSize())))}_writeLocalFileHeader(e){var n=e.getGeneralPurposeBit(),r=e.getMethod(),i=e.getName(),o=e.getLocalFileDataExtra();e.isZip64()&&(n.useDataDescriptor(!0),e.setVersionNeededToExtract(No)),n.usesUTF8ForNames()&&(i=Buffer.from(i)),e._offsets.file=this.offset,this.write(fe(Uw)),this.write(ge(e.getVersionNeededToExtract())),this.write(n.encode()),this.write(ge(r)),this.write(fe(e.getTimeDos())),e._offsets.data=this.offset,n.usesDataDescriptor()?(this.write(xr),this.write(xr),this.write(xr)):(this.write(fe(e.getCrc())),this.write(fe(e.getCompressedSize())),this.write(fe(e.getSize()))),this.write(ge(i.length)),this.write(ge(o.length)),this.write(i),this.write(o),e._offsets.contents=this.offset}getComment(e){return this._archive.comment!==null?this._archive.comment:""}isZip64(){return this._archive.forceZip64||this._entries.length>Tp||this._archive.centralLength>ut||this._archive.centralOffset>ut}setComment(e){this._archive.comment=e}};var fv=ae(yl(),1);function pv(t){return t=t||new Date,t instanceof Date?t=t:typeof t=="string"?t=new Date(t):t=new Date,t}function dv(t){return(0,fv.default)(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")}var Fo=class extends yi{constructor(e){e=e||{},e.zlib=e.zlib||{},typeof e.level=="number"&&e.level>=0&&(e.zlib.level=e.level,delete e.level),!e.forceZip64&&typeof e.zlib.level=="number"&&e.zlib.level===0&&(e.store=!0),e.namePrependSlash=e.namePrependSlash||!1,super(e),e.comment&&e.comment.length>0&&this.setComment(e.comment)}_normalizeFileData(e){e={type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:"",...e};let n=e.type==="directory",r=e.type==="symlink";return e.name&&(e.name=dv(e.name),!r&&e.name.slice(-1)==="/"?(n=!0,e.type="directory"):n&&(e.name+="/")),(n||r)&&(e.store=!0),e.date=pv(e.date),e}entry(e,n,r){if(typeof r!="function"&&(r=this._emitErrorCallback.bind(this)),n=this._normalizeFileData(n),n.type!=="file"&&n.type!=="directory"&&n.type!=="symlink"){r(new Error(n.type+" entries not currently supported"));return}if(typeof n.name!="string"||n.name.length===0){r(new Error("entry name must be a non-empty string value"));return}if(n.type==="symlink"&&typeof n.linkname!="string"){r(new Error("entry linkname must be a non-empty string value when type equals symlink"));return}let i=new di(n.name);return i.setTime(n.date,this.options.forceLocalTime),n.namePrependSlash&&i.setName(n.name,!0),n.store&&i.setMethod(0),n.comment.length>0&&i.setComment(n.comment),n.type==="symlink"&&typeof n.mode!="number"&&(n.mode=40960),typeof n.mode=="number"&&(n.type==="symlink"&&(n.mode|=40960),i.setUnixMode(n.mode)),n.type==="symlink"&&typeof n.linkname=="string"&&(e=Buffer.from(n.linkname)),super.entry(i,e,r)}finalize(){this.finish()}};var qo=class{constructor(e){e=this.options={comment:"",forceUTC:!1,namePrependSlash:!1,store:!1,...e},this.engine=new Fo(e)}append(e,n,r){this.engine.entry(e,n,r)}finalize(){this.engine.finalize()}on(){return this.engine.on.apply(this.engine,arguments)}pipe(){return this.engine.pipe.apply(this.engine,arguments)}unpipe(){return this.engine.unpipe.apply(this.engine,arguments)}};var OF=ae(d0(),1);var NF=ae(br(),1);var PF=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function h0(t){if(Buffer.isBuffer(t))return t;if(typeof t=="number")return Buffer.alloc(t);if(typeof t=="string")return Buffer.from(t);throw new Error("input must be buffer, number, or string, received "+typeof t)}function LF(t){let e=h0(4);return e.writeInt32BE(t,0),e}function id(t,e){t=h0(t),Buffer.isBuffer(e)&&(e=e.readUInt32BE(0));let n=~~e^-1;for(var r=0;r<t.length;r++)n=PF[(n^t[r])&255]^n>>>8;return n^-1}function m0(){return LF(id.apply(null,arguments))}m0.signed=function(){return id.apply(null,arguments)};m0.unsigned=function(){return id.apply(null,arguments)>>>0};var Ol=class extends Lo{constructor(e){super(e),this._format="zip",this._module=new qo(e),this._supportsDirectory=!0,this._supportsSymlink=!0,this._modulePipe()}};var _0=ae(iS(),1);Td();async function Pn(){try{return JSON.parse(await Mt.readFile("info.json","utf8"))}catch(t){console.log(`Failed to read info.json: ${t}`),process.exit(1)}}async function Ft(t,e,n,r){return new Promise((i,o)=>{let s=e.package?.scripts?.[t];if(s){let a=x0(`${s} ${(r??[]).join(" ")}`,{shell:!0,windowsHide:!0,stdio:"inherit",env:Object.assign({},process.env,{FACTORIO_MODNAME:e.name,FACTORIO_MODVERSION:e.version,WSLENV:(process.env.WSLENV?process.env.WSLENV+":":"")+"FACTORIO_MODNAME/u:FACTORIO_MODVERSION/u:FACTORIO_MODPACKAGE/p"},n)});a.on("error",o),a.on("close",(u,l)=>{u!==null?i(u):o(new Error(l?.toString()))})}else o(new Error(`No script '${t}'`))})}async function Ln(t,e){return new Promise((n,r)=>{let i=x0(`git ${t}`,{shell:!0,windowsHide:!0,stdio:e!==void 0?["pipe","inherit","inherit"]:"inherit"});e!==void 0&&i.stdin&&(i.stdin.write(e),i.stdin.end()),i.on("error",r),i.on("close",(o,s)=>{o===0?n():r(o!==null?new Error(`returned with code ${o}`):new Error(s?.toString()))})})}zs.factorioDate="dd. mm. yyyy";async function Pl(t){let e=zt.joinPath(Ge.file(process.cwd()),"changelog.txt"),n;try{n=await Mt.readFile("changelog.txt","utf8")}catch{}if(!n)console.log("No changelog.txt");else{let r=ac(new Date,t.package?.datestamp_format??"isoDate"),i=jn.create(e.toString(),"factorio-changelog",1,n),o=ya(i),s=Ug(o,t.version,r);if(s){let a=jn.applyEdits(i,[s]);await Mt.writeFile("changelog.txt",a),console.log(`Changelog section ${t.version} stamped ${r}`)}else console.log(`No Changelog section for ${t.version}`)}if(t.package?.scripts?.datestamp){let r=await Ft("datestamp",t);r!==0&&process.exit(r)}return!!n}function MF(t){let e={};for(let n of t){let r=n.split("/").filter(Boolean),i=e;for(let o of r)i[o]||(i[o]={}),i=i[o]}return e}function w0(t,e=""){let n=Object.keys(t);n.forEach((r,i)=>{let o=i===n.length-1;console.log(`${e}${o?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 "}${r}`);let a=e+(o?" ":"\u2502 ");w0(t[r],a)})}var FF=[".exe",".bat",".ps1",".sh",".py"];async function Ll(t){if(t.package?.scripts?.compile){let s=await Ft("compile",t);s!==0&&process.exit(s)}if(t.package?.scripts?.prepackage){let s=await Ft("prepackage",t);s!==0&&process.exit(s)}let e=new Ol({zlib:{level:9}}),n=[],r=[],i=s=>{if(FF.some(a=>s.relative.endsWith(a))){r.push(`WARNING: File '${s.relative}' skipped due to forbidden extension`);return}e.file(s.absolute,{name:s.relative,prefix:`${t.name}_${t.version}`}),n.push(s)};if((await od(process.cwd(),{pattern:"**",nodir:!0,ignore:[`**/${t.name}_*.zip`].concat(t.package?.ignore||[])})).forEach(i),t.package?.extra)for(let s of t.package.extra)(await od(s.root,{pattern:s.glob??"**",nodir:!0,ignore:s.ignore})).forEach(i);return w0(MF(n.map(s=>s.relative))),r.forEach(s=>console.log(s)),e}var Ti;async function qF(){if(Ti)return Ti;let t=process.env.FACTORIO_UPLOAD_API_KEY;if(t)return Ti=t.trim(),Ti;let e=await gs({message:"Mod Portal API Key:"});if(e)return Ti=e.trim(),Ti;throw new Error("No API Key")}async function Yo(t,e){let n=await qF(),r=await fetch(e,{method:"POST",body:t,headers:new Headers({Authorization:`Bearer ${n}`})}),i;if(!r.ok){let o;try{i=await r.text(),o=JSON.parse(i).message}catch{o=`Unexpected non-json error response:
86
+ `}]})}}}},{message:"Category line prefix incorrect",code:"category.prefix",setup(t){return{category:(e,n,r)=>{e.missing||e.full_line.startsWith(` ${e.value}`)||t.report({diag:{range:{start:e.range.start,end:{line:e.selectionRange.start.line,character:e.selectionRange.start.character}}},fix:[{range:{start:e.range.start,end:{line:e.selectionRange.start.line,character:e.selectionRange.start.character}},newText:" "}]})}}}},{message:"Category line suffix incorrect",code:"category.suffix",setup(t){return{category:(e,n,r)=>{e.missing||e.full_line.endsWith(`${e.value}:`)||t.report({diag:{range:{start:{line:e.selectionRange.end.line,character:e.selectionRange.end.character+1},end:e.range.end}},fix:[{range:{start:{line:e.selectionRange.end.line,character:e.selectionRange.end.character+1},end:e.range.end},newText:":"}]})}}}},{message:"Non-standard category name",code:"category.nonstandard",setup(t){return{category:(e,n,r)=>{if(e.missing)return;["Major Features","Features","Minor Features","Graphics","Sounds","Optimizations","Balancing","Combat Balancing","Circuit Network","Changes","Bugfixes","Modding","Scripting","Gui","Control","Translation","Debug","Ease of use","Info","Locale","Compatibility","Other"].includes(e.value)||t.report({diag:{range:e.selectionRange,severity:io.DiagnosticSeverity.Information}})}}}},{message:"Duplicate category",code:"category.duplicate",setup(t){let e=new Map;return{section:(n,r,i)=>{e.clear()},category:(n,r,i)=>{if(n.missing)return;let o=e.get(n.value);o?t.report({diag:{range:n.selectionRange,severity:io.DiagnosticSeverity.Warning,relatedInformation:[{message:"First defined here",location:{range:o.selectionRange,uri:t.uri}}]}}):e.set(n.value,n)}}}},{message:"Incorrect entry prefix",code:"entry.prefix",setup(t){return{entry:(e,n,r)=>{let i=" "+(e.rank===0?"- ":" ");if(e.rank===0&&!e.full_line.startsWith(i)){t.report({diag:{range:{start:e.range.start,end:e.selectionRange.start},data:{rank:e.rank}},fix:[{range:{start:e.range.start,end:e.selectionRange.start},newText:i}]});return}let o=e.full_line.slice(0,e.selectionRange.start.character),s=" "+" ".repeat(e.rank)+"- ";o!==s&&t.report({diag:{severity:e.full_line.startsWith(i)?io.DiagnosticSeverity.Warning:io.DiagnosticSeverity.Error,range:{start:e.range.start,end:e.selectionRange.start},data:{rank:e.rank}},fix:[{range:{start:e.range.start,end:e.selectionRange.start},newText:s}]})}}}},{message:"Duplicate entry",code:"entry.duplicate",setup(t){let e,n=new Map,r=(i,o,s)=>{let a=e;if(!a)return;let u=a.get(i.full_line);u?t.report({diag:{range:i.selectionRange,relatedInformation:[{message:"First defined here",location:{range:u.selectionRange,uri:t.uri}}]}}):a.set(i.full_line,i)};return{section:(i,o,s)=>{n.clear()},category:(i,o,s)=>{if(i.missing)return;let a=n.get(i.value);a?e=a:(e=new Map,n.set(i.value,e))},entry:r,entryext:r}}},{message:"Empty entry line",code:"entry.empty",setup(t){return{entry:(e,n,r)=>{e.value.length===0&&t.report({diag:{range:e.range}})}}}},{message:"Incorrect entry continuation prefix",code:"entryext.prefix",setup(t){return{entryext:(e,n,r)=>{e.full_line.startsWith(" ")||t.report({diag:{range:{start:e.range.start,end:{line:e.selectionRange.start.line,character:e.selectionRange.start.character}}},fix:[{range:{start:e.range.start,end:{line:e.selectionRange.start.line,character:e.selectionRange.start.character}},newText:" "}]})}}}},{message:"Invalid line",code:"error.unknown",setup(t){return{error:(e,n,r)=>{t.report({diag:{range:e.range}})}}}}];function Rc(t,e){let n=[],r={root:[],section:[],separator:[],version:[],date:[],category:[],entry:[],entryext:[],error:[]};for(let i of ED){let o={uri:e,report(a){n.push({message:i.message,code:i.code,...a})}},s=i.setup(o);for(let a in r){let u=a;u in s&&s[u]&&r[u].push(s[u])}}return nt(t,(i,o,s)=>{let a=r[i.type];for(let u of a)u(i,o??-1,s)}),n}function Ac(t){for(let e of t.children)if(e.type==="version")return e}function Ug(t){for(let e of t.children)if(e.type==="date")return e}function kD(t,e){for(let n of t.children)if(n.type==="section"&&Ac(n)?.value===e)return n}function $g(t,e,n){let r=kD(t,e);if(r){let i=Ug(r);if(i)return{range:i.selectionRange,newText:n};{let o=Ac(r);return{range:{start:o.range.end,end:o.range.end},newText:`
87
+ Date: ${n}`}}}}var ya=class{documentTrees=new Map;loadDocument(e){let n=ga(e);this.documentTrees.set(e.uri,n)}clearDocument(e){this.documentTrees.delete(e)}clearFolder(e){for(let n of this.documentTrees.keys())n.startsWith(e)&&this.documentTrees.delete(n)}diagnose(e){let n=this.documentTrees.get(e);if(!n)return[];let r=Rc(n,e),i=[];for(let o of r)i.push({message:o.message,code:o.code,source:"factorio-changelog",severity:Ue.DiagnosticSeverity.Error,...o.diag});return i}entrySymbol(e){return{name:e.value||"<empty>",detail:"",kind:Ue.SymbolKind.String,range:e.range,selectionRange:e.selectionRange,children:e.type==="entry"?e.children.map(n=>this.entrySymbol(n)):[]}}categorySymbol(e){return{name:e.value||"<empty>",detail:"",kind:Ue.SymbolKind.Class,range:e.range,selectionRange:e.selectionRange,children:e.children.filter(n=>n.type==="entry").map(n=>this.entrySymbol(n))}}dateSymbol(e){return{name:"Date",detail:e.value,kind:Ue.SymbolKind.Property,range:e.range,selectionRange:e.selectionRange}}onDocumentSymbol(e){let n=this.documentTrees.get(e.uri);if(!n)return[];let r=[];for(let i of n.children)if(i.type==="section"){let o=Ac(i);if(!o)continue;let s=Ug(i),a=i.children.filter(u=>u.type==="category").map(u=>this.categorySymbol(u));s&&a.unshift(this.dateSymbol(s)),r.push({name:o.value||"<empty>",detail:"",kind:Ue.SymbolKind.Namespace,range:i.range,selectionRange:o.selectionRange,children:a})}return r}onCodeAction(e,n,r){if(e.languageId!=="factorio-changelog")return[];let i=this.documentTrees.get(e.uri);if(!i)return[];let o=Rc(i,e.uri).filter(l=>!!l.fix),s=o.filter(l=>ma(n,l.diag.range)),a=[],u=new Set;for(let l of s)if(a.push({title:`Fix this ${l.code}`,kind:Ue.CodeActionKind.QuickFix+"."+l.code,diagnostics:[{message:l.message,code:l.code,source:"factorio-changelog",severity:Ue.DiagnosticSeverity.Error,...l.diag}],isPreferred:!0,edit:{changes:{[e.uri]:gn(e,l.fix)}}}),!u.has(l.code)){u.add(l.code);let c=o.filter(f=>f.code===l.code);c.length>1&&a.push({title:`Fix all ${l.code} in file`,kind:Ue.CodeActionKind.QuickFix+"."+l.code+".all",diagnostics:c.map(f=>({message:f.message,code:f.code,source:"factorio-changelog",severity:Ue.DiagnosticSeverity.Error,...f.diag})),edit:{changes:{[e.uri]:gn(e,c.flatMap(f=>f.fix))}}})}return o.length>s.length&&a.push({title:"Fix all auto-fixable in file",kind:Ue.CodeActionKind.QuickFix+".all",diagnostics:o.map(l=>({message:l.message,code:l.code,source:"factorio-changelog",severity:Ue.DiagnosticSeverity.Error,...l.diag})),edit:{changes:{[e.uri]:gn(e,o.flatMap(l=>l.fix))}}}),a}};import{createReadStream as sN,lstat as aN,readlinkSync as lN,Stats as uN}from"fs";function yn(t,{checkOpen:e=!0}={}){return t!==null&&typeof t=="object"&&(t.writable||t.readable||!e||t.writable===void 0&&t.readable===void 0)&&typeof t.pipe=="function"}import*as Ur from"fs";import{EventEmitter as IT}from"events";var Cc=(t,e,n)=>{let r=t instanceof RegExp?Hg(t,n):t,i=e instanceof RegExp?Hg(e,n):e,o=r!==null&&i!=null&&TD(r,i,n);return o&&{start:o[0],end:o[1],pre:n.slice(0,o[0]),body:n.slice(o[0]+r.length,o[1]),post:n.slice(o[1]+i.length)}},Hg=(t,e)=>{let n=e.match(t);return n?n[0]:null},TD=(t,e,n)=>{let r,i,o,s,a,u=n.indexOf(t),l=n.indexOf(e,u+1),c=u;if(u>=0&&l>0){if(t===e)return[u,l];for(r=[],o=n.length;c>=0&&!a;){if(c===u)r.push(c),u=n.indexOf(t,c+1);else if(r.length===1){let f=r.pop();f!==void 0&&(a=[f,l])}else i=r.pop(),i!==void 0&&i<o&&(o=i,s=l),l=n.indexOf(e,c+1);c=u<l&&u>=0?u:l}r.length&&s!==void 0&&(a=[o,s])}return a};var Vg="\0SLASH"+Math.random()+"\0",Gg="\0OPEN"+Math.random()+"\0",Oc="\0CLOSE"+Math.random()+"\0",Kg="\0COMMA"+Math.random()+"\0",Yg="\0PERIOD"+Math.random()+"\0",RD=new RegExp(Vg,"g"),AD=new RegExp(Gg,"g"),CD=new RegExp(Oc,"g"),ID=new RegExp(Kg,"g"),OD=new RegExp(Yg,"g"),PD=/\\\\/g,LD=/\\{/g,ND=/\\}/g,MD=/\\,/g,FD=/\\\./g,qD=1e5;function Ic(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function jD(t){return t.replace(PD,Vg).replace(LD,Gg).replace(ND,Oc).replace(MD,Kg).replace(FD,Yg)}function BD(t){return t.replace(RD,"\\").replace(AD,"{").replace(CD,"}").replace(ID,",").replace(OD,".")}function Qg(t){if(!t)return[""];let e=[],n=Cc("{","}",t);if(!n)return t.split(",");let{pre:r,body:i,post:o}=n,s=r.split(",");s[s.length-1]+="{"+i+"}";let a=Qg(o);return o.length&&(s[s.length-1]+=a.shift(),s.push.apply(s,a)),e.push.apply(e,s),e}function Zg(t,e={}){if(!t)return[];let{max:n=qD}=e;return t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),oo(jD(t),n,!0).map(BD)}function WD(t){return"{"+t+"}"}function zD(t){return/^-?0\d/.test(t)}function UD(t,e){return t<=e}function $D(t,e){return t>=e}function oo(t,e,n){let r=[],i=Cc("{","}",t);if(!i)return[t];let o=i.pre,s=i.post.length?oo(i.post,e,!1):[""];if(/\$$/.test(i.pre))for(let a=0;a<s.length&&a<e;a++){let u=o+"{"+i.body+"}"+s[a];r.push(u)}else{let a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),l=a||u,c=i.body.indexOf(",")>=0;if(!l&&!c)return i.post.match(/,(?!,).*\}/)?(t=i.pre+"{"+i.body+Oc+i.post,oo(t,e,!0)):[t];let f;if(l)f=i.body.split(/\.\./);else if(f=Qg(i.body),f.length===1&&f[0]!==void 0&&(f=oo(f[0],e,!1).map(WD),f.length===1))return s.map(d=>i.pre+f[0]+d);let p;if(l&&f[0]!==void 0&&f[1]!==void 0){let d=Ic(f[0]),b=Ic(f[1]),g=Math.max(f[0].length,f[1].length),S=f.length===3&&f[2]!==void 0?Math.max(Math.abs(Ic(f[2])),1):1,y=UD;b<d&&(S*=-1,y=$D);let m=f.some(zD);p=[];for(let w=d;y(w,b)&&p.length<e;w+=S){let T;if(u)T=String.fromCharCode(w),T==="\\"&&(T="");else if(T=String(w),m){let v=g-T.length;if(v>0){let E=new Array(v+1).join("0");w<0?T="-"+E+T.slice(1):T=E+T}}p.push(T)}}else{p=[];for(let d=0;d<f.length;d++)p.push.apply(p,oo(f[d],e,!1))}for(let d=0;d<p.length;d++)for(let b=0;b<s.length&&r.length<e;b++){let g=o+p[d]+s[b];(!n||l||g)&&r.push(g)}}return r}var so=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var HD={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ao=t=>t.replace(/[[\]\\-]/g,"\\$&"),VD=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Jg=t=>t.join(""),Xg=(t,e)=>{let n=e;if(t.charAt(n)!=="[")throw new Error("not in a brace expression");let r=[],i=[],o=n+1,s=!1,a=!1,u=!1,l=!1,c=n,f="";e:for(;o<t.length;){let g=t.charAt(o);if((g==="!"||g==="^")&&o===n+1){l=!0,o++;continue}if(g==="]"&&s&&!u){c=o+1;break}if(s=!0,g==="\\"&&!u){u=!0,o++;continue}if(g==="["&&!u){for(let[S,[y,h,m]]of Object.entries(HD))if(t.startsWith(S,o)){if(f)return["$.",!1,t.length-n,!0];o+=S.length,m?i.push(y):r.push(y),a=a||h;continue e}}if(u=!1,f){g>f?r.push(ao(f)+"-"+ao(g)):g===f&&r.push(ao(g)),f="",o++;continue}if(t.startsWith("-]",o+1)){r.push(ao(g+"-")),o+=2;continue}if(t.startsWith("-",o+1)){f=g,o+=2;continue}r.push(ao(g)),o++}if(c<o)return["",!1,0,!1];if(!r.length&&!i.length)return["$.",!1,t.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l){let g=r[0].length===2?r[0].slice(-1):r[0];return[VD(g),!1,c-n,!1]}let p="["+(l?"^":"")+Jg(r)+"]",d="["+(l?"":"^")+Jg(i)+"]";return[r.length&&i.length?"("+p+"|"+d+")":r.length?p:d,a,c-n,!0]};var bn=(t,{windowsPathsNoEscape:e=!1,magicalBraces:n=!0}={})=>n?e?t.replace(/\[([^/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):e?t.replace(/\[([^/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");var $e,GD=new Set(["!","?","+","*","@"]),Pc=t=>GD.has(t),ey=t=>Pc(t.type),KD=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),YD=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),QD=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),ty=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),ZD="(?!(?:^|/)\\.\\.?(?:$|/))",ba="(?!\\.)",JD=new Set(["[","."]),XD=new Set(["..","."]),eT=new Set("().*{}+?[]^$\\!"),tT=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Lc="[^/]",ny=Lc+"*?",ry=Lc+"+?",nT=0,tr=class{type;#r;#n;#t=!1;#e=[];#i;#o;#s;#l=!1;#a;#u;#c=!1;id=++nT;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#r.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#e.length,parts:this.#e}}constructor(e,n,r={}){this.type=e,e&&(this.#n=!0),this.#i=n,this.#r=this.#i?this.#i.#r:this,this.#a=this.#r===this?r:this.#r.#a,this.#s=this.#r===this?[]:this.#r.#s,e==="!"&&!this.#r.#l&&this.#s.push(this),this.#o=this.#i?this.#i.#e.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(let e of this.#e)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#e.map(e=>String(e)).join("|")+")":this.#u=this.#e.map(e=>String(e)).join("")}#y(){if(this!==this.#r)throw new Error("should only call on root");if(this.#l)return this;this.toString(),this.#l=!0;let e;for(;e=this.#s.pop();){if(e.type!=="!")continue;let n=e,r=n.#i;for(;r;){for(let i=n.#o+1;!r.type&&i<r.#e.length;i++)for(let o of e.#e){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(r.#e[i])}n=r,r=n.#i}}return this}push(...e){for(let n of e)if(n!==""){if(typeof n!="string"&&!(n instanceof $e&&n.#i===this))throw new Error("invalid part: "+n);this.#e.push(n)}}toJSON(){let e=this.type===null?this.#e.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#e.map(n=>n.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#l&&this.#i?.type==="!")&&e.push({}),e}isStart(){if(this.#r===this)return!0;if(!this.#i?.isStart())return!1;if(this.#o===0)return!0;let e=this.#i;for(let n=0;n<this.#o;n++){let r=e.#e[n];if(!(r instanceof $e&&r.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#e.length:0;return this.#o===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let n=new $e(this.type,e);for(let r of this.#e)n.copyIn(r);return n}static#f(e,n,r,i,o){let s=i.maxExtglobRecursion??2,a=!1,u=!1,l=-1,c=!1;if(n.type===null){let g=r,S="";for(;g<e.length;){let y=e.charAt(g++);if(a||y==="\\"){a=!a,S+=y;continue}if(u){g===l+1?(y==="^"||y==="!")&&(c=!0):y==="]"&&!(g===l+2&&c)&&(u=!1),S+=y;continue}else if(y==="["){u=!0,l=g,c=!1,S+=y;continue}if(!i.noext&&Pc(y)&&e.charAt(g)==="("&&o<=s){n.push(S),S="";let m=new $e(y,n);g=$e.#f(e,m,g,i,o+1),n.push(m);continue}S+=y}return n.push(S),g}let f=r+1,p=new $e(null,n),d=[],b="";for(;f<e.length;){let g=e.charAt(f++);if(a||g==="\\"){a=!a,b+=g;continue}if(u){f===l+1?(g==="^"||g==="!")&&(c=!0):g==="]"&&!(f===l+2&&c)&&(u=!1),b+=g;continue}else if(g==="["){u=!0,l=f,c=!1,b+=g;continue}if(!i.noext&&Pc(g)&&e.charAt(f)==="("&&(o<=s||n&&n.#p(g))){let y=n&&n.#p(g)?0:1;p.push(b),b="";let h=new $e(g,p);p.push(h),f=$e.#f(e,h,f,i,o+y);continue}if(g==="|"){p.push(b),b="",d.push(p),p=new $e(null,n);continue}if(g===")")return b===""&&n.#e.length===0&&(n.#c=!0),p.push(b),b="",n.push(...d,p),f;b+=g}return n.type=null,n.#n=void 0,n.#e=[e.substring(r-1)],f}#b(e){return this.#h(e,YD)}#h(e,n=KD){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null)return!1;let r=e.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#p(r.type,n)}#p(e,n=QD){return!!n.get(this.type)?.includes(e)}#x(e,n){let r=e.#e[0],i=new $e(null,r,this.options);i.#e.push(""),r.push(i),this.#m(e,n)}#m(e,n){let r=e.#e[0];this.#e.splice(n,1,...r.#e);for(let i of r.#e)typeof i=="object"&&(i.#i=this);this.#u=void 0}#_(e){return!!ty.get(this.type)?.has(e)}#w(e){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let n=e.#e[0];return!n||typeof n!="object"||n.type===null?!1:this.#_(n.type)}#v(e){let n=ty.get(this.type),r=e.#e[0],i=n?.get(r.type);if(!i)return!1;this.#e=r.#e;for(let o of this.#e)typeof o=="object"&&(o.#i=this);this.type=i,this.#u=void 0,this.#c=!1}static fromGlob(e,n={}){let r=new $e(null,void 0,n);return $e.#f(e,r,0,n,0),r}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();let e=this.toString(),[n,r,i,o]=this.toRegExpSource();if(!(i||this.#n||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return r;let a=(this.#a.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${n}$`,a),{_src:n,_glob:e})}get options(){return this.#a}toRegExpSource(e){let n=e??!!this.#a.dot;if(this.#r===this&&(this.#d(),this.#y()),!ey(this)){let u=this.isStart()&&this.isEnd()&&!this.#e.some(d=>typeof d!="string"),l=this.#e.map(d=>{let[b,g,S,y]=typeof d=="string"?$e.#S(d,this.#n,u):d.toRegExpSource(e);return this.#n=this.#n||S,this.#t=this.#t||y,b}).join(""),c="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&XD.has(this.#e[0]))){let b=JD,g=n&&b.has(l.charAt(0))||l.startsWith("\\.")&&b.has(l.charAt(2))||l.startsWith("\\.\\.")&&b.has(l.charAt(4)),S=!n&&!e&&b.has(l.charAt(0));c=g?ZD:S?ba:""}let f="";return this.isEnd()&&this.#r.#l&&this.#i?.type==="!"&&(f="(?:$|\\/)"),[c+l+f,bn(l),this.#n=!!this.#n,this.#t]}let r=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#g(n);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let u=this.toString(),l=this;return l.#e=[u],l.type=null,l.#n=void 0,[u,bn(this.toString()),!1,!1]}let s=!r||e||n||!ba?"":this.#g(!0);s===o&&(s=""),s&&(o=`(?:${o})(?:${s})*?`);let a="";if(this.type==="!"&&this.#c)a=(this.isStart()&&!n?ba:"")+ry;else{let u=this.type==="!"?"))"+(this.isStart()&&!n&&!e?ba:"")+ny+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;a=i+o+u}return[a,bn(o),this.#n=!!this.#n,this.#t]}#d(){if(ey(this)){let e=0,n=!1;do{n=!0;for(let r=0;r<this.#e.length;r++){let i=this.#e[r];typeof i=="object"&&(i.#d(),this.#h(i)?(n=!1,this.#m(i,r)):this.#b(i)?(n=!1,this.#x(i,r)):this.#w(i)&&(n=!1,this.#v(i)))}}while(!n&&++e<10)}else for(let e of this.#e)typeof e=="object"&&e.#d();this.#u=void 0}#g(e){return this.#e.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");let[r,i,o,s]=n.toRegExpSource(e);return this.#t=this.#t||s,r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#S(e,n,r=!1){let i=!1,o="",s=!1,a=!1;for(let u=0;u<e.length;u++){let l=e.charAt(u);if(i){i=!1,o+=(eT.has(l)?"\\":"")+l;continue}if(l==="*"){if(a)continue;a=!0,o+=r&&/^[*]+$/.test(e)?ry:ny,n=!0;continue}else a=!1;if(l==="\\"){u===e.length-1?o+="\\\\":i=!0;continue}if(l==="["){let[c,f,p,d]=Xg(e,u);if(p){o+=c,s=s||f,u+=p-1,n=n||d;continue}}if(l==="?"){o+=Lc,n=!0;continue}o+=tT(l)}return[o,bn(e),!!n,s]}};$e=tr;var Nc=(t,{windowsPathsNoEscape:e=!1,magicalBraces:n=!1}={})=>n?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var Fe=(t,e,n={})=>(so(e),!n.nocomment&&e.charAt(0)==="#"?!1:new kt(e,n).match(t)),rT=/^\*+([^+@!?*[(]*)$/,iT=t=>e=>!e.startsWith(".")&&e.endsWith(t),oT=t=>e=>e.endsWith(t),sT=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),aT=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),lT=/^\*+\.\*+$/,uT=t=>!t.startsWith(".")&&t.includes("."),cT=t=>t!=="."&&t!==".."&&t.includes("."),fT=/^\.\*+$/,pT=t=>t!=="."&&t!==".."&&t.startsWith("."),dT=/^\*+$/,hT=t=>t.length!==0&&!t.startsWith("."),mT=t=>t.length!==0&&t!=="."&&t!=="..",gT=/^\?+([^+@!?*[(]*)?$/,yT=([t,e=""])=>{let n=sy([t]);return e?(e=e.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(e)):n},bT=([t,e=""])=>{let n=ay([t]);return e?(e=e.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(e)):n},xT=([t,e=""])=>{let n=ay([t]);return e?r=>n(r)&&r.endsWith(e):n},_T=([t,e=""])=>{let n=sy([t]);return e?r=>n(r)&&r.endsWith(e):n},sy=([t])=>{let e=t.length;return n=>n.length===e&&!n.startsWith(".")},ay=([t])=>{let e=t.length;return n=>n.length===e&&n!=="."&&n!==".."},ly=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",iy={win32:{sep:"\\"},posix:{sep:"/"}},wT=ly==="win32"?iy.win32.sep:iy.posix.sep;Fe.sep=wT;var Ce=Symbol("globstar **");Fe.GLOBSTAR=Ce;var vT="[^/]",ST=vT+"*?",ET="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",kT="(?:(?!(?:\\/|^)\\.).)*?",DT=(t,e={})=>n=>Fe(n,t,e);Fe.filter=DT;var ot=(t,e={})=>Object.assign({},t,e),TT=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return Fe;let e=Fe;return Object.assign((r,i,o={})=>e(r,i,ot(t,o)),{Minimatch:class extends e.Minimatch{constructor(i,o={}){super(i,ot(t,o))}static defaults(i){return e.defaults(ot(t,i)).Minimatch}},AST:class extends e.AST{constructor(i,o,s={}){super(i,o,ot(t,s))}static fromGlob(i,o={}){return e.AST.fromGlob(i,ot(t,o))}},unescape:(r,i={})=>e.unescape(r,ot(t,i)),escape:(r,i={})=>e.escape(r,ot(t,i)),filter:(r,i={})=>e.filter(r,ot(t,i)),defaults:r=>e.defaults(ot(t,r)),makeRe:(r,i={})=>e.makeRe(r,ot(t,i)),braceExpand:(r,i={})=>e.braceExpand(r,ot(t,i)),match:(r,i,o={})=>e.match(r,i,ot(t,o)),sep:e.sep,GLOBSTAR:Ce})};Fe.defaults=TT;var uy=(t,e={})=>(so(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:Zg(t,{max:e.braceExpandMax}));Fe.braceExpand=uy;var RT=(t,e={})=>new kt(t,e).makeRe();Fe.makeRe=RT;var AT=(t,e,n={})=>{let r=new kt(e,n);return t=t.filter(i=>r.match(i)),r.options.nonull&&!t.length&&t.push(e),t};Fe.match=AT;var oy=/[?*]|[+@!]\(.*?\)|\[|\]/,CT=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),kt=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,n={}){so(e),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=e,this.platform=n.platform||ly,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let n of e)if(typeof n!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,n=this.options;if(!n.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map((o,s,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let u=o[0]===""&&o[1]===""&&(o[2]==="?"||!oy.test(o[2]))&&!oy.test(o[3]),l=/^[a-z]:/i.test(o[0]);if(u)return[...o.slice(0,4),...o.slice(4).map(c=>this.parse(c))];if(l)return[o[0],...o.slice(1).map(c=>this.parse(c))]}return o.map(u=>this.parse(u))});if(this.debug(this.pattern,i),this.set=i.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let s=this.set[o];s[0]===""&&s[1]===""&&this.globParts[o][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let r of e)for(let i=0;i<r.length;i++)r[i]==="**"&&(r[i]="*");let{optimizationLevel:n=1}=this.options;return n>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):n>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let i=r;for(;n[i+1]==="**";)i++;i!==r&&n.splice(r,i-r)}return n})}levelOneOptimize(e){return e.map(n=>(n=n.reduce((r,i)=>{let o=r[r.length-1];return i==="**"&&o==="**"?r:i===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(r.pop(),r):(r.push(i),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){let o=e[i];i===1&&o===""&&e[0]===""||(o==="."||o==="")&&(n=!0,e.splice(i,1),i--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(n=!0,e.pop())}let r=0;for(;(r=e.indexOf("..",r+1))!==-1;){let i=e[r-1];i&&i!=="."&&i!==".."&&i!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(i))&&(n=!0,e.splice(r-1,2),r-=2)}}while(n);return e.length===0?[""]:e}firstPhasePreProcess(e){let n=!1;do{n=!1;for(let r of e){let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let s=i;for(;r[s+1]==="**";)s++;s>i&&r.splice(i+1,s-i);let a=r[i+1],u=r[i+2],l=r[i+3];if(a!==".."||!u||u==="."||u===".."||!l||l==="."||l==="..")continue;n=!0,r.splice(i,1);let c=r.slice(0);c[i]="**",e.push(c),i--}if(!this.preserveMultipleSlashes){for(let s=1;s<r.length-1;s++){let a=r[s];s===1&&a===""&&r[0]===""||(a==="."||a==="")&&(n=!0,r.splice(s,1),s--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let o=0;for(;(o=r.indexOf("..",o+1))!==-1;){let s=r[o-1];if(s&&s!=="."&&s!==".."&&s!=="**"){n=!0;let u=o===1&&r[o+1]==="**"?["."]:[];r.splice(o-1,2,...u),r.length===0&&r.push(""),o-=2}}}}while(n);return e}secondPhasePreProcess(e){for(let n=0;n<e.length-1;n++)for(let r=n+1;r<e.length;r++){let i=this.partsMatch(e[n],e[r],!this.preserveMultipleSlashes);if(i){e[n]=[],e[r]=i;break}}return e.filter(n=>n.length)}partsMatch(e,n,r=!1){let i=0,o=0,s=[],a="";for(;i<e.length&&o<n.length;)if(e[i]===n[o])s.push(a==="b"?n[o]:e[i]),i++,o++;else if(r&&e[i]==="**"&&n[o]===e[i+1])s.push(e[i]),i++;else if(r&&n[o]==="**"&&e[i]===n[o+1])s.push(n[o]),o++;else if(e[i]==="*"&&n[o]&&(this.options.dot||!n[o].startsWith("."))&&n[o]!=="**"){if(a==="b")return!1;a="a",s.push(e[i]),i++,o++}else if(n[o]==="*"&&e[i]&&(this.options.dot||!e[i].startsWith("."))&&e[i]!=="**"){if(a==="a")return!1;a="b",s.push(n[o]),i++,o++}else return!1;return e.length===n.length&&s}parseNegate(){if(this.nonegate)return;let e=this.pattern,n=!1,r=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)n=!n,r++;r&&(this.pattern=e.slice(r)),this.negate=n}matchOne(e,n,r=!1){let i=0,o=0;if(this.isWindows){let a=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),u=!a&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),l=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),c=!l&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),f=u?3:a?0:void 0,p=c?3:l?0:void 0;if(typeof f=="number"&&typeof p=="number"){let[d,b]=[e[f],n[p]];d.toLowerCase()===b.toLowerCase()&&(n[p]=d,o=p,i=f)}}let{optimizationLevel:s=1}=this.options;return s>=2&&(e=this.levelTwoFileOptimize(e)),n.includes(Ce)?this.#r(e,n,r,i,o):this.#t(e,n,r,i,o)}#r(e,n,r,i,o){let s=n.indexOf(Ce,o),a=n.lastIndexOf(Ce),[u,l,c]=r?[n.slice(o,s),n.slice(s+1),[]]:[n.slice(o,s),n.slice(s+1,a),n.slice(a+1)];if(u.length){let h=e.slice(i,i+u.length);if(!this.#t(h,u,r,0,0))return!1;i+=u.length,o+=u.length}let f=0;if(c.length){if(c.length+i>e.length)return!1;let h=e.length-c.length;if(this.#t(e,c,r,h,0))f=c.length;else{if(e[e.length-1]!==""||i+c.length===e.length||(h--,!this.#t(e,c,r,h,0)))return!1;f=c.length+1}}if(!l.length){let h=!!f;for(let m=i;m<e.length-f;m++){let w=String(e[m]);if(h=!0,w==="."||w===".."||!this.options.dot&&w.startsWith("."))return!1}return r||h}let p=[[[],0]],d=p[0],b=0,g=[0];for(let h of l)h===Ce?(g.push(b),d=[[],0],p.push(d)):(d[0].push(h),b++);let S=p.length-1,y=e.length-f;for(let h of p)h[1]=y-(g[S--]+h[0].length);return!!this.#n(e,p,i,0,r,0,!!f)}#n(e,n,r,i,o,s,a){let u=n[i];if(!u){for(let f=r;f<e.length;f++){a=!0;let p=e[f];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return a}let[l,c]=u;for(;r<=c;){if(this.#t(e.slice(0,r+l.length),l,o,r,0)&&s<this.maxGlobstarRecursion){let d=this.#n(e,n,r+l.length,i+1,o,s+1,a);if(d!==!1)return d}let p=e[r];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;r++}return o||null}#t(e,n,r,i,o){let s,a,u,l;for(s=i,a=o,l=e.length,u=n.length;s<l&&a<u;s++,a++){this.debug("matchOne loop");let c=n[a],f=e[s];if(this.debug(n,c,f),c===!1||c===Ce)return!1;let p;if(typeof c=="string"?(p=f===c,this.debug("string match",c,f,p)):(p=c.test(f),this.debug("pattern match",c,f,p)),!p)return!1}if(s===l&&a===u)return!0;if(s===l)return r;if(a===u)return s===l-1&&e[s]==="";throw new Error("wtf?")}braceExpand(){return uy(this.pattern,this.options)}parse(e){so(e);let n=this.options;if(e==="**")return Ce;if(e==="")return"";let r,i=null;(r=e.match(dT))?i=n.dot?mT:hT:(r=e.match(rT))?i=(n.nocase?n.dot?aT:sT:n.dot?oT:iT)(r[1]):(r=e.match(gT))?i=(n.nocase?n.dot?bT:yT:n.dot?xT:_T)(r):(r=e.match(lT))?i=n.dot?cT:uT:(r=e.match(fT))&&(i=pT);let o=tr.fromGlob(e,this.options).toMMPattern();return i&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:i}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?ST:n.dot?ET:kT,i=new Set(n.nocase?["i"]:[]),o=e.map(u=>{let l=u.map(f=>{if(f instanceof RegExp)for(let p of f.flags.split(""))i.add(p);return typeof f=="string"?CT(f):f===Ce?Ce:f._src});l.forEach((f,p)=>{let d=l[p+1],b=l[p-1];f!==Ce||b===Ce||(b===void 0?d!==void 0&&d!==Ce?l[p+1]="(?:\\/|"+r+"\\/)?"+d:l[p]=r:d===void 0?l[p-1]=b+"(?:\\/|\\/"+r+")?":d!==Ce&&(l[p-1]=b+"(?:\\/|\\/"+r+"\\/)"+d,l[p+1]=Ce))});let c=l.filter(f=>f!==Ce);if(this.partial&&c.length>=1){let f=[];for(let p=1;p<=c.length;p++)f.push(c.slice(0,p).join("/"));return"(?:"+f.join("|")+")"}return c.join("/")}).join("|"),[s,a]=e.length>1?["(?:",")"]:["",""];o="^"+s+o+a+"$",this.partial&&(o="^(?:\\/|"+s+o.slice(1,-1)+a+")$"),this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,n=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&n)return!0;let r=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let o=this.set;this.debug(this.pattern,"set",o);let s=i[i.length-1];if(!s)for(let a=i.length-2;!s&&a>=0;a--)s=i[a];for(let a of o){let u=i;if(r.matchBase&&a.length===1&&(u=[s]),this.matchOne(u,a,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(e){return Fe.defaults(e).Minimatch}};Fe.AST=tr;Fe.Minimatch=kt;Fe.escape=Nc;Fe.unescape=bn;import{resolve as OT}from"path";function PT(t,e){return new Promise((n,r)=>{Ur.readdir(t,{withFileTypes:!0},(i,o)=>{if(i)switch(i.code){case"ENOTDIR":e?r(i):n([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":n([]);break;default:r(i);break}else n(o)})})}function cy(t,e){return new Promise(n=>{(e?Ur.stat:Ur.lstat)(t,(i,o)=>{i?i.code==="ENOENT"?n(e?cy(t,!1):null):n(null):n(o)})})}async function*fy(t,e,n,r,i,o){let s=await PT(e+t,o);for(let a of s){let u=a.name,l=t+"/"+u,c=l.slice(1),f=e+"/"+c,p=a;(r||n)&&(p=await cy(f,n)??p),p.isDirectory()?i(c)||(yield{relative:c,absolute:f,stat:p},yield*fy(l,e,n,r,i,!1)):yield{relative:c,absolute:f,stat:p}}}async function*LT(t,e,n,r){yield*fy("",t,e,n,r,!0)}function NT(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}var py=class extends IT{options;matchers;ignoreMatchers;skipMatchers;paused;aborted;inactive;iterator;constructor(t,e,n){if(super(),typeof e=="function"&&(n=e,e=void 0),this.options=NT(e||{}),this.matchers=[],this.options.pattern){let r=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=r.map(i=>new kt(i,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let r=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=r.map(i=>new kt(i,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let r=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=r.map(i=>new kt(i,{dot:!0}))}if(this.iterator=LT(OT(t||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,n){let r=n,i=[];this.on("match",o=>i.push(this.options.absolute?o.absolute:o.relative)),this.on("error",o=>r(o)),this.on("end",()=>r(null,i))}setTimeout(()=>this._next())}_shouldSkipDirectory(t){return this.skipMatchers.some(e=>e.match(t))}_fileMatches(t,e){let n=t+(e?"/":"");return(this.matchers.length===0||this.matchers.some(r=>r.match(n)))&&!this.ignoreMatchers.some(r=>r.match(n))&&(!this.options.nodir||!e)}_next(){!this.paused&&!this.aborted?this.iterator.next().then(t=>{if(t.done)this.emit("end");else{let e=t.value.stat.isDirectory();if(this._fileMatches(t.value.relative,e)){let n=t.value.relative,r=t.value.absolute;this.options.mark&&e&&(n+="/",r+="/"),this.options.stat?this.emit("match",{relative:n,absolute:r,stat:t.value.stat}):this.emit("match",{relative:n,absolute:r})}this._next()}}).catch(t=>{this.abort(),this.emit("error",t),!t.code&&!this.options.silent&&console.error(t)}):this.inactive=!0}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}},$r=(t,e,n)=>new py(t,e,n);$r.ReaddirGlob=py;var Mc=$r;var Cw=ae(ab(),1);function $R(t){return function(...e){var n=e.pop();return t.call(this,e,n)}}var HR=typeof queueMicrotask=="function"&&queueMicrotask,pb=typeof setImmediate=="function"&&setImmediate,db=typeof process=="object"&&typeof process.nextTick=="function";function hb(t){setTimeout(t,0)}function mb(t){return(e,...n)=>t(()=>e(...n))}var go;HR?go=queueMicrotask:pb?go=setImmediate:db?go=process.nextTick:go=hb;var yo=mb(go);function VR(t){return of(t)?function(...e){let n=e.pop(),r=t.apply(this,e);return lb(r,n)}:$R(function(e,n){var r;try{r=t.apply(this,e)}catch(i){return n(i)}if(r&&typeof r.then=="function")return lb(r,n);n(null,r)})}function lb(t,e){return t.then(n=>{ub(e,null,n)},n=>{ub(e,n&&(n instanceof Error||n.message)?n:new Error(n))})}function ub(t,e,n){try{t(e,n)}catch(r){yo(i=>{throw i},r)}}function of(t){return t[Symbol.toStringTag]==="AsyncFunction"}function GR(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function KR(t){return typeof t[Symbol.asyncIterator]=="function"}function re(t){if(typeof t!="function")throw new Error("expected a function");return of(t)?VR(t):t}function U(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");function n(...r){return typeof r[e-1]=="function"?t.apply(this,r):new Promise((i,o)=>{r[e-1]=(s,...a)=>{if(s)return o(s);i(a.length>1?a:a[0])},t.apply(this,r)})}return n}function gb(t){return function(n,...r){return U(function(o){var s=this;return t(n,(a,u)=>{re(a).apply(s,r.concat(u))},o)})}}function sf(t,e,n,r){e=e||[];var i=[],o=0,s=re(n);return t(e,(a,u,l)=>{var c=o++;s(a,(f,p)=>{i[c]=p,l(f)})},a=>{r(a,i)})}function Na(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}var Ma={};function Qr(t){function e(...n){if(t!==null){var r=t;t=null,r.apply(this,n)}}return Object.assign(e,t),e}function YR(t){return t[Symbol.iterator]&&t[Symbol.iterator]()}function QR(t){var e=-1,n=t.length;return function(){return++e<n?{value:t[e],key:e}:null}}function ZR(t){var e=-1;return function(){var r=t.next();return r.done?null:(e++,{value:r.value,key:e})}}function JR(t){var e=t?Object.keys(t):[],n=-1,r=e.length;return function i(){var o=e[++n];return o==="__proto__"?i():n<r?{value:t[o],key:o}:null}}function XR(t){if(Na(t))return QR(t);var e=YR(t);return e?ZR(e):JR(t)}function or(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var n=t;t=null,n.apply(this,e)}}function cb(t,e,n,r){let i=!1,o=!1,s=!1,a=0,u=0;function l(){a>=e||s||i||(s=!0,t.next().then(({value:p,done:d})=>{if(!(o||i)){if(s=!1,d){i=!0,a<=0&&r(null);return}a++,n(p,u,c),u++,l()}}).catch(f))}function c(p,d){if(a-=1,!o){if(p)return f(p);if(p===!1){i=!0,o=!0;return}if(d===Ma||i&&a<=0)return i=!0,r(null);l()}}function f(p){o||(s=!1,i=!0,r(p))}l()}var Rt=t=>(e,n,r)=>{if(r=Qr(r),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return r(null);if(GR(e))return cb(e,t,n,r);if(KR(e))return cb(e[Symbol.asyncIterator](),t,n,r);var i=XR(e),o=!1,s=!1,a=0,u=!1;function l(f,p){if(!s)if(a-=1,f)o=!0,r(f);else if(f===!1)o=!0,s=!0;else{if(p===Ma||o&&a<=0)return o=!0,r(null);u||c()}}function c(){for(u=!0;a<t&&!o;){var f=i();if(f===null){o=!0,a<=0&&r(null);return}a+=1,n(f.value,f.key,or(l))}u=!1}c()};function eA(t,e,n,r){return Rt(e)(t,re(n),r)}var yb=U(eA,4);function tA(t,e,n){n=Qr(n);var r=0,i=0,{length:o}=t,s=!1;o===0&&n(null);function a(u,l){u===!1&&(s=!0),s!==!0&&(u?n(u):(++i===o||l===Ma)&&n(null))}for(;r<o;r++)e(t[r],r,or(a))}function nA(t,e,n){return yb(t,1/0,e,n)}function rA(t,e,n){var r=Na(t)?tA:nA;return r(t,re(e),n)}var sr=U(rA,3);function iA(t,e,n){return sf(sr,t,e,n)}var bb=U(iA,3),r5=gb(bb);function oA(t,e,n){return yb(t,1,e,n)}var Zr=U(oA,3);function sA(t,e,n){return sf(Zr,t,e,n)}var aA=U(sA,3),i5=gb(aA);var rf=class{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,n){n.prev=e,n.next=e.next,e.next?e.next.prev=n:this.tail=n,e.next=n,this.length+=1}insertBefore(e,n){n.prev=e.prev,n.next=e,e.prev?e.prev.next=n:this.head=n,e.prev=n,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):fb(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):fb(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var n=this.head;n;){var{next:r}=n;e(n)&&this.removeLink(n),n=r}return this}};function fb(t,e){t.length=1,t.head=t.tail=e}function lA(t,e,n){if(e==null)e=1;else if(e===0)throw new RangeError("Concurrency must not be zero");var r=re(t),i=0,o=[];let s={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(h,m){s[h].push(m)}function u(h,m){let w=(...T)=>{l(h,w),m(...T)};s[h].push(w)}function l(h,m){if(!h)return Object.keys(s).forEach(w=>s[w]=[]);if(!m)return s[h]=[];s[h]=s[h].filter(w=>w!==m)}function c(h,...m){s[h].forEach(w=>w(...m))}var f=!1;function p(h,m,w,T){if(T!=null&&typeof T!="function")throw new Error("task callback must be a function");y.started=!0;var v,E;function L(I,...N){if(I)return w?E(I):v();if(N.length<=1)return v(N[0]);v(N)}var k=y._createTaskItem(h,w?L:T||L);if(m?y._tasks.unshift(k):y._tasks.push(k),f||(f=!0,yo(()=>{f=!1,y.process()})),w||!T)return new Promise((I,N)=>{v=I,E=N})}function d(h){return function(m,...w){i-=1;for(var T=0,v=h.length;T<v;T++){var E=h[T],L=o.indexOf(E);L===0?o.shift():L>0&&o.splice(L,1),E.callback(m,...w),m!=null&&c("error",m,E.data)}i<=y.concurrency-y.buffer&&c("unsaturated"),y.idle()&&c("drain"),y.process()}}function b(h){return h.length===0&&y.idle()?(yo(()=>c("drain")),!0):!1}let g=h=>m=>{if(!m)return new Promise((w,T)=>{u(h,(v,E)=>{if(v)return T(v);w(E)})});l(h),a(h,m)};var S=!1,y={_tasks:new rf,_createTaskItem(h,m){return{data:h,callback:m}},*[Symbol.iterator](){yield*y._tasks[Symbol.iterator]()},concurrency:e,payload:n,buffer:e/4,started:!1,paused:!1,push(h,m){return Array.isArray(h)?b(h)?void 0:h.map(w=>p(w,!1,!1,m)):p(h,!1,!1,m)},pushAsync(h,m){return Array.isArray(h)?b(h)?void 0:h.map(w=>p(w,!1,!0,m)):p(h,!1,!0,m)},kill(){l(),y._tasks.empty()},unshift(h,m){return Array.isArray(h)?b(h)?void 0:h.map(w=>p(w,!0,!1,m)):p(h,!0,!1,m)},unshiftAsync(h,m){return Array.isArray(h)?b(h)?void 0:h.map(w=>p(w,!0,!0,m)):p(h,!0,!0,m)},remove(h){y._tasks.remove(h)},process(){if(!S){for(S=!0;!y.paused&&i<y.concurrency&&y._tasks.length;){var h=[],m=[],w=y._tasks.length;y.payload&&(w=Math.min(w,y.payload));for(var T=0;T<w;T++){var v=y._tasks.shift();h.push(v),o.push(v),m.push(v.data)}i+=1,y._tasks.length===0&&c("empty"),i===y.concurrency&&c("saturated");var E=or(d(h));r(m,E)}S=!1}},length(){return y._tasks.length},running(){return i},workersList(){return o},idle(){return y._tasks.length+i===0},pause(){y.paused=!0},resume(){y.paused!==!1&&(y.paused=!1,yo(y.process))}};return Object.defineProperties(y,{saturated:{writable:!1,value:g("saturated")},unsaturated:{writable:!1,value:g("unsaturated")},empty:{writable:!1,value:g("empty")},drain:{writable:!1,value:g("drain")},error:{writable:!1,value:g("error")}}),y}function uA(t,e,n,r){r=Qr(r);var i=re(n);return Zr(t,(o,s,a)=>{i(e,o,(u,l)=>{e=l,a(u)})},o=>r(o,e))}var o5=U(uA,4);function cA(t,e,n,r){return sf(Rt(e),t,n,r)}var xb=U(cA,4);function fA(t,e,n,r){var i=re(n);return xb(t,e,(o,s)=>{i(o,(a,...u)=>a?s(a):s(a,u))},(o,s)=>{for(var a=[],u=0;u<s.length;u++)s[u]&&(a=a.concat(...s[u]));return r(o,a)})}var _b=U(fA,4);function pA(t,e,n){return _b(t,1/0,e,n)}var s5=U(pA,3);function dA(t,e,n){return _b(t,1,e,n)}var a5=U(dA,3);function Kt(t,e){return(n,r,i,o)=>{var s=!1,a;let u=re(i);n(r,(l,c,f)=>{u(l,(p,d)=>{if(p||p===!1)return f(p);if(t(d)&&!a)return s=!0,a=e(!0,l),f(null,Ma);f()})},l=>{if(l)return o(l);o(null,s?a:e(!1))})}}function hA(t,e,n){return Kt(r=>r,(r,i)=>i)(sr,t,e,n)}var l5=U(hA,3);function mA(t,e,n,r){return Kt(i=>i,(i,o)=>o)(Rt(e),t,n,r)}var u5=U(mA,4);function gA(t,e,n){return Kt(r=>r,(r,i)=>i)(Rt(1),t,e,n)}var c5=U(gA,3);function wb(t){return(e,...n)=>re(e)(...n,(r,...i)=>{typeof console=="object"&&(r?console.error&&console.error(r):console[t]&&i.forEach(o=>console[t](o)))})}var f5=wb("dir");function yA(t,e,n){n=or(n);var r=re(t),i=re(e),o;function s(u,...l){if(u)return n(u);u!==!1&&(o=l,i(...l,a))}function a(u,l){if(u)return n(u);if(u!==!1){if(!l)return n(null,...o);r(s)}}return a(null,!0)}var p5=U(yA,3);function vb(t){return(e,n,r)=>t(e,r)}function bA(t,e,n){return sr(t,vb(re(e)),n)}var d5=U(bA,3);function xA(t,e,n,r){return Rt(e)(t,vb(re(n)),r)}var _A=U(xA,4);function wA(t,e,n){return _A(t,1,e,n)}var vA=U(wA,3);function SA(t){return of(t)?t:function(...e){var n=e.pop(),r=!0;e.push((...i)=>{r?yo(()=>n(...i)):n(...i)}),t.apply(this,e),r=!1}}function EA(t,e,n){return Kt(r=>!r,r=>!r)(sr,t,e,n)}var h5=U(EA,3);function kA(t,e,n,r){return Kt(i=>!i,i=>!i)(Rt(e),t,n,r)}var m5=U(kA,4);function DA(t,e,n){return Kt(r=>!r,r=>!r)(Zr,t,e,n)}var g5=U(DA,3);function TA(t,e,n,r){var i=new Array(e.length);t(e,(o,s,a)=>{n(o,(u,l)=>{i[s]=!!l,a(u)})},o=>{if(o)return r(o);for(var s=[],a=0;a<e.length;a++)i[a]&&s.push(e[a]);r(null,s)})}function RA(t,e,n,r){var i=[];t(e,(o,s,a)=>{n(o,(u,l)=>{if(u)return a(u);l&&i.push({index:s,value:o}),a(u)})},o=>{if(o)return r(o);r(null,i.sort((s,a)=>s.index-a.index).map(s=>s.value))})}function Fa(t,e,n,r){var i=Na(e)?TA:RA;return i(t,e,re(n),r)}function AA(t,e,n){return Fa(sr,t,e,n)}var y5=U(AA,3);function CA(t,e,n,r){return Fa(Rt(e),t,n,r)}var b5=U(CA,4);function IA(t,e,n){return Fa(Zr,t,e,n)}var x5=U(IA,3);function OA(t,e){var n=or(e),r=re(SA(t));function i(o){if(o)return n(o);o!==!1&&r(i)}return i()}var _5=U(OA,2);function PA(t,e,n,r){var i=re(n);return xb(t,e,(o,s)=>{i(o,(a,u)=>a?s(a):s(a,{key:u,val:o}))},(o,s)=>{for(var a={},{hasOwnProperty:u}=Object.prototype,l=0;l<s.length;l++)if(s[l]){var{key:c}=s[l],{val:f}=s[l];u.call(a,c)?a[c].push(f):a[c]=[f]}return r(o,a)})}var w5=U(PA,4);var v5=wb("log");function LA(t,e,n,r){r=Qr(r);var i={},o=re(n);return Rt(e)(t,(s,a,u)=>{o(s,a,(l,c)=>{if(l)return u(l);i[a]=c,u(l)})},s=>r(s,i))}var S5=U(LA,4);var La;db?La=process.nextTick:pb?La=setImmediate:La=hb;var E5=mb(La),k5=U((t,e,n)=>{var r=Na(e)?[]:{};t(e,(i,o,s)=>{re(i)((a,...u)=>{u.length<2&&([u]=u),r[o]=u,s(a)})},i=>n(i,r))},3);function af(t,e){var n=re(t);return lA((r,i)=>{n(r[0],i)},e,1)}function NA(t,e){if(e=Qr(e),!Array.isArray(t))return e(new TypeError("First argument to race must be an array of functions"));if(!t.length)return e();for(var n=0,r=t.length;n<r;n++)re(t[n])(e)}var D5=U(NA,2);function lf(t,e,n,r){let i=re(n);return Fa(t,e,(o,s)=>{i(o,(a,u)=>{s(a,!u)})},r)}function MA(t,e,n){return lf(sr,t,e,n)}var T5=U(MA,3);function FA(t,e,n,r){return lf(Rt(e),t,n,r)}var R5=U(FA,4);function qA(t,e,n){return lf(Zr,t,e,n)}var A5=U(qA,3);function jA(t,e,n){return Kt(Boolean,r=>r)(sr,t,e,n)}var C5=U(jA,3);function BA(t,e,n,r){return Kt(Boolean,i=>i)(Rt(e),t,n,r)}var I5=U(BA,4);function WA(t,e,n){return Kt(Boolean,r=>r)(Zr,t,e,n)}var O5=U(WA,3);function zA(t,e,n){var r=re(e);return bb(t,(o,s)=>{r(o,(a,u)=>{if(a)return s(a);s(a,{value:o,criteria:u})})},(o,s)=>{if(o)return n(o);n(null,s.sort(i).map(a=>a.value))});function i(o,s){var a=o.criteria,u=s.criteria;return a<u?-1:a>u?1:0}}var P5=U(zA,3);function UA(t,e){var n=null,r;return vA(t,(i,o)=>{re(i)((s,...a)=>{if(s===!1)return o(s);a.length<2?[r]=a:r=a,n=s,o(s?null:{})})},()=>e(n,r))}var L5=U(UA);function $A(t,e,n){n=or(n);var r=re(e),i=re(t),o=[];function s(u,...l){if(u)return n(u);o=l,u!==!1&&i(a)}function a(u,l){if(u)return n(u);if(u!==!1){if(!l)return n(null,...o);r(s)}}return i(a)}var N5=U($A,3);function HA(t,e){if(e=Qr(e),!Array.isArray(t))return e(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return e();var n=0;function r(o){var s=re(t[n++]);s(...o,or(i))}function i(o,...s){if(o!==!1){if(o||n===t.length)return e(o,...s);r(s)}}r([])}var M5=U(HA);import{dirname as cN,relative as fN,resolve as pN}from"path";import VA from"util";var GA={ABORTED:"archive was aborted",DIRECTORYDIRPATHREQUIRED:"diretory dirpath argument must be a non-empty string value",DIRECTORYFUNCTIONINVALIDDATA:"invalid data returned by directory custom data function",ENTRYNAMEREQUIRED:"entry name must be a non-empty string value",FILEFILEPATHREQUIRED:"file filepath argument must be a non-empty string value",FINALIZING:"archive already finalizing",QUEUECLOSED:"queue closed",NOENDMETHOD:"no suitable finalize/end method defined by module",DIRECTORYNOTSUPPORTED:"support for directory entries not defined by module",FORMATSET:"archive format already set",INPUTSTEAMBUFFERREQUIRED:"input source must be valid Stream or Buffer instance",MODULESET:"module already set",SYMLINKNOTSUPPORTED:"support for symlink entries not defined by module",SYMLINKFILEPATHREQUIRED:"symlink filepath argument must be a non-empty string value",SYMLINKTARGETREQUIRED:"symlink target argument must be a non-empty string value",ENTRYNOTSUPPORTED:"entry not supported"};function me(t,e){Error.captureStackTrace(this,this.constructor),this.message=GA[t]||t,this.code=t,this.data=e}VA.inherits(me,Error);var Iw=ae(yr(),1);var kw=ae(gl(),1),Dw=ae(yr(),1);function Tw(t){return t=t||new Date,t instanceof Date?t=t:typeof t=="string"?t=new Date(t):t=new Date,t}function Rw(t){return t===null?Buffer.alloc(0):typeof t=="string"?Buffer.from(t):yn(t)?t.pipe(new Dw.PassThrough):t}function Aw(t){return(0,kw.default)(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")}function wp(t){return t.slice(-1)!=="/"?t+"/":t}var{ReaddirGlob:dN}=Mc,vp=process.platform==="win32",Lo=class extends Iw.Transform{_supportsDirectory=!1;_supportsSymlink=!1;constructor(e){e={highWaterMark:1024*1024,statConcurrency:4,...e},super(e),this.options=e,this._format=!1,this._module=!1,this._pending=0,this._pointer=0,this._entriesCount=0,this._entriesProcessedCount=0,this._fsEntriesTotalBytes=0,this._fsEntriesProcessedBytes=0,this._queue=af(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=af(this._onStatQueueTask.bind(this),e.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]}_abort(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()}_append(e,n){n=n||{};let r={source:null,filepath:e};n.name||(n.name=e),n.sourcePath=e,r.data=n,this._entriesCount++,n.stats&&n.stats instanceof uN?(r=this._updateQueueTaskWithStats(r,n.stats),r&&(n.stats.size&&(this._fsEntriesTotalBytes+=n.stats.size),this._queue.push(r))):this._statQueue.push(r)}_finalize(){this._state.finalizing||this._state.finalized||this._state.aborted||(this._state.finalizing=!0,this._moduleFinalize(),this._state.finalizing=!1,this._state.finalized=!0)}_maybeFinalize(){return this._state.finalizing||this._state.finalized||this._state.aborted?!1:this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()?(this._finalize(),!0):!1}_moduleAppend(e,n,r){if(this._state.aborted){r();return}this._module.append(e,n,function(i){if(this._task=null,this._state.aborted){this._shutdown();return}if(i){this.emit("error",i),setImmediate(r);return}this.emit("entry",n),this._entriesProcessedCount++,n.stats&&n.stats.size&&(this._fsEntriesProcessedBytes+=n.stats.size),this.emit("progress",{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),setImmediate(r)}.bind(this))}_moduleFinalize(){typeof this._module.finalize=="function"?this._module.finalize():typeof this._module.end=="function"?this._module.end():this.emit("error",new me("NOENDMETHOD"))}_modulePipe(){this._module.on("error",this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0}_moduleUnpipe(){this._module.unpipe(this),this._state.modulePiped=!1}_normalizeEntryData(e,n){e={type:"file",name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1,...e},n&&e.stats===!1&&(e.stats=n);let r=e.type==="directory";return e.name&&(typeof e.prefix=="string"&&e.prefix!==""&&(e.name=e.prefix+"/"+e.name,e.prefix=null),e.name=Aw(e.name),e.type!=="symlink"&&e.name.slice(-1)==="/"?(r=!0,e.type="directory"):r&&(e.name+="/")),typeof e.mode=="number"?vp?e.mode&=511:e.mode&=4095:e.stats&&e.mode===null?(vp?e.mode=e.stats.mode&511:e.mode=e.stats.mode&4095,vp&&r&&(e.mode=493)):e.mode===null&&(e.mode=r?493:420),e.stats&&e.date===null?e.date=e.stats.mtime:e.date=Tw(e.date),e}_onModuleError(e){this.emit("error",e)}_onQueueDrain(){this._state.finalizing||this._state.finalized||this._state.aborted||this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize()}_onQueueTask(e,n){let r=()=>{e.data.callback&&e.data.callback(),n()};if(this._state.finalizing||this._state.finalized||this._state.aborted){r();return}this._task=e,this._moduleAppend(e.source,e.data,r)}_onStatQueueTask(e,n){if(this._state.finalizing||this._state.finalized||this._state.aborted){n();return}aN(e.filepath,function(r,i){if(this._state.aborted){setImmediate(n);return}if(r){this._entriesCount--,this.emit("warning",r),setImmediate(n);return}e=this._updateQueueTaskWithStats(e,i),e&&(i.size&&(this._fsEntriesTotalBytes+=i.size),this._queue.push(e)),setImmediate(n)}.bind(this))}_shutdown(){this._moduleUnpipe(),this.end()}_transform(e,n,r){e&&(this._pointer+=e.length),r(null,e)}_updateQueueTaskWithStats(e,n){if(n.isFile())e.data.type="file",e.data.sourceType="stream",e.source=new Cw.Readable(function(){return sN(e.filepath)});else if(n.isDirectory()&&this._supportsDirectory)e.data.name=wp(e.data.name),e.data.type="directory",e.data.sourcePath=wp(e.filepath),e.data.sourceType="buffer",e.source=Buffer.concat([]);else if(n.isSymbolicLink()&&this._supportsSymlink){let r=lN(e.filepath),i=cN(e.filepath);e.data.type="symlink",e.data.linkname=fN(i,pN(i,r)),e.data.sourceType="buffer",e.source=Buffer.concat([])}else return n.isDirectory()?this.emit("warning",new me("DIRECTORYNOTSUPPORTED",e.data)):n.isSymbolicLink()?this.emit("warning",new me("SYMLINKNOTSUPPORTED",e.data)):this.emit("warning",new me("ENTRYNOTSUPPORTED",e.data)),null;return e.data=this._normalizeEntryData(e.data,n),e}abort(){return this._state.aborted||this._state.finalized?this:(this._abort(),this)}append(e,n){if(this._state.finalize||this._state.aborted)return this.emit("error",new me("QUEUECLOSED")),this;if(n=this._normalizeEntryData(n),typeof n.name!="string"||n.name.length===0)return this.emit("error",new me("ENTRYNAMEREQUIRED")),this;if(n.type==="directory"&&!this._supportsDirectory)return this.emit("error",new me("DIRECTORYNOTSUPPORTED",{name:n.name})),this;if(e=Rw(e),Buffer.isBuffer(e))n.sourceType="buffer";else if(yn(e))n.sourceType="stream";else return this.emit("error",new me("INPUTSTEAMBUFFERREQUIRED",{name:n.name})),this;return this._entriesCount++,this._queue.push({data:n,source:e}),this}directory(e,n,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new me("QUEUECLOSED")),this;if(typeof e!="string"||e.length===0)return this.emit("error",new me("DIRECTORYDIRPATHREQUIRED")),this;this._pending++,n===!1?n="":typeof n!="string"&&(n=e);var i=!1;typeof r=="function"?(i=r,r={}):typeof r!="object"&&(r={});var o={stat:!0,dot:!0};function s(){this._pending--,this._maybeFinalize()}function a(c){this.emit("error",c)}function u(c){l.pause();let f=!1,p=Object.assign({},r);p.name=c.relative,p.prefix=n,p.stats=c.stat,p.callback=l.resume.bind(l);try{if(i){if(p=i(p),p===!1)f=!0;else if(typeof p!="object")throw new me("DIRECTORYFUNCTIONINVALIDDATA",{dirpath:e})}}catch(d){this.emit("error",d);return}if(f){l.resume();return}this._append(c.absolute,p)}let l=Mc(e,o);return l.on("error",a.bind(this)),l.on("match",u.bind(this)),l.on("end",s.bind(this)),this}file(e,n){return this._state.finalize||this._state.aborted?(this.emit("error",new me("QUEUECLOSED")),this):typeof e!="string"||e.length===0?(this.emit("error",new me("FILEFILEPATHREQUIRED")),this):(this._append(e,n),this)}glob(e,n,r){this._pending++,n={stat:!0,pattern:e,...n};function i(){this._pending--,this._maybeFinalize()}function o(u){this.emit("error",u)}function s(u){a.pause();let l=Object.assign({},r);l.callback=a.resume.bind(a),l.stats=u.stat,l.name=u.relative,this._append(u.absolute,l)}let a=new dN(n.cwd||".",n);return a.on("error",o.bind(this)),a.on("match",s.bind(this)),a.on("end",i.bind(this)),this}finalize(){if(this._state.aborted){var e=new me("ABORTED");return this.emit("error",e),Promise.reject(e)}if(this._state.finalize){var n=new me("FINALIZING");return this.emit("error",n),Promise.reject(n)}this._state.finalize=!0,this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var r=this;return new Promise(function(i,o){var s;r._module.on("end",function(){s||i()}),r._module.on("error",function(a){s=!0,o(a)})})}symlink(e,n,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new me("QUEUECLOSED")),this;if(typeof e!="string"||e.length===0)return this.emit("error",new me("SYMLINKFILEPATHREQUIRED")),this;if(typeof n!="string"||n.length===0)return this.emit("error",new me("SYMLINKTARGETREQUIRED",{filepath:e})),this;if(!this._supportsSymlink)return this.emit("error",new me("SYMLINKNOTSUPPORTED",{filepath:e})),this;var i={};return i.type="symlink",i.name=e.replace(/\\/g,"/"),i.linkname=n.replace(/\\/g,"/"),i.sourceType="buffer",typeof r=="number"&&(i.mode=r),this._entriesCount++,this._queue.push({data:i,source:Buffer.concat([])}),this}pointer(){return this._pointer}};var kn=class{getName(){}getSize(){}getLastModifiedDate(){}isDirectory(){}};var rv=ae(gl(),1);function Ow(t,e){e=e||!1;var n=e?t.getFullYear():t.getUTCFullYear();if(n<1980)return 2162688;if(n>=2044)return 2141175677;var r={year:n,month:e?t.getMonth():t.getUTCMonth(),date:e?t.getDate():t.getUTCDate(),hours:e?t.getHours():t.getUTCHours(),minutes:e?t.getMinutes():t.getUTCMinutes(),seconds:e?t.getSeconds():t.getUTCSeconds()};return r.year-1980<<25|r.month+1<<21|r.date<<16|r.hours<<11|r.minutes<<5|r.seconds/2}function Pw(t){return new Date((t>>25&127)+1980,(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(t&31)<<1)}function lt(t){var e=Buffer.alloc(8);return e.writeUInt32LE(t%4294967296,0),e.writeUInt32LE(t/4294967296|0,4),e}function ge(t){var e=Buffer.alloc(2);return e.writeUInt16LE((t&65535)>>>0,0),e}function Lw(t,e){return t.readUInt16LE(e)}function fe(t){var e=Buffer.alloc(4);return e.writeUInt32LE((t&4294967295)>>>0,0),e}var Nw=8,Mw=1,hN=4,mN=2,Fw=64,qw=2048,pi=class t{constructor(){return this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this}encode(){return ge((this.descriptor?Nw:0)|(this.utf8?qw:0)|(this.encryption?Mw:0)|(this.strongEncryption?Fw:0))}static parse(e,n){var r=Lw(e,n),i=new t;return i.useDataDescriptor((r&Nw)!==0),i.useUTF8ForNames((r&qw)!==0),i.useStrongEncryption((r&Fw)!==0),i.useEncryption((r&Mw)!==0),i.setSlidingDictionarySize((r&mN)!==0?8192:4096),i.setNumberOfShannonFanoTrees((r&hN)!==0?3:2),i}setNumberOfShannonFanoTrees(e){this.numberOfShannonFanoTrees=e}getNumberOfShannonFanoTrees(){return this.numberOfShannonFanoTrees}setSlidingDictionarySize(e){this.slidingDictionarySize=e}getSlidingDictionarySize(){return this.slidingDictionarySize}useDataDescriptor(e){this.descriptor=e}usesDataDescriptor(){return this.descriptor}useEncryption(e){this.encryption=e}usesEncryption(){return this.encryption}useStrongEncryption(e){this.strongEncryption=e}usesStrongEncryption(){return this.strongEncryption}useUTF8ForNames(e){this.utf8=e}usesUTF8ForNames(){return this.utf8}};var Sp={PERM_MASK:4095,FILE_TYPE_FLAG:61440,LINK_FLAG:40960,FILE_FLAG:32768,DIR_FLAG:16384,DEFAULT_LINK_PERM:511,DEFAULT_DIR_PERM:493,DEFAULT_FILE_PERM:420};var jw=Buffer.alloc(0);var Bw=65535,Ep=16,yl=Buffer.from(Array(2));var br=Buffer.from(Array(4)),Ww=10,kp=20,No=45,zw=45,bl=0,Mo=8,Dp=3,Uw=0,$w=67324752,Hw=134695760,Vw=33639248,Gw=101010256,Kw=101075792,Yw=117853008,Tp=65535,ut=4294967295,Qw=1;var Zw=1;var Jw=4095;var Xw=16384;var ev=32768;var tv=32,nv=16;var di=class extends kn{constructor(e){super(),this.platform=Uw,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new pi,this.crc=0,this.time=-1,this.minver=Ww,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,e&&this.setName(e)}getCentralDirectoryExtra(){return this.getExtra()}getComment(){return this.comment!==null?this.comment:""}getCompressedSize(){return this.csize}getCrc(){return this.crc}getExternalAttributes=function(){return this.exattr};getExtra(){return this.extra!==null?this.extra:jw}getGeneralPurposeBit(){return this.gpb}getInternalAttributes(){return this.inattr}getLastModifiedDate(){return this.getTime()}getLocalFileDataExtra(){return this.getExtra()}getMethod(){return this.method}getName(){return this.name}getPlatform(){return this.platform}getSize(){return this.size}getTime(){return this.time!==-1?Pw(this.time):-1}getTimeDos(){return this.time!==-1?this.time:0}getUnixMode(){return this.platform!==Dp?0:this.getExternalAttributes()>>Ep&Bw}getVersionNeededToExtract(){return this.minver}setComment(e){Buffer.byteLength(e)!==e.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.comment=e}setCompressedSize(e){if(e<0)throw new Error("invalid entry compressed size");this.csize=e}setCrc(e){if(e<0)throw new Error("invalid entry crc32");this.crc=e}setExternalAttributes(e){this.exattr=e>>>0}setExtra(e){this.extra=e}setGeneralPurposeBit(e){if(!(e instanceof pi))throw new Error("invalid entry GeneralPurposeBit");this.gpb=e}setInternalAttributes(e){this.inattr=e}setMethod(e){if(e<0)throw new Error("invalid entry compression method");this.method=e}setName(e,n=!1){e=(0,rv.default)(e,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,""),n&&(e=`/${e}`),Buffer.byteLength(e)!==e.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.name=e}setPlatform(e){this.platform=e}setSize(e){if(e<0)throw new Error("invalid entry size");this.size=e}setTime(e,n){if(!(e instanceof Date))throw new Error("invalid entry time");this.time=Ow(e,n)}setUnixMode(e){e|=this.isDirectory()?Xw:ev;var n=0;n|=e<<Ep|(this.isDirectory()?nv:tv),this.setExternalAttributes(n),this.mode=e&Jw,this.platform=Dp}setVersionNeededToExtract(e){this.minver=e}isDirectory(){return this.getName().slice(-1)==="/"}isUnixSymlink(){return(this.getUnixMode()&Sp.FILE_TYPE_FLAG)===Sp.LINK_FLAG}isZip64(){return this.csize>ut||this.size>ut}};var sv=ae(yr(),1);var iv=ae(yr(),1);function ov(t){if(t===null)return Buffer.alloc(0);if(typeof t=="string")return Buffer.from(t);if(yn(t)&&!t._readableState){var e=new iv.PassThrough;return t.pipe(e),e}return t}var hi=class extends sv.Transform{constructor(e){super(e),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}}_appendBuffer(e,n,r){}_appendStream(e,n,r){}_emitErrorCallback=function(e){e&&this.emit("error",e)};_finish(e){}_normalizeEntry(e){}_transform(e,n,r){r(null,e)}entry(e,n,r){if(n=n||null,typeof r!="function"&&(r=this._emitErrorCallback.bind(this)),!(e instanceof kn)){r(new Error("not a valid instance of ArchiveEntry"));return}if(this._archive.finish||this._archive.finished){r(new Error("unacceptable entry after finish"));return}if(this._archive.processing){r(new Error("already processing an entry"));return}if(this._archive.processing=!0,this._normalizeEntry(e),this._entry=e,n=ov(n),Buffer.isBuffer(n))this._appendBuffer(e,n,r);else if(yn(n))this._appendStream(e,n,r);else{this._archive.processing=!1,r(new Error("input source must be valid Stream or Buffer instance"));return}return this}finish(){if(this._archive.processing){this._archive.finish=!0;return}this._finish()}getBytesWritten(){return this.offset}write(e,n){return e&&(this.offset+=e.length),super.write(e,n)}};var fv=ae(xl(),1);var lv=ae(yr(),1),uv=ae(xl(),1),mi=class extends lv.Transform{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(e,n,r){e&&(this.checksum=uv.default.buf(e,this.checksum)>>>0,this.rawSize+=e.length),r(null,e)}digest(e){let n=Buffer.allocUnsafe(4);return n.writeUInt32BE(this.checksum>>>0,0),e?n.toString(e):n}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}};var cv=ae(xl(),1);import{DeflateRaw as gN}from"zlib";var gi=class extends gN{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(e,n){return e&&(this.compressedSize+=e.length),super.push(e,n)}_transform(e,n,r){e&&(this.checksum=cv.default.buf(e,this.checksum)>>>0,this.rawSize+=e.length),super._transform(e,n,r)}digest(e){let n=Buffer.allocUnsafe(4);return n.writeUInt32BE(this.checksum>>>0,0),e?n.toString(e):n}hex(){return this.digest("hex").toUpperCase()}size(e=!1){return e?this.compressedSize:this.rawSize}};function yN(t){return typeof t!="object"&&(t={}),typeof t.zlib!="object"&&(t.zlib={}),typeof t.zlib.level!="number"&&(t.zlib.level=Zw),t.forceZip64=!!t.forceZip64,t.forceLocalTime=!!t.forceLocalTime,t}var yi=class extends hi{constructor(e){let n=yN(e);super(n),this.options=n,this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:"",finish:!1,finished:!1,processing:!1,forceZip64:n.forceZip64,forceLocalTime:n.forceLocalTime}}_afterAppend(e){this._entries.push(e),e.getGeneralPurposeBit().usesDataDescriptor()&&this._writeDataDescriptor(e),this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished&&this._finish()}_appendBuffer(e,n,r){n.length===0&&e.setMethod(bl);var i=e.getMethod();if(i===bl&&(e.setSize(n.length),e.setCompressedSize(n.length),e.setCrc(fv.default.buf(n)>>>0)),this._writeLocalFileHeader(e),i===bl){this.write(n),this._afterAppend(e),r(null,e);return}else if(i===Mo){this._smartStream(e,r).end(n);return}else{r(new Error("compression method "+i+" not implemented"));return}}_appendStream(e,n,r){e.getGeneralPurposeBit().useDataDescriptor(!0),e.setVersionNeededToExtract(kp),this._writeLocalFileHeader(e);var i=this._smartStream(e,r);n.once("error",function(o){i.emit("error",o),i.end()}),n.pipe(i)}_finish(){this._archive.centralOffset=this.offset,this._entries.forEach(function(e){this._writeCentralFileHeader(e)}.bind(this)),this._archive.centralLength=this.offset-this._archive.centralOffset,this.isZip64()&&this._writeCentralDirectoryZip64(),this._writeCentralDirectoryEnd(),this._archive.processing=!1,this._archive.finish=!0,this._archive.finished=!0,this.end()}_normalizeEntry(e){e.getMethod()===-1&&e.setMethod(Mo),e.getMethod()===Mo&&(e.getGeneralPurposeBit().useDataDescriptor(!0),e.setVersionNeededToExtract(kp)),e.getTime()===-1&&e.setTime(new Date,this._archive.forceLocalTime),e._offsets={file:0,data:0,contents:0}}_smartStream(e,n){var r=e.getMethod()===Mo,i=r?new gi(this.options.zlib):new mi,o=null;function s(){var a=i.digest().readUInt32BE(0);e.setCrc(a),e.setSize(i.size()),e.setCompressedSize(i.size(!0)),this._afterAppend(e),n(o,e)}return i.once("end",s.bind(this)),i.once("error",function(a){o=a}),i.pipe(this,{end:!1}),i}_writeCentralDirectoryEnd(){var e=this._entries.length,n=this._archive.centralLength,r=this._archive.centralOffset;this.isZip64()&&(e=Tp,n=ut,r=ut),this.write(fe(Gw)),this.write(yl),this.write(yl),this.write(ge(e)),this.write(ge(e)),this.write(fe(n)),this.write(fe(r));var i=this.getComment(),o=Buffer.byteLength(i);this.write(ge(o)),this.write(i)}_writeCentralDirectoryZip64(){this.write(fe(Kw)),this.write(lt(44)),this.write(ge(No)),this.write(ge(No)),this.write(br),this.write(br),this.write(lt(this._entries.length)),this.write(lt(this._entries.length)),this.write(lt(this._archive.centralLength)),this.write(lt(this._archive.centralOffset)),this.write(fe(Yw)),this.write(br),this.write(lt(this._archive.centralOffset+this._archive.centralLength)),this.write(fe(1))}_writeCentralFileHeader(e){var n=e.getGeneralPurposeBit(),r=e.getMethod(),i=e._offsets.file,o=e.getSize(),s=e.getCompressedSize();if(e.isZip64()||i>ut){o=ut,s=ut,i=ut,e.setVersionNeededToExtract(No);var a=Buffer.concat([ge(Qw),ge(24),lt(e.getSize()),lt(e.getCompressedSize()),lt(e._offsets.file)],28);e.setExtra(a)}this.write(fe(Vw)),this.write(ge(e.getPlatform()<<8|zw)),this.write(ge(e.getVersionNeededToExtract())),this.write(n.encode()),this.write(ge(r)),this.write(fe(e.getTimeDos())),this.write(fe(e.getCrc())),this.write(fe(s)),this.write(fe(o));var u=e.getName(),l=e.getComment(),c=e.getCentralDirectoryExtra();n.usesUTF8ForNames()&&(u=Buffer.from(u),l=Buffer.from(l)),this.write(ge(u.length)),this.write(ge(c.length)),this.write(ge(l.length)),this.write(yl),this.write(ge(e.getInternalAttributes())),this.write(fe(e.getExternalAttributes())),this.write(fe(i)),this.write(u),this.write(c),this.write(l)}_writeDataDescriptor(e){this.write(fe(Hw)),this.write(fe(e.getCrc())),e.isZip64()?(this.write(lt(e.getCompressedSize())),this.write(lt(e.getSize()))):(this.write(fe(e.getCompressedSize())),this.write(fe(e.getSize())))}_writeLocalFileHeader(e){var n=e.getGeneralPurposeBit(),r=e.getMethod(),i=e.getName(),o=e.getLocalFileDataExtra();e.isZip64()&&(n.useDataDescriptor(!0),e.setVersionNeededToExtract(No)),n.usesUTF8ForNames()&&(i=Buffer.from(i)),e._offsets.file=this.offset,this.write(fe($w)),this.write(ge(e.getVersionNeededToExtract())),this.write(n.encode()),this.write(ge(r)),this.write(fe(e.getTimeDos())),e._offsets.data=this.offset,n.usesDataDescriptor()?(this.write(br),this.write(br),this.write(br)):(this.write(fe(e.getCrc())),this.write(fe(e.getCompressedSize())),this.write(fe(e.getSize()))),this.write(ge(i.length)),this.write(ge(o.length)),this.write(i),this.write(o),e._offsets.contents=this.offset}getComment(e){return this._archive.comment!==null?this._archive.comment:""}isZip64(){return this._archive.forceZip64||this._entries.length>Tp||this._archive.centralLength>ut||this._archive.centralOffset>ut}setComment(e){this._archive.comment=e}};var pv=ae(gl(),1);function dv(t){return t=t||new Date,t instanceof Date?t=t:typeof t=="string"?t=new Date(t):t=new Date,t}function hv(t){return(0,pv.default)(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")}var Fo=class extends yi{constructor(e){e=e||{},e.zlib=e.zlib||{},typeof e.level=="number"&&e.level>=0&&(e.zlib.level=e.level,delete e.level),!e.forceZip64&&typeof e.zlib.level=="number"&&e.zlib.level===0&&(e.store=!0),e.namePrependSlash=e.namePrependSlash||!1,super(e),e.comment&&e.comment.length>0&&this.setComment(e.comment)}_normalizeFileData(e){e={type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:"",...e};let n=e.type==="directory",r=e.type==="symlink";return e.name&&(e.name=hv(e.name),!r&&e.name.slice(-1)==="/"?(n=!0,e.type="directory"):n&&(e.name+="/")),(n||r)&&(e.store=!0),e.date=dv(e.date),e}entry(e,n,r){if(typeof r!="function"&&(r=this._emitErrorCallback.bind(this)),n=this._normalizeFileData(n),n.type!=="file"&&n.type!=="directory"&&n.type!=="symlink"){r(new Error(n.type+" entries not currently supported"));return}if(typeof n.name!="string"||n.name.length===0){r(new Error("entry name must be a non-empty string value"));return}if(n.type==="symlink"&&typeof n.linkname!="string"){r(new Error("entry linkname must be a non-empty string value when type equals symlink"));return}let i=new di(n.name);return i.setTime(n.date,this.options.forceLocalTime),n.namePrependSlash&&i.setName(n.name,!0),n.store&&i.setMethod(0),n.comment.length>0&&i.setComment(n.comment),n.type==="symlink"&&typeof n.mode!="number"&&(n.mode=40960),typeof n.mode=="number"&&(n.type==="symlink"&&(n.mode|=40960),i.setUnixMode(n.mode)),n.type==="symlink"&&typeof n.linkname=="string"&&(e=Buffer.from(n.linkname)),super.entry(i,e,r)}finalize(){this.finish()}};var qo=class{constructor(e){e=this.options={comment:"",forceUTC:!1,namePrependSlash:!1,store:!1,...e},this.engine=new Fo(e)}append(e,n,r){this.engine.entry(e,n,r)}finalize(){this.engine.finalize()}on(){return this.engine.on.apply(this.engine,arguments)}pipe(){return this.engine.pipe.apply(this.engine,arguments)}unpipe(){return this.engine.unpipe.apply(this.engine,arguments)}};var MF=ae(h0(),1);var jF=ae(yr(),1);var FF=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function m0(t){if(Buffer.isBuffer(t))return t;if(typeof t=="number")return Buffer.alloc(t);if(typeof t=="string")return Buffer.from(t);throw new Error("input must be buffer, number, or string, received "+typeof t)}function qF(t){let e=m0(4);return e.writeInt32BE(t,0),e}function id(t,e){t=m0(t),Buffer.isBuffer(e)&&(e=e.readUInt32BE(0));let n=~~e^-1;for(var r=0;r<t.length;r++)n=FF[(n^t[r])&255]^n>>>8;return n^-1}function g0(){return qF(id.apply(null,arguments))}g0.signed=function(){return id.apply(null,arguments)};g0.unsigned=function(){return id.apply(null,arguments)>>>0};var Il=class extends Lo{constructor(e){super(e),this._format="zip",this._module=new qo(e),this._supportsDirectory=!0,this._supportsSymlink=!0,this._modulePipe()}};var E0=ae(lS(),1);var Ol=class t{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){for(let r of e)if(t.isIncremental(r)){let i=x0(r.range),o=this.offsetAt(i.start),s=this.offsetAt(i.end);this._content=this._content.substring(0,o)+r.text+this._content.substring(s,this._content.length);let a=Math.max(i.start.line,0),u=Math.max(i.end.line,0),l=this._lineOffsets,c=y0(r.text,!1,o);if(u-a===c.length)for(let p=0,d=c.length;p<d;p++)l[p+a+1]=c[p];else c.length<1e4?l.splice(a+1,u-a,...c):this._lineOffsets=l=l.slice(0,a+1).concat(c,l.slice(u+1));let f=r.text.length-(s-o);if(f!==0)for(let p=a+1+c.length,d=l.length;p<d;p++)l[p]=l[p]+f}else if(t.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=y0(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return{line:0,character:e};for(;r<i;){let s=Math.floor((r+i)/2);n[s]>e?i=s:r=s+1}let o=r-1;return e=this.ensureBeforeEOL(e,n[o]),{line:o,character:e-n[o]}}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line];if(e.character<=0)return r;let i=e.line+1<n.length?n[e.line+1]:this._content.length,o=Math.min(r+e.character,i);return this.ensureBeforeEOL(o,r)}ensureBeforeEOL(e,n){for(;e>n&&b0(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(e){let n=e;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}},tn;(function(t){function e(i,o,s,a){return new Ol(i,o,s,a)}t.create=e;function n(i,o,s){if(i instanceof Ol)return i.update(o,s),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=n;function r(i,o){let s=i.getText(),a=od(o.map(BF),(c,f)=>{let p=c.range.start.line-f.range.start.line;return p===0?c.range.start.character-f.range.start.character:p}),u=0,l=[];for(let c of a){let f=i.offsetAt(c.range.start);if(f<u)throw new Error("Overlapping edit");f>u&&l.push(s.substring(u,f)),c.newText.length&&l.push(c.newText),u=i.offsetAt(c.range.end)}return l.push(s.substr(u)),l.join("")}t.applyEdits=r})(tn||(tn={}));function od(t,e){if(t.length<=1)return t;let n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);od(r,e),od(i,e);let o=0,s=0,a=0;for(;o<r.length&&s<i.length;)e(r[o],i[s])<=0?t[a++]=r[o++]:t[a++]=i[s++];for(;o<r.length;)t[a++]=r[o++];for(;s<i.length;)t[a++]=i[s++];return t}function y0(t,e,n=0){let r=e?[n]:[];for(let i=0;i<t.length;i++){let o=t.charCodeAt(i);b0(o)&&(o===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function b0(t){return t===13||t===10}function x0(t){let e=t.start,n=t.end;return e.line>n.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function BF(t){let e=x0(t.range);return e!==t.range?{newText:t.newText,range:e}:t}async function Pn(){try{return JSON.parse(await Mt.readFile("info.json","utf8"))}catch(t){console.log(`Failed to read info.json: ${t}`),process.exit(1)}}async function Ft(t,e,n,r){return new Promise((i,o)=>{let s=e.package?.scripts?.[t];if(s){let a=S0(`${s} ${(r??[]).join(" ")}`,{shell:!0,windowsHide:!0,stdio:"inherit",env:Object.assign({},process.env,{FACTORIO_MODNAME:e.name,FACTORIO_MODVERSION:e.version,WSLENV:(process.env.WSLENV?process.env.WSLENV+":":"")+"FACTORIO_MODNAME/u:FACTORIO_MODVERSION/u:FACTORIO_MODPACKAGE/p"},n)});a.on("error",o),a.on("close",(u,l)=>{u!==null?i(u):o(new Error(l?.toString()))})}else o(new Error(`No script '${t}'`))})}async function Ln(t,e){return new Promise((n,r)=>{let i=S0(`git ${t}`,{shell:!0,windowsHide:!0,stdio:e!==void 0?["pipe","inherit","inherit"]:"inherit"});e!==void 0&&i.stdin&&(i.stdin.write(e),i.stdin.end()),i.on("error",r),i.on("close",(o,s)=>{o===0?n():r(o!==null?new Error(`returned with code ${o}`):new Error(s?.toString()))})})}Ws.factorioDate="dd. mm. yyyy";async function Pl(t){let e=zt.joinPath(Ge.file(process.cwd()),"changelog.txt"),n;try{n=await Mt.readFile("changelog.txt","utf8")}catch{}if(!n)console.log("No changelog.txt");else{let r=ac(new Date,t.package?.datestamp_format??"isoDate"),i=tn.create(e.toString(),"factorio-changelog",1,n),o=ga(i),s=$g(o,t.version,r);if(s){let a=tn.applyEdits(i,[s]);await Mt.writeFile("changelog.txt",a),console.log(`Changelog section ${t.version} stamped ${r}`)}else console.log(`No Changelog section for ${t.version}`)}if(t.package?.scripts?.datestamp){let r=await Ft("datestamp",t);r!==0&&process.exit(r)}return!!n}function WF(t){let e={};for(let n of t){let r=n.split("/").filter(Boolean),i=e;for(let o of r)i[o]||(i[o]={}),i=i[o]}return e}function k0(t,e=""){let n=Object.keys(t);n.forEach((r,i)=>{let o=i===n.length-1;console.log(`${e}${o?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 "}${r}`);let a=e+(o?" ":"\u2502 ");k0(t[r],a)})}var zF=[".exe",".bat",".ps1",".sh",".py"];async function Ll(t){if(t.package?.scripts?.compile){let s=await Ft("compile",t);s!==0&&process.exit(s)}if(t.package?.scripts?.prepackage){let s=await Ft("prepackage",t);s!==0&&process.exit(s)}let e=new Il({zlib:{level:9}}),n=[],r=[],i=s=>{if(zF.some(a=>s.relative.endsWith(a))){r.push(`WARNING: File '${s.relative}' skipped due to forbidden extension`);return}e.file(s.absolute,{name:s.relative,prefix:`${t.name}_${t.version}`}),n.push(s)};if((await sd(process.cwd(),{pattern:"**",nodir:!0,ignore:[`**/${t.name}_*.zip`].concat(t.package?.ignore||[])})).forEach(i),t.package?.extra)for(let s of t.package.extra)(await sd(s.root,{pattern:s.glob??"**",nodir:!0,ignore:s.ignore})).forEach(i);return k0(WF(n.map(s=>s.relative))),r.forEach(s=>console.log(s)),e}var Ti;async function UF(){if(Ti)return Ti;let t=process.env.FACTORIO_UPLOAD_API_KEY;if(t)return Ti=t.trim(),Ti;let e=await ms({message:"Mod Portal API Key:"});if(e)return Ti=e.trim(),Ti;throw new Error("No API Key")}async function Yo(t,e){let n=await UF(),r=await fetch(e,{method:"POST",body:t,headers:new Headers({Authorization:`Bearer ${n}`})}),i;if(!r.ok){let o;try{i=await r.text(),o=JSON.parse(i).message}catch{o=`Unexpected non-json error response:
88
88
  ${i}
89
89
  `}throw new Error(o)}try{return i=await r.text(),JSON.parse(i)}catch{throw new Error(`Unexpected non-json success response:
90
90
  ${i}
91
- `)}}async function v0(t,e){let n=new FormData;return n.append("mod",t),(await Yo(n,e)).upload_url}async function Nl(t,e){console.log("Uploading to mod portal...");let n=await v0(t,"https://mods.factorio.com/api/v2/mods/releases/init_upload"),r=new FormData;r.append("file",new Blob([Uint8Array.from(e)],{type:"application/x-zip-compressed"}),`${t}.zip`),await Yo(r,n),console.log(`Published ${t}`)}async function jF(t,e,n){let r=await v0(t,"https://mods.factorio.com/api/v2/mods/images/add"),i=new FormData;return i.append("image",new Blob([Uint8Array.from(e)],{type:Th.getType(n)??void 0}),n),await Yo(i,r)}async function BF(t,e){let n=new FormData;return n.append("mod",t),n.append("images",e.join(",")),(await Yo(n,"https://mods.factorio.com/api/v2/mods/images/edit")).images}async function WF(t,e){let n=new FormData;n.append("mod",t),e.homepage!==void 0&&n.append("homepage",e.homepage),e.title!==void 0&&n.append("title",e.title),e.summary!==void 0&&n.append("summary",e.summary),e.description!==void 0&&n.append("description",e.description),e.faq!==void 0&&n.append("faq",e.faq),await Yo(n,"https://mods.factorio.com/api/v2/mods/edit_details").then(()=>{console.log("Details updated")}).catch(r=>{console.log(`Details update failed: ${r}`)})}async function S0(t,e,n,r){let i=await Mt.readFile(t).catch(()=>{});if(!i)return;let o=y0.createHash("sha1").update(i).digest("hex");r.add(o);let s=n.find(u=>u.id===o);if(s)return s;let a=await jF(e,i,b0.basename(t));return n.push(a),a}async function g0(t,e,n,r,i){let o=new Date().toISOString(),s=await Mt.readFile(t,"utf8").catch(()=>{});if(!s)return;let a=new RegExp(i?.url_match??/^((http(s?)|data):|#)/),u=i?.base_url;u&&!u.endsWith("/")&&(u+="/");let l=await Ws().use(function(){return async function(c,f){if(i?.strip_first_header??!0){let d=c.children[0];d.type==="heading"&&d.depth===1&&c.children.splice(0,1)}let p=new Map;nt(c,"image",d=>{let b=p.get(d.url);b?b.push(d):p.set(d.url,[d])});for(let[d,b]of p)if(!d.match(a))switch(i?.images){case"gallery":default:let g=await S0(b0.resolve(f.cwd,d),e,n,r);if(!g)continue;b.forEach(y=>{y.url=g.url});break;case"url":if(!u)continue;let S=u+d;b.forEach(y=>{y.url=S});break}u&&nt(c,"link",d=>{if(!d.url.match(a)){if(d.url==="$process_date"){d.url=o;return}d.url=u+d.url}})}}).process(s);return String(l)}async function od(t,e){return new Promise((n,r)=>{let i=[],o=$r(t,e);o.on("match",s=>{i.push(s)}),o.on("error",s=>r(s)),o.on("end",()=>n(i))})}async function Ml(t,e){let n={title:t.title,homepage:t.homepage,summary:t.description},{images:r}=await yu(t.name,!0),i=new Set,o=t.package?.gallery;if(o)for(let u of o){let l=await od(process.cwd(),{pattern:u,nodir:!0});await Promise.all(l.map(c=>c.absolute).sort().map(async c=>S0(c,t.name,r,i)))}let s=await g0(e?.readme??t.package?.readme??"readme.md",t.name,r,i,t?.package?.markdown);s&&(n.description=s);let a=await g0(e?.faq??t.package?.faq??"faq.md",t.name,r,i,t?.package?.markdown);if(a&&(n.faq=a),t.package?.gallery){if(t.package.prune_gallery===!1)for(let u of r)i.add(u.id);console.log("Sorting gallery ..."),await BF(t.name,Array.from(i))}console.log("Updating details ..."),await WF(t.name,n)}async function Fl(t,e){let n=_0.default.inc(t.version,"patch",{loose:!0}),r=kd(e,["version"],n,{});if(await Mt.writeFile("info.json",Dd(e,r)),t.version=n,await Mt.readFile("changelog.txt","utf8").catch(()=>{}).then(async i=>{if(i){let s=i.indexOf(`\r
91
+ `)}}async function D0(t,e){let n=new FormData;return n.append("mod",t),(await Yo(n,e)).upload_url}async function Nl(t,e){console.log("Uploading to mod portal...");let n=await D0(t,"https://mods.factorio.com/api/v2/mods/releases/init_upload"),r=new FormData;r.append("file",new Blob([Uint8Array.from(e)],{type:"application/x-zip-compressed"}),`${t}.zip`),await Yo(r,n),console.log(`Published ${t}`)}async function $F(t,e,n){let r=await D0(t,"https://mods.factorio.com/api/v2/mods/images/add"),i=new FormData;return i.append("image",new Blob([Uint8Array.from(e)],{type:Rh.getType(n)??void 0}),n),await Yo(i,r)}async function HF(t,e){let n=new FormData;return n.append("mod",t),n.append("images",e.join(",")),(await Yo(n,"https://mods.factorio.com/api/v2/mods/images/edit")).images}async function VF(t,e){let n=new FormData;n.append("mod",t),e.homepage!==void 0&&n.append("homepage",e.homepage),e.title!==void 0&&n.append("title",e.title),e.summary!==void 0&&n.append("summary",e.summary),e.description!==void 0&&n.append("description",e.description),e.faq!==void 0&&n.append("faq",e.faq),await Yo(n,"https://mods.factorio.com/api/v2/mods/edit_details").then(()=>{console.log("Details updated")}).catch(r=>{console.log(`Details update failed: ${r}`)})}async function T0(t,e,n,r){let i=await Mt.readFile(t).catch(()=>{});if(!i)return;let o=w0.createHash("sha1").update(i).digest("hex");r.add(o);let s=n.find(u=>u.id===o);if(s)return s;let a=await $F(e,i,v0.basename(t));return n.push(a),a}async function _0(t,e,n,r,i){let o=new Date().toISOString(),s=await Mt.readFile(t,"utf8").catch(()=>{});if(!s)return;let a=new RegExp(i?.url_match??/^((http(s?)|data):|#)/),u=i?.base_url;u&&!u.endsWith("/")&&(u+="/");let l=await Bs().use(function(){return async function(c,f){if(i?.strip_first_header??!0){let d=c.children[0];d.type==="heading"&&d.depth===1&&c.children.splice(0,1)}let p=new Map;nt(c,"image",d=>{let b=p.get(d.url);b?b.push(d):p.set(d.url,[d])});for(let[d,b]of p)if(!d.match(a))switch(i?.images){case"gallery":default:let g=await T0(v0.resolve(f.cwd,d),e,n,r);if(!g)continue;b.forEach(y=>{y.url=g.url});break;case"url":if(!u)continue;let S=u+d;b.forEach(y=>{y.url=S});break}u&&nt(c,"link",d=>{if(!d.url.match(a)){if(d.url==="$process_date"){d.url=o;return}d.url=u+d.url}})}}).process(s);return String(l)}async function sd(t,e){return new Promise((n,r)=>{let i=[],o=$r(t,e);o.on("match",s=>{i.push(s)}),o.on("error",s=>r(s)),o.on("end",()=>n(i))})}async function Ml(t,e){let n={title:t.title,homepage:t.homepage,summary:t.description},{images:r}=await yu(t.name,!0),i=new Set,o=t.package?.gallery;if(o)for(let u of o){let l=await sd(process.cwd(),{pattern:u,nodir:!0});await Promise.all(l.map(c=>c.absolute).sort().map(async c=>T0(c,t.name,r,i)))}let s=await _0(e?.readme??t.package?.readme??"readme.md",t.name,r,i,t?.package?.markdown);s&&(n.description=s);let a=await _0(e?.faq??t.package?.faq??"faq.md",t.name,r,i,t?.package?.markdown);if(a&&(n.faq=a),t.package?.gallery){if(t.package.prune_gallery===!1)for(let u of r)i.add(u.id);console.log("Sorting gallery ..."),await HF(t.name,Array.from(i))}console.log("Updating details ..."),await VF(t.name,n)}async function Fl(t,e){let n=E0.default.inc(t.version,"patch",{loose:!0}),r=Dd(e,["version"],n,{});if(await Mt.writeFile("info.json",Td(e,r)),t.version=n,await Mt.readFile("changelog.txt","utf8").catch(()=>{}).then(async i=>{if(i){let s=i.indexOf(`\r
92
92
  `)!==-1?`\r
93
93
  `:`
94
- `;await Mt.writeFile("changelog.txt",`---------------------------------------------------------------------------------------------------${s}Version: ${n}${s}Date: ????${s} Changes:${s}`+i)}}),t.package?.scripts?.version){let i=await Ft("version",t);i!==0&&process.exit(i)}return t}ne.command("run <script> [args...]").description("Run a script from info.json#/package/scripts").action(async(t,e)=>{process.exit(await Ft(t,await Pn(),void 0,e))});ne.command("datestamp").description("Datestamp the current changelog section").action(async()=>{let t=await Pn();await Pl(t)});import*as E0 from"fs/promises";ne.command("version").description("Increment the mod version").action(async()=>{let t=await E0.readFile("info.json","utf8"),e=JSON.parse(t);await Fl(e,t)});import{createWriteStream as zF}from"fs";ne.command("package").description("Build a zip package").option("--outdir <outdir>","","").action(async t=>{let e=await Pn(),n=zt.resolvePath(Ge.file(process.cwd()),t.outdir,`${e.name}_${e.version}.zip`),r=zF(n.fsPath),i=await Ll(e);i.pipe(r),await i.finalize(),console.log(`Built ${e.name}_${e.version}.zip ${i.pointer()} bytes`)});import UF from"path";import*as k0 from"fs/promises";ne.command("upload <zipname> [name]").description("Upload a zip package to the mod portal").action(async(t,e)=>{if(!e){let r=UF.basename(t,".zip").match(/^(.*?)(_(\d+\.){2}\d+)?$/);r&&(e=r[1])}if(!e){console.log("Unable to determine `name`");return}await Nl(e,await k0.readFile(t))});ne.command("details").description("Update mod details").option("--readme <readme.md>").option("--faq <faq.md>").action(async t=>{let e=await Pn();return Ml(e,t)});import*as R0 from"os";import*as Ri from"fs/promises";import*as A0 from"crypto";import VF from"path";import{exec as jl}from"child_process";import*as D0 from"os";import*as ql from"fs/promises";import $F from"path";async function HF(t,e){let n=process.env.FMTK_CONFIG??$F.join(D0.homedir(),".fmtk","config.json");try{let r=JSON.parse(await ql.readFile(n,"utf8"));if(typeof r!="object"||Array.isArray(r))return;let i={};for(let o in r)o.startsWith(`${t}.`)&&(i[o.substring(t.length+1)]=r[o]);return e||console.log(`Got config section ${t} from ${n}`),i}catch{}}async function T0(t,e,n){return Object.assign({},...await Promise.all([e,HF(t,n)]))}ne.command("publish").description("Package and publish a mod to the mod portal").action(async()=>{let t=await Ri.readFile("info.json","utf8"),e=JSON.parse(t);console.log(`Publishing: ${process.cwd()} ${e.version}`);let n=await T0("package",{preparingCommitMessage:"preparing release of version $VERSION",movedToCommitMessage:"moved to version $VERSION",autoCommitAuthor:"compilatron <compilatron@justarandomgeek.com>",tagName:"$VERSION",tagMessage:void 0}),r=await new Promise(l=>{jl("git status --porcelain",(c,f,p)=>{c&&c.code!==0&&l(void 0),f&&l("HasChanges"),l("OK")})}),i;if(r){if(r==="HasChanges"){console.log("Cannot Publish with uncommitted changes");return}i=await new Promise((c,f)=>{jl("git branch --show-current",(p,d)=>{p&&p.code!==0&&f(p),c(d.trim())})});let l=e.package?.git_publish_branch;switch(l){case null:break;case void 0:l=await new Promise((c,f)=>{jl("git config init.defaultBranch",(p,d)=>{p&&p.code!==0&&f(p),c(d.trim())})});default:l!==i&&(console.log(`Cannot Publish on branch other than '${l}', currently on '${i}'`),process.exit(1));break}}else console.log("No git repo found, skipping git subtasks...");if(e.package?.scripts?.prepublish){let l=await Ft("prepublish",e);l!==0&&process.exit(l)}let o=await Pl(e),s;if(r&&(o&&await Ln("add changelog.txt"),await Ln(`commit --author "${n.autoCommitAuthor}" --allow-empty -F -`,n.preparingCommitMessage.replace(/\$VERSION/g,e.version).replace(/\$MODNAME/g,e.name)),!e.package?.no_git_tag)){s=n.tagName.replace(/\$VERSION/g,e.version).replace(/\$MODNAME/g,e.name);let l=n.tagMessage?.replace(/\$VERSION/g,e.version).replace(/\$MODNAME/g,e.name);await Ln(`tag -a ${s} -F -`,l??"")}let a=await new Promise((l,c)=>{Ll(e).then(f=>{let p=[];f.on("data",d=>p.push(Buffer.from(d))),f.on("error",d=>c(d)),f.on("end",()=>l(Buffer.concat(p))),f.finalize()})});if(e.package?.scripts?.publish){let l=await Ft("publish",e);l!==0&&process.exit(l)}if(e.package?.no_portal_upload||(await Nl(e.name,a),e.package?.sync_portal_details&&await Ml(e)),e.package?.scripts?.postpublish){let l=VF.join(R0.tmpdir(),`${A0.randomBytes(16).toString("base64url")}.zip`);await Ri.writeFile(l,a);let c=await Ft("postpublish",e,{FACTORIO_MODPACKAGE:l});await Ri.unlink(l),c!==0&&process.exit(c)}let u=await Fl(e,t);if(r&&(await Ln("add info.json"),o&&await Ln("add changelog.txt"),await Ln(`commit --author "${n.autoCommitAuthor}" -F -`,n.movedToCommitMessage.replace(/\$VERSION/g,u.version).replace(/\$MODNAME/g,u.name)),!e.package?.no_git_push)){let l=await new Promise(c=>{jl(`git config branch.${i}.remote`,(f,p)=>{f&&f.code!==0&&c(void 0),c(p.trim())})});l?await Ln(`push ${l} ${i} ${s??""}`):console.log(`no remote set as upstream on ${i}`)}});import*as tn from"fs/promises";import O0 from"path";import{createWriteStream as GF}from"fs";import C0 from"path";var Bl=class{constructor(e,n,r){this.settingsdump=n;this.protosdump=r;if(this.docs=JSON.parse(e),this.docs.application!=="factorio")throw new Error(`Unknown application: ${this.docs.application}`);if(this.docs.api_version!==6)throw new Error(`Unsupported Prototype Docs JSON Version ${this.docs.api_version}`);if(this.docs.stage!=="prototype")throw new Error(`Wrong stage: ${this.docs.stage}`);this.concepts=new Map(this.docs.types.map(i=>[i.name,i])),this.simple_structs=new Set;for(let[i,o]of this.concepts)typeof o.type=="object"&&o.type.complex_type==="struct"&&this.simple_structs.add(i);this.prototypes=new Map(this.docs.prototypes.map(i=>[i.name,i]))}settingsdump;protosdump;docs;concepts;simple_structs;prototypes;type_prefix="data.";get api_version(){return this.docs.api_version}get stage(){return this.docs.stage}get application(){return this.docs.application}get application_version(){return this.docs.application_version}resolve_link(e,n){if(n=n?`#${n}`:"",["prototypes","types"].includes(e))return`/${e}.html${n}`;if(["libraries","storage","migrations","data-lifecycle","prototype-tree","noise-expressions","instrument","item-weight"].includes(e))return`/auxiliary/${e}.html${n}`;if(this.concepts.has(e))return`/types/${e}.html${n}`;if(this.prototypes.has(e))return`/prototypes/${e}.html${n}`;console.warn(`Invalid Link: prototype:${e}${n}`)}async generate_LuaLS_docs(e){return[...await this.generate_LuaLS_concepts(e),...await this.generate_LuaLS_prototypes(e),this.generate_LuaLS_data(e)]}async generate_LuaLS_concepts(e){let n=[];for(let[r,i]of this.concepts){let o=new Xo(`prototype-api/concepts/${i.name}`,this.application_version);if(i.type==="builtin")continue;let s=this.simple_structs.has(i.name),a=s?"":".struct";if(i.properties){let u=new Li(this.type_prefix+i.name+a);u.exact=!0,u.description=await e(i.description,{scope:"prototype",member:i.name}),i.parent&&(u.parents=[new Q(this.type_prefix+i.parent)]);for(let l of i.properties)u.add(new Ke(l.name,this.lua_proto_type(l.type),await e(l.description,{scope:"prototype",member:i.name,part:l.name}),l.optional));o.add(u)}if(!s){let u=i.type;if(i.name==="AnyPrototype"&&typeof u=="object"&&u.complex_type==="union"){let l=["MapGenPresets","GuiStyle"];u={complex_type:"union",options:u.options.filter(f=>typeof f=="object"?!(f.complex_type==="type"&&typeof f.value=="string"&&l.includes(f.value)):!l.includes(f))}}if(this.protosdump){let l=i.description.match(/^The name of an? \[(.+)\]/);i.type==="string"&&i.name.endsWith("ID")&&l&&(u=i.name.replace(/ID$/,"Name"))}o.add(new Yl(this.type_prefix+i.name,this.lua_proto_type(u,i),i.description))}n.push(o)}return n}generate_LuaLS_data(e){let n=new Xo("prototype-api/data",this.application_version),r=new Li("data");r.add(new Ke("raw",new Q("data.raw"))),r.add(new Ke("is_demo",new Q("boolean")));let i=new Ad("extend",[new Bn("otherdata",new Ar(new Q("data.AnyPrototype")))]);i.add(new ts(void 0,[new Bn("self",new Q("data")),new Bn("otherdata",new Ar(new Q("data.AnyPrototype")))])),i.add(new ts(void 0,[new Bn("otherdata",new Ar(new Q("data.AnyModSettingPrototype")))])),i.add(new ts(void 0,[new Bn("self",new Q("data")),new Bn("otherdata",new Ar(new Q("data.AnyModSettingPrototype")))])),r.add(i),r.global_name="data",n.add(r);let o=new Li("data.raw");o.exact=!0,n.add(o);for(let[s,a]of this.prototypes)a.typename&&o.add(new Ke(new es(a.typename),new nn(new Q("string"),new Q(this.type_prefix+a.name))));return o.add(new Ke("bool-setting",new nn(new Q("string"),new Q("data.ModBoolSettingPrototype")),"In Settings Stage")),o.add(new Ke("int-setting",new nn(new Q("string"),new Q("data.ModIntSettingPrototype")),"In Settings Stage")),o.add(new Ke("double-setting",new nn(new Q("string"),new Q("data.ModDoubleSettingPrototype")),"In Settings Stage")),o.add(new Ke("string-setting",new nn(new Q("string"),new Q("data.ModStringSettingPrototype")),"In Settings Stage")),o.add(new Ke("color-setting",new nn(new Q("string"),new Q("data.ModColorSettingPrototype")),"In Settings Stage")),n}nameFor(e){let n=this.docs.prototypes.find(r=>r.typename===e);if(n)return new Q(this.type_prefix+n.name.replace(/(Prototype)?$/,"Name"));throw new Error(`no type for '${e}'`)}async generate_LuaLS_prototypes(e){let n=[];for(let[r,i]of this.prototypes){let o=new Xo(`prototype-api/prototypes/${i.name}`,this.application_version),s=new Li(this.type_prefix+i.name);s.exact=!0,s.description=await e(i.description,{scope:"prototype",member:i.name}),i.parent&&(s.parents=[new Q(this.type_prefix+i.parent)]);for(let l of i.properties)s.add(new Ke(l.name,this.lua_proto_type(l.type),await e(l.description,{scope:"prototype",member:i.name,part:l.name}),l.optional)),l.alt_name&&s.add(new Ke(l.alt_name,this.lua_proto_type(l.type),await e(l.description,{scope:"prototype",member:i.name,part:l.alt_name}),l.optional));if(i.custom_properties){let l=i.custom_properties;s.add(new Ke(this.lua_proto_type(l.key_type),this.lua_proto_type(l.value_type),await e(l.description,{scope:"prototype",member:i.name,part:"custom_properties"})))}o.add(s);let a=i.name.replace(/(Prototype)?$/,"Name"),u=[];if(this.prototypes.forEach(l=>{l.parent===i.name&&u.push(new Q(this.type_prefix+l.name.replace(/(Prototype)?$/,"Name")))}),i.typename){if(this.protosdump)for(let l in this.protosdump[i.typename])u.push(new es(l));u.push(new Q("string"))}o.add(new Yl(this.type_prefix+a,new Kl(u))),n.push(o)}return n}lua_proto_type(e,n){switch(typeof e){case"string":switch(e){case"bool":return new Q("boolean");case"table":case"number":case"nil":case"boolean":case"string":case"float":case"double":case"int8":case"uint8":case"int16":case"uint16":case"int32":case"uint32":case"int64":case"uint64":return new Q(e)}return e.match(/^defines\./)?new Q(e):new Q(this.type_prefix+e);case"object":switch(e.complex_type){case"struct":if(!n)throw new Error("struct without parent");return this.simple_structs.has(n.name)?new Q(this.type_prefix+n.name):new Q(this.type_prefix+n.name+".struct");case"array":return new Ar(this.lua_proto_type(e.value,n));case"tuple":return new Rd(e.values.map(r=>this.lua_proto_type(r,n)));case"dictionary":return new nn(this.lua_proto_type(e.key,n),this.lua_proto_type(e.value,n));case"union":return new Kl(e.options.map(r=>this.lua_proto_type(r,n)));case"literal":return new es(e.value);case"type":return this.lua_proto_type(e.value,n);default:throw new Error("Invalid Type")}default:throw new Error("Invalid Type")}}};async function I0(t,e,n,r,i){let o=n&&JSON.parse(n),s=r&&JSON.parse(r),a=new Bl(e,o,s),u=new ns(t,a,o,s);console.log(`Loaded Prototype docs ${a.application_version}`),console.log(`Loaded Runtime docs ${u.application_version}`),o&&console.log("With Settings Dump"),s&&console.log("With Prototypes Dump");let l=b=>{let g=b.url.match(/^(runtime|prototype|auxiliary):(.+?)(?:::(.+))?$/);if(g)switch(g[1]){case"runtime":let S=u.resolve_link(g[2],g[3]);S&&(b.url="https://lua-api.factorio.com/latest"+S);break;case"prototype":let y=a.resolve_link(g[2],g[3]);y&&(b.url="https://lua-api.factorio.com/latest"+y);break;case"auxiliary":b.url=`https://lua-api.factorio.com/latest/${g[2]}.html`;break}},c=Ws().use(function(){return function(b,g){nt(b,"link",l)}}),f=async(b,g)=>{let S=g?`[View Documentation](${g.scope}:${g.member}${g.part?"::"+g.part:""})`:"";return String(await c.process(`${b??""}
94
+ `;await Mt.writeFile("changelog.txt",`---------------------------------------------------------------------------------------------------${s}Version: ${n}${s}Date: ????${s} Changes:${s}`+i)}}),t.package?.scripts?.version){let i=await Ft("version",t);i!==0&&process.exit(i)}return t}ne.command("run <script> [args...]").description("Run a script from info.json#/package/scripts").action(async(t,e)=>{process.exit(await Ft(t,await Pn(),void 0,e))});ne.command("datestamp").description("Datestamp the current changelog section").action(async()=>{let t=await Pn();await Pl(t)});import*as R0 from"fs/promises";ne.command("version").description("Increment the mod version").action(async()=>{let t=await R0.readFile("info.json","utf8"),e=JSON.parse(t);await Fl(e,t)});import{createWriteStream as GF}from"fs";ne.command("package").description("Build a zip package").option("--outdir <outdir>","","").action(async t=>{let e=await Pn(),n=zt.resolvePath(Ge.file(process.cwd()),t.outdir,`${e.name}_${e.version}.zip`),r=GF(n.fsPath),i=await Ll(e);i.pipe(r),await i.finalize(),console.log(`Built ${e.name}_${e.version}.zip ${i.pointer()} bytes`)});import KF from"path";import*as A0 from"fs/promises";ne.command("upload <zipname> [name]").description("Upload a zip package to the mod portal").action(async(t,e)=>{if(!e){let r=KF.basename(t,".zip").match(/^(.*?)(_(\d+\.){2}\d+)?$/);r&&(e=r[1])}if(!e){console.log("Unable to determine `name`");return}await Nl(e,await A0.readFile(t))});ne.command("details").description("Update mod details").option("--readme <readme.md>").option("--faq <faq.md>").action(async t=>{let e=await Pn();return Ml(e,t)});import*as O0 from"os";import*as Ri from"fs/promises";import*as P0 from"crypto";import ZF from"path";import{exec as jl}from"child_process";import*as C0 from"os";import*as ql from"fs/promises";import YF from"path";async function QF(t,e){let n=process.env.FMTK_CONFIG??YF.join(C0.homedir(),".fmtk","config.json");try{let r=JSON.parse(await ql.readFile(n,"utf8"));if(typeof r!="object"||Array.isArray(r))return;let i={};for(let o in r)o.startsWith(`${t}.`)&&(i[o.substring(t.length+1)]=r[o]);return e||console.log(`Got config section ${t} from ${n}`),i}catch{}}async function I0(t,e,n){return Object.assign({},...await Promise.all([e,QF(t,n)]))}ne.command("publish").description("Package and publish a mod to the mod portal").action(async()=>{let t=await Ri.readFile("info.json","utf8"),e=JSON.parse(t);console.log(`Publishing: ${process.cwd()} ${e.version}`);let n=await I0("package",{preparingCommitMessage:"preparing release of version $VERSION",movedToCommitMessage:"moved to version $VERSION",autoCommitAuthor:"compilatron <compilatron@justarandomgeek.com>",tagName:"$VERSION",tagMessage:void 0}),r=await new Promise(l=>{jl("git status --porcelain",(c,f,p)=>{c&&c.code!==0&&l(void 0),f&&l("HasChanges"),l("OK")})}),i;if(r){if(r==="HasChanges"){console.log("Cannot Publish with uncommitted changes");return}i=await new Promise((c,f)=>{jl("git branch --show-current",(p,d)=>{p&&p.code!==0&&f(p),c(d.trim())})});let l=e.package?.git_publish_branch;switch(l){case null:break;case void 0:l=await new Promise((c,f)=>{jl("git config init.defaultBranch",(p,d)=>{p&&p.code!==0&&f(p),c(d.trim())})});default:l!==i&&(console.log(`Cannot Publish on branch other than '${l}', currently on '${i}'`),process.exit(1));break}}else console.log("No git repo found, skipping git subtasks...");if(e.package?.scripts?.prepublish){let l=await Ft("prepublish",e);l!==0&&process.exit(l)}let o=await Pl(e),s;if(r&&(o&&await Ln("add changelog.txt"),await Ln(`commit --author "${n.autoCommitAuthor}" --allow-empty -F -`,n.preparingCommitMessage.replace(/\$VERSION/g,e.version).replace(/\$MODNAME/g,e.name)),!e.package?.no_git_tag)){s=n.tagName.replace(/\$VERSION/g,e.version).replace(/\$MODNAME/g,e.name);let l=n.tagMessage?.replace(/\$VERSION/g,e.version).replace(/\$MODNAME/g,e.name);await Ln(`tag -a ${s} -F -`,l??"")}let a=await new Promise((l,c)=>{Ll(e).then(f=>{let p=[];f.on("data",d=>p.push(Buffer.from(d))),f.on("error",d=>c(d)),f.on("end",()=>l(Buffer.concat(p))),f.finalize()})});if(e.package?.scripts?.publish){let l=await Ft("publish",e);l!==0&&process.exit(l)}if(e.package?.no_portal_upload||(await Nl(e.name,a),e.package?.sync_portal_details&&await Ml(e)),e.package?.scripts?.postpublish){let l=ZF.join(O0.tmpdir(),`${P0.randomBytes(16).toString("base64url")}.zip`);await Ri.writeFile(l,a);let c=await Ft("postpublish",e,{FACTORIO_MODPACKAGE:l});await Ri.unlink(l),c!==0&&process.exit(c)}let u=await Fl(e,t);if(r&&(await Ln("add info.json"),o&&await Ln("add changelog.txt"),await Ln(`commit --author "${n.autoCommitAuthor}" -F -`,n.movedToCommitMessage.replace(/\$VERSION/g,u.version).replace(/\$MODNAME/g,u.name)),!e.package?.no_git_push)){let l=await new Promise(c=>{jl(`git config branch.${i}.remote`,(f,p)=>{f&&f.code!==0&&c(void 0),c(p.trim())})});l?await Ln(`push ${l} ${i} ${s??""}`):console.log(`no remote set as upstream on ${i}`)}});import*as vr from"fs/promises";import M0 from"path";import{createWriteStream as JF}from"fs";import L0 from"path";var Bl=class{constructor(e,n,r){this.settingsdump=n;this.protosdump=r;if(this.docs=JSON.parse(e),this.docs.application!=="factorio")throw new Error(`Unknown application: ${this.docs.application}`);if(this.docs.api_version!==6)throw new Error(`Unsupported Prototype Docs JSON Version ${this.docs.api_version}`);if(this.docs.stage!=="prototype")throw new Error(`Wrong stage: ${this.docs.stage}`);this.concepts=new Map(this.docs.types.map(i=>[i.name,i])),this.simple_structs=new Set;for(let[i,o]of this.concepts)typeof o.type=="object"&&o.type.complex_type==="struct"&&this.simple_structs.add(i);this.prototypes=new Map(this.docs.prototypes.map(i=>[i.name,i]))}settingsdump;protosdump;docs;concepts;simple_structs;prototypes;namespace="data";get api_version(){return this.docs.api_version}get stage(){return this.docs.stage}get application(){return this.docs.application}get application_version(){return this.docs.application_version}resolve_link(e,n){if(n=n?`#${n}`:"",["prototypes","types"].includes(e))return`/${e}.html${n}`;if(["libraries","storage","migrations","data-lifecycle","prototype-tree","noise-expressions","instrument","item-weight"].includes(e))return`/auxiliary/${e}.html${n}`;if(this.concepts.has(e))return`/types/${e}.html${n}`;if(this.prototypes.has(e))return`/prototypes/${e}.html${n}`;console.warn(`Invalid Link: prototype:${e}${n}`)}async generate_LuaLS_docs(e){return[...await this.generate_LuaLS_concepts(e),...await this.generate_LuaLS_prototypes(e),this.generate_LuaLS_data(e)]}async generate_LuaLS_concepts(e){let n=[];for(let[r,i]of this.concepts){if(i.name==="LocalisedString"||i.type==="builtin")continue;let o=new Xo(`prototype-api/concepts/${i.name}`,this.application_version,this.namespace),s=this.simple_structs.has(i.name),a=s?"":".struct";if(i.properties){let u=new Li(i.name+a);u.flavor="exact",u.description=await e(i.description,{scope:"prototype",member:i.name}),i.parent&&(u.parents=[new J(i.parent)]);for(let l of i.properties)u.add(new Ke(l.name,this.lua_proto_type(l.type),await e(l.description,{scope:"prototype",member:i.name,part:l.name}),l.optional));o.add(u)}if(!s){let u=i.type;if(i.name==="AnyPrototype"&&typeof u=="object"&&u.complex_type==="union"){let l=["MapGenPresets","GuiStyle"];u={complex_type:"union",options:u.options.filter(f=>typeof f=="object"?!(f.complex_type==="type"&&typeof f.value=="string"&&l.includes(f.value)):!l.includes(f))}}if(this.protosdump){let l=i.description.match(/^The name of an? \[(.+)\]/);i.type==="string"&&i.name.endsWith("ID")&&l&&(u=i.name.replace(/ID$/,"Name"))}o.add(new Yl(i.name,this.lua_proto_type(u,i),i.description))}n.push(o)}return n}generate_LuaLS_data(e){let n=new Xo("prototype-api/data",this.application_version,this.namespace),r=new Li("data");r.add(new Ke("raw",new J("raw"))),r.add(new Ke("is_demo",new J("boolean")));let i=new Ad("extend",[new jn("otherdata",new Ar(new J("AnyPrototype")))]);i.add(new ts(void 0,[new jn("self",new J("data")),new jn("otherdata",new Ar(new J("AnyPrototype")))])),i.add(new ts(void 0,[new jn("otherdata",new Ar(new J("AnyModSettingPrototype")))])),i.add(new ts(void 0,[new jn("self",new J("data")),new jn("otherdata",new Ar(new J("AnyModSettingPrototype")))])),r.add(i),r.global_name="data",n.add(r);let o=new Li("raw");o.flavor="exact",n.add(o);for(let[s,a]of this.prototypes)a.typename&&o.add(new Ke(new es(a.typename),new nn(new J("string"),new J(a.name))));return o.add(new Ke("bool-setting",new nn(new J("string"),new J("ModBoolSettingPrototype")),"In Settings Stage")),o.add(new Ke("int-setting",new nn(new J("string"),new J("ModIntSettingPrototype")),"In Settings Stage")),o.add(new Ke("double-setting",new nn(new J("string"),new J("ModDoubleSettingPrototype")),"In Settings Stage")),o.add(new Ke("string-setting",new nn(new J("string"),new J("ModStringSettingPrototype")),"In Settings Stage")),o.add(new Ke("color-setting",new nn(new J("string"),new J("ModColorSettingPrototype")),"In Settings Stage")),n}nameFor(e){let n=this.docs.prototypes.find(r=>r.typename===e);if(n)return new J(n.name.replace(/(Prototype)?$/,"Name"));throw new Error(`no type for '${e}'`)}async generate_LuaLS_prototypes(e){let n=[];for(let[r,i]of this.prototypes){let o=new Xo(`prototype-api/prototypes/${i.name}`,this.application_version,this.namespace),s=new Li(i.name);s.flavor="exact",s.description=await e(i.description,{scope:"prototype",member:i.name}),i.parent&&(s.parents=[new J(i.parent)]);for(let l of i.properties)s.add(new Ke(l.name,this.lua_proto_type(l.type),await e(l.description,{scope:"prototype",member:i.name,part:l.name}),l.optional)),l.alt_name&&s.add(new Ke(l.alt_name,this.lua_proto_type(l.type),await e(l.description,{scope:"prototype",member:i.name,part:l.alt_name}),l.optional));if(i.custom_properties){let l=i.custom_properties;s.add(new Ke(this.lua_proto_type(l.key_type),this.lua_proto_type(l.value_type),await e(l.description,{scope:"prototype",member:i.name,part:"custom_properties"})))}o.add(s);let a=i.name.replace(/(Prototype)?$/,"Name"),u=[];if(this.prototypes.forEach(l=>{l.parent===i.name&&u.push(new J(l.name.replace(/(Prototype)?$/,"Name")))}),i.typename){if(this.protosdump)for(let l in this.protosdump[i.typename])u.push(new es(l));u.push(new J("string"))}o.add(new Yl(a,new Kl(u))),n.push(o)}return n}lua_proto_type(e,n){switch(typeof e){case"string":return e==="bool"?new J("boolean"):new J(e);case"object":switch(e.complex_type){case"struct":if(!n)throw new Error("struct without parent");return this.simple_structs.has(n.name)?new J(n.name):new J(n.name+".struct");case"array":return new Ar(this.lua_proto_type(e.value,n));case"tuple":return new Rd(e.values.map(r=>this.lua_proto_type(r,n)));case"dictionary":return new nn(this.lua_proto_type(e.key,n),this.lua_proto_type(e.value,n));case"union":return new Kl(e.options.map(r=>this.lua_proto_type(r,n)));case"literal":return new es(e.value);case"type":return this.lua_proto_type(e.value,n);default:throw new Error("Invalid Type")}default:throw new Error("Invalid Type")}}};async function N0(t,e,n,r,i){let o=n&&JSON.parse(n),s=r&&JSON.parse(r),a=new Bl(e,o,s),u=new Cd(t,a,o,s);console.log(`Loaded Prototype docs ${a.application_version}`),console.log(`Loaded Runtime docs ${u.application_version}`),o&&console.log("With Settings Dump"),s&&console.log("With Prototypes Dump");let l=b=>{let g=b.url.match(/^(runtime|prototype|auxiliary):(.+?)(?:::(.+))?$/);if(g)switch(g[1]){case"runtime":let S=u.resolve_link(g[2],g[3]);S&&(b.url="https://lua-api.factorio.com/latest"+S);break;case"prototype":let y=a.resolve_link(g[2],g[3]);y&&(b.url="https://lua-api.factorio.com/latest"+y);break;case"auxiliary":b.url=`https://lua-api.factorio.com/latest/${g[2]}.html`;break}},c=Bs().use(function(){return function(b,g){nt(b,"link",l)}}),f=async(b,g)=>{let S=g?`[View Documentation](${g.scope}:${g.member}${g.part?"::"+g.part:""})`:"";return String(await c.process(`${b??""}
95
95
 
96
- ${S}`.trim())).trim()},p=C0.posix.join("factorio","library");await Promise.all([...await u.generate_LuaLS_docs(f),...await a.generate_LuaLS_docs(f)].map(async b=>{let g=await b;await i(C0.posix.join(p,g.name+".lua"),S=>g.write(S))})),await Promise.all(Cd().map(async b=>{await i(b.name,g=>{g.write(b.content)})}));let d=Id(u.application_version);await i(d.name,b=>{b.write(d.content)})}async function P0(t){let e=await fetch(t);if(!e.ok)throw new Error(`Error fetching ${t} : ${e.statusText}`);return e.text()}ne.command("luals-addon [outdir]").alias("sumneko-3rd").description("Generate a library bundle for LuaLS (sumneko.lua) LSP").option("-d, --docs <docsjson>","Runtime docs").option("-p, --protos <protosjson>","Prototype docs").option("-o, --online [version]","Use online docs").option("--sdump <mod-settings-dump.json>","Load Settings Prototype dump").option("--pdump <data-raw-dump.json>","Load Prototype dump").option("--debug","just generate legacy debug info").action(async(t,e)=>{let n,r;if(e.docs&&e.protos)n=await tn.readFile(e.docs,"utf8"),r=await tn.readFile(e.protos,"utf8");else{if(e.docs||e.protos)throw new Error("Using local json files must specify both files");{if(e.online==="throw")throw new Error("Test Error");let s=e.online??"latest";n=await P0(`https://lua-api.factorio.com/${s}/runtime-api.json`),r=await P0(`https://lua-api.factorio.com/${s}/prototype-api.json`)}}let i=e.sdump&&await tn.readFile(e.sdump,"utf8"),o=e.pdump&&await tn.readFile(e.pdump,"utf8");if(e.debug){let s=new ns(n);await tn.writeFile("debuginfo.json",JSON.stringify(s.generate_debuginfo()))}else{let s=0;await I0(n,r,i,o,async(a,u)=>{let l=O0.join(t??process.cwd(),a);await tn.mkdir(O0.dirname(l),{recursive:!0});let c=GF(l);await u(c),s++,c.close()}),console.log(`Generated bundle with ${s} files`)}});var ct=ae(Ul(),1);Td();import*as yd from"fs/promises";var Xe=ae(Ul(),1);import a2 from"assert";function Er(t,e,n){return _e("text",t,e,n)}function l2(t,e,n){return a2(e.sticky),e.lastIndex=n,e.exec(t)}function Zo(t,e,n){let r=t.value,i=t.range.start.line,o=t.range.start.character,s=[],a=0,u=-1;do u=r.indexOf(e,u+1),u>=0&&(n?n.find(l=>{let c=l2(r,l.pattern,u);if(!c)return!1;let f=l.parse(c,i,o);return f?(a<u&&s.push(Er(r.substring(a,u),i,o+a)),s.push(f),a=c.indices[0][1],u=a,!0):!1}):(s.push(Er(r.substring(a,u),i,o+a)),u+=e.length,a=u));while(u>=0);return a<=r.length-1&&s.push(Er(r.substring(a),i,o+a)),s}var u2=[{pattern:/\\n/dy,parse(t,e,n){let r=_e("escape","\\n",e,n+t.index);return r.value=`
97
- `,r}}];function c2(t){return Zo(t,"|").map(e=>{let n=e.value.indexOf("="),r=Er(e.value.substring(0,n),e.range.start.line,e.range.start.character),i=Er(e.value.substring(n+1),e.range.start.line,e.range.start.character+n+1);return{type:"plural_option",range:e.range,selectionRange:e.selectionRange,children:[...Zo(r,",").map(o=>{if(o.value==="rest")return{type:"plural_match",value:"rest",range:o.range,selectionRange:o.selectionRange};let s=o.value.match(/^(ends in )?(\d+)(?:-(\d+))?$/d);return s?{type:"plural_match",value:s[3]?[parseInt(s[2]),parseInt(s[3])]:parseInt(s[2]),ends_in:s[1]?!0:void 0,range:o.range,selectionRange:o.selectionRange}:{type:"error",value:o.value,range:o.range,selectionRange:o.selectionRange}}),...Zo(i,"__",z0)]}})}var z0=[{pattern:/__([0-9]+)__/dy,parse(t,e,n){return{type:"parameter",value:parseInt(t[1]),range:le(e,n+t.index,t[0].length),selectionRange:le(e,n+t.indices[1][0],t[1].length)}}},{pattern:/__plural_for_parameter__([0-9]+)__\{(.*?)\}__/dy,parse(t,e,n){return{type:"plural",value:parseInt(t[1]),children:c2(Er(t[2],e,n+t.indices[2][0])),range:le(e,n+t.index,t[0].length),selectionRange:le(e,n+t.indices[1][0],t[1].length)}}},{pattern:/__(CONTROL_(?:MOVE|(?:LEFT|RIGHT)_CLICK|KEY_(?:SHIFT|CTRL)|STYLE_(?:BEGIN|END)))__/dy,parse(t,e,n){return{type:"macro",name:t[1],children:[],range:le(e,n+t.index,t[0].length),selectionRange:le(e,n+t.indices[1][0],t[1].length)}}},{pattern:/__(REMARK_COLOR_(?:BEGIN|END))__/dy,parse(t,e,n){return{type:"macro",name:t[1],children:[],range:le(e,n+t.index,t[0].length),selectionRange:le(e,n+t.indices[1][0],t[1].length)}}},{pattern:/__(CONTROL(?:_MODIFIER)?|ENTITY|ITEM|TILE|FLUID|PLANET|TECHNOLOGY|RECIPE)__(.+?)__/dy,parse(t,e,n){return{type:"macro",name:t[1],children:[_e("macro_argument",t[2],e,n+t.indices[2][0])],range:le(e,n+t.index,t[0].length),selectionRange:le(e,n+t.indices[1][0],t[1].length)}}},{pattern:/__(ALT_CONTROL)__(.+?)__(.+?)__/dy,parse(t,e,n){return{type:"macro",name:t[1],children:[_e("macro_argument",t[2],e,n+t.indices[2][0]),_e("macro_argument",t[3],e,n+t.indices[3][0])],range:le(e,n+t.index,t[0].length),selectionRange:le(e,n+t.indices[1][0],t[1].length)}}},{pattern:/__(ALT_CONTROL_(?:LEFT|RIGHT)_CLICK)__(.+?)__/dy,parse(t,e,n){return{type:"macro",name:t[1],children:[_e("macro_argument",t[2],e,n+t.indices[1][0])],range:le(e,n+t.index,t[0].length),selectionRange:le(e,n+t.indices[1][0],t[1].length)}}}];function dd(t){let e=t.open_comments;t.open_comments=[];let n=e[0],r=e[e.length-1];return{type:"comment_group",range:{start:n.range.start,end:r.range.end},selectionRange:n.selectionRange,children:e}}var f2=[{pattern:/^[\r\t ]*([#;].*)?$/d,parse(t,e,n){t[1]?n.open_comments.push(_e("comment",t[1],e,t.indices[1][0])):n.open_comments.length>0&&(n.open_section??n.root).children.push(dd(n))}},{pattern:/^[\r\t ]*\[(.*?)\][\r\t ]*$/d,parse(t,e,n){n.open_section=_e("section",t[1],e,t.indices[1][0],{children:[]}),n.open_comments.length>0&&n.open_section.children.push(dd(n)),n.open_section.range.start.character-=1,n.open_section.range.end.character+=1,n.root.children.push(n.open_section)}},{pattern:/^[\r\t ]*(.*?)=(.*)$/d,parse(t,e,n){let r=_e("record",t[1],e,t.indices[1][0],{children:Zo(Er(t[2],e,t.indices[2][0]),"\\",u2).flatMap(i=>i.type==="escape"?i:Zo(i,"__",z0))});n.open_comments.length>0&&r.children.unshift(dd(n)),r.range.end.character=t[0].length,(n.open_section??n.root).children.push(r)}},{pattern:/^.*$/d,parse(t,e,n){n.root.children.push({type:"error",value:t[0],range:le(e,0,t[0].length),selectionRange:le(e,0,0)})}}];function U0(t){let e={root:{type:"root",children:[],range:{start:{line:0,character:0},end:{line:t.lineCount,character:0}},selectionRange:le(0,0,0)},open_comments:[]};for(let n=0;n<t.lineCount;n++){let r={start:{line:n,character:0},end:{line:n,character:1/0}},i=t.getText(r).replace(/((\r\n)|\r|\n)$/,"");for(let o of f2){let s=o.pattern.exec(i);if(s){o.parse(s,n,e);break}}}return e.root}var hd=new Map([["default",{red:1,green:.63,blue:.259,alpha:1}],["red",{red:1,green:.166,blue:.141,alpha:1}],["green",{red:.173,green:.824,blue:.25,alpha:1}],["blue",{red:.343,green:.683,blue:1,alpha:1}],["orange",{red:1,green:.63,blue:.259,alpha:1}],["yellow",{red:1,green:.828,blue:.231,alpha:1}],["pink",{red:1,green:.52,blue:.633,alpha:1}],["purple",{red:.821,green:.44,blue:.998,alpha:1}],["white",{red:.9,green:.9,blue:.9,alpha:1}],["black",{red:.5,green:.5,blue:.5,alpha:1}],["gray",{red:.7,green:.7,blue:.7,alpha:1}],["brown",{red:.757,green:.522,blue:.371,alpha:1}],["cyan",{red:.335,green:.918,blue:.866,alpha:1}],["acid",{red:.708,green:.996,blue:.134,alpha:1}]]);function $0(t){if(hd.has(t))return hd.get(t);if(t.startsWith("#")){let n=t.match(/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/);if(n)return{red:parseInt(n[1],16)/255,green:parseInt(n[2],16)/255,blue:parseInt(n[3],16)/255,alpha:n[4]?parseInt(n[4],16)/255:1}}let e=t.match(/\s*(\d+(?:\.\d+)?)\s*,?\s*(\d+(?:\.\d+)?)\s*,?\s*(\d+(?:\.\d+)?)(?:\s*,?\s*(\d+(?:\.\d+)?))?\s*/);if(e){let n=parseFloat(e[1]),r=parseFloat(e[2]),i=parseFloat(e[3]),o=e[4]?parseFloat(e[4]):void 0;return(n>1||r>1||i>1||o&&o>1)&&(n=n/255,r=r/255,i=i/255,o&&(o=o/255)),o||(o=1),{red:n,green:r,blue:i,alpha:o}}}function kr(t){let e=Math.floor(t).toString(16);return e.length<2&&(e="0"+e),e}function Dr(t,e){return Math.round(t*Math.pow(10,e))/Math.pow(10,e)}function H0(t){let e=[];for(let[n,r]of hd)if(Math.abs(r.red-t.red)<.004&&Math.abs(r.green-t.green)<.004&&Math.abs(r.blue-t.blue)<.004&&Math.abs(r.alpha-t.alpha)<.004){e.push(n);break}return t.alpha>.996?(e.push(`#${kr(t.red*255)}${kr(t.green*255)}${kr(t.blue*255)}`),e.push(`${Math.floor(t.red*255)}, ${Math.floor(t.green*255)}, ${Math.floor(t.blue*255)}`),e.push(`${Dr(t.red,3)}, ${Dr(t.green,3)}, ${Dr(t.blue,3)}`)):(e.push(`#${kr(t.red*255)}${kr(t.green*255)}${kr(t.blue*255)}${kr(t.alpha*255)}`),e.push(`${Math.floor(t.red*255)}, ${Math.floor(t.green*255)}, ${Math.floor(t.blue*255)}, ${Math.floor(t.alpha*255)}`),e.push(`${Dr(t.red,3)}, ${Dr(t.green,3)}, ${Dr(t.blue,3)}, ${Dr(t.alpha,3)}`)),e}var V0=ae(ro(),1);var p2=[{message:"Duplicate Section",code:"section.duplicate",setup(t){let e=new Map;return{section:(n,r,i)=>{let o=e.get(n.value);if(o){let s=o.children.length>0?o.children[o.children.length-1].range.end:o.range.end,a=n.children.length>0?n.children[n.children.length-1].range.end:n.range.end;t.report({diag:{range:n.selectionRange,relatedInformation:[{message:"First defined here",location:{range:o.selectionRange,uri:t.uri}}]},fix:[{range:{start:n.range.start,end:a},newText:""},{range:{start:s,end:s},getText:{start:{line:n.range.end.line,character:n.range.end.character+1},end:a}}]})}else e.set(n.value,n)}}}},{message:"Section Name conflicts with Key in Root",code:"section.rootconflict",setup(t){let e;return{root:(n,r,i)=>{e=n},section:(n,r,i)=>{let o=e.children.find(s=>s.type==="record"&&s.value===n.value);o&&t.report({diag:{range:n.selectionRange,relatedInformation:[{location:{uri:t.uri,range:o.range},message:"First defined here"}]}})}}}},{message:"Duplicate Key",code:"key.duplicate",setup(t){let e=new Map;return{section:(n,r,i)=>{e.clear()},record:(n,r,i)=>{let o=e.get(n.value);o?t.report({diag:{range:n.selectionRange,relatedInformation:[{message:"First defined here",location:{range:o.selectionRange,uri:t.uri}}]}}):e.set(n.value,n)}}}},{message:"Key ends with whitespace",code:"key.whitespace-end",setup(t){return{record:(e,n,r)=>{e.value.match(/[\t ]+$/d)&&t.report({diag:{severity:V0.DiagnosticSeverity.Warning,range:e.selectionRange}})}}}},{message:"Empty Key",code:"key.empty",setup(t){return{record:(e,n,r)=>{e.value||t.report({diag:{range:e.range}})}}}},{message:"Invalid Line",code:"error.unknown",setup(t){return{error:(e,n,r)=>{t.report({diag:{range:e.range}})}}}}];function md(t,e){let n=[],r={root:[],comment_group:[],comment:[],section:[],record:[],macro:[],macro_argument:[],parameter:[],plural:[],plural_match:[],plural_option:[],richtext:[],richtextopen:[],richtextclose:[],richtextformat:[],text:[],escape:[],error:[]};for(let i of p2){let o={uri:e,report(a){n.push({message:i.message,code:i.code,...a})}},s=i.setup(o);for(let a in r){let u=a;u in s&&s[u]&&r[u].push(s[u])}}return nt(t,(i,o,s)=>{let a=r[i.type];for(let u of a)u(i,o??-1,s)}),n}function d2(t,e){let n=[];return ln(t,"record",(r,i)=>{let o=i.length>0?i[i.length-1]:void 0,s=o?.type==="section"?o.value:void 0;n.push({name:s?`${s}.${r.value}`:r.value,link:{targetUri:e,targetRange:r.range,targetSelectionRange:r.selectionRange},section:o?.type==="section"?o:void 0,record:r})}),n}function G0(t){return t!==void 0}var $l=class{hasDiagnosticRelatedInformationCapability=!1;definitions=new Map;documentTrees=new Map;loadDocument(e){let n=U0(e);this.documentTrees.set(e.uri,n),this.definitions.set(e.uri,d2(n,e.uri))}clearDocument(e){this.definitions.delete(e),this.documentTrees.delete(e)}clearFolder(e){for(let n of this.definitions.keys())n.startsWith(e)&&this.definitions.delete(n);for(let n of this.documentTrees.keys())n.startsWith(e)&&this.documentTrees.delete(n)}diagnose(e){let n=this.documentTrees.get(e);if(!n)return[];let r=md(n,e),i=[];for(let o of r)i.push({message:o.message,code:o.code,source:"factorio-locale",severity:Xe.DiagnosticSeverity.Error,...o.diag});return i}recordSymbol(e){return{name:e.value?e.value:"<empty>",detail:"",kind:e.value?Xe.SymbolKind.String:Xe.SymbolKind.Null,range:e.range,selectionRange:e.selectionRange,children:[]}}sectionSymbols(e){return{name:e.value?e.value:"[empty]",detail:"",tags:[],kind:Xe.SymbolKind.Namespace,range:e.range,selectionRange:e.selectionRange,children:e.children.map(n=>{if(n.type==="record")return this.recordSymbol(n)}).filter(G0)}}documentSymbols(e){return e.children.map(n=>{switch(n.type){case"section":return this.sectionSymbols(n);case"record":return this.recordSymbol(n);default:return}}).filter(G0)}onDocumentSymbol(e){this.documentTrees.has(e.uri)||this.loadDocument(e);let n=this.documentTrees.get(e.uri);return n?this.documentSymbols(n):[]}findDefinitionLinks(e){return this.findDefinitions(e).map(r=>r.link)}findDefinitions(e){let n=[];for(let r of this.definitions.values())n.push(...r.filter(i=>i.name===e));return n}getKeyPlainText(e){let n=this.findDefinitions(e);return n.length===0?`Unknown key: ${e}`:this.getRecordPlainText(n[0].record)}getMacroPlainText(e){switch(e.name){case"ENTITY":return this.getKeyPlainText(`entity-name.${e.children[0].value}`);case"ITEM":return this.getKeyPlainText(`item-name.${e.children[0].value}`);case"TILE":return this.getKeyPlainText(`tile-name.${e.children[0].value}`);case"FLUID":return this.getKeyPlainText(`fluid-name.${e.children[0].value}`);case"PLANET":return this.getKeyPlainText(`space-location-name.${e.children[0].value}`);case"TECHNOLOGY":return this.getKeyPlainText(`technology-name.${e.children[0].value}`);case"RECIPE":return this.getKeyPlainText(`recipe-name.${e.children[0].value}`);case"CONTROL_KEY_SHIFT":return this.getKeyPlainText("control-keys.shift");case"CONTROL_KEY_CTRL":return this.getKeyPlainText("control-keys.control");case"CONTROL_MOVE":return"WASD";case"CONTROL":case"CONTROL_MODIFIER":return`__${e.name}__${e.children[0].value}__`;case"ALT_CONTROL":return`__${e.name}__${e.children[0].value}__${e.children[1].value}__`;case"CONTROL_LEFT_CLICK":return this.getKeyPlainText("control-keys.mouse-button-1");case"CONTROL_RIGHT_CLICK":return this.getKeyPlainText("control-keys.mouse-button-2");case"ALT_CONTROL_LEFT_CLICK":return this.getKeyPlainText(`control-keys.mouse-button-1-alt-${e.children[0].value}`);case"ALT_CONTROL_RIGHT_CLICK":return this.getKeyPlainText(`control-keys.mouse-button-2-alt-${e.children[0].value}`);case"CONTROL_STYLE_BEGIN":return"[font=default-semibold][color=128,206,240]";case"CONTROL_STYLE_END":return"[/color][/font]";case"REMARK_COLOR_BEGIN":return"[color=34,181,255]";case"REMARK_COLOR_END":return"[/color]";default:throw new Error("Unknown Macro Node Type")}}getPluralPlainTexts(e,n){return e.children.filter(r=>r.type==="plural_option").map(r=>{throw new Error("")})}getNodePlainText(e,n){switch(e.type){case"text":case"escape":return e.value;case"parameter":if(n.values&&e.value<n.values.length){let r=n.values[e.value];if(r!==void 0)return`${r}`}return`__${e.value}__`;case"plural":return this.getPluralPlainTexts(e,n);case"macro":return this.getMacroPlainText(e);default:throw new Error("Unknown Text Node Type")}}getRecordPlainText(e,n){let r={params:[]};return e.children.filter(i=>i.type!=="comment_group"&&i.type!=="error").map(i=>this.getNodePlainText(i,r)).join("")}onHover(e,n){return null}getCompletions(e){let n=[];for(let r of this.definitions.values())e?n.push(r.map(i=>i.name).filter(i=>i.startsWith(e))):n.push(r.map(i=>i.name).map(i=>{let o=i.indexOf(".");return o===-1?i:i.substring(0,o+1)}));return[...new Set(n.flat())]}onCodeAction(e,n,r){if(e.languageId!=="factorio-locale")return[];let i=this.documentTrees.get(e.uri);if(!i)return[];let o=md(i,e.uri).filter(l=>!!l.fix),s=o.filter(l=>ga(n,l.diag.range)),a=[],u=new Set;for(let l of s)if(a.push({title:`Fix this ${l.code}`,kind:Xe.CodeActionKind.QuickFix+"."+l.code,diagnostics:[{message:l.message,code:l.code,source:"factorio-locale",severity:Xe.DiagnosticSeverity.Error,...l.diag}],isPreferred:!0,edit:{changes:{[e.uri]:gn(e,l.fix)}}}),!u.has(l.code)){u.add(l.code);let c=o.filter(f=>f.code===l.code);c.length>1&&a.push({title:`Fix all ${l.code} in file`,kind:Xe.CodeActionKind.QuickFix+"."+l.code+".all",diagnostics:c.map(f=>({message:f.message,code:f.code,source:"factorio-locale",severity:Xe.DiagnosticSeverity.Error,...f.diag})),edit:{changes:{[e.uri]:gn(e,c.flatMap(f=>f.fix))}}})}return o.length>s.length&&a.push({title:"Fix all auto-fixable in file",kind:Xe.CodeActionKind.QuickFix+".all",diagnostics:o.map(l=>({message:l.message,code:l.code,source:"factorio-locale",severity:Xe.DiagnosticSeverity.Error,...l.diag})),edit:{changes:{[e.uri]:gn(e,o.flatMap(l=>l.fix))}}}),a}onDocumentColor(e){let n=[];for(let r=0;r<e.lineCount;r++){let i={start:{line:r,character:0},end:{line:r,character:1/0}},o=e.getText(i).replace(/(\r\n)|\r|\n$/,"");i.end.character=o.length;let s=/\[color=([^\]]+)\]/g,a=s.exec(o);for(;a;){{let u=$0(a[1]);u&&n.push({color:u,range:{start:{line:r,character:a.index+7},end:{line:r,character:a.index+7+a[1].length}}})}a=s.exec(o)}}return n}onColorPresentation(e,n){return H0(e).map(r=>({label:r,textEdit:{range:n,newText:r}}))}};var gd=ae(Ul(),1),Hl=class{constructor(e){this.Locale=e}Locale;onDefinition(e,n){let r=n.getText({start:{line:e.position.line,character:0},end:{line:e.position.line,character:Number.MAX_VALUE}});for(let i of r.matchAll(/(['"])((?:[^\\](?<!\1)|\\['"0abfnrtv\\]|\\\d{1,3}|\\x[0-9a-fA-F]{2})*)\1/g))if(i.index&&i.index<=e.position.character&&i.index+i[0].length>=e.position.character){let o=i[2],s={start:{line:e.position.line,character:i.index},end:{line:e.position.line,character:i.index+i[0].length}};return this.Locale.findDefinitionLinks(o).map(u=>Object.assign({originSelectionRange:s},u))}}onCompletion(e,n){let i=n.getText({start:{line:e.position.line,character:0},end:{line:e.position.line,character:e.position.character+1}}).match(/(['"])((?:[^\\](?<!\1)|\\['"0abfnrtv\\]|\\\d{1,3}|\\x[0-9a-fA-F]{2})*)\1$/);if(i){let o=i[2].lastIndexOf("."),s=o!==-1?i[2].substring(0,o+1):"";return this.Locale.getCompletions(s).map(a=>({label:a.endsWith(".")?a.substring(0,a.length-1):a,kind:a.endsWith(".")?gd.CompletionItemKind.Enum:gd.CompletionItemKind.EnumMember,commitCharacters:a.endsWith(".")?["."]:[],textEdit:{newText:a.endsWith(".")?a.substring(0,a.length-1):a,range:{start:{line:e.position.line,character:i.index+1},end:{line:e.position.line,character:e.position.character}}}}))}return[]}};async function K0(){let t=new ba,e=new $l,n=new Hl(e),r=(0,ct.createConnection)(ct.ProposedFeatures.all),i=new ct.TextDocuments(jn);async function o(l){let c=i.get(l);if(c)return c;let f=Ge.parse(l);if(f.scheme==="file"){if(f.path.endsWith(".cfg"))return c=jn.create(l,"factorio-locale",1,await yd.readFile(f.fsPath,"utf8")),c;if(f.path.endsWith("changelog.txt"))return c=jn.create(l,"factorio-changelog",1,await yd.readFile(f.fsPath,"utf8")),c}}async function s(l){let c=await o(l);if(c)switch(c.languageId){case"factorio-locale":e.loadDocument(c);break;case"factorio-changelog":t.loadDocument(c);break}}async function a(l){let c=Ge.parse(l);if(c.scheme==="file"){let f=$r(c.fsPath,{pattern:["**/locale/*/*.cfg","**/changelog.txt"]});f.on("match",p=>{s(Ge.file(p.absolute).toString())}),f.on("error",p=>{throw p}),await new Promise(p=>{f.on("end",()=>{p()})})}}let u=!1;return r.onInitialize(async l=>{let c=l.capabilities;u=!!(c.workspace&&c.workspace.workspaceFolders),e.hasDiagnosticRelatedInformationCapability=!!(c.textDocument&&c.textDocument.publishDiagnostics&&c.textDocument.publishDiagnostics.relatedInformation);let f={capabilities:{textDocumentSync:ct.TextDocumentSyncKind.Incremental,documentSymbolProvider:!0,codeActionProvider:!0,colorProvider:!0,definitionProvider:!0,completionProvider:{triggerCharacters:['"',"'","."],allCommitCharacters:["."]},hoverProvider:!0}};return u&&(f.capabilities.workspace={workspaceFolders:{supported:!0,changeNotifications:!0}},l.workspaceFolders&&await Promise.all(l.workspaceFolders.map(p=>a(p.uri)))),f}),r.onInitialized(()=>{u&&r.workspace.onDidChangeWorkspaceFolders(async l=>{for(let c of l.removed)e.clearFolder(c.uri),t.clearFolder(c.uri);for(let c of l.added)await a(c.uri)})}),i.onDidClose(l=>{switch(l.document.languageId){case"factorio-locale":r.sendDiagnostics({uri:l.document.uri,diagnostics:[]});break;case"factorio-changelog":r.sendDiagnostics({uri:l.document.uri,diagnostics:[]});break}}),i.onDidChangeContent(l=>{switch(l.document.languageId){case"factorio-locale":e.loadDocument(l.document),r.sendDiagnostics({uri:l.document.uri,diagnostics:e.diagnose(l.document.uri)});break;case"factorio-changelog":t.loadDocument(l.document),r.sendDiagnostics({uri:l.document.uri,diagnostics:t.diagnose(l.document.uri)});break}}),r.onDefinition(async l=>{let c=await o(l.textDocument.uri);return c&&c.languageId==="lua"?n.onDefinition(l,c):null}),r.onCompletion(async l=>{let c=await o(l.textDocument.uri);if(c&&c.languageId==="lua")return{isIncomplete:!0,items:n.onCompletion(l,c)}}),r.onDidChangeWatchedFiles(l=>{for(let c of l.changes)switch(c.type){case ct.FileChangeType.Deleted:e.clearDocument(c.uri),t.clearDocument(c.uri);break;case ct.FileChangeType.Changed:case ct.FileChangeType.Created:o(c.uri).then(f=>{if(f)switch(f.languageId){case"factorio-locale":e.loadDocument(f);break;case"factorio-changelog":t.loadDocument(f);break}});break;default:break}}),r.onHover(l=>{let c=i.get(l.textDocument.uri);return c&&c.languageId==="factorio-locale"?e.onHover(l,c):null}),r.onDocumentSymbol(l=>{let c=i.get(l.textDocument.uri);if(c)switch(c.languageId){case"factorio-locale":return e.onDocumentSymbol(c);case"factorio-changelog":return t.onDocumentSymbol(c)}return null}),r.onCodeAction(l=>{let c=i.get(l.textDocument.uri);if(c)switch(c.languageId){case"factorio-locale":return e.onCodeAction(c,l.range,l.context);case"factorio-changelog":return t.onCodeAction(c,l.range,l.context)}return null}),r.onDocumentColor(l=>{let c=i.get(l.textDocument.uri);return c&&c.languageId==="factorio-locale"?e.onDocumentColor(c):[]}),r.onColorPresentation(l=>{let c=i.get(l.textDocument.uri);return c&&c.languageId==="factorio-locale"?e.onColorPresentation(l.color,l.range):[]}),i.listen(r),r.listen(),new Promise(l=>{r.onExit(l)})}ne.command("lsp").description("Run LSP Server for Locale and Changelog features").allowUnknownOption(!0).allowExcessArguments(!0).action(async()=>{await K0()});import*as Y0 from"fs/promises";ne.command("scriptdat <file>").description("Dump script.dat").action(async t=>{let e=new Pd(new qn(await Y0.readFile(t)));console.log(JSON.stringify({version:e.version.format(),data:e.data},void 0,2))});await ne.description(`${Sd} ${Ed}`).helpCommand("help").showHelpAfterError().showSuggestionAfterError().parseAsync(process.argv,{from:"node"}).catch(t=>{console.error(t),process.exit(1)}).then(()=>{process.disconnect?.()});
96
+ ${S}`.trim())).trim()},p=L0.posix.join("factorio","library");await Promise.all([...await u.generate_LuaLS_docs(f),...await a.generate_LuaLS_docs(f)].map(async b=>{let g=await b;await i(L0.posix.join(p,g.name+".lua"),S=>g.write(S))})),await Promise.all(Id().map(async b=>{await i(b.name,g=>{g.write(b.content)})}));let d=Od(u.application_version);await i(d.name,b=>{b.write(d.content)})}async function F0(t){let e=await fetch(t);if(!e.ok)throw new Error(`Error fetching ${t} : ${e.statusText}`);return e.text()}ne.command("docs [outdir]").alias("luals-addon").alias("sumneko-3rd").description("Generate a library bundle for EmmyLua LSP").option("-d, --docs <docsjson>","Runtime docs").option("-p, --protos <protosjson>","Prototype docs").option("-o, --online [version]","Use online docs").option("--sdump <mod-settings-dump.json>","Load Settings Prototype dump").option("--pdump <data-raw-dump.json>","Load Prototype dump").action(async(t,e)=>{let n,r;if(e.docs&&e.protos)n=await vr.readFile(e.docs,"utf8"),r=await vr.readFile(e.protos,"utf8");else{if(e.docs||e.protos)throw new Error("Using local json files must specify both files");{if(e.online==="throw")throw new Error("Test Error");let a=e.online??"latest";n=await F0(`https://lua-api.factorio.com/${a}/runtime-api.json`),r=await F0(`https://lua-api.factorio.com/${a}/prototype-api.json`)}}let i=e.sdump&&await vr.readFile(e.sdump,"utf8"),o=e.pdump&&await vr.readFile(e.pdump,"utf8"),s=0;await N0(n,r,i,o,async(a,u)=>{let l=M0.join(t??process.cwd(),a);await vr.mkdir(M0.dirname(l),{recursive:!0});let c=JF(l);await u(c),s++,c.close()}),console.log(`Generated bundle with ${s} files`)});var ct=ae(Ul(),1);import*as bd from"fs/promises";var Xe=ae(Ul(),1);import p2 from"assert";function Er(t,e,n){return _e("text",t,e,n)}function d2(t,e,n){return p2(e.sticky),e.lastIndex=n,e.exec(t)}function Zo(t,e,n){let r=t.value,i=t.range.start.line,o=t.range.start.character,s=[],a=0,u=-1;do u=r.indexOf(e,u+1),u>=0&&(n?n.find(l=>{let c=d2(r,l.pattern,u);if(!c)return!1;let f=l.parse(c,i,o);return f?(a<u&&s.push(Er(r.substring(a,u),i,o+a)),s.push(f),a=c.indices[0][1],u=a,!0):!1}):(s.push(Er(r.substring(a,u),i,o+a)),u+=e.length,a=u));while(u>=0);return a<=r.length-1&&s.push(Er(r.substring(a),i,o+a)),s}var h2=[{pattern:/\\n/dy,parse(t,e,n){let r=_e("escape","\\n",e,n+t.index);return r.value=`
97
+ `,r}}];function m2(t){return Zo(t,"|").map(e=>{let n=e.value.indexOf("="),r=Er(e.value.substring(0,n),e.range.start.line,e.range.start.character),i=Er(e.value.substring(n+1),e.range.start.line,e.range.start.character+n+1);return{type:"plural_option",range:e.range,selectionRange:e.selectionRange,children:[...Zo(r,",").map(o=>{if(o.value==="rest")return{type:"plural_match",value:"rest",range:o.range,selectionRange:o.selectionRange};let s=o.value.match(/^(ends in )?(\d+)(?:-(\d+))?$/d);return s?{type:"plural_match",value:s[3]?[parseInt(s[2]),parseInt(s[3])]:parseInt(s[2]),ends_in:s[1]?!0:void 0,range:o.range,selectionRange:o.selectionRange}:{type:"error",value:o.value,range:o.range,selectionRange:o.selectionRange}}),...Zo(i,"__",V0)]}})}var V0=[{pattern:/__([0-9]+)__/dy,parse(t,e,n){return{type:"parameter",value:parseInt(t[1]),range:le(e,n+t.index,t[0].length),selectionRange:le(e,n+t.indices[1][0],t[1].length)}}},{pattern:/__plural_for_parameter__([0-9]+)__\{(.*?)\}__/dy,parse(t,e,n){return{type:"plural",value:parseInt(t[1]),children:m2(Er(t[2],e,n+t.indices[2][0])),range:le(e,n+t.index,t[0].length),selectionRange:le(e,n+t.indices[1][0],t[1].length)}}},{pattern:/__(CONTROL_(?:MOVE|(?:LEFT|RIGHT)_CLICK|KEY_(?:SHIFT|CTRL)|STYLE_(?:BEGIN|END)))__/dy,parse(t,e,n){return{type:"macro",name:t[1],children:[],range:le(e,n+t.index,t[0].length),selectionRange:le(e,n+t.indices[1][0],t[1].length)}}},{pattern:/__(REMARK_COLOR_(?:BEGIN|END))__/dy,parse(t,e,n){return{type:"macro",name:t[1],children:[],range:le(e,n+t.index,t[0].length),selectionRange:le(e,n+t.indices[1][0],t[1].length)}}},{pattern:/__(CONTROL(?:_MODIFIER)?|ENTITY|ITEM|TILE|FLUID|PLANET|TECHNOLOGY|RECIPE)__(.+?)__/dy,parse(t,e,n){return{type:"macro",name:t[1],children:[_e("macro_argument",t[2],e,n+t.indices[2][0])],range:le(e,n+t.index,t[0].length),selectionRange:le(e,n+t.indices[1][0],t[1].length)}}},{pattern:/__(ALT_CONTROL)__(.+?)__(.+?)__/dy,parse(t,e,n){return{type:"macro",name:t[1],children:[_e("macro_argument",t[2],e,n+t.indices[2][0]),_e("macro_argument",t[3],e,n+t.indices[3][0])],range:le(e,n+t.index,t[0].length),selectionRange:le(e,n+t.indices[1][0],t[1].length)}}},{pattern:/__(ALT_CONTROL_(?:LEFT|RIGHT)_CLICK)__(.+?)__/dy,parse(t,e,n){return{type:"macro",name:t[1],children:[_e("macro_argument",t[2],e,n+t.indices[1][0])],range:le(e,n+t.index,t[0].length),selectionRange:le(e,n+t.indices[1][0],t[1].length)}}}];function hd(t){let e=t.open_comments;t.open_comments=[];let n=e[0],r=e[e.length-1];return{type:"comment_group",range:{start:n.range.start,end:r.range.end},selectionRange:n.selectionRange,children:e}}var g2=[{pattern:/^[\r\t ]*([#;].*)?$/d,parse(t,e,n){t[1]?n.open_comments.push(_e("comment",t[1],e,t.indices[1][0])):n.open_comments.length>0&&(n.open_section??n.root).children.push(hd(n))}},{pattern:/^[\r\t ]*\[(.*?)\][\r\t ]*$/d,parse(t,e,n){n.open_section=_e("section",t[1],e,t.indices[1][0],{children:[]}),n.open_comments.length>0&&n.open_section.children.push(hd(n)),n.open_section.range.start.character-=1,n.open_section.range.end.character+=1,n.root.children.push(n.open_section)}},{pattern:/^[\r\t ]*(.*?)=(.*)$/d,parse(t,e,n){let r=_e("record",t[1],e,t.indices[1][0],{children:Zo(Er(t[2],e,t.indices[2][0]),"\\",h2).flatMap(i=>i.type==="escape"?i:Zo(i,"__",V0))});n.open_comments.length>0&&r.children.unshift(hd(n)),r.range.end.character=t[0].length,(n.open_section??n.root).children.push(r)}},{pattern:/^.*$/d,parse(t,e,n){n.root.children.push({type:"error",value:t[0],range:le(e,0,t[0].length),selectionRange:le(e,0,0)})}}];function G0(t){let e={root:{type:"root",children:[],range:{start:{line:0,character:0},end:{line:t.lineCount,character:0}},selectionRange:le(0,0,0)},open_comments:[]};for(let n=0;n<t.lineCount;n++){let r={start:{line:n,character:0},end:{line:n,character:1/0}},i=t.getText(r).replace(/((\r\n)|\r|\n)$/,"");for(let o of g2){let s=o.pattern.exec(i);if(s){o.parse(s,n,e);break}}}return e.root}var md=new Map([["default",{red:1,green:.63,blue:.259,alpha:1}],["red",{red:1,green:.166,blue:.141,alpha:1}],["green",{red:.173,green:.824,blue:.25,alpha:1}],["blue",{red:.343,green:.683,blue:1,alpha:1}],["orange",{red:1,green:.63,blue:.259,alpha:1}],["yellow",{red:1,green:.828,blue:.231,alpha:1}],["pink",{red:1,green:.52,blue:.633,alpha:1}],["purple",{red:.821,green:.44,blue:.998,alpha:1}],["white",{red:.9,green:.9,blue:.9,alpha:1}],["black",{red:.5,green:.5,blue:.5,alpha:1}],["gray",{red:.7,green:.7,blue:.7,alpha:1}],["brown",{red:.757,green:.522,blue:.371,alpha:1}],["cyan",{red:.335,green:.918,blue:.866,alpha:1}],["acid",{red:.708,green:.996,blue:.134,alpha:1}]]);function K0(t){if(md.has(t))return md.get(t);if(t.startsWith("#")){let n=t.match(/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/);if(n)return{red:parseInt(n[1],16)/255,green:parseInt(n[2],16)/255,blue:parseInt(n[3],16)/255,alpha:n[4]?parseInt(n[4],16)/255:1}}let e=t.match(/\s*(\d+(?:\.\d+)?)\s*,?\s*(\d+(?:\.\d+)?)\s*,?\s*(\d+(?:\.\d+)?)(?:\s*,?\s*(\d+(?:\.\d+)?))?\s*/);if(e){let n=parseFloat(e[1]),r=parseFloat(e[2]),i=parseFloat(e[3]),o=e[4]?parseFloat(e[4]):void 0;return(n>1||r>1||i>1||o&&o>1)&&(n=n/255,r=r/255,i=i/255,o&&(o=o/255)),o||(o=1),{red:n,green:r,blue:i,alpha:o}}}function kr(t){let e=Math.floor(t).toString(16);return e.length<2&&(e="0"+e),e}function Dr(t,e){return Math.round(t*Math.pow(10,e))/Math.pow(10,e)}function Y0(t){let e=[];for(let[n,r]of md)if(Math.abs(r.red-t.red)<.004&&Math.abs(r.green-t.green)<.004&&Math.abs(r.blue-t.blue)<.004&&Math.abs(r.alpha-t.alpha)<.004){e.push(n);break}return t.alpha>.996?(e.push(`#${kr(t.red*255)}${kr(t.green*255)}${kr(t.blue*255)}`),e.push(`${Math.floor(t.red*255)}, ${Math.floor(t.green*255)}, ${Math.floor(t.blue*255)}`),e.push(`${Dr(t.red,3)}, ${Dr(t.green,3)}, ${Dr(t.blue,3)}`)):(e.push(`#${kr(t.red*255)}${kr(t.green*255)}${kr(t.blue*255)}${kr(t.alpha*255)}`),e.push(`${Math.floor(t.red*255)}, ${Math.floor(t.green*255)}, ${Math.floor(t.blue*255)}, ${Math.floor(t.alpha*255)}`),e.push(`${Dr(t.red,3)}, ${Dr(t.green,3)}, ${Dr(t.blue,3)}, ${Dr(t.alpha,3)}`)),e}var Q0=ae(ro(),1);var y2=[{message:"Duplicate Section",code:"section.duplicate",setup(t){let e=new Map;return{section:(n,r,i)=>{let o=e.get(n.value);if(o){let s=o.children.length>0?o.children[o.children.length-1].range.end:o.range.end,a=n.children.length>0?n.children[n.children.length-1].range.end:n.range.end;t.report({diag:{range:n.selectionRange,relatedInformation:[{message:"First defined here",location:{range:o.selectionRange,uri:t.uri}}]},fix:[{range:{start:n.range.start,end:a},newText:""},{range:{start:s,end:s},getText:{start:{line:n.range.end.line,character:n.range.end.character+1},end:a}}]})}else e.set(n.value,n)}}}},{message:"Section Name conflicts with Key in Root",code:"section.rootconflict",setup(t){let e;return{root:(n,r,i)=>{e=n},section:(n,r,i)=>{let o=e.children.find(s=>s.type==="record"&&s.value===n.value);o&&t.report({diag:{range:n.selectionRange,relatedInformation:[{location:{uri:t.uri,range:o.range},message:"First defined here"}]}})}}}},{message:"Duplicate Key",code:"key.duplicate",setup(t){let e=new Map;return{section:(n,r,i)=>{e.clear()},record:(n,r,i)=>{let o=e.get(n.value);o?t.report({diag:{range:n.selectionRange,relatedInformation:[{message:"First defined here",location:{range:o.selectionRange,uri:t.uri}}]}}):e.set(n.value,n)}}}},{message:"Key ends with whitespace",code:"key.whitespace-end",setup(t){return{record:(e,n,r)=>{e.value.match(/[\t ]+$/d)&&t.report({diag:{severity:Q0.DiagnosticSeverity.Warning,range:e.selectionRange}})}}}},{message:"Empty Key",code:"key.empty",setup(t){return{record:(e,n,r)=>{e.value||t.report({diag:{range:e.range}})}}}},{message:"Invalid Line",code:"error.unknown",setup(t){return{error:(e,n,r)=>{t.report({diag:{range:e.range}})}}}}];function gd(t,e){let n=[],r={root:[],comment_group:[],comment:[],section:[],record:[],macro:[],macro_argument:[],parameter:[],plural:[],plural_match:[],plural_option:[],richtext:[],richtextopen:[],richtextclose:[],richtextformat:[],text:[],escape:[],error:[]};for(let i of y2){let o={uri:e,report(a){n.push({message:i.message,code:i.code,...a})}},s=i.setup(o);for(let a in r){let u=a;u in s&&s[u]&&r[u].push(s[u])}}return nt(t,(i,o,s)=>{let a=r[i.type];for(let u of a)u(i,o??-1,s)}),n}function b2(t,e){let n=[];return ln(t,"record",(r,i)=>{let o=i.length>0?i[i.length-1]:void 0,s=o?.type==="section"?o.value:void 0;n.push({name:s?`${s}.${r.value}`:r.value,link:{targetUri:e,targetRange:r.range,targetSelectionRange:r.selectionRange},section:o?.type==="section"?o:void 0,record:r})}),n}function Z0(t){return t!==void 0}var $l=class{hasDiagnosticRelatedInformationCapability=!1;definitions=new Map;documentTrees=new Map;loadDocument(e){let n=G0(e);this.documentTrees.set(e.uri,n),this.definitions.set(e.uri,b2(n,e.uri))}clearDocument(e){this.definitions.delete(e),this.documentTrees.delete(e)}clearFolder(e){for(let n of this.definitions.keys())n.startsWith(e)&&this.definitions.delete(n);for(let n of this.documentTrees.keys())n.startsWith(e)&&this.documentTrees.delete(n)}diagnose(e){let n=this.documentTrees.get(e);if(!n)return[];let r=gd(n,e),i=[];for(let o of r)i.push({message:o.message,code:o.code,source:"factorio-locale",severity:Xe.DiagnosticSeverity.Error,...o.diag});return i}recordSymbol(e){return{name:e.value?e.value:"<empty>",detail:"",kind:e.value?Xe.SymbolKind.String:Xe.SymbolKind.Null,range:e.range,selectionRange:e.selectionRange,children:[]}}sectionSymbols(e){return{name:e.value?e.value:"[empty]",detail:"",tags:[],kind:Xe.SymbolKind.Namespace,range:e.range,selectionRange:e.selectionRange,children:e.children.map(n=>{if(n.type==="record")return this.recordSymbol(n)}).filter(Z0)}}documentSymbols(e){return e.children.map(n=>{switch(n.type){case"section":return this.sectionSymbols(n);case"record":return this.recordSymbol(n);default:return}}).filter(Z0)}onDocumentSymbol(e){this.documentTrees.has(e.uri)||this.loadDocument(e);let n=this.documentTrees.get(e.uri);return n?this.documentSymbols(n):[]}findDefinitionLinks(e){return this.findDefinitions(e).map(r=>r.link)}findDefinitions(e){let n=[];for(let r of this.definitions.values())n.push(...r.filter(i=>i.name===e));return n}getKeyPlainText(e){let n=this.findDefinitions(e);return n.length===0?`Unknown key: ${e}`:this.getRecordPlainText(n[0].record)}getMacroPlainText(e){switch(e.name){case"ENTITY":return this.getKeyPlainText(`entity-name.${e.children[0].value}`);case"ITEM":return this.getKeyPlainText(`item-name.${e.children[0].value}`);case"TILE":return this.getKeyPlainText(`tile-name.${e.children[0].value}`);case"FLUID":return this.getKeyPlainText(`fluid-name.${e.children[0].value}`);case"PLANET":return this.getKeyPlainText(`space-location-name.${e.children[0].value}`);case"TECHNOLOGY":return this.getKeyPlainText(`technology-name.${e.children[0].value}`);case"RECIPE":return this.getKeyPlainText(`recipe-name.${e.children[0].value}`);case"CONTROL_KEY_SHIFT":return this.getKeyPlainText("control-keys.shift");case"CONTROL_KEY_CTRL":return this.getKeyPlainText("control-keys.control");case"CONTROL_MOVE":return"WASD";case"CONTROL":case"CONTROL_MODIFIER":return`__${e.name}__${e.children[0].value}__`;case"ALT_CONTROL":return`__${e.name}__${e.children[0].value}__${e.children[1].value}__`;case"CONTROL_LEFT_CLICK":return this.getKeyPlainText("control-keys.mouse-button-1");case"CONTROL_RIGHT_CLICK":return this.getKeyPlainText("control-keys.mouse-button-2");case"ALT_CONTROL_LEFT_CLICK":return this.getKeyPlainText(`control-keys.mouse-button-1-alt-${e.children[0].value}`);case"ALT_CONTROL_RIGHT_CLICK":return this.getKeyPlainText(`control-keys.mouse-button-2-alt-${e.children[0].value}`);case"CONTROL_STYLE_BEGIN":return"[font=default-semibold][color=128,206,240]";case"CONTROL_STYLE_END":return"[/color][/font]";case"REMARK_COLOR_BEGIN":return"[color=34,181,255]";case"REMARK_COLOR_END":return"[/color]";default:throw new Error("Unknown Macro Node Type")}}getPluralPlainTexts(e,n){return e.children.filter(r=>r.type==="plural_option").map(r=>{throw new Error("")})}getNodePlainText(e,n){switch(e.type){case"text":case"escape":return e.value;case"parameter":if(n.values&&e.value<n.values.length){let r=n.values[e.value];if(r!==void 0)return`${r}`}return`__${e.value}__`;case"plural":return this.getPluralPlainTexts(e,n);case"macro":return this.getMacroPlainText(e);default:throw new Error("Unknown Text Node Type")}}getRecordPlainText(e,n){let r={params:[]};return e.children.filter(i=>i.type!=="comment_group"&&i.type!=="error").map(i=>this.getNodePlainText(i,r)).join("")}onHover(e,n){return null}getCompletions(e){let n=[];for(let r of this.definitions.values())e?n.push(r.map(i=>i.name).filter(i=>i.startsWith(e))):n.push(r.map(i=>i.name).map(i=>{let o=i.indexOf(".");return o===-1?i:i.substring(0,o+1)}));return[...new Set(n.flat())]}onCodeAction(e,n,r){if(e.languageId!=="factorio-locale")return[];let i=this.documentTrees.get(e.uri);if(!i)return[];let o=gd(i,e.uri).filter(l=>!!l.fix),s=o.filter(l=>ma(n,l.diag.range)),a=[],u=new Set;for(let l of s)if(a.push({title:`Fix this ${l.code}`,kind:Xe.CodeActionKind.QuickFix+"."+l.code,diagnostics:[{message:l.message,code:l.code,source:"factorio-locale",severity:Xe.DiagnosticSeverity.Error,...l.diag}],isPreferred:!0,edit:{changes:{[e.uri]:gn(e,l.fix)}}}),!u.has(l.code)){u.add(l.code);let c=o.filter(f=>f.code===l.code);c.length>1&&a.push({title:`Fix all ${l.code} in file`,kind:Xe.CodeActionKind.QuickFix+"."+l.code+".all",diagnostics:c.map(f=>({message:f.message,code:f.code,source:"factorio-locale",severity:Xe.DiagnosticSeverity.Error,...f.diag})),edit:{changes:{[e.uri]:gn(e,c.flatMap(f=>f.fix))}}})}return o.length>s.length&&a.push({title:"Fix all auto-fixable in file",kind:Xe.CodeActionKind.QuickFix+".all",diagnostics:o.map(l=>({message:l.message,code:l.code,source:"factorio-locale",severity:Xe.DiagnosticSeverity.Error,...l.diag})),edit:{changes:{[e.uri]:gn(e,o.flatMap(l=>l.fix))}}}),a}onDocumentColor(e){let n=[];for(let r=0;r<e.lineCount;r++){let i={start:{line:r,character:0},end:{line:r,character:1/0}},o=e.getText(i).replace(/(\r\n)|\r|\n$/,"");i.end.character=o.length;let s=/\[color=([^\]]+)\]/g,a=s.exec(o);for(;a;){{let u=K0(a[1]);u&&n.push({color:u,range:{start:{line:r,character:a.index+7},end:{line:r,character:a.index+7+a[1].length}}})}a=s.exec(o)}}return n}onColorPresentation(e,n){return Y0(e).map(r=>({label:r,textEdit:{range:n,newText:r}}))}};var yd=ae(Ul(),1),Hl=class{constructor(e){this.Locale=e}Locale;onDefinition(e,n){let r=n.getText({start:{line:e.position.line,character:0},end:{line:e.position.line,character:Number.MAX_VALUE}});for(let i of r.matchAll(/(['"])((?:[^\\](?<!\1)|\\['"0abfnrtv\\]|\\\d{1,3}|\\x[0-9a-fA-F]{2})*)\1/g))if(i.index&&i.index<=e.position.character&&i.index+i[0].length>=e.position.character){let o=i[2],s={start:{line:e.position.line,character:i.index},end:{line:e.position.line,character:i.index+i[0].length}};return this.Locale.findDefinitionLinks(o).map(u=>Object.assign({originSelectionRange:s},u))}}onCompletion(e,n){let i=n.getText({start:{line:e.position.line,character:0},end:{line:e.position.line,character:e.position.character+1}}).match(/(['"])((?:[^\\](?<!\1)|\\['"0abfnrtv\\]|\\\d{1,3}|\\x[0-9a-fA-F]{2})*)\1$/);if(i){let o=i[2].lastIndexOf("."),s=o!==-1?i[2].substring(0,o+1):"";return this.Locale.getCompletions(s).map(a=>({label:a.endsWith(".")?a.substring(0,a.length-1):a,kind:a.endsWith(".")?yd.CompletionItemKind.Enum:yd.CompletionItemKind.EnumMember,commitCharacters:a.endsWith(".")?["."]:[],textEdit:{newText:a.endsWith(".")?a.substring(0,a.length-1):a,range:{start:{line:e.position.line,character:i.index+1},end:{line:e.position.line,character:e.position.character}}}}))}return[]}};async function J0(){let t=new ya,e=new $l,n=new Hl(e),r=(0,ct.createConnection)(ct.ProposedFeatures.all),i=new ct.TextDocuments(tn);async function o(l){let c=i.get(l);if(c)return c;let f=Ge.parse(l);if(f.scheme==="file"){if(f.path.endsWith(".cfg"))return c=tn.create(l,"factorio-locale",1,await bd.readFile(f.fsPath,"utf8")),c;if(f.path.endsWith("changelog.txt"))return c=tn.create(l,"factorio-changelog",1,await bd.readFile(f.fsPath,"utf8")),c}}async function s(l){let c=await o(l);if(c)switch(c.languageId){case"factorio-locale":e.loadDocument(c);break;case"factorio-changelog":t.loadDocument(c);break}}async function a(l){let c=Ge.parse(l);if(c.scheme==="file"){let f=$r(c.fsPath,{pattern:["**/locale/*/*.cfg","**/changelog.txt"]});f.on("match",p=>{s(Ge.file(p.absolute).toString())}),f.on("error",p=>{throw p}),await new Promise(p=>{f.on("end",()=>{p()})})}}let u=!1;return r.onInitialize(async l=>{let c=l.capabilities;u=!!(c.workspace&&c.workspace.workspaceFolders),e.hasDiagnosticRelatedInformationCapability=!!(c.textDocument&&c.textDocument.publishDiagnostics&&c.textDocument.publishDiagnostics.relatedInformation);let f={capabilities:{textDocumentSync:ct.TextDocumentSyncKind.Incremental,documentSymbolProvider:!0,codeActionProvider:!0,colorProvider:!0,definitionProvider:!0,completionProvider:{triggerCharacters:['"',"'","."],allCommitCharacters:["."]},hoverProvider:!0}};return u&&(f.capabilities.workspace={workspaceFolders:{supported:!0,changeNotifications:!0}},l.workspaceFolders&&await Promise.all(l.workspaceFolders.map(p=>a(p.uri)))),f}),r.onInitialized(()=>{u&&r.workspace.onDidChangeWorkspaceFolders(async l=>{for(let c of l.removed)e.clearFolder(c.uri),t.clearFolder(c.uri);for(let c of l.added)await a(c.uri)})}),i.onDidClose(l=>{switch(l.document.languageId){case"factorio-locale":r.sendDiagnostics({uri:l.document.uri,diagnostics:[]});break;case"factorio-changelog":r.sendDiagnostics({uri:l.document.uri,diagnostics:[]});break}}),i.onDidChangeContent(l=>{switch(l.document.languageId){case"factorio-locale":e.loadDocument(l.document),r.sendDiagnostics({uri:l.document.uri,diagnostics:e.diagnose(l.document.uri)});break;case"factorio-changelog":t.loadDocument(l.document),r.sendDiagnostics({uri:l.document.uri,diagnostics:t.diagnose(l.document.uri)});break}}),r.onDefinition(async l=>{let c=await o(l.textDocument.uri);return c&&c.languageId==="lua"?n.onDefinition(l,c):null}),r.onCompletion(async l=>{let c=await o(l.textDocument.uri);if(c&&c.languageId==="lua")return{isIncomplete:!0,items:n.onCompletion(l,c)}}),r.onDidChangeWatchedFiles(l=>{for(let c of l.changes)switch(c.type){case ct.FileChangeType.Deleted:e.clearDocument(c.uri),t.clearDocument(c.uri);break;case ct.FileChangeType.Changed:case ct.FileChangeType.Created:o(c.uri).then(f=>{if(f)switch(f.languageId){case"factorio-locale":e.loadDocument(f);break;case"factorio-changelog":t.loadDocument(f);break}});break;default:break}}),r.onHover(l=>{let c=i.get(l.textDocument.uri);return c&&c.languageId==="factorio-locale"?e.onHover(l,c):null}),r.onDocumentSymbol(l=>{let c=i.get(l.textDocument.uri);if(c)switch(c.languageId){case"factorio-locale":return e.onDocumentSymbol(c);case"factorio-changelog":return t.onDocumentSymbol(c)}return null}),r.onCodeAction(l=>{let c=i.get(l.textDocument.uri);if(c)switch(c.languageId){case"factorio-locale":return e.onCodeAction(c,l.range,l.context);case"factorio-changelog":return t.onCodeAction(c,l.range,l.context)}return null}),r.onDocumentColor(l=>{let c=i.get(l.textDocument.uri);return c&&c.languageId==="factorio-locale"?e.onDocumentColor(c):[]}),r.onColorPresentation(l=>{let c=i.get(l.textDocument.uri);return c&&c.languageId==="factorio-locale"?e.onColorPresentation(l.color,l.range):[]}),i.listen(r),r.listen(),new Promise(l=>{r.onExit(l)})}ne.command("lsp").description("Run LSP Server for Locale and Changelog features").allowUnknownOption(!0).allowExcessArguments(!0).action(async()=>{await J0()});import*as X0 from"fs/promises";ne.command("scriptdat <file>").description("Dump script.dat").action(async t=>{let e=new Ld(new qn(await X0.readFile(t)));console.log(JSON.stringify({version:e.version.format(),data:e.data},void 0,2))});await ne.description(`${Ed} ${kd}`).helpCommand("help").showHelpAfterError().showSuggestionAfterError().parseAsync(process.argv,{from:"node"}).catch(t=>{console.error(t),process.exit(1)}).then(()=>{process.disconnect?.()});
98
98
  /*! Bundled license information:
99
99
 
100
100
  safe-buffer/index.js: