@maincode-ai/matilda-code 0.21.13 → 0.22.0-nightly.20261102.db95a17c4
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/chunks/agent-4GIFJO5G.js +3 -0
- package/chunks/agent-headless-DXJESNI4.js +3 -0
- package/chunks/{askUserQuestion-BNSWGD26.js → askUserQuestion-7PM7G5YF.js} +3 -3
- package/chunks/ca-JKEHLTNL.js +23 -0
- package/chunks/chunk-225CZWD7.js +89 -0
- package/chunks/chunk-2QIC3OCV.js +9 -0
- package/chunks/chunk-33UVJMVE.js +120 -0
- package/chunks/chunk-35BBGAHD.js +2604 -0
- package/chunks/{chunk-DHDD5YJC.js → chunk-4KS2KEXK.js} +69 -69
- package/chunks/chunk-4MLFC664.js +3 -0
- package/chunks/{chunk-RNKDFE2S.js → chunk-5B2QERWR.js} +1 -1
- package/chunks/chunk-66WJUORA.js +8 -0
- package/chunks/chunk-6U5VOTWB.js +56 -0
- package/chunks/chunk-7MUWF4DK.js +80 -0
- package/chunks/{chunk-6M5G5FBH.js → chunk-BVTXZTL3.js} +1 -1
- package/chunks/chunk-CVGGYRNK.js +31 -0
- package/chunks/chunk-DUB7JMQV.js +13 -0
- package/chunks/chunk-ESNPNLMQ.js +8 -0
- package/chunks/chunk-GT6MSEK4.js +3 -0
- package/chunks/chunk-HEJO7OBH.js +3 -0
- package/chunks/chunk-JNHB73E3.js +9 -0
- package/chunks/chunk-JR5CSCG4.js +8 -0
- package/chunks/{chunk-EZDV7A76.js → chunk-KRVXBQRC.js} +1 -1
- package/chunks/{chunk-AOOZREGV.js → chunk-LBQNFSZ2.js} +1 -1
- package/chunks/{chunk-MEV5XQI2.js → chunk-QBXL5UBB.js} +1 -1
- package/chunks/{chunk-P5TG5CON.js → chunk-QDWS3VZT.js} +1 -1
- package/chunks/{chunk-QZI2ZGZY.js → chunk-QMZREVY3.js} +1 -1
- package/chunks/chunk-QUYQBKDE.js +8 -0
- package/chunks/chunk-QXSBPCBA.js +8 -0
- package/chunks/chunk-S2E5ZRPH.js +14 -0
- package/chunks/chunk-TUKNB5CQ.js +33 -0
- package/chunks/chunk-UM6CLO7D.js +7 -0
- package/chunks/{chunk-6T2GIM76.js → chunk-VVUY7VKR.js} +1 -1
- package/chunks/{chunk-5OHGYMKP.js → chunk-WENVHSCJ.js} +1 -1
- package/chunks/{chunk-27Q5KW3A.js → chunk-ZABH4QIL.js} +10 -10
- package/chunks/chunk-ZSGBDQXU.js +11 -0
- package/chunks/{computer-use-J4GAM4M6.js → computer-use-IZGLKENV.js} +1 -1
- package/chunks/{cron-create-IDWSZENI.js → cron-create-BTSJUVNT.js} +1 -1
- package/chunks/cron-delete-PTE3RC2W.js +3 -0
- package/chunks/cron-list-SINKHOIZ.js +5 -0
- package/chunks/de-GMGNR5CZ.js +23 -0
- package/chunks/{devtools-XRQ4YJ5S.js → devtools-7YNCRYZV.js} +1 -1
- package/chunks/{chunk-OOEH6ZSV.js → dist-UWUWLWTO.js} +2 -2
- package/chunks/{edit-X2S2ZXRN.js → edit-MDQEZ7BA.js} +1 -1
- package/chunks/en-3NQMLVKW.js +23 -0
- package/chunks/{enter-worktree-TUCGNCLO.js → enter-worktree-SZK65VXF.js} +1 -1
- package/chunks/enterPlanMode-5VWIIVHI.js +18 -0
- package/chunks/{exit-worktree-7FLITFZI.js → exit-worktree-OBHUK4TF.js} +1 -1
- package/chunks/{exitPlanMode-O5UUJ3GM.js → exitPlanMode-SXFQC4G2.js} +2 -2
- package/chunks/fr-WS3EBB36.js +23 -0
- package/chunks/{getMachineId-bsd-ZYBNK2JG.js → getMachineId-bsd-ETKQTB6C.js} +1 -1
- package/chunks/{getMachineId-darwin-CM2MQGUI.js → getMachineId-darwin-AKNRWOWB.js} +1 -1
- package/chunks/{getMachineId-linux-SYE2KMCW.js → getMachineId-linux-2QSD7FTP.js} +1 -1
- package/chunks/{getMachineId-unsupported-6IHVG2XO.js → getMachineId-unsupported-UXSV7I24.js} +1 -1
- package/chunks/{getMachineId-win-S3J3JSUM.js → getMachineId-win-4MTFXGP3.js} +1 -1
- package/chunks/glob-JKIZ3ZJQ.js +22 -0
- package/chunks/{goal-tools-YQOA6OKU.js → goal-tools-YJMECZYD.js} +3 -3
- package/chunks/{grep-VAB2VSXM.js → grep-Q4T5AE6K.js} +1 -1
- package/chunks/ja-GBCDQ43R.js +23 -0
- package/chunks/keychain-token-storage-4PY5J6U6.js +3 -0
- package/chunks/ls-BQCCCPIX.js +15 -0
- package/chunks/{lsp-NGLDRHZU.js → lsp-MHJJJ7K3.js} +1 -1
- package/chunks/mcp-client-CSF5QZEY.js +3 -0
- package/chunks/monitor-JUAVWVLY.js +32 -0
- package/chunks/{multipart-parser-JI75T2O5.js → multipart-parser-FKHYAVGR.js} +1 -1
- package/chunks/notebook-edit-NNOMEUER.js +17 -0
- package/chunks/openaiContentGenerator-DTKOYRBL.js +47 -0
- package/chunks/pt-VID6J2CM.js +23 -0
- package/chunks/read-file-4EX4B3TB.js +3 -0
- package/chunks/ripGrep-JL6UDNCR.js +3 -0
- package/chunks/ru-EB6V6EAN.js +23 -0
- package/chunks/scheduler-GCGZAI7D.js +8 -0
- package/chunks/send-message-S4P5QKSW.js +8 -0
- package/chunks/shell-J7EX7B57.js +3 -0
- package/chunks/{skill-ETQM5NI3.js → skill-V6NTJ4O4.js} +1 -1
- package/chunks/src-LZEU4AYF.js +5 -0
- package/chunks/symbol-search-5QJNW7PY.js +19 -0
- package/chunks/{syntheticOutput-WZDPECYS.js → syntheticOutput-3XIAIUIR.js} +1 -1
- package/chunks/task-create-KGPY7O4J.js +3 -0
- package/chunks/{task-detach-TBAVUOTC.js → task-detach-ZD3A7225.js} +1 -1
- package/chunks/task-list-P7GQWYAD.js +9 -0
- package/chunks/{task-stop-HDSARSJ6.js → task-stop-VFJRBA6P.js} +1 -1
- package/chunks/{task-update-MW2VT2XV.js → task-update-OOMH4WRA.js} +1 -1
- package/chunks/{team-create-VMYNLZCC.js → team-create-POMZOM44.js} +2 -2
- package/chunks/team-delete-ZJBEQDPE.js +8 -0
- package/chunks/todoWrite-EWYRFK7W.js +3 -0
- package/chunks/{tool-search-WX6FOE35.js → tool-search-5Z7MO565.js} +1 -1
- package/chunks/{web-fetch-CKYBHGLF.js → web-fetch-M4TUYAFG.js} +17 -17
- package/chunks/web-search-CBKF36JM.js +26 -0
- package/chunks/{workflow-WBSRQG3N.js → workflow-F57TWWPS.js} +2 -2
- package/chunks/write-file-UK4BVL3M.js +15 -0
- package/cli.js +642 -678
- package/examples/starter/README.md +0 -3
- package/locales/ca.js +3 -87
- package/locales/de.js +3 -91
- package/locales/en.js +3 -91
- package/locales/fr.js +3 -88
- package/locales/ja.js +3 -92
- package/locales/pt.js +3 -92
- package/locales/ru.js +3 -91
- package/package.json +2 -2
- package/sandbox-macos-permissive-proxied.sb +1 -1
- package/sandbox-macos-restrictive-closed.sb +14 -1
- package/sandbox-macos-restrictive-open.sb +14 -1
- package/sandbox-macos-restrictive-proxied.sb +15 -2
- package/bundled/mainy/SKILL.md +0 -157
- package/bundled/mainy/docs/_meta.ts +0 -32
- package/bundled/mainy/docs/common-workflow.md +0 -571
- package/bundled/mainy/docs/configuration/_meta.ts +0 -7
- package/bundled/mainy/docs/configuration/auth.md +0 -82
- package/bundled/mainy/docs/configuration/matilda-ignore.md +0 -55
- package/bundled/mainy/docs/configuration/model-providers.md +0 -516
- package/bundled/mainy/docs/configuration/settings.md +0 -818
- package/bundled/mainy/docs/configuration/themes.md +0 -199
- package/bundled/mainy/docs/configuration/trusted-folders.md +0 -67
- package/bundled/mainy/docs/extension/_meta.ts +0 -9
- package/bundled/mainy/docs/extension/extension-releasing.md +0 -204
- package/bundled/mainy/docs/extension/getting-started-extensions.md +0 -299
- package/bundled/mainy/docs/extension/introduction.md +0 -338
- package/bundled/mainy/docs/features/_meta.ts +0 -27
- package/bundled/mainy/docs/features/approval-mode.md +0 -388
- package/bundled/mainy/docs/features/arena.md +0 -219
- package/bundled/mainy/docs/features/auto-mode.md +0 -308
- package/bundled/mainy/docs/features/channels/_meta.ts +0 -5
- package/bundled/mainy/docs/features/channels/overview.md +0 -328
- package/bundled/mainy/docs/features/channels/plugins.md +0 -87
- package/bundled/mainy/docs/features/channels/telegram.md +0 -120
- package/bundled/mainy/docs/features/code-review.md +0 -291
- package/bundled/mainy/docs/features/commands.md +0 -528
- package/bundled/mainy/docs/features/dual-output.md +0 -627
- package/bundled/mainy/docs/features/followup-suggestions.md +0 -109
- package/bundled/mainy/docs/features/headless.md +0 -448
- package/bundled/mainy/docs/features/hooks.md +0 -1308
- package/bundled/mainy/docs/features/language.md +0 -144
- package/bundled/mainy/docs/features/lsp.md +0 -496
- package/bundled/mainy/docs/features/markdown-rendering.md +0 -183
- package/bundled/mainy/docs/features/mcp.md +0 -423
- package/bundled/mainy/docs/features/memory.md +0 -185
- package/bundled/mainy/docs/features/sandbox.md +0 -249
- package/bundled/mainy/docs/features/scheduled-tasks.md +0 -139
- package/bundled/mainy/docs/features/skills.md +0 -347
- package/bundled/mainy/docs/features/status-line.md +0 -397
- package/bundled/mainy/docs/features/structured-output.md +0 -309
- package/bundled/mainy/docs/features/sub-agents.md +0 -737
- package/bundled/mainy/docs/features/tips.md +0 -54
- package/bundled/mainy/docs/features/token-caching.md +0 -29
- package/bundled/mainy/docs/features/tool-use-summaries.md +0 -178
- package/bundled/mainy/docs/features/worktree.md +0 -343
- package/bundled/mainy/docs/ide-integration/_meta.ts +0 -4
- package/bundled/mainy/docs/ide-integration/ide-companion-spec.md +0 -182
- package/bundled/mainy/docs/ide-integration/ide-integration.md +0 -144
- package/bundled/mainy/docs/integration-github-action.md +0 -241
- package/bundled/mainy/docs/integration-jetbrains.md +0 -81
- package/bundled/mainy/docs/integration-vscode.md +0 -39
- package/bundled/mainy/docs/integration-zed.md +0 -72
- package/bundled/mainy/docs/matilda-serve-deploy-local.md +0 -221
- package/bundled/mainy/docs/matilda-serve.md +0 -661
- package/bundled/mainy/docs/overview.md +0 -64
- package/bundled/mainy/docs/quickstart.md +0 -234
- package/bundled/mainy/docs/reference/_meta.ts +0 -3
- package/bundled/mainy/docs/reference/keyboard-shortcuts.md +0 -91
- package/bundled/mainy/docs/support/Uninstall.md +0 -65
- package/bundled/mainy/docs/support/_meta.ts +0 -6
- package/bundled/mainy/docs/support/tos-privacy.md +0 -94
- package/bundled/mainy/docs/support/troubleshooting.md +0 -127
- package/chunks/agent-SRAIVZEE.js +0 -3
- package/chunks/agent-headless-XRDOZESG.js +0 -3
- package/chunks/anthropicContentGenerator-LLDIKDMQ.js +0 -39
- package/chunks/ca-NPYL24ME.js +0 -25
- package/chunks/chunk-27HUYW23.js +0 -22
- package/chunks/chunk-2HTPVSGT.js +0 -3
- package/chunks/chunk-3B2HABK7.js +0 -30
- package/chunks/chunk-3MTZTNAU.js +0 -101
- package/chunks/chunk-3YLXGE6T.js +0 -8
- package/chunks/chunk-47XR7IMP.js +0 -8
- package/chunks/chunk-4F4DA5UI.js +0 -8
- package/chunks/chunk-4Q2SNBUH.js +0 -18
- package/chunks/chunk-6EQMZNIY.js +0 -8
- package/chunks/chunk-6I6VGTKD.js +0 -8
- package/chunks/chunk-DC7LAFZZ.js +0 -8
- package/chunks/chunk-DE3HKC2W.js +0 -9
- package/chunks/chunk-FWDMPRKU.js +0 -3
- package/chunks/chunk-G7R2XEEF.js +0 -7
- package/chunks/chunk-GOJCMVJJ.js +0 -8
- package/chunks/chunk-GTVCJCHR.js +0 -8
- package/chunks/chunk-IJEGHQ7Z.js +0 -32
- package/chunks/chunk-JCE3JAVC.js +0 -25
- package/chunks/chunk-KHHJYBR5.js +0 -9
- package/chunks/chunk-LUNDTQ3G.js +0 -8
- package/chunks/chunk-LWARA7JY.js +0 -37
- package/chunks/chunk-M53RP3YP.js +0 -31
- package/chunks/chunk-MTMU7JYZ.js +0 -11
- package/chunks/chunk-O44XK65C.js +0 -8
- package/chunks/chunk-OA56BXPD.js +0 -3
- package/chunks/chunk-PEKAUGYV.js +0 -2621
- package/chunks/chunk-PGUG43HG.js +0 -24
- package/chunks/chunk-PGXQZVLX.js +0 -8
- package/chunks/chunk-QKYGQLWC.js +0 -8
- package/chunks/chunk-QN6Y6NPA.js +0 -3
- package/chunks/chunk-RI54U73U.js +0 -56
- package/chunks/chunk-RPFSFS7Z.js +0 -39
- package/chunks/chunk-SDTWBD62.js +0 -8
- package/chunks/chunk-SOEIVSM5.js +0 -113
- package/chunks/chunk-SVSY6AWS.js +0 -59
- package/chunks/chunk-T2T2UEPY.js +0 -4
- package/chunks/chunk-TISQNFB5.js +0 -3
- package/chunks/chunk-TWJLOEAI.js +0 -31
- package/chunks/chunk-VI74YQQO.js +0 -8
- package/chunks/chunk-VYZOOSMP.js +0 -30
- package/chunks/chunk-W4QSMIWO.js +0 -9
- package/chunks/chunk-WC2VTVCE.js +0 -27
- package/chunks/chunk-YV3PUOBU.js +0 -65
- package/chunks/chunk-ZX34M2GF.js +0 -14
- package/chunks/contextCommand-5F5M7NA4.js +0 -3
- package/chunks/cron-delete-NQCDZDUI.js +0 -3
- package/chunks/cron-list-Z4XMC3TO.js +0 -5
- package/chunks/de-34YZHGC6.js +0 -25
- package/chunks/dist-7UYRLSLE.js +0 -3
- package/chunks/dist-PH6JW7XD.js +0 -42
- package/chunks/en-QLGMD6OS.js +0 -25
- package/chunks/enterPlanMode-SQEZAAIR.js +0 -18
- package/chunks/fileFromPath-7UCWPD4W.js +0 -3
- package/chunks/fr-EDNBQACJ.js +0 -25
- package/chunks/geminiContentGenerator-FIZFLPU3.js +0 -8
- package/chunks/glob-GSFTYAS2.js +0 -22
- package/chunks/ja-LV4RLM3M.js +0 -25
- package/chunks/keychain-token-storage-KQK6MNOJ.js +0 -3
- package/chunks/ls-IZJ3CKZY.js +0 -15
- package/chunks/matildaAgentContentGenerator-QQHPCFJ5.js +0 -8
- package/chunks/matildaContentGenerator-W7Z33ONU.js +0 -8
- package/chunks/matildaOAuth2-7COTQQR2.js +0 -3
- package/chunks/mcp-client-DXUNIEIB.js +0 -3
- package/chunks/monitor-4PFIGAGG.js +0 -32
- package/chunks/notebook-edit-MWJYAATJ.js +0 -17
- package/chunks/openaiContentGenerator-NDVJL6QL.js +0 -3
- package/chunks/pt-5SQ4DGL7.js +0 -25
- package/chunks/read-file-WPZKPXWA.js +0 -3
- package/chunks/ripGrep-7LZDZFTX.js +0 -3
- package/chunks/ru-7K24S53N.js +0 -25
- package/chunks/scheduler-DK2MVKXX.js +0 -8
- package/chunks/send-message-TCPX5UDU.js +0 -8
- package/chunks/serve-GSZPJI2O.js +0 -1026
- package/chunks/shell-PRS47PDP.js +0 -3
- package/chunks/src-UB7DZRYK.js +0 -3
- package/chunks/src-WZTRMETQ.js +0 -5
- package/chunks/symbol-search-HARHZ5AH.js +0 -19
- package/chunks/task-create-XRNIDT4T.js +0 -3
- package/chunks/task-list-Z6BDZZID.js +0 -9
- package/chunks/team-delete-F7QDC2TE.js +0 -8
- package/chunks/todoWrite-SCF5M24M.js +0 -3
- package/chunks/web-search-67DFNS5V.js +0 -26
- package/chunks/write-file-S5FAX4JJ.js +0 -15
package/chunks/chunk-3MTZTNAU.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
// Force strict mode and setup for ESM
|
|
2
|
-
"use strict";
|
|
3
|
-
import{b as we,e as Mr,g as Wi,h as zi,i as Xi,l as Or}from"./chunk-27HUYW23.js";import{Ab as Ni,Bb as Bi,Vd as _i,Wf as Ui,eg as Gi,hj as Fl,hk as $i,ik as qi,jk as Hi,ki as ji,pa as Ri,ua as Mi,xb as Oi}from"./chunk-PEKAUGYV.js";import{x as Li,y as Pi}from"./chunk-RI54U73U.js";import{aa as Fi}from"./chunk-SOEIVSM5.js";import{e as $t}from"./chunk-DC7LAFZZ.js";import{da as Pr}from"./chunk-DHDD5YJC.js";import{e as Ii}from"./chunk-LUNDTQ3G.js";import{Q as Z,b as Ti,ba as Ce,d as se,k as ft,w as _e}from"./chunk-27Q5KW3A.js";import{b}from"./chunk-GZPNIYVZ.js";import{a as ht,d as L,f as Ve}from"./chunk-OWGSC52X.js";var Hr=L((wm,xs)=>{"use strict";b();var qr=Symbol("singleComment"),vs=Symbol("multiComment"),Gl=()=>"",jl=(e,t,r)=>e.slice(t,r).replace(/\S/g," "),$l=(e,t)=>{let r=t-1,n=0;for(;e[r]==="\\";)r-=1,n+=1;return!!(n%2)};xs.exports=(e,t={})=>{if(typeof e!="string")throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof e}\``);let r=t.whitespace===!1?Gl:jl,n=!1,i=!1,o=0,u="";for(let h=0;h<e.length;h++){let p=e[h],g=e[h+1];if(!i&&p==='"'&&($l(e,h)||(n=!n)),!n){if(!i&&p+g==="//")u+=e.slice(o,h),o=h,i=qr,h++;else if(i===qr&&p+g===`\r
|
|
4
|
-
`){h++,i=!1,u+=r(e,o,h),o=h;continue}else if(i===qr&&p===`
|
|
5
|
-
`)i=!1,u+=r(e,o,h),o=h;else if(!i&&p+g==="/*"){u+=e.slice(o,h),o=h,i=vs,h++;continue}else if(i===vs&&p+g==="*/"){h++,i=!1,u+=r(e,o,h+1),o=h+1;continue}}}return u+(i?r(e.slice(o)):e.slice(o))}});var qs=L((St,ln)=>{b();(function(t,r){typeof St=="object"&&typeof ln=="object"?ln.exports=r():typeof define=="function"&&define.amd?define([],r):typeof St=="object"?St.esprima=r():t.esprima=r()})(St,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}return r.m=e,r.c=t,r.p="",r(0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r(3),o=r(8),u=r(15);function h(d,s,a){var l=null,c=function(N,G){a&&a(N,G),l&&l.visit(N,G)},y=typeof a=="function"?c:null,S=!1;if(s){S=typeof s.comment=="boolean"&&s.comment;var E=typeof s.attachComment=="boolean"&&s.attachComment;(S||E)&&(l=new n.CommentHandler,l.attach=E,s.comment=!0,y=c)}var D=!1;s&&typeof s.sourceType=="string"&&(D=s.sourceType==="module");var A;s&&typeof s.jsx=="boolean"&&s.jsx?A=new i.JSXParser(d,s,y):A=new o.Parser(d,s,y);var T=D?A.parseModule():A.parseScript(),F=T;return S&&l&&(F.comments=l.comments),A.config.tokens&&(F.tokens=A.tokens),A.config.tolerant&&(F.errors=A.errorHandler.errors),F}t.parse=h;function p(d,s,a){var l=s||{};return l.sourceType="module",h(d,l,a)}t.parseModule=p;function g(d,s,a){var l=s||{};return l.sourceType="script",h(d,l,a)}t.parseScript=g;function f(d,s,a){var l=new u.Tokenizer(d,s),c;c=[];try{for(;;){var y=l.getNextToken();if(!y)break;a&&(y=a(y)),c.push(y)}}catch(S){l.errorHandler.tolerate(S)}return l.errorHandler.tolerant&&(c.errors=l.errors()),c}t.tokenize=f;var m=r(2);t.Syntax=m.Syntax,t.version="4.0.1"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),i=function(){function o(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return o.prototype.insertInnerComments=function(u,h){if(u.type===n.Syntax.BlockStatement&&u.body.length===0){for(var p=[],g=this.leading.length-1;g>=0;--g){var f=this.leading[g];h.end.offset>=f.start&&(p.unshift(f.comment),this.leading.splice(g,1),this.trailing.splice(g,1))}p.length&&(u.innerComments=p)}},o.prototype.findTrailingComments=function(u){var h=[];if(this.trailing.length>0){for(var p=this.trailing.length-1;p>=0;--p){var g=this.trailing[p];g.start>=u.end.offset&&h.unshift(g.comment)}return this.trailing.length=0,h}var f=this.stack[this.stack.length-1];if(f&&f.node.trailingComments){var m=f.node.trailingComments[0];m&&m.range[0]>=u.end.offset&&(h=f.node.trailingComments,delete f.node.trailingComments)}return h},o.prototype.findLeadingComments=function(u){for(var h=[],p;this.stack.length>0;){var g=this.stack[this.stack.length-1];if(g&&g.start>=u.start.offset)p=g.node,this.stack.pop();else break}if(p){for(var f=p.leadingComments?p.leadingComments.length:0,m=f-1;m>=0;--m){var d=p.leadingComments[m];d.range[1]<=u.start.offset&&(h.unshift(d),p.leadingComments.splice(m,1))}return p.leadingComments&&p.leadingComments.length===0&&delete p.leadingComments,h}for(var m=this.leading.length-1;m>=0;--m){var g=this.leading[m];g.start<=u.start.offset&&(h.unshift(g.comment),this.leading.splice(m,1))}return h},o.prototype.visitNode=function(u,h){if(!(u.type===n.Syntax.Program&&u.body.length>0)){this.insertInnerComments(u,h);var p=this.findTrailingComments(h),g=this.findLeadingComments(h);g.length>0&&(u.leadingComments=g),p.length>0&&(u.trailingComments=p),this.stack.push({node:u,start:h.start.offset})}},o.prototype.visitComment=function(u,h){var p=u.type[0]==="L"?"Line":"Block",g={type:p,value:u.value};if(u.range&&(g.range=u.range),u.loc&&(g.loc=u.loc),this.comments.push(g),this.attach){var f={comment:{type:p,value:u.value,range:[h.start.offset,h.end.offset]},start:h.start.offset};u.loc&&(f.comment.loc=u.loc),u.type=p,this.leading.push(f),this.trailing.push(f)}},o.prototype.visit=function(u,h){u.type==="LineComment"?this.visitComment(u,h):u.type==="BlockComment"?this.visitComment(u,h):this.attach&&this.visitNode(u,h)},o}();t.CommentHandler=i},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,l){a.__proto__=l}||function(a,l){for(var c in l)l.hasOwnProperty(c)&&(a[c]=l[c])};return function(a,l){s(a,l);function c(){this.constructor=a}a.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(4),o=r(5),u=r(6),h=r(7),p=r(8),g=r(13),f=r(14);g.TokenName[100]="JSXIdentifier",g.TokenName[101]="JSXText";function m(s){var a;switch(s.type){case u.JSXSyntax.JSXIdentifier:var l=s;a=l.name;break;case u.JSXSyntax.JSXNamespacedName:var c=s;a=m(c.namespace)+":"+m(c.name);break;case u.JSXSyntax.JSXMemberExpression:var y=s;a=m(y.object)+"."+m(y.property);break;default:break}return a}var d=function(s){n(a,s);function a(l,c,y){return s.call(this,l,c,y)||this}return a.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():s.prototype.parsePrimaryExpression.call(this)},a.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},a.prototype.finishJSX=function(){this.nextToken()},a.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},a.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},a.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},a.prototype.scanXHTMLEntity=function(l){for(var c="&",y=!0,S=!1,E=!1,D=!1;!this.scanner.eof()&&y&&!S;){var A=this.scanner.source[this.scanner.index];if(A===l)break;if(S=A===";",c+=A,++this.scanner.index,!S)switch(c.length){case 2:E=A==="#";break;case 3:E&&(D=A==="x",y=D||i.Character.isDecimalDigit(A.charCodeAt(0)),E=E&&!D);break;default:y=y&&!(E&&!i.Character.isDecimalDigit(A.charCodeAt(0))),y=y&&!(D&&!i.Character.isHexDigit(A.charCodeAt(0)));break}}if(y&&S&&c.length>2){var T=c.substr(1,c.length-2);E&&T.length>1?c=String.fromCharCode(parseInt(T.substr(1),10)):D&&T.length>2?c=String.fromCharCode(parseInt("0"+T.substr(1),16)):!E&&!D&&f.XHTMLEntities[T]&&(c=f.XHTMLEntities[T])}return c},a.prototype.lexJSX=function(){var l=this.scanner.source.charCodeAt(this.scanner.index);if(l===60||l===62||l===47||l===58||l===61||l===123||l===125){var c=this.scanner.source[this.scanner.index++];return{type:7,value:c,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(l===34||l===39){for(var y=this.scanner.index,S=this.scanner.source[this.scanner.index++],E="";!this.scanner.eof();){var D=this.scanner.source[this.scanner.index++];if(D===S)break;D==="&"?E+=this.scanXHTMLEntity(S):E+=D}return{type:8,value:E,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:y,end:this.scanner.index}}if(l===46){var A=this.scanner.source.charCodeAt(this.scanner.index+1),T=this.scanner.source.charCodeAt(this.scanner.index+2),c=A===46&&T===46?"...":".",y=this.scanner.index;return this.scanner.index+=c.length,{type:7,value:c,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:y,end:this.scanner.index}}if(l===96)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(i.Character.isIdentifierStart(l)&&l!==92){var y=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var D=this.scanner.source.charCodeAt(this.scanner.index);if(i.Character.isIdentifierPart(D)&&D!==92)++this.scanner.index;else if(D===45)++this.scanner.index;else break}var F=this.scanner.source.slice(y,this.scanner.index);return{type:100,value:F,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:y,end:this.scanner.index}}return this.scanner.lex()},a.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var l=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(l)),l},a.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var l=this.scanner.index,c="";!this.scanner.eof();){var y=this.scanner.source[this.scanner.index];if(y==="{"||y==="<")break;++this.scanner.index,c+=y,i.Character.isLineTerminator(y.charCodeAt(0))&&(++this.scanner.lineNumber,y==="\r"&&this.scanner.source[this.scanner.index]===`
|
|
6
|
-
`&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var S={type:101,value:c,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:l,end:this.scanner.index};return c.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(S)),S},a.prototype.peekJSXToken=function(){var l=this.scanner.saveState();this.scanner.scanComments();var c=this.lexJSX();return this.scanner.restoreState(l),c},a.prototype.expectJSX=function(l){var c=this.nextJSXToken();(c.type!==7||c.value!==l)&&this.throwUnexpectedToken(c)},a.prototype.matchJSX=function(l){var c=this.peekJSXToken();return c.type===7&&c.value===l},a.prototype.parseJSXIdentifier=function(){var l=this.createJSXNode(),c=this.nextJSXToken();return c.type!==100&&this.throwUnexpectedToken(c),this.finalize(l,new o.JSXIdentifier(c.value))},a.prototype.parseJSXElementName=function(){var l=this.createJSXNode(),c=this.parseJSXIdentifier();if(this.matchJSX(":")){var y=c;this.expectJSX(":");var S=this.parseJSXIdentifier();c=this.finalize(l,new o.JSXNamespacedName(y,S))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var E=c;this.expectJSX(".");var D=this.parseJSXIdentifier();c=this.finalize(l,new o.JSXMemberExpression(E,D))}return c},a.prototype.parseJSXAttributeName=function(){var l=this.createJSXNode(),c,y=this.parseJSXIdentifier();if(this.matchJSX(":")){var S=y;this.expectJSX(":");var E=this.parseJSXIdentifier();c=this.finalize(l,new o.JSXNamespacedName(S,E))}else c=y;return c},a.prototype.parseJSXStringLiteralAttribute=function(){var l=this.createJSXNode(),c=this.nextJSXToken();c.type!==8&&this.throwUnexpectedToken(c);var y=this.getTokenRaw(c);return this.finalize(l,new h.Literal(c.value,y))},a.prototype.parseJSXExpressionAttribute=function(){var l=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var c=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(l,new o.JSXExpressionContainer(c))},a.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},a.prototype.parseJSXNameValueAttribute=function(){var l=this.createJSXNode(),c=this.parseJSXAttributeName(),y=null;return this.matchJSX("=")&&(this.expectJSX("="),y=this.parseJSXAttributeValue()),this.finalize(l,new o.JSXAttribute(c,y))},a.prototype.parseJSXSpreadAttribute=function(){var l=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var c=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(l,new o.JSXSpreadAttribute(c))},a.prototype.parseJSXAttributes=function(){for(var l=[];!this.matchJSX("/")&&!this.matchJSX(">");){var c=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();l.push(c)}return l},a.prototype.parseJSXOpeningElement=function(){var l=this.createJSXNode();this.expectJSX("<");var c=this.parseJSXElementName(),y=this.parseJSXAttributes(),S=this.matchJSX("/");return S&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(l,new o.JSXOpeningElement(c,S,y))},a.prototype.parseJSXBoundaryElement=function(){var l=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var c=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(l,new o.JSXClosingElement(c))}var y=this.parseJSXElementName(),S=this.parseJSXAttributes(),E=this.matchJSX("/");return E&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(l,new o.JSXOpeningElement(y,E,S))},a.prototype.parseJSXEmptyExpression=function(){var l=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(l,new o.JSXEmptyExpression)},a.prototype.parseJSXExpressionContainer=function(){var l=this.createJSXNode();this.expectJSX("{");var c;return this.matchJSX("}")?(c=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),c=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(l,new o.JSXExpressionContainer(c))},a.prototype.parseJSXChildren=function(){for(var l=[];!this.scanner.eof();){var c=this.createJSXChildNode(),y=this.nextJSXText();if(y.start<y.end){var S=this.getTokenRaw(y),E=this.finalize(c,new o.JSXText(y.value,S));l.push(E)}if(this.scanner.source[this.scanner.index]==="{"){var D=this.parseJSXExpressionContainer();l.push(D)}else break}return l},a.prototype.parseComplexJSXElement=function(l){for(var c=[];!this.scanner.eof();){l.children=l.children.concat(this.parseJSXChildren());var y=this.createJSXChildNode(),S=this.parseJSXBoundaryElement();if(S.type===u.JSXSyntax.JSXOpeningElement){var E=S;if(E.selfClosing){var D=this.finalize(y,new o.JSXElement(E,[],null));l.children.push(D)}else c.push(l),l={node:y,opening:E,closing:null,children:[]}}if(S.type===u.JSXSyntax.JSXClosingElement){l.closing=S;var A=m(l.opening.name),T=m(l.closing.name);if(A!==T&&this.tolerateError("Expected corresponding JSX closing tag for %0",A),c.length>0){var D=this.finalize(l.node,new o.JSXElement(l.opening,l.children,l.closing));l=c[c.length-1],l.children.push(D),c.pop()}else break}}return l},a.prototype.parseJSXElement=function(){var l=this.createJSXNode(),c=this.parseJSXOpeningElement(),y=[],S=null;if(!c.selfClosing){var E=this.parseComplexJSXElement({node:l,opening:c,closing:S,children:y});y=E.children,S=E.closing}return this.finalize(l,new o.JSXElement(c,y,S))},a.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var l=this.parseJSXElement();return this.finishJSX(),l},a.prototype.isStartOfExpression=function(){return s.prototype.isStartOfExpression.call(this)||this.match("<")},a}(p.Parser);t.JSXParser=d},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(n){return n<65536?String.fromCharCode(n):String.fromCharCode(55296+(n-65536>>10))+String.fromCharCode(56320+(n-65536&1023))},isWhiteSpace:function(n){return n===32||n===9||n===11||n===12||n===160||n>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(n)>=0},isLineTerminator:function(n){return n===10||n===13||n===8232||n===8233},isIdentifierStart:function(n){return n===36||n===95||n>=65&&n<=90||n>=97&&n<=122||n===92||n>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(n))},isIdentifierPart:function(n){return n===36||n===95||n>=65&&n<=90||n>=97&&n<=122||n>=48&&n<=57||n===92||n>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(n))},isDecimalDigit:function(n){return n>=48&&n<=57},isHexDigit:function(n){return n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102},isOctalDigit:function(n){return n>=48&&n<=55}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6),i=function(){function l(c){this.type=n.JSXSyntax.JSXClosingElement,this.name=c}return l}();t.JSXClosingElement=i;var o=function(){function l(c,y,S){this.type=n.JSXSyntax.JSXElement,this.openingElement=c,this.children=y,this.closingElement=S}return l}();t.JSXElement=o;var u=function(){function l(){this.type=n.JSXSyntax.JSXEmptyExpression}return l}();t.JSXEmptyExpression=u;var h=function(){function l(c){this.type=n.JSXSyntax.JSXExpressionContainer,this.expression=c}return l}();t.JSXExpressionContainer=h;var p=function(){function l(c){this.type=n.JSXSyntax.JSXIdentifier,this.name=c}return l}();t.JSXIdentifier=p;var g=function(){function l(c,y){this.type=n.JSXSyntax.JSXMemberExpression,this.object=c,this.property=y}return l}();t.JSXMemberExpression=g;var f=function(){function l(c,y){this.type=n.JSXSyntax.JSXAttribute,this.name=c,this.value=y}return l}();t.JSXAttribute=f;var m=function(){function l(c,y){this.type=n.JSXSyntax.JSXNamespacedName,this.namespace=c,this.name=y}return l}();t.JSXNamespacedName=m;var d=function(){function l(c,y,S){this.type=n.JSXSyntax.JSXOpeningElement,this.name=c,this.selfClosing=y,this.attributes=S}return l}();t.JSXOpeningElement=d;var s=function(){function l(c){this.type=n.JSXSyntax.JSXSpreadAttribute,this.argument=c}return l}();t.JSXSpreadAttribute=s;var a=function(){function l(c,y){this.type=n.JSXSyntax.JSXText,this.value=c,this.raw=y}return l}();t.JSXText=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),i=function(){function v(x){this.type=n.Syntax.ArrayExpression,this.elements=x}return v}();t.ArrayExpression=i;var o=function(){function v(x){this.type=n.Syntax.ArrayPattern,this.elements=x}return v}();t.ArrayPattern=o;var u=function(){function v(x,C,M){this.type=n.Syntax.ArrowFunctionExpression,this.id=null,this.params=x,this.body=C,this.generator=!1,this.expression=M,this.async=!1}return v}();t.ArrowFunctionExpression=u;var h=function(){function v(x,C,M){this.type=n.Syntax.AssignmentExpression,this.operator=x,this.left=C,this.right=M}return v}();t.AssignmentExpression=h;var p=function(){function v(x,C){this.type=n.Syntax.AssignmentPattern,this.left=x,this.right=C}return v}();t.AssignmentPattern=p;var g=function(){function v(x,C,M){this.type=n.Syntax.ArrowFunctionExpression,this.id=null,this.params=x,this.body=C,this.generator=!1,this.expression=M,this.async=!0}return v}();t.AsyncArrowFunctionExpression=g;var f=function(){function v(x,C,M){this.type=n.Syntax.FunctionDeclaration,this.id=x,this.params=C,this.body=M,this.generator=!1,this.expression=!1,this.async=!0}return v}();t.AsyncFunctionDeclaration=f;var m=function(){function v(x,C,M){this.type=n.Syntax.FunctionExpression,this.id=x,this.params=C,this.body=M,this.generator=!1,this.expression=!1,this.async=!0}return v}();t.AsyncFunctionExpression=m;var d=function(){function v(x){this.type=n.Syntax.AwaitExpression,this.argument=x}return v}();t.AwaitExpression=d;var s=function(){function v(x,C,M){var te=x==="||"||x==="&&";this.type=te?n.Syntax.LogicalExpression:n.Syntax.BinaryExpression,this.operator=x,this.left=C,this.right=M}return v}();t.BinaryExpression=s;var a=function(){function v(x){this.type=n.Syntax.BlockStatement,this.body=x}return v}();t.BlockStatement=a;var l=function(){function v(x){this.type=n.Syntax.BreakStatement,this.label=x}return v}();t.BreakStatement=l;var c=function(){function v(x,C){this.type=n.Syntax.CallExpression,this.callee=x,this.arguments=C}return v}();t.CallExpression=c;var y=function(){function v(x,C){this.type=n.Syntax.CatchClause,this.param=x,this.body=C}return v}();t.CatchClause=y;var S=function(){function v(x){this.type=n.Syntax.ClassBody,this.body=x}return v}();t.ClassBody=S;var E=function(){function v(x,C,M){this.type=n.Syntax.ClassDeclaration,this.id=x,this.superClass=C,this.body=M}return v}();t.ClassDeclaration=E;var D=function(){function v(x,C,M){this.type=n.Syntax.ClassExpression,this.id=x,this.superClass=C,this.body=M}return v}();t.ClassExpression=D;var A=function(){function v(x,C){this.type=n.Syntax.MemberExpression,this.computed=!0,this.object=x,this.property=C}return v}();t.ComputedMemberExpression=A;var T=function(){function v(x,C,M){this.type=n.Syntax.ConditionalExpression,this.test=x,this.consequent=C,this.alternate=M}return v}();t.ConditionalExpression=T;var F=function(){function v(x){this.type=n.Syntax.ContinueStatement,this.label=x}return v}();t.ContinueStatement=F;var N=function(){function v(){this.type=n.Syntax.DebuggerStatement}return v}();t.DebuggerStatement=N;var G=function(){function v(x,C){this.type=n.Syntax.ExpressionStatement,this.expression=x,this.directive=C}return v}();t.Directive=G;var H=function(){function v(x,C){this.type=n.Syntax.DoWhileStatement,this.body=x,this.test=C}return v}();t.DoWhileStatement=H;var z=function(){function v(){this.type=n.Syntax.EmptyStatement}return v}();t.EmptyStatement=z;var Ae=function(){function v(x){this.type=n.Syntax.ExportAllDeclaration,this.source=x}return v}();t.ExportAllDeclaration=Ae;var Be=function(){function v(x){this.type=n.Syntax.ExportDefaultDeclaration,this.declaration=x}return v}();t.ExportDefaultDeclaration=Be;var kr=function(){function v(x,C,M){this.type=n.Syntax.ExportNamedDeclaration,this.declaration=x,this.specifiers=C,this.source=M}return v}();t.ExportNamedDeclaration=kr;var Tr=function(){function v(x,C){this.type=n.Syntax.ExportSpecifier,this.exported=C,this.local=x}return v}();t.ExportSpecifier=Tr;var Ir=function(){function v(x){this.type=n.Syntax.ExpressionStatement,this.expression=x}return v}();t.ExpressionStatement=Ir;var q=function(){function v(x,C,M){this.type=n.Syntax.ForInStatement,this.left=x,this.right=C,this.body=M,this.each=!1}return v}();t.ForInStatement=q;var ue=function(){function v(x,C,M){this.type=n.Syntax.ForOfStatement,this.left=x,this.right=C,this.body=M}return v}();t.ForOfStatement=ue;var de=function(){function v(x,C,M,te){this.type=n.Syntax.ForStatement,this.init=x,this.test=C,this.update=M,this.body=te}return v}();t.ForStatement=de;var be=function(){function v(x,C,M,te){this.type=n.Syntax.FunctionDeclaration,this.id=x,this.params=C,this.body=M,this.generator=te,this.expression=!1,this.async=!1}return v}();t.FunctionDeclaration=be;var Xe=function(){function v(x,C,M,te){this.type=n.Syntax.FunctionExpression,this.id=x,this.params=C,this.body=M,this.generator=te,this.expression=!1,this.async=!1}return v}();t.FunctionExpression=Xe;var ve=function(){function v(x){this.type=n.Syntax.Identifier,this.name=x}return v}();t.Identifier=ve;var Pt=function(){function v(x,C,M){this.type=n.Syntax.IfStatement,this.test=x,this.consequent=C,this.alternate=M}return v}();t.IfStatement=Pt;var Mt=function(){function v(x,C){this.type=n.Syntax.ImportDeclaration,this.specifiers=x,this.source=C}return v}();t.ImportDeclaration=Mt;var Ot=function(){function v(x){this.type=n.Syntax.ImportDefaultSpecifier,this.local=x}return v}();t.ImportDefaultSpecifier=Ot;var J=function(){function v(x){this.type=n.Syntax.ImportNamespaceSpecifier,this.local=x}return v}();t.ImportNamespaceSpecifier=J;var ut=function(){function v(x,C){this.type=n.Syntax.ImportSpecifier,this.local=x,this.imported=C}return v}();t.ImportSpecifier=ut;var Nt=function(){function v(x,C){this.type=n.Syntax.LabeledStatement,this.label=x,this.body=C}return v}();t.LabeledStatement=Nt;var Bt=function(){function v(x,C){this.type=n.Syntax.Literal,this.value=x,this.raw=C}return v}();t.Literal=Bt;var _t=function(){function v(x,C){this.type=n.Syntax.MetaProperty,this.meta=x,this.property=C}return v}();t.MetaProperty=_t;var lt=function(){function v(x,C,M,te,Lr){this.type=n.Syntax.MethodDefinition,this.key=x,this.computed=C,this.value=M,this.kind=te,this.static=Lr}return v}();t.MethodDefinition=lt;var Ut=function(){function v(x){this.type=n.Syntax.Program,this.body=x,this.sourceType="module"}return v}();t.Module=Ut;var Gt=function(){function v(x,C){this.type=n.Syntax.NewExpression,this.callee=x,this.arguments=C}return v}();t.NewExpression=Gt;var jt=function(){function v(x){this.type=n.Syntax.ObjectExpression,this.properties=x}return v}();t.ObjectExpression=jt;var ct=function(){function v(x){this.type=n.Syntax.ObjectPattern,this.properties=x}return v}();t.ObjectPattern=ct;var dt=function(){function v(x,C,M,te,Lr,Il){this.type=n.Syntax.Property,this.key=C,this.computed=M,this.value=te,this.kind=x,this.method=Lr,this.shorthand=Il}return v}();t.Property=dt;var he=function(){function v(x,C,M,te){this.type=n.Syntax.Literal,this.value=x,this.raw=C,this.regex={pattern:M,flags:te}}return v}();t.RegexLiteral=he;var fe=function(){function v(x){this.type=n.Syntax.RestElement,this.argument=x}return v}();t.RestElement=fe;var le=function(){function v(x){this.type=n.Syntax.ReturnStatement,this.argument=x}return v}();t.ReturnStatement=le;var Fr=function(){function v(x){this.type=n.Syntax.Program,this.body=x,this.sourceType="script"}return v}();t.Script=Fr;var Rr=function(){function v(x){this.type=n.Syntax.SequenceExpression,this.expressions=x}return v}();t.SequenceExpression=Rr;var dl=function(){function v(x){this.type=n.Syntax.SpreadElement,this.argument=x}return v}();t.SpreadElement=dl;var hl=function(){function v(x,C){this.type=n.Syntax.MemberExpression,this.computed=!1,this.object=x,this.property=C}return v}();t.StaticMemberExpression=hl;var fl=function(){function v(){this.type=n.Syntax.Super}return v}();t.Super=fl;var pl=function(){function v(x,C){this.type=n.Syntax.SwitchCase,this.test=x,this.consequent=C}return v}();t.SwitchCase=pl;var ml=function(){function v(x,C){this.type=n.Syntax.SwitchStatement,this.discriminant=x,this.cases=C}return v}();t.SwitchStatement=ml;var gl=function(){function v(x,C){this.type=n.Syntax.TaggedTemplateExpression,this.tag=x,this.quasi=C}return v}();t.TaggedTemplateExpression=gl;var yl=function(){function v(x,C){this.type=n.Syntax.TemplateElement,this.value=x,this.tail=C}return v}();t.TemplateElement=yl;var Sl=function(){function v(x,C){this.type=n.Syntax.TemplateLiteral,this.quasis=x,this.expressions=C}return v}();t.TemplateLiteral=Sl;var bl=function(){function v(){this.type=n.Syntax.ThisExpression}return v}();t.ThisExpression=bl;var vl=function(){function v(x){this.type=n.Syntax.ThrowStatement,this.argument=x}return v}();t.ThrowStatement=vl;var xl=function(){function v(x,C,M){this.type=n.Syntax.TryStatement,this.block=x,this.handler=C,this.finalizer=M}return v}();t.TryStatement=xl;var El=function(){function v(x,C){this.type=n.Syntax.UnaryExpression,this.operator=x,this.argument=C,this.prefix=!0}return v}();t.UnaryExpression=El;var Dl=function(){function v(x,C,M){this.type=n.Syntax.UpdateExpression,this.operator=x,this.argument=C,this.prefix=M}return v}();t.UpdateExpression=Dl;var Al=function(){function v(x,C){this.type=n.Syntax.VariableDeclaration,this.declarations=x,this.kind=C}return v}();t.VariableDeclaration=Al;var Cl=function(){function v(x,C){this.type=n.Syntax.VariableDeclarator,this.id=x,this.init=C}return v}();t.VariableDeclarator=Cl;var wl=function(){function v(x,C){this.type=n.Syntax.WhileStatement,this.test=x,this.body=C}return v}();t.WhileStatement=wl;var kl=function(){function v(x,C){this.type=n.Syntax.WithStatement,this.object=x,this.body=C}return v}();t.WithStatement=kl;var Tl=function(){function v(x,C){this.type=n.Syntax.YieldExpression,this.argument=x,this.delegate=C}return v}();t.YieldExpression=Tl},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9),i=r(10),o=r(11),u=r(7),h=r(12),p=r(2),g=r(13),f="ArrowParameterPlaceHolder",m=function(){function d(s,a,l){a===void 0&&(a={}),this.config={range:typeof a.range=="boolean"&&a.range,loc:typeof a.loc=="boolean"&&a.loc,source:null,tokens:typeof a.tokens=="boolean"&&a.tokens,comment:typeof a.comment=="boolean"&&a.comment,tolerant:typeof a.tolerant=="boolean"&&a.tolerant},this.config.loc&&a.source&&a.source!==null&&(this.config.source=String(a.source)),this.delegate=l,this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new h.Scanner(s,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return d.prototype.throwError=function(s){for(var a=[],l=1;l<arguments.length;l++)a[l-1]=arguments[l];var c=Array.prototype.slice.call(arguments,1),y=s.replace(/%(\d)/g,function(A,T){return n.assert(T<c.length,"Message reference must be in range"),c[T]}),S=this.lastMarker.index,E=this.lastMarker.line,D=this.lastMarker.column+1;throw this.errorHandler.createError(S,E,D,y)},d.prototype.tolerateError=function(s){for(var a=[],l=1;l<arguments.length;l++)a[l-1]=arguments[l];var c=Array.prototype.slice.call(arguments,1),y=s.replace(/%(\d)/g,function(A,T){return n.assert(T<c.length,"Message reference must be in range"),c[T]}),S=this.lastMarker.index,E=this.scanner.lineNumber,D=this.lastMarker.column+1;this.errorHandler.tolerateError(S,E,D,y)},d.prototype.unexpectedTokenError=function(s,a){var l=a||o.Messages.UnexpectedToken,c;if(s?(a||(l=s.type===2?o.Messages.UnexpectedEOS:s.type===3?o.Messages.UnexpectedIdentifier:s.type===6?o.Messages.UnexpectedNumber:s.type===8?o.Messages.UnexpectedString:s.type===10?o.Messages.UnexpectedTemplate:o.Messages.UnexpectedToken,s.type===4&&(this.scanner.isFutureReservedWord(s.value)?l=o.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(s.value)&&(l=o.Messages.StrictReservedWord))),c=s.value):c="ILLEGAL",l=l.replace("%0",c),s&&typeof s.lineNumber=="number"){var y=s.start,S=s.lineNumber,E=this.lastMarker.index-this.lastMarker.column,D=s.start-E+1;return this.errorHandler.createError(y,S,D,l)}else{var y=this.lastMarker.index,S=this.lastMarker.line,D=this.lastMarker.column+1;return this.errorHandler.createError(y,S,D,l)}},d.prototype.throwUnexpectedToken=function(s,a){throw this.unexpectedTokenError(s,a)},d.prototype.tolerateUnexpectedToken=function(s,a){this.errorHandler.tolerate(this.unexpectedTokenError(s,a))},d.prototype.collectComments=function(){if(!this.config.comment)this.scanner.scanComments();else{var s=this.scanner.scanComments();if(s.length>0&&this.delegate)for(var a=0;a<s.length;++a){var l=s[a],c=void 0;c={type:l.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(l.slice[0],l.slice[1])},this.config.range&&(c.range=l.range),this.config.loc&&(c.loc=l.loc);var y={start:{line:l.loc.start.line,column:l.loc.start.column,offset:l.range[0]},end:{line:l.loc.end.line,column:l.loc.end.column,offset:l.range[1]}};this.delegate(c,y)}}},d.prototype.getTokenRaw=function(s){return this.scanner.source.slice(s.start,s.end)},d.prototype.convertToken=function(s){var a={type:g.TokenName[s.type],value:this.getTokenRaw(s)};if(this.config.range&&(a.range=[s.start,s.end]),this.config.loc&&(a.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),s.type===9){var l=s.pattern,c=s.flags;a.regex={pattern:l,flags:c}}return a},d.prototype.nextToken=function(){var s=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var a=this.scanner.lex();return this.hasLineTerminator=s.lineNumber!==a.lineNumber,a&&this.context.strict&&a.type===3&&this.scanner.isStrictModeReservedWord(a.value)&&(a.type=4),this.lookahead=a,this.config.tokens&&a.type!==2&&this.tokens.push(this.convertToken(a)),s},d.prototype.nextRegexToken=function(){this.collectComments();var s=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(s))),this.lookahead=s,this.nextToken(),s},d.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},d.prototype.startNode=function(s,a){a===void 0&&(a=0);var l=s.start-s.lineStart,c=s.lineNumber;return l<0&&(l+=a,c--),{index:s.start,line:c,column:l}},d.prototype.finalize=function(s,a){if(this.config.range&&(a.range=[s.index,this.lastMarker.index]),this.config.loc&&(a.loc={start:{line:s.line,column:s.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(a.loc.source=this.config.source)),this.delegate){var l={start:{line:s.line,column:s.column,offset:s.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(a,l)}return a},d.prototype.expect=function(s){var a=this.nextToken();(a.type!==7||a.value!==s)&&this.throwUnexpectedToken(a)},d.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var s=this.lookahead;s.type===7&&s.value===","?this.nextToken():s.type===7&&s.value===";"?(this.nextToken(),this.tolerateUnexpectedToken(s)):this.tolerateUnexpectedToken(s,o.Messages.UnexpectedToken)}else this.expect(",")},d.prototype.expectKeyword=function(s){var a=this.nextToken();(a.type!==4||a.value!==s)&&this.throwUnexpectedToken(a)},d.prototype.match=function(s){return this.lookahead.type===7&&this.lookahead.value===s},d.prototype.matchKeyword=function(s){return this.lookahead.type===4&&this.lookahead.value===s},d.prototype.matchContextualKeyword=function(s){return this.lookahead.type===3&&this.lookahead.value===s},d.prototype.matchAssign=function(){if(this.lookahead.type!==7)return!1;var s=this.lookahead.value;return s==="="||s==="*="||s==="**="||s==="/="||s==="%="||s==="+="||s==="-="||s==="<<="||s===">>="||s===">>>="||s==="&="||s==="^="||s==="|="},d.prototype.isolateCoverGrammar=function(s){var a=this.context.isBindingElement,l=this.context.isAssignmentTarget,c=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var y=s.call(this);return this.context.firstCoverInitializedNameError!==null&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=a,this.context.isAssignmentTarget=l,this.context.firstCoverInitializedNameError=c,y},d.prototype.inheritCoverGrammar=function(s){var a=this.context.isBindingElement,l=this.context.isAssignmentTarget,c=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var y=s.call(this);return this.context.isBindingElement=this.context.isBindingElement&&a,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&l,this.context.firstCoverInitializedNameError=c||this.context.firstCoverInitializedNameError,y},d.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type!==2&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},d.prototype.parsePrimaryExpression=function(){var s=this.createNode(),a,l,c;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&this.lookahead.value==="await"&&this.tolerateUnexpectedToken(this.lookahead),a=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(s,new u.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,l=this.nextToken(),c=this.getTokenRaw(l),a=this.finalize(s,new u.Literal(l.value,c));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,l=this.nextToken(),c=this.getTokenRaw(l),a=this.finalize(s,new u.Literal(l.value==="true",c));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,l=this.nextToken(),c=this.getTokenRaw(l),a=this.finalize(s,new u.Literal(null,c));break;case 10:a=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,a=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":a=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":a=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,l=this.nextRegexToken(),c=this.getTokenRaw(l),a=this.finalize(s,new u.RegexLiteral(l.regex,c,l.pattern,l.flags));break;default:a=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?a=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?a=this.finalize(s,new u.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?a=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),a=this.finalize(s,new u.ThisExpression)):this.matchKeyword("class")?a=this.parseClassExpression():a=this.throwUnexpectedToken(this.nextToken()));break;default:a=this.throwUnexpectedToken(this.nextToken())}return a},d.prototype.parseSpreadElement=function(){var s=this.createNode();this.expect("...");var a=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(s,new u.SpreadElement(a))},d.prototype.parseArrayInitializer=function(){var s=this.createNode(),a=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),a.push(null);else if(this.match("...")){var l=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),a.push(l)}else a.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(s,new u.ArrayExpression(a))},d.prototype.parsePropertyMethod=function(s){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var a=this.context.strict,l=this.context.allowStrictDirective;this.context.allowStrictDirective=s.simple;var c=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&s.firstRestricted&&this.tolerateUnexpectedToken(s.firstRestricted,s.message),this.context.strict&&s.stricted&&this.tolerateUnexpectedToken(s.stricted,s.message),this.context.strict=a,this.context.allowStrictDirective=l,c},d.prototype.parsePropertyMethodFunction=function(){var s=!1,a=this.createNode(),l=this.context.allowYield;this.context.allowYield=!0;var c=this.parseFormalParameters(),y=this.parsePropertyMethod(c);return this.context.allowYield=l,this.finalize(a,new u.FunctionExpression(null,c.params,y,s))},d.prototype.parsePropertyMethodAsyncFunction=function(){var s=this.createNode(),a=this.context.allowYield,l=this.context.await;this.context.allowYield=!1,this.context.await=!0;var c=this.parseFormalParameters(),y=this.parsePropertyMethod(c);return this.context.allowYield=a,this.context.await=l,this.finalize(s,new u.AsyncFunctionExpression(null,c.params,y))},d.prototype.parseObjectPropertyKey=function(){var s=this.createNode(),a=this.nextToken(),l;switch(a.type){case 8:case 6:this.context.strict&&a.octal&&this.tolerateUnexpectedToken(a,o.Messages.StrictOctalLiteral);var c=this.getTokenRaw(a);l=this.finalize(s,new u.Literal(a.value,c));break;case 3:case 1:case 5:case 4:l=this.finalize(s,new u.Identifier(a.value));break;case 7:a.value==="["?(l=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):l=this.throwUnexpectedToken(a);break;default:l=this.throwUnexpectedToken(a)}return l},d.prototype.isPropertyKey=function(s,a){return s.type===p.Syntax.Identifier&&s.name===a||s.type===p.Syntax.Literal&&s.value===a},d.prototype.parseObjectProperty=function(s){var a=this.createNode(),l=this.lookahead,c,y=null,S=null,E=!1,D=!1,A=!1,T=!1;if(l.type===3){var F=l.value;this.nextToken(),E=this.match("["),T=!this.hasLineTerminator&&F==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(","),y=T?this.parseObjectPropertyKey():this.finalize(a,new u.Identifier(F))}else this.match("*")?this.nextToken():(E=this.match("["),y=this.parseObjectPropertyKey());var N=this.qualifiedPropertyName(this.lookahead);if(l.type===3&&!T&&l.value==="get"&&N)c="get",E=this.match("["),y=this.parseObjectPropertyKey(),this.context.allowYield=!1,S=this.parseGetterMethod();else if(l.type===3&&!T&&l.value==="set"&&N)c="set",E=this.match("["),y=this.parseObjectPropertyKey(),S=this.parseSetterMethod();else if(l.type===7&&l.value==="*"&&N)c="init",E=this.match("["),y=this.parseObjectPropertyKey(),S=this.parseGeneratorMethod(),D=!0;else if(y||this.throwUnexpectedToken(this.lookahead),c="init",this.match(":")&&!T)!E&&this.isPropertyKey(y,"__proto__")&&(s.value&&this.tolerateError(o.Messages.DuplicateProtoProperty),s.value=!0),this.nextToken(),S=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))S=T?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),D=!0;else if(l.type===3){var F=this.finalize(a,new u.Identifier(l.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),A=!0;var G=this.isolateCoverGrammar(this.parseAssignmentExpression);S=this.finalize(a,new u.AssignmentPattern(F,G))}else A=!0,S=F}else this.throwUnexpectedToken(this.nextToken());return this.finalize(a,new u.Property(c,y,E,S,D,A))},d.prototype.parseObjectInitializer=function(){var s=this.createNode();this.expect("{");for(var a=[],l={value:!1};!this.match("}");)a.push(this.parseObjectProperty(l)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(s,new u.ObjectExpression(a))},d.prototype.parseTemplateHead=function(){n.assert(this.lookahead.head,"Template literal must start with a template head");var s=this.createNode(),a=this.nextToken(),l=a.value,c=a.cooked;return this.finalize(s,new u.TemplateElement({raw:l,cooked:c},a.tail))},d.prototype.parseTemplateElement=function(){this.lookahead.type!==10&&this.throwUnexpectedToken();var s=this.createNode(),a=this.nextToken(),l=a.value,c=a.cooked;return this.finalize(s,new u.TemplateElement({raw:l,cooked:c},a.tail))},d.prototype.parseTemplateLiteral=function(){var s=this.createNode(),a=[],l=[],c=this.parseTemplateHead();for(l.push(c);!c.tail;)a.push(this.parseExpression()),c=this.parseTemplateElement(),l.push(c);return this.finalize(s,new u.TemplateLiteral(l,a))},d.prototype.reinterpretExpressionAsPattern=function(s){switch(s.type){case p.Syntax.Identifier:case p.Syntax.MemberExpression:case p.Syntax.RestElement:case p.Syntax.AssignmentPattern:break;case p.Syntax.SpreadElement:s.type=p.Syntax.RestElement,this.reinterpretExpressionAsPattern(s.argument);break;case p.Syntax.ArrayExpression:s.type=p.Syntax.ArrayPattern;for(var a=0;a<s.elements.length;a++)s.elements[a]!==null&&this.reinterpretExpressionAsPattern(s.elements[a]);break;case p.Syntax.ObjectExpression:s.type=p.Syntax.ObjectPattern;for(var a=0;a<s.properties.length;a++)this.reinterpretExpressionAsPattern(s.properties[a].value);break;case p.Syntax.AssignmentExpression:s.type=p.Syntax.AssignmentPattern,delete s.operator,this.reinterpretExpressionAsPattern(s.left);break;default:break}},d.prototype.parseGroupExpression=function(){var s;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),s={type:f,params:[],async:!1};else{var a=this.lookahead,l=[];if(this.match("..."))s=this.parseRestElement(l),this.expect(")"),this.match("=>")||this.expect("=>"),s={type:f,params:[s],async:!1};else{var c=!1;if(this.context.isBindingElement=!0,s=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var y=[];for(this.context.isAssignmentTarget=!1,y.push(s);this.lookahead.type!==2&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var S=0;S<y.length;S++)this.reinterpretExpressionAsPattern(y[S]);c=!0,s={type:f,params:y,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),y.push(this.parseRestElement(l)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(var S=0;S<y.length;S++)this.reinterpretExpressionAsPattern(y[S]);c=!0,s={type:f,params:y,async:!1}}else y.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(c)break}c||(s=this.finalize(this.startNode(a),new u.SequenceExpression(y)))}if(!c){if(this.expect(")"),this.match("=>")&&(s.type===p.Syntax.Identifier&&s.name==="yield"&&(c=!0,s={type:f,params:[s],async:!1}),!c)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),s.type===p.Syntax.SequenceExpression)for(var S=0;S<s.expressions.length;S++)this.reinterpretExpressionAsPattern(s.expressions[S]);else this.reinterpretExpressionAsPattern(s);var E=s.type===p.Syntax.SequenceExpression?s.expressions:[s];s={type:f,params:E,async:!1}}this.context.isBindingElement=!1}}}return s},d.prototype.parseArguments=function(){this.expect("(");var s=[];if(!this.match(")"))for(;;){var a=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(s.push(a),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),s},d.prototype.isIdentifierName=function(s){return s.type===3||s.type===4||s.type===1||s.type===5},d.prototype.parseIdentifierName=function(){var s=this.createNode(),a=this.nextToken();return this.isIdentifierName(a)||this.throwUnexpectedToken(a),this.finalize(s,new u.Identifier(a.value))},d.prototype.parseNewExpression=function(){var s=this.createNode(),a=this.parseIdentifierName();n.assert(a.name==="new","New expression must start with `new`");var l;if(this.match("."))if(this.nextToken(),this.lookahead.type===3&&this.context.inFunctionBody&&this.lookahead.value==="target"){var c=this.parseIdentifierName();l=new u.MetaProperty(a,c)}else this.throwUnexpectedToken(this.lookahead);else{var y=this.isolateCoverGrammar(this.parseLeftHandSideExpression),S=this.match("(")?this.parseArguments():[];l=new u.NewExpression(y,S),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(s,l)},d.prototype.parseAsyncArgument=function(){var s=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,s},d.prototype.parseAsyncArguments=function(){this.expect("(");var s=[];if(!this.match(")"))for(;;){var a=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(s.push(a),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),s},d.prototype.parseLeftHandSideExpressionAllowCall=function(){var s=this.lookahead,a=this.matchContextualKeyword("async"),l=this.context.allowIn;this.context.allowIn=!0;var c;for(this.matchKeyword("super")&&this.context.inFunctionBody?(c=this.createNode(),this.nextToken(),c=this.finalize(c,new u.Super),!this.match("(")&&!this.match(".")&&!this.match("[")&&this.throwUnexpectedToken(this.lookahead)):c=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var y=this.parseIdentifierName();c=this.finalize(this.startNode(s),new u.StaticMemberExpression(c,y))}else if(this.match("(")){var S=a&&s.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var E=S?this.parseAsyncArguments():this.parseArguments();if(c=this.finalize(this.startNode(s),new u.CallExpression(c,E)),S&&this.match("=>")){for(var D=0;D<E.length;++D)this.reinterpretExpressionAsPattern(E[D]);c={type:f,params:E,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var y=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),c=this.finalize(this.startNode(s),new u.ComputedMemberExpression(c,y))}else if(this.lookahead.type===10&&this.lookahead.head){var A=this.parseTemplateLiteral();c=this.finalize(this.startNode(s),new u.TaggedTemplateExpression(c,A))}else break;return this.context.allowIn=l,c},d.prototype.parseSuper=function(){var s=this.createNode();return this.expectKeyword("super"),!this.match("[")&&!this.match(".")&&this.throwUnexpectedToken(this.lookahead),this.finalize(s,new u.Super)},d.prototype.parseLeftHandSideExpression=function(){n.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var s=this.startNode(this.lookahead),a=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var l=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),a=this.finalize(s,new u.ComputedMemberExpression(a,l))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var l=this.parseIdentifierName();a=this.finalize(s,new u.StaticMemberExpression(a,l))}else if(this.lookahead.type===10&&this.lookahead.head){var c=this.parseTemplateLiteral();a=this.finalize(s,new u.TaggedTemplateExpression(a,c))}else break;return a},d.prototype.parseUpdateExpression=function(){var s,a=this.lookahead;if(this.match("++")||this.match("--")){var l=this.startNode(a),c=this.nextToken();s=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&s.type===p.Syntax.Identifier&&this.scanner.isRestrictedWord(s.name)&&this.tolerateError(o.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment);var y=!0;s=this.finalize(l,new u.UpdateExpression(c.value,s,y)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(s=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&this.lookahead.type===7&&(this.match("++")||this.match("--"))){this.context.strict&&s.type===p.Syntax.Identifier&&this.scanner.isRestrictedWord(s.name)&&this.tolerateError(o.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var S=this.nextToken().value,y=!1;s=this.finalize(this.startNode(a),new u.UpdateExpression(S,s,y))}return s},d.prototype.parseAwaitExpression=function(){var s=this.createNode();this.nextToken();var a=this.parseUnaryExpression();return this.finalize(s,new u.AwaitExpression(a))},d.prototype.parseUnaryExpression=function(){var s;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var a=this.startNode(this.lookahead),l=this.nextToken();s=this.inheritCoverGrammar(this.parseUnaryExpression),s=this.finalize(a,new u.UnaryExpression(l.value,s)),this.context.strict&&s.operator==="delete"&&s.argument.type===p.Syntax.Identifier&&this.tolerateError(o.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else this.context.await&&this.matchContextualKeyword("await")?s=this.parseAwaitExpression():s=this.parseUpdateExpression();return s},d.prototype.parseExponentiationExpression=function(){var s=this.lookahead,a=this.inheritCoverGrammar(this.parseUnaryExpression);if(a.type!==p.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var l=a,c=this.isolateCoverGrammar(this.parseExponentiationExpression);a=this.finalize(this.startNode(s),new u.BinaryExpression("**",l,c))}return a},d.prototype.binaryPrecedence=function(s){var a=s.value,l;return s.type===7?l=this.operatorPrecedence[a]||0:s.type===4?l=a==="instanceof"||this.context.allowIn&&a==="in"?7:0:l=0,l},d.prototype.parseBinaryExpression=function(){var s=this.lookahead,a=this.inheritCoverGrammar(this.parseExponentiationExpression),l=this.lookahead,c=this.binaryPrecedence(l);if(c>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var y=[s,this.lookahead],S=a,E=this.isolateCoverGrammar(this.parseExponentiationExpression),D=[S,l.value,E],A=[c];c=this.binaryPrecedence(this.lookahead),!(c<=0);){for(;D.length>2&&c<=A[A.length-1];){E=D.pop();var T=D.pop();A.pop(),S=D.pop(),y.pop();var F=this.startNode(y[y.length-1]);D.push(this.finalize(F,new u.BinaryExpression(T,S,E)))}D.push(this.nextToken().value),A.push(c),y.push(this.lookahead),D.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var N=D.length-1;a=D[N];for(var G=y.pop();N>1;){var H=y.pop(),z=G&&G.lineStart,F=this.startNode(H,z),T=D[N-1];a=this.finalize(F,new u.BinaryExpression(T,D[N-2],a)),N-=2,G=H}}return a},d.prototype.parseConditionalExpression=function(){var s=this.lookahead,a=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var l=this.context.allowIn;this.context.allowIn=!0;var c=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=l,this.expect(":");var y=this.isolateCoverGrammar(this.parseAssignmentExpression);a=this.finalize(this.startNode(s),new u.ConditionalExpression(a,c,y)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return a},d.prototype.checkPatternParam=function(s,a){switch(a.type){case p.Syntax.Identifier:this.validateParam(s,a,a.name);break;case p.Syntax.RestElement:this.checkPatternParam(s,a.argument);break;case p.Syntax.AssignmentPattern:this.checkPatternParam(s,a.left);break;case p.Syntax.ArrayPattern:for(var l=0;l<a.elements.length;l++)a.elements[l]!==null&&this.checkPatternParam(s,a.elements[l]);break;case p.Syntax.ObjectPattern:for(var l=0;l<a.properties.length;l++)this.checkPatternParam(s,a.properties[l].value);break;default:break}s.simple=s.simple&&a instanceof u.Identifier},d.prototype.reinterpretAsCoverFormalsList=function(s){var a=[s],l,c=!1;switch(s.type){case p.Syntax.Identifier:break;case f:a=s.params,c=s.async;break;default:return null}l={simple:!0,paramSet:{}};for(var y=0;y<a.length;++y){var S=a[y];S.type===p.Syntax.AssignmentPattern?S.right.type===p.Syntax.YieldExpression&&(S.right.argument&&this.throwUnexpectedToken(this.lookahead),S.right.type=p.Syntax.Identifier,S.right.name="yield",delete S.right.argument,delete S.right.delegate):c&&S.type===p.Syntax.Identifier&&S.name==="await"&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(l,S),a[y]=S}if(this.context.strict||!this.context.allowYield)for(var y=0;y<a.length;++y){var S=a[y];S.type===p.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(l.message===o.Messages.StrictParamDupe){var E=this.context.strict?l.stricted:l.firstRestricted;this.throwUnexpectedToken(E,l.message)}return{simple:l.simple,params:a,stricted:l.stricted,firstRestricted:l.firstRestricted,message:l.message}},d.prototype.parseAssignmentExpression=function(){var s;if(!this.context.allowYield&&this.matchKeyword("yield"))s=this.parseYieldExpression();else{var a=this.lookahead,l=a;if(s=this.parseConditionalExpression(),l.type===3&&l.lineNumber===this.lookahead.lineNumber&&l.value==="async"&&(this.lookahead.type===3||this.matchKeyword("yield"))){var c=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(c),s={type:f,params:[c],async:!0}}if(s.type===f||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var y=s.async,S=this.reinterpretAsCoverFormalsList(s);if(S){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var E=this.context.strict,D=this.context.allowStrictDirective;this.context.allowStrictDirective=S.simple;var A=this.context.allowYield,T=this.context.await;this.context.allowYield=!0,this.context.await=y;var F=this.startNode(a);this.expect("=>");var N=void 0;if(this.match("{")){var G=this.context.allowIn;this.context.allowIn=!0,N=this.parseFunctionSourceElements(),this.context.allowIn=G}else N=this.isolateCoverGrammar(this.parseAssignmentExpression);var H=N.type!==p.Syntax.BlockStatement;this.context.strict&&S.firstRestricted&&this.throwUnexpectedToken(S.firstRestricted,S.message),this.context.strict&&S.stricted&&this.tolerateUnexpectedToken(S.stricted,S.message),s=y?this.finalize(F,new u.AsyncArrowFunctionExpression(S.params,N,H)):this.finalize(F,new u.ArrowFunctionExpression(S.params,N,H)),this.context.strict=E,this.context.allowStrictDirective=D,this.context.allowYield=A,this.context.await=T}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.strict&&s.type===p.Syntax.Identifier){var z=s;this.scanner.isRestrictedWord(z.name)&&this.tolerateUnexpectedToken(l,o.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(z.name)&&this.tolerateUnexpectedToken(l,o.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(s):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),l=this.nextToken();var Ae=l.value,Be=this.isolateCoverGrammar(this.parseAssignmentExpression);s=this.finalize(this.startNode(a),new u.AssignmentExpression(Ae,s,Be)),this.context.firstCoverInitializedNameError=null}}return s},d.prototype.parseExpression=function(){var s=this.lookahead,a=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var l=[];for(l.push(a);this.lookahead.type!==2&&this.match(",");)this.nextToken(),l.push(this.isolateCoverGrammar(this.parseAssignmentExpression));a=this.finalize(this.startNode(s),new u.SequenceExpression(l))}return a},d.prototype.parseStatementListItem=function(){var s;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,this.lookahead.type===4)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalExportDeclaration),s=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalImportDeclaration),s=this.parseImportDeclaration();break;case"const":s=this.parseLexicalDeclaration({inFor:!1});break;case"function":s=this.parseFunctionDeclaration();break;case"class":s=this.parseClassDeclaration();break;case"let":s=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:s=this.parseStatement();break}else s=this.parseStatement();return s},d.prototype.parseBlock=function(){var s=this.createNode();this.expect("{");for(var a=[];!this.match("}");)a.push(this.parseStatementListItem());return this.expect("}"),this.finalize(s,new u.BlockStatement(a))},d.prototype.parseLexicalBinding=function(s,a){var l=this.createNode(),c=[],y=this.parsePattern(c,s);this.context.strict&&y.type===p.Syntax.Identifier&&this.scanner.isRestrictedWord(y.name)&&this.tolerateError(o.Messages.StrictVarName);var S=null;return s==="const"?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),S=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(o.Messages.DeclarationMissingInitializer,"const")):(!a.inFor&&y.type!==p.Syntax.Identifier||this.match("="))&&(this.expect("="),S=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(l,new u.VariableDeclarator(y,S))},d.prototype.parseBindingList=function(s,a){for(var l=[this.parseLexicalBinding(s,a)];this.match(",");)this.nextToken(),l.push(this.parseLexicalBinding(s,a));return l},d.prototype.isLexicalDeclaration=function(){var s=this.scanner.saveState();this.scanner.scanComments();var a=this.scanner.lex();return this.scanner.restoreState(s),a.type===3||a.type===7&&a.value==="["||a.type===7&&a.value==="{"||a.type===4&&a.value==="let"||a.type===4&&a.value==="yield"},d.prototype.parseLexicalDeclaration=function(s){var a=this.createNode(),l=this.nextToken().value;n.assert(l==="let"||l==="const","Lexical declaration must be either let or const");var c=this.parseBindingList(l,s);return this.consumeSemicolon(),this.finalize(a,new u.VariableDeclaration(c,l))},d.prototype.parseBindingRestElement=function(s,a){var l=this.createNode();this.expect("...");var c=this.parsePattern(s,a);return this.finalize(l,new u.RestElement(c))},d.prototype.parseArrayPattern=function(s,a){var l=this.createNode();this.expect("[");for(var c=[];!this.match("]");)if(this.match(","))this.nextToken(),c.push(null);else{if(this.match("...")){c.push(this.parseBindingRestElement(s,a));break}else c.push(this.parsePatternWithDefault(s,a));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(l,new u.ArrayPattern(c))},d.prototype.parsePropertyPattern=function(s,a){var l=this.createNode(),c=!1,y=!1,S=!1,E,D;if(this.lookahead.type===3){var A=this.lookahead;E=this.parseVariableIdentifier();var T=this.finalize(l,new u.Identifier(A.value));if(this.match("=")){s.push(A),y=!0,this.nextToken();var F=this.parseAssignmentExpression();D=this.finalize(this.startNode(A),new u.AssignmentPattern(T,F))}else this.match(":")?(this.expect(":"),D=this.parsePatternWithDefault(s,a)):(s.push(A),y=!0,D=T)}else c=this.match("["),E=this.parseObjectPropertyKey(),this.expect(":"),D=this.parsePatternWithDefault(s,a);return this.finalize(l,new u.Property("init",E,c,D,S,y))},d.prototype.parseObjectPattern=function(s,a){var l=this.createNode(),c=[];for(this.expect("{");!this.match("}");)c.push(this.parsePropertyPattern(s,a)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(l,new u.ObjectPattern(c))},d.prototype.parsePattern=function(s,a){var l;return this.match("[")?l=this.parseArrayPattern(s,a):this.match("{")?l=this.parseObjectPattern(s,a):(this.matchKeyword("let")&&(a==="const"||a==="let")&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.LetInLexicalBinding),s.push(this.lookahead),l=this.parseVariableIdentifier(a)),l},d.prototype.parsePatternWithDefault=function(s,a){var l=this.lookahead,c=this.parsePattern(s,a);if(this.match("=")){this.nextToken();var y=this.context.allowYield;this.context.allowYield=!0;var S=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=y,c=this.finalize(this.startNode(l),new u.AssignmentPattern(c,S))}return c},d.prototype.parseVariableIdentifier=function(s){var a=this.createNode(),l=this.nextToken();return l.type===4&&l.value==="yield"?this.context.strict?this.tolerateUnexpectedToken(l,o.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(l):l.type!==3?this.context.strict&&l.type===4&&this.scanner.isStrictModeReservedWord(l.value)?this.tolerateUnexpectedToken(l,o.Messages.StrictReservedWord):(this.context.strict||l.value!=="let"||s!=="var")&&this.throwUnexpectedToken(l):(this.context.isModule||this.context.await)&&l.type===3&&l.value==="await"&&this.tolerateUnexpectedToken(l),this.finalize(a,new u.Identifier(l.value))},d.prototype.parseVariableDeclaration=function(s){var a=this.createNode(),l=[],c=this.parsePattern(l,"var");this.context.strict&&c.type===p.Syntax.Identifier&&this.scanner.isRestrictedWord(c.name)&&this.tolerateError(o.Messages.StrictVarName);var y=null;return this.match("=")?(this.nextToken(),y=this.isolateCoverGrammar(this.parseAssignmentExpression)):c.type!==p.Syntax.Identifier&&!s.inFor&&this.expect("="),this.finalize(a,new u.VariableDeclarator(c,y))},d.prototype.parseVariableDeclarationList=function(s){var a={inFor:s.inFor},l=[];for(l.push(this.parseVariableDeclaration(a));this.match(",");)this.nextToken(),l.push(this.parseVariableDeclaration(a));return l},d.prototype.parseVariableStatement=function(){var s=this.createNode();this.expectKeyword("var");var a=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(s,new u.VariableDeclaration(a,"var"))},d.prototype.parseEmptyStatement=function(){var s=this.createNode();return this.expect(";"),this.finalize(s,new u.EmptyStatement)},d.prototype.parseExpressionStatement=function(){var s=this.createNode(),a=this.parseExpression();return this.consumeSemicolon(),this.finalize(s,new u.ExpressionStatement(a))},d.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(o.Messages.StrictFunction),this.parseStatement()},d.prototype.parseIfStatement=function(){var s=this.createNode(),a,l=null;this.expectKeyword("if"),this.expect("(");var c=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),a=this.finalize(this.createNode(),new u.EmptyStatement)):(this.expect(")"),a=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),l=this.parseIfClause())),this.finalize(s,new u.IfStatement(c,a,l))},d.prototype.parseDoWhileStatement=function(){var s=this.createNode();this.expectKeyword("do");var a=this.context.inIteration;this.context.inIteration=!0;var l=this.parseStatement();this.context.inIteration=a,this.expectKeyword("while"),this.expect("(");var c=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(s,new u.DoWhileStatement(l,c))},d.prototype.parseWhileStatement=function(){var s=this.createNode(),a;this.expectKeyword("while"),this.expect("(");var l=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),a=this.finalize(this.createNode(),new u.EmptyStatement);else{this.expect(")");var c=this.context.inIteration;this.context.inIteration=!0,a=this.parseStatement(),this.context.inIteration=c}return this.finalize(s,new u.WhileStatement(l,a))},d.prototype.parseForStatement=function(){var s=null,a=null,l=null,c=!0,y,S,E=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){s=this.createNode(),this.nextToken();var D=this.context.allowIn;this.context.allowIn=!1;var A=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=D,A.length===1&&this.matchKeyword("in")){var T=A[0];T.init&&(T.id.type===p.Syntax.ArrayPattern||T.id.type===p.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(o.Messages.ForInOfLoopInitializer,"for-in"),s=this.finalize(s,new u.VariableDeclaration(A,"var")),this.nextToken(),y=s,S=this.parseExpression(),s=null}else A.length===1&&A[0].init===null&&this.matchContextualKeyword("of")?(s=this.finalize(s,new u.VariableDeclaration(A,"var")),this.nextToken(),y=s,S=this.parseAssignmentExpression(),s=null,c=!1):(s=this.finalize(s,new u.VariableDeclaration(A,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){s=this.createNode();var F=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in")s=this.finalize(s,new u.Identifier(F)),this.nextToken(),y=s,S=this.parseExpression(),s=null;else{var D=this.context.allowIn;this.context.allowIn=!1;var A=this.parseBindingList(F,{inFor:!0});this.context.allowIn=D,A.length===1&&A[0].init===null&&this.matchKeyword("in")?(s=this.finalize(s,new u.VariableDeclaration(A,F)),this.nextToken(),y=s,S=this.parseExpression(),s=null):A.length===1&&A[0].init===null&&this.matchContextualKeyword("of")?(s=this.finalize(s,new u.VariableDeclaration(A,F)),this.nextToken(),y=s,S=this.parseAssignmentExpression(),s=null,c=!1):(this.consumeSemicolon(),s=this.finalize(s,new u.VariableDeclaration(A,F)))}}else{var N=this.lookahead,D=this.context.allowIn;if(this.context.allowIn=!1,s=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=D,this.matchKeyword("in"))(!this.context.isAssignmentTarget||s.type===p.Syntax.AssignmentExpression)&&this.tolerateError(o.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(s),y=s,S=this.parseExpression(),s=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||s.type===p.Syntax.AssignmentExpression)&&this.tolerateError(o.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(s),y=s,S=this.parseAssignmentExpression(),s=null,c=!1;else{if(this.match(",")){for(var G=[s];this.match(",");)this.nextToken(),G.push(this.isolateCoverGrammar(this.parseAssignmentExpression));s=this.finalize(this.startNode(N),new u.SequenceExpression(G))}this.expect(";")}}typeof y>"u"&&(this.match(";")||(a=this.parseExpression()),this.expect(";"),this.match(")")||(l=this.parseExpression()));var H;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),H=this.finalize(this.createNode(),new u.EmptyStatement);else{this.expect(")");var z=this.context.inIteration;this.context.inIteration=!0,H=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=z}return typeof y>"u"?this.finalize(E,new u.ForStatement(s,a,l,H)):c?this.finalize(E,new u.ForInStatement(y,S,H)):this.finalize(E,new u.ForOfStatement(y,S,H))},d.prototype.parseContinueStatement=function(){var s=this.createNode();this.expectKeyword("continue");var a=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var l=this.parseVariableIdentifier();a=l;var c="$"+l.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,c)||this.throwError(o.Messages.UnknownLabel,l.name)}return this.consumeSemicolon(),a===null&&!this.context.inIteration&&this.throwError(o.Messages.IllegalContinue),this.finalize(s,new u.ContinueStatement(a))},d.prototype.parseBreakStatement=function(){var s=this.createNode();this.expectKeyword("break");var a=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var l=this.parseVariableIdentifier(),c="$"+l.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,c)||this.throwError(o.Messages.UnknownLabel,l.name),a=l}return this.consumeSemicolon(),a===null&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(o.Messages.IllegalBreak),this.finalize(s,new u.BreakStatement(a))},d.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(o.Messages.IllegalReturn);var s=this.createNode();this.expectKeyword("return");var a=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10,l=a?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(s,new u.ReturnStatement(l))},d.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(o.Messages.StrictModeWith);var s=this.createNode(),a;this.expectKeyword("with"),this.expect("(");var l=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),a=this.finalize(this.createNode(),new u.EmptyStatement)):(this.expect(")"),a=this.parseStatement()),this.finalize(s,new u.WithStatement(l,a))},d.prototype.parseSwitchCase=function(){var s=this.createNode(),a;this.matchKeyword("default")?(this.nextToken(),a=null):(this.expectKeyword("case"),a=this.parseExpression()),this.expect(":");for(var l=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)l.push(this.parseStatementListItem());return this.finalize(s,new u.SwitchCase(a,l))},d.prototype.parseSwitchStatement=function(){var s=this.createNode();this.expectKeyword("switch"),this.expect("(");var a=this.parseExpression();this.expect(")");var l=this.context.inSwitch;this.context.inSwitch=!0;var c=[],y=!1;for(this.expect("{");!this.match("}");){var S=this.parseSwitchCase();S.test===null&&(y&&this.throwError(o.Messages.MultipleDefaultsInSwitch),y=!0),c.push(S)}return this.expect("}"),this.context.inSwitch=l,this.finalize(s,new u.SwitchStatement(a,c))},d.prototype.parseLabelledStatement=function(){var s=this.createNode(),a=this.parseExpression(),l;if(a.type===p.Syntax.Identifier&&this.match(":")){this.nextToken();var c=a,y="$"+c.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,y)&&this.throwError(o.Messages.Redeclaration,"Label",c.name),this.context.labelSet[y]=!0;var S=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),S=this.parseClassDeclaration();else if(this.matchKeyword("function")){var E=this.lookahead,D=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(E,o.Messages.StrictFunction):D.generator&&this.tolerateUnexpectedToken(E,o.Messages.GeneratorInLegacyContext),S=D}else S=this.parseStatement();delete this.context.labelSet[y],l=new u.LabeledStatement(c,S)}else this.consumeSemicolon(),l=new u.ExpressionStatement(a);return this.finalize(s,l)},d.prototype.parseThrowStatement=function(){var s=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(o.Messages.NewlineAfterThrow);var a=this.parseExpression();return this.consumeSemicolon(),this.finalize(s,new u.ThrowStatement(a))},d.prototype.parseCatchClause=function(){var s=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var a=[],l=this.parsePattern(a),c={},y=0;y<a.length;y++){var S="$"+a[y].value;Object.prototype.hasOwnProperty.call(c,S)&&this.tolerateError(o.Messages.DuplicateBinding,a[y].value),c[S]=!0}this.context.strict&&l.type===p.Syntax.Identifier&&this.scanner.isRestrictedWord(l.name)&&this.tolerateError(o.Messages.StrictCatchVariable),this.expect(")");var E=this.parseBlock();return this.finalize(s,new u.CatchClause(l,E))},d.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},d.prototype.parseTryStatement=function(){var s=this.createNode();this.expectKeyword("try");var a=this.parseBlock(),l=this.matchKeyword("catch")?this.parseCatchClause():null,c=this.matchKeyword("finally")?this.parseFinallyClause():null;return!l&&!c&&this.throwError(o.Messages.NoCatchOrFinally),this.finalize(s,new u.TryStatement(a,l,c))},d.prototype.parseDebuggerStatement=function(){var s=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(s,new u.DebuggerStatement)},d.prototype.parseStatement=function(){var s;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:s=this.parseExpressionStatement();break;case 7:var a=this.lookahead.value;a==="{"?s=this.parseBlock():a==="("?s=this.parseExpressionStatement():a===";"?s=this.parseEmptyStatement():s=this.parseExpressionStatement();break;case 3:s=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":s=this.parseBreakStatement();break;case"continue":s=this.parseContinueStatement();break;case"debugger":s=this.parseDebuggerStatement();break;case"do":s=this.parseDoWhileStatement();break;case"for":s=this.parseForStatement();break;case"function":s=this.parseFunctionDeclaration();break;case"if":s=this.parseIfStatement();break;case"return":s=this.parseReturnStatement();break;case"switch":s=this.parseSwitchStatement();break;case"throw":s=this.parseThrowStatement();break;case"try":s=this.parseTryStatement();break;case"var":s=this.parseVariableStatement();break;case"while":s=this.parseWhileStatement();break;case"with":s=this.parseWithStatement();break;default:s=this.parseExpressionStatement();break}break;default:s=this.throwUnexpectedToken(this.lookahead)}return s},d.prototype.parseFunctionSourceElements=function(){var s=this.createNode();this.expect("{");var a=this.parseDirectivePrologues(),l=this.context.labelSet,c=this.context.inIteration,y=this.context.inSwitch,S=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;this.lookahead.type!==2&&!this.match("}");)a.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=l,this.context.inIteration=c,this.context.inSwitch=y,this.context.inFunctionBody=S,this.finalize(s,new u.BlockStatement(a))},d.prototype.validateParam=function(s,a,l){var c="$"+l;this.context.strict?(this.scanner.isRestrictedWord(l)&&(s.stricted=a,s.message=o.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(s.paramSet,c)&&(s.stricted=a,s.message=o.Messages.StrictParamDupe)):s.firstRestricted||(this.scanner.isRestrictedWord(l)?(s.firstRestricted=a,s.message=o.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(l)?(s.firstRestricted=a,s.message=o.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(s.paramSet,c)&&(s.stricted=a,s.message=o.Messages.StrictParamDupe)),typeof Object.defineProperty=="function"?Object.defineProperty(s.paramSet,c,{value:!0,enumerable:!0,writable:!0,configurable:!0}):s.paramSet[c]=!0},d.prototype.parseRestElement=function(s){var a=this.createNode();this.expect("...");var l=this.parsePattern(s);return this.match("=")&&this.throwError(o.Messages.DefaultRestParameter),this.match(")")||this.throwError(o.Messages.ParameterAfterRestParameter),this.finalize(a,new u.RestElement(l))},d.prototype.parseFormalParameter=function(s){for(var a=[],l=this.match("...")?this.parseRestElement(a):this.parsePatternWithDefault(a),c=0;c<a.length;c++)this.validateParam(s,a[c],a[c].value);s.simple=s.simple&&l instanceof u.Identifier,s.params.push(l)},d.prototype.parseFormalParameters=function(s){var a;if(a={simple:!0,params:[],firstRestricted:s},this.expect("("),!this.match(")"))for(a.paramSet={};this.lookahead.type!==2&&(this.parseFormalParameter(a),!(this.match(")")||(this.expect(","),this.match(")")))););return this.expect(")"),{simple:a.simple,params:a.params,stricted:a.stricted,firstRestricted:a.firstRestricted,message:a.message}},d.prototype.matchAsyncFunction=function(){var s=this.matchContextualKeyword("async");if(s){var a=this.scanner.saveState();this.scanner.scanComments();var l=this.scanner.lex();this.scanner.restoreState(a),s=a.lineNumber===l.lineNumber&&l.type===4&&l.value==="function"}return s},d.prototype.parseFunctionDeclaration=function(s){var a=this.createNode(),l=this.matchContextualKeyword("async");l&&this.nextToken(),this.expectKeyword("function");var c=l?!1:this.match("*");c&&this.nextToken();var y,S=null,E=null;if(!s||!this.match("(")){var D=this.lookahead;S=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(D.value)&&this.tolerateUnexpectedToken(D,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(D.value)?(E=D,y=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(D.value)&&(E=D,y=o.Messages.StrictReservedWord)}var A=this.context.await,T=this.context.allowYield;this.context.await=l,this.context.allowYield=!c;var F=this.parseFormalParameters(E),N=F.params,G=F.stricted;E=F.firstRestricted,F.message&&(y=F.message);var H=this.context.strict,z=this.context.allowStrictDirective;this.context.allowStrictDirective=F.simple;var Ae=this.parseFunctionSourceElements();return this.context.strict&&E&&this.throwUnexpectedToken(E,y),this.context.strict&&G&&this.tolerateUnexpectedToken(G,y),this.context.strict=H,this.context.allowStrictDirective=z,this.context.await=A,this.context.allowYield=T,l?this.finalize(a,new u.AsyncFunctionDeclaration(S,N,Ae)):this.finalize(a,new u.FunctionDeclaration(S,N,Ae,c))},d.prototype.parseFunctionExpression=function(){var s=this.createNode(),a=this.matchContextualKeyword("async");a&&this.nextToken(),this.expectKeyword("function");var l=a?!1:this.match("*");l&&this.nextToken();var c,y=null,S,E=this.context.await,D=this.context.allowYield;if(this.context.await=a,this.context.allowYield=!l,!this.match("(")){var A=this.lookahead;y=!this.context.strict&&!l&&this.matchKeyword("yield")?this.parseIdentifierName():this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(A.value)&&this.tolerateUnexpectedToken(A,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(A.value)?(S=A,c=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(A.value)&&(S=A,c=o.Messages.StrictReservedWord)}var T=this.parseFormalParameters(S),F=T.params,N=T.stricted;S=T.firstRestricted,T.message&&(c=T.message);var G=this.context.strict,H=this.context.allowStrictDirective;this.context.allowStrictDirective=T.simple;var z=this.parseFunctionSourceElements();return this.context.strict&&S&&this.throwUnexpectedToken(S,c),this.context.strict&&N&&this.tolerateUnexpectedToken(N,c),this.context.strict=G,this.context.allowStrictDirective=H,this.context.await=E,this.context.allowYield=D,a?this.finalize(s,new u.AsyncFunctionExpression(y,F,z)):this.finalize(s,new u.FunctionExpression(y,F,z,l))},d.prototype.parseDirective=function(){var s=this.lookahead,a=this.createNode(),l=this.parseExpression(),c=l.type===p.Syntax.Literal?this.getTokenRaw(s).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(a,c?new u.Directive(l,c):new u.ExpressionStatement(l))},d.prototype.parseDirectivePrologues=function(){for(var s=null,a=[];;){var l=this.lookahead;if(l.type!==8)break;var c=this.parseDirective();a.push(c);var y=c.directive;if(typeof y!="string")break;y==="use strict"?(this.context.strict=!0,s&&this.tolerateUnexpectedToken(s,o.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(l,o.Messages.IllegalLanguageModeDirective)):!s&&l.octal&&(s=l)}return a},d.prototype.qualifiedPropertyName=function(s){switch(s.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return s.value==="[";default:break}return!1},d.prototype.parseGetterMethod=function(){var s=this.createNode(),a=!1,l=this.context.allowYield;this.context.allowYield=!a;var c=this.parseFormalParameters();c.params.length>0&&this.tolerateError(o.Messages.BadGetterArity);var y=this.parsePropertyMethod(c);return this.context.allowYield=l,this.finalize(s,new u.FunctionExpression(null,c.params,y,a))},d.prototype.parseSetterMethod=function(){var s=this.createNode(),a=!1,l=this.context.allowYield;this.context.allowYield=!a;var c=this.parseFormalParameters();c.params.length!==1?this.tolerateError(o.Messages.BadSetterArity):c.params[0]instanceof u.RestElement&&this.tolerateError(o.Messages.BadSetterRestParameter);var y=this.parsePropertyMethod(c);return this.context.allowYield=l,this.finalize(s,new u.FunctionExpression(null,c.params,y,a))},d.prototype.parseGeneratorMethod=function(){var s=this.createNode(),a=!0,l=this.context.allowYield;this.context.allowYield=!0;var c=this.parseFormalParameters();this.context.allowYield=!1;var y=this.parsePropertyMethod(c);return this.context.allowYield=l,this.finalize(s,new u.FunctionExpression(null,c.params,y,a))},d.prototype.isStartOfExpression=function(){var s=!0,a=this.lookahead.value;switch(this.lookahead.type){case 7:s=a==="["||a==="("||a==="{"||a==="+"||a==="-"||a==="!"||a==="~"||a==="++"||a==="--"||a==="/"||a==="/=";break;case 4:s=a==="class"||a==="delete"||a==="function"||a==="let"||a==="new"||a==="super"||a==="this"||a==="typeof"||a==="void"||a==="yield";break;default:break}return s},d.prototype.parseYieldExpression=function(){var s=this.createNode();this.expectKeyword("yield");var a=null,l=!1;if(!this.hasLineTerminator){var c=this.context.allowYield;this.context.allowYield=!1,l=this.match("*"),l?(this.nextToken(),a=this.parseAssignmentExpression()):this.isStartOfExpression()&&(a=this.parseAssignmentExpression()),this.context.allowYield=c}return this.finalize(s,new u.YieldExpression(a,l))},d.prototype.parseClassElement=function(s){var a=this.lookahead,l=this.createNode(),c="",y=null,S=null,E=!1,D=!1,A=!1,T=!1;if(this.match("*"))this.nextToken();else{E=this.match("["),y=this.parseObjectPropertyKey();var F=y;if(F.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(a=this.lookahead,A=!0,E=this.match("["),this.match("*")?this.nextToken():y=this.parseObjectPropertyKey()),a.type===3&&!this.hasLineTerminator&&a.value==="async"){var N=this.lookahead.value;N!==":"&&N!=="("&&N!=="*"&&(T=!0,a=this.lookahead,y=this.parseObjectPropertyKey(),a.type===3&&a.value==="constructor"&&this.tolerateUnexpectedToken(a,o.Messages.ConstructorIsAsync))}}var G=this.qualifiedPropertyName(this.lookahead);return a.type===3?a.value==="get"&&G?(c="get",E=this.match("["),y=this.parseObjectPropertyKey(),this.context.allowYield=!1,S=this.parseGetterMethod()):a.value==="set"&&G&&(c="set",E=this.match("["),y=this.parseObjectPropertyKey(),S=this.parseSetterMethod()):a.type===7&&a.value==="*"&&G&&(c="init",E=this.match("["),y=this.parseObjectPropertyKey(),S=this.parseGeneratorMethod(),D=!0),!c&&y&&this.match("(")&&(c="init",S=T?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),D=!0),c||this.throwUnexpectedToken(this.lookahead),c==="init"&&(c="method"),E||(A&&this.isPropertyKey(y,"prototype")&&this.throwUnexpectedToken(a,o.Messages.StaticPrototype),!A&&this.isPropertyKey(y,"constructor")&&((c!=="method"||!D||S&&S.generator)&&this.throwUnexpectedToken(a,o.Messages.ConstructorSpecialMethod),s.value?this.throwUnexpectedToken(a,o.Messages.DuplicateConstructor):s.value=!0,c="constructor")),this.finalize(l,new u.MethodDefinition(y,E,S,c,A))},d.prototype.parseClassElementList=function(){var s=[],a={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():s.push(this.parseClassElement(a));return this.expect("}"),s},d.prototype.parseClassBody=function(){var s=this.createNode(),a=this.parseClassElementList();return this.finalize(s,new u.ClassBody(a))},d.prototype.parseClassDeclaration=function(s){var a=this.createNode(),l=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var c=s&&this.lookahead.type!==3?null:this.parseVariableIdentifier(),y=null;this.matchKeyword("extends")&&(this.nextToken(),y=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var S=this.parseClassBody();return this.context.strict=l,this.finalize(a,new u.ClassDeclaration(c,y,S))},d.prototype.parseClassExpression=function(){var s=this.createNode(),a=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var l=this.lookahead.type===3?this.parseVariableIdentifier():null,c=null;this.matchKeyword("extends")&&(this.nextToken(),c=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var y=this.parseClassBody();return this.context.strict=a,this.finalize(s,new u.ClassExpression(l,c,y))},d.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var s=this.createNode(),a=this.parseDirectivePrologues();this.lookahead.type!==2;)a.push(this.parseStatementListItem());return this.finalize(s,new u.Module(a))},d.prototype.parseScript=function(){for(var s=this.createNode(),a=this.parseDirectivePrologues();this.lookahead.type!==2;)a.push(this.parseStatementListItem());return this.finalize(s,new u.Script(a))},d.prototype.parseModuleSpecifier=function(){var s=this.createNode();this.lookahead.type!==8&&this.throwError(o.Messages.InvalidModuleSpecifier);var a=this.nextToken(),l=this.getTokenRaw(a);return this.finalize(s,new u.Literal(a.value,l))},d.prototype.parseImportSpecifier=function(){var s=this.createNode(),a,l;return this.lookahead.type===3?(a=this.parseVariableIdentifier(),l=a,this.matchContextualKeyword("as")&&(this.nextToken(),l=this.parseVariableIdentifier())):(a=this.parseIdentifierName(),l=a,this.matchContextualKeyword("as")?(this.nextToken(),l=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(s,new u.ImportSpecifier(l,a))},d.prototype.parseNamedImports=function(){this.expect("{");for(var s=[];!this.match("}");)s.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),s},d.prototype.parseImportDefaultSpecifier=function(){var s=this.createNode(),a=this.parseIdentifierName();return this.finalize(s,new u.ImportDefaultSpecifier(a))},d.prototype.parseImportNamespaceSpecifier=function(){var s=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(o.Messages.NoAsAfterImportNamespace),this.nextToken();var a=this.parseIdentifierName();return this.finalize(s,new u.ImportNamespaceSpecifier(a))},d.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalImportDeclaration);var s=this.createNode();this.expectKeyword("import");var a,l=[];if(this.lookahead.type===8)a=this.parseModuleSpecifier();else{if(this.match("{")?l=l.concat(this.parseNamedImports()):this.match("*")?l.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(l.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?l.push(this.parseImportNamespaceSpecifier()):this.match("{")?l=l.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var c=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(c,this.lookahead.value)}this.nextToken(),a=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(s,new u.ImportDeclaration(l,a))},d.prototype.parseExportSpecifier=function(){var s=this.createNode(),a=this.parseIdentifierName(),l=a;return this.matchContextualKeyword("as")&&(this.nextToken(),l=this.parseIdentifierName()),this.finalize(s,new u.ExportSpecifier(a,l))},d.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalExportDeclaration);var s=this.createNode();this.expectKeyword("export");var a;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var l=this.parseFunctionDeclaration(!0);a=this.finalize(s,new u.ExportDefaultDeclaration(l))}else if(this.matchKeyword("class")){var l=this.parseClassDeclaration(!0);a=this.finalize(s,new u.ExportDefaultDeclaration(l))}else if(this.matchContextualKeyword("async")){var l=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();a=this.finalize(s,new u.ExportDefaultDeclaration(l))}else{this.matchContextualKeyword("from")&&this.throwError(o.Messages.UnexpectedToken,this.lookahead.value);var l=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),a=this.finalize(s,new u.ExportDefaultDeclaration(l))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var c=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(c,this.lookahead.value)}this.nextToken();var y=this.parseModuleSpecifier();this.consumeSemicolon(),a=this.finalize(s,new u.ExportAllDeclaration(y))}else if(this.lookahead.type===4){var l=void 0;switch(this.lookahead.value){case"let":case"const":l=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":l=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}a=this.finalize(s,new u.ExportNamedDeclaration(l,[],null))}else if(this.matchAsyncFunction()){var l=this.parseFunctionDeclaration();a=this.finalize(s,new u.ExportNamedDeclaration(l,[],null))}else{var S=[],E=null,D=!1;for(this.expect("{");!this.match("}");)D=D||this.matchKeyword("default"),S.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),E=this.parseModuleSpecifier(),this.consumeSemicolon();else if(D){var c=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(c,this.lookahead.value)}else this.consumeSemicolon();a=this.finalize(s,new u.ExportNamedDeclaration(null,S,E))}return a},d}();t.Parser=m},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(n,i){if(!n)throw new Error("ASSERT: "+i)}t.assert=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function n(){this.errors=[],this.tolerant=!1}return n.prototype.recordError=function(i){this.errors.push(i)},n.prototype.tolerate=function(i){if(this.tolerant)this.recordError(i);else throw i},n.prototype.constructError=function(i,o){var u=new Error(i);try{throw u}catch(h){Object.create&&Object.defineProperty&&(u=Object.create(h),Object.defineProperty(u,"column",{value:o}))}return u},n.prototype.createError=function(i,o,u,h){var p="Line "+o+": "+h,g=this.constructError(p,u);return g.index=i,g.lineNumber=o,g.description=h,g},n.prototype.throwError=function(i,o,u,h){throw this.createError(i,o,u,h)},n.prototype.tolerateError=function(i,o,u,h){var p=this.createError(i,o,u,h);if(this.tolerant)this.recordError(p);else throw p},n}();t.ErrorHandler=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9),i=r(4),o=r(11);function u(g){return"0123456789abcdef".indexOf(g.toLowerCase())}function h(g){return"01234567".indexOf(g)}var p=function(){function g(f,m){this.source=f,this.errorHandler=m,this.trackComment=!1,this.isModule=!1,this.length=f.length,this.index=0,this.lineNumber=f.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return g.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},g.prototype.restoreState=function(f){this.index=f.index,this.lineNumber=f.lineNumber,this.lineStart=f.lineStart},g.prototype.eof=function(){return this.index>=this.length},g.prototype.throwUnexpectedToken=function(f){return f===void 0&&(f=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,f)},g.prototype.tolerateUnexpectedToken=function(f){f===void 0&&(f=o.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,f)},g.prototype.skipSingleLineComment=function(f){var m=[],d,s;for(this.trackComment&&(m=[],d=this.index-f,s={start:{line:this.lineNumber,column:this.index-this.lineStart-f},end:{}});!this.eof();){var a=this.source.charCodeAt(this.index);if(++this.index,i.Character.isLineTerminator(a)){if(this.trackComment){s.end={line:this.lineNumber,column:this.index-this.lineStart-1};var l={multiLine:!1,slice:[d+f,this.index-1],range:[d,this.index-1],loc:s};m.push(l)}return a===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,m}}if(this.trackComment){s.end={line:this.lineNumber,column:this.index-this.lineStart};var l={multiLine:!1,slice:[d+f,this.index],range:[d,this.index],loc:s};m.push(l)}return m},g.prototype.skipMultiLineComment=function(){var f=[],m,d;for(this.trackComment&&(f=[],m=this.index-2,d={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var s=this.source.charCodeAt(this.index);if(i.Character.isLineTerminator(s))s===13&&this.source.charCodeAt(this.index+1)===10&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(s===42){if(this.source.charCodeAt(this.index+1)===47){if(this.index+=2,this.trackComment){d.end={line:this.lineNumber,column:this.index-this.lineStart};var a={multiLine:!0,slice:[m+2,this.index-2],range:[m,this.index],loc:d};f.push(a)}return f}++this.index}else++this.index}if(this.trackComment){d.end={line:this.lineNumber,column:this.index-this.lineStart};var a={multiLine:!0,slice:[m+2,this.index],range:[m,this.index],loc:d};f.push(a)}return this.tolerateUnexpectedToken(),f},g.prototype.scanComments=function(){var f;this.trackComment&&(f=[]);for(var m=this.index===0;!this.eof();){var d=this.source.charCodeAt(this.index);if(i.Character.isWhiteSpace(d))++this.index;else if(i.Character.isLineTerminator(d))++this.index,d===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,m=!0;else if(d===47)if(d=this.source.charCodeAt(this.index+1),d===47){this.index+=2;var s=this.skipSingleLineComment(2);this.trackComment&&(f=f.concat(s)),m=!0}else if(d===42){this.index+=2;var s=this.skipMultiLineComment();this.trackComment&&(f=f.concat(s))}else break;else if(m&&d===45)if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var s=this.skipSingleLineComment(3);this.trackComment&&(f=f.concat(s))}else break;else if(d===60&&!this.isModule)if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var s=this.skipSingleLineComment(4);this.trackComment&&(f=f.concat(s))}else break;else break}return f},g.prototype.isFutureReservedWord=function(f){switch(f){case"enum":case"export":case"import":case"super":return!0;default:return!1}},g.prototype.isStrictModeReservedWord=function(f){switch(f){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},g.prototype.isRestrictedWord=function(f){return f==="eval"||f==="arguments"},g.prototype.isKeyword=function(f){switch(f.length){case 2:return f==="if"||f==="in"||f==="do";case 3:return f==="var"||f==="for"||f==="new"||f==="try"||f==="let";case 4:return f==="this"||f==="else"||f==="case"||f==="void"||f==="with"||f==="enum";case 5:return f==="while"||f==="break"||f==="catch"||f==="throw"||f==="const"||f==="yield"||f==="class"||f==="super";case 6:return f==="return"||f==="typeof"||f==="delete"||f==="switch"||f==="export"||f==="import";case 7:return f==="default"||f==="finally"||f==="extends";case 8:return f==="function"||f==="continue"||f==="debugger";case 10:return f==="instanceof";default:return!1}},g.prototype.codePointAt=function(f){var m=this.source.charCodeAt(f);if(m>=55296&&m<=56319){var d=this.source.charCodeAt(f+1);if(d>=56320&&d<=57343){var s=m;m=(s-55296)*1024+d-56320+65536}}return m},g.prototype.scanHexEscape=function(f){for(var m=f==="u"?4:2,d=0,s=0;s<m;++s)if(!this.eof()&&i.Character.isHexDigit(this.source.charCodeAt(this.index)))d=d*16+u(this.source[this.index++]);else return null;return String.fromCharCode(d)},g.prototype.scanUnicodeCodePointEscape=function(){var f=this.source[this.index],m=0;for(f==="}"&&this.throwUnexpectedToken();!this.eof()&&(f=this.source[this.index++],!!i.Character.isHexDigit(f.charCodeAt(0)));)m=m*16+u(f);return(m>1114111||f!=="}")&&this.throwUnexpectedToken(),i.Character.fromCodePoint(m)},g.prototype.getIdentifier=function(){for(var f=this.index++;!this.eof();){var m=this.source.charCodeAt(this.index);if(m===92)return this.index=f,this.getComplexIdentifier();if(m>=55296&&m<57343)return this.index=f,this.getComplexIdentifier();if(i.Character.isIdentifierPart(m))++this.index;else break}return this.source.slice(f,this.index)},g.prototype.getComplexIdentifier=function(){var f=this.codePointAt(this.index),m=i.Character.fromCodePoint(f);this.index+=m.length;var d;for(f===92&&(this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,d=this.scanUnicodeCodePointEscape()):(d=this.scanHexEscape("u"),(d===null||d==="\\"||!i.Character.isIdentifierStart(d.charCodeAt(0)))&&this.throwUnexpectedToken()),m=d);!this.eof()&&(f=this.codePointAt(this.index),!!i.Character.isIdentifierPart(f));)d=i.Character.fromCodePoint(f),m+=d,this.index+=d.length,f===92&&(m=m.substr(0,m.length-1),this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,d=this.scanUnicodeCodePointEscape()):(d=this.scanHexEscape("u"),(d===null||d==="\\"||!i.Character.isIdentifierPart(d.charCodeAt(0)))&&this.throwUnexpectedToken()),m+=d);return m},g.prototype.octalToDecimal=function(f){var m=f!=="0",d=h(f);return!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(m=!0,d=d*8+h(this.source[this.index++]),"0123".indexOf(f)>=0&&!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(d=d*8+h(this.source[this.index++]))),{code:d,octal:m}},g.prototype.scanIdentifier=function(){var f,m=this.index,d=this.source.charCodeAt(m)===92?this.getComplexIdentifier():this.getIdentifier();if(d.length===1?f=3:this.isKeyword(d)?f=4:d==="null"?f=5:d==="true"||d==="false"?f=1:f=3,f!==3&&m+d.length!==this.index){var s=this.index;this.index=m,this.tolerateUnexpectedToken(o.Messages.InvalidEscapedReservedWord),this.index=s}return{type:f,value:d,lineNumber:this.lineNumber,lineStart:this.lineStart,start:m,end:this.index}},g.prototype.scanPunctuator=function(){var f=this.index,m=this.source[this.index];switch(m){case"(":case"{":m==="{"&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,this.source[this.index]==="."&&this.source[this.index+1]==="."&&(this.index+=2,m="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:m=this.source.substr(this.index,4),m===">>>="?this.index+=4:(m=m.substr(0,3),m==="==="||m==="!=="||m===">>>"||m==="<<="||m===">>="||m==="**="?this.index+=3:(m=m.substr(0,2),m==="&&"||m==="||"||m==="=="||m==="!="||m==="+="||m==="-="||m==="*="||m==="/="||m==="++"||m==="--"||m==="<<"||m===">>"||m==="&="||m==="|="||m==="^="||m==="%="||m==="<="||m===">="||m==="=>"||m==="**"?this.index+=2:(m=this.source[this.index],"<>=!+-*%&|^/".indexOf(m)>=0&&++this.index)))}return this.index===f&&this.throwUnexpectedToken(),{type:7,value:m,lineNumber:this.lineNumber,lineStart:this.lineStart,start:f,end:this.index}},g.prototype.scanHexLiteral=function(f){for(var m="";!this.eof()&&i.Character.isHexDigit(this.source.charCodeAt(this.index));)m+=this.source[this.index++];return m.length===0&&this.throwUnexpectedToken(),i.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+m,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:f,end:this.index}},g.prototype.scanBinaryLiteral=function(f){for(var m="",d;!this.eof()&&(d=this.source[this.index],!(d!=="0"&&d!=="1"));)m+=this.source[this.index++];return m.length===0&&this.throwUnexpectedToken(),this.eof()||(d=this.source.charCodeAt(this.index),(i.Character.isIdentifierStart(d)||i.Character.isDecimalDigit(d))&&this.throwUnexpectedToken()),{type:6,value:parseInt(m,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:f,end:this.index}},g.prototype.scanOctalLiteral=function(f,m){var d="",s=!1;for(i.Character.isOctalDigit(f.charCodeAt(0))?(s=!0,d="0"+this.source[this.index++]):++this.index;!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];return!s&&d.length===0&&this.throwUnexpectedToken(),(i.Character.isIdentifierStart(this.source.charCodeAt(this.index))||i.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(d,8),octal:s,lineNumber:this.lineNumber,lineStart:this.lineStart,start:m,end:this.index}},g.prototype.isImplicitOctalLiteral=function(){for(var f=this.index+1;f<this.length;++f){var m=this.source[f];if(m==="8"||m==="9")return!1;if(!i.Character.isOctalDigit(m.charCodeAt(0)))return!0}return!0},g.prototype.scanNumericLiteral=function(){var f=this.index,m=this.source[f];n.assert(i.Character.isDecimalDigit(m.charCodeAt(0))||m===".","Numeric literal must start with a decimal digit or a decimal point");var d="";if(m!=="."){if(d=this.source[this.index++],m=this.source[this.index],d==="0"){if(m==="x"||m==="X")return++this.index,this.scanHexLiteral(f);if(m==="b"||m==="B")return++this.index,this.scanBinaryLiteral(f);if(m==="o"||m==="O")return this.scanOctalLiteral(m,f);if(m&&i.Character.isOctalDigit(m.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(m,f)}for(;i.Character.isDecimalDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];m=this.source[this.index]}if(m==="."){for(d+=this.source[this.index++];i.Character.isDecimalDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];m=this.source[this.index]}if(m==="e"||m==="E")if(d+=this.source[this.index++],m=this.source[this.index],(m==="+"||m==="-")&&(d+=this.source[this.index++]),i.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;i.Character.isDecimalDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];else this.throwUnexpectedToken();return i.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(d),lineNumber:this.lineNumber,lineStart:this.lineStart,start:f,end:this.index}},g.prototype.scanStringLiteral=function(){var f=this.index,m=this.source[f];n.assert(m==="'"||m==='"',"String literal must starts with a quote"),++this.index;for(var d=!1,s="";!this.eof();){var a=this.source[this.index++];if(a===m){m="";break}else if(a==="\\")if(a=this.source[this.index++],!a||!i.Character.isLineTerminator(a.charCodeAt(0)))switch(a){case"u":if(this.source[this.index]==="{")++this.index,s+=this.scanUnicodeCodePointEscape();else{var l=this.scanHexEscape(a);l===null&&this.throwUnexpectedToken(),s+=l}break;case"x":var c=this.scanHexEscape(a);c===null&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),s+=c;break;case"n":s+=`
|
|
7
|
-
`;break;case"r":s+="\r";break;case"t":s+=" ";break;case"b":s+="\b";break;case"f":s+="\f";break;case"v":s+="\v";break;case"8":case"9":s+=a,this.tolerateUnexpectedToken();break;default:if(a&&i.Character.isOctalDigit(a.charCodeAt(0))){var y=this.octalToDecimal(a);d=y.octal||d,s+=String.fromCharCode(y.code)}else s+=a;break}else++this.lineNumber,a==="\r"&&this.source[this.index]===`
|
|
8
|
-
`&&++this.index,this.lineStart=this.index;else{if(i.Character.isLineTerminator(a.charCodeAt(0)))break;s+=a}}return m!==""&&(this.index=f,this.throwUnexpectedToken()),{type:8,value:s,octal:d,lineNumber:this.lineNumber,lineStart:this.lineStart,start:f,end:this.index}},g.prototype.scanTemplate=function(){var f="",m=!1,d=this.index,s=this.source[d]==="`",a=!1,l=2;for(++this.index;!this.eof();){var c=this.source[this.index++];if(c==="`"){l=1,a=!0,m=!0;break}else if(c==="$"){if(this.source[this.index]==="{"){this.curlyStack.push("${"),++this.index,m=!0;break}f+=c}else if(c==="\\")if(c=this.source[this.index++],i.Character.isLineTerminator(c.charCodeAt(0)))++this.lineNumber,c==="\r"&&this.source[this.index]===`
|
|
9
|
-
`&&++this.index,this.lineStart=this.index;else switch(c){case"n":f+=`
|
|
10
|
-
`;break;case"r":f+="\r";break;case"t":f+=" ";break;case"u":if(this.source[this.index]==="{")++this.index,f+=this.scanUnicodeCodePointEscape();else{var y=this.index,S=this.scanHexEscape(c);S!==null?f+=S:(this.index=y,f+=c)}break;case"x":var E=this.scanHexEscape(c);E===null&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),f+=E;break;case"b":f+="\b";break;case"f":f+="\f";break;case"v":f+="\v";break;default:c==="0"?(i.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(o.Messages.TemplateOctalLiteral),f+="\0"):i.Character.isOctalDigit(c.charCodeAt(0))?this.throwUnexpectedToken(o.Messages.TemplateOctalLiteral):f+=c;break}else i.Character.isLineTerminator(c.charCodeAt(0))?(++this.lineNumber,c==="\r"&&this.source[this.index]===`
|
|
11
|
-
`&&++this.index,this.lineStart=this.index,f+=`
|
|
12
|
-
`):f+=c}return m||this.throwUnexpectedToken(),s||this.curlyStack.pop(),{type:10,value:this.source.slice(d+1,this.index-l),cooked:f,head:s,tail:a,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},g.prototype.testRegExp=function(f,m){var d="\uFFFF",s=f,a=this;m.indexOf("u")>=0&&(s=s.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(l,c,y){var S=parseInt(c||y,16);return S>1114111&&a.throwUnexpectedToken(o.Messages.InvalidRegExp),S<=65535?String.fromCharCode(S):d}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,d));try{RegExp(s)}catch{this.throwUnexpectedToken(o.Messages.InvalidRegExp)}try{return new RegExp(f,m)}catch{return null}},g.prototype.scanRegExpBody=function(){var f=this.source[this.index];n.assert(f==="/","Regular expression literal must start with a slash");for(var m=this.source[this.index++],d=!1,s=!1;!this.eof();)if(f=this.source[this.index++],m+=f,f==="\\")f=this.source[this.index++],i.Character.isLineTerminator(f.charCodeAt(0))&&this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),m+=f;else if(i.Character.isLineTerminator(f.charCodeAt(0)))this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);else if(d)f==="]"&&(d=!1);else if(f==="/"){s=!0;break}else f==="["&&(d=!0);return s||this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),m.substr(1,m.length-2)},g.prototype.scanRegExpFlags=function(){for(var f="",m="";!this.eof();){var d=this.source[this.index];if(!i.Character.isIdentifierPart(d.charCodeAt(0)))break;if(++this.index,d==="\\"&&!this.eof())if(d=this.source[this.index],d==="u"){++this.index;var s=this.index,a=this.scanHexEscape("u");if(a!==null)for(m+=a,f+="\\u";s<this.index;++s)f+=this.source[s];else this.index=s,m+="u",f+="\\u";this.tolerateUnexpectedToken()}else f+="\\",this.tolerateUnexpectedToken();else m+=d,f+=d}return m},g.prototype.scanRegExp=function(){var f=this.index,m=this.scanRegExpBody(),d=this.scanRegExpFlags(),s=this.testRegExp(m,d);return{type:9,value:"",pattern:m,flags:d,regex:s,lineNumber:this.lineNumber,lineStart:this.lineStart,start:f,end:this.index}},g.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var f=this.source.charCodeAt(this.index);return i.Character.isIdentifierStart(f)?this.scanIdentifier():f===40||f===41||f===59?this.scanPunctuator():f===39||f===34?this.scanStringLiteral():f===46?i.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():i.Character.isDecimalDigit(f)?this.scanNumericLiteral():f===96||f===125&&this.curlyStack[this.curlyStack.length-1]==="${"?this.scanTemplate():f>=55296&&f<57343&&i.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},g}();t.Scanner=p},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="<end>",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(10),i=r(12),o=r(13),u=function(){function p(){this.values=[],this.curly=this.paren=-1}return p.prototype.beforeFunctionExpression=function(g){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(g)>=0},p.prototype.isRegexStart=function(){var g=this.values[this.values.length-1],f=g!==null;switch(g){case"this":case"]":f=!1;break;case")":var m=this.values[this.paren-1];f=m==="if"||m==="while"||m==="for"||m==="with";break;case"}":if(f=!1,this.values[this.curly-3]==="function"){var d=this.values[this.curly-4];f=d?!this.beforeFunctionExpression(d):!1}else if(this.values[this.curly-4]==="function"){var d=this.values[this.curly-5];f=d?!this.beforeFunctionExpression(d):!0}break;default:break}return f},p.prototype.push=function(g){g.type===7||g.type===4?(g.value==="{"?this.curly=this.values.length:g.value==="("&&(this.paren=this.values.length),this.values.push(g.value)):this.values.push(null)},p}(),h=function(){function p(g,f){this.errorHandler=new n.ErrorHandler,this.errorHandler.tolerant=f?typeof f.tolerant=="boolean"&&f.tolerant:!1,this.scanner=new i.Scanner(g,this.errorHandler),this.scanner.trackComment=f?typeof f.comment=="boolean"&&f.comment:!1,this.trackRange=f?typeof f.range=="boolean"&&f.range:!1,this.trackLoc=f?typeof f.loc=="boolean"&&f.loc:!1,this.buffer=[],this.reader=new u}return p.prototype.errors=function(){return this.errorHandler.errors},p.prototype.getNextToken=function(){if(this.buffer.length===0){var g=this.scanner.scanComments();if(this.scanner.trackComment)for(var f=0;f<g.length;++f){var m=g[f],d=this.scanner.source.slice(m.slice[0],m.slice[1]),s={type:m.multiLine?"BlockComment":"LineComment",value:d};this.trackRange&&(s.range=m.range),this.trackLoc&&(s.loc=m.loc),this.buffer.push(s)}if(!this.scanner.eof()){var a=void 0;this.trackLoc&&(a={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var l=this.scanner.source[this.scanner.index]==="/"&&this.reader.isRegexStart(),c=l?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(c);var y={type:o.TokenName[c.type],value:this.scanner.source.slice(c.start,c.end)};if(this.trackRange&&(y.range=[c.start,c.end]),this.trackLoc&&(a.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},y.loc=a),c.type===9){var S=c.pattern,E=c.flags;y.regex={pattern:S,flags:E}}this.buffer.push(y)}}return this.buffer.shift()},p}();t.Tokenizer=h}])})});var Xt=L(Y=>{b();function Ec(e){return Array.isArray?Array.isArray(e):zt(e)==="[object Array]"}Y.isArray=Ec;function Dc(e){return typeof e=="boolean"}Y.isBoolean=Dc;function Ac(e){return e===null}Y.isNull=Ac;function Cc(e){return e==null}Y.isNullOrUndefined=Cc;function wc(e){return typeof e=="number"}Y.isNumber=wc;function kc(e){return typeof e=="string"}Y.isString=kc;function Tc(e){return typeof e=="symbol"}Y.isSymbol=Tc;function Ic(e){return e===void 0}Y.isUndefined=Ic;function Fc(e){return zt(e)==="[object RegExp]"}Y.isRegExp=Fc;function Rc(e){return typeof e=="object"&&e!==null}Y.isObject=Rc;function Lc(e){return zt(e)==="[object Date]"}Y.isDate=Lc;function Pc(e){return zt(e)==="[object Error]"||e instanceof Error}Y.isError=Pc;function Mc(e){return typeof e=="function"}Y.isFunction=Mc;function Oc(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}Y.isPrimitive=Oc;Y.isBuffer=ht("buffer").Buffer.isBuffer;function zt(e){return Object.prototype.toString.call(e)}});var Ys=L((Og,Ks)=>{b();var Hs=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],I,Ws=e=>e<1e5?e<100?e<10?0:1:e<1e4?e<1e3?2:3:4:e<1e7?e<1e6?5:6:e<1e9?e<1e8?7:8:9;function zs(e,t){if(e===t)return 0;if(~~e===e&&~~t===t){if(e===0||t===0)return e<t?-1:1;if(e<0||t<0){if(t>=0)return-1;if(e>=0)return 1;e=-e,t=-t}let i=Ws(e),o=Ws(t),u=0;return i<o?(e*=Hs[o-i-1],t/=10,u=-1):i>o&&(t*=Hs[i-o-1],e/=10,u=1),e===t?u:e<t?-1:1}let r=String(e),n=String(t);return r===n?0:r<n?-1:1}function Nc(e){let t=0;for(;e>=32;)t|=e&1,e>>=1;return e+t}function Xs(e,t,r,n){let i=t+1;if(i===r)return 1;if(n(e[i++],e[t])<0){for(;i<r&&n(e[i],e[i-1])<0;)i++;Vs(e,t,i),Vs(I,t,i)}else for(;i<r&&n(e[i],e[i-1])>=0;)i++;return i-t}function Vs(e,t,r){for(r--;t<r;){let n=e[t];e[t++]=e[r],e[r--]=n}}function Js(e,t,r,n,i){for(n===t&&n++;n<r;n++){let o=e[n],u=I[n],h=t,p=n;for(;h<p;){let f=h+p>>>1;i(o,e[f])<0?p=f:h=f+1}let g=n-h;switch(g){case 3:e[h+3]=e[h+2],I[h+3]=I[h+2];case 2:e[h+2]=e[h+1],I[h+2]=I[h+1];case 1:e[h+1]=e[h],I[h+1]=I[h];break;default:for(;g>0;)e[h+g]=e[h+g-1],I[h+g]=I[h+g-1],g--}e[h]=o,I[h]=u}}function cn(e,t,r,n,i,o){let u=0,h=0,p=1;if(o(e,t[r+i])>0){for(h=n-i;p<h&&o(e,t[r+i+p])>0;)u=p,p=(p<<1)+1,p<=0&&(p=h);p>h&&(p=h),u+=i,p+=i}else{for(h=i+1;p<h&&o(e,t[r+i-p])<=0;)u=p,p=(p<<1)+1,p<=0&&(p=h);p>h&&(p=h);let g=u;u=i-p,p=i-g}for(u++;u<p;){let g=u+(p-u>>>1);o(e,t[r+g])>0?u=g+1:p=g}return p}function dn(e,t,r,n,i,o){let u=0,h=0,p=1;if(o(e,t[r+i])<0){for(h=i+1;p<h&&o(e,t[r+i-p])<0;)u=p,p=(p<<1)+1,p<=0&&(p=h);p>h&&(p=h);let g=u;u=i-p,p=i-g}else{for(h=n-i;p<h&&o(e,t[r+i+p])>=0;)u=p,p=(p<<1)+1,p<=0&&(p=h);p>h&&(p=h),u+=i,p+=i}for(u++;u<p;){let g=u+(p-u>>>1);o(e,t[r+g])<0?p=g:u=g+1}return p}var hn=class{constructor(t,r){this.array=t,this.compare=r;let{length:n}=t;this.length=n,this.minGallop=7,this.tmpStorageLength=n<2*256?n>>>1:256,this.tmp=new Array(this.tmpStorageLength),this.tmpIndex=new Array(this.tmpStorageLength),this.stackLength=n<120?5:n<1542?10:n<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength),this.stackSize=0}pushRun(t,r){this.runStart[this.stackSize]=t,this.runLength[this.stackSize]=r,this.stackSize+=1}mergeRuns(){for(;this.stackSize>1;){let t=this.stackSize-2;if(t>=1&&this.runLength[t-1]<=this.runLength[t]+this.runLength[t+1]||t>=2&&this.runLength[t-2]<=this.runLength[t]+this.runLength[t-1])this.runLength[t-1]<this.runLength[t+1]&&t--;else if(this.runLength[t]>this.runLength[t+1])break;this.mergeAt(t)}}forceMergeRuns(){for(;this.stackSize>1;){let t=this.stackSize-2;t>0&&this.runLength[t-1]<this.runLength[t+1]&&t--,this.mergeAt(t)}}mergeAt(t){let{compare:r}=this,{array:n}=this,i=this.runStart[t],o=this.runLength[t],u=this.runStart[t+1],h=this.runLength[t+1];this.runLength[t]=o+h,t===this.stackSize-3&&(this.runStart[t+1]=this.runStart[t+2],this.runLength[t+1]=this.runLength[t+2]),this.stackSize--;let p=dn(n[u],n,i,o,0,r);i+=p,o-=p,o!==0&&(h=cn(n[i+o-1],n,u,h,h-1,r),h!==0&&(o<=h?this.mergeLow(i,o,u,h):this.mergeHigh(i,o,u,h)))}mergeLow(t,r,n,i){let{compare:o}=this,{array:u}=this,{tmp:h}=this,{tmpIndex:p}=this,g=0;for(g=0;g<r;g++)h[g]=u[t+g],p[g]=I[t+g];let f=0,m=n,d=t;if(u[d]=u[m],I[d]=I[m],d++,m++,--i===0){for(g=0;g<r;g++)u[d+g]=h[f+g],I[d+g]=p[f+g];return}if(r===1){for(g=0;g<i;g++)u[d+g]=u[m+g],I[d+g]=I[m+g];u[d+i]=h[f],I[d+i]=p[f];return}let{minGallop:s}=this;for(;;){let a=0,l=0,c=!1;do if(o(u[m],h[f])<0){if(u[d]=u[m],I[d]=I[m],d++,m++,l++,a=0,--i===0){c=!0;break}}else if(u[d]=h[f],I[d]=p[f],d++,f++,a++,l=0,--r===1){c=!0;break}while((a|l)<s);if(c)break;do{if(a=dn(u[m],h,f,r,0,o),a!==0){for(g=0;g<a;g++)u[d+g]=h[f+g],I[d+g]=p[f+g];if(d+=a,f+=a,r-=a,r<=1){c=!0;break}}if(u[d]=u[m],I[d]=I[m],d++,m++,--i===0){c=!0;break}if(l=cn(h[f],u,m,i,0,o),l!==0){for(g=0;g<l;g++)u[d+g]=u[m+g],I[d+g]=I[m+g];if(d+=l,m+=l,i-=l,i===0){c=!0;break}}if(u[d]=h[f],I[d]=p[f],d++,f++,--r===1){c=!0;break}s--}while(a>=7||l>=7);if(c)break;s<0&&(s=0),s+=2}if(this.minGallop=s,s<1&&(this.minGallop=1),r===1){for(g=0;g<i;g++)u[d+g]=u[m+g],I[d+g]=I[m+g];u[d+i]=h[f],I[d+i]=p[f]}else{if(r===0)throw new Error("mergeLow preconditions were not respected");for(g=0;g<r;g++)u[d+g]=h[f+g],I[d+g]=p[f+g]}}mergeHigh(t,r,n,i){let{compare:o}=this,{array:u}=this,{tmp:h}=this,{tmpIndex:p}=this,g=0;for(g=0;g<i;g++)h[g]=u[n+g],p[g]=I[n+g];let f=t+r-1,m=i-1,d=n+i-1,s=0,a=0;if(u[d]=u[f],I[d]=I[f],d--,f--,--r===0){for(s=d-(i-1),g=0;g<i;g++)u[s+g]=h[g],I[s+g]=p[g];return}if(i===1){for(d-=r,f-=r,a=d+1,s=f+1,g=r-1;g>=0;g--)u[a+g]=u[s+g],I[a+g]=I[s+g];u[d]=h[m],I[d]=p[m];return}let{minGallop:l}=this;for(;;){let c=0,y=0,S=!1;do if(o(h[m],u[f])<0){if(u[d]=u[f],I[d]=I[f],d--,f--,c++,y=0,--r===0){S=!0;break}}else if(u[d]=h[m],I[d]=p[m],d--,m--,y++,c=0,--i===1){S=!0;break}while((c|y)<l);if(S)break;do{if(c=r-dn(h[m],u,t,r,r-1,o),c!==0){for(d-=c,f-=c,r-=c,a=d+1,s=f+1,g=c-1;g>=0;g--)u[a+g]=u[s+g],I[a+g]=I[s+g];if(r===0){S=!0;break}}if(u[d]=h[m],I[d]=p[m],d--,m--,--i===1){S=!0;break}if(y=i-cn(u[f],h,0,i,i-1,o),y!==0){for(d-=y,m-=y,i-=y,a=d+1,s=m+1,g=0;g<y;g++)u[a+g]=h[s+g],I[a+g]=p[s+g];if(i<=1){S=!0;break}}if(u[d]=u[f],I[d]=I[f],d--,f--,--r===0){S=!0;break}l--}while(c>=7||y>=7);if(S)break;l<0&&(l=0),l+=2}if(this.minGallop=l,l<1&&(this.minGallop=1),i===1){for(d-=r,f-=r,a=d+1,s=f+1,g=r-1;g>=0;g--)u[a+g]=u[s+g],I[a+g]=I[s+g];u[d]=h[m],I[d]=p[m]}else{if(i===0)throw new Error("mergeHigh preconditions were not respected");for(s=d-(i-1),g=0;g<i;g++)u[s+g]=h[g],I[s+g]=p[g]}}};function Bc(e,t,r,n){if(!Array.isArray(e))throw new TypeError(`The "array" argument must be an array. Received ${e}`);I=[];let{length:i}=e,o=0;for(;o<i;)I[o]=o++;t?typeof t!="function"&&(n=r,r=t,t=zs):t=zs,r||(r=0),n||(n=i);let u=n-r;if(u<2)return I;let h=0;if(u<32)return h=Xs(e,r,n,t),Js(e,r,n,r+h,t),I;let p=new hn(e,t),g=Nc(u);do{if(h=Xs(e,r,n,t),h<g){let f=u;f>g&&(f=g),Js(e,r,r+f,r+h,t),h=f}p.pushRun(r,h),p.mergeRuns(),u-=h,r+=h}while(u!==0);return p.forceMergeRuns(),I}Ks.exports={sort:Bc}});var Zs=L((Bg,Qs)=>{"use strict";b();var _c=Object.prototype.hasOwnProperty;Qs.exports=(e,t)=>_c.call(e,t)});var vt=L((Ug,co)=>{b();var mn=Zs(),{isObject:eo,isArray:Uc,isString:Gc,isNumber:jc}=Xt(),gn="before",ro="after-prop",no="after-colon",io="after-value",so="after",oo="before-all",ao="after-all",$c="[",qc="]",Hc="{",Wc="}",zc=",",Xc="",Vc="-",yn=[gn,ro,no,io,so],Jc=[gn,oo,ao].map(Symbol.for),uo=":",to=void 0,bt=(e,t)=>Symbol.for(e+uo+t),Vt=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),pn=(e,t,r,n,i,o)=>{let u=bt(i,n);if(!mn(t,u))return;let h=r===n?u:bt(i,r);Vt(e,h,t[u]),o&&delete t[u]},lo=(e,t,r,n,i)=>{yn.forEach(o=>{pn(e,t,r,n,o,i)})},Kc=(e,t,r)=>{t!==r&&yn.forEach(n=>{let i=bt(n,r);if(!mn(e,i)){pn(e,e,r,t,n,!0);return}let o=e[i];delete e[i],pn(e,e,r,t,n,!0),Vt(e,bt(n,t),o)})},fn=(e,t)=>{Jc.forEach(r=>{let n=t[r];n&&Vt(e,r,n)})},Yc=(e,t,r)=>(r.forEach(n=>{!Gc(n)&&!jc(n)||mn(t,n)&&(e[n]=t[n],lo(e,t,n,n))}),e);co.exports={SYMBOL_PREFIXES:yn,PREFIX_BEFORE:gn,PREFIX_AFTER_PROP:ro,PREFIX_AFTER_COLON:no,PREFIX_AFTER_VALUE:io,PREFIX_AFTER:so,PREFIX_BEFORE_ALL:oo,PREFIX_AFTER_ALL:ao,BRACKET_OPEN:$c,BRACKET_CLOSE:qc,CURLY_BRACKET_OPEN:Hc,CURLY_BRACKET_CLOSE:Wc,COLON:uo,COMMA:zc,MINUS:Vc,EMPTY:Xc,UNDEFINED:to,symbol:bt,define:Vt,copy_comments:lo,swap_comments:Kc,assign_non_prop_comments:fn,assign(e,t,r){if(!eo(e))throw new TypeError("Cannot convert undefined or null to object");if(!eo(t))return e;if(r===to)r=Object.keys(t),fn(e,t);else if(Uc(r))r.length===0&&fn(e,t);else throw new TypeError("keys must be array or undefined");return Yc(e,t,r)}}});var bn=L((jg,go)=>{b();var{isArray:Qc}=Xt(),{sort:Zc}=Ys(),{SYMBOL_PREFIXES:ed,UNDEFINED:ho,symbol:td,copy_comments:rd,swap_comments:mo}=vt(),nd=e=>{let{length:t}=e,r=0,n=t/2;for(;r<n;r++)mo(e,r,t-r-1)},fo=(e,t,r,n,i)=>{rd(e,t,r+n,r,i)},Ze=(e,t,r,n,i,o)=>{if(i>0){let h=n;for(;h-- >0;)fo(e,t,r+h,i,o);return}let u=0;for(;u<n;){let h=u++;fo(e,t,r+h,i,o)}},po=(e,t)=>{ed.forEach(r=>{let n=td(r,t);delete e[n]})},id=(e,t)=>{let r=t;for(;r in e;)r=e[r];return r},Sn=class e extends Array{splice(...t){let{length:r}=this,n=super.splice(...t),[i,o,...u]=t;i<0&&(i+=r),arguments.length===1?o=r-i:o=Math.min(r-i,o);let{length:h}=u,p=h-o,g=i+o,f=r-g;return Ze(this,this,g,f,p,!0),n}slice(...t){let{length:r}=this,n=super.slice(...t);if(!n.length)return new e;let[i,o]=t;return o===ho?o=r:o<0&&(o+=r),i<0?i+=r:i===ho&&(i=0),Ze(n,this,i,o-i,-i),n}unshift(...t){let{length:r}=this,n=super.unshift(...t),{length:i}=t;return i>0&&Ze(this,this,0,r,i,!0),n}shift(){let t=super.shift(),{length:r}=this;return po(this,0),Ze(this,this,1,r,-1,!0),t}reverse(){return super.reverse(),nd(this),this}pop(){let t=super.pop();return po(this,this.length),t}concat(...t){let{length:r}=this,n=super.concat(...t);return t.length&&(Ze(n,this,0,this.length,0),t.forEach(i=>{let o=r;r+=Qc(i)?i.length:1,i instanceof e&&Ze(n,i,0,i.length,o)})),n}sort(...t){let r=Zc(this,...t.slice(0,1)),n=Object.create(null);return r.forEach((i,o)=>{if(i===o)return;let u=id(n,i);u!==o&&(n[o]=u,mo(this,o,u))}),this}};go.exports={CommentArray:Sn}});var Po=L((qg,Lo)=>{b();var sd=qs(),{CommentArray:od}=bn(),{PREFIX_BEFORE:Kt,PREFIX_AFTER_PROP:ad,PREFIX_AFTER_COLON:ud,PREFIX_AFTER_VALUE:vo,PREFIX_AFTER:xn,PREFIX_BEFORE_ALL:ld,PREFIX_AFTER_ALL:cd,BRACKET_OPEN:dd,BRACKET_CLOSE:yo,CURLY_BRACKET_OPEN:hd,CURLY_BRACKET_CLOSE:So,COLON:xo,COMMA:Eo,MINUS:bo,EMPTY:fd,UNDEFINED:Zt,define:En,assign_non_prop_comments:pd}=vt(),Do=e=>sd.tokenize(e,{comment:!0,loc:!0}),Dn=[],Re=null,me=null,An=[],Le,Ao=!1,Co=!1,xt=null,Et=null,Q=null,wo,Yt=null,ko=()=>{An.length=Dn.length=0,Et=null,Le=Zt},md=()=>{ko(),xt.length=0,me=Re=xt=Et=Q=Yt=null},Cn=e=>Symbol.for(Le!==Zt?e+xo+Le:e),wn=(e,t)=>Yt?Yt(e,t):t,To=()=>{let e=new SyntaxError(`Unexpected token ${Q.value.slice(0,1)}`);throw Object.assign(e,Q.loc.start),e},Io=()=>{let e=new SyntaxError("Unexpected end of JSON input");throw Object.assign(e,Et?Et.loc.end:{line:1,column:0}),e},oe=()=>{let e=xt[++wo];Co=Q&&e&&Q.loc.end.line===e.loc.start.line||!1,Et=Q,Q=e},vn=()=>(Q||Io(),Q.type==="Punctuator"?Q.value:Q.type),$e=e=>vn()===e,Jt=e=>{$e(e)||To()},kn=e=>{Dn.push(Re),Re=e},Tn=()=>{Re=Dn.pop()},Fo=()=>{if(!me)return;let e=[];for(let r of me)if(r.inline)e.push(r);else break;let{length:t}=e;t&&(t===me.length?me=null:me.splice(0,t),En(Re,Cn(xn),e))},Fe=e=>{me&&(En(Re,Cn(e),me),me=null)},ge=e=>{let t=[];for(;Q&&($e("LineComment")||$e("BlockComment"));){let r={...Q,inline:Co};t.push(r),oe()}if(!Ao&&t.length){if(e){En(Re,Cn(e),t);return}me=t}},Qt=(e,t)=>{t&&An.push(Le),Le=e},Ro=()=>{Le=An.pop()},gd=()=>{let e={};kn(e),Qt(Zt,!0);let t=!1,r;for(ge();!$e(So)&&!(t&&(Fe(vo),Jt(Eo),oe(),ge(),Fo(),$e(So)));)t=!0,Jt("String"),r=JSON.parse(Q.value),Qt(r),Fe(Kt),oe(),ge(ad),Jt(xo),oe(),ge(ud),e[r]=wn(r,In()),ge();return t&&Fe(xn),oe(),Le=void 0,t||Fe(Kt),Tn(),Ro(),e},yd=()=>{let e=new od;kn(e),Qt(Zt,!0);let t=!1,r=0;for(ge();!$e(yo)&&!(t&&(Fe(vo),Jt(Eo),oe(),ge(),Fo(),$e(yo)));)t=!0,Qt(r),Fe(Kt),e[r]=wn(r,In()),r++,ge();return t&&Fe(xn),oe(),Le=void 0,t||Fe(Kt),Tn(),Ro(),e};function In(){let e=vn();if(e===hd)return oe(),gd();if(e===dd)return oe(),yd();let t=fd;e===bo&&(oe(),e=vn(),t=bo);let r;switch(e){case"String":case"Boolean":case"Null":case"Numeric":return r=Q.value,oe(),JSON.parse(t+r);default:}}var Sd=e=>Object(e)===e,bd=(e,t,r)=>{ko(),xt=Do(e),Yt=t,Ao=r,xt.length||Io(),wo=-1,oe(),kn({}),ge(ld);let n=In();return ge(cd),Q&&To(),!r&&n!==null&&(Sd(n)||(n=new Object(n)),pd(n,Re)),Tn(),n=wn("",n),md(),n};Lo.exports={parse:bd,tokenize:Do}});var Oo=L((Wg,Mo)=>{"use strict";b();var Ee="",Fn;Mo.exports=vd;function vd(e,t){if(typeof e!="string")throw new TypeError("expected a string");if(t===1)return e;if(t===2)return e+e;var r=e.length*t;if(Fn!==e||typeof Fn>"u")Fn=e,Ee="";else if(Ee.length>=r)return Ee.substr(0,r);for(;r>Ee.length&&t>1;)t&1&&(Ee+=e),t>>=1,e+=e;return Ee+=e,Ee=Ee.substr(0,r),Ee}});var zo=L((Xg,Wo)=>{b();var{isArray:Pn,isObject:No,isFunction:Ln,isNumber:xd,isString:Ed}=Xt(),Dd=Oo(),{PREFIX_BEFORE_ALL:Ad,PREFIX_BEFORE:Bo,PREFIX_AFTER_PROP:Cd,PREFIX_AFTER_COLON:wd,PREFIX_AFTER_VALUE:kd,PREFIX_AFTER:Mn,PREFIX_AFTER_ALL:Td,BRACKET_OPEN:Id,BRACKET_CLOSE:Fd,CURLY_BRACKET_OPEN:Rd,CURLY_BRACKET_CLOSE:Ld,COLON:Pd,COMMA:_o,EMPTY:ie,UNDEFINED:Md}=vt(),Rn=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,On=" ",qe=`
|
|
13
|
-
`,Uo="null",Go=e=>`${Bo}:${e}`,Od=e=>`${Cd}:${e}`,Nd=e=>`${wd}:${e}`,jo=e=>`${kd}:${e}`,$o=e=>`${Mn}:${e}`,Bd={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},_d=e=>(Rn.lastIndex=0,Rn.test(e)?e.replace(Rn,t=>{let r=Bd[t];return typeof r=="string"?r:t}):e),qo=e=>`"${_d(e)}"`,Ud=(e,t)=>t?`//${e}`:`/*${e}*/`,ne=(e,t,r,n)=>{let i=e[Symbol.for(t)];if(!i||!i.length)return ie;let o=!1,u=i.reduce((h,{inline:p,type:g,value:f})=>{let m=p?On:qe+r;return o=g==="LineComment",h+m+Ud(f,o)},ie);return n||o?u+qe+r:u},et=null,At=ie,Gd=()=>{et=null,At=ie},Dt=(e,t,r)=>e?t?e+t.trim()+qe+r:e.trimRight()+qe+r:t?t.trimRight()+qe+r:ie,Ho=(e,t,r)=>{let n=ne(t,Bo,r+At,!0);return Dt(n,e,r)},jd=(e,t)=>{let r=t+At,{length:n}=e,i=ie,o=ie;for(let u=0;u<n;u++){u!==0&&(i+=_o);let h=Dt(o,ne(e,Go(u),r),r);i+=h||qe+r,i+=Nn(u,e,r)||Uo,i+=ne(e,jo(u),r),o=ne(e,$o(u),r)}return i+=Dt(o,ne(e,Mn,r),r),Id+Ho(i,e,t)+Fd},$d=(e,t)=>{if(!e)return"null";let r=t+At,n=ie,i=ie,o=!0,u=Pn(et)?et:Object.keys(e),h=p=>{let g=Nn(p,e,r);if(g===Md)return;o||(n+=_o),o=!1;let f=Dt(i,ne(e,Go(p),r),r);n+=f||qe+r,n+=qo(p)+ne(e,Od(p),r)+Pd+ne(e,Nd(p),r)+On+g+ne(e,jo(p),r),i=ne(e,$o(p),r)};return u.forEach(h),n+=Dt(i,ne(e,Mn,r),r),Rd+Ho(n,e,t)+Ld};function Nn(e,t,r){let n=t[e];switch(No(n)&&Ln(n.toJSON)&&(n=n.toJSON(e)),Ln(et)&&(n=et.call(t,e,n)),typeof n){case"string":return qo(n);case"number":return Number.isFinite(n)?String(n):Uo;case"boolean":case"null":return String(n);case"object":return Pn(n)?jd(n,r):$d(n,r);default:}}var qd=e=>Ed(e)?e:xd(e)?Dd(On,e):ie,{toString:Hd}=Object.prototype,Wd=["[object Number]","[object String]","[object Boolean]"],zd=e=>{if(typeof e!="object")return!1;let t=Hd.call(e);return Wd.includes(t)};Wo.exports=(e,t,r)=>{let n=qd(r);if(!n)return JSON.stringify(e,t);!Ln(t)&&!Pn(t)&&(t=null),et=t,At=n;let i=zd(e)?JSON.stringify(e):Nn("",{"":e},ie);return Gd(),No(e)?ne(e,Ad,ie).trimLeft()+i+ne(e,Td,ie).trimRight():i}});var Vo=L((Jg,Xo)=>{b();var{parse:Xd,tokenize:Vd}=Po(),Jd=zo(),{CommentArray:Kd}=bn(),{assign:Yd}=vt();Xo.exports={parse:Xd,stringify:Jd,tokenize:Vd,CommentArray:Kd,assign:Yd}});var Sa=L((hy,Qn)=>{b();var fr=process||{},ga=fr.argv||[],hr=fr.env||{},Fh=!(hr.NO_COLOR||ga.includes("--no-color"))&&(!!hr.FORCE_COLOR||ga.includes("--color")||fr.platform==="win32"||(fr.stdout||{}).isTTY&&hr.TERM!=="dumb"||!!hr.CI),Rh=(e,t,r=e)=>n=>{let i=""+n,o=i.indexOf(t,e.length);return~o?e+Lh(i,t,r,o)+t:e+i+t},Lh=(e,t,r,n)=>{let i="",o=0;do i+=e.substring(o,n)+r,o=n+t.length,n=e.indexOf(t,o);while(~n);return i+e.substring(o)},ya=(e=Fh)=>{let t=e?Rh:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Qn.exports=ya();Qn.exports.createColors=ya});var ba=L(pr=>{b();Object.defineProperty(pr,"__esModule",{value:!0});pr.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;pr.matchToToken=function(e){var t={type:"invalid",value:e[0],closed:void 0};return e[1]?(t.type="string",t.closed=!!(e[3]||e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}});var Aa=L(Ft=>{"use strict";b();Object.defineProperty(Ft,"__esModule",{value:!0});Ft.isIdentifierChar=Da;Ft.isIdentifierName=Nh;Ft.isIdentifierStart=Ea;var ei="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",va="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",Ph=new RegExp("["+ei+"]"),Mh=new RegExp("["+ei+va+"]");ei=va=null;var xa=[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,7,25,39,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,5,57,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,24,43,261,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,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,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,208,30,2,2,2,1,2,6,3,4,10,1,225,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,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],Oh=[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,78,5,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,199,7,137,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,55,9,266,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,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function Zn(e,t){let r=65536;for(let n=0,i=t.length;n<i;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function Ea(e){return e<65?e===36:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&Ph.test(String.fromCharCode(e)):Zn(e,xa)}function Da(e){return e<48?e===36:e<58?!0:e<65?!1:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&Mh.test(String.fromCharCode(e)):Zn(e,xa)||Zn(e,Oh)}function Nh(e){let t=!0;for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);if((n&64512)===55296&&r+1<e.length){let i=e.charCodeAt(++r);(i&64512)===56320&&(n=65536+((n&1023)<<10)+(i&1023))}if(t){if(t=!1,!Ea(n))return!1}else if(!Da(n))return!1}return!t}});var Ta=L(ze=>{"use strict";b();Object.defineProperty(ze,"__esModule",{value:!0});ze.isKeyword=jh;ze.isReservedWord=Ca;ze.isStrictBindOnlyReservedWord=ka;ze.isStrictBindReservedWord=Gh;ze.isStrictReservedWord=wa;var ti={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Bh=new Set(ti.keyword),_h=new Set(ti.strict),Uh=new Set(ti.strictBind);function Ca(e,t){return t&&e==="await"||e==="enum"}function wa(e,t){return Ca(e,t)||_h.has(e)}function ka(e){return Uh.has(e)}function Gh(e,t){return wa(e,t)||ka(e)}function jh(e){return Bh.has(e)}});var Ia=L(ye=>{"use strict";b();Object.defineProperty(ye,"__esModule",{value:!0});Object.defineProperty(ye,"isIdentifierChar",{enumerable:!0,get:function(){return ri.isIdentifierChar}});Object.defineProperty(ye,"isIdentifierName",{enumerable:!0,get:function(){return ri.isIdentifierName}});Object.defineProperty(ye,"isIdentifierStart",{enumerable:!0,get:function(){return ri.isIdentifierStart}});Object.defineProperty(ye,"isKeyword",{enumerable:!0,get:function(){return Rt.isKeyword}});Object.defineProperty(ye,"isReservedWord",{enumerable:!0,get:function(){return Rt.isReservedWord}});Object.defineProperty(ye,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return Rt.isStrictBindOnlyReservedWord}});Object.defineProperty(ye,"isStrictBindReservedWord",{enumerable:!0,get:function(){return Rt.isStrictBindReservedWord}});Object.defineProperty(ye,"isStrictReservedWord",{enumerable:!0,get:function(){return Rt.isStrictReservedWord}});var ri=Aa(),Rt=Ta()});var Ua=L(Lt=>{"use strict";b();Object.defineProperty(Lt,"__esModule",{value:!0});var ni=Sa(),Fa=ba(),Ra=Ia();function $h(){return typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?!1:ni.isColorSupported}var mr=(e,t)=>r=>e(t(r));function Ma(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.gray,invalid:mr(mr(e.white,e.bgRed),e.bold),gutter:e.gray,marker:mr(e.red,e.bold),message:mr(e.red,e.bold),reset:e.reset}}var qh=Ma(ni.createColors(!0)),Hh=Ma(ni.createColors(!1));function Oa(e){return e?qh:Hh}var Wh=new Set(["as","async","from","get","of","set"]),zh=/\r\n|[\n\r\u2028\u2029]/,Xh=/^[()[\]{}]$/,Na,Vh=/^[a-z][\w-]*$/i,Jh=function(e,t,r){if(e.type==="name"){let n=e.value;if(Ra.isKeyword(n)||Ra.isStrictReservedWord(n,!0)||Wh.has(n))return"keyword";if(Vh.test(n)&&(r[t-1]==="<"||r.slice(t-2,t)==="</"))return"jsxIdentifier";let i=String.fromCodePoint(n.codePointAt(0));if(i!==i.toLowerCase())return"capitalized"}return e.type==="punctuator"&&Xh.test(e.value)?"bracket":e.type==="invalid"&&(e.value==="@"||e.value==="#")?"punctuator":e.type};Na=function*(e){let t;for(;t=Fa.default.exec(e);){let r=Fa.matchToToken(t);yield{type:Jh(r,t.index,e),value:r.value}}};function Ba(e){if(e==="")return"";let t=Oa(!0),r="";for(let{type:n,value:i}of Na(e))n in t?r+=i.split(zh).map(o=>t[n](o)).join(`
|
|
14
|
-
`):r+=i;return r}var La=!1,Pa=/\r\n|[\n\r\u2028\u2029]/;function Kh(e,t,r){let n=Object.assign({column:0,line:-1},e.start),i=Object.assign({},n,e.end),{linesAbove:o=2,linesBelow:u=3}=r||{},h=n.line,p=n.column,g=i.line,f=i.column,m=Math.max(h-(o+1),0),d=Math.min(t.length,g+u);h===-1&&(m=0),g===-1&&(d=t.length);let s=g-h,a={};if(s)for(let l=0;l<=s;l++){let c=l+h;if(!p)a[c]=!0;else if(l===0){let y=t[c-1].length;a[c]=[p,y-p+1]}else if(l===s)a[c]=[0,f];else{let y=t[c-l].length;a[c]=[0,y]}}else p===f?p?a[h]=[p,0]:a[h]=!0:a[h]=[p,f-p];return{start:m,end:d,markerLines:a}}function _a(e,t,r={}){let n=r.forceColor||$h()&&r.highlightCode,i=Oa(n),o=e.split(Pa),{start:u,end:h,markerLines:p}=Kh(t,o,r),g=t.start&&typeof t.start.column=="number",f=String(h).length,d=(n?Ba(e):e).split(Pa,h).slice(u,h).map((s,a)=>{let l=u+1+a,y=` ${` ${l}`.slice(-f)} |`,S=p[l],E=!p[l+1];if(S){let D="";if(Array.isArray(S)){let A=s.slice(0,Math.max(S[0]-1,0)).replace(/[^\t]/g," "),T=S[1]||1;D=[`
|
|
15
|
-
`,i.gutter(y.replace(/\d/g," "))," ",A,i.marker("^").repeat(T)].join(""),E&&r.message&&(D+=" "+i.message(r.message))}return[i.marker(">"),i.gutter(y),s.length>0?` ${s}`:"",D].join("")}else return` ${i.gutter(y)}${s.length>0?` ${s}`:""}`}).join(`
|
|
16
|
-
`);return r.message&&!g&&(d=`${" ".repeat(f+1)}${r.message}
|
|
17
|
-
${d}`),n?i.reset(d):d}function Yh(e,t,r,n={}){if(!La){La=!0;let o="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(o,"DeprecationWarning");else{let u=new Error(o);u.name="DeprecationWarning",console.warn(new Error(o))}}return r=Math.max(r,0),_a(e,{start:{column:r,line:t}},n)}Lt.codeFrameColumns=_a;Lt.default=Yh;Lt.highlight=Ba});var ai=L((Iy,ja)=>{"use strict";b();var rf=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};ja.exports=rf});var ui=L((Ry,$a)=>{"use strict";b();var nf="2.0.0",sf=Number.MAX_SAFE_INTEGER||9007199254740991,of=16,af=250,uf=["major","premajor","minor","preminor","patch","prepatch","prerelease"];$a.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:of,MAX_SAFE_BUILD_LENGTH:af,MAX_SAFE_INTEGER:sf,RELEASE_TYPES:uf,SEMVER_SPEC_VERSION:nf,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Ha=L((Se,qa)=>{"use strict";b();var{MAX_SAFE_COMPONENT_LENGTH:li,MAX_SAFE_BUILD_LENGTH:lf,MAX_LENGTH:cf}=ui(),df=ai();Se=qa.exports={};var hf=Se.re=[],ff=Se.safeRe=[],w=Se.src=[],pf=Se.safeSrc=[],k=Se.t={},mf=0,ci="[a-zA-Z0-9-]",gf=[["\\s",1],["\\d",cf],[ci,lf]],yf=e=>{for(let[t,r]of gf)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},P=(e,t,r)=>{let n=yf(t),i=mf++;df(e,i,t),k[e]=i,w[i]=t,pf[i]=n,hf[i]=new RegExp(t,r?"g":void 0),ff[i]=new RegExp(n,r?"g":void 0)};P("NUMERICIDENTIFIER","0|[1-9]\\d*");P("NUMERICIDENTIFIERLOOSE","\\d+");P("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${ci}*`);P("MAINVERSION",`(${w[k.NUMERICIDENTIFIER]})\\.(${w[k.NUMERICIDENTIFIER]})\\.(${w[k.NUMERICIDENTIFIER]})`);P("MAINVERSIONLOOSE",`(${w[k.NUMERICIDENTIFIERLOOSE]})\\.(${w[k.NUMERICIDENTIFIERLOOSE]})\\.(${w[k.NUMERICIDENTIFIERLOOSE]})`);P("PRERELEASEIDENTIFIER",`(?:${w[k.NONNUMERICIDENTIFIER]}|${w[k.NUMERICIDENTIFIER]})`);P("PRERELEASEIDENTIFIERLOOSE",`(?:${w[k.NONNUMERICIDENTIFIER]}|${w[k.NUMERICIDENTIFIERLOOSE]})`);P("PRERELEASE",`(?:-(${w[k.PRERELEASEIDENTIFIER]}(?:\\.${w[k.PRERELEASEIDENTIFIER]})*))`);P("PRERELEASELOOSE",`(?:-?(${w[k.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${w[k.PRERELEASEIDENTIFIERLOOSE]})*))`);P("BUILDIDENTIFIER",`${ci}+`);P("BUILD",`(?:\\+(${w[k.BUILDIDENTIFIER]}(?:\\.${w[k.BUILDIDENTIFIER]})*))`);P("FULLPLAIN",`v?${w[k.MAINVERSION]}${w[k.PRERELEASE]}?${w[k.BUILD]}?`);P("FULL",`^${w[k.FULLPLAIN]}$`);P("LOOSEPLAIN",`[v=\\s]*${w[k.MAINVERSIONLOOSE]}${w[k.PRERELEASELOOSE]}?${w[k.BUILD]}?`);P("LOOSE",`^${w[k.LOOSEPLAIN]}$`);P("GTLT","((?:<|>)?=?)");P("XRANGEIDENTIFIERLOOSE",`${w[k.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);P("XRANGEIDENTIFIER",`${w[k.NUMERICIDENTIFIER]}|x|X|\\*`);P("XRANGEPLAIN",`[v=\\s]*(${w[k.XRANGEIDENTIFIER]})(?:\\.(${w[k.XRANGEIDENTIFIER]})(?:\\.(${w[k.XRANGEIDENTIFIER]})(?:${w[k.PRERELEASE]})?${w[k.BUILD]}?)?)?`);P("XRANGEPLAINLOOSE",`[v=\\s]*(${w[k.XRANGEIDENTIFIERLOOSE]})(?:\\.(${w[k.XRANGEIDENTIFIERLOOSE]})(?:\\.(${w[k.XRANGEIDENTIFIERLOOSE]})(?:${w[k.PRERELEASELOOSE]})?${w[k.BUILD]}?)?)?`);P("XRANGE",`^${w[k.GTLT]}\\s*${w[k.XRANGEPLAIN]}$`);P("XRANGELOOSE",`^${w[k.GTLT]}\\s*${w[k.XRANGEPLAINLOOSE]}$`);P("COERCEPLAIN",`(^|[^\\d])(\\d{1,${li}})(?:\\.(\\d{1,${li}}))?(?:\\.(\\d{1,${li}}))?`);P("COERCE",`${w[k.COERCEPLAIN]}(?:$|[^\\d])`);P("COERCEFULL",w[k.COERCEPLAIN]+`(?:${w[k.PRERELEASE]})?(?:${w[k.BUILD]})?(?:$|[^\\d])`);P("COERCERTL",w[k.COERCE],!0);P("COERCERTLFULL",w[k.COERCEFULL],!0);P("LONETILDE","(?:~>?)");P("TILDETRIM",`(\\s*)${w[k.LONETILDE]}\\s+`,!0);Se.tildeTrimReplace="$1~";P("TILDE",`^${w[k.LONETILDE]}${w[k.XRANGEPLAIN]}$`);P("TILDELOOSE",`^${w[k.LONETILDE]}${w[k.XRANGEPLAINLOOSE]}$`);P("LONECARET","(?:\\^)");P("CARETTRIM",`(\\s*)${w[k.LONECARET]}\\s+`,!0);Se.caretTrimReplace="$1^";P("CARET",`^${w[k.LONECARET]}${w[k.XRANGEPLAIN]}$`);P("CARETLOOSE",`^${w[k.LONECARET]}${w[k.XRANGEPLAINLOOSE]}$`);P("COMPARATORLOOSE",`^${w[k.GTLT]}\\s*(${w[k.LOOSEPLAIN]})$|^$`);P("COMPARATOR",`^${w[k.GTLT]}\\s*(${w[k.FULLPLAIN]})$|^$`);P("COMPARATORTRIM",`(\\s*)${w[k.GTLT]}\\s*(${w[k.LOOSEPLAIN]}|${w[k.XRANGEPLAIN]})`,!0);Se.comparatorTrimReplace="$1$2$3";P("HYPHENRANGE",`^\\s*(${w[k.XRANGEPLAIN]})\\s+-\\s+(${w[k.XRANGEPLAIN]})\\s*$`);P("HYPHENRANGELOOSE",`^\\s*(${w[k.XRANGEPLAINLOOSE]})\\s+-\\s+(${w[k.XRANGEPLAINLOOSE]})\\s*$`);P("STAR","(<|>)?=?\\s*\\*");P("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");P("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var za=L((My,Wa)=>{"use strict";b();var Sf=Object.freeze({loose:!0}),bf=Object.freeze({}),vf=e=>e?typeof e!="object"?Sf:e:bf;Wa.exports=vf});var Ka=L((Ny,Ja)=>{"use strict";b();var Xa=/^[0-9]+$/,Va=(e,t)=>{if(typeof e=="number"&&typeof t=="number")return e===t?0:e<t?-1:1;let r=Xa.test(e),n=Xa.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},xf=(e,t)=>Va(t,e);Ja.exports={compareIdentifiers:Va,rcompareIdentifiers:xf}});var Za=L((_y,Qa)=>{"use strict";b();var gr=ai(),{MAX_LENGTH:Ya,MAX_SAFE_INTEGER:yr}=ui(),{safeRe:Sr,t:br}=Ha(),Ef=za(),{compareIdentifiers:di}=Ka(),hi=class e{constructor(t,r){if(r=Ef(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Ya)throw new TypeError(`version is longer than ${Ya} characters`);gr("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=t.trim().match(r.loose?Sr[br.LOOSE]:Sr[br.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>yr||this.major<0)throw new TypeError("Invalid major version");if(this.minor>yr||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>yr||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let o=+i;if(o>=0&&o<yr)return o}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(gr("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if(typeof t=="string"&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],i=t.prerelease[r];if(gr("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return di(n,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let n=this.build[r],i=t.build[r];if(gr("build compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return di(n,i)}while(++r)}inc(t,r,n){if(t.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let i=`-${r}`.match(this.options.loose?Sr[br.PRERELEASELOOSE]:Sr[br.PRERELEASE]);if(!i||i[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let o=[r,i];n===!1&&(o=[r]),di(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Qa.exports=hi});var fi=L((Gy,tu)=>{"use strict";b();var eu=Za(),Df=(e,t,r=!1)=>{if(e instanceof eu)return e;try{return new eu(e,t)}catch(n){if(!r)return null;throw n}};tu.exports=Df});var nu=L(($y,ru)=>{"use strict";b();var Af=fi(),Cf=(e,t)=>{let r=Af(e,t);return r?r.version:null};ru.exports=Cf});var su=L((Hy,iu)=>{"use strict";b();var wf=fi(),kf=(e,t)=>{let r=wf(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};iu.exports=kf});var pi=L((zy,Tf)=>{Tf.exports=["0BSD","3D-Slicer-1.0","AAL","ADSL","AFL-1.1","AFL-1.2","AFL-2.0","AFL-2.1","AFL-3.0","AGPL-1.0-only","AGPL-1.0-or-later","AGPL-3.0-only","AGPL-3.0-or-later","AMD-newlib","AMDPLPA","AML","AML-glslang","AMPAS","ANTLR-PD","ANTLR-PD-fallback","APAFML","APL-1.0","APSL-1.0","APSL-1.1","APSL-1.2","APSL-2.0","ASWF-Digital-Assets-1.0","ASWF-Digital-Assets-1.1","Abstyles","AdaCore-doc","Adobe-2006","Adobe-Display-PostScript","Adobe-Glyph","Adobe-Utopia","Afmparse","Aladdin","Apache-1.0","Apache-1.1","Apache-2.0","App-s2p","Arphic-1999","Artistic-1.0","Artistic-1.0-Perl","Artistic-1.0-cl8","Artistic-2.0","BSD-1-Clause","BSD-2-Clause","BSD-2-Clause-Darwin","BSD-2-Clause-Patent","BSD-2-Clause-Views","BSD-2-Clause-first-lines","BSD-3-Clause","BSD-3-Clause-Attribution","BSD-3-Clause-Clear","BSD-3-Clause-HP","BSD-3-Clause-LBNL","BSD-3-Clause-Modification","BSD-3-Clause-No-Military-License","BSD-3-Clause-No-Nuclear-License","BSD-3-Clause-No-Nuclear-License-2014","BSD-3-Clause-No-Nuclear-Warranty","BSD-3-Clause-Open-MPI","BSD-3-Clause-Sun","BSD-3-Clause-acpica","BSD-3-Clause-flex","BSD-4-Clause","BSD-4-Clause-Shortened","BSD-4-Clause-UC","BSD-4.3RENO","BSD-4.3TAHOE","BSD-Advertising-Acknowledgement","BSD-Attribution-HPND-disclaimer","BSD-Inferno-Nettverk","BSD-Protection","BSD-Source-Code","BSD-Source-beginning-file","BSD-Systemics","BSD-Systemics-W3Works","BSL-1.0","BUSL-1.1","Baekmuk","Bahyph","Barr","Beerware","BitTorrent-1.0","BitTorrent-1.1","Bitstream-Charter","Bitstream-Vera","BlueOak-1.0.0","Boehm-GC","Boehm-GC-without-fee","Borceux","Brian-Gladman-2-Clause","Brian-Gladman-3-Clause","C-UDA-1.0","CAL-1.0","CAL-1.0-Combined-Work-Exception","CATOSL-1.1","CC-BY-1.0","CC-BY-2.0","CC-BY-2.5","CC-BY-2.5-AU","CC-BY-3.0","CC-BY-3.0-AT","CC-BY-3.0-AU","CC-BY-3.0-DE","CC-BY-3.0-IGO","CC-BY-3.0-NL","CC-BY-3.0-US","CC-BY-4.0","CC-BY-NC-1.0","CC-BY-NC-2.0","CC-BY-NC-2.5","CC-BY-NC-3.0","CC-BY-NC-3.0-DE","CC-BY-NC-4.0","CC-BY-NC-ND-1.0","CC-BY-NC-ND-2.0","CC-BY-NC-ND-2.5","CC-BY-NC-ND-3.0","CC-BY-NC-ND-3.0-DE","CC-BY-NC-ND-3.0-IGO","CC-BY-NC-ND-4.0","CC-BY-NC-SA-1.0","CC-BY-NC-SA-2.0","CC-BY-NC-SA-2.0-DE","CC-BY-NC-SA-2.0-FR","CC-BY-NC-SA-2.0-UK","CC-BY-NC-SA-2.5","CC-BY-NC-SA-3.0","CC-BY-NC-SA-3.0-DE","CC-BY-NC-SA-3.0-IGO","CC-BY-NC-SA-4.0","CC-BY-ND-1.0","CC-BY-ND-2.0","CC-BY-ND-2.5","CC-BY-ND-3.0","CC-BY-ND-3.0-DE","CC-BY-ND-4.0","CC-BY-SA-1.0","CC-BY-SA-2.0","CC-BY-SA-2.0-UK","CC-BY-SA-2.1-JP","CC-BY-SA-2.5","CC-BY-SA-3.0","CC-BY-SA-3.0-AT","CC-BY-SA-3.0-DE","CC-BY-SA-3.0-IGO","CC-BY-SA-4.0","CC-PDDC","CC-PDM-1.0","CC-SA-1.0","CC0-1.0","CDDL-1.0","CDDL-1.1","CDL-1.0","CDLA-Permissive-1.0","CDLA-Permissive-2.0","CDLA-Sharing-1.0","CECILL-1.0","CECILL-1.1","CECILL-2.0","CECILL-2.1","CECILL-B","CECILL-C","CERN-OHL-1.1","CERN-OHL-1.2","CERN-OHL-P-2.0","CERN-OHL-S-2.0","CERN-OHL-W-2.0","CFITSIO","CMU-Mach","CMU-Mach-nodoc","CNRI-Jython","CNRI-Python","CNRI-Python-GPL-Compatible","COIL-1.0","CPAL-1.0","CPL-1.0","CPOL-1.02","CUA-OPL-1.0","Caldera","Caldera-no-preamble","Catharon","ClArtistic","Clips","Community-Spec-1.0","Condor-1.1","Cornell-Lossless-JPEG","Cronyx","Crossword","CrystalStacker","Cube","D-FSL-1.0","DEC-3-Clause","DL-DE-BY-2.0","DL-DE-ZERO-2.0","DOC","DRL-1.0","DRL-1.1","DSDP","DocBook-Schema","DocBook-Stylesheet","DocBook-XML","Dotseqn","ECL-1.0","ECL-2.0","EFL-1.0","EFL-2.0","EPICS","EPL-1.0","EPL-2.0","EUDatagrid","EUPL-1.0","EUPL-1.1","EUPL-1.2","Elastic-2.0","Entessa","ErlPL-1.1","Eurosym","FBM","FDK-AAC","FSFAP","FSFAP-no-warranty-disclaimer","FSFUL","FSFULLR","FSFULLRWD","FTL","Fair","Ferguson-Twofish","Frameworx-1.0","FreeBSD-DOC","FreeImage","Furuseth","GCR-docs","GD","GFDL-1.1-invariants-only","GFDL-1.1-invariants-or-later","GFDL-1.1-no-invariants-only","GFDL-1.1-no-invariants-or-later","GFDL-1.1-only","GFDL-1.1-or-later","GFDL-1.2-invariants-only","GFDL-1.2-invariants-or-later","GFDL-1.2-no-invariants-only","GFDL-1.2-no-invariants-or-later","GFDL-1.2-only","GFDL-1.2-or-later","GFDL-1.3-invariants-only","GFDL-1.3-invariants-or-later","GFDL-1.3-no-invariants-only","GFDL-1.3-no-invariants-or-later","GFDL-1.3-only","GFDL-1.3-or-later","GL2PS","GLWTPL","GPL-1.0-only","GPL-1.0-or-later","GPL-2.0-only","GPL-2.0-or-later","GPL-3.0-only","GPL-3.0-or-later","Giftware","Glide","Glulxe","Graphics-Gems","Gutmann","HIDAPI","HP-1986","HP-1989","HPND","HPND-DEC","HPND-Fenneberg-Livingston","HPND-INRIA-IMAG","HPND-Intel","HPND-Kevlin-Henney","HPND-MIT-disclaimer","HPND-Markus-Kuhn","HPND-Netrek","HPND-Pbmplus","HPND-UC","HPND-UC-export-US","HPND-doc","HPND-doc-sell","HPND-export-US","HPND-export-US-acknowledgement","HPND-export-US-modify","HPND-export2-US","HPND-merchantability-variant","HPND-sell-MIT-disclaimer-xserver","HPND-sell-regexpr","HPND-sell-variant","HPND-sell-variant-MIT-disclaimer","HPND-sell-variant-MIT-disclaimer-rev","HTMLTIDY","HaskellReport","Hippocratic-2.1","IBM-pibs","ICU","IEC-Code-Components-EULA","IJG","IJG-short","IPA","IPL-1.0","ISC","ISC-Veillard","ImageMagick","Imlib2","Info-ZIP","Inner-Net-2.0","InnoSetup","Intel","Intel-ACPI","Interbase-1.0","JPL-image","JPNIC","JSON","Jam","JasPer-2.0","Kastrup","Kazlib","Knuth-CTAN","LAL-1.2","LAL-1.3","LGPL-2.0-only","LGPL-2.0-or-later","LGPL-2.1-only","LGPL-2.1-or-later","LGPL-3.0-only","LGPL-3.0-or-later","LGPLLR","LOOP","LPD-document","LPL-1.0","LPL-1.02","LPPL-1.0","LPPL-1.1","LPPL-1.2","LPPL-1.3a","LPPL-1.3c","LZMA-SDK-9.11-to-9.20","LZMA-SDK-9.22","Latex2e","Latex2e-translated-notice","Leptonica","LiLiQ-P-1.1","LiLiQ-R-1.1","LiLiQ-Rplus-1.1","Libpng","Linux-OpenIB","Linux-man-pages-1-para","Linux-man-pages-copyleft","Linux-man-pages-copyleft-2-para","Linux-man-pages-copyleft-var","Lucida-Bitmap-Fonts","MIPS","MIT","MIT-0","MIT-CMU","MIT-Click","MIT-Festival","MIT-Khronos-old","MIT-Modern-Variant","MIT-Wu","MIT-advertising","MIT-enna","MIT-feh","MIT-open-group","MIT-testregex","MITNFA","MMIXware","MPEG-SSG","MPL-1.0","MPL-1.1","MPL-2.0","MPL-2.0-no-copyleft-exception","MS-LPL","MS-PL","MS-RL","MTLL","Mackerras-3-Clause","Mackerras-3-Clause-acknowledgment","MakeIndex","Martin-Birgmeier","McPhee-slideshow","Minpack","MirOS","Motosoto","MulanPSL-1.0","MulanPSL-2.0","Multics","Mup","NAIST-2003","NASA-1.3","NBPL-1.0","NCBI-PD","NCGL-UK-2.0","NCL","NCSA","NGPL","NICTA-1.0","NIST-PD","NIST-PD-fallback","NIST-Software","NLOD-1.0","NLOD-2.0","NLPL","NOSL","NPL-1.0","NPL-1.1","NPOSL-3.0","NRL","NTP","NTP-0","Naumen","NetCDF","Newsletr","Nokia","Noweb","O-UDA-1.0","OAR","OCCT-PL","OCLC-2.0","ODC-By-1.0","ODbL-1.0","OFFIS","OFL-1.0","OFL-1.0-RFN","OFL-1.0-no-RFN","OFL-1.1","OFL-1.1-RFN","OFL-1.1-no-RFN","OGC-1.0","OGDL-Taiwan-1.0","OGL-Canada-2.0","OGL-UK-1.0","OGL-UK-2.0","OGL-UK-3.0","OGTSL","OLDAP-1.1","OLDAP-1.2","OLDAP-1.3","OLDAP-1.4","OLDAP-2.0","OLDAP-2.0.1","OLDAP-2.1","OLDAP-2.2","OLDAP-2.2.1","OLDAP-2.2.2","OLDAP-2.3","OLDAP-2.4","OLDAP-2.5","OLDAP-2.6","OLDAP-2.7","OLDAP-2.8","OLFL-1.3","OML","OPL-1.0","OPL-UK-3.0","OPUBL-1.0","OSET-PL-2.1","OSL-1.0","OSL-1.1","OSL-2.0","OSL-2.1","OSL-3.0","OpenPBS-2.3","OpenSSL","OpenSSL-standalone","OpenVision","PADL","PDDL-1.0","PHP-3.0","PHP-3.01","PPL","PSF-2.0","Parity-6.0.0","Parity-7.0.0","Pixar","Plexus","PolyForm-Noncommercial-1.0.0","PolyForm-Small-Business-1.0.0","PostgreSQL","Python-2.0","Python-2.0.1","QPL-1.0","QPL-1.0-INRIA-2004","Qhull","RHeCos-1.1","RPL-1.1","RPL-1.5","RPSL-1.0","RSA-MD","RSCPL","Rdisc","Ruby","Ruby-pty","SAX-PD","SAX-PD-2.0","SCEA","SGI-B-1.0","SGI-B-1.1","SGI-B-2.0","SGI-OpenGL","SGP4","SHL-0.5","SHL-0.51","SISSL","SISSL-1.2","SL","SMAIL-GPL","SMLNJ","SMPPL","SNIA","SPL-1.0","SSH-OpenSSH","SSH-short","SSLeay-standalone","SSPL-1.0","SWL","Saxpath","SchemeReport","Sendmail","Sendmail-8.23","Sendmail-Open-Source-1.1","SimPL-2.0","Sleepycat","Soundex","Spencer-86","Spencer-94","Spencer-99","SugarCRM-1.1.3","Sun-PPP","Sun-PPP-2000","SunPro","Symlinks","TAPR-OHL-1.0","TCL","TCP-wrappers","TGPPL-1.0","TMate","TORQUE-1.1","TOSL","TPDL","TPL-1.0","TTWL","TTYP0","TU-Berlin-1.0","TU-Berlin-2.0","TermReadKey","ThirdEye","TrustedQSL","UCAR","UCL-1.0","UMich-Merit","UPL-1.0","URT-RLE","Ubuntu-font-1.0","Unicode-3.0","Unicode-DFS-2015","Unicode-DFS-2016","Unicode-TOU","UnixCrypt","Unlicense","VOSTROM","VSL-1.0","Vim","W3C","W3C-19980720","W3C-20150513","WTFPL","Watcom-1.0","Widget-Workshop","Wsuipa","X11","X11-distribute-modifications-variant","X11-swapped","XFree86-1.1","XSkat","Xdebug-1.03","Xerox","Xfig","Xnet","YPL-1.0","YPL-1.1","ZPL-1.1","ZPL-2.0","ZPL-2.1","Zed","Zeeff","Zend-2.0","Zimbra-1.3","Zimbra-1.4","Zlib","any-OSI","any-OSI-perl-modules","bcrypt-Solar-Designer","blessing","bzip2-1.0.6","check-cvs","checkmk","copyleft-next-0.3.0","copyleft-next-0.3.1","curl","cve-tou","diffmark","dtoa","dvipdfm","eGenix","etalab-2.0","fwlw","gSOAP-1.3b","generic-xts","gnuplot","gtkbook","hdparm","iMatix","libpng-2.0","libselinux-1.0","libtiff","libutil-David-Nugent","lsof","magaz","mailprio","metamail","mpi-permissive","mpich2","mplus","pkgconf","pnmstitch","psfrag","psutils","python-ldap","radvd","snprintf","softSurfer","ssh-keyscan","swrule","threeparttable","ulem","w3m","wwl","xinetd","xkeyboard-config-Zinoviev","xlock","xpp","xzoom","zlib-acknowledgement"]});var ou=L((Xy,If)=>{If.exports=["AGPL-1.0","AGPL-3.0","BSD-2-Clause-FreeBSD","BSD-2-Clause-NetBSD","GFDL-1.1","GFDL-1.2","GFDL-1.3","GPL-1.0","GPL-2.0","GPL-2.0-with-GCC-exception","GPL-2.0-with-autoconf-exception","GPL-2.0-with-bison-exception","GPL-2.0-with-classpath-exception","GPL-2.0-with-font-exception","GPL-3.0","GPL-3.0-with-GCC-exception","GPL-3.0-with-autoconf-exception","LGPL-2.0","LGPL-2.1","LGPL-3.0","Net-SNMP","Nunit","StandardML-NJ","bzip2-1.0.5","eCos-2.0","wxWindows"]});var au=L((Vy,Ff)=>{Ff.exports=["389-exception","Asterisk-exception","Autoconf-exception-2.0","Autoconf-exception-3.0","Autoconf-exception-generic","Autoconf-exception-generic-3.0","Autoconf-exception-macro","Bison-exception-1.24","Bison-exception-2.2","Bootloader-exception","Classpath-exception-2.0","CLISP-exception-2.0","cryptsetup-OpenSSL-exception","DigiRule-FOSS-exception","eCos-exception-2.0","Fawkes-Runtime-exception","FLTK-exception","fmt-exception","Font-exception-2.0","freertos-exception-2.0","GCC-exception-2.0","GCC-exception-2.0-note","GCC-exception-3.1","Gmsh-exception","GNAT-exception","GNOME-examples-exception","GNU-compiler-exception","gnu-javamail-exception","GPL-3.0-interface-exception","GPL-3.0-linking-exception","GPL-3.0-linking-source-exception","GPL-CC-1.0","GStreamer-exception-2005","GStreamer-exception-2008","i2p-gpl-java-exception","KiCad-libraries-exception","LGPL-3.0-linking-exception","libpri-OpenH323-exception","Libtool-exception","Linux-syscall-note","LLGPL","LLVM-exception","LZMA-exception","mif-exception","OCaml-LGPL-linking-exception","OCCT-exception-1.0","OpenJDK-assembly-exception-1.0","openvpn-openssl-exception","PS-or-PDF-font-exception-20170817","QPL-1.0-INRIA-2004-exception","Qt-GPL-exception-1.0","Qt-LGPL-exception-1.1","Qwt-exception-1.0","SANE-exception","SHL-2.0","SHL-2.1","stunnel-exception","SWI-exception","Swift-exception","Texinfo-exception","u-boot-exception-2.0","UBDL-exception","Universal-FOSS-exception-1.0","vsftpd-openssl-exception","WxWindows-exception-3.1","x11vnc-openssl-exception"]});var lu=L((Jy,uu)=>{"use strict";b();var Rf=[].concat(pi()).concat(ou()),Lf=au();uu.exports=function(e){var t=0;function r(){return t<e.length}function n(a){if(a instanceof RegExp){var l=e.slice(t),c=l.match(a);if(c)return t+=c[0].length,c[0]}else if(e.indexOf(a,t)===t)return t+=a.length,a}function i(){n(/[ ]*/)}function o(){for(var a,l=["WITH","AND","OR","(",")",":","+"],c=0;c<l.length&&(a=n(l[c]),!a);c++);if(a==="+"&&t>1&&e[t-2]===" ")throw new Error("Space before `+`");return a&&{type:"OPERATOR",string:a}}function u(){return n(/[A-Za-z0-9-.]+/)}function h(){var a=u();if(!a)throw new Error("Expected idstring at offset "+t);return a}function p(){if(n("DocumentRef-")){var a=h();return{type:"DOCUMENTREF",string:a}}}function g(){if(n("LicenseRef-")){var a=h();return{type:"LICENSEREF",string:a}}}function f(){var a=t,l=u();if(Rf.indexOf(l)!==-1)return{type:"LICENSE",string:l};if(Lf.indexOf(l)!==-1)return{type:"EXCEPTION",string:l};t=a}function m(){return o()||p()||g()||f()}for(var d=[];r()&&(i(),!!r());){var s=m();if(!s)throw new Error("Unexpected `"+e[t]+"` at offset "+t);d.push(s)}return d}});var du=L((Yy,cu)=>{"use strict";b();cu.exports=function(e){var t=0;function r(){return t<e.length}function n(){return r()?e[t]:null}function i(){if(!r())throw new Error;t++}function o(l){var c=n();if(c&&c.type==="OPERATOR"&&l===c.string)return i(),c.string}function u(){if(o("WITH")){var l=n();if(l&&l.type==="EXCEPTION")return i(),l.string;throw new Error("Expected exception after `WITH`")}}function h(){var l=t,c="",y=n();if(y.type==="DOCUMENTREF"&&(i(),c+="DocumentRef-"+y.string+":",!o(":")))throw new Error("Expected `:` after `DocumentRef-...`");if(y=n(),y.type==="LICENSEREF")return i(),c+="LicenseRef-"+y.string,{license:c};t=l}function p(){var l=n();if(l&&l.type==="LICENSE"){i();var c={license:l.string};o("+")&&(c.plus=!0);var y=u();return y&&(c.exception=y),c}}function g(){var l=o("(");if(l){var c=s();if(!o(")"))throw new Error("Expected `)`");return c}}function f(){return g()||h()||p()}function m(l,c){return function y(){var S=c();if(S){if(!o(l))return S;var E=y();if(!E)throw new Error("Expected expression");return{left:S,conjunction:l.toLowerCase(),right:E}}}}var d=m("AND",f),s=m("OR",d),a=s();if(!a||r())throw new Error("Syntax error");return a}});var mi=L((Zy,hu)=>{"use strict";b();var Pf=lu(),Mf=du();hu.exports=function(e){return Mf(Pf(e))}});var xu=L((tS,vu)=>{b();var Of=mi(),Nf=pi();function vr(e){try{return Of(e),!0}catch{return!1}}function bu(e,t){var r=t[0].length-e[0].length;return r!==0?r:e[0].toUpperCase().localeCompare(t[0].toUpperCase())}var fu=[["APGL","AGPL"],["Gpl","GPL"],["GLP","GPL"],["APL","Apache"],["ISD","ISC"],["GLP","GPL"],["IST","ISC"],["Claude","Clause"],[" or later","+"],[" International",""],["GNU","GPL"],["GUN","GPL"],["+",""],["GNU GPL","GPL"],["GNU LGPL","LGPL"],["GNU/GPL","GPL"],["GNU GLP","GPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL"],["GNU Lesser General Public License","LGPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["GNU Lesser General Public License","LGPL-2.1"],["LESSER GENERAL PUBLIC LICENSE","LGPL"],["Lesser General Public License","LGPL"],["LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["Lesser General Public License","LGPL-2.1"],["GNU General Public License","GPL"],["Gnu public license","GPL"],["GNU Public License","GPL"],["GNU GENERAL PUBLIC LICENSE","GPL"],["MTI","MIT"],["Mozilla Public License","MPL"],["Universal Permissive License","UPL"],["WTH","WTF"],["WTFGPL","WTFPL"],["-License",""]].sort(bu),Bf=0,_f=1,pu=[function(e){return e.toUpperCase()},function(e){return e.trim()},function(e){return e.replace(/\./g,"")},function(e){return e.replace(/\s+/g,"")},function(e){return e.replace(/\s+/g,"-")},function(e){return e.replace("v","-")},function(e){return e.replace(/,?\s*(\d)/,"-$1")},function(e){return e.replace(/,?\s*(\d)/,"-$1.0")},function(e){return e.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2")},function(e){return e.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2.0")},function(e){return e[0].toUpperCase()+e.slice(1)},function(e){return e.replace("/","-")},function(e){return e.replace(/\s*V\s*(\d)/,"-$1").replace(/(\d)$/,"$1.0")},function(e){return e.indexOf("3.0")!==-1?e+"-or-later":e+"-only"},function(e){return e+"only"},function(e){return e.replace(/(\d)$/,"-$1.0")},function(e){return e.replace(/(-| )?(\d)$/,"-$2-Clause")},function(e){return e.replace(/(-| )clause(-| )(\d)/,"-$3-Clause")},function(e){return e.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,"BSD-3-Clause")},function(e){return e.replace(/\bSimplified(-| )?BSD((-| )License)?/i,"BSD-2-Clause")},function(e){return e.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i,"BSD-2-Clause-$1BSD")},function(e){return e.replace(/\bClear(-| )?BSD((-| )License)?/i,"BSD-3-Clause-Clear")},function(e){return e.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i,"BSD-4-Clause")},function(e){return"CC-"+e},function(e){return"CC-"+e+"-4.0"},function(e){return e.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")},function(e){return"CC-"+e.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")+"-4.0"}],gi=Nf.map(function(e){var t=/^(.*)-\d+\.\d+$/.exec(e);return t?[t[0],t[1]]:[e,null]}).reduce(function(e,t){var r=t[1];return e[r]=e[r]||[],e[r].push(t[0]),e},{}),Uf=Object.keys(gi).map(function(t){return[t,gi[t]]}).filter(function(t){return t[1].length===1&&t[0]!==null&&t[0]!=="APL"}).map(function(t){return[t[0],t[1][0]]});gi=void 0;var mu=[["UNLI","Unlicense"],["WTF","WTFPL"],["2 CLAUSE","BSD-2-Clause"],["2-CLAUSE","BSD-2-Clause"],["3 CLAUSE","BSD-3-Clause"],["3-CLAUSE","BSD-3-Clause"],["AFFERO","AGPL-3.0-or-later"],["AGPL","AGPL-3.0-or-later"],["APACHE","Apache-2.0"],["ARTISTIC","Artistic-2.0"],["Affero","AGPL-3.0-or-later"],["BEER","Beerware"],["BOOST","BSL-1.0"],["BSD","BSD-2-Clause"],["CDDL","CDDL-1.1"],["ECLIPSE","EPL-1.0"],["FUCK","WTFPL"],["GNU","GPL-3.0-or-later"],["LGPL","LGPL-3.0-or-later"],["GPLV1","GPL-1.0-only"],["GPL-1","GPL-1.0-only"],["GPLV2","GPL-2.0-only"],["GPL-2","GPL-2.0-only"],["GPL","GPL-3.0-or-later"],["MIT +NO-FALSE-ATTRIBS","MITNFA"],["MIT","MIT"],["MPL","MPL-2.0"],["X11","X11"],["ZLIB","Zlib"]].concat(Uf).sort(bu),Gf=0,jf=1,gu=function(e){for(var t=0;t<pu.length;t++){var r=pu[t](e).trim();if(r!==e&&vr(r))return r}return null},yu=function(e){for(var t=e.toUpperCase(),r=0;r<mu.length;r++){var n=mu[r];if(t.indexOf(n[Gf])>-1)return n[jf]}return null},Su=function(e,t){for(var r=0;r<fu.length;r++){var n=fu[r],i=n[Bf];if(e.indexOf(i)>-1){var o=e.replace(i,n[_f]),u=t(o);if(u!==null)return u}}return null};vu.exports=function(e,t){t=t||{};var r=t.upgrade===void 0?!0:!!t.upgrade;function n(h){return r?$f(h):h}var i=typeof e=="string"&&e.trim().length!==0;if(!i)throw Error("Invalid argument. Expected non-empty string.");if(e=e.trim(),vr(e))return n(e);var o=e.replace(/\+$/,"").trim();if(vr(o))return n(o);var u=gu(e);return u!==null||(u=Su(e,function(h){return vr(h)?h:gu(h)}),u!==null)||(u=yu(e),u!==null)||(u=Su(e,yu),u!==null)?n(u):null};function $f(e){return["GPL-1.0","LGPL-1.0","AGPL-1.0","GPL-2.0","LGPL-2.0","AGPL-2.0","LGPL-2.1"].indexOf(e)!==-1?e+"-only":["GPL-1.0+","GPL-2.0+","GPL-3.0+","LGPL-2.0+","LGPL-2.1+","LGPL-3.0+","AGPL-1.0+","AGPL-3.0+"].indexOf(e)!==-1?e.replace(/\+$/,"-or-later"):["GPL-3.0","LGPL-3.0","AGPL-3.0"].indexOf(e)!==-1?e+"-or-later":e}});var Cu=L((nS,Au)=>{b();var qf=mi(),Hf=xu(),Eu='license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"',Wf=/^SEE LICEN[CS]E IN (.+)$/;function Du(e,t){return t.slice(0,e.length)===e}function yi(e){if(e.hasOwnProperty("license")){var t=e.license;return Du("LicenseRef",t)||Du("DocumentRef",t)}else return yi(e.left)||yi(e.right)}Au.exports=function(e){var t;try{t=qf(e)}catch{var r;if(e==="UNLICENSED"||e==="UNLICENCED")return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(r=Wf.exec(e))return{validForOldPackages:!0,validForNewPackages:!0,inFile:r[1]};var n={validForOldPackages:!1,validForNewPackages:!1,warnings:[Eu]};if(e.trim().length!==0){var i=Hf(e);i&&n.warnings.push('license is similar to the valid expression "'+i+'"')}return n}return yi(t)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[Eu]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}}});var Fu=L(Er=>{"use strict";b();Object.defineProperty(Er,"__esModule",{value:!0});Er.LRUCache=void 0;var st=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,ku=new Set,Si=typeof process=="object"&&process?process:{},Tu=(e,t,r,n)=>{typeof Si.emitWarning=="function"?Si.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)},xr=globalThis.AbortController,wu=globalThis.AbortSignal;if(typeof xr>"u"){wu=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(n,i){this._onabort.push(i)}},xr=class{constructor(){t()}signal=new wu;abort(n){if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let i of this.signal._onabort)i(n);this.signal.onabort?.(n)}}};let e=Si.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{e&&(e=!1,Tu("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var zf=e=>!ku.has(e),aS=Symbol("type"),Me=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Iu=e=>Me(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?ot:null:null,ot=class extends Array{constructor(t){super(t),this.fill(0)}},bi=class e{heap;length;static#n=!1;static create(t){let r=Iu(t);if(!r)return[];e.#n=!0;let n=new e(t,r);return e.#n=!1,n}constructor(t,r){if(!e.#n)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},vi=class e{#n;#s;#t;#f;#C;#w;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#y;#o;#i;#e;#d;#p;#c;#u;#S;#l;#b;#v;#m;#x;#T;#h;static unsafeExposeInternals(t){return{starts:t.#v,ttls:t.#m,sizes:t.#b,keyMap:t.#o,keyList:t.#i,valList:t.#e,next:t.#d,prev:t.#p,get head(){return t.#c},get tail(){return t.#u},free:t.#S,isBackgroundFetch:r=>t.#r(r),backgroundFetch:(r,n,i,o)=>t.#M(r,n,i,o),moveToTail:r=>t.#R(r),indexes:r=>t.#E(r),rindexes:r=>t.#D(r),isStale:r=>t.#g(r)}}get max(){return this.#n}get maxSize(){return this.#s}get calculatedSize(){return this.#y}get size(){return this.#a}get fetchMethod(){return this.#C}get memoMethod(){return this.#w}get dispose(){return this.#t}get disposeAfter(){return this.#f}constructor(t){let{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:u,updateAgeOnHas:h,allowStale:p,dispose:g,disposeAfter:f,noDisposeOnSet:m,noUpdateTTL:d,maxSize:s=0,maxEntrySize:a=0,sizeCalculation:l,fetchMethod:c,memoMethod:y,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:D,allowStaleOnFetchAbort:A,ignoreFetchAbort:T}=t;if(r!==0&&!Me(r))throw new TypeError("max option must be a nonnegative integer");let F=r?Iu(r):Array;if(!F)throw new Error("invalid max value: "+r);if(this.#n=r,this.#s=s,this.maxEntrySize=a||this.#s,this.sizeCalculation=l,this.sizeCalculation){if(!this.#s&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(y!==void 0&&typeof y!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#w=y,c!==void 0&&typeof c!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#C=c,this.#T=!!c,this.#o=new Map,this.#i=new Array(r).fill(void 0),this.#e=new Array(r).fill(void 0),this.#d=new F(r),this.#p=new F(r),this.#c=0,this.#u=0,this.#S=bi.create(r),this.#a=0,this.#y=0,typeof g=="function"&&(this.#t=g),typeof f=="function"?(this.#f=f,this.#l=[]):(this.#f=void 0,this.#l=void 0),this.#x=!!this.#t,this.#h=!!this.#f,this.noDisposeOnSet=!!m,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!S,this.allowStaleOnFetchRejection=!!D,this.allowStaleOnFetchAbort=!!A,this.ignoreFetchAbort=!!T,this.maxEntrySize!==0){if(this.#s!==0&&!Me(this.#s))throw new TypeError("maxSize must be a positive integer if specified");if(!Me(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#j()}if(this.allowStale=!!p,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!u,this.updateAgeOnHas=!!h,this.ttlResolution=Me(i)||i===0?i:1,this.ttlAutopurge=!!o,this.ttl=n||0,this.ttl){if(!Me(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#O()}if(this.#n===0&&this.ttl===0&&this.#s===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#n&&!this.#s){let N="LRU_CACHE_UNBOUNDED";zf(N)&&(ku.add(N),Tu("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",N,e))}}getRemainingTTL(t){return this.#o.has(t)?1/0:0}#O(){let t=new ot(this.#n),r=new ot(this.#n);this.#m=t,this.#v=r,this.#N=(o,u,h=st.now())=>{if(r[o]=u!==0?h:0,t[o]=u,u!==0&&this.ttlAutopurge){let p=setTimeout(()=>{this.#g(o)&&this.#A(this.#i[o],"expire")},u+1);p.unref&&p.unref()}},this.#I=o=>{r[o]=t[o]!==0?st.now():0},this.#k=(o,u)=>{if(t[u]){let h=t[u],p=r[u];if(!h||!p)return;o.ttl=h,o.start=p,o.now=n||i();let g=o.now-p;o.remainingTTL=h-g}};let n=0,i=()=>{let o=st.now();if(this.ttlResolution>0){n=o;let u=setTimeout(()=>n=0,this.ttlResolution);u.unref&&u.unref()}return o};this.getRemainingTTL=o=>{let u=this.#o.get(o);if(u===void 0)return 0;let h=t[u],p=r[u];if(!h||!p)return 1/0;let g=(n||i())-p;return h-g},this.#g=o=>{let u=r[o],h=t[o];return!!h&&!!u&&(n||i())-u>h}}#I=()=>{};#k=()=>{};#N=()=>{};#g=()=>!1;#j(){let t=new ot(this.#n);this.#y=0,this.#b=t,this.#F=r=>{this.#y-=t[r],t[r]=0},this.#B=(r,n,i,o)=>{if(this.#r(n))return 0;if(!Me(i))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(i=o(n,r),!Me(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#L=(r,n,i)=>{if(t[r]=n,this.#s){let o=this.#s-t[r];for(;this.#y>o;)this.#P(!0)}this.#y+=t[r],i&&(i.entrySize=n,i.totalCalculatedSize=this.#y)}}#F=t=>{};#L=(t,r,n)=>{};#B=(t,r,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#E({allowStale:t=this.allowStale}={}){if(this.#a)for(let r=this.#u;!(!this.#_(r)||((t||!this.#g(r))&&(yield r),r===this.#c));)r=this.#p[r]}*#D({allowStale:t=this.allowStale}={}){if(this.#a)for(let r=this.#c;!(!this.#_(r)||((t||!this.#g(r))&&(yield r),r===this.#u));)r=this.#d[r]}#_(t){return t!==void 0&&this.#o.get(this.#i[t])===t}*entries(){for(let t of this.#E())this.#e[t]!==void 0&&this.#i[t]!==void 0&&!this.#r(this.#e[t])&&(yield[this.#i[t],this.#e[t]])}*rentries(){for(let t of this.#D())this.#e[t]!==void 0&&this.#i[t]!==void 0&&!this.#r(this.#e[t])&&(yield[this.#i[t],this.#e[t]])}*keys(){for(let t of this.#E()){let r=this.#i[t];r!==void 0&&!this.#r(this.#e[t])&&(yield r)}}*rkeys(){for(let t of this.#D()){let r=this.#i[t];r!==void 0&&!this.#r(this.#e[t])&&(yield r)}}*values(){for(let t of this.#E())this.#e[t]!==void 0&&!this.#r(this.#e[t])&&(yield this.#e[t])}*rvalues(){for(let t of this.#D())this.#e[t]!==void 0&&!this.#r(this.#e[t])&&(yield this.#e[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,r={}){for(let n of this.#E()){let i=this.#e[n],o=this.#r(i)?i.__staleWhileFetching:i;if(o!==void 0&&t(o,this.#i[n],this))return this.get(this.#i[n],r)}}forEach(t,r=this){for(let n of this.#E()){let i=this.#e[n],o=this.#r(i)?i.__staleWhileFetching:i;o!==void 0&&t.call(r,o,this.#i[n],this)}}rforEach(t,r=this){for(let n of this.#D()){let i=this.#e[n],o=this.#r(i)?i.__staleWhileFetching:i;o!==void 0&&t.call(r,o,this.#i[n],this)}}purgeStale(){let t=!1;for(let r of this.#D({allowStale:!0}))this.#g(r)&&(this.#A(this.#i[r],"expire"),t=!0);return t}info(t){let r=this.#o.get(t);if(r===void 0)return;let n=this.#e[r],i=this.#r(n)?n.__staleWhileFetching:n;if(i===void 0)return;let o={value:i};if(this.#m&&this.#v){let u=this.#m[r],h=this.#v[r];if(u&&h){let p=u-(st.now()-h);o.ttl=p,o.start=Date.now()}}return this.#b&&(o.size=this.#b[r]),o}dump(){let t=[];for(let r of this.#E({allowStale:!0})){let n=this.#i[r],i=this.#e[r],o=this.#r(i)?i.__staleWhileFetching:i;if(o===void 0||n===void 0)continue;let u={value:o};if(this.#m&&this.#v){u.ttl=this.#m[r];let h=st.now()-this.#v[r];u.start=Math.floor(Date.now()-h)}this.#b&&(u.size=this.#b[r]),t.unshift([n,u])}return t}load(t){this.clear();for(let[r,n]of t){if(n.start){let i=Date.now()-n.start;n.start=st.now()-i}this.set(r,n.value,n)}}set(t,r,n={}){if(r===void 0)return this.delete(t),this;let{ttl:i=this.ttl,start:o,noDisposeOnSet:u=this.noDisposeOnSet,sizeCalculation:h=this.sizeCalculation,status:p}=n,{noUpdateTTL:g=this.noUpdateTTL}=n,f=this.#B(t,r,n.size||0,h);if(this.maxEntrySize&&f>this.maxEntrySize)return p&&(p.set="miss",p.maxEntrySizeExceeded=!0),this.#A(t,"set"),this;let m=this.#a===0?void 0:this.#o.get(t);if(m===void 0)m=this.#a===0?this.#u:this.#S.length!==0?this.#S.pop():this.#a===this.#n?this.#P(!1):this.#a,this.#i[m]=t,this.#e[m]=r,this.#o.set(t,m),this.#d[this.#u]=m,this.#p[m]=this.#u,this.#u=m,this.#a++,this.#L(m,f,p),p&&(p.set="add"),g=!1;else{this.#R(m);let d=this.#e[m];if(r!==d){if(this.#T&&this.#r(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:s}=d;s!==void 0&&!u&&(this.#x&&this.#t?.(s,t,"set"),this.#h&&this.#l?.push([s,t,"set"]))}else u||(this.#x&&this.#t?.(d,t,"set"),this.#h&&this.#l?.push([d,t,"set"]));if(this.#F(m),this.#L(m,f,p),this.#e[m]=r,p){p.set="replace";let s=d&&this.#r(d)?d.__staleWhileFetching:d;s!==void 0&&(p.oldValue=s)}}else p&&(p.set="update")}if(i!==0&&!this.#m&&this.#O(),this.#m&&(g||this.#N(m,i,o),p&&this.#k(p,m)),!u&&this.#h&&this.#l){let d=this.#l,s;for(;s=d?.shift();)this.#f?.(...s)}return this}pop(){try{for(;this.#a;){let t=this.#e[this.#c];if(this.#P(!0),this.#r(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#h&&this.#l){let t=this.#l,r;for(;r=t?.shift();)this.#f?.(...r)}}}#P(t){let r=this.#c,n=this.#i[r],i=this.#e[r];return this.#T&&this.#r(i)?i.__abortController.abort(new Error("evicted")):(this.#x||this.#h)&&(this.#x&&this.#t?.(i,n,"evict"),this.#h&&this.#l?.push([i,n,"evict"])),this.#F(r),t&&(this.#i[r]=void 0,this.#e[r]=void 0,this.#S.push(r)),this.#a===1?(this.#c=this.#u=0,this.#S.length=0):this.#c=this.#d[r],this.#o.delete(n),this.#a--,r}has(t,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=r,o=this.#o.get(t);if(o!==void 0){let u=this.#e[o];if(this.#r(u)&&u.__staleWhileFetching===void 0)return!1;if(this.#g(o))i&&(i.has="stale",this.#k(i,o));else return n&&this.#I(o),i&&(i.has="hit",this.#k(i,o)),!0}else i&&(i.has="miss");return!1}peek(t,r={}){let{allowStale:n=this.allowStale}=r,i=this.#o.get(t);if(i===void 0||!n&&this.#g(i))return;let o=this.#e[i];return this.#r(o)?o.__staleWhileFetching:o}#M(t,r,n,i){let o=r===void 0?void 0:this.#e[r];if(this.#r(o))return o;let u=new xr,{signal:h}=n;h?.addEventListener("abort",()=>u.abort(h.reason),{signal:u.signal});let p={signal:u.signal,options:n,context:i},g=(l,c=!1)=>{let{aborted:y}=u.signal,S=n.ignoreFetchAbort&&l!==void 0;if(n.status&&(y&&!c?(n.status.fetchAborted=!0,n.status.fetchError=u.signal.reason,S&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),y&&!S&&!c)return m(u.signal.reason);let E=s;return this.#e[r]===s&&(l===void 0?E.__staleWhileFetching?this.#e[r]=E.__staleWhileFetching:this.#A(t,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(t,l,p.options))),l},f=l=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=l),m(l)),m=l=>{let{aborted:c}=u.signal,y=c&&n.allowStaleOnFetchAbort,S=y||n.allowStaleOnFetchRejection,E=S||n.noDeleteOnFetchRejection,D=s;if(this.#e[r]===s&&(!E||D.__staleWhileFetching===void 0?this.#A(t,"fetch"):y||(this.#e[r]=D.__staleWhileFetching)),S)return n.status&&D.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),D.__staleWhileFetching;if(D.__returned===D)throw l},d=(l,c)=>{let y=this.#C?.(t,o,p);y&&y instanceof Promise&&y.then(S=>l(S===void 0?void 0:S),c),u.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(l(void 0),n.allowStaleOnFetchAbort&&(l=S=>g(S,!0)))})};n.status&&(n.status.fetchDispatched=!0);let s=new Promise(d).then(g,f),a=Object.assign(s,{__abortController:u,__staleWhileFetching:o,__returned:void 0});return r===void 0?(this.set(t,a,{...p.options,status:void 0}),r=this.#o.get(t)):this.#e[r]=a,a}#r(t){if(!this.#T)return!1;let r=t;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof xr}async fetch(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:u=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:p=0,sizeCalculation:g=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:m=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:s=this.ignoreFetchAbort,allowStaleOnFetchAbort:a=this.allowStaleOnFetchAbort,context:l,forceRefresh:c=!1,status:y,signal:S}=r;if(!this.#T)return y&&(y.fetch="get"),this.get(t,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,status:y});let E={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,ttl:u,noDisposeOnSet:h,size:p,sizeCalculation:g,noUpdateTTL:f,noDeleteOnFetchRejection:m,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:a,ignoreFetchAbort:s,status:y,signal:S},D=this.#o.get(t);if(D===void 0){y&&(y.fetch="miss");let A=this.#M(t,D,E,l);return A.__returned=A}else{let A=this.#e[D];if(this.#r(A)){let H=n&&A.__staleWhileFetching!==void 0;return y&&(y.fetch="inflight",H&&(y.returnedStale=!0)),H?A.__staleWhileFetching:A.__returned=A}let T=this.#g(D);if(!c&&!T)return y&&(y.fetch="hit"),this.#R(D),i&&this.#I(D),y&&this.#k(y,D),A;let F=this.#M(t,D,E,l),G=F.__staleWhileFetching!==void 0&&n;return y&&(y.fetch=T?"stale":"refresh",G&&T&&(y.returnedStale=!0)),G?F.__staleWhileFetching:F.__returned=F}}async forceFetch(t,r={}){let n=await this.fetch(t,r);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(t,r={}){let n=this.#w;if(!n)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:o,...u}=r,h=this.get(t,u);if(!o&&h!==void 0)return h;let p=n(t,h,{options:u,context:i});return this.set(t,p,u),p}get(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:u}=r,h=this.#o.get(t);if(h!==void 0){let p=this.#e[h],g=this.#r(p);return u&&this.#k(u,h),this.#g(h)?(u&&(u.get="stale"),g?(u&&n&&p.__staleWhileFetching!==void 0&&(u.returnedStale=!0),n?p.__staleWhileFetching:void 0):(o||this.#A(t,"expire"),u&&n&&(u.returnedStale=!0),n?p:void 0)):(u&&(u.get="hit"),g?p.__staleWhileFetching:(this.#R(h),i&&this.#I(h),p))}else u&&(u.get="miss")}#U(t,r){this.#p[r]=t,this.#d[t]=r}#R(t){t!==this.#u&&(t===this.#c?this.#c=this.#d[t]:this.#U(this.#p[t],this.#d[t]),this.#U(this.#u,t),this.#u=t)}delete(t){return this.#A(t,"delete")}#A(t,r){let n=!1;if(this.#a!==0){let i=this.#o.get(t);if(i!==void 0)if(n=!0,this.#a===1)this.#G(r);else{this.#F(i);let o=this.#e[i];if(this.#r(o)?o.__abortController.abort(new Error("deleted")):(this.#x||this.#h)&&(this.#x&&this.#t?.(o,t,r),this.#h&&this.#l?.push([o,t,r])),this.#o.delete(t),this.#i[i]=void 0,this.#e[i]=void 0,i===this.#u)this.#u=this.#p[i];else if(i===this.#c)this.#c=this.#d[i];else{let u=this.#p[i];this.#d[u]=this.#d[i];let h=this.#d[i];this.#p[h]=this.#p[i]}this.#a--,this.#S.push(i)}}if(this.#h&&this.#l?.length){let i=this.#l,o;for(;o=i?.shift();)this.#f?.(...o)}return n}clear(){return this.#G("delete")}#G(t){for(let r of this.#D({allowStale:!0})){let n=this.#e[r];if(this.#r(n))n.__abortController.abort(new Error("deleted"));else{let i=this.#i[r];this.#x&&this.#t?.(n,i,t),this.#h&&this.#l?.push([n,i,t])}}if(this.#o.clear(),this.#e.fill(void 0),this.#i.fill(void 0),this.#m&&this.#v&&(this.#m.fill(0),this.#v.fill(0)),this.#b&&this.#b.fill(0),this.#c=0,this.#u=0,this.#S.length=0,this.#y=0,this.#a=0,this.#h&&this.#l){let r=this.#l,n;for(;n=r?.shift();)this.#f?.(...n)}}};Er.LRUCache=vi});var Pu=L((cS,Lu)=>{"use strict";b();var U=(...e)=>e.every(t=>t)?e.join(""):"",W=e=>e?encodeURIComponent(e):"",Ru=e=>e.toLowerCase().replace(/^\W+/g,"").replace(/(?<!\W)\W+$/,"").replace(/\//g,"").replace(/\W+/g,"-"),Xf={sshtemplate:({domain:e,user:t,project:r,committish:n})=>`git@${e}:${t}/${r}.git${U("#",n)}`,sshurltemplate:({domain:e,user:t,project:r,committish:n})=>`git+ssh://git@${e}/${t}/${r}.git${U("#",n)}`,edittemplate:({domain:e,user:t,project:r,committish:n,editpath:i,path:o})=>`https://${e}/${t}/${r}${U("/",i,"/",W(n||"HEAD"),"/",o)}`,browsetemplate:({domain:e,user:t,project:r,committish:n,treepath:i})=>`https://${e}/${t}/${r}${U("/",i,"/",W(n))}`,browsetreetemplate:({domain:e,user:t,project:r,committish:n,treepath:i,path:o,fragment:u,hashformat:h})=>`https://${e}/${t}/${r}/${i}/${W(n||"HEAD")}/${o}${U("#",h(u||""))}`,browseblobtemplate:({domain:e,user:t,project:r,committish:n,blobpath:i,path:o,fragment:u,hashformat:h})=>`https://${e}/${t}/${r}/${i}/${W(n||"HEAD")}/${o}${U("#",h(u||""))}`,docstemplate:({domain:e,user:t,project:r,treepath:n,committish:i})=>`https://${e}/${t}/${r}${U("/",n,"/",W(i))}#readme`,httpstemplate:({auth:e,domain:t,user:r,project:n,committish:i})=>`git+https://${U(e,"@")}${t}/${r}/${n}.git${U("#",i)}`,filetemplate:({domain:e,user:t,project:r,committish:n,path:i})=>`https://${e}/${t}/${r}/raw/${W(n||"HEAD")}/${i}`,shortcuttemplate:({type:e,user:t,project:r,committish:n})=>`${e}:${t}/${r}${U("#",n)}`,pathtemplate:({user:e,project:t,committish:r})=>`${e}/${t}${U("#",r)}`,bugstemplate:({domain:e,user:t,project:r})=>`https://${e}/${t}/${r}/issues`,hashformat:Ru},Oe={};Oe.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:e,user:t,project:r,committish:n,path:i})=>`https://${U(e,"@")}raw.githubusercontent.com/${t}/${r}/${W(n||"HEAD")}/${i}`,gittemplate:({auth:e,domain:t,user:r,project:n,committish:i})=>`git://${U(e,"@")}${t}/${r}/${n}.git${U("#",i)}`,tarballtemplate:({domain:e,user:t,project:r,committish:n})=>`https://codeload.${e}/${t}/${r}/tar.gz/${W(n||"HEAD")}`,extract:e=>{let[,t,r,n,i]=e.pathname.split("/",5);if(!(n&&n!=="tree")&&(n||(i=e.hash.slice(1)),r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!t||!r)))return{user:t,project:r,committish:i}}};Oe.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:e,user:t,project:r,committish:n,treepath:i,path:o,editpath:u})=>`https://${e}/${t}/${r}${U("/",i,"/",W(n||"HEAD"),"/",o,u)}`,tarballtemplate:({domain:e,user:t,project:r,committish:n})=>`https://${e}/${t}/${r}/get/${W(n||"HEAD")}.tar.gz`,extract:e=>{let[,t,r,n]=e.pathname.split("/",4);if(!["get"].includes(n)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!t||!r)))return{user:t,project:r,committish:e.hash.slice(1)}}};Oe.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:({auth:e,domain:t,user:r,project:n,committish:i})=>`git+https://${U(e,"@")}${t}/${r}/${n}.git${U("#",i)}`,tarballtemplate:({domain:e,user:t,project:r,committish:n})=>`https://${e}/${t}/${r}/repository/archive.tar.gz?ref=${W(n||"HEAD")}`,extract:e=>{let t=e.pathname.slice(1);if(t.includes("/-/")||t.includes("/archive.tar.gz"))return;let r=t.split("/"),n=r.pop();n.endsWith(".git")&&(n=n.slice(0,-4));let i=r.join("/");if(!(!i||!n))return{user:i,project:n,committish:e.hash.slice(1)}}};Oe.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:e,project:t,committish:r})=>`git@${e}:${t}.git${U("#",r)}`,sshurltemplate:({domain:e,project:t,committish:r})=>`git+ssh://git@${e}/${t}.git${U("#",r)}`,edittemplate:({domain:e,user:t,project:r,committish:n,editpath:i})=>`https://${e}/${t}/${r}${U("/",W(n))}/${i}`,browsetemplate:({domain:e,project:t,committish:r})=>`https://${e}/${t}${U("/",W(r))}`,browsetreetemplate:({domain:e,project:t,committish:r,path:n,hashformat:i})=>`https://${e}/${t}${U("/",W(r))}${U("#",i(n))}`,browseblobtemplate:({domain:e,project:t,committish:r,path:n,hashformat:i})=>`https://${e}/${t}${U("/",W(r))}${U("#",i(n))}`,docstemplate:({domain:e,project:t,committish:r})=>`https://${e}/${t}${U("/",W(r))}`,httpstemplate:({domain:e,project:t,committish:r})=>`git+https://${e}/${t}.git${U("#",r)}`,filetemplate:({user:e,project:t,committish:r,path:n})=>`https://gist.githubusercontent.com/${e}/${t}/raw${U("/",W(r))}/${n}`,shortcuttemplate:({type:e,project:t,committish:r})=>`${e}:${t}${U("#",r)}`,pathtemplate:({project:e,committish:t})=>`${e}${U("#",t)}`,bugstemplate:({domain:e,project:t})=>`https://${e}/${t}`,gittemplate:({domain:e,project:t,committish:r})=>`git://${e}/${t}.git${U("#",r)}`,tarballtemplate:({project:e,committish:t})=>`https://codeload.github.com/gist/${e}/tar.gz/${W(t||"HEAD")}`,extract:e=>{let[,t,r,n]=e.pathname.split("/",4);if(n!=="raw"){if(!r){if(!t)return;r=t,t=null}return r.endsWith(".git")&&(r=r.slice(0,-4)),{user:t,project:r,committish:e.hash.slice(1)}}},hashformat:function(e){return e&&"file-"+Ru(e)}};Oe.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:e,user:t,project:r,committish:n,path:i})=>`https://${e}/${t}/${r}/blob/${W(n)||"HEAD"}/${i}`,httpstemplate:({domain:e,user:t,project:r,committish:n})=>`https://${e}/${t}/${r}.git${U("#",n)}`,tarballtemplate:({domain:e,user:t,project:r,committish:n})=>`https://${e}/${t}/${r}/archive/${W(n)||"HEAD"}.tar.gz`,bugstemplate:()=>null,extract:e=>{let[,t,r,n]=e.pathname.split("/",4);if(!["archive"].includes(n)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!t||!r)))return{user:t,project:r,committish:e.hash.slice(1)}}};for(let[e,t]of Object.entries(Oe))Oe[e]=Object.assign({},Xf,t);Lu.exports=Oe});var Ei=L((hS,Ou)=>{b();var Vf=ht("url"),xi=(e,t,r)=>{let n=e.indexOf(r);return e.lastIndexOf(t,n>-1?n:1/0)},Mu=e=>{try{return new Vf.URL(e)}catch{}},Jf=(e,t)=>{let r=e.indexOf(":"),n=e.slice(0,r+1);if(Object.prototype.hasOwnProperty.call(t,n))return e;let i=e.indexOf("@");return i>-1?i>r?`git+ssh://${e}`:e:e.indexOf("//")===r+1?e:`${e.slice(0,r+1)}//${e.slice(r+1)}`},Kf=e=>{let t=xi(e,"@","#"),r=xi(e,":","#");return r>t&&(e=e.slice(0,r)+"/"+e.slice(r+1)),xi(e,":","#")===-1&&e.indexOf("//")===-1&&(e=`git+ssh://${e}`),e};Ou.exports=(e,t)=>{let r=t?Jf(e,t):e;return Mu(r)||Mu(Kf(r))}});var Bu=L((pS,Nu)=>{"use strict";b();var Yf=Ei(),Qf=e=>{let t=e.indexOf("#"),r=e.indexOf("/"),n=e.indexOf("/",r+1),i=e.indexOf(":"),o=/\s/.exec(e),u=e.indexOf("@"),h=!o||t>-1&&o.index>t,p=u===-1||t>-1&&u>t,g=i===-1||t>-1&&i>t,f=n===-1||t>-1&&n>t,m=r>0,d=t>-1?e[t-1]!=="/":!e.endsWith("/"),s=!e.startsWith(".");return h&&m&&d&&s&&p&&g&&f};Nu.exports=(e,t,{gitHosts:r,protocols:n})=>{if(!e)return;let i=Qf(e)?`github:${e}`:e,o=Yf(i,n);if(!o)return;let u=r.byShortcut[o.protocol],h=r.byDomain[o.hostname.startsWith("www.")?o.hostname.slice(4):o.hostname],p=u||h;if(!p)return;let g=r[u||h],f=null;n[o.protocol]?.auth&&(o.username||o.password)&&(f=`${o.username}${o.password?":"+o.password:""}`);let m=null,d=null,s=null,a=null;try{if(u){let l=o.pathname.startsWith("/")?o.pathname.slice(1):o.pathname,c=l.indexOf("@");c>-1&&(l=l.slice(c+1));let y=l.lastIndexOf("/");y>-1?(d=decodeURIComponent(l.slice(0,y)),d||(d=null),s=decodeURIComponent(l.slice(y+1))):s=decodeURIComponent(l),s.endsWith(".git")&&(s=s.slice(0,-4)),o.hash&&(m=decodeURIComponent(o.hash.slice(1))),a="shortcut"}else{if(!g.protocols.includes(o.protocol))return;let l=g.extract(o);if(!l)return;d=l.user&&decodeURIComponent(l.user),s=decodeURIComponent(l.project),m=decodeURIComponent(l.committish),a=n[o.protocol]?.name||o.protocol.slice(0,-1)}}catch(l){if(l instanceof URIError)return;throw l}return[p,d,f,s,m,a,t]}});var Uu=L((gS,_u)=>{"use strict";b();var{LRUCache:Zf}=Fu(),ep=Pu(),tp=Bu(),rp=Ei(),Di=new Zf({max:1e3});function np(e){try{let{protocol:t,hostname:r,pathname:n}=new URL(e);if(!r)return null;let i=/(?:git\+)http:$/.test(t)?"http:":"https:",o=n.replace(/\.git$/,"");return`${i}//${r}${o}`}catch{return null}}var Dr=class e{constructor(t,r,n,i,o,u,h={}){Object.assign(this,e.#n[t],{type:t,user:r,auth:n,project:i,committish:o,default:u,opts:h})}static#n={byShortcut:{},byDomain:{}};static#s={"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(t,r){e.#n[t]=r,e.#n.byDomain[r.domain]=t,e.#n.byShortcut[`${t}:`]=t,e.#s[`${t}:`]={name:t}}static fromUrl(t,r){if(typeof t!="string")return;let n=t+JSON.stringify(r||{});if(!Di.has(n)){let i=tp(t,r,{gitHosts:e.#n,protocols:e.#s});Di.set(n,i?new e(...i):void 0)}return Di.get(n)}static fromManifest(t,r={}){if(!t||typeof t!="object")return;let n=t.repository,i=n&&(typeof n=="string"?n:typeof n=="object"&&typeof n.url=="string"?n.url:null);if(!i)throw new Error("no repository");let o=i&&e.fromUrl(i.replace(/^git\+/,""),r)||null;if(o)return o;let u=np(i);return e.fromUrl(u,r)||u}static parseUrl(t){return rp(t)}#t(t,r){if(typeof t!="function")return null;let n={...this,...this.opts,...r};n.path||(n.path=""),n.path.startsWith("/")&&(n.path=n.path.slice(1)),n.noCommittish&&(n.committish=null);let i=t(n);return n.noGitPlus&&i.startsWith("git+")?i.slice(4):i}hash(){return this.committish?`#${this.committish}`:""}ssh(t){return this.#t(this.sshtemplate,t)}sshurl(t){return this.#t(this.sshurltemplate,t)}browse(t,...r){return typeof t!="string"?this.#t(this.browsetemplate,t):typeof r[0]!="string"?this.#t(this.browsetreetemplate,{...r[0],path:t}):this.#t(this.browsetreetemplate,{...r[1],fragment:r[0],path:t})}browseFile(t,...r){return typeof r[0]!="string"?this.#t(this.browseblobtemplate,{...r[0],path:t}):this.#t(this.browseblobtemplate,{...r[1],fragment:r[0],path:t})}docs(t){return this.#t(this.docstemplate,t)}bugs(t){return this.#t(this.bugstemplate,t)}https(t){return this.#t(this.httpstemplate,t)}git(t){return this.#t(this.gittemplate,t)}shortcut(t){return this.#t(this.shortcuttemplate,t)}path(t){return this.#t(this.pathtemplate,t)}tarball(t){return this.#t(this.tarballtemplate,{...t,noCommittish:!1})}file(t,r){return this.#t(this.filetemplate,{...r,path:t})}edit(t,r){return this.#t(this.edittemplate,{...r,path:t})}getDefaultRepresentation(){return this.default}toString(t){return this.default&&typeof this[this.default]=="function"?this[this.default](t):this.sshurl(t)}};for(let[e,t]of Object.entries(ep))Dr.addHost(e,t);_u.exports=Dr});var ju=L((SS,Gu)=>{b();Gu.exports=ip;function ip(e){if(!e||e==="ERROR: No README data found!")return;e=e.trim().split(`
|
|
18
|
-
`);let t=0;for(;e[t]&&e[t].trim().match(/^(#|$)/);)t++;let r=e.length,n=t+1;for(;n<r&&e[n].trim();)n++;return e.slice(t,n).join(" ").trim()}});var $u=L((vS,sp)=>{sp.exports={topLevel:{dependancies:"dependencies",dependecies:"dependencies",depdenencies:"dependencies",devEependencies:"devDependencies",depends:"dependencies","dev-dependencies":"devDependencies",devDependences:"devDependencies",devDepenencies:"devDependencies",devdependencies:"devDependencies",repostitory:"repository",repo:"repository",prefereGlobal:"preferGlobal",hompage:"homepage",hampage:"homepage",autohr:"author",autor:"author",contributers:"contributors",publicationConfig:"publishConfig",script:"scripts"},bugs:{web:"url",name:"url"},script:{server:"start",tests:"test"}}});var zu=L((xS,Wu)=>{b();var{URL:Ai}=ht("node:url"),op=nu(),ap=su(),up=Cu(),Ar=Uu(),{isBuiltin:lp}=ht("node:module"),cp=["dependencies","devDependencies","optionalDependencies"],dp=ju(),Ne=$u(),qu=e=>e.includes("@")&&e.indexOf("@")<e.lastIndexOf(".");Wu.exports={warn:function(){},fixRepositoryField:function(e){if(e.repositories&&(this.warn("repositories"),e.repository=e.repositories[0]),!e.repository)return this.warn("missingRepository");typeof e.repository=="string"&&(e.repository={type:"git",url:e.repository});var t=e.repository.url||"";if(t){var r=Ar.fromUrl(t);r&&(t=e.repository.url=r.getDefaultRepresentation()==="shortcut"?r.https():r.toString())}t.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)&&this.warn("brokenGitUrl",t)},fixTypos:function(e){Object.keys(Ne.topLevel).forEach(function(t){Object.prototype.hasOwnProperty.call(e,t)&&this.warn("typo",t,Ne.topLevel[t])},this)},fixScriptsField:function(e){if(e.scripts){if(typeof e.scripts!="object"){this.warn("nonObjectScripts"),delete e.scripts;return}Object.keys(e.scripts).forEach(function(t){typeof e.scripts[t]!="string"?(this.warn("nonStringScript"),delete e.scripts[t]):Ne.script[t]&&!e.scripts[Ne.script[t]]&&this.warn("typo",t,Ne.script[t],"scripts")},this)}},fixFilesField:function(e){var t=e.files;t&&!Array.isArray(t)?(this.warn("nonArrayFiles"),delete e.files):e.files&&(e.files=e.files.filter(function(r){return!r||typeof r!="string"?(this.warn("invalidFilename",r),!1):!0},this))},fixBinField:function(e){if(e.bin&&typeof e.bin=="string"){var t={},r;(r=e.name.match(/^@[^/]+[/](.*)$/))?t[r[1]]=e.bin:t[e.name]=e.bin,e.bin=t}},fixManField:function(e){e.man&&typeof e.man=="string"&&(e.man=[e.man])},fixBundleDependenciesField:function(e){var t="bundledDependencies",r="bundleDependencies";e[t]&&!e[r]&&(e[r]=e[t],delete e[t]),e[r]&&!Array.isArray(e[r])?(this.warn("nonArrayBundleDependencies"),delete e[r]):e[r]&&(e[r]=e[r].filter(function(n){return!n||typeof n!="string"?(this.warn("nonStringBundleDependency",n),!1):(e.dependencies||(e.dependencies={}),Object.prototype.hasOwnProperty.call(e.dependencies,n)||(this.warn("nonDependencyBundleDependency",n),e.dependencies[n]="*"),!0)},this))},fixDependencies:function(e){bp(e,this.warn),yp(e,this.warn),this.fixBundleDependenciesField(e),["dependencies","devDependencies"].forEach(function(t){if(t in e){if(!e[t]||typeof e[t]!="object"){this.warn("nonObjectDependencies",t),delete e[t];return}Object.keys(e[t]).forEach(function(r){var n=e[t][r];typeof n!="string"&&(this.warn("nonStringDependency",r,JSON.stringify(n)),delete e[t][r]);var i=Ar.fromUrl(e[t][r]);i&&(e[t][r]=i.toString())},this)}},this)},fixModulesField:function(e){e.modules&&(this.warn("deprecatedModules"),delete e.modules)},fixKeywordsField:function(e){typeof e.keywords=="string"&&(e.keywords=e.keywords.split(/,\s+/)),e.keywords&&!Array.isArray(e.keywords)?(delete e.keywords,this.warn("nonArrayKeywords")):e.keywords&&(e.keywords=e.keywords.filter(function(t){return typeof t!="string"||!t?(this.warn("nonStringKeyword"),!1):!0},this))},fixVersionField:function(e,t){var r=!t;if(!e.version)return e.version="",!0;if(!op(e.version,r))throw new Error('Invalid version: "'+e.version+'"');return e.version=ap(e.version,r),!0},fixPeople:function(e){Hu(e,mp),Hu(e,gp)},fixNameField:function(e,t){typeof t=="boolean"?t={strict:t}:typeof t>"u"&&(t={});var r=t.strict;if(!e.name&&!r){e.name="";return}if(typeof e.name!="string")throw new Error("name field must be a string.");r||(e.name=e.name.trim()),pp(e.name,r,t.allowLegacyCase),lp(e.name)&&this.warn("conflictingName",e.name)},fixDescriptionField:function(e){e.description&&typeof e.description!="string"&&(this.warn("nonStringDescription"),delete e.description),e.readme&&!e.description&&(e.description=dp(e.readme)),e.description===void 0&&delete e.description,e.description||this.warn("missingDescription")},fixReadmeField:function(e){e.readme||(this.warn("missingReadme"),e.readme="ERROR: No README data found!")},fixBugsField:function(e){if(!e.bugs&&e.repository&&e.repository.url){var t=Ar.fromUrl(e.repository.url);t&&t.bugs()&&(e.bugs={url:t.bugs()})}else if(e.bugs){if(typeof e.bugs=="string")qu(e.bugs)?e.bugs={email:e.bugs}:Ai.canParse(e.bugs)?e.bugs={url:e.bugs}:this.warn("nonEmailUrlBugsString");else{vp(e.bugs,this.warn);var r=e.bugs;e.bugs={},r.url&&(Ai.canParse(r.url)?e.bugs.url=r.url:this.warn("nonUrlBugsUrlField")),r.email&&(typeof r.email=="string"&&qu(r.email)?e.bugs.email=r.email:this.warn("nonEmailBugsEmailField"))}!e.bugs.email&&!e.bugs.url&&(delete e.bugs,this.warn("emptyNormalizedBugs"))}},fixHomepageField:function(e){if(!e.homepage&&e.repository&&e.repository.url){var t=Ar.fromUrl(e.repository.url);t&&t.docs()&&(e.homepage=t.docs())}if(e.homepage){if(typeof e.homepage!="string")return this.warn("nonUrlHomepage"),delete e.homepage;Ai.canParse(e.homepage)||(e.homepage="http://"+e.homepage)}},fixLicenseField:function(e){let t=e.license||e.licence;if(!t)return this.warn("missingLicense");if(typeof t!="string"||t.length<1||t.trim()==="")return this.warn("invalidLicense");if(!up(t).validForNewPackages)return this.warn("invalidLicense")}};function hp(e){if(e.charAt(0)!=="@")return!1;var t=e.slice(1).split("/");return t.length!==2?!1:t[0]&&t[1]&&t[0]===encodeURIComponent(t[0])&&t[1]===encodeURIComponent(t[1])}function fp(e){return!e.match(/[/@\s+%:]/)&&e===encodeURIComponent(e)}function pp(e,t,r){if(e.charAt(0)==="."||!(hp(e)||fp(e))||t&&!r&&e!==e.toLowerCase()||e.toLowerCase()==="node_modules"||e.toLowerCase()==="favicon.ico")throw new Error("Invalid name: "+JSON.stringify(e))}function Hu(e,t){return e.author&&(e.author=t(e.author)),["maintainers","contributors"].forEach(function(r){Array.isArray(e[r])&&(e[r]=e[r].map(t))}),e}function mp(e){if(typeof e=="string")return e;var t=e.name||"",r=e.url||e.web,n=r?" ("+r+")":"",i=e.email||e.mail,o=i?" <"+i+">":"";return t+o+n}function gp(e){if(typeof e!="string")return e;var t=e.match(/^([^(<]+)/),r=e.match(/\(([^()]+)\)/),n=e.match(/<([^<>]+)>/),i={};return t&&t[0].trim()&&(i.name=t[0].trim()),n&&(i.email=n[1]),r&&(i.url=r[1]),i}function yp(e){var t=e.optionalDependencies;if(t){var r=e.dependencies||{};Object.keys(t).forEach(function(n){r[n]=t[n]}),e.dependencies=r}}function Sp(e,t,r){if(!e)return{};if(typeof e=="string"&&(e=e.trim().split(/[\n\r\s\t ,]+/)),!Array.isArray(e))return e;r("deprecatedArrayDependencies",t);var n={};return e.filter(function(i){return typeof i=="string"}).forEach(function(i){i=i.trim().split(/(:?[@\s><=])/);var o=i.shift(),u=i.join("");u=u.trim(),u=u.replace(/^@/,""),n[o]=u}),n}function bp(e,t){cp.forEach(function(r){e[r]&&(e[r]=Sp(e[r],r,t))})}function vp(e,t){e&&Object.keys(e).forEach(function(r){Ne.bugs[r]&&(t("typo",r,Ne.bugs[r],"bugs"),e[Ne.bugs[r]]=e[r],delete e[r])})}});var Xu=L((DS,xp)=>{xp.exports={repositories:"'repositories' (plural) Not supported. Please pick one as the 'repository' field",missingRepository:"No repository field.",brokenGitUrl:"Probably broken git url: %s",nonObjectScripts:"scripts must be an object",nonStringScript:"script values must be string commands",nonArrayFiles:"Invalid 'files' member",invalidFilename:"Invalid filename in 'files' list: %s",nonArrayBundleDependencies:"Invalid 'bundleDependencies' list. Must be array of package names",nonStringBundleDependency:"Invalid bundleDependencies member: %s",nonDependencyBundleDependency:"Non-dependency in bundleDependencies: %s",nonObjectDependencies:"%s field must be an object",nonStringDependency:"Invalid dependency: %s %s",deprecatedArrayDependencies:"specifying %s as array is deprecated",deprecatedModules:"modules field is deprecated",nonArrayKeywords:"keywords should be an array of strings",nonStringKeyword:"keywords should be an array of strings",conflictingName:"%s is also the name of a node core module.",nonStringDescription:"'description' field should be a string",missingDescription:"No description",missingReadme:"No README data",missingLicense:"No license field.",nonEmailUrlBugsString:"Bug string field must be url, email, or {email,url}",nonUrlBugsUrlField:"bugs.url field must be a string url. Deleted.",nonEmailBugsEmailField:"bugs.email field must be a string email. Deleted.",emptyNormalizedBugs:"Normalized value of bugs field is an empty object. Deleted.",nonUrlHomepage:"homepage field must be a string url. Deleted.",invalidLicense:"license should be a valid SPDX license expression",typo:"%s should probably be %s."}});var Ku=L((AS,Ju)=>{b();var Vu=ht("util"),Ci=Xu();Ju.exports=function(){var e=Array.prototype.slice.call(arguments,0),t=e.shift();if(t==="typo")return Ep.apply(null,e);var r=Ci[t]?Ci[t]:t+": '%s'";return e.unshift(r),Vu.format.apply(null,e)};function Ep(e,t,r){return r&&(e=r+"['"+e+"']",t=r+"['"+t+"']"),Vu.format(Ci.typo,e,t)}});var el=L((wS,Zu)=>{b();Zu.exports=Yu;var wi=zu();Yu.fixer=wi;var Dp=Ku(),Ap=["name","version","description","repository","modules","scripts","files","bin","man","bugs","keywords","readme","homepage","license"],Cp=["dependencies","people","typos"],ki=Ap.map(function(e){return Qu(e)+"Field"});ki=ki.concat(Cp);function Yu(e,t,r){t===!0&&(t=null,r=!0),r||(r=!1),(!t||e.private)&&(t=function(){}),e.scripts&&e.scripts.install==="node-gyp rebuild"&&!e.scripts.preinstall&&(e.gypfile=!0),wi.warn=function(){t(Dp.apply(null,arguments))},ki.forEach(function(n){wi["fix"+Qu(n)](e,r)}),e._id=e.name+"@"+e.version}function Qu(e){return e.charAt(0).toUpperCase()+e.slice(1)}});b();var Xp=1;function Rl(e){let t=e?.serverTimestamp;return typeof t=="number"&&Number.isFinite(t)?t:Date.now()}var Nr=class extends Error{limit;constructor(t){super(`EventBus subscriber limit reached (${t})`),this.name="SubscriberLimitExceededError",this.limit=t}},Vi=class{constructor(t=8e3,r=64,n){this.ringSize=t;this.maxSubscribers=r;this.compactionEngine=n}nextId=1;ring=[];subs=new Set;closed=!1;snapshotReplay(){return this.compactionEngine?.snapshot()}get lastEventId(){return this.nextId-1}get subscriberCount(){return this.subs.size}publish(t){if(this.closed)return;let r=t._meta,n={id:this.nextId++,v:1,...t,_meta:{...r??{},serverTimestamp:Rl(r)}};this.ring.push(n);try{this.compactionEngine?.ingest(n)}catch{}this.ring.length>this.ringSize&&this.ring.shift();for(let i of Array.from(this.subs)){if(i.evicted)continue;if(!i.queue.push(n)){i.evicted=!0;let u={v:1,type:"client_evicted",data:{reason:"queue_overflow",droppedAfter:n.id}};i.queue.forcePush(u),i.queue.close(),i.dispose();continue}let o=i.queue.size;if(!i.warned&&o>=i.warnThreshold){i.warned=!0;let u={v:1,type:"slow_client_warning",data:{queueSize:o,maxQueued:i.maxQueued,lastEventId:n.id}};i.queue.forcePush(u)}else i.warned&&o<=i.warnResetThreshold&&(i.warned=!1)}return n}subscribe(t={}){if(this.closed)return Ll();if(this.subs.size>=this.maxSubscribers)throw new Nr(this.maxSubscribers);let r=t.maxQueued??256,n=new Br(r),i={queue:n,evicted:!1,maxQueued:r,warnThreshold:.75*r,warnResetThreshold:.375*r,warned:!1,dispose:()=>{}};if(this.subs.add(i),t.lastEventId!==void 0){let p=t.lastEventId>=this.nextId;if(p)n.forcePush({v:1,type:"state_resync_required",data:{reason:"epoch_reset",lastDeliveredId:t.lastEventId,earliestAvailableId:this.ring[0]?.id??this.nextId}});else{let d=this.ring[0]?.id;d!==void 0&&d>t.lastEventId+1&&n.forcePush({v:1,type:"state_resync_required",data:{reason:"ring_evicted",lastDeliveredId:t.lastEventId,earliestAvailableId:d}})}let g=p?0:t.lastEventId,f=0,m;for(let d of this.ring)d.id!==void 0&&d.id>g&&(n.forcePush(d),f+=1,m=d.id);n.forcePush({v:1,type:"replay_complete",data:{...m!==void 0?{lastReplayedEventId:m,lastEventId:m}:{},replayedCount:f}})}let o=!1,u=()=>{o||(o=!0,this.subs.delete(i),t.signal?.removeEventListener("abort",h))};i.dispose=u;let h=()=>{n.close({drain:!1}),u()};return t.signal&&(t.signal.aborted?h():t.signal.addEventListener("abort",h,{once:!0})),{[Symbol.asyncIterator]:()=>({async next(){let p=await n.next();return p.done&&u(),p},async return(){return n.close(),u(),{value:void 0,done:!0}}})}}close(){if(!this.closed){this.closed=!0;for(let t of this.subs)t.queue.close();this.subs.clear(),this.compactionEngine?.close()}}};function Ll(){return{[Symbol.asyncIterator]:()=>({async next(){return{value:void 0,done:!0}}})}}var Br=class{constructor(t){this.maxSize=t}buf=[];resolvers=[];closed=!1;liveCount=0;get size(){return this.liveCount}push(t){if(this.closed)return!1;let r=this.resolvers.shift();return r?(r({value:t,done:!1}),!0):this.liveCount>=this.maxSize?!1:(this.buf.push({value:t,forced:!1}),this.liveCount+=1,!0)}forcePush(t){if(this.closed)return;let r=this.resolvers.shift();if(r){r({value:t,done:!1});return}this.buf.push({value:t,forced:!0})}close(t={}){if(!this.closed)for(this.closed=!0,t.drain===!1&&(this.buf.length=0,this.liveCount=0);this.resolvers.length>0;)this.resolvers.shift()({value:void 0,done:!0})}next(){if(this.buf.length>0){let t=this.buf.shift();return t.forced||(this.liveCount-=1),Promise.resolve({value:t.value,done:!1})}return this.closed?Promise.resolve({value:void 0,done:!0}):new Promise(t=>this.resolvers.push(t))}};b();b();b();import{realpathSync as Pl}from"node:fs";import*as Ji from"node:path";function em(e){let t=Ji.resolve(e);try{return Pl.native(t)}catch(r){if(r&&typeof r=="object"&&r.code==="ENOENT")return t;throw r}}var _r=4096;var im="Not currently generating";function sm(e){if(!e||typeof e!="object")return!1;let t=e;return Ki(t.message)?!0:!t.data||typeof t.data!="object"?!1:Ki(t.data.details)}function Ki(e){return typeof e=="string"&&/\bnot currently generating\b/i.test(e)}var Yi=class extends Error{sessionId;constructor(t,r){super(`No session with id "${t}"`+(r?`. ${r}`:"")),this.name="SessionNotFoundError",this.sessionId=t}},Qi=class extends Error{sessionId;activeAction;requestedAction;constructor(t,r,n){super(`Session "${t}" is already being restored via session/${r}; retry session/${n} after it completes`),this.name="RestoreInProgressError",this.sessionId=t,this.activeAction=r,this.requestedAction=n}},Zi=class extends Error{sessionScope;constructor(t){super(`Invalid sessionScope: ${JSON.stringify(t)}. Expected 'single' or 'thread'.`),this.name="InvalidSessionScopeError",this.sessionScope=t}},es=class extends Error{limit;constructor(t){super(`Session limit reached (${t})`),this.name="SessionLimitExceededError",this.limit=t}},ts=class extends Error{limit;pendingCount;sessionId;constructor(t,r,n){super(`Prompt queue full for session "${n}" (${r}/${t} pending)`),this.name="PromptQueueFullError",this.limit=t,this.pendingCount=r,this.sessionId=n}},rs=class extends Error{bound;requested;constructor(t,r){let n=r.length>_r?`${r.slice(0,_r)}\u2026[truncated]`:r;super(`Workspace mismatch: daemon is bound to "${t}" but request asked for "${n}". Each \`matilda serve\` daemon binds to exactly one workspace; start a separate daemon for "${n}" (or route the request to one via an orchestrator).`),this.name="WorkspaceMismatchError",this.bound=t,this.requested=n}},ns=class extends Error{sessionId;clientId;constructor(t,r){super(`Client id "${r}" is not registered for session ${t}`),this.name="InvalidClientIdError",this.sessionId=t,this.clientId=r}},is=class extends Error{constructor(){super("Direct session shell is disabled for this daemon"),this.name="SessionShellDisabledError"}},ss=class extends Error{constructor(){super("Direct session shell requires a session-bound client id"),this.name="SessionShellClientRequiredError"}},os=class extends Error{requestId;optionId;constructor(t,r){super(`Permission ${t}: optionId "${r}" is not in the set of options the agent offered.`),this.name="InvalidPermissionOptionError",this.requestId=t,this.optionId=r}},as=class extends Error{field;constructor(t,r){super(`Invalid session metadata: ${t} ${r}`),this.name="InvalidSessionMetadataError",this.field=t}},us=class extends Error{policy;constructor(t){super(`Permission policy "${t}" is declared in the contract but not yet implemented in this daemon build.`),this.name="PermissionPolicyNotImplementedError",this.policy=t}},ls=class extends Error{requestId;sentinel;constructor(t,r){super(`Permission ${t}: agent-declared optionId set contains the cancel-vote sentinel "${r}", which would prevent the daemon from disambiguating cancel intent from a real vote.`),this.name="CancelSentinelCollisionError",this.requestId=t,this.sentinel=r}},cs=class extends Error{requestId;sessionId;reason;constructor(t,r,n){super(`Permission ${t} on session ${r}: vote rejected by policy (${n}).`),this.name="PermissionForbiddenError",this.requestId=t,this.sessionId=r,this.reason=n}},ds=class extends Error{path;existingSize;constructor(t,r){super(`Workspace file ${t} already exists (${r} bytes); pass {force: true} to overwrite.`),this.name="WorkspaceInitConflictError",this.path=t,this.existingSize=r}},hs=class extends Error{filename;boundWorkspace;constructor(t,r){super(`Configured workspace context filename ${JSON.stringify(t)} resolves outside the bound workspace ${JSON.stringify(r)}. Refusing to write.`),this.name="WorkspaceInitPathEscapeError",this.filename=t,this.boundWorkspace=r}},fs=class extends Error{target;kind;constructor(t,r,n){super(n),this.name="WorkspaceInitSymlinkError",this.target=t,this.kind=r}},ps=class extends Error{target;kind;constructor(t,r,n){super(n),this.name="WorkspaceInitRaceError",this.target=t,this.kind=r}},ms=class extends Error{serverName;constructor(t){super(`MCP server not configured: ${JSON.stringify(t)}`),this.name="McpServerNotFoundError",this.serverName=t}},gs=class extends Error{serverName;mcpStatus;constructor(t,r){super(`MCP server ${JSON.stringify(t)} did not reach a connected state after restart (status: ${r}).`),this.name="McpServerRestartFailedError",this.serverName=t,this.mcpStatus=r}},ys=class extends Error{sessionId;constructor(t,r){super(r??`Session ${t} is busy (prompt running)`),this.name="SessionBusyError",this.sessionId=t}},Ss=class extends Error{sessionId;constructor(t,r){super(r??"Cannot rewind to the requested turn (compressed or does not exist)"),this.name="InvalidRewindTargetError",this.sessionId=t}},bs=class extends Error{sessionId;constructor(t){super(`Cannot branch session ${t}: a prompt is currently active`),this.name="BranchWhilePromptActiveError",this.sessionId=t}};b();var Ue=1,lm=["missing_binary","blocked_egress","auth_env_error","init_timeout","protocol_error","missing_file","parse_error","stat_failed","budget_exhausted","mcp_budget_would_exceed","mcp_server_spawn_failed","invalid_config","prompt_deadline_exceeded","writer_idle_timeout"],Ur=class extends Error{label;timeoutMs;constructor(t,r){super(`AcpSessionBridge ${t} timed out after ${r}ms`),this.name="BridgeTimeoutError",this.label=t,this.timeoutMs=r}},Gr=class extends Error{context;constructor(t){super(`agent channel closed ${t}`),this.name="BridgeChannelClosedError",this.context=t}},jr=class extends Error{constructor(){super("Cannot determine CLI entry path for spawning the ACP child: process.argv[1] is empty and MATILDA_CLI_ENTRY is unset. Set MATILDA_CLI_ENTRY to the absolute path of the matilda entry script (e.g. `export MATILDA_CLI_ENTRY=$(which matilda)`) to override."),this.name="MissingCliEntryError"}},$r=class extends Error{constructor(){super("The matilda CLI the daemon started is older than the daemon: it does not send ordered session notices. Point MATILDA_CLI_ENTRY at the matilda entry script installed with this daemon, or update the CLI it names."),this.name="IncompatibleCliError"}},cm={workspaceMcp:"matilda/status/workspace/mcp",workspaceMcpTools:"matilda/status/workspace/mcp/tools",workspaceSkills:"matilda/status/workspace/skills",workspaceTools:"matilda/status/workspace/tools",workspaceProviders:"matilda/status/workspace/providers",workspaceMemory:"matilda/status/workspace/memory",workspaceAgents:"matilda/status/workspace/agents",workspacePreflight:"matilda/status/workspace/preflight",sessionContext:"matilda/status/session/context",sessionContextUsage:"matilda/status/session/context_usage",sessionSupportedCommands:"matilda/status/session/supported_commands",sessionTasks:"matilda/status/session/tasks",sessionStats:"matilda/status/session/stats",sessionRewindSnapshots:"matilda/status/session/rewind_snapshots",workspaceHooks:"matilda/status/workspace/hooks",sessionHooks:"matilda/status/session/hooks",workspaceExtensions:"matilda/status/workspace/extensions"},dm={sessionClose:"matilda/control/session/close",sessionRename:"renameSession",sessionApprovalMode:"matilda/control/session/approval_mode",sessionBranch:"matilda/control/session/branch",sessionRecap:"matilda/control/session/recap",sessionBtw:"matilda/control/session/btw",sessionShellHistory:"matilda/control/session/shell_history",sessionLanguage:"matilda/control/session/language",sessionRewind:"matilda/control/session/rewind",workspaceMcpRestart:"matilda/control/workspace/mcp/restart",workspaceMcpManage:"matilda/control/workspace/mcp/manage",workspaceAgentGenerate:"matilda/control/workspace/agents/generate",sessionTaskCancel:"matilda/control/session/task/cancel",sessionGoalClear:"matilda/control/session/goal/clear",workspaceMcpRuntimeAdd:"matilda/control/workspace/mcp/runtime-add",workspaceMcpRuntimeRemove:"matilda/control/workspace/mcp/runtime-remove",workspaceReload:"matilda/control/workspace/reload"},Ml={PreToolUse:{description:"Before tool execution",matcherKind:"toolName"},PostToolUse:{description:"After tool execution",matcherKind:"toolName"},PostToolUseFailure:{description:"After tool execution fails",matcherKind:"toolName"},PostToolBatch:{description:"After a batch of tool calls resolves"},Notification:{description:"When notifications are sent",matcherKind:"notificationType"},UserPromptSubmit:{description:"When the user submits a prompt"},UserPromptExpansion:{description:"When a slash command expands into a prompt",matcherKind:"commandName"},SessionStart:{description:"When a new session is started",matcherKind:"sessionTrigger"},Stop:{description:"Right before Matilda Code concludes its response"},SubagentStart:{description:"When a subagent is started",matcherKind:"agentType"},SubagentStop:{description:"Right before a subagent concludes its response",matcherKind:"agentType"},PreCompact:{description:"Before conversation compaction",matcherKind:"trigger"},PostCompact:{description:"After conversation compaction",matcherKind:"trigger"},SessionEnd:{description:"When a session is ending",matcherKind:"sessionTrigger"},PermissionRequest:{description:"When a permission dialog is displayed",matcherKind:"toolName"},PermissionDenied:{description:"When a tool call is denied",matcherKind:"toolName"},StopFailure:{description:"When the turn ends due to an API error",matcherKind:"error"},TodoCreated:{description:"When a new todo item is created"},TodoCompleted:{description:"When a todo item is marked as completed"},InstructionsLoaded:{description:"When an instruction or context file is loaded",matcherKind:"filePath"}};function hm(e){return{v:Ue,workspaceCwd:e,initialized:!1,extensions:[]}}function fm(e){return{v:Ue,workspaceCwd:e,initialized:!1,disabled:!1,hooks:[],events:Ml}}function pm(e){return{v:Ue,workspaceCwd:e,initialized:!1,files:[],totalBytes:0,fileCount:0,ruleCount:0}}function mm(e){return{v:Ue,workspaceCwd:e,initialized:!1,discoveryState:"not_started",servers:[],clientCount:0,budgetMode:"off",budgets:[]}}function gm(e){return{v:Ue,workspaceCwd:e,initialized:!1,skills:[]}}function ym(e){return{v:Ue,workspaceCwd:e,initialized:!1,providers:[]}}function Sm(e,t){return{v:Ue,workspaceCwd:e,initialized:!0,acpChannelLive:t,cells:[]}}var Ol=["auth","mcp_discovery","skills","providers","tool_registry","egress"];function bm(){return Ol.map(e=>({kind:e,status:"not_started",locality:"acp",hint:"spawn a session to populate"}))}var Nl=new Set(["PARSE_ERROR","INVALID_CONFIG","INVALID_NAME"]),Bl=new Set(["FILE_ERROR","NOT_FOUND"]),_l=new Set(["ENOENT","EACCES","EPERM"]),Ul=new Set(["StrictMissingCredentialsError","StrictMissingModelIdError","MissingApiKeyError","MissingModelError","MissingBaseUrlError","MissingAnthropicBaseUrlEnvError"]);function vm(e){if(e instanceof Ur)return"init_timeout";if(e instanceof Gr)return"protocol_error";if(e instanceof jr)return"missing_binary";if(e instanceof $r)return"protocol_error";if(e instanceof ji||e?.name==="SkillError"){let r=e.code;return r&&Nl.has(r)?"parse_error":r&&Bl.has(r)?"missing_file":void 0}if(e instanceof SyntaxError)return"parse_error";if(!(e instanceof Error))return;if(e.name==="TrustGateError"||Ul.has(e.name))return"auth_env_error";let t=e.code;if(typeof t=="string"&&_l.has(t))return"missing_file"}b();b();import*as re from"node:fs";import*as K from"node:path";var Xr=Ve(Hr(),1);b();import*as ce from"node:fs";import*as Es from"node:path";var ql=5e3,Hl=3e4,Wl=15;function Je(e,t,r={}){let n=r.timeoutMs??ql,i=r.staleMs??Hl,o=`${e}.lock`,u=Es.dirname(e);try{ce.mkdirSync(u,{recursive:!0})}catch{}let h=Date.now()+n,p;for(;p===void 0;)try{p=ce.openSync(o,"wx")}catch(g){if(g.code!=="EEXIST")throw g;try{let d=ce.statSync(o);if(Date.now()-d.mtimeMs>i){ce.unlinkSync(o);continue}}catch{continue}if(Date.now()>=h)throw new Error(`Timed out after ${n}ms waiting for lock: ${o}`);let m=Date.now()+Wl;for(;Date.now()<m;);}try{return t()}finally{try{ce.closeSync(p)}catch{}try{ce.unlinkSync(o)}catch{}}}var zl="trustedFolders.json";function Xl(){return process.env.MATILDA_CODE_TRUSTED_FOLDERS_PATH?process.env.MATILDA_CODE_TRUSTED_FOLDERS_PATH:K.join(Z.getGlobalMatildaDir(),zl)}var Ds={headless:!1,directories:[]};function Vl(e){if(e!=="desktop")return;let t=process.env.MATILDA_DESKTOP_APPROVED_DIRECTORIES_JSON;if(t===void 0)return;let r;try{r=JSON.parse(t)}catch{throw new Error("MATILDA_DESKTOP_APPROVED_DIRECTORIES_JSON must be valid JSON.")}if(!Array.isArray(r)||r.some(n=>typeof n!="string"||!K.isAbsolute(n)))throw new Error("MATILDA_DESKTOP_APPROVED_DIRECTORIES_JSON must be an array of absolute paths.");return r}function Pm(e,t=process.cwd(),r=process.stdin.isTTY??!1){let n=Vl(e.channel),i=e.acp||e.experimentalAcp?process.env.MATILDA_SERVE_TRUSTED_WORKSPACE:void 0;if(i!==void 0&&!K.isAbsolute(i))throw new Error("MATILDA_SERVE_TRUSTED_WORKSPACE must be an absolute path.");Ds={headless:!e.acp&&!e.experimentalAcp&&!e.promptInteractive&&(!!e.prompt||!!e.query||!r),directories:[...i===void 0?[]:[i],...n===void 0?[]:[...process.env.MATILDA_DESKTOP_WORKSPACE_ID?[Ge(t)]:[],...n.map(o=>K.resolve(o))]]}}function Ge(e){let t=K.resolve(e),r=t,n="";for(;;)try{return K.join(re.realpathSync(r),n)}catch(i){if(!Ti(i)||i.code!=="ENOENT"&&i.code!=="ENOTDIR")throw new ft(`Cannot resolve folder trust path ${t}: ${se(i)}`);let o=K.dirname(r);if(o===r)return t;n=K.join(K.basename(r),n),r=o}}var Wr=class{constructor(t,r){this.user=t;this.errors=r}get rules(){return Object.entries(this.user.config).map(([t,r])=>({path:t,trustLevel:r}))}isPathTrusted(t){let r=Ge(t),n=[],i=[];for(let o of this.rules)switch(o.trustLevel){case"TRUST_FOLDER":n.push(Ge(o.path));break;case"TRUST_PARENT":n.push(Ge(K.dirname(o.path)));break;case"DO_NOT_TRUST":i.push(Ge(o.path));break;default:break}for(let o of n)if(Pr(r,o))return!0;for(let o of i)if(r===o)return!1}setValue(t,r){Je(this.user.path,()=>{let n=Jl(this.user.path);this.user.config={...n,...this.user.config,[t]:r},Yl(this.user)})}},ke,zr=0;function Jl(e){try{if(!re.existsSync(e))return{};let t=re.readFileSync(e,"utf-8"),r=JSON.parse((0,Xr.default)(t));return typeof r!="object"||r===null||Array.isArray(r)?{}:r}catch{return{}}}function As(e){try{return re.statSync(e).mtimeMs}catch{return 0}}function Kl(){let e=Xl(),t=As(e);if(ke&&ke.user.path===e&&zr===t)return ke;let r=[],n={};try{if(re.existsSync(e)){let i=re.readFileSync(e,"utf-8"),o=JSON.parse((0,Xr.default)(i));typeof o!="object"||o===null||Array.isArray(o)?r.push({message:"Trusted folders file is not a valid JSON object.",path:e}):n=o}}catch(i){r.push({message:se(i),path:e})}return ke=new Wr({path:e,config:n},r),zr=t,ke}function Yl(e){try{let t=K.dirname(e.path);re.existsSync(t)||re.mkdirSync(t,{recursive:!0}),Ii(e.path,JSON.stringify(e.config,null,2),{encoding:"utf-8",mode:384,forceMode:!0,noFollow:!0}),ke&&ke.user.path===e.path&&(ke.user.config={...e.config},zr=As(e.path))}catch(t){we("Error saving trusted folders file."),we(t instanceof Error?t.message:String(t))}}function Ql(e){return e.security?.folderTrust?.enabled??!0}function Zl(e,t){let r=Kl();if(t&&(r.user.config=t),r.errors.length>0){let i=r.errors.map(o=>`Error in ${o.path}: ${o.message}`);throw new ft(`${i.join(`
|
|
19
|
-
`)}
|
|
20
|
-
Please fix the configuration file and try again.`)}let n=r.isPathTrusted(e);return{isTrusted:n,source:n!==void 0?"file":void 0}}function Vr(e,t,r=process.cwd(),n=Ds){if(!Ql(e))return{isTrusted:!0,source:void 0};let i=Ui.get()?.workspaceState?.isTrusted;if(i!==void 0)return{isTrusted:i,source:"ide"};let o=Zl(r,t);return o.isTrusted!==void 0?o:n.headless||n.directories.some(u=>Ge(u)===u&&Pr(Ge(r),u))?{isTrusted:!0,source:"runtime"}:o}b();import*as Te from"node:fs";import*as Ht from"node:path";var ec="output-language.md",ws="matilda-code:llm-output-language:",Ke="Australian English",tc="auto";function Yr(e){return!e||e.toLowerCase()===tc}function rc(e){let t=e.trim().toLowerCase();return t==="english"||t==="en"||t==="en-us"||t==="en-au"||t==="en_us"||t==="en_au"||t==="australian english"||t==="australian"?Ke:e}var nc=["aa","ab","ae","af","ak","am","an","ar","as","av","ay","az","ba","be","bg","bi","bm","bn","bo","br","bs","ca","ce","ch","co","cr","cs","cu","cv","cy","da","de","dv","dz","ee","el","en","eo","es","et","eu","fa","ff","fi","fj","fo","fr","fy","ga","gd","gl","gn","gu","gv","ha","he","hi","ho","hr","ht","hu","hy","hz","ia","id","ie","ig","ii","ik","io","is","it","iu","ja","jv","ka","kg","ki","kj","kk","kl","km","kn","ko","kr","ks","ku","kv","kw","ky","la","lb","lg","li","ln","lo","lt","lu","lv","mg","mh","mi","mk","ml","mn","mr","ms","mt","my","na","nb","nd","ne","ng","nl","nn","no","nr","nv","ny","oc","oj","om","or","os","pa","pi","pl","ps","pt","qu","rm","rn","ro","ru","rw","sa","sc","sd","se","sg","si","sk","sl","sm","sn","so","sq","sr","ss","st","su","sv","sw","ta","te","tg","th","ti","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","wo","xh","yi","yo","za","zh","zu"],ic=["en-AU","en-GB","en-US","pt-BR","pt-PT","zh-Hans","zh-Hant","sr-Latn"],Jr=null;function sc(){if(Jr)return Jr;let e=new Map,t=(n,i)=>{if(!n)return;let o=n.toLowerCase();e.has(o)||e.set(o,i)},r;try{r=new Intl.DisplayNames(["en"],{type:"language"})}catch{r=void 0}for(let n of[...nc,...ic]){let i=r?.of(n);if(!i||i.toLowerCase()===n.toLowerCase())continue;let o={tag:n,display:i};t(n,o),t(i,o);try{t(new Intl.DisplayNames([n],{type:"language"}).of(n),o)}catch{}}return Jr=e,e}function Cs(e){return e.tag.split("-")[0].toLowerCase()==="en"?Ke:e.display}function Qr(e){let t=e.trim();if(!t)return null;let r=t.toLowerCase();if(Mr(r))return"English";if(r==="australian"||r===Ke.toLowerCase())return Ke;let n=sc(),i=n.get(r);if(i)return Cs(i);try{let[o]=Intl.getCanonicalLocales(t),u=o?.split("-")[0]?.toLowerCase(),h=u?n.get(u):void 0;if(h)return Cs(h)}catch{}return null}function oc(e){return Qr(e)??Ke}function Kr(e){if(Yr(e)){let t=Xi();return Mr(t)?"English":rc(Wi(t))}return oc(e)}function Zr(){return Ht.join(Z.getGlobalMatildaDir(),ec)}function ac(e){return e.replace(/[\r\n]/g," ").replace(/--!?>/g,"").replace(/--/g,"")}function uc(e){let t=ac(e),n=e.toLowerCase().includes("australian")||e.toLowerCase()==="en-au"?`
|
|
21
|
-
## Australian English
|
|
22
|
-
Use Australian English spelling and wording by default:
|
|
23
|
-
- colour, organise, favour, behaviour, honour, centre, metre, defence, licence (noun), practice (noun) / practise (verb)
|
|
24
|
-
- Do **not** default to American spellings (color, organize, favor, center, defense) unless quoting code, APIs, US product names, or the user asks for US English.
|
|
25
|
-
- Prefer clear, direct prose. You may use natural AU phrasing; avoid forced slang unless the user is clearly being informal.
|
|
26
|
-
`:"";return`# Output language preference: ${e}
|
|
27
|
-
<!-- ${ws} ${t} -->
|
|
28
|
-
|
|
29
|
-
## Rule
|
|
30
|
-
You MUST always respond in **${e}** regardless of the user's input language.
|
|
31
|
-
This is a mandatory requirement, not a preference.
|
|
32
|
-
${n}
|
|
33
|
-
## Exception
|
|
34
|
-
If the user **explicitly** requests a response in a specific language (e.g., "please reply in English", "\u65E5\u672C\u8A9E\u3067\u7B54\u3048\u3066"), switch to the user's requested language for the remainder of the conversation.
|
|
35
|
-
|
|
36
|
-
## Keep technical artifacts unchanged
|
|
37
|
-
Do **not** translate or rewrite:
|
|
38
|
-
- Code blocks, CLI commands, file paths, stack traces, logs, JSON keys, identifiers
|
|
39
|
-
- Exact quoted text from the user (keep quotes verbatim)
|
|
40
|
-
|
|
41
|
-
## Tool / system outputs
|
|
42
|
-
Raw tool/system outputs may contain fixed-format English. Preserve them verbatim, and if needed, add a short **${e}** explanation below.
|
|
43
|
-
`}function lc(e){let t=new RegExp(String.raw`<!--\s*${ws}\s*(.*?)\s*-->`,"i"),r=e.match(t);if(r?.[1]?.trim())return r[1].trim();let n=e.match(/^#.*?CRITICAL:\s*(.*?)\s+Output Language Rule\b/im);return n?.[1]?.trim()?n[1].trim():null}function cc(){let e=Zr();if(!Te.existsSync(e))return null;try{let t=Te.readFileSync(e,"utf-8");return lc(t)}catch{return null}}function qt(e,t){let r=t??Zr(),n=Qr(e)??Ke,i=uc(n),o=Ht.dirname(r);Te.mkdirSync(o,{recursive:!0}),Te.writeFileSync(r,i,"utf-8")}function dc(e,t){let r=Kr(e);qt(r,t)}function Um(e,t){let r=t?.getOutputLanguageFilePath();dc(e,r),r||t?.setOutputLanguageFilePath(Zr())}function Gm(e){let t=cc();if(t){let n=Qr(t);if(!n){qt(Kr(e));return}n!==t&&qt(n);return}let r=Kr(e);qt(r)}b();var nt=Ve(Fl(),1);import*as _ from"node:fs";import*as R from"node:path";import{homedir as Vn,platform as na}from"node:os";import B from"node:process";var It=Ve(Hr(),1);b();b();b();var ks={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",blanchedalmond:"#ffebcd",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",whitesmoke:"#f5f5f5",yellowgreen:"#9acd32"},hc=Ce("COLOR_UTILS"),fc=new Set(["black","red","green","yellow","blue","cyan","magenta","white","gray","grey","blackbright","redbright","greenbright","yellowbright","bluebright","cyanbright","magentabright","whitebright"]);function en(e){let t=e.toLowerCase();if(t.startsWith("#"))return/^#[0-9A-Fa-f]{3}([0-9A-Fa-f]{3})?$/.test(e)?t:void 0;if(fc.has(t))return t;if(ks[t])return ks[t];hc.warn(`[ColorUtils] Could not resolve color "${e}" to an Ink-compatible format.`)}var pc={black:"#000000",red:"#ff0000",green:"#00ff00",yellow:"#ffff00",blue:"#0000ff",cyan:"#00ffff",magenta:"#ff00ff",white:"#ffffff",gray:"#808080",grey:"#808080",blackbright:"#808080",redbright:"#ff8080",greenbright:"#80ff80",yellowbright:"#ffff80",bluebright:"#8080ff",cyanbright:"#80ffff",magentabright:"#ff80ff",whitebright:"#ffffff"};function Ts(e){let t=(en(e)??e).toLowerCase();return t.startsWith("#")?/^#[0-9a-f]{3}$/.test(t)?`#${t.slice(1).split("").map(r=>r+r).join("")}`:/^#[0-9a-f]{6}$/.test(t)?t:void 0:pc[t]}function Hm(e,t,r){if(r<=0)return e;if(r>=1)return t;let n=Ts(e),i=Ts(t);if(!n||!i)return"";let o=parseInt(n.slice(1,3),16),u=parseInt(n.slice(3,5),16),h=parseInt(n.slice(5,7),16),p=parseInt(i.slice(1,3),16),g=parseInt(i.slice(3,5),16),f=parseInt(i.slice(5,7),16),m=(s,a)=>Math.round(s+(a-s)*r),d=s=>Math.max(0,Math.min(255,s)).toString(16).padStart(2,"0");return`#${d(m(o,p))}${d(m(u,g))}${d(m(h,f))}`}var pt;function mc(){if(pt!==void 0)return pt;let e=process.env.COLORTERM;return e==="truecolor"||e==="24bit"||e==="kmscon"||process.stdout.getColorDepth&&process.stdout.getColorDepth()>=24?pt=!0:pt=!1}var xe;function gc(){if(xe!==void 0)return xe;if(process.env.NO_COLOR)return xe="none";if(mc())return xe="truecolor";let e=process.stdout.getColorDepth?.();return typeof e=="number"?e>=24?xe="truecolor":e>=8?xe="256":e>=4?xe="16":xe="none":xe="256"}function Wm(){let e=gc();return e==="truecolor"||e==="256"}var j={type:"light",Background:"#FAFAFA",Foreground:"",LightBlue:"#89BDCD",AccentBlue:"#3B82F6",AccentPurple:"#8B5CF6",AccentCyan:"#06B6D4",AccentGreen:"#3CA84B",AccentYellow:"#D5A40A",AccentRed:"#DD4C4C",AccentYellowDim:"#8B7000",AccentRedDim:"#993333",DiffAdded:"#C6EAD8",DiffRemoved:"#FFCCCC",Comment:"#008000",Gray:"#97a0b0",GradientColors:["#4796E4","#847ACE","#C3677F"]},O={type:"dark",Background:"#1E1E2E",Foreground:"",LightBlue:"#ADD8E6",AccentBlue:"#89B4FA",AccentPurple:"#CBA6F7",AccentCyan:"#89DCEB",AccentGreen:"#A6E3A1",AccentYellow:"#F9E2AF",AccentRed:"#F38BA8",AccentYellowDim:"#8B7530",AccentRedDim:"#8B3A4A",DiffAdded:"#28350B",DiffRemoved:"#430000",Comment:"#6C7086",Gray:"#6C7086",GradientColors:["#4796E4","#847ACE","#C3677F"]},Jm={type:"ansi",Background:"black",Foreground:"white",LightBlue:"blue",AccentBlue:"blue",AccentPurple:"magenta",AccentCyan:"cyan",AccentGreen:"green",AccentYellow:"yellow",AccentRed:"red",AccentYellowDim:"yellow",AccentRedDim:"red",DiffAdded:"green",DiffRemoved:"red",Comment:"gray",Gray:"gray"},je=class e{constructor(t,r,n,i,o){this.name=t;this.type=r;this.colors=i;this.semanticColors=o??{text:{primary:this.colors.Foreground,secondary:this.colors.Gray,link:this.colors.AccentBlue,accent:this.colors.AccentPurple,code:this.colors.LightBlue},background:{primary:this.colors.Background,diff:{added:this.colors.DiffAdded,removed:this.colors.DiffRemoved}},border:{default:this.colors.Gray,focused:this.colors.AccentBlue},ui:{comment:this.colors.Gray,symbol:this.colors.AccentCyan,gradient:this.colors.GradientColors},status:{error:this.colors.AccentRed,success:this.colors.AccentGreen,warning:this.colors.AccentYellow,errorDim:this.colors.AccentRedDim,warningDim:this.colors.AccentYellowDim}},this._colorMap=Object.freeze(this._buildColorMap(n));let u=n.hljs?.color;this.defaultColor=(u?e._resolveColor(u):void 0)??""}defaultColor;_colorMap;semanticColors;getInkColor(t){return this._colorMap[t]}static _resolveColor(t){return en(t)}_buildColorMap(t){let r={};for(let n in t){if(!n.startsWith("hljs-")&&n!=="hljs")continue;let i=t[n];if(i?.color){let o=e._resolveColor(i.color);o!==void 0&&(r[n]=o)}}return r}};function Km(e){let t={type:"custom",Background:e.background?.primary??e.Background??"",Foreground:e.text?.primary??e.Foreground??"",LightBlue:e.text?.code??e.LightBlue??"",AccentBlue:e.text?.link??e.AccentBlue??"",AccentPurple:e.text?.accent??e.AccentPurple??"",AccentCyan:e.text?.link??e.AccentCyan??"",AccentGreen:e.status?.success??e.AccentGreen??"",AccentYellow:e.status?.warning??e.AccentYellow??"",AccentRed:e.status?.error??e.AccentRed??"",AccentYellowDim:e.status?.warningDim??e.AccentYellowDim??"",AccentRedDim:e.status?.errorDim??e.AccentRedDim??"",DiffAdded:e.background?.diff?.added??e.DiffAdded??"",DiffRemoved:e.background?.diff?.removed??e.DiffRemoved??"",Comment:e.ui?.comment??e.Comment??"",Gray:e.text?.secondary??e.Gray??"",GradientColors:e.ui?.gradient??e.GradientColors},r={hljs:{display:"block",overflowX:"auto",padding:"0.5em",background:t.Background,color:t.Foreground},"hljs-keyword":{color:t.AccentBlue},"hljs-literal":{color:t.AccentBlue},"hljs-symbol":{color:t.AccentBlue},"hljs-name":{color:t.AccentBlue},"hljs-link":{color:t.AccentBlue,textDecoration:"underline"},"hljs-built_in":{color:t.AccentCyan},"hljs-type":{color:t.AccentCyan},"hljs-number":{color:t.AccentGreen},"hljs-class":{color:t.AccentGreen},"hljs-string":{color:t.AccentYellow},"hljs-meta-string":{color:t.AccentYellow},"hljs-regexp":{color:t.AccentRed},"hljs-template-tag":{color:t.AccentRed},"hljs-subst":{color:t.Foreground},"hljs-function":{color:t.Foreground},"hljs-title":{color:t.Foreground},"hljs-params":{color:t.Foreground},"hljs-formula":{color:t.Foreground},"hljs-comment":{color:t.Comment,fontStyle:"italic"},"hljs-quote":{color:t.Comment,fontStyle:"italic"},"hljs-doctag":{color:t.Comment},"hljs-meta":{color:t.Gray},"hljs-meta-keyword":{color:t.Gray},"hljs-tag":{color:t.Gray},"hljs-variable":{color:t.AccentPurple},"hljs-template-variable":{color:t.AccentPurple},"hljs-attr":{color:t.LightBlue},"hljs-attribute":{color:t.LightBlue},"hljs-builtin-name":{color:t.LightBlue},"hljs-section":{color:t.AccentYellow},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"},"hljs-bullet":{color:t.AccentYellow},"hljs-selector-tag":{color:t.AccentYellow},"hljs-selector-id":{color:t.AccentYellow},"hljs-selector-class":{color:t.AccentYellow},"hljs-selector-attr":{color:t.AccentYellow},"hljs-selector-pseudo":{color:t.AccentYellow},"hljs-addition":{backgroundColor:t.AccentGreen,display:"inline-block",width:"100%"},"hljs-deletion":{backgroundColor:t.AccentRed,display:"inline-block",width:"100%"}},n={text:{primary:e.text?.primary??t.Foreground,secondary:e.text?.secondary??t.Gray,link:e.text?.link??t.AccentBlue,accent:e.text?.accent??t.AccentPurple,code:e.text?.code??t.LightBlue},background:{primary:e.background?.primary??t.Background,diff:{added:e.background?.diff?.added??t.DiffAdded,removed:e.background?.diff?.removed??t.DiffRemoved}},border:{default:e.border?.default??t.Gray,focused:e.border?.focused??t.AccentBlue},ui:{comment:e.ui?.comment??t.Comment,symbol:e.ui?.symbol??t.Gray,gradient:e.ui?.gradient??t.GradientColors},status:{error:e.status?.error??t.AccentRed,success:e.status?.success??t.AccentGreen,warning:e.status?.warning??t.AccentYellow,errorDim:e.status?.errorDim??t.AccentRedDim,warningDim:e.status?.warningDim??t.AccentYellowDim}};return new je(e.name,"custom",r,t,n)}function Ym(e){return e.name&&!yc(e.name)?{isValid:!1,error:`Invalid theme name: ${e.name}`}:{isValid:!0}}function yc(e){return e.trim().length>0&&e.trim().length<=50}var tn=new je("Default Light","light",{hljs:{display:"block",overflowX:"auto",padding:"0.5em",background:j.Background,color:j.Foreground},"hljs-comment":{color:j.Comment},"hljs-quote":{color:j.Comment},"hljs-variable":{color:j.Foreground},"hljs-keyword":{color:j.AccentBlue},"hljs-selector-tag":{color:j.AccentBlue},"hljs-built_in":{color:j.AccentBlue},"hljs-name":{color:j.AccentBlue},"hljs-tag":{color:j.AccentBlue},"hljs-string":{color:j.AccentRed},"hljs-title":{color:j.AccentRed},"hljs-section":{color:j.AccentRed},"hljs-attribute":{color:j.AccentRed},"hljs-literal":{color:j.AccentRed},"hljs-template-tag":{color:j.AccentRed},"hljs-template-variable":{color:j.AccentRed},"hljs-type":{color:j.AccentRed},"hljs-addition":{color:j.AccentGreen},"hljs-deletion":{color:j.AccentRed},"hljs-selector-attr":{color:j.AccentCyan},"hljs-selector-pseudo":{color:j.AccentCyan},"hljs-meta":{color:j.AccentCyan},"hljs-doctag":{color:j.Gray},"hljs-attr":{color:j.AccentRed},"hljs-symbol":{color:j.AccentCyan},"hljs-bullet":{color:j.AccentCyan},"hljs-link":{color:j.AccentCyan},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"}},j);b();var rn=new je("Default","dark",{hljs:{display:"block",overflowX:"auto",padding:"0.5em",background:O.Background,color:O.Foreground},"hljs-keyword":{color:O.AccentBlue},"hljs-literal":{color:O.AccentBlue},"hljs-symbol":{color:O.AccentBlue},"hljs-name":{color:O.AccentBlue},"hljs-link":{color:O.AccentBlue,textDecoration:"underline"},"hljs-built_in":{color:O.AccentCyan},"hljs-type":{color:O.AccentCyan},"hljs-number":{color:O.AccentGreen},"hljs-class":{color:O.AccentGreen},"hljs-string":{color:O.AccentYellow},"hljs-meta-string":{color:O.AccentYellow},"hljs-regexp":{color:O.AccentRed},"hljs-template-tag":{color:O.AccentRed},"hljs-subst":{color:O.Foreground},"hljs-function":{color:O.Foreground},"hljs-title":{color:O.Foreground},"hljs-params":{color:O.Foreground},"hljs-formula":{color:O.Foreground},"hljs-comment":{color:O.Comment,fontStyle:"italic"},"hljs-quote":{color:O.Comment,fontStyle:"italic"},"hljs-doctag":{color:O.Comment},"hljs-meta":{color:O.Gray},"hljs-meta-keyword":{color:O.Gray},"hljs-tag":{color:O.Gray},"hljs-variable":{color:O.AccentPurple},"hljs-template-variable":{color:O.AccentPurple},"hljs-attr":{color:O.LightBlue},"hljs-attribute":{color:O.LightBlue},"hljs-builtin-name":{color:O.LightBlue},"hljs-section":{color:O.AccentYellow},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"},"hljs-bullet":{color:O.AccentYellow},"hljs-selector-tag":{color:O.AccentYellow},"hljs-selector-id":{color:O.AccentYellow},"hljs-selector-class":{color:O.AccentYellow},"hljs-selector-attr":{color:O.AccentYellow},"hljs-selector-pseudo":{color:O.AccentYellow},"hljs-addition":{backgroundColor:"#144212",display:"inline-block",width:"100%"},"hljs-deletion":{backgroundColor:"#600",display:"inline-block",width:"100%"}},O);b();function mt(e){if(!e||typeof e!="object")return!1;let t=e;return Object.prototype.hasOwnProperty.call(t,"modelProviders")}function Sc(e){if(e.isTrusted&&mt(e.workspace.settings))return"Workspace";if(mt(e.user.settings))return"User"}function Is(e){return Sc(e)??"User"}b();var dg=new Set(["boolean","enum"]);var ee={type:"object",description:"A hook definition with an optional matcher and a list of hook configurations.",properties:{matcher:{type:"string",description:"An optional matcher pattern to filter when this hook definition applies."},sequential:{type:"boolean",description:"Whether the hooks should be executed sequentially instead of in parallel."},hooks:{type:"array",description:"The list of hook configurations to execute.",required:!0,items:{type:"object",description:"A hook configuration entry that defines a hook to execute.",properties:{type:{type:"string",description:'The type of hook. Note: "function" type is only available via SDK registration, not settings.json.',enum:["command","http"],required:!0},command:{type:"string",description:'The command to execute when the hook is triggered. Required for "command" type.'},url:{type:"string",description:'The URL to send the POST request to. Required for "http" type.'},headers:{type:"object",description:"HTTP headers to include in the request. Supports env var interpolation ($VAR, ${VAR}).",additionalProperties:{type:"string"}},allowedEnvVars:{type:"array",description:"List of environment variables allowed for interpolation in headers and URL.",items:{type:"string"}},name:{type:"string",description:"An optional name for the hook."},description:{type:"string",description:"An optional description of what the hook does."},timeout:{type:"number",description:"Timeout in seconds for the hook execution."},env:{type:"object",description:"Environment variables to set when executing the hook command.",additionalProperties:{type:"string"}},async:{type:"boolean",description:'Whether to execute the hook asynchronously (non-blocking, for "command" type only).'},once:{type:"boolean",description:'Whether to execute the hook only once per session (for "http" type).'},statusMessage:{type:"string",description:"A message to display while the hook is executing."},shell:{type:"string",description:"The shell to use for command execution.",enum:["bash","powershell"]}}}}}},Rs={mcpServers:{type:"object",label:"MCP Servers",category:"Advanced",requiresRestart:!0,default:{},description:"Configuration for MCP servers.",showInDialog:!1,mergeStrategy:"shallow_merge"},channels:{type:"object",label:"Channels",category:"Advanced",requiresRestart:!0,default:{},description:"Configuration for messaging channels.",showInDialog:!1,mergeStrategy:"shallow_merge"},modelProviders:{type:"object",label:"Model Providers",category:"Model",requiresRestart:!1,default:{},description:"Model providers configuration grouped by authType. Each authType contains an array of model configurations.",showInDialog:!1,mergeStrategy:"replace"},plansDirectory:{type:"string",label:"Plans Directory",category:"Advanced",requiresRestart:!0,default:void 0,description:"Custom directory for approved Plan Mode files. Relative paths are resolved from the project root, and the resolved path must stay within the project root. Defaults to ~/.matilda/plans.",showInDialog:!1},env:{type:"object",label:"Environment Variables",category:"Advanced",requiresRestart:!0,default:{},description:"Environment variables to set as fallback defaults. These are loaded with the lowest priority: system environment variables > .env files > settings.json env field.",showInDialog:!1,mergeStrategy:"shallow_merge"},proxy:{type:"string",label:"Proxy",category:"Advanced",requiresRestart:!0,default:void 0,description:"Proxy URL for CLI HTTP requests. Takes precedence over proxy environment variables when --proxy is not provided.",showInDialog:!1},general:{type:"object",label:"General",category:"General",requiresRestart:!1,default:{},description:"General application settings.",showInDialog:!1,properties:{preferredEditor:{type:"string",label:"Preferred Editor",category:"General",requiresRestart:!1,default:void 0,description:"The preferred editor to open files in.",showInDialog:!0},vimMode:{type:"boolean",label:"Vim Mode",category:"General",requiresRestart:!1,default:!1,description:"Enable Vim keybindings",showInDialog:!0},enableAutoUpdate:{type:"boolean",label:"Enable Auto Update",category:"General",requiresRestart:!1,default:!0,description:"Automatically install Matilda Code updates on startup when possible. Update checks and \u201Cnew version available\u201D notices (with the install command) still run when this is off.",showInDialog:!0},showSessionRecap:{type:"boolean",label:"Show Session Recap",category:"General",requiresRestart:!1,default:!1,description:'Auto-show a one-line "where you left off" recap when returning to the terminal after being away. Off by default. Use /recap to trigger manually regardless of this setting.',showInDialog:!0},sessionRecapAwayThresholdMinutes:{type:"number",label:"Session Recap Away Threshold (minutes)",category:"General",requiresRestart:!1,default:5,description:"How many minutes the terminal must be blurred before an auto-recap fires on the next focus-in. Matches Claude Code's default of 5 minutes; raise if you briefly alt-tab and do not want recaps to pile up.",showInDialog:!0},cleanupPeriodDays:{type:"number",label:"Cleanup Period (days)",category:"General",requiresRestart:!0,default:30,description:"Number of days to retain ~/.matilda/file-history/ session backups used by /rewind. Backups older than this are removed by a background housekeeping pass that runs at most once per day. Set to 0 for minimum retention (~1 hour) \u2014 protects sessions touched in the last hour, plus the currently active session. Other persistent caches will honor the same setting in the future.",showInDialog:!0},gitCoAuthor:{type:"object",label:"Attribution",category:"General",requiresRestart:!1,default:{commit:!0,pr:!0,prMessage:"Written by Matilda \u{1F1E6}\u{1F1FA} made by [Maincode](https://maincode.com)"},description:"Attribution added to git commits and pull requests created through Matilda.",showInDialog:!1,legacyTypes:["boolean"],properties:{commit:{type:"boolean",label:"Attribution: commit",category:"General",requiresRestart:!1,default:!0,description:"Add a Co-authored-by trailer to git commit messages AND attach a per-file AI-attribution git note (`refs/notes/ai-attribution`) for commits made through Matilda. Disabling skips both.",showInDialog:!0},pr:{type:"boolean",label:"Attribution: PR",category:"General",requiresRestart:!1,default:!0,description:"Append a Matilda attribution line to PR descriptions when running `gh pr create`.",showInDialog:!0},prMessage:{type:"string",label:"Attribution: PR message",category:"General",requiresRestart:!1,default:"Written by Matilda \u{1F1E6}\u{1F1FA} made by [Maincode](https://maincode.com)",description:"The footer appended to PR descriptions when `gitCoAuthor.pr` is enabled. Customize it to rebrand the footer, or set it to an empty string to append nothing.",showInDialog:!1}}},debugKeystrokeLogging:{type:"boolean",label:"Debug Keystroke Logging",category:"General",requiresRestart:!1,default:!1,description:"Enable debug logging of keystrokes to the console.",showInDialog:!1},language:{type:"enum",label:"Language: UI",category:"General",requiresRestart:!0,default:"auto",description:'The language for the user interface. Use "auto" to detect from system settings. You can also use custom language codes (e.g., "es", "fr") by placing JS language files in ~/.matilda/locales/ (e.g., ~/.matilda/locales/es.js).',showInDialog:!0,options:[]},outputLanguage:{type:"string",label:"Language: Model",category:"General",requiresRestart:!0,default:"auto",description:'The language for LLM output. Use "auto" to detect from system settings, or set a specific language. English defaults to Australian English.',showInDialog:!0},dynamicCommandTranslation:{type:"boolean",label:"Language: Dynamic Command Translation",category:"General",requiresRestart:!1,default:!1,description:"Enable AI translation for dynamic slash command descriptions. When disabled, dynamic commands use their original descriptions and do not trigger translation model calls.",showInDialog:!0},terminalBell:{type:"boolean",label:"Terminal Bell Notification",category:"General",requiresRestart:!1,default:!0,description:"Play terminal bell sound when response completes or needs approval.",showInDialog:!0},preventSystemSleep:{type:"boolean",label:"Prevent System Sleep While Running",category:"General",requiresRestart:!0,default:!0,description:"Prevent the system from sleeping while Matilda is streaming a model response or executing tools. Idle prompt time and permission prompts do not inhibit sleep.",showInDialog:!0},chatRecording:{type:"boolean",label:"Chat Recording",category:"General",requiresRestart:!0,default:!0,description:"Enable saving chat history to disk. Disabling this will also prevent --continue and --resume from working.",showInDialog:!1},defaultFileEncoding:{type:"enum",label:"Default File Encoding",category:"General",requiresRestart:!1,default:"utf-8",description:'Default encoding for new files. Use "utf-8" (default) for UTF-8 without BOM, or "utf-8-bom" for UTF-8 with BOM. Only change this if your project specifically requires BOM.',showInDialog:!1,options:[{value:"utf-8",label:"UTF-8 (without BOM)"},{value:"utf-8-bom",label:"UTF-8 with BOM"}]}}},output:{type:"object",label:"Output",category:"General",requiresRestart:!1,default:{},description:"Settings for the CLI output.",showInDialog:!1,properties:{format:{type:"enum",label:"Output Format",category:"General",requiresRestart:!1,default:"text",description:"The format of the CLI output.",showInDialog:!1,options:[{value:"text",label:"Text"},{value:"json",label:"JSON"}]}}},dualOutput:{type:"object",label:"Dual Output",category:"Advanced",requiresRestart:!0,default:{},description:"Dual-output sidecar mode: emit structured JSON events to a second channel while the TUI renders normally on stdout. See docs/users/features/dual-output.md. CLI flags take precedence over these settings.",showInDialog:!1,properties:{jsonFile:{type:"string",label:"JSON Event File",category:"Advanced",requiresRestart:!0,default:void 0,description:"File path for structured JSON event output. Equivalent to --json-file. Ignored if --json-fd or --json-file is also set.",showInDialog:!1},inputFile:{type:"string",label:"Remote Input File",category:"Advanced",requiresRestart:!0,default:void 0,description:"File path for remote input commands (JSONL). Equivalent to --input-file. Ignored if --input-file is also set.",showInDialog:!1}}},ui:{type:"object",label:"UI",category:"UI",requiresRestart:!1,default:{},description:"User interface settings.",showInDialog:!1,properties:{theme:{type:"string",label:"Theme",category:"UI",requiresRestart:!1,default:"Matilda Dark",description:"The color theme for the UI.",showInDialog:!0},autoModeAcknowledged:{type:"boolean",label:"Auto Mode Acknowledged",category:"UI",requiresRestart:!1,default:!1,description:"True once the user has seen the first-time information message about the AUTO approval mode. Set automatically; not intended for manual configuration.",showInDialog:!1},statusLine:{type:"object",label:"Status Line",category:"UI",requiresRestart:!1,default:void 0,description:'Status line display configuration. Use `type: "preset"` with built-in item ids, or `type: "command"` with a shell command. Optional command `refreshInterval` (seconds, >= 1) re-runs the command on a timer so external data stays fresh. Set `respectUserColors: true` to preserve ANSI color codes in command output instead of applying dim/theme styling. Set `hideContextIndicator: true` to hide the built-in context usage indicator in the footer right section.',showInDialog:!1},customThemes:{type:"object",label:"Custom Themes",category:"UI",requiresRestart:!1,default:{},description:"Custom theme definitions.",showInDialog:!1},hideBuiltinWorktreeIndicator:{type:"boolean",label:"Hide Built-in Worktree Indicator",category:"UI",requiresRestart:!1,default:!1,description:"When true, the built-in `\u2387 worktree-<branch> (<slug>)` line in the Footer is hidden. The worktree state is still surfaced to custom statusline scripts via the stdin payload (`worktree.{name, path, branch, original_cwd, original_branch}`). Keep at the default `false` unless your custom statusline renders the worktree itself \u2014 otherwise an active worktree silently has no UI affordance.",showInDialog:!1},hideWindowTitle:{type:"boolean",label:"Hide Window Title",category:"UI",requiresRestart:!0,default:!1,description:"Hide the window title bar",showInDialog:!1},showStatusInTitle:{type:"boolean",label:"Show Status in Title",category:"UI",requiresRestart:!1,default:!1,description:"Show Matilda status and thoughts in the terminal window title",showInDialog:!1},hideTips:{type:"boolean",label:"Hide Tips",category:"UI",requiresRestart:!1,default:!1,description:"Hide helpful tips in the UI",showInDialog:!0},hideKeybindHints:{type:"boolean",label:"Hide Keybind Hints",category:"UI",requiresRestart:!1,default:!0,description:'Hide passive keyboard-shortcut hints in the UI: the Ctrl+T hint on the collapsed task list, the "? for shortcuts" suffix in the input placeholder, the "Esc to interrupt" hint on the loading line, the "Ctrl+Q to expand" hint on thinking blocks, and the "tab to cycle" hint on the approval-mode indicator. Keybindings themselves stay enabled, and the shortcuts list opened with ? still works.',showInDialog:!0},showLineNumbers:{type:"boolean",label:"Show Line Numbers in Code",category:"UI",requiresRestart:!1,default:!0,description:"Show line numbers in the code output.",showInDialog:!0},renderMode:{type:"enum",label:"Markdown Render Mode",category:"UI",requiresRestart:!1,default:"render",description:'Default Markdown display mode. Use "render" for rich visual previews, or "raw" to show source-oriented Markdown by default. Toggle during a session with Alt/Option+M; on macOS the terminal must send Option as Meta.',showInDialog:!0,options:[{value:"render",label:"Render visual previews"},{value:"raw",label:"Show raw source"}]},showCitations:{type:"boolean",label:"Show Citations",category:"UI",requiresRestart:!1,default:!1,description:"Show citations for generated text in the chat.",showInDialog:!1},customWittyPhrases:{type:"array",label:"Custom Witty Phrases",category:"UI",requiresRestart:!1,default:[],description:"Custom witty phrases to display during loading.",showInDialog:!1},enableWelcomeBack:{type:"boolean",label:"Show Welcome Back Dialog",category:"UI",requiresRestart:!1,default:!0,description:'Show welcome back dialog when returning to a project with conversation history. Choosing "Start new chat session" suppresses the dialog for that project until the project summary changes.',showInDialog:!0},enableUserFeedback:{type:"boolean",label:"Enable User Feedback",category:"UI",requiresRestart:!1,default:!0,description:"Show optional feedback dialog after conversations to help improve Matilda performance.",showInDialog:!0},enableFollowupSuggestions:{type:"boolean",label:"Enable Follow-up Suggestions",category:"UI",requiresRestart:!1,default:!1,description:"Show context-aware follow-up suggestions after task completion. Press Tab or Right Arrow to accept, Enter to accept and submit.",showInDialog:!0},enableCacheSharing:{type:"boolean",label:"Enable Cache Sharing for Suggestions",category:"UI",requiresRestart:!1,default:!0,description:"Use cache-aware forked queries for suggestion generation. Reduces cost on providers that support prefix caching (experimental).",showInDialog:!1},enableSpeculation:{type:"boolean",label:"Enable Speculative Execution",category:"UI",requiresRestart:!1,default:!1,description:"Speculatively execute accepted suggestions before submission. Results appear instantly when you accept (experimental).",showInDialog:!1},accessibility:{type:"object",label:"Accessibility",category:"UI",requiresRestart:!0,default:{},description:"Accessibility settings.",showInDialog:!1,properties:{enableLoadingPhrases:{type:"boolean",label:"Enable Loading Phrases",category:"UI",requiresRestart:!0,default:!0,description:"Enable loading phrases (disable for accessibility)",showInDialog:!0},screenReader:{type:"boolean",label:"Screen Reader Mode",category:"UI",requiresRestart:!0,default:void 0,description:"Render output in plain-text to be more screen reader accessible",showInDialog:!1}}},compactMode:{type:"boolean",label:"Compact Mode",category:"UI",requiresRestart:!1,default:!1,description:"Hide tool output for a cleaner view (toggle with Ctrl+O).",showInDialog:!0},compactInline:{type:"boolean",label:"Compact Inline",category:"UI",requiresRestart:!0,default:!1,description:"Compact tool display within each group instead of merging across groups. Requires compactMode to be enabled.",showInDialog:!0},useTerminalBuffer:{type:"boolean",label:"Fullscreen rendering (flicker-free, prompt pinned to the bottom)",category:"UI",requiresRestart:!1,default:!0,description:"Draw the interface on the terminal's alternate screen buffer, like vim, with the prompt pinned to the bottom and only the visible messages rendered. Eliminates flicker and keeps memory flat on long sessions. Toggle with /tui. Scroll with Shift+\u2191/\u2193 (line), PgUp/PgDn (page), Ctrl+Home/End (top/bottom), or the mouse wheel. The conversation lives in the alternate buffer, so your terminal's own find and tmux copy-mode do not see it; for native text selection, hold Shift (or Option on macOS) while dragging.",showInDialog:!0},shellOutputMaxLines:{type:"number",label:"Shell Output Max Lines",category:"UI",requiresRestart:!1,default:5,description:"Max number of shell output lines shown inline. Set to 0 to disable the cap and show full output. The hidden line count is still surfaced via the `+N lines` indicator.",showInDialog:!0},maxHistoryItems:{type:"number",label:"Max History Items",category:"UI",requiresRestart:!1,default:2e3,description:"Max number of messages kept in the on-screen history of a session; the oldest are replaced by a trim notice. Set to 0 (or any negative value) for unlimited. Bounds memory and per-message render cost on long sessions. The full transcript always remains on disk and is unaffected. Only applies with fullscreen rendering (useTerminalBuffer) enabled.",showInDialog:!0},maxFps:{type:"number",label:"Max FPS",category:"UI",requiresRestart:!0,default:60,description:"Cap on terminal render rate (frames per second). Higher values (e.g. 144) reduce input-to-render latency on high-refresh displays at the cost of more CPU. Values <= 0 are ignored. Requires restart.",showInDialog:!1},hideBanner:{type:"boolean",label:"Hide Banner",category:"UI",requiresRestart:!1,default:!1,description:"Hide the startup ASCII banner and info panel.",showInDialog:!0},hideAccount:{type:"boolean",label:"Hide Account in Banner",category:"UI",requiresRestart:!1,default:!1,description:"Hide the `account:` row in the startup banner. The row otherwise always shows, to make the signed-in account visible at a glance.",showInDialog:!0},modelDisplayName:{type:"string",label:"Model Display Name",category:"UI",requiresRestart:!1,default:"",description:'Override the model name shown in the UI (footer, status line, /about, /context). Display-only \u2014 API requests still use the real model id. Leave empty to show the actual model. Set to a single brand name (e.g. "matilda") to always present that regardless of the backing model.',showInDialog:!0},shimmer:{type:"boolean",label:"Loading Shimmer",category:"UI",requiresRestart:!1,default:!0,description:"Animate a shimmering highlight over the loading verb while Matilda is thinking. Disable for a static label. Skipped automatically for screen readers and when NO_COLOR is set.",showInDialog:!0},showThinkingPreview:{type:"boolean",label:"Thinking Preview",category:"UI",requiresRestart:!1,default:!1,description:"Show a live preview of the reasoning text while Matilda is thinking. Disabled by default so the thinking block stays a stable one-line indicator instead of changing height as text streams in.",showInDialog:!0},showThinkingTrace:{type:"boolean",label:"Thinking Trace",category:"UI",requiresRestart:!1,default:!1,description:"Show the full reasoning trace in thinking blocks instead of the collapsed one-line summary (toggle with Ctrl+Q).",showInDialog:!0},reducedMotion:{type:"boolean",label:"Reduced Motion",category:"UI",requiresRestart:!1,default:!1,description:"Snap animations to their final state instead of easing them \u2014 focus transitions, selection highlights, dialog reveals and flourishes become instant. Motion is also disabled automatically for screen readers, non-interactive terminals, and when NO_COLOR is set.",showInDialog:!0},customBannerTitle:{type:"string",label:"Custom Banner Title",category:"UI",requiresRestart:!1,default:"",description:'Replace the default "\u274B Matilda" title shown in the banner. The version suffix is always appended.',showInDialog:!1},customBannerSubtitle:{type:"string",label:"Custom Banner Subtitle",category:"UI",requiresRestart:!1,default:"",description:'Optional subtitle line rendered under the banner title, replacing the "by Maincode" byline. Empty (default) keeps the byline.',showInDialog:!1},customAsciiArt:{type:"object",label:"Custom ASCII Art",category:"UI",requiresRestart:!1,default:void 0,description:'Add ASCII art beside the banner info rows (the default banner shows none; art is hidden when no tier fits). Accepts an inline string, {"path": "..."}, or {"small": ..., "large": ...} for width-aware selection.',showInDialog:!1,jsonSchemaOverride:{oneOf:[{type:"string"},{type:"object",properties:{path:{type:"string"}},required:["path"],additionalProperties:!1},{type:"object",properties:{small:{oneOf:[{type:"string"},{type:"object",properties:{path:{type:"string"}},required:["path"],additionalProperties:!1}]},large:{oneOf:[{type:"string"},{type:"object",properties:{path:{type:"string"}},required:["path"],additionalProperties:!1}]}},additionalProperties:!1}]}}}},ide:{type:"object",label:"IDE",category:"IDE",requiresRestart:!0,default:{},description:"IDE integration settings.",showInDialog:!1,properties:{enabled:{type:"boolean",label:"Auto-connect to IDE",category:"IDE",requiresRestart:!0,default:!1,description:"Enable IDE integration mode",showInDialog:!0},hasSeenNudge:{type:"boolean",label:"Has Seen IDE Integration Nudge",category:"IDE",requiresRestart:!1,default:!1,description:"Whether the user has seen the IDE integration nudge.",showInDialog:!1}}},privacy:{type:"object",label:"Privacy",category:"Privacy",requiresRestart:!0,default:{},description:"Privacy-related settings.",showInDialog:!1,properties:{usageStatisticsEnabled:{type:"boolean",label:"Enable Usage Statistics",category:"Privacy",requiresRestart:!0,default:!1,description:"Enable collection of usage statistics",showInDialog:!0}}},telemetry:{type:"object",label:"Telemetry",category:"Advanced",requiresRestart:!0,default:void 0,description:"Telemetry configuration.",showInDialog:!1,jsonSchemaOverride:{type:"object",properties:{includeSensitiveSpanAttributes:{description:"When enabled, user prompts, system prompts, tool inputs/outputs, and model responses are written to native OTel span attributes in addition to the log-to-span bridge. Warning: this may expose sensitive data (file contents, shell commands, conversation history) to your OTLP backend.",type:"boolean",default:!1},resourceAttributes:{description:"Static resource attributes attached to every span/log/metric the SDK exports (OTLP or file outfile \u2014 they share the same Resource). Merged with the OTEL_RESOURCE_ATTRIBUTES env var; settings win on key conflict. Reserved keys (service.version, session.id) are dropped with a warning.",type:"object",additionalProperties:{type:"string"},default:{}},metrics:{description:"Per-signal cardinality controls for exported metrics.",type:"object",additionalProperties:!1,properties:{includeSessionId:{description:"Include session.id on every metric data point. WARNING: each CLI session creates a new value, causing unbounded metric time-series fan-out at the backend. Only enable for short-term debugging \u2014 spans and logs still carry session.id.",type:"boolean",default:!1}}}},additionalProperties:!0}},outboundCorrelation:{type:"object",label:"Outbound Correlation",category:"Advanced",requiresRestart:!0,default:void 0,description:"SECURITY-RELEVANT. Controls what client-side correlation data matilda-code writes into outbound LLM API requests (Matilda-compatible, OpenAI, Anthropic, etc.) \u2014 separate from `telemetry.*` which governs data flow into the operator's OWN OTLP collector. All values default to off. Opt in only when the LLM provider also reports into your OTel collector for cross-process trace stitching (e.g. ARMS Tracing + Matilda-compatible).",showInDialog:!1,jsonSchemaOverride:{type:"object",properties:{propagateTraceContext:{description:"Requires `telemetry.enabled: true`. Inject W3C `traceparent` on outbound `fetch` requests (LLM SDK calls, MCP StreamableHTTP, WebFetch, ...) AND as a `TRACEPARENT` environment variable in shell child processes (Bash tool, hooks, monitor). When enabled, any existing `TRACEPARENT` in the parent environment is overwritten with matilda-code's own trace context. Default: false \u2014 trace context stays internal to the operator's OTLP collector. Set true when you want cross-process trace stitching with an OTel-aware LLM provider (e.g. ARMS+Matilda-compatible) or need shell scripts / CLI tools to participate in distributed tracing.",type:"boolean",default:!1}},additionalProperties:!1}},fastModel:{type:"string",label:"Fast Model",category:"Model",requiresRestart:!1,default:"",description:"Model used for generating prompt suggestions and speculative execution. Leave empty to use the main model. A smaller/faster model (e.g., matilda3-coder-flash) reduces latency and cost.",showInDialog:!0},model:{type:"object",label:"Model",category:"Model",requiresRestart:!1,default:{},description:"Settings related to the generative model.",showInDialog:!1,properties:{name:{type:"string",label:"Model",category:"Model",requiresRestart:!1,default:void 0,description:"The model to use for conversations.",showInDialog:!1},maxSessionTurns:{type:"number",label:"Max Session Turns",category:"Model",requiresRestart:!1,default:-1,description:"Maximum number of user/model/tool turns to keep in a session. -1 means unlimited.",showInDialog:!1},maxWallTimeSeconds:{type:"number",label:"Max Wall-Clock Time (seconds)",category:"Model",requiresRestart:!1,default:-1,description:"Run-level wall-clock budget for headless / unattended runs, in seconds. -1 means unlimited; otherwise must be in [1, ~2,147,483] (sub-second values and values above ~24 days are rejected as typos). Overridable per-invocation via --max-wall-time (which also accepts duration suffixes like 5m, 1.5h).",showInDialog:!1},maxToolCalls:{type:"number",label:"Max Tool Calls",category:"Model",requiresRestart:!1,default:-1,description:'Cumulative tool-call budget for a run (counts every executed tool, success or failure; structured_output under --json-schema is exempt). -1 means unlimited; 0 means "no tool calls allowed" (first call aborts). Capped at 1,000,000 to catch typos. Overridable via --max-tool-calls.',showInDialog:!1},chatCompression:{type:"object",label:"Chat Compression",category:"Model",requiresRestart:!1,default:void 0,description:"Chat compression settings.",showInDialog:!1},sessionTokenLimit:{type:"number",label:"Session Token Limit",category:"Model",requiresRestart:!1,default:void 0,description:"The maximum number of tokens allowed in a session.",showInDialog:!1},skipNextSpeakerCheck:{type:"boolean",label:"Skip Next Speaker Check",category:"Model",requiresRestart:!1,default:!0,description:"Skip the next speaker check.",showInDialog:!1},skipLoopDetection:{type:"boolean",label:"Skip Loop Detection",category:"Model",requiresRestart:!1,default:!0,description:"Skip streaming loop detection. Defaults to true to avoid false-positive interruptions; set to false to re-enable as an unattended-run guardrail.",showInDialog:!1},skipStartupContext:{type:"boolean",label:"Skip Startup Context",category:"Model",requiresRestart:!0,default:!1,description:"Avoid sending the workspace startup context at the beginning of each session.",showInDialog:!1},enableOpenAILogging:{type:"boolean",label:"Enable OpenAI Logging",category:"Model",requiresRestart:!1,default:!1,description:"Enable OpenAI logging.",showInDialog:!1},openAILoggingDir:{type:"string",label:"OpenAI Logging Directory",category:"Model",requiresRestart:!1,default:void 0,description:"Custom directory path for OpenAI API logs. If not specified, defaults to logs/openai in the current working directory.",showInDialog:!1},generationConfig:{type:"object",label:"Generation Configuration",category:"Model",requiresRestart:!1,default:void 0,description:"Generation configuration settings.",showInDialog:!1,properties:{timeout:{type:"number",label:"Timeout",category:"Generation Configuration",requiresRestart:!1,default:void 0,description:"Request timeout in milliseconds.",parentKey:"generationConfig",showInDialog:!1},maxRetries:{type:"number",label:"Max Retries",category:"Generation Configuration",requiresRestart:!1,default:void 0,description:"Maximum number of retries for failed requests.",parentKey:"generationConfig",showInDialog:!1},enableCacheControl:{type:"boolean",label:"Enable Cache Control",category:"Generation Configuration",requiresRestart:!1,default:!0,description:"Enable cache control for Matilda-compatible providers.",parentKey:"generationConfig",showInDialog:!1},splitToolMedia:{type:"boolean",label:"Split Tool Result Media",category:"Generation Configuration",requiresRestart:!1,default:!0,description:'When true, media (images / audio / video / files) returned by tool calls \u2014 including the built-in read_file and MCP tools \u2014 is split into a follow-up user message instead of being embedded in the `role: "tool"` message. The OpenAI Chat Completions spec only permits text on tool messages, so strict OpenAI-compatible servers (e.g., doubao / new-api / LM Studio) silently drop or reject embedded media and the model never sees an image read via read_file (MaincodeHQ/matilda-code#4876, #3616). Default true is spec-compliant and safe for permissive providers; set false only to restore the legacy embed-in-tool-message behavior.',parentKey:"generationConfig",showInDialog:!1},schemaCompliance:{type:"enum",label:"Tool Schema Compliance",category:"Generation Configuration",requiresRestart:!1,default:"auto",description:'The compliance mode for tool schemas sent to the model. Use "openapi_30" for strict OpenAPI 3.0 compatibility (e.g., for Gemini).',parentKey:"generationConfig",showInDialog:!1,options:[{value:"auto",label:"Auto (Default)"},{value:"openapi_30",label:"OpenAPI 3.0 Strict"}]},contextWindowSize:{type:"number",label:"Context Window Size",category:"Generation Configuration",requiresRestart:!1,default:void 0,description:"Overrides the default context window size for the selected model. Use this setting when a provider's effective context limit differs from Matilda's default. This value defines the model's assumed maximum context capacity, not a per-request token limit.",parentKey:"generationConfig",showInDialog:!1}}}}},modelPricing:{type:"object",label:"Model Pricing",category:"Model",requiresRestart:!1,default:void 0,description:'Optional per-model pricing for cost estimation in /stats model. Example: {"matilda3-coder": {"inputPerMillionTokens": 0.30, "outputPerMillionTokens": 1.20}}',showInDialog:!1},context:{type:"object",label:"Context",category:"Context",requiresRestart:!1,default:{},description:"Settings for managing context provided to the model.",showInDialog:!1,properties:{fileName:{type:"object",label:"Context File Name",category:"Context",requiresRestart:!1,default:void 0,description:"The name of the context file.",showInDialog:!1},importFormat:{type:"string",label:"Memory Import Format",category:"Context",requiresRestart:!1,default:void 0,description:"The format to use when importing memory.",showInDialog:!1},includeDirectories:{type:"array",label:"Include Directories",category:"Context",requiresRestart:!1,default:[],description:"Additional directories to include in the workspace context. Missing directories will be skipped with a warning.",showInDialog:!1,mergeStrategy:"concat"},loadFromIncludeDirectories:{type:"boolean",label:"Load Memory From Include Directories",category:"Context",requiresRestart:!1,default:!1,description:"Whether to load memory files from include directories.",showInDialog:!1},clearContextOnIdle:{type:"object",label:"Clear Context On Idle",category:"Context",requiresRestart:!1,default:{},description:"Settings for clearing stale or oversized tool result context. Use -1 to disable a threshold.",showInDialog:!1,properties:{toolResultsThresholdMinutes:{type:"number",label:"Tool Results Idle Threshold (minutes)",category:"Context",requiresRestart:!1,default:60,description:"Minutes of inactivity before clearing old tool result content. Use -1 to disable.",showInDialog:!1},toolResultsNumToKeep:{type:"number",label:"Tool Results Number To Keep",category:"Context",requiresRestart:!1,default:5,description:"Number of most-recent compactable tool results to preserve when clearing. Floor at 1.",showInDialog:!1},toolResultsTotalCharsThreshold:{type:"number",label:"Tool Results Total Chars Threshold",category:"Context",requiresRestart:!1,default:5e5,description:"Total compactable tool result output characters allowed in history before clearing oldest results, down to half this total. Use -1 to disable. This is a soft threshold: protected recent tool results may keep the total above it.",showInDialog:!1}}},fileFiltering:{type:"object",label:"File Filtering",category:"Context",requiresRestart:!0,default:{},description:"Settings for git-aware file filtering.",showInDialog:!1,properties:{respectGitIgnore:{type:"boolean",label:"Respect .gitignore",category:"Context",requiresRestart:!0,default:!0,description:"Respect .gitignore files when searching",showInDialog:!0},respectMatildaIgnore:{type:"boolean",label:"Respect .matildaignore",category:"Context",requiresRestart:!0,default:!0,description:"Respect .matildaignore files when searching",showInDialog:!0},enableRecursiveFileSearch:{type:"boolean",label:"Enable Recursive File Search",category:"Context",requiresRestart:!0,default:!0,description:"Enable recursive file search functionality",showInDialog:!1},enableFuzzySearch:{type:"boolean",label:"Enable Fuzzy Search",category:"Context",requiresRestart:!0,default:!0,description:"Enable fuzzy search when searching for files.",showInDialog:!0}}}}},memory:{type:"object",label:"Memory",category:"Memory",requiresRestart:!1,default:{},description:"Settings for managed auto-memory.",showInDialog:!1,properties:{enableManagedAutoMemory:{type:"boolean",label:"Enable Managed Auto-Memory",category:"Memory",requiresRestart:!1,default:!0,description:"Enable background extraction of memories from conversations.",showInDialog:!1},enableManagedAutoDream:{type:"boolean",label:"Enable Managed Auto-Dream",category:"Memory",requiresRestart:!1,default:!0,description:"Enable automatic consolidation (dream) of collected memories.",showInDialog:!1},enableAutoSkill:{type:"boolean",label:"Enable Auto Skill",category:"Memory",requiresRestart:!1,default:!0,description:"Enable background review for reusable project skills after tool-heavy sessions.",showInDialog:!1}}},slashCommands:{type:"object",label:"Slash Commands",category:"Advanced",requiresRestart:!0,default:{},description:"Configuration for slash commands exposed by the CLI. Useful for locking down the command surface in multi-tenant or enterprise deployments.",showInDialog:!1,properties:{disabled:{type:"array",label:"Disabled Slash Commands",category:"Advanced",requiresRestart:!0,default:void 0,description:'Slash command names to hide and refuse to execute. Matched case-insensitively against the final command name (for extension commands this is the disambiguated form, e.g. "myext.deploy"). Merged as a union across settings scopes, so workspace settings can add to but not remove entries defined in system/user settings.',showInDialog:!1,mergeStrategy:"union"}}},skills:{type:"object",label:"Skills",category:"Advanced",requiresRestart:!1,default:{},description:"Configuration for skills (SKILL.md-based capabilities) exposed to the model.",showInDialog:!1,properties:{disabled:{type:"array",label:"Disabled Skills",category:"Advanced",requiresRestart:!1,default:void 0,description:"Skill names to hide. Matched case-insensitively against the skill name. Hidden skills do not appear in <available_skills> or as /<name> slash commands. UNION-merged across systemDefaults/user/workspace/system scopes \u2014 workspace cannot remove entries defined in higher scopes.",showInDialog:!1,mergeStrategy:"union"}}},permissions:{type:"object",label:"Permissions",category:"Tools",requiresRestart:!0,default:{},description:"Permission rules controlling tool usage. Rules are evaluated in priority order: deny > ask > allow.",showInDialog:!1,properties:{allow:{type:"array",label:"Allow Rules",category:"Tools",requiresRestart:!0,default:void 0,description:'Tools or commands that are auto-approved without confirmation. Examples: "ShellTool", "Bash(git *)", "ReadFileTool".',showInDialog:!1,mergeStrategy:"union"},ask:{type:"array",label:"Ask Rules",category:"Tools",requiresRestart:!0,default:void 0,description:"Tools or commands that always require user confirmation. Takes precedence over allow rules.",showInDialog:!1,mergeStrategy:"union"},deny:{type:"array",label:"Deny Rules",category:"Tools",requiresRestart:!0,default:void 0,description:'Tools or commands that are always blocked. Highest priority rule. Examples: "ShellTool", "Bash(rm -rf *)".',showInDialog:!1,mergeStrategy:"union"},autoMode:{type:"object",label:"Auto Mode",category:"Tools",requiresRestart:!0,default:{},description:"Settings consumed by the AUTO approval mode classifier.",showInDialog:!1,properties:{classifier:{type:"object",label:"Auto Mode Classifier",category:"Tools",requiresRestart:!0,default:{},description:"Runtime controls for the AUTO approval mode classifier.",showInDialog:!1,properties:{timeouts:{type:"object",label:"Auto Mode Classifier Timeouts",category:"Tools",requiresRestart:!0,default:{},description:"Timeouts for the two AUTO classifier stages, in milliseconds.",showInDialog:!1,properties:{stage1Ms:{type:"number",label:"Auto Mode Stage 1 Timeout",category:"Tools",requiresRestart:!0,default:void 0,description:"Timeout in milliseconds for the fast stage-1 AUTO classifier.",showInDialog:!1},stage2Ms:{type:"number",label:"Auto Mode Stage 2 Timeout",category:"Tools",requiresRestart:!0,default:void 0,description:"Timeout in milliseconds for the stage-2 AUTO classifier review.",showInDialog:!1}}},thinking:{type:"object",label:"Auto Mode Classifier Thinking",category:"Tools",requiresRestart:!0,default:{},description:"Provider/API-level thinking controls for the AUTO classifier.",showInDialog:!1,properties:{stage2Enabled:{type:"boolean",label:"Auto Mode Stage 2 Thinking",category:"Tools",requiresRestart:!0,default:!1,description:"Whether stage 2 may use provider/API-level thinking. Stage 1 always keeps thinking disabled.",showInDialog:!1}}}}},hints:{type:"object",label:"Classifier Hints",category:"Tools",requiresRestart:!0,default:{},description:"Natural-language hints injected into the classifier system prompt.",showInDialog:!1,properties:{allow:{type:"array",label:"Auto Mode Allow Hints",category:"Tools",requiresRestart:!0,default:void 0,description:"Natural-language descriptions of actions AUTO mode should allow.",showInDialog:!1,mergeStrategy:"union"},softDeny:{type:"array",label:"Auto Mode Soft-Deny Hints",category:"Tools",requiresRestart:!0,default:void 0,description:"Natural-language descriptions of destructive / irreversible actions AUTO mode should block unless the user explicitly authorised that exact action and scope.",showInDialog:!1,mergeStrategy:"union"},hardDeny:{type:"array",label:"Auto Mode Hard-Deny Hints",category:"Tools",requiresRestart:!0,default:void 0,description:"Natural-language descriptions of security-boundary actions the AUTO classifier must block even when an autoMode allow hint or recent user request would normally authorise them. Does not override permissions.allow; use permissions.deny for deterministic hard permission rules.",showInDialog:!1,mergeStrategy:"union"},deny:{type:"array",label:"Auto Mode Deny Hints (legacy)",category:"Tools",requiresRestart:!0,default:void 0,description:"Deprecated alias for `softDeny`. Entries here are merged into the SOFT BLOCK user section so existing settings keep working; new configurations should use `softDeny` or `hardDeny` instead.",showInDialog:!1,mergeStrategy:"union"}}},environment:{type:"array",label:"Auto Mode Environment",category:"Tools",requiresRestart:!0,default:void 0,description:"Environment / context lines injected into the classifier system prompt.",showInDialog:!1,mergeStrategy:"union"}}}}},tools:{type:"object",label:"Tools",category:"Tools",requiresRestart:!0,default:{},description:"Settings for built-in and custom tools.",showInDialog:!1,properties:{sandbox:{type:"object",label:"Sandbox",category:"Tools",requiresRestart:!0,default:void 0,description:"Sandbox execution environment (can be a boolean or a path string).",showInDialog:!1},sandboxImage:{type:"string",label:"Sandbox Image",category:"Tools",requiresRestart:!0,default:void 0,description:"Sandbox image URI used by Docker/Podman when --sandbox-image and MATILDA_SANDBOX_IMAGE are not set.",showInDialog:!1},toolSearch:{type:"object",label:"Tool Search",category:"Tools",requiresRestart:!0,default:{},description:"Settings for the ToolSearch discovery mechanism.",showInDialog:!1,properties:{enabled:{type:"boolean",label:"Enable ToolSearch",category:"Tools",requiresRestart:!0,default:!0,description:"When enabled, MCP tools are loaded on-demand via ToolSearch to reduce prompt size. Disable this for models that rely on prefix-based KV caching (e.g. DeepSeek) to keep the prompt prefix stable and maximize cache hit rates.",showInDialog:!0}}},shell:{type:"object",label:"Shell",category:"Tools",requiresRestart:!1,default:{},description:"Settings for shell execution.",showInDialog:!1,properties:{enableInteractiveShell:{type:"boolean",label:"Interactive Shell (PTY)",category:"Tools",requiresRestart:!0,default:!0,description:"Use node-pty for an interactive shell experience. Falls back to child_process if PTY is unavailable.",showInDialog:!0},pager:{type:"string",label:"Pager",category:"Tools",requiresRestart:!1,default:"cat",description:"The pager command to use for shell output. Defaults to `cat`.",showInDialog:!1},showColor:{type:"boolean",label:"Show Color",category:"Tools",requiresRestart:!1,default:!1,description:"Show color in shell output.",showInDialog:!1}}},core:{type:"array",label:"Core Tools (deprecated)",category:"Tools",requiresRestart:!0,default:void 0,description:"Deprecated. Use permissions.allow instead.",showInDialog:!1},allowed:{type:"array",label:"Allowed Tools (deprecated)",category:"Advanced",requiresRestart:!0,default:void 0,description:"Deprecated. Use permissions.allow instead.",showInDialog:!1},exclude:{type:"array",label:"Exclude Tools (deprecated)",category:"Tools",requiresRestart:!0,default:void 0,description:"Deprecated. Use permissions.deny instead.",showInDialog:!1,mergeStrategy:"union"},disabled:{type:"array",label:"Disabled Tools",category:"Tools",requiresRestart:!0,default:void 0,description:"Tool names hidden from the registry. Differs from permissions.deny: disabled tools are not registered at all, so they never appear in /tools and cannot be discovered by the model. Managed by the daemon mutation route POST /workspace/tools/:name/enable.",showInDialog:!1,mergeStrategy:"union"},approvalMode:{type:"enum",label:"Tool Approval Mode",category:"Tools",requiresRestart:!1,default:"default",description:"Approval mode for tool usage. Controls how tools are approved before execution.",showInDialog:!0,options:[{value:"plan",label:"Plan"},{value:"default",label:"Ask permissions"},{value:"auto-edit",label:"Auto Edit"},{value:"bogan",label:"BOGAN"}]},autoAccept:{type:"boolean",label:"Auto Accept",category:"Tools",requiresRestart:!1,default:!1,description:"Automatically accept and execute tool calls that are considered safe (e.g., read-only operations) without explicit user confirmation.",showInDialog:!1},discoveryCommand:{type:"string",label:"Tool Discovery Command",category:"Tools",requiresRestart:!0,default:void 0,description:"Command to run for tool discovery.",showInDialog:!1},callCommand:{type:"string",label:"Tool Call Command",category:"Tools",requiresRestart:!0,default:void 0,description:"Command to run for tool calls.",showInDialog:!1},useRipgrep:{type:"boolean",label:"Use Ripgrep",category:"Tools",requiresRestart:!1,default:!0,description:"Use ripgrep for file content search instead of the fallback implementation. Provides faster search performance.",showInDialog:!1},useBuiltinRipgrep:{type:"boolean",label:"Use Builtin Ripgrep",category:"Tools",requiresRestart:!1,default:!0,description:'Use the bundled ripgrep binary. When set to false, the system-level "rg" command will be used instead. This setting is only effective when useRipgrep is true.',showInDialog:!1},truncateToolOutputThreshold:{type:"number",label:"Tool Output Truncation Threshold",category:"General",requiresRestart:!0,default:$i,description:"Truncate tool output if it is larger than this many characters. Set to -1 to disable.",showInDialog:!1},truncateToolOutputLines:{type:"number",label:"Tool Output Truncation Lines",category:"General",requiresRestart:!0,default:qi,description:"The number of lines to keep when truncating tool output.",showInDialog:!1},toolOutputBatchBudget:{type:"number",label:"Tool Output Batch Budget",category:"General",requiresRestart:!0,default:Hi,description:"Per-message budget (characters) for the combined output of one batch of tool calls; the largest results are offloaded to disk when exceeded. Set to -1 to disable.",showInDialog:!1},computerUse:{type:"object",label:"Computer Use",category:"Tools",requiresRestart:!0,default:{},description:"Cross-platform desktop automation via the cua-driver native driver (trycua/cua). On first invocation a pinned, signed + notarized binary (~20MB) is downloaded into ~/.matilda/computer-use/ and the user is walked through macOS Accessibility / Screen Recording permissions if needed. Exposes cua-driver's full tool surface (click, type_text, scroll, drag, press_key, get_window_state, page, launch_app, and more).",showInDialog:!1,properties:{enabled:{type:"boolean",label:"Enable Computer Use",category:"Tools",requiresRestart:!0,default:!0,description:"When enabled (default), the cua-driver computer_use__* tools are registered as deferred built-ins.",showInDialog:!0},maxImageDimension:{type:"number",label:"Max Screenshot Dimension",category:"Tools",requiresRestart:!0,default:-1,description:"Longest-edge pixel cap applied to cua-driver screenshots (via set_config's max_image_dimension). -1 (default) keeps cua-driver's built-in default (1568); 0 disables resizing (full resolution); a positive value caps the longest edge. Lower caps cut vision-token cost at the expense of fine detail. Overridable via the MATILDA_COMPUTER_USE_MAX_IMAGE_DIMENSION env var.",showInDialog:!1}}}}},policy:{type:"object",label:"Daemon Policy",category:"Daemon",requiresRestart:!0,default:{},description:"Daemon multi-client coordination policies. Tool-level allow/deny rules live under `permissions`; this section is for runtime mediation behavior between concurrent HTTP clients sharing one `matilda serve` daemon.",showInDialog:!1,properties:{permissionStrategy:{type:"enum",label:"Permission Mediation Policy",category:"Daemon",requiresRestart:!0,default:"first-responder",description:'How permission requests resolve when multiple clients are attached. `first-responder` (default) = any client decides, first wins. `designated` = only the prompt originator decides; falls back to first-responder if originator is anonymous. NOTE: client identity comes from self-declared X-Matilda-Client-Id with no proof-of-possession (pair-token identity is not implemented yet), so any client observing originatorClientId on SSE frames can register with the same id and impersonate the originator. `consensus` = N-of-M voters must agree. Default N=floor(M/2)+1, which means UNANIMITY for M=2 (quorum=2, both must agree) and supermajority for larger even M (M=4 \u2192 quorum=3; M=6 \u2192 quorum=4). For M=2 specifically, split votes resolve only via permissionTimeoutMs. `local-only` = only loopback clients can RESOLVE; remote clients can still ABORT a pending permission via the cancel sentinel ({outcome:"cancelled"}) \u2014 cancel stays cross-policy for consistency. Strict-cancel-too deployments need a dedicated loopback-bound daemon. Requires daemon restart \u2014 read once at boot.',showInDialog:!0,options:[{value:"first-responder",label:"First Responder"},{value:"designated",label:"Designated Originator"},{value:"consensus",label:"Consensus Quorum"},{value:"local-only",label:"Local Only"}]},consensusQuorum:{type:"number",label:"Consensus Quorum Override",category:"Daemon",requiresRestart:!0,default:void 0,description:"Optional fixed quorum size for consensus policy. Capped at M (count of registered voters at request issue time) to prevent unreachable quorum. Unset = floor(M/2)+1. Requires daemon restart \u2014 read once at boot.",showInDialog:!1,jsonSchemaOverride:{type:"integer",minimum:1,description:"Optional fixed quorum size for consensus policy. Capped at M (count of registered voters at request issue time) to prevent unreachable quorum. Unset = floor(M/2)+1. Requires daemon restart \u2014 read once at boot."}}}},mcp:{type:"object",label:"MCP",category:"MCP",requiresRestart:!0,default:{},description:"Settings for Model Context Protocol (MCP) servers.",showInDialog:!1,properties:{serverCommand:{type:"string",label:"MCP Server Command",category:"MCP",requiresRestart:!0,default:void 0,description:"Command to start an MCP server.",showInDialog:!1},allowed:{type:"array",label:"Allow MCP Servers",category:"MCP",requiresRestart:!0,default:void 0,description:"A list of MCP servers to allow.",showInDialog:!1,mergeStrategy:"concat"},excluded:{type:"array",label:"Exclude MCP Servers",category:"MCP",requiresRestart:!0,default:void 0,description:"A list of MCP servers to exclude.",showInDialog:!1,mergeStrategy:"concat"}}},security:{type:"object",label:"Security",category:"Security",requiresRestart:!0,default:{},description:"Security-related settings.",showInDialog:!1,properties:{folderTrust:{type:"object",label:"Folder Trust",category:"Security",requiresRestart:!1,default:{},description:"Settings for folder trust.",showInDialog:!1,properties:{enabled:{type:"boolean",label:"Folder Trust",category:"Security",requiresRestart:!0,default:!0,description:"Setting to track whether Folder trust is enabled.",showInDialog:!1}}},auth:{type:"object",label:"Authentication",category:"Security",requiresRestart:!0,default:{},description:"Authentication settings.",showInDialog:!1,properties:{selectedType:{type:"string",label:"Selected Auth Type",category:"Security",requiresRestart:!0,default:void 0,description:"The currently selected authentication type.",showInDialog:!1},enforcedType:{type:"string",label:"Enforced Auth Type",category:"Advanced",requiresRestart:!0,default:void 0,description:"The required auth type. If this does not match the selected auth type, the user will be prompted to re-authenticate.",showInDialog:!1},useExternal:{type:"boolean",label:"Use External Auth",category:"Security",requiresRestart:!0,default:void 0,description:"Whether to use an external authentication flow.",showInDialog:!1},apiKey:{type:"string",label:"API Key",category:"Security",requiresRestart:!0,default:void 0,description:"API key for OpenAI compatible authentication.",showInDialog:!1},baseUrl:{type:"string",label:"Base URL",category:"Security",requiresRestart:!0,default:void 0,description:"Base URL for OpenAI compatible API.",showInDialog:!1}}},allowedHttpHookUrls:{type:"array",label:"Allowed HTTP Hook URLs",category:"Security",requiresRestart:!1,default:[],description:"Whitelist of URL patterns for HTTP hooks. Supports * wildcard. If empty, all URLs are allowed (subject to SSRF protection).",showInDialog:!1,items:{type:"string",description:"URL pattern (supports * wildcard)"}}}},advanced:{type:"object",label:"Advanced",category:"Advanced",requiresRestart:!0,default:{},description:"Advanced settings for power users.",showInDialog:!1,properties:{autoConfigureMemory:{type:"boolean",label:"Auto Configure Max Old Space Size",category:"Advanced",requiresRestart:!0,default:!1,description:"Automatically configure Node.js memory limits",showInDialog:!1},dnsResolutionOrder:{type:"string",label:"DNS Resolution Order",category:"Advanced",requiresRestart:!0,default:void 0,description:"The DNS resolution order.",showInDialog:!1},excludedEnvVars:{type:"array",label:"Excluded Project Environment Variables",category:"Advanced",requiresRestart:!1,default:["DEBUG","DEBUG_MODE"],description:"Environment variables to exclude from project context.",showInDialog:!1,mergeStrategy:"union"},bugCommand:{type:"object",label:"Bug Command",category:"Advanced",requiresRestart:!1,default:void 0,description:"Configuration for the bug report command.",showInDialog:!1},runtimeOutputDir:{type:"string",label:"Runtime Output Directory",category:"Advanced",requiresRestart:!0,default:void 0,description:"Custom directory for runtime output (temp files, debug logs, session data, todos, etc.). Config files remain at ~/.matilda (or MATILDA_HOME if set). Env var MATILDA_RUNTIME_DIR takes priority.",showInDialog:!1}}},agents:{type:"object",label:"Agents",category:"Advanced",requiresRestart:!1,default:{},description:"Settings for multi-agent collaboration features (Arena, Team, Swarm).",showInDialog:!1,properties:{displayMode:{type:"enum",label:"Display Mode",category:"Advanced",requiresRestart:!1,default:void 0,description:'Display mode for multi-agent sessions. Currently only "in-process" is supported.',showInDialog:!1,options:[{value:"in-process",label:"In-process"}]},arena:{type:"object",label:"Arena",category:"Advanced",requiresRestart:!1,default:{},description:"Settings for Arena (multi-model competitive execution).",showInDialog:!1,properties:{worktreeBaseDir:{type:"string",label:"Worktree Base Directory",category:"Advanced",requiresRestart:!0,default:void 0,description:"Custom base directory for Arena worktrees. Defaults to ~/.matilda/arena.",showInDialog:!1},preserveArtifacts:{type:"boolean",label:"Preserve Arena Artifacts",category:"Advanced",requiresRestart:!1,default:!1,description:"When enabled, Arena worktrees and session state files are preserved after the session ends or the main agent exits.",showInDialog:!0},maxRoundsPerAgent:{type:"number",label:"Max Rounds Per Agent",category:"Advanced",requiresRestart:!1,default:void 0,description:"Maximum number of rounds (turns) each agent can execute. No limit if unset.",showInDialog:!1},timeoutSeconds:{type:"number",label:"Timeout (seconds)",category:"Advanced",requiresRestart:!1,default:void 0,description:"Total timeout in seconds for the Arena session. No limit if unset.",showInDialog:!1}}},team:{type:"object",label:"Team",category:"Advanced",requiresRestart:!1,default:{},description:"Settings for Agent Team (role-based collaborative execution). Reserved for future use.",showInDialog:!1},swarm:{type:"object",label:"Swarm",category:"Advanced",requiresRestart:!1,default:{},description:"Settings for Agent Swarm (parallel sub-agent execution). Reserved for future use.",showInDialog:!1}}},planGate:{type:"object",label:"Plan Gate",category:"Advanced",requiresRestart:!1,default:{},description:"Settings for the plan approval gate that runs when leaving plan mode under an autonomous approval mode.",showInDialog:!1,properties:{systemOneTriage:{type:"boolean",label:"Gate Triage via System One",category:"Advanced",requiresRestart:!1,default:!0,description:"Screen plans with the System One evaluation endpoint (matilda-jev, POST /api/systemone on the session Matilda Core origin) before the full plan-gate review. An approve verdict skips the full review; an approve-with-comments verdict runs the review as advisory notes and approves; a reject verdict \u2014 or any evaluation failure \u2014 falls back to the full reviewer agent. Auth reuses the session credential: a signed-in Matilda account works as-is, while a raw MATILDA_API_KEY (mc_live_\u2026) requires the api:systemone scope. On by default; set false for the single-agent gate.",showInDialog:!1}}},disableAllHooks:{type:"boolean",label:"Disable All Hooks",category:"Advanced",requiresRestart:!0,default:!1,description:"Temporarily disable all hooks without deleting configurations. Default is false (hooks enabled).",showInDialog:!1},stopHookBlockingCap:{type:"number",label:"Stop Hook Blocking Cap",category:"Advanced",requiresRestart:!0,default:8,description:"Maximum consecutive blocking Stop/SubagentStop hook decisions before Matilda overrides the hook loop and ends the turn. Can be overridden by MATILDA_CODE_STOP_HOOK_BLOCK_CAP.",showInDialog:!1},hooks:{type:"object",label:"Hooks",category:"Advanced",requiresRestart:!1,default:{},description:"Hook event configurations for extending CLI behavior at various lifecycle points.",showInDialog:!1,properties:{UserPromptSubmit:{type:"array",label:"Before Agent Hooks",category:"Advanced",requiresRestart:!1,default:[],description:"Hooks that execute before agent processing. Can modify prompts or inject context.",showInDialog:!1,mergeStrategy:"concat",items:ee},UserPromptExpansion:{type:"array",label:"Prompt Expansion Hooks",category:"Advanced",requiresRestart:!1,default:[],description:"Hooks that execute when a slash command expands into a prompt.",showInDialog:!1,mergeStrategy:"concat",items:ee},Stop:{type:"array",label:"After Agent Hooks",category:"Advanced",requiresRestart:!1,default:[],description:"Hooks that execute after agent processing. Can post-process responses or log interactions.",showInDialog:!1,mergeStrategy:"concat",items:ee},Notification:{type:"array",label:"Notification Hooks",category:"Advanced",requiresRestart:!1,default:[],description:"Hooks that execute when notifications are sent.",showInDialog:!1,mergeStrategy:"concat",items:ee},PreToolUse:{type:"array",label:"Pre Tool Use Hooks",category:"Advanced",requiresRestart:!1,default:[],description:"Hooks that execute before tool execution.",showInDialog:!1,mergeStrategy:"concat",items:ee},PostToolUse:{type:"array",label:"Post Tool Use Hooks",category:"Advanced",requiresRestart:!1,default:[],description:"Hooks that execute after successful tool execution.",showInDialog:!1,mergeStrategy:"concat",items:ee},PostToolUseFailure:{type:"array",label:"Post Tool Use Failure Hooks",category:"Advanced",requiresRestart:!1,default:[],description:"Hooks that execute when tool execution fails. ",showInDialog:!1,mergeStrategy:"concat",items:ee},PostToolBatch:{type:"array",label:"Post Tool Batch Hooks",category:"Advanced",requiresRestart:!1,default:[],description:"Hooks that execute once after all tool calls in a batch resolve.",showInDialog:!1,mergeStrategy:"concat",items:ee},SessionStart:{type:"array",label:"Session Start Hooks",category:"Advanced",requiresRestart:!1,default:[],description:"Hooks that execute when a new session starts or resumes.",showInDialog:!1,mergeStrategy:"concat",items:ee},SessionEnd:{type:"array",label:"Session End Hooks",category:"Advanced",requiresRestart:!1,default:[],description:"Hooks that execute when a session ends.",showInDialog:!1,mergeStrategy:"concat",items:ee},PreCompact:{type:"array",label:"Pre Compact Hooks",category:"Advanced",requiresRestart:!1,default:[],description:"Hooks that execute before conversation compaction.",showInDialog:!1,mergeStrategy:"concat",items:ee},SubagentStart:{type:"array",label:"Subagent Start Hooks",category:"Advanced",requiresRestart:!1,default:[],description:"Hooks that execute when a subagent (Task tool call) is started.",showInDialog:!1,mergeStrategy:"concat",items:ee},SubagentStop:{type:"array",label:"Subagent Stop Hooks",category:"Advanced",requiresRestart:!1,default:[],description:"Hooks that execute right before a subagent (Task tool call) concludes its response.",showInDialog:!1,mergeStrategy:"concat",items:ee},PermissionRequest:{type:"array",label:"Permission Request Hooks",category:"Advanced",requiresRestart:!1,default:[],description:"Hooks that execute when a permission dialog is displayed.",showInDialog:!1,mergeStrategy:"concat",items:ee}}},experimental:{type:"object",label:"Experimental",category:"Experimental",requiresRestart:!0,default:{},description:"Settings to enable experimental features.",showInDialog:!1,properties:{cron:{type:"boolean",label:"Enable Cron/Loop Tools",category:"Experimental",requiresRestart:!0,default:!0,description:"Enable in-session cron/loop tools. When enabled, the model can create recurring prompts using cron_create, cron_list, and cron_delete tools. Can be disabled via MATILDA_CODE_DISABLE_CRON=1 environment variable.",showInDialog:!0},agentTeam:{type:"boolean",label:"Enable Agent Team",category:"Experimental",requiresRestart:!0,default:!1,description:"Enable agent team collaboration tools (experimental). When enabled, the model can create agent teams and coordinate work using team_create, team_delete, send_message, task_create, task_update, and task_list tools. Can also be enabled via MATILDA_CODE_ENABLE_AGENT_TEAM=1 environment variable.",showInDialog:!0},emitToolUseSummaries:{type:"boolean",label:"Tool Use Summaries",category:"Experimental",requiresRestart:!1,default:!0,description:"Generate a short LLM-based label after each tool batch completes. In compact mode the label replaces the generic `Tool \xD7 N` header; in full mode it appears as a dim `\u25CF <label>` line below the tool group. Requires a fast model to be configured; runs in parallel with the next API call so latency is hidden. Currently affects interactive CLI rendering only \u2014 SDK / non-interactive emission of the `tool_use_summary` message is not yet wired (the message factory is exported for a follow-up PR). Can be overridden with MATILDA_CODE_EMIT_TOOL_USE_SUMMARIES=0 or =1.",showInDialog:!0}}},worktree:{type:"object",label:"Worktree",category:"Advanced",requiresRestart:!1,default:{},description:'Configuration for general-purpose git worktrees created by the CLI (the `enter_worktree` tool, the `agent isolation: "worktree"` parameter, and the startup `--worktree` flag). Does NOT affect Agent Arena worktrees \u2014 see `agents.arena.worktreeBaseDir` for those.',showInDialog:!1,properties:{symlinkDirectories:{type:"array",label:"Symlink Directories Into Worktrees",category:"Advanced",requiresRestart:!1,default:void 0,description:"Directories under the main repository to symlink into every general-purpose worktree on creation. Useful for sharing large opt-in dirs like `node_modules` so the model can run tests / builds inside the worktree without a fresh install. Paths must be relative to the repo root; absolute paths, anything containing `..`, and any path inside `.git` or `.matilda` (the CLI-managed metadata tree, which contains the worktrees directory itself) are rejected. Missing source dirs and existing destination paths are silently skipped (no overwrite, no failure).",showInDialog:!1}}},goal:{type:"object",label:"Goal",category:"General",requiresRestart:!0,default:{},description:"How much a Goal may do on its own after you create or resume it, before it stops and asks you to resume it.",showInDialog:!1,properties:{tokenBudget:{type:"number",label:"Goal Token Budget",category:"General",requiresRestart:!0,default:3e7,description:"Tokens a Goal may spend on its own before it stops and asks you to resume it. -1 means unlimited.",showInDialog:!1},turnBudget:{type:"number",label:"Goal Turn Budget",category:"General",requiresRestart:!0,default:50,description:"Goal turns that may finish before the Goal stops and asks you to resume it. -1 means unlimited.",showInDialog:!1}}}};function gt(){let e=Rs;return e.general?.properties?.language&&(e.general.properties.language.options=zi()),Rs}b();function vc(e,t){let r=/\$(?:(\w+)|{([^}]+)})/g;return e.replace(r,(n,i,o)=>{let u=i||o;return t&&typeof t[u]=="string"?t[u]:process&&process.env&&typeof process.env[u]=="string"?process.env[u]:n})}function Ye(e,t){return nn(e,new WeakSet,t)}function nn(e,t,r){if(e==null||typeof e=="boolean"||typeof e=="number")return e;if(typeof e=="string")return vc(e,r);if(Array.isArray(e)){if(t.has(e))return[...e];t.add(e);let n=e.map(i=>nn(i,t,r));return t.delete(e),n}if(typeof e=="object"){if(t.has(e))return{...e};t.add(e);let n={...e};for(let i in n)Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=nn(n[i],t,r));return t.delete(e),n}return e}b();import*as pe from"node:fs";function Os(e,t=""){let r={};for(let n in e){let i=t?`${t}.${n}`:n,o=e[n];r[i]={...o,key:i},o.properties&&(r={...r,...Os(o.properties,i)})}return r}var Ls;function Wt(){return Ls??(Ls=Os(gt()))}function Ns(e){return Wt()[e]}function xc(e){return Wt()[e]?.requiresRestart??!1}function sn(e){return Wt()[e]?.default}function Qe(e,t){let[r,...n]=t;if(!r||!(r in e))return;let i=e[r];if(n.length===0)return i;if(i&&typeof i=="object"&&i!==null)return Qe(i,n)}function Ie(e,t){return Qe(e,t.split("."))}function Ps(e,t,r){let n=Ns(e);if(!n)return;let i=e.split("."),o=Qe(t,i);return o!==void 0||(o=Qe(r,i),o!==void 0)?o:n.default}var Ms=["tools.approvalMode","general.language","general.outputLanguage","ui.theme","general.vimMode","tools.shell.enableInteractiveShell","general.preferredEditor","ide.enabled","ui.showLineNumbers","ui.hideTips","ui.hideKeybindHints","general.terminalBell","ui.enableWelcomeBack","general.gitCoAuthor.commit","general.gitCoAuthor.pr","context.fileFiltering.respectGitIgnore","context.fileFiltering.respectMatildaIgnore","general.disableAutoUpdate","privacy.usageStatisticsEnabled"];function bg(){return Object.values(Wt()).filter(t=>t.showInDialog===!0).map(t=>t.key).sort((t,r)=>{let n=Ms.indexOf(t),i=Ms.indexOf(r);return n!==-1&&i!==-1?n-i:n!==-1?-1:i!==-1?1:0})}function yt(e,t){let r=e.split(".");return Qe(t,r)!==void 0}function Bs(e){for(let t of e)if(t==="__proto__"||t==="constructor"||t==="prototype")return!0;return!1}function _s(e,t,r){let n=t.split(".");if(Bs(n))return;let i=n.pop();if(!i)return;let o=e;for(let u of n)(!o[u]||typeof o[u]!="object")&&(o[u]={}),o=o[u];o[i]=r}function $(e,t,r){let n=t.split(".");if(Bs(n))return;let i=n.pop();if(!i)return;let o=e;for(let u of n){o[u]===void 0&&(o[u]={});let h=o[u];if(typeof h=="object"&&h!==null)o=h;else return}o[i]=r}function on(e,t){let r=t.split("."),n=r.pop();if(!n)return;let i=e;for(let o of r){let u=i[o];if(typeof u!="object"||u===null)return;i=u}delete i[n]}function vg(e,t,r){let n=JSON.parse(JSON.stringify(r));return _s(n,e,t),n}function xg(e,t,r){let n=structuredClone(r);return _s(n,e,t),n}function Eg(e){return Array.from(e).filter(t=>xc(t))}function Dg(e,t,r,n){e.forEach(i=>{let o=i.split("."),u=Qe(t,o),h=yt(i,r.forScope(n).settings);if(u===void 0){h&&r.setValue(n,i,void 0);return}let p=u===sn(i);(h||!p)&&r.setValue(n,i,u)})}function Ag(e,t,r,n,i){let o=Ns(e),u;i&&yt(e,i)?u=Ps(e,i,{}):yt(e,t)?u=Ps(e,t,{}):u=sn(e);let h=String(u);if(e==="general.outputLanguage"&&Yr(u))h=Or("Auto (detect from system)");else if(o?.type==="enum"&&o.options){let m=o.options?.find(d=>d.value===u);m?.label?h=Or(m.label)||m.label:h=`${u}`}let p=sn(e),g=u!==p,f=n.has(e);return yt(e,t)||f?`${h}*`:g||f?`${h}*`:h}function Cg(e,t){return!yt(e,t)}function Us(e){try{if(pe.existsSync(e)){let t=`${e}.orig`;return pe.copyFileSync(e,t),!0}}catch{}return!1}function Gs(e){try{let t=`${e}.orig`;if(pe.existsSync(t))return pe.copyFileSync(t,e),pe.unlinkSync(t),!0}catch(t){console.error(`[settingsUtils] restoreSettingsFromBackup(${e}) failed:`,t)}return!1}function js(e){try{let t=`${e}.orig`;pe.existsSync(t)&&pe.unlinkSync(t)}catch{}}b();function an(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function un(e,t,r,n=[]){for(let i of Object.keys(t)){if(i==="__proto__"||i==="constructor"||i==="prototype")continue;let o=[...n,i],u=t[i],h=e[i],p=r(o);if(p==="shallow_merge"&&h&&u){let g=typeof h=="object"&&h!==null?h:{},f=typeof u=="object"&&u!==null?u:{};e[i]={...g,...f};continue}if(Array.isArray(h)){let g=Array.isArray(u)?u:[u];if(p==="concat"){e[i]=h.concat(g);continue}if(p==="union"){e[i]=[...new Set(h.concat(g))];continue}}an(h)&&an(u)?un(h,u,r,o):an(u)?(e[i]={},un(e[i],u,r,o)):e[i]=u}return e}function $s(e,...t){let r={};for(let n of t)n&&un(r,n,e);return r}b();var tt=Ve(Vo(),1);import*as tr from"node:fs";b();import*as X from"node:fs";function Bn(e,t,r={}){let{backupSuffix:n=".orig",encoding:i="utf-8"}=r,o=`${e}.tmp`,u=`${e}${n}`;try{X.existsSync(o)&&X.unlinkSync(o)}catch{}try{if(X.writeFileSync(o,t,{encoding:i,flush:!0}),X.existsSync(e)){if(X.statSync(e).isDirectory()){try{X.unlinkSync(o)}catch{}throw new Error(`Cannot write to '${e}' because it is a directory`)}try{X.renameSync(e,u)}catch(p){try{X.unlinkSync(o)}catch{}throw new Error(`Failed to backup existing file: ${p instanceof Error?p.message:String(p)}`)}}try{X.renameSync(o,e)}catch(h){let p,g=!1;if(X.existsSync(u)){g=!0;try{X.renameSync(u,e)}catch(m){p=m instanceof Error?m.message:String(m)}}let f=h instanceof Error?h.message:String(h);throw p?new Error(`Failed to write file: ${f}. Automatic restore failed: ${p}. Manual recovery may be required using backup file '${u}'.`):g?new Error(`Failed to write file: ${f}. Target was automatically restored from backup '${u}'.`):new Error(`Failed to write file: ${f}. No backup file was available for restoration.`)}}catch(h){try{X.existsSync(o)&&X.unlinkSync(o)}catch{}throw h}}function _n(e,t,r=!1,n=[]){return Je(e,()=>Un(e,t,r,n))}function Un(e,t,r=!1,n=[]){if(!tr.existsSync(e)){let p=(0,tt.stringify)(t,null,2);return Bn(e,p),!0}let i=tr.readFileSync(e,"utf-8"),o;try{o=(0,tt.parse)(i)}catch(p){return we("Error parsing settings file."),we(`Settings file may be corrupted: ${p instanceof Error?p.message:String(p)}`),!1}let u=er(o,t,r,n),h=(0,tt.stringify)(u,null,2);try{(0,tt.parse)(h)}catch(p){return we("Error: Refusing to write settings file \u2014 the result would not be valid JSON."),we(p instanceof Error?p.message:String(p)),!1}return Bn(e,h),!0}function er(e,t,r=!1,n=[],i=[]){let o=e;if(r){let u=Object.keys(o).filter(h=>!(h in t));for(let h of u)delete o[h]}for(let u of Object.getOwnPropertyNames(t)){if(u==="__proto__"||u==="constructor"||u==="prototype")continue;let h=t[u],p=[...i,u],g=typeof h=="object"&&h!==null&&!Array.isArray(h)&&Object.keys(h).length>0;if(Qd(p,n)){o[u]=g?er({},h):h;continue}g&&(typeof o[u]!="object"||o[u]===null||Array.isArray(o[u]))?o[u]=er({},h,r,n,p):g&&typeof o[u]=="object"&&o[u]!==null&&!Array.isArray(o[u])?o[u]=er(o[u],h,r,n,p):o[u]=h}return o}function Qd(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])}b();b();var Ct=Ce("SETTINGS_MIGRATION");function Zd(e){return e==="SystemDefaults"?"system default":e.toLowerCase()}var wt=class{constructor(t,r){this.migrations=t;this.scope=r}migrate(t){Ct.debug("MigrationScheduler: Starting migration chain");let r=t,n=[],i=[];for(let u of this.migrations)try{if(u.shouldMigrate(r)){Ct.debug(`MigrationScheduler: Executing migration ${u.fromVersion} \u2192 ${u.toVersion}`);let h=Zd(this.scope),p=u.migrate(r,h);r=p.settings,i.push(...p.warnings),n.push({fromVersion:u.fromVersion,toVersion:u.toVersion}),Ct.debug(`MigrationScheduler: Migration ${u.fromVersion} \u2192 ${u.toVersion} completed successfully`)}}catch(h){throw Ct.error(`MigrationScheduler: Migration ${u.fromVersion} \u2192 ${u.toVersion} failed:`,h),h}let o=r.$version??1;return Ct.debug(`MigrationScheduler: Migration chain complete. Final version: ${o}, Executed: ${n.length} migrations`),{settings:r,finalVersion:o,executedMigrations:n,warnings:i}}};b();b();var rt={accessibility:"ui.accessibility",allowedTools:"tools.allowed",allowMCPServers:"mcp.allowed",autoAccept:"tools.autoAccept",autoConfigureMaxOldSpaceSize:"advanced.autoConfigureMemory",bugCommand:"advanced.bugCommand",chatCompression:"model.chatCompression",checkpointing:"general.checkpointing",coreTools:"tools.core",contextFileName:"context.fileName",customThemes:"ui.customThemes",customWittyPhrases:"ui.customWittyPhrases",debugKeystrokeLogging:"general.debugKeystrokeLogging",dnsResolutionOrder:"advanced.dnsResolutionOrder",enforcedAuthType:"security.auth.enforcedType",excludeTools:"tools.exclude",excludeMCPServers:"mcp.excluded",excludedProjectEnvVars:"advanced.excludedEnvVars",extensions:"extensions",fileFiltering:"context.fileFiltering",folderTrustFeature:"security.folderTrust.featureEnabled",folderTrust:"security.folderTrust.enabled",hasSeenIdeIntegrationNudge:"ide.hasSeenNudge",hideWindowTitle:"ui.hideWindowTitle",showStatusInTitle:"ui.showStatusInTitle",hideTips:"ui.hideTips",showLineNumbers:"ui.showLineNumbers",showCitations:"ui.showCitations",ideMode:"ide.enabled",includeDirectories:"context.includeDirectories",loadMemoryFromIncludeDirectories:"context.loadFromIncludeDirectories",maxSessionTurns:"model.maxSessionTurns",mcpServers:"mcpServers",mcpServerCommand:"mcp.serverCommand",memoryImportFormat:"context.importFormat",model:"model.name",preferredEditor:"general.preferredEditor",sandbox:"tools.sandbox",selectedAuthType:"security.auth.selectedType",shouldUseNodePtyShell:"tools.shell.enableInteractiveShell",shellPager:"tools.shell.pager",shellShowColor:"tools.shell.showColor",skipNextSpeakerCheck:"model.skipNextSpeakerCheck",telemetry:"telemetry",theme:"ui.theme",toolDiscoveryCommand:"tools.discoveryCommand",toolCallCommand:"tools.callCommand",usageStatisticsEnabled:"privacy.usageStatisticsEnabled",useExternalAuth:"security.auth.useExternal",useRipgrep:"tools.useRipgrep",vimMode:"general.vimMode",enableWelcomeBack:"ui.enableWelcomeBack",approvalMode:"tools.approvalMode",sessionTokenLimit:"model.sessionTokenLimit",contentGenerator:"model.generationConfig",skipLoopDetection:"model.skipLoopDetection",skipStartupContext:"model.skipStartupContext",enableOpenAILogging:"model.enableOpenAILogging",tavilyApiKey:"advanced.tavilyApiKey"},rr=new Set(["ui","tools","mcp","advanced","model","general","context","security","ide","privacy","telemetry","extensions"]),nr={disableAutoUpdate:"general.disableAutoUpdate",disableUpdateNag:"general.disableUpdateNag",disableLoadingPhrases:"ui.accessibility.disableLoadingPhrases",disableFuzzySearch:"context.fileFiltering.disableFuzzySearch",disableCacheControl:"model.generationConfig.disableCacheControl"},Jo=new Set(["disableAutoUpdate","disableUpdateNag"]),Ko=["theme","model","autoAccept","hideTips","vimMode","checkpointing","accessibility","allowedTools","allowMCPServers","autoConfigureMaxOldSpaceSize","bugCommand","chatCompression","coreTools","contextFileName","customThemes","customWittyPhrases","debugKeystrokeLogging","dnsResolutionOrder","enforcedAuthType","excludeTools","excludeMCPServers","excludedProjectEnvVars","fileFiltering","folderTrustFeature","folderTrust","hasSeenIdeIntegrationNudge","hideWindowTitle","showStatusInTitle","showLineNumbers","showCitations","ideMode","includeDirectories","loadMemoryFromIncludeDirectories","maxSessionTurns","mcpServerCommand","memoryImportFormat","preferredEditor","sandbox","selectedAuthType","shouldUseNodePtyShell","shellPager","shellShowColor","skipNextSpeakerCheck","toolDiscoveryCommand","toolCallCommand","usageStatisticsEnabled","useExternalAuth","useRipgrep","enableWelcomeBack","approvalMode","sessionTokenLimit","contentGenerator","skipLoopDetection","skipStartupContext","enableOpenAILogging","tavilyApiKey","disableAutoUpdate","disableUpdateNag","disableLoadingPhrases","disableFuzzySearch","disableCacheControl"];var ir=class{fromVersion=1;toVersion=2;shouldMigrate(t){if(typeof t!="object"||t===null)return!1;let r=t,n=r.$version;return typeof n=="number"&&n>=2?!1:Ko.some(i=>{if(!(i in r))return!1;let o=r[i];return!(typeof o=="object"&&o!==null&&!Array.isArray(o))})}migrate(t,r){if(typeof t!="object"||t===null)throw new Error("Settings must be an object");let n=t,i={},o=new Set,u=[];for(let[h,p]of Object.entries(rt))if(h in n){let g=n[h];if(rr.has(h)&&typeof g=="object"&&g!==null&&!Array.isArray(g)){i[h]=g,o.add(h);continue}if(typeof g=="object"&&g!==null&&!Array.isArray(g)&&p.startsWith(h+"."))for(let[f,m]of Object.entries(g))$(i,`${p}.${f}`,m);else $(i,p,g);o.add(h)}for(let[h,p]of Object.entries(nr))if(h in n){let g=n[h];Jo.has(h)?$(i,p,g===!0):typeof g=="boolean"&&$(i,p,g),o.add(h)}"mcpServers"in n&&(i.mcpServers=n.mcpServers,o.add("mcpServers"));for(let h of Object.keys(n))if(!o.has(h))if(Array.from(o).some(g=>{let f=rt[g]||nr[g];return f?f.startsWith(h+"."):!1})){let g=n[h];if(typeof g=="object"&&g!==null&&!Array.isArray(g))for(let[f,m]of Object.entries(g)){let d=`${h}.${f}`;Array.from(o).some(a=>(rt[a]||nr[a])===d)||$(i,d,m)}else i[h]=n[h]}else i[h]=n[h];return i.$version=2,{settings:i,warnings:u}}},Gn=new ir;b();var eh={"general.disableAutoUpdate":"general.enableAutoUpdate","general.disableUpdateNag":"general.enableAutoUpdate","ui.accessibility.disableLoadingPhrases":"ui.accessibility.enableLoadingPhrases","context.fileFiltering.disableFuzzySearch":"context.fileFiltering.enableFuzzySearch","model.generationConfig.disableCacheControl":"model.generationConfig.enableCacheControl"},th={"general.enableAutoUpdate":["general.disableAutoUpdate","general.disableUpdateNag"]};function Yo(e){if(e===void 0)return{isPresent:!1,isValid:!1};if(typeof e=="boolean")return{isPresent:!0,isValid:!0,booleanValue:e};if(typeof e=="string"){let t=e.trim().toLowerCase();if(t==="true")return{isPresent:!0,isValid:!0,booleanValue:!0};if(t==="false")return{isPresent:!0,isValid:!0,booleanValue:!1}}return{isPresent:!0,isValid:!1}}var sr=class{fromVersion=2;toVersion=3;shouldMigrate(t){return typeof t!="object"||t===null?!1:t.$version===2}migrate(t,r){if(typeof t!="object"||t===null)throw new Error("Settings must be an object");let n=structuredClone(t),i=new Set,o=[];for(let[u,h]of Object.entries(th)){let p=!1,g=!1;for(let f of h){let m=Ie(n,f),d=Yo(m);d.isPresent&&(on(n,f),i.add(f),d.isValid?(g=!0,d.booleanValue===!0&&(p=!0)):o.push(`Removed deprecated setting '${f}' from ${r} settings because the value is invalid. Expected boolean.`))}g&&$(n,u,!p)}for(let[u,h]of Object.entries(eh)){if(i.has(u))continue;let p=Ie(n,u),g=Yo(p);g.isPresent&&(on(n,u),g.isValid?$(n,h,!g.booleanValue):o.push(`Removed deprecated setting '${u}' from ${r} settings because the value is invalid. Expected boolean or string "true"/"false".`))}return n.$version=3,{settings:n,warnings:o}}},jn=new sr;b();var De="general.gitCoAuthor",or=class{fromVersion=3;toVersion=4;shouldMigrate(t){if(typeof t!="object"||t===null)return!1;let r=t;if(r.$version===3)return!0;if(r.$version===void 0){let n=Ie(r,De);return!(n===void 0||typeof n=="object"&&n!==null&&!Array.isArray(n))}return!1}migrate(t,r){if(typeof t!="object"||t===null)throw new Error("Settings must be an object");let n=structuredClone(t),i=[],o=Ie(n,De);if(typeof o=="boolean")$(n,De,{commit:o,pr:o});else if(typeof o=="string"){let u=o.trim().toLowerCase(),h=["false","no","off","0","disabled",""];["true","yes","on","1","enabled"].includes(u)?$(n,De,{commit:!0,pr:!0}):h.includes(u)?$(n,De,{commit:!1,pr:!1}):($(n,De,{commit:!1,pr:!1}),i.push(`Reset '${De}' in ${r} settings to {commit: false, pr: false} because the stored string '${o}' was not a recognized boolean form.`))}else o!==void 0&&(typeof o!="object"||o===null||Array.isArray(o))&&($(n,De,{commit:!1,pr:!1}),i.push(`Reset '${De}' in ${r} settings to {commit: false, pr: false} because the stored value was not a boolean or object.`));return n.$version=4,{settings:n,warnings:i}}},$n=new or;b();var nh="Matilda",Qo=Symbol("generatedMaincloudProfileRepairCandidate"),ih=new Set(["http://localhost:18002/v1","http://10.22.0.13:18390/v1"]),sh="OPENAI_API_KEY",oh=1048576;function ae(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ah(e){let t=ae(e.modelProviders)?e.modelProviders.openai:void 0;if(!Array.isArray(t)||t.length!==1)return null;let[r]=t;if(!ae(r))return null;let n=r.id,i=r.envKey,o=r.baseUrl,u=ae(r.generationConfig)?r.generationConfig.contextWindowSize:void 0,h=ae(e.model)?e.model.name:void 0,p=e.fastModel,g=ae(e.security)&&ae(e.security.auth)?e.security.auth.selectedType:void 0;return typeof n!="string"||i!==sh||typeof o!="string"||!ih.has(o)||u!==oh||h!==n||p!==n||g!=="openai"?null:n}function kt(e){return ae(e)?ah(e)!==null:!1}function Zo(e){Object.defineProperty(e,Qo,{value:!0,enumerable:!1,configurable:!0})}function uh(e){return!!(e&&typeof e=="object"&&e[Qo]===!0)}function lh(e){let t=structuredClone(e),r=Oi($t,{baseUrl:Ni($t),apiKey:"",modelIds:Bi($t)}),n=r.modelSelection?.modelId,i=r.modelProviders?.find(h=>h.authType==="openai");if(n&&($(t,"model.name",n),$(t,"fastModel",n)),$(t,"ui.modelDisplayName",nh),i){let h=ae(t.modelProviders)?structuredClone(t.modelProviders):{};h.openai=structuredClone(i.models),t.modelProviders=h}$(t,"security.auth.selectedType","openai");let o=ae(t.security)?structuredClone(t.security):{},u=ae(o.auth)?structuredClone(o.auth):{};delete u.apiKey,delete u.baseUrl,o.auth=u,t.security=o;for(let[h,p]of Object.entries(r.providerState??{}))$(t,h,structuredClone(p));return t.$version=5,t}function ch(e){return{...structuredClone(e),$version:5}}var ar=class{fromVersion=4;toVersion=5;shouldMigrate(t){if(!ae(t))return!1;let r=t.$version;return r===4||r===void 0}migrate(t,r){if(!ae(t))throw new Error("Settings must be an object");return uh(t)&&kt(t)?{settings:lh(t),warnings:[`Updated ${r} settings from the generated internal maincloud profile to the current managed Matilda profile.`]}:{settings:ch(t),warnings:[]}}},qn=new ar;var ea=[Gn,jn,$n,qn];function ta(e,t){return new wt([...ea],t).migrate(e)}function ra(e){if(typeof e!="object"||e===null)return!1;let r=e.$version,n=ea.some(i=>i.shouldMigrate(e));return typeof r=="number"&&r>=He?!1:n}var V=Ce("SETTINGS");function dh(e){let t,r=gt();for(let n of e){if(!r||!r[n])return;t=r[n],r=t.properties}return t?.mergeStrategy}var Q0=_e;function Jn(){return Z.getGlobalSettingsPath()}function Z0(){return R.dirname(Jn())}var ua=["DEBUG","DEBUG_MODE"],Wn="MATILDA_CODE_SETTINGS_CORRUPTED_PATH",zn="MATILDA_CODE_SETTINGS_WAS_RECOVERED",Kn=["MATILDA_HOME","MATILDA_RUNTIME_DIR","MATILDA_CODE_MCP_APPROVALS_PATH",Wn,zn],hh=new Set([...Kn,"MATILDA_CODE_TRUSTED_FOLDERS_PATH","MATILDA_CODE_SYSTEM_SETTINGS_PATH","MATILDA_CODE_SYSTEM_DEFAULTS_PATH","MATILDA_CODE_IDE_SERVER_STDIO_COMMAND","MATILDA_CODE_IDE_SERVER_STDIO_ARGS","MATILDA_CODE_IDE_WORKSPACE_PATH","MATILDA_CODE_IDE_SERVER_PORT","MATILDA_CODE_SIMPLE","MATILDA_DESKTOP_APPROVED_DIRECTORIES_JSON","MATILDA_DESKTOP_WORKSPACE_ID","MATILDA_DESKTOP_DIRECTORY_REVISION","MATILDA_DESKTOP_SANDBOX_NONCE","MATILDA_DESKTOP_SANDBOX_ACTIVE","MATILDA_SERVE_TRUSTED_WORKSPACE","MATILDA_SERVER_TOKEN","MATILDA_CLI_ENTRY","MATILDA_CODE_NO_RELAUNCH","SANDBOX","MATILDA_SANDBOX","MATILDA_SANDBOX_IMAGE","SEATBELT_PROFILE","MATILDA_SANDBOX_PROXY_COMMAND","BUILD_SANDBOX","SANDBOX_FLAGS","SANDBOX_MOUNTS","SANDBOX_PORTS","SANDBOX_ENV","SANDBOX_SET_UID_GID","DEBUG","DEBUG_MODE","DEBUG_PORT","NODE_ENV","PYTHONPATH","VIRTUAL_ENV","GOOGLE_APPLICATION_CREDENTIALS","NODE_OPTIONS","NODE_PATH","OPENSSL_CONF","NODE_REPL_EXTERNAL_MODULE","ZDOTDIR","NPM_CONFIG_NODE_OPTIONS","NPM_CONFIG_USERCONFIG","NPM_CONFIG_GLOBALCONFIG","NPM_CONFIG_SCRIPT_SHELL","NPM_CONFIG_PREFIX","NPM_CONFIG_NODE_GYP","NPM_CONFIG_INIT_MODULE","NODE_TLS_REJECT_UNAUTHORIZED","LD_PRELOAD","LD_AUDIT","LD_LIBRARY_PATH","DYLD_INSERT_LIBRARIES","DYLD_LIBRARY_PATH","BASH_ENV","ENV","PATH","HOME","TMPDIR","TMP","TEMP"]);function Tt(e){let t=e.toUpperCase(),r=t.startsWith("NPM_CONFIG_")?t.replace(/-/g,"_"):t;return r.startsWith("BASH_FUNC_")||hh.has(r)}var ur=new Set,lr=new Set,Pe=new Map,Hn=!1,He=5,We="$version";function la(){return B.env.MATILDA_CODE_SYSTEM_SETTINGS_PATH?B.env.MATILDA_CODE_SYSTEM_SETTINGS_PATH:na()==="darwin"?"/Library/Application Support/MatildaCode/settings.json":na()==="win32"?"C:\\ProgramData\\matilda-code\\settings.json":"/etc/matilda-code/settings.json"}function fh(){return B.env.MATILDA_CODE_SYSTEM_DEFAULTS_PATH?B.env.MATILDA_CODE_SYSTEM_DEFAULTS_PATH:R.join(R.dirname(la()),"system-defaults.json")}var Fs=(i=>(i.User="User",i.Workspace="Workspace",i.System="System",i.SystemDefaults="SystemDefaults",i))(Fs||{});function ph(e,t){let r=e[We];if(typeof r!="number"||r<He)return[];let n=[],i=new Set;for(let[u,h]of Object.entries(rt)){if(u===h||!(u in e))continue;let p=e[u];rr.has(u)&&typeof p=="object"&&p!==null&&!Array.isArray(p)||(i.add(u),n.push(`Warning: Legacy setting '${u}' will be ignored in ${t}. Please use '${h}' instead.`))}let o=new Set(Object.keys(gt()));for(let u of Object.keys(e))u!==We&&(i.has(u)||o.has(u)||V.warn(`Unknown setting '${u}' will be ignored in ${t}.`));return n}function mh(e,t){let r=e.permissions;if(!dr(r))return[];let n=[];for(let i of["deny","ask","allow"]){let o=r[i];if(Array.isArray(o))for(let u of o)typeof u=="string"&&_i(u).invalid&&n.push(`Warning: Permission rule ${JSON.stringify(u)} in 'permissions.${i}' of ${t} is malformed, so it is ignored.`)}return n}function gh(e){let t=e.permissions;return dr(t)?["deny","ask","allow"].flatMap(r=>{let n=t[r];return n===void 0||Array.isArray(n)&&n.every(i=>typeof i=="string")?[]:[`'permissions.${r}' must be a list of rule strings.`]}):[]}function dr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function yh(e){return dr(e)?Object.values(e).some(t=>Array.isArray(t)&&t.length>0):!1}function Sh(e){if(!e.isTrusted)return[];let t=e.user.originalSettings,r=e.workspace.originalSettings;if(!mt(t)||!mt(r))return[];let n=t.modelProviders,i=r.modelProviders;return!(dr(i)&&Object.keys(i).length===0)||!yh(n)?[]:[`Warning: '${e.workspace.path}' defines an empty 'modelProviders' object. This has no effect with current merge behavior, but may indicate a configuration error. If REPLACE semantics are introduced for 'modelProviders' in the future, this would override user-level model providers in '${e.user.path}'.`]}function ey(e){let t=new Set;for(let n of e.migrationWarnings)t.add(`Warning: ${n}`);for(let n of["User","Workspace"]){let i=e.forScope(n);if(i.rawJson===void 0)continue;let o=i.originalSettings;for(let u of ph(o,i.path))t.add(u)}for(let n of Sh(e))t.add(n);let r=["SystemDefaults","System","User",...e.isTrusted?["Workspace"]:[]];for(let n of r){let i=e.forScope(n);if(i.rawJson!==void 0)for(let o of mh(i.originalSettings,i.path))t.add(o)}return[...t]}function ia(e,t){let r=e.mcpServers;if(!r||Object.keys(r).length===0)return e;let n={};for(let[i,o]of Object.entries(r))n[i]={...o,scope:t};return{...e,mcpServers:n}}function Xn(e,t,r,n,i){let o=i?ia(n,"workspace"):{};return o.env&&(o={...o,env:Object.fromEntries(Object.entries(o.env).filter(([u])=>!Tt(u)))}),$s(dh,{},t,r,o,ia(e,"system"))}var cr=class{constructor(t,r,n,i,o,u,h=[],p=void 0,g=!1){this.system=t,this.systemDefaults=r,this.user=n,this.workspace=i,this.isTrusted=o,this.migratedInMemorScopes=u,this.migrationWarnings=h,this.corruptedPath=p,this.wasRecovered=g,this._merged=this.computeMergedSettings()}system;systemDefaults;user;workspace;isTrusted;migratedInMemorScopes;migrationWarnings;corruptedPath;wasRecovered;corruptionDialogDismissed=!1;_merged;get merged(){return this._merged}computeMergedSettings(){return Xn(this.system.settings,this.systemDefaults.settings,this.user.settings,this.workspace.settings,this.isTrusted)}forScope(t){switch(t){case"User":return this.user;case"Workspace":return this.workspace;case"System":return this.system;case"SystemDefaults":return this.systemDefaults;default:throw new Error(`Invalid scope: ${t}`)}}setValue(t,r,n){r==="model.name"&&typeof n=="string"&&(n=Fi(n)),this.reloadScopeFromDisk(t);let i=this.forScope(t);$(i.settings,r,n),$(i.originalSettings,r,n),this._merged=this.computeMergedSettings();let o=r==="mcpServers"?r.split("."):[];wh(i,aa(r,n),o)}appendArrayValue(t,r,n){let i=this.forScope(t),o=!1;return Je(i.path,()=>{this.reloadScopeFromDisk(t);let u=this.forScope(t),h=Ch(u.settings,r);if(h.includes(n))return;let p=[...h,n];$(u.settings,r,p),$(u.originalSettings,r,p),this._merged=this.computeMergedSettings(),Un(u.path,aa(r,p))||V.error(`appendArrayValue: updateSettingsFilePreservingFormatUnlocked returned false for ${u.path}`),o=!0}),o}recomputeMerged(){this._merged=this.computeMergedSettings()}reloadScopeFromDisk(t){let r=this.forScope(t);try{if(!_.existsSync(r.path)){r.settings={},r.originalSettings={},r.rawJson=void 0,this._merged=this.computeMergedSettings();return}let n=_.readFileSync(r.path,"utf-8"),i=JSON.parse((0,It.default)(n));if(i&&typeof i=="object"&&!Array.isArray(i)){let o=Ye(i,ca());r.settings=o,r.originalSettings=structuredClone(i),r.rawJson=n}}catch(n){V.warn(`reloadScopeFromDisk(${t}): ${se(n)}`)}this._merged=this.computeMergedSettings()}getUserHooks(){return this.user.settings.hooks}getProjectHooks(){if(this.isTrusted)return this.workspace.settings.hooks}};function ty(){let e={path:"",settings:{},originalSettings:{},rawJson:"{}"};return new cr(e,e,e,e,!1,new Set,[],void 0,!1)}function Yn(){let e=Vn(),t=Z.getGlobalMatildaDir(),r=new Set([R.normalize(R.join(e,".env")),R.normalize(R.join(t,".env"))]),n=R.normalize(R.join(e,_e,".env"));return r.add(n),r}var sa=!1;function bh(){if(sa||(sa=!0,B.env.MATILDA_HOME&&B.env.MATILDA_RUNTIME_DIR))return;let e=B.env.MATILDA_HOME,t=Z.getGlobalMatildaDir(),r=[R.join(t,".env")];e||r.push(R.join(R.dirname(t),".env"));for(let i of r)oa(i);let n=B.env.MATILDA_HOME;if(n&&n!==e){let i=Z.getGlobalMatildaDir();i!==t&&oa(R.join(i,".env"))}}function oa(e){if(_.existsSync(e))try{let t=nt.parse(_.readFileSync(e,"utf-8"));for(let r of Kn)t[r]&&!Object.hasOwn(B.env,r)&&(B.env[r]=t[r])}catch{}}function ca(){let e=Z.getGlobalMatildaDir(),t=[R.join(e,".env")];B.env.MATILDA_HOME||t.push(R.join(R.dirname(e),".env"));let r={};for(let n of t)if(_.existsSync(n))try{let i=nt.parse(_.readFileSync(n,"utf-8"));for(let o in i)Object.hasOwn(i,o)&&!Object.hasOwn(B.env,o)&&(r[o]??=i[o])}catch(i){V.warn(`Failed to read home .env candidate ${n}: ${se(i)}`)}return r}function vh(e){if(!B.env.MATILDA_HOME)return null;let t=Z.getGlobalMatildaDir(),r=B.env.MATILDA_HOME;delete B.env.MATILDA_HOME;let n;try{n=Z.getGlobalMatildaDir()}finally{B.env.MATILDA_HOME=r}if(R.resolve(t)===R.resolve(n)||_.existsSync(e))return null;let i=R.join(n,"settings.json");return _.existsSync(i)?`MATILDA_HOME points to "${t}" but no settings.json was found there. Existing config remains at "${n}" \u2014 OAuth tokens, settings, memory, extensions, and skills are not auto-migrated. Copy them manually if you want them to apply at the new location.`:null}function da(e){return!B.env.MATILDA_HOME&&R.resolve(e)===R.resolve(Jn())}function xh(e){let{filePath:t,scope:r,settingsObject:n}=e;if(r!=="User"||!da(t)||!kt(n))return null;let i=R.join(R.dirname(t),"settings.json.pre-maincloud.bak");if(!_.existsSync(i))return null;try{let o=_.readFileSync(i,"utf-8"),u=JSON.parse((0,It.default)(o));return typeof u!="object"||u===null||Array.isArray(u)?null:(_.writeFileSync(t,o,"utf-8"),V.warn(`Restored ${t} from ${i} before applying managed Matilda settings.`),{settingsObject:u,content:o})}catch(o){return V.warn(`Failed to restore ${i}: ${se(o)}`),null}}function Eh(e){let{filePath:t,scope:r,settingsObject:n}=e;return r==="User"&&da(t)&&kt(n)}function ha(e,t,r=Yn(),n){let i=Vn(),o=Vr(e,void 0,t,n).isTrusted,u=Z.getGlobalMatildaDir(),h=R.normalize(R.join(i,_e)),p=R.normalize(u)!==h,g=s=>o===!0||r.has(R.normalize(s)),f=()=>{let s=[R.join(u,".env")];p&&s.push(R.join(h,".env")),s.push(R.join(i,".env"));for(let a of s)if(_.existsSync(a)&&g(a))return a;return null},m=R.resolve(t),d=!1;for(;;){if(m===i){d=!0;let a=f();if(a)return a}else{let a=R.join(m,_e,".env");if(_.existsSync(a)&&g(a))return a;let l=R.join(m,".env");if(_.existsSync(l)&&g(l))return l}let s=R.dirname(m);if(s===m||!s)return d?null:f();m=s}}function fa(e){if(e&&_.existsSync(e)){let t=_.readFileSync(e),r=nt.parse(t);r.GOOGLE_CLOUD_PROJECT?B.env.GOOGLE_CLOUD_PROJECT=r.GOOGLE_CLOUD_PROJECT:B.env.GOOGLE_CLOUD_PROJECT="cloudshell-gca"}else B.env.GOOGLE_CLOUD_PROJECT="cloudshell-gca"}function Dh(e,t=B.cwd(),r){let n=Yn(),i=ha(e,t,n,r);if(B.env.CLOUD_SHELL==="true"&&fa(i),i)try{let o=_.readFileSync(i,"utf-8"),u=nt.parse(o),h=e?.advanced?.excludedEnvVars||ua,p=R.normalize(i),g=n.has(p),f=g||R.basename(R.dirname(p))===_e;for(let m in u)if(Object.hasOwn(u,m)){if(!g&&Tt(m)||!f&&h.includes(m))continue;Object.hasOwn(B.env,m)||(B.env[m]=u[m],ur.add(m)),Hn||Pe.set(m,u[m])}}catch{}if(e.env)for(let[o,u]of Object.entries(e.env))Kn.includes(o)||(!Object.hasOwn(B.env,o)&&typeof u=="string"&&(B.env[o]=u,lr.add(o)),!Hn&&typeof u=="string"&&!Pe.has(o)&&Pe.set(o,u));Hn=!0}function ry(e,t,r){let n=Yn(),i=ha(e,t,n,r);B.env.CLOUD_SHELL==="true"&&fa(i);let o=!1,u=new Map,h=new Map;if(i)try{let m=_.readFileSync(i,"utf-8"),d=nt.parse(m),s=e?.advanced?.excludedEnvVars||ua,a=R.normalize(i),c=n.has(a)||R.basename(R.dirname(a))===_e;for(let y in d)Object.hasOwn(d,y)&&(Tt(y)||!c&&s.includes(y)||u.set(y,d[y]))}catch{o=!0}if(e.env)for(let[m,d]of Object.entries(e.env))Tt(m)||typeof d=="string"&&(u.has(m)||o&&Pe.has(m)||h.set(m,d));let p=new Set([...u.keys(),...h.keys()]),g=[],f=[];if(!o){let m=new Set([...Pe.keys(),...ur,...lr]);for(let d of m)!p.has(d)&&!Tt(d)&&(delete B.env[d],f.push(d))}for(let[m,d]of u)B.env[m]!==d&&g.push(m),B.env[m]=d;for(let[m,d]of h)B.env[m]!==d&&g.push(m),B.env[m]=d;if(!o){ur.clear();for(let m of u.keys())ur.add(m);Pe.clear();for(let[m,d]of u)Pe.set(m,d);for(let[m,d]of h)Pe.set(m,d)}lr.clear();for(let m of h.keys())lr.add(m);return{updatedKeys:g,removedKeys:f}}var Ah=".corrupted";function ny(e=B.cwd(),t=!0){let r=typeof t=="object"?t:{consumeCorruptionEnvVars:t};bh();let n=Jn(),i=vh(n),o={},u={},h={},p={},g=[],f=la(),m=fh(),d=new Set,s=R.resolve(e),a=R.resolve(Vn()),l=s;try{l=_.realpathSync(s)}catch{}let c=_.realpathSync(a),y=new Z(l).getWorkspaceSettingsPath(),S=(q,ue)=>{try{if(_.existsSync(q)){let de=_.readFileSync(q,"utf-8"),be,Xe=`${q}${Ah}`,ve=!1,Pt=!1,Mt=null;try{be=JSON.parse((0,It.default)(de))}catch(he){try{_.copyFileSync(q,Xe),ve=!0}catch(le){V.warn(`Failed to copy corrupted file: ${se(le)}`)}let fe=`${q}.orig`;if(_.existsSync(fe)){V.warn(`Settings file ${q} has invalid JSON (${se(he)}). Attempting recovery from backup ${fe}.`);try{let le=_.readFileSync(fe,"utf-8"),Fr=JSON.parse((0,It.default)(le));_.writeFileSync(q,le,"utf-8"),de=le,be=Fr;let Rr=`Settings file ${q} had invalid JSON and was recovered from backup ${fe}. Some recent settings changes may have been lost.`;V.warn(Rr),Pt=!0}catch(le){V.warn(`Failed to recover from backup ${fe}: ${se(le)}. Falling back to empty settings.`)}}if(!be){let le=`Settings file ${q} has invalid JSON. Your settings have been reset.`;if(V.warn(le),ve)try{_.writeFileSync(q,"{}","utf-8")}catch{}return{settings:{},migrationWarnings:[],corruptedPath:ve?Xe:void 0,wasRecovered:!1}}}let Ot=B.env[Wn];if((r.consumeCorruptionEnvVars??!0)&&Ot&&Ot===Xe&&ue==="User"&&(ve=!0,Mt=B.env[zn]==="1",delete B.env[Wn],delete B.env[zn]),typeof be!="object"||be===null||Array.isArray(be))return g.push({message:"Settings file is not a valid JSON object.",path:q}),{settings:{}};let J=be,ut=xh({filePath:q,scope:ue,settingsObject:J});ut&&(J=ut.settingsObject,de=ut.content);let Nt=Eh({filePath:q,scope:ue,settingsObject:J}),Bt=kt(J)&&!Nt;Nt&&Zo(J);let _t=We in J,lt=J[We],Ut=_t&&typeof lt!="number",Gt=typeof lt=="number"&<<He,jt,ct=he=>{try{_n(q,J,!0)||V.error(`${he}: updateSettingsFilePreservingFormat returned false for ${q}`)}catch(fe){V.error(`${he}: ${se(fe)}`)}};if(!Bt&&ra(J)){let he=ta(J,ue);he.executedMigrations.length>0?(J=he.settings,jt=he.warnings,ct("Error migrating settings file on disk")):(Gt||Ut)&&!ve&&(J[We]=He,V.warn(`Settings version metadata in ${q} could not be migrated by any registered migration. Normalizing ${We} to ${He}.`),ct("Error normalizing settings version on disk"))}else(!_t||Ut||Gt)&&!ve&&!Bt&&(J[We]=He,ct("Error normalizing settings version on disk"));let dt={settings:J,rawJson:de,migrationWarnings:jt??[]};return ve&&(dt.corruptedPath=Xe,dt.wasRecovered=Pt||(Mt??!1)),dt}}catch(de){g.push({message:se(de),path:q})}return{settings:{}}},E=S(f,"System"),D=S(m,"SystemDefaults"),A=S(n,"User"),T={settings:{},rawJson:void 0};l!==c&&(T=S(y,"Workspace"));let F=structuredClone(E.settings),N=structuredClone(D.settings),G=structuredClone(A.settings),H=structuredClone(T.settings),z=ca();o=Ye(E.settings,z),u=Ye(D.settings,z),h=Ye(A.settings,z),p=Ye(T.settings,z),h.ui?.theme==="VS"?h.ui.theme=tn.name:h.ui?.theme==="VS2015"&&(h.ui.theme=rn.name),p.ui?.theme==="VS"?p.ui.theme=tn.name:p.ui?.theme==="VS2015"&&(p.ui.theme=rn.name);let Ae=Xn(o,u,h,{},!1),Be=Vr(Ae,void 0,l,r.workspaceTrust).isTrusted??!1,kr=Xn(o,u,h,p,Be);r.skipLoadEnvironment||Dh(kr,l,r.workspaceTrust);let Tr=[[u,m],[o,f],[h,n],...Be?[[p,y]]:[]];for(let[q,ue]of Tr)for(let de of gh(q))g.push({message:de,path:ue});if(g.length>0){let q=g.map(ue=>`Error in ${ue.path}: ${ue.message}`);throw new ft(`${q.join(`
|
|
44
|
-
`)}
|
|
45
|
-
Please fix the configuration file(s) and try again.`)}let Ir=[...i?[i]:[],...E.migrationWarnings??[],...D.migrationWarnings??[],...A.migrationWarnings??[],...T.migrationWarnings??[]];return new cr({path:f,settings:o,originalSettings:F,rawJson:E.rawJson},{path:m,settings:u,originalSettings:N,rawJson:D.rawJson},{path:n,settings:h,originalSettings:G,rawJson:A.rawJson},{path:y,settings:p,originalSettings:H,rawJson:T.rawJson},Be,d,Ir,A.corruptedPath,A.wasRecovered??!1)}function aa(e,t){let r={};return $(r,e,t),r}function Ch(e,t){let r=t.split("."),n=e;for(let i of r){if(!n||typeof n!="object"||Array.isArray(n))return[];n=n[i]}return Array.isArray(n)?n.filter(i=>typeof i=="string"):[]}function wh(e,t=e.originalSettings,r=[]){try{let n=R.dirname(e.path);_.existsSync(n)||_.mkdirSync(n,{recursive:!0}),_n(e.path,t,!1,r)||V.error(`saveSettings: updateSettingsFilePreservingFormat returned false for ${e.path}`)}catch(n){throw V.error("Error saving user settings file."),V.error(n instanceof Error?n.message:String(n)),n}}b();b();b();import Rp from"node:path";b();import kh from"node:process";import Th from"node:fs/promises";import{fileURLToPath as Ih}from"node:url";import it from"node:path";var pa=e=>e instanceof URL?Ih(e):e;async function ma(e,{cwd:t=kh.cwd(),type:r="file",stopAt:n}={}){let i=it.resolve(pa(t)??""),{root:o}=it.parse(i);n=it.resolve(i,pa(n??o));let u=it.isAbsolute(e);for(;i;){let h=u?e:it.join(i,e);try{let p=await Th.stat(h);if(r==="file"&&p.isFile()||r==="directory"&&p.isDirectory())return h}catch{}if(i===n||i===o)break;i=it.dirname(i)}}b();import kp from"node:fs/promises";import Tp from"node:path";b();var Ga=Ve(Ua(),1);b();function Qh(e,t){let r=t===0?-1:e.lastIndexOf(`
|
|
46
|
-
`,t-1);return{line:r===-1?0:e.slice(0,r+1).match(/\n/g).length,column:t-r-1}}function ii(e,t,{oneBased:r=!1}={}){if(typeof e!="string")throw new TypeError("Text parameter should be a string");if(!Number.isInteger(t))throw new TypeError("Index parameter should be an integer");if(t<0||t>e.length)throw new RangeError("Index out of bounds");let n=Qh(e,t);return r?{line:n.line+1,column:n.column+1}:n}var Zh=e=>`\\u{${e.codePointAt(0).toString(16)}}`,si=class e extends Error{name="JSONError";fileName;#n;#s;#t;#f;#C;constructor(t){if(typeof t=="string")super(),this.#t=t;else{let{jsonParseError:r,fileName:n,input:i}=t;super(void 0,{cause:r}),this.#n=i,this.#s=r,this.fileName=n}Error.captureStackTrace?.(this,e)}get message(){this.#t??=`${tf(this.#s.message)}${this.#n===""?" while parsing empty string":""}`;let{codeFrame:t}=this;return`${this.#t}${this.fileName?` in ${this.fileName}`:""}${t?`
|
|
47
|
-
|
|
48
|
-
${t}
|
|
49
|
-
`:""}`}set message(t){this.#t=t}#w(t){if(!this.#s)return;let r=this.#n,n=ef(r,this.#s.message);if(n)return(0,Ga.codeFrameColumns)(r,{start:n},{highlightCode:t})}get codeFrame(){return this.#f??=this.#w(!0),this.#f}get rawCodeFrame(){return this.#C??=this.#w(!1),this.#C}},ef=(e,t)=>{let r=t.match(/in JSON at position (?<index>\d+)(?: \(line (?<line>\d+) column (?<column>\d+)\))?$/);if(!r)return;let{index:n,line:i,column:o}=r.groups;return i&&o?{line:Number(i),column:Number(o)}:ii(e,Number(n),{oneBased:!0})},tf=e=>e.replace(/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,(t,r,n)=>`"${n}"(${Zh(n)})`);function oi(e,t,r){typeof t=="string"&&(r=t,t=void 0);try{return JSON.parse(e,t)}catch(n){throw new si({jsonParseError:n,fileName:r,input:e})}}var rl=Ve(el(),1);b();import{fileURLToPath as wp}from"node:url";function tl(e){return e instanceof URL?wp(e):e}var Ip=e=>Tp.resolve(tl(e)??".","package.json"),Fp=(e,t)=>{let r=typeof e=="string"?oi(e):e;return t&&(0,rl.default)(r),r};async function nl({cwd:e,normalize:t=!0}={}){let r=await kp.readFile(Ip(e),"utf8");return Fp(r,t)}async function il(e){let t=await ma("package.json",e);if(t)return{packageJson:await nl({...e,cwd:Rp.dirname(t)}),path:t}}import{fileURLToPath as Lp}from"node:url";import Pp from"node:path";var Mp=Lp(import.meta.url),Op=Pp.dirname(Mp),Cr;async function sl(){if(Cr)return Cr;let e=await il({cwd:Op});if(e)return Cr=e.packageJson,Cr}async function ol(){let e=await sl();return"0.21.13"}b();function tb(e,t){let r=t??Is(e),n=e.forScope(r),i=null,o=null;return{getValue(u){return Ie(e.merged,u)},setValue(u,h){for(let p of u.split("."))if(p==="__proto__"||p==="constructor"||p==="prototype")throw new Error(`Refusing to write settings key with reserved segment: ${u}`);e.setValue(r,u,h)},getModelProviders(){return e.merged.modelProviders??{}},persist(){},backup(){Us(n.path),i=structuredClone(n.settings),o=structuredClone(n.originalSettings)},restore(){Gs(n.path)||console.error(`[loadedSettingsAdapter] On-disk rollback of ${n.path} failed; in-memory state was restored but the file may be inconsistent. Re-run /auth or inspect the file directly to recover.`),i!==null&&(n.settings=i),o!==null&&(n.originalSettings=o),e.recomputeMerged()},cleanupBackup(){js(n.path),i=null,o=null}}}b();var ib="session/set_model",Np=["backgroundExecution","turnEnd","sessionState","waitingOn","modelUpdate","modeUpdate"];function sb(e,t){return{sessionUpdate:"session_info_update",_meta:{matilda:{[e]:t}}}}var ob=1,ab={backgroundExecution:"matilda/notify/session/background-execution",turnEnd:"_matildacode/end_turn",sessionState:"matilda/notify/session/state",waitingOn:"matilda/notify/session/waiting-on",modelUpdate:"matilda/notify/session/model-update",modeUpdate:"matilda/notify/session/mode-update"};function ub(e){if(e.sessionUpdate!=="session_info_update")return;let t=e._meta?.matilda;if(!(typeof t!="object"||t===null))for(let r of Np){let n=t[r];if(typeof n=="object"&&n!==null)return{notice:r,payload:n}}}var lb="craft/drainMidTurnQueue",cb="craft/readMidTurnQueue";b();var al=e=>{let t=e/1073741824;return e<1048576?`${(e/1024).toFixed(1)} KB`:e<1073741824?`${(e/1048576).toFixed(1)} MB`:`${t.toFixed(2)} GB`},fb=e=>{let r=Date.now()-e,n=Math.floor(r/1e3),i=Math.floor(n/60),o=Math.floor(i/60),u=Math.floor(o/24),h=Math.floor(u/7),p=Math.floor(u/30);return p>0?p===1?"1 month ago":`${p} months ago`:h>0?h===1?"1 week ago":`${h} weeks ago`:u>0?u===1?"1 day ago":`${u} days ago`:o>0?o===1?"1 hour ago":`${o} hours ago`:i>0?i===1?"1 minute ago":`${i} minutes ago`:"just now"},pb=e=>e<1e3?`${e}`:e<1e4?`${(e/1e3).toFixed(1)}k`:`${Math.floor(e/1e3)}k`,mb=(e,t)=>{if(e<=0)return"0s";if(e<1e3)return`${Math.round(e)}ms`;let r=e/1e3;if(r<60){let h=r.toFixed(1);return t?.hideTrailingZeros&&h.endsWith(".0")?`${h.slice(0,-2)}s`:`${h}s`}let n=Math.floor(r/3600),i=Math.floor(r%3600/60),o=Math.floor(r%60),u=[];return n>0&&u.push(`${n}h`),i>0&&u.push(`${i}m`),o>0&&u.push(`${o}s`),u.length===0?n>0?`${n}h`:i>0?`${i}m`:`${o}s`:u.join(" ")};b();var Bp="Warning: running headless with --bogan / approval-mode=bogan and no sandbox. All tool calls (shell, write, edit) auto-execute at this process's privilege level. Enable a sandbox via --sandbox / MATILDA_SANDBOX, or set MATILDA_CODE_SUPPRESS_BOGAN_WARNING=1 to silence this notice.";function bb(e,t=process.env){return e.getApprovalMode()!=="bogan"||e.getSandbox()||t.SANDBOX||_p(t.MATILDA_CODE_SUPPRESS_BOGAN_WARNING)?null:Bp}function _p(e){return e==="1"||e==="true"}b();import at from"node:process";import Up from"node:os";import{execFile as Gp}from"node:child_process";b();var wr="1da7a154e";var ul=Ce("STATUS"),jp=5e3;function ll(e){return new Promise(t=>{Gp(e,["--version"],{timeout:jp,encoding:"utf-8"},(r,n)=>{if(r){t("unknown");return}t(typeof n=="string"?n.trim():"unknown")})})}async function $p(){return ll("npm")}async function Rb(){return ll("git")}async function qp(e){if(!e.services.config?.getIdeMode())return"";try{return(await Gi.getInstance())?.getDetectedIdeDisplayName()??""}catch{return""}}function cl(e=!1){let t=at.env.SANDBOX;return!t||t==="sandbox-exec"?t==="sandbox-exec"?`sandbox-exec (${at.env.SEATBELT_PROFILE||"unknown"})`:"no sandbox":e?t.replace(/^matilda-(?:code-)?/,""):t}async function Hp(e){let t=at.platform,r=at.arch,n=Up.release(),i=at.version,o=await $p(),u=cl(),h=e.services.config?.getModelDisplayName()||"Unknown",p=await ol(),g=e.services.config?.getAuthType()||"",f=await qp(e),m=e.services.config?.getSessionId()||"unknown",d=e.services.config?.getProxy();return{cliVersion:p,osPlatform:t,osArch:r,osRelease:n,nodeVersion:i,npmVersion:o,sandboxEnv:u,modelVersion:h,selectedAuthType:g,ideClient:f,sessionId:m,proxy:d}}async function Lb(e){let t=await Hp(e),r=al(at.memoryUsage().rss),n=cl(!0),i=t.selectedAuthType==="openai"||t.selectedAuthType==="anthropic"?e.services.config?.getContentGeneratorConfig():void 0,o=i?.baseUrl,u=i?.apiKeyEnvKey,h=wr&&!["N/A"].includes(wr)?wr:void 0,p=e.services.settings?.merged?.fastModel||void 0,g=Wp(e);return{...t,sandboxEnv:n,memoryUsage:r,baseUrl:o,apiKeyEnvKey:u,gitCommit:h,fastModel:p,lspStatus:g}}function Wp(e){try{let t=e.services.config?.getLspStatusSnapshot?.();return t?(e.services.config?.getDebugMode?.()&&ul.debug("LSP status snapshot for /status:",t),zp(t)):void 0}catch(t){e.services.config?.getDebugMode?.()&&ul.debug("Unable to read LSP status snapshot for /status:",t);return}}function zp(e){if(!e.enabled)return"disabled";if(e.initializationError)return`enabled, initialization failed: ${e.initializationError}`;if(e.statusUnavailable)return"enabled, status unavailable";if(e.configuredServers===0)return"enabled, no servers configured";let t=[e.failedServers>0?`${e.failedServers} failed`:"",e.inProgressServers>0?`${e.inProgressServers} starting`:"",e.notStartedServers>0?`${e.notStartedServers} not started`:""].filter(Boolean),r=t.length>0?` (${t.join(", ")})`:"";return`enabled, ${e.readyServers}/${e.configuredServers} ready${r}`}export{Hr as a,Hm as b,Wm as c,j as d,O as e,Jm as f,je as g,Km as h,Ym as i,tn as j,rn as k,Je as l,Vl as m,Pm as n,Kl as o,Ql as p,Vr as q,Is as r,dg as s,tc as t,Yr as u,Kr as v,Zr as w,dc as x,Um as y,Gm as z,Ns as A,xc as B,sn as C,Qe as D,Ie as E,Ps as F,bg as G,yt as H,$ as I,vg as J,xg as K,Eg as L,Dg as M,Ag as N,Cg as O,Q0 as P,Jn as Q,Z0 as R,Wn as S,zn as T,Fs as U,ey as V,ty as W,bh as X,Dh as Y,ry as Z,Ah as _,ny as $,ai as aa,ui as ba,Ha as ca,za as da,Ka as ea,Za as fa,fi as ga,nu as ha,su as ia,sl as ja,ol as ka,tb as la,Xp as ma,Nr as na,Vi as oa,em as pa,_r as qa,im as ra,sm as sa,Yi as ta,Qi as ua,Zi as va,es as wa,ts as xa,rs as ya,ns as za,is as Aa,ss as Ba,os as Ca,as as Da,us as Ea,ls as Fa,cs as Ga,ds as Ha,hs as Ia,fs as Ja,ps as Ka,ms as La,gs as Ma,ys as Na,Ss as Oa,bs as Pa,Ue as Qa,lm as Ra,Ur as Sa,Gr as Ta,jr as Ua,$r as Va,cm as Wa,dm as Xa,Ml as Ya,hm as Za,fm as _a,pm as $a,mm as ab,gm as bb,ym as cb,Sm as db,Ol as eb,bm as fb,vm as gb,ib as hb,sb as ib,ob as jb,ab as kb,ub as lb,lb as mb,cb as nb,al as ob,fb as pb,pb as qb,mb as rb,$p as sb,Rb as tb,Lb as ub,Bp as vb,bb as wb};
|
|
50
|
-
/**
|
|
51
|
-
* @license
|
|
52
|
-
* Copyright 2025 Matilda Team
|
|
53
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
54
|
-
*/
|
|
55
|
-
/**
|
|
56
|
-
* @license
|
|
57
|
-
* Copyright 2025 Matilda
|
|
58
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
59
|
-
*/
|
|
60
|
-
/**
|
|
61
|
-
* @license
|
|
62
|
-
* Copyright 2025 Google LLC
|
|
63
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
64
|
-
*/
|
|
65
|
-
/**
|
|
66
|
-
* @license
|
|
67
|
-
* Copyright 2025 Matilda team
|
|
68
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
69
|
-
*/
|
|
70
|
-
/**
|
|
71
|
-
* @license
|
|
72
|
-
* Copyright 2026 Matilda Team
|
|
73
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
74
|
-
*/
|
|
75
|
-
/**
|
|
76
|
-
* @license
|
|
77
|
-
* Copyright 2025 Matilda Team
|
|
78
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
79
|
-
*
|
|
80
|
-
* Adapter that lets core's `applyProviderInstallPlan` write through
|
|
81
|
-
* `LoadedSettings` while preserving CLI-specific guarantees:
|
|
82
|
-
* - scope resolution via `getPersistScopeForModelSelection`
|
|
83
|
-
* - on-disk `.orig` backup of the target settings file
|
|
84
|
-
* - in-memory snapshot of `settings` / `originalSettings` for rollback
|
|
85
|
-
* - merged-settings recomputation after restore
|
|
86
|
-
*/
|
|
87
|
-
/**
|
|
88
|
-
* @license
|
|
89
|
-
* Copyright 2026 Google LLC
|
|
90
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
91
|
-
*/
|
|
92
|
-
/*! Bundled license information:
|
|
93
|
-
|
|
94
|
-
repeat-string/index.js:
|
|
95
|
-
(*!
|
|
96
|
-
* repeat-string <https://github.com/jonschlinkert/repeat-string>
|
|
97
|
-
*
|
|
98
|
-
* Copyright (c) 2014-2015, Jon Schlinkert.
|
|
99
|
-
* Licensed under the MIT License.
|
|
100
|
-
*)
|
|
101
|
-
*/
|