UNPKG

@lpc-lang/core

Version:
7 lines (6 loc) 1.07 MB
// Copyright 2024 John L Chmura var hH=Object.create;var RF=Object.defineProperty;var SH=Object.getOwnPropertyDescriptor;var _H=Object.getOwnPropertyNames;var xH=Object.getPrototypeOf,bH=Object.prototype.hasOwnProperty;var Au=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),gd=(e,t)=>{for(var i in t)RF(e,i,{get:t[i],enumerable:!0})},CH=(e,t,i,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of _H(t))!bH.call(e,c)&&c!==i&&RF(e,c,{get:()=>t[c],enumerable:!(o=SH(t,c))||o.enumerable});return e};var EH=(e,t,i)=>(i=e!=null?hH(xH(e)):{},CH(t||!e||!e.__esModule?RF(i,"default",{value:e,enumerable:!0}):i,e));var Bj=Au(dA=>{var Mj="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");dA.encode=function(e){if(0<=e&&e<Mj.length)return Mj[e];throw new TypeError("Must be between 0 and 63: "+e)};dA.decode=function(e){var t=65,i=90,o=97,c=122,u=48,p=57,m=43,y=47,x=26,h=52;return t<=e&&e<=i?e-t:o<=e&&e<=c?e-o+x:u<=e&&e<=p?e-u+h:e==m?62:e==y?63:-1}});var mA=Au(fA=>{var jj=Bj(),pA=5,Jj=1<<pA,Uj=Jj-1,Wj=Jj;function HQ(e){return e<0?(-e<<1)+1:(e<<1)+0}function qQ(e){var t=(e&1)===1,i=e>>1;return t?-i:i}fA.encode=function(t){var i="",o,c=HQ(t);do o=c&Uj,c>>>=pA,c>0&&(o|=Wj),i+=jj.encode(o);while(c>0);return i};fA.decode=function(t,i,o){var c=t.length,u=0,p=0,m,y;do{if(i>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(y=jj.decode(t.charCodeAt(i++)),y===-1)throw new Error("Invalid base64 digit: "+t.charAt(i-1));m=!!(y&Wj),y&=Uj,u=u+(y<<p),p+=pA}while(m);o.value=qQ(u),o.rest=i}});var r_=Au(al=>{function GQ(e,t,i){if(t in e)return e[t];if(arguments.length===3)return i;throw new Error('"'+t+'" is a required argument.')}al.getArg=GQ;var Kj=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,$Q=/^data:.+\,.+$/;function iC(e){var t=e.match(Kj);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}al.urlParse=iC;function n_(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}al.urlGenerate=n_;function gA(e){var t=e,i=iC(e);if(i){if(!i.path)return e;t=i.path}for(var o=al.isAbsolute(t),c=t.split(/\/+/),u,p=0,m=c.length-1;m>=0;m--)u=c[m],u==="."?c.splice(m,1):u===".."?p++:p>0&&(u===""?(c.splice(m+1,p),p=0):(c.splice(m,2),p--));return t=c.join("/"),t===""&&(t=o?"/":"."),i?(i.path=t,n_(i)):t}al.normalize=gA;function Vj(e,t){e===""&&(e="."),t===""&&(t=".");var i=iC(t),o=iC(e);if(o&&(e=o.path||"/"),i&&!i.scheme)return o&&(i.scheme=o.scheme),n_(i);if(i||t.match($Q))return t;if(o&&!o.host&&!o.path)return o.host=t,n_(o);var c=t.charAt(0)==="/"?t:gA(e.replace(/\/+$/,"")+"/"+t);return o?(o.path=c,n_(o)):c}al.join=Vj;al.isAbsolute=function(e){return e.charAt(0)==="/"||Kj.test(e)};function QQ(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var i=0;t.indexOf(e+"/")!==0;){var o=e.lastIndexOf("/");if(o<0||(e=e.slice(0,o),e.match(/^([^\/]+:\/)?\/*$/)))return t;++i}return Array(i+1).join("../")+t.substr(e.length+1)}al.relative=QQ;var zj=function(){var e=Object.create(null);return!("__proto__"in e)}();function Hj(e){return e}function YQ(e){return qj(e)?"$"+e:e}al.toSetString=zj?Hj:YQ;function XQ(e){return qj(e)?e.slice(1):e}al.fromSetString=zj?Hj:XQ;function qj(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var i=t-10;i>=0;i--)if(e.charCodeAt(i)!==36)return!1;return!0}function ZQ(e,t,i){var o=t_(e.source,t.source);return o!==0||(o=e.originalLine-t.originalLine,o!==0)||(o=e.originalColumn-t.originalColumn,o!==0||i)||(o=e.generatedColumn-t.generatedColumn,o!==0)||(o=e.generatedLine-t.generatedLine,o!==0)?o:t_(e.name,t.name)}al.compareByOriginalPositions=ZQ;function eY(e,t,i){var o=e.generatedLine-t.generatedLine;return o!==0||(o=e.generatedColumn-t.generatedColumn,o!==0||i)||(o=t_(e.source,t.source),o!==0)||(o=e.originalLine-t.originalLine,o!==0)||(o=e.originalColumn-t.originalColumn,o!==0)?o:t_(e.name,t.name)}al.compareByGeneratedPositionsDeflated=eY;function t_(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function nY(e,t){var i=e.generatedLine-t.generatedLine;return i!==0||(i=e.generatedColumn-t.generatedColumn,i!==0)||(i=t_(e.source,t.source),i!==0)||(i=e.originalLine-t.originalLine,i!==0)||(i=e.originalColumn-t.originalColumn,i!==0)?i:t_(e.name,t.name)}al.compareByGeneratedPositionsInflated=nY;function tY(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}al.parseSourceMapInput=tY;function rY(e,t,i){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),i){var o=iC(i);if(!o)throw new Error("sourceMapURL could not be parsed");if(o.path){var c=o.path.lastIndexOf("/");c>=0&&(o.path=o.path.substring(0,c+1))}t=Vj(n_(o),t)}return gA(t)}al.computeSourceURL=rY});var hA=Au(Gj=>{var yA=r_(),TA=Object.prototype.hasOwnProperty,jT=typeof Map<"u";function wm(){this._array=[],this._set=jT?new Map:Object.create(null)}wm.fromArray=function(t,i){for(var o=new wm,c=0,u=t.length;c<u;c++)o.add(t[c],i);return o};wm.prototype.size=function(){return jT?this._set.size:Object.getOwnPropertyNames(this._set).length};wm.prototype.add=function(t,i){var o=jT?t:yA.toSetString(t),c=jT?this.has(t):TA.call(this._set,o),u=this._array.length;(!c||i)&&this._array.push(t),c||(jT?this._set.set(t,u):this._set[o]=u)};wm.prototype.has=function(t){if(jT)return this._set.has(t);var i=yA.toSetString(t);return TA.call(this._set,i)};wm.prototype.indexOf=function(t){if(jT){var i=this._set.get(t);if(i>=0)return i}else{var o=yA.toSetString(t);if(TA.call(this._set,o))return this._set[o]}throw new Error('"'+t+'" is not in the set.')};wm.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};wm.prototype.toArray=function(){return this._array.slice()};Gj.ArraySet=wm});var Yj=Au(Qj=>{var $j=r_();function iY(e,t){var i=e.generatedLine,o=t.generatedLine,c=e.generatedColumn,u=t.generatedColumn;return o>i||o==i&&u>=c||$j.compareByGeneratedPositionsInflated(e,t)<=0}function mP(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}mP.prototype.unsortedForEach=function(t,i){this._array.forEach(t,i)};mP.prototype.add=function(t){iY(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};mP.prototype.toArray=function(){return this._sorted||(this._array.sort($j.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Qj.MappingList=mP});var SA=Au(Xj=>{var oC=mA(),Rs=r_(),gP=hA().ArraySet,oY=Yj().MappingList;function Ld(e){e||(e={}),this._file=Rs.getArg(e,"file",null),this._sourceRoot=Rs.getArg(e,"sourceRoot",null),this._skipValidation=Rs.getArg(e,"skipValidation",!1),this._sources=new gP,this._names=new gP,this._mappings=new oY,this._sourcesContents=null}Ld.prototype._version=3;Ld.fromSourceMap=function(t){var i=t.sourceRoot,o=new Ld({file:t.file,sourceRoot:i});return t.eachMapping(function(c){var u={generated:{line:c.generatedLine,column:c.generatedColumn}};c.source!=null&&(u.source=c.source,i!=null&&(u.source=Rs.relative(i,u.source)),u.original={line:c.originalLine,column:c.originalColumn},c.name!=null&&(u.name=c.name)),o.addMapping(u)}),t.sources.forEach(function(c){var u=c;i!==null&&(u=Rs.relative(i,c)),o._sources.has(u)||o._sources.add(u);var p=t.sourceContentFor(c);p!=null&&o.setSourceContent(c,p)}),o};Ld.prototype.addMapping=function(t){var i=Rs.getArg(t,"generated"),o=Rs.getArg(t,"original",null),c=Rs.getArg(t,"source",null),u=Rs.getArg(t,"name",null);this._skipValidation||this._validateMapping(i,o,c,u),c!=null&&(c=String(c),this._sources.has(c)||this._sources.add(c)),u!=null&&(u=String(u),this._names.has(u)||this._names.add(u)),this._mappings.add({generatedLine:i.line,generatedColumn:i.column,originalLine:o!=null&&o.line,originalColumn:o!=null&&o.column,source:c,name:u})};Ld.prototype.setSourceContent=function(t,i){var o=t;this._sourceRoot!=null&&(o=Rs.relative(this._sourceRoot,o)),i!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Rs.toSetString(o)]=i):this._sourcesContents&&(delete this._sourcesContents[Rs.toSetString(o)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Ld.prototype.applySourceMap=function(t,i,o){var c=i;if(i==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);c=t.file}var u=this._sourceRoot;u!=null&&(c=Rs.relative(u,c));var p=new gP,m=new gP;this._mappings.unsortedForEach(function(y){if(y.source===c&&y.originalLine!=null){var x=t.originalPositionFor({line:y.originalLine,column:y.originalColumn});x.source!=null&&(y.source=x.source,o!=null&&(y.source=Rs.join(o,y.source)),u!=null&&(y.source=Rs.relative(u,y.source)),y.originalLine=x.line,y.originalColumn=x.column,x.name!=null&&(y.name=x.name))}var h=y.source;h!=null&&!p.has(h)&&p.add(h);var b=y.name;b!=null&&!m.has(b)&&m.add(b)},this),this._sources=p,this._names=m,t.sources.forEach(function(y){var x=t.sourceContentFor(y);x!=null&&(o!=null&&(y=Rs.join(o,y)),u!=null&&(y=Rs.relative(u,y)),this.setSourceContent(y,x))},this)};Ld.prototype._validateMapping=function(t,i,o,c){if(i&&typeof i.line!="number"&&typeof i.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!i&&!o&&!c)){if(t&&"line"in t&&"column"in t&&i&&"line"in i&&"column"in i&&t.line>0&&t.column>=0&&i.line>0&&i.column>=0&&o)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:o,original:i,name:c}))}};Ld.prototype._serializeMappings=function(){for(var t=0,i=1,o=0,c=0,u=0,p=0,m="",y,x,h,b,P=this._mappings.toArray(),v=0,R=P.length;v<R;v++){if(x=P[v],y="",x.generatedLine!==i)for(t=0;x.generatedLine!==i;)y+=";",i++;else if(v>0){if(!Rs.compareByGeneratedPositionsInflated(x,P[v-1]))continue;y+=","}y+=oC.encode(x.generatedColumn-t),t=x.generatedColumn,x.source!=null&&(b=this._sources.indexOf(x.source),y+=oC.encode(b-p),p=b,y+=oC.encode(x.originalLine-1-c),c=x.originalLine-1,y+=oC.encode(x.originalColumn-o),o=x.originalColumn,x.name!=null&&(h=this._names.indexOf(x.name),y+=oC.encode(h-u),u=h)),m+=y}return m};Ld.prototype._generateSourcesContent=function(t,i){return t.map(function(o){if(!this._sourcesContents)return null;i!=null&&(o=Rs.relative(i,o));var c=Rs.toSetString(o);return Object.prototype.hasOwnProperty.call(this._sourcesContents,c)?this._sourcesContents[c]:null},this)};Ld.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};Ld.prototype.toString=function(){return JSON.stringify(this.toJSON())};Xj.SourceMapGenerator=Ld});var Zj=Au(JT=>{JT.GREATEST_LOWER_BOUND=1;JT.LEAST_UPPER_BOUND=2;function _A(e,t,i,o,c,u){var p=Math.floor((t-e)/2)+e,m=c(i,o[p],!0);return m===0?p:m>0?t-p>1?_A(p,t,i,o,c,u):u==JT.LEAST_UPPER_BOUND?t<o.length?t:-1:p:p-e>1?_A(e,p,i,o,c,u):u==JT.LEAST_UPPER_BOUND?p:e<0?-1:e}JT.search=function(t,i,o,c){if(i.length===0)return-1;var u=_A(-1,i.length,t,i,o,c||JT.GREATEST_LOWER_BOUND);if(u<0)return-1;for(;u-1>=0&&o(i[u],i[u-1],!0)===0;)--u;return u}});var nJ=Au(eJ=>{function xA(e,t,i){var o=e[t];e[t]=e[i],e[i]=o}function aY(e,t){return Math.round(e+Math.random()*(t-e))}function bA(e,t,i,o){if(i<o){var c=aY(i,o),u=i-1;xA(e,c,o);for(var p=e[o],m=i;m<o;m++)t(e[m],p)<=0&&(u+=1,xA(e,u,m));xA(e,u+1,m);var y=u+1;bA(e,t,i,y-1),bA(e,t,y+1,o)}}eJ.quickSort=function(e,t){bA(e,t,0,e.length-1)}});var rJ=Au(yP=>{var yr=r_(),CA=Zj(),i_=hA().ArraySet,sY=mA(),aC=nJ().quickSort;function va(e,t){var i=e;return typeof e=="string"&&(i=yr.parseSourceMapInput(e)),i.sections!=null?new _p(i,t):new Wc(i,t)}va.fromSourceMap=function(e,t){return Wc.fromSourceMap(e,t)};va.prototype._version=3;va.prototype.__generatedMappings=null;Object.defineProperty(va.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});va.prototype.__originalMappings=null;Object.defineProperty(va.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});va.prototype._charIsMappingSeparator=function(t,i){var o=t.charAt(i);return o===";"||o===","};va.prototype._parseMappings=function(t,i){throw new Error("Subclasses must implement _parseMappings")};va.GENERATED_ORDER=1;va.ORIGINAL_ORDER=2;va.GREATEST_LOWER_BOUND=1;va.LEAST_UPPER_BOUND=2;va.prototype.eachMapping=function(t,i,o){var c=i||null,u=o||va.GENERATED_ORDER,p;switch(u){case va.GENERATED_ORDER:p=this._generatedMappings;break;case va.ORIGINAL_ORDER:p=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var m=this.sourceRoot;p.map(function(y){var x=y.source===null?null:this._sources.at(y.source);return x=yr.computeSourceURL(m,x,this._sourceMapURL),{source:x,generatedLine:y.generatedLine,generatedColumn:y.generatedColumn,originalLine:y.originalLine,originalColumn:y.originalColumn,name:y.name===null?null:this._names.at(y.name)}},this).forEach(t,c)};va.prototype.allGeneratedPositionsFor=function(t){var i=yr.getArg(t,"line"),o={source:yr.getArg(t,"source"),originalLine:i,originalColumn:yr.getArg(t,"column",0)};if(o.source=this._findSourceIndex(o.source),o.source<0)return[];var c=[],u=this._findMapping(o,this._originalMappings,"originalLine","originalColumn",yr.compareByOriginalPositions,CA.LEAST_UPPER_BOUND);if(u>=0){var p=this._originalMappings[u];if(t.column===void 0)for(var m=p.originalLine;p&&p.originalLine===m;)c.push({line:yr.getArg(p,"generatedLine",null),column:yr.getArg(p,"generatedColumn",null),lastColumn:yr.getArg(p,"lastGeneratedColumn",null)}),p=this._originalMappings[++u];else for(var y=p.originalColumn;p&&p.originalLine===i&&p.originalColumn==y;)c.push({line:yr.getArg(p,"generatedLine",null),column:yr.getArg(p,"generatedColumn",null),lastColumn:yr.getArg(p,"lastGeneratedColumn",null)}),p=this._originalMappings[++u]}return c};yP.SourceMapConsumer=va;function Wc(e,t){var i=e;typeof e=="string"&&(i=yr.parseSourceMapInput(e));var o=yr.getArg(i,"version"),c=yr.getArg(i,"sources"),u=yr.getArg(i,"names",[]),p=yr.getArg(i,"sourceRoot",null),m=yr.getArg(i,"sourcesContent",null),y=yr.getArg(i,"mappings"),x=yr.getArg(i,"file",null);if(o!=this._version)throw new Error("Unsupported version: "+o);p&&(p=yr.normalize(p)),c=c.map(String).map(yr.normalize).map(function(h){return p&&yr.isAbsolute(p)&&yr.isAbsolute(h)?yr.relative(p,h):h}),this._names=i_.fromArray(u.map(String),!0),this._sources=i_.fromArray(c,!0),this._absoluteSources=this._sources.toArray().map(function(h){return yr.computeSourceURL(p,h,t)}),this.sourceRoot=p,this.sourcesContent=m,this._mappings=y,this._sourceMapURL=t,this.file=x}Wc.prototype=Object.create(va.prototype);Wc.prototype.consumer=va;Wc.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=yr.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var i;for(i=0;i<this._absoluteSources.length;++i)if(this._absoluteSources[i]==e)return i;return-1};Wc.fromSourceMap=function(t,i){var o=Object.create(Wc.prototype),c=o._names=i_.fromArray(t._names.toArray(),!0),u=o._sources=i_.fromArray(t._sources.toArray(),!0);o.sourceRoot=t._sourceRoot,o.sourcesContent=t._generateSourcesContent(o._sources.toArray(),o.sourceRoot),o.file=t._file,o._sourceMapURL=i,o._absoluteSources=o._sources.toArray().map(function(v){return yr.computeSourceURL(o.sourceRoot,v,i)});for(var p=t._mappings.toArray().slice(),m=o.__generatedMappings=[],y=o.__originalMappings=[],x=0,h=p.length;x<h;x++){var b=p[x],P=new tJ;P.generatedLine=b.generatedLine,P.generatedColumn=b.generatedColumn,b.source&&(P.source=u.indexOf(b.source),P.originalLine=b.originalLine,P.originalColumn=b.originalColumn,b.name&&(P.name=c.indexOf(b.name)),y.push(P)),m.push(P)}return aC(o.__originalMappings,yr.compareByOriginalPositions),o};Wc.prototype._version=3;Object.defineProperty(Wc.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function tJ(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Wc.prototype._parseMappings=function(t,i){for(var o=1,c=0,u=0,p=0,m=0,y=0,x=t.length,h=0,b={},P={},v=[],R=[],T,Y,M,le,Te;h<x;)if(t.charAt(h)===";")o++,h++,c=0;else if(t.charAt(h)===",")h++;else{for(T=new tJ,T.generatedLine=o,le=h;le<x&&!this._charIsMappingSeparator(t,le);le++);if(Y=t.slice(h,le),M=b[Y],M)h+=Y.length;else{for(M=[];h<le;)sY.decode(t,h,P),Te=P.value,h=P.rest,M.push(Te);if(M.length===2)throw new Error("Found a source, but no line and column");if(M.length===3)throw new Error("Found a source and line, but no column");b[Y]=M}T.generatedColumn=c+M[0],c=T.generatedColumn,M.length>1&&(T.source=m+M[1],m+=M[1],T.originalLine=u+M[2],u=T.originalLine,T.originalLine+=1,T.originalColumn=p+M[3],p=T.originalColumn,M.length>4&&(T.name=y+M[4],y+=M[4])),R.push(T),typeof T.originalLine=="number"&&v.push(T)}aC(R,yr.compareByGeneratedPositionsDeflated),this.__generatedMappings=R,aC(v,yr.compareByOriginalPositions),this.__originalMappings=v};Wc.prototype._findMapping=function(t,i,o,c,u,p){if(t[o]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[o]);if(t[c]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[c]);return CA.search(t,i,u,p)};Wc.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var i=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var o=this._generatedMappings[t+1];if(i.generatedLine===o.generatedLine){i.lastGeneratedColumn=o.generatedColumn-1;continue}}i.lastGeneratedColumn=1/0}};Wc.prototype.originalPositionFor=function(t){var i={generatedLine:yr.getArg(t,"line"),generatedColumn:yr.getArg(t,"column")},o=this._findMapping(i,this._generatedMappings,"generatedLine","generatedColumn",yr.compareByGeneratedPositionsDeflated,yr.getArg(t,"bias",va.GREATEST_LOWER_BOUND));if(o>=0){var c=this._generatedMappings[o];if(c.generatedLine===i.generatedLine){var u=yr.getArg(c,"source",null);u!==null&&(u=this._sources.at(u),u=yr.computeSourceURL(this.sourceRoot,u,this._sourceMapURL));var p=yr.getArg(c,"name",null);return p!==null&&(p=this._names.at(p)),{source:u,line:yr.getArg(c,"originalLine",null),column:yr.getArg(c,"originalColumn",null),name:p}}}return{source:null,line:null,column:null,name:null}};Wc.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1};Wc.prototype.sourceContentFor=function(t,i){if(!this.sourcesContent)return null;var o=this._findSourceIndex(t);if(o>=0)return this.sourcesContent[o];var c=t;this.sourceRoot!=null&&(c=yr.relative(this.sourceRoot,c));var u;if(this.sourceRoot!=null&&(u=yr.urlParse(this.sourceRoot))){var p=c.replace(/^file:\/\//,"");if(u.scheme=="file"&&this._sources.has(p))return this.sourcesContent[this._sources.indexOf(p)];if((!u.path||u.path=="/")&&this._sources.has("/"+c))return this.sourcesContent[this._sources.indexOf("/"+c)]}if(i)return null;throw new Error('"'+c+'" is not in the SourceMap.')};Wc.prototype.generatedPositionFor=function(t){var i=yr.getArg(t,"source");if(i=this._findSourceIndex(i),i<0)return{line:null,column:null,lastColumn:null};var o={source:i,originalLine:yr.getArg(t,"line"),originalColumn:yr.getArg(t,"column")},c=this._findMapping(o,this._originalMappings,"originalLine","originalColumn",yr.compareByOriginalPositions,yr.getArg(t,"bias",va.GREATEST_LOWER_BOUND));if(c>=0){var u=this._originalMappings[c];if(u.source===o.source)return{line:yr.getArg(u,"generatedLine",null),column:yr.getArg(u,"generatedColumn",null),lastColumn:yr.getArg(u,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};yP.BasicSourceMapConsumer=Wc;function _p(e,t){var i=e;typeof e=="string"&&(i=yr.parseSourceMapInput(e));var o=yr.getArg(i,"version"),c=yr.getArg(i,"sections");if(o!=this._version)throw new Error("Unsupported version: "+o);this._sources=new i_,this._names=new i_;var u={line:-1,column:0};this._sections=c.map(function(p){if(p.url)throw new Error("Support for url field in sections not implemented.");var m=yr.getArg(p,"offset"),y=yr.getArg(m,"line"),x=yr.getArg(m,"column");if(y<u.line||y===u.line&&x<u.column)throw new Error("Section offsets must be ordered and non-overlapping.");return u=m,{generatedOffset:{generatedLine:y+1,generatedColumn:x+1},consumer:new va(yr.getArg(p,"map"),t)}})}_p.prototype=Object.create(va.prototype);_p.prototype.constructor=va;_p.prototype._version=3;Object.defineProperty(_p.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var i=0;i<this._sections[t].consumer.sources.length;i++)e.push(this._sections[t].consumer.sources[i]);return e}});_p.prototype.originalPositionFor=function(t){var i={generatedLine:yr.getArg(t,"line"),generatedColumn:yr.getArg(t,"column")},o=CA.search(i,this._sections,function(u,p){var m=u.generatedLine-p.generatedOffset.generatedLine;return m||u.generatedColumn-p.generatedOffset.generatedColumn}),c=this._sections[o];return c?c.consumer.originalPositionFor({line:i.generatedLine-(c.generatedOffset.generatedLine-1),column:i.generatedColumn-(c.generatedOffset.generatedLine===i.generatedLine?c.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}};_p.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})};_p.prototype.sourceContentFor=function(t,i){for(var o=0;o<this._sections.length;o++){var c=this._sections[o],u=c.consumer.sourceContentFor(t,!0);if(u)return u}if(i)return null;throw new Error('"'+t+'" is not in the SourceMap.')};_p.prototype.generatedPositionFor=function(t){for(var i=0;i<this._sections.length;i++){var o=this._sections[i];if(o.consumer._findSourceIndex(yr.getArg(t,"source"))!==-1){var c=o.consumer.generatedPositionFor(t);if(c){var u={line:c.line+(o.generatedOffset.generatedLine-1),column:c.column+(o.generatedOffset.generatedLine===c.line?o.generatedOffset.generatedColumn-1:0)};return u}}}return{line:null,column:null}};_p.prototype._parseMappings=function(t,i){this.__generatedMappings=[],this.__originalMappings=[];for(var o=0;o<this._sections.length;o++)for(var c=this._sections[o],u=c.consumer._generatedMappings,p=0;p<u.length;p++){var m=u[p],y=c.consumer._sources.at(m.source);y=yr.computeSourceURL(c.consumer.sourceRoot,y,this._sourceMapURL),this._sources.add(y),y=this._sources.indexOf(y);var x=null;m.name&&(x=c.consumer._names.at(m.name),this._names.add(x),x=this._names.indexOf(x));var h={source:y,generatedLine:m.generatedLine+(c.generatedOffset.generatedLine-1),generatedColumn:m.generatedColumn+(c.generatedOffset.generatedLine===m.generatedLine?c.generatedOffset.generatedColumn-1:0),originalLine:m.originalLine,originalColumn:m.originalColumn,name:x};this.__generatedMappings.push(h),typeof h.originalLine=="number"&&this.__originalMappings.push(h)}aC(this.__generatedMappings,yr.compareByGeneratedPositionsDeflated),aC(this.__originalMappings,yr.compareByOriginalPositions)};yP.IndexedSourceMapConsumer=_p});var oJ=Au(iJ=>{var cY=SA().SourceMapGenerator,TP=r_(),lY=/(\r?\n)/,uY=10,o_="$$$isSourceNode$$$";function $u(e,t,i,o,c){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=i??null,this.name=c??null,this[o_]=!0,o!=null&&this.add(o)}$u.fromStringWithSourceMap=function(t,i,o){var c=new $u,u=t.split(lY),p=0,m=function(){var P=R(),v=R()||"";return P+v;function R(){return p<u.length?u[p++]:void 0}},y=1,x=0,h=null;return i.eachMapping(function(P){if(h!==null)if(y<P.generatedLine)b(h,m()),y++,x=0;else{var v=u[p]||"",R=v.substr(0,P.generatedColumn-x);u[p]=v.substr(P.generatedColumn-x),x=P.generatedColumn,b(h,R),h=P;return}for(;y<P.generatedLine;)c.add(m()),y++;if(x<P.generatedColumn){var v=u[p]||"";c.add(v.substr(0,P.generatedColumn)),u[p]=v.substr(P.generatedColumn),x=P.generatedColumn}h=P},this),p<u.length&&(h&&b(h,m()),c.add(u.splice(p).join(""))),i.sources.forEach(function(P){var v=i.sourceContentFor(P);v!=null&&(o!=null&&(P=TP.join(o,P)),c.setSourceContent(P,v))}),c;function b(P,v){if(P===null||P.source===void 0)c.add(v);else{var R=o?TP.join(o,P.source):P.source;c.add(new $u(P.originalLine,P.originalColumn,R,v,P.name))}}};$u.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(i){this.add(i)},this);else if(t[o_]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};$u.prototype.prepend=function(t){if(Array.isArray(t))for(var i=t.length-1;i>=0;i--)this.prepend(t[i]);else if(t[o_]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};$u.prototype.walk=function(t){for(var i,o=0,c=this.children.length;o<c;o++)i=this.children[o],i[o_]?i.walk(t):i!==""&&t(i,{source:this.source,line:this.line,column:this.column,name:this.name})};$u.prototype.join=function(t){var i,o,c=this.children.length;if(c>0){for(i=[],o=0;o<c-1;o++)i.push(this.children[o]),i.push(t);i.push(this.children[o]),this.children=i}return this};$u.prototype.replaceRight=function(t,i){var o=this.children[this.children.length-1];return o[o_]?o.replaceRight(t,i):typeof o=="string"?this.children[this.children.length-1]=o.replace(t,i):this.children.push("".replace(t,i)),this};$u.prototype.setSourceContent=function(t,i){this.sourceContents[TP.toSetString(t)]=i};$u.prototype.walkSourceContents=function(t){for(var i=0,o=this.children.length;i<o;i++)this.children[i][o_]&&this.children[i].walkSourceContents(t);for(var c=Object.keys(this.sourceContents),i=0,o=c.length;i<o;i++)t(TP.fromSetString(c[i]),this.sourceContents[c[i]])};$u.prototype.toString=function(){var t="";return this.walk(function(i){t+=i}),t};$u.prototype.toStringWithSourceMap=function(t){var i={code:"",line:1,column:0},o=new cY(t),c=!1,u=null,p=null,m=null,y=null;return this.walk(function(x,h){i.code+=x,h.source!==null&&h.line!==null&&h.column!==null?((u!==h.source||p!==h.line||m!==h.column||y!==h.name)&&o.addMapping({source:h.source,original:{line:h.line,column:h.column},generated:{line:i.line,column:i.column},name:h.name}),u=h.source,p=h.line,m=h.column,y=h.name,c=!0):c&&(o.addMapping({generated:{line:i.line,column:i.column}}),u=null,c=!1);for(var b=0,P=x.length;b<P;b++)x.charCodeAt(b)===uY?(i.line++,i.column=0,b+1===P?(u=null,c=!1):c&&o.addMapping({source:h.source,original:{line:h.line,column:h.column},generated:{line:i.line,column:i.column},name:h.name})):i.column++}),this.walkSourceContents(function(x,h){o.setSourceContent(x,h)}),{code:i.code,map:o}};iJ.SourceNode=$u});var aJ=Au(hP=>{hP.SourceMapGenerator=SA().SourceMapGenerator;hP.SourceMapConsumer=rJ().SourceMapConsumer;hP.SourceNode=oJ().SourceNode});var cJ=Au((MFe,sJ)=>{var dY=Object.prototype.toString,EA=typeof Buffer<"u"&&typeof Buffer.alloc=="function"&&typeof Buffer.allocUnsafe=="function"&&typeof Buffer.from=="function";function pY(e){return dY.call(e).slice(8,-1)==="ArrayBuffer"}function fY(e,t,i){t>>>=0;var o=e.byteLength-t;if(o<0)throw new RangeError("'offset' is out of bounds");if(i===void 0)i=o;else if(i>>>=0,i>o)throw new RangeError("'length' is out of bounds");return EA?Buffer.from(e.slice(t,t+i)):new Buffer(new Uint8Array(e.slice(t,t+i)))}function mY(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Buffer.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return EA?Buffer.from(e,t):new Buffer(e,t)}function gY(e,t,i){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return pY(e)?fY(e,t,i):typeof e=="string"?mY(e,t):EA?Buffer.from(e):new Buffer(e)}sJ.exports=gY});var gJ=Au(WT=>{var yY=aJ().SourceMapConsumer,NA=require("path"),Df;try{Df=require("fs"),(!Df.existsSync||!Df.readFileSync)&&(Df=null)}catch{}var TY=cJ(),lJ=!1,uJ=!1,DA=!1,sC="auto",UT={},cC={},hY=/^data:application\/json[^,]+base64,/,ey=[],ny=[];function kA(){return sC==="browser"?!0:sC==="node"?!1:typeof window<"u"&&typeof XMLHttpRequest=="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function SY(){return typeof process=="object"&&process!==null&&typeof process.on=="function"}function SP(e){return function(t){for(var i=0;i<e.length;i++){var o=e[i](t);if(o)return o}return null}}var vA=SP(ey);ey.push(function(e){if(e=e.trim(),/^file:/.test(e)&&(e=e.replace(/file:\/\/\/(\w:)?/,function(o,c){return c?"":"/"})),e in UT)return UT[e];var t="";try{if(Df)Df.existsSync(e)&&(t=Df.readFileSync(e,"utf8"));else{var i=new XMLHttpRequest;i.open("GET",e,!1),i.send(null),i.readyState===4&&i.status===200&&(t=i.responseText)}}catch{}return UT[e]=t});function PA(e,t){if(!e)return t;var i=NA.dirname(e),o=/^\w+:\/\/[^\/]*/.exec(i),c=o?o[0]:"",u=i.slice(c.length);return c&&/^\/\w\:/.test(u)?(c+="/",c+NA.resolve(i.slice(c.length),t).replace(/\\/g,"/")):c+NA.resolve(i.slice(c.length),t)}function _Y(e){var t;if(kA())try{var i=new XMLHttpRequest;i.open("GET",e,!1),i.send(null),t=i.readyState===4?i.responseText:null;var o=i.getResponseHeader("SourceMap")||i.getResponseHeader("X-SourceMap");if(o)return o}catch{}t=vA(e);for(var c=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg,u,p;p=c.exec(t);)u=p;return u?u[1]:null}var FA=SP(ny);ny.push(function(e){var t=_Y(e);if(!t)return null;var i;if(hY.test(t)){var o=t.slice(t.indexOf(",")+1);i=TY(o,"base64").toString(),t=e}else t=PA(e,t),i=vA(t);return i?{url:t,map:i}:null});function IA(e){var t=cC[e.source];if(!t){var i=FA(e.source);i?(t=cC[e.source]={url:i.url,map:new yY(i.map)},t.map.sourcesContent&&t.map.sources.forEach(function(c,u){var p=t.map.sourcesContent[u];if(p){var m=PA(t.url,c);UT[m]=p}})):t=cC[e.source]={url:null,map:null}}if(t&&t.map&&typeof t.map.originalPositionFor=="function"){var o=t.map.originalPositionFor(e);if(o.source!==null)return o.source=PA(t.url,o.source),o}return e}function pJ(e){var t=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(e);if(t){var i=IA({source:t[2],line:+t[3],column:t[4]-1});return"eval at "+t[1]+" ("+i.source+":"+i.line+":"+(i.column+1)+")"}return t=/^eval at ([^(]+) \((.+)\)$/.exec(e),t?"eval at "+t[1]+" ("+pJ(t[2])+")":e}function xY(){var e,t="";if(this.isNative())t="native";else{e=this.getScriptNameOrSourceURL(),!e&&this.isEval()&&(t=this.getEvalOrigin(),t+=", "),e?t+=e:t+="<anonymous>";var i=this.getLineNumber();if(i!=null){t+=":"+i;var o=this.getColumnNumber();o&&(t+=":"+o)}}var c="",u=this.getFunctionName(),p=!0,m=this.isConstructor(),y=!(this.isToplevel()||m);if(y){var x=this.getTypeName();x==="[object Object]"&&(x="null");var h=this.getMethodName();u?(x&&u.indexOf(x)!=0&&(c+=x+"."),c+=u,h&&u.indexOf("."+h)!=u.length-h.length-1&&(c+=" [as "+h+"]")):c+=x+"."+(h||"<anonymous>")}else m?c+="new "+(u||"<anonymous>"):u?c+=u:(c+=t,p=!1);return p&&(c+=" ("+t+")"),c}function dJ(e){var t={};return Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(function(i){t[i]=/^(?:is|get)/.test(i)?function(){return e[i].call(e)}:e[i]}),t.toString=xY,t}function fJ(e){if(e.isNative())return e;var t=e.getFileName()||e.getScriptNameOrSourceURL();if(t){var i=e.getLineNumber(),o=e.getColumnNumber()-1,c=62;i===1&&o>c&&!kA()&&!e.isEval()&&(o-=c);var u=IA({source:t,line:i,column:o});e=dJ(e);var p=e.getFunctionName;return e.getFunctionName=function(){return u.name||p()},e.getFileName=function(){return u.source},e.getLineNumber=function(){return u.line},e.getColumnNumber=function(){return u.column+1},e.getScriptNameOrSourceURL=function(){return u.source},e}var m=e.isEval()&&e.getEvalOrigin();return m&&(m=pJ(m),e=dJ(e),e.getEvalOrigin=function(){return m}),e}function bY(e,t){DA&&(UT={},cC={});var i=e.name||"Error",o=e.message||"",c=i+": "+o;return c+t.map(function(u){return` at `+fJ(u)}).join("")}function mJ(e){var t=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(t){var i=t[1],o=+t[2],c=+t[3],u=UT[i];if(!u&&Df&&Df.existsSync(i))try{u=Df.readFileSync(i,"utf8")}catch{u=""}if(u){var p=u.split(/(?:\r\n|\r|\n)/)[o-1];if(p)return i+":"+o+` `+p+` `+new Array(c).join(" ")+"^"}}return null}function CY(e){var t=mJ(e);process.stderr._handle&&process.stderr._handle.setBlocking&&process.stderr._handle.setBlocking(!0),t&&(console.error(),console.error(t)),console.error(e.stack),process.exit(1)}function EY(){var e=process.emit;process.emit=function(t){if(t==="uncaughtException"){var i=arguments[1]&&arguments[1].stack,o=this.listeners(t).length>0;if(i&&!o)return CY(arguments[1])}return e.apply(this,arguments)}}var NY=ey.slice(0),DY=ny.slice(0);WT.wrapCallSite=fJ;WT.getErrorSource=mJ;WT.mapSourcePosition=IA;WT.retrieveSourceMap=FA;WT.install=function(e){if(e=e||{},e.environment&&(sC=e.environment,["node","browser","auto"].indexOf(sC)===-1))throw new Error("environment "+sC+" was unknown. Available options are {auto, browser, node}");if(e.retrieveFile&&(e.overrideRetrieveFile&&(ey.length=0),ey.unshift(e.retrieveFile)),e.retrieveSourceMap&&(e.overrideRetrieveSourceMap&&(ny.length=0),ny.unshift(e.retrieveSourceMap)),e.hookRequire&&!kA()){var t;try{t=require("module")}catch{}var i=t.prototype._compile;i.__sourceMapSupport||(t.prototype._compile=function(c,u){return UT[u]=c,cC[u]=void 0,i.call(this,c,u)},t.prototype._compile.__sourceMapSupport=!0)}if(DA||(DA="emptyCacheBetweenOperations"in e?e.emptyCacheBetweenOperations:!1),lJ||(lJ=!0,Error.prepareStackTrace=bY),!uJ){var o="handleUncaughtExceptions"in e?e.handleUncaughtExceptions:!0;o&&SY()&&(uJ=!0,EY())}};WT.resetRetrieveHandlers=function(){ey.length=0,ny.length=0,ey=NY.slice(0),ny=DY.slice(0),FA=SP(ny),vA=SP(ey)}});var hM="1.1.18",SM="LPC";function Fc(e){let t;return()=>(e&&(t=e(),e=void 0),t)}function dg(e){let t=new Map;return i=>{let o=`${typeof i}:${i}`,c=t.get(o);return c===void 0&&!t.has(o)&&(c=e(i),t.set(o,c)),c}}function gi(e){return e}function yo(e,t,i,o){if(t===void 0||t.length===0)return e;if(e===void 0)return t.slice(i,o);i=i===void 0?0:_M(t,i),o=o===void 0?t.length:_M(t,o);for(let c=i;c<o&&c<t.length;c++)t[c]!==void 0&&e.push(t[c]);return e}function _M(e,t){return t<0?e.length+t:t}var Ee=[],Bh=new Map;function Ht(e){return e!==void 0?e.length:0}var ug=Object.prototype.hasOwnProperty;function Ea(e,t){return ug.call(e,t)}function EM(e,t){return e===t?0:e===void 0?-1:t===void 0?1:e<t?-1:1}function no(e,t){return EM(e,t)}function NH(e,t,i){t.sort((o,c)=>i(e[o],e[c])||no(o,c))}function yd(e,t){let i=PH(e);return NH(e,i,t),i.map(o=>e[o])}function DH(e,t){return t}function PH(e){return e.map(DH)}function co(e){return e===void 0||e.length===0?void 0:e[e.length-1]}function Sn(e,t){if(e!==void 0)if(t!==void 0){for(let i=0;i<e.length;i++)if(t(e[i]))return!0}else return e.length>0;return!1}function NM(e,t,i){for(let o=0;o<e.length;o++)t=Math.max(t,i(e[o]));return t}function MF(e,t,i){let o=[];A.assertEqual(e.length,t.length);for(let c=0;c<e.length;c++)o.push(i(e[c],t[c],c));return o}function $n(e,t){let i;if(e!==void 0){i=[];for(let o=0;o<e.length;o++)i.push(t(e[o],o))}return i}function lN(){return typeof process<"u"&&!!process.nextTick&&!process.browser&&typeof require<"u"}function $i(e){}function Ic(e,t,i){let o=e.length-t.length;return o>=0&&(i?Qd(e.slice(o),t):e.indexOf(t,o)===o)}function Qd(e,t){return e===t||e!==void 0&&t!==void 0&&e.toUpperCase()===t.toUpperCase()}function jh(e){return e?BF:wu}function wu(e,t){return EM(e,t)}function BF(e,t){return e===t?0:e===void 0?-1:t===void 0?1:(e=e.toUpperCase(),t=t.toUpperCase(),e<t?-1:e>t?1:0)}function pg(e,t){return om(e,t)}function om(e,t){return e===t}function Qa(e){return e?gi:fg}function kH(e){return e.toLowerCase()}var xM=/[^\u0130\u0131\u00DFa-z0-9\\/:\-_. ]+/g,bM=new Map;function fg(e){let t=bM.get(e);return t===void 0&&(t=xM.test(e)?e.replace(xM,kH):e,bM.set(e,t)),t}function to(e,t,i){return i?Qd(e.slice(0,t.length),t):e.lastIndexOf(t,0)===0}function Rn(e,t){if(e!==void 0)for(let i=0;i<e.length;i++){let o=t(e[i],i);if(o)return o}}function Ur(e,t,i=om){if(e!==void 0){for(let o=0;o<e.length;o++)if(i(e[o],t))return!0}return!1}function am(e,t,i){return e!==void 0?(Nl(e,t,i),e):[t]}function Nl(e,t,i){return Ur(e,t,i)?!1:(e.push(t),!0)}function Qc(e,t,i,o,c){if(e&&e.length>0){let u=e.length;if(u>0){let p=o===void 0||o<0?0:o,m=c===void 0||p+c>u-1?u-1:p+c,y;for(arguments.length<=2?(y=e[p],p++):y=i;p<=m;)y=t(y,e[p],p),p++;return y}}return i}function Yd(e,t,i,o,c){return Rx(e,i(t),i,o,c)}function Rx(e,t,i,o,c){if(!Sn(e))return-1;let u=c??0,p=e.length-1;for(;u<=p;){let m=u+(p-u>>1),y=i(e[m],m);switch(o(y,t)){case-1:u=m+1;break;case 0:return m;case 1:p=m-1;break}}return~u}function of(e,t,i,o,c){if(e.length===0)return e.push(t),!0;let u=Yd(e,t,gi,i);if(u<0){if(o&&!c){let p=~u;if(p>0&&o(t,e[p-1]))return!1;if(p<e.length&&o(t,e[p]))return e.splice(p,1,t),!0}return e.splice(~u,0,t),!0}return c?(e.splice(u,0,t),!0):!1}function ii(e){return Array.isArray(e)}function Yy(e,t){let i=[];if(e!==void 0)for(let o=0;o<e.length;o++){let c=t(e[o],o);c&&(ii(c)?yo(i,c):i.push(c))}return i}function wr(e,t){return t===void 0||t.length===0?e:e===void 0||e.length===0?t:[...e,...t]}function Jh(e){e.length=0}function lr(e,t,i){if(e!==void 0)for(let o=i??0;o<e.length;o++){let c=e[o];if(t(c,o))return c}}function mg(){}function gg(){return!1}function To(e){return typeof e=="string"}function DM(e,t,i){if(e!==void 0)for(let o=i??e.length-1;o>=0;o--){let c=e[o];if(t(c,o))return c}}function ui(e,t){let i=[];if(e!==void 0)for(let o=0;o<e.length;o++){let c=t(e[o],o);c!==void 0&&i.push(c)}return i}function qo(e,t){let i=[];for(let o of e)i.push(t?t(o):o);return i}function sm(e,t,i){let o=Math.max(2,Math.floor(e.length*.34)),c=Math.floor(e.length*.4)+1,u;for(let p of t){let m=i(p);if(m!==void 0&&Math.abs(m.length-e.length)<=o){if(m===e||m.length<3&&m.toLowerCase()!==e.toLowerCase())continue;let y=vH(e,m,c-.1);if(y===void 0)continue;A.assert(y<c),c=y,u=p}}return u}function vH(e,t,i){let o=new Array(t.length+1),c=new Array(t.length+1),u=i+.01;for(let m=0;m<=t.length;m++)o[m]=m;for(let m=1;m<=e.length;m++){let y=e.charCodeAt(m-1),x=Math.ceil(m>i?m-i:1),h=Math.floor(t.length>i+m?i+m:t.length);c[0]=m;let b=m;for(let v=1;v<x;v++)c[v]=u;for(let v=x;v<=h;v++){let R=e[m-1].toLowerCase()===t[v-1].toLowerCase()?o[v-1]+.1:o[v-1]+2,T=y===t.charCodeAt(v-1)?o[v-1]:Math.min(o[v]+1,c[v-1]+1,R);c[v]=T,b=Math.min(b,T)}for(let v=h+1;v<=t.length;v++)c[v]=u;if(b>i)return;let P=o;o=c,c=P}let p=o[t.length];return p>i?void 0:p}function qr(e,t){if(e!==void 0){for(let i=0;i<e.length;i++)if(!t(e[i],i))return!1}return!0}function Co(e,t){let i;if(e!==void 0)for(let o=0;o<e.length;o++){let c=t(e[o],o);c&&(ii(c)?i=yo(i,c):i=Er(i,c))}return i??Ee}function Er(e,t){return t===void 0?e:e===void 0?[t]:(e.push(t),e)}function ho(e,t){return e!==void 0&&t(e)?e:void 0}function So(e){return A.assert(e.length!==0),e[0]}function Ma(e,t){return e!==void 0&&t(e)?e:A.fail(`Invalid cast. The supplied value ${e} did not pass the test '${A.getFunctionName(t)}'.`)}function Na(e,t){if(e!==void 0)for(let i=0;i<e.length;i++){let o=e[i],c=t(o,i);if(o!==c){let u=e.slice(0,i);for(u.push(c),i++;i<e.length;i++)u.push(t(e[i],i));return u}}return e}function oa(e){return e===void 0||e.length===0?void 0:e[0]}function Td(e,t,i=om){if(e===void 0||t===void 0)return e===t;if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(!i(e[o],t[o],o))return!1;return!0}function zs(){let e=new Map;return e.add=FH,e.remove=IH,e}function FH(e,t){let i=this.get(e);return i!==void 0?i.push(t):this.set(e,i=[t]),i}function IH(e,t){let i=this.get(e);i!==void 0&&(Mx(i,t),i.length||this.delete(e))}function Mx(e,t){return LH(e,i=>i===t)}function LH(e,t){for(let i=0;i<e.length;i++)if(t(e[i]))return AH(e,i),!0;return!1}function AH(e,t){e[t]=e[e.length-1],e.pop()}function Xy(e){return e===void 0?void 0:[e]}function hd(e,t){return t?.bind(e)}function uN(e,t){for(let i=0;i<e.length;i++)if(e[i]===t)return cm(e,i),!0;return!1}function cm(e,t){for(let i=t;i<e.length-1;i++)e[i]=e[i+1];e.pop()}function PM(e,t,i,o,c,u){u??(u=$i);let p=0,m=0,y=e.length,x=t.length,h=!1;for(;p<y&&m<x;){let b=e[p],P=t[m],v=i(b,P);v===-1?(o(b),p++,h=!0):v===1?(c(P),m++,h=!0):(u(P,b),p++,m++)}for(;p<y;)o(e[p++]),h=!0;for(;m<x;)c(t[m++]),h=!0;return h}function dN(e){let t=[];for(let i in e)ug.call(e,i)&&t.push(i);return t}function yg(e,t){return Ic(e,t)?e.slice(0,e.length-t.length):e}function jF(e,t){return to(e,t)?e.substr(t.length):e}function Bx(e,t,i){if(e.has(t))return e.get(t);let o=i();return e.set(t,o),o}function vr(e,t){if(e!==void 0){let i=e.length,o=0;for(;o<i&&t(e[o]);)o++;if(o<i){let c=e.slice(0,o);for(o++;o<i;){let u=e[o];t(u)&&c.push(u),o++}return c}}return e}function Uh(...e){return(...t)=>{let i;for(let o of e)if(i=o(...t),i)return i;return i}}function Lo(e){return A.assert(e.length!==0),e[e.length-1]}function Ya(e,t){if(e!==void 0)for(let i=0;i<e.length;i++){let o=t(e[i],i);if(o!==void 0)return o}}function Zy(e){return e!==void 0&&e.length===1?e[0]:void 0}function Sd(e,t){let i=0;if(e!==void 0)for(let o=0;o<e.length;o++){let c=e[o];t(c,o)&&i++}return i}function Xd(){throw new Error("Not implemented")}function uc(e,t,i){if(e===void 0)return-1;for(let o=i??0;o<e.length;o++)if(t(e[o],o))return o;return-1}function JF(e,t,i,o){for(;i<o;){if(e[i]!==t[i])return!1;i++}return!0}function Ou(e){let t=[];for(let i=0;i<e.length;i++){let o=e[i];o&&(ii(o)?yo(t,o):t.push(o))}return t}function kM(e,t,i){for(let o=i??0;o<e.length;o++)if(Ur(t,e.charCodeAt(o)))return o;return-1}function pN(e,t){return e.length===0?e:e.slice().sort(t)}function jx(e,t){return e.has(t)?!1:(e.add(t),!0)}function wH(e,t){if(e.length===0)return Ee;let i=e[0],o=[i];for(let c=1;c<e.length;c++){let u=e[c];switch(t(u,i)){case!0:case 0:continue;case-1:return A.fail("Array is unsorted.")}o.push(i=u)}return o}function fN(e,t,i){return wH(pN(e,t),i||t||wu)}function vM(e,t,i=om){if(e===t)return!0;if(!e||!t)return!1;for(let o in e)if(ug.call(e,o)&&(!ug.call(t,o)||!i(e[o],t[o])))return!1;for(let o in t)if(ug.call(t,o)&&!ug.call(e,o))return!1;return!0}var OH=(()=>{return t;function e(i,o,c){if(i===o)return 0;if(i===void 0)return-1;if(o===void 0)return 1;let u=c(i,o);return u<0?-1:u>0?1:0}function t(i){let o=new Intl.Collator(i,{usage:"sort",sensitivity:"variant",numeric:!0}).compare;return(c,u)=>e(c,u,o)}})(),CM,FM;function IM(){return FM}function mN(e,t){return(CM||(CM=OH(FM)))(e,t)}function gN(e,t,i=om){return e.length===t.length&&e.every((o,c)=>i(o,t[c]))}function yN(e,t){if(e.length<=1)return e;let i=[];for(let o=0,c=e.length;o<c;o++)o&&i.push(t),i.push(e[o]);return i}function Jx(e,t,i){if(e===void 0)return-1;for(let o=i??e.length-1;o>=0;o--)if(t(e[o],o))return o;return-1}function RH(e,t,i=gi){let o=zs();for(let c of e)o.add(t(c),i(c));return o}function LM(e,t,i=gi){return qo(RH(e,t).values(),i)}function UF(e,t){return no(e?.start,t?.start)||no(e?.length,t?.length)}function Wh(){return[]}function AM(e,t,i=gi){let o=new Map;for(let c of e){let u=t(c);u!==void 0&&o.set(u,i(c))}return o}function Ux(e,...t){for(let i of t)if(i!==void 0)for(let o in i)Ea(i,o)&&(e[o]=i[o]);return e}function WF(e){return ii(e)?e:[e]}function wM(e,t){let i={};for(let o in t)ug.call(t,o)&&(i[o]=t[o]);for(let o in e)ug.call(e,o)&&(i[o]=e[o]);return i}function OM(e){if(e)for(let t of e)return t}function RM(e,t){let i=new Array(e);for(let o=0;o<e;o++)i[o]=t(o);return i}function MM(e){let t=[];return BM(e,t,void 0,0),t}function BM(e,t,i,o){for(let c of e[o]){let u;i?(u=i.slice(),u.push(c)):u=[c],o===e.length-1?t.push(u):BM(e,t,u,o+1)}}function jM(e,t,i){let o=e.slice(0);return o[t]=i,o}function JM(e,t,i){let o;for(let c=0;c<e.length;c++)t(e[c])?o=o===void 0?c:o:o!==void 0&&(i(o,c),o=void 0);o!==void 0&&i(o,e.length)}function UM(e,t,i){let o=i;if(e){let c=0;for(let u of e)o=t(o,u,c),c++}return o}function MH(){if(lN())try{let{performance:e}=require("perf_hooks");return{shouldWriteNativeEvents:!1,performance:e}}catch{}if(typeof performance=="object")return{shouldWriteNativeEvents:!0,performance}}function BH(){let e=MH();if(!e)return;let{shouldWriteNativeEvents:t,performance:i}=e,o={shouldWriteNativeEvents:t,performance:void 0,performanceTime:void 0};return typeof i.timeOrigin=="number"&&typeof i.now=="function"&&(o.performanceTime=i),o.performanceTime&&typeof i.mark=="function"&&typeof i.measure=="function"&&typeof i.clearMarks=="function"&&typeof i.clearMeasures=="function"&&(o.performance=i),o}var KM=BH(),WM=KM?.performanceTime;function VM(){return KM}var lo=WM?()=>WM.now()??Date.now():Date.now;var TN;try{let e=process.env.TS_ETW_MODULE_PATH??"./node_modules/@microsoft/typescript-etw";TN=require(e)}catch{TN=void 0}var Wx=TN?.logEvent?TN:void 0;var A;(Di=>{let e=!1,t=0;Di.currentLogLevel=2,Di.isDebugging=!1;let u;function p(Ge){e&&(typeof Object.setPrototypeOf=="function"?(u||(u=Object.create(Array.prototype),y(u)),Object.setPrototypeOf(Ge,u)):y(Ge))}Di.attachNodeArrayDebugInfo=p;function m(Ge){let Qn=Ge&7,qn=Qn===0?"in out":Qn===3?"[bivariant]":Qn===2?"in":Qn===1?"out":Qn===4?"[independent]":"";return Ge&8?qn+=" (unmeasurable)":Ge&16&&(qn+=" (unreliable)"),qn}Di.formatVariance=m;function y(Ge){"__lpcDebuggerDisplay"in Ge||Object.defineProperties(Ge,{__lpcDebuggerDisplay:{value(Qn){return Qn=String(Qn).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/,"]"),`NodeArray ${Qn}`}}})}function x(Ge){return R(Ge,SN,!0)}Di.formatNodeCheckFlags=x;function h(Ge,Qn){debugger;let qn=new Error(Ge?`Debug Failure. ${Ge}`:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(qn,Qn||h),qn}Di.fail=h;function b(Ge,Qn,qn,$t){Ge>=Qn&&h(`Expected ${Ge} < ${Qn}. ${qn||""}`,$t||b)}Di.assertLessThan=b;function P(Ge,Qn,qn){Ge==null&&h(Qn,qn||P)}Di.assertIsDefined=P;function v(Ge,Qn,qn){return h(`${Qn||"Unexpected node."}\r Node ${Se(Ge.kind)} was unexpected.`,qn||v)}Di.failBadSyntaxKind=v;function R(Ge=0,Qn,qn){let $t=Y(Qn);if(Ge===0)return $t.length>0&&$t[0][0]===0?$t[0][1]:"0";if(qn){let zr=[],Bt=Ge;for(let[Pi,ye]of $t){if(Pi>Ge)break;Pi!==0&&Pi&Ge&&(zr.push(ye),Bt&=~Pi)}if(Bt===0)return zr.join("|")}else for(let[zr,Bt]of $t)if(zr===Ge)return Bt;return Ge.toString()}Di.formatEnum=R;let T=new Map;function Y(Ge){let Qn=T.get(Ge);if(Qn)return Qn;let qn=[];for(let zr in Ge){let Bt=Ge[zr];typeof Bt=="number"&&qn.push([Bt,zr])}let $t=yd(qn,(zr,Bt)=>no(zr[0],Bt[0]));return T.set(Ge,$t),$t}function M(Ge){return R(Ge,Lc,!0)}Di.formatSymbolFlags=M;function le(Ge){return R(Ge,eT,!0)}Di.formatObjectFlags=le;function Te(Ge){return R(Ge,hN,!0)}Di.formatSignatureFlags=Te;function H(Ge){return R(Ge,af,!0)}Di.formatTypeFlags=H;function te(Ge,Qn,qn){for(let $t of Ge)P($t,Qn,qn||te)}Di.assertEachIsDefined=te;function Fe(Ge,Qn,qn){return te(Ge,Qn,qn||Fe),Ge}Di.checkEachDefined=Fe;function Ye(){if(e)return;let Ge=new WeakMap,Qn=new WeakMap;Object.defineProperties(Wo.getSymbolConstructor().prototype,{__lpcDebuggerDisplay:{value(){let $t=this.flags&33554432?"TransientSymbol":"Symbol",zr=this.flags&-33554433;return`${$t} '${Xa(this)}'${zr?` (${M(zr)})`:""}`}},__debugFlags:{get(){return M(this.flags)}}}),Object.defineProperties(Wo.getTypeConstructor().prototype,{__lpcDebuggerDisplay:{value(){let $t=this.flags&98304?"NullableType":this.flags&384?`LiteralType ${JSON.stringify(this.value)}`:this.flags&1048576?"UnionType":this.flags&4194304?"IndexType":this.flags&8388608?"IndexedAccessType":this.flags&16777216?"ConditionalType":this.flags&33554432?"SubstitutionType":this.flags&262144?"TypeParameter":this.flags&524288?this.objectFlags&3?"InterfaceType":this.objectFlags&4?"TypeReference":this.objectFlags&8?"TupleType":this.objectFlags&16?"AnonymousType":this.objectFlags&32?"MappedType":this.objectFlags&1024?"ReverseMappedType":this.objectFlags&256?"EvolvingArrayType":"ObjectType":"Type",zr=this.flags&524288?this.objectFlags&-1344:0;return`${$t}${this.symbol?` '${Xa(this.symbol)}'`:""}${zr?` (${le(zr)})`:""}`}},__debugFlags:{get(){return H(this.flags)}},__debugObjectFlags:{get(){return this.flags&524288?le(this.objectFlags):""}},__debugTypeToString:{value(){let $t=Ge.get(this);return $t===void 0&&($t=this.checker.typeToString(this),Ge.set(this,$t)),$t}}}),Object.defineProperties(Wo.getSignatureConstructor().prototype,{__debugFlags:{get(){return Te(this.flags)}},__debugSignatureToString:{value(){return this.checker?.signatureToString(this)}}});let qn=[Wo.getNodeConstructor(),Wo.getIdentifierConstructor(),Wo.getTokenConstructor(),Wo.getSourceFileConstructor()];for(let $t of qn)Ea($t.prototype,"__debugKind")||Object.defineProperties($t.prototype,{__lpcDebuggerDisplay:{value(){return`${sn(this)?`Identifier '${Oo(this)}'`:oi(this)?`StringLiteral ${JSON.stringify(this.text.length<10?this.text:this.text.slice(10)+"...")}`:nu(this)?`NumericLiteral ${this.text}`:Tg(this)?`FloatLiteral ${this.text}`:Bi(this)?"ParameterDeclaration":tu(this)?"ArrayTypeNode":zh(this)?"UnionTypeNode":qh(this)?"ParenthesizedTypeNode":lm(this)?"IndexedAccessTypeNode":Ac(this)?"LiteralTypeNode":Se(this.kind)}${this.flags?` (${oe(this.flags)})`:""}`}},__debugKind:{get(){return Se(this.kind)}},__debugNodeFlags:{get(){return oe(this.flags)}},__debugModifierFlags:{get(){return Ne(zM(this))}},__debugIsParseTreeNode:{get(){return Vh(this)}},__debugGetText:{value(zr){if(Si(this))return"";let Bt=Qn.get(this);if(Bt