@vibe-lark/larkpal 0.1.85 → 0.1.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account-id-BM1T6029-BzQ_cMoi.mjs +1 -0
- package/dist/activation-context--5yu1dPF-XV0Y0pTy.mjs +1 -0
- package/dist/anthropic-CFZUCb1w.mjs +39 -0
- package/dist/assistant-visible-text-DuFWokAt-BOJV_zwc.mjs +9 -0
- package/dist/azure-openai-responses-BEuiMaF-.mjs +1 -0
- package/dist/boundary-file-read-BSd9MXPy-gnNVhPKT.mjs +1 -0
- package/dist/browser-lifecycle-cleanup-BdNsMhMD-BM97qA_M.mjs +1 -0
- package/dist/build-Bkj0hOS2.mjs +3 -0
- package/dist/bundled-compat-BpaDaAAu-DJtrIX6i.mjs +27 -0
- package/dist/bundled-dir-U738ay4K-BxbzrJOo.mjs +1 -0
- package/dist/call-DimWbpgJ-B4pv55RH.mjs +20 -0
- package/dist/channel-bootstrap.runtime-BVclcGv1-CEZ0-JP9.mjs +1 -0
- package/dist/channel-bootstrap.runtime-Cwcr38m2-Dt6QlQkX.mjs +1 -0
- package/dist/chunk-DHbaKqs-.mjs +1 -0
- package/dist/cli.mjs +7 -92
- package/dist/command-format-LSnUCVVF-Dn4h9IOh.mjs +16 -0
- package/dist/config-Bim2pi8a-03N-28sw.mjs +1 -0
- package/dist/delivery-context.shared-j5hC5qb1-BSLQG47q.mjs +1 -0
- package/dist/diagnostic-ClMwNnUA-BMKvPQJT.mjs +1 -0
- package/dist/dist-J5UB83Ws.mjs +601 -0
- package/dist/dist-coestTs9.mjs +5 -0
- package/dist/env-api-keys-Cuz5irWW.mjs +1 -0
- package/dist/event-stream-B7Ei41Bu.mjs +1 -0
- package/dist/facade-loader-DFzIYYt_-4bzFvy-b.mjs +1 -0
- package/dist/from-Ba69_5cR.mjs +14 -0
- package/dist/gateway-method-policy-C7rf0SeV-CTJcMQCE.mjs +1 -0
- package/dist/github-copilot-headers-BfhryVuU.mjs +1 -0
- package/dist/google-ABo-1guT.mjs +1 -0
- package/dist/google-gemini-cli-CGlN1zUA.mjs +2 -0
- package/dist/google-shared-C60sNhwd.mjs +301 -0
- package/dist/google-vertex-De0nAItu.mjs +1 -0
- package/dist/hash-Dw-N8Y9l.mjs +1 -0
- package/dist/headers-Bpsp70B9.mjs +1 -0
- package/dist/home-dir-C44RaPME-B5iLWwCq.mjs +1 -0
- package/dist/ids-BPsM98Uu-CJBJAeVC.mjs +1 -0
- package/dist/image-2w3cApg7-CrpUMCvm.mjs +3 -0
- package/dist/interactive-init-C5MFL5MW.mjs +8 -0
- package/dist/io-CH2g3vsv-JJtUIa_U.mjs +10 -0
- package/dist/jiti-loader-cache-Bat69wam-DNIteTtO.mjs +9 -0
- package/dist/json-file-BQRNuxmK-hRjIgOXI.mjs +1 -0
- package/dist/json-parse-BESd8UAM.mjs +3 -0
- package/dist/jws-YaZ38F_i.mjs +12 -0
- package/dist/lark-cli-provider-BLMxH6CN.mjs +4 -0
- package/dist/lark-logger-xpMKNNtY.mjs +1 -0
- package/dist/live-smoke-DpURW676.mjs +33 -0
- package/dist/load-context-mb7uvLSn-3xYwSnOZ.mjs +1 -0
- package/dist/loader-708jrx4Y-BbJRXNlQ.mjs +4 -0
- package/dist/main.mjs +480 -18553
- package/dist/manifest-registry-_hxKCS2K-OL8KK_o4.mjs +15 -0
- package/dist/mcp-server.mjs +4 -527
- package/dist/message-channel-Bk_YHfQg-n2Hw2Y0L.mjs +1 -0
- package/dist/message-channel-core-DTA--Gjh-CIh10vfo.mjs +1 -0
- package/dist/message.config.runtime-K-k4XOyq-F_h0Cgkl.mjs +1 -0
- package/dist/message.gateway.runtime-DqHOHRTQ-ge4c5p4s.mjs +1 -0
- package/dist/mistral-DyL3Zo1b.mjs +7 -0
- package/dist/model-auth-env-oyg2Hexc-DJbt9J3o.mjs +1 -0
- package/dist/models-config-BmpSQJQF-BL6S5qAo.mjs +1 -0
- package/dist/models-config.runtime-SOhLEw-f.mjs +1 -0
- package/dist/multipart-parser-B9dwXBqu.mjs +2 -0
- package/dist/oauth-25y2wc7K.mjs +75 -0
- package/dist/openai-C-rgGb7X.mjs +16 -0
- package/dist/openai-codex-responses-BbyAPsP1.mjs +7 -0
- package/dist/openai-completions-Bu5qvQzb.mjs +5 -0
- package/dist/openai-responses-pIdwQBc4.mjs +1 -0
- package/dist/openai-responses-shared-DqW1JSux.mjs +10 -0
- package/dist/paths-D6msg0S1-BO4XgM1u.mjs +1 -0
- package/dist/paths-D92DjaZ--DdtJ-zYp.mjs +1 -0
- package/dist/pi-model-discovery-Bd0TWzo8-DvSM0eWu.mjs +1 -0
- package/dist/pi-model-discovery-runtime-PrjWOmsV.mjs +1 -0
- package/dist/pi-tools.before-tool-call.runtime-Bn7uqKie-WPxU5oNX.mjs +2 -0
- package/dist/plugin-auto-enable-DdH3n9V8-Dr_bUXkG.mjs +1 -0
- package/dist/process-scoped-map-B2cWkYET-Co-i-MXA.mjs +1 -0
- package/dist/provider-discovery.runtime-DY0VWQ81.mjs +1 -0
- package/dist/provider-model-compat-CFqcq0it-BUwZENrz.mjs +1 -0
- package/dist/provider-runtime-C8rljsNs-BDvu6FW3.mjs +1 -0
- package/dist/provider-runtime-CT50mNIX-DImw7ZZu.mjs +79 -0
- package/dist/provider-stream-COLujAAo-Dpq1DSIk.mjs +248 -0
- package/dist/providers.runtime-Ba7tOlq7-B4t6ywCr.mjs +1 -0
- package/dist/public-surface-loader-BVl0NQAE-TfJ3izj1.mjs +1 -0
- package/dist/resolve-C33B7eeu-DZM_z6Wr.mjs +1 -0
- package/dist/runtime-Cym-fqI8-1GOIuRRQ.mjs +1 -0
- package/dist/runtime-channel-state-CohMybAh-BBzhl07Q.mjs +1 -0
- package/dist/runtime-snapshot-C54O1-gI-DxusscPf.mjs +1 -0
- package/dist/runtime-state-IBOIXKOx-Cw1GA1td.mjs +1 -0
- package/dist/runtime-web-tools-fallback.runtime-Ca-qn1mj-BsYE2gOd.mjs +1 -0
- package/dist/runtime-web-tools-manifest.runtime-BgxQTjmq-P6MKP9gQ.mjs +1 -0
- package/dist/runtime-web-tools-public-artifacts.runtime-D9qcoWIX-5VoyjouO.mjs +1 -0
- package/dist/session-archive.runtime-B52_5vs4-cU2tYbBz.mjs +1 -0
- package/dist/session-key-Cn2QoOyX-QZeYmbxd.mjs +1 -0
- package/dist/session-transcript-files.fs-DEeFXruQ-CXIAFSsr.mjs +1 -0
- package/dist/src-CCDx_C-U.mjs +3 -0
- package/dist/src-DACmA9V6.mjs +5 -0
- package/dist/subagent-announce-L5WsQatW--rMn240x.mjs +2 -0
- package/dist/subagent-announce.registry.runtime-DiqZyeTs-DNfNHsls.mjs +1 -0
- package/dist/subagent-registry-steer-runtime-DFgZFC0j-XYS1_qwl.mjs +1 -0
- package/dist/subagent-system-prompt-C1qnN--K-CsU4f97T.mjs +23 -0
- package/dist/target-parsing-loaded-DKkb6jJY-B830OA1a.mjs +12 -0
- package/dist/task-registry-delivery-runtime-Dd1CUkZF-B2Hj2k8C.mjs +16 -0
- package/dist/task-registry-delivery-runtime-ragbeVx5-Bdvo2Q5u.mjs +1 -0
- package/dist/thinking-Bh-7MqXz-uApNUe6g.mjs +1 -0
- package/dist/transcript-E_-ISOkD-VTwb782D.mjs +5 -0
- package/dist/transcript.runtime-BqhvZZdl-B4E0TiX5.mjs +1 -0
- package/dist/transform-messages-BTA3xbAI.mjs +1 -0
- package/dist/web-provider-public-artifacts-BlpRwIUS-DbVhDOrY.mjs +1 -0
- package/dist/web-search-providers.runtime--0aUtC3b-Bjh4Bmrz.mjs +1 -0
- package/package.json +1 -2
- package/dist/interactive-init-B6j8j_Ap.mjs +0 -450
- package/dist/lark-cli-provider-7LvtOIF_.mjs +0 -554
- package/dist/lark-logger-D7_pEVQc.mjs +0 -143
- package/dist/live-smoke-nvTUPtrv.mjs +0 -7135
- package/dist/rolldown-runtime-wcPFST8Q.mjs +0 -13
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{a as e,i as t,t as n}from"./chunk-DHbaKqs-.mjs";import{o as r}from"./home-dir-C44RaPME-B5iLWwCq.mjs";import{n as i,t as a}from"./bundled-dir-U738ay4K-BxbzrJOo.mjs";import{createRequire as o}from"node:module";import s from"node:fs";import c from"node:path";import{fileURLToPath as l}from"node:url";const u=[`.ts`,`.mts`,`.js`,`.mjs`,`.cts`,`.cjs`];function d(e){if(c.posix.isAbsolute(e)||c.win32.isAbsolute(e)||e.includes(`\\`))throw Error(`Bundled plugin artifact path must stay plugin-local: ${e}`);let t=e.replace(/^\.\//u,``);if(!t)throw Error(`Bundled plugin artifact path must not be empty`);if(t.split(`/`).some(e=>e.length===0||e===`.`||e===`..`||e.includes(`:`)))throw Error(`Bundled plugin artifact path must stay plugin-local: ${e}`);return t}function f(e){let t=d(e.artifactBasename).replace(/\.js$/u,``);for(let n of u){let r=c.resolve(e.sourceRoot,e.dirName,`${t}${n}`);if(s.existsSync(r))return r}return null}function p(e){let t=c.resolve(e.bundledPluginsDir),n=c.resolve(e.rootDir);return[c.join(n,`dist`,`extensions`),c.join(n,`dist-runtime`,`extensions`)].includes(t)?f({sourceRoot:c.join(n,`extensions`),dirName:e.dirName,artifactBasename:e.artifactBasename}):null}function m(e){let t=d(e.artifactBasename),n=e.bundledPluginsDir??a(e.env??process.env);if(n){let r=c.resolve(n,e.dirName),i=c.join(r,t);return s.existsSync(i)?i:f({sourceRoot:n,dirName:e.dirName,artifactBasename:t})??p({rootDir:e.rootDir,bundledPluginsDir:n,dirName:e.dirName,artifactBasename:t})}for(let n of[c.resolve(e.rootDir,`dist`,`extensions`,e.dirName,t),c.resolve(e.rootDir,`dist-runtime`,`extensions`,e.dirName,t)])if(s.existsSync(n))return n;return f({sourceRoot:c.resolve(e.rootDir,`extensions`),dirName:e.dirName,artifactBasename:t})}const h=process.argv[1];function g(e){return process.platform===`win32`?e.replace(/\\/g,`/`):e}function _(e={}){return e.modulePath??l(e.moduleUrl??import.meta.url)}function v(e){try{let t=s.readFileSync(c.join(e,`package.json`),`utf-8`);return JSON.parse(t)}catch{return null}}function y(e){return/^[A-Za-z0-9][A-Za-z0-9_-]*$/.test(e)}function ee(e){return Object.keys(e.exports??{}).filter(e=>e.startsWith(`./plugin-sdk/`)).map(e=>e.slice(13)).filter(e=>y(e)).toSorted()}function b(e){let t=e.packageJson.exports??{};if(!Object.prototype.hasOwnProperty.call(t,`./plugin-sdk`))return!1;let n=Object.prototype.hasOwnProperty.call(t,`./cli-entry`),i=typeof e.packageJson.bin==`string`&&r(e.packageJson.bin).includes(`openclaw`)||typeof e.packageJson.bin==`object`&&e.packageJson.bin!==null&&typeof e.packageJson.bin.openclaw==`string`,a=s.existsSync(c.join(e.packageRoot,`openclaw.mjs`));return n||i||a}function x(e){let t=v(e);if(!t||!b({packageRoot:e,packageJson:t}))return null;let n=ee(t);return n.length>0?n:null}function S(e){if(!e.argv1)return null;let t=i({cwd:e.cwd,argv1:e.argv1});if(!t)return null;let n=v(t);return n&&b({packageRoot:t,packageJson:n})?t:null}function te(e,t=12){let n=c.resolve(e);for(let e=0;e<t;e+=1){if(x(n))return n;let e=c.dirname(n);if(e===n)break;n=e}return null}function C(e){let t=e.cwd??c.dirname(e.modulePath),n=i({cwd:t});if(n)return n;let r=e.argv1??process.argv[1],a=e.moduleUrl??(e.modulePath?void 0:import.meta.url);return i({cwd:t,...r?{argv1:r}:{},...a?{moduleUrl:a}:{}})}function ne(e){let t=e.cwd??c.dirname(e.modulePath),n=i({cwd:t}),r=S({cwd:t,argv1:e.argv1})??(e.moduleUrl?i({cwd:t,moduleUrl:e.moduleUrl}):null);return n??r??te(c.dirname(e.modulePath))??(e.cwd?te(e.cwd):null)??te(process.cwd())}function re(e){return e.pluginSdkResolution===`dist`?[`dist`,`src`]:e.pluginSdkResolution===`src`?[`src`,`dist`]:e.modulePath.replace(/\\/g,`/`).includes(`/dist/`)||e.isProduction?[`dist`,`src`]:[`src`,`dist`]}function w(e){let t=re({modulePath:e.modulePath,isProduction:!0,pluginSdkResolution:e.pluginSdkResolution}),n=ne(e);if(n){let r={src:c.join(n,`src`,`plugin-sdk`,e.srcFile),dist:c.join(n,`dist`,`plugin-sdk`,e.distFile)};return t.map(e=>r[e])}let r=c.dirname(e.modulePath),i=[];for(let n=0;n<6;n+=1){let n={src:c.join(r,`src`,`plugin-sdk`,e.srcFile),dist:c.join(r,`dist`,`plugin-sdk`,e.distFile)};for(let e of t)i.push(n[e]);let a=c.dirname(r);if(a===r)break;r=a}return i}function ie(e){try{let t=_(e);for(let n of w({srcFile:e.srcFile,distFile:e.distFile,modulePath:t,argv1:e.argv1,cwd:e.cwd,moduleUrl:e.moduleUrl,pluginSdkResolution:e.pluginSdkResolution}))if(s.existsSync(n))return n}catch{}return null}const ae=new Map,oe=new Map,T=[`openclaw/plugin-sdk`,`@openclaw/plugin-sdk`],se=[`.ts`,`.mts`,`.js`,`.mjs`,`.cts`,`.cjs`],ce=/(?:\bfrom\s*["']|\bimport\s*\(\s*["']|\brequire\s*\(\s*["'])(\.{1,2}\/[^"']+)["']/g;function E(e){if(!s.existsSync(e))return!1;switch(r(c.extname(e))){case`.js`:case`.mjs`:case`.cjs`:break;default:return!0}try{let t=s.readFileSync(e,`utf-8`);for(let n of t.matchAll(ce)){let t=n[1];if(!(!t||s.existsSync(c.resolve(c.dirname(e),t))))return!1}}catch{return!1}return!0}function D(e){try{let t=s.readFileSync(c.join(e,`scripts`,`lib`,`plugin-sdk-private-local-only-subpaths.json`),`utf-8`),n=JSON.parse(t);return Array.isArray(n)?n.filter(e=>y(e)):[]}catch{return[]}}function le(){return process.env.OPENCLAW_ENABLE_PRIVATE_QA_CLI===`1`}function ue(e,t){return E(c.join(e,`dist`,`plugin-sdk`,`${t}.js`))?!0:se.some(n=>s.existsSync(c.join(e,`src`,`plugin-sdk`,`${t}${n}`)))}function de(e){try{let t=c.join(e,`dist`,`plugin-sdk`);return new Set(s.readdirSync(t,{withFileTypes:!0}).filter(e=>e.isFile()&&e.name.endsWith(`.js`)).map(e=>e.name.slice(0,-3)).filter(e=>y(e)))}catch{return new Set}}function fe(e){return le()?D(e).filter(t=>ue(e,t)):[]}function pe(e={}){let t=ne({modulePath:e.modulePath??l(import.meta.url),argv1:e.argv1,moduleUrl:e.moduleUrl});if(!t)return[];let n=`${t}::privateQa=${le()?`1`:`0`}`,r=ae.get(n);if(r)return r;let i=[...new Set([...x(t)??[],...fe(t)])].toSorted();return ae.set(n,i),i}function me(e={}){let t=e.modulePath??l(import.meta.url),n=ne({modulePath:t,argv1:e.argv1,moduleUrl:e.moduleUrl});if(!n)return{};let r=re({modulePath:t,isProduction:!0,pluginSdkResolution:e.pluginSdkResolution}),i=`${n}::${r.join(`,`)}::privateQa=${le()?`1`:`0`}`,a=oe.get(i);if(a)return a;let o={},u=r.includes(`dist`)?de(n):new Set;for(let i of pe({modulePath:t,argv1:e.argv1,moduleUrl:e.moduleUrl,pluginSdkResolution:e.pluginSdkResolution}))for(let e of r){if(e===`dist`){if(!u.has(i))continue;let e=c.join(n,`dist`,`plugin-sdk`,`${i}.js`);if(E(e)){for(let t of T)o[`${t}/${i}`]=e;break}continue}for(let e of se){let t=c.join(n,`src`,`plugin-sdk`,`${i}${e}`);if(s.existsSync(t)){for(let e of T)o[`${e}/${i}`]=t;break}}if(Object.prototype.hasOwnProperty.call(o,`openclaw/plugin-sdk/${i}`))break}return oe.set(i,o),o}function he(e={}){try{let t=_(e),n=C({...e,modulePath:t});if(!n)return null;let r=re({modulePath:t,isProduction:!0,pluginSdkResolution:e.pluginSdkResolution});for(let e of r){if(e===`dist`){let e=c.join(n,`dist`,`extensionAPI.js`);if(s.existsSync(e))return e;continue}for(let e of se){let t=c.join(n,`src`,`extensionAPI${e}`);if(s.existsSync(t))return t}}}catch{}return null}const ge=Symbol.for(`pathe:normalizedAlias`),_e=new Set([`/`,`\\`,void 0]),ve=new Map,O=new Map,k=new Map;function A(e,t,n){for(e.has(t)&&e.delete(t),e.set(t,n);e.size>512;){let t=e.keys().next().value;if(typeof t!=`string`)break;e.delete(t)}}function ye(e){return!!e[ge]}function be(e){return JSON.stringify(Object.entries(e).toSorted(([e],[t])=>e.localeCompare(t)))}function j(e){if(ye(e))return e;let t=be(e),n=O.get(t);if(n)return n;let r=Object.fromEntries(Object.entries(e).toSorted(([e],[t])=>t.split(`/`).length-e.split(`/`).length));for(let e in r)for(let t in r)t===e||e.startsWith(t)||!r[e]?.startsWith(t)||!_e.has(r[e]?.[t.length])||(r[e]=r[t]+r[e].slice(t.length));return Object.defineProperty(r,ge,{value:!0,enumerable:!1}),A(O,t,r),r}function xe(e){return[e.modulePath,e.argv1??``,e.moduleUrl??``,e.pluginSdkResolution,process.cwd(),`production`,le()?`private-qa`:`public`].join(`\0`)}function Se(e){return[xe({modulePath:e.modulePath,argv1:e.argv1,moduleUrl:e.moduleUrl,pluginSdkResolution:e.pluginSdkResolution??`auto`}),e.preferBuiltDist===!0?`prefer-built-dist`:`default-dist`].join(`\0`)}function Ce(e,t=h,n,r=`auto`){let i=xe({modulePath:e,argv1:t,moduleUrl:n,pluginSdkResolution:r}),a=ve.get(i);if(a)return a;let o=ie({srcFile:`root-alias.cjs`,distFile:`root-alias.cjs`,modulePath:e,argv1:t,moduleUrl:n,pluginSdkResolution:r}),s=he({modulePath:e,pluginSdkResolution:r}),c={...s?{"openclaw/extension-api":g(s)}:{},...o?Object.fromEntries(T.map(e=>[e,g(o)])):{},...Object.fromEntries(Object.entries(me({modulePath:e,argv1:t,moduleUrl:n,pluginSdkResolution:r})).map(([e,t])=>[e,g(t)]))};return A(ve,i,c),c}function we(e={}){try{let t=_(e),n=re({modulePath:t,isProduction:!0,pluginSdkResolution:e.pluginSdkResolution}),r=C({...e,modulePath:t}),i=r?n.map(e=>e===`src`?c.join(r,`src`,`plugins`,`runtime`,`index.ts`):c.join(r,`dist`,`plugins`,`runtime`,`index.js`)):[c.join(c.dirname(t),`runtime`,`index.ts`),c.join(c.dirname(t),`runtime`,`index.js`)];for(let e of i)if(s.existsSync(e))return e}catch{}return null}function Te(e){let t=Object.keys(e).length>0,n=t?j(e):e;return{interopDefault:!0,tryNative:!0,extensions:[`.ts`,`.tsx`,`.mts`,`.cts`,`.mtsx`,`.ctsx`,`.js`,`.mjs`,`.cjs`,`.json`],...t?{alias:n}:{}}}function Ee(){return typeof process.versions.bun!=`string`&&process.platform!==`win32`}function De(e){return e.replace(/\\/g,`/`).includes(`/dist/extensions/`)}function M(e){if(!Ee())return!1;switch(r(c.extname(e))){case`.js`:case`.mjs`:case`.cjs`:case`.json`:return!0;default:return!1}}function N(e,t){return De(e)?M(e):M(e)||Ee()&&t?.preferBuiltDist===!0&&e.includes(`${c.sep}dist${c.sep}`)}function P(e){return JSON.stringify({tryNative:e.tryNative,aliasMap:Object.entries(e.aliasMap).toSorted(([e],[t])=>e.localeCompare(t))})}function F(e){let t=Se(e),n=k.get(t);if(n)return n;let r=N(e.modulePath,e.preferBuiltDist?{preferBuiltDist:!0}:{}),i=Ce(e.modulePath,e.argv1,e.moduleUrl,e.pluginSdkResolution),a={tryNative:r,aliasMap:i,cacheKey:P({tryNative:r,aliasMap:i})};return A(k,t,a),a}function I(e){let t=c.resolve(e.modulePath);return[e.bundledPluginsDir?c.resolve(e.bundledPluginsDir):null,c.join(e.openClawPackageRoot,`extensions`),c.join(e.openClawPackageRoot,`dist`,`extensions`),c.join(e.openClawPackageRoot,`dist-runtime`,`extensions`)].filter(e=>typeof e==`string`).some(e=>t===e||t.startsWith(`${e}${c.sep}`))}var Oe=e(n(((e,n)=>{(()=>{var e={"./node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist lazy recursive":function(e){function t(e){return Promise.resolve().then(function(){var t=Error(`Cannot find module '`+e+`'`);throw t.code=`MODULE_NOT_FOUND`,t})}t.keys=()=>[],t.resolve=t,t.id=`./node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist lazy recursive`,e.exports=t}},r={};function i(t){var n=r[t];if(n!==void 0)return n.exports;var a=r[t]={exports:{}};return e[t](a,a.exports,i),a.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var a={};(()=>{i.d(a,{default:()=>Gr});let e=t(`node:os`);var n=[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],r=[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],o=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,s={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`},c=`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`,l={5:c,"5module":c+` export import`,6:c+` const class extends export import super`},u=/^in(stanceof)?$/,d=RegExp(`[`+o+`]`),f=RegExp(`[`+o+`·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]`);function p(e,t){for(var n=65536,r=0;r<t.length;r+=2){if((n+=t[r])>e)return!1;if((n+=t[r+1])>=e)return!0}return!1}function m(e,t){return e<65?e===36:e<91||(e<97?e===95:e<123||(e<=65535?e>=170&&d.test(String.fromCharCode(e)):!1!==t&&p(e,r)))}function h(e,t){return e<48?e===36:e<58||!(e<65)&&(e<91||(e<97?e===95:e<123||(e<=65535?e>=170&&f.test(String.fromCharCode(e)):!1!==t&&(p(e,r)||p(e,n)))))}var g=function(e,t){t===void 0&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function _(e,t){return new g(e,{beforeExpr:!0,binop:t})}var v={beforeExpr:!0},y={startsExpr:!0},ee={};function b(e,t){return t===void 0&&(t={}),t.keyword=e,ee[e]=new g(e,t)}var x={num:new g(`num`,y),regexp:new g(`regexp`,y),string:new g(`string`,y),name:new g(`name`,y),privateId:new g(`privateId`,y),eof:new g(`eof`),bracketL:new g(`[`,{beforeExpr:!0,startsExpr:!0}),bracketR:new g(`]`),braceL:new g(`{`,{beforeExpr:!0,startsExpr:!0}),braceR:new g(`}`),parenL:new g(`(`,{beforeExpr:!0,startsExpr:!0}),parenR:new g(`)`),comma:new g(`,`,v),semi:new g(`;`,v),colon:new g(`:`,v),dot:new g(`.`),question:new g(`?`,v),questionDot:new g(`?.`),arrow:new g(`=>`,v),template:new g(`template`),invalidTemplate:new g(`invalidTemplate`),ellipsis:new g(`...`,v),backQuote:new g("`",y),dollarBraceL:new g("${",{beforeExpr:!0,startsExpr:!0}),eq:new g(`=`,{beforeExpr:!0,isAssign:!0}),assign:new g(`_=`,{beforeExpr:!0,isAssign:!0}),incDec:new g(`++/--`,{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new g(`!/~`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:_(`||`,1),logicalAND:_(`&&`,2),bitwiseOR:_(`|`,3),bitwiseXOR:_(`^`,4),bitwiseAND:_(`&`,5),equality:_(`==/!=/===/!==`,6),relational:_(`</>/<=/>=`,7),bitShift:_(`<</>>/>>>`,8),plusMin:new g(`+/-`,{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:_(`%`,10),star:_(`*`,10),slash:_(`/`,10),starstar:new g(`**`,{beforeExpr:!0}),coalesce:_(`??`,1),_break:b(`break`),_case:b(`case`,v),_catch:b(`catch`),_continue:b(`continue`),_debugger:b(`debugger`),_default:b(`default`,v),_do:b(`do`,{isLoop:!0,beforeExpr:!0}),_else:b(`else`,v),_finally:b(`finally`),_for:b(`for`,{isLoop:!0}),_function:b(`function`,y),_if:b(`if`),_return:b(`return`,v),_switch:b(`switch`),_throw:b(`throw`,v),_try:b(`try`),_var:b(`var`),_const:b(`const`),_while:b(`while`,{isLoop:!0}),_with:b(`with`),_new:b(`new`,{beforeExpr:!0,startsExpr:!0}),_this:b(`this`,y),_super:b(`super`,y),_class:b(`class`,y),_extends:b(`extends`,v),_export:b(`export`),_import:b(`import`,y),_null:b(`null`,y),_true:b(`true`,y),_false:b(`false`,y),_in:b(`in`,{beforeExpr:!0,binop:7}),_instanceof:b(`instanceof`,{beforeExpr:!0,binop:7}),_typeof:b(`typeof`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b(`void`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b(`delete`,{beforeExpr:!0,prefix:!0,startsExpr:!0})},S=/\r\n?|\n|\u2028|\u2029/,te=new RegExp(S.source,`g`);function C(e){return e===10||e===13||e===8232||e===8233}function ne(e,t,n){n===void 0&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(C(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var re=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,w=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ie=Object.prototype,ae=ie.hasOwnProperty,oe=ie.toString,T=Object.hasOwn||function(e,t){return ae.call(e,t)},se=Array.isArray||function(e){return oe.call(e)===`[object Array]`},ce=Object.create(null);function E(e){return ce[e]||(ce[e]=RegExp(`^(?:`+e.replace(/ /g,`|`)+`)$`))}function D(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}var le=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ue=function(e,t){this.line=e,this.column=t};ue.prototype.offset=function(e){return new ue(this.line,this.column+e)};var de=function(e,t,n){this.start=t,this.end=n,e.sourceFile!==null&&(this.source=e.sourceFile)};function fe(e,t){for(var n=1,r=0;;){var i=ne(e,r,t);if(i<0)return new ue(n,t-r);++n,r=i}}var pe={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},me=!1;function he(e){var t={};for(var n in pe)t[n]=e&&T(e,n)?e[n]:pe[n];if(t.ecmaVersion===`latest`?t.ecmaVersion=1e8:t.ecmaVersion==null?(!me&&typeof console==`object`&&console.warn&&(me=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
2
|
+
Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved??=t.ecmaVersion<5,e&&e.allowHashBang!=null||(t.allowHashBang=t.ecmaVersion>=14),se(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return se(t.onComment)&&(t.onComment=function(e,t){return function(n,r,i,a,o,s){var c={type:n?`Block`:`Line`,value:r,start:i,end:a};e.locations&&(c.loc=new de(this,o,s)),e.ranges&&(c.range=[i,a]),t.push(c)}}(t,t.onComment)),t}var ge=256,_e=259;function ve(e,t){return 2|(e?4:0)|(t?8:0)}var O=function(e,t,n){this.options=e=he(e),this.sourceFile=e.sourceFile,this.keywords=E(l[e.ecmaVersion>=6?6:e.sourceType===`module`?`5module`:5]);var r=``;!0!==e.allowReserved&&(r=s[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType===`module`&&(r+=` await`)),this.reservedWords=E(r);var i=(r?r+` `:``)+s.strict;this.reservedWordsStrict=E(i),this.reservedWordsStrictBind=E(i+` `+s.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf(`
|
|
3
|
+
`,n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(S).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=x.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=e.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&&e.allowHashBang&&this.input.slice(0,2)===`#!`&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},k={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}};O.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},k.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},k.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},k.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},k.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(768&t)return!1;if(2&t)return(4&t)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},k.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},k.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},k.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},k.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(768&t||2&t&&!(16&t))return!0}return!1},k.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&ge)>0},O.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},O.parse=function(e,t){return new this(t,e).parse()},O.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},O.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(O.prototype,k);var A=O.prototype,ye=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;A.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){w.lastIndex=e,e+=w.exec(this.input)[0].length;var t=ye.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])===`use strict`){w.lastIndex=e+t[0].length;var n=w.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===`;`||i===`}`||S.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i===`!`&&this.input.charAt(r+1)===`=`)}e+=t[0].length,w.lastIndex=e,e+=w.exec(this.input)[0].length,this.input[e]===`;`&&e++}},A.eat=function(e){return this.type===e&&(this.next(),!0)},A.isContextual=function(e){return this.type===x.name&&this.value===e&&!this.containsEsc},A.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},A.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},A.canInsertSemicolon=function(){return this.type===x.eof||this.type===x.braceR||S.test(this.input.slice(this.lastTokEnd,this.start))},A.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},A.semicolon=function(){this.eat(x.semi)||this.insertSemicolon()||this.unexpected()},A.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},A.expect=function(e){this.eat(e)||this.unexpected()},A.unexpected=function(e){this.raise(e??this.start,`Unexpected token`)};var be=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};A.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,`Comma is not permitted after the rest element`);var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?`Assigning to rvalue`:`Parenthesized pattern`)}},A.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,`Shorthand property assignments are valid only in destructuring patterns`),r>=0&&this.raiseRecoverable(r,`Redefinition of __proto__ property`)},A.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`)},A.isSimpleAssignTarget=function(e){return e.type===`ParenthesizedExpression`?this.isSimpleAssignTarget(e.expression):e.type===`Identifier`||e.type===`MemberExpression`};var j=O.prototype;j.parseTopLevel=function(e){var t=Object.create(null);for(e.body||=[];this.type!==x.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var a=i[r];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 xe={kind:`loop`},Se={kind:`switch`};j.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual(`let`))return!1;w.lastIndex=this.pos;var t=w.exec(this.input),n=this.pos+t[0].length,r=this.input.charCodeAt(n);if(r===91||r===92)return!0;if(e)return!1;if(r===123||r>55295&&r<56320)return!0;if(m(r,!0)){for(var i=n+1;h(r=this.input.charCodeAt(i),!0);)++i;if(r===92||r>55295&&r<56320)return!0;var a=this.input.slice(n,i);if(!u.test(a))return!0}return!1},j.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual(`async`))return!1;w.lastIndex=this.pos;var e,t=w.exec(this.input),n=this.pos+t[0].length;return!(S.test(this.input.slice(this.pos,n))||this.input.slice(n,n+8)!==`function`||n+8!==this.input.length&&(h(e=this.input.charCodeAt(n+8))||e>55295&&e<56320))},j.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?`await`:`using`))return!1;w.lastIndex=this.pos;var n=w.exec(this.input),r=this.pos+n[0].length;if(S.test(this.input.slice(this.pos,r)))return!1;if(e){var i,a=r+5;if(this.input.slice(r,a)!==`using`||a===this.input.length||h(i=this.input.charCodeAt(a))||i>55295&&i<56320)return!1;w.lastIndex=a;var o=w.exec(this.input);if(o&&S.test(this.input.slice(a,a+o[0].length)))return!1}if(t){var s,c=r+2;if(!(this.input.slice(r,c)!==`of`||c!==this.input.length&&(h(s=this.input.charCodeAt(c))||s>55295&&s<56320)))return!1}var l=this.input.charCodeAt(r);return m(l,!0)||l===92},j.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},j.isUsing=function(e){return this.isUsingKeyword(!1,e)},j.parseStatement=function(e,t,n){var r,i=this.type,a=this.startNode();switch(this.isLet(e)&&(i=x._var,r=`let`),i){case x._break:case x._continue:return this.parseBreakContinueStatement(a,i.keyword);case x._debugger:return this.parseDebuggerStatement(a);case x._do:return this.parseDoStatement(a);case x._for:return this.parseForStatement(a);case x._function:return e&&(this.strict||e!==`if`&&e!==`label`)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(a,!1,!e);case x._class:return e&&this.unexpected(),this.parseClass(a,!0);case x._if:return this.parseIfStatement(a);case x._return:return this.parseReturnStatement(a);case x._switch:return this.parseSwitchStatement(a);case x._throw:return this.parseThrowStatement(a);case x._try:return this.parseTryStatement(a);case x._const:case x._var:return r||=this.value,e&&r!==`var`&&this.unexpected(),this.parseVarStatement(a,r);case x._while:return this.parseWhileStatement(a);case x._with:return this.parseWithStatement(a);case x.braceL:return this.parseBlock(!0,a);case x.semi:return this.parseEmptyStatement(a);case x._export:case x._import:if(this.options.ecmaVersion>10&&i===x._import){w.lastIndex=this.pos;var o=w.exec(this.input),s=this.pos+o[0].length,c=this.input.charCodeAt(s);if(c===40||c===46)return this.parseExpressionStatement(a,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'`)),i===x._import?this.parseImport(a):this.parseExport(a,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(a,!0,!e);var l=this.isAwaitUsing(!1)?`await using`:this.isUsing(!1)?`using`:null;if(l)return t&&this.options.sourceType===`script`&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),l===`await using`&&(this.canAwait||this.raise(this.start,`Await using cannot appear outside of async function`),this.next()),this.next(),this.parseVar(a,!1,l),this.semicolon(),this.finishNode(a,`VariableDeclaration`);var u=this.value,d=this.parseExpression();return i===x.name&&d.type===`Identifier`&&this.eat(x.colon)?this.parseLabeledStatement(a,u,d,e):this.parseExpressionStatement(a,d)}},j.parseBreakContinueStatement=function(e,t){var n=t===`break`;this.next(),this.eat(x.semi)||this.insertSemicolon()?e.label=null:this.type===x.name?(e.label=this.parseIdent(),this.semicolon()):this.unexpected();for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(n||i.kind===`loop`)||e.label&&n))break}return r===this.labels.length&&this.raise(e.start,`Unsyntactic `+t),this.finishNode(e,n?`BreakStatement`:`ContinueStatement`)},j.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,`DebuggerStatement`)},j.parseDoStatement=function(e){return this.next(),this.labels.push(xe),e.body=this.parseStatement(`do`),this.labels.pop(),this.expect(x._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(x.semi):this.semicolon(),this.finishNode(e,`DoWhileStatement`)},j.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual(`await`)?this.lastTokStart:-1;if(this.labels.push(xe),this.enterScope(0),this.expect(x.parenL),this.type===x.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===x._var||this.type===x._const||n){var r=this.startNode(),i=n?`let`:this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,`VariableDeclaration`),this.parseForAfterInit(e,r,t)}var a=this.isContextual(`let`),o=!1,s=this.isUsing(!0)?`using`:this.isAwaitUsing(!0)?`await using`:null;if(s){var c=this.startNode();return this.next(),s===`await using`&&this.next(),this.parseVar(c,!0,s),this.finishNode(c,`VariableDeclaration`),this.parseForAfterInit(e,c,t)}var l=this.containsEsc,u=new be,d=this.start,f=t>-1?this.parseExprSubscripts(u,`await`):this.parseExpression(!0,u);return this.type===x._in||(o=this.options.ecmaVersion>=6&&this.isContextual(`of`))?(t>-1?(this.type===x._in&&this.unexpected(t),e.await=!0):o&&this.options.ecmaVersion>=8&&(f.start!==d||l||f.type!==`Identifier`||f.name!==`async`?this.options.ecmaVersion>=9&&(e.await=!1):this.unexpected()),a&&o&&this.raise(f.start,`The left-hand side of a for-of loop may not start with 'let'.`),this.toAssignable(f,!1,u),this.checkLValPattern(f),this.parseForIn(e,f)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,f))},j.parseForAfterInit=function(e,t,n){return(this.type===x._in||this.options.ecmaVersion>=6&&this.isContextual(`of`))&&t.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===x._in?n>-1&&this.unexpected(n):e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))},j.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,we|(n?0:Te),!1,t)},j.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(`if`),e.alternate=this.eat(x._else)?this.parseStatement(`if`):null,this.finishNode(e,`IfStatement`)},j.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,`'return' outside of function`),this.next(),this.eat(x.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,`ReturnStatement`)},j.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(x.braceL),this.labels.push(Se),this.enterScope(0);for(var n=!1;this.type!==x.braceR;)if(this.type===x._case||this.type===x._default){var r=this.type===x._case;t&&this.finishNode(t,`SwitchCase`),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,`Multiple default clauses`),n=!0,t.test=null),this.expect(x.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`)},j.parseThrowStatement=function(e){return this.next(),S.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 Ce=[];j.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type===`Identifier`;return this.enterScope(t?32:0),this.checkLValPattern(e,t?4:2),this.expect(x.parenR),e},j.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===x._catch){var t=this.startNode();this.next(),this.eat(x.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(x._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,`Missing catch or finally clause`),this.finishNode(e,`TryStatement`)},j.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,`VariableDeclaration`)},j.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(xe),e.body=this.parseStatement(`while`),this.labels.pop(),this.finishNode(e,`WhileStatement`)},j.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`)},j.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,`EmptyStatement`)},j.parseLabeledStatement=function(e,t,n,r){for(var i=0,a=this.labels;i<a.length;i+=1)a[i].name===t&&this.raise(n.start,`Label '`+t+`' is already declared`);for(var o=this.type.isLoop?`loop`:this.type===x._switch?`switch`:null,s=this.labels.length-1;s>=0;s--){var c=this.labels[s];if(c.statementStart!==e.start)break;c.statementStart=this.start,c.kind=o}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf(`label`)===-1?r+`label`:r:`label`),this.labels.pop(),e.label=n,this.finishNode(e,`LabeledStatement`)},j.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,`ExpressionStatement`)},j.parseBlock=function(e,t,n){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(x.braceL),e&&this.enterScope(0);this.type!==x.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,`BlockStatement`)},j.parseFor=function(e,t){return e.init=t,this.expect(x.semi),e.test=this.type===x.semi?null:this.parseExpression(),this.expect(x.semi),e.update=this.type===x.parenR?null:this.parseExpression(),this.expect(x.parenR),e.body=this.parseStatement(`for`),this.exitScope(),this.labels.pop(),this.finishNode(e,`ForStatement`)},j.parseForIn=function(e,t){var n=this.type===x._in;return this.next(),t.type===`VariableDeclaration`&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!==`var`||t.declarations[0].id.type!==`Identifier`)&&this.raise(t.start,(n?`for-in`:`for-of`)+` loop variable declaration may not have an initializer`),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(x.parenR),e.body=this.parseStatement(`for`),this.exitScope(),this.labels.pop(),this.finishNode(e,n?`ForInStatement`:`ForOfStatement`)},j.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(x.eq)?i.init=this.parseMaybeAssign(t):r||n!==`const`||this.type===x._in||this.options.ecmaVersion>=6&&this.isContextual(`of`)?r||n!==`using`&&n!==`await using`||!(this.options.ecmaVersion>=17)||this.type===x._in||this.isContextual(`of`)?r||i.id.type===`Identifier`||t&&(this.type===x._in||this.isContextual(`of`))?i.init=null:this.raise(this.lastTokEnd,`Complex binding patterns require an initialization value`):this.raise(this.lastTokEnd,`Missing initializer in `+n+` declaration`):this.unexpected(),e.declarations.push(this.finishNode(i,`VariableDeclarator`)),!this.eat(x.comma))break}return e},j.parseVarId=function(e,t){e.id=t===`using`||t===`await using`?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t===`var`?1:2,!1)};var we=1,Te=2;function Ee(e,t){var n=t.key.name,r=e[n],i=`true`;return t.type!==`MethodDefinition`||t.kind!==`get`&&t.kind!==`set`||(i=(t.static?`s`:`i`)+t.kind),r===`iget`&&i===`iset`||r===`iset`&&i===`iget`||r===`sget`&&i===`sset`||r===`sset`&&i===`sget`?(e[n]=`true`,!1):!!r||(e[n]=i,!1)}function De(e,t){var n=e.computed,r=e.key;return!n&&(r.type===`Identifier`&&r.name===t||r.type===`Literal`&&r.value===t)}j.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===x.star&&t&Te&&this.unexpected(),e.generator=this.eat(x.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&we&&(e.id=4&t&&this.type!==x.name?null:this.parseIdent(),!e.id||t&Te||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var a=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ve(e.async,e.generator)),t&we||(e.id=this.type===x.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=a,this.awaitPos=o,this.awaitIdentPos=s,this.finishNode(e,t&we?`FunctionDeclaration`:`FunctionExpression`)},j.parseFunctionParams=function(e){this.expect(x.parenL),e.params=this.parseBindingList(x.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},j.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),a=!1;for(i.body=[],this.expect(x.braceL);this.type!==x.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`&&Ee(r,o)&&this.raiseRecoverable(o.key.start,`Identifier '#`+o.key.name+`' has already been declared`))}return this.strict=n,this.next(),e.body=this.finishNode(i,`ClassBody`),this.exitClassBody(),this.finishNode(e,t?`ClassDeclaration`:`ClassExpression`)},j.parseClassElement=function(e){if(this.eat(x.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r=``,i=!1,a=!1,o=`method`,s=!1;if(this.eatContextual(`static`)){if(t>=13&&this.eat(x.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===x.star?s=!0:r=`static`}if(n.static=s,!r&&t>=8&&this.eatContextual(`async`)&&(!this.isClassElementNameStart()&&this.type!==x.star||this.canInsertSemicolon()?r=`async`:a=!0),!r&&(t>=9||!a)&&this.eat(x.star)&&(i=!0),!r&&!a&&!i){var c=this.value;(this.eatContextual(`get`)||this.eatContextual(`set`))&&(this.isClassElementNameStart()?o=c:r=c)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,`Identifier`)):this.parseClassElementName(n),t<13||this.type===x.parenL||o!==`method`||i||a){var l=!n.static&&De(n,`constructor`),u=l&&e;l&&o!==`method`&&this.raise(n.key.start,`Constructor can't have get/set modifier`),n.kind=l?`constructor`:o,this.parseClassMethod(n,i,a,u)}else this.parseClassField(n);return n},j.isClassElementNameStart=function(){return this.type===x.name||this.type===x.privateId||this.type===x.num||this.type===x.string||this.type===x.bracketL||this.type.keyword},j.parseClassElementName=function(e){this.type===x.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)},j.parseClassMethod=function(e,t,n,r){var i=e.key;e.kind===`constructor`?(t&&this.raise(i.start,`Constructor can't be a generator`),n&&this.raise(i.start,`Constructor can't be an async method`)):e.static&&De(e,`prototype`)&&this.raise(i.start,`Classes may not have a static property named prototype`);var a=e.value=this.parseMethod(t,n,r);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`)},j.parseClassField=function(e){return De(e,`constructor`)?this.raise(e.key.start,`Classes can't have a field named 'constructor'`):e.static&&De(e,`prototype`)&&this.raise(e.key.start,`Classes can't have a static field named 'prototype'`),this.eat(x.eq)?(this.enterScope(576),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,`PropertyDefinition`)},j.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==x.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,`StaticBlock`)},j.parseClassId=function(e,t){this.type===x.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},j.parseClassSuper=function(e){e.superClass=this.eat(x._extends)?this.parseExprSubscripts(null,!1):null},j.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},j.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=r===0?null:this.privateNameStack[r-1],a=0;a<n.length;++a){var o=n[a];T(t,o.name)||(i?i.used.push(o):this.raiseRecoverable(o.start,`Private field '#`+o.name+`' must be declared in an enclosing class`))}},j.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!==x.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,`ExportAllDeclaration`)},j.parseExport=function(e,t){if(this.next(),this.eat(x.star))return this.parseExportAllDeclaration(e,t);if(this.eat(x._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!==x.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];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`)},j.parseExportDeclaration=function(e){return this.parseStatement(null)},j.parseExportDefaultDeclaration=function(){var e;if(this.type===x._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,4|we,!1,e)}if(this.type===x._class){var n=this.startNode();return this.parseClass(n,`nullableID`)}var r=this.parseMaybeAssign();return this.semicolon(),r},j.checkExport=function(e,t,n){e&&(typeof t!=`string`&&(t=t.type===`Identifier`?t.name:t.value),T(e,t)&&this.raiseRecoverable(n,`Duplicate export '`+t+`'`),e[t]=!0)},j.checkPatternExport=function(e,t){var n=t.type;if(n===`Identifier`)this.checkExport(e,t,t.start);else if(n===`ObjectPattern`)for(var r=0,i=t.properties;r<i.length;r+=1){var a=i[r];this.checkPatternExport(e,a)}else if(n===`ArrayPattern`)for(var o=0,s=t.elements;o<s.length;o+=1){var c=s[o];c&&this.checkPatternExport(e,c)}else n===`Property`?this.checkPatternExport(e,t.value):n===`AssignmentPattern`?this.checkPatternExport(e,t.left):n===`RestElement`&&this.checkPatternExport(e,t.argument)},j.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},j.shouldParseExportStatement=function(){return this.type.keyword===`var`||this.type.keyword===`const`||this.type.keyword===`class`||this.type.keyword===`function`||this.isLet()||this.isAsyncFunction()},j.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`)},j.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(x.braceL);!this.eat(x.braceR);){if(n)n=!1;else if(this.expect(x.comma),this.afterTrailingComma(x.braceR))break;t.push(this.parseExportSpecifier(e))}return t},j.parseImport=function(e){return this.next(),this.type===x.string?(e.specifiers=Ce,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual(`from`),e.source=this.type===x.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,`ImportDeclaration`)},j.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,2),this.finishNode(e,`ImportSpecifier`)},j.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,`ImportDefaultSpecifier`)},j.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual(`as`),e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,`ImportNamespaceSpecifier`)},j.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===x.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(x.comma)))return e;if(this.type===x.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(x.braceL);!this.eat(x.braceR);){if(t)t=!1;else if(this.expect(x.comma),this.afterTrailingComma(x.braceR))break;e.push(this.parseImportSpecifier())}return e},j.parseWithClause=function(){var e=[];if(!this.eat(x._with))return e;this.expect(x.braceL);for(var t={},n=!0;!this.eat(x.braceR);){if(n)n=!1;else if(this.expect(x.comma),this.afterTrailingComma(x.braceR))break;var r=this.parseImportAttribute(),i=r.key.type===`Identifier`?r.key.name:r.key.value;T(t,i)&&this.raiseRecoverable(r.key.start,`Duplicate attribute key '`+i+`'`),t[i]=!0,e.push(r)}return e},j.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===x.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!==`never`),this.expect(x.colon),this.type!==x.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,`ImportAttribute`)},j.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===x.string){var e=this.parseLiteral(this.value);return le.test(e.value)&&this.raise(e.start,`An export name cannot include a lone surrogate.`),e}return this.parseIdent(!0)},j.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)},j.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 M=O.prototype;M.toAssignable=function(e,t,n){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`,n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];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`,n&&this.checkPatternErrors(n,!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,n);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 n&&this.checkPatternErrors(n,!0);return e},M.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var a=e[n-1];this.options.ecmaVersion===6&&t&&a&&a.type===`RestElement`&&a.argument.type!==`Identifier`&&this.unexpected(a.argument.start)}return e},M.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,`SpreadElement`)},M.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==x.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,`RestElement`)},M.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case x.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(x.bracketR,!0,!0),this.finishNode(e,`ArrayPattern`);case x.braceL:return this.parseObj(!0)}return this.parseIdent()},M.parseBindingList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);)if(a?a=!1:this.expect(x.comma),t&&this.type===x.comma)i.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===x.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),i.push(o),this.type===x.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`),this.expect(e);break}i.push(this.parseAssignableListItem(r))}return i},M.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},M.parseBindingListItem=function(e){return e},M.parseMaybeDefault=function(e,t,n){if(n||=this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(x.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,`AssignmentPattern`)},M.checkLValSimple=function(e,t,n){t===void 0&&(t=0);var r=t!==0;switch(e.type){case`Identifier`:this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?`Binding `:`Assigning to `)+e.name+` in strict mode`),r&&(t===2&&e.name===`let`&&this.raiseRecoverable(e.start,`let is disallowed as a lexically bound name`),n&&(T(n,e.name)&&this.raiseRecoverable(e.start,`Argument name clash`),n[e.name]=!0),t!==5&&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`:r&&this.raiseRecoverable(e.start,`Binding member expression`);break;case`ParenthesizedExpression`:return r&&this.raiseRecoverable(e.start,`Binding parenthesized expression`),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?`Binding`:`Assigning to`)+` rvalue`)}},M.checkLValPattern=function(e,t,n){switch(t===void 0&&(t=0),e.type){case`ObjectPattern`:for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,t,n)}break;case`ArrayPattern`:for(var o=0,s=e.elements;o<s.length;o+=1){var c=s[o];c&&this.checkLValInnerPattern(c,t,n)}break;default:this.checkLValSimple(e,t,n)}},M.checkLValInnerPattern=function(e,t,n){switch(t===void 0&&(t=0),e.type){case`Property`:this.checkLValInnerPattern(e.value,t,n);break;case`AssignmentPattern`:this.checkLValPattern(e.left,t,n);break;case`RestElement`:this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var N=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},P={b_stat:new N(`{`,!1),b_expr:new N(`{`,!0),b_tmpl:new N("${",!1),p_stat:new N(`(`,!1),p_expr:new N(`(`,!0),q_tmpl:new N("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new N(`function`,!1),f_expr:new N(`function`,!0),f_expr_gen:new N(`function`,!0,!1,null,!0),f_gen:new N(`function`,!1,!1,null,!0)},F=O.prototype;F.initialContext=function(){return[P.b_stat]},F.curContext=function(){return this.context[this.context.length-1]},F.braceIsBlock=function(e){var t=this.curContext();return t===P.f_expr||t===P.f_stat||(e!==x.colon||t!==P.b_stat&&t!==P.b_expr?e===x._return||e===x.name&&this.exprAllowed?S.test(this.input.slice(this.lastTokEnd,this.start)):e===x._else||e===x.semi||e===x.eof||e===x.parenR||e===x.arrow||(e===x.braceL?t===P.b_stat:e!==x._var&&e!==x._const&&e!==x.name&&!this.exprAllowed):!t.isExpr)},F.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},F.updateContext=function(e){var t,n=this.type;n.keyword&&e===x.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},F.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},x.parenR.updateContext=x.braceR.updateContext=function(){if(this.context.length!==1){var e=this.context.pop();e===P.b_stat&&this.curContext().token===`function`&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},x.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?P.b_stat:P.b_expr),this.exprAllowed=!0},x.dollarBraceL.updateContext=function(){this.context.push(P.b_tmpl),this.exprAllowed=!0},x.parenL.updateContext=function(e){var t=e===x._if||e===x._for||e===x._with||e===x._while;this.context.push(t?P.p_stat:P.p_expr),this.exprAllowed=!0},x.incDec.updateContext=function(){},x._function.updateContext=x._class.updateContext=function(e){!e.beforeExpr||e===x._else||e===x.semi&&this.curContext()!==P.p_stat||e===x._return&&S.test(this.input.slice(this.lastTokEnd,this.start))||(e===x.colon||e===x.braceL)&&this.curContext()===P.b_stat?this.context.push(P.f_stat):this.context.push(P.f_expr),this.exprAllowed=!1},x.colon.updateContext=function(){this.curContext().token===`function`&&this.context.pop(),this.exprAllowed=!0},x.backQuote.updateContext=function(){this.curContext()===P.q_tmpl?this.context.pop():this.context.push(P.q_tmpl),this.exprAllowed=!1},x.star.updateContext=function(e){if(e===x._function){var t=this.context.length-1;this.context[t]===P.f_expr?this.context[t]=P.f_expr_gen:this.context[t]=P.f_gen}this.exprAllowed=!0},x.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==x.dot&&(this.value===`of`&&!this.exprAllowed||this.value===`yield`&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var I=O.prototype;function Oe(e){return e.type===`Identifier`||e.type===`ParenthesizedExpression`&&Oe(e.expression)}function ke(e){return e.type===`MemberExpression`&&e.property.type===`PrivateIdentifier`||e.type===`ChainExpression`&&ke(e.expression)||e.type===`ParenthesizedExpression`&&ke(e.expression)}I.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&e.type===`SpreadElement`||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r,i=e.key;switch(i.type){case`Identifier`:r=i.name;break;case`Literal`:r=String(i.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6)r===`__proto__`&&a===`init`&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=i.start):this.raiseRecoverable(i.start,`Redefinition of __proto__ property`)),t.proto=!0);else{var o=t[r=`$`+r];o?(a===`init`?this.strict&&o.init||o.get||o.set:o.init||o[a])&&this.raiseRecoverable(i.start,`Redefinition of property`):o=t[r]={init:!1,get:!1,set:!1},o[a]=!0}}},I.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===x.comma){var a=this.startNodeAt(n,r);for(a.expressions=[i];this.eat(x.comma);)a.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(a,`SequenceExpression`)}return i},I.parseMaybeAssign=function(e,t,n){if(this.isContextual(`yield`)){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,a=-1,o=-1;t?(i=t.parenthesizedAssign,a=t.trailingComma,o=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new be,r=!0);var s=this.start,c=this.startLoc;this.type!==x.parenL&&this.type!==x.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e===`await`);var l=this.parseMaybeConditional(e,t);if(n&&(l=n.call(this,l,s,c)),this.type.isAssign){var u=this.startNodeAt(s,c);return u.operator=this.value,this.type===x.eq&&(l=this.toAssignable(l,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=l.start&&(t.shorthandAssign=-1),this.type===x.eq?this.checkLValPattern(l):this.checkLValSimple(l),u.left=l,this.next(),u.right=this.parseMaybeAssign(e),o>-1&&(t.doubleProto=o),this.finishNode(u,`AssignmentExpression`)}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),a>-1&&(t.trailingComma=a),l},I.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(x.question)){var a=this.startNodeAt(n,r);return a.test=i,a.consequent=this.parseMaybeAssign(),this.expect(x.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,`ConditionalExpression`)}return i},I.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===n&&i.type===`ArrowFunctionExpression`?i:this.parseExprOp(i,n,r,-1,e)},I.parseExprOp=function(e,t,n,r,i){var a=this.type.binop;if(a!=null&&(!i||this.type!==x._in)&&a>r){var o=this.type===x.logicalOR||this.type===x.logicalAND,s=this.type===x.coalesce;s&&(a=x.logicalAND.binop);var c=this.value;this.next();var l=this.start,u=this.startLoc,d=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),l,u,a,i),f=this.buildBinary(t,n,e,d,c,o||s);return(o&&this.type===x.coalesce||s&&(this.type===x.logicalOR||this.type===x.logicalAND))&&this.raiseRecoverable(this.start,`Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses`),this.parseExprOp(f,t,n,r,i)}return e},I.buildBinary=function(e,t,n,r,i,a){r.type===`PrivateIdentifier`&&this.raise(r.start,`Private identifier can only be left side of binary expression`);var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,a?`LogicalExpression`:`BinaryExpression`)},I.parseMaybeUnary=function(e,t,n,r){var i,a=this.start,o=this.startLoc;if(this.isContextual(`await`)&&this.canAwait)i=this.parseAwait(r),t=!0;else if(this.type.prefix){var s=this.startNode(),c=this.type===x.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0,c,r),this.checkExpressionErrors(e,!0),c?this.checkLValSimple(s.argument):this.strict&&s.operator===`delete`&&Oe(s.argument)?this.raiseRecoverable(s.start,`Deleting local variable in strict mode`):s.operator===`delete`&&ke(s.argument)?this.raiseRecoverable(s.start,`Private fields can not be deleted`):t=!0,i=this.finishNode(s,c?`UpdateExpression`:`UnaryExpression`)}else if(t||this.type!==x.privateId){if(i=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return i;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(a,o);l.operator=this.value,l.prefix=!1,l.argument=i,this.checkLValSimple(i),this.next(),i=this.finishNode(l,`UpdateExpression`)}}else (r||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),i=this.parsePrivateIdent(),this.type!==x._in&&this.unexpected();return n||!this.eat(x.starstar)?i:t?void this.unexpected(this.lastTokStart):this.buildBinary(a,o,i,this.parseMaybeUnary(null,!1,!1,r),`**`,!1)},I.parseExprSubscripts=function(e,t){var n=this.start,r=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,n,r,!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},I.parseSubscripts=function(e,t,n,r,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,n,r,a,o,i);if(s.optional&&(o=!0),s===e||s.type===`ArrowFunctionExpression`){if(o){var c=this.startNodeAt(t,n);c.expression=s,s=this.finishNode(c,`ChainExpression`)}return s}e=s}},I.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(x.arrow)},I.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},I.parseSubscript=function(e,t,n,r,i,a,o){var s=this.options.ecmaVersion>=11,c=s&&this.eat(x.questionDot);r&&c&&this.raise(this.lastTokStart,`Optional chaining cannot appear in the callee of new expressions`);var l=this.eat(x.bracketL);if(l||c&&this.type!==x.parenL&&this.type!==x.backQuote||this.eat(x.dot)){var u=this.startNodeAt(t,n);u.object=e,l?(u.property=this.parseExpression(),this.expect(x.bracketR)):this.type===x.privateId&&e.type!==`Super`?u.property=this.parsePrivateIdent():u.property=this.parseIdent(this.options.allowReserved!==`never`),u.computed=!!l,s&&(u.optional=c),e=this.finishNode(u,`MemberExpression`)}else if(!r&&this.eat(x.parenL)){var d=new be,f=this.yieldPos,p=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var h=this.parseExprList(x.parenR,this.options.ecmaVersion>=8,!1,d);if(i&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,`Cannot use 'await' as identifier inside an async function`),this.yieldPos=f,this.awaitPos=p,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(t,n,h,o);this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,this.awaitIdentPos=m||this.awaitIdentPos;var g=this.startNodeAt(t,n);g.callee=e,g.arguments=h,s&&(g.optional=c),e=this.finishNode(g,`CallExpression`)}else if(this.type===x.backQuote){(c||a)&&this.raise(this.start,`Optional chaining cannot appear in the tag of tagged template expressions`);var _=this.startNodeAt(t,n);_.tag=e,_.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(_,`TaggedTemplateExpression`)}return e},I.parseExprAtom=function(e,t,n){this.type===x.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case x._super:return this.allowSuper||this.raise(this.start,`'super' keyword outside a method`),r=this.startNode(),this.next(),this.type!==x.parenL||this.allowDirectSuper||this.raise(r.start,`super() call outside constructor of a subclass`),this.type!==x.dot&&this.type!==x.bracketL&&this.type!==x.parenL&&this.unexpected(),this.finishNode(r,`Super`);case x._this:return r=this.startNode(),this.next(),this.finishNode(r,`ThisExpression`);case x.name:var a=this.start,o=this.startLoc,s=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&c.name===`async`&&!this.canInsertSemicolon()&&this.eat(x._function))return this.overrideContext(P.f_expr),this.parseFunction(this.startNodeAt(a,o),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(x.arrow))return this.parseArrowExpression(this.startNodeAt(a,o),[c],!1,t);if(this.options.ecmaVersion>=8&&c.name===`async`&&this.type===x.name&&!s&&(!this.potentialArrowInForAwait||this.value!==`of`||this.containsEsc))return c=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(x.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,o),[c],!0,t)}return c;case x.regexp:var l=this.value;return(r=this.parseLiteral(l.value)).regex={pattern:l.pattern,flags:l.flags},r;case x.num:case x.string:return this.parseLiteral(this.value);case x._null:case x._true:case x._false:return(r=this.startNode()).value=this.type===x._null?null:this.type===x._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,`Literal`);case x.parenL:var u=this.start,d=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),d;case x.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(x.bracketR,!0,!0,e),this.finishNode(r,`ArrayExpression`);case x.braceL:return this.overrideContext(P.b_expr),this.parseObj(!1,e);case x._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case x._class:return this.parseClass(this.startNode(),!1);case x._new:return this.parseNew();case x.backQuote:return this.parseTemplate();case x._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}},I.parseExprAtomDefault=function(){this.unexpected()},I.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword import`),this.next(),this.type===x.parenL&&!e)return this.parseDynamicImport(t);if(this.type===x.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name=`import`,t.meta=this.finishNode(n,`Identifier`),this.parseImportMeta(t)}this.unexpected()},I.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(x.parenR)?e.options=null:(this.expect(x.comma),this.afterTrailingComma(x.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(x.parenR)||(this.expect(x.comma),this.afterTrailingComma(x.parenR)||this.unexpected())));else if(!this.eat(x.parenR)){var t=this.start;this.eat(x.comma)&&this.eat(x.parenR)?this.raiseRecoverable(t,`Trailing comma is not allowed in import()`):this.unexpected(t)}return this.finishNode(e,`ImportExpression`)},I.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`)},I.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.raw.slice(0,-1).replace(/_/g,``):t.value.toString()),this.next(),this.finishNode(t,`Literal`)},I.parseParenExpression=function(){this.expect(x.parenL);var e=this.parseExpression();return this.expect(x.parenR),e},I.shouldParseArrow=function(e){return!this.canInsertSemicolon()},I.parseParenAndDistinguishExpression=function(e,t){var n,r=this.start,i=this.startLoc,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,s=this.start,c=this.startLoc,l=[],u=!0,d=!1,f=new be,p=this.yieldPos,m=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==x.parenR;){if(u?u=!1:this.expect(x.comma),a&&this.afterTrailingComma(x.parenR,!0)){d=!0;break}if(this.type===x.ellipsis){o=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===x.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`);break}l.push(this.parseMaybeAssign(!1,f,this.parseParenItem))}var h=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(x.parenR),e&&this.shouldParseArrow(l)&&this.eat(x.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=p,this.awaitPos=m,this.parseParenArrowList(r,i,l,t);l.length&&!d||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(f,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=m||this.awaitPos,l.length>1?((n=this.startNodeAt(s,c)).expressions=l,this.finishNodeAt(n,`SequenceExpression`,h,g)):n=l[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var _=this.startNodeAt(r,i);return _.expression=n,this.finishNode(_,`ParenthesizedExpression`)}return n},I.parseParenItem=function(e){return e},I.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var Ae=[];I.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===x.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name=`new`,e.meta=this.finishNode(t,`Identifier`),this.next();var n=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'`),n&&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 r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),this.eat(x.parenL)?e.arguments=this.parseExprList(x.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Ae,this.finishNode(e,`NewExpression`)},I.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===x.invalidTemplate?(t||this.raiseRecoverable(this.start,`Bad escape sequence in untagged template literal`),n.value={raw:this.value.replace(/\r\n?/g,`
|
|
4
|
+
`),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
|
5
|
+
`),cooked:this.value},this.next(),n.tail=this.type===x.backQuote,this.finishNode(n,`TemplateElement`)},I.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===x.eof&&this.raise(this.pos,`Unterminated template literal`),this.expect(x.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(x.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,`TemplateLiteral`)},I.isAsyncProp=function(e){return!e.computed&&e.key.type===`Identifier`&&e.key.name===`async`&&(this.type===x.name||this.type===x.num||this.type===x.string||this.type===x.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===x.star)&&!S.test(this.input.slice(this.lastTokEnd,this.start))},I.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(x.braceR);){if(r)r=!1;else if(this.expect(x.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(x.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,i,t),n.properties.push(a)}return this.finishNode(n,e?`ObjectPattern`:`ObjectExpression`)},I.parseProperty=function(e,t){var n,r,i,a,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(x.ellipsis))return e?(o.argument=this.parseIdent(!1),this.type===x.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`),this.finishNode(o,`RestElement`)):(o.argument=this.parseMaybeAssign(!1,t),this.type===x.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(o,`SpreadElement`));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(i=this.start,a=this.startLoc),e||(n=this.eat(x.star)));var s=this.containsEsc;return this.parsePropertyName(o),!e&&!s&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(o)?(r=!0,n=this.options.ecmaVersion>=9&&this.eat(x.star),this.parsePropertyName(o)):r=!1,this.parsePropertyValue(o,e,n,r,i,a,t,s),this.finishNode(o,`Property`)},I.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=e.kind===`get`?0:1;if(e.value.params.length!==n){var r=e.value.start;e.kind===`get`?this.raiseRecoverable(r,`getter should have no params`):this.raiseRecoverable(r,`setter should have exactly one param`)}else e.kind===`set`&&e.value.params[0].type===`RestElement`&&this.raiseRecoverable(e.value.params[0].start,`Setter cannot use rest params`)},I.parsePropertyValue=function(e,t,n,r,i,a,o,s){(n||r)&&this.type===x.colon&&this.unexpected(),this.eat(x.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind=`init`):this.options.ecmaVersion>=6&&this.type===x.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,r),e.kind=`init`):t||s||!(this.options.ecmaVersion>=5)||e.computed||e.key.type!==`Identifier`||e.key.name!==`get`&&e.key.name!==`set`||this.type===x.comma||this.type===x.braceR||this.type===x.eq?this.options.ecmaVersion>=6&&!e.computed&&e.key.type===`Identifier`?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name!==`await`||this.awaitIdentPos||(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key)):this.type===x.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind=`init`,e.shorthand=!0):this.unexpected():((n||r)&&this.unexpected(),this.parseGetterSetter(e))},I.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(x.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(x.bracketR),e.key;e.computed=!1}return e.key=this.type===x.num||this.type===x.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!==`never`)},I.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},I.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|ve(t,r.generator)|(n?128:0)),this.expect(x.parenL),r.params=this.parseBindingList(x.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(r,`FunctionExpression`)},I.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(16|ve(n,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,`ArrowFunctionExpression`)},I.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==x.braceL,a=this.strict,o=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);a&&!s||(o=this.strictDirective(this.end))&&s&&this.raiseRecoverable(e.start,`Illegal 'use strict' directive in function with non-simple parameter list`);var c=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!a&&!o&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,5),e.body=this.parseBlock(!1,void 0,o&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()},I.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1)if(n[t].type!==`Identifier`)return!1;return!0},I.checkParams=function(e,t){for(var n=Object.create(null),r=0,i=e.params;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,1,t?null:n)}},I.parseExprList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(x.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===x.comma?o=null:this.type===x.ellipsis?(o=this.parseSpread(r),r&&this.type===x.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),i.push(o)}return i},I.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;(this.inGenerator&&r===`yield`&&this.raiseRecoverable(t,`Cannot use 'yield' as identifier inside a generator`),this.inAsync&&r===`await`&&this.raiseRecoverable(t,`Cannot use 'await' as identifier inside an async function`),this.currentThisScope().flags&_e||r!==`arguments`||this.raiseRecoverable(t,`Cannot use 'arguments' in class field initializer`),!this.inClassStaticBlock||r!==`arguments`&&r!==`await`||this.raise(t,`Cannot use `+r+` in class static initialization block`),this.keywords.test(r)&&this.raise(t,`Unexpected keyword '`+r+`'`),this.options.ecmaVersion<6&&this.input.slice(t,n).indexOf(`\\`)!==-1)||(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||r!==`await`||this.raiseRecoverable(t,`Cannot use keyword 'await' outside an async function`),this.raiseRecoverable(t,`The keyword '`+r+`' is reserved`))},I.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,`Identifier`),e||(this.checkUnreserved(t),t.name!==`await`||this.awaitIdentPos||(this.awaitIdentPos=t.start)),t},I.parseIdentNode=function(){var e=this.startNode();return this.type===x.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,e.name!==`class`&&e.name!==`function`||this.lastTokEnd===this.lastTokStart+1&&this.input.charCodeAt(this.lastTokStart)===46||this.context.pop(),this.type=x.name):this.unexpected(),e},I.parsePrivateIdent=function(){var e=this.startNode();return this.type===x.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,`PrivateIdentifier`),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,`Private field '#`+e.name+`' must be declared in an enclosing class`):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e},I.parseYield=function(e){this.yieldPos||=this.start;var t=this.startNode();return this.next(),this.type===x.semi||this.canInsertSemicolon()||this.type!==x.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(x.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,`YieldExpression`)},I.parseAwait=function(e){this.awaitPos||=this.start;var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,`AwaitExpression`)};var je=O.prototype;je.raise=function(e,t){var n=fe(this.input,e);t+=` (`+n.line+`:`+n.column+`)`,this.sourceFile&&(t+=` in `+this.sourceFile);var r=SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},je.raiseRecoverable=je.raise,je.curPosition=function(){if(this.options.locations)return new ue(this.curLine,this.pos-this.lineStart)};var L=O.prototype,Me=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};L.enterScope=function(e){this.scopeStack.push(new Me(e))},L.exitScope=function(){this.scopeStack.pop()},L.treatFunctionsAsVarInScope=function(e){return 2&e.flags||!this.inModule&&1&e.flags},L.declareName=function(e,t,n){var r=!1;if(t===2){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&1&i.flags&&delete this.undefinedExports[e]}else if(t===4)this.currentScope().lexical.push(e);else if(t===3){var a=this.currentScope();r=this.treatFunctionsAsVar?a.lexical.indexOf(e)>-1:a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1,a.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var s=this.scopeStack[o];if(s.lexical.indexOf(e)>-1&&!(32&s.flags&&s.lexical[0]===e)||!this.treatFunctionsAsVarInScope(s)&&s.functions.indexOf(e)>-1){r=!0;break}if(s.var.push(e),this.inModule&&1&s.flags&&delete this.undefinedExports[e],s.flags&_e)break}r&&this.raiseRecoverable(n,`Identifier '`+e+`' has already been declared`)},L.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},L.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},L.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(771&t.flags)return t}},L.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(771&t.flags&&!(16&t.flags))return t}};var Ne=function(e,t,n){this.type=``,this.start=t,this.end=0,e.options.locations&&(this.loc=new de(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},Pe=O.prototype;function Fe(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}Pe.startNode=function(){return new Ne(this,this.start,this.startLoc)},Pe.startNodeAt=function(e,t){return new Ne(this,e,t)},Pe.finishNode=function(e,t){return Fe.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Pe.finishNodeAt=function(e,t,n,r){return Fe.call(this,e,t,n,r)},Pe.copyNode=function(e){var t=new Ne(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var Ie=`ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS`,Le=Ie+` Extended_Pictographic`,Re=Le+` EBase EComp EMod EPres ExtPict`,ze={9:Ie,10:Le,11:Le,12:Re,13:Re,14:Re},Be={9:``,10:``,11:``,12:``,13:``,14:`Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji`},Ve=`Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu`,He=`Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb`,Ue=He+` Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd`,We=Ue+` Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho`,Ge=We+` Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi`,Ke=Ge+` Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith`,qe={9:He,10:Ue,11:We,12:Ge,13:Ke,14:Ke+` Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz`},Je={};function Ye(e){var t=Je[e]={binary:E(ze[e]+` `+Ve),binaryOfStrings:E(Be[e]),nonBinary:{General_Category:E(Ve),Script:E(qe[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var Xe=0,Ze=[9,10,11,12,13,14];Xe<Ze.length;Xe+=1)Ye(Ze[Xe]);var R=O.prototype,Qe=function(e,t){this.parent=e,this.base=t||this};Qe.prototype.separatedFrom=function(e){for(var t=this;t;t=t.parent)for(var n=e;n;n=n.parent)if(t.base===n.base&&t!==n)return!0;return!1},Qe.prototype.sibling=function(){return new Qe(this.parent,this.base)};var z=function(e){this.parser=e,this.validFlags=`gim`+(e.options.ecmaVersion>=6?`uy`:``)+(e.options.ecmaVersion>=9?`s`:``)+(e.options.ecmaVersion>=13?`d`:``)+(e.options.ecmaVersion>=15?`v`:``),this.unicodeProperties=Je[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source=``,this.flags=``,this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue=``,this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function $e(e){return e===105||e===109||e===115}function et(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}function tt(e){return e>=65&&e<=90||e>=97&&e<=122}z.prototype.reset=function(e,t,n){var r=n.indexOf(`v`)!==-1,i=n.indexOf(`u`)!==-1;this.start=0|e,this.source=t+``,this.flags=n,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=i&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=i&&this.parser.options.ecmaVersion>=9)},z.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,`Invalid regular expression: /`+this.source+`/: `+e)},z.prototype.at=function(e,t){t===void 0&&(t=!1);var n=this.source,r=n.length;if(e>=r)return-1;var i=n.charCodeAt(e);if(!t&&!this.switchU||i<=55295||i>=57344||e+1>=r)return i;var a=n.charCodeAt(e+1);return a>=56320&&a<=57343?(i<<10)+a-56613888:i},z.prototype.nextIndex=function(e,t){t===void 0&&(t=!1);var n=this.source,r=n.length;if(e>=r)return r;var i,a=n.charCodeAt(e);return!t&&!this.switchU||a<=55295||a>=57344||e+1>=r||(i=n.charCodeAt(e+1))<56320||i>57343?e+1:e+2},z.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)},z.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},z.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)},z.prototype.eat=function(e,t){return t===void 0&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},z.prototype.eatChars=function(e,t){t===void 0&&(t=!1);for(var n=this.pos,r=0,i=e;r<i.length;r+=1){var a=i[r],o=this.at(n,t);if(o===-1||o!==a)return!1;n=this.nextIndex(n,t)}return this.pos=n,!0},R.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=!1,i=!1,a=0;a<n.length;a++){var o=n.charAt(a);t.indexOf(o)===-1&&this.raise(e.start,`Invalid regular expression flag`),n.indexOf(o,a+1)>-1&&this.raise(e.start,`Duplicate regular expression flag`),o===`u`&&(r=!0),o===`v`&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,`Invalid regular expression flag`)},R.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&function(e){for(var t in e)return!0;return!1}(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},R.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue=``,e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise(`Unmatched ')'`),(e.eat(93)||e.eat(125))&&e.raise(`Lone quantifier brackets`)),e.maxBackReference>e.numCapturingParens&&e.raise(`Invalid escape`);for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];e.groupNames[r]||e.raise(`Invalid named capture referenced`)}},R.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new Qe(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise(`Nothing to repeat`),e.eat(123)&&e.raise(`Lone quantifier brackets`)},R.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},R.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise(`Invalid quantifier`),!0):!!(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))&&(this.regexp_eatQuantifier(e),!0)},R.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise(`Unterminated group`),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},R.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},R.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},R.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i<r&&!t&&e.raise(`numbers out of order in {} quantifier`),!0;e.switchU&&!t&&e.raise(`Incomplete quantifier`),e.pos=n}return!1},R.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},R.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},R.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i<n.length;i++){var a=n.charAt(i);n.indexOf(a,i+1)>-1&&e.raise(`Duplicate regular expression modifiers`)}if(r){var o=this.regexp_eatModifiers(e);n||o||e.current()!==58||e.raise(`Invalid regular expression modifiers`);for(var s=0;s<o.length;s++){var c=o.charAt(s);(o.indexOf(c,s+1)>-1||n.indexOf(c)>-1)&&e.raise(`Duplicate regular expression modifiers`)}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise(`Unterminated group`)}}e.pos=t}return!1},R.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise(`Invalid group`),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise(`Unterminated group`)}return!1},R.regexp_eatModifiers=function(e){for(var t=``,n=0;(n=e.current())!==-1&&$e(n);)t+=D(n),e.advance();return t},R.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},R.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise(`Nothing to repeat`),!1},R.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!et(t)&&(e.lastIntValue=t,e.advance(),!0)},R.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;(n=e.current())!==-1&&!et(n);)e.advance();return e.pos!==t},R.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(t===-1||t===36||t>=40&&t<=43||t===46||t===63||t===91||t===94||t===124)&&(e.advance(),!0)},R.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise(`Invalid group`);var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n)if(t)for(var r=0,i=n;r<i.length;r+=1)i[r].separatedFrom(e.branchID)||e.raise(`Duplicate capture group name`);else e.raise(`Duplicate capture group name`);t?(n||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}},R.regexp_eatGroupName=function(e){if(e.lastStringValue=``,e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise(`Invalid capture group name`)}return!1},R.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue=``,this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=D(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=D(e.lastIntValue);return!0}return!1},R.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),function(e){return m(e,!0)||e===36||e===95}(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},R.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),function(e){return h(e,!0)||e===36||e===95||e===8204||e===8205}(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},R.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(e.current()===99&&e.raise(`Invalid unicode escape`),e.raise(`Invalid escape`)),!1)},R.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},R.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise(`Invalid named reference`)}return!1},R.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},R.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},R.regexp_eatZero=function(e){return e.current()===48&&!it(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},R.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114&&(e.lastIntValue=13,e.advance(),!0)},R.regexp_eatControlLetter=function(e){var t=e.current();return!!tt(t)&&(e.lastIntValue=t%32,e.advance(),!0)},R.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var n,r=e.pos,i=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(i&&a>=55296&&a<=56319){var o=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(s>=56320&&s<=57343)return e.lastIntValue=1024*(a-55296)+(s-56320)+65536,!0}e.pos=o,e.lastIntValue=a}return!0}if(i&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&(n=e.lastIntValue)>=0&&n<=1114111)return!0;i&&e.raise(`Invalid unicode escape`),e.pos=r}return!1},R.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(t===99||e.switchN&&t===107)&&(e.lastIntValue=t,e.advance(),!0)},R.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};function nt(e){return tt(e)||e===95}function rt(e){return nt(e)||it(e)}function it(e){return e>=48&&e<=57}function at(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function ot(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function st(e){return e>=48&&e<=55}R.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return e===100||e===68||e===115||e===83||e===119||e===87}(t))return e.lastIntValue=-1,e.advance(),1;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=t===80)||t===112)){var r;if(e.lastIntValue=-1,e.advance(),e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&r===2&&e.raise(`Invalid property name`),r;e.raise(`Invalid property name`)}return 0},R.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),1}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return 0},R.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){T(e.unicodeProperties.nonBinary,t)||e.raise(`Invalid property name`),e.unicodeProperties.nonBinary[t].test(n)||e.raise(`Invalid property value`)},R.regexp_validateUnicodePropertyNameOrValue=function(e,t){return e.unicodeProperties.binary.test(t)?1:e.switchV&&e.unicodeProperties.binaryOfStrings.test(t)?2:void e.raise(`Invalid property name`)},R.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue=``;nt(t=e.current());)e.lastStringValue+=D(t),e.advance();return e.lastStringValue!==``},R.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue=``;rt(t=e.current());)e.lastStringValue+=D(t),e.advance();return e.lastStringValue!==``},R.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},R.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise(`Unterminated character class`),t&&n===2&&e.raise(`Negated character class may contain strings`),!0}return!1},R.regexp_classContents=function(e){return e.current()===93?1:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),1)},R.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;!e.switchU||t!==-1&&n!==-1||e.raise(`Invalid character class`),t!==-1&&n!==-1&&t>n&&e.raise(`Range out of order in character class`)}}},R.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(n===99||st(n))&&e.raise(`Invalid class escape`),e.raise(`Invalid escape`)}e.pos=t}var r=e.current();return r!==93&&(e.lastIntValue=r,e.advance(),!0)},R.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},R.regexp_classSetExpression=function(e){var t,n=1;if(!this.regexp_eatClassSetRange(e))if(t=this.regexp_eatClassSetOperand(e)){t===2&&(n=2);for(var r=e.pos;e.eatChars([38,38]);)e.current()!==38&&(t=this.regexp_eatClassSetOperand(e))?t!==2&&(n=1):e.raise(`Invalid character in character class`);if(r!==e.pos)return n;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise(`Invalid character in character class`);if(r!==e.pos)return n}else e.raise(`Invalid character in character class`);for(;;)if(!this.regexp_eatClassSetRange(e)){if(!(t=this.regexp_eatClassSetOperand(e)))return n;t===2&&(n=2)}},R.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return n!==-1&&r!==-1&&n>r&&e.raise(`Range out of order in character class`),!0}e.pos=t}return!1},R.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?1:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},R.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&r===2&&e.raise(`Negated character class may contain strings`),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null},R.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise(`Invalid escape`);e.pos=t}return null},R.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===2&&(t=2);return t},R.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?1:2},R.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return!(!this.regexp_eatCharacterEscape(e)&&!this.regexp_eatClassSetReservedPunctuator(e))||(e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1));var n=e.current();return!(n<0||n===e.lookahead()&&function(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}(n))&&!function(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}(n)&&(e.advance(),e.lastIntValue=n,!0)},R.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return!!function(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}(t)&&(e.lastIntValue=t,e.advance(),!0)},R.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!it(t)&&t!==95)&&(e.lastIntValue=t%32,e.advance(),!0)},R.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise(`Invalid escape`),e.pos=t}return!1},R.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;it(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},R.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;at(n=e.current());)e.lastIntValue=16*e.lastIntValue+ot(n),e.advance();return e.pos!==t},R.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},R.regexp_eatOctalDigit=function(e){var t=e.current();return st(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},R.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!at(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+ot(i),e.advance()}return!0};var ct=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new de(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},B=O.prototype;function lt(e){return typeof BigInt==`function`?BigInt(e.replace(/_/g,``)):null}B.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword `+this.type.keyword),this.options.onToken&&this.options.onToken(new ct(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},B.getToken=function(){return this.next(),new ct(this)},typeof Symbol<`u`&&(B[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===x.eof,value:t}}}}),B.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(x.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},B.readToken=function(e){return m(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)},B.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888},B.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf(`*/`,this.pos+=2);if(n===-1&&this.raise(this.pos-2,`Unterminated comment`),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=ne(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},B.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!C(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},B.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&re.test(String.fromCharCode(e))))break e;++this.pos}}},B.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},B.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(x.ellipsis)):(++this.pos,this.finishToken(x.dot))},B.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(x.assign,2):this.finishOp(x.slash,1)},B.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=e===42?x.star:x.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++n,r=x.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(x.assign,n+1):this.finishOp(r,n)},B.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(x.assign,3):this.finishOp(e===124?x.logicalOR:x.logicalAND,2):t===61?this.finishOp(x.assign,2):this.finishOp(e===124?x.bitwiseOR:x.bitwiseAND,1)},B.readToken_caret=function(){return this.input.charCodeAt(this.pos+1)===61?this.finishOp(x.assign,2):this.finishOp(x.bitwiseXOR,1)},B.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t!==45||this.inModule||this.input.charCodeAt(this.pos+2)!==62||this.lastTokEnd!==0&&!S.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(x.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):t===61?this.finishOp(x.assign,2):this.finishOp(x.plusMin,1)},B.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61?this.finishOp(x.assign,n+1):this.finishOp(x.bitShift,n)):t!==33||e!==60||this.inModule||this.input.charCodeAt(this.pos+2)!==45||this.input.charCodeAt(this.pos+3)!==45?(t===61&&(n=2),this.finishOp(x.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},B.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(x.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(x.arrow)):this.finishOp(e===61?x.eq:x.prefix,1)},B.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(x.questionDot,2)}if(t===63)return e>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(x.assign,3):this.finishOp(x.coalesce,2)}return this.finishOp(x.question,1)},B.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,m(e=this.fullCharCodeAtPos(),!0)||e===92))return this.finishToken(x.privateId,this.readWord1());this.raise(this.pos,`Unexpected character '`+D(e)+`'`)},B.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(x.parenL);case 41:return++this.pos,this.finishToken(x.parenR);case 59:return++this.pos,this.finishToken(x.semi);case 44:return++this.pos,this.finishToken(x.comma);case 91:return++this.pos,this.finishToken(x.bracketL);case 93:return++this.pos,this.finishToken(x.bracketR);case 123:return++this.pos,this.finishToken(x.braceL);case 125:return++this.pos,this.finishToken(x.braceR);case 58:return++this.pos,this.finishToken(x.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(x.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(x.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,`Unexpected character '`+D(e)+`'`)},B.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},B.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,`Unterminated regular expression`);var r=this.input.charAt(this.pos);if(S.test(r)&&this.raise(n,`Unterminated regular expression`),e)e=!1;else{if(r===`[`)t=!0;else if(r===`]`&&t)t=!1;else if(r===`/`&&!t)break;e=r===`\\`}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var a=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(a);var s=this.regexpState||=new z(this);s.reset(n,i,o),this.validateRegExpFlags(s),this.validateRegExpPattern(s);var c=null;try{c=new RegExp(i,o)}catch{}return this.finishToken(x.regexp,{pattern:i,flags:o,value:c})},B.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&t===void 0,i=n&&this.input.charCodeAt(this.pos)===48,a=this.pos,o=0,s=0,c=0,l=t??1/0;c<l;++c,++this.pos){var u=this.input.charCodeAt(this.pos),d=void 0;if(r&&u===95)i&&this.raiseRecoverable(this.pos,`Numeric separator is not allowed in legacy octal numeric literals`),s===95&&this.raiseRecoverable(this.pos,`Numeric separator must be exactly one underscore`),c===0&&this.raiseRecoverable(this.pos,`Numeric separator is not allowed at the first of digits`),s=u;else{if((d=u>=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0)>=e)break;s=u,o=o*e+d}}return r&&s===95&&this.raiseRecoverable(this.pos-1,`Numeric separator is not allowed at the last of digits`),this.pos===a||t!=null&&this.pos-a!==t?null:o},B.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return n??this.raise(this.start+2,`Expected number in radix `+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(n=lt(this.input.slice(t,this.pos)),++this.pos):m(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`),this.finishToken(x.num,n)},B.readNumber=function(e){var t=this.pos;e||this.readInt(10,void 0,!0)!==null||this.raise(t,`Invalid number`);var n=this.pos-t>=2&&this.input.charCodeAt(t)===48;n&&this.strict&&this.raise(t,`Invalid number`);var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&r===110){var i=lt(this.input.slice(t,this.pos));return++this.pos,m(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`),this.finishToken(x.num,i)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),r!==46||n||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),r!==69&&r!==101||n||((r=this.input.charCodeAt(++this.pos))!==43&&r!==45||++this.pos,this.readInt(10)===null&&this.raise(t,`Invalid number`)),m(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`);var a,o=(a=this.input.slice(t,this.pos),n?parseInt(a,8):parseFloat(a.replace(/_/g,``)));return this.finishToken(x.num,o)},B.readCodePoint=function(){var e;if(this.input.charCodeAt(this.pos)===123){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf(`}`,this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,`Code point out of bounds`)}else e=this.readHexChar(4);return e},B.readString=function(e){for(var t=``,n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated string constant`);var r=this.input.charCodeAt(this.pos);if(r===e)break;r===92?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,`Unterminated string constant`),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(C(r)&&this.raise(this.start,`Unterminated string constant`),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(x.string,t)};var ut={};B.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==ut)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},B.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw ut;this.raise(e,t)},B.readTmplToken=function(){for(var e=``,t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated template`);var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos!==this.start||this.type!==x.template&&this.type!==x.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(x.template,e)):n===36?(this.pos+=2,this.finishToken(x.dollarBraceL)):(++this.pos,this.finishToken(x.backQuote));if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(C(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
|
|
6
|
+
`;break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else ++this.pos}},B.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case`\\`:++this.pos;break;case`$`:if(this.input[this.pos+1]!==`{`)break;case"`":return this.finishToken(x.invalidTemplate,this.input.slice(this.start,this.pos));case`\r`:this.input[this.pos+1]===`
|
|
7
|
+
`&&++this.pos;case`
|
|
8
|
+
`:case`\u2028`:case`\u2029`:++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,`Unterminated template`)},B.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
|
|
9
|
+
`;case 114:return`\r`;case 120:return String.fromCharCode(this.readHexChar(2));case 117:return D(this.readCodePoint());case 116:return` `;case 98:return`\b`;case 118:return`\v`;case 102:return`\f`;case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),``;case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,`Invalid escape sequence`),e){var n=this.pos-1;this.invalidStringToken(n,`Invalid escape sequence in template string`)}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),r===`0`&&t!==56&&t!==57||!this.strict&&!e||this.invalidStringToken(this.pos-1-r.length,e?`Octal literal in template string`:`Octal literal in strict mode`),String.fromCharCode(i)}return C(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),``):String.fromCharCode(t)}},B.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return n===null&&this.invalidStringToken(t,`Bad character escape sequence`),n},B.readWord1=function(){this.containsEsc=!1;for(var e=``,t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(h(i,r))this.pos+=i<=65535?1:2;else{if(i!==92)break;this.containsEsc=!0,e+=this.input.slice(n,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,`Expecting Unicode escape sequence \\uXXXX`),++this.pos;var o=this.readCodePoint();(t?m:h)(o,r)||this.invalidStringToken(a,`Invalid Unicode escape`),e+=D(o),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},B.readWord=function(){var e=this.readWord1(),t=x.name;return this.keywords.test(e)&&(t=ee[e]),this.finishToken(t,e)},O.acorn={Parser:O,version:`8.15.0`,defaultOptions:pe,Position:ue,SourceLocation:de,getLineInfo:fe,Node:Ne,TokenType:g,tokTypes:x,keywordTypes:ee,TokContext:N,tokContexts:P,isIdentifierChar:h,isIdentifierStart:m,Token:ct,isNewLine:C,lineBreak:S,lineBreakG:te,nonASCIIwhitespace:re};let dt=t(`node:module`),V=t(`node:fs`);String.fromCharCode;let ft=/\/$|\/\?|\/#/,pt=/^\.?\//;function mt(e=``,t){return t?ft.test(e):e.endsWith(`/`)}function ht(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(mt(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function gt(e){return e&&e!==`/`}function _t(e,...t){let n=e||``;for(let e of t.filter(e=>gt(e)))if(n){let t=e.replace(pt,``);n=ht(n)+t}else n=e;return n}let vt=/^[A-Za-z]:\//;function yt(e=``){return e&&e.replace(/\\/g,`/`).replace(vt,e=>e.toUpperCase())}let bt=/^[/\\]{2}/,xt=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,St=/^[A-Za-z]:$/,Ct=/.(\.[^./]+|\.)$/,wt=function(e){if(e.length===0)return`.`;let t=(e=yt(e)).match(bt),n=U(e),r=e[e.length-1]===`/`;return(e=Dt(e,!n)).length===0?n?`/`:r?`./`:`.`:(r&&(e+=`/`),St.test(e)&&(e+=`/`),t?n?`//${e}`:`//./${e}`:n&&!U(e)?`/${e}`:e)},H=function(...e){let t=``;for(let n of e)if(n)if(t.length>0){let e=t[t.length-1]===`/`,r=n[0]===`/`;t+=e&&r?n.slice(1):e||r?n:`/${n}`}else t+=n;return wt(t)};function Tt(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}let Et=function(...e){let t=``,n=!1;for(let r=(e=e.map(e=>yt(e))).length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:Tt();i&&i.length!==0&&(t=`${i}/${t}`,n=U(i))}return t=Dt(t,!n),n&&!U(t)?`/${t}`:t.length>0?t:`.`};function Dt(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else{if(o===`/`)break;o=`/`}if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}let U=function(e){return xt.test(e)},Ot=function(e){if(e===`..`)return``;let t=Ct.exec(yt(e));return t&&t[1]||``},kt=function(e){let t=yt(e).replace(/\/$/,``).split(`/`).slice(0,-1);return t.length===1&&St.test(t[0])&&(t[0]+=`/`),t.join(`/`)||(U(e)?`/`:`.`)},At=function(e,t){let n=yt(e).split(`/`),r=``;for(let e=n.length-1;e>=0;e--){let t=n[e];if(t){r=t;break}}return t&&r.endsWith(t)?r.slice(0,-t.length):r},W=t(`node:url`),G=t(`node:assert`),K=t(`node:process`),jt=t(`node:path`),Mt=t(`node:v8`),Nt=t(`node:util`),Pt=new Set(dt.builtinModules);function Ft(e){return e.replace(/\\/g,`/`)}let It={}.hasOwnProperty,Lt=/^([A-Z][a-z\d]*)+$/,Rt=new Set([`string`,`function`,`number`,`object`,`Function`,`Object`,`boolean`,`bigint`,`symbol`]),q={};function zt(e,t=`and`){return e.length<3?e.join(` ${t} `):`${e.slice(0,-1).join(`, `)}, ${t} ${e[e.length-1]}`}let Bt=new Map,Vt;function J(e,t,n){return Bt.set(e,t),function(e,t){return n;function n(...n){let r=Error.stackTraceLimit;Ht()&&(Error.stackTraceLimit=0);let i=new e;Ht()&&(Error.stackTraceLimit=r);let a=function(e,t,n){let r=Bt.get(e);if(G(r!==void 0,"expected `message` to be found"),typeof r==`function`)return G(r.length<=t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${r.length}).`),Reflect.apply(r,n,t);let i=/%[dfijoOs]/g,a=0;for(;i.exec(r)!==null;)a++;return G(a===t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${a}).`),t.length===0?r:(t.unshift(r),Reflect.apply(Nt.format,null,t))}(t,n,i);return Object.defineProperties(i,{message:{value:a,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),Ut(i),i.code=t,i}}(n,e)}function Ht(){try{if(Mt.startupSnapshot.isBuildingSnapshot())return!1}catch{}let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):It.call(e,`writable`)&&e.writable!==void 0?e.writable:e.set!==void 0}q.ERR_INVALID_ARG_TYPE=J(`ERR_INVALID_ARG_TYPE`,(e,t,n)=>{G(typeof e==`string`,`'name' must be a string`),Array.isArray(t)||(t=[t]);let r=`The `;if(e.endsWith(` argument`))r+=`${e} `;else{let t=e.includes(`.`)?`property`:`argument`;r+=`"${e}" ${t} `}r+=`must be `;let i=[],a=[],o=[];for(let e of t)G(typeof e==`string`,`All expected entries have to be of type string`),Rt.has(e)?i.push(e.toLowerCase()):Lt.exec(e)===null?(G(e!==`object`,`The value "object" should be written as "Object"`),o.push(e)):a.push(e);if(a.length>0){let e=i.indexOf(`object`);e!==-1&&(i.slice(e,1),a.push(`Object`))}return i.length>0&&(r+=`${i.length>1?`one of type`:`of type`} ${zt(i,`or`)}`,(a.length>0||o.length>0)&&(r+=` or `)),a.length>0&&(r+=`an instance of ${zt(a,`or`)}`,o.length>0&&(r+=` or `)),o.length>0&&(o.length>1?r+=`one of ${zt(o,`or`)}`:(o[0].toLowerCase()!==o[0]&&(r+=`an `),r+=`${o[0]}`)),r+=`. Received ${function(e){if(e==null)return String(e);if(typeof e==`function`&&e.name)return`function ${e.name}`;if(typeof e==`object`)return e.constructor&&e.constructor.name?`an instance of ${e.constructor.name}`:`${(0,Nt.inspect)(e,{depth:-1})}`;let t=(0,Nt.inspect)(e,{colors:!1});return t.length>28&&(t=`${t.slice(0,25)}...`),`type ${typeof e} (${t})`}(n)}`,r},TypeError),q.ERR_INVALID_MODULE_SPECIFIER=J(`ERR_INVALID_MODULE_SPECIFIER`,(e,t,n=void 0)=>`Invalid module "${e}" ${t}${n?` imported from ${n}`:``}`,TypeError),q.ERR_INVALID_PACKAGE_CONFIG=J(`ERR_INVALID_PACKAGE_CONFIG`,(e,t,n)=>`Invalid package config ${e}${t?` while importing ${t}`:``}${n?`. ${n}`:``}`,Error),q.ERR_INVALID_PACKAGE_TARGET=J(`ERR_INVALID_PACKAGE_TARGET`,(e,t,n,r=!1,i=void 0)=>{let a=typeof n==`string`&&!r&&n.length>0&&!n.startsWith(`./`);return t===`.`?(G(!1===r),`Invalid "exports" main target ${JSON.stringify(n)} defined in the package config ${e}package.json${i?` imported from ${i}`:``}${a?`; targets must start with "./"`:``}`):`Invalid "${r?`imports`:`exports`}" target ${JSON.stringify(n)} defined for '${t}' in the package config ${e}package.json${i?` imported from ${i}`:``}${a?`; targets must start with "./"`:``}`},Error),q.ERR_MODULE_NOT_FOUND=J(`ERR_MODULE_NOT_FOUND`,(e,t,n=!1)=>`Cannot find ${n?`module`:`package`} '${e}' imported from ${t}`,Error),q.ERR_NETWORK_IMPORT_DISALLOWED=J(`ERR_NETWORK_IMPORT_DISALLOWED`,`import of '%s' by %s is not supported: %s`,Error),q.ERR_PACKAGE_IMPORT_NOT_DEFINED=J(`ERR_PACKAGE_IMPORT_NOT_DEFINED`,(e,t,n)=>`Package import specifier "${e}" is not defined${t?` in package ${t}package.json`:``} imported from ${n}`,TypeError),q.ERR_PACKAGE_PATH_NOT_EXPORTED=J(`ERR_PACKAGE_PATH_NOT_EXPORTED`,(e,t,n=void 0)=>t===`.`?`No "exports" main defined in ${e}package.json${n?` imported from ${n}`:``}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${n?` imported from ${n}`:``}`,Error),q.ERR_UNSUPPORTED_DIR_IMPORT=J(`ERR_UNSUPPORTED_DIR_IMPORT`,`Directory import '%s' is not supported resolving ES modules imported from %s`,Error),q.ERR_UNSUPPORTED_RESOLVE_REQUEST=J(`ERR_UNSUPPORTED_RESOLVE_REQUEST`,`Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.`,TypeError),q.ERR_UNKNOWN_FILE_EXTENSION=J(`ERR_UNKNOWN_FILE_EXTENSION`,(e,t)=>`Unknown file extension "${e}" for ${t}`,TypeError),q.ERR_INVALID_ARG_VALUE=J(`ERR_INVALID_ARG_VALUE`,(e,t,n=`is invalid`)=>{let r=(0,Nt.inspect)(t);return r.length>128&&(r=`${r.slice(0,128)}...`),`The ${e.includes(`.`)?`property`:`argument`} '${e}' ${n}. Received ${r}`},TypeError);let Ut=function(e){let t=`__node_internal_`+e.name;return Object.defineProperty(e,`name`,{value:t}),e}(function(e){let t=Ht();return t&&(Vt=Error.stackTraceLimit,Error.stackTraceLimit=1/0),Error.captureStackTrace(e),t&&(Error.stackTraceLimit=Vt),e}),Wt={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:Gt}=q,Kt=new Map;function qt(e,{base:t,specifier:n}){let r=Kt.get(e);if(r)return r;let i;try{i=V.readFileSync(jt.toNamespacedPath(e),`utf8`)}catch(e){let t=e;if(t.code!==`ENOENT`)throw t}let a={exists:!1,pjsonPath:e,main:void 0,name:void 0,type:`none`,exports:void 0,imports:void 0};if(i!==void 0){let r;try{r=JSON.parse(i)}catch(r){let i=r,a=new Gt(e,(t?`"${n}" from `:``)+(0,W.fileURLToPath)(t||n),i.message);throw a.cause=i,a}a.exists=!0,Wt.call(r,`name`)&&typeof r.name==`string`&&(a.name=r.name),Wt.call(r,`main`)&&typeof r.main==`string`&&(a.main=r.main),Wt.call(r,`exports`)&&(a.exports=r.exports),Wt.call(r,`imports`)&&(a.imports=r.imports),!Wt.call(r,`type`)||r.type!==`commonjs`&&r.type!==`module`||(a.type=r.type)}return Kt.set(e,a),a}function Jt(e){let t=new URL(`package.json`,e);for(;!t.pathname.endsWith(`node_modules/package.json`);){let n=qt((0,W.fileURLToPath)(t),{specifier:e});if(n.exists)return n;let r=t;if(t=new URL(`../package.json`,t),t.pathname===r.pathname)break}return{pjsonPath:(0,W.fileURLToPath)(t),exists:!1,type:`none`}}function Yt(e){return Jt(e).type}let{ERR_UNKNOWN_FILE_EXTENSION:Xt}=q,Zt={}.hasOwnProperty,Qt={__proto__:null,".cjs":`commonjs`,".js":`module`,".json":`json`,".mjs":`module`},$t={__proto__:null,"data:":function(e){let{1:t}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e.pathname)||[null,null,null];return function(e){return e&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e)?`module`:e===`application/json`?`json`:null}(t)},"file:":function(e,t,n){let r=function(e){let t=e.pathname,n=t.length;for(;n--;){let e=t.codePointAt(n);if(e===47)return``;if(e===46)return t.codePointAt(n-1)===47?``:t.slice(n)}return``}(e);if(r===`.js`){let t=Yt(e);return t===`none`?`commonjs`:t}if(r===``){let t=Yt(e);return t===`none`||t===`commonjs`?`commonjs`:`module`}let i=Qt[r];if(i)return i;if(!n)throw new Xt(r,(0,W.fileURLToPath)(e))},"http:":en,"https:":en,"node:":()=>`builtin`};function en(){}let tn=RegExp.prototype[Symbol.replace],{ERR_INVALID_MODULE_SPECIFIER:nn,ERR_INVALID_PACKAGE_CONFIG:rn,ERR_INVALID_PACKAGE_TARGET:an,ERR_MODULE_NOT_FOUND:on,ERR_PACKAGE_IMPORT_NOT_DEFINED:sn,ERR_PACKAGE_PATH_NOT_EXPORTED:cn,ERR_UNSUPPORTED_DIR_IMPORT:ln,ERR_UNSUPPORTED_RESOLVE_REQUEST:un}=q,dn={}.hasOwnProperty,fn=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,pn=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,mn=/^\.|%|\\/,hn=/\*/g,gn=/%2f|%5c/i,_n=new Set,vn=/[/\\]{2}/;function yn(e,t,n,r,i,a,o){if(K.noDeprecation)return;let s=(0,W.fileURLToPath)(r),c=vn.exec(o?e:t)!==null;K.emitWarning(`Use of deprecated ${c?`double slash`:`leading or trailing slash matching`} resolving "${e}" for module request "${t}" ${t===n?``:`matched to "${n}" `}in the "${i?`imports`:`exports`}" field module resolution of the package at ${s}${a?` imported from ${(0,W.fileURLToPath)(a)}`:``}.`,`DeprecationWarning`,`DEP0166`)}function bn(e,t,n,r){if(K.noDeprecation||function(e,t){let n=e.protocol;return Zt.call($t,n)&&$t[n](e,t,!0)||null}(e,{parentURL:n.href})!==`module`)return;let i=(0,W.fileURLToPath)(e.href),a=(0,W.fileURLToPath)(new W.URL(`.`,t)),o=(0,W.fileURLToPath)(n);r?jt.resolve(a,r)!==i&&K.emitWarning(`Package ${a} has a "main" field set to "${r}", excluding the full filename and extension to the resolved file at "${i.slice(a.length)}", imported from ${o}.\n Automatic extension resolution of the "main" field is deprecated for ES modules.`,`DeprecationWarning`,`DEP0151`):K.emitWarning(`No "main" or "exports" field defined in the package.json for ${a} resolving the main entry point "${i.slice(a.length)}", imported from ${o}.\nDefault "index" lookups for the main are deprecated for ES modules.`,`DeprecationWarning`,`DEP0151`)}function xn(e){try{return(0,V.statSync)(e)}catch{}}function Sn(e){let t=(0,V.statSync)(e,{throwIfNoEntry:!1}),n=t?t.isFile():void 0;return n!=null&&n}function Cn(e,t,n){let r;if(t.main!==void 0){if(r=new W.URL(t.main,e),Sn(r))return r;let i=[`./${t.main}.js`,`./${t.main}.json`,`./${t.main}.node`,`./${t.main}/index.js`,`./${t.main}/index.json`,`./${t.main}/index.node`],a=-1;for(;++a<i.length&&(r=new W.URL(i[a],e),!Sn(r));)r=void 0;if(r)return bn(r,e,n,t.main),r}let i=[`./index.js`,`./index.json`,`./index.node`],a=-1;for(;++a<i.length&&(r=new W.URL(i[a],e),!Sn(r));)r=void 0;if(r)return bn(r,e,n,t.main),r;throw new on((0,W.fileURLToPath)(new W.URL(`.`,e)),(0,W.fileURLToPath)(n))}function wn(e,t,n){return new cn((0,W.fileURLToPath)(new W.URL(`.`,t)),e,n&&(0,W.fileURLToPath)(n))}function Tn(e,t,n,r,i){return t=typeof t==`object`&&t?JSON.stringify(t,null,``):`${t}`,new an((0,W.fileURLToPath)(new W.URL(`.`,n)),e,t,r,i&&(0,W.fileURLToPath)(i))}function En(e,t,n,r,i,a,o,s,c){if(t!==``&&!a&&e[e.length-1]!==`/`)throw Tn(n,e,r,o,i);if(!e.startsWith(`./`)){if(o&&!e.startsWith(`../`)&&!e.startsWith(`/`)){let n=!1;try{new W.URL(e),n=!0}catch{}if(!n)return Nn(a?tn.call(hn,e,()=>t):e+t,r,c)}throw Tn(n,e,r,o,i)}if(fn.exec(e.slice(2))!==null){if(pn.exec(e.slice(2))!==null)throw Tn(n,e,r,o,i);if(!s){let s=a?n.replace(`*`,()=>t):n+t;yn(a?tn.call(hn,e,()=>t):e,s,n,r,o,i,!0)}}let l=new W.URL(e,r),u=l.pathname,d=new W.URL(`.`,r).pathname;if(!u.startsWith(d))throw Tn(n,e,r,o,i);if(t===``)return l;if(fn.exec(t)!==null){let c=a?n.replace(`*`,()=>t):n+t;pn.exec(t)===null?s||yn(a?tn.call(hn,e,()=>t):e,c,n,r,o,i,!1):(function(e,t,n,r,i){throw new nn(e,`request is not a valid match in pattern "${t}" for the "${r?`imports`:`exports`}" resolution of ${(0,W.fileURLToPath)(n)}`,i&&(0,W.fileURLToPath)(i))})(c,n,r,o,i)}return a?new W.URL(tn.call(hn,l.href,()=>t)):new W.URL(t,l)}function Dn(e){let t=Number(e);return`${t}`===e&&t>=0&&t<4294967295}function On(e,t,n,r,i,a,o,s,c){if(typeof t==`string`)return En(t,n,r,e,i,a,o,s,c);if(Array.isArray(t)){let l=t;if(l.length===0)return null;let u,d=-1;for(;++d<l.length;){let t=l[d],f;try{f=On(e,t,n,r,i,a,o,s,c)}catch(e){if(u=e,e.code===`ERR_INVALID_PACKAGE_TARGET`)continue;throw e}if(f!==void 0){if(f!==null)return f;u=null}}if(u==null)return null;throw u}if(typeof t==`object`&&t){let l=Object.getOwnPropertyNames(t),u=-1;for(;++u<l.length;)if(Dn(l[u]))throw new rn((0,W.fileURLToPath)(e),i,`"exports" cannot contain numeric property keys.`);for(u=-1;++u<l.length;){let d=l[u];if(d===`default`||c&&c.has(d)){let l=On(e,t[d],n,r,i,a,o,s,c);if(l===void 0)continue;return l}}return null}if(t===null)return null;throw Tn(r,t,e,o,i)}function kn(e,t,n){if(K.noDeprecation)return;let r=(0,W.fileURLToPath)(t);_n.has(r+`|`+e)||(_n.add(r+`|`+e),K.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${r}${n?` imported from ${(0,W.fileURLToPath)(n)}`:``}. Mapping specifiers ending in "/" is no longer supported.`,`DeprecationWarning`,`DEP0155`))}function An(e,t,n,r,i){let a=n.exports;if(function(e,t,n){if(typeof e==`string`||Array.isArray(e))return!0;if(typeof e!=`object`||!e)return!1;let r=Object.getOwnPropertyNames(e),i=!1,a=0,o=-1;for(;++o<r.length;){let e=r[o],s=e===``||e[0]!==`.`;if(a++===0)i=s;else if(i!==s)throw new rn((0,W.fileURLToPath)(t),n,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return i}(a,e,r)&&(a={".":a}),dn.call(a,t)&&!t.includes(`*`)&&!t.endsWith(`/`)){let n=On(e,a[t],``,t,r,!1,!1,!1,i);if(n==null)throw wn(t,e,r);return n}let o=``,s=``,c=Object.getOwnPropertyNames(a),l=-1;for(;++l<c.length;){let n=c[l],i=n.indexOf(`*`);if(i!==-1&&t.startsWith(n.slice(0,i))){t.endsWith(`/`)&&kn(t,e,r);let a=n.slice(i+1);t.length>=n.length&&t.endsWith(a)&&jn(o,n)===1&&n.lastIndexOf(`*`)===i&&(o=n,s=t.slice(i,t.length-a.length))}}if(o){let n=On(e,a[o],s,o,r,!0,!1,t.endsWith(`/`),i);if(n==null)throw wn(t,e,r);return n}throw wn(t,e,r)}function jn(e,t){let n=e.indexOf(`*`),r=t.indexOf(`*`),i=n===-1?e.length:n+1,a=r===-1?t.length:r+1;return i>a?-1:a>i||n===-1?1:r===-1||e.length>t.length?-1:+(t.length>e.length)}function Mn(e,t,n){if(e===`#`||e.startsWith(`#/`)||e.endsWith(`/`))throw new nn(e,`is not a valid internal imports specifier name`,(0,W.fileURLToPath)(t));let r,i=Jt(t);if(i.exists){r=(0,W.pathToFileURL)(i.pjsonPath);let a=i.imports;if(a)if(dn.call(a,e)&&!e.includes(`*`)){let i=On(r,a[e],``,e,t,!1,!0,!1,n);if(i!=null)return i}else{let i=``,o=``,s=Object.getOwnPropertyNames(a),c=-1;for(;++c<s.length;){let t=s[c],n=t.indexOf(`*`);if(n!==-1&&e.startsWith(t.slice(0,-1))){let r=t.slice(n+1);e.length>=t.length&&e.endsWith(r)&&jn(i,t)===1&&t.lastIndexOf(`*`)===n&&(i=t,o=e.slice(n,e.length-r.length))}}if(i){let e=On(r,a[i],o,i,t,!0,!0,!1,n);if(e!=null)return e}}}throw function(e,t,n){return new sn(e,t&&(0,W.fileURLToPath)(new W.URL(`.`,t)),(0,W.fileURLToPath)(n))}(e,r,t)}function Nn(e,t,n){if(dt.builtinModules.includes(e))return new W.URL(`node:`+e);let{packageName:r,packageSubpath:i,isScoped:a}=function(e,t){let n=e.indexOf(`/`),r=!0,i=!1;e[0]===`@`&&(i=!0,n===-1||e.length===0?r=!1:n=e.indexOf(`/`,n+1));let a=n===-1?e:e.slice(0,n);if(mn.exec(a)!==null&&(r=!1),!r)throw new nn(e,`is not a valid package name`,(0,W.fileURLToPath)(t));return{packageName:a,packageSubpath:`.`+(n===-1?``:e.slice(n)),isScoped:i}}(e,t),o=Jt(t);if(o.exists){let e=(0,W.pathToFileURL)(o.pjsonPath);if(o.name===r&&o.exports!==void 0&&o.exports!==null)return An(e,i,o,t,n)}let s,c=new W.URL(`./node_modules/`+r+`/package.json`,t),l=(0,W.fileURLToPath)(c);do{let o=xn(l.slice(0,-13));if(!o||!o.isDirectory()){s=l,c=new W.URL((a?`../../../../node_modules/`:`../../../node_modules/`)+r+`/package.json`,c),l=(0,W.fileURLToPath)(c);continue}let u=qt(l,{base:t,specifier:e});return u.exports!==void 0&&u.exports!==null?An(c,i,u,t,n):i===`.`?Cn(c,u,t):new W.URL(i,c)}while(l.length!==s.length);throw new on(r,(0,W.fileURLToPath)(t),!1)}function Pn(e,t,n,r){let i=t.protocol,a=i===`data:`||i===`http:`||i===`https:`,o;if(function(e){return e!==``&&(e[0]===`/`||function(e){return e[0]===`.`&&(e.length===1||e[1]===`/`||e[1]===`.`&&(e.length===2||e[2]===`/`))}(e))}(e))try{o=new W.URL(e,t)}catch(n){let r=new un(e,t);throw r.cause=n,r}else if(i===`file:`&&e[0]===`#`)o=Mn(e,t,n);else try{o=new W.URL(e)}catch(r){if(a&&!dt.builtinModules.includes(e)){let n=new un(e,t);throw n.cause=r,n}o=Nn(e,t,n)}return G(o!==void 0,`expected to be defined`),o.protocol===`file:`?function(e,t){if(gn.exec(e.pathname)!==null)throw new nn(e.pathname,`must not include encoded "/" or "\\" characters`,(0,W.fileURLToPath)(t));let n;try{n=(0,W.fileURLToPath)(e)}catch(n){let r=n;throw Object.defineProperty(r,`input`,{value:String(e)}),Object.defineProperty(r,`module`,{value:String(t)}),r}let r=xn(n.endsWith(`/`)?n.slice(-1):n);if(r&&r.isDirectory()){let r=new ln(n,(0,W.fileURLToPath)(t));throw r.url=String(e),r}if(!r||!r.isFile()){let r=new on(n||e.pathname,t&&(0,W.fileURLToPath)(t),!0);throw r.url=String(e),r}{let t=(0,V.realpathSync)(n),{search:r,hash:i}=e;(e=(0,W.pathToFileURL)(t+(n.endsWith(jt.sep)?`/`:``))).search=r,e.hash=i}return e}(o,t):o}function Fn(e){return typeof e!=`string`||e.startsWith(`file://`)?Ft((0,W.fileURLToPath)(e)):Ft(e)}function In(e){return(0,W.pathToFileURL)(Fn(e)).toString()}let Ln=new Set([`node`,`import`]),Rn=[`.mjs`,`.cjs`,`.js`,`.json`],zn=new Set([`ERR_MODULE_NOT_FOUND`,`ERR_UNSUPPORTED_DIR_IMPORT`,`MODULE_NOT_FOUND`,`ERR_PACKAGE_PATH_NOT_EXPORTED`]);function Bn(e,t,n){try{return Pn(e,t,n)}catch(e){if(!zn.has(e?.code))throw e}}function Vn(e,t={}){if(typeof e!=`string`){if(!(e instanceof URL))throw TypeError("input must be a `string` or `URL`");e=Fn(e)}if(/(?:node|data|http|https):/.test(e))return e;if(Pt.has(e))return`node:`+e;if(e.startsWith(`file://`)&&(e=Fn(e)),U(e))try{if((0,V.statSync)(e).isFile())return In(e)}catch(e){if(e?.code!==`ENOENT`)throw e}let n=t.conditions?new Set(t.conditions):Ln,r=(Array.isArray(t.url)?t.url:[t.url]).filter(Boolean).map(e=>new URL(function(e){return typeof e!=`string`&&(e=e.toString()),/(?:node|data|http|https|file):/.test(e)?e:Pt.has(e)?`node:`+e:`file://`+encodeURI(Ft(e))}(e.toString())));r.length===0&&r.push(new URL(In(process.cwd())));let i=[...r];for(let e of r)e.protocol===`file:`&&i.push(new URL(`./`,e),new URL(_t(e.pathname,`_index.js`),e),new URL(`node_modules`,e));let a;for(let r of i){if(a=Bn(e,r,n),a)break;for(let i of[``,`/index`]){for(let o of t.extensions||Rn)if(a=Bn(_t(e,i)+o,r,n),a)break;if(a)break}if(a)break}if(!a){let t=Error(`Cannot find module ${e} imported from ${i.join(`, `)}`);throw t.code=`ERR_MODULE_NOT_FOUND`,t}return In(a)}function Hn(e,t){return Vn(e,t)}function Un(e,t){return Fn(Hn(e,t))}let Wn=/(?:[\s;]|^)(?:import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m,Gn=/\/\*.+?\*\/|\/\/.*(?=[nr])/g;function Kn(e,t={}){return t.stripComments&&(e=e.replace(Gn,``)),Wn.test(e)}function qn(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}let Jn=new Set([`/`,`\\`,void 0]),Yn=Symbol.for(`pathe:normalizedAlias`),Xn=/[/\\]/;function Zn(e){if(e[Yn])return e;let t=Object.fromEntries(Object.entries(e).sort(([e],[t])=>function(e,t){return t.split(`/`).length-e.split(`/`).length}(e,t)));for(let e in t)for(let n in t)n===e||e.startsWith(n)||t[e]?.startsWith(n)&&Jn.has(t[e][n.length])&&(t[e]=t[n]+t[e].slice(n.length));return Object.defineProperty(t,Yn,{value:!0,enumerable:!1}),t}function Qn(e=`/`){let t=e[e.length-1];return t===`/`||t===`\\`}var $n={rE:`2.6.1`};let er=t(`node:crypto`);var tr=i.n(er);let nr=Object.create(null),rr=e=>globalThis.process?.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?nr:globalThis),Y=new Proxy(nr,{get:(e,t)=>rr()[t]??nr[t],has:(e,t)=>t in rr()||t in nr,set:(e,t,n)=>(rr(!0)[t]=n,!0),deleteProperty(e,t){return t?(delete rr(!0)[t],!0):!1},ownKeys(){let e=rr(!0);return Object.keys(e)}}),ir=typeof process<`u`&&process.env&&process.env.NODE_ENV||``,ar=[[`APPVEYOR`],[`AWS_AMPLIFY`,`AWS_APP_ID`,{ci:!0}],[`AZURE_PIPELINES`,`SYSTEM_TEAMFOUNDATIONCOLLECTIONURI`],[`AZURE_STATIC`,`INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN`],[`APPCIRCLE`,`AC_APPCIRCLE`],[`BAMBOO`,`bamboo_planKey`],[`BITBUCKET`,`BITBUCKET_COMMIT`],[`BITRISE`,`BITRISE_IO`],[`BUDDY`,`BUDDY_WORKSPACE_ID`],[`BUILDKITE`],[`CIRCLE`,`CIRCLECI`],[`CIRRUS`,`CIRRUS_CI`],[`CLOUDFLARE_PAGES`,`CF_PAGES`,{ci:!0}],[`CLOUDFLARE_WORKERS`,`WORKERS_CI`,{ci:!0}],[`CODEBUILD`,`CODEBUILD_BUILD_ARN`],[`CODEFRESH`,`CF_BUILD_ID`],[`DRONE`],[`DRONE`,`DRONE_BUILD_EVENT`],[`DSARI`],[`GITHUB_ACTIONS`],[`GITLAB`,`GITLAB_CI`],[`GITLAB`,`CI_MERGE_REQUEST_ID`],[`GOCD`,`GO_PIPELINE_LABEL`],[`LAYERCI`],[`HUDSON`,`HUDSON_URL`],[`JENKINS`,`JENKINS_URL`],[`MAGNUM`],[`NETLIFY`],[`NETLIFY`,`NETLIFY_LOCAL`,{ci:!1}],[`NEVERCODE`],[`RENDER`],[`SAIL`,`SAILCI`],[`SEMAPHORE`],[`SCREWDRIVER`],[`SHIPPABLE`],[`SOLANO`,`TDDIUM`],[`STRIDER`],[`TEAMCITY`,`TEAMCITY_VERSION`],[`TRAVIS`],[`VERCEL`,`NOW_BUILDER`],[`VERCEL`,`VERCEL`,{ci:!1}],[`VERCEL`,`VERCEL_ENV`,{ci:!1}],[`APPCENTER`,`APPCENTER_BUILD_ID`],[`CODESANDBOX`,`CODESANDBOX_SSE`,{ci:!1}],[`CODESANDBOX`,`CODESANDBOX_HOST`,{ci:!1}],[`STACKBLITZ`],[`STORMKIT`],[`CLEAVR`],[`ZEABUR`],[`CODESPHERE`,`CODESPHERE_APP_ID`,{ci:!0}],[`RAILWAY`,`RAILWAY_PROJECT_ID`],[`RAILWAY`,`RAILWAY_SERVICE_ID`],[`DENO-DEPLOY`,`DENO_DEPLOYMENT_ID`],[`FIREBASE_APP_HOSTING`,`FIREBASE_APP_HOSTING`,{ci:!0}]],or=function(){if(globalThis.process?.env)for(let e of ar){let t=e[1]||e[0];if(globalThis.process?.env[t])return{name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL===`/bin/jsh`&&globalThis.process?.versions?.webcontainer?{name:`stackblitz`,ci:!1}:{name:``,ci:!1}}();or.name;function sr(e){return!!e&&e!==`false`}let cr=globalThis.process?.platform||``;sr(Y.CI)||or.ci;let lr=sr(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);Y.DEBUG,ir===`test`||Y.TEST;let ur=(Y.MINIMAL,/^win/i.test(cr)),dr=(/^linux/i.test(cr),/^darwin/i.test(cr),!sr(Y.NO_COLOR)&&(sr(Y.FORCE_COLOR)||(lr||ur)&&Y.TERM),(globalThis.process?.versions?.node||``).replace(/^v/,``)||null),fr=(Number(dr?.split(`.`)[0]),globalThis.process||Object.create(null)),pr={versions:{}},mr=(new Proxy(fr,{get:(e,t)=>t===`env`?Y:t in e?e[t]:t in pr?pr[t]:void 0}),globalThis.process?.release?.name===`node`),hr=!!globalThis.Bun||!!globalThis.process?.versions?.bun,gr=!!globalThis.Deno,_r=!!globalThis.fastly,vr=[[!!globalThis.Netlify,`netlify`],[!!globalThis.EdgeRuntime,`edge-light`],[globalThis.navigator?.userAgent===`Cloudflare-Workers`,`workerd`],[_r,`fastly`],[gr,`deno`],[hr,`bun`],[mr,`node`]];(function(){let e=vr.find(e=>e[0]);e&&e[1]})();let yr=t(`node:tty`)?.WriteStream?.prototype?.hasColors?.()??!1,X=(e,t)=>{if(!yr)return e=>e;let n=`[${e}m`,r=`[${t}m`;return e=>{let i=e+``,a=i.indexOf(r);if(a===-1)return n+i+r;let o=n,s=0,c=(t===22?r:``)+n;for(;a!==-1;)o+=i.slice(s,a)+c,s=a+r.length,a=i.indexOf(r,s);return o+=i.slice(s)+r,o}},br=(X(0,0),X(1,22),X(2,22),X(3,23),X(4,24),X(53,55),X(7,27),X(8,28),X(9,29),X(30,39),X(31,39)),xr=X(32,39),Sr=X(33,39),Cr=X(34,39),wr=(X(35,39),X(36,39)),Tr=(X(37,39),X(90,39));X(40,49),X(41,49),X(42,49),X(43,49),X(44,49),X(45,49),X(46,49),X(47,49),X(100,49),X(91,39),X(92,39),X(93,39),X(94,39),X(95,39),X(96,39),X(97,39),X(101,49),X(102,49),X(103,49),X(104,49),X(105,49),X(106,49),X(107,49);function Er(e){if(typeof e!=`string`||e.startsWith(`file://`))return!1;try{return(0,V.lstatSync)(e).isDirectory()}catch{return!1}}function Dr(e,t=8){return(function(){if(kr!==void 0)return kr;try{return kr=!!tr().getFips?.(),kr}catch{return kr=!1,kr}}()?tr().createHash(`sha256`):tr().createHash(`md5`)).update(e).digest(`hex`).slice(0,t)}let Or={true:xr(`true`),false:Sr(`false`),"[rebuild]":Sr(`[rebuild]`),"[esm]":Cr(`[esm]`),"[cjs]":xr(`[cjs]`),"[import]":Cr(`[import]`),"[require]":xr(`[require]`),"[native]":wr(`[native]`),"[transpile]":Sr(`[transpile]`),"[fallback]":br(`[fallback]`),"[unknown]":br(`[unknown]`),"[hit]":xr(`[hit]`),"[miss]":Sr(`[miss]`),"[json]":xr(`[json]`),"[data]":xr(`[data]`)};function Z(e,...t){if(!e.opts.debug)return;let n=process.cwd();console.log(Tr([`[jiti]`,...t.map(e=>e in Or?Or[e]:typeof e==`string`?e.replace(n,`.`):JSON.stringify(e))].join(` `)))}function Q(e,t){return e.opts.interopDefault?function(e){let t=typeof e;if(e===null||t!==`object`&&t!==`function`)return e;let n=e.default,r=typeof n,i=n==null,a=r===`object`||r===`function`;return i&&e instanceof Promise?e:new Proxy(e,{get(t,r,o){if(r===`__esModule`)return!0;if(r===`default`)return i?e:typeof n?.default==`function`&&e.__esModule?n.default:n;if(Reflect.has(t,r))return Reflect.get(t,r,o);if(a&&!(n instanceof Promise)){let e=Reflect.get(n,r,o);return typeof e==`function`&&(e=e.bind(n)),e}},apply:(e,t,i)=>typeof e==`function`?Reflect.apply(e,t,i):r===`function`?Reflect.apply(n,t,i):void 0})}(t):t}let kr;function $(e,t){return!!Ar(e,t)}function Ar(e,t){let n=process.env[e];if(!(e in process.env))return t;try{return JSON.parse(n)}catch{return t}}let jr=/\.(c|m)?j(sx?)$/,Mr=/\.(c|m)?t(sx?)$/;function Nr(e,t,n){let r,i;if(e.isNativeRe.test(t))return t;e.alias&&(t=function(e,t){let n=yt(e);t=Zn(t);for(let[e,r]of Object.entries(t))if(n.startsWith(e)&&Qn(n[(Qn(e)?e.slice(0,-1):e).length]))return H(r,n.slice(e.length));return n}(t,e.alias));let a=n?.parentURL||e.url;Er(a)&&(a=H(a,`_index.js`));let o=(n?.async?[n?.conditions,[`node`,`import`],[`node`,`require`]]:[n?.conditions,[`node`,`require`],[`node`,`import`]]).filter(Boolean);for(let n of o){try{r=Un(t,{url:a,conditions:n,extensions:e.opts.extensions})}catch(e){i=e}if(r)return r}try{return e.nativeRequire.resolve(t,{paths:n.paths})}catch(e){i=e}for(let i of e.additionalExts)if(r=Pr(e,t+i,a,n)||Pr(e,t+`/index`+i,a,n),r||(Mr.test(e.filename)||Mr.test(e.parentModule?.filename||``)||jr.test(t))&&(r=Pr(e,t.replace(jr,`.$1t$2`),a,n),r))return r;if(!n?.try)throw i}function Pr(e,t,n,r){try{return e.nativeRequire.resolve(t,{...r,paths:[kt(Fn(n)),...r?.paths||[]]})}catch{}}let Fr=t(`node:perf_hooks`),Ir=t(`node:vm`);var Lr=i.n(Ir);function Rr(e,t,n){let r=e.parentCache||{};if(t.startsWith(`node:`))return zr(e,t,n.async);if(t.startsWith(`file:`))t=(0,W.fileURLToPath)(t);else if(t.startsWith(`data:`)){if(!n.async)throw Error("`data:` URLs are only supported in ESM context. Use `import` or `jiti.import` instead.");return Z(e,`[native]`,`[data]`,`[import]`,t),zr(e,t,!0)}if(dt.builtinModules.includes(t)||t===`.pnp.js`)return zr(e,t,n.async);if(e.opts.tryNative&&!e.opts.transformOptions)try{if(!(t=Nr(e,t,n))&&n.try)return;if(Z(e,`[try-native]`,n.async&&e.nativeImport?`[import]`:`[require]`,t),n.async&&e.nativeImport)return e.nativeImport(t).then(n=>(!1===e.opts.moduleCache&&delete e.nativeRequire.cache[t],Q(e,n)));{let n=e.nativeRequire(t);return!1===e.opts.moduleCache&&delete e.nativeRequire.cache[t],Q(e,n)}}catch(n){Z(e,`[try-native] Using fallback for ${t} because of an error:`,n)}let i=Nr(e,t,n);if(!i&&n.try)return;let a=Ot(i);if(a===`.json`){Z(e,`[json]`,i);let t=e.nativeRequire(i);return t&&!(`default`in t)&&Object.defineProperty(t,`default`,{value:t,enumerable:!1}),t}if(a&&!e.opts.extensions.includes(a))return Z(e,`[native]`,`[unknown]`,n.async?`[import]`:`[require]`,i),zr(e,i,n.async);if(e.isNativeRe.test(i))return Z(e,`[native]`,n.async?`[import]`:`[require]`,i),zr(e,i,n.async);if(r[i])return Q(e,r[i]?.exports);if(e.opts.moduleCache){let t=e.nativeRequire.cache[i];if(t?.loaded)return Q(e,t.exports)}return Ur(e,(0,V.readFileSync)(i,`utf8`),{id:t,filename:i,ext:a,cache:r,async:n.async})}function zr(e,t,n){return n&&e.nativeImport?e.nativeImport(function(e){return ur&&U(e)?In(e):e}(t)).then(t=>Q(e,t)):Q(e,e.nativeRequire(t))}function Br(e,t,n){if(!e.opts.fsCache||!t.filename)return n();let r=` /* v9-${Dr(t.source,16)} */\n`,i=`${At(kt(t.filename))}-${function(e){let t=e.split(Xn).pop();if(!t)return;let n=t.lastIndexOf(`.`);return n<=0?t:t.slice(0,n)}(t.filename)}`+(e.opts.sourceMaps?`+map`:``)+(t.interopDefault?`.i`:``)+`.${Dr(t.filename)}`+(t.async?`.mjs`:`.cjs`);t.jsx&&t.filename.endsWith(`x`)&&(i+=`x`);let a=e.opts.fsCache,o=H(a,i);if(!e.opts.rebuildFsCache&&(0,V.existsSync)(o)){let n=(0,V.readFileSync)(o,`utf8`);if(n.endsWith(r))return Z(e,`[cache]`,`[hit]`,t.filename,`~>`,o),n}Z(e,`[cache]`,`[miss]`,t.filename);let s=n();return s.includes(`__JITI_ERROR__`)||((0,V.writeFileSync)(o,s+r,`utf8`),Z(e,`[cache]`,`[store]`,t.filename,`~>`,o)),s}function Vr(t){if(!0===t.opts.fsCache&&(t.opts.fsCache=function(t){let n=t.filename&&Et(t.filename,`../node_modules`);if(n&&(0,V.existsSync)(n))return H(n,`.cache/jiti`);let r=(0,e.tmpdir)();if(process.env.TMPDIR&&r===process.cwd()&&!process.env.JITI_RESPECT_TMPDIR_ENV){let t=process.env.TMPDIR;delete process.env.TMPDIR,r=(0,e.tmpdir)(),process.env.TMPDIR=t}return H(r,`jiti`)}(t)),t.opts.fsCache)try{if((0,V.mkdirSync)(t.opts.fsCache,{recursive:!0}),!function(e){try{return(0,V.accessSync)(e,V.constants.W_OK),!0}catch{return!1}}(t.opts.fsCache))throw Error(`directory is not writable!`)}catch(e){Z(t,`Error creating cache directory at `,t.opts.fsCache,e),t.opts.fsCache=!1}}function Hr(e,t){let n=Br(e,t,()=>{let n=e.opts.transform({...e.opts.transformOptions,babel:{...e.opts.sourceMaps?{sourceFileName:t.filename,sourceMaps:`inline`}:{},...e.opts.transformOptions?.babel},interopDefault:e.opts.interopDefault,...t});return n.error&&e.opts.debug&&Z(e,n.error),n.code});return n.startsWith(`#!`)&&(n=`// `+n),n}function Ur(e,t,n={}){let r=n.id||(n.filename?At(n.filename):`_jitiEval.${n.ext||(n.async?`mjs`:`js`)}`),i=n.filename||Nr(e,r,{async:n.async}),a=n.ext||Ot(i),o=n.cache||e.parentCache||{},s=/\.[cm]?tsx?$/.test(a),c=a===`.mjs`||a===`.js`&&function(e){for(;e&&e!==`.`&&e!==`/`;){e=H(e,`..`);try{let t=(0,V.readFileSync)(H(e,`package.json`),`utf8`);try{return JSON.parse(t)}catch{}break}catch{}}}(i)?.type===`module`,l=a===`.cjs`,u=n.forceTranspile??(!l&&!(c&&n.async)&&(s||c||e.isTransformRe.test(i)||Kn(t))),d=Fr.performance.now();if(u){t=Hr(e,{filename:i,source:t,ts:s,async:n.async??!1,jsx:e.opts.jsx});let r=Math.round(1e3*(Fr.performance.now()-d))/1e3;Z(e,`[transpile]`,n.async?`[esm]`:`[cjs]`,i,`(${r}ms)`)}else{if(Z(e,`[native]`,n.async?`[import]`:`[require]`,i),n.async)return Promise.resolve(zr(e,i,n.async)).catch(r=>(Z(e,`Native import error:`,r),Z(e,`[fallback]`,i),Ur(e,t,{...n,forceTranspile:!0})));try{return zr(e,i,n.async)}catch(r){Z(e,`Native require error:`,r),Z(e,`[fallback]`,i),t=Hr(e,{filename:i,source:t,ts:s,async:n.async??!1,jsx:e.opts.jsx})}}let f=new dt.Module(i);f.filename=i,e.parentModule&&(f.parent=e.parentModule,Array.isArray(e.parentModule.children)&&!e.parentModule.children.includes(f)&&e.parentModule.children.push(f));let p=Gr(i,e.opts,{parentModule:f,parentCache:o,nativeImport:e.nativeImport,onError:e.onError,createRequire:e.createRequire},!0),m;f.require=p,f.path=kt(i),f.paths=dt.Module._nodeModulePaths(f.path),o[i]=f,e.opts.moduleCache&&(e.nativeRequire.cache[i]=f);let h=function(e,t){return`(${t?.async?`async `:``}function (exports, require, module, __filename, __dirname, jitiImport, jitiESMResolve) { ${e}\n});`}(t,{async:n.async});try{m=Lr().runInThisContext(h,{filename:i,lineOffset:0,displayErrors:!1})}catch(t){t.name===`SyntaxError`&&n.async&&e.nativeImport?(Z(e,`[esm]`,`[import]`,`[fallback]`,i),m=function(e,t){let n=`data:text/javascript;base64,${Buffer.from(`export default ${e}`).toString(`base64`)}`;return(...e)=>t(n).then(t=>t.default(...e))}(h,e.nativeImport)):(e.opts.moduleCache&&delete e.nativeRequire.cache[i],e.onError(t))}let g;try{g=m(f.exports,f.require,f,f.filename,kt(f.filename),p.import,p.esmResolve)}catch(t){e.opts.moduleCache&&delete e.nativeRequire.cache[i],e.onError(t)}function _(){if(f.exports&&f.exports.__JITI_ERROR__){let{filename:t,line:n,column:r,code:i,message:a}=f.exports.__JITI_ERROR__,o=Error(`${i}: ${a} \n ${`${t}:${n}:${r}`}`);Error.captureStackTrace(o,Rr),e.onError(o)}return f.loaded=!0,Q(e,f.exports)}return n.async?Promise.resolve(g).then(_):_()}let Wr=(0,e.platform)()===`win32`;function Gr(e,t={},n,r=!1){let i=r?t:function(e){let t={fsCache:$(`JITI_FS_CACHE`,$(`JITI_CACHE`,!0)),rebuildFsCache:$(`JITI_REBUILD_FS_CACHE`,!1),moduleCache:$(`JITI_MODULE_CACHE`,$(`JITI_REQUIRE_CACHE`,!0)),debug:$(`JITI_DEBUG`,!1),sourceMaps:$(`JITI_SOURCE_MAPS`,!1),interopDefault:$(`JITI_INTEROP_DEFAULT`,!0),extensions:Ar(`JITI_EXTENSIONS`,[`.js`,`.mjs`,`.cjs`,`.ts`,`.tsx`,`.mts`,`.cts`,`.mtsx`,`.ctsx`]),alias:Ar(`JITI_ALIAS`,{}),nativeModules:Ar(`JITI_NATIVE_MODULES`,[]),transformModules:Ar(`JITI_TRANSFORM_MODULES`,[]),tryNative:Ar(`JITI_TRY_NATIVE`,`Bun`in globalThis),jsx:$(`JITI_JSX`,!1)};t.jsx&&t.extensions.push(`.jsx`,`.tsx`);let n={};return e.cache!==void 0&&(n.fsCache=e.cache),e.requireCache!==void 0&&(n.moduleCache=e.requireCache),{...t,...n,...e}}(t),a=i.alias&&Object.keys(i.alias).length>0?Zn(i.alias||{}):void 0,o=[`typescript`,`jiti`,...i.nativeModules||[]],s=RegExp(`node_modules/(${o.map(e=>qn(e)).join(`|`)})/`),c=[...i.transformModules||[]],l=RegExp(`node_modules/(${c.map(e=>qn(e)).join(`|`)})/`);e||=process.cwd(),!r&&Er(e)&&(e=H(e,`_index.js`));let u=In(e),d=[...i.extensions].filter(e=>e!==`.js`),f=n.createRequire(Wr?e.replace(/\//g,`\\`):e),p={filename:e,url:u,opts:i,alias:a,nativeModules:o,transformModules:c,isNativeRe:s,isTransformRe:l,additionalExts:d,nativeRequire:f,onError:n.onError,parentModule:n.parentModule,parentCache:n.parentCache,nativeImport:n.nativeImport,createRequire:n.createRequire};return r||Z(p,`[init]`,...[[`version:`,$n.rE],[`module-cache:`,i.moduleCache],[`fs-cache:`,i.fsCache],[`rebuild-fs-cache:`,i.rebuildFsCache],[`interop-defaults:`,i.interopDefault]].flat()),r||Vr(p),Object.assign(function(e){return Rr(p,e,{async:!1})},{cache:i.moduleCache?f.cache:Object.create(null),extensions:f.extensions,main:f.main,options:i,resolve:Object.assign(function(e){return Nr(p,e,{async:!1})},{paths:f.resolve.paths}),transform:e=>Hr(p,e),evalModule:(e,t)=>Ur(p,e,t),async import(e,t){let n=await Rr(p,e,{...t,async:!0});return t?.default?n?.default??n:n},esmResolve(e,t){typeof t==`string`&&(t={parentURL:t});let n=Nr(p,e,{parentURL:u,...t,async:!0});return!n||typeof n!=`string`||n.startsWith(`file://`)?n:In(n)}})}})(),n.exports=a.default})()}))(),1);function ke(e){throw e}const Ae=e=>import(e);let je;function L(...e){return je||=o(import.meta.url)(`../dist/babel.cjs`),je(...e)}function Me(e,t={}){return t.transform||(t={...t,transform:L}),(0,Oe.default)(e,t,{onError:ke,nativeImport:Ae,createRequire:o})}function Ne(e){let t=e.jitiFilename??e.modulePath;if(e.cacheScopeKey){let n=`${t}::${e.cacheScopeKey}`,r=e.cache.get(n);if(r)return r}let n=!!e.aliasMap,r=typeof e.tryNative==`boolean`,i=n||r?F({modulePath:e.modulePath,argv1:e.argvEntry??process.argv[1],moduleUrl:e.importerUrl,...e.preferBuiltDist?{preferBuiltDist:!0}:{},...e.pluginSdkResolution?{pluginSdkResolution:e.pluginSdkResolution}:{}}):null,a=i!==null&&(!n||e.aliasMap===i.aliasMap)&&(!r||e.tryNative===i.tryNative),o=i?{tryNative:e.tryNative??i.tryNative,aliasMap:e.aliasMap??i.aliasMap,cacheKey:a?i.cacheKey:void 0}:F({modulePath:e.modulePath,argv1:e.argvEntry??process.argv[1],moduleUrl:e.importerUrl,...e.preferBuiltDist?{preferBuiltDist:!0}:{},...e.pluginSdkResolution?{pluginSdkResolution:e.pluginSdkResolution}:{}}),{tryNative:s,aliasMap:c}=o,l=o.cacheKey??P({tryNative:s,aliasMap:c}),u=`${t}::${e.cacheScopeKey??l}`,d=e.cache.get(u);if(d)return d;let f=(e.createLoader??Me)(t,{...Te(c),tryNative:s});return e.cache.set(u,f),f}export{we as a,m as c,N as i,f as l,I as n,M as o,C as r,u as s,Ne as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"node:fs";import t from"node:path";import{randomUUID as n}from"node:crypto";function r(t){try{e.chmodSync(t,384)}catch{}}function i(n){let r;try{r=e.openSync(t.dirname(n),`r`),e.fsyncSync(r)}catch{}finally{if(r!==void 0)try{e.closeSync(r)}catch{}}}function a(n){let r=e.readlinkSync(n);return t.resolve(t.dirname(n),r)}function o(t){let n=t,r=new Set,i=!1;for(;;){let o;try{o=e.lstatSync(n)}catch(e){if(e.code!==`ENOENT`)throw e;return{targetPath:n,followsSymlink:i}}if(!o.isSymbolicLink())return{targetPath:n,followsSymlink:i};if(r.has(n)){let e=Error(`Too many symlink levels while resolving ${t}`);throw e.code=`ELOOP`,e}r.add(n),i=!0,n=a(n)}}function s(t,n){try{e.renameSync(t,n);return}catch(r){let i=r.code;if(i===`EPERM`||i===`EEXIST`){e.copyFileSync(t,n),e.rmSync(t,{force:!0});return}throw r}}function c(t,n){let r=e.openSync(t,`w`,384);try{e.writeFileSync(r,n,`utf8`),e.fsyncSync(r)}finally{e.closeSync(r)}}function l(t){try{let n=e.readFileSync(t,`utf8`);return JSON.parse(n)}catch{return}}function u(a,l){let{targetPath:u,followsSymlink:d}=o(a),f=`${u}.${n()}.tmp`,p=`${JSON.stringify(l,null,2)}\n`;d||e.mkdirSync(t.dirname(u),{recursive:!0,mode:448});try{c(f,p),r(f),s(f,u),r(u),i(u)}finally{try{e.rmSync(f,{force:!0})}catch{}}}export{u as n,l as t};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{t as e}from"./chunk-DHbaKqs-.mjs";var t=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Allow=e.ALL=e.COLLECTION=e.ATOM=e.SPECIAL=e.INF=e._INFINITY=e.INFINITY=e.NAN=e.BOOL=e.NULL=e.OBJ=e.ARR=e.NUM=e.STR=void 0,e.STR=1,e.NUM=2,e.ARR=4,e.OBJ=8,e.NULL=16,e.BOOL=32,e.NAN=64,e.INFINITY=128,e._INFINITY=256,e.INF=e.INFINITY|e._INFINITY,e.SPECIAL=e.NULL|e.BOOL|e.INF|e.NAN,e.ATOM=e.STR|e.NUM|e.SPECIAL,e.COLLECTION=e.ARR|e.OBJ,e.ALL=e.ATOM|e.COLLECTION,e.Allow={STR:e.STR,NUM:e.NUM,ARR:e.ARR,OBJ:e.OBJ,NULL:e.NULL,BOOL:e.BOOL,NAN:e.NAN,INFINITY:e.INFINITY,_INFINITY:e._INFINITY,INF:e.INF,SPECIAL:e.SPECIAL,ATOM:e.ATOM,COLLECTION:e.COLLECTION,ALL:e.ALL},e.default=e.Allow})),n=e((e=>{var n=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__exportStar||function(e,t){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(t,r)&&n(t,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.Allow=e.MalformedJSON=e.PartialJSON=e.parseJSON=e.parse=void 0;let i=t();Object.defineProperty(e,`Allow`,{enumerable:!0,get:function(){return i.Allow}}),r(t(),e);var a=class extends Error{};e.PartialJSON=a;var o=class extends Error{};e.MalformedJSON=o;function s(e,t=i.Allow.ALL){if(typeof e!=`string`)throw TypeError(`expecting str, got ${typeof e}`);if(!e.trim())throw Error(`${e} is empty`);return c(e.trim(),t)}e.parseJSON=s;let c=(e,t)=>{let n=e.length,r=0,s=e=>{throw new a(`${e} at position ${r}`)},c=e=>{throw new o(`${e} at position ${r}`)},l=()=>(m(),r>=n&&s(`Unexpected end of input`),e[r]===`"`?u():e[r]===`{`?d():e[r]===`[`?f():e.substring(r,r+4)===`null`||i.Allow.NULL&t&&n-r<4&&`null`.startsWith(e.substring(r))?(r+=4,null):e.substring(r,r+4)===`true`||i.Allow.BOOL&t&&n-r<4&&`true`.startsWith(e.substring(r))?(r+=4,!0):e.substring(r,r+5)===`false`||i.Allow.BOOL&t&&n-r<5&&`false`.startsWith(e.substring(r))?(r+=5,!1):e.substring(r,r+8)===`Infinity`||i.Allow.INFINITY&t&&n-r<8&&`Infinity`.startsWith(e.substring(r))?(r+=8,1/0):e.substring(r,r+9)===`-Infinity`||i.Allow._INFINITY&t&&1<n-r&&n-r<9&&`-Infinity`.startsWith(e.substring(r))?(r+=9,-1/0):e.substring(r,r+3)===`NaN`||i.Allow.NAN&t&&n-r<3&&`NaN`.startsWith(e.substring(r))?(r+=3,NaN):p()),u=()=>{let a=r,o=!1;for(r++;r<n&&(e[r]!==`"`||o&&e[r-1]===`\\`);)o=e[r]===`\\`?!o:!1,r++;if(e.charAt(r)==`"`)try{return JSON.parse(e.substring(a,++r-Number(o)))}catch(e){c(String(e))}else if(i.Allow.STR&t)try{return JSON.parse(e.substring(a,r-Number(o))+`"`)}catch{return JSON.parse(e.substring(a,e.lastIndexOf(`\\`))+`"`)}s(`Unterminated string literal`)},d=()=>{r++,m();let a={};try{for(;e[r]!==`}`;){if(m(),r>=n&&i.Allow.OBJ&t)return a;let o=u();m(),r++;try{a[o]=l()}catch(e){if(i.Allow.OBJ&t)return a;throw e}m(),e[r]===`,`&&r++}}catch{if(i.Allow.OBJ&t)return a;s(`Expected '}' at end of object`)}return r++,a},f=()=>{r++;let n=[];try{for(;e[r]!==`]`;)n.push(l()),m(),e[r]===`,`&&r++}catch{if(i.Allow.ARR&t)return n;s(`Expected ']' at end of array`)}return r++,n},p=()=>{if(r===0){e===`-`&&c(`Not sure what '-' is`);try{return JSON.parse(e)}catch(n){if(i.Allow.NUM&t)try{return JSON.parse(e.substring(0,e.lastIndexOf(`e`)))}catch{}c(String(n))}}let a=r;for(e[r]===`-`&&r++;e[r]&&`,]}`.indexOf(e[r])===-1;)r++;r==n&&!(i.Allow.NUM&t)&&s(`Unterminated number literal`);try{return JSON.parse(e.substring(a,r))}catch{e.substring(a,r)===`-`&&s(`Not sure what '-' is`);try{return JSON.parse(e.substring(a,e.lastIndexOf(`e`)))}catch(e){c(String(e))}}},m=()=>{for(;r<n&&`
|
|
2
|
+
\r `.includes(e[r]);)r++};return l()};e.parse=s}))();const r=new Set([`"`,`\\`,`/`,`b`,`f`,`n`,`r`,`t`,`u`]);function i(e){let t=e.codePointAt(0);return t!==void 0&&t>=0&&t<=31}function a(e){switch(e){case`\b`:return`\\b`;case`\f`:return`\\f`;case`
|
|
3
|
+
`:return`\\n`;case`\r`:return`\\r`;case` `:return`\\t`;default:return`\\u${e.codePointAt(0)?.toString(16).padStart(4,`0`)??`0000`}`}}function o(e){let t=``,n=!1;for(let o=0;o<e.length;o++){let s=e[o];if(!n){t+=s,s===`"`&&(n=!0);continue}if(s===`"`){t+=s,n=!1;continue}if(s===`\\`){let n=e[o+1];if(n===void 0){t+=`\\\\`;continue}if(n===`u`){let n=e.slice(o+2,o+6);if(/^[0-9a-fA-F]{4}$/.test(n)){t+=`\\u${n}`,o+=5;continue}}if(r.has(n)){t+=`\\${n}`,o+=1;continue}t+=`\\\\`;continue}t+=i(s)?a(s):s}return t}function s(e){try{return JSON.parse(e)}catch(t){let n=o(e);if(n!==e)return JSON.parse(n);throw t}}function c(e){if(!e||e.trim()===``)return{};try{return s(e)}catch{try{return(0,n.parse)(e)??{}}catch{try{return(0,n.parse)(o(e))??{}}catch{return{}}}}}export{c as n,s as t};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{i as e,t}from"./chunk-DHbaKqs-.mjs";var n=t(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}})),r=t(((e,t)=>{(function(e){var n,r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,i=Math.ceil,a=Math.floor,o=`[BigNumber Error] `,s=o+`Number primitive has more than 15 significant digits: `,c=0x5af3107a4000,l=14,u=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,0xe8d4a51000,0x9184e72a000],f=1e7,p=1e9;function m(e){var t,n,S,C=L.prototype={constructor:L,toString:null,valueOf:null},w=new L(1),T=20,E=4,D=-7,O=21,k=-1e7,A=1e7,j=!1,M=1,N=0,P={prefix:``,groupSize:3,secondaryGroupSize:0,groupSeparator:`,`,decimalSeparator:`.`,fractionGroupSize:0,fractionGroupSeparator:`\xA0`,suffix:``},F=`0123456789abcdefghijklmnopqrstuvwxyz`,I=!0;function L(e,t){var i,o,c,d,f,p,m,h,g=this;if(!(g instanceof L))return new L(e,t);if(t==null){if(e&&e._isBigNumber===!0){g.s=e.s,!e.c||e.e>A?g.c=g.e=null:e.e<k?g.c=[g.e=0]:(g.e=e.e,g.c=e.c.slice());return}if((p=typeof e==`number`)&&e*0==0){if(g.s=1/e<0?(e=-e,-1):1,e===~~e){for(d=0,f=e;f>=10;f/=10,d++);d>A?g.c=g.e=null:(g.e=d,g.c=[e]);return}h=String(e)}else{if(!r.test(h=String(e)))return S(g,h,p);g.s=h.charCodeAt(0)==45?(h=h.slice(1),-1):1}(d=h.indexOf(`.`))>-1&&(h=h.replace(`.`,``)),(f=h.search(/e/i))>0?(d<0&&(d=f),d+=+h.slice(f+1),h=h.substring(0,f)):d<0&&(d=h.length)}else{if(v(t,2,F.length,`Base`),t==10&&I)return g=new L(e),V(g,T+g.e+1,E);if(h=String(e),p=typeof e==`number`){if(e*0!=0)return S(g,h,p,t);if(g.s=1/e<0?(h=h.slice(1),-1):1,L.DEBUG&&h.replace(/^0\.0*|\./,``).length>15)throw Error(s+e)}else g.s=h.charCodeAt(0)===45?(h=h.slice(1),-1):1;for(i=F.slice(0,t),d=f=0,m=h.length;f<m;f++)if(i.indexOf(o=h.charAt(f))<0){if(o==`.`){if(f>d){d=m;continue}}else if(!c&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){c=!0,f=-1,d=0;continue}return S(g,String(e),p,t)}p=!1,h=n(h,t,10,g.s),(d=h.indexOf(`.`))>-1?h=h.replace(`.`,``):d=h.length}for(f=0;h.charCodeAt(f)===48;f++);for(m=h.length;h.charCodeAt(--m)===48;);if(h=h.slice(f,++m)){if(m-=f,p&&L.DEBUG&&m>15&&(e>u||e!==a(e)))throw Error(s+g.s*e);if((d=d-f-1)>A)g.c=g.e=null;else if(d<k)g.c=[g.e=0];else{if(g.e=d,g.c=[],f=(d+1)%l,d<0&&(f+=l),f<m){for(f&&g.c.push(+h.slice(0,f)),m-=l;f<m;)g.c.push(+h.slice(f,f+=l));f=l-(h=h.slice(f)).length}else f-=m;for(;f--;h+=`0`);g.c.push(+h)}}else g.c=[g.e=0]}L.clone=m,L.ROUND_UP=0,L.ROUND_DOWN=1,L.ROUND_CEIL=2,L.ROUND_FLOOR=3,L.ROUND_HALF_UP=4,L.ROUND_HALF_DOWN=5,L.ROUND_HALF_EVEN=6,L.ROUND_HALF_CEIL=7,L.ROUND_HALF_FLOOR=8,L.EUCLID=9,L.config=L.set=function(e){var t,n;if(e!=null)if(typeof e==`object`){if(e.hasOwnProperty(t=`DECIMAL_PLACES`)&&(n=e[t],v(n,0,p,t),T=n),e.hasOwnProperty(t=`ROUNDING_MODE`)&&(n=e[t],v(n,0,8,t),E=n),e.hasOwnProperty(t=`EXPONENTIAL_AT`)&&(n=e[t],n&&n.pop?(v(n[0],-p,0,t),v(n[1],0,p,t),D=n[0],O=n[1]):(v(n,-p,p,t),D=-(O=n<0?-n:n))),e.hasOwnProperty(t=`RANGE`))if(n=e[t],n&&n.pop)v(n[0],-p,-1,t),v(n[1],1,p,t),k=n[0],A=n[1];else if(v(n,-p,p,t),n)k=-(A=n<0?-n:n);else throw Error(o+t+` cannot be zero: `+n);if(e.hasOwnProperty(t=`CRYPTO`))if(n=e[t],n===!!n)if(n)if(typeof crypto<`u`&&crypto&&(crypto.getRandomValues||crypto.randomBytes))j=n;else throw j=!n,Error(o+`crypto unavailable`);else j=n;else throw Error(o+t+` not true or false: `+n);if(e.hasOwnProperty(t=`MODULO_MODE`)&&(n=e[t],v(n,0,9,t),M=n),e.hasOwnProperty(t=`POW_PRECISION`)&&(n=e[t],v(n,0,p,t),N=n),e.hasOwnProperty(t=`FORMAT`))if(n=e[t],typeof n==`object`)P=n;else throw Error(o+t+` not an object: `+n);if(e.hasOwnProperty(t=`ALPHABET`))if(n=e[t],typeof n==`string`&&!/^.?$|[+\-.\s]|(.).*\1/.test(n))I=n.slice(0,10)==`0123456789`,F=n;else throw Error(o+t+` invalid: `+n)}else throw Error(o+`Object expected: `+e);return{DECIMAL_PLACES:T,ROUNDING_MODE:E,EXPONENTIAL_AT:[D,O],RANGE:[k,A],CRYPTO:j,MODULO_MODE:M,POW_PRECISION:N,FORMAT:P,ALPHABET:F}},L.isBigNumber=function(e){if(!e||e._isBigNumber!==!0)return!1;if(!L.DEBUG)return!0;var t,n,r=e.c,i=e.e,s=e.s;out:if({}.toString.call(r)==`[object Array]`){if((s===1||s===-1)&&i>=-p&&i<=p&&i===a(i)){if(r[0]===0){if(i===0&&r.length===1)return!0;break out}if(t=(i+1)%l,t<1&&(t+=l),String(r[0]).length==t){for(t=0;t<r.length;t++)if(n=r[t],n<0||n>=c||n!==a(n))break out;if(n!==0)return!0}}}else if(r===null&&i===null&&(s===null||s===1||s===-1))return!0;throw Error(o+`Invalid BigNumber: `+e)},L.maximum=L.max=function(){return z(arguments,-1)},L.minimum=L.min=function(){return z(arguments,1)},L.random=(function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return a(Math.random()*e)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(e){var n,r,s,c,u,f=0,m=[],h=new L(w);if(e==null?e=T:v(e,0,p),c=i(e/l),j)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(c*=2));f<c;)u=n[f]*131072+(n[f+1]>>>11),u>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[f]=r[0],n[f+1]=r[1]):(m.push(u%0x5af3107a4000),f+=2);f=c/2}else if(crypto.randomBytes){for(n=crypto.randomBytes(c*=7);f<c;)u=(n[f]&31)*281474976710656+n[f+1]*1099511627776+n[f+2]*4294967296+n[f+3]*16777216+(n[f+4]<<16)+(n[f+5]<<8)+n[f+6],u>=9e15?crypto.randomBytes(7).copy(n,f):(m.push(u%0x5af3107a4000),f+=7);f=c/7}else throw j=!1,Error(o+`crypto unavailable`);if(!j)for(;f<c;)u=t(),u<9e15&&(m[f++]=u%0x5af3107a4000);for(c=m[--f],e%=l,c&&e&&(u=d[l-e],m[f]=a(c/u)*u);m[f]===0;m.pop(),f--);if(f<0)m=[s=0];else{for(s=-1;m[0]===0;m.splice(0,1),s-=l);for(f=1,u=m[0];u>=10;u/=10,f++);f<l&&(s-=l-f)}return h.e=s,h.c=m,h}})(),L.sum=function(){for(var e=1,t=arguments,n=new L(t[0]);e<t.length;)n=n.plus(t[e++]);return n},n=(function(){var e=`0123456789`;function n(e,t,n,r){for(var i,a=[0],o,s=0,c=e.length;s<c;){for(o=a.length;o--;a[o]*=t);for(a[0]+=r.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>n-1&&(a[i+1]??(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(r,i,a,o,s){var c,l,u,d,f,p,m,h,_=r.indexOf(`.`),v=T,y=E;for(_>=0&&(d=N,N=0,r=r.replace(`.`,``),h=new L(i),p=h.pow(r.length-_),N=d,h.c=n(x(g(p.c),p.e,`0`),10,a,e),h.e=h.c.length),m=n(r,i,a,s?(c=F,e):(c=e,F)),u=d=m.length;m[--d]==0;m.pop());if(!m[0])return c.charAt(0);if(_<0?--u:(p.c=m,p.e=u,p.s=o,p=t(p,h,v,y,a),m=p.c,f=p.r,u=p.e),l=u+v+1,_=m[l],d=a/2,f=f||l<0||m[l+1]!=null,f=y<4?(_!=null||f)&&(y==0||y==(p.s<0?3:2)):_>d||_==d&&(y==4||f||y==6&&m[l-1]&1||y==(p.s<0?8:7)),l<1||!m[0])r=f?x(c.charAt(1),-v,c.charAt(0)):c.charAt(0);else{if(m.length=l,f)for(--a;++m[--l]>a;)m[l]=0,l||(++u,m=[1].concat(m));for(d=m.length;!m[--d];);for(_=0,r=``;_<=d;r+=c.charAt(m[_++]));r=x(r,u,c.charAt(0))}return r}})(),t=(function(){function e(e,t,n){var r,i,a,o,s=0,c=e.length,l=t%f,u=t/f|0;for(e=e.slice();c--;)a=e[c]%f,o=e[c]/f|0,r=u*a+o*l,i=l*a+r%f*f+s,s=(i/n|0)+(r/f|0)+u*o,e[c]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=+(e[n]<t[n]),e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,o,s,u){var d,f,p,m,g,_,v,y,b,x,S,C,w,T,E,D,O,k=r.s==i.s?1:-1,A=r.c,j=i.c;if(!A||!A[0]||!j||!j[0])return new L(!r.s||!i.s||(A?j&&A[0]==j[0]:!j)?NaN:A&&A[0]==0||!j?k*0:k/0);for(y=new L(k),b=y.c=[],f=r.e-i.e,k=o+f+1,u||(u=c,f=h(r.e/l)-h(i.e/l),k=k/l|0),p=0;j[p]==(A[p]||0);p++);if(j[p]>(A[p]||0)&&f--,k<0)b.push(1),m=!0;else{for(T=A.length,D=j.length,p=0,k+=2,g=a(u/(j[0]+1)),g>1&&(j=e(j,g,u),A=e(A,g,u),D=j.length,T=A.length),w=D,x=A.slice(0,D),S=x.length;S<D;x[S++]=0);O=j.slice(),O=[0].concat(O),E=j[0],j[1]>=u/2&&E++;do{if(g=0,d=t(j,x,D,S),d<0){if(C=x[0],D!=S&&(C=C*u+(x[1]||0)),g=a(C/E),g>1)for(g>=u&&(g=u-1),_=e(j,g,u),v=_.length,S=x.length;t(_,x,v,S)==1;)g--,n(_,D<v?O:j,v,u),v=_.length,d=1;else g==0&&(d=g=1),_=j.slice(),v=_.length;if(v<S&&(_=[0].concat(_)),n(x,_,S,u),S=x.length,d==-1)for(;t(j,x,D,S)<1;)g++,n(x,D<S?O:j,S,u),S=x.length}else d===0&&(g++,x=[0]);b[p++]=g,x[0]?x[S++]=A[w]||0:(x=[A[w]],S=1)}while((w++<T||x[0]!=null)&&k--);m=x[0]!=null,b[0]||b.splice(0,1)}if(u==c){for(p=1,k=b[0];k>=10;k/=10,p++);V(y,o+(y.e=p+f*l-1)+1,s,m)}else y.e=f,y.r=+m;return y}})();function R(e,t,n,r){var i,a,o,s,c;if(n==null?n=E:v(n,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,t==null)c=g(e.c),c=r==1||r==2&&(o<=D||o>=O)?b(c,o):x(c,o,`0`);else if(e=V(new L(e),t,n),a=e.e,c=g(e.c),s=c.length,r==1||r==2&&(t<=a||a<=D)){for(;s<t;c+=`0`,s++);c=b(c,a)}else if(t-=o+(r===2&&a>o),c=x(c,a,`0`),a+1>s){if(--t>0)for(c+=`.`;t--;c+=`0`);}else if(t+=a-s,t>0)for(a+1==s&&(c+=`.`);t--;c+=`0`);return e.s<0&&i?`-`+c:c}function z(e,t){for(var n,r,i=1,a=new L(e[0]);i<e.length;i++)r=new L(e[i]),(!r.s||(n=_(a,r))===t||n===0&&a.s===t)&&(a=r);return a}function B(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*l-1)>A?e.c=e.e=null:n<k?e.c=[e.e=0]:(e.e=n,e.c=t),e}S=(function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(a,s,c,l){var u,d=c?s:s.replace(i,``);if(r.test(d))a.s=isNaN(d)?null:d<0?-1:1;else{if(!c&&(d=d.replace(e,function(e,t,n){return u=(n=n.toLowerCase())==`x`?16:n==`b`?2:8,!l||l==u?t:e}),l&&(u=l,d=d.replace(t,`$1`).replace(n,`0.$1`)),s!=d))return new L(d,u);if(L.DEBUG)throw Error(o+`Not a`+(l?` base `+l:``)+` number: `+s);a.s=null}a.c=a.e=null}})();function V(e,t,n,r){var o,s,u,f,p,m,h,g=e.c,_=d;if(g){out:{for(o=1,f=g[0];f>=10;f/=10,o++);if(s=t-o,s<0)s+=l,u=t,p=g[m=0],h=a(p/_[o-u-1]%10);else if(m=i((s+1)/l),m>=g.length)if(r){for(;g.length<=m;g.push(0));p=h=0,o=1,s%=l,u=s-l+1}else break out;else{for(p=f=g[m],o=1;f>=10;f/=10,o++);s%=l,u=s-l+o,h=u<0?0:a(p/_[o-u-1]%10)}if(r=r||t<0||g[m+1]!=null||(u<0?p:p%_[o-u-1]),r=n<4?(h||r)&&(n==0||n==(e.s<0?3:2)):h>5||h==5&&(n==4||r||n==6&&(s>0?u>0?p/_[o-u]:0:g[m-1])%10&1||n==(e.s<0?8:7)),t<1||!g[0])return g.length=0,r?(t-=e.e+1,g[0]=_[(l-t%l)%l],e.e=-t||0):g[0]=e.e=0,e;if(s==0?(g.length=m,f=1,m--):(g.length=m+1,f=_[l-s],g[m]=u>0?a(p/_[o-u]%_[u])*f:0),r)for(;;)if(m==0){for(s=1,u=g[0];u>=10;u/=10,s++);for(u=g[0]+=f,f=1;u>=10;u/=10,f++);s!=f&&(e.e++,g[0]==c&&(g[0]=1));break}else{if(g[m]+=f,g[m]!=c)break;g[m--]=0,f=1}for(s=g.length;g[--s]===0;g.pop());}e.e>A?e.c=e.e=null:e.e<k&&(e.c=[e.e=0])}return e}function H(e){var t,n=e.e;return n===null?e.toString():(t=g(e.c),t=n<=D||n>=O?b(t,n):x(t,n,`0`),e.s<0?`-`+t:t)}return C.absoluteValue=C.abs=function(){var e=new L(this);return e.s<0&&(e.s=1),e},C.comparedTo=function(e,t){return _(this,new L(e,t))},C.decimalPlaces=C.dp=function(e,t){var n,r,i,a=this;if(e!=null)return v(e,0,p),t==null?t=E:v(t,0,8),V(new L(a),e+a.e+1,t);if(!(n=a.c))return null;if(r=((i=n.length-1)-h(this.e/l))*l,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},C.dividedBy=C.div=function(e,n){return t(this,new L(e,n),T,E)},C.dividedToIntegerBy=C.idiv=function(e,n){return t(this,new L(e,n),0,1)},C.exponentiatedBy=C.pow=function(e,t){var n,r,s,c,u,d,f,p,m,h=this;if(e=new L(e),e.c&&!e.isInteger())throw Error(o+`Exponent not an integer: `+H(e));if(t!=null&&(t=new L(t)),d=e.e>14,!h.c||!h.c[0]||h.c[0]==1&&!h.e&&h.c.length==1||!e.c||!e.c[0])return m=new L(H(h)**(d?e.s*(2-y(e)):+H(e))),t?m.mod(t):m;if(f=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new L(NaN);r=!f&&h.isInteger()&&t.isInteger(),r&&(h=h.mod(t))}else if(e.e>9&&(h.e>0||h.e<-1||(h.e==0?h.c[0]>1||d&&h.c[1]>=24e7:h.c[0]<8e13||d&&h.c[0]<=9999975e7)))return c=h.s<0&&y(e)?-0:0,h.e>-1&&(c=1/c),new L(f?1/c:c);else N&&(c=i(N/l+2));for(d?(n=new L(.5),f&&(e.s=1),p=y(e)):(s=Math.abs(+H(e)),p=s%2),m=new L(w);;){if(p){if(m=m.times(h),!m.c)break;c?m.c.length>c&&(m.c.length=c):r&&(m=m.mod(t))}if(s){if(s=a(s/2),s===0)break;p=s%2}else if(e=e.times(n),V(e,e.e+1,1),e.e>14)p=y(e);else{if(s=+H(e),s===0)break;p=s%2}h=h.times(h),c?h.c&&h.c.length>c&&(h.c.length=c):r&&(h=h.mod(t))}return r?m:(f&&(m=w.div(m)),t?m.mod(t):c?V(m,N,E,u):m)},C.integerValue=function(e){var t=new L(this);return e==null?e=E:v(e,0,8),V(t,t.e+1,e)},C.isEqualTo=C.eq=function(e,t){return _(this,new L(e,t))===0},C.isFinite=function(){return!!this.c},C.isGreaterThan=C.gt=function(e,t){return _(this,new L(e,t))>0},C.isGreaterThanOrEqualTo=C.gte=function(e,t){return(t=_(this,new L(e,t)))===1||t===0},C.isInteger=function(){return!!this.c&&h(this.e/l)>this.c.length-2},C.isLessThan=C.lt=function(e,t){return _(this,new L(e,t))<0},C.isLessThanOrEqualTo=C.lte=function(e,t){return(t=_(this,new L(e,t)))===-1||t===0},C.isNaN=function(){return!this.s},C.isNegative=function(){return this.s<0},C.isPositive=function(){return this.s>0},C.isZero=function(){return!!this.c&&this.c[0]==0},C.minus=function(e,t){var n,r,i,a,o=this,s=o.s;if(e=new L(e,t),t=e.s,!s||!t)return new L(NaN);if(s!=t)return e.s=-t,o.plus(e);var u=o.e/l,d=e.e/l,f=o.c,p=e.c;if(!u||!d){if(!f||!p)return f?(e.s=-t,e):new L(p?o:NaN);if(!f[0]||!p[0])return p[0]?(e.s=-t,e):new L(f[0]?o:E==3?-0:0)}if(u=h(u),d=h(d),f=f.slice(),s=u-d){for((a=s<0)?(s=-s,i=f):(d=u,i=p),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(r=(a=(s=f.length)<(t=p.length))?s:t,s=t=0;t<r;t++)if(f[t]!=p[t]){a=f[t]<p[t];break}if(a&&(i=f,f=p,p=i,e.s=-e.s),t=(r=p.length)-(n=f.length),t>0)for(;t--;f[n++]=0);for(t=c-1;r>s;){if(f[--r]<p[r]){for(n=r;n&&!f[--n];f[n]=t);--f[n],f[r]+=c}f[r]-=p[r]}for(;f[0]==0;f.splice(0,1),--d);return f[0]?B(e,f,d):(e.s=E==3?-1:1,e.c=[e.e=0],e)},C.modulo=C.mod=function(e,n){var r,i,a=this;return e=new L(e,n),!a.c||!e.s||e.c&&!e.c[0]?new L(NaN):!e.c||a.c&&!a.c[0]?new L(a):(M==9?(i=e.s,e.s=1,r=t(a,e,0,3),e.s=i,r.s*=i):r=t(a,e,0,M),e=a.minus(r.times(e)),!e.c[0]&&M==1&&(e.s=a.s),e)},C.multipliedBy=C.times=function(e,t){var n,r,i,a,o,s,u,d,p,m,g,_,v,y,b,x=this,S=x.c,C=(e=new L(e,t)).c;if(!S||!C||!S[0]||!C[0])return!x.s||!e.s||S&&!S[0]&&!C||C&&!C[0]&&!S?e.c=e.e=e.s=null:(e.s*=x.s,!S||!C?e.c=e.e=null:(e.c=[0],e.e=0)),e;for(r=h(x.e/l)+h(e.e/l),e.s*=x.s,u=S.length,m=C.length,u<m&&(v=S,S=C,C=v,i=u,u=m,m=i),i=u+m,v=[];i--;v.push(0));for(y=c,b=f,i=m;--i>=0;){for(n=0,g=C[i]%b,_=C[i]/b|0,o=u,a=i+o;a>i;)d=S[--o]%b,p=S[o]/b|0,s=_*d+p*g,d=g*d+s%b*b+v[a]+n,n=(d/y|0)+(s/b|0)+_*p,v[a--]=d%y;v[a]=n}return n?++r:v.splice(0,1),B(e,v,r)},C.negated=function(){var e=new L(this);return e.s=-e.s||null,e},C.plus=function(e,t){var n,r=this,i=r.s;if(e=new L(e,t),t=e.s,!i||!t)return new L(NaN);if(i!=t)return e.s=-t,r.minus(e);var a=r.e/l,o=e.e/l,s=r.c,u=e.c;if(!a||!o){if(!s||!u)return new L(i/0);if(!s[0]||!u[0])return u[0]?e:new L(s[0]?r:i*0)}if(a=h(a),o=h(o),s=s.slice(),i=a-o){for(i>0?(o=a,n=u):(i=-i,n=s),n.reverse();i--;n.push(0));n.reverse()}for(i=s.length,t=u.length,i-t<0&&(n=u,u=s,s=n,t=i),i=0;t;)i=(s[--t]=s[t]+u[t]+i)/c|0,s[t]=c===s[t]?0:s[t]%c;return i&&(s=[i].concat(s),++o),B(e,s,o)},C.precision=C.sd=function(e,t){var n,r,i,a=this;if(e!=null&&e!==!!e)return v(e,1,p),t==null?t=E:v(t,0,8),V(new L(a),e,t);if(!(n=a.c))return null;if(i=n.length-1,r=i*l+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&a.e+1>r&&(r=a.e+1),r},C.shiftedBy=function(e){return v(e,-u,u),this.times(`1e`+e)},C.squareRoot=C.sqrt=function(){var e,n,r,i,a,o=this,s=o.c,c=o.s,l=o.e,u=T+4,d=new L(`0.5`);if(c!==1||!s||!s[0])return new L(!c||c<0&&(!s||s[0])?NaN:s?o:1/0);if(c=Math.sqrt(+H(o)),c==0||c==1/0?(n=g(s),(n.length+l)%2==0&&(n+=`0`),c=Math.sqrt(+n),l=h((l+1)/2)-(l<0||l%2),c==1/0?n=`5e`+l:(n=c.toExponential(),n=n.slice(0,n.indexOf(`e`)+1)+l),r=new L(n)):r=new L(c+``),r.c[0]){for(l=r.e,c=l+u,c<3&&(c=0);;)if(a=r,r=d.times(a.plus(t(o,a,u,1))),g(a.c).slice(0,c)===(n=g(r.c)).slice(0,c))if(r.e<l&&--c,n=n.slice(c-3,c+1),n==`9999`||!i&&n==`4999`){if(!i&&(V(a,a.e+T+2,0),a.times(a).eq(o))){r=a;break}u+=4,c+=4,i=1}else{(!+n||!+n.slice(1)&&n.charAt(0)==`5`)&&(V(r,r.e+T+2,1),e=!r.times(r).eq(o));break}}return V(r,r.e+T+1,E,e)},C.toExponential=function(e,t){return e!=null&&(v(e,0,p),e++),R(this,e,t,1)},C.toFixed=function(e,t){return e!=null&&(v(e,0,p),e=e+this.e+1),R(this,e,t)},C.toFormat=function(e,t,n){var r,i=this;if(n==null)e!=null&&t&&typeof t==`object`?(n=t,t=null):e&&typeof e==`object`?(n=e,e=t=null):n=P;else if(typeof n!=`object`)throw Error(o+`Argument not an object: `+n);if(r=i.toFixed(e,t),i.c){var a,s=r.split(`.`),c=+n.groupSize,l=+n.secondaryGroupSize,u=n.groupSeparator||``,d=s[0],f=s[1],p=i.s<0,m=p?d.slice(1):d,h=m.length;if(l&&(a=c,c=l,l=a,h-=a),c>0&&h>0){for(a=h%c||c,d=m.substr(0,a);a<h;a+=c)d+=u+m.substr(a,c);l>0&&(d+=u+m.slice(a)),p&&(d=`-`+d)}r=f?d+(n.decimalSeparator||``)+((l=+n.fractionGroupSize)?f.replace(RegExp(`\\d{`+l+`}\\B`,`g`),`$&`+(n.fractionGroupSeparator||``)):f):d}return(n.prefix||``)+r+(n.suffix||``)},C.toFraction=function(e){var n,r,i,a,s,c,u,f,p,m,h,_,v=this,y=v.c;if(e!=null&&(u=new L(e),!u.isInteger()&&(u.c||u.s!==1)||u.lt(w)))throw Error(o+`Argument `+(u.isInteger()?`out of range: `:`not an integer: `)+H(u));if(!y)return new L(v);for(n=new L(w),p=r=new L(w),i=f=new L(w),_=g(y),s=n.e=_.length-v.e-1,n.c[0]=d[(c=s%l)<0?l+c:c],e=!e||u.comparedTo(n)>0?s>0?n:p:u,c=A,A=1/0,u=new L(_),f.c[0]=0;m=t(u,n,0,1),a=r.plus(m.times(i)),a.comparedTo(e)!=1;)r=i,i=a,p=f.plus(m.times(a=p)),f=a,n=u.minus(m.times(a=n)),u=a;return a=t(e.minus(r),i,0,1),f=f.plus(a.times(p)),r=r.plus(a.times(i)),f.s=p.s=v.s,s*=2,h=t(p,i,s,E).minus(v).abs().comparedTo(t(f,r,s,E).minus(v).abs())<1?[p,i]:[f,r],A=c,h},C.toNumber=function(){return+H(this)},C.toPrecision=function(e,t){return e!=null&&v(e,1,p),R(this,e,t,2)},C.toString=function(e){var t,r=this,i=r.s,a=r.e;return a===null?i?(t=`Infinity`,i<0&&(t=`-`+t)):t=`NaN`:(e==null?t=a<=D||a>=O?b(g(r.c),a):x(g(r.c),a,`0`):e===10&&I?(r=V(new L(r),T+a+1,E),t=x(g(r.c),r.e,`0`)):(v(e,2,F.length,`Base`),t=n(x(g(r.c),a,`0`),10,e,i,!0)),i<0&&r.c[0]&&(t=`-`+t)),t},C.valueOf=C.toJSON=function(){return H(this)},C._isBigNumber=!0,e!=null&&L.set(e),L}function h(e){var t=e|0;return e>0||e===t?t:t-1}function g(e){for(var t,n,r=1,i=e.length,a=e[0]+``;r<i;){for(t=e[r++]+``,n=l-t.length;n--;t=`0`+t);a+=t}for(i=a.length;a.charCodeAt(--i)===48;);return a.slice(0,i+1||1)}function _(e,t){var n,r,i=e.c,a=t.c,o=e.s,s=t.s,c=e.e,l=t.e;if(!o||!s)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=c==l,!i||!a)return r?0:!i^n?1:-1;if(!r)return c>l^n?1:-1;for(s=(c=i.length)<(l=a.length)?c:l,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^n?1:-1;return c==l?0:c>l^n?1:-1}function v(e,t,n,r){if(e<t||e>n||e!==a(e))throw Error(o+(r||`Argument`)+(typeof e==`number`?e<t||e>n?` out of range: `:` not an integer: `:` not a primitive number: `)+String(e))}function y(e){var t=e.c.length-1;return h(e.e/l)==t&&e.c[t]%2!=0}function b(e,t){return(e.length>1?e.charAt(0)+`.`+e.slice(1):e)+(t<0?`e`:`e+`)+t}function x(e,t,n){var r,i;if(t<0){for(i=n+`.`;++t;i+=n);e=i+e}else if(r=e.length,++t>r){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+`.`+e.slice(t));return e}n=m(),n.default=n.BigNumber=n,typeof define==`function`&&define.amd?define(function(){return n}):t!==void 0&&t.exports?t.exports=n:(e||=typeof self<`u`&&self?self:window,e.BigNumber=n)})(e)})),i=t(((e,t)=>{var n=r(),i=t.exports;(function(){var e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,t,r,a={"\b":`\\b`," ":`\\t`,"\n":`\\n`,"\f":`\\f`,"\r":`\\r`,'"':`\\"`,"\\":`\\\\`},o;function s(t){return e.lastIndex=0,e.test(t)?`"`+t.replace(e,function(e){var t=a[e];return typeof t==`string`?t:`\\u`+(`0000`+e.charCodeAt(0).toString(16)).slice(-4)})+`"`:`"`+t+`"`}function c(e,i){var a,l,u,d,f=t,p,m=i[e],h=m!=null&&(m instanceof n||n.isBigNumber(m));switch(m&&typeof m==`object`&&typeof m.toJSON==`function`&&(m=m.toJSON(e)),typeof o==`function`&&(m=o.call(i,e,m)),typeof m){case`string`:return h?m:s(m);case`number`:return isFinite(m)?String(m):`null`;case`boolean`:case`null`:case`bigint`:return String(m);case`object`:if(!m)return`null`;if(t+=r,p=[],Object.prototype.toString.apply(m)===`[object Array]`){for(d=m.length,a=0;a<d;a+=1)p[a]=c(a,m)||`null`;return u=p.length===0?`[]`:t?`[
|
|
2
|
+
`+t+p.join(`,
|
|
3
|
+
`+t)+`
|
|
4
|
+
`+f+`]`:`[`+p.join(`,`)+`]`,t=f,u}if(o&&typeof o==`object`)for(d=o.length,a=0;a<d;a+=1)typeof o[a]==`string`&&(l=o[a],u=c(l,m),u&&p.push(s(l)+(t?`: `:`:`)+u));else Object.keys(m).forEach(function(e){var n=c(e,m);n&&p.push(s(e)+(t?`: `:`:`)+n)});return u=p.length===0?`{}`:t?`{
|
|
5
|
+
`+t+p.join(`,
|
|
6
|
+
`+t)+`
|
|
7
|
+
`+f+`}`:`{`+p.join(`,`)+`}`,t=f,u}}typeof i.stringify!=`function`&&(i.stringify=function(e,n,i){var a;if(t=``,r=``,typeof i==`number`)for(a=0;a<i;a+=1)r+=` `;else typeof i==`string`&&(r=i);if(o=n,n&&typeof n!=`function`&&(typeof n!=`object`||typeof n.length!=`number`))throw Error(`JSON.stringify`);return c(``,{"":e})})})()})),a=t(((e,t)=>{var n=null;let i=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,a=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;t.exports=function(e){var t={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:`error`,constructorAction:`error`};if(e!=null){if(e.strict===!0&&(t.strict=!0),e.storeAsString===!0&&(t.storeAsString=!0),t.alwaysParseAsBig=e.alwaysParseAsBig===!0?e.alwaysParseAsBig:!1,t.useNativeBigInt=e.useNativeBigInt===!0?e.useNativeBigInt:!1,e.constructorAction!==void 0)if(e.constructorAction===`error`||e.constructorAction===`ignore`||e.constructorAction===`preserve`)t.constructorAction=e.constructorAction;else throw Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${e.constructorAction}`);if(e.protoAction!==void 0)if(e.protoAction===`error`||e.protoAction===`ignore`||e.protoAction===`preserve`)t.protoAction=e.protoAction;else throw Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${e.protoAction}`)}var o,s,c={'"':`"`,"\\":`\\`,"/":`/`,b:`\b`,f:`\f`,n:`
|
|
8
|
+
`,r:`\r`,t:` `},l,u=function(e){throw{name:`SyntaxError`,message:e,at:o,text:l}},d=function(e){return e&&e!==s&&u(`Expected '`+e+`' instead of '`+s+`'`),s=l.charAt(o),o+=1,s},f=function(){var e,i=``;for(s===`-`&&(i=`-`,d(`-`));s>=`0`&&s<=`9`;)i+=s,d();if(s===`.`)for(i+=`.`;d()&&s>=`0`&&s<=`9`;)i+=s;if(s===`e`||s===`E`)for(i+=s,d(),(s===`-`||s===`+`)&&(i+=s,d());s>=`0`&&s<=`9`;)i+=s,d();if(e=+i,!isFinite(e))u(`Bad number`);else return n??=r(),i.length>15?t.storeAsString?i:t.useNativeBigInt?BigInt(i):new n(i):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(e):new n(e):e},p=function(){var e,t,n=``,r;if(s===`"`)for(var i=o;d();){if(s===`"`)return o-1>i&&(n+=l.substring(i,o-1)),d(),n;if(s===`\\`){if(o-1>i&&(n+=l.substring(i,o-1)),d(),s===`u`){for(r=0,t=0;t<4&&(e=parseInt(d(),16),isFinite(e));t+=1)r=r*16+e;n+=String.fromCharCode(r)}else if(typeof c[s]==`string`)n+=c[s];else break;i=o}}u(`Bad string`)},m=function(){for(;s&&s<=` `;)d()},h=function(){switch(s){case`t`:return d(`t`),d(`r`),d(`u`),d(`e`),!0;case`f`:return d(`f`),d(`a`),d(`l`),d(`s`),d(`e`),!1;case`n`:return d(`n`),d(`u`),d(`l`),d(`l`),null}u(`Unexpected '`+s+`'`)},g,_=function(){var e=[];if(s===`[`){if(d(`[`),m(),s===`]`)return d(`]`),e;for(;s;){if(e.push(g()),m(),s===`]`)return d(`]`),e;d(`,`),m()}}u(`Bad array`)},v=function(){var e,n=Object.create(null);if(s===`{`){if(d(`{`),m(),s===`}`)return d(`}`),n;for(;s;){if(e=p(),m(),d(`:`),t.strict===!0&&Object.hasOwnProperty.call(n,e)&&u(`Duplicate key "`+e+`"`),i.test(e)===!0?t.protoAction===`error`?u(`Object contains forbidden prototype property`):t.protoAction===`ignore`?g():n[e]=g():a.test(e)===!0?t.constructorAction===`error`?u(`Object contains forbidden constructor property`):t.constructorAction===`ignore`?g():n[e]=g():n[e]=g(),m(),s===`}`)return d(`}`),n;d(`,`),m()}}u(`Bad object`)};return g=function(){switch(m(),s){case`{`:return v();case`[`:return _();case`"`:return p();case`-`:return f();default:return s>=`0`&&s<=`9`?f():h()}},function(e,t){var n;return l=e+``,o=0,s=` `,n=g(),m(),s&&u(`Syntax error`),typeof t==`function`?(function e(n,r){var i,a=n[r];return a&&typeof a==`object`&&Object.keys(a).forEach(function(t){i=e(a,t),i===void 0?delete a[t]:a[t]=i}),t.call(n,r,a)})({"":n},``):n}}})),o=t(((e,t)=>{var n=i().stringify,r=a();t.exports=function(e){return{parse:r(e),stringify:n}},t.exports.parse=r(),t.exports.stringify=n})),s=t((e=>{e.byteLength=c,e.toByteArray=u,e.fromByteArray=p;for(var t=[],n=[],r=typeof Uint8Array<`u`?Uint8Array:Array,i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,a=0,o=i.length;a<o;++a)t[a]=i[a],n[i.charCodeAt(a)]=a;n[45]=62,n[95]=63;function s(e){var t=e.length;if(t%4>0)throw Error(`Invalid string. Length must be a multiple of 4`);var n=e.indexOf(`=`);n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function c(e){var t=s(e),n=t[0],r=t[1];return(n+r)*3/4-r}function l(e,t,n){return(t+n)*3/4-n}function u(e){var t,i=s(e),a=i[0],o=i[1],c=new r(l(e,a,o)),u=0,d=o>0?a-4:a,f;for(f=0;f<d;f+=4)t=n[e.charCodeAt(f)]<<18|n[e.charCodeAt(f+1)]<<12|n[e.charCodeAt(f+2)]<<6|n[e.charCodeAt(f+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=t&255;return o===2&&(t=n[e.charCodeAt(f)]<<2|n[e.charCodeAt(f+1)]>>4,c[u++]=t&255),o===1&&(t=n[e.charCodeAt(f)]<<10|n[e.charCodeAt(f+1)]<<4|n[e.charCodeAt(f+2)]>>2,c[u++]=t>>8&255,c[u++]=t&255),c}function d(e){return t[e>>18&63]+t[e>>12&63]+t[e>>6&63]+t[e&63]}function f(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(d(r));return i.join(``)}function p(e){for(var n,r=e.length,i=r%3,a=[],o=16383,s=0,c=r-i;s<c;s+=o)a.push(f(e,s,s+o>c?c:s+o));return i===1?(n=e[r-1],a.push(t[n>>2]+t[n<<4&63]+`==`)):i===2&&(n=(e[r-2]<<8)+e[r-1],a.push(t[n>>10]+t[n>>4&63]+t[n<<2&63]+`=`)),a.join(``)}})),c=t(((t,n)=>{
|
|
9
|
+
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
10
|
+
var r=e(`buffer`),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?n.exports=r:(a(r,t),t.Buffer=o);function o(e,t,n){return i(e,t,n)}o.prototype=Object.create(i.prototype),a(i,o),o.from=function(e,t,n){if(typeof e==`number`)throw TypeError(`Argument must not be a number`);return i(e,t,n)},o.alloc=function(e,t,n){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);var r=i(e);return t===void 0?r.fill(0):typeof n==`string`?r.fill(t,n):r.fill(t),r},o.allocUnsafe=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return i(e)},o.allocUnsafeSlow=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return r.SlowBuffer(e)}})),l=t(((e,t)=>{function n(e){return(e/8|0)+(e%8==0?0:1)}var r={ES256:n(256),ES384:n(384),ES512:n(521)};function i(e){var t=r[e];if(t)return t;throw Error(`Unknown algorithm "`+e+`"`)}t.exports=i})),u=t(((e,t)=>{var n=c().Buffer,r=l(),i=128,a=0,o=32,s=16,u=2,d=s|o|a<<6,f=u|a<<6;function p(e){return e.replace(/=/g,``).replace(/\+/g,`-`).replace(/\//g,`_`)}function m(e){if(n.isBuffer(e))return e;if(typeof e==`string`)return n.from(e,`base64`);throw TypeError(`ECDSA signature must be a Base64 string or a Buffer`)}function h(e,t){e=m(e);var a=r(t),o=a+1,s=e.length,c=0;if(e[c++]!==d)throw Error(`Could not find expected "seq"`);var l=e[c++];if(l===(i|1)&&(l=e[c++]),s-c<l)throw Error(`"seq" specified length of "`+l+`", only "`+(s-c)+`" remaining`);if(e[c++]!==f)throw Error(`Could not find expected "int" for "r"`);var u=e[c++];if(s-c-2<u)throw Error(`"r" specified length of "`+u+`", only "`+(s-c-2)+`" available`);if(o<u)throw Error(`"r" specified length of "`+u+`", max of "`+o+`" is acceptable`);var h=c;if(c+=u,e[c++]!==f)throw Error(`Could not find expected "int" for "s"`);var g=e[c++];if(s-c!==g)throw Error(`"s" specified length of "`+g+`", expected "`+(s-c)+`"`);if(o<g)throw Error(`"s" specified length of "`+g+`", max of "`+o+`" is acceptable`);var _=c;if(c+=g,c!==s)throw Error(`Expected to consume entire buffer, but "`+(s-c)+`" bytes remain`);var v=a-u,y=a-g,b=n.allocUnsafe(v+u+y+g);for(c=0;c<v;++c)b[c]=0;e.copy(b,c,h+Math.max(-v,0),h+u),c=a;for(var x=c;c<x+y;++c)b[c]=0;return e.copy(b,c,_+Math.max(-y,0),_+g),b=b.toString(`base64`),b=p(b),b}function g(e,t,n){for(var r=0;t+r<n&&e[t+r]===0;)++r;return e[t+r]>=i&&--r,r}function _(e,t){e=m(e);var a=r(t),o=e.length;if(o!==a*2)throw TypeError(`"`+t+`" signatures must be "`+a*2+`" bytes, saw "`+o+`"`);var s=g(e,0,a),c=g(e,a,e.length),l=a-s,u=a-c,p=2+l+1+1+u,h=p<i,_=n.allocUnsafe((h?2:3)+p),v=0;return _[v++]=d,h?_[v++]=p:(_[v++]=i|1,_[v++]=p&255),_[v++]=f,_[v++]=l,s<0?(_[v++]=0,v+=e.copy(_,v,0,a)):v+=e.copy(_,v,s,a),_[v++]=f,_[v++]=u,c<0?(_[v++]=0,e.copy(_,v,a)):e.copy(_,v,a+c),_}t.exports={derToJose:h,joseToDer:_}})),d=t(((t,n)=>{var r=c().Buffer,i=e(`stream`),a=e(`util`);function o(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=r.alloc(0),this;if(typeof e.pipe==`function`)return this.buffer=r.alloc(0),e.pipe(this),this;if(e.length||typeof e==`object`)return this.buffer=e,this.writable=!1,process.nextTick(function(){this.emit(`end`,e),this.readable=!1,this.emit(`close`)}.bind(this)),this;throw TypeError(`Unexpected data type (`+typeof e+`)`)}a.inherits(o,i),o.prototype.write=function(e){this.buffer=r.concat([this.buffer,r.from(e)]),this.emit(`data`,e)},o.prototype.end=function(e){e&&this.write(e),this.emit(`end`,e),this.emit(`close`),this.writable=!1,this.readable=!1},n.exports=o})),f=t(((t,n)=>{var r=e(`buffer`).Buffer,i=e(`buffer`).SlowBuffer;n.exports=a;function a(e,t){if(!r.isBuffer(e)||!r.isBuffer(t)||e.length!==t.length)return!1;for(var n=0,i=0;i<e.length;i++)n|=e[i]^t[i];return n===0}a.install=function(){r.prototype.equal=i.prototype.equal=function(e){return a(this,e)}};var o=r.prototype.equal,s=i.prototype.equal;a.restore=function(){r.prototype.equal=o,i.prototype.equal=s}})),p=t(((t,n)=>{var r=c().Buffer,i=e(`crypto`),a=u(),o=e(`util`),s=`"%s" is not a valid algorithm.
|
|
11
|
+
Supported algorithms are:
|
|
12
|
+
"HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".`,l=`secret must be a string or buffer`,d=`key must be a string or a buffer`,p=`key must be a string, a buffer or an object`,m=typeof i.createPublicKey==`function`;m&&(d+=` or a KeyObject`,l+=`or a KeyObject`);function h(e){if(!r.isBuffer(e)&&typeof e!=`string`&&(!m||typeof e!=`object`||typeof e.type!=`string`||typeof e.asymmetricKeyType!=`string`||typeof e.export!=`function`))throw b(d)}function g(e){if(!r.isBuffer(e)&&typeof e!=`string`&&typeof e!=`object`)throw b(p)}function _(e){if(!r.isBuffer(e)){if(typeof e==`string`)return e;if(!m||typeof e!=`object`||e.type!==`secret`||typeof e.export!=`function`)throw b(l)}}function v(e){return e.replace(/=/g,``).replace(/\+/g,`-`).replace(/\//g,`_`)}function y(e){e=e.toString();var t=4-e.length%4;if(t!==4)for(var n=0;n<t;++n)e+=`=`;return e.replace(/\-/g,`+`).replace(/_/g,`/`)}function b(e){var t=[].slice.call(arguments,1),n=o.format.bind(o,e).apply(null,t);return TypeError(n)}function x(e){return r.isBuffer(e)||typeof e==`string`}function S(e){return x(e)||(e=JSON.stringify(e)),e}function C(e){return function(t,n){_(n),t=S(t);var r=i.createHmac(`sha`+e,n);return v((r.update(t),r.digest(`base64`)))}}var w,T=`timingSafeEqual`in i?function(e,t){return e.byteLength===t.byteLength?i.timingSafeEqual(e,t):!1}:function(e,t){return w||=f(),w(e,t)};function E(e){return function(t,n,i){var a=C(e)(t,i);return T(r.from(n),r.from(a))}}function D(e){return function(t,n){g(n),t=S(t);var r=i.createSign(`RSA-SHA`+e);return v((r.update(t),r.sign(n,`base64`)))}}function O(e){return function(t,n,r){h(r),t=S(t),n=y(n);var a=i.createVerify(`RSA-SHA`+e);return a.update(t),a.verify(r,n,`base64`)}}function k(e){return function(t,n){g(n),t=S(t);var r=i.createSign(`RSA-SHA`+e);return v((r.update(t),r.sign({key:n,padding:i.constants.RSA_PKCS1_PSS_PADDING,saltLength:i.constants.RSA_PSS_SALTLEN_DIGEST},`base64`)))}}function A(e){return function(t,n,r){h(r),t=S(t),n=y(n);var a=i.createVerify(`RSA-SHA`+e);return a.update(t),a.verify({key:r,padding:i.constants.RSA_PKCS1_PSS_PADDING,saltLength:i.constants.RSA_PSS_SALTLEN_DIGEST},n,`base64`)}}function j(e){var t=D(e);return function(){var n=t.apply(null,arguments);return n=a.derToJose(n,`ES`+e),n}}function M(e){var t=O(e);return function(n,r,i){return r=a.joseToDer(r,`ES`+e).toString(`base64`),t(n,r,i)}}function N(){return function(){return``}}function P(){return function(e,t){return t===``}}n.exports=function(e){var t={hs:C,rs:D,ps:k,es:j,none:N},n={hs:E,rs:O,ps:A,es:M,none:P},r=e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!r)throw b(s,e);var i=(r[1]||r[3]).toLowerCase(),a=r[2];return{sign:t[i](a),verify:n[i](a)}}})),m=t(((t,n)=>{var r=e(`buffer`).Buffer;n.exports=function(e){return typeof e==`string`?e:typeof e==`number`||r.isBuffer(e)?e.toString():JSON.stringify(e)}})),h=t(((t,n)=>{var r=c().Buffer,i=d(),a=p(),o=e(`stream`),s=m(),l=e(`util`);function u(e,t){return r.from(e,t).toString(`base64`).replace(/=/g,``).replace(/\+/g,`-`).replace(/\//g,`_`)}function f(e,t,n){n||=`utf8`;var r=u(s(e),`binary`),i=u(s(t),n);return l.format(`%s.%s`,r,i)}function h(e){var t=e.header,n=e.payload,r=e.secret||e.privateKey,i=e.encoding,o=a(t.alg),s=f(t,n,i),c=o.sign(s,r);return l.format(`%s.%s`,s,c)}function g(e){var t=e.secret;if(t??=e.privateKey,t??=e.key,/^hs/i.test(e.header.alg)===!0&&t==null)throw TypeError(`secret must be a string or buffer or a KeyObject`);var n=new i(t);this.readable=!0,this.header=e.header,this.encoding=e.encoding,this.secret=this.privateKey=this.key=n,this.payload=new i(e.payload),this.secret.once(`close`,function(){!this.payload.writable&&this.readable&&this.sign()}.bind(this)),this.payload.once(`close`,function(){!this.secret.writable&&this.readable&&this.sign()}.bind(this))}l.inherits(g,o),g.prototype.sign=function(){try{var e=h({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit(`done`,e),this.emit(`data`,e),this.emit(`end`),this.readable=!1,e}catch(e){this.readable=!1,this.emit(`error`,e),this.emit(`close`)}},g.sign=h,n.exports=g})),g=t(((t,n)=>{var r=c().Buffer,i=d(),a=p(),o=e(`stream`),s=m(),l=e(`util`),u=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function f(e){return Object.prototype.toString.call(e)===`[object Object]`}function h(e){if(f(e))return e;try{return JSON.parse(e)}catch{return}}function g(e){var t=e.split(`.`,1)[0];return h(r.from(t,`base64`).toString(`binary`))}function _(e){return e.split(`.`,2).join(`.`)}function v(e){return e.split(`.`)[2]}function y(e,t){t||=`utf8`;var n=e.split(`.`)[1];return r.from(n,`base64`).toString(t)}function b(e){return u.test(e)&&!!g(e)}function x(e,t,n){if(!t){var r=Error(`Missing algorithm parameter for jws.verify`);throw r.code=`MISSING_ALGORITHM`,r}e=s(e);var i=v(e),o=_(e);return a(t).verify(o,i,n)}function S(e,t){if(t||={},e=s(e),!b(e))return null;var n=g(e);if(!n)return null;var r=y(e);return(n.typ===`JWT`||t.json)&&(r=JSON.parse(r,t.encoding)),{header:n,payload:r,signature:v(e)}}function C(e){e||={};var t=e.secret;if(t??=e.publicKey,t??=e.key,/^hs/i.test(e.algorithm)===!0&&t==null)throw TypeError(`secret must be a string or buffer or a KeyObject`);var n=new i(t);this.readable=!0,this.algorithm=e.algorithm,this.encoding=e.encoding,this.secret=this.publicKey=this.key=n,this.signature=new i(e.signature),this.secret.once(`close`,function(){!this.signature.writable&&this.readable&&this.verify()}.bind(this)),this.signature.once(`close`,function(){!this.secret.writable&&this.readable&&this.verify()}.bind(this))}l.inherits(C,o),C.prototype.verify=function(){try{var e=x(this.signature.buffer,this.algorithm,this.key.buffer),t=S(this.signature.buffer,this.encoding);return this.emit(`done`,e,t),this.emit(`data`,e),this.emit(`end`),this.readable=!1,e}catch(e){this.readable=!1,this.emit(`error`,e),this.emit(`close`)}},C.decode=S,C.isValid=b,C.verify=x,n.exports=C})),_=t((e=>{var t=h(),n=g();e.ALGORITHMS=[`HS256`,`HS384`,`HS512`,`RS256`,`RS384`,`RS512`,`PS256`,`PS384`,`PS512`,`ES256`,`ES384`,`ES512`],e.sign=t.sign,e.verify=n.verify,e.decode=n.decode,e.isValid=n.isValid,e.createSign=function(e){return new t(e)},e.createVerify=function(e){return new n(e)}}));export{n as a,o as i,u as n,s as r,_ as t};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{r as e}from"./chunk-DHbaKqs-.mjs";import{t}from"./lark-logger-xpMKNNtY.mjs";import{existsSync as n,readFileSync as r}from"node:fs";import{join as i}from"node:path";import{homedir as a}from"node:os";import{execSync as o}from"node:child_process";import{createHash as s}from"node:crypto";var c=e({LarkCliCredentialProvider:()=>d});const l=t(`credentials/lark-cli-provider`);function u(){try{let e=o(`which lark-cli`,{encoding:`utf-8`,timeout:5e3}).trim();if(!e)return null;let t=`unknown`;try{t=o(`${e} --version`,{encoding:`utf-8`,timeout:5e3}).trim()}catch{}return{path:e,version:t}}catch{return null}}var d=class e{appId;appSecret;tenantAccessToken;userAccessToken;larkCliPath;larkCliVersion;static isConfigured(){if(process.env.LARK_APP_ID&&process.env.LARK_APP_SECRET)return!0;let e=i(a(),`.larkpal`,`credentials.json`);if(n(e))try{let t=r(e,`utf-8`),n=JSON.parse(t);if(n.app_id&&n.app_secret)return!0}catch{}let t=i(a(),`.config`,`lark`,`config.json`);if(n(t))try{let e=r(t,`utf-8`),n=JSON.parse(e);if(n.app_id&&(n.app_secret||n.app_secret_in_keyring))return!0}catch{}let o=i(a(),`.lark-cli`,`config.json`);if(n(o))try{let e=r(o,`utf-8`);if(JSON.parse(e).apps?.some(e=>e.appId&&e.appSecret))return!0}catch{}return!1}constructor(){let e=u();this.larkCliPath=e?.path??null,this.larkCliVersion=e?.version??null,e?l.info(`lark-cli 已探测到`,{path:e.path,version:e.version}):l.warn(`未找到 lark-cli(应由 preflight 检查保证安装)`);let t=process.env.LARK_APP_ID,n=process.env.LARK_APP_SECRET,r=process.env.LARK_USER_ACCESS_TOKEN,i={};if(!t||!n){let e=this.loadFromLarkPalCredentials();if(e?.appId&&e?.appSecret)i=e;else if(this.larkCliPath)try{i=this.loadFromCli()}catch(e){l.warn(`从 lark-cli 读取配置失败,将使用环境变量`,{error:e instanceof Error?e.message:String(e)})}}if(this.appId=t??i.appId??``,this.appSecret=n??i.appSecret??``,this.tenantAccessToken=i.tenant_access_token??``,this.userAccessToken=r??i.user_access_token??``,!this.appId){let e=[`无法获取飞书应用凭证 (app_id)`,``,`请通过以下任一方式提供:`,` 方式 1: 设置环境变量 LARK_APP_ID + LARK_APP_SECRET`,` 方式 2: 安装并配置 lark-cli:`,` npm install -g @larksuite/cli`,` lark-cli config init`].join(`
|
|
2
|
+
`);throw l.error(e),Error(e)}if(!this.appSecret){let e=[`无法获取飞书应用 Secret (app_secret)`,``,`请通过以下任一方式提供:`,` 方式 1: 设置环境变量 LARK_APP_SECRET`,` 方式 2: 重新配置 lark-cli: lark-cli config init`].join(`
|
|
3
|
+
`);throw l.error(e),Error(e)}l.info(`凭证加载成功`,{appId:this.appId,source:t?`env`:`lark-cli`,hasTenantToken:!!this.tenantAccessToken,hasUserToken:!!this.userAccessToken,larkCliAvailable:!!this.larkCliPath,larkCliVersion:this.larkCliVersion})}getAppId(){return this.appId}getAppSecret(){return this.appSecret}async getTenantAccessToken(){return this.tenantAccessToken||l.warn(`tenant_access_token 为空,Lark SDK 将自动获取`),this.tenantAccessToken}async getUserAccessToken(){return this.userAccessToken||l.warn(`user_access_token 为空`),this.userAccessToken}async refreshTokens(){if(!this.larkCliPath){l.info(`lark-cli 不可用,跳过 token 刷新(Lark SDK 将自动管理)`);return}l.info(`通过 lark-cli 刷新 token`);try{let e=o(`${this.larkCliPath} auth tenant --json --no-input`,{encoding:`utf-8`,timeout:3e4});l.info(`lark-cli auth tenant 执行成功`,{output:e.trim().substring(0,200)})}catch(e){l.warn(`lark-cli auth tenant 刷新失败`,{error:e instanceof Error?e.message:String(e)})}try{let e=this.loadFromCli();this.tenantAccessToken=e.tenant_access_token??``,this.userAccessToken=e.user_access_token??``}catch{}l.info(`token 刷新完成`,{hasTenantToken:!!this.tenantAccessToken,hasUserToken:!!this.userAccessToken})}getLarkCliVersion(){return this.larkCliVersion}isLarkCliAvailable(){return this.larkCliPath!==null}static LARKPAL_CREDENTIALS_PATH=i(a(),`.larkpal`,`credentials.json`);static NEW_CONFIG_PATH=i(a(),`.lark-cli`,`config.json`);static LEGACY_CONFIG_PATH=i(a(),`.config`,`lark`,`config.json`);loadFromLarkPalCredentials(){let t=e.LARKPAL_CREDENTIALS_PATH;if(!n(t))return l.info(`LarkPal 凭证文件不存在`,{path:t}),null;try{let e=r(t,`utf-8`),n=JSON.parse(e);return n.app_id&&n.app_secret?(l.info(`从 LarkPal 凭证文件读取成功`,{path:t,appId:n.app_id}),{appId:n.app_id,appSecret:n.app_secret}):(l.warn(`LarkPal 凭证文件内容不完整`,{path:t}),null)}catch(e){return l.warn(`读取 LarkPal 凭证文件失败`,{path:t,error:e instanceof Error?e.message:String(e)}),null}}loadFromCli(){let e=this.loadFromConfigShow(),t=this.loadFromNewConfigFile(),n=e?.appId||t?.appId;if(n){let e=this.loadFromLegacyConfigFile();if(e?.appId===n&&e?.appSecret)return l.info(`从旧版兼容路径获取到 appSecret`,{appId:n}),{...e,appId:n};let t=this.resolveKeychainSecret(n);if(t)return l.info(`从系统 keychain 获取到 appSecret`,{appId:n}),{appId:n,appSecret:t}}if(!n){let e=this.loadFromLegacyConfigFile();if(e?.appId&&e?.appSecret)return e}return this.loadFromLegacyCliCommand()}loadFromConfigShow(){if(!this.larkCliPath)return null;try{l.info(`通过 lark-cli config show 读取配置`);let e=o(`${this.larkCliPath} config show`,{encoding:`utf-8`,timeout:1e4,env:{...process.env,NO_COLOR:`1`},stdio:[`pipe`,`pipe`,`pipe`]}).match(/\{[\s\S]*\}/);if(!e)return l.warn(`lark-cli config show 输出无法解析为 JSON`),null;let t=JSON.parse(e[0]);l.info(`lark-cli config show 读取成功`,{appId:t.appId,hasAppSecret:!!t.appSecret&&t.appSecret!==`****`,brand:t.brand});let n={appId:t.appId};return t.appSecret&&t.appSecret!==`****`&&(n.appSecret=t.appSecret),n}catch(e){return l.info(`lark-cli config show 失败,尝试其他方式`,{error:e instanceof Error?e.message:String(e)}),null}}loadFromNewConfigFile(){let t=e.NEW_CONFIG_PATH;if(!n(t))return l.info(`新版 lark-cli 配置文件不存在`,{path:t}),null;try{let e=r(t,`utf-8`),n=JSON.parse(e).apps?.[0];if(!n?.appId)return l.info(`新版配置文件中无有效 app`,{path:t}),null;l.info(`读取新版 lark-cli 配置`,{path:t,appId:n.appId,secretType:typeof n.appSecret==`string`?`string`:n.appSecret?.source});let i={appId:n.appId};return typeof n.appSecret==`string`&&(i.appSecret=n.appSecret),i}catch(e){return l.warn(`读取新版 lark-cli 配置文件失败`,{path:t,error:e instanceof Error?e.message:String(e)}),null}}loadFromLegacyConfigFile(){let t=e.LEGACY_CONFIG_PATH;if(!n(t))return l.info(`旧版 lark-cli 配置文件不存在`,{path:t}),null;try{let e=r(t,`utf-8`),n=JSON.parse(e);l.info(`读取旧版 lark-cli 配置文件`,{path:t,appId:n.app_id,hasAppSecret:!!n.app_secret,secretInKeyring:!!n.app_secret_in_keyring});let i={appId:n.app_id};if(n.app_secret_in_keyring){let e=this.resolveKeychainSecret(n.app_id,n.base_url);e?(i.appSecret=e,l.info(`从系统 keyring 获取 appSecret 成功`)):l.warn(`appSecret 存储在 keyring 中但无法获取,需通过环境变量 LARK_APP_SECRET 提供`)}else n.app_secret&&(i.appSecret=n.app_secret);return n.tenant_access_token&&((n.tenant_access_token_expires_at??0)>Date.now()/1e3?i.tenant_access_token=n.tenant_access_token:l.info(`旧版配置缓存的 tenant_access_token 已过期,忽略`)),i.user_access_token=n.user_access_token,l.info(`旧版配置读取成功`,{source:`legacy-config-file`,hasAppId:!!i.appId,hasAppSecret:!!i.appSecret,hasTenantToken:!!i.tenant_access_token}),i}catch(e){return l.warn(`读取旧版 lark-cli 配置文件失败`,{path:t,error:e instanceof Error?e.message:String(e)}),null}}loadFromLegacyCliCommand(){if(!this.larkCliPath)return{};let e=`${this.larkCliPath} --json config info`;try{l.info(`通过旧版 lark-cli 命令读取配置`,{cmd:e});let t=o(e,{encoding:`utf-8`,timeout:1e4,env:{...process.env,NO_COLOR:`1`}}),n=JSON.parse(t),r={appId:n.app_id,appSecret:n.app_secret||void 0,tenant_access_token:n.tenant_access_token,user_access_token:n.user_access_token};return l.info(`旧版 lark-cli 命令读取成功`,{source:`legacy-cli-command`,hasAppId:!!r.appId,hasAppSecret:!!r.appSecret,hasTenantToken:!!r.tenant_access_token}),r}catch(e){return l.info(`旧版 lark-cli --json config info 不可用`,{error:e instanceof Error?e.message:String(e)}),{}}}resolveKeychainSecret(e,t){if(!e)return null;l.info(`尝试从系统 keyring/keychain 获取 appSecret`,{appId:e});try{let t=o(`security find-generic-password -s "lark-cli" -a "appsecret:${e}" -w 2>/dev/null`,{encoding:`utf-8`,timeout:5e3,shell:`/bin/sh`,stdio:[`pipe`,`pipe`,`pipe`]}).trim();if(t)return l.info(`从 macOS Keychain 获取 appSecret 成功(新版格式)`),t}catch{}let n=[`default`,(t||`https://open.feishu.cn`).toLowerCase().replace(/\/+$/,``).replace(/\/open-apis$/,``),e.trim()].join(`
|
|
4
|
+
`),r=`${s(`sha256`).update(n).digest(`hex`)}:app-secret`;try{let e=o(`security find-generic-password -s "lark-cli" -a "${r}" -w 2>/dev/null`,{encoding:`utf-8`,timeout:5e3,shell:`/bin/sh`,stdio:[`pipe`,`pipe`,`pipe`]}).trim();if(e)return l.info(`从 macOS Keychain 获取 appSecret 成功(旧版格式)`),e}catch{}try{let e=o(`secret-tool lookup service "lark-cli" username "${r}"`,{encoding:`utf-8`,timeout:5e3,stdio:[`pipe`,`pipe`,`pipe`]}).trim();if(e)return l.info(`从 Linux D-Bus Secret Service 获取 appSecret 成功`),e}catch{}try{let t=o(`secret-tool lookup service "lark-cli" username "appsecret:${e}"`,{encoding:`utf-8`,timeout:5e3,stdio:[`pipe`,`pipe`,`pipe`]}).trim();if(t)return l.info(`从 Linux D-Bus Secret Service 获取 appSecret 成功(新版格式)`),t}catch{}return l.warn(`系统 keyring/keychain 获取 appSecret 失败`),null}};export{c as n,d as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{AsyncLocalStorage as e}from"node:async_hooks";const t=new e;function n(){return t.getStore()}let r=null;function i(e){r=e}function a(){return r}function o(){if(!r)throw Error(`Feishu plugin runtime has not been initialised. Ensure LarkClient.setRuntime() is called during plugin activation.`);return r}const s=`\x1B[0m`;function c(e){let t=`feishu/${e}`;return{debug:(e,n)=>console.debug(`[90m[${t}]${s}`,e,...n?[n]:[]),info:(e,n)=>console.log(`[36m[${t}]${s}`,e,...n?[n]:[]),warn:(e,n)=>console.warn(`[33m[${t}]${s}`,e,...n?[n]:[]),error:(e,n)=>console.error(`[31m[${t}]${s}`,e,...n?[n]:[])}}function l(e){try{let t=a();return t?t.logging.getChildLogger({subsystem:`feishu/${e}`}):null}catch{return null}}function u(){let e=n();if(!e)return null;let t={accountId:e.accountId,messageId:e.messageId,chatId:e.chatId};return e.senderOpenId&&(t.senderOpenId=e.senderOpenId),t}function d(e){let t=u();return t?e?{...t,...e}:t:e??{}}function f(){let e=n();return e?`feishu[${e.accountId}][msg:${e.messageId}]:`:`feishu:`}function p(e,t){let n=f();if(!t||Object.keys(t).length===0)return`${n} ${e}`;let r=Object.entries(t).map(([e,t])=>t===void 0||t==null?null:typeof t==`object`?`${e}=${JSON.stringify(t)}`:`${e}=${t}`).filter(Boolean);return r.length>0?`${n} ${e} (${r.join(`, `)})`:`${n} ${e}`}function m(e){let t=null,n=!1;function r(){return n||(t=l(e),t&&(n=!0)),t??c(e)}return{subsystem:e,debug(e,t){r().debug?.(p(e,t),d(t))},info(e,t){r().info(p(e,t),d(t))},warn(e,t){r().warn(p(e,t),d(t))},error(e,t){r().error(p(e,t),d(t))},child(t){return m(`${e}/${t}`)}}}function h(e){return m(e)}export{o as n,i as r,h as t};
|