@maincode-ai/matilda-code 0.19.9 → 0.20.1
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/bundled/{qc-helper → mainy}/SKILL.md +2 -2
- package/bundled/{qc-helper → mainy}/docs/features/commands.md +6 -6
- package/bundled/{qc-helper → mainy}/docs/features/headless.md +37 -0
- package/bundled/{qc-helper → mainy}/docs/features/mcp.md +3 -3
- package/chunks/{agent-HKORTAHR.js → agent-CE34X462.js} +1 -1
- package/chunks/{agent-headless-F7NN2K2V.js → agent-headless-CNI7H4BU.js} +1 -1
- package/chunks/{anthropicContentGenerator-DKMAJXYA.js → anthropicContentGenerator-ATLOKYPR.js} +1 -1
- package/chunks/chunk-3YLXGE6T.js +8 -0
- package/chunks/{chunk-GTR4V2PV.js → chunk-DC7LAFZZ.js} +1 -1
- package/chunks/chunk-DHBNZZZO.js +95 -0
- package/chunks/{chunk-KP6BLFQS.js → chunk-GIIMOLLN.js} +1 -1
- package/chunks/chunk-IMYUVCF7.js +27 -0
- package/chunks/{chunk-3KCDX6MY.js → chunk-ISW2QC5B.js} +1 -1
- package/chunks/{chunk-H5PGSQP2.js → chunk-J56KRT6Z.js} +458 -458
- package/chunks/chunk-OCXGNAAT.js +8 -0
- package/chunks/{chunk-2GMJHSBF.js → chunk-OQVITNHW.js} +1 -1
- package/chunks/{chunk-GN7ECS3T.js → chunk-SKBC2YV2.js} +4 -4
- package/chunks/{chunk-XXZH7C44.js → chunk-SS5WUOSJ.js} +1 -1
- package/chunks/chunk-T75X5DJI.js +101 -0
- package/chunks/{chunk-TDVEFJRU.js → chunk-WUQZ3WFM.js} +1 -1
- package/chunks/chunk-XJDC3ZQZ.js +8 -0
- package/chunks/{computer-use-BBMGDR5Q.js → computer-use-4533FJAL.js} +1 -1
- package/chunks/contextCommand-M7LA5BRD.js +3 -0
- package/chunks/edit-U4P4JWQ6.js +38 -0
- package/chunks/{enter-worktree-VQHP27VO.js → enter-worktree-CUDNIQNH.js} +1 -1
- package/chunks/enterPlanMode-SUTLQUZO.js +18 -0
- package/chunks/{exit-worktree-JNQ5QJ3V.js → exit-worktree-72O3N4X4.js} +1 -1
- package/chunks/{exitPlanMode-VTB3FQTP.js → exitPlanMode-ZP75YCUK.js} +14 -14
- package/chunks/geminiContentGenerator-KPR5Q3XX.js +8 -0
- package/chunks/{glob-A3AI5R62.js → glob-V7YUXA6Z.js} +1 -1
- package/chunks/{grep-IH2T7KTD.js → grep-WOVNDJPG.js} +1 -1
- package/chunks/{matildaAgentContentGenerator-QKMXPB2A.js → matildaAgentContentGenerator-Y5CHD2WJ.js} +1 -1
- package/chunks/matildaContentGenerator-F2DTT47Z.js +8 -0
- package/chunks/matildaOAuth2-LKOMJUC6.js +3 -0
- package/chunks/{monitor-4DTQSZEC.js → monitor-G7G765XR.js} +1 -1
- package/chunks/{notebook-edit-CZRTFD7U.js → notebook-edit-QK7K5ALF.js} +1 -1
- package/chunks/{openaiContentGenerator-AZI4WQN4.js → openaiContentGenerator-XLDE2S4K.js} +1 -1
- package/chunks/ripGrep-W5JZVWA4.js +3 -0
- package/chunks/{scheduler-5LM4YZEI.js → scheduler-C7N3Q67S.js} +1 -1
- package/chunks/{serve-7IPJHK45.js → serve-WDV5Q7R4.js} +1 -1
- package/chunks/shell-IEGVNM6S.js +3 -0
- package/chunks/src-Y3JZTLKR.js +3 -0
- package/chunks/{team-create-TRYOTUXF.js → team-create-OPP7B3G2.js} +1 -1
- package/chunks/{update-goal-DH2TEYYU.js → update-goal-6WDBMJ2I.js} +1 -1
- package/chunks/{web-fetch-5F7C7MXU.js → web-fetch-QP42GV23.js} +1 -1
- package/chunks/{web-search-6RI3HXMN.js → web-search-FURCBRRK.js} +1 -1
- package/chunks/{workflow-TTK6ZMKW.js → workflow-B3DRPVNT.js} +2 -2
- package/chunks/write-file-T7MBHX53.js +11 -0
- package/cli.js +476 -456
- package/package.json +2 -2
- package/chunks/chunk-7VGUNT5L.js +0 -8
- package/chunks/chunk-CLUEFPSU.js +0 -8
- package/chunks/chunk-LLQVLTPB.js +0 -27
- package/chunks/chunk-LNTXZVVL.js +0 -101
- package/chunks/chunk-PKETH5KK.js +0 -90
- package/chunks/contextCommand-HGBI6TH7.js +0 -3
- package/chunks/edit-RF2YFGIO.js +0 -38
- package/chunks/enterPlanMode-6FANAN7K.js +0 -17
- package/chunks/geminiContentGenerator-UJMSJR23.js +0 -8
- package/chunks/matildaContentGenerator-O2TF3IDJ.js +0 -8
- package/chunks/matildaOAuth2-2IUZAZEO.js +0 -3
- package/chunks/ripGrep-BZMM5FLN.js +0 -3
- package/chunks/shell-5O45TMEX.js +0 -3
- package/chunks/src-6MF6HV7Q.js +0 -3
- package/chunks/write-file-HOM26KX6.js +0 -11
- /package/bundled/{qc-helper → mainy}/docs/_meta.ts +0 -0
- /package/bundled/{qc-helper → mainy}/docs/common-workflow.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/configuration/_meta.ts +0 -0
- /package/bundled/{qc-helper → mainy}/docs/configuration/auth.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/configuration/matilda-ignore.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/configuration/model-providers.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/configuration/settings.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/configuration/themes.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/configuration/trusted-folders.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/extension/_meta.ts +0 -0
- /package/bundled/{qc-helper → mainy}/docs/extension/extension-releasing.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/extension/getting-started-extensions.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/extension/introduction.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/_meta.ts +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/approval-mode.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/arena.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/auto-mode.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/channels/_meta.ts +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/channels/dingtalk.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/channels/feishu.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/channels/overview.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/channels/plugins.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/channels/telegram.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/channels/weixin.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/code-review.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/dual-output.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/followup-suggestions.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/hooks.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/language.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/lsp.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/markdown-rendering.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/memory.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/sandbox.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/scheduled-tasks.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/skills.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/status-line.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/structured-output.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/sub-agents.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/tips.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/token-caching.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/tool-use-summaries.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/features/worktree.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/ide-integration/_meta.ts +0 -0
- /package/bundled/{qc-helper → mainy}/docs/ide-integration/ide-companion-spec.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/ide-integration/ide-integration.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/integration-github-action.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/integration-jetbrains.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/integration-vscode.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/integration-zed.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/matilda-serve-deploy-local.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/matilda-serve.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/overview.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/quickstart.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/reference/_meta.ts +0 -0
- /package/bundled/{qc-helper → mainy}/docs/reference/keyboard-shortcuts.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/support/Uninstall.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/support/_meta.ts +0 -0
- /package/bundled/{qc-helper → mainy}/docs/support/tos-privacy.md +0 -0
- /package/bundled/{qc-helper → mainy}/docs/support/troubleshooting.md +0 -0
package/chunks/chunk-PKETH5KK.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
// Force strict mode and setup for ESM
|
|
2
|
-
"use strict";
|
|
3
|
-
import{b as xe,f as br,g as mn,i as gn,l as xr}from"./chunk-2GMJHSBF.js";import{Ee as ln,L as an,M as un,Re as cn,lj as hn,mj as fn,nj as pn,ti as tl,xh as dn}from"./chunk-H5PGSQP2.js";import{i as on}from"./chunk-LNTXZVVL.js";import{da as sn}from"./chunk-CFBZKYFB.js";import{e as nn}from"./chunk-IOCF4XSR.js";import{L as K,Y as be,c as ae,j as It,s as Pe}from"./chunk-QWBNNEV2.js";import{b}from"./chunk-GZPNIYVZ.js";import{a as ot,d as R,f as He}from"./chunk-OWGSC52X.js";var Ir=R((Fp,Xn)=>{"use strict";b();var Fr=Symbol("singleComment"),zn=Symbol("multiComment"),bl=()=>"",xl=(t,e,r)=>t.slice(e,r).replace(/\S/g," "),vl=(t,e)=>{let r=e-1,i=0;for(;t[r]==="\\";)r-=1,i+=1;return!!(i%2)};Xn.exports=(t,e={})=>{if(typeof t!="string")throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof t}\``);let r=e.whitespace===!1?bl:xl,i=!1,n=!1,l=0,a="";for(let f=0;f<t.length;f++){let p=t[f],m=t[f+1];if(!n&&p==='"'&&(vl(t,f)||(i=!i)),!i){if(!n&&p+m==="//")a+=t.slice(l,f),l=f,n=Fr,f++;else if(n===Fr&&p+m===`\r
|
|
4
|
-
`){f++,n=!1,a+=r(t,l,f),l=f;continue}else if(n===Fr&&p===`
|
|
5
|
-
`)n=!1,a+=r(t,l,f),l=f;else if(!n&&p+m==="/*"){a+=t.slice(l,f),l=f,n=zn,f++;continue}else if(n===zn&&p+m==="*/"){f++,n=!1,a+=r(t,l,f+1),l=f+1;continue}}}return a+(n?r(t.slice(l)):t.slice(l))}});var cs=R((dt,$r)=>{b();(function(e,r){typeof dt=="object"&&typeof $r=="object"?$r.exports=r():typeof define=="function"&&define.amd?define([],r):typeof dt=="object"?dt.esprima=r():e.esprima=r()})(dt,function(){return function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={exports:{},id:i,loaded:!1};return t[i].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}return r.m=t,r.c=e,r.p="",r(0)}([function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(1),n=r(3),l=r(8),a=r(15);function f(d,s,o){var u=null,c=function(O,j){o&&o(O,j),u&&u.visit(O,j)},y=typeof o=="function"?c:null,S=!1;if(s){S=typeof s.comment=="boolean"&&s.comment;var D=typeof s.attachComment=="boolean"&&s.attachComment;(S||D)&&(u=new i.CommentHandler,u.attach=D,s.comment=!0,y=c)}var E=!1;s&&typeof s.sourceType=="string"&&(E=s.sourceType==="module");var C;s&&typeof s.jsx=="boolean"&&s.jsx?C=new n.JSXParser(d,s,y):C=new l.Parser(d,s,y);var T=E?C.parseModule():C.parseScript(),I=T;return S&&u&&(I.comments=u.comments),C.config.tokens&&(I.tokens=C.tokens),C.config.tolerant&&(I.errors=C.errorHandler.errors),I}e.parse=f;function p(d,s,o){var u=s||{};return u.sourceType="module",f(d,u,o)}e.parseModule=p;function m(d,s,o){var u=s||{};return u.sourceType="script",f(d,u,o)}e.parseScript=m;function h(d,s,o){var u=new a.Tokenizer(d,s),c;c=[];try{for(;;){var y=u.getNextToken();if(!y)break;o&&(y=o(y)),c.push(y)}}catch(S){u.errorHandler.tolerate(S)}return u.errorHandler.tolerant&&(c.errors=u.errors()),c}e.tokenize=h;var g=r(2);e.Syntax=g.Syntax,e.version="4.0.1"},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(2),n=function(){function l(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return l.prototype.insertInnerComments=function(a,f){if(a.type===i.Syntax.BlockStatement&&a.body.length===0){for(var p=[],m=this.leading.length-1;m>=0;--m){var h=this.leading[m];f.end.offset>=h.start&&(p.unshift(h.comment),this.leading.splice(m,1),this.trailing.splice(m,1))}p.length&&(a.innerComments=p)}},l.prototype.findTrailingComments=function(a){var f=[];if(this.trailing.length>0){for(var p=this.trailing.length-1;p>=0;--p){var m=this.trailing[p];m.start>=a.end.offset&&f.unshift(m.comment)}return this.trailing.length=0,f}var h=this.stack[this.stack.length-1];if(h&&h.node.trailingComments){var g=h.node.trailingComments[0];g&&g.range[0]>=a.end.offset&&(f=h.node.trailingComments,delete h.node.trailingComments)}return f},l.prototype.findLeadingComments=function(a){for(var f=[],p;this.stack.length>0;){var m=this.stack[this.stack.length-1];if(m&&m.start>=a.start.offset)p=m.node,this.stack.pop();else break}if(p){for(var h=p.leadingComments?p.leadingComments.length:0,g=h-1;g>=0;--g){var d=p.leadingComments[g];d.range[1]<=a.start.offset&&(f.unshift(d),p.leadingComments.splice(g,1))}return p.leadingComments&&p.leadingComments.length===0&&delete p.leadingComments,f}for(var g=this.leading.length-1;g>=0;--g){var m=this.leading[g];m.start<=a.start.offset&&(f.unshift(m.comment),this.leading.splice(g,1))}return f},l.prototype.visitNode=function(a,f){if(!(a.type===i.Syntax.Program&&a.body.length>0)){this.insertInnerComments(a,f);var p=this.findTrailingComments(f),m=this.findLeadingComments(f);m.length>0&&(a.leadingComments=m),p.length>0&&(a.trailingComments=p),this.stack.push({node:a,start:f.start.offset})}},l.prototype.visitComment=function(a,f){var p=a.type[0]==="L"?"Line":"Block",m={type:p,value:a.value};if(a.range&&(m.range=a.range),a.loc&&(m.loc=a.loc),this.comments.push(m),this.attach){var h={comment:{type:p,value:a.value,range:[f.start.offset,f.end.offset]},start:f.start.offset};a.loc&&(h.comment.loc=a.loc),a.type=p,this.leading.push(h),this.trailing.push(h)}},l.prototype.visit=function(a,f){a.type==="LineComment"?this.visitComment(a,f):a.type==="BlockComment"?this.visitComment(a,f):this.attach&&this.visitNode(a,f)},l}();e.CommentHandler=n},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.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(t,e,r){"use strict";var i=this&&this.__extends||function(){var s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,u){o.__proto__=u}||function(o,u){for(var c in u)u.hasOwnProperty(c)&&(o[c]=u[c])};return function(o,u){s(o,u);function c(){this.constructor=o}o.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}();Object.defineProperty(e,"__esModule",{value:!0});var n=r(4),l=r(5),a=r(6),f=r(7),p=r(8),m=r(13),h=r(14);m.TokenName[100]="JSXIdentifier",m.TokenName[101]="JSXText";function g(s){var o;switch(s.type){case a.JSXSyntax.JSXIdentifier:var u=s;o=u.name;break;case a.JSXSyntax.JSXNamespacedName:var c=s;o=g(c.namespace)+":"+g(c.name);break;case a.JSXSyntax.JSXMemberExpression:var y=s;o=g(y.object)+"."+g(y.property);break;default:break}return o}var d=function(s){i(o,s);function o(u,c,y){return s.call(this,u,c,y)||this}return o.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():s.prototype.parsePrimaryExpression.call(this)},o.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},o.prototype.finishJSX=function(){this.nextToken()},o.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},o.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},o.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},o.prototype.scanXHTMLEntity=function(u){for(var c="&",y=!0,S=!1,D=!1,E=!1;!this.scanner.eof()&&y&&!S;){var C=this.scanner.source[this.scanner.index];if(C===u)break;if(S=C===";",c+=C,++this.scanner.index,!S)switch(c.length){case 2:D=C==="#";break;case 3:D&&(E=C==="x",y=E||n.Character.isDecimalDigit(C.charCodeAt(0)),D=D&&!E);break;default:y=y&&!(D&&!n.Character.isDecimalDigit(C.charCodeAt(0))),y=y&&!(E&&!n.Character.isHexDigit(C.charCodeAt(0)));break}}if(y&&S&&c.length>2){var T=c.substr(1,c.length-2);D&&T.length>1?c=String.fromCharCode(parseInt(T.substr(1),10)):E&&T.length>2?c=String.fromCharCode(parseInt("0"+T.substr(1),16)):!D&&!E&&h.XHTMLEntities[T]&&(c=h.XHTMLEntities[T])}return c},o.prototype.lexJSX=function(){var u=this.scanner.source.charCodeAt(this.scanner.index);if(u===60||u===62||u===47||u===58||u===61||u===123||u===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(u===34||u===39){for(var y=this.scanner.index,S=this.scanner.source[this.scanner.index++],D="";!this.scanner.eof();){var E=this.scanner.source[this.scanner.index++];if(E===S)break;E==="&"?D+=this.scanXHTMLEntity(S):D+=E}return{type:8,value:D,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:y,end:this.scanner.index}}if(u===46){var C=this.scanner.source.charCodeAt(this.scanner.index+1),T=this.scanner.source.charCodeAt(this.scanner.index+2),c=C===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(u===96)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(n.Character.isIdentifierStart(u)&&u!==92){var y=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var E=this.scanner.source.charCodeAt(this.scanner.index);if(n.Character.isIdentifierPart(E)&&E!==92)++this.scanner.index;else if(E===45)++this.scanner.index;else break}var I=this.scanner.source.slice(y,this.scanner.index);return{type:100,value:I,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:y,end:this.scanner.index}}return this.scanner.lex()},o.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 u=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(u)),u},o.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 u=this.scanner.index,c="";!this.scanner.eof();){var y=this.scanner.source[this.scanner.index];if(y==="{"||y==="<")break;++this.scanner.index,c+=y,n.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:u,end:this.scanner.index};return c.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(S)),S},o.prototype.peekJSXToken=function(){var u=this.scanner.saveState();this.scanner.scanComments();var c=this.lexJSX();return this.scanner.restoreState(u),c},o.prototype.expectJSX=function(u){var c=this.nextJSXToken();(c.type!==7||c.value!==u)&&this.throwUnexpectedToken(c)},o.prototype.matchJSX=function(u){var c=this.peekJSXToken();return c.type===7&&c.value===u},o.prototype.parseJSXIdentifier=function(){var u=this.createJSXNode(),c=this.nextJSXToken();return c.type!==100&&this.throwUnexpectedToken(c),this.finalize(u,new l.JSXIdentifier(c.value))},o.prototype.parseJSXElementName=function(){var u=this.createJSXNode(),c=this.parseJSXIdentifier();if(this.matchJSX(":")){var y=c;this.expectJSX(":");var S=this.parseJSXIdentifier();c=this.finalize(u,new l.JSXNamespacedName(y,S))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var D=c;this.expectJSX(".");var E=this.parseJSXIdentifier();c=this.finalize(u,new l.JSXMemberExpression(D,E))}return c},o.prototype.parseJSXAttributeName=function(){var u=this.createJSXNode(),c,y=this.parseJSXIdentifier();if(this.matchJSX(":")){var S=y;this.expectJSX(":");var D=this.parseJSXIdentifier();c=this.finalize(u,new l.JSXNamespacedName(S,D))}else c=y;return c},o.prototype.parseJSXStringLiteralAttribute=function(){var u=this.createJSXNode(),c=this.nextJSXToken();c.type!==8&&this.throwUnexpectedToken(c);var y=this.getTokenRaw(c);return this.finalize(u,new f.Literal(c.value,y))},o.prototype.parseJSXExpressionAttribute=function(){var u=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(u,new l.JSXExpressionContainer(c))},o.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},o.prototype.parseJSXNameValueAttribute=function(){var u=this.createJSXNode(),c=this.parseJSXAttributeName(),y=null;return this.matchJSX("=")&&(this.expectJSX("="),y=this.parseJSXAttributeValue()),this.finalize(u,new l.JSXAttribute(c,y))},o.prototype.parseJSXSpreadAttribute=function(){var u=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var c=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(u,new l.JSXSpreadAttribute(c))},o.prototype.parseJSXAttributes=function(){for(var u=[];!this.matchJSX("/")&&!this.matchJSX(">");){var c=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();u.push(c)}return u},o.prototype.parseJSXOpeningElement=function(){var u=this.createJSXNode();this.expectJSX("<");var c=this.parseJSXElementName(),y=this.parseJSXAttributes(),S=this.matchJSX("/");return S&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(u,new l.JSXOpeningElement(c,S,y))},o.prototype.parseJSXBoundaryElement=function(){var u=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var c=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(u,new l.JSXClosingElement(c))}var y=this.parseJSXElementName(),S=this.parseJSXAttributes(),D=this.matchJSX("/");return D&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(u,new l.JSXOpeningElement(y,D,S))},o.prototype.parseJSXEmptyExpression=function(){var u=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(u,new l.JSXEmptyExpression)},o.prototype.parseJSXExpressionContainer=function(){var u=this.createJSXNode();this.expectJSX("{");var c;return this.matchJSX("}")?(c=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),c=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(u,new l.JSXExpressionContainer(c))},o.prototype.parseJSXChildren=function(){for(var u=[];!this.scanner.eof();){var c=this.createJSXChildNode(),y=this.nextJSXText();if(y.start<y.end){var S=this.getTokenRaw(y),D=this.finalize(c,new l.JSXText(y.value,S));u.push(D)}if(this.scanner.source[this.scanner.index]==="{"){var E=this.parseJSXExpressionContainer();u.push(E)}else break}return u},o.prototype.parseComplexJSXElement=function(u){for(var c=[];!this.scanner.eof();){u.children=u.children.concat(this.parseJSXChildren());var y=this.createJSXChildNode(),S=this.parseJSXBoundaryElement();if(S.type===a.JSXSyntax.JSXOpeningElement){var D=S;if(D.selfClosing){var E=this.finalize(y,new l.JSXElement(D,[],null));u.children.push(E)}else c.push(u),u={node:y,opening:D,closing:null,children:[]}}if(S.type===a.JSXSyntax.JSXClosingElement){u.closing=S;var C=g(u.opening.name),T=g(u.closing.name);if(C!==T&&this.tolerateError("Expected corresponding JSX closing tag for %0",C),c.length>0){var E=this.finalize(u.node,new l.JSXElement(u.opening,u.children,u.closing));u=c[c.length-1],u.children.push(E),c.pop()}else break}}return u},o.prototype.parseJSXElement=function(){var u=this.createJSXNode(),c=this.parseJSXOpeningElement(),y=[],S=null;if(!c.selfClosing){var D=this.parseComplexJSXElement({node:u,opening:c,closing:S,children:y});y=D.children,S=D.closing}return this.finalize(u,new l.JSXElement(c,y,S))},o.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var u=this.parseJSXElement();return this.finishJSX(),u},o.prototype.isStartOfExpression=function(){return s.prototype.isStartOfExpression.call(this)||this.match("<")},o}(p.Parser);e.JSXParser=d},function(t,e){"use strict";Object.defineProperty(e,"__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]/};e.Character={fromCodePoint:function(i){return i<65536?String.fromCharCode(i):String.fromCharCode(55296+(i-65536>>10))+String.fromCharCode(56320+(i-65536&1023))},isWhiteSpace:function(i){return i===32||i===9||i===11||i===12||i===160||i>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(i)>=0},isLineTerminator:function(i){return i===10||i===13||i===8232||i===8233},isIdentifierStart:function(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i===92||i>=128&&r.NonAsciiIdentifierStart.test(e.Character.fromCodePoint(i))},isIdentifierPart:function(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i>=48&&i<=57||i===92||i>=128&&r.NonAsciiIdentifierPart.test(e.Character.fromCodePoint(i))},isDecimalDigit:function(i){return i>=48&&i<=57},isHexDigit:function(i){return i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102},isOctalDigit:function(i){return i>=48&&i<=55}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(6),n=function(){function u(c){this.type=i.JSXSyntax.JSXClosingElement,this.name=c}return u}();e.JSXClosingElement=n;var l=function(){function u(c,y,S){this.type=i.JSXSyntax.JSXElement,this.openingElement=c,this.children=y,this.closingElement=S}return u}();e.JSXElement=l;var a=function(){function u(){this.type=i.JSXSyntax.JSXEmptyExpression}return u}();e.JSXEmptyExpression=a;var f=function(){function u(c){this.type=i.JSXSyntax.JSXExpressionContainer,this.expression=c}return u}();e.JSXExpressionContainer=f;var p=function(){function u(c){this.type=i.JSXSyntax.JSXIdentifier,this.name=c}return u}();e.JSXIdentifier=p;var m=function(){function u(c,y){this.type=i.JSXSyntax.JSXMemberExpression,this.object=c,this.property=y}return u}();e.JSXMemberExpression=m;var h=function(){function u(c,y){this.type=i.JSXSyntax.JSXAttribute,this.name=c,this.value=y}return u}();e.JSXAttribute=h;var g=function(){function u(c,y){this.type=i.JSXSyntax.JSXNamespacedName,this.namespace=c,this.name=y}return u}();e.JSXNamespacedName=g;var d=function(){function u(c,y,S){this.type=i.JSXSyntax.JSXOpeningElement,this.name=c,this.selfClosing=y,this.attributes=S}return u}();e.JSXOpeningElement=d;var s=function(){function u(c){this.type=i.JSXSyntax.JSXSpreadAttribute,this.argument=c}return u}();e.JSXSpreadAttribute=s;var o=function(){function u(c,y){this.type=i.JSXSyntax.JSXText,this.value=c,this.raw=y}return u}();e.JSXText=o},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(2),n=function(){function x(v){this.type=i.Syntax.ArrayExpression,this.elements=v}return x}();e.ArrayExpression=n;var l=function(){function x(v){this.type=i.Syntax.ArrayPattern,this.elements=v}return x}();e.ArrayPattern=l;var a=function(){function x(v,A,M){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=v,this.body=A,this.generator=!1,this.expression=M,this.async=!1}return x}();e.ArrowFunctionExpression=a;var f=function(){function x(v,A,M){this.type=i.Syntax.AssignmentExpression,this.operator=v,this.left=A,this.right=M}return x}();e.AssignmentExpression=f;var p=function(){function x(v,A){this.type=i.Syntax.AssignmentPattern,this.left=v,this.right=A}return x}();e.AssignmentPattern=p;var m=function(){function x(v,A,M){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=v,this.body=A,this.generator=!1,this.expression=M,this.async=!0}return x}();e.AsyncArrowFunctionExpression=m;var h=function(){function x(v,A,M){this.type=i.Syntax.FunctionDeclaration,this.id=v,this.params=A,this.body=M,this.generator=!1,this.expression=!1,this.async=!0}return x}();e.AsyncFunctionDeclaration=h;var g=function(){function x(v,A,M){this.type=i.Syntax.FunctionExpression,this.id=v,this.params=A,this.body=M,this.generator=!1,this.expression=!1,this.async=!0}return x}();e.AsyncFunctionExpression=g;var d=function(){function x(v){this.type=i.Syntax.AwaitExpression,this.argument=v}return x}();e.AwaitExpression=d;var s=function(){function x(v,A,M){var Z=v==="||"||v==="&&";this.type=Z?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression,this.operator=v,this.left=A,this.right=M}return x}();e.BinaryExpression=s;var o=function(){function x(v){this.type=i.Syntax.BlockStatement,this.body=v}return x}();e.BlockStatement=o;var u=function(){function x(v){this.type=i.Syntax.BreakStatement,this.label=v}return x}();e.BreakStatement=u;var c=function(){function x(v,A){this.type=i.Syntax.CallExpression,this.callee=v,this.arguments=A}return x}();e.CallExpression=c;var y=function(){function x(v,A){this.type=i.Syntax.CatchClause,this.param=v,this.body=A}return x}();e.CatchClause=y;var S=function(){function x(v){this.type=i.Syntax.ClassBody,this.body=v}return x}();e.ClassBody=S;var D=function(){function x(v,A,M){this.type=i.Syntax.ClassDeclaration,this.id=v,this.superClass=A,this.body=M}return x}();e.ClassDeclaration=D;var E=function(){function x(v,A,M){this.type=i.Syntax.ClassExpression,this.id=v,this.superClass=A,this.body=M}return x}();e.ClassExpression=E;var C=function(){function x(v,A){this.type=i.Syntax.MemberExpression,this.computed=!0,this.object=v,this.property=A}return x}();e.ComputedMemberExpression=C;var T=function(){function x(v,A,M){this.type=i.Syntax.ConditionalExpression,this.test=v,this.consequent=A,this.alternate=M}return x}();e.ConditionalExpression=T;var I=function(){function x(v){this.type=i.Syntax.ContinueStatement,this.label=v}return x}();e.ContinueStatement=I;var O=function(){function x(){this.type=i.Syntax.DebuggerStatement}return x}();e.DebuggerStatement=O;var j=function(){function x(v,A){this.type=i.Syntax.ExpressionStatement,this.expression=v,this.directive=A}return x}();e.Directive=j;var $=function(){function x(v,A){this.type=i.Syntax.DoWhileStatement,this.body=v,this.test=A}return x}();e.DoWhileStatement=$;var z=function(){function x(){this.type=i.Syntax.EmptyStatement}return x}();e.EmptyStatement=z;var Se=function(){function x(v){this.type=i.Syntax.ExportAllDeclaration,this.source=v}return x}();e.ExportAllDeclaration=Se;var $e=function(){function x(v){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=v}return x}();e.ExportDefaultDeclaration=$e;var pr=function(){function x(v,A,M){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=v,this.specifiers=A,this.source=M}return x}();e.ExportNamedDeclaration=pr;var mr=function(){function x(v,A){this.type=i.Syntax.ExportSpecifier,this.exported=A,this.local=v}return x}();e.ExportSpecifier=mr;var q=function(){function x(v){this.type=i.Syntax.ExpressionStatement,this.expression=v}return x}();e.ExpressionStatement=q;var Re=function(){function x(v,A,M){this.type=i.Syntax.ForInStatement,this.left=v,this.right=A,this.body=M,this.each=!1}return x}();e.ForInStatement=Re;var Le=function(){function x(v,A,M){this.type=i.Syntax.ForOfStatement,this.left=v,this.right=A,this.body=M}return x}();e.ForOfStatement=Le;var fe=function(){function x(v,A,M,Z){this.type=i.Syntax.ForStatement,this.init=v,this.test=A,this.update=M,this.body=Z}return x}();e.ForStatement=fe;var qe=function(){function x(v,A,M,Z){this.type=i.Syntax.FunctionDeclaration,this.id=v,this.params=A,this.body=M,this.generator=Z,this.expression=!1,this.async=!1}return x}();e.FunctionDeclaration=qe;var pe=function(){function x(v,A,M,Z){this.type=i.Syntax.FunctionExpression,this.id=v,this.params=A,this.body=M,this.generator=Z,this.expression=!1,this.async=!1}return x}();e.FunctionExpression=pe;var Et=function(){function x(v){this.type=i.Syntax.Identifier,this.name=v}return x}();e.Identifier=Et;var Ct=function(){function x(v,A,M){this.type=i.Syntax.IfStatement,this.test=v,this.consequent=A,this.alternate=M}return x}();e.IfStatement=Ct;var At=function(){function x(v,A){this.type=i.Syntax.ImportDeclaration,this.specifiers=v,this.source=A}return x}();e.ImportDeclaration=At;var ie=function(){function x(v){this.type=i.Syntax.ImportDefaultSpecifier,this.local=v}return x}();e.ImportDefaultSpecifier=ie;var wt=function(){function x(v){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=v}return x}();e.ImportNamespaceSpecifier=wt;var it=function(){function x(v,A){this.type=i.Syntax.ImportSpecifier,this.local=v,this.imported=A}return x}();e.ImportSpecifier=it;var kt=function(){function x(v,A){this.type=i.Syntax.LabeledStatement,this.label=v,this.body=A}return x}();e.LabeledStatement=kt;var Tt=function(){function x(v,A){this.type=i.Syntax.Literal,this.value=v,this.raw=A}return x}();e.Literal=Tt;var Ft=function(){function x(v,A){this.type=i.Syntax.MetaProperty,this.meta=v,this.property=A}return x}();e.MetaProperty=Ft;var nt=function(){function x(v,A,M,Z,Sr){this.type=i.Syntax.MethodDefinition,this.key=v,this.computed=A,this.value=M,this.kind=Z,this.static=Sr}return x}();e.MethodDefinition=nt;var st=function(){function x(v){this.type=i.Syntax.Program,this.body=v,this.sourceType="module"}return x}();e.Module=st;var se=function(){function x(v,A){this.type=i.Syntax.NewExpression,this.callee=v,this.arguments=A}return x}();e.NewExpression=se;var oe=function(){function x(v){this.type=i.Syntax.ObjectExpression,this.properties=v}return x}();e.ObjectExpression=oe;var ne=function(){function x(v){this.type=i.Syntax.ObjectPattern,this.properties=v}return x}();e.ObjectPattern=ne;var gr=function(){function x(v,A,M,Z,Sr,el){this.type=i.Syntax.Property,this.key=A,this.computed=M,this.value=Z,this.kind=v,this.method=Sr,this.shorthand=el}return x}();e.Property=gr;var yr=function(){function x(v,A,M,Z){this.type=i.Syntax.Literal,this.value=v,this.raw=A,this.regex={pattern:M,flags:Z}}return x}();e.RegexLiteral=yr;var Lu=function(){function x(v){this.type=i.Syntax.RestElement,this.argument=v}return x}();e.RestElement=Lu;var Pu=function(){function x(v){this.type=i.Syntax.ReturnStatement,this.argument=v}return x}();e.ReturnStatement=Pu;var Mu=function(){function x(v){this.type=i.Syntax.Program,this.body=v,this.sourceType="script"}return x}();e.Script=Mu;var Nu=function(){function x(v){this.type=i.Syntax.SequenceExpression,this.expressions=v}return x}();e.SequenceExpression=Nu;var Ou=function(){function x(v){this.type=i.Syntax.SpreadElement,this.argument=v}return x}();e.SpreadElement=Ou;var Bu=function(){function x(v,A){this.type=i.Syntax.MemberExpression,this.computed=!1,this.object=v,this.property=A}return x}();e.StaticMemberExpression=Bu;var _u=function(){function x(){this.type=i.Syntax.Super}return x}();e.Super=_u;var Uu=function(){function x(v,A){this.type=i.Syntax.SwitchCase,this.test=v,this.consequent=A}return x}();e.SwitchCase=Uu;var ju=function(){function x(v,A){this.type=i.Syntax.SwitchStatement,this.discriminant=v,this.cases=A}return x}();e.SwitchStatement=ju;var Gu=function(){function x(v,A){this.type=i.Syntax.TaggedTemplateExpression,this.tag=v,this.quasi=A}return x}();e.TaggedTemplateExpression=Gu;var $u=function(){function x(v,A){this.type=i.Syntax.TemplateElement,this.value=v,this.tail=A}return x}();e.TemplateElement=$u;var qu=function(){function x(v,A){this.type=i.Syntax.TemplateLiteral,this.quasis=v,this.expressions=A}return x}();e.TemplateLiteral=qu;var Hu=function(){function x(){this.type=i.Syntax.ThisExpression}return x}();e.ThisExpression=Hu;var Wu=function(){function x(v){this.type=i.Syntax.ThrowStatement,this.argument=v}return x}();e.ThrowStatement=Wu;var zu=function(){function x(v,A,M){this.type=i.Syntax.TryStatement,this.block=v,this.handler=A,this.finalizer=M}return x}();e.TryStatement=zu;var Xu=function(){function x(v,A){this.type=i.Syntax.UnaryExpression,this.operator=v,this.argument=A,this.prefix=!0}return x}();e.UnaryExpression=Xu;var Ju=function(){function x(v,A,M){this.type=i.Syntax.UpdateExpression,this.operator=v,this.argument=A,this.prefix=M}return x}();e.UpdateExpression=Ju;var Vu=function(){function x(v,A){this.type=i.Syntax.VariableDeclaration,this.declarations=v,this.kind=A}return x}();e.VariableDeclaration=Vu;var Ku=function(){function x(v,A){this.type=i.Syntax.VariableDeclarator,this.id=v,this.init=A}return x}();e.VariableDeclarator=Ku;var Yu=function(){function x(v,A){this.type=i.Syntax.WhileStatement,this.test=v,this.body=A}return x}();e.WhileStatement=Yu;var Qu=function(){function x(v,A){this.type=i.Syntax.WithStatement,this.object=v,this.body=A}return x}();e.WithStatement=Qu;var Zu=function(){function x(v,A){this.type=i.Syntax.YieldExpression,this.argument=v,this.delegate=A}return x}();e.YieldExpression=Zu},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(9),n=r(10),l=r(11),a=r(7),f=r(12),p=r(2),m=r(13),h="ArrowParameterPlaceHolder",g=function(){function d(s,o,u){o===void 0&&(o={}),this.config={range:typeof o.range=="boolean"&&o.range,loc:typeof o.loc=="boolean"&&o.loc,source:null,tokens:typeof o.tokens=="boolean"&&o.tokens,comment:typeof o.comment=="boolean"&&o.comment,tolerant:typeof o.tolerant=="boolean"&&o.tolerant},this.config.loc&&o.source&&o.source!==null&&(this.config.source=String(o.source)),this.delegate=u,this.errorHandler=new n.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new f.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 o=[],u=1;u<arguments.length;u++)o[u-1]=arguments[u];var c=Array.prototype.slice.call(arguments,1),y=s.replace(/%(\d)/g,function(C,T){return i.assert(T<c.length,"Message reference must be in range"),c[T]}),S=this.lastMarker.index,D=this.lastMarker.line,E=this.lastMarker.column+1;throw this.errorHandler.createError(S,D,E,y)},d.prototype.tolerateError=function(s){for(var o=[],u=1;u<arguments.length;u++)o[u-1]=arguments[u];var c=Array.prototype.slice.call(arguments,1),y=s.replace(/%(\d)/g,function(C,T){return i.assert(T<c.length,"Message reference must be in range"),c[T]}),S=this.lastMarker.index,D=this.scanner.lineNumber,E=this.lastMarker.column+1;this.errorHandler.tolerateError(S,D,E,y)},d.prototype.unexpectedTokenError=function(s,o){var u=o||l.Messages.UnexpectedToken,c;if(s?(o||(u=s.type===2?l.Messages.UnexpectedEOS:s.type===3?l.Messages.UnexpectedIdentifier:s.type===6?l.Messages.UnexpectedNumber:s.type===8?l.Messages.UnexpectedString:s.type===10?l.Messages.UnexpectedTemplate:l.Messages.UnexpectedToken,s.type===4&&(this.scanner.isFutureReservedWord(s.value)?u=l.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(s.value)&&(u=l.Messages.StrictReservedWord))),c=s.value):c="ILLEGAL",u=u.replace("%0",c),s&&typeof s.lineNumber=="number"){var y=s.start,S=s.lineNumber,D=this.lastMarker.index-this.lastMarker.column,E=s.start-D+1;return this.errorHandler.createError(y,S,E,u)}else{var y=this.lastMarker.index,S=this.lastMarker.line,E=this.lastMarker.column+1;return this.errorHandler.createError(y,S,E,u)}},d.prototype.throwUnexpectedToken=function(s,o){throw this.unexpectedTokenError(s,o)},d.prototype.tolerateUnexpectedToken=function(s,o){this.errorHandler.tolerate(this.unexpectedTokenError(s,o))},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 o=0;o<s.length;++o){var u=s[o],c=void 0;c={type:u.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(u.slice[0],u.slice[1])},this.config.range&&(c.range=u.range),this.config.loc&&(c.loc=u.loc);var y={start:{line:u.loc.start.line,column:u.loc.start.column,offset:u.range[0]},end:{line:u.loc.end.line,column:u.loc.end.column,offset:u.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 o={type:m.TokenName[s.type],value:this.getTokenRaw(s)};if(this.config.range&&(o.range=[s.start,s.end]),this.config.loc&&(o.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 u=s.pattern,c=s.flags;o.regex={pattern:u,flags:c}}return o},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 o=this.scanner.lex();return this.hasLineTerminator=s.lineNumber!==o.lineNumber,o&&this.context.strict&&o.type===3&&this.scanner.isStrictModeReservedWord(o.value)&&(o.type=4),this.lookahead=o,this.config.tokens&&o.type!==2&&this.tokens.push(this.convertToken(o)),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,o){o===void 0&&(o=0);var u=s.start-s.lineStart,c=s.lineNumber;return u<0&&(u+=o,c--),{index:s.start,line:c,column:u}},d.prototype.finalize=function(s,o){if(this.config.range&&(o.range=[s.index,this.lastMarker.index]),this.config.loc&&(o.loc={start:{line:s.line,column:s.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(o.loc.source=this.config.source)),this.delegate){var u={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(o,u)}return o},d.prototype.expect=function(s){var o=this.nextToken();(o.type!==7||o.value!==s)&&this.throwUnexpectedToken(o)},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,l.Messages.UnexpectedToken)}else this.expect(",")},d.prototype.expectKeyword=function(s){var o=this.nextToken();(o.type!==4||o.value!==s)&&this.throwUnexpectedToken(o)},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 o=this.context.isBindingElement,u=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=o,this.context.isAssignmentTarget=u,this.context.firstCoverInitializedNameError=c,y},d.prototype.inheritCoverGrammar=function(s){var o=this.context.isBindingElement,u=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&&o,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&u,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(),o,u,c;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&this.lookahead.value==="await"&&this.tolerateUnexpectedToken(this.lookahead),o=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(s,new a.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,l.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,u=this.nextToken(),c=this.getTokenRaw(u),o=this.finalize(s,new a.Literal(u.value,c));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,u=this.nextToken(),c=this.getTokenRaw(u),o=this.finalize(s,new a.Literal(u.value==="true",c));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,u=this.nextToken(),c=this.getTokenRaw(u),o=this.finalize(s,new a.Literal(null,c));break;case 10:o=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,o=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":o=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":o=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,u=this.nextRegexToken(),c=this.getTokenRaw(u),o=this.finalize(s,new a.RegexLiteral(u.regex,c,u.pattern,u.flags));break;default:o=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?o=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?o=this.finalize(s,new a.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?o=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),o=this.finalize(s,new a.ThisExpression)):this.matchKeyword("class")?o=this.parseClassExpression():o=this.throwUnexpectedToken(this.nextToken()));break;default:o=this.throwUnexpectedToken(this.nextToken())}return o},d.prototype.parseSpreadElement=function(){var s=this.createNode();this.expect("...");var o=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(s,new a.SpreadElement(o))},d.prototype.parseArrayInitializer=function(){var s=this.createNode(),o=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),o.push(null);else if(this.match("...")){var u=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),o.push(u)}else o.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(s,new a.ArrayExpression(o))},d.prototype.parsePropertyMethod=function(s){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var o=this.context.strict,u=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=o,this.context.allowStrictDirective=u,c},d.prototype.parsePropertyMethodFunction=function(){var s=!1,o=this.createNode(),u=this.context.allowYield;this.context.allowYield=!0;var c=this.parseFormalParameters(),y=this.parsePropertyMethod(c);return this.context.allowYield=u,this.finalize(o,new a.FunctionExpression(null,c.params,y,s))},d.prototype.parsePropertyMethodAsyncFunction=function(){var s=this.createNode(),o=this.context.allowYield,u=this.context.await;this.context.allowYield=!1,this.context.await=!0;var c=this.parseFormalParameters(),y=this.parsePropertyMethod(c);return this.context.allowYield=o,this.context.await=u,this.finalize(s,new a.AsyncFunctionExpression(null,c.params,y))},d.prototype.parseObjectPropertyKey=function(){var s=this.createNode(),o=this.nextToken(),u;switch(o.type){case 8:case 6:this.context.strict&&o.octal&&this.tolerateUnexpectedToken(o,l.Messages.StrictOctalLiteral);var c=this.getTokenRaw(o);u=this.finalize(s,new a.Literal(o.value,c));break;case 3:case 1:case 5:case 4:u=this.finalize(s,new a.Identifier(o.value));break;case 7:o.value==="["?(u=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):u=this.throwUnexpectedToken(o);break;default:u=this.throwUnexpectedToken(o)}return u},d.prototype.isPropertyKey=function(s,o){return s.type===p.Syntax.Identifier&&s.name===o||s.type===p.Syntax.Literal&&s.value===o},d.prototype.parseObjectProperty=function(s){var o=this.createNode(),u=this.lookahead,c,y=null,S=null,D=!1,E=!1,C=!1,T=!1;if(u.type===3){var I=u.value;this.nextToken(),D=this.match("["),T=!this.hasLineTerminator&&I==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(","),y=T?this.parseObjectPropertyKey():this.finalize(o,new a.Identifier(I))}else this.match("*")?this.nextToken():(D=this.match("["),y=this.parseObjectPropertyKey());var O=this.qualifiedPropertyName(this.lookahead);if(u.type===3&&!T&&u.value==="get"&&O)c="get",D=this.match("["),y=this.parseObjectPropertyKey(),this.context.allowYield=!1,S=this.parseGetterMethod();else if(u.type===3&&!T&&u.value==="set"&&O)c="set",D=this.match("["),y=this.parseObjectPropertyKey(),S=this.parseSetterMethod();else if(u.type===7&&u.value==="*"&&O)c="init",D=this.match("["),y=this.parseObjectPropertyKey(),S=this.parseGeneratorMethod(),E=!0;else if(y||this.throwUnexpectedToken(this.lookahead),c="init",this.match(":")&&!T)!D&&this.isPropertyKey(y,"__proto__")&&(s.value&&this.tolerateError(l.Messages.DuplicateProtoProperty),s.value=!0),this.nextToken(),S=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))S=T?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),E=!0;else if(u.type===3){var I=this.finalize(o,new a.Identifier(u.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),C=!0;var j=this.isolateCoverGrammar(this.parseAssignmentExpression);S=this.finalize(o,new a.AssignmentPattern(I,j))}else C=!0,S=I}else this.throwUnexpectedToken(this.nextToken());return this.finalize(o,new a.Property(c,y,D,S,E,C))},d.prototype.parseObjectInitializer=function(){var s=this.createNode();this.expect("{");for(var o=[],u={value:!1};!this.match("}");)o.push(this.parseObjectProperty(u)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(s,new a.ObjectExpression(o))},d.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var s=this.createNode(),o=this.nextToken(),u=o.value,c=o.cooked;return this.finalize(s,new a.TemplateElement({raw:u,cooked:c},o.tail))},d.prototype.parseTemplateElement=function(){this.lookahead.type!==10&&this.throwUnexpectedToken();var s=this.createNode(),o=this.nextToken(),u=o.value,c=o.cooked;return this.finalize(s,new a.TemplateElement({raw:u,cooked:c},o.tail))},d.prototype.parseTemplateLiteral=function(){var s=this.createNode(),o=[],u=[],c=this.parseTemplateHead();for(u.push(c);!c.tail;)o.push(this.parseExpression()),c=this.parseTemplateElement(),u.push(c);return this.finalize(s,new a.TemplateLiteral(u,o))},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 o=0;o<s.elements.length;o++)s.elements[o]!==null&&this.reinterpretExpressionAsPattern(s.elements[o]);break;case p.Syntax.ObjectExpression:s.type=p.Syntax.ObjectPattern;for(var o=0;o<s.properties.length;o++)this.reinterpretExpressionAsPattern(s.properties[o].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:h,params:[],async:!1};else{var o=this.lookahead,u=[];if(this.match("..."))s=this.parseRestElement(u),this.expect(")"),this.match("=>")||this.expect("=>"),s={type:h,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:h,params:y,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),y.push(this.parseRestElement(u)),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:h,params:y,async:!1}}else y.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(c)break}c||(s=this.finalize(this.startNode(o),new a.SequenceExpression(y)))}if(!c){if(this.expect(")"),this.match("=>")&&(s.type===p.Syntax.Identifier&&s.name==="yield"&&(c=!0,s={type:h,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 D=s.type===p.Syntax.SequenceExpression?s.expressions:[s];s={type:h,params:D,async:!1}}this.context.isBindingElement=!1}}}return s},d.prototype.parseArguments=function(){this.expect("(");var s=[];if(!this.match(")"))for(;;){var o=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(s.push(o),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(),o=this.nextToken();return this.isIdentifierName(o)||this.throwUnexpectedToken(o),this.finalize(s,new a.Identifier(o.value))},d.prototype.parseNewExpression=function(){var s=this.createNode(),o=this.parseIdentifierName();i.assert(o.name==="new","New expression must start with `new`");var u;if(this.match("."))if(this.nextToken(),this.lookahead.type===3&&this.context.inFunctionBody&&this.lookahead.value==="target"){var c=this.parseIdentifierName();u=new a.MetaProperty(o,c)}else this.throwUnexpectedToken(this.lookahead);else{var y=this.isolateCoverGrammar(this.parseLeftHandSideExpression),S=this.match("(")?this.parseArguments():[];u=new a.NewExpression(y,S),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(s,u)},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 o=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(s.push(o),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),s},d.prototype.parseLeftHandSideExpressionAllowCall=function(){var s=this.lookahead,o=this.matchContextualKeyword("async"),u=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 a.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 a.StaticMemberExpression(c,y))}else if(this.match("(")){var S=o&&s.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var D=S?this.parseAsyncArguments():this.parseArguments();if(c=this.finalize(this.startNode(s),new a.CallExpression(c,D)),S&&this.match("=>")){for(var E=0;E<D.length;++E)this.reinterpretExpressionAsPattern(D[E]);c={type:h,params:D,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 a.ComputedMemberExpression(c,y))}else if(this.lookahead.type===10&&this.lookahead.head){var C=this.parseTemplateLiteral();c=this.finalize(this.startNode(s),new a.TaggedTemplateExpression(c,C))}else break;return this.context.allowIn=u,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 a.Super)},d.prototype.parseLeftHandSideExpression=function(){i.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var s=this.startNode(this.lookahead),o=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 u=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),o=this.finalize(s,new a.ComputedMemberExpression(o,u))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var u=this.parseIdentifierName();o=this.finalize(s,new a.StaticMemberExpression(o,u))}else if(this.lookahead.type===10&&this.lookahead.head){var c=this.parseTemplateLiteral();o=this.finalize(s,new a.TaggedTemplateExpression(o,c))}else break;return o},d.prototype.parseUpdateExpression=function(){var s,o=this.lookahead;if(this.match("++")||this.match("--")){var u=this.startNode(o),c=this.nextToken();s=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&s.type===p.Syntax.Identifier&&this.scanner.isRestrictedWord(s.name)&&this.tolerateError(l.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(l.Messages.InvalidLHSInAssignment);var y=!0;s=this.finalize(u,new a.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(l.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(l.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var S=this.nextToken().value,y=!1;s=this.finalize(this.startNode(o),new a.UpdateExpression(S,s,y))}return s},d.prototype.parseAwaitExpression=function(){var s=this.createNode();this.nextToken();var o=this.parseUnaryExpression();return this.finalize(s,new a.AwaitExpression(o))},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 o=this.startNode(this.lookahead),u=this.nextToken();s=this.inheritCoverGrammar(this.parseUnaryExpression),s=this.finalize(o,new a.UnaryExpression(u.value,s)),this.context.strict&&s.operator==="delete"&&s.argument.type===p.Syntax.Identifier&&this.tolerateError(l.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,o=this.inheritCoverGrammar(this.parseUnaryExpression);if(o.type!==p.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var u=o,c=this.isolateCoverGrammar(this.parseExponentiationExpression);o=this.finalize(this.startNode(s),new a.BinaryExpression("**",u,c))}return o},d.prototype.binaryPrecedence=function(s){var o=s.value,u;return s.type===7?u=this.operatorPrecedence[o]||0:s.type===4?u=o==="instanceof"||this.context.allowIn&&o==="in"?7:0:u=0,u},d.prototype.parseBinaryExpression=function(){var s=this.lookahead,o=this.inheritCoverGrammar(this.parseExponentiationExpression),u=this.lookahead,c=this.binaryPrecedence(u);if(c>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var y=[s,this.lookahead],S=o,D=this.isolateCoverGrammar(this.parseExponentiationExpression),E=[S,u.value,D],C=[c];c=this.binaryPrecedence(this.lookahead),!(c<=0);){for(;E.length>2&&c<=C[C.length-1];){D=E.pop();var T=E.pop();C.pop(),S=E.pop(),y.pop();var I=this.startNode(y[y.length-1]);E.push(this.finalize(I,new a.BinaryExpression(T,S,D)))}E.push(this.nextToken().value),C.push(c),y.push(this.lookahead),E.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var O=E.length-1;o=E[O];for(var j=y.pop();O>1;){var $=y.pop(),z=j&&j.lineStart,I=this.startNode($,z),T=E[O-1];o=this.finalize(I,new a.BinaryExpression(T,E[O-2],o)),O-=2,j=$}}return o},d.prototype.parseConditionalExpression=function(){var s=this.lookahead,o=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var u=this.context.allowIn;this.context.allowIn=!0;var c=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=u,this.expect(":");var y=this.isolateCoverGrammar(this.parseAssignmentExpression);o=this.finalize(this.startNode(s),new a.ConditionalExpression(o,c,y)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return o},d.prototype.checkPatternParam=function(s,o){switch(o.type){case p.Syntax.Identifier:this.validateParam(s,o,o.name);break;case p.Syntax.RestElement:this.checkPatternParam(s,o.argument);break;case p.Syntax.AssignmentPattern:this.checkPatternParam(s,o.left);break;case p.Syntax.ArrayPattern:for(var u=0;u<o.elements.length;u++)o.elements[u]!==null&&this.checkPatternParam(s,o.elements[u]);break;case p.Syntax.ObjectPattern:for(var u=0;u<o.properties.length;u++)this.checkPatternParam(s,o.properties[u].value);break;default:break}s.simple=s.simple&&o instanceof a.Identifier},d.prototype.reinterpretAsCoverFormalsList=function(s){var o=[s],u,c=!1;switch(s.type){case p.Syntax.Identifier:break;case h:o=s.params,c=s.async;break;default:return null}u={simple:!0,paramSet:{}};for(var y=0;y<o.length;++y){var S=o[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(u,S),o[y]=S}if(this.context.strict||!this.context.allowYield)for(var y=0;y<o.length;++y){var S=o[y];S.type===p.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(u.message===l.Messages.StrictParamDupe){var D=this.context.strict?u.stricted:u.firstRestricted;this.throwUnexpectedToken(D,u.message)}return{simple:u.simple,params:o,stricted:u.stricted,firstRestricted:u.firstRestricted,message:u.message}},d.prototype.parseAssignmentExpression=function(){var s;if(!this.context.allowYield&&this.matchKeyword("yield"))s=this.parseYieldExpression();else{var o=this.lookahead,u=o;if(s=this.parseConditionalExpression(),u.type===3&&u.lineNumber===this.lookahead.lineNumber&&u.value==="async"&&(this.lookahead.type===3||this.matchKeyword("yield"))){var c=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(c),s={type:h,params:[c],async:!0}}if(s.type===h||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 D=this.context.strict,E=this.context.allowStrictDirective;this.context.allowStrictDirective=S.simple;var C=this.context.allowYield,T=this.context.await;this.context.allowYield=!0,this.context.await=y;var I=this.startNode(o);this.expect("=>");var O=void 0;if(this.match("{")){var j=this.context.allowIn;this.context.allowIn=!0,O=this.parseFunctionSourceElements(),this.context.allowIn=j}else O=this.isolateCoverGrammar(this.parseAssignmentExpression);var $=O.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(I,new a.AsyncArrowFunctionExpression(S.params,O,$)):this.finalize(I,new a.ArrowFunctionExpression(S.params,O,$)),this.context.strict=D,this.context.allowStrictDirective=E,this.context.allowYield=C,this.context.await=T}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(l.Messages.InvalidLHSInAssignment),this.context.strict&&s.type===p.Syntax.Identifier){var z=s;this.scanner.isRestrictedWord(z.name)&&this.tolerateUnexpectedToken(u,l.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(z.name)&&this.tolerateUnexpectedToken(u,l.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(s):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),u=this.nextToken();var Se=u.value,$e=this.isolateCoverGrammar(this.parseAssignmentExpression);s=this.finalize(this.startNode(o),new a.AssignmentExpression(Se,s,$e)),this.context.firstCoverInitializedNameError=null}}return s},d.prototype.parseExpression=function(){var s=this.lookahead,o=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var u=[];for(u.push(o);this.lookahead.type!==2&&this.match(",");)this.nextToken(),u.push(this.isolateCoverGrammar(this.parseAssignmentExpression));o=this.finalize(this.startNode(s),new a.SequenceExpression(u))}return o},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,l.Messages.IllegalExportDeclaration),s=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,l.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 o=[];!this.match("}");)o.push(this.parseStatementListItem());return this.expect("}"),this.finalize(s,new a.BlockStatement(o))},d.prototype.parseLexicalBinding=function(s,o){var u=this.createNode(),c=[],y=this.parsePattern(c,s);this.context.strict&&y.type===p.Syntax.Identifier&&this.scanner.isRestrictedWord(y.name)&&this.tolerateError(l.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(l.Messages.DeclarationMissingInitializer,"const")):(!o.inFor&&y.type!==p.Syntax.Identifier||this.match("="))&&(this.expect("="),S=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(u,new a.VariableDeclarator(y,S))},d.prototype.parseBindingList=function(s,o){for(var u=[this.parseLexicalBinding(s,o)];this.match(",");)this.nextToken(),u.push(this.parseLexicalBinding(s,o));return u},d.prototype.isLexicalDeclaration=function(){var s=this.scanner.saveState();this.scanner.scanComments();var o=this.scanner.lex();return this.scanner.restoreState(s),o.type===3||o.type===7&&o.value==="["||o.type===7&&o.value==="{"||o.type===4&&o.value==="let"||o.type===4&&o.value==="yield"},d.prototype.parseLexicalDeclaration=function(s){var o=this.createNode(),u=this.nextToken().value;i.assert(u==="let"||u==="const","Lexical declaration must be either let or const");var c=this.parseBindingList(u,s);return this.consumeSemicolon(),this.finalize(o,new a.VariableDeclaration(c,u))},d.prototype.parseBindingRestElement=function(s,o){var u=this.createNode();this.expect("...");var c=this.parsePattern(s,o);return this.finalize(u,new a.RestElement(c))},d.prototype.parseArrayPattern=function(s,o){var u=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,o));break}else c.push(this.parsePatternWithDefault(s,o));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(u,new a.ArrayPattern(c))},d.prototype.parsePropertyPattern=function(s,o){var u=this.createNode(),c=!1,y=!1,S=!1,D,E;if(this.lookahead.type===3){var C=this.lookahead;D=this.parseVariableIdentifier();var T=this.finalize(u,new a.Identifier(C.value));if(this.match("=")){s.push(C),y=!0,this.nextToken();var I=this.parseAssignmentExpression();E=this.finalize(this.startNode(C),new a.AssignmentPattern(T,I))}else this.match(":")?(this.expect(":"),E=this.parsePatternWithDefault(s,o)):(s.push(C),y=!0,E=T)}else c=this.match("["),D=this.parseObjectPropertyKey(),this.expect(":"),E=this.parsePatternWithDefault(s,o);return this.finalize(u,new a.Property("init",D,c,E,S,y))},d.prototype.parseObjectPattern=function(s,o){var u=this.createNode(),c=[];for(this.expect("{");!this.match("}");)c.push(this.parsePropertyPattern(s,o)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(u,new a.ObjectPattern(c))},d.prototype.parsePattern=function(s,o){var u;return this.match("[")?u=this.parseArrayPattern(s,o):this.match("{")?u=this.parseObjectPattern(s,o):(this.matchKeyword("let")&&(o==="const"||o==="let")&&this.tolerateUnexpectedToken(this.lookahead,l.Messages.LetInLexicalBinding),s.push(this.lookahead),u=this.parseVariableIdentifier(o)),u},d.prototype.parsePatternWithDefault=function(s,o){var u=this.lookahead,c=this.parsePattern(s,o);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(u),new a.AssignmentPattern(c,S))}return c},d.prototype.parseVariableIdentifier=function(s){var o=this.createNode(),u=this.nextToken();return u.type===4&&u.value==="yield"?this.context.strict?this.tolerateUnexpectedToken(u,l.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(u):u.type!==3?this.context.strict&&u.type===4&&this.scanner.isStrictModeReservedWord(u.value)?this.tolerateUnexpectedToken(u,l.Messages.StrictReservedWord):(this.context.strict||u.value!=="let"||s!=="var")&&this.throwUnexpectedToken(u):(this.context.isModule||this.context.await)&&u.type===3&&u.value==="await"&&this.tolerateUnexpectedToken(u),this.finalize(o,new a.Identifier(u.value))},d.prototype.parseVariableDeclaration=function(s){var o=this.createNode(),u=[],c=this.parsePattern(u,"var");this.context.strict&&c.type===p.Syntax.Identifier&&this.scanner.isRestrictedWord(c.name)&&this.tolerateError(l.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(o,new a.VariableDeclarator(c,y))},d.prototype.parseVariableDeclarationList=function(s){var o={inFor:s.inFor},u=[];for(u.push(this.parseVariableDeclaration(o));this.match(",");)this.nextToken(),u.push(this.parseVariableDeclaration(o));return u},d.prototype.parseVariableStatement=function(){var s=this.createNode();this.expectKeyword("var");var o=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(s,new a.VariableDeclaration(o,"var"))},d.prototype.parseEmptyStatement=function(){var s=this.createNode();return this.expect(";"),this.finalize(s,new a.EmptyStatement)},d.prototype.parseExpressionStatement=function(){var s=this.createNode(),o=this.parseExpression();return this.consumeSemicolon(),this.finalize(s,new a.ExpressionStatement(o))},d.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(l.Messages.StrictFunction),this.parseStatement()},d.prototype.parseIfStatement=function(){var s=this.createNode(),o,u=null;this.expectKeyword("if"),this.expect("(");var c=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),o=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),o=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),u=this.parseIfClause())),this.finalize(s,new a.IfStatement(c,o,u))},d.prototype.parseDoWhileStatement=function(){var s=this.createNode();this.expectKeyword("do");var o=this.context.inIteration;this.context.inIteration=!0;var u=this.parseStatement();this.context.inIteration=o,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 a.DoWhileStatement(u,c))},d.prototype.parseWhileStatement=function(){var s=this.createNode(),o;this.expectKeyword("while"),this.expect("(");var u=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),o=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var c=this.context.inIteration;this.context.inIteration=!0,o=this.parseStatement(),this.context.inIteration=c}return this.finalize(s,new a.WhileStatement(u,o))},d.prototype.parseForStatement=function(){var s=null,o=null,u=null,c=!0,y,S,D=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){s=this.createNode(),this.nextToken();var E=this.context.allowIn;this.context.allowIn=!1;var C=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=E,C.length===1&&this.matchKeyword("in")){var T=C[0];T.init&&(T.id.type===p.Syntax.ArrayPattern||T.id.type===p.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(l.Messages.ForInOfLoopInitializer,"for-in"),s=this.finalize(s,new a.VariableDeclaration(C,"var")),this.nextToken(),y=s,S=this.parseExpression(),s=null}else C.length===1&&C[0].init===null&&this.matchContextualKeyword("of")?(s=this.finalize(s,new a.VariableDeclaration(C,"var")),this.nextToken(),y=s,S=this.parseAssignmentExpression(),s=null,c=!1):(s=this.finalize(s,new a.VariableDeclaration(C,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){s=this.createNode();var I=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in")s=this.finalize(s,new a.Identifier(I)),this.nextToken(),y=s,S=this.parseExpression(),s=null;else{var E=this.context.allowIn;this.context.allowIn=!1;var C=this.parseBindingList(I,{inFor:!0});this.context.allowIn=E,C.length===1&&C[0].init===null&&this.matchKeyword("in")?(s=this.finalize(s,new a.VariableDeclaration(C,I)),this.nextToken(),y=s,S=this.parseExpression(),s=null):C.length===1&&C[0].init===null&&this.matchContextualKeyword("of")?(s=this.finalize(s,new a.VariableDeclaration(C,I)),this.nextToken(),y=s,S=this.parseAssignmentExpression(),s=null,c=!1):(this.consumeSemicolon(),s=this.finalize(s,new a.VariableDeclaration(C,I)))}}else{var O=this.lookahead,E=this.context.allowIn;if(this.context.allowIn=!1,s=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=E,this.matchKeyword("in"))(!this.context.isAssignmentTarget||s.type===p.Syntax.AssignmentExpression)&&this.tolerateError(l.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(l.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(s),y=s,S=this.parseAssignmentExpression(),s=null,c=!1;else{if(this.match(",")){for(var j=[s];this.match(",");)this.nextToken(),j.push(this.isolateCoverGrammar(this.parseAssignmentExpression));s=this.finalize(this.startNode(O),new a.SequenceExpression(j))}this.expect(";")}}typeof y>"u"&&(this.match(";")||(o=this.parseExpression()),this.expect(";"),this.match(")")||(u=this.parseExpression()));var $;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),$=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var z=this.context.inIteration;this.context.inIteration=!0,$=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=z}return typeof y>"u"?this.finalize(D,new a.ForStatement(s,o,u,$)):c?this.finalize(D,new a.ForInStatement(y,S,$)):this.finalize(D,new a.ForOfStatement(y,S,$))},d.prototype.parseContinueStatement=function(){var s=this.createNode();this.expectKeyword("continue");var o=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var u=this.parseVariableIdentifier();o=u;var c="$"+u.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,c)||this.throwError(l.Messages.UnknownLabel,u.name)}return this.consumeSemicolon(),o===null&&!this.context.inIteration&&this.throwError(l.Messages.IllegalContinue),this.finalize(s,new a.ContinueStatement(o))},d.prototype.parseBreakStatement=function(){var s=this.createNode();this.expectKeyword("break");var o=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var u=this.parseVariableIdentifier(),c="$"+u.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,c)||this.throwError(l.Messages.UnknownLabel,u.name),o=u}return this.consumeSemicolon(),o===null&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(l.Messages.IllegalBreak),this.finalize(s,new a.BreakStatement(o))},d.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(l.Messages.IllegalReturn);var s=this.createNode();this.expectKeyword("return");var o=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10,u=o?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(s,new a.ReturnStatement(u))},d.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(l.Messages.StrictModeWith);var s=this.createNode(),o;this.expectKeyword("with"),this.expect("(");var u=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),o=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),o=this.parseStatement()),this.finalize(s,new a.WithStatement(u,o))},d.prototype.parseSwitchCase=function(){var s=this.createNode(),o;this.matchKeyword("default")?(this.nextToken(),o=null):(this.expectKeyword("case"),o=this.parseExpression()),this.expect(":");for(var u=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)u.push(this.parseStatementListItem());return this.finalize(s,new a.SwitchCase(o,u))},d.prototype.parseSwitchStatement=function(){var s=this.createNode();this.expectKeyword("switch"),this.expect("(");var o=this.parseExpression();this.expect(")");var u=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(l.Messages.MultipleDefaultsInSwitch),y=!0),c.push(S)}return this.expect("}"),this.context.inSwitch=u,this.finalize(s,new a.SwitchStatement(o,c))},d.prototype.parseLabelledStatement=function(){var s=this.createNode(),o=this.parseExpression(),u;if(o.type===p.Syntax.Identifier&&this.match(":")){this.nextToken();var c=o,y="$"+c.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,y)&&this.throwError(l.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 D=this.lookahead,E=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(D,l.Messages.StrictFunction):E.generator&&this.tolerateUnexpectedToken(D,l.Messages.GeneratorInLegacyContext),S=E}else S=this.parseStatement();delete this.context.labelSet[y],u=new a.LabeledStatement(c,S)}else this.consumeSemicolon(),u=new a.ExpressionStatement(o);return this.finalize(s,u)},d.prototype.parseThrowStatement=function(){var s=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(l.Messages.NewlineAfterThrow);var o=this.parseExpression();return this.consumeSemicolon(),this.finalize(s,new a.ThrowStatement(o))},d.prototype.parseCatchClause=function(){var s=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var o=[],u=this.parsePattern(o),c={},y=0;y<o.length;y++){var S="$"+o[y].value;Object.prototype.hasOwnProperty.call(c,S)&&this.tolerateError(l.Messages.DuplicateBinding,o[y].value),c[S]=!0}this.context.strict&&u.type===p.Syntax.Identifier&&this.scanner.isRestrictedWord(u.name)&&this.tolerateError(l.Messages.StrictCatchVariable),this.expect(")");var D=this.parseBlock();return this.finalize(s,new a.CatchClause(u,D))},d.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},d.prototype.parseTryStatement=function(){var s=this.createNode();this.expectKeyword("try");var o=this.parseBlock(),u=this.matchKeyword("catch")?this.parseCatchClause():null,c=this.matchKeyword("finally")?this.parseFinallyClause():null;return!u&&!c&&this.throwError(l.Messages.NoCatchOrFinally),this.finalize(s,new a.TryStatement(o,u,c))},d.prototype.parseDebuggerStatement=function(){var s=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(s,new a.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 o=this.lookahead.value;o==="{"?s=this.parseBlock():o==="("?s=this.parseExpressionStatement():o===";"?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 o=this.parseDirectivePrologues(),u=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("}");)o.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=u,this.context.inIteration=c,this.context.inSwitch=y,this.context.inFunctionBody=S,this.finalize(s,new a.BlockStatement(o))},d.prototype.validateParam=function(s,o,u){var c="$"+u;this.context.strict?(this.scanner.isRestrictedWord(u)&&(s.stricted=o,s.message=l.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(s.paramSet,c)&&(s.stricted=o,s.message=l.Messages.StrictParamDupe)):s.firstRestricted||(this.scanner.isRestrictedWord(u)?(s.firstRestricted=o,s.message=l.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(u)?(s.firstRestricted=o,s.message=l.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(s.paramSet,c)&&(s.stricted=o,s.message=l.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 o=this.createNode();this.expect("...");var u=this.parsePattern(s);return this.match("=")&&this.throwError(l.Messages.DefaultRestParameter),this.match(")")||this.throwError(l.Messages.ParameterAfterRestParameter),this.finalize(o,new a.RestElement(u))},d.prototype.parseFormalParameter=function(s){for(var o=[],u=this.match("...")?this.parseRestElement(o):this.parsePatternWithDefault(o),c=0;c<o.length;c++)this.validateParam(s,o[c],o[c].value);s.simple=s.simple&&u instanceof a.Identifier,s.params.push(u)},d.prototype.parseFormalParameters=function(s){var o;if(o={simple:!0,params:[],firstRestricted:s},this.expect("("),!this.match(")"))for(o.paramSet={};this.lookahead.type!==2&&(this.parseFormalParameter(o),!(this.match(")")||(this.expect(","),this.match(")")))););return this.expect(")"),{simple:o.simple,params:o.params,stricted:o.stricted,firstRestricted:o.firstRestricted,message:o.message}},d.prototype.matchAsyncFunction=function(){var s=this.matchContextualKeyword("async");if(s){var o=this.scanner.saveState();this.scanner.scanComments();var u=this.scanner.lex();this.scanner.restoreState(o),s=o.lineNumber===u.lineNumber&&u.type===4&&u.value==="function"}return s},d.prototype.parseFunctionDeclaration=function(s){var o=this.createNode(),u=this.matchContextualKeyword("async");u&&this.nextToken(),this.expectKeyword("function");var c=u?!1:this.match("*");c&&this.nextToken();var y,S=null,D=null;if(!s||!this.match("(")){var E=this.lookahead;S=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(E.value)&&this.tolerateUnexpectedToken(E,l.Messages.StrictFunctionName):this.scanner.isRestrictedWord(E.value)?(D=E,y=l.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(E.value)&&(D=E,y=l.Messages.StrictReservedWord)}var C=this.context.await,T=this.context.allowYield;this.context.await=u,this.context.allowYield=!c;var I=this.parseFormalParameters(D),O=I.params,j=I.stricted;D=I.firstRestricted,I.message&&(y=I.message);var $=this.context.strict,z=this.context.allowStrictDirective;this.context.allowStrictDirective=I.simple;var Se=this.parseFunctionSourceElements();return this.context.strict&&D&&this.throwUnexpectedToken(D,y),this.context.strict&&j&&this.tolerateUnexpectedToken(j,y),this.context.strict=$,this.context.allowStrictDirective=z,this.context.await=C,this.context.allowYield=T,u?this.finalize(o,new a.AsyncFunctionDeclaration(S,O,Se)):this.finalize(o,new a.FunctionDeclaration(S,O,Se,c))},d.prototype.parseFunctionExpression=function(){var s=this.createNode(),o=this.matchContextualKeyword("async");o&&this.nextToken(),this.expectKeyword("function");var u=o?!1:this.match("*");u&&this.nextToken();var c,y=null,S,D=this.context.await,E=this.context.allowYield;if(this.context.await=o,this.context.allowYield=!u,!this.match("(")){var C=this.lookahead;y=!this.context.strict&&!u&&this.matchKeyword("yield")?this.parseIdentifierName():this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(C.value)&&this.tolerateUnexpectedToken(C,l.Messages.StrictFunctionName):this.scanner.isRestrictedWord(C.value)?(S=C,c=l.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(C.value)&&(S=C,c=l.Messages.StrictReservedWord)}var T=this.parseFormalParameters(S),I=T.params,O=T.stricted;S=T.firstRestricted,T.message&&(c=T.message);var j=this.context.strict,$=this.context.allowStrictDirective;this.context.allowStrictDirective=T.simple;var z=this.parseFunctionSourceElements();return this.context.strict&&S&&this.throwUnexpectedToken(S,c),this.context.strict&&O&&this.tolerateUnexpectedToken(O,c),this.context.strict=j,this.context.allowStrictDirective=$,this.context.await=D,this.context.allowYield=E,o?this.finalize(s,new a.AsyncFunctionExpression(y,I,z)):this.finalize(s,new a.FunctionExpression(y,I,z,u))},d.prototype.parseDirective=function(){var s=this.lookahead,o=this.createNode(),u=this.parseExpression(),c=u.type===p.Syntax.Literal?this.getTokenRaw(s).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(o,c?new a.Directive(u,c):new a.ExpressionStatement(u))},d.prototype.parseDirectivePrologues=function(){for(var s=null,o=[];;){var u=this.lookahead;if(u.type!==8)break;var c=this.parseDirective();o.push(c);var y=c.directive;if(typeof y!="string")break;y==="use strict"?(this.context.strict=!0,s&&this.tolerateUnexpectedToken(s,l.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(u,l.Messages.IllegalLanguageModeDirective)):!s&&u.octal&&(s=u)}return o},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(),o=!1,u=this.context.allowYield;this.context.allowYield=!o;var c=this.parseFormalParameters();c.params.length>0&&this.tolerateError(l.Messages.BadGetterArity);var y=this.parsePropertyMethod(c);return this.context.allowYield=u,this.finalize(s,new a.FunctionExpression(null,c.params,y,o))},d.prototype.parseSetterMethod=function(){var s=this.createNode(),o=!1,u=this.context.allowYield;this.context.allowYield=!o;var c=this.parseFormalParameters();c.params.length!==1?this.tolerateError(l.Messages.BadSetterArity):c.params[0]instanceof a.RestElement&&this.tolerateError(l.Messages.BadSetterRestParameter);var y=this.parsePropertyMethod(c);return this.context.allowYield=u,this.finalize(s,new a.FunctionExpression(null,c.params,y,o))},d.prototype.parseGeneratorMethod=function(){var s=this.createNode(),o=!0,u=this.context.allowYield;this.context.allowYield=!0;var c=this.parseFormalParameters();this.context.allowYield=!1;var y=this.parsePropertyMethod(c);return this.context.allowYield=u,this.finalize(s,new a.FunctionExpression(null,c.params,y,o))},d.prototype.isStartOfExpression=function(){var s=!0,o=this.lookahead.value;switch(this.lookahead.type){case 7:s=o==="["||o==="("||o==="{"||o==="+"||o==="-"||o==="!"||o==="~"||o==="++"||o==="--"||o==="/"||o==="/=";break;case 4:s=o==="class"||o==="delete"||o==="function"||o==="let"||o==="new"||o==="super"||o==="this"||o==="typeof"||o==="void"||o==="yield";break;default:break}return s},d.prototype.parseYieldExpression=function(){var s=this.createNode();this.expectKeyword("yield");var o=null,u=!1;if(!this.hasLineTerminator){var c=this.context.allowYield;this.context.allowYield=!1,u=this.match("*"),u?(this.nextToken(),o=this.parseAssignmentExpression()):this.isStartOfExpression()&&(o=this.parseAssignmentExpression()),this.context.allowYield=c}return this.finalize(s,new a.YieldExpression(o,u))},d.prototype.parseClassElement=function(s){var o=this.lookahead,u=this.createNode(),c="",y=null,S=null,D=!1,E=!1,C=!1,T=!1;if(this.match("*"))this.nextToken();else{D=this.match("["),y=this.parseObjectPropertyKey();var I=y;if(I.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(o=this.lookahead,C=!0,D=this.match("["),this.match("*")?this.nextToken():y=this.parseObjectPropertyKey()),o.type===3&&!this.hasLineTerminator&&o.value==="async"){var O=this.lookahead.value;O!==":"&&O!=="("&&O!=="*"&&(T=!0,o=this.lookahead,y=this.parseObjectPropertyKey(),o.type===3&&o.value==="constructor"&&this.tolerateUnexpectedToken(o,l.Messages.ConstructorIsAsync))}}var j=this.qualifiedPropertyName(this.lookahead);return o.type===3?o.value==="get"&&j?(c="get",D=this.match("["),y=this.parseObjectPropertyKey(),this.context.allowYield=!1,S=this.parseGetterMethod()):o.value==="set"&&j&&(c="set",D=this.match("["),y=this.parseObjectPropertyKey(),S=this.parseSetterMethod()):o.type===7&&o.value==="*"&&j&&(c="init",D=this.match("["),y=this.parseObjectPropertyKey(),S=this.parseGeneratorMethod(),E=!0),!c&&y&&this.match("(")&&(c="init",S=T?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),E=!0),c||this.throwUnexpectedToken(this.lookahead),c==="init"&&(c="method"),D||(C&&this.isPropertyKey(y,"prototype")&&this.throwUnexpectedToken(o,l.Messages.StaticPrototype),!C&&this.isPropertyKey(y,"constructor")&&((c!=="method"||!E||S&&S.generator)&&this.throwUnexpectedToken(o,l.Messages.ConstructorSpecialMethod),s.value?this.throwUnexpectedToken(o,l.Messages.DuplicateConstructor):s.value=!0,c="constructor")),this.finalize(u,new a.MethodDefinition(y,D,S,c,C))},d.prototype.parseClassElementList=function(){var s=[],o={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():s.push(this.parseClassElement(o));return this.expect("}"),s},d.prototype.parseClassBody=function(){var s=this.createNode(),o=this.parseClassElementList();return this.finalize(s,new a.ClassBody(o))},d.prototype.parseClassDeclaration=function(s){var o=this.createNode(),u=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=u,this.finalize(o,new a.ClassDeclaration(c,y,S))},d.prototype.parseClassExpression=function(){var s=this.createNode(),o=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var u=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=o,this.finalize(s,new a.ClassExpression(u,c,y))},d.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var s=this.createNode(),o=this.parseDirectivePrologues();this.lookahead.type!==2;)o.push(this.parseStatementListItem());return this.finalize(s,new a.Module(o))},d.prototype.parseScript=function(){for(var s=this.createNode(),o=this.parseDirectivePrologues();this.lookahead.type!==2;)o.push(this.parseStatementListItem());return this.finalize(s,new a.Script(o))},d.prototype.parseModuleSpecifier=function(){var s=this.createNode();this.lookahead.type!==8&&this.throwError(l.Messages.InvalidModuleSpecifier);var o=this.nextToken(),u=this.getTokenRaw(o);return this.finalize(s,new a.Literal(o.value,u))},d.prototype.parseImportSpecifier=function(){var s=this.createNode(),o,u;return this.lookahead.type===3?(o=this.parseVariableIdentifier(),u=o,this.matchContextualKeyword("as")&&(this.nextToken(),u=this.parseVariableIdentifier())):(o=this.parseIdentifierName(),u=o,this.matchContextualKeyword("as")?(this.nextToken(),u=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(s,new a.ImportSpecifier(u,o))},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(),o=this.parseIdentifierName();return this.finalize(s,new a.ImportDefaultSpecifier(o))},d.prototype.parseImportNamespaceSpecifier=function(){var s=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(l.Messages.NoAsAfterImportNamespace),this.nextToken();var o=this.parseIdentifierName();return this.finalize(s,new a.ImportNamespaceSpecifier(o))},d.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(l.Messages.IllegalImportDeclaration);var s=this.createNode();this.expectKeyword("import");var o,u=[];if(this.lookahead.type===8)o=this.parseModuleSpecifier();else{if(this.match("{")?u=u.concat(this.parseNamedImports()):this.match("*")?u.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(u.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?u.push(this.parseImportNamespaceSpecifier()):this.match("{")?u=u.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var c=this.lookahead.value?l.Messages.UnexpectedToken:l.Messages.MissingFromClause;this.throwError(c,this.lookahead.value)}this.nextToken(),o=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(s,new a.ImportDeclaration(u,o))},d.prototype.parseExportSpecifier=function(){var s=this.createNode(),o=this.parseIdentifierName(),u=o;return this.matchContextualKeyword("as")&&(this.nextToken(),u=this.parseIdentifierName()),this.finalize(s,new a.ExportSpecifier(o,u))},d.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(l.Messages.IllegalExportDeclaration);var s=this.createNode();this.expectKeyword("export");var o;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var u=this.parseFunctionDeclaration(!0);o=this.finalize(s,new a.ExportDefaultDeclaration(u))}else if(this.matchKeyword("class")){var u=this.parseClassDeclaration(!0);o=this.finalize(s,new a.ExportDefaultDeclaration(u))}else if(this.matchContextualKeyword("async")){var u=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();o=this.finalize(s,new a.ExportDefaultDeclaration(u))}else{this.matchContextualKeyword("from")&&this.throwError(l.Messages.UnexpectedToken,this.lookahead.value);var u=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),o=this.finalize(s,new a.ExportDefaultDeclaration(u))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var c=this.lookahead.value?l.Messages.UnexpectedToken:l.Messages.MissingFromClause;this.throwError(c,this.lookahead.value)}this.nextToken();var y=this.parseModuleSpecifier();this.consumeSemicolon(),o=this.finalize(s,new a.ExportAllDeclaration(y))}else if(this.lookahead.type===4){var u=void 0;switch(this.lookahead.value){case"let":case"const":u=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":u=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}o=this.finalize(s,new a.ExportNamedDeclaration(u,[],null))}else if(this.matchAsyncFunction()){var u=this.parseFunctionDeclaration();o=this.finalize(s,new a.ExportNamedDeclaration(u,[],null))}else{var S=[],D=null,E=!1;for(this.expect("{");!this.match("}");)E=E||this.matchKeyword("default"),S.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),D=this.parseModuleSpecifier(),this.consumeSemicolon();else if(E){var c=this.lookahead.value?l.Messages.UnexpectedToken:l.Messages.MissingFromClause;this.throwError(c,this.lookahead.value)}else this.consumeSemicolon();o=this.finalize(s,new a.ExportNamedDeclaration(null,S,D))}return o},d}();e.Parser=g},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function r(i,n){if(!i)throw new Error("ASSERT: "+n)}e.assert=r},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function i(){this.errors=[],this.tolerant=!1}return i.prototype.recordError=function(n){this.errors.push(n)},i.prototype.tolerate=function(n){if(this.tolerant)this.recordError(n);else throw n},i.prototype.constructError=function(n,l){var a=new Error(n);try{throw a}catch(f){Object.create&&Object.defineProperty&&(a=Object.create(f),Object.defineProperty(a,"column",{value:l}))}return a},i.prototype.createError=function(n,l,a,f){var p="Line "+l+": "+f,m=this.constructError(p,a);return m.index=n,m.lineNumber=l,m.description=f,m},i.prototype.throwError=function(n,l,a,f){throw this.createError(n,l,a,f)},i.prototype.tolerateError=function(n,l,a,f){var p=this.createError(n,l,a,f);if(this.tolerant)this.recordError(p);else throw p},i}();e.ErrorHandler=r},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.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(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(9),n=r(4),l=r(11);function a(m){return"0123456789abcdef".indexOf(m.toLowerCase())}function f(m){return"01234567".indexOf(m)}var p=function(){function m(h,g){this.source=h,this.errorHandler=g,this.trackComment=!1,this.isModule=!1,this.length=h.length,this.index=0,this.lineNumber=h.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return m.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},m.prototype.restoreState=function(h){this.index=h.index,this.lineNumber=h.lineNumber,this.lineStart=h.lineStart},m.prototype.eof=function(){return this.index>=this.length},m.prototype.throwUnexpectedToken=function(h){return h===void 0&&(h=l.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,h)},m.prototype.tolerateUnexpectedToken=function(h){h===void 0&&(h=l.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,h)},m.prototype.skipSingleLineComment=function(h){var g=[],d,s;for(this.trackComment&&(g=[],d=this.index-h,s={start:{line:this.lineNumber,column:this.index-this.lineStart-h},end:{}});!this.eof();){var o=this.source.charCodeAt(this.index);if(++this.index,n.Character.isLineTerminator(o)){if(this.trackComment){s.end={line:this.lineNumber,column:this.index-this.lineStart-1};var u={multiLine:!1,slice:[d+h,this.index-1],range:[d,this.index-1],loc:s};g.push(u)}return o===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,g}}if(this.trackComment){s.end={line:this.lineNumber,column:this.index-this.lineStart};var u={multiLine:!1,slice:[d+h,this.index],range:[d,this.index],loc:s};g.push(u)}return g},m.prototype.skipMultiLineComment=function(){var h=[],g,d;for(this.trackComment&&(h=[],g=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(n.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 o={multiLine:!0,slice:[g+2,this.index-2],range:[g,this.index],loc:d};h.push(o)}return h}++this.index}else++this.index}if(this.trackComment){d.end={line:this.lineNumber,column:this.index-this.lineStart};var o={multiLine:!0,slice:[g+2,this.index],range:[g,this.index],loc:d};h.push(o)}return this.tolerateUnexpectedToken(),h},m.prototype.scanComments=function(){var h;this.trackComment&&(h=[]);for(var g=this.index===0;!this.eof();){var d=this.source.charCodeAt(this.index);if(n.Character.isWhiteSpace(d))++this.index;else if(n.Character.isLineTerminator(d))++this.index,d===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,g=!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&&(h=h.concat(s)),g=!0}else if(d===42){this.index+=2;var s=this.skipMultiLineComment();this.trackComment&&(h=h.concat(s))}else break;else if(g&&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&&(h=h.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&&(h=h.concat(s))}else break;else break}return h},m.prototype.isFutureReservedWord=function(h){switch(h){case"enum":case"export":case"import":case"super":return!0;default:return!1}},m.prototype.isStrictModeReservedWord=function(h){switch(h){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},m.prototype.isRestrictedWord=function(h){return h==="eval"||h==="arguments"},m.prototype.isKeyword=function(h){switch(h.length){case 2:return h==="if"||h==="in"||h==="do";case 3:return h==="var"||h==="for"||h==="new"||h==="try"||h==="let";case 4:return h==="this"||h==="else"||h==="case"||h==="void"||h==="with"||h==="enum";case 5:return h==="while"||h==="break"||h==="catch"||h==="throw"||h==="const"||h==="yield"||h==="class"||h==="super";case 6:return h==="return"||h==="typeof"||h==="delete"||h==="switch"||h==="export"||h==="import";case 7:return h==="default"||h==="finally"||h==="extends";case 8:return h==="function"||h==="continue"||h==="debugger";case 10:return h==="instanceof";default:return!1}},m.prototype.codePointAt=function(h){var g=this.source.charCodeAt(h);if(g>=55296&&g<=56319){var d=this.source.charCodeAt(h+1);if(d>=56320&&d<=57343){var s=g;g=(s-55296)*1024+d-56320+65536}}return g},m.prototype.scanHexEscape=function(h){for(var g=h==="u"?4:2,d=0,s=0;s<g;++s)if(!this.eof()&&n.Character.isHexDigit(this.source.charCodeAt(this.index)))d=d*16+a(this.source[this.index++]);else return null;return String.fromCharCode(d)},m.prototype.scanUnicodeCodePointEscape=function(){var h=this.source[this.index],g=0;for(h==="}"&&this.throwUnexpectedToken();!this.eof()&&(h=this.source[this.index++],!!n.Character.isHexDigit(h.charCodeAt(0)));)g=g*16+a(h);return(g>1114111||h!=="}")&&this.throwUnexpectedToken(),n.Character.fromCodePoint(g)},m.prototype.getIdentifier=function(){for(var h=this.index++;!this.eof();){var g=this.source.charCodeAt(this.index);if(g===92)return this.index=h,this.getComplexIdentifier();if(g>=55296&&g<57343)return this.index=h,this.getComplexIdentifier();if(n.Character.isIdentifierPart(g))++this.index;else break}return this.source.slice(h,this.index)},m.prototype.getComplexIdentifier=function(){var h=this.codePointAt(this.index),g=n.Character.fromCodePoint(h);this.index+=g.length;var d;for(h===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==="\\"||!n.Character.isIdentifierStart(d.charCodeAt(0)))&&this.throwUnexpectedToken()),g=d);!this.eof()&&(h=this.codePointAt(this.index),!!n.Character.isIdentifierPart(h));)d=n.Character.fromCodePoint(h),g+=d,this.index+=d.length,h===92&&(g=g.substr(0,g.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==="\\"||!n.Character.isIdentifierPart(d.charCodeAt(0)))&&this.throwUnexpectedToken()),g+=d);return g},m.prototype.octalToDecimal=function(h){var g=h!=="0",d=f(h);return!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(g=!0,d=d*8+f(this.source[this.index++]),"0123".indexOf(h)>=0&&!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(d=d*8+f(this.source[this.index++]))),{code:d,octal:g}},m.prototype.scanIdentifier=function(){var h,g=this.index,d=this.source.charCodeAt(g)===92?this.getComplexIdentifier():this.getIdentifier();if(d.length===1?h=3:this.isKeyword(d)?h=4:d==="null"?h=5:d==="true"||d==="false"?h=1:h=3,h!==3&&g+d.length!==this.index){var s=this.index;this.index=g,this.tolerateUnexpectedToken(l.Messages.InvalidEscapedReservedWord),this.index=s}return{type:h,value:d,lineNumber:this.lineNumber,lineStart:this.lineStart,start:g,end:this.index}},m.prototype.scanPunctuator=function(){var h=this.index,g=this.source[this.index];switch(g){case"(":case"{":g==="{"&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,this.source[this.index]==="."&&this.source[this.index+1]==="."&&(this.index+=2,g="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:g=this.source.substr(this.index,4),g===">>>="?this.index+=4:(g=g.substr(0,3),g==="==="||g==="!=="||g===">>>"||g==="<<="||g===">>="||g==="**="?this.index+=3:(g=g.substr(0,2),g==="&&"||g==="||"||g==="=="||g==="!="||g==="+="||g==="-="||g==="*="||g==="/="||g==="++"||g==="--"||g==="<<"||g===">>"||g==="&="||g==="|="||g==="^="||g==="%="||g==="<="||g===">="||g==="=>"||g==="**"?this.index+=2:(g=this.source[this.index],"<>=!+-*%&|^/".indexOf(g)>=0&&++this.index)))}return this.index===h&&this.throwUnexpectedToken(),{type:7,value:g,lineNumber:this.lineNumber,lineStart:this.lineStart,start:h,end:this.index}},m.prototype.scanHexLiteral=function(h){for(var g="";!this.eof()&&n.Character.isHexDigit(this.source.charCodeAt(this.index));)g+=this.source[this.index++];return g.length===0&&this.throwUnexpectedToken(),n.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+g,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:h,end:this.index}},m.prototype.scanBinaryLiteral=function(h){for(var g="",d;!this.eof()&&(d=this.source[this.index],!(d!=="0"&&d!=="1"));)g+=this.source[this.index++];return g.length===0&&this.throwUnexpectedToken(),this.eof()||(d=this.source.charCodeAt(this.index),(n.Character.isIdentifierStart(d)||n.Character.isDecimalDigit(d))&&this.throwUnexpectedToken()),{type:6,value:parseInt(g,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:h,end:this.index}},m.prototype.scanOctalLiteral=function(h,g){var d="",s=!1;for(n.Character.isOctalDigit(h.charCodeAt(0))?(s=!0,d="0"+this.source[this.index++]):++this.index;!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];return!s&&d.length===0&&this.throwUnexpectedToken(),(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))||n.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(d,8),octal:s,lineNumber:this.lineNumber,lineStart:this.lineStart,start:g,end:this.index}},m.prototype.isImplicitOctalLiteral=function(){for(var h=this.index+1;h<this.length;++h){var g=this.source[h];if(g==="8"||g==="9")return!1;if(!n.Character.isOctalDigit(g.charCodeAt(0)))return!0}return!0},m.prototype.scanNumericLiteral=function(){var h=this.index,g=this.source[h];i.assert(n.Character.isDecimalDigit(g.charCodeAt(0))||g===".","Numeric literal must start with a decimal digit or a decimal point");var d="";if(g!=="."){if(d=this.source[this.index++],g=this.source[this.index],d==="0"){if(g==="x"||g==="X")return++this.index,this.scanHexLiteral(h);if(g==="b"||g==="B")return++this.index,this.scanBinaryLiteral(h);if(g==="o"||g==="O")return this.scanOctalLiteral(g,h);if(g&&n.Character.isOctalDigit(g.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(g,h)}for(;n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];g=this.source[this.index]}if(g==="."){for(d+=this.source[this.index++];n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];g=this.source[this.index]}if(g==="e"||g==="E")if(d+=this.source[this.index++],g=this.source[this.index],(g==="+"||g==="-")&&(d+=this.source[this.index++]),n.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];else this.throwUnexpectedToken();return n.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(d),lineNumber:this.lineNumber,lineStart:this.lineStart,start:h,end:this.index}},m.prototype.scanStringLiteral=function(){var h=this.index,g=this.source[h];i.assert(g==="'"||g==='"',"String literal must starts with a quote"),++this.index;for(var d=!1,s="";!this.eof();){var o=this.source[this.index++];if(o===g){g="";break}else if(o==="\\")if(o=this.source[this.index++],!o||!n.Character.isLineTerminator(o.charCodeAt(0)))switch(o){case"u":if(this.source[this.index]==="{")++this.index,s+=this.scanUnicodeCodePointEscape();else{var u=this.scanHexEscape(o);u===null&&this.throwUnexpectedToken(),s+=u}break;case"x":var c=this.scanHexEscape(o);c===null&&this.throwUnexpectedToken(l.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+=o,this.tolerateUnexpectedToken();break;default:if(o&&n.Character.isOctalDigit(o.charCodeAt(0))){var y=this.octalToDecimal(o);d=y.octal||d,s+=String.fromCharCode(y.code)}else s+=o;break}else++this.lineNumber,o==="\r"&&this.source[this.index]===`
|
|
8
|
-
`&&++this.index,this.lineStart=this.index;else{if(n.Character.isLineTerminator(o.charCodeAt(0)))break;s+=o}}return g!==""&&(this.index=h,this.throwUnexpectedToken()),{type:8,value:s,octal:d,lineNumber:this.lineNumber,lineStart:this.lineStart,start:h,end:this.index}},m.prototype.scanTemplate=function(){var h="",g=!1,d=this.index,s=this.source[d]==="`",o=!1,u=2;for(++this.index;!this.eof();){var c=this.source[this.index++];if(c==="`"){u=1,o=!0,g=!0;break}else if(c==="$"){if(this.source[this.index]==="{"){this.curlyStack.push("${"),++this.index,g=!0;break}h+=c}else if(c==="\\")if(c=this.source[this.index++],n.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":h+=`
|
|
10
|
-
`;break;case"r":h+="\r";break;case"t":h+=" ";break;case"u":if(this.source[this.index]==="{")++this.index,h+=this.scanUnicodeCodePointEscape();else{var y=this.index,S=this.scanHexEscape(c);S!==null?h+=S:(this.index=y,h+=c)}break;case"x":var D=this.scanHexEscape(c);D===null&&this.throwUnexpectedToken(l.Messages.InvalidHexEscapeSequence),h+=D;break;case"b":h+="\b";break;case"f":h+="\f";break;case"v":h+="\v";break;default:c==="0"?(n.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(l.Messages.TemplateOctalLiteral),h+="\0"):n.Character.isOctalDigit(c.charCodeAt(0))?this.throwUnexpectedToken(l.Messages.TemplateOctalLiteral):h+=c;break}else n.Character.isLineTerminator(c.charCodeAt(0))?(++this.lineNumber,c==="\r"&&this.source[this.index]===`
|
|
11
|
-
`&&++this.index,this.lineStart=this.index,h+=`
|
|
12
|
-
`):h+=c}return g||this.throwUnexpectedToken(),s||this.curlyStack.pop(),{type:10,value:this.source.slice(d+1,this.index-u),cooked:h,head:s,tail:o,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},m.prototype.testRegExp=function(h,g){var d="\uFFFF",s=h,o=this;g.indexOf("u")>=0&&(s=s.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(u,c,y){var S=parseInt(c||y,16);return S>1114111&&o.throwUnexpectedToken(l.Messages.InvalidRegExp),S<=65535?String.fromCharCode(S):d}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,d));try{RegExp(s)}catch{this.throwUnexpectedToken(l.Messages.InvalidRegExp)}try{return new RegExp(h,g)}catch{return null}},m.prototype.scanRegExpBody=function(){var h=this.source[this.index];i.assert(h==="/","Regular expression literal must start with a slash");for(var g=this.source[this.index++],d=!1,s=!1;!this.eof();)if(h=this.source[this.index++],g+=h,h==="\\")h=this.source[this.index++],n.Character.isLineTerminator(h.charCodeAt(0))&&this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),g+=h;else if(n.Character.isLineTerminator(h.charCodeAt(0)))this.throwUnexpectedToken(l.Messages.UnterminatedRegExp);else if(d)h==="]"&&(d=!1);else if(h==="/"){s=!0;break}else h==="["&&(d=!0);return s||this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),g.substr(1,g.length-2)},m.prototype.scanRegExpFlags=function(){for(var h="",g="";!this.eof();){var d=this.source[this.index];if(!n.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,o=this.scanHexEscape("u");if(o!==null)for(g+=o,h+="\\u";s<this.index;++s)h+=this.source[s];else this.index=s,g+="u",h+="\\u";this.tolerateUnexpectedToken()}else h+="\\",this.tolerateUnexpectedToken();else g+=d,h+=d}return g},m.prototype.scanRegExp=function(){var h=this.index,g=this.scanRegExpBody(),d=this.scanRegExpFlags(),s=this.testRegExp(g,d);return{type:9,value:"",pattern:g,flags:d,regex:s,lineNumber:this.lineNumber,lineStart:this.lineStart,start:h,end:this.index}},m.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var h=this.source.charCodeAt(this.index);return n.Character.isIdentifierStart(h)?this.scanIdentifier():h===40||h===41||h===59?this.scanPunctuator():h===39||h===34?this.scanStringLiteral():h===46?n.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():n.Character.isDecimalDigit(h)?this.scanNumericLiteral():h===96||h===125&&this.curlyStack[this.curlyStack.length-1]==="${"?this.scanTemplate():h>=55296&&h<57343&&n.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},m}();e.Scanner=p},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenName={},e.TokenName[1]="Boolean",e.TokenName[2]="<end>",e.TokenName[3]="Identifier",e.TokenName[4]="Keyword",e.TokenName[5]="Null",e.TokenName[6]="Numeric",e.TokenName[7]="Punctuator",e.TokenName[8]="String",e.TokenName[9]="RegularExpression",e.TokenName[10]="Template"},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.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(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(10),n=r(12),l=r(13),a=function(){function p(){this.values=[],this.curly=this.paren=-1}return p.prototype.beforeFunctionExpression=function(m){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(m)>=0},p.prototype.isRegexStart=function(){var m=this.values[this.values.length-1],h=m!==null;switch(m){case"this":case"]":h=!1;break;case")":var g=this.values[this.paren-1];h=g==="if"||g==="while"||g==="for"||g==="with";break;case"}":if(h=!1,this.values[this.curly-3]==="function"){var d=this.values[this.curly-4];h=d?!this.beforeFunctionExpression(d):!1}else if(this.values[this.curly-4]==="function"){var d=this.values[this.curly-5];h=d?!this.beforeFunctionExpression(d):!0}break;default:break}return h},p.prototype.push=function(m){m.type===7||m.type===4?(m.value==="{"?this.curly=this.values.length:m.value==="("&&(this.paren=this.values.length),this.values.push(m.value)):this.values.push(null)},p}(),f=function(){function p(m,h){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=h?typeof h.tolerant=="boolean"&&h.tolerant:!1,this.scanner=new n.Scanner(m,this.errorHandler),this.scanner.trackComment=h?typeof h.comment=="boolean"&&h.comment:!1,this.trackRange=h?typeof h.range=="boolean"&&h.range:!1,this.trackLoc=h?typeof h.loc=="boolean"&&h.loc:!1,this.buffer=[],this.reader=new a}return p.prototype.errors=function(){return this.errorHandler.errors},p.prototype.getNextToken=function(){if(this.buffer.length===0){var m=this.scanner.scanComments();if(this.scanner.trackComment)for(var h=0;h<m.length;++h){var g=m[h],d=this.scanner.source.slice(g.slice[0],g.slice[1]),s={type:g.multiLine?"BlockComment":"LineComment",value:d};this.trackRange&&(s.range=g.range),this.trackLoc&&(s.loc=g.loc),this.buffer.push(s)}if(!this.scanner.eof()){var o=void 0;this.trackLoc&&(o={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var u=this.scanner.source[this.scanner.index]==="/"&&this.reader.isRegexStart(),c=u?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(c);var y={type:l.TokenName[c.type],value:this.scanner.source.slice(c.start,c.end)};if(this.trackRange&&(y.range=[c.start,c.end]),this.trackLoc&&(o.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},y.loc=o),c.type===9){var S=c.pattern,D=c.flags;y.regex={pattern:S,flags:D}}this.buffer.push(y)}}return this.buffer.shift()},p}();e.Tokenizer=f}])})});var Nt=R(J=>{b();function Bl(t){return Array.isArray?Array.isArray(t):Mt(t)==="[object Array]"}J.isArray=Bl;function _l(t){return typeof t=="boolean"}J.isBoolean=_l;function Ul(t){return t===null}J.isNull=Ul;function jl(t){return t==null}J.isNullOrUndefined=jl;function Gl(t){return typeof t=="number"}J.isNumber=Gl;function $l(t){return typeof t=="string"}J.isString=$l;function ql(t){return typeof t=="symbol"}J.isSymbol=ql;function Hl(t){return t===void 0}J.isUndefined=Hl;function Wl(t){return Mt(t)==="[object RegExp]"}J.isRegExp=Wl;function zl(t){return typeof t=="object"&&t!==null}J.isObject=zl;function Xl(t){return Mt(t)==="[object Date]"}J.isDate=Xl;function Jl(t){return Mt(t)==="[object Error]"||t instanceof Error}J.isError=Jl;function Vl(t){return typeof t=="function"}J.isFunction=Vl;function Kl(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}J.isPrimitive=Kl;J.isBuffer=ot("buffer").Buffer.isBuffer;function Mt(t){return Object.prototype.toString.call(t)}});var Ss=R((Tm,ys)=>{b();var ds=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],F,hs=t=>t<1e5?t<100?t<10?0:1:t<1e4?t<1e3?2:3:4:t<1e7?t<1e6?5:6:t<1e9?t<1e8?7:8:9;function fs(t,e){if(t===e)return 0;if(~~t===t&&~~e===e){if(t===0||e===0)return t<e?-1:1;if(t<0||e<0){if(e>=0)return-1;if(t>=0)return 1;t=-t,e=-e}let n=hs(t),l=hs(e),a=0;return n<l?(t*=ds[l-n-1],e/=10,a=-1):n>l&&(e*=ds[n-l-1],t/=10,a=1),t===e?a:t<e?-1:1}let r=String(t),i=String(e);return r===i?0:r<i?-1:1}function Yl(t){let e=0;for(;t>=32;)e|=t&1,t>>=1;return t+e}function ps(t,e,r,i){let n=e+1;if(n===r)return 1;if(i(t[n++],t[e])<0){for(;n<r&&i(t[n],t[n-1])<0;)n++;ms(t,e,n),ms(F,e,n)}else for(;n<r&&i(t[n],t[n-1])>=0;)n++;return n-e}function ms(t,e,r){for(r--;e<r;){let i=t[e];t[e++]=t[r],t[r--]=i}}function gs(t,e,r,i,n){for(i===e&&i++;i<r;i++){let l=t[i],a=F[i],f=e,p=i;for(;f<p;){let h=f+p>>>1;n(l,t[h])<0?p=h:f=h+1}let m=i-f;switch(m){case 3:t[f+3]=t[f+2],F[f+3]=F[f+2];case 2:t[f+2]=t[f+1],F[f+2]=F[f+1];case 1:t[f+1]=t[f],F[f+1]=F[f];break;default:for(;m>0;)t[f+m]=t[f+m-1],F[f+m]=F[f+m-1],m--}t[f]=l,F[f]=a}}function qr(t,e,r,i,n,l){let a=0,f=0,p=1;if(l(t,e[r+n])>0){for(f=i-n;p<f&&l(t,e[r+n+p])>0;)a=p,p=(p<<1)+1,p<=0&&(p=f);p>f&&(p=f),a+=n,p+=n}else{for(f=n+1;p<f&&l(t,e[r+n-p])<=0;)a=p,p=(p<<1)+1,p<=0&&(p=f);p>f&&(p=f);let m=a;a=n-p,p=n-m}for(a++;a<p;){let m=a+(p-a>>>1);l(t,e[r+m])>0?a=m+1:p=m}return p}function Hr(t,e,r,i,n,l){let a=0,f=0,p=1;if(l(t,e[r+n])<0){for(f=n+1;p<f&&l(t,e[r+n-p])<0;)a=p,p=(p<<1)+1,p<=0&&(p=f);p>f&&(p=f);let m=a;a=n-p,p=n-m}else{for(f=i-n;p<f&&l(t,e[r+n+p])>=0;)a=p,p=(p<<1)+1,p<=0&&(p=f);p>f&&(p=f),a+=n,p+=n}for(a++;a<p;){let m=a+(p-a>>>1);l(t,e[r+m])<0?p=m:a=m+1}return p}var Wr=class{constructor(e,r){this.array=e,this.compare=r;let{length:i}=e;this.length=i,this.minGallop=7,this.tmpStorageLength=i<2*256?i>>>1:256,this.tmp=new Array(this.tmpStorageLength),this.tmpIndex=new Array(this.tmpStorageLength),this.stackLength=i<120?5:i<1542?10:i<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength),this.stackSize=0}pushRun(e,r){this.runStart[this.stackSize]=e,this.runLength[this.stackSize]=r,this.stackSize+=1}mergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;if(e>=1&&this.runLength[e-1]<=this.runLength[e]+this.runLength[e+1]||e>=2&&this.runLength[e-2]<=this.runLength[e]+this.runLength[e-1])this.runLength[e-1]<this.runLength[e+1]&&e--;else if(this.runLength[e]>this.runLength[e+1])break;this.mergeAt(e)}}forceMergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;e>0&&this.runLength[e-1]<this.runLength[e+1]&&e--,this.mergeAt(e)}}mergeAt(e){let{compare:r}=this,{array:i}=this,n=this.runStart[e],l=this.runLength[e],a=this.runStart[e+1],f=this.runLength[e+1];this.runLength[e]=l+f,e===this.stackSize-3&&(this.runStart[e+1]=this.runStart[e+2],this.runLength[e+1]=this.runLength[e+2]),this.stackSize--;let p=Hr(i[a],i,n,l,0,r);n+=p,l-=p,l!==0&&(f=qr(i[n+l-1],i,a,f,f-1,r),f!==0&&(l<=f?this.mergeLow(n,l,a,f):this.mergeHigh(n,l,a,f)))}mergeLow(e,r,i,n){let{compare:l}=this,{array:a}=this,{tmp:f}=this,{tmpIndex:p}=this,m=0;for(m=0;m<r;m++)f[m]=a[e+m],p[m]=F[e+m];let h=0,g=i,d=e;if(a[d]=a[g],F[d]=F[g],d++,g++,--n===0){for(m=0;m<r;m++)a[d+m]=f[h+m],F[d+m]=p[h+m];return}if(r===1){for(m=0;m<n;m++)a[d+m]=a[g+m],F[d+m]=F[g+m];a[d+n]=f[h],F[d+n]=p[h];return}let{minGallop:s}=this;for(;;){let o=0,u=0,c=!1;do if(l(a[g],f[h])<0){if(a[d]=a[g],F[d]=F[g],d++,g++,u++,o=0,--n===0){c=!0;break}}else if(a[d]=f[h],F[d]=p[h],d++,h++,o++,u=0,--r===1){c=!0;break}while((o|u)<s);if(c)break;do{if(o=Hr(a[g],f,h,r,0,l),o!==0){for(m=0;m<o;m++)a[d+m]=f[h+m],F[d+m]=p[h+m];if(d+=o,h+=o,r-=o,r<=1){c=!0;break}}if(a[d]=a[g],F[d]=F[g],d++,g++,--n===0){c=!0;break}if(u=qr(f[h],a,g,n,0,l),u!==0){for(m=0;m<u;m++)a[d+m]=a[g+m],F[d+m]=F[g+m];if(d+=u,g+=u,n-=u,n===0){c=!0;break}}if(a[d]=f[h],F[d]=p[h],d++,h++,--r===1){c=!0;break}s--}while(o>=7||u>=7);if(c)break;s<0&&(s=0),s+=2}if(this.minGallop=s,s<1&&(this.minGallop=1),r===1){for(m=0;m<n;m++)a[d+m]=a[g+m],F[d+m]=F[g+m];a[d+n]=f[h],F[d+n]=p[h]}else{if(r===0)throw new Error("mergeLow preconditions were not respected");for(m=0;m<r;m++)a[d+m]=f[h+m],F[d+m]=p[h+m]}}mergeHigh(e,r,i,n){let{compare:l}=this,{array:a}=this,{tmp:f}=this,{tmpIndex:p}=this,m=0;for(m=0;m<n;m++)f[m]=a[i+m],p[m]=F[i+m];let h=e+r-1,g=n-1,d=i+n-1,s=0,o=0;if(a[d]=a[h],F[d]=F[h],d--,h--,--r===0){for(s=d-(n-1),m=0;m<n;m++)a[s+m]=f[m],F[s+m]=p[m];return}if(n===1){for(d-=r,h-=r,o=d+1,s=h+1,m=r-1;m>=0;m--)a[o+m]=a[s+m],F[o+m]=F[s+m];a[d]=f[g],F[d]=p[g];return}let{minGallop:u}=this;for(;;){let c=0,y=0,S=!1;do if(l(f[g],a[h])<0){if(a[d]=a[h],F[d]=F[h],d--,h--,c++,y=0,--r===0){S=!0;break}}else if(a[d]=f[g],F[d]=p[g],d--,g--,y++,c=0,--n===1){S=!0;break}while((c|y)<u);if(S)break;do{if(c=r-Hr(f[g],a,e,r,r-1,l),c!==0){for(d-=c,h-=c,r-=c,o=d+1,s=h+1,m=c-1;m>=0;m--)a[o+m]=a[s+m],F[o+m]=F[s+m];if(r===0){S=!0;break}}if(a[d]=f[g],F[d]=p[g],d--,g--,--n===1){S=!0;break}if(y=n-qr(a[h],f,0,n,n-1,l),y!==0){for(d-=y,g-=y,n-=y,o=d+1,s=g+1,m=0;m<y;m++)a[o+m]=f[s+m],F[o+m]=p[s+m];if(n<=1){S=!0;break}}if(a[d]=a[h],F[d]=F[h],d--,h--,--r===0){S=!0;break}u--}while(c>=7||y>=7);if(S)break;u<0&&(u=0),u+=2}if(this.minGallop=u,u<1&&(this.minGallop=1),n===1){for(d-=r,h-=r,o=d+1,s=h+1,m=r-1;m>=0;m--)a[o+m]=a[s+m],F[o+m]=F[s+m];a[d]=f[g],F[d]=p[g]}else{if(n===0)throw new Error("mergeHigh preconditions were not respected");for(s=d-(n-1),m=0;m<n;m++)a[s+m]=f[m],F[s+m]=p[m]}}};function Ql(t,e,r,i){if(!Array.isArray(t))throw new TypeError(`The "array" argument must be an array. Received ${t}`);F=[];let{length:n}=t,l=0;for(;l<n;)F[l]=l++;e?typeof e!="function"&&(i=r,r=e,e=fs):e=fs,r||(r=0),i||(i=n);let a=i-r;if(a<2)return F;let f=0;if(a<32)return f=ps(t,r,i,e),gs(t,r,i,r+f,e),F;let p=new Wr(t,e),m=Yl(a);do{if(f=ps(t,r,i,e),f<m){let h=a;h>m&&(h=m),gs(t,r,r+h,r+f,e),f=h}p.pushRun(r,f),p.mergeRuns(),a-=f,r+=f}while(a!==0);return p.forceMergeRuns(),F}ys.exports={sort:Ql}});var xs=R((Im,bs)=>{"use strict";b();var Zl=Object.prototype.hasOwnProperty;bs.exports=(t,e)=>Zl.call(t,e)});var ft=R((Lm,Rs)=>{b();var Jr=xs(),{isObject:vs,isArray:ec,isString:tc,isNumber:rc}=Nt(),Vr="before",Es="after-prop",Cs="after-colon",As="after-value",ws="after",ks="before-all",Ts="after-all",ic="[",nc="]",sc="{",oc="}",ac=",",uc="",lc="-",Kr=[Vr,Es,Cs,As,ws],cc=[Vr,ks,Ts].map(Symbol.for),Fs=":",Ds=void 0,ht=(t,e)=>Symbol.for(t+Fs+e),Ot=(t,e,r)=>Object.defineProperty(t,e,{value:r,writable:!0,configurable:!0}),Xr=(t,e,r,i,n,l)=>{let a=ht(n,i);if(!Jr(e,a))return;let f=r===i?a:ht(n,r);Ot(t,f,e[a]),l&&delete e[a]},Is=(t,e,r,i,n)=>{Kr.forEach(l=>{Xr(t,e,r,i,l,n)})},dc=(t,e,r)=>{e!==r&&Kr.forEach(i=>{let n=ht(i,r);if(!Jr(t,n)){Xr(t,t,r,e,i,!0);return}let l=t[n];delete t[n],Xr(t,t,r,e,i,!0),Ot(t,ht(i,e),l)})},zr=(t,e)=>{cc.forEach(r=>{let i=e[r];i&&Ot(t,r,i)})},hc=(t,e,r)=>(r.forEach(i=>{!tc(i)&&!rc(i)||Jr(e,i)&&(t[i]=e[i],Is(t,e,i,i))}),t);Rs.exports={SYMBOL_PREFIXES:Kr,PREFIX_BEFORE:Vr,PREFIX_AFTER_PROP:Es,PREFIX_AFTER_COLON:Cs,PREFIX_AFTER_VALUE:As,PREFIX_AFTER:ws,PREFIX_BEFORE_ALL:ks,PREFIX_AFTER_ALL:Ts,BRACKET_OPEN:ic,BRACKET_CLOSE:nc,CURLY_BRACKET_OPEN:sc,CURLY_BRACKET_CLOSE:oc,COLON:Fs,COMMA:ac,MINUS:lc,EMPTY:uc,UNDEFINED:Ds,symbol:ht,define:Ot,copy_comments:Is,swap_comments:dc,assign_non_prop_comments:zr,assign(t,e,r){if(!vs(t))throw new TypeError("Cannot convert undefined or null to object");if(!vs(e))return t;if(r===Ds)r=Object.keys(e),zr(t,e);else if(ec(r))r.length===0&&zr(t,e);else throw new TypeError("keys must be array or undefined");return hc(t,e,r)}}});var Qr=R((Mm,Os)=>{b();var{isArray:fc}=Nt(),{sort:pc}=Ss(),{SYMBOL_PREFIXES:mc,UNDEFINED:Ls,symbol:gc,copy_comments:yc,swap_comments:Ns}=ft(),Sc=t=>{let{length:e}=t,r=0,i=e/2;for(;r<i;r++)Ns(t,r,e-r-1)},Ps=(t,e,r,i,n)=>{yc(t,e,r+i,r,n)},Xe=(t,e,r,i,n,l)=>{if(n>0){let f=i;for(;f-- >0;)Ps(t,e,r+f,n,l);return}let a=0;for(;a<i;){let f=a++;Ps(t,e,r+f,n,l)}},Ms=(t,e)=>{mc.forEach(r=>{let i=gc(r,e);delete t[i]})},bc=(t,e)=>{let r=e;for(;r in t;)r=t[r];return r},Yr=class t extends Array{splice(...e){let{length:r}=this,i=super.splice(...e),[n,l,...a]=e;n<0&&(n+=r),arguments.length===1?l=r-n:l=Math.min(r-n,l);let{length:f}=a,p=f-l,m=n+l,h=r-m;return Xe(this,this,m,h,p,!0),i}slice(...e){let{length:r}=this,i=super.slice(...e);if(!i.length)return new t;let[n,l]=e;return l===Ls?l=r:l<0&&(l+=r),n<0?n+=r:n===Ls&&(n=0),Xe(i,this,n,l-n,-n),i}unshift(...e){let{length:r}=this,i=super.unshift(...e),{length:n}=e;return n>0&&Xe(this,this,0,r,n,!0),i}shift(){let e=super.shift(),{length:r}=this;return Ms(this,0),Xe(this,this,1,r,-1,!0),e}reverse(){return super.reverse(),Sc(this),this}pop(){let e=super.pop();return Ms(this,this.length),e}concat(...e){let{length:r}=this,i=super.concat(...e);return e.length&&(Xe(i,this,0,this.length,0),e.forEach(n=>{let l=r;r+=fc(n)?n.length:1,n instanceof t&&Xe(i,n,0,n.length,l)})),i}sort(...e){let r=pc(this,...e.slice(0,1)),i=Object.create(null);return r.forEach((n,l)=>{if(n===l)return;let a=bc(i,n);a!==l&&(i[l]=a,Ns(this,l,a))}),this}};Os.exports={CommentArray:Yr}});var Zs=R((Om,Qs)=>{b();var xc=cs(),{CommentArray:vc}=Qr(),{PREFIX_BEFORE:_t,PREFIX_AFTER_PROP:Dc,PREFIX_AFTER_COLON:Ec,PREFIX_AFTER_VALUE:js,PREFIX_AFTER:ei,PREFIX_BEFORE_ALL:Cc,PREFIX_AFTER_ALL:Ac,BRACKET_OPEN:wc,BRACKET_CLOSE:Bs,CURLY_BRACKET_OPEN:kc,CURLY_BRACKET_CLOSE:_s,COLON:Gs,COMMA:$s,MINUS:Us,EMPTY:Tc,UNDEFINED:Gt,define:ti,assign_non_prop_comments:Fc}=ft(),qs=t=>xc.tokenize(t,{comment:!0,loc:!0}),ri=[],Ae=null,le=null,ii=[],we,Hs=!1,Ws=!1,pt=null,mt=null,V=null,zs,Ut=null,Xs=()=>{ii.length=ri.length=0,mt=null,we=Gt},Ic=()=>{Xs(),pt.length=0,le=Ae=pt=mt=V=Ut=null},ni=t=>Symbol.for(we!==Gt?t+Gs+we:t),si=(t,e)=>Ut?Ut(t,e):e,Js=()=>{let t=new SyntaxError(`Unexpected token ${V.value.slice(0,1)}`);throw Object.assign(t,V.loc.start),t},Vs=()=>{let t=new SyntaxError("Unexpected end of JSON input");throw Object.assign(t,mt?mt.loc.end:{line:1,column:0}),t},re=()=>{let t=pt[++zs];Ws=V&&t&&V.loc.end.line===t.loc.start.line||!1,mt=V,V=t},Zr=()=>(V||Vs(),V.type==="Punctuator"?V.value:V.type),Be=t=>Zr()===t,Bt=t=>{Be(t)||Js()},oi=t=>{ri.push(Ae),Ae=t},ai=()=>{Ae=ri.pop()},Ks=()=>{if(!le)return;let t=[];for(let r of le)if(r.inline)t.push(r);else break;let{length:e}=t;e&&(e===le.length?le=null:le.splice(0,e),ti(Ae,ni(ei),t))},Ce=t=>{le&&(ti(Ae,ni(t),le),le=null)},ce=t=>{let e=[];for(;V&&(Be("LineComment")||Be("BlockComment"));){let r={...V,inline:Ws};e.push(r),re()}if(!Hs&&e.length){if(t){ti(Ae,ni(t),e);return}le=e}},jt=(t,e)=>{e&&ii.push(we),we=t},Ys=()=>{we=ii.pop()},Rc=()=>{let t={};oi(t),jt(Gt,!0);let e=!1,r;for(ce();!Be(_s)&&!(e&&(Ce(js),Bt($s),re(),ce(),Ks(),Be(_s)));)e=!0,Bt("String"),r=JSON.parse(V.value),jt(r),Ce(_t),re(),ce(Dc),Bt(Gs),re(),ce(Ec),t[r]=si(r,ui()),ce();return e&&Ce(ei),re(),we=void 0,e||Ce(_t),ai(),Ys(),t},Lc=()=>{let t=new vc;oi(t),jt(Gt,!0);let e=!1,r=0;for(ce();!Be(Bs)&&!(e&&(Ce(js),Bt($s),re(),ce(),Ks(),Be(Bs)));)e=!0,jt(r),Ce(_t),t[r]=si(r,ui()),r++,ce();return e&&Ce(ei),re(),we=void 0,e||Ce(_t),ai(),Ys(),t};function ui(){let t=Zr();if(t===kc)return re(),Rc();if(t===wc)return re(),Lc();let e=Tc;t===Us&&(re(),t=Zr(),e=Us);let r;switch(t){case"String":case"Boolean":case"Null":case"Numeric":return r=V.value,re(),JSON.parse(e+r);default:}}var Pc=t=>Object(t)===t,Mc=(t,e,r)=>{Xs(),pt=qs(t),Ut=e,Hs=r,pt.length||Vs(),zs=-1,re(),oi({}),ce(Cc);let i=ui();return ce(Ac),V&&Js(),!r&&i!==null&&(Pc(i)||(i=new Object(i)),Fc(i,Ae)),ai(),i=si("",i),Ic(),i};Qs.exports={parse:Mc,tokenize:qs}});var to=R((_m,eo)=>{"use strict";b();var ge="",li;eo.exports=Nc;function Nc(t,e){if(typeof t!="string")throw new TypeError("expected a string");if(e===1)return t;if(e===2)return t+t;var r=t.length*e;if(li!==t||typeof li>"u")li=t,ge="";else if(ge.length>=r)return ge.substr(0,r);for(;r>ge.length&&e>1;)e&1&&(ge+=t),e>>=1,t+=t;return ge+=t,ge=ge.substr(0,r),ge}});var fo=R((jm,ho)=>{b();var{isArray:hi,isObject:ro,isFunction:di,isNumber:Oc,isString:Bc}=Nt(),_c=to(),{PREFIX_BEFORE_ALL:Uc,PREFIX_BEFORE:io,PREFIX_AFTER_PROP:jc,PREFIX_AFTER_COLON:Gc,PREFIX_AFTER_VALUE:$c,PREFIX_AFTER:fi,PREFIX_AFTER_ALL:qc,BRACKET_OPEN:Hc,BRACKET_CLOSE:Wc,CURLY_BRACKET_OPEN:zc,CURLY_BRACKET_CLOSE:Xc,COLON:Jc,COMMA:no,EMPTY:te,UNDEFINED:Vc}=ft(),ci=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,pi=" ",_e=`
|
|
13
|
-
`,so="null",oo=t=>`${io}:${t}`,Kc=t=>`${jc}:${t}`,Yc=t=>`${Gc}:${t}`,ao=t=>`${$c}:${t}`,uo=t=>`${fi}:${t}`,Qc={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},Zc=t=>(ci.lastIndex=0,ci.test(t)?t.replace(ci,e=>{let r=Qc[e];return typeof r=="string"?r:e}):t),lo=t=>`"${Zc(t)}"`,ed=(t,e)=>e?`//${t}`:`/*${t}*/`,ee=(t,e,r,i)=>{let n=t[Symbol.for(e)];if(!n||!n.length)return te;let l=!1,a=n.reduce((f,{inline:p,type:m,value:h})=>{let g=p?pi:_e+r;return l=m==="LineComment",f+g+ed(h,l)},te);return i||l?a+_e+r:a},Je=null,yt=te,td=()=>{Je=null,yt=te},gt=(t,e,r)=>t?e?t+e.trim()+_e+r:t.trimRight()+_e+r:e?e.trimRight()+_e+r:te,co=(t,e,r)=>{let i=ee(e,io,r+yt,!0);return gt(i,t,r)},rd=(t,e)=>{let r=e+yt,{length:i}=t,n=te,l=te;for(let a=0;a<i;a++){a!==0&&(n+=no);let f=gt(l,ee(t,oo(a),r),r);n+=f||_e+r,n+=mi(a,t,r)||so,n+=ee(t,ao(a),r),l=ee(t,uo(a),r)}return n+=gt(l,ee(t,fi,r),r),Hc+co(n,t,e)+Wc},id=(t,e)=>{if(!t)return"null";let r=e+yt,i=te,n=te,l=!0,a=hi(Je)?Je:Object.keys(t),f=p=>{let m=mi(p,t,r);if(m===Vc)return;l||(i+=no),l=!1;let h=gt(n,ee(t,oo(p),r),r);i+=h||_e+r,i+=lo(p)+ee(t,Kc(p),r)+Jc+ee(t,Yc(p),r)+pi+m+ee(t,ao(p),r),n=ee(t,uo(p),r)};return a.forEach(f),i+=gt(n,ee(t,fi,r),r),zc+co(i,t,e)+Xc};function mi(t,e,r){let i=e[t];switch(ro(i)&&di(i.toJSON)&&(i=i.toJSON(t)),di(Je)&&(i=Je.call(e,t,i)),typeof i){case"string":return lo(i);case"number":return Number.isFinite(i)?String(i):so;case"boolean":case"null":return String(i);case"object":return hi(i)?rd(i,r):id(i,r);default:}}var nd=t=>Bc(t)?t:Oc(t)?_c(pi,t):te,{toString:sd}=Object.prototype,od=["[object Number]","[object String]","[object Boolean]"],ad=t=>{if(typeof t!="object")return!1;let e=sd.call(t);return od.includes(e)};ho.exports=(t,e,r)=>{let i=nd(r);if(!i)return JSON.stringify(t,e);!di(e)&&!hi(e)&&(e=null),Je=e,yt=i;let n=ad(t)?JSON.stringify(t):mi("",{"":t},te);return td(),ro(t)?ee(t,Uc,te).trimLeft()+n+ee(t,qc,te).trimRight():n}});var mo=R(($m,po)=>{b();var{parse:ud,tokenize:ld}=Zs(),cd=fo(),{CommentArray:dd}=Qr(),{assign:hd}=ft();po.exports={parse:ud,stringify:cd,tokenize:ld,CommentArray:dd,assign:hd}});var Uo=R((Kg,ki)=>{b();var er=process||{},Bo=er.argv||[],Zt=er.env||{},Id=!(Zt.NO_COLOR||Bo.includes("--no-color"))&&(!!Zt.FORCE_COLOR||Bo.includes("--color")||er.platform==="win32"||(er.stdout||{}).isTTY&&Zt.TERM!=="dumb"||!!Zt.CI),Rd=(t,e,r=t)=>i=>{let n=""+i,l=n.indexOf(e,t.length);return~l?t+Ld(n,e,r,l)+e:t+n+e},Ld=(t,e,r,i)=>{let n="",l=0;do n+=t.substring(l,i)+r,l=i+e.length,i=t.indexOf(e,l);while(~i);return n+t.substring(l)},_o=(t=Id)=>{let e=t?Rd:()=>String;return{isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};ki.exports=_o();ki.exports.createColors=_o});var jo=R(tr=>{b();Object.defineProperty(tr,"__esModule",{value:!0});tr.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;tr.matchToToken=function(t){var e={type:"invalid",value:t[0],closed:void 0};return t[1]?(e.type="string",e.closed=!!(t[3]||t[4])):t[5]?e.type="comment":t[6]?(e.type="comment",e.closed=!!t[7]):t[8]?e.type="regex":t[9]?e.type="number":t[10]?e.type="name":t[11]?e.type="punctuator":t[12]&&(e.type="whitespace"),e}});var Wo=R(xt=>{"use strict";b();Object.defineProperty(xt,"__esModule",{value:!0});xt.isIdentifierChar=Ho;xt.isIdentifierName=Od;xt.isIdentifierStart=qo;var Fi="\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",Go="\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",Pd=new RegExp("["+Fi+"]"),Md=new RegExp("["+Fi+Go+"]");Fi=Go=null;var $o=[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],Nd=[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 Ti(t,e){let r=65536;for(let i=0,n=e.length;i<n;i+=2){if(r+=e[i],r>t)return!1;if(r+=e[i+1],r>=t)return!0}return!1}function qo(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&Pd.test(String.fromCharCode(t)):Ti(t,$o)}function Ho(t){return t<48?t===36:t<58?!0:t<65?!1:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&Md.test(String.fromCharCode(t)):Ti(t,$o)||Ti(t,Nd)}function Od(t){let e=!0;for(let r=0;r<t.length;r++){let i=t.charCodeAt(r);if((i&64512)===55296&&r+1<t.length){let n=t.charCodeAt(++r);(n&64512)===56320&&(i=65536+((i&1023)<<10)+(n&1023))}if(e){if(e=!1,!qo(i))return!1}else if(!Ho(i))return!1}return!e}});var Vo=R(Ge=>{"use strict";b();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.isKeyword=Gd;Ge.isReservedWord=zo;Ge.isStrictBindOnlyReservedWord=Jo;Ge.isStrictBindReservedWord=jd;Ge.isStrictReservedWord=Xo;var Ii={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"]},Bd=new Set(Ii.keyword),_d=new Set(Ii.strict),Ud=new Set(Ii.strictBind);function zo(t,e){return e&&t==="await"||t==="enum"}function Xo(t,e){return zo(t,e)||_d.has(t)}function Jo(t){return Ud.has(t)}function jd(t,e){return Xo(t,e)||Jo(t)}function Gd(t){return Bd.has(t)}});var Ko=R(de=>{"use strict";b();Object.defineProperty(de,"__esModule",{value:!0});Object.defineProperty(de,"isIdentifierChar",{enumerable:!0,get:function(){return Ri.isIdentifierChar}});Object.defineProperty(de,"isIdentifierName",{enumerable:!0,get:function(){return Ri.isIdentifierName}});Object.defineProperty(de,"isIdentifierStart",{enumerable:!0,get:function(){return Ri.isIdentifierStart}});Object.defineProperty(de,"isKeyword",{enumerable:!0,get:function(){return vt.isKeyword}});Object.defineProperty(de,"isReservedWord",{enumerable:!0,get:function(){return vt.isReservedWord}});Object.defineProperty(de,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return vt.isStrictBindOnlyReservedWord}});Object.defineProperty(de,"isStrictBindReservedWord",{enumerable:!0,get:function(){return vt.isStrictBindReservedWord}});Object.defineProperty(de,"isStrictReservedWord",{enumerable:!0,get:function(){return vt.isStrictReservedWord}});var Ri=Wo(),vt=Vo()});var oa=R(Dt=>{"use strict";b();Object.defineProperty(Dt,"__esModule",{value:!0});var Li=Uo(),Yo=jo(),Qo=Ko();function $d(){return typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?!1:Li.isColorSupported}var rr=(t,e)=>r=>t(e(r));function ta(t){return{keyword:t.cyan,capitalized:t.yellow,jsxIdentifier:t.yellow,punctuator:t.yellow,number:t.magenta,string:t.green,regex:t.magenta,comment:t.gray,invalid:rr(rr(t.white,t.bgRed),t.bold),gutter:t.gray,marker:rr(t.red,t.bold),message:rr(t.red,t.bold),reset:t.reset}}var qd=ta(Li.createColors(!0)),Hd=ta(Li.createColors(!1));function ra(t){return t?qd:Hd}var Wd=new Set(["as","async","from","get","of","set"]),zd=/\r\n|[\n\r\u2028\u2029]/,Xd=/^[()[\]{}]$/,ia,Jd=/^[a-z][\w-]*$/i,Vd=function(t,e,r){if(t.type==="name"){let i=t.value;if(Qo.isKeyword(i)||Qo.isStrictReservedWord(i,!0)||Wd.has(i))return"keyword";if(Jd.test(i)&&(r[e-1]==="<"||r.slice(e-2,e)==="</"))return"jsxIdentifier";let n=String.fromCodePoint(i.codePointAt(0));if(n!==n.toLowerCase())return"capitalized"}return t.type==="punctuator"&&Xd.test(t.value)?"bracket":t.type==="invalid"&&(t.value==="@"||t.value==="#")?"punctuator":t.type};ia=function*(t){let e;for(;e=Yo.default.exec(t);){let r=Yo.matchToToken(e);yield{type:Vd(r,e.index,t),value:r.value}}};function na(t){if(t==="")return"";let e=ra(!0),r="";for(let{type:i,value:n}of ia(t))i in e?r+=n.split(zd).map(l=>e[i](l)).join(`
|
|
14
|
-
`):r+=n;return r}var Zo=!1,ea=/\r\n|[\n\r\u2028\u2029]/;function Kd(t,e,r){let i=Object.assign({column:0,line:-1},t.start),n=Object.assign({},i,t.end),{linesAbove:l=2,linesBelow:a=3}=r||{},f=i.line,p=i.column,m=n.line,h=n.column,g=Math.max(f-(l+1),0),d=Math.min(e.length,m+a);f===-1&&(g=0),m===-1&&(d=e.length);let s=m-f,o={};if(s)for(let u=0;u<=s;u++){let c=u+f;if(!p)o[c]=!0;else if(u===0){let y=e[c-1].length;o[c]=[p,y-p+1]}else if(u===s)o[c]=[0,h];else{let y=e[c-u].length;o[c]=[0,y]}}else p===h?p?o[f]=[p,0]:o[f]=!0:o[f]=[p,h-p];return{start:g,end:d,markerLines:o}}function sa(t,e,r={}){let i=r.forceColor||$d()&&r.highlightCode,n=ra(i),l=t.split(ea),{start:a,end:f,markerLines:p}=Kd(e,l,r),m=e.start&&typeof e.start.column=="number",h=String(f).length,d=(i?na(t):t).split(ea,f).slice(a,f).map((s,o)=>{let u=a+1+o,y=` ${` ${u}`.slice(-h)} |`,S=p[u],D=!p[u+1];if(S){let E="";if(Array.isArray(S)){let C=s.slice(0,Math.max(S[0]-1,0)).replace(/[^\t]/g," "),T=S[1]||1;E=[`
|
|
15
|
-
`,n.gutter(y.replace(/\d/g," "))," ",C,n.marker("^").repeat(T)].join(""),D&&r.message&&(E+=" "+n.message(r.message))}return[n.marker(">"),n.gutter(y),s.length>0?` ${s}`:"",E].join("")}else return` ${n.gutter(y)}${s.length>0?` ${s}`:""}`}).join(`
|
|
16
|
-
`);return r.message&&!m&&(d=`${" ".repeat(h+1)}${r.message}
|
|
17
|
-
${d}`),i?n.reset(d):d}function Yd(t,e,r,i={}){if(!Zo){Zo=!0;let l="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(l,"DeprecationWarning");else{let a=new Error(l);a.name="DeprecationWarning",console.warn(new Error(l))}}return r=Math.max(r,0),sa(t,{start:{column:r,line:e}},i)}Dt.codeFrameColumns=sa;Dt.default=Yd;Dt.highlight=na});var Oi=R((f0,ua)=>{"use strict";b();var rh=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};ua.exports=rh});var Bi=R((m0,la)=>{"use strict";b();var ih="2.0.0",nh=Number.MAX_SAFE_INTEGER||9007199254740991,sh=16,oh=250,ah=["major","premajor","minor","preminor","patch","prepatch","prerelease"];la.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:sh,MAX_SAFE_BUILD_LENGTH:oh,MAX_SAFE_INTEGER:nh,RELEASE_TYPES:ah,SEMVER_SPEC_VERSION:ih,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var da=R((he,ca)=>{"use strict";b();var{MAX_SAFE_COMPONENT_LENGTH:_i,MAX_SAFE_BUILD_LENGTH:uh,MAX_LENGTH:lh}=Bi(),ch=Oi();he=ca.exports={};var dh=he.re=[],hh=he.safeRe=[],w=he.src=[],fh=he.safeSrc=[],k=he.t={},ph=0,Ui="[a-zA-Z0-9-]",mh=[["\\s",1],["\\d",lh],[Ui,uh]],gh=t=>{for(let[e,r]of mh)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},P=(t,e,r)=>{let i=gh(e),n=ph++;ch(t,n,e),k[t]=n,w[n]=e,fh[n]=i,dh[n]=new RegExp(e,r?"g":void 0),hh[n]=new RegExp(i,r?"g":void 0)};P("NUMERICIDENTIFIER","0|[1-9]\\d*");P("NUMERICIDENTIFIERLOOSE","\\d+");P("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Ui}*`);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",`${Ui}+`);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,${_i}})(?:\\.(\\d{1,${_i}}))?(?:\\.(\\d{1,${_i}}))?`);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);he.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);he.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);he.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 fa=R((S0,ha)=>{"use strict";b();var yh=Object.freeze({loose:!0}),Sh=Object.freeze({}),bh=t=>t?typeof t!="object"?yh:t:Sh;ha.exports=bh});var ya=R((x0,ga)=>{"use strict";b();var pa=/^[0-9]+$/,ma=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=pa.test(t),i=pa.test(e);return r&&i&&(t=+t,e=+e),t===e?0:r&&!i?-1:i&&!r?1:t<e?-1:1},xh=(t,e)=>ma(e,t);ga.exports={compareIdentifiers:ma,rcompareIdentifiers:xh}});var xa=R((D0,ba)=>{"use strict";b();var ir=Oi(),{MAX_LENGTH:Sa,MAX_SAFE_INTEGER:nr}=Bi(),{safeRe:sr,t:or}=da(),vh=fa(),{compareIdentifiers:ji}=ya(),Gi=class t{constructor(e,r){if(r=vh(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Sa)throw new TypeError(`version is longer than ${Sa} characters`);ir("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let i=e.trim().match(r.loose?sr[or.LOOSE]:sr[or.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>nr||this.major<0)throw new TypeError("Invalid major version");if(this.minor>nr||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>nr||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let l=+n;if(l>=0&&l<nr)return l}return n}):this.prerelease=[],this.build=i[5]?i[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(e){if(ir("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let i=this.prerelease[r],n=e.prerelease[r];if(ir("prerelease compare",r,i,n),i===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(i===void 0)return-1;if(i===n)continue;return ji(i,n)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let i=this.build[r],n=e.build[r];if(ir("build compare",r,i,n),i===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(i===void 0)return-1;if(i===n)continue;return ji(i,n)}while(++r)}inc(e,r,i){if(e.startsWith("pre")){if(!r&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let n=`-${r}`.match(this.options.loose?sr[or.PRERELEASELOOSE]:sr[or.PRERELEASE]);if(!n||n[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,i),this.inc("pre",r,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,i),this.inc("pre",r,i);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 n=Number(i)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let l=this.prerelease.length;for(;--l>=0;)typeof this.prerelease[l]=="number"&&(this.prerelease[l]++,l=-2);if(l===-1){if(r===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let l=[r,n];i===!1&&(l=[r]),ji(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=l):this.prerelease=l}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};ba.exports=Gi});var $i=R((C0,Da)=>{"use strict";b();var va=xa(),Dh=(t,e,r=!1)=>{if(t instanceof va)return t;try{return new va(t,e)}catch(i){if(!r)return null;throw i}};Da.exports=Dh});var Ca=R((w0,Ea)=>{"use strict";b();var Eh=$i(),Ch=(t,e)=>{let r=Eh(t,e);return r?r.version:null};Ea.exports=Ch});var wa=R((T0,Aa)=>{"use strict";b();var Ah=$i(),wh=(t,e)=>{let r=Ah(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};Aa.exports=wh});var qi=R((I0,kh)=>{kh.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 ka=R((R0,Th)=>{Th.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 Ta=R((L0,Fh)=>{Fh.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 Ia=R((P0,Fa)=>{"use strict";b();var Ih=[].concat(qi()).concat(ka()),Rh=Ta();Fa.exports=function(t){var e=0;function r(){return e<t.length}function i(o){if(o instanceof RegExp){var u=t.slice(e),c=u.match(o);if(c)return e+=c[0].length,c[0]}else if(t.indexOf(o,e)===e)return e+=o.length,o}function n(){i(/[ ]*/)}function l(){for(var o,u=["WITH","AND","OR","(",")",":","+"],c=0;c<u.length&&(o=i(u[c]),!o);c++);if(o==="+"&&e>1&&t[e-2]===" ")throw new Error("Space before `+`");return o&&{type:"OPERATOR",string:o}}function a(){return i(/[A-Za-z0-9-.]+/)}function f(){var o=a();if(!o)throw new Error("Expected idstring at offset "+e);return o}function p(){if(i("DocumentRef-")){var o=f();return{type:"DOCUMENTREF",string:o}}}function m(){if(i("LicenseRef-")){var o=f();return{type:"LICENSEREF",string:o}}}function h(){var o=e,u=a();if(Ih.indexOf(u)!==-1)return{type:"LICENSE",string:u};if(Rh.indexOf(u)!==-1)return{type:"EXCEPTION",string:u};e=o}function g(){return l()||p()||m()||h()}for(var d=[];r()&&(n(),!!r());){var s=g();if(!s)throw new Error("Unexpected `"+t[e]+"` at offset "+e);d.push(s)}return d}});var La=R((N0,Ra)=>{"use strict";b();Ra.exports=function(t){var e=0;function r(){return e<t.length}function i(){return r()?t[e]:null}function n(){if(!r())throw new Error;e++}function l(u){var c=i();if(c&&c.type==="OPERATOR"&&u===c.string)return n(),c.string}function a(){if(l("WITH")){var u=i();if(u&&u.type==="EXCEPTION")return n(),u.string;throw new Error("Expected exception after `WITH`")}}function f(){var u=e,c="",y=i();if(y.type==="DOCUMENTREF"&&(n(),c+="DocumentRef-"+y.string+":",!l(":")))throw new Error("Expected `:` after `DocumentRef-...`");if(y=i(),y.type==="LICENSEREF")return n(),c+="LicenseRef-"+y.string,{license:c};e=u}function p(){var u=i();if(u&&u.type==="LICENSE"){n();var c={license:u.string};l("+")&&(c.plus=!0);var y=a();return y&&(c.exception=y),c}}function m(){var u=l("(");if(u){var c=s();if(!l(")"))throw new Error("Expected `)`");return c}}function h(){return m()||f()||p()}function g(u,c){return function y(){var S=c();if(S){if(!l(u))return S;var D=y();if(!D)throw new Error("Expected expression");return{left:S,conjunction:u.toLowerCase(),right:D}}}}var d=g("AND",h),s=g("OR",d),o=s();if(!o||r())throw new Error("Syntax error");return o}});var Hi=R((B0,Pa)=>{"use strict";b();var Lh=Ia(),Ph=La();Pa.exports=function(t){return Ph(Lh(t))}});var $a=R((U0,Ga)=>{b();var Mh=Hi(),Nh=qi();function ar(t){try{return Mh(t),!0}catch{return!1}}function ja(t,e){var r=e[0].length-t[0].length;return r!==0?r:t[0].toUpperCase().localeCompare(e[0].toUpperCase())}var Ma=[["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(ja),Oh=0,Bh=1,Na=[function(t){return t.toUpperCase()},function(t){return t.trim()},function(t){return t.replace(/\./g,"")},function(t){return t.replace(/\s+/g,"")},function(t){return t.replace(/\s+/g,"-")},function(t){return t.replace("v","-")},function(t){return t.replace(/,?\s*(\d)/,"-$1")},function(t){return t.replace(/,?\s*(\d)/,"-$1.0")},function(t){return t.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2")},function(t){return t.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2.0")},function(t){return t[0].toUpperCase()+t.slice(1)},function(t){return t.replace("/","-")},function(t){return t.replace(/\s*V\s*(\d)/,"-$1").replace(/(\d)$/,"$1.0")},function(t){return t.indexOf("3.0")!==-1?t+"-or-later":t+"-only"},function(t){return t+"only"},function(t){return t.replace(/(\d)$/,"-$1.0")},function(t){return t.replace(/(-| )?(\d)$/,"-$2-Clause")},function(t){return t.replace(/(-| )clause(-| )(\d)/,"-$3-Clause")},function(t){return t.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,"BSD-3-Clause")},function(t){return t.replace(/\bSimplified(-| )?BSD((-| )License)?/i,"BSD-2-Clause")},function(t){return t.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i,"BSD-2-Clause-$1BSD")},function(t){return t.replace(/\bClear(-| )?BSD((-| )License)?/i,"BSD-3-Clause-Clear")},function(t){return t.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i,"BSD-4-Clause")},function(t){return"CC-"+t},function(t){return"CC-"+t+"-4.0"},function(t){return t.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")},function(t){return"CC-"+t.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")+"-4.0"}],Wi=Nh.map(function(t){var e=/^(.*)-\d+\.\d+$/.exec(t);return e?[e[0],e[1]]:[t,null]}).reduce(function(t,e){var r=e[1];return t[r]=t[r]||[],t[r].push(e[0]),t},{}),_h=Object.keys(Wi).map(function(e){return[e,Wi[e]]}).filter(function(e){return e[1].length===1&&e[0]!==null&&e[0]!=="APL"}).map(function(e){return[e[0],e[1][0]]});Wi=void 0;var Oa=[["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(_h).sort(ja),Uh=0,jh=1,Ba=function(t){for(var e=0;e<Na.length;e++){var r=Na[e](t).trim();if(r!==t&&ar(r))return r}return null},_a=function(t){for(var e=t.toUpperCase(),r=0;r<Oa.length;r++){var i=Oa[r];if(e.indexOf(i[Uh])>-1)return i[jh]}return null},Ua=function(t,e){for(var r=0;r<Ma.length;r++){var i=Ma[r],n=i[Oh];if(t.indexOf(n)>-1){var l=t.replace(n,i[Bh]),a=e(l);if(a!==null)return a}}return null};Ga.exports=function(t,e){e=e||{};var r=e.upgrade===void 0?!0:!!e.upgrade;function i(f){return r?Gh(f):f}var n=typeof t=="string"&&t.trim().length!==0;if(!n)throw Error("Invalid argument. Expected non-empty string.");if(t=t.trim(),ar(t))return i(t);var l=t.replace(/\+$/,"").trim();if(ar(l))return i(l);var a=Ba(t);return a!==null||(a=Ua(t,function(f){return ar(f)?f:Ba(f)}),a!==null)||(a=_a(t),a!==null)||(a=Ua(t,_a),a!==null)?i(a):null};function Gh(t){return["GPL-1.0","LGPL-1.0","AGPL-1.0","GPL-2.0","LGPL-2.0","AGPL-2.0","LGPL-2.1"].indexOf(t)!==-1?t+"-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(t)!==-1?t.replace(/\+$/,"-or-later"):["GPL-3.0","LGPL-3.0","AGPL-3.0"].indexOf(t)!==-1?t+"-or-later":t}});var za=R((G0,Wa)=>{b();var $h=Hi(),qh=$a(),qa='license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"',Hh=/^SEE LICEN[CS]E IN (.+)$/;function Ha(t,e){return e.slice(0,t.length)===t}function zi(t){if(t.hasOwnProperty("license")){var e=t.license;return Ha("LicenseRef",e)||Ha("DocumentRef",e)}else return zi(t.left)||zi(t.right)}Wa.exports=function(t){var e;try{e=$h(t)}catch{var r;if(t==="UNLICENSED"||t==="UNLICENCED")return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(r=Hh.exec(t))return{validForOldPackages:!0,validForNewPackages:!0,inFile:r[1]};var i={validForOldPackages:!1,validForNewPackages:!1,warnings:[qa]};if(t.trim().length!==0){var n=qh(t);n&&i.warnings.push('license is similar to the valid expression "'+n+'"')}return i}return zi(e)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[qa]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}}});var Ya=R(lr=>{"use strict";b();Object.defineProperty(lr,"__esModule",{value:!0});lr.LRUCache=void 0;var et=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Ja=new Set,Xi=typeof process=="object"&&process?process:{},Va=(t,e,r,i)=>{typeof Xi.emitWarning=="function"?Xi.emitWarning(t,e,r,i):console.error(`[${r}] ${e}: ${t}`)},ur=globalThis.AbortController,Xa=globalThis.AbortSignal;if(typeof ur>"u"){Xa=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n)}},ur=class{constructor(){e()}signal=new Xa;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let n of this.signal._onabort)n(i);this.signal.onabort?.(i)}}};let t=Xi.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,Va("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",e))}}var Wh=t=>!Ja.has(t),W0=Symbol("type"),Te=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Ka=t=>Te(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?tt:null:null,tt=class extends Array{constructor(e){super(e),this.fill(0)}},Ji=class t{heap;length;static#i=!1;static create(e){let r=Ka(e);if(!r)return[];t.#i=!0;let i=new t(e,r);return t.#i=!1,i}constructor(e,r){if(!t.#i)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Vi=class t{#i;#s;#t;#f;#A;#w;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#y;#o;#n;#e;#d;#p;#c;#u;#S;#l;#b;#x;#m;#v;#T;#h;static unsafeExposeInternals(e){return{starts:e.#x,ttls:e.#m,sizes:e.#b,keyMap:e.#o,keyList:e.#n,valList:e.#e,next:e.#d,prev:e.#p,get head(){return e.#c},get tail(){return e.#u},free:e.#S,isBackgroundFetch:r=>e.#r(r),backgroundFetch:(r,i,n,l)=>e.#M(r,i,n,l),moveToTail:r=>e.#R(r),indexes:r=>e.#D(r),rindexes:r=>e.#E(r),isStale:r=>e.#g(r)}}get max(){return this.#i}get maxSize(){return this.#s}get calculatedSize(){return this.#y}get size(){return this.#a}get fetchMethod(){return this.#A}get memoMethod(){return this.#w}get dispose(){return this.#t}get disposeAfter(){return this.#f}constructor(e){let{max:r=0,ttl:i,ttlResolution:n=1,ttlAutopurge:l,updateAgeOnGet:a,updateAgeOnHas:f,allowStale:p,dispose:m,disposeAfter:h,noDisposeOnSet:g,noUpdateTTL:d,maxSize:s=0,maxEntrySize:o=0,sizeCalculation:u,fetchMethod:c,memoMethod:y,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:D,allowStaleOnFetchRejection:E,allowStaleOnFetchAbort:C,ignoreFetchAbort:T}=e;if(r!==0&&!Te(r))throw new TypeError("max option must be a nonnegative integer");let I=r?Ka(r):Array;if(!I)throw new Error("invalid max value: "+r);if(this.#i=r,this.#s=s,this.maxEntrySize=o||this.#s,this.sizeCalculation=u,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.#A=c,this.#T=!!c,this.#o=new Map,this.#n=new Array(r).fill(void 0),this.#e=new Array(r).fill(void 0),this.#d=new I(r),this.#p=new I(r),this.#c=0,this.#u=0,this.#S=Ji.create(r),this.#a=0,this.#y=0,typeof m=="function"&&(this.#t=m),typeof h=="function"?(this.#f=h,this.#l=[]):(this.#f=void 0,this.#l=void 0),this.#v=!!this.#t,this.#h=!!this.#f,this.noDisposeOnSet=!!g,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!S,this.allowStaleOnFetchRejection=!!E,this.allowStaleOnFetchAbort=!!C,this.ignoreFetchAbort=!!T,this.maxEntrySize!==0){if(this.#s!==0&&!Te(this.#s))throw new TypeError("maxSize must be a positive integer if specified");if(!Te(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#G()}if(this.allowStale=!!p,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!f,this.ttlResolution=Te(n)||n===0?n:1,this.ttlAutopurge=!!l,this.ttl=i||0,this.ttl){if(!Te(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#N()}if(this.#i===0&&this.ttl===0&&this.#s===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#i&&!this.#s){let O="LRU_CACHE_UNBOUNDED";Wh(O)&&(Ja.add(O),Va("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",O,t))}}getRemainingTTL(e){return this.#o.has(e)?1/0:0}#N(){let e=new tt(this.#i),r=new tt(this.#i);this.#m=e,this.#x=r,this.#O=(l,a,f=et.now())=>{if(r[l]=a!==0?f:0,e[l]=a,a!==0&&this.ttlAutopurge){let p=setTimeout(()=>{this.#g(l)&&this.#C(this.#n[l],"expire")},a+1);p.unref&&p.unref()}},this.#F=l=>{r[l]=e[l]!==0?et.now():0},this.#k=(l,a)=>{if(e[a]){let f=e[a],p=r[a];if(!f||!p)return;l.ttl=f,l.start=p,l.now=i||n();let m=l.now-p;l.remainingTTL=f-m}};let i=0,n=()=>{let l=et.now();if(this.ttlResolution>0){i=l;let a=setTimeout(()=>i=0,this.ttlResolution);a.unref&&a.unref()}return l};this.getRemainingTTL=l=>{let a=this.#o.get(l);if(a===void 0)return 0;let f=e[a],p=r[a];if(!f||!p)return 1/0;let m=(i||n())-p;return f-m},this.#g=l=>{let a=r[l],f=e[l];return!!f&&!!a&&(i||n())-a>f}}#F=()=>{};#k=()=>{};#O=()=>{};#g=()=>!1;#G(){let e=new tt(this.#i);this.#y=0,this.#b=e,this.#I=r=>{this.#y-=e[r],e[r]=0},this.#B=(r,i,n,l)=>{if(this.#r(i))return 0;if(!Te(n))if(l){if(typeof l!="function")throw new TypeError("sizeCalculation must be a function");if(n=l(i,r),!Te(n))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 n},this.#L=(r,i,n)=>{if(e[r]=i,this.#s){let l=this.#s-e[r];for(;this.#y>l;)this.#P(!0)}this.#y+=e[r],n&&(n.entrySize=i,n.totalCalculatedSize=this.#y)}}#I=e=>{};#L=(e,r,i)=>{};#B=(e,r,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#D({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#u;!(!this.#_(r)||((e||!this.#g(r))&&(yield r),r===this.#c));)r=this.#p[r]}*#E({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#c;!(!this.#_(r)||((e||!this.#g(r))&&(yield r),r===this.#u));)r=this.#d[r]}#_(e){return e!==void 0&&this.#o.get(this.#n[e])===e}*entries(){for(let e of this.#D())this.#e[e]!==void 0&&this.#n[e]!==void 0&&!this.#r(this.#e[e])&&(yield[this.#n[e],this.#e[e]])}*rentries(){for(let e of this.#E())this.#e[e]!==void 0&&this.#n[e]!==void 0&&!this.#r(this.#e[e])&&(yield[this.#n[e],this.#e[e]])}*keys(){for(let e of this.#D()){let r=this.#n[e];r!==void 0&&!this.#r(this.#e[e])&&(yield r)}}*rkeys(){for(let e of this.#E()){let r=this.#n[e];r!==void 0&&!this.#r(this.#e[e])&&(yield r)}}*values(){for(let e of this.#D())this.#e[e]!==void 0&&!this.#r(this.#e[e])&&(yield this.#e[e])}*rvalues(){for(let e of this.#E())this.#e[e]!==void 0&&!this.#r(this.#e[e])&&(yield this.#e[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let i of this.#D()){let n=this.#e[i],l=this.#r(n)?n.__staleWhileFetching:n;if(l!==void 0&&e(l,this.#n[i],this))return this.get(this.#n[i],r)}}forEach(e,r=this){for(let i of this.#D()){let n=this.#e[i],l=this.#r(n)?n.__staleWhileFetching:n;l!==void 0&&e.call(r,l,this.#n[i],this)}}rforEach(e,r=this){for(let i of this.#E()){let n=this.#e[i],l=this.#r(n)?n.__staleWhileFetching:n;l!==void 0&&e.call(r,l,this.#n[i],this)}}purgeStale(){let e=!1;for(let r of this.#E({allowStale:!0}))this.#g(r)&&(this.#C(this.#n[r],"expire"),e=!0);return e}info(e){let r=this.#o.get(e);if(r===void 0)return;let i=this.#e[r],n=this.#r(i)?i.__staleWhileFetching:i;if(n===void 0)return;let l={value:n};if(this.#m&&this.#x){let a=this.#m[r],f=this.#x[r];if(a&&f){let p=a-(et.now()-f);l.ttl=p,l.start=Date.now()}}return this.#b&&(l.size=this.#b[r]),l}dump(){let e=[];for(let r of this.#D({allowStale:!0})){let i=this.#n[r],n=this.#e[r],l=this.#r(n)?n.__staleWhileFetching:n;if(l===void 0||i===void 0)continue;let a={value:l};if(this.#m&&this.#x){a.ttl=this.#m[r];let f=et.now()-this.#x[r];a.start=Math.floor(Date.now()-f)}this.#b&&(a.size=this.#b[r]),e.unshift([i,a])}return e}load(e){this.clear();for(let[r,i]of e){if(i.start){let n=Date.now()-i.start;i.start=et.now()-n}this.set(r,i.value,i)}}set(e,r,i={}){if(r===void 0)return this.delete(e),this;let{ttl:n=this.ttl,start:l,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:f=this.sizeCalculation,status:p}=i,{noUpdateTTL:m=this.noUpdateTTL}=i,h=this.#B(e,r,i.size||0,f);if(this.maxEntrySize&&h>this.maxEntrySize)return p&&(p.set="miss",p.maxEntrySizeExceeded=!0),this.#C(e,"set"),this;let g=this.#a===0?void 0:this.#o.get(e);if(g===void 0)g=this.#a===0?this.#u:this.#S.length!==0?this.#S.pop():this.#a===this.#i?this.#P(!1):this.#a,this.#n[g]=e,this.#e[g]=r,this.#o.set(e,g),this.#d[this.#u]=g,this.#p[g]=this.#u,this.#u=g,this.#a++,this.#L(g,h,p),p&&(p.set="add"),m=!1;else{this.#R(g);let d=this.#e[g];if(r!==d){if(this.#T&&this.#r(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:s}=d;s!==void 0&&!a&&(this.#v&&this.#t?.(s,e,"set"),this.#h&&this.#l?.push([s,e,"set"]))}else a||(this.#v&&this.#t?.(d,e,"set"),this.#h&&this.#l?.push([d,e,"set"]));if(this.#I(g),this.#L(g,h,p),this.#e[g]=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(n!==0&&!this.#m&&this.#N(),this.#m&&(m||this.#O(g,n,l),p&&this.#k(p,g)),!a&&this.#h&&this.#l){let d=this.#l,s;for(;s=d?.shift();)this.#f?.(...s)}return this}pop(){try{for(;this.#a;){let e=this.#e[this.#c];if(this.#P(!0),this.#r(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#h&&this.#l){let e=this.#l,r;for(;r=e?.shift();)this.#f?.(...r)}}}#P(e){let r=this.#c,i=this.#n[r],n=this.#e[r];return this.#T&&this.#r(n)?n.__abortController.abort(new Error("evicted")):(this.#v||this.#h)&&(this.#v&&this.#t?.(n,i,"evict"),this.#h&&this.#l?.push([n,i,"evict"])),this.#I(r),e&&(this.#n[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(i),this.#a--,r}has(e,r={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=r,l=this.#o.get(e);if(l!==void 0){let a=this.#e[l];if(this.#r(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#g(l))n&&(n.has="stale",this.#k(n,l));else return i&&this.#F(l),n&&(n.has="hit",this.#k(n,l)),!0}else n&&(n.has="miss");return!1}peek(e,r={}){let{allowStale:i=this.allowStale}=r,n=this.#o.get(e);if(n===void 0||!i&&this.#g(n))return;let l=this.#e[n];return this.#r(l)?l.__staleWhileFetching:l}#M(e,r,i,n){let l=r===void 0?void 0:this.#e[r];if(this.#r(l))return l;let a=new ur,{signal:f}=i;f?.addEventListener("abort",()=>a.abort(f.reason),{signal:a.signal});let p={signal:a.signal,options:i,context:n},m=(u,c=!1)=>{let{aborted:y}=a.signal,S=i.ignoreFetchAbort&&u!==void 0;if(i.status&&(y&&!c?(i.status.fetchAborted=!0,i.status.fetchError=a.signal.reason,S&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),y&&!S&&!c)return g(a.signal.reason);let D=s;return this.#e[r]===s&&(u===void 0?D.__staleWhileFetching?this.#e[r]=D.__staleWhileFetching:this.#C(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(e,u,p.options))),u},h=u=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=u),g(u)),g=u=>{let{aborted:c}=a.signal,y=c&&i.allowStaleOnFetchAbort,S=y||i.allowStaleOnFetchRejection,D=S||i.noDeleteOnFetchRejection,E=s;if(this.#e[r]===s&&(!D||E.__staleWhileFetching===void 0?this.#C(e,"fetch"):y||(this.#e[r]=E.__staleWhileFetching)),S)return i.status&&E.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),E.__staleWhileFetching;if(E.__returned===E)throw u},d=(u,c)=>{let y=this.#A?.(e,l,p);y&&y instanceof Promise&&y.then(S=>u(S===void 0?void 0:S),c),a.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(u(void 0),i.allowStaleOnFetchAbort&&(u=S=>m(S,!0)))})};i.status&&(i.status.fetchDispatched=!0);let s=new Promise(d).then(m,h),o=Object.assign(s,{__abortController:a,__staleWhileFetching:l,__returned:void 0});return r===void 0?(this.set(e,o,{...p.options,status:void 0}),r=this.#o.get(e)):this.#e[r]=o,o}#r(e){if(!this.#T)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof ur}async fetch(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:f=this.noDisposeOnSet,size:p=0,sizeCalculation:m=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:g=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:s=this.ignoreFetchAbort,allowStaleOnFetchAbort:o=this.allowStaleOnFetchAbort,context:u,forceRefresh:c=!1,status:y,signal:S}=r;if(!this.#T)return y&&(y.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:l,status:y});let D={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:l,ttl:a,noDisposeOnSet:f,size:p,sizeCalculation:m,noUpdateTTL:h,noDeleteOnFetchRejection:g,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:o,ignoreFetchAbort:s,status:y,signal:S},E=this.#o.get(e);if(E===void 0){y&&(y.fetch="miss");let C=this.#M(e,E,D,u);return C.__returned=C}else{let C=this.#e[E];if(this.#r(C)){let $=i&&C.__staleWhileFetching!==void 0;return y&&(y.fetch="inflight",$&&(y.returnedStale=!0)),$?C.__staleWhileFetching:C.__returned=C}let T=this.#g(E);if(!c&&!T)return y&&(y.fetch="hit"),this.#R(E),n&&this.#F(E),y&&this.#k(y,E),C;let I=this.#M(e,E,D,u),j=I.__staleWhileFetching!==void 0&&i;return y&&(y.fetch=T?"stale":"refresh",j&&T&&(y.returnedStale=!0)),j?I.__staleWhileFetching:I.__returned=I}}async forceFetch(e,r={}){let i=await this.fetch(e,r);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,r={}){let i=this.#w;if(!i)throw new Error("no memoMethod provided to constructor");let{context:n,forceRefresh:l,...a}=r,f=this.get(e,a);if(!l&&f!==void 0)return f;let p=i(e,f,{options:a,context:n});return this.set(e,p,a),p}get(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,status:a}=r,f=this.#o.get(e);if(f!==void 0){let p=this.#e[f],m=this.#r(p);return a&&this.#k(a,f),this.#g(f)?(a&&(a.get="stale"),m?(a&&i&&p.__staleWhileFetching!==void 0&&(a.returnedStale=!0),i?p.__staleWhileFetching:void 0):(l||this.#C(e,"expire"),a&&i&&(a.returnedStale=!0),i?p:void 0)):(a&&(a.get="hit"),m?p.__staleWhileFetching:(this.#R(f),n&&this.#F(f),p))}else a&&(a.get="miss")}#U(e,r){this.#p[r]=e,this.#d[e]=r}#R(e){e!==this.#u&&(e===this.#c?this.#c=this.#d[e]:this.#U(this.#p[e],this.#d[e]),this.#U(this.#u,e),this.#u=e)}delete(e){return this.#C(e,"delete")}#C(e,r){let i=!1;if(this.#a!==0){let n=this.#o.get(e);if(n!==void 0)if(i=!0,this.#a===1)this.#j(r);else{this.#I(n);let l=this.#e[n];if(this.#r(l)?l.__abortController.abort(new Error("deleted")):(this.#v||this.#h)&&(this.#v&&this.#t?.(l,e,r),this.#h&&this.#l?.push([l,e,r])),this.#o.delete(e),this.#n[n]=void 0,this.#e[n]=void 0,n===this.#u)this.#u=this.#p[n];else if(n===this.#c)this.#c=this.#d[n];else{let a=this.#p[n];this.#d[a]=this.#d[n];let f=this.#d[n];this.#p[f]=this.#p[n]}this.#a--,this.#S.push(n)}}if(this.#h&&this.#l?.length){let n=this.#l,l;for(;l=n?.shift();)this.#f?.(...l)}return i}clear(){return this.#j("delete")}#j(e){for(let r of this.#E({allowStale:!0})){let i=this.#e[r];if(this.#r(i))i.__abortController.abort(new Error("deleted"));else{let n=this.#n[r];this.#v&&this.#t?.(i,n,e),this.#h&&this.#l?.push([i,n,e])}}if(this.#o.clear(),this.#e.fill(void 0),this.#n.fill(void 0),this.#m&&this.#x&&(this.#m.fill(0),this.#x.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,i;for(;i=r?.shift();)this.#f?.(...i)}}};lr.LRUCache=Vi});var eu=R((J0,Za)=>{"use strict";b();var U=(...t)=>t.every(e=>e)?t.join(""):"",H=t=>t?encodeURIComponent(t):"",Qa=t=>t.toLowerCase().replace(/^\W+/g,"").replace(/(?<!\W)\W+$/,"").replace(/\//g,"").replace(/\W+/g,"-"),zh={sshtemplate:({domain:t,user:e,project:r,committish:i})=>`git@${t}:${e}/${r}.git${U("#",i)}`,sshurltemplate:({domain:t,user:e,project:r,committish:i})=>`git+ssh://git@${t}/${e}/${r}.git${U("#",i)}`,edittemplate:({domain:t,user:e,project:r,committish:i,editpath:n,path:l})=>`https://${t}/${e}/${r}${U("/",n,"/",H(i||"HEAD"),"/",l)}`,browsetemplate:({domain:t,user:e,project:r,committish:i,treepath:n})=>`https://${t}/${e}/${r}${U("/",n,"/",H(i))}`,browsetreetemplate:({domain:t,user:e,project:r,committish:i,treepath:n,path:l,fragment:a,hashformat:f})=>`https://${t}/${e}/${r}/${n}/${H(i||"HEAD")}/${l}${U("#",f(a||""))}`,browseblobtemplate:({domain:t,user:e,project:r,committish:i,blobpath:n,path:l,fragment:a,hashformat:f})=>`https://${t}/${e}/${r}/${n}/${H(i||"HEAD")}/${l}${U("#",f(a||""))}`,docstemplate:({domain:t,user:e,project:r,treepath:i,committish:n})=>`https://${t}/${e}/${r}${U("/",i,"/",H(n))}#readme`,httpstemplate:({auth:t,domain:e,user:r,project:i,committish:n})=>`git+https://${U(t,"@")}${e}/${r}/${i}.git${U("#",n)}`,filetemplate:({domain:t,user:e,project:r,committish:i,path:n})=>`https://${t}/${e}/${r}/raw/${H(i||"HEAD")}/${n}`,shortcuttemplate:({type:t,user:e,project:r,committish:i})=>`${t}:${e}/${r}${U("#",i)}`,pathtemplate:({user:t,project:e,committish:r})=>`${t}/${e}${U("#",r)}`,bugstemplate:({domain:t,user:e,project:r})=>`https://${t}/${e}/${r}/issues`,hashformat:Qa},Fe={};Fe.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:t,user:e,project:r,committish:i,path:n})=>`https://${U(t,"@")}raw.githubusercontent.com/${e}/${r}/${H(i||"HEAD")}/${n}`,gittemplate:({auth:t,domain:e,user:r,project:i,committish:n})=>`git://${U(t,"@")}${e}/${r}/${i}.git${U("#",n)}`,tarballtemplate:({domain:t,user:e,project:r,committish:i})=>`https://codeload.${t}/${e}/${r}/tar.gz/${H(i||"HEAD")}`,extract:t=>{let[,e,r,i,n]=t.pathname.split("/",5);if(!(i&&i!=="tree")&&(i||(n=t.hash.slice(1)),r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:n}}};Fe.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:t,user:e,project:r,committish:i,treepath:n,path:l,editpath:a})=>`https://${t}/${e}/${r}${U("/",n,"/",H(i||"HEAD"),"/",l,a)}`,tarballtemplate:({domain:t,user:e,project:r,committish:i})=>`https://${t}/${e}/${r}/get/${H(i||"HEAD")}.tar.gz`,extract:t=>{let[,e,r,i]=t.pathname.split("/",4);if(!["get"].includes(i)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}}};Fe.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:({auth:t,domain:e,user:r,project:i,committish:n})=>`git+https://${U(t,"@")}${e}/${r}/${i}.git${U("#",n)}`,tarballtemplate:({domain:t,user:e,project:r,committish:i})=>`https://${t}/${e}/${r}/repository/archive.tar.gz?ref=${H(i||"HEAD")}`,extract:t=>{let e=t.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let r=e.split("/"),i=r.pop();i.endsWith(".git")&&(i=i.slice(0,-4));let n=r.join("/");if(!(!n||!i))return{user:n,project:i,committish:t.hash.slice(1)}}};Fe.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:t,project:e,committish:r})=>`git@${t}:${e}.git${U("#",r)}`,sshurltemplate:({domain:t,project:e,committish:r})=>`git+ssh://git@${t}/${e}.git${U("#",r)}`,edittemplate:({domain:t,user:e,project:r,committish:i,editpath:n})=>`https://${t}/${e}/${r}${U("/",H(i))}/${n}`,browsetemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${U("/",H(r))}`,browsetreetemplate:({domain:t,project:e,committish:r,path:i,hashformat:n})=>`https://${t}/${e}${U("/",H(r))}${U("#",n(i))}`,browseblobtemplate:({domain:t,project:e,committish:r,path:i,hashformat:n})=>`https://${t}/${e}${U("/",H(r))}${U("#",n(i))}`,docstemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${U("/",H(r))}`,httpstemplate:({domain:t,project:e,committish:r})=>`git+https://${t}/${e}.git${U("#",r)}`,filetemplate:({user:t,project:e,committish:r,path:i})=>`https://gist.githubusercontent.com/${t}/${e}/raw${U("/",H(r))}/${i}`,shortcuttemplate:({type:t,project:e,committish:r})=>`${t}:${e}${U("#",r)}`,pathtemplate:({project:t,committish:e})=>`${t}${U("#",e)}`,bugstemplate:({domain:t,project:e})=>`https://${t}/${e}`,gittemplate:({domain:t,project:e,committish:r})=>`git://${t}/${e}.git${U("#",r)}`,tarballtemplate:({project:t,committish:e})=>`https://codeload.github.com/gist/${t}/tar.gz/${H(e||"HEAD")}`,extract:t=>{let[,e,r,i]=t.pathname.split("/",4);if(i!=="raw"){if(!r){if(!e)return;r=e,e=null}return r.endsWith(".git")&&(r=r.slice(0,-4)),{user:e,project:r,committish:t.hash.slice(1)}}},hashformat:function(t){return t&&"file-"+Qa(t)}};Fe.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:t,user:e,project:r,committish:i,path:n})=>`https://${t}/${e}/${r}/blob/${H(i)||"HEAD"}/${n}`,httpstemplate:({domain:t,user:e,project:r,committish:i})=>`https://${t}/${e}/${r}.git${U("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:i})=>`https://${t}/${e}/${r}/archive/${H(i)||"HEAD"}.tar.gz`,bugstemplate:()=>null,extract:t=>{let[,e,r,i]=t.pathname.split("/",4);if(!["archive"].includes(i)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}}};for(let[t,e]of Object.entries(Fe))Fe[t]=Object.assign({},zh,e);Za.exports=Fe});var Yi=R((K0,ru)=>{b();var Xh=ot("url"),Ki=(t,e,r)=>{let i=t.indexOf(r);return t.lastIndexOf(e,i>-1?i:1/0)},tu=t=>{try{return new Xh.URL(t)}catch{}},Jh=(t,e)=>{let r=t.indexOf(":"),i=t.slice(0,r+1);if(Object.prototype.hasOwnProperty.call(e,i))return t;let n=t.indexOf("@");return n>-1?n>r?`git+ssh://${t}`:t:t.indexOf("//")===r+1?t:`${t.slice(0,r+1)}//${t.slice(r+1)}`},Vh=t=>{let e=Ki(t,"@","#"),r=Ki(t,":","#");return r>e&&(t=t.slice(0,r)+"/"+t.slice(r+1)),Ki(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`git+ssh://${t}`),t};ru.exports=(t,e)=>{let r=e?Jh(t,e):t;return tu(r)||tu(Vh(r))}});var nu=R((Q0,iu)=>{"use strict";b();var Kh=Yi(),Yh=t=>{let e=t.indexOf("#"),r=t.indexOf("/"),i=t.indexOf("/",r+1),n=t.indexOf(":"),l=/\s/.exec(t),a=t.indexOf("@"),f=!l||e>-1&&l.index>e,p=a===-1||e>-1&&a>e,m=n===-1||e>-1&&n>e,h=i===-1||e>-1&&i>e,g=r>0,d=e>-1?t[e-1]!=="/":!t.endsWith("/"),s=!t.startsWith(".");return f&&g&&d&&s&&p&&m&&h};iu.exports=(t,e,{gitHosts:r,protocols:i})=>{if(!t)return;let n=Yh(t)?`github:${t}`:t,l=Kh(n,i);if(!l)return;let a=r.byShortcut[l.protocol],f=r.byDomain[l.hostname.startsWith("www.")?l.hostname.slice(4):l.hostname],p=a||f;if(!p)return;let m=r[a||f],h=null;i[l.protocol]?.auth&&(l.username||l.password)&&(h=`${l.username}${l.password?":"+l.password:""}`);let g=null,d=null,s=null,o=null;try{if(a){let u=l.pathname.startsWith("/")?l.pathname.slice(1):l.pathname,c=u.indexOf("@");c>-1&&(u=u.slice(c+1));let y=u.lastIndexOf("/");y>-1?(d=decodeURIComponent(u.slice(0,y)),d||(d=null),s=decodeURIComponent(u.slice(y+1))):s=decodeURIComponent(u),s.endsWith(".git")&&(s=s.slice(0,-4)),l.hash&&(g=decodeURIComponent(l.hash.slice(1))),o="shortcut"}else{if(!m.protocols.includes(l.protocol))return;let u=m.extract(l);if(!u)return;d=u.user&&decodeURIComponent(u.user),s=decodeURIComponent(u.project),g=decodeURIComponent(u.committish),o=i[l.protocol]?.name||l.protocol.slice(0,-1)}}catch(u){if(u instanceof URIError)return;throw u}return[p,d,h,s,g,o,e]}});var ou=R((ey,su)=>{"use strict";b();var{LRUCache:Qh}=Ya(),Zh=eu(),ef=nu(),tf=Yi(),Qi=new Qh({max:1e3});function rf(t){try{let{protocol:e,hostname:r,pathname:i}=new URL(t);if(!r)return null;let n=/(?:git\+)http:$/.test(e)?"http:":"https:",l=i.replace(/\.git$/,"");return`${n}//${r}${l}`}catch{return null}}var cr=class t{constructor(e,r,i,n,l,a,f={}){Object.assign(this,t.#i[e],{type:e,user:r,auth:i,project:n,committish:l,default:a,opts:f})}static#i={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(e,r){t.#i[e]=r,t.#i.byDomain[r.domain]=e,t.#i.byShortcut[`${e}:`]=e,t.#s[`${e}:`]={name:e}}static fromUrl(e,r){if(typeof e!="string")return;let i=e+JSON.stringify(r||{});if(!Qi.has(i)){let n=ef(e,r,{gitHosts:t.#i,protocols:t.#s});Qi.set(i,n?new t(...n):void 0)}return Qi.get(i)}static fromManifest(e,r={}){if(!e||typeof e!="object")return;let i=e.repository,n=i&&(typeof i=="string"?i:typeof i=="object"&&typeof i.url=="string"?i.url:null);if(!n)throw new Error("no repository");let l=n&&t.fromUrl(n.replace(/^git\+/,""),r)||null;if(l)return l;let a=rf(n);return t.fromUrl(a,r)||a}static parseUrl(e){return tf(e)}#t(e,r){if(typeof e!="function")return null;let i={...this,...this.opts,...r};i.path||(i.path=""),i.path.startsWith("/")&&(i.path=i.path.slice(1)),i.noCommittish&&(i.committish=null);let n=e(i);return i.noGitPlus&&n.startsWith("git+")?n.slice(4):n}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return this.#t(this.sshtemplate,e)}sshurl(e){return this.#t(this.sshurltemplate,e)}browse(e,...r){return typeof e!="string"?this.#t(this.browsetemplate,e):typeof r[0]!="string"?this.#t(this.browsetreetemplate,{...r[0],path:e}):this.#t(this.browsetreetemplate,{...r[1],fragment:r[0],path:e})}browseFile(e,...r){return typeof r[0]!="string"?this.#t(this.browseblobtemplate,{...r[0],path:e}):this.#t(this.browseblobtemplate,{...r[1],fragment:r[0],path:e})}docs(e){return this.#t(this.docstemplate,e)}bugs(e){return this.#t(this.bugstemplate,e)}https(e){return this.#t(this.httpstemplate,e)}git(e){return this.#t(this.gittemplate,e)}shortcut(e){return this.#t(this.shortcuttemplate,e)}path(e){return this.#t(this.pathtemplate,e)}tarball(e){return this.#t(this.tarballtemplate,{...e,noCommittish:!1})}file(e,r){return this.#t(this.filetemplate,{...r,path:e})}edit(e,r){return this.#t(this.edittemplate,{...r,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&typeof this[this.default]=="function"?this[this.default](e):this.sshurl(e)}};for(let[t,e]of Object.entries(Zh))cr.addHost(t,e);su.exports=cr});var uu=R((ry,au)=>{b();au.exports=nf;function nf(t){if(!t||t==="ERROR: No README data found!")return;t=t.trim().split(`
|
|
18
|
-
`);let e=0;for(;t[e]&&t[e].trim().match(/^(#|$)/);)e++;let r=t.length,i=e+1;for(;i<r&&t[i].trim();)i++;return t.slice(e,i).join(" ").trim()}});var lu=R((ny,sf)=>{sf.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 fu=R((sy,hu)=>{b();var{URL:Zi}=ot("node:url"),of=Ca(),af=wa(),uf=za(),dr=ou(),{isBuiltin:lf}=ot("node:module"),cf=["dependencies","devDependencies","optionalDependencies"],df=uu(),Ie=lu(),cu=t=>t.includes("@")&&t.indexOf("@")<t.lastIndexOf(".");hu.exports={warn:function(){},fixRepositoryField:function(t){if(t.repositories&&(this.warn("repositories"),t.repository=t.repositories[0]),!t.repository)return this.warn("missingRepository");typeof t.repository=="string"&&(t.repository={type:"git",url:t.repository});var e=t.repository.url||"";if(e){var r=dr.fromUrl(e);r&&(e=t.repository.url=r.getDefaultRepresentation()==="shortcut"?r.https():r.toString())}e.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)&&this.warn("brokenGitUrl",e)},fixTypos:function(t){Object.keys(Ie.topLevel).forEach(function(e){Object.prototype.hasOwnProperty.call(t,e)&&this.warn("typo",e,Ie.topLevel[e])},this)},fixScriptsField:function(t){if(t.scripts){if(typeof t.scripts!="object"){this.warn("nonObjectScripts"),delete t.scripts;return}Object.keys(t.scripts).forEach(function(e){typeof t.scripts[e]!="string"?(this.warn("nonStringScript"),delete t.scripts[e]):Ie.script[e]&&!t.scripts[Ie.script[e]]&&this.warn("typo",e,Ie.script[e],"scripts")},this)}},fixFilesField:function(t){var e=t.files;e&&!Array.isArray(e)?(this.warn("nonArrayFiles"),delete t.files):t.files&&(t.files=t.files.filter(function(r){return!r||typeof r!="string"?(this.warn("invalidFilename",r),!1):!0},this))},fixBinField:function(t){if(t.bin&&typeof t.bin=="string"){var e={},r;(r=t.name.match(/^@[^/]+[/](.*)$/))?e[r[1]]=t.bin:e[t.name]=t.bin,t.bin=e}},fixManField:function(t){t.man&&typeof t.man=="string"&&(t.man=[t.man])},fixBundleDependenciesField:function(t){var e="bundledDependencies",r="bundleDependencies";t[e]&&!t[r]&&(t[r]=t[e],delete t[e]),t[r]&&!Array.isArray(t[r])?(this.warn("nonArrayBundleDependencies"),delete t[r]):t[r]&&(t[r]=t[r].filter(function(i){return!i||typeof i!="string"?(this.warn("nonStringBundleDependency",i),!1):(t.dependencies||(t.dependencies={}),Object.prototype.hasOwnProperty.call(t.dependencies,i)||(this.warn("nonDependencyBundleDependency",i),t.dependencies[i]="*"),!0)},this))},fixDependencies:function(t){bf(t,this.warn),yf(t,this.warn),this.fixBundleDependenciesField(t),["dependencies","devDependencies"].forEach(function(e){if(e in t){if(!t[e]||typeof t[e]!="object"){this.warn("nonObjectDependencies",e),delete t[e];return}Object.keys(t[e]).forEach(function(r){var i=t[e][r];typeof i!="string"&&(this.warn("nonStringDependency",r,JSON.stringify(i)),delete t[e][r]);var n=dr.fromUrl(t[e][r]);n&&(t[e][r]=n.toString())},this)}},this)},fixModulesField:function(t){t.modules&&(this.warn("deprecatedModules"),delete t.modules)},fixKeywordsField:function(t){typeof t.keywords=="string"&&(t.keywords=t.keywords.split(/,\s+/)),t.keywords&&!Array.isArray(t.keywords)?(delete t.keywords,this.warn("nonArrayKeywords")):t.keywords&&(t.keywords=t.keywords.filter(function(e){return typeof e!="string"||!e?(this.warn("nonStringKeyword"),!1):!0},this))},fixVersionField:function(t,e){var r=!e;if(!t.version)return t.version="",!0;if(!of(t.version,r))throw new Error('Invalid version: "'+t.version+'"');return t.version=af(t.version,r),!0},fixPeople:function(t){du(t,mf),du(t,gf)},fixNameField:function(t,e){typeof e=="boolean"?e={strict:e}:typeof e>"u"&&(e={});var r=e.strict;if(!t.name&&!r){t.name="";return}if(typeof t.name!="string")throw new Error("name field must be a string.");r||(t.name=t.name.trim()),pf(t.name,r,e.allowLegacyCase),lf(t.name)&&this.warn("conflictingName",t.name)},fixDescriptionField:function(t){t.description&&typeof t.description!="string"&&(this.warn("nonStringDescription"),delete t.description),t.readme&&!t.description&&(t.description=df(t.readme)),t.description===void 0&&delete t.description,t.description||this.warn("missingDescription")},fixReadmeField:function(t){t.readme||(this.warn("missingReadme"),t.readme="ERROR: No README data found!")},fixBugsField:function(t){if(!t.bugs&&t.repository&&t.repository.url){var e=dr.fromUrl(t.repository.url);e&&e.bugs()&&(t.bugs={url:e.bugs()})}else if(t.bugs){if(typeof t.bugs=="string")cu(t.bugs)?t.bugs={email:t.bugs}:Zi.canParse(t.bugs)?t.bugs={url:t.bugs}:this.warn("nonEmailUrlBugsString");else{xf(t.bugs,this.warn);var r=t.bugs;t.bugs={},r.url&&(Zi.canParse(r.url)?t.bugs.url=r.url:this.warn("nonUrlBugsUrlField")),r.email&&(typeof r.email=="string"&&cu(r.email)?t.bugs.email=r.email:this.warn("nonEmailBugsEmailField"))}!t.bugs.email&&!t.bugs.url&&(delete t.bugs,this.warn("emptyNormalizedBugs"))}},fixHomepageField:function(t){if(!t.homepage&&t.repository&&t.repository.url){var e=dr.fromUrl(t.repository.url);e&&e.docs()&&(t.homepage=e.docs())}if(t.homepage){if(typeof t.homepage!="string")return this.warn("nonUrlHomepage"),delete t.homepage;Zi.canParse(t.homepage)||(t.homepage="http://"+t.homepage)}},fixLicenseField:function(t){let e=t.license||t.licence;if(!e)return this.warn("missingLicense");if(typeof e!="string"||e.length<1||e.trim()==="")return this.warn("invalidLicense");if(!uf(e).validForNewPackages)return this.warn("invalidLicense")}};function hf(t){if(t.charAt(0)!=="@")return!1;var e=t.slice(1).split("/");return e.length!==2?!1:e[0]&&e[1]&&e[0]===encodeURIComponent(e[0])&&e[1]===encodeURIComponent(e[1])}function ff(t){return!t.match(/[/@\s+%:]/)&&t===encodeURIComponent(t)}function pf(t,e,r){if(t.charAt(0)==="."||!(hf(t)||ff(t))||e&&!r&&t!==t.toLowerCase()||t.toLowerCase()==="node_modules"||t.toLowerCase()==="favicon.ico")throw new Error("Invalid name: "+JSON.stringify(t))}function du(t,e){return t.author&&(t.author=e(t.author)),["maintainers","contributors"].forEach(function(r){Array.isArray(t[r])&&(t[r]=t[r].map(e))}),t}function mf(t){if(typeof t=="string")return t;var e=t.name||"",r=t.url||t.web,i=r?" ("+r+")":"",n=t.email||t.mail,l=n?" <"+n+">":"";return e+l+i}function gf(t){if(typeof t!="string")return t;var e=t.match(/^([^(<]+)/),r=t.match(/\(([^()]+)\)/),i=t.match(/<([^<>]+)>/),n={};return e&&e[0].trim()&&(n.name=e[0].trim()),i&&(n.email=i[1]),r&&(n.url=r[1]),n}function yf(t){var e=t.optionalDependencies;if(e){var r=t.dependencies||{};Object.keys(e).forEach(function(i){r[i]=e[i]}),t.dependencies=r}}function Sf(t,e,r){if(!t)return{};if(typeof t=="string"&&(t=t.trim().split(/[\n\r\s\t ,]+/)),!Array.isArray(t))return t;r("deprecatedArrayDependencies",e);var i={};return t.filter(function(n){return typeof n=="string"}).forEach(function(n){n=n.trim().split(/(:?[@\s><=])/);var l=n.shift(),a=n.join("");a=a.trim(),a=a.replace(/^@/,""),i[l]=a}),i}function bf(t,e){cf.forEach(function(r){t[r]&&(t[r]=Sf(t[r],r,e))})}function xf(t,e){t&&Object.keys(t).forEach(function(r){Ie.bugs[r]&&(e("typo",r,Ie.bugs[r],"bugs"),t[Ie.bugs[r]]=t[r],delete t[r])})}});var pu=R((ay,vf)=>{vf.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 yu=R((uy,gu)=>{b();var mu=ot("util"),en=pu();gu.exports=function(){var t=Array.prototype.slice.call(arguments,0),e=t.shift();if(e==="typo")return Df.apply(null,t);var r=en[e]?en[e]:e+": '%s'";return t.unshift(r),mu.format.apply(null,t)};function Df(t,e,r){return r&&(t=r+"['"+t+"']",e=r+"['"+e+"']"),mu.format(en.typo,t,e)}});var vu=R((cy,xu)=>{b();xu.exports=Su;var tn=fu();Su.fixer=tn;var Ef=yu(),Cf=["name","version","description","repository","modules","scripts","files","bin","man","bugs","keywords","readme","homepage","license"],Af=["dependencies","people","typos"],rn=Cf.map(function(t){return bu(t)+"Field"});rn=rn.concat(Af);function Su(t,e,r){e===!0&&(e=null,r=!0),r||(r=!1),(!e||t.private)&&(e=function(){}),t.scripts&&t.scripts.install==="node-gyp rebuild"&&!t.scripts.preinstall&&(t.gypfile=!0),tn.warn=function(){e(Ef.apply(null,arguments))},rn.forEach(function(i){tn["fix"+bu(i)](t,r)}),t._id=t.name+"@"+t.version}function bu(t){return t.charAt(0).toUpperCase()+t.slice(1)}});b();var Hf=1;function rl(t){let e=t?.serverTimestamp;return typeof e=="number"&&Number.isFinite(e)?e:Date.now()}var vr=class extends Error{limit;constructor(e){super(`EventBus subscriber limit reached (${e})`),this.name="SubscriberLimitExceededError",this.limit=e}},yn=class{constructor(e=8e3,r=64,i){this.ringSize=e;this.maxSubscribers=r;this.compactionEngine=i}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(e){if(this.closed)return;let r=e._meta,i={id:this.nextId++,v:1,...e,_meta:{...r??{},serverTimestamp:rl(r)}};this.ring.push(i);try{this.compactionEngine?.ingest(i)}catch{}this.ring.length>this.ringSize&&this.ring.shift();for(let n of Array.from(this.subs)){if(n.evicted)continue;if(!n.queue.push(i)){n.evicted=!0;let a={v:1,type:"client_evicted",data:{reason:"queue_overflow",droppedAfter:i.id}};n.queue.forcePush(a),n.queue.close(),n.dispose();continue}let l=n.queue.size;if(!n.warned&&l>=n.warnThreshold){n.warned=!0;let a={v:1,type:"slow_client_warning",data:{queueSize:l,maxQueued:n.maxQueued,lastEventId:i.id}};n.queue.forcePush(a)}else n.warned&&l<=n.warnResetThreshold&&(n.warned=!1)}return i}subscribe(e={}){if(this.closed)return il();if(this.subs.size>=this.maxSubscribers)throw new vr(this.maxSubscribers);let r=e.maxQueued??256,i=new Dr(r),n={queue:i,evicted:!1,maxQueued:r,warnThreshold:.75*r,warnResetThreshold:.375*r,warned:!1,dispose:()=>{}};if(this.subs.add(n),e.lastEventId!==void 0){let p=e.lastEventId>=this.nextId;if(p)i.forcePush({v:1,type:"state_resync_required",data:{reason:"epoch_reset",lastDeliveredId:e.lastEventId,earliestAvailableId:this.ring[0]?.id??this.nextId}});else{let d=this.ring[0]?.id;d!==void 0&&d>e.lastEventId+1&&i.forcePush({v:1,type:"state_resync_required",data:{reason:"ring_evicted",lastDeliveredId:e.lastEventId,earliestAvailableId:d}})}let m=p?0:e.lastEventId,h=0,g;for(let d of this.ring)d.id!==void 0&&d.id>m&&(i.forcePush(d),h+=1,g=d.id);i.forcePush({v:1,type:"replay_complete",data:{...g!==void 0?{lastReplayedEventId:g,lastEventId:g}:{},replayedCount:h}})}let l=!1,a=()=>{l||(l=!0,this.subs.delete(n),e.signal?.removeEventListener("abort",f))};n.dispose=a;let f=()=>{i.close({drain:!1}),a()};return e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f,{once:!0})),{[Symbol.asyncIterator]:()=>({async next(){let p=await i.next();return p.done&&a(),p},async return(){return i.close(),a(),{value:void 0,done:!0}}})}}close(){if(!this.closed){this.closed=!0;for(let e of this.subs)e.queue.close();this.subs.clear(),this.compactionEngine?.close()}}};function il(){return{[Symbol.asyncIterator]:()=>({async next(){return{value:void 0,done:!0}}})}}var Dr=class{constructor(e){this.maxSize=e}buf=[];resolvers=[];closed=!1;liveCount=0;get size(){return this.liveCount}push(e){if(this.closed)return!1;let r=this.resolvers.shift();return r?(r({value:e,done:!1}),!0):this.liveCount>=this.maxSize?!1:(this.buf.push({value:e,forced:!1}),this.liveCount+=1,!0)}forcePush(e){if(this.closed)return;let r=this.resolvers.shift();if(r){r({value:e,done:!1});return}this.buf.push({value:e,forced:!0})}close(e={}){if(!this.closed)for(this.closed=!0,e.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 e=this.buf.shift();return e.forced||(this.liveCount-=1),Promise.resolve({value:e.value,done:!1})}return this.closed?Promise.resolve({value:void 0,done:!0}):new Promise(e=>this.resolvers.push(e))}};b();b();b();import{realpathSync as nl}from"node:fs";import*as Sn from"node:path";function Yf(t){let e=Sn.resolve(t);try{return nl.native(e)}catch(r){if(r&&typeof r=="object"&&r.code==="ENOENT")return e;throw r}}var Er=4096;var tp="Not currently generating";function rp(t){if(!t||typeof t!="object")return!1;let e=t;return bn(e.message)?!0:!e.data||typeof e.data!="object"?!1:bn(e.data.details)}function bn(t){return typeof t=="string"&&/\bnot currently generating\b/i.test(t)}var xn=class extends Error{sessionId;constructor(e,r){super(`No session with id "${e}"`+(r?`. ${r}`:"")),this.name="SessionNotFoundError",this.sessionId=e}},vn=class extends Error{sessionId;activeAction;requestedAction;constructor(e,r,i){super(`Session "${e}" is already being restored via session/${r}; retry session/${i} after it completes`),this.name="RestoreInProgressError",this.sessionId=e,this.activeAction=r,this.requestedAction=i}},Dn=class extends Error{sessionScope;constructor(e){super(`Invalid sessionScope: ${JSON.stringify(e)}. Expected 'single' or 'thread'.`),this.name="InvalidSessionScopeError",this.sessionScope=e}},En=class extends Error{limit;constructor(e){super(`Session limit reached (${e})`),this.name="SessionLimitExceededError",this.limit=e}},Cn=class extends Error{limit;pendingCount;sessionId;constructor(e,r,i){super(`Prompt queue full for session "${i}" (${r}/${e} pending)`),this.name="PromptQueueFullError",this.limit=e,this.pendingCount=r,this.sessionId=i}},An=class extends Error{bound;requested;constructor(e,r){let i=r.length>Er?`${r.slice(0,Er)}\u2026[truncated]`:r;super(`Workspace mismatch: daemon is bound to "${e}" but request asked for "${i}". Each \`matilda serve\` daemon binds to exactly one workspace; start a separate daemon for "${i}" (or route the request to one via an orchestrator).`),this.name="WorkspaceMismatchError",this.bound=e,this.requested=i}},wn=class extends Error{sessionId;clientId;constructor(e,r){super(`Client id "${r}" is not registered for session ${e}`),this.name="InvalidClientIdError",this.sessionId=e,this.clientId=r}},kn=class extends Error{constructor(){super("Direct session shell is disabled for this daemon"),this.name="SessionShellDisabledError"}},Tn=class extends Error{constructor(){super("Direct session shell requires a session-bound client id"),this.name="SessionShellClientRequiredError"}},Fn=class extends Error{requestId;optionId;constructor(e,r){super(`Permission ${e}: optionId "${r}" is not in the set of options the agent offered.`),this.name="InvalidPermissionOptionError",this.requestId=e,this.optionId=r}},In=class extends Error{field;constructor(e,r){super(`Invalid session metadata: ${e} ${r}`),this.name="InvalidSessionMetadataError",this.field=e}},Rn=class extends Error{policy;constructor(e){super(`Permission policy "${e}" is declared in the contract but not yet implemented in this daemon build.`),this.name="PermissionPolicyNotImplementedError",this.policy=e}},Ln=class extends Error{requestId;sentinel;constructor(e,r){super(`Permission ${e}: 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=e,this.sentinel=r}},Pn=class extends Error{requestId;sessionId;reason;constructor(e,r,i){super(`Permission ${e} on session ${r}: vote rejected by policy (${i}).`),this.name="PermissionForbiddenError",this.requestId=e,this.sessionId=r,this.reason=i}},Mn=class extends Error{path;existingSize;constructor(e,r){super(`Workspace file ${e} already exists (${r} bytes); pass {force: true} to overwrite.`),this.name="WorkspaceInitConflictError",this.path=e,this.existingSize=r}},Nn=class extends Error{filename;boundWorkspace;constructor(e,r){super(`Configured workspace context filename ${JSON.stringify(e)} resolves outside the bound workspace ${JSON.stringify(r)}. Refusing to write.`),this.name="WorkspaceInitPathEscapeError",this.filename=e,this.boundWorkspace=r}},On=class extends Error{target;kind;constructor(e,r,i){super(i),this.name="WorkspaceInitSymlinkError",this.target=e,this.kind=r}},Bn=class extends Error{target;kind;constructor(e,r,i){super(i),this.name="WorkspaceInitRaceError",this.target=e,this.kind=r}},_n=class extends Error{serverName;constructor(e){super(`MCP server not configured: ${JSON.stringify(e)}`),this.name="McpServerNotFoundError",this.serverName=e}},Un=class extends Error{serverName;mcpStatus;constructor(e,r){super(`MCP server ${JSON.stringify(e)} did not reach a connected state after restart (status: ${r}).`),this.name="McpServerRestartFailedError",this.serverName=e,this.mcpStatus=r}},jn=class extends Error{sessionId;constructor(e,r){super(r??`Session ${e} is busy (prompt running)`),this.name="SessionBusyError",this.sessionId=e}},Gn=class extends Error{sessionId;constructor(e,r){super(r??"Cannot rewind to the requested turn (compressed or does not exist)"),this.name="InvalidRewindTargetError",this.sessionId=e}},$n=class extends Error{sessionId;constructor(e){super(`Cannot branch session ${e}: a prompt is currently active`),this.name="BranchWhilePromptActiveError",this.sessionId=e}};b();var Me=1,op=["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"],Cr=class extends Error{label;timeoutMs;constructor(e,r){super(`AcpSessionBridge ${e} timed out after ${r}ms`),this.name="BridgeTimeoutError",this.label=e,this.timeoutMs=r}},Ar=class extends Error{context;constructor(e){super(`agent channel closed ${e}`),this.name="BridgeChannelClosedError",this.context=e}},wr=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"}},ap={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"},up={sessionClose:"matilda/control/session/close",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"},sl={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 lp(t){return{v:Me,workspaceCwd:t,initialized:!1,extensions:[]}}function cp(t){return{v:Me,workspaceCwd:t,initialized:!1,disabled:!1,hooks:[],events:sl}}function dp(t){return{v:Me,workspaceCwd:t,initialized:!1,files:[],totalBytes:0,fileCount:0,ruleCount:0}}function hp(t){return{v:Me,workspaceCwd:t,initialized:!1,discoveryState:"not_started",servers:[],clientCount:0,budgetMode:"off",budgets:[]}}function fp(t){return{v:Me,workspaceCwd:t,initialized:!1,skills:[]}}function pp(t){return{v:Me,workspaceCwd:t,initialized:!1,providers:[]}}function mp(t,e){return{v:Me,workspaceCwd:t,initialized:!0,acpChannelLive:e,cells:[]}}var ol=["auth","mcp_discovery","skills","providers","tool_registry","egress"];function gp(){return ol.map(t=>({kind:t,status:"not_started",locality:"acp",hint:"spawn a session to populate"}))}var al=new Set(["PARSE_ERROR","INVALID_CONFIG","INVALID_NAME"]),ul=new Set(["FILE_ERROR","NOT_FOUND"]),ll=new Set(["ENOENT","EACCES","EPERM"]),cl=new Set(["StrictMissingCredentialsError","StrictMissingModelIdError","MissingApiKeyError","MissingModelError","MissingBaseUrlError","MissingAnthropicBaseUrlEnvError"]);function yp(t){if(t instanceof Cr)return"init_timeout";if(t instanceof Ar)return"protocol_error";if(t instanceof wr)return"missing_binary";if(t instanceof dn||t?.name==="SkillError"){let r=t.code;return r&&al.has(r)?"parse_error":r&&ul.has(r)?"missing_file":void 0}if(t instanceof SyntaxError)return"parse_error";if(!(t instanceof Error))return;if(t.name==="TrustGateError"||cl.has(t.name))return"auth_env_error";let e=t.code;if(typeof e=="string"&&ll.has(e))return"missing_file"}b();b();import*as ve from"node:fs";import*as Rt from"node:path";var dl="output-language.md",qn="matilda-code:llm-output-language:",hl="auto";function kr(t){return!t||t.toLowerCase()===hl}function fl(t){let e=t.toLowerCase(),r=br(e);return r!=="English"||e==="en"?r:t}function Hn(t){if(kr(t)){let e=gn();return br(e)}return fl(t)}function Tr(){return Rt.join(K.getGlobalMatildaDir(),dl)}function pl(t){return t.replace(/[\r\n]/g," ").replace(/--!?>/g,"").replace(/--/g,"")}function ml(t){let e=pl(t);return`# Output language preference: ${t}
|
|
19
|
-
<!-- ${qn} ${e} -->
|
|
20
|
-
|
|
21
|
-
## Rule
|
|
22
|
-
You MUST always respond in **${t}** regardless of the user's input language.
|
|
23
|
-
This is a mandatory requirement, not a preference.
|
|
24
|
-
|
|
25
|
-
## Exception
|
|
26
|
-
If the user **explicitly** requests a response in a specific language (e.g., "please reply in English", "\u7528\u4E2D\u6587\u56DE\u7B54"), switch to the user's requested language for the remainder of the conversation.
|
|
27
|
-
|
|
28
|
-
## Keep technical artifacts unchanged
|
|
29
|
-
Do **not** translate or rewrite:
|
|
30
|
-
- Code blocks, CLI commands, file paths, stack traces, logs, JSON keys, identifiers
|
|
31
|
-
- Exact quoted text from the user (keep quotes verbatim)
|
|
32
|
-
|
|
33
|
-
## Tool / system outputs
|
|
34
|
-
Raw tool/system outputs may contain fixed-format English. Preserve them verbatim, and if needed, add a short **${t}** explanation below.
|
|
35
|
-
`}function gl(t){let e=new RegExp(String.raw`<!--\s*${qn}\s*(.*?)\s*-->`,"i"),r=t.match(e);if(r?.[1]?.trim())return r[1].trim();let i=t.match(/^#.*?CRITICAL:\s*(.*?)\s+Output Language Rule\b/im);return i?.[1]?.trim()?i[1].trim():null}function yl(){let t=Tr();if(!ve.existsSync(t))return null;try{let e=ve.readFileSync(t,"utf-8");return gl(e)}catch{return null}}function Wn(t,e){let r=e??Tr(),i=ml(t),n=Rt.dirname(r);ve.mkdirSync(n,{recursive:!0}),ve.writeFileSync(r,i,"utf-8")}function Sl(t,e){let r=Hn(t);Wn(r,e)}function Ap(t,e){let r=e?.getOutputLanguageFilePath();Sl(t,r),r||e?.setOutputLanguageFilePath(Tr())}function wp(t){if(yl())return;let r=Hn(t);Wn(r)}b();var Qe=He(tl(),1);import*as _ from"node:fs";import*as L from"node:path";import{homedir as Ai,platform as Do}from"node:os";import B from"node:process";var Yt=He(Ir(),1);b();b();b();var Jn={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"},Dl=be("COLOR_UTILS"),El=new Set(["black","red","green","yellow","blue","cyan","magenta","white","gray","grey","blackbright","redbright","greenbright","yellowbright","bluebright","cyanbright","magentabright","whitebright"]);function Rr(t){let e=t.toLowerCase();if(e.startsWith("#"))return/^#[0-9A-Fa-f]{3}([0-9A-Fa-f]{3})?$/.test(t)?e:void 0;if(El.has(e))return e;if(Jn[e])return Jn[e];Dl.warn(`[ColorUtils] Could not resolve color "${t}" to an Ink-compatible format.`)}var Cl={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 Vn(t){let e=(Rr(t)??t).toLowerCase();return e.startsWith("#")?/^#[0-9a-f]{3}$/.test(e)?`#${e.slice(1).split("").map(r=>r+r).join("")}`:/^#[0-9a-f]{6}$/.test(e)?e:void 0:Cl[e]}function Lp(t,e,r){if(r<=0)return t;if(r>=1)return e;let i=Vn(t),n=Vn(e);if(!i||!n)return"";let l=parseInt(i.slice(1,3),16),a=parseInt(i.slice(3,5),16),f=parseInt(i.slice(5,7),16),p=parseInt(n.slice(1,3),16),m=parseInt(n.slice(3,5),16),h=parseInt(n.slice(5,7),16),g=(s,o)=>Math.round(s+(o-s)*r),d=s=>Math.max(0,Math.min(255,s)).toString(16).padStart(2,"0");return`#${d(g(l,p))}${d(g(a,m))}${d(g(f,h))}`}var at;function Al(){if(at!==void 0)return at;let t=process.env.COLORTERM;return t==="truecolor"||t==="24bit"||t==="kmscon"||process.stdout.getColorDepth&&process.stdout.getColorDepth()>=24?at=!0:at=!1}var me;function wl(){if(me!==void 0)return me;if(process.env.NO_COLOR)return me="none";if(Al())return me="truecolor";let t=process.stdout.getColorDepth?.();return typeof t=="number"?t>=24?me="truecolor":t>=8?me="256":t>=4?me="16":me="none":me="256"}function Pp(){let t=wl();return t==="truecolor"||t==="256"}var G={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"]},N={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"]},Bp={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"},Ne=class t{constructor(e,r,i,n,l){this.name=e;this.type=r;this.colors=n;this.semanticColors=l??{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(i));let a=i.hljs?.color;this.defaultColor=(a?t._resolveColor(a):void 0)??""}defaultColor;_colorMap;semanticColors;getInkColor(e){return this._colorMap[e]}static _resolveColor(e){return Rr(e)}_buildColorMap(e){let r={};for(let i in e){if(!i.startsWith("hljs-")&&i!=="hljs")continue;let n=e[i];if(n?.color){let l=t._resolveColor(n.color);l!==void 0&&(r[i]=l)}}return r}};function _p(t){let e={type:"custom",Background:t.background?.primary??t.Background??"",Foreground:t.text?.primary??t.Foreground??"",LightBlue:t.text?.code??t.LightBlue??"",AccentBlue:t.text?.link??t.AccentBlue??"",AccentPurple:t.text?.accent??t.AccentPurple??"",AccentCyan:t.text?.link??t.AccentCyan??"",AccentGreen:t.status?.success??t.AccentGreen??"",AccentYellow:t.status?.warning??t.AccentYellow??"",AccentRed:t.status?.error??t.AccentRed??"",AccentYellowDim:t.status?.warningDim??t.AccentYellowDim??"",AccentRedDim:t.status?.errorDim??t.AccentRedDim??"",DiffAdded:t.background?.diff?.added??t.DiffAdded??"",DiffRemoved:t.background?.diff?.removed??t.DiffRemoved??"",Comment:t.ui?.comment??t.Comment??"",Gray:t.text?.secondary??t.Gray??"",GradientColors:t.ui?.gradient??t.GradientColors},r={hljs:{display:"block",overflowX:"auto",padding:"0.5em",background:e.Background,color:e.Foreground},"hljs-keyword":{color:e.AccentBlue},"hljs-literal":{color:e.AccentBlue},"hljs-symbol":{color:e.AccentBlue},"hljs-name":{color:e.AccentBlue},"hljs-link":{color:e.AccentBlue,textDecoration:"underline"},"hljs-built_in":{color:e.AccentCyan},"hljs-type":{color:e.AccentCyan},"hljs-number":{color:e.AccentGreen},"hljs-class":{color:e.AccentGreen},"hljs-string":{color:e.AccentYellow},"hljs-meta-string":{color:e.AccentYellow},"hljs-regexp":{color:e.AccentRed},"hljs-template-tag":{color:e.AccentRed},"hljs-subst":{color:e.Foreground},"hljs-function":{color:e.Foreground},"hljs-title":{color:e.Foreground},"hljs-params":{color:e.Foreground},"hljs-formula":{color:e.Foreground},"hljs-comment":{color:e.Comment,fontStyle:"italic"},"hljs-quote":{color:e.Comment,fontStyle:"italic"},"hljs-doctag":{color:e.Comment},"hljs-meta":{color:e.Gray},"hljs-meta-keyword":{color:e.Gray},"hljs-tag":{color:e.Gray},"hljs-variable":{color:e.AccentPurple},"hljs-template-variable":{color:e.AccentPurple},"hljs-attr":{color:e.LightBlue},"hljs-attribute":{color:e.LightBlue},"hljs-builtin-name":{color:e.LightBlue},"hljs-section":{color:e.AccentYellow},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"},"hljs-bullet":{color:e.AccentYellow},"hljs-selector-tag":{color:e.AccentYellow},"hljs-selector-id":{color:e.AccentYellow},"hljs-selector-class":{color:e.AccentYellow},"hljs-selector-attr":{color:e.AccentYellow},"hljs-selector-pseudo":{color:e.AccentYellow},"hljs-addition":{backgroundColor:e.AccentGreen,display:"inline-block",width:"100%"},"hljs-deletion":{backgroundColor:e.AccentRed,display:"inline-block",width:"100%"}},i={text:{primary:t.text?.primary??e.Foreground,secondary:t.text?.secondary??e.Gray,link:t.text?.link??e.AccentBlue,accent:t.text?.accent??e.AccentPurple,code:t.text?.code??e.LightBlue},background:{primary:t.background?.primary??e.Background,diff:{added:t.background?.diff?.added??e.DiffAdded,removed:t.background?.diff?.removed??e.DiffRemoved}},border:{default:t.border?.default??e.Gray,focused:t.border?.focused??e.AccentBlue},ui:{comment:t.ui?.comment??e.Comment,symbol:t.ui?.symbol??e.Gray,gradient:t.ui?.gradient??e.GradientColors},status:{error:t.status?.error??e.AccentRed,success:t.status?.success??e.AccentGreen,warning:t.status?.warning??e.AccentYellow,errorDim:t.status?.errorDim??e.AccentRedDim,warningDim:t.status?.warningDim??e.AccentYellowDim}};return new Ne(t.name,"custom",r,e,i)}function Up(t){return t.name&&!kl(t.name)?{isValid:!1,error:`Invalid theme name: ${t.name}`}:{isValid:!0}}function kl(t){return t.trim().length>0&&t.trim().length<=50}var Lr=new Ne("Default Light","light",{hljs:{display:"block",overflowX:"auto",padding:"0.5em",background:G.Background,color:G.Foreground},"hljs-comment":{color:G.Comment},"hljs-quote":{color:G.Comment},"hljs-variable":{color:G.Foreground},"hljs-keyword":{color:G.AccentBlue},"hljs-selector-tag":{color:G.AccentBlue},"hljs-built_in":{color:G.AccentBlue},"hljs-name":{color:G.AccentBlue},"hljs-tag":{color:G.AccentBlue},"hljs-string":{color:G.AccentRed},"hljs-title":{color:G.AccentRed},"hljs-section":{color:G.AccentRed},"hljs-attribute":{color:G.AccentRed},"hljs-literal":{color:G.AccentRed},"hljs-template-tag":{color:G.AccentRed},"hljs-template-variable":{color:G.AccentRed},"hljs-type":{color:G.AccentRed},"hljs-addition":{color:G.AccentGreen},"hljs-deletion":{color:G.AccentRed},"hljs-selector-attr":{color:G.AccentCyan},"hljs-selector-pseudo":{color:G.AccentCyan},"hljs-meta":{color:G.AccentCyan},"hljs-doctag":{color:G.Gray},"hljs-attr":{color:G.AccentRed},"hljs-symbol":{color:G.AccentCyan},"hljs-bullet":{color:G.AccentCyan},"hljs-link":{color:G.AccentCyan},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"}},G);b();var Pr=new Ne("Default","dark",{hljs:{display:"block",overflowX:"auto",padding:"0.5em",background:N.Background,color:N.Foreground},"hljs-keyword":{color:N.AccentBlue},"hljs-literal":{color:N.AccentBlue},"hljs-symbol":{color:N.AccentBlue},"hljs-name":{color:N.AccentBlue},"hljs-link":{color:N.AccentBlue,textDecoration:"underline"},"hljs-built_in":{color:N.AccentCyan},"hljs-type":{color:N.AccentCyan},"hljs-number":{color:N.AccentGreen},"hljs-class":{color:N.AccentGreen},"hljs-string":{color:N.AccentYellow},"hljs-meta-string":{color:N.AccentYellow},"hljs-regexp":{color:N.AccentRed},"hljs-template-tag":{color:N.AccentRed},"hljs-subst":{color:N.Foreground},"hljs-function":{color:N.Foreground},"hljs-title":{color:N.Foreground},"hljs-params":{color:N.Foreground},"hljs-formula":{color:N.Foreground},"hljs-comment":{color:N.Comment,fontStyle:"italic"},"hljs-quote":{color:N.Comment,fontStyle:"italic"},"hljs-doctag":{color:N.Comment},"hljs-meta":{color:N.Gray},"hljs-meta-keyword":{color:N.Gray},"hljs-tag":{color:N.Gray},"hljs-variable":{color:N.AccentPurple},"hljs-template-variable":{color:N.AccentPurple},"hljs-attr":{color:N.LightBlue},"hljs-attribute":{color:N.LightBlue},"hljs-builtin-name":{color:N.LightBlue},"hljs-section":{color:N.AccentYellow},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"},"hljs-bullet":{color:N.AccentYellow},"hljs-selector-tag":{color:N.AccentYellow},"hljs-selector-id":{color:N.AccentYellow},"hljs-selector-class":{color:N.AccentYellow},"hljs-selector-attr":{color:N.AccentYellow},"hljs-selector-pseudo":{color:N.AccentYellow},"hljs-addition":{backgroundColor:"#144212",display:"inline-block",width:"100%"},"hljs-deletion":{backgroundColor:"#600",display:"inline-block",width:"100%"}},N);b();import*as Oe from"node:fs";import*as De from"node:path";var Kn=He(Ir(),1);var Tl="trustedFolders.json";function Fl(){return process.env.MATILDA_CODE_TRUSTED_FOLDERS_PATH?process.env.MATILDA_CODE_TRUSTED_FOLDERS_PATH:De.join(K.getGlobalMatildaDir(),Tl)}var Mr=class{constructor(e,r){this.user=e;this.errors=r}get rules(){return Object.entries(this.user.config).map(([e,r])=>({path:e,trustLevel:r}))}isPathTrusted(e){let r=[],i=[];for(let n of this.rules)switch(n.trustLevel){case"TRUST_FOLDER":r.push(n.path);break;case"TRUST_PARENT":r.push(De.dirname(n.path));break;case"DO_NOT_TRUST":i.push(n.path);break;default:break}for(let n of r)if(sn(e,n))return!0;for(let n of i)if(De.normalize(e)===De.normalize(n))return!1}setValue(e,r){this.user.config[e]=r,Rl(this.user)}},Lt;function Il(){if(Lt)return Lt;let t=[],e={},r=Fl();try{if(Oe.existsSync(r)){let i=Oe.readFileSync(r,"utf-8"),n=JSON.parse((0,Kn.default)(i));typeof n!="object"||n===null||Array.isArray(n)?t.push({message:"Trusted folders file is not a valid JSON object.",path:r}):e=n}}catch(i){t.push({message:ae(i),path:r})}return Lt=new Mr({path:r,config:e},t),Lt}function Rl(t){try{let e=De.dirname(t.path);Oe.existsSync(e)||Oe.mkdirSync(e,{recursive:!0}),nn(t.path,JSON.stringify(t.config,null,2),{encoding:"utf-8",mode:384,forceMode:!0,noFollow:!0})}catch(e){xe("Error saving trusted folders file."),xe(e instanceof Error?e.message:String(e))}}function Ll(t){return t.security?.folderTrust?.enabled??!1}function Pl(t){let e=Il();if(t&&(e.user.config=t),e.errors.length>0){let i=e.errors.map(n=>`Error in ${n.path}: ${n.message}`);throw new It(`${i.join(`
|
|
36
|
-
`)}
|
|
37
|
-
Please fix the configuration file and try again.`)}let r=e.isPathTrusted(process.cwd());return{isTrusted:r,source:r!==void 0?"file":void 0}}function Nr(t,e){if(!Ll(t))return{isTrusted:!0,source:void 0};let r=ln.get()?.workspaceState?.isTrusted;return r!==void 0?{isTrusted:r,source:"ide"}:Pl(e)}b();function ut(t){if(!t||typeof t!="object")return!1;let e=t;return Object.prototype.hasOwnProperty.call(e,"modelProviders")}function Ml(t){if(t.isTrusted&&ut(t.workspace.settings))return"Workspace";if(ut(t.user.settings))return"User"}function Yn(t){return Ml(t)??"User"}b();var nm=new Set(["boolean","enum"]);var Y={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"]}}}}}},Zn={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.',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},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}}},feedbackLastShownTimestamp:{type:"number",label:"Feedback Last Shown Timestamp",category:"UI",requiresRestart:!1,default:0,description:"The last time the feedback dialog was shown.",showInDialog:!1},compactMode:{type:"boolean",label:"Compact Mode",category:"UI",requiresRestart:!1,default:!1,description:"Hide tool output and thinking 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:"Virtualized History (reduces flicker on long sessions)",category:"UI",requiresRestart:!1,default:!1,description:"Render conversation history in an in-app scrollable viewport instead of the terminal scrollback buffer. Recommended if you see flicker, scroll-storm, or interface freeze on long sessions, after Ctrl+O, after Ctrl+E / Ctrl+F (expand), after window resize, or when alt-tabbing back. Scroll with Shift+\u2191/\u2193 (line), PgUp/PgDn (page), Ctrl+Home/End (top/bottom), or the mouse wheel. Does NOT use the host terminal scrollback while enabled; 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},hideBanner:{type:"boolean",label:"Hide Banner",category:"UI",requiresRestart:!1,default:!1,description:"Hide the startup ASCII banner and info panel.",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, /model, /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},startupAnimation:{type:"boolean",label:"Startup Animation",category:"UI",requiresRestart:!1,default:!0,description:"Play the Matilda flower bloom on launch before the banner settles in. Skipped automatically for screen readers, non-interactive terminals, and when the banner is hidden.",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},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 ">_ Matilda" title shown in the banner info panel. 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 between the banner title and the auth/model line. When unset, the info panel keeps its blank spacer row.",showInDialog:!1},customAsciiArt:{type:"object",label:"Custom ASCII Art",category:"UI",requiresRestart:!1,default:void 0,description:'Replace the default MATILDA ASCII art. 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:5,description:"Minutes of inactivity before clearing old tool result content. Use -1 to disable. Default 5 keeps long agent sessions snappy.",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. 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:"auto",label:"Auto"},{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:hn,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:fn,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:pn,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:!1,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}}},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:Y},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:Y},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:Y},Notification:{type:"array",label:"Notification Hooks",category:"Advanced",requiresRestart:!1,default:[],description:"Hooks that execute when notifications are sent.",showInDialog:!1,mergeStrategy:"concat",items:Y},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:Y},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:Y},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:Y},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:Y},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:Y},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:Y},PreCompact:{type:"array",label:"Pre Compact Hooks",category:"Advanced",requiresRestart:!1,default:[],description:"Hooks that execute before conversation compaction.",showInDialog:!1,mergeStrategy:"concat",items:Y},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:Y},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:Y},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:Y}}},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}}}};function lt(){let t=Zn;return t.general?.properties?.language&&(t.general.properties.language.options=mn()),Zn}b();function Nl(t,e){let r=/\$(?:(\w+)|{([^}]+)})/g;return t.replace(r,(i,n,l)=>{let a=n||l;return e&&typeof e[a]=="string"?e[a]:process&&process.env&&typeof process.env[a]=="string"?process.env[a]:i})}function We(t,e){return Or(t,new WeakSet,e)}function Or(t,e,r){if(t==null||typeof t=="boolean"||typeof t=="number")return t;if(typeof t=="string")return Nl(t,r);if(Array.isArray(t)){if(e.has(t))return[...t];e.add(t);let i=t.map(n=>Or(n,e,r));return e.delete(t),i}if(typeof t=="object"){if(e.has(t))return{...t};e.add(t);let i={...t};for(let n in i)Object.prototype.hasOwnProperty.call(i,n)&&(i[n]=Or(i[n],e,r));return e.delete(t),i}return t}b();import*as ue from"node:fs";function is(t,e=""){let r={};for(let i in t){let n=e?`${e}.${i}`:i,l=t[i];r[n]={...l,key:n},l.properties&&(r={...r,...is(l.properties,n)})}return r}var es;function Pt(){return es??(es=is(lt()))}function ns(t){return Pt()[t]}function Ol(t){return Pt()[t]?.requiresRestart??!1}function Br(t){return Pt()[t]?.default}function ze(t,e){let[r,...i]=e;if(!r||!(r in t))return;let n=t[r];if(i.length===0)return n;if(n&&typeof n=="object"&&n!==null)return ze(n,i)}function Ee(t,e){return ze(t,e.split("."))}function ts(t,e,r){let i=ns(t);if(!i)return;let n=t.split("."),l=ze(e,n);return l!==void 0||(l=ze(r,n),l!==void 0)?l:i.default}var rs=["tools.approvalMode","general.language","general.outputLanguage","ui.theme","general.vimMode","tools.shell.enableInteractiveShell","general.preferredEditor","ide.enabled","ui.showLineNumbers","ui.hideTips","general.terminalBell","ui.enableWelcomeBack","general.gitCoAuthor.commit","general.gitCoAuthor.pr","context.fileFiltering.respectGitIgnore","context.fileFiltering.respectMatildaIgnore","general.disableAutoUpdate","privacy.usageStatisticsEnabled"];function hm(){return Object.values(Pt()).filter(e=>e.showInDialog===!0).map(e=>e.key).sort((e,r)=>{let i=rs.indexOf(e),n=rs.indexOf(r);return i!==-1&&n!==-1?i-n:i!==-1?-1:n!==-1?1:0})}function ct(t,e){let r=t.split(".");return ze(e,r)!==void 0}function ss(t){for(let e of t)if(e==="__proto__"||e==="constructor"||e==="prototype")return!0;return!1}function os(t,e,r){let i=e.split(".");if(ss(i))return;let n=i.pop();if(!n)return;let l=t;for(let a of i)(!l[a]||typeof l[a]!="object")&&(l[a]={}),l=l[a];l[n]=r}function W(t,e,r){let i=e.split(".");if(ss(i))return;let n=i.pop();if(!n)return;let l=t;for(let a of i){l[a]===void 0&&(l[a]={});let f=l[a];if(typeof f=="object"&&f!==null)l=f;else return}l[n]=r}function _r(t,e){let r=e.split("."),i=r.pop();if(!i)return;let n=t;for(let l of r){let a=n[l];if(typeof a!="object"||a===null)return;n=a}delete n[i]}function fm(t,e,r){let i=JSON.parse(JSON.stringify(r));return os(i,t,e),i}function pm(t,e,r){let i=structuredClone(r);return os(i,t,e),i}function mm(t){return Array.from(t).filter(e=>Ol(e))}function gm(t,e,r,i){t.forEach(n=>{let l=n.split("."),a=ze(e,l),f=ct(n,r.forScope(i).settings);if(a===void 0){f&&r.setValue(i,n,void 0);return}let p=a===Br(n);(f||!p)&&r.setValue(i,n,a)})}function ym(t,e,r,i,n){let l=ns(t),a;n&&ct(t,n)?a=ts(t,n,{}):ct(t,e)?a=ts(t,e,{}):a=Br(t);let f=String(a);if(t==="general.outputLanguage"&&kr(a))f=xr("Auto (detect from system)");else if(l?.type==="enum"&&l.options){let g=l.options?.find(d=>d.value===a);g?.label?f=xr(g.label)||g.label:f=`${a}`}let p=Br(t),m=a!==p,h=i.has(t);return ct(t,e)||h?`${f}*`:m||h?`${f}*`:f}function Sm(t,e){return!ct(t,e)}function as(t){try{if(ue.existsSync(t)){let e=`${t}.orig`;return ue.copyFileSync(t,e),!0}}catch{}return!1}function us(t){try{let e=`${t}.orig`;if(ue.existsSync(e))return ue.copyFileSync(e,t),ue.unlinkSync(e),!0}catch(e){console.error(`[settingsUtils] restoreSettingsFromBackup(${t}) failed:`,e)}return!1}function ls(t){try{let e=`${t}.orig`;ue.existsSync(e)&&ue.unlinkSync(e)}catch{}}b();function Ur(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function jr(t,e,r,i=[]){for(let n of Object.keys(e)){if(n==="__proto__"||n==="constructor"||n==="prototype")continue;let l=[...i,n],a=e[n],f=t[n],p=r(l);if(p==="shallow_merge"&&f&&a){let m=typeof f=="object"&&f!==null?f:{},h=typeof a=="object"&&a!==null?a:{};t[n]={...m,...h};continue}if(Array.isArray(f)){let m=Array.isArray(a)?a:[a];if(p==="concat"){t[n]=f.concat(m);continue}if(p==="union"){t[n]=[...new Set(f.concat(m))];continue}}Ur(f)&&Ur(a)?jr(f,a,r,l):Ur(a)?(t[n]={},jr(t[n],a,r,l)):t[n]=a}return t}function Gr(t,...e){let r={};for(let i of e)i&&jr(r,i,t);return r}b();var Ve=He(mo(),1);import*as qt from"node:fs";b();import*as X from"node:fs";function gi(t,e,r={}){let{backupSuffix:i=".orig",encoding:n="utf-8"}=r,l=`${t}.tmp`,a=`${t}${i}`;try{X.existsSync(l)&&X.unlinkSync(l)}catch{}try{if(X.writeFileSync(l,e,{encoding:n,flush:!0}),X.existsSync(t)){if(X.statSync(t).isDirectory()){try{X.unlinkSync(l)}catch{}throw new Error(`Cannot write to '${t}' because it is a directory`)}try{X.renameSync(t,a)}catch(p){try{X.unlinkSync(l)}catch{}throw new Error(`Failed to backup existing file: ${p instanceof Error?p.message:String(p)}`)}}try{X.renameSync(l,t)}catch(f){let p,m=!1;if(X.existsSync(a)){m=!0;try{X.renameSync(a,t)}catch(g){p=g instanceof Error?g.message:String(g)}}let h=f instanceof Error?f.message:String(f);throw p?new Error(`Failed to write file: ${h}. Automatic restore failed: ${p}. Manual recovery may be required using backup file '${a}'.`):m?new Error(`Failed to write file: ${h}. Target was automatically restored from backup '${a}'.`):new Error(`Failed to write file: ${h}. No backup file was available for restoration.`)}}catch(f){try{X.existsSync(l)&&X.unlinkSync(l)}catch{}throw f}}function yi(t,e,r=!1,i=[]){if(!qt.existsSync(t)){let p=(0,Ve.stringify)(e,null,2);return gi(t,p),!0}let n=qt.readFileSync(t,"utf-8"),l;try{l=(0,Ve.parse)(n)}catch(p){return xe("Error parsing settings file."),xe(`Settings file may be corrupted: ${p instanceof Error?p.message:String(p)}`),!1}let a=$t(l,e,r,i),f=(0,Ve.stringify)(a,null,2);try{(0,Ve.parse)(f)}catch(p){return xe("Error: Refusing to write settings file \u2014 the result would not be valid JSON."),xe(p instanceof Error?p.message:String(p)),!1}return gi(t,f),!0}function $t(t,e,r=!1,i=[],n=[]){let l=t;if(r){let a=Object.keys(l).filter(f=>!(f in e));for(let f of a)delete l[f]}for(let a of Object.getOwnPropertyNames(e)){if(a==="__proto__"||a==="constructor"||a==="prototype")continue;let f=e[a],p=[...n,a],m=typeof f=="object"&&f!==null&&!Array.isArray(f)&&Object.keys(f).length>0;if(fd(p,i)){l[a]=m?$t({},f):f;continue}m&&(typeof l[a]!="object"||l[a]===null||Array.isArray(l[a]))?l[a]=$t({},f,r,i,p):m&&typeof l[a]=="object"&&l[a]!==null&&!Array.isArray(l[a])?l[a]=$t(l[a],f,r,i,p):l[a]=f}return l}function fd(t,e){return t.length===e.length&&t.every((r,i)=>r===e[i])}b();b();var St=be("SETTINGS_MIGRATION");function pd(t){return t==="SystemDefaults"?"system default":t.toLowerCase()}var bt=class{constructor(e,r){this.migrations=e;this.scope=r}migrate(e){St.debug("MigrationScheduler: Starting migration chain");let r=e,i=[],n=[];for(let a of this.migrations)try{if(a.shouldMigrate(r)){St.debug(`MigrationScheduler: Executing migration ${a.fromVersion} \u2192 ${a.toVersion}`);let f=pd(this.scope),p=a.migrate(r,f);r=p.settings,n.push(...p.warnings),i.push({fromVersion:a.fromVersion,toVersion:a.toVersion}),St.debug(`MigrationScheduler: Migration ${a.fromVersion} \u2192 ${a.toVersion} completed successfully`)}}catch(f){throw St.error(`MigrationScheduler: Migration ${a.fromVersion} \u2192 ${a.toVersion} failed:`,f),f}let l=r.$version??1;return St.debug(`MigrationScheduler: Migration chain complete. Final version: ${l}, Executed: ${i.length} migrations`),{settings:r,finalVersion:l,executedMigrations:i,warnings:n}}};b();b();var Ke={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"},Ht=new Set(["ui","tools","mcp","advanced","model","general","context","security","ide","privacy","telemetry","extensions"]),Wt={disableAutoUpdate:"general.disableAutoUpdate",disableUpdateNag:"general.disableUpdateNag",disableLoadingPhrases:"ui.accessibility.disableLoadingPhrases",disableFuzzySearch:"context.fileFiltering.disableFuzzySearch",disableCacheControl:"model.generationConfig.disableCacheControl"},go=new Set(["disableAutoUpdate","disableUpdateNag"]),yo=["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 zt=class{fromVersion=1;toVersion=2;shouldMigrate(e){if(typeof e!="object"||e===null)return!1;let r=e,i=r.$version;return typeof i=="number"&&i>=2?!1:yo.some(n=>{if(!(n in r))return!1;let l=r[n];return!(typeof l=="object"&&l!==null&&!Array.isArray(l))})}migrate(e,r){if(typeof e!="object"||e===null)throw new Error("Settings must be an object");let i=e,n={},l=new Set,a=[];for(let[f,p]of Object.entries(Ke))if(f in i){let m=i[f];if(Ht.has(f)&&typeof m=="object"&&m!==null&&!Array.isArray(m)){n[f]=m,l.add(f);continue}if(typeof m=="object"&&m!==null&&!Array.isArray(m)&&p.startsWith(f+"."))for(let[h,g]of Object.entries(m))W(n,`${p}.${h}`,g);else W(n,p,m);l.add(f)}for(let[f,p]of Object.entries(Wt))if(f in i){let m=i[f];go.has(f)?W(n,p,m===!0):typeof m=="boolean"&&W(n,p,m),l.add(f)}"mcpServers"in i&&(n.mcpServers=i.mcpServers,l.add("mcpServers"));for(let f of Object.keys(i))if(!l.has(f))if(Array.from(l).some(m=>{let h=Ke[m]||Wt[m];return h?h.startsWith(f+"."):!1})){let m=i[f];if(typeof m=="object"&&m!==null&&!Array.isArray(m))for(let[h,g]of Object.entries(m)){let d=`${f}.${h}`;Array.from(l).some(o=>(Ke[o]||Wt[o])===d)||W(n,d,g)}else n[f]=i[f]}else n[f]=i[f];return n.$version=2,{settings:n,warnings:a}}},Si=new zt;b();var md={"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"},gd={"general.enableAutoUpdate":["general.disableAutoUpdate","general.disableUpdateNag"]};function So(t){if(t===void 0)return{isPresent:!1,isValid:!1};if(typeof t=="boolean")return{isPresent:!0,isValid:!0,booleanValue:t};if(typeof t=="string"){let e=t.trim().toLowerCase();if(e==="true")return{isPresent:!0,isValid:!0,booleanValue:!0};if(e==="false")return{isPresent:!0,isValid:!0,booleanValue:!1}}return{isPresent:!0,isValid:!1}}var Xt=class{fromVersion=2;toVersion=3;shouldMigrate(e){return typeof e!="object"||e===null?!1:e.$version===2}migrate(e,r){if(typeof e!="object"||e===null)throw new Error("Settings must be an object");let i=structuredClone(e),n=new Set,l=[];for(let[a,f]of Object.entries(gd)){let p=!1,m=!1;for(let h of f){let g=Ee(i,h),d=So(g);d.isPresent&&(_r(i,h),n.add(h),d.isValid?(m=!0,d.booleanValue===!0&&(p=!0)):l.push(`Removed deprecated setting '${h}' from ${r} settings because the value is invalid. Expected boolean.`))}m&&W(i,a,!p)}for(let[a,f]of Object.entries(md)){if(n.has(a))continue;let p=Ee(i,a),m=So(p);m.isPresent&&(_r(i,a),m.isValid?W(i,f,!m.booleanValue):l.push(`Removed deprecated setting '${a}' from ${r} settings because the value is invalid. Expected boolean or string "true"/"false".`))}return i.$version=3,{settings:i,warnings:l}}},bi=new Xt;b();var ye="general.gitCoAuthor",Jt=class{fromVersion=3;toVersion=4;shouldMigrate(e){if(typeof e!="object"||e===null)return!1;let r=e;if(r.$version===3)return!0;if(r.$version===void 0){let i=Ee(r,ye);return!(i===void 0||typeof i=="object"&&i!==null&&!Array.isArray(i))}return!1}migrate(e,r){if(typeof e!="object"||e===null)throw new Error("Settings must be an object");let i=structuredClone(e),n=[],l=Ee(i,ye);if(typeof l=="boolean")W(i,ye,{commit:l,pr:l});else if(typeof l=="string"){let a=l.trim().toLowerCase(),f=["false","no","off","0","disabled",""];["true","yes","on","1","enabled"].includes(a)?W(i,ye,{commit:!0,pr:!0}):f.includes(a)?W(i,ye,{commit:!1,pr:!1}):(W(i,ye,{commit:!1,pr:!1}),n.push(`Reset '${ye}' in ${r} settings to {commit: false, pr: false} because the stored string '${l}' was not a recognized boolean form.`))}else l!==void 0&&(typeof l!="object"||l===null||Array.isArray(l))&&(W(i,ye,{commit:!1,pr:!1}),n.push(`Reset '${ye}' in ${r} settings to {commit: false, pr: false} because the stored value was not a boolean or object.`));return i.$version=4,{settings:i,warnings:n}}},xi=new Jt;var bo=[Si,bi,xi];function xo(t,e){return new bt([...bo],e).migrate(t)}function vo(t){if(typeof t!="object"||t===null)return!1;let r=t.$version,i=bo.some(n=>n.shouldMigrate(t));return typeof r=="number"&&r>=Ue?!1:i}var Q=be("SETTINGS");function wo(t){let e,r=lt();for(let i of t){if(!r||!r[i])return;e=r[i],r=e.properties}return e?.mergeStrategy}var Og=Pe;function ko(){return K.getGlobalSettingsPath()}function Bg(){return L.dirname(ko())}var To=["DEBUG","DEBUG_MODE"],Ei="MATILDA_CODE_SETTINGS_CORRUPTED_PATH",Ci="MATILDA_CODE_SETTINGS_WAS_RECOVERED",Ye=["MATILDA_HOME","MATILDA_RUNTIME_DIR","MATILDA_CODE_MCP_APPROVALS_PATH",Ei,Ci],vi=new Set([...Ye,"MATILDA_SERVER_TOKEN","MATILDA_CLI_ENTRY","NODE_OPTIONS","NODE_PATH","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"]),Vt=new Set,Kt=new Set,ke=new Map,Di=!1,Ue=4,je="$version";function Fo(){return B.env.MATILDA_CODE_SYSTEM_SETTINGS_PATH?B.env.MATILDA_CODE_SYSTEM_SETTINGS_PATH:Do()==="darwin"?"/Library/Application Support/MatildaCode/settings.json":Do()==="win32"?"C:\\ProgramData\\matilda-code\\settings.json":"/etc/matilda-code/settings.json"}function yd(){return B.env.MATILDA_CODE_SYSTEM_DEFAULTS_PATH?B.env.MATILDA_CODE_SYSTEM_DEFAULTS_PATH:L.join(L.dirname(Fo()),"system-defaults.json")}var Qn=(n=>(n.User="User",n.Workspace="Workspace",n.System="System",n.SystemDefaults="SystemDefaults",n))(Qn||{});function Sd(t,e){let r=t[je];if(typeof r!="number"||r<Ue)return[];let i=[],n=new Set;for(let[a,f]of Object.entries(Ke)){if(a===f||!(a in t))continue;let p=t[a];Ht.has(a)&&typeof p=="object"&&p!==null&&!Array.isArray(p)||(n.add(a),i.push(`Warning: Legacy setting '${a}' will be ignored in ${e}. Please use '${f}' instead.`))}let l=new Set(Object.keys(lt()));for(let a of Object.keys(t))a!==je&&(n.has(a)||l.has(a)||Q.warn(`Unknown setting '${a}' will be ignored in ${e}.`));return i}function Io(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function bd(t){return Io(t)?Object.values(t).some(e=>Array.isArray(e)&&e.length>0):!1}function xd(t){if(!t.isTrusted)return[];let e=t.user.originalSettings,r=t.workspace.originalSettings;if(!ut(e)||!ut(r))return[];let i=e.modelProviders,n=r.modelProviders;return!(Io(n)&&Object.keys(n).length===0)||!bd(i)?[]:[`Warning: '${t.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 '${t.user.path}'.`]}function _g(t){let e=new Set;for(let r of t.migrationWarnings)e.add(`Warning: ${r}`);for(let r of["User","Workspace"]){let i=t.forScope(r);if(i.rawJson===void 0)continue;let n=i.originalSettings;for(let l of Sd(n,i.path))e.add(l)}for(let r of xd(t))e.add(r);return[...e]}function Eo(t,e){let r=t.mcpServers;if(!r||Object.keys(r).length===0)return t;let i={};for(let[n,l]of Object.entries(r))i[n]={...l,scope:e};return{...t,mcpServers:i}}function Ro(t,e,r,i,n){let l=n?Eo(i,"workspace"):{};return Gr(wo,{},e,r,l,Eo(t,"system"))}var Qt=class{constructor(e,r,i,n,l,a,f=[],p=void 0,m=!1){this.system=e,this.systemDefaults=r,this.user=i,this.workspace=n,this.isTrusted=l,this.migratedInMemorScopes=a,this.migrationWarnings=f,this.corruptedPath=p,this.wasRecovered=m,this._merged=this.computeMergedSettings()}system;systemDefaults;user;workspace;isTrusted;migratedInMemorScopes;migrationWarnings;corruptedPath;wasRecovered;corruptionDialogDismissed=!1;_merged;get merged(){return this._merged}computeMergedSettings(){return Ro(this.system.settings,this.systemDefaults.settings,this.user.settings,this.workspace.settings,this.isTrusted)}forScope(e){switch(e){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: ${e}`)}}setValue(e,r,i){r==="model.name"&&typeof i=="string"&&(i=on(i));let n=this.forScope(e);W(n.settings,r,i),W(n.originalSettings,r,i),this._merged=this.computeMergedSettings();let l=r==="mcpServers"?r.split("."):[];wd(n,Ad(r,i),l)}recomputeMerged(){this._merged=this.computeMergedSettings()}reloadScopeFromDisk(e){let r=this.forScope(e);try{if(!_.existsSync(r.path)){r.settings={},r.originalSettings={},r.rawJson=void 0,this._merged=this.computeMergedSettings();return}let i=_.readFileSync(r.path,"utf-8"),n=JSON.parse((0,Yt.default)(i));if(n&&typeof n=="object"&&!Array.isArray(n)){let l=We(n,Lo());r.settings=l,r.originalSettings=structuredClone(n),r.rawJson=i}}catch(i){Q.warn(`reloadScopeFromDisk(${e}): ${ae(i)}`)}this._merged=this.computeMergedSettings()}getUserHooks(){return this.user.settings.hooks}getProjectHooks(){if(this.isTrusted)return this.workspace.settings.hooks}};function Ug(){let t={path:"",settings:{},originalSettings:{},rawJson:"{}"};return new Qt(t,t,t,t,!1,new Set,[],void 0,!1)}function wi(){let t=Ai(),e=K.getGlobalMatildaDir(),r=new Set([L.normalize(L.join(t,".env")),L.normalize(L.join(e,".env"))]),i=L.normalize(L.join(t,Pe,".env"));return r.add(i),r}var Co=!1;function vd(){if(Co||(Co=!0,B.env.MATILDA_HOME&&B.env.MATILDA_RUNTIME_DIR))return;let t=B.env.MATILDA_HOME,e=K.getGlobalMatildaDir(),r=[L.join(e,".env")];t||r.push(L.join(L.dirname(e),".env"));for(let n of r)Ao(n);let i=B.env.MATILDA_HOME;if(i&&i!==t){let n=K.getGlobalMatildaDir();n!==e&&Ao(L.join(n,".env"))}}function Ao(t){if(_.existsSync(t))try{let e=Qe.parse(_.readFileSync(t,"utf-8"));for(let r of Ye)e[r]&&!Object.hasOwn(B.env,r)&&(B.env[r]=e[r])}catch{}}function Lo(){let t=K.getGlobalMatildaDir(),e=[L.join(t,".env")];B.env.MATILDA_HOME||e.push(L.join(L.dirname(t),".env"));let r={};for(let i of e)if(_.existsSync(i))try{let n=Qe.parse(_.readFileSync(i,"utf-8"));for(let l in n)Object.hasOwn(n,l)&&!Object.hasOwn(B.env,l)&&(r[l]??=n[l])}catch(n){Q.warn(`Failed to read home .env candidate ${i}: ${ae(n)}`)}return r}function Dd(t){if(!B.env.MATILDA_HOME)return null;let e=K.getGlobalMatildaDir(),r=B.env.MATILDA_HOME;delete B.env.MATILDA_HOME;let i;try{i=K.getGlobalMatildaDir()}finally{B.env.MATILDA_HOME=r}if(L.resolve(e)===L.resolve(i)||_.existsSync(t))return null;let n=L.join(i,"settings.json");return _.existsSync(n)?`MATILDA_HOME points to "${e}" but no settings.json was found there. Existing config remains at "${i}" \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 Po(t,e,r=wi()){let i=Ai(),n=Nr(t).isTrusted,l=K.getGlobalMatildaDir(),a=L.normalize(L.join(i,Pe)),f=L.normalize(l)!==a,p=d=>n!==!1||r.has(L.normalize(d)),m=()=>{let d=[L.join(l,".env")];f&&d.push(L.join(a,".env")),d.push(L.join(i,".env"));for(let s of d)if(_.existsSync(s)&&p(s))return s;return null},h=L.resolve(e),g=!1;for(;;){if(h===i){g=!0;let s=m();if(s)return s}else{let s=L.join(h,Pe,".env");if(_.existsSync(s)&&p(s))return s;let o=L.join(h,".env");if(_.existsSync(o)&&p(o))return o}let d=L.dirname(h);if(d===h||!d)return g?null:m();h=d}}function Mo(t){if(t&&_.existsSync(t)){let e=_.readFileSync(t),r=Qe.parse(e);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 Ed(t){let e=wi(),r=Po(t,B.cwd(),e);if(B.env.CLOUD_SHELL==="true"&&Mo(r),r)try{let i=_.readFileSync(r,"utf-8"),n=Qe.parse(i),l=t?.advanced?.excludedEnvVars||To,a=L.normalize(r),f=e.has(a),p=f||L.basename(L.dirname(a))===Pe;for(let m in n)if(Object.hasOwn(n,m)){if(!f&&Ye.includes(m)||!p&&l.includes(m))continue;Object.hasOwn(B.env,m)||(B.env[m]=n[m],Vt.add(m)),Di||ke.set(m,n[m])}}catch{}if(t.env)for(let[i,n]of Object.entries(t.env))Ye.includes(i)||(!Object.hasOwn(B.env,i)&&typeof n=="string"&&(B.env[i]=n,Kt.add(i)),!Di&&typeof n=="string"&&!ke.has(i)&&ke.set(i,n));Di=!0}function jg(t,e){let r=wi(),i=Po(t,e,r);B.env.CLOUD_SHELL==="true"&&Mo(i);let n=!1,l=new Map,a=new Map;if(i)try{let h=_.readFileSync(i,"utf-8"),g=Qe.parse(h),d=t?.advanced?.excludedEnvVars||To,s=L.normalize(i),o=r.has(s),u=o||L.basename(L.dirname(s))===Pe;for(let c in g)Object.hasOwn(g,c)&&(vi.has(c)||!o&&Ye.includes(c)||!u&&d.includes(c)||l.set(c,g[c]))}catch{n=!0}if(t.env)for(let[h,g]of Object.entries(t.env))vi.has(h)||Ye.includes(h)||typeof g=="string"&&(l.has(h)||n&&ke.has(h)||a.set(h,g));let f=new Set([...l.keys(),...a.keys()]),p=[],m=[];if(!n){let h=new Set([...ke.keys(),...Vt,...Kt]);for(let g of h)!f.has(g)&&!vi.has(g)&&(delete B.env[g],m.push(g))}for(let[h,g]of l)B.env[h]!==g&&p.push(h),B.env[h]=g;for(let[h,g]of a)B.env[h]!==g&&p.push(h),B.env[h]=g;if(!n){Vt.clear();for(let h of l.keys())Vt.add(h);ke.clear();for(let[h,g]of l)ke.set(h,g);for(let[h,g]of a)ke.set(h,g)}Kt.clear();for(let h of a.keys())Kt.add(h);return{updatedKeys:p,removedKeys:m}}var Cd=".corrupted";function Gg(t=B.cwd(),e=!0){let r=typeof e=="object"?e:{consumeCorruptionEnvVars:e};vd();let i=ko(),n=Dd(i),l={},a={},f={},p={},m=[],h=Fo(),g=yd(),d=new Set,s=L.resolve(t),o=L.resolve(Ai()),u=s;try{u=_.realpathSync(s)}catch{}let c=_.realpathSync(o),y=new K(t).getWorkspaceSettingsPath(),S=(q,Re)=>{try{if(_.existsSync(q)){let Le=_.readFileSync(q,"utf-8"),fe,qe=`${q}${Cd}`,pe=!1,Et=!1,Ct=null;try{fe=JSON.parse((0,Yt.default)(Le))}catch(se){try{_.copyFileSync(q,qe),pe=!0}catch(ne){Q.warn(`Failed to copy corrupted file: ${ae(ne)}`)}let oe=`${q}.orig`;if(_.existsSync(oe)){Q.warn(`Settings file ${q} has invalid JSON (${ae(se)}). Attempting recovery from backup ${oe}.`);try{let ne=_.readFileSync(oe,"utf-8"),gr=JSON.parse((0,Yt.default)(ne));_.writeFileSync(q,ne,"utf-8"),Le=ne,fe=gr;let yr=`Settings file ${q} had invalid JSON and was recovered from backup ${oe}. Some recent settings changes may have been lost.`;Q.warn(yr),Et=!0}catch(ne){Q.warn(`Failed to recover from backup ${oe}: ${ae(ne)}. Falling back to empty settings.`)}}if(!fe){let ne=`Settings file ${q} has invalid JSON. Your settings have been reset.`;if(Q.warn(ne),pe)try{_.writeFileSync(q,"{}","utf-8")}catch{}return{settings:{},migrationWarnings:[],corruptedPath:pe?qe:void 0,wasRecovered:!1}}}let At=B.env[Ei];if((r.consumeCorruptionEnvVars??!0)&&At&&At===qe&&Re==="User"&&(pe=!0,Ct=B.env[Ci]==="1",delete B.env[Ei],delete B.env[Ci]),typeof fe!="object"||fe===null||Array.isArray(fe))return m.push({message:"Settings file is not a valid JSON object.",path:q}),{settings:{}};let ie=fe,wt=je in ie,it=ie[je],kt=wt&&typeof it!="number",Tt=typeof it=="number"&&it<Ue,Ft,nt=se=>{try{yi(q,ie,!0)||Q.error(`${se}: updateSettingsFilePreservingFormat returned false for ${q}`)}catch(oe){Q.error(`${se}: ${ae(oe)}`)}};if(vo(ie)){let se=xo(ie,Re);se.executedMigrations.length>0?(ie=se.settings,Ft=se.warnings,nt("Error migrating settings file on disk")):(Tt||kt)&&!pe&&(ie[je]=Ue,Q.warn(`Settings version metadata in ${q} could not be migrated by any registered migration. Normalizing ${je} to ${Ue}.`),nt("Error normalizing settings version on disk"))}else(!wt||kt||Tt)&&!pe&&(ie[je]=Ue,nt("Error normalizing settings version on disk"));let st={settings:ie,rawJson:Le,migrationWarnings:Ft??[]};return pe&&(st.corruptedPath=qe,st.wasRecovered=Et||(Ct??!1)),st}}catch(Le){m.push({message:ae(Le),path:q})}return{settings:{}}},D=S(h,"System"),E=S(g,"SystemDefaults"),C=S(i,"User"),T={settings:{},rawJson:void 0};u!==c&&(T=S(y,"Workspace"));let I=structuredClone(D.settings),O=structuredClone(E.settings),j=structuredClone(C.settings),$=structuredClone(T.settings),z=Lo();l=We(D.settings,z),a=We(E.settings,z),f=We(C.settings,z),p=We(T.settings,z),f.ui?.theme==="VS"?f.ui.theme=Lr.name:f.ui?.theme==="VS2015"&&(f.ui.theme=Pr.name),p.ui?.theme==="VS"?p.ui.theme=Lr.name:p.ui?.theme==="VS2015"&&(p.ui.theme=Pr.name);let Se=Gr(wo,{},l,f),$e=Nr(Se).isTrusted??!0,pr=Ro(l,a,f,p,$e);if(r.skipLoadEnvironment||Ed(pr),m.length>0){let q=m.map(Re=>`Error in ${Re.path}: ${Re.message}`);throw new It(`${q.join(`
|
|
38
|
-
`)}
|
|
39
|
-
Please fix the configuration file(s) and try again.`)}let mr=[...n?[n]:[],...D.migrationWarnings??[],...E.migrationWarnings??[],...C.migrationWarnings??[],...T.migrationWarnings??[]];return new Qt({path:h,settings:l,originalSettings:I,rawJson:D.rawJson},{path:g,settings:a,originalSettings:O,rawJson:E.rawJson},{path:i,settings:f,originalSettings:j,rawJson:C.rawJson},{path:y,settings:p,originalSettings:$,rawJson:T.rawJson},$e,d,mr,C.corruptedPath,C.wasRecovered??!1)}function Ad(t,e){let r={};return W(r,t,e),r}function wd(t,e=t.originalSettings,r=[]){try{let i=L.dirname(t.path);_.existsSync(i)||_.mkdirSync(i,{recursive:!0}),yi(t.path,e,!1,r)||Q.error(`saveSettings: updateSettingsFilePreservingFormat returned false for ${t.path}`)}catch(i){throw Q.error("Error saving user settings file."),Q.error(i instanceof Error?i.message:String(i)),i}}b();b();b();import Rf from"node:path";b();import kd from"node:process";import Td from"node:fs/promises";import{fileURLToPath as Fd}from"node:url";import Ze from"node:path";var No=t=>t instanceof URL?Fd(t):t;async function Oo(t,{cwd:e=kd.cwd(),type:r="file",stopAt:i}={}){let n=Ze.resolve(No(e)??""),{root:l}=Ze.parse(n);i=Ze.resolve(n,No(i??l));let a=Ze.isAbsolute(t);for(;n;){let f=a?t:Ze.join(n,t);try{let p=await Td.stat(f);if(r==="file"&&p.isFile()||r==="directory"&&p.isDirectory())return f}catch{}if(n===i||n===l)break;n=Ze.dirname(n)}}b();import kf from"node:fs/promises";import Tf from"node:path";b();var aa=He(oa(),1);b();function Qd(t,e){let r=e===0?-1:t.lastIndexOf(`
|
|
40
|
-
`,e-1);return{line:r===-1?0:t.slice(0,r+1).match(/\n/g).length,column:e-r-1}}function Pi(t,e,{oneBased:r=!1}={}){if(typeof t!="string")throw new TypeError("Text parameter should be a string");if(!Number.isInteger(e))throw new TypeError("Index parameter should be an integer");if(e<0||e>t.length)throw new RangeError("Index out of bounds");let i=Qd(t,e);return r?{line:i.line+1,column:i.column+1}:i}var Zd=t=>`\\u{${t.codePointAt(0).toString(16)}}`,Mi=class t extends Error{name="JSONError";fileName;#i;#s;#t;#f;#A;constructor(e){if(typeof e=="string")super(),this.#t=e;else{let{jsonParseError:r,fileName:i,input:n}=e;super(void 0,{cause:r}),this.#i=n,this.#s=r,this.fileName=i}Error.captureStackTrace?.(this,t)}get message(){this.#t??=`${th(this.#s.message)}${this.#i===""?" while parsing empty string":""}`;let{codeFrame:e}=this;return`${this.#t}${this.fileName?` in ${this.fileName}`:""}${e?`
|
|
41
|
-
|
|
42
|
-
${e}
|
|
43
|
-
`:""}`}set message(e){this.#t=e}#w(e){if(!this.#s)return;let r=this.#i,i=eh(r,this.#s.message);if(i)return(0,aa.codeFrameColumns)(r,{start:i},{highlightCode:e})}get codeFrame(){return this.#f??=this.#w(!0),this.#f}get rawCodeFrame(){return this.#A??=this.#w(!1),this.#A}},eh=(t,e)=>{let r=e.match(/in JSON at position (?<index>\d+)(?: \(line (?<line>\d+) column (?<column>\d+)\))?$/);if(!r)return;let{index:i,line:n,column:l}=r.groups;return n&&l?{line:Number(n),column:Number(l)}:Pi(t,Number(i),{oneBased:!0})},th=t=>t.replace(/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,(e,r,i)=>`"${i}"(${Zd(i)})`);function Ni(t,e,r){typeof e=="string"&&(r=e,e=void 0);try{return JSON.parse(t,e)}catch(i){throw new Mi({jsonParseError:i,fileName:r,input:t})}}var Eu=He(vu(),1);b();import{fileURLToPath as wf}from"node:url";function Du(t){return t instanceof URL?wf(t):t}var Ff=t=>Tf.resolve(Du(t)??".","package.json"),If=(t,e)=>{let r=typeof t=="string"?Ni(t):t;return e&&(0,Eu.default)(r),r};async function Cu({cwd:t,normalize:e=!0}={}){let r=await kf.readFile(Ff(t),"utf8");return If(r,e)}async function Au(t){let e=await Oo("package.json",t);if(e)return{packageJson:await Cu({...t,cwd:Rf.dirname(e)}),path:e}}import{fileURLToPath as Lf}from"node:url";import Pf from"node:path";var Mf=Lf(import.meta.url),Nf=Pf.dirname(Mf),hr;async function wu(){if(hr)return hr;let t=await Au({cwd:Nf});if(t)return hr=t.packageJson,hr}async function ku(){let t=await wu();return"0.19.9"}b();function Uy(t,e){let r=e??Yn(t),i=t.forScope(r),n=null,l=null;return{getValue(a){return Ee(t.merged,a)},setValue(a,f){for(let p of a.split("."))if(p==="__proto__"||p==="constructor"||p==="prototype")throw new Error(`Refusing to write settings key with reserved segment: ${a}`);t.setValue(r,a,f)},getModelProviders(){return t.merged.modelProviders??{}},persist(){},backup(){as(i.path),n=structuredClone(i.settings),l=structuredClone(i.originalSettings)},restore(){us(i.path)||console.error(`[loadedSettingsAdapter] On-disk rollback of ${i.path} failed; in-memory state was restored but the file may be inconsistent. Re-run /auth or inspect the file directly to recover.`),n!==null&&(i.settings=n),l!==null&&(i.originalSettings=l),t.recomputeMerged()},cleanupBackup(){ls(i.path),n=null,l=null}}}b();var Tu=t=>{let e=t/1073741824;return t<1048576?`${(t/1024).toFixed(1)} KB`:t<1073741824?`${(t/1048576).toFixed(1)} MB`:`${e.toFixed(2)} GB`},$y=t=>{let r=Date.now()-t,i=Math.floor(r/1e3),n=Math.floor(i/60),l=Math.floor(n/60),a=Math.floor(l/24),f=Math.floor(a/7),p=Math.floor(a/30);return p>0?p===1?"1 month ago":`${p} months ago`:f>0?f===1?"1 week ago":`${f} weeks ago`:a>0?a===1?"1 day ago":`${a} days ago`:l>0?l===1?"1 hour ago":`${l} hours ago`:n>0?n===1?"1 minute ago":`${n} minutes ago`:"just now"},qy=t=>t<1e3?`${t}`:t<1e4?`${(t/1e3).toFixed(1)}k`:`${Math.floor(t/1e3)}k`,Hy=(t,e)=>{if(t<=0)return"0s";if(t<1e3)return`${Math.round(t)}ms`;let r=t/1e3;if(r<60){let f=r.toFixed(1);return e?.hideTrailingZeros&&f.endsWith(".0")?`${f.slice(0,-2)}s`:`${f}s`}let i=Math.floor(r/3600),n=Math.floor(r%3600/60),l=Math.floor(r%60),a=[];return i>0&&a.push(`${i}h`),n>0&&a.push(`${n}m`),l>0&&a.push(`${l}s`),a.length===0?i>0?`${i}h`:n>0?`${n}m`:`${l}s`:a.join(" ")};b();var Xy="craft/drainMidTurnQueue";b();import rt from"node:process";import Of from"node:os";import{execFile as Bf}from"node:child_process";b();var fr="9d5261d0d";var Fu=be("STATUS"),_f=5e3;function Iu(t){return new Promise(e=>{Bf(t,["--version"],{timeout:_f,encoding:"utf-8"},(r,i)=>{if(r){e("unknown");return}e(typeof i=="string"?i.trim():"unknown")})})}async function Uf(){return Iu("npm")}async function oS(){return Iu("git")}async function jf(t){if(!t.services.config?.getIdeMode())return"";try{return(await cn.getInstance())?.getDetectedIdeDisplayName()??""}catch{return""}}function Ru(t=!1){let e=rt.env.SANDBOX;return!e||e==="sandbox-exec"?e==="sandbox-exec"?`sandbox-exec (${rt.env.SEATBELT_PROFILE||"unknown"})`:"no sandbox":t?e.replace(/^matilda-(?:code-)?/,""):e}async function Gf(t){let e=rt.platform,r=rt.arch,i=Of.release(),n=rt.version,l=await Uf(),a=Ru(),f=t.services.config?.getModelDisplayName()||"Unknown",p=await ku(),m=t.services.config?.getAuthType()||"",h=await jf(t),g=t.services.config?.getSessionId()||"unknown",d=t.services.config?.getProxy();return{cliVersion:p,osPlatform:e,osArch:r,osRelease:i,nodeVersion:n,npmVersion:l,sandboxEnv:a,modelVersion:f,selectedAuthType:m,ideClient:h,sessionId:g,proxy:d}}async function aS(t){let e=await Gf(t),r=Tu(rt.memoryUsage().rss),i=Ru(!0),n=e.selectedAuthType==="openai"||e.selectedAuthType==="anthropic"?t.services.config?.getContentGeneratorConfig():void 0,l=n?.baseUrl,a=n?.apiKeyEnvKey,f=fr&&!["N/A"].includes(fr)?fr:void 0,p=t.services.settings?.merged?.fastModel||void 0,m=$f(t);return{...e,sandboxEnv:i,memoryUsage:r,baseUrl:l,apiKeyEnvKey:a,gitCommit:f,fastModel:p,lspStatus:m}}function $f(t){try{let e=t.services.config?.getLspStatusSnapshot?.();return e?(t.services.config?.getDebugMode?.()&&Fu.debug("LSP status snapshot for /status:",e),qf(e)):void 0}catch(e){t.services.config?.getDebugMode?.()&&Fu.debug("Unable to read LSP status snapshot for /status:",e);return}}function qf(t){if(!t.enabled)return"disabled";if(t.initializationError)return`enabled, initialization failed: ${t.initializationError}`;if(t.statusUnavailable)return"enabled, status unavailable";if(t.configuredServers===0)return"enabled, no servers configured";let e=[t.failedServers>0?`${t.failedServers} failed`:"",t.inProgressServers>0?`${t.inProgressServers} starting`:"",t.notStartedServers>0?`${t.notStartedServers} not started`:""].filter(Boolean),r=e.length>0?` (${e.join(", ")})`:"";return`enabled, ${t.readyServers}/${t.configuredServers} ready${r}`}export{Ir as a,Lp as b,Pp as c,G as d,N as e,Bp as f,Ne as g,_p as h,Up as i,Lr as j,Pr as k,Il as l,Ll as m,Nr as n,Yn as o,nm as p,hl as q,kr as r,Hn as s,Tr as t,Sl as u,Ap as v,wp as w,ns as x,Ol as y,Br as z,ze as A,Ee as B,ts as C,hm as D,ct as E,fm as F,pm as G,mm as H,gm as I,ym as J,Sm as K,Og as L,Bg as M,Ei as N,Ci as O,Qn as P,_g as Q,Ug as R,vd as S,Ed as T,jg as U,Cd as V,Gg as W,Oi as X,Bi as Y,da as Z,fa as _,ya as $,xa as aa,$i as ba,Ca as ca,wa as da,wu as ea,ku as fa,Uy as ga,Hf as ha,vr as ia,yn as ja,Yf as ka,Er as la,tp as ma,rp as na,xn as oa,vn as pa,Dn as qa,En as ra,Cn as sa,An as ta,wn as ua,kn as va,Tn as wa,Fn as xa,In as ya,Rn as za,Ln as Aa,Pn as Ba,Mn as Ca,Nn as Da,On as Ea,Bn as Fa,_n as Ga,Un as Ha,jn as Ia,Gn as Ja,$n as Ka,Me as La,op as Ma,Cr as Na,Ar as Oa,wr as Pa,ap as Qa,up as Ra,sl as Sa,lp as Ta,cp as Ua,dp as Va,hp as Wa,fp as Xa,pp as Ya,mp as Za,ol as _a,gp as $a,yp as ab,Xy as bb,Tu as cb,$y as db,qy as eb,Hy as fb,Uf as gb,oS as hb,aS as ib};
|
|
44
|
-
/**
|
|
45
|
-
* @license
|
|
46
|
-
* Copyright 2025 Matilda Team
|
|
47
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
48
|
-
*/
|
|
49
|
-
/**
|
|
50
|
-
* @license
|
|
51
|
-
* Copyright 2025 Matilda team
|
|
52
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
53
|
-
*/
|
|
54
|
-
/**
|
|
55
|
-
* @license
|
|
56
|
-
* Copyright 2025 Google LLC
|
|
57
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
58
|
-
*/
|
|
59
|
-
/**
|
|
60
|
-
* @license
|
|
61
|
-
* Copyright 2025 Matilda Team
|
|
62
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
63
|
-
*
|
|
64
|
-
* Adapter that lets core's `applyProviderInstallPlan` write through
|
|
65
|
-
* `LoadedSettings` while preserving CLI-specific guarantees:
|
|
66
|
-
* - scope resolution via `getPersistScopeForModelSelection`
|
|
67
|
-
* - on-disk `.orig` backup of the target settings file
|
|
68
|
-
* - in-memory snapshot of `settings` / `originalSettings` for rollback
|
|
69
|
-
* - merged-settings recomputation after restore
|
|
70
|
-
*/
|
|
71
|
-
/**
|
|
72
|
-
* @license
|
|
73
|
-
* Copyright 2026 Google LLC
|
|
74
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
75
|
-
*/
|
|
76
|
-
/**
|
|
77
|
-
* @license
|
|
78
|
-
* Copyright 2025 Matilda
|
|
79
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
80
|
-
*/
|
|
81
|
-
/*! Bundled license information:
|
|
82
|
-
|
|
83
|
-
repeat-string/index.js:
|
|
84
|
-
(*!
|
|
85
|
-
* repeat-string <https://github.com/jonschlinkert/repeat-string>
|
|
86
|
-
*
|
|
87
|
-
* Copyright (c) 2014-2015, Jon Schlinkert.
|
|
88
|
-
* Licensed under the MIT License.
|
|
89
|
-
*)
|
|
90
|
-
*/
|