MCPcopy Create free account
hub / github.com/Make-md/makemd / getFileCacheTypeByRefString

Method getFileCacheTypeByRefString

main.js:43–43  ·  view source on GitHub ↗
(t,r)

Source from the content-addressed store, hash-verified

41`))}),this._exrule.forEach(function(n){r=r.concat(n.toString().split(`
42`).map(function(i){return i.replace(/^RRULE:/,"EXRULE:")}).filter(function(i){return!/^DTSTART/.test(i)}))}),this._rdate.length&&r.push(fde("RDATE",this._rdate,this.tzid())),this._exdate.length&&r.push(fde("EXDATE",this._exdate,this.tzid())),r},t.prototype.toString=function(){return this.valueOf().join(`
43`)},t.prototype.clone=function(){var r=new t(!!this._cache);return this._rrule.forEach(function(n){return r.rrule(n.clone())}),this._exrule.forEach(function(n){return r.exrule(n.clone())}),this._rdate.forEach(function(n){return r.rdate(new Date(n.getTime()))}),this._exdate.forEach(function(n){return r.exdate(new Date(n.getTime()))}),r},t}(dr);function ude(e,t){if(!(e instanceof dr))throw new TypeError(String(e)+" is not RRule instance");di(t.map(String),String(e))||t.push(e)}function cde(e,t){if(!(e instanceof Date))throw new TypeError(String(e)+" is not Date instance");di(t.map(Number),Number(e))||(t.push(e),t0(t))}function fde(e,t,r){var n=!r||r.toUpperCase()==="UTC",i=n?"".concat(e,":"):"".concat(e,";TZID=").concat(r,":"),a=t.map(function(o){return HS(o.valueOf(),n)}).join(",");return"".concat(i).concat(a)}var iu=e=>e instanceof Date&&!isNaN(e),Nl="yyyy-MM-dd'T'HH:mm:ss",Kr=(e,t,r)=>{let n;try{let i=t.getHours()>0||t.getMinutes()>0||t.getSeconds()>0;n=_o(t,r?.length>0?r:i?`${e.defaultDateFormat} ${e.defaultTimeFormat}`:e.defaultDateFormat)}catch{n=""}return n},Xi=e=>{if(!e)return null;if((0,QS.isFinite)(e))return new Date(e);if((0,QS.isString)(e)){if(/^\d{4}-\d{2}-\d{2}$/.test(e)){let[t,r,n]=e.split("-").map(Number);return new Date(t,r-1,n)}return Jj(e)}return(0,QS.isDate)(e)?e:null},cP=e=>{if(e=="DAILY")return dr.DAILY;if(e=="WEEKLY")return dr.WEEKLY;if(e=="MONTHLY")return dr.MONTHLY;if(e=="YEARLY")return dr.YEARLY;if(e=="HOURLY")return dr.HOURLY},YS=e=>{if(e=="SU")return 6;if(e=="MO")return 0;if(e=="TU")return 1;if(e=="WE")return 2;if(e=="TH")return 3;if(e=="FR")return 4;if(e=="SA")return 5};var pde=(e,t)=>Mr(t?.rows.reduce((r,n)=>(0,dde.isString)(n[e])?[...r,...Rt(n[e])]:[...r],[])??[]),XS=(e,t)=>{let r=[...e.getSpaceItems(t.path)];return{...kfe(t),rows:r.map(n=>({[ut]:n.path,Created:Kr(e.settings,Xi(n.metadata?.ctime),"yyyy-MM-dd")}))}},KS=(e,t,r)=>r?{...e,rows:TS(e.rows,r,t)}:{...e,rows:[...e.rows,t]},mde=async(e,t,r)=>{let n=Lj(t,e.settings);await e.spaceManager.pathExists(n)?e.spaceManager.renamePath(n,efe(n)+"/"+r):Zb(e,n),e.onTagRenamed(t,r)};var ex=(e,t)=>{if(!e)return"";if(e==="mk-core://settings")return"Settings";let r=t.spaceManager.uriByString(e);if(r.refType){if(r.refType=="context"){let n=t.contextsIndex.get(r.basePath)?.schemas.find(a=>a.id==r.ref),i=t.spacesIndex.get(r.basePath);return n&&i?`${i.name} / ${n.name}`:""}return r.refType=="action"?t.actionsIndex.get(r.basePath)?.find(n=>n.schema.id==r.ref)?.schema.name:r.ref}return t.pathsIndex.get(r.basePath)?.name||e},Gv=e=>qj(e.substring(e.lastIndexOf("/")))||e,hde=e=>{let t=[],r=e.split("/"),n="";for(let i=0;i<r.length;i++)n+=`${i===0?"":"/"}`+r[i],n!=e&&t.push(n);return t},wd=e=>e.lastIndexOf("/")!=-1?e.lastIndexOf(".")!=-1?qj(e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("."))):e.substring(e.lastIndexOf("/")+1):e.lastIndexOf(".")!=-1?e.substring(0,e.lastIndexOf(".")):e,JS=e=>e.substring(0,e.lastIndexOf("."))||e,Rc=e=>{let t=e.lastIndexOf("/");return t==-1?"/":e.substring(0,t+1)};var VQ=async(e,t,r)=>{let n=AKe(e,t),i=Rm(GQ(r)),a=e.spaceManager.pathsForTag(t);for(let o of a)e.spaceManager.renameTag(o,t,i);await mde(e,t,i);for(let o of n)await VQ(e,o,o.replace(t,i));return i},gde=e=>{e.startsWith("#")&&(e=e.slice(1));let t=e.split("/"),r=[];for(let n=0;n<t.length-1;n++)n===0?r.push(t[n]):r.push(r[n-1]+"/"+t[n]);return r},GQ=e=>e.trim(),AKe=(e,t)=>e.spaceManager.readTags().filter(n=>n.startsWith(t)&&n!=t),fP=e=>yT(Rm(e)),dP=e=>wd(e).replace(/\+/g,"/"),Rm=e=>{if(!e)return null;let t=e;return t.charAt(0)!="#"&&(t="#"+t),t.toLowerCase()},au=e=>e.charAt(0)=="#"?e.charAt(1)=="#"?e.substring(2,e.length):e.substring(1,e.length):e;var qm=(e,t,r)=>{if(!t||!e||e.indexOf("http")==0)return e;if(e.indexOf("|")!=-1&&(e=e.split("|")[0]),e.indexOf("./")==0&&t)return r?.(t)?t+e.slice(1):t.slice(0,t.lastIndexOf("/"))+e.slice(1);if(e.indexOf("../")==0&&t){let n=t.split("/"),i=e.split("/");for(n.pop();i[0]==="..";)n.pop(),i.shift();return[...n,...i].join("/")}return e},ZS=async(e,t,r)=>{if(e.spacesIndex.has(t)){let n=e.spacesIndex.get(t);return n.type=="tag"?VQ(e,n.name,r):e.spaceManager.renameSpace(t,Wce(t,r))}else return e.spaceManager.renamePath(t,Qce(t,r))},pP=async(e,t)=>{e.settings.hiddenFiles=Mr([...e.settings.hiddenFiles,t]),e.ui.notify("Item is now hidden in the Navigator, you can manage hidden items in the Navigator menu."),e.saveSettings(),e.reloadPath(t,!0).then(r=>e.dispatchEvent("superstateUpdated",null))},Ade=async(e,t)=>{e.settings.hiddenFiles=Mr([...e.settings.hiddenFiles,...t]),e.saveSettings(),Promise.all(t.map(r=>{e.reloadPath(r,!0)})).then(r=>e.dispatchEvent("superstateUpdated",null))},Zb=async(e,t)=>{e.spaceManager.deletePath(t),e.onPathDeleted(t)},vde=async(e,t,r)=>e.spaceManager.renamePath(t,Jh(t,r)),mP=async(e,t,r)=>{let n=e.pathsIndex.get(t);if(!n)return;let i=n.parent+"/"+n.name;await e.spaceManager.createSpace(n.name,n.parent,{}),await e.spaceManager.renamePath(t,i+"/"+n.metadata?.file?.name+".md"),e.ui.viewsByPath(t).forEach(a=>{a.openPath(i)}),r&&e.ui.openPath(i,!1)};var i0=(e,t)=>JSON.stringify({...t,options:e.map(r=>({name:r.name,value:r.value,color:r.color}))});var Wv="spaces://$",Qv="spaces://$tags";var RT=class{constructor(){this.spaceAdapters=[];this.readSystemCommands=()=>this.primarySpaceAdapter.readSystemCommands();this.saveSystemCommand=(t,r)=>this.primarySpaceAdapter.saveSystemCommand(t,r).then(n=>this.superstate.reloadSystemActions());this.getPathState=t=>this.superstate.pathsIndex.get(t);this.getPathsIndexMap=()=>this.superstate.pathsIndex;this.getContextsIndexMap=()=>this.superstate.contextsIndex;this.onFocusesUpdated=()=>{this.readFocuses().then(t=>{this.superstate.focuses=t,this.superstate.dispatchEvent("focusesChanged",null)})};this.onPathCreated=async t=>{this.superstate.onPathCreated(t)};this.onPathDeleted=async t=>{this.superstate.onPathDeleted(t)};this.onPathChanged=async(t,r)=>{this.superstate.onPathRename(r,t)};this.onSpaceCreated=async t=>{let r=await this.superstate.reloadSpace(this.spaceInfoForPath(t),null,!0);await this.superstate.onSpaceDefinitionChanged(r),await this.superstate.onPathCreated(t),await this.superstate.reloadContextByPath(t,{calculate:!0,force:!0})};this.onSpaceRenamed=async(t,r)=>{await this.superstate.onSpaceRenamed(r,this.spaceInfoForPath(t)),await this.superstate.onPathRename(r,t)};this.onSpaceDeleted=async t=>{this.superstate.onSpaceDeleted(t),this.superstate.onPathDeleted(t)};this.onPathPropertyChanged=async t=>{this.superstate.onMetadataChange(t)};this.spaceTypeByString=t=>t.fullPath.startsWith(Wv)?"default":t.scheme=="space"?"folder":t.authority?.charAt(0)=="#"?"tag":t.path.charAt(t.path.length-1)=="/"&&t.path=="/"?"vault":"folder"}onSpaceUpdated(t,r){!this.superstate.spacesIndex.has(t)||(r=="context"&&this.superstate.reloadContextByPath(t),r=="frame"&&this.superstate.dispatchEvent("frameStateUpdated",{path:t}),r=="action"&&this.superstate.reloadActions(this.spaceInfoForPath(t)))}saveFrameKit(t,r){return this.primarySpaceAdapter.saveFrameKit(t,r)}saveSpaceTemplate(t,r){return this.primarySpaceAdapter.saveSpaceTemplate(t,r)}resolvePath(t,r){let n=qm(t,r,i=>this.superstate.spacesIndex.has(i));return n!==t?n:this.superstate.pathsIndex.has(t)?t:this.primarySpaceAdapter.resolvePath(t,r)??t}uriByString(t,r){return!t||r&&(t=this.resolvePath(t,r),!t)?null:Ds(t)}async allCaches(){let t=new Map,r=this.primarySpaceAdapter.allCaches().keys();for(let n of r){let i=await this.readPathCache(n);t.set(n,i)}return t}keysForCacheType(t){return this.primarySpaceAdapter.keysForCacheType(t)}pathExists(t){return this.primarySpaceAdapter.pathExists(t)}addSpaceAdapter(t,r){t.initiateAdapter(this),r&&(this.primarySpaceAdapter=t),this.spaceAdapters.push(t)}adapterForPath(t){let r=this.uriByString(t);return r?this.spaceAdapters.find(n=>n.schemes.includes(r.scheme))??this.primarySpaceAdapter:this.primarySpaceAdapter}createSpace(t,r,n){return this.adapterForPath(r).createSpace(t,r,n)}saveSpace(t,r,n){return this.adapterForPath(t).saveSpace(t,r,n)}renameSpace(t,r){return this.adapterForPath(t).renameSpace(t,r)}deleteSpace(t){return this.adapterForPath(t).deleteSpace(t)}loadPath(t){return this.adapterForPath(t).loadPath(t)}childrenForSpace(t){return this.adapterForPath(t).childrenForSpace(t)}contextForSpace(t){return this.adapterForPath(t).contextForSpace(t)}async tablesForSpace(t){return this.adapterForPath(t).tablesForSpace(t)}spaceInitiated(t){return this.adapterForPath(t).spaceInitiated(t)}contextInitiated(t){return this.adapterForPath(t).contextInitiated(t)}readTable(t,r){return this.adapterForPath(t).readTable(t,r)}createTable(t,r){return this.adapterForPath(t).createTable(t,r).then(n=>this.superstate.reloadContextByPath(t,{force:!0,calculate:!0}))}saveTableSchema(t,r,n){return this.adapterForPath(t).saveTableSchema(t,r,n).then(i=>i&&this.superstate.reloadContextByPath(t,{force:!0,calculate:!0}))}saveTable(t,r,n){return this.adapterForPath(t).saveTable(t,r,n)}deleteTable(t,r){return this.adapterForPath(t).deleteTable(t,r).then(n=>this.superstate.reloadContextByPath(t,{force:!0,calculate:!0}))}readAllKits(){return this.primarySpaceAdapter.readAllKits()}readAllTemplates(){return this.primarySpaceAdapter.readAllTemplates()}readAllTables(t){return this.adapterForPath(t).readAllTables(t)}framesForSpace(t){return this.adapterForPath(t).framesForSpace(t)}readFrame(t,r){return this.adapterForPath(t).readFrame(t,r)}readAllFrames(t){return this.adapterForPath(t).readAllFrames(t)}createFrame(t,r){return this.adapterForPath(t).createFrame(t,r).then(n=>this.superstate.dispatchEvent("frameStateUpdated",{path:this.spaceInfoForPath(t).path,schemaId:r.id}))}deleteFrame(t,r){return this.adapterForPath(t).deleteFrame(t,r)}saveFrameSchema(t,r,n){return this.adapterForPath(t).saveFrameSchema(t,r,n).then(i=>this.superstate.dispatchEvent("frameStateUpdated",{path:this.spaceInfoForPath(t).path,schemaId:r}))}saveFrame(t,r){return this.adapterForPath(t).saveFrame(t,r).then(n=>this.superstate.dispatchEvent("frameStateUpdated",{path:this.spaceInfoForPath(t).path,schemaId:r.schema.id}))}commandsForSpace(t){return this.adapterForPath(t).commandsForSpace(t)}runCommand(t,r,n){return this.adapterForPath(t).runCommand(t,r,n)}createCommand(t,r){return this.adapterForPath(t).createCommand(t,r).then(n=>this.superstate.reloadActions(this.spaceInfoForPath(t)))}deleteCommand(t,r){return this.adapterForPath(t).deleteCommand(t,r).then(n=>this.superstate.reloadActions(this.spaceInfoForPath(t)))}saveCommand(t,r,n){return this.adapterForPath(t).saveCommand(t,r,n).then(i=>this.superstate.reloadActions(this.spaceInfoForPath(t)))}allPaths(t){return this.spaceAdapters.flatMap(r=>r.allPaths(t))}createItemAtPath(t,r,n,i){return this.adapterForPath(t).createItemAtPath(t,r,n,i)}renamePath(t,r){return this.adapterForPath(t).renamePath(t,r)}copyPath(t,r,n){return this.adapterForPath(t).copyPath(t,r,n)}getPathInfo(t){return this.adapterForPath(t).getPathInfo(t)}deletePath(t){return this.adapterForPath(t).deletePath(t)}readPath(t){return this.adapterForPath(t).readPath(t)}writeToPath(t,r,n){return this.adapterForPath(t).writeToPath(t,r,n)}parentPathForPath(t){return this.adapterForPath(t).parentPathForPath(t)}async readPathCache(t){let r=await this.adapterForPath(t).readPathCache(t);if(r&&r.type=="space"){let n=await this.adapterForPath(t).pathExists(this.spaceInfoForPath(t).notePath);if(!this.superstate.settings.enableFolderNote||!n){let i=this.spaceInfoForPath(t).defPath;r.label={...r.label,...await this.readLabel(i)},r.property=await this.readProperties(i)}}return r}allSpaces(t){return this.primarySpaceAdapter.allSpaces(t)}spaceInfoForPath(t){return this.adapterForPath(t).spaceInfoForPath(t)}spaceDefForSpace(t){return this.adapterForPath(t).spaceDefForSpace(t)}readLabel(t){return this.adapterForPath(t).readLabel(t)}saveLabel(t,r,n){return this.adapterForPath(t).saveLabel(t,r,n)}addProperty(t,r){return this.adapterForPath(t).addProperty(t,r)}saveProperties(t,r){if(!!t)return this.adapterForPath(t).saveProperties(t,r)}readProperties(t){return this.adapterForPath(t).readProperties(t)}renameProperty(t,r,n){return this.adapterForPath(t).renameProperty(t,r,n)}deleteProperty(t,r){return this.adapterForPath(t).deleteProperty(t,r)}addSpaceProperty(t,r){if(r.schemaId==lr&&r.type.startsWith("option")){let n=Mr([...this.superstate.spacesMap.getInverse(t)??[]].flatMap(a=>Rt(uo(this.superstate.pathsIndex.get(a)?.metadata?.property?.[r.name]))??[])),i=i0(n.map(a=>({value:a,name:a})),{});r.value=i}return this.adapterForPath(t).addSpaceProperty(t,r).then(n=>this.superstate.reloadContextByPath(t,{force:!0,calculate:!0}))}deleteSpaceProperty(t,r){return this.adapterForPath(t).deleteSpaceProperty(t,r).then(n=>this.superstate.reloadContextByPath(t,{force:!0,calculate:!0}))}saveSpaceProperty(t,r,n){return this.adapterForPath(t).saveSpaceProperty(t,r,n).then(i=>(n.name!=r.name&&this.superstate.getSpaceItems(t).forEach(a=>{this.renameProperty(a.path,n.name,r.name)}),this.superstate.reloadContextByPath(t,{force:!0,calculate:!0})))}addTag(t,r){return this.adapterForPath(t).addTag(t,r)}deleteTag(t,r){return this.adapterForPath(t).deleteTag(t,r)}renameTag(t,r,n){return this.adapterForPath(t).renameTag(t,r,n)}readTags(){return this.primarySpaceAdapter.readTags()}pathsForTag(t){return this.primarySpaceAdapter.pathsForTag(t)}childrenForPath(t,r){return this.adapterForPath(t).childrenForPath(t,r)}readFocuses(){return this.primarySpaceAdapter.readFocuses()}saveFocuses(t){return this.superstate.focuses=t,this.superstate.dispatchEvent("focusesChanged",null),this.primarySpaceAdapter.saveFocuses(t)}readTemplates(t){return this.adapterForPath(t).readTemplates(t)}saveTemplate(t,r){return this.adapterForPath(t).saveTemplate(t,r).then(n=>this.superstate.reloadSpace(this.spaceInfoForPath(r),null,!0)).then(n=>n.path)}deleteTemplate(t,r){return this.primarySpaceAdapter.deleteTemplate(t,r).then(n=>this.superstate.reloadSpace(this.spaceInfoForPath(r),null,!0)).then(n=>{})}};var Yv=class{constructor(){this.listeners=new Map}addListener(t,r,n=0,i){let a={callback:r,priority:n,once:!1,context:i},o=this.listeners.get(t)||[];o.push(a),o.sort((s,l)=>l.priority-s.priority),this.listeners.set(t,o)}addOnceListener(t,r,n=0,i){let a={callback:r,priority:n,once:!0,context:i},o=this.listeners.get(t)||[];o.push(a),o.sort((s,l)=>l.priority-s.priority),this.listeners.set(t,o)}removeListener(t,r){let n=this.listeners.get(t);n&&this.listeners.set(t,n.filter(i=>i.callback!==r))}async dispatchEvent(t,r){let n=this.listeners.get(t);if(n)for(let i of n){try{await i.callback.call(i.context,r)}catch(a){console.error(`Error in listener for event '${String(t)}':`,a)}i.once&&this.removeListener(t,i.callback)}}};var tx=class{constructor(){this.filesystems=[];this.filetypes=[];this.loadPath=async t=>{let r=await this.getFile(t);return r&&this.filetypeAdaptersForFile(r).forEach(n=>{n.loadFile&&n.loadFile(r)}),null};this.eventDispatch=new Yv}static create(){return new tx}resolvePath(t,r){return this.primary.resolvePath(t,r)}keysForCacheType(t){return this.primary.keysForCacheType(t)}allTags(){return this.primary.readAllTags()}fileFragmentChanged(t){this.eventDispatch.dispatchEvent("onFileFragmentChanged",{file:t})}initiateFileSystemAdapter(t,r){t.initiate(this),r&&(this.primary=t),this.filesystems.push(t)}initiateFiletypeAdapter(t){t.initiate(this),this.filetypes.push(t)}filetypeAdaptersForFile(t){return t?this.filetypes.filter(r=>r.supportedFileTypes.includes(t.extension)):[]}filetypeAdaptersForFileFragments(t,r){return this.filetypeAdaptersForFile(t).filter(n=>n.contentTypes?n.contentTypes(t).includes(r):!1)}getFileCacheTypeByRefString(t,r){return this.filetypeAdaptersForFile(t).reduce((i,a)=>i||a.getCacheTypeByRefString(t,r),null)}allCaches(){return this.primary.cache}allFiles(t){return this.primary.allFiles(t)}resourcePathForPath(t){return this.adapterForPath(t).resourcePathForPath(t)}parentPathForPath(t){return this.adapterForPath(t).parentPathForPath(t)}async createFileCache(t){let r=await this.getFile(t);for(let n of this.filetypeAdaptersForFile(r))n.parseCache&&await n.parseCache(r,!1)}getFileCache(t){return this.adapterForPath(t).getFileCache(t)}getFileContent(t,r,n){let i=this.filetypeAdaptersForFile(t).filter(a=>a.contentTypes(t).includes(r));if(i.length>=1)return i[0].readContent(t,r,n)}updateFileCache(t,r,n){this.adapterForPath(t).updateFileCache(t,r,n)}readFileFragments(t,r,n){let i=this.filetypeAdaptersForFileFragments(t,r);if(i.length>=1)return i[0].readContent(t,r,n)}async newFile(t,r,n,i){let a=this.filetypes.find(o=>o.supportedFileTypes.includes(n));if(a?.newFile)return a.newFile(t,r,n,i)}newFileFragment(t,r,n,i,a){let o=this.filetypeAdaptersForFileFragments(t,r);if(o.length>=1)return o[0].newContent(t,r,n,i,a)}saveFileLabel(t,r,n){let i=this.filetypeAdaptersForFileFragments(t,"label");return i.length>=1?i[0].saveContent(t,"label",r,()=>n):this.primary.updateFileLabel(t.path,r,n)}saveFileFragment(t,r,n,i){let a=this.filetypeAdaptersForFileFragments(t,r);return a.length>=1?a[0].saveContent(t,r,n,i):!1}deleteFileFragment(t,r,n){let i=this.filetypeAdaptersForFileFragments(t,r);if(i.length>=1)return i[0].deleteContent(t,r,n)}onCreate(t){this.eventDispatch.dispatchEvent("onCreate",{file:t})}onModify(t){this.eventDispatch.dispatchEvent("onModify",{file:t})}onRename(t,r){this.eventDispatch.dispatchEvent("onRename",{file:t,oldPath:r})}onDelete(t){this.eventDispatch.dispatchEvent("onDelete",{file:t})}onSpaceUpdated(t,r){this.eventDispatch.dispatchEvent("onSpaceUpdated",{path:t,type:r})}onFocusesUpdated(){this.eventDispatch.dispatchEvent("onFocusesUpdated",null)}adapterForPath(t){return this.primary}async getRoot(){return this.adapterForPath().getRoot()}async copyFile(t,r,n){return this.adapterForPath(t).copyFile(t,r,n)}async writeTextToFile(t,r){return this.adapterForPath(t).writeTextToFile(t,r)}async readTextFromFile(t){return this.adapterForPath(t).readTextFromFile(t)}async writeBinaryToFile(t,r){return this.adapterForPath(t).writeBinaryToFile(t,r)}async readBinaryToFile(t){return this.adapterForPath(t).readBinaryToFile(t)}async renameFile(t,r){return this.adapterForPath(t).renameFile(t,r)}async createFolder(t){return this.adapterForPath(t).createFolder(t)}async childrenForFolder(t,r){return this.adapterForPath(t).childrenForFolder(t,r)}async fileExists(t){return this.adapterForPath(t).fileExists(t)}async getFile(t,r){return this.adapterForPath(t).getFile(t,r)}async deleteFile(t){return this.adapterForPath(t).deleteFile(t)}async addTagToFile(t,r){return this.adapterForPath(t).addTagToFile(t,r)}async renameTagForFile(t,r,n){return this.adapterForPath(t).renameTagForFile(t,r,n)}async removeTagFromFile(t,r){return this.adapterForPath(t).removeTagFromFile(t,r)}filesForTag(t){return this.primary.filesForTag(t)}};var vKe=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],Ede=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],yKe="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",kde="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",WQ={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},QQ="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",bKe={5:QQ,"5module":QQ+" export import",6:QQ+" const class extends export import super"},xKe=/^in(stanceof)?$/,wKe=new RegExp("["+kde+"]"),SKe=new RegExp("["+kde+yKe+"]");function XQ(e,t){for(var r=65536,n=0;n<t.length;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function ng(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&wKe.test(String.fromCharCode(e)):t===!1?!1:XQ(e,Ede)}function Kv(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&SKe.test(String.fromCharCode(e)):t===!1?!1:XQ(e,Ede)||XQ(e,vKe)}var Ti=function(t,r){r===void 0&&(r={}),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null};function Op(e,t){return new Ti(e,{beforeExpr:!0,binop:t})}var Fp={beforeExpr:!0},kf={startsExpr:!0},eY={};function pi(e,t){return t===void 0&&(t={}),t.keyword=e,eY[e]=new Ti(e,t)}var be={num:new Ti("num",kf),regexp:new Ti("regexp",kf),string:new Ti("string",kf),name:new Ti("name",kf),privateId:new Ti("privateId",kf),eof:new Ti("eof"),bracketL:new Ti("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new Ti("]"),braceL:new Ti("{",{beforeExpr:!0,startsExpr:!0}),braceR:new Ti("}"),parenL:new Ti("(",{beforeExpr:!0,startsExpr:!0}),parenR:new Ti(")"),comma:new Ti(",",Fp),semi:new Ti(";",Fp),colon:new Ti(":",Fp),dot:new Ti("."),question:new Ti("?",Fp),questionDot:new Ti("?."),arrow:new Ti("=>",Fp),template:new Ti("template"),invalidTemplate:new Ti("invalidTemplate"),ellipsis:new Ti("...",Fp),backQuote:new Ti("`",kf),dollarBraceL:new Ti("${",{beforeExpr:!0,startsExpr:!0}),eq:new Ti("=",{beforeExpr:!0,isAssign:!0}),assign:new Ti("_=",{beforeExpr:!0,isAssign:!0}),incDec:new Ti("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new Ti("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Op("||",1),logicalAND:Op("&&",2),bitwiseOR:Op("|",3),bitwiseXOR:Op("^",4),bitwiseAND:Op("&",5),equality:Op("==/!=/===/!==",6),relational:Op("</>/<=/>=",7),bitShift:Op("<</>>/>>>",8),plusMin:new Ti("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Op("%",10),star:Op("*",10),slash:Op("/",10),starstar:new Ti("**",{beforeExpr:!0}),coalesce:Op("??",1),_break:pi("break"),_case:pi("case",Fp),_catch:pi("catch"),_continue:pi("continue"),_debugger:pi("debugger"),_default:pi("default",Fp),_do:pi("do",{isLoop:!0,beforeExpr:!0}),_else:pi("else",Fp),_finally:pi("finally"),_for:pi("for",{isLoop:!0}),_function:pi("function",kf),_if:pi("if"),_return:pi("return",Fp),_switch:pi("switch"),_throw:pi("throw",Fp),_try:pi("try"),_var:pi("var"),_const:pi("const"),_while:pi("while",{isLoop:!0}),_with:pi("with"),_new:pi("new",{beforeExpr:!0,startsExpr:!0}),_this:pi("this",kf),_super:pi("super",kf),_class:pi("class",kf),_extends:pi("extends",Fp),_export:pi("export"),_import:pi("import",kf),_null:pi("null",kf),_true:pi("true",kf),_false:pi("false",kf),_in:pi("in",{beforeExpr:!0,binop:7}),_instanceof:pi("instanceof",{beforeExpr:!0,binop:7}),_typeof:pi("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:pi("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:pi("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Cf=/\r\n?|\n|\u2028|\u2029/,EKe=new RegExp(Cf.source,"g");function eE(e){return e===10||e===13||e===8232||e===8233}function Cde(e,t,r){r===void 0&&(r=e.length);for(var n=t;n<r;n++){var i=e.charCodeAt(n);if(eE(i))return n<r-1&&i===13&&e.charCodeAt(n+1)===10?n+2:n+1}return-1}var Dde=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Xu=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Tde=Object.prototype,kKe=Tde.hasOwnProperty,CKe=Tde.toString,tE=Object.hasOwn||function(e,t){return kKe.call(e,t)},yde=Array.isArray||function(e){return CKe.call(e)==="[object Array]"},bde=Object.create(null);function Xv(e){return bde[e]||(bde[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function a0(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var DKe=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,$T=function(t,r){this.line=t,this.column=r};$T.prototype.offset=function(t){return new $T(this.line,this.column+t)};var bP=function(t,r,n){this.start=r,this.end=n,t.sourceFile!==null&&(this.source=t.sourceFile)};function Nde(e,t){for(var r=1,n=0;;){var i=Cde(e,n,t);if(i<0)return new $T(r,t-n);++r,n=i}}var KQ={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},xde=!1;function TKe(e){var t={};for(var r in KQ)t[r]=e&&tE(e,r)?e[r]:KQ[r];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!xde&&typeof console=="object"&&console.warn&&(xde=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
44Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),yde(t.onToken)){var n=t.onToken;t.onToken=function(i){return n.push(i)}}return yde(t.onComment)&&(t.onComment=NKe(t,t.onComment)),t}function NKe(e,t){return function(r,n,i,a,o,s){var l={type:r?"Block":"Line",value:n,start:i,end:a};e.locations&&(l.loc=new bP(this,o,s)),e.ranges&&(l.range=[i,a]),t.push(l)}}var zT=1,rE=2,tY=4,Mde=8,rY=16,Ode=32,xP=64,Fde=128,rx=256,UT=512,wP=zT|rE|rx;function nY(e,t){return rE|(e?tY:0)|(t?Mde:0)}var gP=0,iY=1,s0=2,jde=3,Pde=4,_de=5,tl=function(t,r,n){this.options=t=TKe(t),this.sourceFile=t.sourceFile,this.keywords=Xv(bKe[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";t.allowReserved!==!0&&(i=WQ[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(i+=" await")),this.reservedWords=Xv(i);var a=(i?i+" ":"")+WQ.strict;this.reservedWordsStrict=Xv(a),this.reservedWordsStrictBind=Xv(a+" "+WQ.strictBind),this.input=String(r),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf(`
45`,n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Cf).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=be.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(zT),this.regexpState=null,this.privateNameStack=[]},ig={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};tl.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};ig.inFunction.get=function(){return(this.currentVarScope().flags&rE)>0};ig.inGenerator.get=function(){return(this.currentVarScope().flags&Mde)>0};ig.inAsync.get=function(){return(this.currentVarScope().flags&tY)>0};ig.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&(rx|UT))return!1;if(r&rE)return(r&tY)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};ig.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&xP)>0||this.options.allowSuperOutsideMethod};ig.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Fde)>0};ig.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};ig.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&(rx|UT)||r&rE&&!(r&rY))return!0}return!1};ig.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&rx)>0};tl.extend=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];for(var n=this,i=0;i<t.length;i++)n=t[i](n);return n};tl.parse=function(t,r){return new this(r,t).parse()};tl.parseExpressionAt=function(t,r,n){var i=new this(n,t,r);return i.nextToken(),i.parseExpression()};tl.tokenizer=function(t,r){return new this(r,t)};Object.defineProperties(tl.prototype,ig);var qc=tl.prototype,MKe=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;qc.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){Xu.lastIndex=e,e+=Xu.exec(this.input)[0].length;var t=MKe.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){Xu.lastIndex=e+t[0].length;var r=Xu.exec(this.input),n=r.index+r[0].length,i=this.input.charAt(n);return i===";"||i==="}"||Cf.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i==="!"&&this.input.charAt(n+1)==="=")}e+=t[0].length,Xu.lastIndex=e,e+=Xu.exec(this.input)[0].length,this.input[e]===";"&&e++}};qc.eat=function(e){return this.type===e?(this.next(),!0):!1};qc.isContextual=function(e){return this.type===be.name&&this.value===e&&!this.containsEsc};qc.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};qc.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};qc.canInsertSemicolon=function(){return this.type===be.eof||this.type===be.braceR||Cf.test(this.input.slice(this.lastTokEnd,this.start))};qc.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};qc.semicolon=function(){!this.eat(be.semi)&&!this.insertSemicolon()&&this.unexpected()};qc.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};qc.expect=function(e){this.eat(e)||this.unexpected()};qc.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var SP=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};qc.checkPatternErrors=function(e,t){if(!!e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var r=t?e.parenthesizedAssign:e.parenthesizedBind;r>-1&&this.raiseRecoverable(r,t?"Assigning to rvalue":"Parenthesized pattern")}};qc.checkExpressionErrors=function(e,t){if(!e)return!1;var r=e.shorthandAssign,n=e.doubleProto;if(!t)return r>=0||n>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),n>=0&&this.raiseRecoverable(n,"Redefinition of __proto__ property")};qc.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};qc.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var wr=tl.prototype;wr.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==be.eof;){var r=this.parseStatement(null,!0,t);e.body.push(r)}if(this.inModule)for(var n=0,i=Object.keys(this.undefinedExports);n<i.length;n+=1){var a=i[n];this.raiseRecoverable(this.undefinedExports[a].start,"Export '"+a+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var aY={kind:"loop"},OKe={kind:"switch"};wr.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;Xu.lastIndex=this.pos;var t=Xu.exec(this.input),r=this.pos+t[0].length,n=this.input.charCodeAt(r);if(n===91||n===92)return!0;if(e)return!1;if(n===123||n>55295&&n<56320)return!0;if(ng(n,!0)){for(var i=r+1;Kv(n=this.input.charCodeAt(i),!0);)++i;if(n===92||n>55295&&n<56320)return!0;var a=this.input.slice(r,i);if(!xKe.test(a))return!0}return!1};wr.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;Xu.lastIndex=this.pos;var e=Xu.exec(this.input),t=this.pos+e[0].length,r;return!Cf.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(Kv(r=this.input.charCodeAt(t+8))||r>55295&&r<56320))};wr.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;Xu.lastIndex=this.pos;var r=Xu.exec(this.input),n=this.pos+r[0].length;if(Cf.test(this.input.slice(this.pos,n)))return!1;if(e){var i=n+5,a;if(this.input.slice(n,i)!=="using"||i===this.input.length||Kv(a=this.input.charCodeAt(i))||a>55295&&a<56320)return!1;Xu.lastIndex=i;var o=Xu.exec(this.input);if(o&&Cf.test(this.input.slice(i,i+o[0].length)))return!1}if(t){var s=n+2,l;if(this.input.slice(n,s)==="of"&&(s===this.input.length||!Kv(l=this.input.charCodeAt(s))&&!(l>55295&&l<56320)))return!1}var u=this.input.charCodeAt(n);return ng(u,!0)||u===92};wr.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)};wr.isUsing=function(e){return this.isUsingKeyword(!1,e)};wr.parseStatement=function(e,t,r){var n=this.type,i=this.startNode(),a;switch(this.isLet(e)&&(n=be._var,a="let"),n){case be._break:case be._continue:return this.parseBreakContinueStatement(i,n.keyword);case be._debugger:return this.parseDebuggerStatement(i);case be._do:return this.parseDoStatement(i);case be._for:return this.parseForStatement(i);case be._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case be._class:return e&&this.unexpected(),this.parseClass(i,!0);case be._if:return this.parseIfStatement(i);case be._return:return this.parseReturnStatement(i);case be._switch:return this.parseSwitchStatement(i);case be._throw:return this.parseThrowStatement(i);case be._try:return this.parseTryStatement(i);case be._const:case be._var:return a=a||this.value,e&&a!=="var"&&this.unexpected(),this.parseVarStatement(i,a);case be._while:return this.parseWhileStatement(i);case be._with:return this.parseWithStatement(i);case be.braceL:return this.parseBlock(!0,i);case be.semi:return this.parseEmptyStatement(i);case be._export:case be._import:if(this.options.ecmaVersion>10&&n===be._import){Xu.lastIndex=this.pos;var o=Xu.exec(this.input),s=this.pos+o[0].length,l=this.input.charCodeAt(s);if(l===40||l===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),n===be._import?this.parseImport(i):this.parseExport(i,r);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var u=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(u)return t&&this.options.sourceType==="script"&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),u==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(i,!1,u),this.semicolon(),this.finishNode(i,"VariableDeclaration");var c=this.value,f=this.parseExpression();return n===be.name&&f.type==="Identifier"&&this.eat(be.colon)?this.parseLabeledStatement(i,c,f,e):this.parseExpressionStatement(i,f)}};wr.parseBreakContinueStatement=function(e,t){var r=t==="break";this.next(),this.eat(be.semi)||this.insertSemicolon()?e.label=null:this.type!==be.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var n=0;n<this.labels.length;++n){var i=this.labels[n];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(r||i.kind==="loop")||e.label&&r))break}return n===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")};wr.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};wr.parseDoStatement=function(e){return this.next(),this.labels.push(aY),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(be._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(be.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};wr.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(aY),this.enterScope(0),this.expect(be.parenL),this.type===be.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var r=this.isLet();if(this.type===be._var||this.type===be._const||r){var n=this.startNode(),i=r?"let":this.value;return this.next(),this.parseVar(n,!0,i),this.finishNode(n,"VariableDeclaration"),this.parseForAfterInit(e,n,t)}var a=this.isContextual("let"),o=!1,s=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(s){var l=this.startNode();return this.next(),s==="await using"&&this.next(),this.parseVar(l,!0,s),this.finishNode(l,"VariableDeclaration"),this.parseForAfterInit(e,l,t)}var u=this.containsEsc,c=new SP,f=this.start,d=t>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);return this.type===be._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===be._in&&this.unexpected(t),e.await=!0):o&&this.options.ecmaVersion>=8&&(d.start===f&&!u&&d.type==="Identifier"&&d.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),a&&o&&this.raise(d.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(d,!1,c),this.checkLValPattern(d),this.parseForIn(e,d)):(this.checkExpressionErrors(c,!0),t>-1&&this.unexpected(t),this.parseFor(e,d))};wr.parseForAfterInit=function(e,t,r){return(this.type===be._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===be._in?r>-1&&this.unexpected(r):e.await=r>-1),this.parseForIn(e,t)):(r>-1&&this.unexpected(r),this.parseFor(e,t))};wr.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,qT|(r?0:JQ),!1,t)};wr.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(be._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};wr.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(be.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};wr.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(be.braceL),this.labels.push(OKe),this.enterScope(0);for(var t,r=!1;this.type!==be.braceR;)if(this.type===be._case||this.type===be._default){var n=this.type===be._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),n?t.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,t.test=null),this.expect(be.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};wr.parseThrowStatement=function(e){return this.next(),Cf.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var FKe=[];wr.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Ode:0),this.checkLValPattern(e,t?Pde:s0),this.expect(be.parenR),e};wr.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===be._catch){var t=this.startNode();this.next(),this.eat(be.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(be._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};wr.parseVarStatement=function(e,t,r){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")};wr.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(aY),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};wr.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};wr.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};wr.parseLabeledStatement=function(e,t,r,n){for(var i=0,a=this.labels;i<a.length;i+=1){var o=a[i];o.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var s=this.type.isLoop?"loop":this.type===be._switch?"switch":null,l=this.labels.length-1;l>=0;l--){var u=this.labels[l];if(u.statementStart===e.start)u.statementStart=this.start,u.kind=s;else break}return this.labels.push({name:t,kind:s,statementStart:this.start}),e.body=this.parseStatement(n?n.indexOf("label")===-1?n+"label":n:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")};wr.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};wr.parseBlock=function(e,t,r){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(be.braceL),e&&this.enterScope(0);this.type!==be.braceR;){var n=this.parseStatement(null);t.body.push(n)}return r&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};wr.parseFor=function(e,t){return e.init=t,this.expect(be.semi),e.test=this.type===be.semi?null:this.parseExpression(),this.expect(be.semi),e.update=this.type===be.parenR?null:this.parseExpression(),this.expect(be.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};wr.parseForIn=function(e,t){var r=this.type===be._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!r||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(be.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")};wr.parseVar=function(e,t,r,n){for(e.declarations=[],e.kind=r;;){var i=this.startNode();if(this.parseVarId(i,r),this.eat(be.eq)?i.init=this.parseMaybeAssign(t):!n&&r==="const"&&!(this.type===be._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!n&&(r==="using"||r==="await using")&&this.options.ecmaVersion>=17&&this.type!==be._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+r+" declaration"):!n&&i.id.type!=="Identifier"&&!(t&&(this.type===be._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):i.init=null,e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(be.comma))break}return e};wr.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?iY:s0,!1)};var qT=1,JQ=2,Ide=4;wr.parseFunction=function(e,t,r,n,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!n)&&(this.type===be.star&&t&JQ&&this.unexpected(),e.generator=this.eat(be.star)),this.options.ecmaVersion>=8&&(e.async=!!n),t&qT&&(e.id=t&Ide&&this.type!==be.name?null:this.parseIdent(),e.id&&!(t&JQ)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?iY:s0:jde));var a=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(nY(e.async,e.generator)),t&qT||(e.id=this.type===be.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1,i),this.yieldPos=a,this.awaitPos=o,this.awaitIdentPos=s,this.finishNode(e,t&qT?"FunctionDeclaration":"FunctionExpression")};wr.parseFunctionParams=function(e){this.expect(be.parenL),e.params=this.parseBindingList(be.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};wr.parseClass=function(e,t){this.next();var r=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var n=this.enterClassBody(),i=this.startNode(),a=!1;for(i.body=[],this.expect(be.braceL);this.type!==be.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(i.body.push(o),o.type==="MethodDefinition"&&o.kind==="constructor"?(a&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),a=!0):o.key&&o.key.type==="PrivateIdentifier"&&jKe(n,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=r,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};wr.parseClassElement=function(e){if(this.eat(be.semi))return null;var t=this.options.ecmaVersion,r=this.startNode(),n="",i=!1,a=!1,o="method",s=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(be.braceL))return this.parseClassStaticBlock(r),r;this.isClassElementNameStart()||this.type===be.star?s=!0:n="static"}if(r.static=s,!n&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===be.star)&&!this.canInsertSemicolon()?a=!0:n="async"),!n&&(t>=9||!a)&&this.eat(be.star)&&(i=!0),!n&&!a&&!i){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=l:n=l)}if(n?(r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=n,this.finishNode(r.key,"Identifier")):this.parseClassElementName(r),t<13||this.type===be.parenL||o!=="method"||i||a){var u=!r.static&&AP(r,"constructor"),c=u&&e;u&&o!=="method"&&this.raise(r.key.start,"Constructor can't have get/set modifier"),r.kind=u?"constructor":o,this.parseClassMethod(r,i,a,c)}else this.parseClassField(r);return r};wr.isClassElementNameStart=function(){return this.type===be.name||this.type===be.privateId||this.type===be.num||this.type===be.string||this.type===be.bracketL||this.type.keyword};wr.parseClassElementName=function(e){this.type===be.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};wr.parseClassMethod=function(e,t,r,n){var i=e.key;e.kind==="constructor"?(t&&this.raise(i.start,"Constructor can't be a generator"),r&&this.raise(i.start,"Constructor can't be an async method")):e.static&&AP(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var a=e.value=this.parseMethod(t,r,n);return e.kind==="get"&&a.params.length!==0&&this.raiseRecoverable(a.start,"getter should have no params"),e.kind==="set"&&a.params.length!==1&&this.raiseRecoverable(a.start,"setter should have exactly one param"),e.kind==="set"&&a.params[0].type==="RestElement"&&this.raiseRecoverable(a.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};wr.parseClassField=function(e){return AP(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&AP(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(be.eq)?(this.enterScope(UT|xP),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")};wr.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(rx|xP);this.type!==be.braceR;){var r=this.parseStatement(null);e.body.push(r)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};wr.parseClassId=function(e,t){this.type===be.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,s0,!1)):(t===!0&&this.unexpected(),e.id=null)};wr.parseClassSuper=function(e){e.superClass=this.eat(be._extends)?this.parseExprSubscripts(null,!1):null};wr.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};wr.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,r=e.used;if(!!this.options.checkPrivateFields)for(var n=this.privateNameStack.length,i=n===0?null:this.privateNameStack[n-1],a=0;a<r.length;++a){var o=r[a];tE(t,o.name)||(i?i.used.push(o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"))}};function jKe(e,t){var r=t.key.name,n=e[r],i="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(i=(t.static?"s":"i")+t.kind),n==="iget"&&i==="iset"||n==="iset"&&i==="iget"||n==="sget"&&i==="sset"||n==="sset"&&i==="sget"?(e[r]="true",!1):n?!0:(e[r]=i,!1)}function AP(e,t){var r=e.computed,n=e.key;return!r&&(n.type==="Identifier"&&n.name===t||n.type==="Literal"&&n.value===t)}wr.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==be.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};wr.parseExport=function(e,t){if(this.next(),this.eat(be.star))return this.parseExportAllDeclaration(e,t);if(this.eat(be._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==be.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var r=0,n=e.specifiers;r<n.length;r+=1){var i=n[r];this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type==="Literal"&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};wr.parseExportDeclaration=function(e){return this.parseStatement(null)};wr.parseExportDefaultDeclaration=function(){var e;if(this.type===be._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,qT|Ide,!1,e)}else if(this.type===be._class){var r=this.startNode();return this.parseClass(r,"nullableID")}else{var n=this.parseMaybeAssign();return this.semicolon(),n}};wr.checkExport=function(e,t,r){!e||(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),tE(e,t)&&this.raiseRecoverable(r,"Duplicate export '"+t+"'"),e[t]=!0)};wr.checkPatternExport=function(e,t){var r=t.type;if(r==="Identifier")this.checkExport(e,t,t.start);else if(r==="ObjectPattern")for(var n=0,i=t.properties;n<i.length;n+=1){var a=i[n];this.checkPatternExport(e,a)}else if(r==="ArrayPattern")for(var o=0,s=t.elements;o<s.length;o+=1){var l=s[o];l&&this.checkPatternExport(e,l)}else r==="Property"?this.checkPatternExport(e,t.value):r==="AssignmentPattern"?this.checkPatternExport(e,t.left):r==="RestElement"&&this.checkPatternExport(e,t.argument)};wr.checkVariableExport=function(e,t){if(!!e)for(var r=0,n=t;r<n.length;r+=1){var i=n[r];this.checkPatternExport(e,i.id)}};wr.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};wr.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};wr.parseExportSpecifiers=function(e){var t=[],r=!0;for(this.expect(be.braceL);!this.eat(be.braceR);){if(r)r=!1;else if(this.expect(be.comma),this.afterTrailingComma(be.braceR))break;t.push(this.parseExportSpecifier(e))}return t};wr.parseImport=function(e){return this.next(),this.type===be.string?(e.specifiers=FKe,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===be.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};wr.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,s0),this.finishNode(e,"ImportSpecifier")};wr.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,s0),this.finishNode(e,"ImportDefaultSpecifier")};wr.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,s0),this.finishNode(e,"ImportNamespaceSpecifier")};wr.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===be.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(be.comma)))return e;if(this.type===be.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(be.braceL);!this.eat(be.braceR);){if(t)t=!1;else if(this.expect(be.comma),this.afterTrailingComma(be.braceR))break;e.push(this.parseImportSpecifier())}return e};wr.parseWithClause=function(){var e=[];if(!this.eat(be._with))return e;this.expect(be.braceL);for(var t={},r=!0;!this.eat(be.braceR);){if(r)r=!1;else if(this.expect(be.comma),this.afterTrailingComma(be.braceR))break;var n=this.parseImportAttribute(),i=n.key.type==="Identifier"?n.key.name:n.key.value;tE(t,i)&&this.raiseRecoverable(n.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,e.push(n)}return e};wr.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===be.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(be.colon),this.type!==be.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};wr.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===be.string){var e=this.parseLiteral(this.value);return DKe.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};wr.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};wr.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var Pp=tl.prototype;Pp.toAssignable=function(e,t,r){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",r&&this.checkPatternErrors(r,!0);for(var n=0,i=e.properties;n<i.length;n+=1){var a=i[n];this.toAssignable(a,t),a.type==="RestElement"&&(a.argument.type==="ArrayPattern"||a.argument.type==="ObjectPattern")&&this.raise(a.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",r&&this.checkPatternErrors(r,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,r);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else r&&this.checkPatternErrors(r,!0);return e};Pp.toAssignableList=function(e,t){for(var r=e.length,n=0;n<r;n++){var i=e[n];i&&this.toAssignable(i,t)}if(r){var a=e[r-1];this.options.ecmaVersion===6&&t&&a&&a.type==="RestElement"&&a.argument.type!=="Identifier"&&this.unexpected(a.argument.start)}return e};Pp.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};Pp.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==be.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};Pp.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case be.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(be.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case be.braceL:return this.parseObj(!0)}return this.parseIdent()};Pp.parseBindingList=function(e,t,r,n){for(var i=[],a=!0;!this.eat(e);)if(a?a=!1:this.expect(be.comma),t&&this.type===be.comma)i.push(null);else{if(r&&this.afterTrailingComma(e))break;if(this.type===be.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),i.push(o),this.type===be.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else i.push(this.parseAssignableListItem(n))}return i};Pp.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};Pp.parseBindingListItem=function(e){return e};Pp.parseMaybeDefault=function(e,t,r){if(r=r||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(be.eq))return r;var n=this.startNodeAt(e,t);return n.left=r,n.right=this.parseMaybeAssign(),this.finishNode(n,"AssignmentPattern")};Pp.checkLValSimple=function(e,t,r){t===void 0&&(t=gP);var n=t!==gP;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(n?"Binding ":"Assigning to ")+e.name+" in strict mode"),n&&(t===s0&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),r&&(tE(r,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),r[e.name]=!0),t!==_de&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":n&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return n&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,r);default:this.raise(e.start,(n?"Binding":"Assigning to")+" rvalue")}};Pp.checkLValPattern=function(e,t,r){switch(t===void 0&&(t=gP),e.type){case"ObjectPattern":for(var n=0,i=e.properties;n<i.length;n+=1){var a=i[n];this.checkLValInnerPattern(a,t,r)}break;case"ArrayPattern":for(var o=0,s=e.elements;o<s.length;o+=1){var l=s[o];l&&this.checkLValInnerPattern(l,t,r)}break;default:this.checkLValSimple(e,t,r)}};Pp.checkLValInnerPattern=function(e,t,r){switch(t===void 0&&(t=gP),e.type){case"Property":this.checkLValInnerPattern(e.value,t,r);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,r);break;case"RestElement":this.checkLValPattern(e.argument,t,r);break;default:this.checkLValPattern(e,t,r)}};var $m=function(t,r,n,i,a){this.token=t,this.isExpr=!!r,this.preserveSpace=!!n,this.override=i,this.generator=!!a},ko={b_stat:new $m("{",!1),b_expr:new $m("{",!0),b_tmpl:new $m("${",!1),p_stat:new $m("(",!1),p_expr:new $m("(",!0),q_tmpl:new $m("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new $m("function",!1),f_expr:new $m("function",!0),f_expr_gen:new $m("function",!0,!1,null,!0),f_gen:new $m("function",!1,!1,null,!0)},nE=tl.prototype;nE.initialContext=function(){return[ko.b_stat]};nE.curContext=function(){return this.context[this.context.length-1]};nE.braceIsBlock=function(e){var t=this.curContext();return t===ko.f_expr||t===ko.f_stat?!0:e===be.colon&&(t===ko.b_stat||t===ko.b_expr)?!t.isExpr:e===be._return||e===be.name&&this.exprAllowed?Cf.test(this.input.slice(this.lastTokEnd,this.start)):e===be._else||e===be.semi||e===be.eof||e===be.parenR||e===be.arrow?!0:e===be.braceL?t===ko.b_stat:e===be._var||e===be._const||e===be.name?!1:!this.exprAllowed};nE.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};nE.updateContext=function(e){var t,r=this.type;r.keyword&&e===be.dot?this.exprAllowed=!1:(t=r.updateContext)?t.call(this,e):this.exprAllowed=r.beforeExpr};nE.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)};be.parenR.updateContext=be.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===ko.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr};be.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?ko.b_stat:ko.b_expr),this.exprAllowed=!0};be.dollarBraceL.updateContext=function(){this.context.push(ko.b_tmpl),this.exprAllowed=!0};be.parenL.updateContext=function(e){var t=e===be._if||e===be._for||e===be._with||e===be._while;this.context.push(t?ko.p_stat:ko.p_expr),this.exprAllowed=!0};be.incDec.updateContext=function(){};be._function.updateContext=be._class.updateContext=function(e){e.beforeExpr&&e!==be._else&&!(e===be.semi&&this.curContext()!==ko.p_stat)&&!(e===be._return&&Cf.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===be.colon||e===be.braceL)&&this.curContext()===ko.b_stat)?this.context.push(ko.f_expr):this.context.push(ko.f_stat),this.exprAllowed=!1};be.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0};be.backQuote.updateContext=function(){this.curContext()===ko.q_tmpl?this.context.pop():this.context.push(ko.q_tmpl),this.exprAllowed=!1};be.star.updateContext=function(e){if(e===be._function){var t=this.context.length-1;this.context[t]===ko.f_expr?this.context[t]=ko.f_expr_gen:this.context[t]=ko.f_gen}this.exprAllowed=!0};be.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==be.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var pn=tl.prototype;pn.checkPropClash=function(e,t,r){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var n=e.key,i;switch(n.type){case"Identifier":i=n.name;break;case"Literal":i=String(n.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6){i==="__proto__"&&a==="init"&&(t.proto&&(r?r.doubleProto<0&&(r.doubleProto=n.start):this.raiseRecoverable(n.start,"Redefinition of __proto__ property")),t.proto=!0);return}i="$"+i;var o=t[i];if(o){var s;a==="init"?s=this.strict&&o.init||o.get||o.set:s=o.init||o[a],s&&this.raiseRecoverable(n.start,"Redefinition of property")}else o=t[i]={init:!1,get:!1,set:!1};o[a]=!0}};pn.parseExpression=function(e,t){var r=this.start,n=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===be.comma){var a=this.startNodeAt(r,n);for(a.expressions=[i];this.eat(be.comma);)a.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(a,"SequenceExpression")}return i};pn.parseMaybeAssign=function(e,t,r){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var n=!1,i=-1,a=-1,o=-1;t?(i=t.parenthesizedAssign,a=t.trailingComma,o=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new SP,n=!0);var s=this.start,l=this.startLoc;(this.type===be.parenL||this.type===be.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var u=this.parseMaybeConditional(e,t);if(r&&(u=r.call(this,u,s,l)),this.type.isAssign){var c=this.startNodeAt(s,l);return c.operator=this.value,this.type===be.eq&&(u=this.toAssignable(u,!1,t)),n||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=u.start&&(t.shorthandAssign=-1),this.type===be.eq?this.checkLValPattern(u):this.checkLValSimple(u),c.left=u,this.next(),c.right=this.parseMaybeAssign(e),o>-1&&(t.doubleProto=o),this.finishNode(c,"AssignmentExpression")}else n&&this.checkExpressionErrors(t,!0);return i>-1&&(t.parenthesizedAssign=i),a>-1&&(t.trailingComma=a),u};pn.parseMaybeConditional=function(e,t){var r=this.start,n=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(be.question)){var a=this.startNodeAt(r,n);return a.test=i,a.consequent=this.parseMaybeAssign(),this.expect(be.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,"ConditionalExpression")}return i};pn.parseExprOps=function(e,t){var r=this.start,n=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===r&&i.type==="ArrowFunctionExpression"?i:this.parseExprOp(i,r,n,-1,e)};pn.parseExprOp=function(e,t,r,n,i){var a=this.type.binop;if(a!=null&&(!i||this.type!==be._in)&&a>n){var o=this.type===be.logicalOR||this.type===be.logicalAND,s=this.type===be.coalesce;s&&(a=be.logicalAND.binop);var l=this.value;this.next();var u=this.start,c=this.startLoc,f=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),u,c,a,i),d=this.buildBinary(t,r,e,f,l,o||s);return(o&&this.type===be.coalesce||s&&(this.type===be.logicalOR||this.type===be.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(d,t,r,n,i)}return e};pn.buildBinary=function(e,t,r,n,i,a){n.type==="PrivateIdentifier"&&this.raise(n.start,"Private identifier can only be left side of binary expression");var o=this.startNodeAt(e,t);return o.left=r,o.operator=i,o.right=n,this.finishNode(o,a?"LogicalExpression":"BinaryExpression")};pn.parseMaybeUnary=function(e,t,r,n){var i=this.start,a=this.startLoc,o;if(this.isContextual("await")&&this.canAwait)o=this.parseAwait(n),t=!0;else if(this.type.prefix){var s=this.startNode(),l=this.type===be.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0,l,n),this.checkExpressionErrors(e,!0),l?this.checkLValSimple(s.argument):this.strict&&s.operator==="delete"&&Bde(s.argument)?this.raiseRecoverable(s.start,"Deleting local variable in strict mode"):s.operator==="delete"&&ZQ(s.argument)?this.raiseRecoverable(s.start,"Private fields can not be deleted"):t=!0,o=this.finishNode(s,l?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===be.privateId)(n||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),o=this.parsePrivateIdent(),this.type!==be._in&&this.unexpected();else{if(o=this.parseExprSubscripts(e,n),this.checkExpressionErrors(e))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){var u=this.startNodeAt(i,a);u.operator=this.value,u.prefix=!1,u.argument=o,this.checkLValSimple(o),this.next(),o=this.finishNode(u,"UpdateExpression")}}if(!r&&this.eat(be.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,a,o,this.parseMaybeUnary(null,!1,!1,n),"**",!1);else return o};function Bde(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Bde(e.expression)}function ZQ(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&ZQ(e.expression)||e.type==="ParenthesizedExpression"&&ZQ(e.expression)}pn.parseExprSubscripts=function(e,t){var r=this.start,n=this.startLoc,i=this.parseExprAtom(e,t);if(i.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return i;var a=this.parseSubscripts(i,r,n,!1,t);return e&&a.type==="MemberExpression"&&(e.parenthesizedAssign>=a.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=a.start&&(e.parenthesizedBind=-1),e.trailingComma>=a.start&&(e.trailingComma=-1)),a};pn.parseSubscripts=function(e,t,r,n,i){for(var a=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,o=!1;;){var s=this.parseSubscript(e,t,r,n,a,o,i);if(s.optional&&(o=!0),s===e||s.type==="ArrowFunctionExpression"){if(o){var l=this.startNodeAt(t,r);l.expression=s,s=this.finishNode(l,"ChainExpression")}return s}e=s}};pn.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(be.arrow)};pn.parseSubscriptAsyncArrow=function(e,t,r,n){return this.parseArrowExpression(this.startNodeAt(e,t),r,!0,n)};pn.parseSubscript=function(e,t,r,n,i,a,o){var s=this.options.ecmaVersion>=11,l=s&&this.eat(be.questionDot);n&&l&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var u=this.eat(be.bracketL);if(u||l&&this.type!==be.parenL&&this.type!==be.backQuote||this.eat(be.dot)){var c=this.startNodeAt(t,r);c.object=e,u?(c.property=this.parseExpression(),this.expect(be.bracketR)):this.type===be.privateId&&e.type!=="Super"?c.property=this.parsePrivateIdent():c.property=this.parseIdent(this.options.allowReserved!=="never"),c.computed=!!u,s&&(c.optional=l),e=this.finishNode(c,"MemberExpression")}else if(!n&&this.eat(be.parenL)){var f=new SP,d=this.yieldPos,p=this.awaitPos,h=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(be.parenR,this.options.ecmaVersion>=8,!1,f);if(i&&!l&&this.shouldParseAsyncArrow())return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=d,this.awaitPos=p,this.awaitIdentPos=h,this.parseSubscriptAsyncArrow(t,r,m,o);this.checkExpressionErrors(f,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=p||this.awaitPos,this.awaitIdentPos=h||this.awaitIdentPos;var v=this.startNodeAt(t,r);v.callee=e,v.arguments=m,s&&(v.optional=l),e=this.finishNode(v,"CallExpression")}else if(this.type===be.backQuote){(l||a)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var A=this.startNodeAt(t,r);A.tag=e,A.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(A,"TaggedTemplateExpression")}return e};pn.parseExprAtom=function(e,t,r){this.type===be.slash&&this.readRegexp();var n,i=this.potentialArrowAt===this.start;switch(this.type){case be._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),n=this.startNode(),this.next(),this.type===be.parenL&&!this.allowDirectSuper&&this.raise(n.start,"super() call outside constructor of a subclass"),this.type!==be.dot&&this.type!==be.bracketL&&this.type!==be.parenL&&this.unexpected(),this.finishNode(n,"Super");case be._this:return n=this.startNode(),this.next(),this.finishNode(n,"ThisExpression");case be.name:var a=this.start,o=this.startLoc,s=this.containsEsc,l=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&l.name==="async"&&!this.canInsertSemicolon()&&this.eat(be._function))return this.overrideContext(ko.f_expr),this.parseFunction(this.startNodeAt(a,o),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(be.arrow))return this.parseArrowExpression(this.startNodeAt(a,o),[l],!1,t);if(this.options.ecmaVersion>=8&&l.name==="async"&&this.type===be.name&&!s&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return l=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(be.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,o),[l],!0,t)}return l;case be.regexp:var u=this.value;return n=this.parseLiteral(u.value),n.regex={pattern:u.pattern,flags:u.flags},n;case be.num:case be.string:return this.parseLiteral(this.value);case be._null:case be._true:case be._false:return n=this.startNode(),n.value=this.type===be._null?null:this.type===be._true,n.raw=this.type.keyword,this.next(),this.finishNode(n,"Literal");case be.parenL:var c=this.start,f=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(f)&&(e.parenthesizedAssign=c),e.parenthesizedBind<0&&(e.parenthesizedBind=c)),f;case be.bracketL:return n=this.startNode(),this.next(),n.elements=this.parseExprList(be.bracketR,!0,!0,e),this.finishNode(n,"ArrayExpression");case be.braceL:return this.overrideContext(ko.b_expr),this.parseObj(!1,e);case be._function:return n=this.startNode(),this.next(),this.parseFunction(n,0);case be._class:return this.parseClass(this.startNode(),!1);case be._new:return this.parseNew();case be.backQuote:return this.parseTemplate();case be._import:return this.options.ecmaVersion>=11?this.parseExprImport(r):this.unexpected();default:return this.parseExprAtomDefault()}};pn.parseExprAtomDefault=function(){this.unexpected()};pn.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===be.parenL&&!e)return this.parseDynamicImport(t);if(this.type===be.dot){var r=this.startNodeAt(t.start,t.loc&&t.loc.start);return r.name="import",t.meta=this.finishNode(r,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};pn.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(be.parenR)?e.options=null:(this.expect(be.comma),this.afterTrailingComma(be.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(be.parenR)||(this.expect(be.comma),this.afterTrailingComma(be.parenR)||this.unexpected())));else if(!this.eat(be.parenR)){var t=this.start;this.eat(be.comma)&&this.eat(be.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};pn.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};pn.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};pn.parseParenExpression=function(){this.expect(be.parenL);var e=this.parseExpression();return this.expect(be.parenR),e};pn.shouldParseArrow=function(e){return!this.canInsertSemicolon()};pn.parseParenAndDistinguishExpression=function(e,t){var r=this.start,n=this.startLoc,i,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,s=this.startLoc,l=[],u=!0,c=!1,f=new SP,d=this.yieldPos,p=this.awaitPos,h;for(this.yieldPos=0,this.awaitPos=0;this.type!==be.parenR;)if(u?u=!1:this.expect(be.comma),a&&this.afterTrailingComma(be.parenR,!0)){c=!0;break}else if(this.type===be.ellipsis){h=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===be.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else l.push(this.parseMaybeAssign(!1,f,this.parseParenItem));var m=this.lastTokEnd,v=this.lastTokEndLoc;if(this.expect(be.parenR),e&&this.shouldParseArrow(l)&&this.eat(be.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=p,this.parseParenArrowList(r,n,l,t);(!l.length||c)&&this.unexpected(this.lastTokStart),h&&this.unexpected(h),this.checkExpressionErrors(f,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=p||this.awaitPos,l.length>1?(i=this.startNodeAt(o,s),i.expressions=l,this.finishNodeAt(i,"SequenceExpression",m,v)):i=l[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var A=this.startNodeAt(r,n);return A.expression=i,this.finishNode(A,"ParenthesizedExpression")}else return i};pn.parseParenItem=function(e){return e};pn.parseParenArrowList=function(e,t,r,n){return this.parseArrowExpression(this.startNodeAt(e,t),r,!1,n)};var PKe=[];pn.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===be.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var r=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),r&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var n=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),n,i,!0,!1),this.eat(be.parenL)?e.arguments=this.parseExprList(be.parenR,this.options.ecmaVersion>=8,!1):e.arguments=PKe,this.finishNode(e,"NewExpression")};pn.parseTemplateElement=function(e){var t=e.isTagged,r=this.startNode();return this.type===be.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),r.value={raw:this.value.replace(/\r\n?/g,`
46`),cooked:null}):r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`

Callers 5

renamePathMethod · 0.45
deletePathMethod · 0.45
getPathInfoMethod · 0.45
readPathMethod · 0.45
writeToPathMethod · 0.45

Calls 3

reduceMethod · 0.80

Tested by

no test coverage detected