eslint-config-sukka 9.0.1 → 9.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,31 +1,31 @@
1
- var e=Map,t=Set;"use strict";var r,n,s,i,o,a,l,c,u,p,f,d,h,m,g,y,b,k,v,w,S,x,E,A,C,T,O,L,N,$,_,I,P,j,M,D,R,F,q,B,U,K,Y,W,J,H,G,V,X,Q,z,Z,ee,et,er,en,es,ei,eo,ea,el,ec,eu,ep,ef,ed,eh,em,eg,ey,eb,ek,ev,ew,eS,ex,eE,eA,eC,eT,eO,eL,eN,e$,e_,eI=require("@eslint-sukka/shared"),eP=require("node:fs"),ej=require("node:path"),eM=require("node:process"),eD=require("./vendor-DF7e3CVu.cjs");require("node:fs/promises");var eR=require("node:url"),eF=require("foxts/guard"),eq=require("foxts/append-array-in-place"),eB=require("@eslint/config-helpers"),eU=require("@eslint-community/eslint-plugin-eslint-comments"),eK=require("@eslint-sukka/eslint-plugin-sukka-full"),eY=require("eslint-plugin-vibe-proof"),eW=require("eslint-plugin-promise"),eJ=require("@eslint-sukka/eslint-plugin-stylistic"),eH=require("foxts/literal"),eG=require("@eslint/js"),eV=require("eslint-plugin-unused-imports"),eX=require("eslint-plugin-import-x"),eQ=require("foxts/cast-array"),ez=require("typescript-eslint"),eZ=require("@typescript-eslint/eslint-plugin"),e0=require("@typescript-eslint/parser"),e1=require("eslint-import-resolver-typescript"),e2=require("defu"),e9=require("ci-info"),e3=require("picocolors"),e6=require("jsonc-eslint-parser"),e8=require("process"),e4=require("buffer"),e5=require("fs"),e7=require("path"),te=require("url"),tt=require("module");require("node:module");var tr=require("foxts/is-object-empty"),tn="u">typeof document?document.currentScript:null;function ts(e){var t=Object.create(null);if(e)for(var r in e)t[r]=e[r];return t.default=e,Object.freeze(t)}var ti=ts(eP),to=ts(ej),ta=ts(e6),tl=ts(e8),tc=ts(e4),tu=ts(e5),tp={},tf=eD.g(ti),td=eD.g(to),th=function(){if(n)return tp;n=1;let t=new e([["getSource","getText"],["getSourceLines","getLines"],["getAllComments","getAllComments"],["getDeclaredVariables","getDeclaredVariables"],["getNodeByRangeIndex","getNodeByRangeIndex"],["getCommentsBefore","getCommentsBefore"],["getCommentsAfter","getCommentsAfter"],["getCommentsInside","getCommentsInside"],["getJSDocComment","getJSDocComment"],["getFirstToken","getFirstToken"],["getFirstTokens","getFirstTokens"],["getLastToken","getLastToken"],["getLastTokens","getLastTokens"],["getTokenAfter","getTokenAfter"],["getTokenBefore","getTokenBefore"],["getTokenByRangeStart","getTokenByRangeStart"],["getTokens","getTokens"],["getTokensAfter","getTokensAfter"],["getTokensBefore","getTokensBefore"],["getTokensBetween","getTokensBetween"]]),r=new WeakMap,s=new WeakSet,i=new WeakMap,o=new WeakSet;function a(e,t){let r=t.getTokenBefore(e,{includeComments:!0});return r&&"Block"===r.type&&"*"===r.value.charAt(0)&&e.loc.start.line-r.loc.end.line<=1?r:null}function l(e){if(r.has(e))return r.get(e);let n="function"==typeof e;if(!n&&s.has(e))return e;let i=n?e:e.create.bind(e),o={...n?void 0:e,create:function(e){let r=e.sourceCode;if("getScope"in e)return i(e);let n=9;"getCwd"in e||(n=10);let s=r;n>=10&&Object.freeze(s=Object.assign(Object.create(r),{getTokenOrCommentBefore:(e,t)=>r.getTokenBefore(e,{includeComments:!0,skip:t}),getTokenOrCommentAfter:(e,t)=>r.getTokenAfter(e,{includeComments:!0,skip:t}),isSpaceBetweenTokens(e,t){if(e.range[0]<=t.range[0]&&e.range[1]>=t.range[0]||t.range[0]<=e.range[0]&&t.range[1]>=e.range[0])return!1;let[n,s]=e.range[1]<=t.range[0]?[e,t]:[t,e],i=r.getLastToken(n)||n,o=r.getFirstToken(s)||s,a=i;for(;a!==o;){let e=r.getTokenAfter(a,{includeComments:!0});if(a.range[1]!==e.range[0]||e!==o&&"JSXText"===e.type&&/\s/u.test(e.value))return!0;a=e}return!1},getJSDocComment(e){let t=e.parent;switch(e.type){case"ClassDeclaration":case"FunctionDeclaration":var n;return a("ExportDefaultDeclaration"===(n=t).type||"ExportNamedDeclaration"===n.type?t:e,r);case"ClassExpression":return a(t.parent,r);case"ArrowFunctionExpression":case"FunctionExpression":if("CallExpression"!==t.type&&"NewExpression"!==t.type){for(;!r.getCommentsBefore(t).length&&!/Function/u.test(t.type)&&"MethodDefinition"!==t.type&&"Property"!==t.type&&(t=t.parent););if(t&&"FunctionDeclaration"!==t.type&&"Program"!==t.type)return a(t,r)}return a(e,r);default:return null}}}));let o=s.ast,l=Object.assign(Object.create(e),{parserServices:s.parserServices,getScope:()=>s.getScope(o),getAncestors:()=>s.getAncestors(o),markVariableAsUsed(e){s.markVariableAsUsed(e,o)}});for(let[e,r]of(n>=10&&(Object.assign(l,{parserOptions:l.languageOptions.parserOptions,getCwd:()=>l.cwd,getFilename:()=>l.filename,getPhysicalFilename:()=>l.physicalFilename,getSourceCode:()=>s}),Object.defineProperty(l,"sourceCode",{enumerable:!0,value:s})),t))l[e]=s[r].bind(s);Object.freeze(l);let c=i(l);for(let[e,t]of Object.entries(c)){if(e.startsWith("on")){c[e]=(...r)=>(o=r["onCodePathSegmentLoop"===e?2:1],t.call(c,...r));continue}c[e]=(...e)=>(o=e[0],t.call(c,...e))}return c}},{schema:l}=e;return l&&(o.meta?o.meta={...o.meta,schema:l}:o.meta={schema:l}),r.set(e,o),s.add(o),o}function c(e){if(i.has(e))return i.get(e);if(o.has(e)||!e.rules)return e;let t={...e,rules:Object.fromEntries(Object.entries(e.rules).map(([e,t])=>[e,l(t)]))};return i.set(e,t),o.add(t),t}function u(e){let t=e.startsWith("!"),r=t?"!":"",n=(t?e.slice(1):e).trimEnd();if(["","**","/**","**/"].includes(n))return`${r}${n}`;let s=n.indexOf("/"),i=s<0||s===n.length-1?"**/":"",o=(0===s?n.slice(1):n).replaceAll(/(?=((?:\\.|[^{(])*))\1([{(])/guy,"$1\\$2"),a=n.endsWith("/**")?"/*":"";return`${r}${i}${o}${a}`}return tp.convertIgnorePatternToMinimatch=u,tp.fixupConfigRules=function(e){return(Array.isArray(e)?e:[e]).map(e=>{if(!e.plugins)return e;let t=Object.fromEntries(Object.entries(e.plugins).map(([e,t])=>[e,c(t)]));return{...e,plugins:t}})},tp.fixupPluginRules=c,tp.fixupRule=l,tp.includeIgnoreFile=function(e,t){if(!td.isAbsolute(e))throw Error("The ignore file location must be an absolute path.");return{name:t||"Imported .gitignore patterns",ignores:tf.readFileSync(e,"utf8").split(/\r?\n/u).map(e=>e.trim()).filter(e=>e&&!e.startsWith("#")).map(u)}},tp}();function tm(e){return Array.isArray(e=e??[])?e:[e]}let tg=e=>e instanceof URL?eR.fileURLToPath(e):e;function ty(e,{cwd:t=eM.cwd(),type:r="file",stopAt:n}={}){let s=ej.resolve(tg(t)??""),{root:i}=ej.parse(s);n=ej.resolve(s,tg(n)??i);let o=ej.isAbsolute(e);for(;s;){let t=o?e:ej.join(s,e);try{let e=eP.statSync(t,{throwIfNoEntry:!1});if("file"===r&&e?.isFile()||"directory"===r&&e?.isDirectory())return t}catch{}if(s===n||s===i)break;s=ej.dirname(s)}}let tb=".gitignore",tk=".gitmodules",tv=/\r?\n/u,tw=/^(?:\.\.\/)+$/,tS=/[/\\]/,tx=/path\s*=\s*(.+)/u;function tE(e={}){let r=[],{cwd:n=eM.cwd(),root:s=!1,recursive:i=!1,files:o=s?tb:ty(tb,{cwd:n})||[],filesGitModules:a=s?eP.existsSync(ej.join(n,tk))?tk:[]:ty(tk,{cwd:n})||[],strict:l=!0}=e,c=new t(tm(o).map(e=>ej.resolve(n,e)));if(i)for(let e of function(e,r,n){let s=[],i=new t([".git","node_modules",...n]),o=[e];for(;o.length;){let e=o.shift();for(let t of eP.readdirSync(e,{withFileTypes:!0})){let n=ej.join(e,t.name);t.isFile()&&t.name===r&&s.push(n),t.isDirectory()&&!i.has(t.name)&&o.push(n)}}return s}(n,tb,"boolean"==typeof i?[]:i.skipDirs))c.add(e);let u=[...c],p=tm(a).map(e=>ej.resolve(n,e));for(let e of u){let t="";try{t=eP.readFileSync(e,"utf8")}catch(e){if(l)throw e;continue}let s=ej.relative(n,ej.dirname(e)).replaceAll("\\","/"),i=t.split(tv).filter(e=>e&&!e.startsWith("#")).map(e=>th.convertIgnorePatternToMinimatch(e)).map(e=>(function(e,t,r){if(["",".","/"].includes(t))return e;let n=e.startsWith("!")?"!":"",s=n?e.slice(1):e;if(t.endsWith("/")||(t=`${t}/`),!t.startsWith(".."))return`${n}${t}${s}`;if(!tw.test(t))throw Error("The ignore file location should be either a parent or child directory");if(s.startsWith("**"))return e;let i=ej.relative(ej.resolve(r,t),r).split(tS);for(;i.length&&s.startsWith(`${i[0]}/`);)s=s.slice(i[0].length+1),i.shift();return s.startsWith("**")||0===i.length?`${n}${s}`:null})(e,s,n)).filter(e=>null!==e);r.push(...i)}for(let e of p){let t="";try{t=eP.readFileSync(e,"utf8")}catch(e){if(l)throw e;continue}let n=t.split(tv).map(e=>tx.exec(e)).filter(e=>null!==e).map(e=>e[1].trim());r.push(...n.map(e=>`${e}/**`))}if(l&&0===u.length)throw Error("No .gitignore file found");return{name:e.name||"gitignore",ignores:r}}function tA(e={}){let{customGlobs:t=null,gitignore:r=[".gitignore"]}=e,n=[],s=[];return!1===t||null===t?s=eI.constants.GLOB_EXCLUDE:"function"==typeof t?s=t(eI.constants.GLOB_EXCLUDE):"string"==typeof t?(eq.appendArrayInPlace(s,eI.constants.GLOB_EXCLUDE),s.push(t)):Array.isArray(t)?(eq.appendArrayInPlace(s,eI.constants.GLOB_EXCLUDE),eq.appendArrayInPlace(s,t)):eF.never(t),n.push(eB.globalIgnores(s,"@eslint-sukka global ignores")),!1===r||null===r||(!0===r?n.push(tE({files:[".gitignore"],strict:!1})):"string"==typeof r||Array.isArray(r)?n.push(tE({files:r,strict:!1})):eF.never(r)),n}async function tC(){let{configs:e}=await import("eslint-plugin-regexp");return eI.UNSAFE_excludeJsonYamlFiles([e["flat/recommended"],{name:"sukka/regexp",rules:{"regexp/strict":"off"}}])}var tT="azat-io/eslint-plugin-de-morgan";function tO(...e){return(...t)=>t.every(t=>t(...e))}function tL(e){return"LogicalExpression"===e.type}function tN(e,t){let r=e,[n,s]=r.range;if(t$(n,s,t))return r;for(;r.parent&&tL(r)&&(r=r.parent,[n,s]=r.range,!t$(n,s,t)););return r}function t$(e,t,r){return"("===r[e-1]&&")"===r[t]}function t_(e){return"UnaryExpression"===e.type}function tI(e){return t=>t.operator===e}function tP(e){return tO(e)(t_,tI("!"))}function tj(e,t){let r=tN(e,t.sourceCode.getText(e));return!!t_(r)&&function e(t){let r=t;for(;t_(r)&&"!"===r.operator&&t_(r.argument)&&"!"===r.argument.operator;)r=r.argument.argument;return!!tP(r)||!!tL(r)&&(e(r.left)||e(r.right))}(r.argument)}function tM(e){let{parent:t}=e;if(!t)return!1;switch(t.type){case"ConditionalExpression":return t.test===e||tM(t);case"ExpressionStatement":case"DoWhileStatement":case"WhileStatement":case"ForStatement":case"IfStatement":return!0;case"SequenceExpression":return t.expressions.at(-1)!==e||tM(t);case"LogicalExpression":return"??"!==t.operator&&tM(t);case"UnaryExpression":return"!"===t.operator;default:return!1}}var tD=/^(?:function(?![\w$])|class(?![\w$])|\{)/u,tR=/^[(+\-/[`]/u,tF=new t([";","{"]);function tq({context:e,node:t,fix:r}){let n=function(e){let t=e;for(;!t.type.endsWith("Statement")&&"Program"!==t.type;)t=t.parent;return t}(t);if("ExpressionStatement"!==n.type||!n.range||!t.range||n.range[0]!==t.range[0])return r;let s=tD.test(r)?`(${r})`:r;if(tR.test(s)){let t=e.sourceCode.getTokenBefore(n);if(t&&!tF.has(t.value))return null}return s}function tB(e,t){if(function(e){let t=e;for(;t.parent&&("VariableDeclarator"===t.parent.type||"VariableDeclaration"===t.parent.type||t.parent.type.endsWith("Expression"));)t=t.parent;return t.parent?.type==="ForStatement"&&t.parent.init===t}(e))return!0;let{parent:r}=e;switch(r.type){case"TaggedTemplateExpression":case"BinaryExpression":case"AwaitExpression":case"UnaryExpression":return!0;case"LogicalExpression":return"??"===r.operator||"||"===t&&"&&"===r.operator;case"MemberExpression":return r.object===e;case"CallExpression":case"NewExpression":return r.callee===e;default:return!1}}function tU(e){return"BinaryExpression"===e.type}function tK(e,t){var r,n,s;return!!e.parent&&(r=e.parent,tY.has(r.type)||tU(n=e.parent)&&tW.has(n.operator)||"CallExpression"===(s=e.parent).type&&"Identifier"===s.callee.type&&"Boolean"===s.callee.name)}var tY=new t(["ConditionalExpression","LogicalExpression","DoWhileStatement","UnaryExpression","WhileStatement","ForStatement","IfStatement"]),tW=new t(["instanceof","===","!==","==","!=","<=",">=","in","<",">"]);function tJ(e){return tO(e)(tL,tI("&&"))}function tH(e){let t=[],r=e.replaceAll(/(?<quote>["'`])(?:\\.|(?!\k<quote>)[^\\])*\k<quote>/gu,e=>{let r=`__STRING_LITERAL_${t.length}__`;return t.push(e),r}).replaceAll(/\/\/.*$/gmu,"").replaceAll(/\/\*[\s\S]*?\*\//gu,"").replaceAll(/\s+/gu," ").replaceAll(/\(\s+/gu,"(").replaceAll(/\s+\)/gu,")").trim();for(let[e,n]of t.entries())r=r.replace(`__STRING_LITERAL_${e}__`,n);return r}function tG(e,t){var r;let n=tN(e,t.sourceCode.getText());return!function(e){let t=0,r=null;for(let n=0;n<e.length;n++){let s=e[n];if("("===s){t++;continue}if(")"===s){t--;continue}if(0!==t)continue;let i=e.slice(n,n+2);if("&&"===i||"||"===i){if(null===r)r=i;else if(r!==i)return!0;n++}}return!1}((r=t.sourceCode.getText(n)).startsWith("!(")?r.slice(2,-1):r.startsWith("(")?r.slice(1,-1):r)}function tV(e){return tP(e)&&!tP(e.argument)&&(!e.parent||!tP(e.parent))}function tX(e,t=!0){return t?`(${e})`:e}function tQ(e){return"Literal"===e.type&&"boolean"==typeof e.value}function tz(e,r,n=!0){var s,i,o;let a;for(let{transformer:t,predicate:n}of[{transformer:tZ,predicate:tU},{transformer:t2,predicate:tQ},{transformer:t0,predicate:tL}])if(n(e))return t(e,r);return s=e,i=r,o=n,a=i.sourceCode.getText(s).trim(),(new t(["ArrowFunctionExpression","ConditionalExpression","AssignmentExpression","SequenceExpression","YieldExpression"])).has(s.type)?`!(${a})`:o?t1(a):`!${a}`}function tZ(e,t){let r=t.sourceCode.getText(e),n={"===":"!==","!==":"===","==":"!=","!=":"=="}[e.operator];if(!n)return`!(${r})`;let s=t.sourceCode.getTokenAfter(e.left,{filter:t=>t.value===e.operator});if(!s||!e.range)return`!(${r})`;let[i]=e.range,[o,a]=s.range;return r.slice(0,o-i)+n+r.slice(a-i)}function t0(e,t){return t1(tX(t.sourceCode.getText(e).trim()))}function t1(e){return e.startsWith("!")?e.replace(/^!/u,""):`!${e}`}function t2(e){return e.value?"false":"true"}function t9(e){return tO(e)(tL,tI("||"))}var t3={"&&":"||","||":"&&"};function t6({shouldWrapInParens:e,canStripNegation:t,expressionType:r,context:n,node:s}){var i;let o=s.argument,a="conjunction"===r?"&&":"||";if(o.operator!==a)return null;let l=n.sourceCode.getText(o),c={expression:o,canStripNegation:t,expressionType:r,sourceOperator:a,targetOperator:t3[a],context:n};return tX((i=l).includes("//")||i.includes("/*")||i.includes("\n")||/\s{2,}/u.test(i)?function({canStripNegation:e,sourceOperator:t,targetOperator:r,expression:n,context:s}){let{sourceCode:i}=s,o=tz(n.left,s,e),a=tz(n.right,s,e);if(!n.left.range||!n.right.range)return`${o} ${r} ${a}`;let[,l]=n.left.range,[c]=n.right.range;return`${o}${i.text.slice(l,c).replace(/^\s*(?:\)\s*)+/u,e=>e.match(/\s*$/u)[0]).replace(/(?:\s*\()+\s*$/u,e=>e.match(/^\s*/u)[0]).replaceAll(RegExp(t.replaceAll(/[$()*+.?[\\\]^{|}]/gu,String.raw`\$&`),"gu"),r)}${a}`}(c):function({canStripNegation:e,expressionType:t,targetOperator:r,expression:n,context:s}){return(function({canStripNegation:e,expressionType:t,expression:r,context:n}){let s=[],i=[{expr:r,depth:0}];for(;i.length>0;){var o;let{depth:r,expr:a}=i.pop();if(r>10||(o=a,"conjunction"===t?!tJ(o):!t9(o))){s.push(tz(a,n,e));continue}i.push({expr:a.right,depth:r+1},{expr:a.left,depth:r+1})}return s})({canStripNegation:e,expressionType:t,expression:n,context:s}).join(` ${r} `)}(c),e)}function t8(e){return(...t)=>!e(...t)}function t4(...e){return(...t)=>e.some(e=>e(...t))}var t5="de-morgan",t7={"no-negated-conjunction":{create:e=>({UnaryExpression:t=>{if(tO(t,e)(tV,e=>tJ(e.argument),tG,t4(tK,t8(tj)))){let r=t6({expressionType:"conjunction",shouldWrapInParens:tB(t,"||"),canStripNegation:tM(t),context:e,node:t});if(r){let n=tq({fix:r,context:e,node:t}),s=e.sourceCode.getText(t);e.report({data:{fixed:tH(n??r),original:tH(s)},fix:e=>null===n?null:e.replaceText(t,n),messageId:"convertNegatedConjunction",node:t})}}}}),meta:{docs:{description:"Transforms the negation of a conjunction !(A && B) into the equivalent !A || !B according to De Morgan’s law",url:`https://github.com/${tT}/blob/main/docs/no-negated-conjunction.md`,recommended:!0},messages:{convertNegatedConjunction:"Replace negated conjunction `{{ original }}` with `{{ fixed }}`"},type:"suggestion",fixable:"code",schema:[]}},"no-negated-disjunction":{create:e=>({UnaryExpression:t=>{if(tO(t,e)(tV,e=>t9(e.argument),tG,t4(tK,t8(tj)))){let r=t6({expressionType:"disjunction",shouldWrapInParens:tB(t,"&&"),canStripNegation:tM(t),context:e,node:t});if(r){let n=tq({fix:r,context:e,node:t}),s=e.sourceCode.getText(t);e.report({data:{fixed:tH(n??r),original:tH(s)},fix:e=>null===n?null:e.replaceText(t,n),messageId:"convertNegatedDisjunction",node:t})}}}}),meta:{docs:{description:"Transforms the negation of a disjunction !(A || B) into the equivalent !A && !B according to De Morgan’s law",url:`https://github.com/${tT}/blob/main/docs/no-negated-disjunction.md`,recommended:!0},messages:{convertNegatedDisjunction:"Replace negated disjunction `{{ original }}` with `{{ fixed }}`"},type:"suggestion",fixable:"code",schema:[]}}};function re(){return Object.fromEntries(Object.keys(t7).map(e=>[`${t5}/${e}`,"error"]))}var rt={"recommended-legacy":{plugins:[t5],rules:re()},recommended:{plugins:{[t5]:{rules:t7}},rules:re()}};let rr=[".js",".jsx",".mjs",".cjs"];async function rn(e={}){let{files:t,disableNoConsoleInCLI:r=!0,env:n={}}=e,{browser:s=!0,webextensions:i=!1,greasemonkey:o=!1,customGlobals:a={}}=n,l=e.module??eI.getPackageJson()?.type==="module",{default:c}=await Promise.resolve().then(function(){return require("./vendor-DF7e3CVu.cjs")}).then(function(e){return e.i}),u=[{linterOptions:{reportUnusedDisableDirectives:"error",reportUnusedInlineConfigs:"warn"}},eG.configs.recommended,eI.withFiles({name:"@eslint-sukka/js base",languageOptions:{ecmaVersion:"latest",sourceType:l?"module":"commonjs",parserOptions:{ecmaVersion:"latest",sourceType:l?"module":"commonjs",ecmaFeatures:{jsx:!0}},globals:{...eI.globals.es2025,...s&&eI.globals.browser,...i&&eI.globals.webextensions,...o&&eI.globals.greasemonkey,...a}},plugins:{"unused-imports":eI.memo(eV,"eslint-plugin-unused-imports"),sukka:eI.memo(eK,"@eslint-sukka/eslint-plugin-sukka-full"),antfu:c},rules:{"accessor-pairs":"off","array-callback-return":["error",{allowImplicit:!0}],"arrow-body-style":["error","as-needed",{requireReturnForObjectLiteral:!1}],"block-scoped-var":"error","class-methods-use-this":["error",{exceptMethods:[]}],curly:["error","multi-line"],"default-case":["error",{commentPattern:"^no default$"}],"default-case-last":"error","default-param-last":"error","dot-notation":["error",{allowKeywords:!0}],eqeqeq:["error","always",{null:"ignore"}],"grouped-accessor-pairs":"error","guard-for-in":"error","no-alert":"warn","no-caller":"error","no-constructor-return":"error","no-else-return":"off","no-empty-pattern":"error","no-empty-static-block":"error","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-label":"error","no-implicit-coercion":["off",{boolean:!1,number:!0,string:!0,allow:[]}],"no-implicit-globals":"off","no-implied-eval":"error","no-invalid-this":"off","no-labels":["error",{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":"error","no-loop-func":"error","no-multi-str":"error","no-new":"error","no-new-func":"error","no-new-wrappers":"error","no-octal-escape":"error","no-proto":"error","no-restricted-properties":["error",...[["isFinite","Number.isFinite"],["isNaN","Number.isNaN"]].flatMap(([e,t])=>["global","globalThis","window","self"].map(r=>({object:r,property:e,message:`Please use ${t} instead`}))),{object:"arguments",property:"callee",message:"arguments.callee is deprecated"},{property:"__defineGetter__",message:"Please use Object.defineProperty instead."},{property:"__defineSetter__",message:"Please use Object.defineProperty instead."},{object:"Math",property:"pow",message:"Use the exponentiation operator (**) instead."}],"no-return-assign":["error","always"],"no-self-compare":"off","no-sequences":"error","no-unmodified-loop-condition":"off","no-unused-expressions":["error",{allowShortCircuit:!1,allowTernary:!1,allowTaggedTemplates:!1}],"no-useless-call":"warn","no-useless-catch":"error","no-useless-concat":"error","no-useless-escape":"error","no-useless-return":"error","no-void":["error",{allowAsStatement:!0}],"no-with":"error","prefer-promise-reject-errors":["error",{allowEmptyReject:!0}],"prefer-object-has-own":"error","prefer-regex-literals":["error",{disallowRedundantWrapping:!0}],radix:"error","require-await":"error","require-yield":"error","require-unicode-regexp":"off","vars-on-top":"error",yoda:"error","no-await-in-loop":"warn","no-console":"warn","no-constant-condition":["warn",{checkLoops:"allExceptWhileTrue"}],"no-empty-function":"error","no-empty":["error",{allowEmptyCatch:!0}],"no-constant-binary-expression":"error","no-loss-of-precision":"warn","no-promise-executor-return":"error","no-template-curly-in-string":"error","no-unreachable-loop":["error",{ignore:[]}],"no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0}],"unused-imports/no-unused-vars":"off","unused-imports/no-unused-imports":"off","no-unassigned-vars":"error","no-useless-assignment":"warn","no-unused-private-class-members":"error","no-useless-backreference":"error","no-negated-in-lhs":"off","require-atomic-updates":"off","use-isnan":["error",{enforceForIndexOf:!0}],"valid-typeof":["error",{requireStringLiterals:!0}],"no-new-native-nonconstructor":"error","no-duplicate-imports":"off","no-restricted-exports":["error",{restrictedNamedExports:["then"]}],"no-useless-constructor":"error","no-useless-rename":["error",{ignoreDestructuring:!1,ignoreImport:!1,ignoreExport:!1}],"no-var":"warn","object-shorthand":["error","always",{ignoreConstructors:!1,avoidQuotes:!0,avoidExplicitReturnArrows:!0}],"prefer-arrow-callback":["error",{allowNamedFunctions:!0,allowUnboundThis:!0}],"prefer-const":["error",{ignoreReadBeforeAssign:!0}],"prefer-numeric-literals":"error","prefer-rest-params":"error","prefer-template":"off","symbol-description":"error",camelcase:["warn",{properties:"never",ignoreDestructuring:!1,ignoreImports:!0,ignoreGlobals:!0,allow:["^UNSAFE_","^experimental_","^__DEV__"]}],"consistent-this":"off","new-cap":["error",{newIsCap:!0,newIsCapExceptions:[],capIsNew:!1,capIsNewExceptions:["Immutable.Map","Immutable.Set","Immutable.List"]}],"no-bitwise":"off","no-lonely-if":"error","no-multi-assign":"error","no-negated-condition":"off","no-new-object":"off","no-object-constructor":"error","no-array-constructor":"error","no-ternary":"off","no-unneeded-ternary":"error","prefer-exponentiation-operator":"error","unicode-bom":["error","never"],"no-label-var":"error","no-use-before-define":["error",{functions:!1,classes:!0,variables:!0}],"no-restricted-globals":["error",{name:"isFinite",message:"Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite"},{name:"isNaN",message:"Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan"}],"no-undef-init":"error","no-restricted-imports":["error",{paths:eI.RESTRICTED_IMPORT}],"no-restricted-syntax":["error",...eI.RESTRICTED_SYNTAX],"no-prototype-builtins":"error","antfu/import-dedupe":"error","antfu/consistent-chaining":"error","antfu/no-top-level-await":"error","antfu/top-level-function":"warn"}},t),eI.withFiles(eI.UNSAFE_excludeJsonYamlFiles(eK.configs.recommended_unicorn),t),eI.withFiles(eI.UNSAFE_excludeJsonYamlFiles({plugins:{"import-x":eX},settings:{"import-x/extensions":rr,"import-x/resolver-next":[eX.createNodeResolver({extensions:rr})]},rules:{...eX.configs["flat/recommended"].rules,"import-x/newline-after-import":["error",{considerComments:!1}],"import-x/no-absolute-path":"error","import-x/no-empty-named-blocks":"error","import-x/no-mutable-exports":"error","import-x/no-useless-path-segments":"warn","import-x/no-webpack-loader-syntax":"error","import-x/no-relative-packages":"warn"}}),t),eI.withFiles(rt.recommended,t),eI.withFiles(eK.configs.recommended,t),eI.withFiles(eI.asFlatConfig(eY.eslint_plugin_vibe_proof.configs.common),t),eI.withFiles({name:"@eslint-sukka/js vibe-proof overrides",rules:{"vibe-proof/prefer-array-some":"off"}},t)];if(!1!==r){let e="boolean"==typeof r?null:eQ.castArray(r);u.push({name:"@eslint-sukka/js cli specific",files:e??[`**/scripts/${eI.constants.GLOB_SRC}`,`**/cli/${eI.constants.GLOB_SRC}`,`**/cli.${eI.constants.GLOB_SRC_EXT}`],rules:{"no-console":"off"}})}return u}async function rs(){let e={languageOptions:{parser:await import("jsonc-eslint-parser")}},t=await import("eslint-plugin-jsonc");return[...t.configs.base,{name:"@eslint-sukka/json shared rules",files:[eI.constants.GLOB_JSON,eI.constants.GLOB_JSON5,eI.constants.GLOB_JSONC],rules:{"jsonc/array-bracket-spacing":["error","never"],"jsonc/comma-dangle":["error","never"],"jsonc/comma-style":["error","last"],"jsonc/indent":["error",2],"jsonc/key-spacing":["error",{beforeColon:!1,afterColon:!0}],"jsonc/object-curly-newline":"off","jsonc/object-curly-spacing":["error","always"],"jsonc/object-property-newline":["error",{allowMultiplePropertiesPerLine:!0}],"jsonc/quote-props":"error","jsonc/quotes":"error"}},{name:"@eslint-sukka/json json",...e,files:[eI.constants.GLOB_JSON],rules:eI.collectRules(t.configs["recommended-with-json"])},{name:"@eslint-sukka/json json5",...e,files:[eI.constants.GLOB_JSON5],rules:eI.collectRules(t.configs["recommended-with-json5"])},{name:"@eslint-sukka/json jsonc",...e,files:[eI.constants.GLOB_JSONC],rules:eI.collectRules(t.configs["recommended-with-jsonc"])},{name:"@eslint-sukka/json package.json",...e,files:["**/package.json"],rules:{"jsonc/sort-array-values":["error",{order:{type:"asc"},pathPattern:"^files$"}],"jsonc/sort-keys":["error",{order:["$schema","publisher","name","displayName","version","private","description","funding","homepage","repository","bugs","categories","type","main","module","types","typesVersions","bin","files","exports","icon","unpkg","jsdelivr","sideEffects","activationEvents","contributes","scripts","keywords","author","license","dependencies","devDependencies","peerDependencies","peerDependenciesMeta","optionalDependencies","packageManager","engines","pnpm","overrides","resolutions","husky","simple-git-hooks","lint-staged","eslintConfig"],pathPattern:"^$"},{order:{type:"asc"},pathPattern:"^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$"},{order:["types","import","module","require","default"],pathPattern:"^exports.*$"}]}},{name:"@eslint-sukka/json tsconfig.json",...e,files:["**/tsconfig.json","**/tsconfig.*.json","**/tsconfig-*.json","**/jsconfig.json","**/jsconfig.*.json","**/jsconfig-*.json"],rules:{"jsonc/sort-keys":["error",{order:["$schema","extends","compilerOptions","references","files","include","exclude"],pathPattern:"^$"},{order:["incremental","composite","tsBuildInfoFile","disableSourceOfProjectReferenceRedirect","disableSolutionSearching","disableReferencedProjectLoad","target","lib","jsx","experimentalDecorators","emitDecoratorMetadata","jsxFactory","jsxFragmentFactory","jsxImportSource","reactNamespace","noLib","useDefineForClassFields","moduleDetection","module","rootDir","moduleResolution","baseUrl","paths","rootDirs","typeRoots","types","allowUmdGlobalAccess","moduleSuffixes","allowImportingTsExtensions","resolvePackageJsonExports","resolvePackageJsonImports","customConditions","resolveJsonModule","allowArbitraryExtensions","noResolve","allowJs","checkJs","maxNodeModuleJsDepth","declaration","declarationMap","emitDeclarationOnly","sourceMap","inlineSourceMap","outFile","outDir","removeComments","noEmit","importHelpers","importsNotUsedAsValues","downlevelIteration","sourceRoot","mapRoot","inlineSources","emitBOM","newLine","stripInternal","noEmitHelpers","noEmitOnError","preserveConstEnums","declarationDir","preserveValueImports","isolatedModules","verbatimModuleSyntax","allowSyntheticDefaultImports","esModuleInterop","preserveSymlinks","forceConsistentCasingInFileNames","strict","strictBindCallApply","strictFunctionTypes","strictNullChecks","strictPropertyInitialization","allowUnreachableCode","allowUnusedLabels","alwaysStrict","exactOptionalPropertyTypes","noFallthroughCasesInSwitch","noImplicitAny","noImplicitOverride","noImplicitReturns","noImplicitThis","noPropertyAccessFromIndexSignature","noUncheckedIndexedAccess","noUnusedLocals","noUnusedParameters","useUnknownInCatchVariables","skipDefaultLibCheck","skipLibCheck"],pathPattern:"^compilerOptions$"}]}}]}let ri={"no-dupe-class-members":"off","@typescript-eslint/no-dupe-class-members":"off","no-redeclare":"off","@typescript-eslint/no-redeclare":"off","no-unused-private-class-members":"off","@typescript-eslint/no-unused-private-class-members":"error","no-unused-vars":"off","@typescript-eslint/no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0}],"class-methods-use-this":"off","@typescript-eslint/class-methods-use-this":["error",{exceptMethods:[]}],"default-param-last":"off","@typescript-eslint/default-param-last":"error","dot-notation":"off","@typescript-eslint/dot-notation":["error",{allowKeywords:!0}],"no-implied-eval":"off","@typescript-eslint/no-implied-eval":"error","no-invalid-this":"off","@typescript-eslint/no-invalid-this":"off","no-unused-expressions":"off","@typescript-eslint/no-unused-expressions":["error",{allowShortCircuit:!1,allowTernary:!1,allowTaggedTemplates:!1}],"prefer-promise-reject-errors":"off","@typescript-eslint/prefer-promise-reject-errors":["error",{allowEmptyReject:!0}],"require-await":"off","@typescript-eslint/require-await":"error","no-empty-function":"off","@typescript-eslint/no-empty-function":"error","no-useless-constructor":"off","@typescript-eslint/no-useless-constructor":"error",camelcase:"off","no-array-constructor":"off","@typescript-eslint/no-array-constructor":"error","no-use-before-define":"off","@typescript-eslint/no-use-before-define":["error",{functions:!1,classes:!0,variables:!0}],"sukka/no-return-await":"off","@typescript-eslint/return-await":["error","in-try-catch"]},ro=[".ts",".cts",".mts",".tsx",".d.ts"],ra=[...ro,".js",".jsx",".mjs",".cjs"];async function rl(e){if(!e9.isCI&&eM.stdout.isTTY&&!eI.isPackageExists(e,"string"==typeof __dirname?__dirname:void 0)){let{confirm:t}=await Promise.resolve().then(function(){return require("./vendor-DF7e3CVu.cjs")}).then(function(e){return e.b});await t({message:`Package is required for this config: ${e}. Do you want to install it?`})&&await Promise.resolve().then(function(){return require("./vendor-DF7e3CVu.cjs")}).then(function(e){return e.c}).then(t=>t.installPackage(e,{dev:!0}))}return Promise.resolve(require(e))}async function rc(e){if(!eI.isPackageExists(e,"string"==typeof __dirname?__dirname:void 0))return;if(console.error(e3.yellow(`[eslint-config-sukka] "${e}" is deprecated and you should uninstall it`)),e9.isCI||!process.stdout.isTTY)throw Error(`[eslint-config-sukka] "${e}" is deprecated and you should uninstall it`);let{confirm:t}=await Promise.resolve().then(function(){return require("./vendor-DF7e3CVu.cjs")}).then(function(e){return e.b});await t({message:` "${e}" is deprecated. Do you want to uninstall it?`})&&await Promise.resolve().then(function(){return require("./vendor-DF7e3CVu.cjs")}).then(function(e){return e.c}).then(t=>t.uninstallPackage(e,{dev:!0}))}var ru=Object.defineProperty,rp={},rf={},rd=eD.g(tl),rh={},rm={};function rg(){if(s)return rm;s=1;let e=Symbol.for("yaml.alias"),t=Symbol.for("yaml.document"),r=Symbol.for("yaml.map"),n=Symbol.for("yaml.pair"),i=Symbol.for("yaml.scalar"),o=Symbol.for("yaml.seq"),a=Symbol.for("yaml.node.type"),l=e=>!!e&&"object"==typeof e&&e[a]===i;function c(e){if(e&&"object"==typeof e)switch(e[a]){case r:case o:return!0}return!1}return rm.ALIAS=e,rm.DOC=t,rm.MAP=r,rm.NODE_TYPE=a,rm.PAIR=n,rm.SCALAR=i,rm.SEQ=o,rm.hasAnchor=e=>(l(e)||c(e))&&!!e.anchor,rm.isAlias=t=>!!t&&"object"==typeof t&&t[a]===e,rm.isCollection=c,rm.isDocument=e=>!!e&&"object"==typeof e&&e[a]===t,rm.isMap=e=>!!e&&"object"==typeof e&&e[a]===r,rm.isNode=function(t){if(t&&"object"==typeof t)switch(t[a]){case e:case r:case i:case o:return!0}return!1},rm.isPair=e=>!!e&&"object"==typeof e&&e[a]===n,rm.isScalar=l,rm.isSeq=e=>!!e&&"object"==typeof e&&e[a]===o,rm}var ry={};function rb(){if(i)return ry;i=1;var e=rg();let t=Symbol("break visit"),r=Symbol("skip children"),n=Symbol("remove node");function s(t,r){let s=c(r);e.isDocument(t)?o(null,t.contents,s,Object.freeze([t]))===n&&(t.contents=null):o(null,t,s,Object.freeze([]))}function o(r,s,i,a){let l=u(r,s,i,a);if(e.isNode(l)||e.isPair(l))return p(r,a,l),o(r,l,i,a);if("symbol"!=typeof l){if(e.isCollection(s)){a=Object.freeze(a.concat(s));for(let e=0;e<s.items.length;++e){let r=o(e,s.items[e],i,a);if("number"==typeof r)e=r-1;else{if(r===t)return t;r===n&&(s.items.splice(e,1),e-=1)}}}else if(e.isPair(s)){a=Object.freeze(a.concat(s));let e=o("key",s.key,i,a);if(e===t)return t;e===n&&(s.key=null);let r=o("value",s.value,i,a);if(r===t)return t;r===n&&(s.value=null)}}return l}async function a(t,r){let s=c(r);e.isDocument(t)?await l(null,t.contents,s,Object.freeze([t]))===n&&(t.contents=null):await l(null,t,s,Object.freeze([]))}async function l(r,s,i,o){let a=await u(r,s,i,o);if(e.isNode(a)||e.isPair(a))return p(r,o,a),l(r,a,i,o);if("symbol"!=typeof a){if(e.isCollection(s)){o=Object.freeze(o.concat(s));for(let e=0;e<s.items.length;++e){let r=await l(e,s.items[e],i,o);if("number"==typeof r)e=r-1;else{if(r===t)return t;r===n&&(s.items.splice(e,1),e-=1)}}}else if(e.isPair(s)){o=Object.freeze(o.concat(s));let e=await l("key",s.key,i,o);if(e===t)return t;e===n&&(s.key=null);let r=await l("value",s.value,i,o);if(r===t)return t;r===n&&(s.value=null)}}return a}function c(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function u(t,r,n,s){return"function"==typeof n?n(t,r,s):e.isMap(r)?n.Map?.(t,r,s):e.isSeq(r)?n.Seq?.(t,r,s):e.isPair(r)?n.Pair?.(t,r,s):e.isScalar(r)?n.Scalar?.(t,r,s):e.isAlias(r)?n.Alias?.(t,r,s):void 0}function p(t,r,n){let s=r[r.length-1];if(e.isCollection(s))s.items[t]=n;else if(e.isPair(s))"key"===t?s.key=n:s.value=n;else if(e.isDocument(s))s.contents=n;else{let t=e.isAlias(s)?"alias":"scalar";throw Error(`Cannot replace node with ${t} parent`)}}return s.BREAK=t,s.SKIP=r,s.REMOVE=n,a.BREAK=t,a.SKIP=r,a.REMOVE=n,ry.visit=s,ry.visitAsync=a,ry}function rk(){if(o)return rh;o=1;var e=rg(),t=rb();let r={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},n=e=>e.replace(/[!,[\]{}]/g,e=>r[e]);class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){let e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);let r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(2!==r.length&&(t(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[e,n]=r;return this.tags[e]=n,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==r.length)return t(0,"%YAML directive should contain exactly one part"),!1;let[e]=r;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;{let r=/^\d+\.\d+$/.test(e);return t(6,`Unsupported YAML version ${e}`,r),!1}}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){let r=e.slice(2,-1);return"!"===r||"!!"===r?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),r)}let[,r,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);let s=this.tags[r];if(s)try{return s+decodeURIComponent(n)}catch(e){return t(String(e)),null}return"!"===r?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+n(e.substring(r.length));return"!"===e[0]?e:`!<${e}>`}toString(r){let n,s=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags);if(r&&i.length>0&&e.isNode(r.contents)){let s={};t.visit(r.contents,(t,r)=>{e.isNode(r)&&r.tag&&(s[r.tag]=!0)}),n=Object.keys(s)}else n=[];for(let[e,t]of i)("!!"!==e||"tag:yaml.org,2002:"!==t)&&(!r||n.some(e=>e.startsWith(t)))&&s.push(`%TAG ${e} ${t}`);return s.join("\n")}}return s.defaultYaml={explicit:!1,version:"1.2"},s.defaultTags={"!!":"tag:yaml.org,2002:"},rh.Directives=s,rh}var rv={},rw={},rS={};function rx(){if(a)return rS;a=1;var r=rg(),n=rb();function s(e){let r=new t;return n.visit(e,{Value(e,t){t.anchor&&r.add(t.anchor)}}),r}function i(e,t){for(let r=1;;++r){let n=`${e}${r}`;if(!t.has(n))return n}}return rS.anchorIsValid=function(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=JSON.stringify(e);throw Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0},rS.anchorNames=s,rS.createNodeAnchors=function(t,n){let o=[],a=new e,l=null;return{onAnchor:e=>{o.push(e),l??(l=s(t));let r=i(n,l);return l.add(r),r},setAnchors:()=>{for(let e of o){let t=a.get(e);if("object"==typeof t&&t.anchor&&(r.isScalar(t.node)||r.isCollection(t.node)))t.node.anchor=t.anchor;else{let t=Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}}},sourceObjects:a}},rS.findNewAnchor=i,rS}var rE={},rA={};function rC(){return l||(l=1,rA.applyReviver=function e(t,r,n,s){if(s&&"object"==typeof s)if(Array.isArray(s))for(let r=0,n=s.length;r<n;++r){let n=s[r],i=e(t,s,String(r),n);void 0===i?delete s[r]:i!==n&&(s[r]=i)}else if(s instanceof Map)for(let r of Array.from(s.keys())){let n=s.get(r),i=e(t,s,r,n);void 0===i?s.delete(r):i!==n&&s.set(r,i)}else if(s instanceof Set)for(let r of Array.from(s)){let n=e(t,s,r,r);void 0===n?s.delete(r):n!==r&&(s.delete(r),s.add(n))}else for(let[r,n]of Object.entries(s)){let i=e(t,s,r,n);void 0===i?delete s[r]:i!==n&&(s[r]=i)}return t.call(r,n,s)}),rA}var rT={};function rO(){if(c)return rT;c=1;var e=rg();return rT.toJS=function t(r,n,s){if(Array.isArray(r))return r.map((e,r)=>t(e,String(r),s));if(r&&"function"==typeof r.toJSON){if(!s||!e.hasAnchor(r))return r.toJSON(n,s);let t={aliasCount:0,count:1,res:void 0};s.anchors.set(r,t),s.onCreate=e=>{t.res=e,delete s.onCreate};let i=r.toJSON(n,s);return s.onCreate&&s.onCreate(i),i}return"bigint"!=typeof r||s?.keep?r:Number(r)},rT}function rL(){if(u)return rE;u=1;var t=rC(),r=rg(),n=rO();return rE.NodeBase=class{constructor(e){Object.defineProperty(this,r.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(s,{mapAsMap:i,maxAliasCount:o,onAnchor:a,reviver:l}={}){if(!r.isDocument(s))throw TypeError("A document argument is required");let c={anchors:new e,doc:s,keep:!0,mapAsMap:!0===i,mapKeyWarned:!1,maxAliasCount:"number"==typeof o?o:100},u=n.toJS(this,"",c);if("function"==typeof a)for(let{count:e,res:t}of c.anchors.values())a(t,e);return"function"==typeof l?t.applyReviver(l,{"":u},"",u):u}},rE}function rN(){if(p)return rw;p=1;var e=rx(),t=rb(),r=rg(),n=rL(),s=rO();return rw.Alias=class extends n.NodeBase{constructor(e){super(r.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(e,n){let s,i;if(n?.maxAliasCount===0)throw ReferenceError("Alias resolution is disabled");for(let o of(n?.aliasResolveCache?s=n.aliasResolveCache:(s=[],t.visit(e,{Node:(e,t)=>{(r.isAlias(t)||r.hasAnchor(t))&&s.push(t)}}),n&&(n.aliasResolveCache=s)),s)){if(o===this)break;o.anchor===this.source&&(i=o)}return i}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:o}=t,a=this.resolve(i,t);if(!a)throw ReferenceError(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);let l=n.get(a);if(l||(s.toJS(a,null,t),l=n.get(a)),l?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(o>=0&&(l.count+=1,0===l.aliasCount&&(l.aliasCount=function e(t,n,s){if(r.isAlias(n)){let e=n.resolve(t),r=s&&e&&s.get(e);return r?r.count*r.aliasCount:0}if(r.isCollection(n)){let r=0;for(let i of n.items){let n=e(t,i,s);n>r&&(r=n)}return r}return r.isPair(n)?Math.max(e(t,n.key,s),e(t,n.value,s)):1}(i,a,n)),l.count*l.aliasCount>o))throw ReferenceError("Excessive alias count indicates a resource exhaustion attack");return l.res}toString(t,r,n){let s=`*${this.source}`;if(t){if(e.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source))throw Error(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);if(t.implicitKey)return`${s} `}return s}},rw}var r$={},r_={},rI={};function rP(){if(f)return rI;f=1;var e=rg(),t=rL(),r=rO();let n=class extends t.NodeBase{constructor(t){super(e.SCALAR),this.value=t}toJSON(e,t){return t?.keep?this.value:r.toJS(this.value,e,t)}toString(){return String(this.value)}};return n.BLOCK_FOLDED="BLOCK_FOLDED",n.BLOCK_LITERAL="BLOCK_LITERAL",n.PLAIN="PLAIN",n.QUOTE_DOUBLE="QUOTE_DOUBLE",n.QUOTE_SINGLE="QUOTE_SINGLE",rI.Scalar=n,rI.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e,rI}function rj(){if(d)return r_;d=1;var e=rN(),t=rg(),r=rP();return r_.createNode=function(n,s,i){let o;if(t.isDocument(n)&&(n=n.contents),t.isNode(n))return n;if(t.isPair(n)){let e=i.schema[t.MAP].createNode?.(i.schema,null,i);return e.items.push(n),e}(n instanceof String||n instanceof Number||n instanceof Boolean||"u">typeof BigInt&&n instanceof BigInt)&&(n=n.valueOf());let{aliasDuplicateObjects:a,onAnchor:l,onTagObj:c,schema:u,sourceObjects:p}=i;if(a&&n&&"object"==typeof n){if(o=p.get(n))return o.anchor??(o.anchor=l(n)),new e.Alias(o.anchor);o={anchor:null,node:null},p.set(n,o)}s?.startsWith("!!")&&(s="tag:yaml.org,2002:"+s.slice(2));let f=function(e,t,r){if(t){let e=r.filter(e=>e.tag===t),n=e.find(e=>!e.format)??e[0];if(!n)throw Error(`Tag ${t} not found`);return n}return r.find(t=>t.identify?.(e)&&!t.format)}(n,s,u.tags);if(!f){if(n&&"function"==typeof n.toJSON&&(n=n.toJSON()),!n||"object"!=typeof n){let e=new r.Scalar(n);return o&&(o.node=e),e}f=n instanceof Map?u[t.MAP]:Symbol.iterator in Object(n)?u[t.SEQ]:u[t.MAP]}c&&(c(f),delete i.onTagObj);let d=f?.createNode?f.createNode(i.schema,n,i):"function"==typeof f?.nodeClass?.from?f.nodeClass.from(i.schema,n,i):new r.Scalar(n);return s?d.tag=s:f.default||(d.tag=f.tag),o&&(o.node=d),d},r_}function rM(){if(h)return r$;h=1;var t=rj(),r=rg(),n=rL();function s(r,n,s){let i=s;for(let t=n.length-1;t>=0;--t){let r=n[t];if("number"==typeof r&&Number.isInteger(r)&&r>=0){let e=[];e[r]=i,i=e}else i=new e([[r,i]])}return t.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:r,sourceObjects:new e})}let i=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;return r$.Collection=class extends n.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>r.isNode(t)||r.isPair(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(i(e))this.add(t);else{let[n,...i]=e,o=this.get(n,!0);if(r.isCollection(o))o.addIn(i,t);else if(void 0===o&&this.schema)this.set(n,s(this.schema,i,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[t,...n]=e;if(0===n.length)return this.delete(t);let s=this.get(t,!0);if(r.isCollection(s))return s.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...s]=e,i=this.get(n,!0);return 0===s.length?!t&&r.isScalar(i)?i.value:i:r.isCollection(i)?i.getIn(s,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!r.isPair(t))return!1;let n=t.value;return null==n||e&&r.isScalar(n)&&null==n.value&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(0===n.length)return this.has(t);let s=this.get(t,!0);return!!r.isCollection(s)&&s.hasIn(n)}setIn(e,t){let[n,...i]=e;if(0===i.length)this.set(n,t);else{let e=this.get(n,!0);if(r.isCollection(e))e.setIn(i,t);else if(void 0===e&&this.schema)this.set(n,s(this.schema,i,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}},r$.collectionFromPath=s,r$.isEmptyPath=i,r$}var rD={},rR={},rF={},rq={};function rB(){if(m)return rq;function e(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}return m=1,rq.indentComment=e,rq.lineComment=(t,r,n)=>t.endsWith("\n")?e(n,r):n.includes("\n")?"\n"+e(n,r):(t.endsWith(" ")?"":" ")+n,rq.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#"),rq}var rU={},rK={};function rY(){let e;if(y)return rU;y=1;var t=rP(),r=function(){if(g)return rK;g=1;let e="block",t="quoted";function r(e,t,r){let n=t,s=t+1,i=e[s];for(;" "===i||" "===i;)if(t<s+r)i=e[++t];else{do i=e[++t];while(i&&"\n"!==i);n=t,i=e[s=t+1]}return n}return rK.FOLD_BLOCK=e,rK.FOLD_FLOW="flow",rK.FOLD_QUOTED=t,rK.foldFlowLines=function(n,s,i="flow",{indentAtStart:o,lineWidth:a=80,minContentWidth:l=20,onFold:c,onOverflow:u}={}){let p,f,d;if(!a||a<0)return n;a<l&&(l=0);let h=Math.max(1+l,1+a-s.length);if(n.length<=h)return n;let m=[],g={},y=a-s.length;"number"==typeof o&&(o>a-Math.max(2,l)?m.push(0):y=a-o);let b=!1,k=-1,v=-1,w=-1;for(i===e&&-1!==(k=r(n,k,s.length))&&(y=k+h);d=n[k+=1];){if(i===t&&"\\"===d){switch(v=k,n[k+1]){case"x":k+=3;break;case"u":k+=5;break;case"U":k+=9;break;default:k+=1}w=k}if("\n"===d)i===e&&(k=r(n,k,s.length)),y=k+s.length+h,p=void 0;else{if(" "===d&&f&&" "!==f&&"\n"!==f&&" "!==f){let e=n[k+1];e&&" "!==e&&"\n"!==e&&" "!==e&&(p=k)}if(k>=y)if(p)m.push(p),y=p+h,p=void 0;else if(i===t){for(;" "===f||" "===f;)f=d,d=n[k+=1],b=!0;let e=k>w+1?k-2:v-1;if(g[e])return n;m.push(e),g[e]=!0,y=e+h,p=void 0}else b=!0}f=d}if(b&&u&&u(),0===m.length)return n;c&&c();let S=n.slice(0,m[0]);for(let e=0;e<m.length;++e){let r=m[e],o=m[e+1]||n.length;0===r?S=`
2
- ${s}${n.slice(0,o)}`:(i===t&&g[r]&&(S+=`${n[r]}\\`),S+=`
3
- ${s}${n.slice(r+1,o)}`)}return S},rK}();let n=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth});function s(e,t){let s=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return s;let{implicitKey:i}=t,o=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(/^(%|---|\.\.\.)/m.test(e)?" ":""),l="",c=0;for(let e=0,t=s[e];t;t=s[++e])if(" "===t&&"\\"===s[e+1]&&"n"===s[e+2]&&(l+=s.slice(c,e)+"\\ ",e+=1,c=e,t="\\"),"\\"===t)switch(s[e+1]){case"u":{l+=s.slice(c,e);let t=s.substr(e+2,4);switch(t){case"0000":l+="\\0";break;case"0007":l+="\\a";break;case"000b":l+="\\v";break;case"001b":l+="\\e";break;case"0085":l+="\\N";break;case"00a0":l+="\\_";break;case"2028":l+="\\L";break;case"2029":l+="\\P";break;default:"00"===t.substr(0,2)?l+="\\x"+t.substr(2):l+=s.substr(e,6)}e+=5,c=e+1}break;case"n":if(i||'"'===s[e+2]||s.length<o)e+=1;else{for(l+=s.slice(c,e)+"\n\n";"\\"===s[e+2]&&"n"===s[e+3]&&'"'!==s[e+4];)l+="\n",e+=2;l+=a," "===s[e+2]&&(l+="\\"),e+=1,c=e+1}break;default:e+=1}return l=c?l+s.slice(c):s,i?l:r.foldFlowLines(l,a,r.FOLD_QUOTED,n(t,!1))}function i(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return s(e,t);let i=t.indent||(/^(%|---|\.\.\.)/m.test(e)?" ":""),o="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
4
- ${i}`)+"'";return t.implicitKey?o:r.foldFlowLines(o,i,r.FOLD_FLOW,n(t,!1))}function o(e,t){let r,{singleQuote:n}=t.options;if(!1===n)r=s;else{let t=e.includes('"'),o=e.includes("'");r=t&&!o?i:o&&!t?s:n?i:s}return r(e,t)}try{e=RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{e=/\n+(?!\n|$)/g}function a({comment:s,type:i,value:l},c,u,p){let f,d,h,m,{blockQuote:g,commentString:y,lineWidth:b}=c.options;if(!g||/\n[\t ]+$/.test(l))return o(l,c);let k=c.indent||(c.forceBlockIndent||(m=l,/^(%|---|\.\.\.)/m.test(m))?" ":""),v="literal"===g||"folded"!==g&&i!==t.Scalar.BLOCK_FOLDED&&(i===t.Scalar.BLOCK_LITERAL||!function(e,t,r){if(!t||t<0)return!1;let n=t-r,s=e.length;if(s<=n)return!1;for(let t=0,r=0;t<s;++t)if("\n"===e[t]){if(t-r>n)return!0;if(s-(r=t+1)<=n)return!1}return!0}(l,b,k.length));if(!l)return v?"|\n":">\n";for(d=l.length;d>0;--d){let e=l[d-1];if("\n"!==e&&" "!==e&&" "!==e)break}let w=l.substring(d),S=w.indexOf("\n");-1===S?f="-":l===w||S!==w.length-1?(f="+",p&&p()):f="",w&&(l=l.slice(0,-w.length),"\n"===w[w.length-1]&&(w=w.slice(0,-1)),w=w.replace(e,`$&${k}`));let x=!1,E=-1;for(h=0;h<l.length;++h){let e=l[h];if(" "===e)x=!0;else if("\n"===e)E=h;else break}let A=l.substring(0,E<h?E+1:h);A&&(l=l.substring(A.length),A=A.replace(/\n+/g,`$&${k}`));let C=k?"2":"1",T=(x?C:"")+f;if(s&&(T+=" "+y(s.replace(/ ?[\r\n]+/g," ")),u&&u()),!v){let e=l.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${k}`),s=!1,o=n(c,!0);"folded"!==g&&i!==t.Scalar.BLOCK_FOLDED&&(o.onOverflow=()=>{s=!0});let a=r.foldFlowLines(`${A}${e}${w}`,k,r.FOLD_BLOCK,o);if(!s)return`>${T}
5
- ${k}${a}`}return l=l.replace(/\n+/g,`$&${k}`),`|${T}
6
- ${k}${A}${l}${w}`}return rU.stringifyString=function(e,l,c,u){let{implicitKey:p,inFlow:f}=l,d="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)}),{type:h}=e;h!==t.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(d.value)&&(h=t.Scalar.QUOTE_DOUBLE);let m=e=>{switch(e){case t.Scalar.BLOCK_FOLDED:case t.Scalar.BLOCK_LITERAL:return p||f?o(d.value,l):a(d,l,c,u);case t.Scalar.QUOTE_DOUBLE:return s(d.value,l);case t.Scalar.QUOTE_SINGLE:return i(d.value,l);case t.Scalar.PLAIN:return function(e,s,i,l){let{type:c,value:u}=e,{actualString:p,implicitKey:f,indent:d,indentStep:h,inFlow:m}=s;if(f&&u.includes("\n")||m&&/[[\]{},]/.test(u))return o(u,s);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(u))return f||m||!u.includes("\n")?o(u,s):a(e,s,i,l);if(!f&&!m&&c!==t.Scalar.PLAIN&&u.includes("\n"))return a(e,s,i,l);if(/^(%|---|\.\.\.)/m.test(u)){if(""===d)return s.forceBlockIndent=!0,a(e,s,i,l);else if(f&&d===h)return o(u,s)}let g=u.replace(/\n+/g,`$&
7
- ${d}`);if(p){let e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(g),{compat:t,tags:r}=s.doc.schema;if(r.some(e)||t?.some(e))return o(u,s)}return f?g:r.foldFlowLines(g,d,r.FOLD_FLOW,n(s,!1))}(d,l,c,u);default:return null}},g=m(h);if(null===g){let{defaultKeyType:e,defaultStringType:t}=l.options,r=p&&e||t;if(null===(g=m(r)))throw Error(`Unsupported default string type ${r}`)}return g},rU}function rW(){if(b)return rF;b=1;var e=rx(),r=rg(),n=rB(),s=rY();return rF.createStringifyContext=function(e,r){let s,i=Object.assign({blockQuote:!0,commentString:n.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,r);switch(i.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new t,doc:e,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof i.indent?" ".repeat(i.indent):" ",inFlow:s,options:i}},rF.stringify=function(n,i,o,a){let l;if(r.isPair(n))return n.toString(i,o,a);if(r.isAlias(n)){if(i.doc.directives)return n.toString(i);if(i.resolvedAliases?.has(n))throw TypeError("Cannot stringify circular structure without alias nodes");i.resolvedAliases?i.resolvedAliases.add(n):i.resolvedAliases=new t([n]),n=n.resolve(i.doc)}let c=r.isNode(n)?n:i.doc.createNode(n,{onTagObj:e=>l=e});l??(l=function(e,t){let n,s;if(t.tag){let r=e.filter(e=>e.tag===t.tag);if(r.length>0)return r.find(e=>e.format===t.format)??r[0]}if(r.isScalar(t)){n=t.value;let r=e.filter(e=>e.identify?.(n));if(r.length>1){let e=r.filter(e=>e.test);e.length>0&&(r=e)}s=r.find(e=>e.format===t.format)??r.find(e=>!e.format)}else n=t,s=e.find(e=>e.nodeClass&&n instanceof e.nodeClass);if(!s){let e=n?.constructor?.name??(null===n?"null":typeof n);throw Error(`Tag not resolved for ${e} value`)}return s}(i.doc.schema.tags,c));let u=function(t,n,{anchors:s,doc:i}){if(!i.directives)return"";let o=[],a=(r.isScalar(t)||r.isCollection(t))&&t.anchor;a&&e.anchorIsValid(a)&&(s.add(a),o.push(`&${a}`));let l=t.tag??(n.default?null:n.tag);return l&&o.push(i.directives.tagString(l)),o.join(" ")}(c,l,i);u.length>0&&(i.indentAtStart=(i.indentAtStart??0)+u.length+1);let p="function"==typeof l.stringify?l.stringify(c,i,o,a):r.isScalar(c)?s.stringifyString(c,i,o,a):c.toString(i,o,a);return u?r.isScalar(c)||"{"===p[0]||"["===p[0]?`${u} ${p}`:`${u}
8
- ${i.indent}${p}`:p},rF}var rJ={},rH={};function rG(){return v||(v=1,rH.debug=function(e,...t){"debug"===e&&console.log(...t)},rH.warn=function(e,t){("debug"===e||"warn"===e)&&("function"==typeof rd.emitWarning?rd.emitWarning(t):console.warn(t))}),rH}var rV={};function rX(){if(w)return rV;w=1;var e=rg(),t=rP();let r={identify:e=>"<<"===e||"symbol"==typeof e&&"<<"===e.description,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new t.Scalar(Symbol("<<")),{addToJSMap:n}),stringify:()=>"<<"};function n(t,r,n){let o=i(t,n);if(e.isSeq(o))for(let e of o.items)s(t,r,e);else if(Array.isArray(o))for(let e of o)s(t,r,e);else s(t,r,o)}function s(t,r,n){let s=i(t,n);if(!e.isMap(s))throw Error("Merge sources must be maps or map aliases");for(let[e,n]of s.toJSON(null,t,Map))r instanceof Map?r.has(e)||r.set(e,n):r instanceof Set?r.add(e):Object.prototype.hasOwnProperty.call(r,e)||Object.defineProperty(r,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return r}function i(t,r){return t&&e.isAlias(r)?r.resolve(t.doc,t):r}return rV.addMergeToJSMap=n,rV.isMergeKey=(n,s)=>(r.identify(s)||e.isScalar(s)&&(!s.type||s.type===t.Scalar.PLAIN)&&r.identify(s.value))&&n?.doc.schema.tags.some(e=>e.tag===r.tag&&e.default),rV.merge=r,rV}function rQ(){if(S)return rJ;S=1;var e=rG(),r=rX(),n=rW(),s=rg(),i=rO();return rJ.addPairToJSMap=function(o,a,{key:l,value:c}){if(s.isNode(l)&&l.addToJSMap)l.addToJSMap(o,a,c);else if(r.isMergeKey(o,l))r.addMergeToJSMap(o,a,c);else{let r=i.toJS(l,"",o);if(a instanceof Map)a.set(r,i.toJS(c,r,o));else if(a instanceof Set)a.add(r);else{let u=function(r,i,o){if(null===i)return"";if("object"!=typeof i)return String(i);if(s.isNode(r)&&o?.doc){let s=n.createStringifyContext(o.doc,{});for(let e of(s.anchors=new t,o.anchors.keys()))s.anchors.add(e.anchor);s.inFlow=!0,s.inStringifyKey=!0;let i=r.toString(s);if(!o.mapKeyWarned){let t=JSON.stringify(i);t.length>40&&(t=t.substring(0,36)+'..."'),e.warn(o.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${t}. Set mapAsMap: true to use object keys.`),o.mapKeyWarned=!0}return i}return JSON.stringify(i)}(l,r,o),p=i.toJS(c,u,o);u in a?Object.defineProperty(a,u,{value:p,writable:!0,enumerable:!0,configurable:!0}):a[u]=p}}return a},rJ}function rz(){if(x)return rD;x=1;var t=rj(),r=function(){if(k)return rR;k=1;var e=rg(),t=rP(),r=rW(),n=rB();return rR.stringifyPair=function({key:s,value:i},o,a,l){let c,u,p,{allNullValues:f,doc:d,indent:h,indentStep:m,options:{commentString:g,indentSeq:y,simpleKeys:b}}=o,k=e.isNode(s)&&s.comment||null;if(b){if(k)throw Error("With simple keys, key nodes cannot have comments");if(e.isCollection(s)||!e.isNode(s)&&"object"==typeof s)throw Error("With simple keys, collection cannot be used as a key value")}let v=!b&&(!s||k&&null==i&&!o.inFlow||e.isCollection(s)||(e.isScalar(s)?s.type===t.Scalar.BLOCK_FOLDED||s.type===t.Scalar.BLOCK_LITERAL:"object"==typeof s));o=Object.assign({},o,{allNullValues:!1,implicitKey:!v&&(b||!f),indent:h+m});let w=!1,S=!1,x=r.stringify(s,o,()=>w=!0,()=>S=!0);if(!v&&!o.inFlow&&x.length>1024){if(b)throw Error("With simple keys, single line scalar must not span more than 1024 characters");v=!0}if(o.inFlow){if(f||null==i)return w&&a&&a(),""===x?"?":v?`? ${x}`:x}else if(f&&!b||null==i&&v)return x=`? ${x}`,k&&!w?x+=n.lineComment(x,o.indent,g(k)):S&&l&&l(),x;w&&(k=null),v?(k&&(x+=n.lineComment(x,o.indent,g(k))),x=`? ${x}
9
- ${h}:`):(x=`${x}:`,k&&(x+=n.lineComment(x,o.indent,g(k)))),e.isNode(i)?(c=!!i.spaceBefore,u=i.commentBefore,p=i.comment):(c=!1,u=null,p=null,i&&"object"==typeof i&&(i=d.createNode(i))),o.implicitKey=!1,!v&&!k&&e.isScalar(i)&&(o.indentAtStart=x.length+1),S=!1,!(!y&&m.length>=2&&!o.inFlow&&!v&&e.isSeq(i))||i.flow||i.tag||i.anchor||(o.indent=o.indent.substring(2));let E=!1,A=r.stringify(i,o,()=>E=!0,()=>S=!0),C=" ";if(k||c||u){if(C=c?"\n":"",u){let e=g(u);C+=`
1
+ var e=Map,t=RegExp,r=Set,n=WeakMap;"use strict";var s,i,o,a,l,c,u,p,f,h,d,g,m,y,b,v,k,w,S,x,E,A,C,T,O,N,L,_,I,P,$,j,D,M,R,F,B,q,U,K,W,Y,J,G,H,V,X,Q,z,Z,ee,et,er,en,es,ei,eo,ea,el,ec,eu,ep,ef,eh,ed,eg,em,ey,eb,ev,ek,ew,eS,ex,eE,eA,eC,eT,eO,eN,eL,e_,eI,eP,e$,ej=require("@eslint-sukka/shared"),eD=require("node:fs"),eM=require("node:path"),eR=require("node:process"),eF=require("./vendor-ZgNHwqKn.cjs");require("node:fs/promises");var eB=require("node:url"),eq=require("foxts/guard"),eU=require("foxts/append-array-in-place"),eK=require("@eslint/config-helpers"),eW=require("@eslint-community/eslint-plugin-eslint-comments"),eY=require("@eslint-sukka/eslint-plugin-sukka-full"),eJ=require("eslint-plugin-vibe-proof"),eG=require("eslint-plugin-promise"),eH=require("@eslint-sukka/eslint-plugin-stylistic"),eV=require("foxts/literal"),eX=require("@eslint/js"),eQ=require("eslint-plugin-unused-imports"),ez=require("eslint-plugin-import-x"),eZ=require("foxts/cast-array"),e0=require("typescript-eslint"),e1=require("@typescript-eslint/eslint-plugin"),e2=require("@typescript-eslint/parser"),e3=require("eslint-import-resolver-typescript"),e9=require("defu"),e6=require("ci-info"),e4=require("picocolors"),e8=require("jsonc-eslint-parser"),e5=require("process"),e7=require("buffer"),te=require("eslint"),tt=require("fs"),tr=require("path"),tn=require("url"),ts=require("module");require("node:module");var ti=require("foxts/is-object-empty"),to="u">typeof document?document.currentScript:null;function ta(e){var t=Object.create(null);if(e)for(var r in e)t[r]=e[r];return t.default=e,Object.freeze(t)}var tl=ta(eD),tc=ta(eM),tu=ta(e8),tp=ta(e5),tf=ta(e7),th=ta(tt),td={},tg=eF.g(tl),tm=eF.g(tc),ty=function(){if(i)return td;i=1;let t=new e([["getSource","getText"],["getSourceLines","getLines"],["getAllComments","getAllComments"],["getDeclaredVariables","getDeclaredVariables"],["getNodeByRangeIndex","getNodeByRangeIndex"],["getCommentsBefore","getCommentsBefore"],["getCommentsAfter","getCommentsAfter"],["getCommentsInside","getCommentsInside"],["getJSDocComment","getJSDocComment"],["getFirstToken","getFirstToken"],["getFirstTokens","getFirstTokens"],["getLastToken","getLastToken"],["getLastTokens","getLastTokens"],["getTokenAfter","getTokenAfter"],["getTokenBefore","getTokenBefore"],["getTokenByRangeStart","getTokenByRangeStart"],["getTokens","getTokens"],["getTokensAfter","getTokensAfter"],["getTokensBefore","getTokensBefore"],["getTokensBetween","getTokensBetween"]]),r=new n,s=new WeakSet,o=new n,a=new WeakSet;function l(e,t){let r=t.getTokenBefore(e,{includeComments:!0});return r&&"Block"===r.type&&"*"===r.value.charAt(0)&&e.loc.start.line-r.loc.end.line<=1?r:null}function c(e){if(r.has(e))return r.get(e);let n="function"==typeof e;if(!n&&s.has(e))return e;let i=n?e:e.create.bind(e),o={...n?void 0:e,create:function(e){let r=e.sourceCode;if("getScope"in e)return i(e);let n=9;"getCwd"in e||(n=10);let s=r;n>=10&&Object.freeze(s=Object.assign(Object.create(r),{getTokenOrCommentBefore:(e,t)=>r.getTokenBefore(e,{includeComments:!0,skip:t}),getTokenOrCommentAfter:(e,t)=>r.getTokenAfter(e,{includeComments:!0,skip:t}),isSpaceBetweenTokens(e,t){if(e.range[0]<=t.range[0]&&e.range[1]>=t.range[0]||t.range[0]<=e.range[0]&&t.range[1]>=e.range[0])return!1;let[n,s]=e.range[1]<=t.range[0]?[e,t]:[t,e],i=r.getLastToken(n)||n,o=r.getFirstToken(s)||s,a=i;for(;a!==o;){let e=r.getTokenAfter(a,{includeComments:!0});if(a.range[1]!==e.range[0]||e!==o&&"JSXText"===e.type&&/\s/u.test(e.value))return!0;a=e}return!1},getJSDocComment(e){let t=e.parent;switch(e.type){case"ClassDeclaration":case"FunctionDeclaration":var n;return l("ExportDefaultDeclaration"===(n=t).type||"ExportNamedDeclaration"===n.type?t:e,r);case"ClassExpression":return l(t.parent,r);case"ArrowFunctionExpression":case"FunctionExpression":if("CallExpression"!==t.type&&"NewExpression"!==t.type){for(;!r.getCommentsBefore(t).length&&!/Function/u.test(t.type)&&"MethodDefinition"!==t.type&&"Property"!==t.type&&(t=t.parent););if(t&&"FunctionDeclaration"!==t.type&&"Program"!==t.type)return l(t,r)}return l(e,r);default:return null}}}));let o=s.ast,a=Object.assign(Object.create(e),{parserServices:s.parserServices,getScope:()=>s.getScope(o),getAncestors:()=>s.getAncestors(o),markVariableAsUsed:e=>s.markVariableAsUsed(e,o)});for(let[e,r]of(n>=10&&(Object.assign(a,{parserOptions:a.languageOptions.parserOptions,getCwd:()=>a.cwd,getFilename:()=>a.filename,getPhysicalFilename:()=>a.physicalFilename,getSourceCode:()=>s}),Object.defineProperty(a,"sourceCode",{enumerable:!0,value:s})),t))a[e]=s[r].bind(s);Object.freeze(a);let c=i(a);for(let[e,t]of Object.entries(c)){if(e.startsWith("on")){c[e]=(...r)=>(o=r["onCodePathSegmentLoop"===e?2:1],t.call(c,...r));continue}c[e]=(...e)=>(o=e[0],t.call(c,...e))}return c}},{schema:a}=e;return a&&(o.meta?o.meta={...o.meta,schema:a}:o.meta={schema:a}),r.set(e,o),s.add(o),o}function u(e){if(o.has(e))return o.get(e);if(a.has(e)||!e.rules)return e;let t={...e,rules:Object.fromEntries(Object.entries(e.rules).map(([e,t])=>[e,c(t)]))};return o.set(e,t),a.add(t),t}function p(e){let t=e.startsWith("!"),r=t?"!":"",n=(t?e.slice(1):e).trimEnd();if(["","**","/**","**/"].includes(n))return`${r}${n}`;let s=n.indexOf("/"),i=s<0||s===n.length-1?"**/":"",o=(0===s?n.slice(1):n).replaceAll(/(?=((?:\\.|[^{(])*))\1([{(])/guy,"$1\\$2"),a=n.endsWith("/**")?"/*":"";return`${r}${i}${o}${a}`}return td.convertIgnorePatternToMinimatch=p,td.fixupConfigRules=function(e){return(Array.isArray(e)?e:[e]).map(e=>{if(!e.plugins)return e;let t=Object.fromEntries(Object.entries(e.plugins).map(([e,t])=>[e,u(t)]));return{...e,plugins:t}})},td.fixupPluginRules=u,td.fixupRule=c,td.includeIgnoreFile=function(e,t){if(!tm.isAbsolute(e))throw Error("The ignore file location must be an absolute path.");return{name:t||"Imported .gitignore patterns",ignores:tg.readFileSync(e,"utf8").split(/\r?\n/u).map(e=>e.trim()).filter(e=>e&&!e.startsWith("#")).map(p)}},td}();function tb(e){return Array.isArray(e=e??[])?e:[e]}let tv=e=>e instanceof URL?eB.fileURLToPath(e):e;function tk(e,{cwd:t=eR.cwd(),type:r="file",stopAt:n}={}){let s=eM.resolve(tv(t)??""),{root:i}=eM.parse(s);n=eM.resolve(s,tv(n)??i);let o=eM.isAbsolute(e);for(;s;){let t=o?e:eM.join(s,e);try{let e=eD.statSync(t,{throwIfNoEntry:!1});if("file"===r&&e?.isFile()||"directory"===r&&e?.isDirectory())return t}catch{}if(s===n||s===i)break;s=eM.dirname(s)}}let tw=".gitignore",tS=".gitmodules",tx=/\r?\n/u,tE=/^(?:\.\.\/)+$/,tA=/[/\\]/,tC=/path\s*=\s*(.+)/u;function tT(e={}){let t=[],{cwd:n=eR.cwd(),root:s=!1,recursive:i=!1,files:o=s?tw:tk(tw,{cwd:n})||[],filesGitModules:a=s?eD.existsSync(eM.join(n,tS))?tS:[]:tk(tS,{cwd:n})||[],strict:l=!0}=e,c=new r(tb(o).map(e=>eM.resolve(n,e)));if(i)for(let e of function(e,t,n){let s=[],i=new r([".git","node_modules",...n]),o=[e];for(;o.length;){let e=o.shift();for(let r of eD.readdirSync(e,{withFileTypes:!0})){let n=eM.join(e,r.name);r.isFile()&&r.name===t&&s.push(n),r.isDirectory()&&!i.has(r.name)&&o.push(n)}}return s}(n,tw,"boolean"==typeof i?[]:i.skipDirs))c.add(e);let u=[...c],p=tb(a).map(e=>eM.resolve(n,e));if(!("files"in e)&&!s&&u.length>0){let e=function(e){let t=e;for(;;){if(eD.existsSync(eM.join(t,".git")))return eM.join(t,".git");let e=eM.dirname(t);if(e===t)return;t=e}}(n);if(e){let r=eM.join(e,"info/exclude");if(eD.existsSync(r)){let e=eD.readFileSync(r,"utf8");e&&t.push(...tO(e,"",n))}}}for(let e of u){let r="";try{r=eD.readFileSync(e,"utf8")}catch(e){if(l)throw e;continue}let s=eM.relative(n,eM.dirname(e)).replaceAll("\\","/");t.push(...tO(r,s,n))}for(let e of p){let r="";try{r=eD.readFileSync(e,"utf8")}catch(e){if(l)throw e;continue}let n=r.split(tx).map(e=>tC.exec(e)).filter(e=>null!==e).map(e=>e[1].trim());t.push(...n.map(e=>`${e}/**`))}if(l&&0===u.length)throw Error("No .gitignore file found");return{name:e.name||"gitignore",ignores:t}}function tO(e,t,r){return e.split(tx).filter(e=>e&&!e.startsWith("#")).map(e=>ty.convertIgnorePatternToMinimatch(e)).map(e=>(function(e,t,r){if(["",".","/"].includes(t))return e;let n=e.startsWith("!")?"!":"",s=n?e.slice(1):e;if(t.endsWith("/")||(t=`${t}/`),!t.startsWith(".."))return`${n}${t}${s}`;if(!tE.test(t))throw Error("The ignore file location should be either a parent or child directory");if(s.startsWith("**"))return e;let i=eM.relative(eM.resolve(r,t),r).split(tA);for(;i.length&&s.startsWith(`${i[0]}/`);)s=s.slice(i[0].length+1),i.shift();return s.startsWith("**")||0===i.length?`${n}${s}`:null})(e,t,r)).filter(e=>null!==e)}function tN(e={}){let{customGlobs:t=null,gitignore:r=[".gitignore"]}=e,n=[],s=[];return!1===t||null===t?s=ej.constants.GLOB_EXCLUDE:"function"==typeof t?s=t(ej.constants.GLOB_EXCLUDE):"string"==typeof t?(eU.appendArrayInPlace(s,ej.constants.GLOB_EXCLUDE),s.push(t)):Array.isArray(t)?(eU.appendArrayInPlace(s,ej.constants.GLOB_EXCLUDE),eU.appendArrayInPlace(s,t)):eq.never(t),n.push(eK.globalIgnores(s,"@eslint-sukka global ignores")),!1===r||null===r||(!0===r?n.push(tT({files:[".gitignore"],strict:!1})):"string"==typeof r||Array.isArray(r)?n.push(tT({files:r,strict:!1})):eq.never(r)),n}async function tL(){let{configs:e}=await import("eslint-plugin-regexp");return ej.UNSAFE_excludeJsonYamlFiles([e["flat/recommended"],{name:"sukka/regexp",rules:{"regexp/strict":"off"}}])}var t_="azat-io/eslint-plugin-de-morgan";function tI(...e){return(...t)=>t.every(t=>t(...e))}function tP(e){return"UnaryExpression"===e.type}function t$(e){return t=>t.operator===e}function tj(e){return tI(e)(tP,t$("!"))}function tD(e){return"LogicalExpression"===e.type}function tM(e,t){return tP(e)&&function e(t){let r=t;for(;tP(r)&&"!"===r.operator&&tP(r.argument)&&"!"===r.argument.operator;)r=r.argument.argument;return!!tj(r)||!!tD(r)&&(e(r.left)||e(r.right))}(e.argument)}var tR=/^(?:function(?![\w$])|class(?![\w$])|\{)/u,tF=/^[(+\-/[`]/u,tB=new r([";","{"]);function tq(e){return"BinaryExpression"===e.type}function tU(e,t){var r,n,s;return!!e.parent&&(r=e.parent,tK.has(r.type)||tq(n=e.parent)&&tW.has(n.operator)||"CallExpression"===(s=e.parent).type&&"Identifier"===s.callee.type&&"Boolean"===s.callee.name)}var tK=new r(["ConditionalExpression","LogicalExpression","DoWhileStatement","UnaryExpression","WhileStatement","ForStatement","IfStatement"]),tW=new r(["instanceof","===","!==","==","!=","<=",">=","in","<",">"]);function tY(e){return tI(e)(tD,t$("||"))}function tJ(e){return tI(e)(tD,t$("&&"))}function tG(e){let t=[],r=e.replaceAll(/(?<quote>["'`])(?:\\.|(?!\k<quote>)[^\\])*\k<quote>/gu,e=>{let r=`__STRING_LITERAL_${t.length}__`;return t.push(e),r}).replaceAll(/\/\/.*$/gmu,"").replaceAll(/\/\*[\s\S]*?\*\//gu,"").replaceAll(/\s+/gu," ").replaceAll(/\(\s+/gu,"(").replaceAll(/\s+\)/gu,")").trim();for(let[e,n]of t.entries())r=r.replace(`__STRING_LITERAL_${e}__`,n);return r}function tH(e){return tj(e)&&!tj(e.argument)&&(!e.parent||!tj(e.parent))}function tV(e,t){let r=null,n=t.getTokenBefore(e),s=t.getTokenAfter(e);for(;n?.value==="("&&s?.value===")";)r=[n,s],n=t.getTokenBefore(n),s=t.getTokenAfter(s);return r}function tX(e,t=!0){return t?`(${e})`:e}function tQ(e){return"Literal"===e.type&&"boolean"==typeof e.value}function tz(e,t,n=!0){var s,i,o;let a;for(let{transformer:r,predicate:n}of[{transformer:tZ,predicate:tq},{transformer:t2,predicate:tQ},{transformer:t0,predicate:tD}])if(n(e))return r(e,t);return s=e,i=t,o=n,a=i.sourceCode.getText(s).trim(),(new r(["ArrowFunctionExpression","ConditionalExpression","AssignmentExpression","SequenceExpression","YieldExpression"])).has(s.type)?`!(${a})`:o?t1(a):`!${a}`}function tZ(e,t){let r=t.sourceCode.getText(e),n={"===":"!==","!==":"===","==":"!=","!=":"=="}[e.operator];if(!n)return`!(${r})`;let s=t.sourceCode.getTokenAfter(e.left,{filter:t=>t.value===e.operator});if(!s||!e.range)return`!(${r})`;let[i]=e.range,[o,a]=s.range;return r.slice(0,o-i)+n+r.slice(a-i)}function t0(e,t){return t1(tX(t.sourceCode.getText(e).trim()))}function t1(e){return e.startsWith("!")?e.replace(/^!/u,""):`!${e}`}function t2(e){return e.value?"false":"true"}var t3={"&&":"||","||":"&&"};function t9(e,t,r){let{sourceCode:n}=t,s=tV(e,n);if(!s)return{text:tz(e,t,r),range:e.range};let[i,o]=s,a=[i.range[0],o.range[1]];return{text:n.commentsExistBetween(i,e)||n.commentsExistBetween(e,o)?`!${n.text.slice(...a)}`:tz(e,t,r),range:a}}var t6={conjunction:{isOperand:tJ,targetOperator:"||"},disjunction:{isOperand:tY,targetOperator:"&&"}};function t4({expressionType:e,isApplicable:t,messageId:r,context:n}){let{targetOperator:s,isOperand:i}=t6[e];return o=>{if(tI(o,n)(tH,e=>i(e.argument),function(...e){return(...t)=>e.some(e=>e(...t))}(tU,(...e)=>!tM(...e)))&&(t?.(o)??!0)){let t=function({shouldWrapInParens:e,canStripNegation:t,expressionType:r,context:n,node:s}){var i;let o=s.argument,a="conjunction"===r?"&&":"||";if(o.operator!==a)return null;let l=n.sourceCode.getText(o),c={expression:o,canStripNegation:t,expressionType:r,sourceOperator:a,targetOperator:t3[a],context:n};return tX((i=l).includes("//")||i.includes("/*")||i.includes("\n")||/\s{2,}/u.test(i)?function({canStripNegation:e,sourceOperator:t,targetOperator:r,expression:n,context:s}){let{sourceCode:i}=s,o=t9(n.left,s,e),a=t9(n.right,s,e),l=i.getTokenAfter(n.left,{filter:e=>e.value===t});return o.text+i.text.slice(o.range[1],l.range[0])+r+i.text.slice(l.range[1],a.range[0])+a.text}(c):function({canStripNegation:e,expressionType:t,targetOperator:r,expression:n,context:s}){return(function({canStripNegation:e,expressionType:t,expression:r,context:n}){let s=[],i=[{expr:r,depth:0}];for(;i.length>0;){var o;let{depth:r,expr:a}=i.pop();if(r>10||(o=a,"conjunction"===t?!tJ(o):!tY(o))){s.push(tz(a,n,e));continue}i.push({expr:a.right,depth:r+1},{expr:a.left,depth:r+1})}return s})({canStripNegation:e,expressionType:t,expression:n,context:s}).join(` ${r} `)}(c),e)}({shouldWrapInParens:function(e,t){if(function(e){let t=e;for(;t.parent&&("VariableDeclarator"===t.parent.type||"VariableDeclaration"===t.parent.type||t.parent.type.endsWith("Expression"));)t=t.parent;return t.parent?.type==="ForStatement"&&t.parent.init===t}(e))return!0;let{parent:r}=e;switch(r.type){case"TaggedTemplateExpression":case"BinaryExpression":case"AwaitExpression":case"UnaryExpression":return!0;case"LogicalExpression":return"??"===r.operator||"||"===t&&"&&"===r.operator;case"MemberExpression":return r.object===e;case"CallExpression":case"NewExpression":return r.callee===e;default:return!1}}(o,s),canStripNegation:function e(t){let{parent:r}=t;if(!r)return!1;switch(r.type){case"ConditionalExpression":return r.test===t||e(r);case"ExpressionStatement":case"DoWhileStatement":case"WhileStatement":case"ForStatement":case"IfStatement":return!0;case"SequenceExpression":return r.expressions.at(-1)!==t||e(r);case"LogicalExpression":return"??"!==r.operator&&e(r);case"UnaryExpression":return"!"===r.operator;default:return!1}}(o),expressionType:e,context:n,node:o});if(t){let e=function({context:e,node:t,fix:r}){let n=function(e){let t=e;for(;!t.type.endsWith("Statement")&&"Program"!==t.type;)t=t.parent;return t}(t);if("ExpressionStatement"!==n.type||!n.range||!t.range||n.range[0]!==t.range[0])return r;let s=tR.test(r)?`(${r})`:r;if(tF.test(s)){let t=e.sourceCode.getTokenBefore(n);if(t&&!tB.has(t.value))return null}return s}({fix:t,context:n,node:o}),s=n.sourceCode.getText(o);n.report({data:{fixed:tG(e??t),original:tG(s)},fix:t=>null===e?null:t.replaceText(o,e),messageId:r,node:o})}}}}var t8="de-morgan",t5={"no-negated-conjunction":{meta:{docs:{description:"Transforms the negation of a conjunction !(A && B) into the equivalent !A || !B according to De Morgan’s law",url:`https://github.com/${t_}/blob/main/docs/no-negated-conjunction.md`,recommended:!0},messages:{convertNegatedConjunction:"Replace negated conjunction `{{ original }}` with `{{ fixed }}`"},type:"suggestion",fixable:"code",schema:[]},create:e=>({UnaryExpression:t4({messageId:"convertNegatedConjunction",expressionType:"conjunction",context:e})})},"no-negated-disjunction":{meta:{schema:[{properties:{enforceForMixedOperators:{description:"Transform negated disjunctions that mix `&&` and `||` without grouping parentheses",type:"boolean"}},additionalProperties:!1,type:"object"}],docs:{description:"Transforms the negation of a disjunction !(A || B) into the equivalent !A && !B according to De Morgan’s law",url:`https://github.com/${t_}/blob/main/docs/no-negated-disjunction.md`,recommended:!0},messages:{convertNegatedDisjunction:"Replace negated disjunction `{{ original }}` with `{{ fixed }}`"},defaultOptions:[{enforceForMixedOperators:!1}],type:"suggestion",fixable:"code"},create:e=>{let[{enforceForMixedOperators:t=!1}={}]=e.options;return{UnaryExpression:t4({isApplicable:n=>t||function(e,t){let n=new r,s=[e.argument];for(;s.length>0;){let e=s.pop();tD(e)&&(n.add(e.operator),s.push(...[e.left,e.right].filter(e=>!tV(e,t.sourceCode))))}return n.size<2}(n,e),messageId:"convertNegatedDisjunction",expressionType:"disjunction",context:e})}}}};function t7(){return Object.fromEntries(Object.keys(t5).map(e=>[`${t8}/${e}`,"error"]))}var re={"recommended-legacy":{plugins:[t8],rules:t7()},recommended:{plugins:{[t8]:{rules:t5}},rules:t7()}};let rt=[".js",".jsx",".mjs",".cjs"];async function rr(e={}){let{files:t,disableNoConsoleInCLI:r=!0,env:n={}}=e,{browser:s=!0,webextensions:i=!1,greasemonkey:o=!1,customGlobals:a={}}=n,l=e.module??ej.getPackageJson()?.type==="module",{default:c}=await Promise.resolve().then(function(){return require("./vendor-ZgNHwqKn.cjs")}).then(function(e){return e.i}),u=[{linterOptions:{reportUnusedDisableDirectives:"error",reportUnusedInlineConfigs:"warn"}},eX.configs.recommended,ej.withFiles({name:"@eslint-sukka/js base",languageOptions:{ecmaVersion:"latest",sourceType:l?"module":"commonjs",parserOptions:{ecmaVersion:"latest",sourceType:l?"module":"commonjs",ecmaFeatures:{jsx:!0}},globals:{...ej.globals.es2025,...s&&ej.globals.browser,...i&&ej.globals.webextensions,...o&&ej.globals.greasemonkey,...a}},plugins:{"unused-imports":ej.memo(eQ,"eslint-plugin-unused-imports"),sukka:ej.memo(eY,"@eslint-sukka/eslint-plugin-sukka-full"),antfu:c},rules:{"accessor-pairs":"off","array-callback-return":["error",{allowImplicit:!0}],"arrow-body-style":["error","as-needed",{requireReturnForObjectLiteral:!1}],"block-scoped-var":"error","class-methods-use-this":["error",{exceptMethods:[]}],curly:["error","multi-line"],"default-case":["error",{commentPattern:"^no default$"}],"default-case-last":"error","default-param-last":"error","dot-notation":["error",{allowKeywords:!0}],eqeqeq:["error","always",{null:"ignore"}],"grouped-accessor-pairs":"error","guard-for-in":"error","no-alert":"warn","no-caller":"error","no-constructor-return":"error","no-else-return":"off","no-empty-pattern":"error","no-empty-static-block":"error","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-label":"error","no-implicit-coercion":["off",{boolean:!1,number:!0,string:!0,allow:[]}],"no-implicit-globals":"off","no-implied-eval":"error","no-invalid-this":"off","no-labels":["error",{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":"error","no-loop-func":"error","no-multi-str":"error","no-new":"error","no-new-func":"error","no-new-wrappers":"error","no-octal-escape":"error","no-proto":"error","no-restricted-properties":["error",...[["isFinite","Number.isFinite"],["isNaN","Number.isNaN"]].flatMap(([e,t])=>["global","globalThis","window","self"].map(r=>({object:r,property:e,message:`Please use ${t} instead`}))),{object:"arguments",property:"callee",message:"arguments.callee is deprecated"},{property:"__defineGetter__",message:"Please use Object.defineProperty instead."},{property:"__defineSetter__",message:"Please use Object.defineProperty instead."},{object:"Math",property:"pow",message:"Use the exponentiation operator (**) instead."}],"no-return-assign":["error","always"],"no-self-compare":"off","no-sequences":"error","no-unmodified-loop-condition":"off","no-unused-expressions":["error",{allowShortCircuit:!1,allowTernary:!1,allowTaggedTemplates:!1}],"no-useless-call":"warn","no-useless-catch":"error","no-useless-concat":"error","no-useless-escape":"error","no-useless-return":"error","no-void":["error",{allowAsStatement:!0}],"no-with":"error","prefer-promise-reject-errors":["error",{allowEmptyReject:!0}],"prefer-object-has-own":"error","prefer-regex-literals":["error",{disallowRedundantWrapping:!0}],radix:"error","require-await":"error","require-yield":"error","require-unicode-regexp":"off","vars-on-top":"error",yoda:"error","no-await-in-loop":"warn","no-console":"warn","no-constant-condition":["warn",{checkLoops:"allExceptWhileTrue"}],"no-empty-function":"error","no-empty":["error",{allowEmptyCatch:!0}],"no-constant-binary-expression":"error","no-loss-of-precision":"warn","no-promise-executor-return":"error","no-template-curly-in-string":"error","no-unreachable-loop":["error",{ignore:[]}],"no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0}],"unused-imports/no-unused-vars":"off","unused-imports/no-unused-imports":"off","no-unassigned-vars":"error","no-useless-assignment":"warn","no-unused-private-class-members":"error","no-useless-backreference":"error","no-negated-in-lhs":"off","require-atomic-updates":"off","use-isnan":["error",{enforceForIndexOf:!0}],"valid-typeof":["error",{requireStringLiterals:!0}],"no-new-native-nonconstructor":"error","no-duplicate-imports":"off","no-restricted-exports":["error",{restrictedNamedExports:["then"]}],"no-useless-constructor":"error","no-useless-rename":["error",{ignoreDestructuring:!1,ignoreImport:!1,ignoreExport:!1}],"no-var":"warn","object-shorthand":["error","always",{ignoreConstructors:!1,avoidQuotes:!0,avoidExplicitReturnArrows:!0}],"prefer-arrow-callback":["error",{allowNamedFunctions:!0,allowUnboundThis:!0}],"prefer-const":["error",{ignoreReadBeforeAssign:!0}],"prefer-numeric-literals":"error","prefer-rest-params":"error","prefer-template":"off","symbol-description":"error",camelcase:["warn",{properties:"never",ignoreDestructuring:!1,ignoreImports:!0,ignoreGlobals:!0,allow:["^UNSAFE_","^experimental_","^__DEV__"]}],"consistent-this":"off","new-cap":["error",{newIsCap:!0,newIsCapExceptions:[],capIsNew:!1,capIsNewExceptions:["Immutable.Map","Immutable.Set","Immutable.List"]}],"no-bitwise":"off","no-lonely-if":"error","no-multi-assign":"error","no-negated-condition":"off","no-new-object":"off","no-object-constructor":"error","no-array-constructor":"error","no-ternary":"off","no-unneeded-ternary":"error","prefer-exponentiation-operator":"error","unicode-bom":["error","never"],"no-label-var":"error","no-use-before-define":["error",{functions:!1,classes:!0,variables:!0}],"no-restricted-globals":["error",{name:"isFinite",message:"Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite"},{name:"isNaN",message:"Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan"}],"no-undef-init":"error","no-restricted-imports":["error",{paths:ej.RESTRICTED_IMPORT}],"no-restricted-syntax":["error",...ej.RESTRICTED_SYNTAX],"no-prototype-builtins":"error","antfu/import-dedupe":"error","antfu/consistent-chaining":"error","antfu/no-top-level-await":"error","antfu/top-level-function":"warn"}},t),ej.withFiles(ej.UNSAFE_excludeJsonYamlFiles(eY.configs.recommended_unicorn),t),ej.withFiles(ej.UNSAFE_excludeJsonYamlFiles({plugins:{"import-x":ez},settings:{"import-x/extensions":rt,"import-x/resolver-next":[ez.createNodeResolver({extensions:rt})]},rules:{...ez.configs["flat/recommended"].rules,"import-x/newline-after-import":["error",{considerComments:!1}],"import-x/no-absolute-path":"error","import-x/no-empty-named-blocks":"error","import-x/no-mutable-exports":"error","import-x/no-useless-path-segments":"warn","import-x/no-webpack-loader-syntax":"error","import-x/no-relative-packages":"warn"}}),t),ej.withFiles(re.recommended,t),ej.withFiles(eY.configs.recommended,t),ej.withFiles(ej.asFlatConfig(eJ.eslint_plugin_vibe_proof.configs.common),t),ej.withFiles({name:"@eslint-sukka/js vibe-proof overrides",rules:{"vibe-proof/prefer-array-some":"off"}},t)];if(!1!==r){let e="boolean"==typeof r?null:eZ.castArray(r);u.push({name:"@eslint-sukka/js cli specific",files:e??[`**/scripts/${ej.constants.GLOB_SRC}`,`**/cli/${ej.constants.GLOB_SRC}`,`**/cli.${ej.constants.GLOB_SRC_EXT}`],rules:{"no-console":"off"}})}return u}async function rn(){let e={languageOptions:{parser:await import("jsonc-eslint-parser")}},t=await import("eslint-plugin-jsonc");return[...t.configs.base,{name:"@eslint-sukka/json shared rules",files:[ej.constants.GLOB_JSON,ej.constants.GLOB_JSON5,ej.constants.GLOB_JSONC],rules:{"jsonc/array-bracket-spacing":["error","never"],"jsonc/comma-dangle":["error","never"],"jsonc/comma-style":["error","last"],"jsonc/indent":["error",2],"jsonc/key-spacing":["error",{beforeColon:!1,afterColon:!0}],"jsonc/object-curly-newline":"off","jsonc/object-curly-spacing":["error","always"],"jsonc/object-property-newline":["error",{allowMultiplePropertiesPerLine:!0}],"jsonc/quote-props":"error","jsonc/quotes":"error"}},{name:"@eslint-sukka/json json",...e,files:[ej.constants.GLOB_JSON],rules:ej.collectRules(t.configs["recommended-with-json"])},{name:"@eslint-sukka/json json5",...e,files:[ej.constants.GLOB_JSON5],rules:ej.collectRules(t.configs["recommended-with-json5"])},{name:"@eslint-sukka/json jsonc",...e,files:[ej.constants.GLOB_JSONC],rules:ej.collectRules(t.configs["recommended-with-jsonc"])},{name:"@eslint-sukka/json package.json",...e,files:["**/package.json"],rules:{"jsonc/sort-array-values":["error",{order:{type:"asc"},pathPattern:"^files$"}],"jsonc/sort-keys":["error",{order:["$schema","publisher","name","displayName","version","private","description","funding","homepage","repository","bugs","categories","type","main","module","types","typesVersions","bin","files","exports","icon","unpkg","jsdelivr","sideEffects","activationEvents","contributes","scripts","keywords","author","license","dependencies","devDependencies","peerDependencies","peerDependenciesMeta","optionalDependencies","packageManager","engines","pnpm","overrides","resolutions","husky","simple-git-hooks","lint-staged","eslintConfig"],pathPattern:"^$"},{order:{type:"asc"},pathPattern:"^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$"},{order:["types","import","module","require","default"],pathPattern:"^exports.*$"}]}},{name:"@eslint-sukka/json tsconfig.json",...e,files:["**/tsconfig.json","**/tsconfig.*.json","**/tsconfig-*.json","**/jsconfig.json","**/jsconfig.*.json","**/jsconfig-*.json"],rules:{"jsonc/sort-keys":["error",{order:["$schema","extends","compilerOptions","references","files","include","exclude"],pathPattern:"^$"},{order:["incremental","composite","tsBuildInfoFile","disableSourceOfProjectReferenceRedirect","disableSolutionSearching","disableReferencedProjectLoad","target","lib","jsx","experimentalDecorators","emitDecoratorMetadata","jsxFactory","jsxFragmentFactory","jsxImportSource","reactNamespace","noLib","useDefineForClassFields","moduleDetection","module","rootDir","moduleResolution","baseUrl","paths","rootDirs","typeRoots","types","allowUmdGlobalAccess","moduleSuffixes","allowImportingTsExtensions","resolvePackageJsonExports","resolvePackageJsonImports","customConditions","resolveJsonModule","allowArbitraryExtensions","noResolve","allowJs","checkJs","maxNodeModuleJsDepth","declaration","declarationMap","emitDeclarationOnly","sourceMap","inlineSourceMap","outFile","outDir","removeComments","noEmit","importHelpers","importsNotUsedAsValues","downlevelIteration","sourceRoot","mapRoot","inlineSources","emitBOM","newLine","stripInternal","noEmitHelpers","noEmitOnError","preserveConstEnums","declarationDir","preserveValueImports","isolatedModules","verbatimModuleSyntax","allowSyntheticDefaultImports","esModuleInterop","preserveSymlinks","forceConsistentCasingInFileNames","strict","strictBindCallApply","strictFunctionTypes","strictNullChecks","strictPropertyInitialization","allowUnreachableCode","allowUnusedLabels","alwaysStrict","exactOptionalPropertyTypes","noFallthroughCasesInSwitch","noImplicitAny","noImplicitOverride","noImplicitReturns","noImplicitThis","noPropertyAccessFromIndexSignature","noUncheckedIndexedAccess","noUnusedLocals","noUnusedParameters","useUnknownInCatchVariables","skipDefaultLibCheck","skipLibCheck"],pathPattern:"^compilerOptions$"}]}}]}let rs={"no-dupe-class-members":"off","@typescript-eslint/no-dupe-class-members":"off","no-redeclare":"off","@typescript-eslint/no-redeclare":"off","no-unused-private-class-members":"off","@typescript-eslint/no-unused-private-class-members":"error","no-unused-vars":"off","@typescript-eslint/no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0}],"class-methods-use-this":"off","@typescript-eslint/class-methods-use-this":["error",{exceptMethods:[]}],"default-param-last":"off","@typescript-eslint/default-param-last":"error","dot-notation":"off","@typescript-eslint/dot-notation":["error",{allowKeywords:!0}],"no-implied-eval":"off","@typescript-eslint/no-implied-eval":"error","no-invalid-this":"off","@typescript-eslint/no-invalid-this":"off","no-unused-expressions":"off","@typescript-eslint/no-unused-expressions":["error",{allowShortCircuit:!1,allowTernary:!1,allowTaggedTemplates:!1}],"prefer-promise-reject-errors":"off","@typescript-eslint/prefer-promise-reject-errors":["error",{allowEmptyReject:!0}],"require-await":"off","@typescript-eslint/require-await":"error","no-empty-function":"off","@typescript-eslint/no-empty-function":"error","no-useless-constructor":"off","@typescript-eslint/no-useless-constructor":"error",camelcase:"off","no-array-constructor":"off","@typescript-eslint/no-array-constructor":"error","no-use-before-define":"off","@typescript-eslint/no-use-before-define":["error",{functions:!1,classes:!0,variables:!0}],"sukka/no-return-await":"off","@typescript-eslint/return-await":["error","in-try-catch"]},ri=[".ts",".cts",".mts",".tsx",".d.ts"],ro=[...ri,".js",".jsx",".mjs",".cjs"];async function ra(e){if(!e6.isCI&&eR.stdout.isTTY&&!ej.isPackageExists(e,"string"==typeof __dirname?__dirname:void 0)){let{confirm:t}=await Promise.resolve().then(function(){return require("./vendor-ZgNHwqKn.cjs")}).then(function(e){return e.b});await t({message:`Package is required for this config: ${e}. Do you want to install it?`})&&await Promise.resolve().then(function(){return require("./vendor-ZgNHwqKn.cjs")}).then(function(e){return e.c}).then(t=>t.installPackage(e,{dev:!0}))}return Promise.resolve(require(e))}async function rl(e){if(!ej.isPackageExists(e,"string"==typeof __dirname?__dirname:void 0))return;if(console.error(e4.yellow(`[eslint-config-sukka] "${e}" is deprecated and you should uninstall it`)),e6.isCI||!process.stdout.isTTY)throw Error(`[eslint-config-sukka] "${e}" is deprecated and you should uninstall it`);let{confirm:t}=await Promise.resolve().then(function(){return require("./vendor-ZgNHwqKn.cjs")}).then(function(e){return e.b});await t({message:` "${e}" is deprecated. Do you want to uninstall it?`})&&await Promise.resolve().then(function(){return require("./vendor-ZgNHwqKn.cjs")}).then(function(e){return e.c}).then(t=>t.uninstallPackage(e,{dev:!0}))}var rc=Object.defineProperty,ru={},rp={},rf=eF.g(tp),rh={},rd={};function rg(){if(o)return rd;o=1;let e=Symbol.for("yaml.alias"),t=Symbol.for("yaml.document"),r=Symbol.for("yaml.map"),n=Symbol.for("yaml.pair"),s=Symbol.for("yaml.scalar"),i=Symbol.for("yaml.seq"),a=Symbol.for("yaml.node.type"),l=e=>!!e&&"object"==typeof e&&e[a]===s;function c(e){if(e&&"object"==typeof e)switch(e[a]){case r:case i:return!0}return!1}return rd.ALIAS=e,rd.DOC=t,rd.MAP=r,rd.NODE_TYPE=a,rd.PAIR=n,rd.SCALAR=s,rd.SEQ=i,rd.hasAnchor=e=>(l(e)||c(e))&&!!e.anchor,rd.isAlias=t=>!!t&&"object"==typeof t&&t[a]===e,rd.isCollection=c,rd.isDocument=e=>!!e&&"object"==typeof e&&e[a]===t,rd.isMap=e=>!!e&&"object"==typeof e&&e[a]===r,rd.isNode=function(t){if(t&&"object"==typeof t)switch(t[a]){case e:case r:case s:case i:return!0}return!1},rd.isPair=e=>!!e&&"object"==typeof e&&e[a]===n,rd.isScalar=l,rd.isSeq=e=>!!e&&"object"==typeof e&&e[a]===i,rd}var rm={};function ry(){if(a)return rm;a=1;var e=rg();let t=Symbol("break visit"),r=Symbol("skip children"),n=Symbol("remove node");function s(t,r){let s=c(r);e.isDocument(t)?i(null,t.contents,s,Object.freeze([t]))===n&&(t.contents=null):i(null,t,s,Object.freeze([]))}function i(r,s,o,a){let l=u(r,s,o,a);if(e.isNode(l)||e.isPair(l))return p(r,a,l),i(r,l,o,a);if("symbol"!=typeof l){if(e.isCollection(s)){a=Object.freeze(a.concat(s));for(let e=0;e<s.items.length;++e){let r=i(e,s.items[e],o,a);if("number"==typeof r)e=r-1;else{if(r===t)return t;r===n&&(s.items.splice(e,1),e-=1)}}}else if(e.isPair(s)){a=Object.freeze(a.concat(s));let e=i("key",s.key,o,a);if(e===t)return t;e===n&&(s.key=null);let r=i("value",s.value,o,a);if(r===t)return t;r===n&&(s.value=null)}}return l}async function o(t,r){let s=c(r);e.isDocument(t)?await l(null,t.contents,s,Object.freeze([t]))===n&&(t.contents=null):await l(null,t,s,Object.freeze([]))}async function l(r,s,i,o){let a=await u(r,s,i,o);if(e.isNode(a)||e.isPair(a))return p(r,o,a),l(r,a,i,o);if("symbol"!=typeof a){if(e.isCollection(s)){o=Object.freeze(o.concat(s));for(let e=0;e<s.items.length;++e){let r=await l(e,s.items[e],i,o);if("number"==typeof r)e=r-1;else{if(r===t)return t;r===n&&(s.items.splice(e,1),e-=1)}}}else if(e.isPair(s)){o=Object.freeze(o.concat(s));let e=await l("key",s.key,i,o);if(e===t)return t;e===n&&(s.key=null);let r=await l("value",s.value,i,o);if(r===t)return t;r===n&&(s.value=null)}}return a}function c(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function u(t,r,n,s){return"function"==typeof n?n(t,r,s):e.isMap(r)?n.Map?.(t,r,s):e.isSeq(r)?n.Seq?.(t,r,s):e.isPair(r)?n.Pair?.(t,r,s):e.isScalar(r)?n.Scalar?.(t,r,s):e.isAlias(r)?n.Alias?.(t,r,s):void 0}function p(t,r,n){let s=r[r.length-1];if(e.isCollection(s))s.items[t]=n;else if(e.isPair(s))"key"===t?s.key=n:s.value=n;else if(e.isDocument(s))s.contents=n;else{let t=e.isAlias(s)?"alias":"scalar";throw Error(`Cannot replace node with ${t} parent`)}}return s.BREAK=t,s.SKIP=r,s.REMOVE=n,o.BREAK=t,o.SKIP=r,o.REMOVE=n,rm.visit=s,rm.visitAsync=o,rm}function rb(){if(l)return rh;l=1;var e=rg(),t=ry();let r={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},n=e=>e.replace(/[!,[\]{}]/g,e=>r[e]);class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){let e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);let r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(2!==r.length&&(t(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[e,n]=r;return this.tags[e]=n,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==r.length)return t(0,"%YAML directive should contain exactly one part"),!1;let[e]=r;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;{let r=/^\d+\.\d+$/.test(e);return t(6,`Unsupported YAML version ${e}`,r),!1}}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){let r=e.slice(2,-1);return"!"===r||"!!"===r?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),r)}let[,r,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);let s=this.tags[r];if(s)try{return s+decodeURIComponent(n)}catch(e){return t(String(e)),null}return"!"===r?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+n(e.substring(r.length));return"!"===e[0]?e:`!<${e}>`}toString(r){let n,s=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags);if(r&&i.length>0&&e.isNode(r.contents)){let s={};t.visit(r.contents,(t,r)=>{e.isNode(r)&&r.tag&&(s[r.tag]=!0)}),n=Object.keys(s)}else n=[];for(let[e,t]of i)("!!"!==e||"tag:yaml.org,2002:"!==t)&&(!r||n.some(e=>e.startsWith(t)))&&s.push(`%TAG ${e} ${t}`);return s.join("\n")}}return s.defaultYaml={explicit:!1,version:"1.2"},s.defaultTags={"!!":"tag:yaml.org,2002:"},rh.Directives=s,rh}var rv={},rk={},rw={};function rS(){if(c)return rw;c=1;var t=rg(),n=ry();function s(e){let t=new r;return n.visit(e,{Value(e,r){r.anchor&&t.add(r.anchor)}}),t}function i(e,t){for(let r=1;;++r){let n=`${e}${r}`;if(!t.has(n))return n}}return rw.anchorIsValid=function(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=JSON.stringify(e);throw Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0},rw.anchorNames=s,rw.createNodeAnchors=function(r,n){let o=[],a=new e,l=null;return{onAnchor:e=>{o.push(e),l??(l=s(r));let t=i(n,l);return l.add(t),t},setAnchors:()=>{for(let e of o){let r=a.get(e);if("object"==typeof r&&r.anchor&&(t.isScalar(r.node)||t.isCollection(r.node)))r.node.anchor=r.anchor;else{let t=Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}}},sourceObjects:a}},rw.findNewAnchor=i,rw}var rx={},rE={};function rA(){return u||(u=1,rE.applyReviver=function e(t,r,n,s){if(s&&"object"==typeof s)if(Array.isArray(s))for(let r=0,n=s.length;r<n;++r){let n=s[r],i=e(t,s,String(r),n);void 0===i?delete s[r]:i!==n&&(s[r]=i)}else if(s instanceof Map)for(let r of Array.from(s.keys())){let n=s.get(r),i=e(t,s,r,n);void 0===i?s.delete(r):i!==n&&s.set(r,i)}else if(s instanceof Set)for(let r of Array.from(s)){let n=e(t,s,r,r);void 0===n?s.delete(r):n!==r&&(s.delete(r),s.add(n))}else for(let[r,n]of Object.entries(s)){let i=e(t,s,r,n);void 0===i?delete s[r]:i!==n&&(s[r]=i)}return t.call(r,n,s)}),rE}var rC={};function rT(){if(p)return rC;p=1;var e=rg();return rC.toJS=function t(r,n,s){if(Array.isArray(r))return r.map((e,r)=>t(e,String(r),s));if(r&&"function"==typeof r.toJSON){if(!s||!e.hasAnchor(r))return r.toJSON(n,s);let t={aliasCount:0,count:1,res:void 0};s.anchors.set(r,t),s.onCreate=e=>{t.res=e,delete s.onCreate};let i=r.toJSON(n,s);return s.onCreate&&s.onCreate(i),i}return"bigint"!=typeof r||s?.keep?r:Number(r)},rC}function rO(){if(f)return rx;f=1;var t=rA(),r=rg(),n=rT();return rx.NodeBase=class{constructor(e){Object.defineProperty(this,r.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(s,{mapAsMap:i,maxAliasCount:o,onAnchor:a,reviver:l}={}){if(!r.isDocument(s))throw TypeError("A document argument is required");let c={anchors:new e,doc:s,keep:!0,mapAsMap:!0===i,mapKeyWarned:!1,maxAliasCount:"number"==typeof o?o:100},u=n.toJS(this,"",c);if("function"==typeof a)for(let{count:e,res:t}of c.anchors.values())a(t,e);return"function"==typeof l?t.applyReviver(l,{"":u},"",u):u}},rx}function rN(){if(h)return rk;h=1;var e=rS(),t=ry(),r=rg(),n=rO(),s=rT();return rk.Alias=class extends n.NodeBase{constructor(e){super(r.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(e,n){let s,i;if(n?.maxAliasCount===0)throw ReferenceError("Alias resolution is disabled");for(let o of(n?.aliasResolveCache?s=n.aliasResolveCache:(s=[],t.visit(e,{Node:(e,t)=>{(r.isAlias(t)||r.hasAnchor(t))&&s.push(t)}}),n&&(n.aliasResolveCache=s)),s)){if(o===this)break;o.anchor===this.source&&(i=o)}return i}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:o}=t,a=this.resolve(i,t);if(!a)throw ReferenceError(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);let l=n.get(a);if(l||(s.toJS(a,null,t),l=n.get(a)),l?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(o>=0&&(l.count+=1,0===l.aliasCount&&(l.aliasCount=function e(t,n,s){if(r.isAlias(n)){let e=n.resolve(t),r=s&&e&&s.get(e);return r?r.count*r.aliasCount:0}if(r.isCollection(n)){let r=0;for(let i of n.items){let n=e(t,i,s);n>r&&(r=n)}return r}return r.isPair(n)?Math.max(e(t,n.key,s),e(t,n.value,s)):1}(i,a,n)),l.count*l.aliasCount>o))throw ReferenceError("Excessive alias count indicates a resource exhaustion attack");return l.res}toString(t,r,n){let s=`*${this.source}`;if(t){if(e.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source))throw Error(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);if(t.implicitKey)return`${s} `}return s}},rk}var rL={},r_={},rI={};function rP(){if(d)return rI;d=1;var e=rg(),t=rO(),r=rT();let n=class extends t.NodeBase{constructor(t){super(e.SCALAR),this.value=t}toJSON(e,t){return t?.keep?this.value:r.toJS(this.value,e,t)}toString(){return String(this.value)}};return n.BLOCK_FOLDED="BLOCK_FOLDED",n.BLOCK_LITERAL="BLOCK_LITERAL",n.PLAIN="PLAIN",n.QUOTE_DOUBLE="QUOTE_DOUBLE",n.QUOTE_SINGLE="QUOTE_SINGLE",rI.Scalar=n,rI.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e,rI}function r$(){if(g)return r_;g=1;var e=rN(),t=rg(),r=rP();return r_.createNode=function(n,s,i){let o;if(t.isDocument(n)&&(n=n.contents),t.isNode(n))return n;if(t.isPair(n)){let e=i.schema[t.MAP].createNode?.(i.schema,null,i);return e.items.push(n),e}(n instanceof String||n instanceof Number||n instanceof Boolean||"u">typeof BigInt&&n instanceof BigInt)&&(n=n.valueOf());let{aliasDuplicateObjects:a,onAnchor:l,onTagObj:c,schema:u,sourceObjects:p}=i;if(a&&n&&"object"==typeof n){if(o=p.get(n))return o.anchor??(o.anchor=l(n)),new e.Alias(o.anchor);o={anchor:null,node:null},p.set(n,o)}s?.startsWith("!!")&&(s="tag:yaml.org,2002:"+s.slice(2));let f=function(e,t,r){if(t){let e=r.filter(e=>e.tag===t),n=e.find(e=>!e.format)??e[0];if(!n)throw Error(`Tag ${t} not found`);return n}return r.find(t=>t.identify?.(e)&&!t.format)}(n,s,u.tags);if(!f){if(n&&"function"==typeof n.toJSON&&(n=n.toJSON()),!n||"object"!=typeof n){let e=new r.Scalar(n);return o&&(o.node=e),e}f=n instanceof Map?u[t.MAP]:Symbol.iterator in Object(n)?u[t.SEQ]:u[t.MAP]}c&&(c(f),delete i.onTagObj);let h=f?.createNode?f.createNode(i.schema,n,i):"function"==typeof f?.nodeClass?.from?f.nodeClass.from(i.schema,n,i):new r.Scalar(n);return s?h.tag=s:f.default||(h.tag=f.tag),o&&(o.node=h),h},r_}function rj(){if(m)return rL;m=1;var t=r$(),r=rg(),n=rO();function s(r,n,s){let i=s;for(let t=n.length-1;t>=0;--t){let r=n[t];if("number"==typeof r&&Number.isInteger(r)&&r>=0){let e=[];e[r]=i,i=e}else i=new e([[r,i]])}return t.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:r,sourceObjects:new e})}let i=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;return rL.Collection=class extends n.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>r.isNode(t)||r.isPair(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(i(e))this.add(t);else{let[n,...i]=e,o=this.get(n,!0);if(r.isCollection(o))o.addIn(i,t);else if(void 0===o&&this.schema)this.set(n,s(this.schema,i,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[t,...n]=e;if(0===n.length)return this.delete(t);let s=this.get(t,!0);if(r.isCollection(s))return s.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...s]=e,i=this.get(n,!0);return 0===s.length?!t&&r.isScalar(i)?i.value:i:r.isCollection(i)?i.getIn(s,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!r.isPair(t))return!1;let n=t.value;return null==n||e&&r.isScalar(n)&&null==n.value&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(0===n.length)return this.has(t);let s=this.get(t,!0);return!!r.isCollection(s)&&s.hasIn(n)}setIn(e,t){let[n,...i]=e;if(0===i.length)this.set(n,t);else{let e=this.get(n,!0);if(r.isCollection(e))e.setIn(i,t);else if(void 0===e&&this.schema)this.set(n,s(this.schema,i,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}},rL.collectionFromPath=s,rL.isEmptyPath=i,rL}var rD={},rM={},rR={},rF={};function rB(){if(y)return rF;function e(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}return y=1,rF.indentComment=e,rF.lineComment=(t,r,n)=>t.endsWith("\n")?e(n,r):n.includes("\n")?"\n"+e(n,r):(t.endsWith(" ")?"":" ")+n,rF.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#"),rF}var rq={},rU={};function rK(){let e;if(v)return rq;v=1;var t=rP(),r=function(){if(b)return rU;b=1;let e="block",t="quoted";function r(e,t,r){let n=t,s=t+1,i=e[s];for(;" "===i||" "===i;)if(t<s+r)i=e[++t];else{do i=e[++t];while(i&&"\n"!==i);n=t,i=e[s=t+1]}return n}return rU.FOLD_BLOCK=e,rU.FOLD_FLOW="flow",rU.FOLD_QUOTED=t,rU.foldFlowLines=function(n,s,i="flow",{indentAtStart:o,lineWidth:a=80,minContentWidth:l=20,onFold:c,onOverflow:u}={}){let p,f,h;if(!a||a<0)return n;a<l&&(l=0);let d=Math.max(1+l,1+a-s.length);if(n.length<=d)return n;let g=[],m={},y=a-s.length;"number"==typeof o&&(o>a-Math.max(2,l)?g.push(0):y=a-o);let b=!1,v=-1,k=-1,w=-1;for(i===e&&-1!==(v=r(n,v,s.length))&&(y=v+d);h=n[v+=1];){if(i===t&&"\\"===h){switch(k=v,n[v+1]){case"x":v+=3;break;case"u":v+=5;break;case"U":v+=9;break;default:v+=1}w=v}if("\n"===h)i===e&&(v=r(n,v,s.length)),y=v+s.length+d,p=void 0;else{if(" "===h&&f&&" "!==f&&"\n"!==f&&" "!==f){let e=n[v+1];e&&" "!==e&&"\n"!==e&&" "!==e&&(p=v)}if(v>=y)if(p)g.push(p),y=p+d,p=void 0;else if(i===t){for(;" "===f||" "===f;)f=h,h=n[v+=1],b=!0;let e=v>w+1?v-2:k-1;if(m[e])return n;g.push(e),m[e]=!0,y=e+d,p=void 0}else b=!0}f=h}if(b&&u&&u(),0===g.length)return n;c&&c();let S=n.slice(0,g[0]);for(let e=0;e<g.length;++e){let r=g[e],o=g[e+1]||n.length;0===r?S=`
2
+ ${s}${n.slice(0,o)}`:(i===t&&m[r]&&(S+=`${n[r]}\\`),S+=`
3
+ ${s}${n.slice(r+1,o)}`)}return S},rU}();let n=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth});function s(e,t){let s=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return s;let{implicitKey:i}=t,o=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(/^(%|---|\.\.\.)/m.test(e)?" ":""),l="",c=0;for(let e=0,t=s[e];t;t=s[++e])if(" "===t&&"\\"===s[e+1]&&"n"===s[e+2]&&(l+=s.slice(c,e)+"\\ ",e+=1,c=e,t="\\"),"\\"===t)switch(s[e+1]){case"u":{l+=s.slice(c,e);let t=s.substr(e+2,4);switch(t){case"0000":l+="\\0";break;case"0007":l+="\\a";break;case"000b":l+="\\v";break;case"001b":l+="\\e";break;case"0085":l+="\\N";break;case"00a0":l+="\\_";break;case"2028":l+="\\L";break;case"2029":l+="\\P";break;default:"00"===t.substr(0,2)?l+="\\x"+t.substr(2):l+=s.substr(e,6)}e+=5,c=e+1}break;case"n":if(i||'"'===s[e+2]||s.length<o)e+=1;else{for(l+=s.slice(c,e)+"\n\n";"\\"===s[e+2]&&"n"===s[e+3]&&'"'!==s[e+4];)l+="\n",e+=2;l+=a," "===s[e+2]&&(l+="\\"),e+=1,c=e+1}break;default:e+=1}return l=c?l+s.slice(c):s,i?l:r.foldFlowLines(l,a,r.FOLD_QUOTED,n(t,!1))}function i(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return s(e,t);let i=t.indent||(/^(%|---|\.\.\.)/m.test(e)?" ":""),o="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
4
+ ${i}`)+"'";return t.implicitKey?o:r.foldFlowLines(o,i,r.FOLD_FLOW,n(t,!1))}function o(e,t){let r,{singleQuote:n}=t.options;if(!1===n)r=s;else{let t=e.includes('"'),o=e.includes("'");r=t&&!o?i:o&&!t?s:n?i:s}return r(e,t)}try{e=RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{e=/\n+(?!\n|$)/g}function a({comment:s,type:i,value:l},c,u,p){let f,h,d,g,{blockQuote:m,commentString:y,lineWidth:b}=c.options;if(!m||/\n[\t ]+$/.test(l))return o(l,c);let v=c.indent||(c.forceBlockIndent||(g=l,/^(%|---|\.\.\.)/m.test(g))?" ":""),k="literal"===m||"folded"!==m&&i!==t.Scalar.BLOCK_FOLDED&&(i===t.Scalar.BLOCK_LITERAL||!function(e,t,r){if(!t||t<0)return!1;let n=t-r,s=e.length;if(s<=n)return!1;for(let t=0,r=0;t<s;++t)if("\n"===e[t]){if(t-r>n)return!0;if(s-(r=t+1)<=n)return!1}return!0}(l,b,v.length));if(!l)return k?"|\n":">\n";for(h=l.length;h>0;--h){let e=l[h-1];if("\n"!==e&&" "!==e&&" "!==e)break}let w=l.substring(h),S=w.indexOf("\n");-1===S?f="-":l===w||S!==w.length-1?(f="+",p&&p()):f="",w&&(l=l.slice(0,-w.length),"\n"===w[w.length-1]&&(w=w.slice(0,-1)),w=w.replace(e,`$&${v}`));let x=!1,E=-1;for(d=0;d<l.length;++d){let e=l[d];if(" "===e)x=!0;else if("\n"===e)E=d;else break}let A=l.substring(0,E<d?E+1:d);A&&(l=l.substring(A.length),A=A.replace(/\n+/g,`$&${v}`));let C=v?"2":"1",T=(x?C:"")+f;if(s&&(T+=" "+y(s.replace(/ ?[\r\n]+/g," ")),u&&u()),!k){let e=l.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${v}`),s=!1,o=n(c,!0);"folded"!==m&&i!==t.Scalar.BLOCK_FOLDED&&(o.onOverflow=()=>{s=!0});let a=r.foldFlowLines(`${A}${e}${w}`,v,r.FOLD_BLOCK,o);if(!s)return`>${T}
5
+ ${v}${a}`}return l=l.replace(/\n+/g,`$&${v}`),`|${T}
6
+ ${v}${A}${l}${w}`}return rq.stringifyString=function(e,l,c,u){let{implicitKey:p,inFlow:f}=l,h="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)}),{type:d}=e;d!==t.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(h.value)&&(d=t.Scalar.QUOTE_DOUBLE);let g=e=>{switch(e){case t.Scalar.BLOCK_FOLDED:case t.Scalar.BLOCK_LITERAL:return p||f?o(h.value,l):a(h,l,c,u);case t.Scalar.QUOTE_DOUBLE:return s(h.value,l);case t.Scalar.QUOTE_SINGLE:return i(h.value,l);case t.Scalar.PLAIN:return function(e,s,i,l){let{type:c,value:u}=e,{actualString:p,implicitKey:f,indent:h,indentStep:d,inFlow:g}=s;if(f&&u.includes("\n")||g&&/[[\]{},]/.test(u))return o(u,s);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(u))return f||g||!u.includes("\n")?o(u,s):a(e,s,i,l);if(!f&&!g&&c!==t.Scalar.PLAIN&&u.includes("\n"))return a(e,s,i,l);if(/^(%|---|\.\.\.)/m.test(u)){if(""===h)return s.forceBlockIndent=!0,a(e,s,i,l);else if(f&&h===d)return o(u,s)}let m=u.replace(/\n+/g,`$&
7
+ ${h}`);if(p){let e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(m),{compat:t,tags:r}=s.doc.schema;if(r.some(e)||t?.some(e))return o(u,s)}return f?m:r.foldFlowLines(m,h,r.FOLD_FLOW,n(s,!1))}(h,l,c,u);default:return null}},m=g(d);if(null===m){let{defaultKeyType:e,defaultStringType:t}=l.options,r=p&&e||t;if(null===(m=g(r)))throw Error(`Unsupported default string type ${r}`)}return m},rq}function rW(){if(k)return rR;k=1;var e=rS(),t=rg(),n=rB(),s=rK();return rR.createStringifyContext=function(e,t){let s,i=Object.assign({blockQuote:!0,commentString:n.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);switch(i.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new r,doc:e,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof i.indent?" ".repeat(i.indent):" ",inFlow:s,options:i}},rR.stringify=function(n,i,o,a){let l;if(t.isPair(n))return n.toString(i,o,a);if(t.isAlias(n)){if(i.doc.directives)return n.toString(i);if(i.resolvedAliases?.has(n))throw TypeError("Cannot stringify circular structure without alias nodes");i.resolvedAliases?i.resolvedAliases.add(n):i.resolvedAliases=new r([n]),n=n.resolve(i.doc)}let c=t.isNode(n)?n:i.doc.createNode(n,{onTagObj:e=>l=e});l??(l=function(e,r){let n,s;if(r.tag){let t=e.filter(e=>e.tag===r.tag);if(t.length>0)return t.find(e=>e.format===r.format)??t[0]}if(t.isScalar(r)){n=r.value;let t=e.filter(e=>e.identify?.(n));if(t.length>1){let e=t.filter(e=>e.test);e.length>0&&(t=e)}s=t.find(e=>e.format===r.format)??t.find(e=>!e.format)}else n=r,s=e.find(e=>e.nodeClass&&n instanceof e.nodeClass);if(!s){let e=n?.constructor?.name??(null===n?"null":typeof n);throw Error(`Tag not resolved for ${e} value`)}return s}(i.doc.schema.tags,c));let u=function(r,n,{anchors:s,doc:i}){if(!i.directives)return"";let o=[],a=(t.isScalar(r)||t.isCollection(r))&&r.anchor;a&&e.anchorIsValid(a)&&(s.add(a),o.push(`&${a}`));let l=r.tag??(n.default?null:n.tag);return l&&o.push(i.directives.tagString(l)),o.join(" ")}(c,l,i);u.length>0&&(i.indentAtStart=(i.indentAtStart??0)+u.length+1);let p="function"==typeof l.stringify?l.stringify(c,i,o,a):t.isScalar(c)?s.stringifyString(c,i,o,a):c.toString(i,o,a);return u?t.isScalar(c)||"{"===p[0]||"["===p[0]?`${u} ${p}`:`${u}
8
+ ${i.indent}${p}`:p},rR}var rY={},rJ={};function rG(){return S||(S=1,rJ.debug=function(e,...t){"debug"===e&&console.log(...t)},rJ.warn=function(e,t){("debug"===e||"warn"===e)&&("function"==typeof rf.emitWarning?rf.emitWarning(t):console.warn(t))}),rJ}var rH={};function rV(){if(x)return rH;x=1;var e=rg(),t=rP();let r={identify:e=>"<<"===e||"symbol"==typeof e&&"<<"===e.description,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new t.Scalar(Symbol("<<")),{addToJSMap:n}),stringify:()=>"<<"};function n(t,r,n){let o=i(t,n);if(e.isSeq(o))for(let e of o.items)s(t,r,e);else if(Array.isArray(o))for(let e of o)s(t,r,e);else s(t,r,o)}function s(t,r,n){let s=i(t,n);if(!e.isMap(s))throw Error("Merge sources must be maps or map aliases");for(let[e,n]of s.toJSON(null,t,Map))r instanceof Map?r.has(e)||r.set(e,n):r instanceof Set?r.add(e):Object.prototype.hasOwnProperty.call(r,e)||Object.defineProperty(r,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return r}function i(t,r){return t&&e.isAlias(r)?r.resolve(t.doc,t):r}return rH.addMergeToJSMap=n,rH.isMergeKey=(n,s)=>(r.identify(s)||e.isScalar(s)&&(!s.type||s.type===t.Scalar.PLAIN)&&r.identify(s.value))&&n?.doc.schema.tags.some(e=>e.tag===r.tag&&e.default),rH.merge=r,rH}function rX(){if(E)return rY;E=1;var e=rG(),t=rV(),n=rW(),s=rg(),i=rT();return rY.addPairToJSMap=function(o,a,{key:l,value:c}){if(s.isNode(l)&&l.addToJSMap)l.addToJSMap(o,a,c);else if(t.isMergeKey(o,l))t.addMergeToJSMap(o,a,c);else{let t=i.toJS(l,"",o);if(a instanceof Map)a.set(t,i.toJS(c,t,o));else if(a instanceof Set)a.add(t);else{let u=function(t,i,o){if(null===i)return"";if("object"!=typeof i)return String(i);if(s.isNode(t)&&o?.doc){let s=n.createStringifyContext(o.doc,{});for(let e of(s.anchors=new r,o.anchors.keys()))s.anchors.add(e.anchor);s.inFlow=!0,s.inStringifyKey=!0;let i=t.toString(s);if(!o.mapKeyWarned){let t=JSON.stringify(i);t.length>40&&(t=t.substring(0,36)+'..."'),e.warn(o.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${t}. Set mapAsMap: true to use object keys.`),o.mapKeyWarned=!0}return i}return JSON.stringify(i)}(l,t,o),p=i.toJS(c,u,o);u in a?Object.defineProperty(a,u,{value:p,writable:!0,enumerable:!0,configurable:!0}):a[u]=p}}return a},rY}function rQ(){if(A)return rD;A=1;var t=r$(),r=function(){if(w)return rM;w=1;var e=rg(),t=rP(),r=rW(),n=rB();return rM.stringifyPair=function({key:s,value:i},o,a,l){let c,u,p,{allNullValues:f,doc:h,indent:d,indentStep:g,options:{commentString:m,indentSeq:y,simpleKeys:b}}=o,v=e.isNode(s)&&s.comment||null;if(b){if(v)throw Error("With simple keys, key nodes cannot have comments");if(e.isCollection(s)||!e.isNode(s)&&"object"==typeof s)throw Error("With simple keys, collection cannot be used as a key value")}let k=!b&&(!s||v&&null==i&&!o.inFlow||e.isCollection(s)||(e.isScalar(s)?s.type===t.Scalar.BLOCK_FOLDED||s.type===t.Scalar.BLOCK_LITERAL:"object"==typeof s));o=Object.assign({},o,{allNullValues:!1,implicitKey:!k&&(b||!f),indent:d+g});let w=!1,S=!1,x=r.stringify(s,o,()=>w=!0,()=>S=!0);if(!k&&!o.inFlow&&x.length>1024){if(b)throw Error("With simple keys, single line scalar must not span more than 1024 characters");k=!0}if(o.inFlow){if(f||null==i)return w&&a&&a(),""===x?"?":k?`? ${x}`:x}else if(f&&!b||null==i&&k)return x=`? ${x}`,v&&!w?x+=n.lineComment(x,o.indent,m(v)):S&&l&&l(),x;w&&(v=null),k?(v&&(x+=n.lineComment(x,o.indent,m(v))),x=`? ${x}
9
+ ${d}:`):(x=`${x}:`,v&&(x+=n.lineComment(x,o.indent,m(v)))),e.isNode(i)?(c=!!i.spaceBefore,u=i.commentBefore,p=i.comment):(c=!1,u=null,p=null,i&&"object"==typeof i&&(i=h.createNode(i))),o.implicitKey=!1,!k&&!v&&e.isScalar(i)&&(o.indentAtStart=x.length+1),S=!1,!(!y&&g.length>=2&&!o.inFlow&&!k&&e.isSeq(i))||i.flow||i.tag||i.anchor||(o.indent=o.indent.substring(2));let E=!1,A=r.stringify(i,o,()=>E=!0,()=>S=!0),C=" ";if(v||c||u){if(C=c?"\n":"",u){let e=m(u);C+=`
10
10
  ${n.indentComment(e,o.indent)}`}""!==A||o.inFlow?C+=`
11
- ${o.indent}`:"\n"===C&&p&&(C="\n\n")}else if(!v&&e.isCollection(i)){let e=A[0],t=A.indexOf("\n"),r=-1!==t,n=o.inFlow??i.flow??0===i.items.length;if(r||!n){let n=!1;if(r&&("&"===e||"!"===e)){let r=A.indexOf(" ");"&"===e&&-1!==r&&r<t&&"!"===A[r+1]&&(r=A.indexOf(" ",r+1)),(-1===r||t<r)&&(n=!0)}n||(C=`
12
- ${o.indent}`)}}else(""===A||"\n"===A[0])&&(C="");return x+=C+A,o.inFlow?E&&a&&a():p&&!E?x+=n.lineComment(x,o.indent,g(p)):S&&l&&l(),x},rR}(),n=rQ(),s=rg();let i=class t{constructor(e,t=null){Object.defineProperty(this,s.NODE_TYPE,{value:s.PAIR}),this.key=e,this.value=t}clone(e){let{key:r,value:n}=this;return s.isNode(r)&&(r=r.clone(e)),s.isNode(n)&&(n=n.clone(e)),new t(r,n)}toJSON(t,r){let s=r?.mapAsMap?new e:{};return n.addPairToJSMap(r,s,this)}toString(e,t,n){return e?.doc?r.stringifyPair(this,e,t,n):JSON.stringify(this)}};return rD.Pair=i,rD.createPair=function(e,r,n){return new i(t.createNode(e,void 0,n),t.createNode(r,void 0,n))},rD}var rZ={},r0={},r1={},r2={};function r9(){if(E)return r2;E=1;var e=rg(),t=rW(),r=rB();function n({indent:e,options:{commentString:t}},s,i,o){if(i&&o&&(i=i.replace(/^\n+/,"")),i){let n=r.indentComment(t(i),e);s.push(n.trimStart())}}return r2.stringifyCollection=function(s,i,o){return(i.inFlow??s.flow?function({items:s},i,{flowChars:o,itemIndent:a}){let{indent:l,indentStep:c,flowCollectionPadding:u,options:{commentString:p}}=i,f=Object.assign({},i,{indent:a+=c,inFlow:!0,type:null}),d=!1,h=0,m=[];for(let o=0;o<s.length;++o){let l=s[o],c=null;if(e.isNode(l))l.spaceBefore&&m.push(""),n(i,m,l.commentBefore,!1),l.comment&&(c=l.comment);else if(e.isPair(l)){let t=e.isNode(l.key)?l.key:null;t&&(t.spaceBefore&&m.push(""),n(i,m,t.commentBefore,!1),t.comment&&(d=!0));let r=e.isNode(l.value)?l.value:null;r?(r.comment&&(c=r.comment),r.commentBefore&&(d=!0)):null==l.value&&t?.comment&&(c=t.comment)}c&&(d=!0);let u=t.stringify(l,f,()=>c=null);d||(d=m.length>h||u.includes("\n")),o<s.length-1?u+=",":i.options.trailingComma&&(i.options.lineWidth>0&&(d||(d=m.reduce((e,t)=>e+t.length+2,2)+(u.length+2)>i.options.lineWidth)),d&&(u+=",")),c&&(u+=r.lineComment(u,a,p(c))),m.push(u),h=m.length}let{start:g,end:y}=o;if(0===m.length)return g+y;if(!d){let e=m.reduce((e,t)=>e+t.length+2,2);d=i.options.lineWidth>0&&e>i.options.lineWidth}if(!d)return`${g}${u}${m.join(" ")}${u}${y}`;{let e=g;for(let t of m)e+=t?`
11
+ ${o.indent}`:"\n"===C&&p&&(C="\n\n")}else if(!k&&e.isCollection(i)){let e=A[0],t=A.indexOf("\n"),r=-1!==t,n=o.inFlow??i.flow??0===i.items.length;if(r||!n){let n=!1;if(r&&("&"===e||"!"===e)){let r=A.indexOf(" ");"&"===e&&-1!==r&&r<t&&"!"===A[r+1]&&(r=A.indexOf(" ",r+1)),(-1===r||t<r)&&(n=!0)}n||(C=`
12
+ ${o.indent}`)}}else(""===A||"\n"===A[0])&&(C="");return x+=C+A,o.inFlow?E&&a&&a():p&&!E?x+=n.lineComment(x,o.indent,m(p)):S&&l&&l(),x},rM}(),n=rX(),s=rg();let i=class t{constructor(e,t=null){Object.defineProperty(this,s.NODE_TYPE,{value:s.PAIR}),this.key=e,this.value=t}clone(e){let{key:r,value:n}=this;return s.isNode(r)&&(r=r.clone(e)),s.isNode(n)&&(n=n.clone(e)),new t(r,n)}toJSON(t,r){let s=r?.mapAsMap?new e:{};return n.addPairToJSMap(r,s,this)}toString(e,t,n){return e?.doc?r.stringifyPair(this,e,t,n):JSON.stringify(this)}};return rD.Pair=i,rD.createPair=function(e,r,n){return new i(t.createNode(e,void 0,n),t.createNode(r,void 0,n))},rD}var rz={},rZ={},r0={},r1={};function r2(){if(C)return r1;C=1;var e=rg(),t=rW(),r=rB();function n({indent:e,options:{commentString:t}},s,i,o){if(i&&o&&(i=i.replace(/^\n+/,"")),i){let n=r.indentComment(t(i),e);s.push(n.trimStart())}}return r1.stringifyCollection=function(s,i,o){return(i.inFlow??s.flow?function({items:s},i,{flowChars:o,itemIndent:a}){let{indent:l,indentStep:c,flowCollectionPadding:u,options:{commentString:p}}=i,f=Object.assign({},i,{indent:a+=c,inFlow:!0,type:null}),h=!1,d=0,g=[];for(let o=0;o<s.length;++o){let l=s[o],c=null;if(e.isNode(l))l.spaceBefore&&g.push(""),n(i,g,l.commentBefore,!1),l.comment&&(c=l.comment);else if(e.isPair(l)){let t=e.isNode(l.key)?l.key:null;t&&(t.spaceBefore&&g.push(""),n(i,g,t.commentBefore,!1),t.comment&&(h=!0));let r=e.isNode(l.value)?l.value:null;r?(r.comment&&(c=r.comment),r.commentBefore&&(h=!0)):null==l.value&&t?.comment&&(c=t.comment)}c&&(h=!0);let u=t.stringify(l,f,()=>c=null);h||(h=g.length>d||u.includes("\n")),o<s.length-1?u+=",":i.options.trailingComma&&(i.options.lineWidth>0&&(h||(h=g.reduce((e,t)=>e+t.length+2,2)+(u.length+2)>i.options.lineWidth)),h&&(u+=",")),c&&(u+=r.lineComment(u,a,p(c))),g.push(u),d=g.length}let{start:m,end:y}=o;if(0===g.length)return m+y;if(!h){let e=g.reduce((e,t)=>e+t.length+2,2);h=i.options.lineWidth>0&&e>i.options.lineWidth}if(!h)return`${m}${u}${g.join(" ")}${u}${y}`;{let e=m;for(let t of g)e+=t?`
13
13
  ${c}${l}${t}`:"\n";return`${e}
14
- ${l}${y}`}}:function({comment:s,items:i},o,{blockItemPrefix:a,flowChars:l,itemIndent:c,onChompKeep:u,onComment:p}){let f,{indent:d,options:{commentString:h}}=o,m=Object.assign({},o,{indent:c,type:null}),g=!1,y=[];for(let s=0;s<i.length;++s){let l=i[s],u=null;if(e.isNode(l))!g&&l.spaceBefore&&y.push(""),n(o,y,l.commentBefore,g),l.comment&&(u=l.comment);else if(e.isPair(l)){let t=e.isNode(l.key)?l.key:null;t&&(!g&&t.spaceBefore&&y.push(""),n(o,y,t.commentBefore,g))}g=!1;let p=t.stringify(l,m,()=>u=null,()=>g=!0);u&&(p+=r.lineComment(p,c,h(u))),g&&u&&(g=!1),y.push(a+p)}if(0===y.length)f=l.start+l.end;else{f=y[0];for(let e=1;e<y.length;++e){let t=y[e];f+=t?`
15
- ${d}${t}`:"\n"}}return s?(f+="\n"+r.indentComment(h(s),d),p&&p()):g&&u&&u(),f})(s,i,o)},r2}function r3(){if(A)return r1;A=1;var t=r9(),r=rQ(),n=rM(),s=rg(),i=rz(),o=rP();function a(e,t){let r=s.isScalar(t)?t.value:t;for(let n of e)if(s.isPair(n)&&(n.key===t||n.key===r||s.isScalar(n.key)&&n.key.value===r))return n}return r1.YAMLMap=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(s.MAP,e),this.items=[]}static from(e,t,r){let{keepUndefined:n,replacer:s}=r,o=new this(e),a=(e,a)=>{if("function"==typeof s)a=s.call(t,e,a);else if(Array.isArray(s)&&!s.includes(e))return;(void 0!==a||n)&&o.items.push(i.createPair(e,a,r))};if(t instanceof Map)for(let[e,r]of t)a(e,r);else if(t&&"object"==typeof t)for(let e of Object.keys(t))a(e,t[e]);return"function"==typeof e.sortMapEntries&&o.items.sort(e.sortMapEntries),o}add(e,t){let r;r=s.isPair(e)?e:e&&"object"==typeof e&&"key"in e?new i.Pair(e.key,e.value):new i.Pair(e,e?.value);let n=a(this.items,r.key),l=this.schema?.sortMapEntries;if(n){if(!t)throw Error(`Key ${r.key} already set`);s.isScalar(n.value)&&o.isScalarValue(r.value)?n.value.value=r.value:n.value=r.value}else if(l){let e=this.items.findIndex(e=>0>l(r,e));-1===e?this.items.push(r):this.items.splice(e,0,r)}else this.items.push(r)}delete(e){let t=a(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){let r=a(this.items,e),n=r?.value;return(!t&&s.isScalar(n)?n.value:n)??void 0}has(e){return!!a(this.items,e)}set(e,t){this.add(new i.Pair(e,t),!0)}toJSON(t,n,s){let i=s?new s:n?.mapAsMap?new e:{};for(let e of(n?.onCreate&&n.onCreate(i),this.items))r.addPairToJSMap(n,i,e);return i}toString(e,r,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!s.isPair(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),t.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:r})}},r1.findPair=a,r1}function r6(){if(C)return r0;C=1;var e=rg(),t=r3();return r0.map={collection:"map",default:!0,nodeClass:t.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:(t,r)=>(e.isMap(t)||r("Expected a mapping for this tag"),t),createNode:(e,r,n)=>t.YAMLMap.from(e,r,n)},r0}var r8={},r4={};function r5(){if(T)return r4;T=1;var e=rj(),t=r9(),r=rM(),n=rg(),s=rP(),i=rO();function o(e){let t=n.isScalar(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}return r4.YAMLSeq=class extends r.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(n.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=o(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){let r=o(e);if("number"!=typeof r)return;let s=this.items[r];return!t&&n.isScalar(s)?s.value:s}has(e){let t=o(e);return"number"==typeof t&&t<this.items.length}set(e,t){let r=o(e);if("number"!=typeof r)throw Error(`Expected a valid index, not ${e}.`);let i=this.items[r];n.isScalar(i)&&s.isScalarValue(t)?i.value=t:this.items[r]=t}toJSON(e,t){let r=[];t?.onCreate&&t.onCreate(r);let n=0;for(let e of this.items)r.push(i.toJS(e,String(n++),t));return r}toString(e,r,n){return e?t.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:r}):JSON.stringify(this)}static from(t,r,n){let{replacer:s}=n,i=new this(t);if(r&&Symbol.iterator in Object(r)){let t=0;for(let o of r){if("function"==typeof s){let e=r instanceof Set?o:String(t++);o=s.call(r,e,o)}i.items.push(e.createNode(o,void 0,n))}}return i}},r4}function r7(){if(O)return r8;O=1;var e=rg(),t=r5();return r8.seq={collection:"seq",default:!0,nodeClass:t.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:(t,r)=>(e.isSeq(t)||r("Expected a sequence for this tag"),t),createNode:(e,r,n)=>t.YAMLSeq.from(e,r,n)},r8}var ne={};function nt(){if(L)return ne;L=1;var e=rY();return ne.string={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(t,r,n,s)=>(r=Object.assign({actualString:!0},r),e.stringifyString(t,r,n,s))},ne}var nr={},nn={};function ns(){if(N)return nn;N=1;var e=rP();let t={identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new e.Scalar(null),stringify:({source:e},r)=>"string"==typeof e&&t.test.test(e)?e:r.options.nullStr};return nn.nullTag=t,nn}var ni={};function no(){if($)return ni;$=1;var e=rP();let t={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new e.Scalar("t"===t[0]||"T"===t[0]),stringify:({source:e,value:r},n)=>e&&t.test.test(e)&&r===("t"===e[0]||"T"===e[0])?e:r?n.options.trueStr:n.options.falseStr};return ni.boolTag=t,ni}var na={},nl={};function nc(){return _||(_=1,nl.stringifyNumber=function({format:e,minFractionDigits:t,tag:r,value:n}){if("bigint"==typeof n)return String(n);let s="number"==typeof n?n:Number(n);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let i=Object.is(n,-0)?"-0":JSON.stringify(n);if(!e&&t&&(!r||"tag:yaml.org,2002:float"===r)&&/^-?\d/.test(i)&&!i.includes("e")){let e=i.indexOf(".");e<0&&(e=i.length,i+=".");let r=t-(i.length-e-1);for(;r-- >0;)i+="0"}return i}),nl}function nu(){if(I)return na;I=1;var e=rP(),t=nc();let r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?0/0:"-"===e[0]?-1/0:1/0,stringify:t.stringifyNumber};return na.float={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let r=new e.Scalar(parseFloat(t)),n=t.indexOf(".");return -1!==n&&"0"===t[t.length-1]&&(r.minFractionDigits=t.length-n-1),r},stringify:t.stringifyNumber},na.floatExp={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let r=Number(e.value);return isFinite(r)?r.toExponential():t.stringifyNumber(e)}},na.floatNaN=r,na}var np={};function nf(){if(P)return np;P=1;var e=nc();let t=e=>"bigint"==typeof e||Number.isInteger(e),r=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function n(r,n,s){let{value:i}=r;return t(i)&&i>=0?s+i.toString(n):e.stringifyNumber(r)}return np.int={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>r(e,0,10,n),stringify:e.stringifyNumber},np.intHex={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>r(e,2,16,n),stringify:e=>n(e,16,"0x")},np.intOct={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>r(e,2,8,n),stringify:e=>n(e,8,"0o")},np}var nd={},nh={},nm={},ng=eD.g(tc);function ny(){if(D)return nm;D=1;var e=rP(),t=rY();return nm.binary={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof ng.Buffer)return ng.Buffer.from(e,"base64");if("function"!=typeof atob)return t("This environment does not support reading binary tags; either Buffer or atob is required"),e;{let t=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(t.length);for(let e=0;e<t.length;++e)r[e]=t.charCodeAt(e);return r}},stringify({comment:r,type:n,value:s},i,o,a){let l;if(!s)return"";if("function"==typeof ng.Buffer)l=s instanceof ng.Buffer?s.toString("base64"):ng.Buffer.from(s.buffer).toString("base64");else if("function"==typeof btoa){let e="";for(let t=0;t<s.length;++t)e+=String.fromCharCode(s[t]);l=btoa(e)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(n??(n=e.Scalar.BLOCK_LITERAL),n!==e.Scalar.QUOTE_DOUBLE){let t=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),r=Math.ceil(l.length/t),s=Array(r);for(let e=0,n=0;e<r;++e,n+=t)s[e]=l.substr(n,t);l=s.join(n===e.Scalar.BLOCK_LITERAL?"\n":" ")}return t.stringifyString({comment:r,type:n,value:l},i,o,a)}},nm}var nb={},nk={};function nv(){if(R)return nk;R=1;var e=rg(),t=rz(),r=rP(),n=r5();function s(n,s){if(e.isSeq(n))for(let i=0;i<n.items.length;++i){let o=n.items[i];if(!e.isPair(o)){if(e.isMap(o)){o.items.length>1&&s("Each pair must have its own sequence indicator");let e=o.items[0]||new t.Pair(new r.Scalar(null));if(o.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${o.commentBefore}
14
+ ${l}${y}`}}:function({comment:s,items:i},o,{blockItemPrefix:a,flowChars:l,itemIndent:c,onChompKeep:u,onComment:p}){let f,{indent:h,options:{commentString:d}}=o,g=Object.assign({},o,{indent:c,type:null}),m=!1,y=[];for(let s=0;s<i.length;++s){let l=i[s],u=null;if(e.isNode(l))!m&&l.spaceBefore&&y.push(""),n(o,y,l.commentBefore,m),l.comment&&(u=l.comment);else if(e.isPair(l)){let t=e.isNode(l.key)?l.key:null;t&&(!m&&t.spaceBefore&&y.push(""),n(o,y,t.commentBefore,m))}m=!1;let p=t.stringify(l,g,()=>u=null,()=>m=!0);u&&(p+=r.lineComment(p,c,d(u))),m&&u&&(m=!1),y.push(a+p)}if(0===y.length)f=l.start+l.end;else{f=y[0];for(let e=1;e<y.length;++e){let t=y[e];f+=t?`
15
+ ${h}${t}`:"\n"}}return s?(f+="\n"+r.indentComment(d(s),h),p&&p()):m&&u&&u(),f})(s,i,o)},r1}function r3(){if(T)return r0;T=1;var t=r2(),r=rX(),n=rj(),s=rg(),i=rQ(),o=rP();function a(e,t){let r=s.isScalar(t)?t.value:t;for(let n of e)if(s.isPair(n)&&(n.key===t||n.key===r||s.isScalar(n.key)&&n.key.value===r))return n}return r0.YAMLMap=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(s.MAP,e),this.items=[]}static from(e,t,r){let{keepUndefined:n,replacer:s}=r,o=new this(e),a=(e,a)=>{if("function"==typeof s)a=s.call(t,e,a);else if(Array.isArray(s)&&!s.includes(e))return;(void 0!==a||n)&&o.items.push(i.createPair(e,a,r))};if(t instanceof Map)for(let[e,r]of t)a(e,r);else if(t&&"object"==typeof t)for(let e of Object.keys(t))a(e,t[e]);return"function"==typeof e.sortMapEntries&&o.items.sort(e.sortMapEntries),o}add(e,t){let r;r=s.isPair(e)?e:e&&"object"==typeof e&&"key"in e?new i.Pair(e.key,e.value):new i.Pair(e,e?.value);let n=a(this.items,r.key),l=this.schema?.sortMapEntries;if(n){if(!t)throw Error(`Key ${r.key} already set`);s.isScalar(n.value)&&o.isScalarValue(r.value)?n.value.value=r.value:n.value=r.value}else if(l){let e=this.items.findIndex(e=>0>l(r,e));-1===e?this.items.push(r):this.items.splice(e,0,r)}else this.items.push(r)}delete(e){let t=a(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){let r=a(this.items,e),n=r?.value;return(!t&&s.isScalar(n)?n.value:n)??void 0}has(e){return!!a(this.items,e)}set(e,t){this.add(new i.Pair(e,t),!0)}toJSON(t,n,s){let i=s?new s:n?.mapAsMap?new e:{};for(let e of(n?.onCreate&&n.onCreate(i),this.items))r.addPairToJSMap(n,i,e);return i}toString(e,r,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!s.isPair(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),t.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:r})}},r0.findPair=a,r0}function r9(){if(O)return rZ;O=1;var e=rg(),t=r3();return rZ.map={collection:"map",default:!0,nodeClass:t.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:(t,r)=>(e.isMap(t)||r("Expected a mapping for this tag"),t),createNode:(e,r,n)=>t.YAMLMap.from(e,r,n)},rZ}var r6={},r4={};function r8(){if(N)return r4;N=1;var e=r$(),t=r2(),r=rj(),n=rg(),s=rP(),i=rT();function o(e){let t=n.isScalar(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}return r4.YAMLSeq=class extends r.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(n.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=o(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){let r=o(e);if("number"!=typeof r)return;let s=this.items[r];return!t&&n.isScalar(s)?s.value:s}has(e){let t=o(e);return"number"==typeof t&&t<this.items.length}set(e,t){let r=o(e);if("number"!=typeof r)throw Error(`Expected a valid index, not ${e}.`);let i=this.items[r];n.isScalar(i)&&s.isScalarValue(t)?i.value=t:this.items[r]=t}toJSON(e,t){let r=[];t?.onCreate&&t.onCreate(r);let n=0;for(let e of this.items)r.push(i.toJS(e,String(n++),t));return r}toString(e,r,n){return e?t.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:r}):JSON.stringify(this)}static from(t,r,n){let{replacer:s}=n,i=new this(t);if(r&&Symbol.iterator in Object(r)){let t=0;for(let o of r){if("function"==typeof s){let e=r instanceof Set?o:String(t++);o=s.call(r,e,o)}i.items.push(e.createNode(o,void 0,n))}}return i}},r4}function r5(){if(L)return r6;L=1;var e=rg(),t=r8();return r6.seq={collection:"seq",default:!0,nodeClass:t.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:(t,r)=>(e.isSeq(t)||r("Expected a sequence for this tag"),t),createNode:(e,r,n)=>t.YAMLSeq.from(e,r,n)},r6}var r7={};function ne(){if(_)return r7;_=1;var e=rK();return r7.string={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(t,r,n,s)=>(r=Object.assign({actualString:!0},r),e.stringifyString(t,r,n,s))},r7}var nt={},nr={};function nn(){if(I)return nr;I=1;var e=rP();let t={identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new e.Scalar(null),stringify:({source:e},r)=>"string"==typeof e&&t.test.test(e)?e:r.options.nullStr};return nr.nullTag=t,nr}var ns={};function ni(){if(P)return ns;P=1;var e=rP();let t={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new e.Scalar("t"===t[0]||"T"===t[0]),stringify:({source:e,value:r},n)=>e&&t.test.test(e)&&r===("t"===e[0]||"T"===e[0])?e:r?n.options.trueStr:n.options.falseStr};return ns.boolTag=t,ns}var no={},na={};function nl(){return $||($=1,na.stringifyNumber=function({format:e,minFractionDigits:t,tag:r,value:n}){if("bigint"==typeof n)return String(n);let s="number"==typeof n?n:Number(n);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let i=Object.is(n,-0)?"-0":JSON.stringify(n);if(!e&&t&&(!r||"tag:yaml.org,2002:float"===r)&&/^-?\d/.test(i)&&!i.includes("e")){let e=i.indexOf(".");e<0&&(e=i.length,i+=".");let r=t-(i.length-e-1);for(;r-- >0;)i+="0"}return i}),na}function nc(){if(j)return no;j=1;var e=rP(),t=nl();let r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?0/0:"-"===e[0]?-1/0:1/0,stringify:t.stringifyNumber};return no.float={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let r=new e.Scalar(parseFloat(t)),n=t.indexOf(".");return -1!==n&&"0"===t[t.length-1]&&(r.minFractionDigits=t.length-n-1),r},stringify:t.stringifyNumber},no.floatExp={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let r=Number(e.value);return isFinite(r)?r.toExponential():t.stringifyNumber(e)}},no.floatNaN=r,no}var nu={};function np(){if(D)return nu;D=1;var e=nl();let t=e=>"bigint"==typeof e||Number.isInteger(e),r=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function n(r,n,s){let{value:i}=r;return t(i)&&i>=0?s+i.toString(n):e.stringifyNumber(r)}return nu.int={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>r(e,0,10,n),stringify:e.stringifyNumber},nu.intHex={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>r(e,2,16,n),stringify:e=>n(e,16,"0x")},nu.intOct={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>r(e,2,8,n),stringify:e=>n(e,8,"0o")},nu}var nf={},nh={},nd={},ng=eF.g(tf);function nm(){if(F)return nd;F=1;var e=rP(),t=rK();return nd.binary={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof ng.Buffer)return ng.Buffer.from(e,"base64");if("function"!=typeof atob)return t("This environment does not support reading binary tags; either Buffer or atob is required"),e;{let t=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(t.length);for(let e=0;e<t.length;++e)r[e]=t.charCodeAt(e);return r}},stringify({comment:r,type:n,value:s},i,o,a){let l;if(!s)return"";if("function"==typeof ng.Buffer)l=s instanceof ng.Buffer?s.toString("base64"):ng.Buffer.from(s.buffer).toString("base64");else if("function"==typeof btoa){let e="";for(let t=0;t<s.length;++t)e+=String.fromCharCode(s[t]);l=btoa(e)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(n??(n=e.Scalar.BLOCK_LITERAL),n!==e.Scalar.QUOTE_DOUBLE){let t=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),r=Math.ceil(l.length/t),s=Array(r);for(let e=0,n=0;e<r;++e,n+=t)s[e]=l.substr(n,t);l=s.join(n===e.Scalar.BLOCK_LITERAL?"\n":" ")}return t.stringifyString({comment:r,type:n,value:l},i,o,a)}},nd}var ny={},nb={};function nv(){if(B)return nb;B=1;var e=rg(),t=rQ(),r=rP(),n=r8();function s(n,s){if(e.isSeq(n))for(let i=0;i<n.items.length;++i){let o=n.items[i];if(!e.isPair(o)){if(e.isMap(o)){o.items.length>1&&s("Each pair must have its own sequence indicator");let e=o.items[0]||new t.Pair(new r.Scalar(null));if(o.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${o.commentBefore}
16
16
  ${e.key.commentBefore}`:o.commentBefore),o.comment){let t=e.value??e.key;t.comment=t.comment?`${o.comment}
17
- ${t.comment}`:o.comment}o=e}n.items[i]=e.isPair(o)?o:new t.Pair(o)}}else s("Expected a sequence for this tag");return n}function i(e,r,s){let{replacer:i}=s,o=new n.YAMLSeq(e);o.tag="tag:yaml.org,2002:pairs";let a=0;if(r&&Symbol.iterator in Object(r))for(let e of r){let n,l;if("function"==typeof i&&(e=i.call(r,String(a++),e)),Array.isArray(e))if(2===e.length)n=e[0],l=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`);else if(e&&e instanceof Object){let t=Object.keys(e);if(1===t.length)l=e[n=t[0]];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else n=e;o.items.push(t.createPair(n,l,s))}return o}return nk.createPairs=i,nk.pairs={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:s,createNode:i},nk.resolvePairs=s,nk}function nw(){if(F)return nb;F=1;var t=rg(),r=rO(),n=r3(),s=r5(),i=nv();class o extends s.YAMLSeq{constructor(){super(),this.add=n.YAMLMap.prototype.add.bind(this),this.delete=n.YAMLMap.prototype.delete.bind(this),this.get=n.YAMLMap.prototype.get.bind(this),this.has=n.YAMLMap.prototype.has.bind(this),this.set=n.YAMLMap.prototype.set.bind(this),this.tag=o.tag}toJSON(n,s){if(!s)return super.toJSON(n);let i=new e;for(let e of(s?.onCreate&&s.onCreate(i),this.items)){let n,o;if(t.isPair(e)?(n=r.toJS(e.key,"",s),o=r.toJS(e.value,n,s)):n=r.toJS(e,"",s),i.has(n))throw Error("Ordered maps must not include duplicate keys");i.set(n,o)}return i}static from(e,t,r){let n=i.createPairs(e,t,r),s=new this;return s.items=n.items,s}}return o.tag="tag:yaml.org,2002:omap",nb.YAMLOMap=o,nb.omap={collection:"seq",identify:e=>e instanceof Map,nodeClass:o,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,r){let n=i.resolvePairs(e,r),s=[];for(let{key:e}of n.items)t.isScalar(e)&&(s.includes(e.value)?r(`Ordered maps must not include duplicate keys: ${e.value}`):s.push(e.value));return Object.assign(new o,n)},createNode:(e,t,r)=>o.from(e,t,r)},nb}var nS={},nx={},nE={},nA={},nC={};function nT(){if(K)return nC;K=1;var e=rg(),t=rz(),r=r3();class n extends r.YAMLMap{constructor(e){super(e),this.tag=n.tag}add(n){let s;s=e.isPair(n)?n:n&&"object"==typeof n&&"key"in n&&"value"in n&&null===n.value?new t.Pair(n.key,null):new t.Pair(n,null),r.findPair(this.items,s.key)||this.items.push(s)}get(t,n){let s=r.findPair(this.items,t);return!n&&e.isPair(s)?e.isScalar(s.key)?s.key.value:s.key:s}set(e,n){if("boolean"!=typeof n)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let s=r.findPair(this.items,e);s&&!n?this.items.splice(this.items.indexOf(s),1):!s&&n&&this.items.push(new t.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);throw Error("Set items must all have null values")}static from(e,r,n){let{replacer:s}=n,i=new this(e);if(r&&Symbol.iterator in Object(r))for(let e of r)"function"==typeof s&&(e=s.call(r,e,e)),i.items.push(t.createPair(e,null,n));return i}}return n.tag="tag:yaml.org,2002:set",nC.YAMLSet=n,nC.set={collection:"map",identify:e=>e instanceof Set,nodeClass:n,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>n.from(e,t,r),resolve(t,r){if(e.isMap(t))if(t.hasAllNullValues(!0))return Object.assign(new n,t);else r("Set items must all have null values");else r("Expected a mapping for this tag");return t}},nC}var nO={};function nL(){if(Y)return nO;Y=1;var e=nc();function t(e,t){let r=e[0],n="-"===r||"+"===r?e.substring(1):e,s=e=>t?BigInt(e):Number(e),i=n.replace(/_/g,"").split(":").reduce((e,t)=>e*s(60)+s(t),s(0));return"-"===r?s(-1)*i:i}function r(t){let{value:r}=t,n=e=>e;if("bigint"==typeof r)n=e=>BigInt(e);else if(isNaN(r)||!isFinite(r))return e.stringifyNumber(t);let s="";r<0&&(s="-",r*=n(-1));let i=n(60),o=[r%i];return r<60?o.unshift(0):(r=(r-o[0])/i,o.unshift(r%i),r>=60&&(r=(r-o[0])/i,o.unshift(r))),s+o.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}let n={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let r=e.match(n.test);if(!r)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,s,i,o,a,l,c]=r.map(Number),u=Date.UTC(s,i-1,o,a||0,l||0,c||0,r[7]?Number((r[7]+"00").substr(1,3)):0),p=r[8];if(p&&"Z"!==p){let e=t(p,!1);30>Math.abs(e)&&(e*=60),u-=6e4*e}return new Date(u)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};return nO.floatTime={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>t(e,!1),stringify:r},nO.intTime={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,r,{intAsBigInt:n})=>t(e,n),stringify:r},nO.timestamp=n,nO}function nN(){if(H)return rZ;H=1;var t=rg(),r=r6(),n=r7(),s=nt(),i=function(){if(J)return nr;J=1;var t=r6(),r=ns(),n=r7(),s=nt(),i=no(),o=nu(),a=nf(),l=function(){if(j)return nd;j=1;var e=r6(),t=ns(),r=r7(),n=nt(),s=no(),i=nu(),o=nf();return nd.schema=[e.map,r.seq,n.string,t.nullTag,s.boolTag,o.intOct,o.int,o.intHex,i.floatNaN,i.floatExp,i.float],nd}(),c=function(){if(M)return nh;M=1;var e=rP(),t=r6(),r=r7();function n(e){return"bigint"==typeof e||Number.isInteger(e)}let s=({value:e})=>JSON.stringify(e),i=[{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:s},{identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:s},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:s},{identify:n,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>n(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:s}];return nh.schema=[t.map,r.seq].concat(i,{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)}),nh}(),u=ny(),p=rX(),f=nw(),d=nv(),h=function(){if(W)return nS;W=1;var e=r6(),t=ns(),r=r7(),n=nt(),s=ny(),i=function(){if(q)return nx;q=1;var e=rP();function t({value:e,source:s},i){let o=e?r:n;return s&&o.test.test(s)?s:e?i.options.trueStr:i.options.falseStr}let r={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new e.Scalar(!0),stringify:t},n={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new e.Scalar(!1),stringify:t};return nx.falseTag=n,nx.trueTag=r,nx}(),o=function(){if(B)return nE;B=1;var e=rP(),t=nc();let r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?0/0:"-"===e[0]?-1/0:1/0,stringify:t.stringifyNumber};return nE.float={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let r=new e.Scalar(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(-1!==n){let e=t.substring(n+1).replace(/_/g,"");"0"===e[e.length-1]&&(r.minFractionDigits=e.length)}return r},stringify:t.stringifyNumber},nE.floatExp={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let r=Number(e.value);return isFinite(r)?r.toExponential():t.stringifyNumber(e)}},nE.floatNaN=r,nE}(),a=function(){if(U)return nA;U=1;var e=nc();let t=e=>"bigint"==typeof e||Number.isInteger(e);function r(e,t,n,{intAsBigInt:s}){let i=e[0];if(("-"===i||"+"===i)&&(t+=1),e=e.substring(t).replace(/_/g,""),s){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return"-"===i?BigInt(-1)*t:t}let o=parseInt(e,n);return"-"===i?-1*o:o}function n(r,n,s){let{value:i}=r;if(t(i)){let e=i.toString(n);return i<0?"-"+s+e.substr(1):s+e}return e.stringifyNumber(r)}return nA.int={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>r(e,0,10,n),stringify:e.stringifyNumber},nA.intBin={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>r(e,2,2,n),stringify:e=>n(e,2,"0b")},nA.intHex={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>r(e,2,16,n),stringify:e=>n(e,16,"0x")},nA.intOct={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>r(e,1,8,n),stringify:e=>n(e,8,"0")},nA}(),l=rX(),c=nw(),u=nv(),p=nT(),f=nL();return nS.schema=[e.map,r.seq,n.string,t.nullTag,i.trueTag,i.falseTag,a.intBin,a.intOct,a.int,a.intHex,o.floatNaN,o.floatExp,o.float,s.binary,l.merge,c.omap,u.pairs,p.set,f.intTime,f.floatTime,f.timestamp],nS}(),m=nT(),g=nL();let y=new e([["core",l.schema],["failsafe",[t.map,n.seq,s.string]],["json",c.schema],["yaml11",h.schema],["yaml-1.1",h.schema]]),b={binary:u.binary,bool:i.boolTag,float:o.float,floatExp:o.floatExp,floatNaN:o.floatNaN,floatTime:g.floatTime,int:a.int,intHex:a.intHex,intOct:a.intOct,intTime:g.intTime,map:t.map,merge:p.merge,null:r.nullTag,omap:f.omap,pairs:d.pairs,seq:n.seq,set:m.set,timestamp:g.timestamp};return nr.coreKnownTags={"tag:yaml.org,2002:binary":u.binary,"tag:yaml.org,2002:merge":p.merge,"tag:yaml.org,2002:omap":f.omap,"tag:yaml.org,2002:pairs":d.pairs,"tag:yaml.org,2002:set":m.set,"tag:yaml.org,2002:timestamp":g.timestamp},nr.getTags=function(e,t,r){let n=y.get(t);if(n&&!e)return r&&!n.includes(p.merge)?n.concat(p.merge):n.slice();let s=n;if(!s)if(Array.isArray(e))s=[];else{let e=Array.from(y.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}if(Array.isArray(e))for(let t of e)s=s.concat(t);else"function"==typeof e&&(s=e(s.slice()));return r&&(s=s.concat(p.merge)),s.reduce((e,t)=>{let r="string"==typeof t?b[t]:t;if(!r){let e=JSON.stringify(t),r=Object.keys(b).map(e=>JSON.stringify(e)).join(", ");throw Error(`Unknown custom tag ${e}; use one of ${r}`)}return e.includes(r)||e.push(r),e},[])},nr}();let o=(e,t)=>e.key<t.key?-1:+(e.key>t.key);return rZ.Schema=class e{constructor({compat:e,customTags:a,merge:l,resolveKnownTags:c,schema:u,sortMapEntries:p,toStringDefaults:f}){this.compat=Array.isArray(e)?i.getTags(e,"compat"):e?i.getTags(null,e):null,this.name="string"==typeof u&&u||"core",this.knownTags=c?i.coreKnownTags:{},this.tags=i.getTags(a,this.name,l),this.toStringOptions=f??null,Object.defineProperty(this,t.MAP,{value:r.map}),Object.defineProperty(this,t.SCALAR,{value:s.string}),Object.defineProperty(this,t.SEQ,{value:n.seq}),this.sortMapEntries="function"==typeof p?p:!0===p?o:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}},rZ}var n$={};function n_(){if(V)return rv;V=1;var t=rN(),r=rM(),n=rg(),s=rz(),i=rO(),o=nN(),a=function(){if(G)return n$;G=1;var e=rg(),t=rW(),r=rB();return n$.stringifyDocument=function(n,s){let i=[],o=!0===s.directives;if(!1!==s.directives&&n.directives){let e=n.directives.toString(n);e?(i.push(e),o=!0):n.directives.docStart&&(o=!0)}o&&i.push("---");let a=t.createStringifyContext(n,s),{commentString:l}=a.options;if(n.commentBefore){1!==i.length&&i.unshift("");let e=l(n.commentBefore);i.unshift(r.indentComment(e,""))}let c=!1,u=null;if(n.contents){if(e.isNode(n.contents)){if(n.contents.spaceBefore&&o&&i.push(""),n.contents.commentBefore){let e=l(n.contents.commentBefore);i.push(r.indentComment(e,""))}a.forceBlockIndent=!!n.comment,u=n.contents.comment}let s=u?void 0:()=>c=!0,p=t.stringify(n.contents,a,()=>u=null,s);u&&(p+=r.lineComment(p,"",l(u))),("|"===p[0]||">"===p[0])&&"---"===i[i.length-1]?i[i.length-1]=`--- ${p}`:i.push(p)}else i.push(t.stringify(n.contents,a));if(n.directives?.docEnd)if(n.comment){let e=l(n.comment);e.includes("\n")?(i.push("..."),i.push(r.indentComment(e,""))):i.push(`... ${e}`)}else i.push("...");else{let e=n.comment;e&&c&&(e=e.replace(/^\n+/,"")),e&&((!c||u)&&""!==i[i.length-1]&&i.push(""),i.push(r.indentComment(l(e),"")))}return i.join("\n")+"\n"},n$}(),l=rx(),c=rC(),u=rj(),p=rk();function f(e){if(n.isCollection(e))return!0;throw Error("Expected a YAML collection as document contents")}return rv.Document=class d{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,n.NODE_TYPE,{value:n.DOC});let s=null;"function"==typeof t||Array.isArray(t)?s=t:void 0===r&&t&&(r=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=i;let{version:o}=i;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new p.Directives({version:o}),this.setSchema(o,r),this.contents=void 0===e?null:this.createNode(e,s,r)}clone(){let e=Object.create(d.prototype,{[n.NODE_TYPE]:{value:n.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=n.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){f(this.contents)&&this.contents.add(e)}addIn(e,t){f(this.contents)&&this.contents.addIn(e,t)}createAlias(e,r){if(!e.anchor){let t=l.anchorNames(this);e.anchor=!r||t.has(r)?l.findNewAnchor(r||"a",t):r}return new t.Alias(e.anchor)}createNode(e,t,r){let s;if("function"==typeof t)e=t.call({"":e},"",e),s=t;else if(Array.isArray(t)){let e=t.filter(e=>"number"==typeof e||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),s=t}else void 0===r&&t&&(r=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:o,flow:a,keepUndefined:c,onTagObj:p,tag:f}=r??{},{onAnchor:d,setAnchors:h,sourceObjects:m}=l.createNodeAnchors(this,o||"a"),g={aliasDuplicateObjects:i??!0,keepUndefined:c??!1,onAnchor:d,onTagObj:p,replacer:s,schema:this.schema,sourceObjects:m},y=u.createNode(e,f,g);return a&&n.isCollection(y)&&(y.flow=!0),h(),y}createPair(e,t,r={}){let n=this.createNode(e,null,r),i=this.createNode(t,null,r);return new s.Pair(n,i)}delete(e){return!!f(this.contents)&&this.contents.delete(e)}deleteIn(e){return r.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):!!f(this.contents)&&this.contents.deleteIn(e)}get(e,t){return n.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return r.isEmptyPath(e)?!t&&n.isScalar(this.contents)?this.contents.value:this.contents:n.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!n.isCollection(this.contents)&&this.contents.has(e)}hasIn(e){return r.isEmptyPath(e)?void 0!==this.contents:!!n.isCollection(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=r.collectionFromPath(this.schema,[e],t):f(this.contents)&&this.contents.set(e,t)}setIn(e,t){r.isEmptyPath(e)?this.contents=t:null==this.contents?this.contents=r.collectionFromPath(this.schema,Array.from(e),t):f(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let r;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new p.Directives({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new p.Directives({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(r)this.schema=new o.Schema(Object.assign(r,t));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:r,mapAsMap:n,maxAliasCount:s,onAnchor:o,reviver:a}={}){let l={anchors:new e,doc:this,keep:!t,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof s?s:100},u=i.toJS(this.contents,r??"",l);if("function"==typeof o)for(let{count:e,res:t}of l.anchors.values())o(t,e);return"function"==typeof a?c.applyReviver(a,{"":u},"",u):u}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||0>=Number(e.indent))){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return a.stringifyDocument(this,e)}},rv}var nI={};function nP(){if(X)return nI;X=1;class e extends Error{constructor(e,t,r,n){super(),this.name=e,this.code=r,this.message=n,this.pos=t}}return nI.YAMLError=e,nI.YAMLParseError=class extends e{constructor(e,t,r){super("YAMLParseError",e,t,r)}},nI.YAMLWarning=class extends e{constructor(e,t,r){super("YAMLWarning",e,t,r)}},nI.prettifyError=(e,t)=>r=>{if(-1===r.pos[0])return;r.linePos=r.pos.map(e=>t.linePos(e));let{line:n,col:s}=r.linePos[0];r.message+=` at line ${n}, column ${s}`;let i=s-1,o=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){let e=Math.min(i-39,o.length-79);o="…"+o.substring(e),i-=e-1}if(o.length>80&&(o=o.substring(0,79)+"…"),n>1&&/^ *$/.test(o.substring(0,i))){let r=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);r.length>80&&(r=r.substring(0,79)+"…\n"),o=r+o}if(/[^ ]/.test(o)){let e=1,t=r.linePos[1];t?.line===n&&t.col>s&&(e=Math.max(1,Math.min(t.col-s,80-i)));let a=" ".repeat(i)+"^".repeat(e);r.message+=`:
17
+ ${t.comment}`:o.comment}o=e}n.items[i]=e.isPair(o)?o:new t.Pair(o)}}else s("Expected a sequence for this tag");return n}function i(e,r,s){let{replacer:i}=s,o=new n.YAMLSeq(e);o.tag="tag:yaml.org,2002:pairs";let a=0;if(r&&Symbol.iterator in Object(r))for(let e of r){let n,l;if("function"==typeof i&&(e=i.call(r,String(a++),e)),Array.isArray(e))if(2===e.length)n=e[0],l=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`);else if(e&&e instanceof Object){let t=Object.keys(e);if(1===t.length)l=e[n=t[0]];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else n=e;o.items.push(t.createPair(n,l,s))}return o}return nb.createPairs=i,nb.pairs={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:s,createNode:i},nb.resolvePairs=s,nb}function nk(){if(q)return ny;q=1;var t=rg(),r=rT(),n=r3(),s=r8(),i=nv();class o extends s.YAMLSeq{constructor(){super(),this.add=n.YAMLMap.prototype.add.bind(this),this.delete=n.YAMLMap.prototype.delete.bind(this),this.get=n.YAMLMap.prototype.get.bind(this),this.has=n.YAMLMap.prototype.has.bind(this),this.set=n.YAMLMap.prototype.set.bind(this),this.tag=o.tag}toJSON(n,s){if(!s)return super.toJSON(n);let i=new e;for(let e of(s?.onCreate&&s.onCreate(i),this.items)){let n,o;if(t.isPair(e)?(n=r.toJS(e.key,"",s),o=r.toJS(e.value,n,s)):n=r.toJS(e,"",s),i.has(n))throw Error("Ordered maps must not include duplicate keys");i.set(n,o)}return i}static from(e,t,r){let n=i.createPairs(e,t,r),s=new this;return s.items=n.items,s}}return o.tag="tag:yaml.org,2002:omap",ny.YAMLOMap=o,ny.omap={collection:"seq",identify:e=>e instanceof Map,nodeClass:o,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,r){let n=i.resolvePairs(e,r),s=[];for(let{key:e}of n.items)t.isScalar(e)&&(s.includes(e.value)?r(`Ordered maps must not include duplicate keys: ${e.value}`):s.push(e.value));return Object.assign(new o,n)},createNode:(e,t,r)=>o.from(e,t,r)},ny}var nw={},nS={},nx={},nE={},nA={};function nC(){if(Y)return nA;Y=1;var e=rg(),t=rQ(),r=r3();class n extends r.YAMLMap{constructor(e){super(e),this.tag=n.tag}add(n){let s;s=e.isPair(n)?n:n&&"object"==typeof n&&"key"in n&&"value"in n&&null===n.value?new t.Pair(n.key,null):new t.Pair(n,null),r.findPair(this.items,s.key)||this.items.push(s)}get(t,n){let s=r.findPair(this.items,t);return!n&&e.isPair(s)?e.isScalar(s.key)?s.key.value:s.key:s}set(e,n){if("boolean"!=typeof n)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let s=r.findPair(this.items,e);s&&!n?this.items.splice(this.items.indexOf(s),1):!s&&n&&this.items.push(new t.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);throw Error("Set items must all have null values")}static from(e,r,n){let{replacer:s}=n,i=new this(e);if(r&&Symbol.iterator in Object(r))for(let e of r)"function"==typeof s&&(e=s.call(r,e,e)),i.items.push(t.createPair(e,null,n));return i}}return n.tag="tag:yaml.org,2002:set",nA.YAMLSet=n,nA.set={collection:"map",identify:e=>e instanceof Set,nodeClass:n,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>n.from(e,t,r),resolve(t,r){if(e.isMap(t))if(t.hasAllNullValues(!0))return Object.assign(new n,t);else r("Set items must all have null values");else r("Expected a mapping for this tag");return t}},nA}var nT={};function nO(){if(J)return nT;J=1;var e=nl();function t(e,t){let r=e[0],n="-"===r||"+"===r?e.substring(1):e,s=e=>t?BigInt(e):Number(e),i=n.replace(/_/g,"").split(":").reduce((e,t)=>e*s(60)+s(t),s(0));return"-"===r?s(-1)*i:i}function r(t){let{value:r}=t,n=e=>e;if("bigint"==typeof r)n=e=>BigInt(e);else if(isNaN(r)||!isFinite(r))return e.stringifyNumber(t);let s="";r<0&&(s="-",r*=n(-1));let i=n(60),o=[r%i];return r<60?o.unshift(0):(r=(r-o[0])/i,o.unshift(r%i),r>=60&&(r=(r-o[0])/i,o.unshift(r))),s+o.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}let n={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let r=e.match(n.test);if(!r)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,s,i,o,a,l,c]=r.map(Number),u=Date.UTC(s,i-1,o,a||0,l||0,c||0,r[7]?Number((r[7]+"00").substr(1,3)):0),p=r[8];if(p&&"Z"!==p){let e=t(p,!1);30>Math.abs(e)&&(e*=60),u-=6e4*e}return new Date(u)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};return nT.floatTime={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>t(e,!1),stringify:r},nT.intTime={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,r,{intAsBigInt:n})=>t(e,n),stringify:r},nT.timestamp=n,nT}function nN(){if(V)return rz;V=1;var t=rg(),r=r9(),n=r5(),s=ne(),i=function(){if(H)return nt;H=1;var t=r9(),r=nn(),n=r5(),s=ne(),i=ni(),o=nc(),a=np(),l=function(){if(M)return nf;M=1;var e=r9(),t=nn(),r=r5(),n=ne(),s=ni(),i=nc(),o=np();return nf.schema=[e.map,r.seq,n.string,t.nullTag,s.boolTag,o.intOct,o.int,o.intHex,i.floatNaN,i.floatExp,i.float],nf}(),c=function(){if(R)return nh;R=1;var e=rP(),t=r9(),r=r5();function n(e){return"bigint"==typeof e||Number.isInteger(e)}let s=({value:e})=>JSON.stringify(e),i=[{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:s},{identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:s},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:s},{identify:n,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>n(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:s}];return nh.schema=[t.map,r.seq].concat(i,{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)}),nh}(),u=nm(),p=rV(),f=nk(),h=nv(),d=function(){if(G)return nw;G=1;var e=r9(),t=nn(),r=r5(),n=ne(),s=nm(),i=function(){if(U)return nS;U=1;var e=rP();function t({value:e,source:s},i){let o=e?r:n;return s&&o.test.test(s)?s:e?i.options.trueStr:i.options.falseStr}let r={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new e.Scalar(!0),stringify:t},n={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new e.Scalar(!1),stringify:t};return nS.falseTag=n,nS.trueTag=r,nS}(),o=function(){if(K)return nx;K=1;var e=rP(),t=nl();let r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?0/0:"-"===e[0]?-1/0:1/0,stringify:t.stringifyNumber};return nx.float={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let r=new e.Scalar(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(-1!==n){let e=t.substring(n+1).replace(/_/g,"");"0"===e[e.length-1]&&(r.minFractionDigits=e.length)}return r},stringify:t.stringifyNumber},nx.floatExp={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let r=Number(e.value);return isFinite(r)?r.toExponential():t.stringifyNumber(e)}},nx.floatNaN=r,nx}(),a=function(){if(W)return nE;W=1;var e=nl();let t=e=>"bigint"==typeof e||Number.isInteger(e);function r(e,t,n,{intAsBigInt:s}){let i=e[0];if(("-"===i||"+"===i)&&(t+=1),e=e.substring(t).replace(/_/g,""),s){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return"-"===i?BigInt(-1)*t:t}let o=parseInt(e,n);return"-"===i?-1*o:o}function n(r,n,s){let{value:i}=r;if(t(i)){let e=i.toString(n);return i<0?"-"+s+e.substr(1):s+e}return e.stringifyNumber(r)}return nE.int={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>r(e,0,10,n),stringify:e.stringifyNumber},nE.intBin={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>r(e,2,2,n),stringify:e=>n(e,2,"0b")},nE.intHex={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>r(e,2,16,n),stringify:e=>n(e,16,"0x")},nE.intOct={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>r(e,1,8,n),stringify:e=>n(e,8,"0")},nE}(),l=rV(),c=nk(),u=nv(),p=nC(),f=nO();return nw.schema=[e.map,r.seq,n.string,t.nullTag,i.trueTag,i.falseTag,a.intBin,a.intOct,a.int,a.intHex,o.floatNaN,o.floatExp,o.float,s.binary,l.merge,c.omap,u.pairs,p.set,f.intTime,f.floatTime,f.timestamp],nw}(),g=nC(),m=nO();let y=new e([["core",l.schema],["failsafe",[t.map,n.seq,s.string]],["json",c.schema],["yaml11",d.schema],["yaml-1.1",d.schema]]),b={binary:u.binary,bool:i.boolTag,float:o.float,floatExp:o.floatExp,floatNaN:o.floatNaN,floatTime:m.floatTime,int:a.int,intHex:a.intHex,intOct:a.intOct,intTime:m.intTime,map:t.map,merge:p.merge,null:r.nullTag,omap:f.omap,pairs:h.pairs,seq:n.seq,set:g.set,timestamp:m.timestamp};return nt.coreKnownTags={"tag:yaml.org,2002:binary":u.binary,"tag:yaml.org,2002:merge":p.merge,"tag:yaml.org,2002:omap":f.omap,"tag:yaml.org,2002:pairs":h.pairs,"tag:yaml.org,2002:set":g.set,"tag:yaml.org,2002:timestamp":m.timestamp},nt.getTags=function(e,t,r){let n=y.get(t);if(n&&!e)return r&&!n.includes(p.merge)?n.concat(p.merge):n.slice();let s=n;if(!s)if(Array.isArray(e))s=[];else{let e=Array.from(y.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}if(Array.isArray(e))for(let t of e)s=s.concat(t);else"function"==typeof e&&(s=e(s.slice()));return r&&(s=s.concat(p.merge)),s.reduce((e,t)=>{let r="string"==typeof t?b[t]:t;if(!r){let e=JSON.stringify(t),r=Object.keys(b).map(e=>JSON.stringify(e)).join(", ");throw Error(`Unknown custom tag ${e}; use one of ${r}`)}return e.includes(r)||e.push(r),e},[])},nt}();let o=(e,t)=>e.key<t.key?-1:+(e.key>t.key);return rz.Schema=class e{constructor({compat:e,customTags:a,merge:l,resolveKnownTags:c,schema:u,sortMapEntries:p,toStringDefaults:f}){this.compat=Array.isArray(e)?i.getTags(e,"compat"):e?i.getTags(null,e):null,this.name="string"==typeof u&&u||"core",this.knownTags=c?i.coreKnownTags:{},this.tags=i.getTags(a,this.name,l),this.toStringOptions=f??null,Object.defineProperty(this,t.MAP,{value:r.map}),Object.defineProperty(this,t.SCALAR,{value:s.string}),Object.defineProperty(this,t.SEQ,{value:n.seq}),this.sortMapEntries="function"==typeof p?p:!0===p?o:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}},rz}var nL={};function n_(){if(Q)return rv;Q=1;var t=rN(),r=rj(),n=rg(),s=rQ(),i=rT(),o=nN(),a=function(){if(X)return nL;X=1;var e=rg(),t=rW(),r=rB();return nL.stringifyDocument=function(n,s){let i=[],o=!0===s.directives;if(!1!==s.directives&&n.directives){let e=n.directives.toString(n);e?(i.push(e),o=!0):n.directives.docStart&&(o=!0)}o&&i.push("---");let a=t.createStringifyContext(n,s),{commentString:l}=a.options;if(n.commentBefore){1!==i.length&&i.unshift("");let e=l(n.commentBefore);i.unshift(r.indentComment(e,""))}let c=!1,u=null;if(n.contents){if(e.isNode(n.contents)){if(n.contents.spaceBefore&&o&&i.push(""),n.contents.commentBefore){let e=l(n.contents.commentBefore);i.push(r.indentComment(e,""))}a.forceBlockIndent=!!n.comment,u=n.contents.comment}let s=u?void 0:()=>c=!0,p=t.stringify(n.contents,a,()=>u=null,s);u&&(p+=r.lineComment(p,"",l(u))),("|"===p[0]||">"===p[0])&&"---"===i[i.length-1]?i[i.length-1]=`--- ${p}`:i.push(p)}else i.push(t.stringify(n.contents,a));if(n.directives?.docEnd)if(n.comment){let e=l(n.comment);e.includes("\n")?(i.push("..."),i.push(r.indentComment(e,""))):i.push(`... ${e}`)}else i.push("...");else{let e=n.comment;e&&c&&(e=e.replace(/^\n+/,"")),e&&((!c||u)&&""!==i[i.length-1]&&i.push(""),i.push(r.indentComment(l(e),"")))}return i.join("\n")+"\n"},nL}(),l=rS(),c=rA(),u=r$(),p=rb();function f(e){if(n.isCollection(e))return!0;throw Error("Expected a YAML collection as document contents")}return rv.Document=class h{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,n.NODE_TYPE,{value:n.DOC});let s=null;"function"==typeof t||Array.isArray(t)?s=t:void 0===r&&t&&(r=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=i;let{version:o}=i;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new p.Directives({version:o}),this.setSchema(o,r),this.contents=void 0===e?null:this.createNode(e,s,r)}clone(){let e=Object.create(h.prototype,{[n.NODE_TYPE]:{value:n.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=n.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){f(this.contents)&&this.contents.add(e)}addIn(e,t){f(this.contents)&&this.contents.addIn(e,t)}createAlias(e,r){if(!e.anchor){let t=l.anchorNames(this);e.anchor=!r||t.has(r)?l.findNewAnchor(r||"a",t):r}return new t.Alias(e.anchor)}createNode(e,t,r){let s;if("function"==typeof t)e=t.call({"":e},"",e),s=t;else if(Array.isArray(t)){let e=t.filter(e=>"number"==typeof e||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),s=t}else void 0===r&&t&&(r=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:o,flow:a,keepUndefined:c,onTagObj:p,tag:f}=r??{},{onAnchor:h,setAnchors:d,sourceObjects:g}=l.createNodeAnchors(this,o||"a"),m={aliasDuplicateObjects:i??!0,keepUndefined:c??!1,onAnchor:h,onTagObj:p,replacer:s,schema:this.schema,sourceObjects:g},y=u.createNode(e,f,m);return a&&n.isCollection(y)&&(y.flow=!0),d(),y}createPair(e,t,r={}){let n=this.createNode(e,null,r),i=this.createNode(t,null,r);return new s.Pair(n,i)}delete(e){return!!f(this.contents)&&this.contents.delete(e)}deleteIn(e){return r.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):!!f(this.contents)&&this.contents.deleteIn(e)}get(e,t){return n.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return r.isEmptyPath(e)?!t&&n.isScalar(this.contents)?this.contents.value:this.contents:n.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!n.isCollection(this.contents)&&this.contents.has(e)}hasIn(e){return r.isEmptyPath(e)?void 0!==this.contents:!!n.isCollection(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=r.collectionFromPath(this.schema,[e],t):f(this.contents)&&this.contents.set(e,t)}setIn(e,t){r.isEmptyPath(e)?this.contents=t:null==this.contents?this.contents=r.collectionFromPath(this.schema,Array.from(e),t):f(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let r;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new p.Directives({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new p.Directives({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(r)this.schema=new o.Schema(Object.assign(r,t));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:r,mapAsMap:n,maxAliasCount:s,onAnchor:o,reviver:a}={}){let l={anchors:new e,doc:this,keep:!t,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof s?s:100},u=i.toJS(this.contents,r??"",l);if("function"==typeof o)for(let{count:e,res:t}of l.anchors.values())o(t,e);return"function"==typeof a?c.applyReviver(a,{"":u},"",u):u}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||0>=Number(e.indent))){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return a.stringifyDocument(this,e)}},rv}var nI={};function nP(){if(z)return nI;z=1;class e extends Error{constructor(e,t,r,n){super(),this.name=e,this.code=r,this.message=n,this.pos=t}}return nI.YAMLError=e,nI.YAMLParseError=class extends e{constructor(e,t,r){super("YAMLParseError",e,t,r)}},nI.YAMLWarning=class extends e{constructor(e,t,r){super("YAMLWarning",e,t,r)}},nI.prettifyError=(e,t)=>r=>{if(-1===r.pos[0])return;r.linePos=r.pos.map(e=>t.linePos(e));let{line:n,col:s}=r.linePos[0];r.message+=` at line ${n}, column ${s}`;let i=s-1,o=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){let e=Math.min(i-39,o.length-79);o="…"+o.substring(e),i-=e-1}if(o.length>80&&(o=o.substring(0,79)+"…"),n>1&&/^ *$/.test(o.substring(0,i))){let r=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);r.length>80&&(r=r.substring(0,79)+"…\n"),o=r+o}if(/[^ ]/.test(o)){let e=1,t=r.linePos[1];t?.line===n&&t.col>s&&(e=Math.max(1,Math.min(t.col-s,80-i)));let a=" ".repeat(i)+"^".repeat(e);r.message+=`:
18
18
 
19
19
  ${o}
20
20
  ${a}
21
- `}},nI}var nj={},nM={},nD={},nR={},nF={};function nq(){return Q||(Q=1,nF.resolveProps=function(e,{flow:t,indicator:r,next:n,offset:s,onError:i,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,p="",f="",d=!1,h=!1,m=null,g=null,y=null,b=null,k=null,v=null,w=null;for(let s of e)switch(h&&("space"!==s.type&&"newline"!==s.type&&"comma"!==s.type&&i(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),m&&(c&&"comment"!==s.type&&"newline"!==s.type&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),s.type){case"space":!t&&("doc-start"!==r||n?.type!=="flow-collection")&&s.source.includes(" ")&&(m=s),u=!0;break;case"comment":{u||i(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let e=s.source.substring(1)||" ";p?p+=f+e:p=e,f="",c=!1;break}case"newline":c?p?p+=s.source:v&&"seq-item-ind"===r||(l=!0):f+=s.source,c=!0,d=!0,(g||y)&&(b=s),u=!0;break;case"anchor":g&&i(s,"MULTIPLE_ANCHORS","A node can have at most one anchor"),s.source.endsWith(":")&&i(s.offset+s.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=s,w??(w=s.offset),c=!1,u=!1,h=!0;break;case"tag":y&&i(s,"MULTIPLE_TAGS","A node can have at most one tag"),y=s,w??(w=s.offset),c=!1,u=!1,h=!0;break;case r:(g||y)&&i(s,"BAD_PROP_ORDER",`Anchors and tags must be after the ${s.source} indicator`),v&&i(s,"UNEXPECTED_TOKEN",`Unexpected ${s.source} in ${t??"collection"}`),v=s,c="seq-item-ind"===r||"explicit-key-ind"===r,u=!1;break;case"comma":if(t){k&&i(s,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),k=s,c=!1,u=!1;break}default:i(s,"UNEXPECTED_TOKEN",`Unexpected ${s.type} token`),c=!1,u=!1}let S=e[e.length-1],x=S?S.offset+S.source.length:s;return h&&n&&"space"!==n.type&&"newline"!==n.type&&"comma"!==n.type&&("scalar"!==n.type||""!==n.source)&&i(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(c&&m.indent<=o||n?.type==="block-map"||n?.type==="block-seq")&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:k,found:v,spaceBefore:l,comment:p,hasNewline:d,anchor:g,tag:y,newlineAfterProp:b,end:x,start:w??x}}),nF}var nB={};function nU(){return z||(z=1,nB.containsNewline=function e(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes("\n"))return!0;if(t.end){for(let e of t.end)if("newline"===e.type)return!0}return!1;case"flow-collection":for(let r of t.items){for(let e of r.start)if("newline"===e.type)return!0;if(r.sep){for(let e of r.sep)if("newline"===e.type)return!0}if(e(r.key)||e(r.value))return!0}return!1;default:return!0}}),nB}var nK={};function nY(){if(Z)return nK;Z=1;var e=nU();return nK.flowIndentCheck=function(t,r,n){if(r?.type==="flow-collection"){let s=r.end[0];s.indent===t&&("]"===s.source||"}"===s.source)&&e.containsNewline(r)&&n(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}},nK}var nW={};function nJ(){if(ee)return nW;ee=1;var e=rg();return nW.mapIncludes=function(t,r,n){let{uniqueKeys:s}=t.options;if(!1===s)return!1;let i="function"==typeof s?s:(t,r)=>t===r||e.isScalar(t)&&e.isScalar(r)&&t.value===r.value;return r.some(e=>i(e.key,n))},nW}var nH={},nG={},nV={};function nX(){return en||(en=1,nV.resolveEnd=function(e,t,r,n){let s="";if(e){let i=!1,o="";for(let a of e){let{source:e,type:l}=a;switch(l){case"space":i=!0;break;case"comment":{r&&!i&&n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let t=e.substring(1)||" ";s?s+=o+t:s=t,o="";break}case"newline":s&&(o+=e),i=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=e.length}}return{comment:s,offset:t}}),nV}var nQ={},nz={};function nZ(){if(eo)return nz;eo=1;var e=rP();return nz.resolveBlockScalar=function(t,r,n){let s=r.offset,i=function({offset:e,props:t},r,n){if("block-scalar-header"!==t[0].type)return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:s}=t[0],i=s[0],o=0,a="",l=-1;for(let t=1;t<s.length;++t){let r=s[t];if(a||"-"!==r&&"+"!==r){let n=Number(r);!o&&n?o=n:-1===l&&(l=e+t)}else a=r}-1!==l&&n(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let c=!1,u="",p=s.length;for(let e=1;e<t.length;++e){let s=t[e];switch(s.type){case"space":c=!0;case"newline":p+=s.source.length;break;case"comment":r&&!c&&n(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),p+=s.source.length,u=s.source.substring(1);break;case"error":n(s,"UNEXPECTED_TOKEN",s.message),p+=s.source.length;break;default:{let e=`Unexpected token in block scalar header: ${s.type}`;n(s,"UNEXPECTED_TOKEN",e);let t=s.source;t&&"string"==typeof t&&(p+=t.length)}}}return{mode:i,indent:o,chomp:a,comment:u,length:p}}(r,t.options.strict,n);if(!i)return{value:"",type:null,comment:"",range:[s,s,s]};let o=">"===i.mode?e.Scalar.BLOCK_FOLDED:e.Scalar.BLOCK_LITERAL,a=r.source?function(e){let t=e.split(/\n( *)/),r=t[0],n=r.match(/^( *)/),s=[n?.[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let e=1;e<t.length;e+=2)s.push([t[e],t[e+1]]);return s}(r.source):[],l=a.length;for(let e=a.length-1;e>=0;--e){let t=a[e][1];if(""===t||"\r"===t)l=e;else break}if(0===l){let e="+"===i.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"",t=s+i.length;return r.source&&(t+=r.source.length),{value:e,type:o,comment:i.comment,range:[s,t,t]}}let c=r.indent+i.indent,u=r.offset+i.length,p=0;for(let e=0;e<l;++e){let[r,s]=a[e];if(""===s||"\r"===s)0===i.indent&&r.length>c&&(c=r.length);else{r.length<c&&n(u+r.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),0===i.indent&&(c=r.length),p=e,0!==c||t.atRoot||n(u,"BAD_INDENT","Block scalar values in collections must be indented");break}u+=r.length+s.length+1}for(let e=a.length-1;e>=l;--e)a[e][0].length>c&&(l=e+1);let f="",d="",h=!1;for(let e=0;e<p;++e)f+=a[e][0].slice(c)+"\n";for(let t=p;t<l;++t){let[r,s]=a[t];u+=r.length+s.length+1;let l="\r"===s[s.length-1];if(l&&(s=s.slice(0,-1)),s&&r.length<c){let e=i.indent?"explicit indentation indicator":"first line",t=`Block scalar lines must not be less indented than their ${e}`;n(u-s.length-(l?2:1),"BAD_INDENT",t),r=""}o===e.Scalar.BLOCK_LITERAL?(f+=d+r.slice(c)+s,d="\n"):r.length>c||" "===s[0]?(" "===d?d="\n":h||"\n"!==d||(d="\n\n"),f+=d+r.slice(c)+s,d="\n",h=!0):""===s?"\n"===d?f+="\n":d="\n":(f+=d+s,d=" ",h=!1)}switch(i.chomp){case"-":break;case"+":for(let e=l;e<a.length;++e)f+="\n"+a[e][0].slice(c);"\n"!==f[f.length-1]&&(f+="\n");break;default:f+="\n"}let m=s+i.length+r.source.length;return{value:f,type:o,comment:i.comment,range:[s,m,m]}},nz}var n0={};function n1(){if(ea)return n0;ea=1;var e=rP(),t=nX();function r(e){let t,r;try{t=RegExp("(.*?)(?<![ ])[ ]*\r?\n","sy"),r=RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=t.exec(e);if(!n)return e;let s=n[1],i=" ",o=t.lastIndex;for(r.lastIndex=o;n=r.exec(e);)""===n[1]?"\n"===i?s+=i:i="\n":(s+=i+n[1],i=" "),o=r.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,n=a.exec(e),s+i+(n?.[1]??"")}let n={0:"\0",a:"\x07",b:"\b",e:"\x1b",f:"\f",n:"\n",r:"\r",t:" ",v:"\v",N:"\x85",_:"\xa0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};return n0.resolveFlowScalar=function(s,i,o){let a,l,{offset:c,type:u,source:p,end:f}=s,d=(e,t,r)=>o(c+e,t,r);switch(u){case"scalar":a=e.Scalar.PLAIN,l=function(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":n=`block scalar indicator ${e[0]}`;break;case"@":case"`":n=`reserved character ${e[0]}`}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),r(e)}(p,d);break;case"single-quoted-scalar":var h,m;a=e.Scalar.QUOTE_SINGLE,h=p,m=d,("'"!==h[h.length-1]||1===h.length)&&m(h.length,"MISSING_CHAR","Missing closing 'quote"),l=r(h.slice(1,-1)).replace(/''/g,"'");break;case"double-quoted-scalar":a=e.Scalar.QUOTE_DOUBLE,l=function(e,t){let r="";for(let s=1;s<e.length-1;++s){let i=e[s];if("\r"!==i||"\n"!==e[s+1])if("\n"===i){let{fold:t,offset:n}=function(e,t){let r="",n=e[t+1];for(;(" "===n||" "===n||"\n"===n||"\r"===n)&&("\r"!==n||"\n"===e[t+2]);)"\n"===n&&(r+="\n"),t+=1,n=e[t+1];return r||(r=" "),{fold:r,offset:t}}(e,s);r+=t,s=n}else if("\\"===i){let i=e[++s],o=n[i];if(o)r+=o;else if("\n"===i)for(i=e[s+1];" "===i||" "===i;)i=e[++s+1];else if("\r"===i&&"\n"===e[s+1])for(i=e[++s+1];" "===i||" "===i;)i=e[++s+1];else if("x"===i||"u"===i||"U"===i){let n="x"===i?2:"u"===i?4:8;r+=function(e,t,r,n){let s=e.substr(t,r),i=s.length===r&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):0/0;try{return String.fromCodePoint(i)}catch{let s=e.substr(t-2,r+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}}(e,s+1,n,t),s+=n}else{let n=e.substr(s-1,2);t(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${n}`),r+=n}}else if(" "===i||" "===i){let t=s,n=e[s+1];for(;" "===n||" "===n;)n=e[++s+1];"\n"!==n&&("\r"!==n||"\n"!==e[s+2])&&(r+=s>t?e.slice(t,s+1):i)}else r+=i}return('"'!==e[e.length-1]||1===e.length)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),r}(p,d);break;default:return o(s,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${u}`),{value:"",type:null,comment:"",range:[c,c+p.length,c+p.length]}}let g=c+p.length,y=t.resolveEnd(f,g,i,o);return{value:l,type:a,comment:y.comment,range:[c,g,y.offset]}},n0}var n2={};function n9(){if(ef)return rf;ef=1;var e=rk(),t=n_(),r=nP(),n=rg(),s=function(){if(ep)return nj;ep=1;var e=n_(),t=function(){if(eu)return nM;eu=1;var e=rN(),t=rg(),r=function(){if(ei)return nD;ei=1;var e=rg(),t=rP(),r=r3(),n=r5(),s=function(){if(et)return nR;et=1;var e=rz(),t=r3(),r=nq(),n=nU(),s=nY(),i=nJ();let o="All mapping items must start at the same column";return nR.resolveBlockMap=function({composeNode:a,composeEmptyNode:l},c,u,p,f){let d=new(f?.nodeClass??t.YAMLMap)(c.schema);c.atRoot&&(c.atRoot=!1);let h=u.offset,m=null;for(let t of u.items){let{start:f,key:g,sep:y,value:b}=t,k=r.resolveProps(f,{indicator:"explicit-key-ind",next:g??y?.[0],offset:h,onError:p,parentIndent:u.indent,startOnNewline:!0}),v=!k.found;if(v){if(g&&("block-seq"===g.type?p(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in g&&g.indent!==u.indent&&p(h,"BAD_INDENT",o)),!k.anchor&&!k.tag&&!y){m=k.end,k.comment&&(d.comment?d.comment+="\n"+k.comment:d.comment=k.comment);continue}(k.newlineAfterProp||n.containsNewline(g))&&p(g??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else k.found?.indent!==u.indent&&p(h,"BAD_INDENT",o);c.atKey=!0;let w=k.end,S=g?a(c,g,k,p):l(c,w,f,null,k,p);c.schema.compat&&s.flowIndentCheck(u.indent,g,p),c.atKey=!1,i.mapIncludes(c,d.items,S)&&p(w,"DUPLICATE_KEY","Map keys must be unique");let x=r.resolveProps(y??[],{indicator:"map-value-ind",next:b,offset:S.range[2],onError:p,parentIndent:u.indent,startOnNewline:!g||"block-scalar"===g.type});if(h=x.end,x.found){v&&(b?.type!=="block-map"||x.hasNewline||p(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),c.options.strict&&k.start<x.found.offset-1024&&p(S.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let r=b?a(c,b,x,p):l(c,h,y,null,x,p);c.schema.compat&&s.flowIndentCheck(u.indent,b,p),h=r.range[2];let n=new e.Pair(S,r);c.options.keepSourceTokens&&(n.srcToken=t),d.items.push(n)}else{v&&p(S.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),x.comment&&(S.comment?S.comment+="\n"+x.comment:S.comment=x.comment);let r=new e.Pair(S);c.options.keepSourceTokens&&(r.srcToken=t),d.items.push(r)}}return m&&m<h&&p(m,"IMPOSSIBLE","Map comment with trailing content"),d.range=[u.offset,h,m??h],d},nR}(),i=function(){if(er)return nH;er=1;var e=r5(),t=nq(),r=nY();return nH.resolveBlockSeq=function({composeNode:n,composeEmptyNode:s},i,o,a,l){let c=new(l?.nodeClass??e.YAMLSeq)(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let u=o.offset,p=null;for(let{start:e,value:l}of o.items){let f=t.resolveProps(e,{indicator:"seq-item-ind",next:l,offset:u,onError:a,parentIndent:o.indent,startOnNewline:!0});if(!f.found)if(f.anchor||f.tag||l)l?.type==="block-seq"?a(f.end,"BAD_INDENT","All sequence items must start at the same column"):a(u,"MISSING_CHAR","Sequence item without - indicator");else{p=f.end,f.comment&&(c.comment=f.comment);continue}let d=l?n(i,l,f,a):s(i,f.end,e,null,f,a);i.schema.compat&&r.flowIndentCheck(o.indent,l,a),u=d.range[2],c.items.push(d)}return c.range=[o.offset,u,p??u],c},nH}(),o=function(){if(es)return nG;es=1;var e=rg(),t=rz(),r=r3(),n=r5(),s=nX(),i=nq(),o=nU(),a=nJ();let l="Block collections are not allowed within flow collections",c=e=>e&&("block-map"===e.type||"block-seq"===e.type);return nG.resolveFlowCollection=function({composeNode:u,composeEmptyNode:p},f,d,h,m){let g="{"===d.start.source,y=g?"flow map":"flow sequence",b=new(m?.nodeClass??(g?r.YAMLMap:n.YAMLSeq))(f.schema);b.flow=!0;let k=f.atRoot;k&&(f.atRoot=!1),f.atKey&&(f.atKey=!1);let v=d.offset+d.start.source.length;for(let n=0;n<d.items.length;++n){let s=d.items[n],{start:m,key:k,sep:w,value:S}=s,x=i.resolveProps(m,{flow:y,indicator:"explicit-key-ind",next:k??w?.[0],offset:v,onError:h,parentIndent:d.indent,startOnNewline:!1});if(!x.found){if(!x.anchor&&!x.tag&&!w&&!S){0===n&&x.comma?h(x.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`):n<d.items.length-1&&h(x.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${y}`),x.comment&&(b.comment?b.comment+="\n"+x.comment:b.comment=x.comment),v=x.end;continue}!g&&f.options.strict&&o.containsNewline(k)&&h(k,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===n)x.comma&&h(x.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`);else if(x.comma||h(x.start,"MISSING_CHAR",`Missing , between ${y} items`),x.comment){let t="";e:for(let e of m)switch(e.type){case"comma":case"space":break;case"comment":t=e.source.substring(1);break e;default:break e}if(t){let r=b.items[b.items.length-1];e.isPair(r)&&(r=r.value??r.key),r.comment?r.comment+="\n"+t:r.comment=t,x.comment=x.comment.substring(t.length+1)}}if(g||w||x.found){f.atKey=!0;let e=x.end,n=k?u(f,k,x,h):p(f,e,m,null,x,h);c(k)&&h(n.range,"BLOCK_IN_FLOW",l),f.atKey=!1;let o=i.resolveProps(w??[],{flow:y,indicator:"map-value-ind",next:S,offset:n.range[2],onError:h,parentIndent:d.indent,startOnNewline:!1});if(o.found){if(!g&&!x.found&&f.options.strict){if(w)for(let e of w){if(e===o.found)break;if("newline"===e.type){h(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}x.start<o.found.offset-1024&&h(o.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else S&&("source"in S&&S.source?.[0]===":"?h(S,"MISSING_CHAR",`Missing space after : in ${y}`):h(o.start,"MISSING_CHAR",`Missing , or : between ${y} items`));let E=S?u(f,S,o,h):o.found?p(f,o.end,w,null,o,h):null;E?c(S)&&h(E.range,"BLOCK_IN_FLOW",l):o.comment&&(n.comment?n.comment+="\n"+o.comment:n.comment=o.comment);let A=new t.Pair(n,E);if(f.options.keepSourceTokens&&(A.srcToken=s),g)a.mapIncludes(f,b.items,n)&&h(e,"DUPLICATE_KEY","Map keys must be unique"),b.items.push(A);else{let e=new r.YAMLMap(f.schema);e.flow=!0,e.items.push(A);let t=(E??n).range;e.range=[n.range[0],t[1],t[2]],b.items.push(e)}v=E?E.range[2]:o.end}else{let e=S?u(f,S,x,h):p(f,x.end,w,null,x,h);b.items.push(e),v=e.range[2],c(S)&&h(e.range,"BLOCK_IN_FLOW",l)}}let w=g?"}":"]",[S,...x]=d.end,E=v;if(S?.source===w)E=S.offset+S.source.length;else{let e=y[0].toUpperCase()+y.substring(1),t=k?`${e} must end with a ${w}`:`${e} in block collection must be sufficiently indented and end with a ${w}`;h(v,k?"MISSING_CHAR":"BAD_INDENT",t),S&&1!==S.source.length&&x.unshift(S)}if(x.length>0){let e=s.resolveEnd(x,E,f.options.strict,h);e.comment&&(b.comment?b.comment+="\n"+e.comment:b.comment=e.comment),b.range=[d.offset,E,e.offset]}else b.range=[d.offset,E,E];return b},nG}();function a(e,t,r,n,a,l){let c="block-map"===r.type?s.resolveBlockMap(e,t,r,n,l):"block-seq"===r.type?i.resolveBlockSeq(e,t,r,n,l):o.resolveFlowCollection(e,t,r,n,l),u=c.constructor;return"!"===a||a===u.tagName?c.tag=u.tagName:a&&(c.tag=a),c}return nD.composeCollection=function(s,i,o,l,c){let u=l.tag,p=u?i.directives.tagName(u.source,e=>c(u,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===o.type){let{anchor:e,newlineAfterProp:t}=l,r=e&&u?e.offset>u.offset?e:u:e??u;r&&(!t||t.offset<r.offset)&&c(r,"MISSING_CHAR","Missing newline after block sequence props")}let f="block-map"===o.type?"map":"block-seq"===o.type?"seq":"{"===o.start.source?"map":"seq";if(!u||!p||"!"===p||p===r.YAMLMap.tagName&&"map"===f||p===n.YAMLSeq.tagName&&"seq"===f)return a(s,i,o,c,p);let d=i.schema.tags.find(e=>e.tag===p&&e.collection===f);if(!d){let e=i.schema.knownTags[p];if(e?.collection!==f)return e?c(u,"BAD_COLLECTION_TYPE",`${e.tag} used for ${f} collection, but expects ${e.collection??"scalar"}`,!0):c(u,"TAG_RESOLVE_FAILED",`Unresolved tag: ${p}`,!0),a(s,i,o,c,p);i.schema.tags.push(Object.assign({},e,{default:!1})),d=e}let h=a(s,i,o,c,p,d),m=d.resolve?.(h,e=>c(u,"TAG_RESOLVE_FAILED",e),i.options)??h,g=e.isNode(m)?m:new t.Scalar(m);return g.range=h.range,g.tag=p,d?.format&&(g.format=d.format),g},nD}(),n=function(){if(el)return nQ;el=1;var e=rg(),t=rP(),r=nZ(),n=n1();return nQ.composeScalar=function(s,i,o,a){let l,c,{value:u,type:p,comment:f,range:d}="block-scalar"===i.type?r.resolveBlockScalar(s,i,a):n.resolveFlowScalar(i,s.options.strict,a),h=o?s.directives.tagName(o.source,e=>a(o,"TAG_RESOLVE_FAILED",e)):null;l=s.options.stringKeys&&s.atKey?s.schema[e.SCALAR]:h?function(t,r,n,s,i){if("!"===n)return t[e.SCALAR];let o=[];for(let e of t.tags)if(!e.collection&&e.tag===n)if(!e.default||!e.test)return e;else o.push(e);for(let e of o)if(e.test?.test(r))return e;let a=t.knownTags[n];return a&&!a.collection?(t.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,"tag:yaml.org,2002:str"!==n),t[e.SCALAR])}(s.schema,u,h,o,a):"scalar"===i.type?function({atKey:t,directives:r,schema:n},s,i,o){let a=n.tags.find(e=>(!0===e.default||t&&"key"===e.default)&&e.test?.test(s))||n[e.SCALAR];if(n.compat){let t=n.compat.find(e=>e.default&&e.test?.test(s))??n[e.SCALAR];if(a.tag!==t.tag){let e=r.tagString(a.tag),n=r.tagString(t.tag);o(i,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${e} or ${n}`,!0)}}return a}(s,u,i,a):s.schema[e.SCALAR];try{let r=l.resolve(u,e=>a(o??i,"TAG_RESOLVE_FAILED",e),s.options);c=e.isScalar(r)?r:new t.Scalar(r)}catch(e){a(o??i,"TAG_RESOLVE_FAILED",e instanceof Error?e.message:String(e)),c=new t.Scalar(u)}return c.range=d,c.source=u,p&&(c.type=p),h&&(c.tag=h),l.format&&(c.format=l.format),f&&(c.comment=f),c},nQ}(),s=nX(),i=(ec||(ec=1,n2.emptyScalarPosition=function(e,t,r){if(t){r??(r=t.length);for(let n=r-1;n>=0;--n){let r=t[n];switch(r.type){case"space":case"comment":case"newline":e-=r.source.length;continue}for(r=t[++n];r?.type==="space";)e+=r.source.length,r=t[++n];break}}return e}),n2);let o={composeNode:a,composeEmptyNode:l};function a(i,a,c,u){let p,f=i.atKey,{spaceBefore:d,comment:h,anchor:m,tag:g}=c,y=!0;switch(a.type){case"alias":p=function({options:t},{offset:r,source:n,end:i},o){let a=new e.Alias(n.substring(1));""===a.source&&o(r,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&o(r+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let l=r+n.length,c=s.resolveEnd(i,l,t.strict,o);return a.range=[r,l,c.offset],c.comment&&(a.comment=c.comment),a}(i,a,u),(m||g)&&u(a,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":p=n.composeScalar(i,a,g,u),m&&(p.anchor=m.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{p=r.composeCollection(o,i,a,c,u),m&&(p.anchor=m.source.substring(1))}catch(e){u(a,"RESOURCE_EXHAUSTION",e instanceof Error?e.message:String(e))}break;default:{let e="error"===a.type?a.message:`Unsupported token (type: ${a.type})`;u(a,"UNEXPECTED_TOKEN",e),y=!1}}return p??(p=l(i,a.offset,void 0,null,c,u)),m&&""===p.anchor&&u(m,"BAD_ALIAS","Anchor cannot be an empty string"),f&&i.options.stringKeys&&(!t.isScalar(p)||"string"!=typeof p.value||p.tag&&"tag:yaml.org,2002:str"!==p.tag)&&u(g??a,"NON_STRING_KEY","With stringKeys, all keys must be strings"),d&&(p.spaceBefore=!0),h&&("scalar"===a.type&&""===a.source?p.comment=h:p.commentBefore=h),i.options.keepSourceTokens&&y&&(p.srcToken=a),p}function l(e,t,r,s,{spaceBefore:o,comment:a,anchor:c,tag:u,end:p},f){let d={type:"scalar",offset:i.emptyScalarPosition(t,r,s),indent:-1,source:""},h=n.composeScalar(e,d,u,f);return c&&(h.anchor=c.source.substring(1),""===h.anchor&&f(c,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(h.spaceBefore=!0),a&&(h.comment=a,h.range[2]=p),h}return nM.composeEmptyNode=l,nM.composeNode=a,nM}(),r=nX(),n=nq();return nj.composeDoc=function(s,i,{offset:o,start:a,value:l,end:c},u){let p=Object.assign({_directives:i},s),f=new e.Document(void 0,p),d={atKey:!1,atRoot:!0,directives:f.directives,options:f.options,schema:f.schema},h=n.resolveProps(a,{indicator:"doc-start",next:l??c?.[0],offset:o,onError:u,parentIndent:0,startOnNewline:!0});h.found&&(f.directives.docStart=!0,l&&("block-map"===l.type||"block-seq"===l.type)&&!h.hasNewline&&u(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),f.contents=l?t.composeNode(d,l,h,u):t.composeEmptyNode(d,h.end,a,null,h,u);let m=f.contents.range[2],g=r.resolveEnd(c,m,!1,u);return g.comment&&(f.comment=g.comment),f.range=[o,m,g.offset],f},nj}(),i=nX();function o(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];let{offset:t,source:r}=e;return[t,t+("string"==typeof r?r.length:1)]}function a(e){let t="",r=!1,n=!1;for(let s=0;s<e.length;++s){let i=e[s];switch(i[0]){case"#":t+=(""===t?"":n?"\n\n":"\n")+(i.substring(1)||" "),r=!0,n=!1;break;case"%":e[s+1]?.[0]!=="#"&&(s+=1),r=!1;break;default:r||(n=!0),r=!1}}return{comment:t,afterEmptyLine:n}}return rf.Composer=class{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,s)=>{let i=o(e);s?this.warnings.push(new r.YAMLWarning(i,t,n)):this.errors.push(new r.YAMLParseError(i,t,n))},this.directives=new e.Directives({version:t.version||"1.2"}),this.options=t}decorate(e,t){let{comment:r,afterEmptyLine:s}=a(this.prelude);if(r){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}
21
+ `}},nI}var n$={},nj={},nD={},nM={},nR={};function nF(){return Z||(Z=1,nR.resolveProps=function(e,{flow:t,indicator:r,next:n,offset:s,onError:i,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,p="",f="",h=!1,d=!1,g=null,m=null,y=null,b=null,v=null,k=null,w=null;for(let s of e)switch(d&&("space"!==s.type&&"newline"!==s.type&&"comma"!==s.type&&i(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),d=!1),g&&(c&&"comment"!==s.type&&"newline"!==s.type&&i(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),g=null),s.type){case"space":!t&&("doc-start"!==r||n?.type!=="flow-collection")&&s.source.includes(" ")&&(g=s),u=!0;break;case"comment":{u||i(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let e=s.source.substring(1)||" ";p?p+=f+e:p=e,f="",c=!1;break}case"newline":c?p?p+=s.source:k&&"seq-item-ind"===r||(l=!0):f+=s.source,c=!0,h=!0,(m||y)&&(b=s),u=!0;break;case"anchor":m&&i(s,"MULTIPLE_ANCHORS","A node can have at most one anchor"),s.source.endsWith(":")&&i(s.offset+s.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),m=s,w??(w=s.offset),c=!1,u=!1,d=!0;break;case"tag":y&&i(s,"MULTIPLE_TAGS","A node can have at most one tag"),y=s,w??(w=s.offset),c=!1,u=!1,d=!0;break;case r:(m||y)&&i(s,"BAD_PROP_ORDER",`Anchors and tags must be after the ${s.source} indicator`),k&&i(s,"UNEXPECTED_TOKEN",`Unexpected ${s.source} in ${t??"collection"}`),k=s,c="seq-item-ind"===r||"explicit-key-ind"===r,u=!1;break;case"comma":if(t){v&&i(s,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),v=s,c=!1,u=!1;break}default:i(s,"UNEXPECTED_TOKEN",`Unexpected ${s.type} token`),c=!1,u=!1}let S=e[e.length-1],x=S?S.offset+S.source.length:s;return d&&n&&"space"!==n.type&&"newline"!==n.type&&"comma"!==n.type&&("scalar"!==n.type||""!==n.source)&&i(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g&&(c&&g.indent<=o||n?.type==="block-map"||n?.type==="block-seq")&&i(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:k,spaceBefore:l,comment:p,hasNewline:h,anchor:m,tag:y,newlineAfterProp:b,end:x,start:w??x}}),nR}var nB={};function nq(){return ee||(ee=1,nB.containsNewline=function e(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes("\n"))return!0;if(t.end){for(let e of t.end)if("newline"===e.type)return!0}return!1;case"flow-collection":for(let r of t.items){for(let e of r.start)if("newline"===e.type)return!0;if(r.sep){for(let e of r.sep)if("newline"===e.type)return!0}if(e(r.key)||e(r.value))return!0}return!1;default:return!0}}),nB}var nU={};function nK(){if(et)return nU;et=1;var e=nq();return nU.flowIndentCheck=function(t,r,n){if(r?.type==="flow-collection"){let s=r.end[0];s.indent===t&&("]"===s.source||"}"===s.source)&&e.containsNewline(r)&&n(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}},nU}var nW={};function nY(){if(er)return nW;er=1;var e=rg();return nW.mapIncludes=function(t,r,n){let{uniqueKeys:s}=t.options;if(!1===s)return!1;let i="function"==typeof s?s:(t,r)=>t===r||e.isScalar(t)&&e.isScalar(r)&&t.value===r.value;return r.some(e=>i(e.key,n))},nW}var nJ={},nG={},nH={};function nV(){return ei||(ei=1,nH.resolveEnd=function(e,t,r,n){let s="";if(e){let i=!1,o="";for(let a of e){let{source:e,type:l}=a;switch(l){case"space":i=!0;break;case"comment":{r&&!i&&n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let t=e.substring(1)||" ";s?s+=o+t:s=t,o="";break}case"newline":s&&(o+=e),i=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=e.length}}return{comment:s,offset:t}}),nH}var nX={},nQ={};function nz(){if(el)return nQ;el=1;var e=rP();return nQ.resolveBlockScalar=function(t,r,n){let s=r.offset,i=function({offset:e,props:t},r,n){if("block-scalar-header"!==t[0].type)return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:s}=t[0],i=s[0],o=0,a="",l=-1;for(let t=1;t<s.length;++t){let r=s[t];if(a||"-"!==r&&"+"!==r){let n=Number(r);!o&&n?o=n:-1===l&&(l=e+t)}else a=r}-1!==l&&n(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let c=!1,u="",p=s.length;for(let e=1;e<t.length;++e){let s=t[e];switch(s.type){case"space":c=!0;case"newline":p+=s.source.length;break;case"comment":r&&!c&&n(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),p+=s.source.length,u=s.source.substring(1);break;case"error":n(s,"UNEXPECTED_TOKEN",s.message),p+=s.source.length;break;default:{let e=`Unexpected token in block scalar header: ${s.type}`;n(s,"UNEXPECTED_TOKEN",e);let t=s.source;t&&"string"==typeof t&&(p+=t.length)}}}return{mode:i,indent:o,chomp:a,comment:u,length:p}}(r,t.options.strict,n);if(!i)return{value:"",type:null,comment:"",range:[s,s,s]};let o=">"===i.mode?e.Scalar.BLOCK_FOLDED:e.Scalar.BLOCK_LITERAL,a=r.source?function(e){let t=e.split(/\n( *)/),r=t[0],n=r.match(/^( *)/),s=[n?.[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let e=1;e<t.length;e+=2)s.push([t[e],t[e+1]]);return s}(r.source):[],l=a.length;for(let e=a.length-1;e>=0;--e){let t=a[e][1];if(""===t||"\r"===t)l=e;else break}if(0===l){let e="+"===i.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"",t=s+i.length;return r.source&&(t+=r.source.length),{value:e,type:o,comment:i.comment,range:[s,t,t]}}let c=r.indent+i.indent,u=r.offset+i.length,p=0;for(let e=0;e<l;++e){let[r,s]=a[e];if(""===s||"\r"===s)0===i.indent&&r.length>c&&(c=r.length);else{r.length<c&&n(u+r.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),0===i.indent&&(c=r.length),p=e,0!==c||t.atRoot||n(u,"BAD_INDENT","Block scalar values in collections must be indented");break}u+=r.length+s.length+1}for(let e=a.length-1;e>=l;--e)a[e][0].length>c&&(l=e+1);let f="",h="",d=!1;for(let e=0;e<p;++e)f+=a[e][0].slice(c)+"\n";for(let t=p;t<l;++t){let[r,s]=a[t];u+=r.length+s.length+1;let l="\r"===s[s.length-1];if(l&&(s=s.slice(0,-1)),s&&r.length<c){let e=i.indent?"explicit indentation indicator":"first line",t=`Block scalar lines must not be less indented than their ${e}`;n(u-s.length-(l?2:1),"BAD_INDENT",t),r=""}o===e.Scalar.BLOCK_LITERAL?(f+=h+r.slice(c)+s,h="\n"):r.length>c||" "===s[0]?(" "===h?h="\n":d||"\n"!==h||(h="\n\n"),f+=h+r.slice(c)+s,h="\n",d=!0):""===s?"\n"===h?f+="\n":h="\n":(f+=h+s,h=" ",d=!1)}switch(i.chomp){case"-":break;case"+":for(let e=l;e<a.length;++e)f+="\n"+a[e][0].slice(c);"\n"!==f[f.length-1]&&(f+="\n");break;default:f+="\n"}let g=s+i.length+r.source.length;return{value:f,type:o,comment:i.comment,range:[s,g,g]}},nQ}var nZ={};function n0(){if(ec)return nZ;ec=1;var e=rP(),t=nV();function r(e){let t,r;try{t=RegExp("(.*?)(?<![ ])[ ]*\r?\n","sy"),r=RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=t.exec(e);if(!n)return e;let s=n[1],i=" ",o=t.lastIndex;for(r.lastIndex=o;n=r.exec(e);)""===n[1]?"\n"===i?s+=i:i="\n":(s+=i+n[1],i=" "),o=r.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,n=a.exec(e),s+i+(n?.[1]??"")}let n={0:"\0",a:"\x07",b:"\b",e:"\x1b",f:"\f",n:"\n",r:"\r",t:" ",v:"\v",N:"\x85",_:"\xa0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};return nZ.resolveFlowScalar=function(s,i,o){let a,l,{offset:c,type:u,source:p,end:f}=s,h=(e,t,r)=>o(c+e,t,r);switch(u){case"scalar":a=e.Scalar.PLAIN,l=function(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":n=`block scalar indicator ${e[0]}`;break;case"@":case"`":n=`reserved character ${e[0]}`}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),r(e)}(p,h);break;case"single-quoted-scalar":var d,g;a=e.Scalar.QUOTE_SINGLE,d=p,g=h,("'"!==d[d.length-1]||1===d.length)&&g(d.length,"MISSING_CHAR","Missing closing 'quote"),l=r(d.slice(1,-1)).replace(/''/g,"'");break;case"double-quoted-scalar":a=e.Scalar.QUOTE_DOUBLE,l=function(e,t){let r="";for(let s=1;s<e.length-1;++s){let i=e[s];if("\r"!==i||"\n"!==e[s+1])if("\n"===i){let{fold:t,offset:n}=function(e,t){let r="",n=e[t+1];for(;(" "===n||" "===n||"\n"===n||"\r"===n)&&("\r"!==n||"\n"===e[t+2]);)"\n"===n&&(r+="\n"),t+=1,n=e[t+1];return r||(r=" "),{fold:r,offset:t}}(e,s);r+=t,s=n}else if("\\"===i){let i=e[++s],o=n[i];if(o)r+=o;else if("\n"===i)for(i=e[s+1];" "===i||" "===i;)i=e[++s+1];else if("\r"===i&&"\n"===e[s+1])for(i=e[++s+1];" "===i||" "===i;)i=e[++s+1];else if("x"===i||"u"===i||"U"===i){let n="x"===i?2:"u"===i?4:8;r+=function(e,t,r,n){let s=e.substr(t,r),i=s.length===r&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):0/0;try{return String.fromCodePoint(i)}catch{let s=e.substr(t-2,r+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}}(e,s+1,n,t),s+=n}else{let n=e.substr(s-1,2);t(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${n}`),r+=n}}else if(" "===i||" "===i){let t=s,n=e[s+1];for(;" "===n||" "===n;)n=e[++s+1];"\n"!==n&&("\r"!==n||"\n"!==e[s+2])&&(r+=s>t?e.slice(t,s+1):i)}else r+=i}return('"'!==e[e.length-1]||1===e.length)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),r}(p,h);break;default:return o(s,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${u}`),{value:"",type:null,comment:"",range:[c,c+p.length,c+p.length]}}let m=c+p.length,y=t.resolveEnd(f,m,i,o);return{value:l,type:a,comment:y.comment,range:[c,m,y.offset]}},nZ}var n1={};function n2(){if(ed)return rp;ed=1;var e=rb(),t=n_(),r=nP(),n=rg(),s=function(){if(eh)return n$;eh=1;var e=n_(),t=function(){if(ef)return nj;ef=1;var e=rN(),t=rg(),r=function(){if(ea)return nD;ea=1;var e=rg(),t=rP(),r=r3(),n=r8(),s=function(){if(en)return nM;en=1;var e=rQ(),t=r3(),r=nF(),n=nq(),s=nK(),i=nY();let o="All mapping items must start at the same column";return nM.resolveBlockMap=function({composeNode:a,composeEmptyNode:l},c,u,p,f){let h=new(f?.nodeClass??t.YAMLMap)(c.schema);c.atRoot&&(c.atRoot=!1);let d=u.offset,g=null;for(let t of u.items){let{start:f,key:m,sep:y,value:b}=t,v=r.resolveProps(f,{indicator:"explicit-key-ind",next:m??y?.[0],offset:d,onError:p,parentIndent:u.indent,startOnNewline:!0}),k=!v.found;if(k){if(m&&("block-seq"===m.type?p(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in m&&m.indent!==u.indent&&p(d,"BAD_INDENT",o)),!v.anchor&&!v.tag&&!y){g=v.end,v.comment&&(h.comment?h.comment+="\n"+v.comment:h.comment=v.comment);continue}(v.newlineAfterProp||n.containsNewline(m))&&p(m??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else v.found?.indent!==u.indent&&p(d,"BAD_INDENT",o);c.atKey=!0;let w=v.end,S=m?a(c,m,v,p):l(c,w,f,null,v,p);c.schema.compat&&s.flowIndentCheck(u.indent,m,p),c.atKey=!1,i.mapIncludes(c,h.items,S)&&p(w,"DUPLICATE_KEY","Map keys must be unique");let x=r.resolveProps(y??[],{indicator:"map-value-ind",next:b,offset:S.range[2],onError:p,parentIndent:u.indent,startOnNewline:!m||"block-scalar"===m.type});if(d=x.end,x.found){k&&(b?.type!=="block-map"||x.hasNewline||p(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),c.options.strict&&v.start<x.found.offset-1024&&p(S.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let r=b?a(c,b,x,p):l(c,d,y,null,x,p);c.schema.compat&&s.flowIndentCheck(u.indent,b,p),d=r.range[2];let n=new e.Pair(S,r);c.options.keepSourceTokens&&(n.srcToken=t),h.items.push(n)}else{k&&p(S.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),x.comment&&(S.comment?S.comment+="\n"+x.comment:S.comment=x.comment);let r=new e.Pair(S);c.options.keepSourceTokens&&(r.srcToken=t),h.items.push(r)}}return g&&g<d&&p(g,"IMPOSSIBLE","Map comment with trailing content"),h.range=[u.offset,d,g??d],h},nM}(),i=function(){if(es)return nJ;es=1;var e=r8(),t=nF(),r=nK();return nJ.resolveBlockSeq=function({composeNode:n,composeEmptyNode:s},i,o,a,l){let c=new(l?.nodeClass??e.YAMLSeq)(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let u=o.offset,p=null;for(let{start:e,value:l}of o.items){let f=t.resolveProps(e,{indicator:"seq-item-ind",next:l,offset:u,onError:a,parentIndent:o.indent,startOnNewline:!0});if(!f.found)if(f.anchor||f.tag||l)l?.type==="block-seq"?a(f.end,"BAD_INDENT","All sequence items must start at the same column"):a(u,"MISSING_CHAR","Sequence item without - indicator");else{p=f.end,f.comment&&(c.comment=f.comment);continue}let h=l?n(i,l,f,a):s(i,f.end,e,null,f,a);i.schema.compat&&r.flowIndentCheck(o.indent,l,a),u=h.range[2],c.items.push(h)}return c.range=[o.offset,u,p??u],c},nJ}(),o=function(){if(eo)return nG;eo=1;var e=rg(),t=rQ(),r=r3(),n=r8(),s=nV(),i=nF(),o=nq(),a=nY();let l="Block collections are not allowed within flow collections",c=e=>e&&("block-map"===e.type||"block-seq"===e.type);return nG.resolveFlowCollection=function({composeNode:u,composeEmptyNode:p},f,h,d,g){let m="{"===h.start.source,y=m?"flow map":"flow sequence",b=new(g?.nodeClass??(m?r.YAMLMap:n.YAMLSeq))(f.schema);b.flow=!0;let v=f.atRoot;v&&(f.atRoot=!1),f.atKey&&(f.atKey=!1);let k=h.offset+h.start.source.length;for(let n=0;n<h.items.length;++n){let s=h.items[n],{start:g,key:v,sep:w,value:S}=s,x=i.resolveProps(g,{flow:y,indicator:"explicit-key-ind",next:v??w?.[0],offset:k,onError:d,parentIndent:h.indent,startOnNewline:!1});if(!x.found){if(!x.anchor&&!x.tag&&!w&&!S){0===n&&x.comma?d(x.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`):n<h.items.length-1&&d(x.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${y}`),x.comment&&(b.comment?b.comment+="\n"+x.comment:b.comment=x.comment),k=x.end;continue}!m&&f.options.strict&&o.containsNewline(v)&&d(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===n)x.comma&&d(x.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`);else if(x.comma||d(x.start,"MISSING_CHAR",`Missing , between ${y} items`),x.comment){let t="";e:for(let e of g)switch(e.type){case"comma":case"space":break;case"comment":t=e.source.substring(1);break e;default:break e}if(t){let r=b.items[b.items.length-1];e.isPair(r)&&(r=r.value??r.key),r.comment?r.comment+="\n"+t:r.comment=t,x.comment=x.comment.substring(t.length+1)}}if(m||w||x.found){f.atKey=!0;let e=x.end,n=v?u(f,v,x,d):p(f,e,g,null,x,d);c(v)&&d(n.range,"BLOCK_IN_FLOW",l),f.atKey=!1;let o=i.resolveProps(w??[],{flow:y,indicator:"map-value-ind",next:S,offset:n.range[2],onError:d,parentIndent:h.indent,startOnNewline:!1});if(o.found){if(!m&&!x.found&&f.options.strict){if(w)for(let e of w){if(e===o.found)break;if("newline"===e.type){d(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}x.start<o.found.offset-1024&&d(o.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else S&&("source"in S&&S.source?.[0]===":"?d(S,"MISSING_CHAR",`Missing space after : in ${y}`):d(o.start,"MISSING_CHAR",`Missing , or : between ${y} items`));let E=S?u(f,S,o,d):o.found?p(f,o.end,w,null,o,d):null;E?c(S)&&d(E.range,"BLOCK_IN_FLOW",l):o.comment&&(n.comment?n.comment+="\n"+o.comment:n.comment=o.comment);let A=new t.Pair(n,E);if(f.options.keepSourceTokens&&(A.srcToken=s),m)a.mapIncludes(f,b.items,n)&&d(e,"DUPLICATE_KEY","Map keys must be unique"),b.items.push(A);else{let e=new r.YAMLMap(f.schema);e.flow=!0,e.items.push(A);let t=(E??n).range;e.range=[n.range[0],t[1],t[2]],b.items.push(e)}k=E?E.range[2]:o.end}else{let e=S?u(f,S,x,d):p(f,x.end,w,null,x,d);b.items.push(e),k=e.range[2],c(S)&&d(e.range,"BLOCK_IN_FLOW",l)}}let w=m?"}":"]",[S,...x]=h.end,E=k;if(S?.source===w)E=S.offset+S.source.length;else{let e=y[0].toUpperCase()+y.substring(1),t=v?`${e} must end with a ${w}`:`${e} in block collection must be sufficiently indented and end with a ${w}`;d(k,v?"MISSING_CHAR":"BAD_INDENT",t),S&&1!==S.source.length&&x.unshift(S)}if(x.length>0){let e=s.resolveEnd(x,E,f.options.strict,d);e.comment&&(b.comment?b.comment+="\n"+e.comment:b.comment=e.comment),b.range=[h.offset,E,e.offset]}else b.range=[h.offset,E,E];return b},nG}();function a(e,t,r,n,a,l){let c="block-map"===r.type?s.resolveBlockMap(e,t,r,n,l):"block-seq"===r.type?i.resolveBlockSeq(e,t,r,n,l):o.resolveFlowCollection(e,t,r,n,l),u=c.constructor;return"!"===a||a===u.tagName?c.tag=u.tagName:a&&(c.tag=a),c}return nD.composeCollection=function(s,i,o,l,c){let u=l.tag,p=u?i.directives.tagName(u.source,e=>c(u,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===o.type){let{anchor:e,newlineAfterProp:t}=l,r=e&&u?e.offset>u.offset?e:u:e??u;r&&(!t||t.offset<r.offset)&&c(r,"MISSING_CHAR","Missing newline after block sequence props")}let f="block-map"===o.type?"map":"block-seq"===o.type?"seq":"{"===o.start.source?"map":"seq";if(!u||!p||"!"===p||p===r.YAMLMap.tagName&&"map"===f||p===n.YAMLSeq.tagName&&"seq"===f)return a(s,i,o,c,p);let h=i.schema.tags.find(e=>e.tag===p&&e.collection===f);if(!h){let e=i.schema.knownTags[p];if(e?.collection!==f)return e?c(u,"BAD_COLLECTION_TYPE",`${e.tag} used for ${f} collection, but expects ${e.collection??"scalar"}`,!0):c(u,"TAG_RESOLVE_FAILED",`Unresolved tag: ${p}`,!0),a(s,i,o,c,p);i.schema.tags.push(Object.assign({},e,{default:!1})),h=e}let d=a(s,i,o,c,p,h),g=h.resolve?.(d,e=>c(u,"TAG_RESOLVE_FAILED",e),i.options)??d,m=e.isNode(g)?g:new t.Scalar(g);return m.range=d.range,m.tag=p,h?.format&&(m.format=h.format),m},nD}(),n=function(){if(eu)return nX;eu=1;var e=rg(),t=rP(),r=nz(),n=n0();return nX.composeScalar=function(s,i,o,a){let l,c,{value:u,type:p,comment:f,range:h}="block-scalar"===i.type?r.resolveBlockScalar(s,i,a):n.resolveFlowScalar(i,s.options.strict,a),d=o?s.directives.tagName(o.source,e=>a(o,"TAG_RESOLVE_FAILED",e)):null;l=s.options.stringKeys&&s.atKey?s.schema[e.SCALAR]:d?function(t,r,n,s,i){if("!"===n)return t[e.SCALAR];let o=[];for(let e of t.tags)if(!e.collection&&e.tag===n)if(!e.default||!e.test)return e;else o.push(e);for(let e of o)if(e.test?.test(r))return e;let a=t.knownTags[n];return a&&!a.collection?(t.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,"tag:yaml.org,2002:str"!==n),t[e.SCALAR])}(s.schema,u,d,o,a):"scalar"===i.type?function({atKey:t,directives:r,schema:n},s,i,o){let a=n.tags.find(e=>(!0===e.default||t&&"key"===e.default)&&e.test?.test(s))||n[e.SCALAR];if(n.compat){let t=n.compat.find(e=>e.default&&e.test?.test(s))??n[e.SCALAR];if(a.tag!==t.tag){let e=r.tagString(a.tag),n=r.tagString(t.tag);o(i,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${e} or ${n}`,!0)}}return a}(s,u,i,a):s.schema[e.SCALAR];try{let r=l.resolve(u,e=>a(o??i,"TAG_RESOLVE_FAILED",e),s.options);c=e.isScalar(r)?r:new t.Scalar(r)}catch(e){a(o??i,"TAG_RESOLVE_FAILED",e instanceof Error?e.message:String(e)),c=new t.Scalar(u)}return c.range=h,c.source=u,p&&(c.type=p),d&&(c.tag=d),l.format&&(c.format=l.format),f&&(c.comment=f),c},nX}(),s=nV(),i=(ep||(ep=1,n1.emptyScalarPosition=function(e,t,r){if(t){r??(r=t.length);for(let n=r-1;n>=0;--n){let r=t[n];switch(r.type){case"space":case"comment":case"newline":e-=r.source.length;continue}for(r=t[++n];r?.type==="space";)e+=r.source.length,r=t[++n];break}}return e}),n1);let o={composeNode:a,composeEmptyNode:l};function a(i,a,c,u){let p,f=i.atKey,{spaceBefore:h,comment:d,anchor:g,tag:m}=c,y=!0;switch(a.type){case"alias":p=function({options:t},{offset:r,source:n,end:i},o){let a=new e.Alias(n.substring(1));""===a.source&&o(r,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&o(r+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let l=r+n.length,c=s.resolveEnd(i,l,t.strict,o);return a.range=[r,l,c.offset],c.comment&&(a.comment=c.comment),a}(i,a,u),(g||m)&&u(a,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":p=n.composeScalar(i,a,m,u),g&&(p.anchor=g.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{p=r.composeCollection(o,i,a,c,u),g&&(p.anchor=g.source.substring(1))}catch(e){u(a,"RESOURCE_EXHAUSTION",e instanceof Error?e.message:String(e))}break;default:{let e="error"===a.type?a.message:`Unsupported token (type: ${a.type})`;u(a,"UNEXPECTED_TOKEN",e),y=!1}}return p??(p=l(i,a.offset,void 0,null,c,u)),g&&""===p.anchor&&u(g,"BAD_ALIAS","Anchor cannot be an empty string"),f&&i.options.stringKeys&&(!t.isScalar(p)||"string"!=typeof p.value||p.tag&&"tag:yaml.org,2002:str"!==p.tag)&&u(m??a,"NON_STRING_KEY","With stringKeys, all keys must be strings"),h&&(p.spaceBefore=!0),d&&("scalar"===a.type&&""===a.source?p.comment=d:p.commentBefore=d),i.options.keepSourceTokens&&y&&(p.srcToken=a),p}function l(e,t,r,s,{spaceBefore:o,comment:a,anchor:c,tag:u,end:p},f){let h={type:"scalar",offset:i.emptyScalarPosition(t,r,s),indent:-1,source:""},d=n.composeScalar(e,h,u,f);return c&&(d.anchor=c.source.substring(1),""===d.anchor&&f(c,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(d.spaceBefore=!0),a&&(d.comment=a,d.range[2]=p),d}return nj.composeEmptyNode=l,nj.composeNode=a,nj}(),r=nV(),n=nF();return n$.composeDoc=function(s,i,{offset:o,start:a,value:l,end:c},u){let p=Object.assign({_directives:i},s),f=new e.Document(void 0,p),h={atKey:!1,atRoot:!0,directives:f.directives,options:f.options,schema:f.schema},d=n.resolveProps(a,{indicator:"doc-start",next:l??c?.[0],offset:o,onError:u,parentIndent:0,startOnNewline:!0});d.found&&(f.directives.docStart=!0,l&&("block-map"===l.type||"block-seq"===l.type)&&!d.hasNewline&&u(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),f.contents=l?t.composeNode(h,l,d,u):t.composeEmptyNode(h,d.end,a,null,d,u);let g=f.contents.range[2],m=r.resolveEnd(c,g,!1,u);return m.comment&&(f.comment=m.comment),f.range=[o,g,m.offset],f},n$}(),i=nV();function o(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];let{offset:t,source:r}=e;return[t,t+("string"==typeof r?r.length:1)]}function a(e){let t="",r=!1,n=!1;for(let s=0;s<e.length;++s){let i=e[s];switch(i[0]){case"#":t+=(""===t?"":n?"\n\n":"\n")+(i.substring(1)||" "),r=!0,n=!1;break;case"%":e[s+1]?.[0]!=="#"&&(s+=1),r=!1;break;default:r||(n=!0),r=!1}}return{comment:t,afterEmptyLine:n}}return rp.Composer=class{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,s)=>{let i=o(e);s?this.warnings.push(new r.YAMLWarning(i,t,n)):this.errors.push(new r.YAMLParseError(i,t,n))},this.directives=new e.Directives({version:t.version||"1.2"}),this.options=t}decorate(e,t){let{comment:r,afterEmptyLine:s}=a(this.prelude);if(r){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}
22
22
  ${r}`:r;else if(s||e.directives.docStart||!i)e.commentBefore=r;else if(n.isCollection(i)&&!i.flow&&i.items.length>0){let e=i.items[0];n.isPair(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${r}
23
23
  ${t}`:r}else{let e=i.commentBefore;i.commentBefore=e?`${r}
24
- ${e}`:r}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:a(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(let t of e)yield*this.next(t);yield*this.end(t,r)}*next(e){switch(rd.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,r,n)=>{let s=o(e);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",r,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=s.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new r.YAMLParseError(o(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){this.errors.push(new r.YAMLParseError(o(e),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let t=i.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}
25
- ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new r.YAMLParseError(o(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=Object.assign({_directives:this.directives},this.options),n=new t.Document(void 0,e);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,r,r],this.decorate(n,!1),yield n}}},rf}var n3={},n6={},n8={},n4={};function n5(){if(eg)return n3;eg=1;var e=function(){if(ed)return n6;ed=1;var e=nZ(),t=n1(),r=nP(),n=rY();function s(e,t){if(t)for(let r of t)switch(r.type){case"space":case"comment":e.push(r);break;case"newline":return e.push(r),!0}return!1}function i(e,t,r){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=r,e.source=t;break;case"block-scalar":{let n=e.props.slice(1),s=t.length;for(let t of("block-scalar-header"===e.props[0].type&&(s-=e.props[0].source.length),n))t.offset+=s;delete e.props,Object.assign(e,{type:r,source:t,end:n});break}case"block-map":case"block-seq":{let n={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:r,source:t,end:[n]});break}default:{let n="indent"in e?e.indent:-1,s="end"in e&&Array.isArray(e.end)?e.end.filter(e=>"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(let t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:r,indent:n,source:t,end:s})}}}return n6.createScalarToken=function(e,t){let{implicitKey:r=!1,indent:i,inFlow:o=!1,offset:a=-1,type:l="PLAIN"}=t,c=n.stringifyString({type:l,value:e},{implicitKey:r,indent:i>0?" ".repeat(i):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),u=t.end??[{type:"newline",offset:-1,indent:i,source:"\n"}];switch(c[0]){case"|":case">":{let e=c.indexOf("\n"),t=c.substring(0,e),r=c.substring(e+1)+"\n",n=[{type:"block-scalar-header",offset:a,indent:i,source:t}];return s(n,u)||n.push({type:"newline",offset:-1,indent:i,source:"\n"}),{type:"block-scalar",offset:a,indent:i,props:n,source:r}}case'"':return{type:"double-quoted-scalar",offset:a,indent:i,source:c,end:u};case"'":return{type:"single-quoted-scalar",offset:a,indent:i,source:c,end:u};default:return{type:"scalar",offset:a,indent:i,source:c,end:u}}},n6.resolveAsScalar=function(n,s=!0,i){if(n){let o=(e,t,n)=>{let s="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(i)i(s,t,n);else throw new r.YAMLParseError([s,s+1],t,n)};switch(n.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return t.resolveFlowScalar(n,s,o);case"block-scalar":return e.resolveBlockScalar({options:{strict:s}},n,o)}}return null},n6.setScalarValue=function(e,t,r={}){let{afterKey:o=!1,implicitKey:a=!1,inFlow:l=!1,type:c}=r,u="indent"in e?e.indent:null;if(o&&"number"==typeof u&&(u+=2),!c)switch(e.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{let t=e.props[0];if("block-scalar-header"!==t.type)throw Error("Invalid block scalar header");c=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}let p=n.stringifyString({type:c,value:t},{implicitKey:a||null===u,indent:null!==u&&u>0?" ".repeat(u):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}});switch(p[0]){case"|":case">":!function(e,t){let r=t.indexOf("\n"),n=t.substring(0,r),i=t.substring(r+1)+"\n";if("block-scalar"===e.type){let t=e.props[0];if("block-scalar-header"!==t.type)throw Error("Invalid block scalar header");t.source=n,e.source=i}else{let{offset:t}=e,r="indent"in e?e.indent:-1,o=[{type:"block-scalar-header",offset:t,indent:r,source:n}];for(let t of(s(o,"end"in e?e.end:void 0)||o.push({type:"newline",offset:-1,indent:r,source:"\n"}),Object.keys(e)))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:r,props:o,source:i})}}(e,p);break;case'"':i(e,p,"double-quoted-scalar");break;case"'":i(e,p,"single-quoted-scalar");break;default:i(e,p,"scalar")}},n6}(),t=function(){if(eh)return n8;function e(r){switch(r.type){case"block-scalar":{let t="";for(let n of r.props)t+=e(n);return t+r.source}case"block-map":case"block-seq":{let e="";for(let n of r.items)e+=t(n);return e}case"flow-collection":{let e=r.start.source;for(let n of r.items)e+=t(n);for(let t of r.end)e+=t.source;return e}case"document":{let e=t(r);if(r.end)for(let t of r.end)e+=t.source;return e}default:{let e=r.source;if("end"in r&&r.end)for(let t of r.end)e+=t.source;return e}}}function t({start:r,key:n,sep:s,value:i}){let o="";for(let e of r)o+=e.source;if(n&&(o+=e(n)),s)for(let e of s)o+=e.source;return i&&(o+=e(i)),o}return eh=1,n8.stringify=r=>"type"in r?e(r):t(r),n8}(),r=function(){if(em)return n4;em=1;let e=Symbol("break visit"),t=Symbol("skip children"),r=Symbol("remove item");function n(t,n){"type"in t&&"document"===t.type&&(t={start:t.start,value:t.value}),function t(n,s,i){let o=i(s,n);if("symbol"==typeof o)return o;for(let a of["key","value"]){let l=s[a];if(l&&"items"in l){for(let s=0;s<l.items.length;++s){let o=t(Object.freeze(n.concat([[a,s]])),l.items[s],i);if("number"==typeof o)s=o-1;else{if(o===e)return e;o===r&&(l.items.splice(s,1),s-=1)}}"function"==typeof o&&"key"===a&&(o=o(s,n))}}return"function"==typeof o?o(s,n):o}(Object.freeze([]),t,n)}return n.BREAK=e,n.SKIP=t,n.REMOVE=r,n.itemAtPath=(e,t)=>{let r=e;for(let[e,n]of t){let t=r?.[e];if(!t||!("items"in t))return;r=t.items[n]}return r},n.parentCollection=(e,t)=>{let r=n.itemAtPath(e,t.slice(0,-1)),s=t[t.length-1][0],i=r?.[s];if(i&&"items"in i)return i;throw Error("Parent collection not found")},n4.visit=n,n4}();return n3.createScalarToken=e.createScalarToken,n3.resolveAsScalar=e.resolveAsScalar,n3.setScalarValue=e.setScalarValue,n3.stringify=t.stringify,n3.visit=r.visit,n3.BOM="\uFEFF",n3.DOCUMENT="\x02",n3.FLOW_END="\x18",n3.SCALAR="\x1f",n3.isCollection=e=>!!e&&"items"in e,n3.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),n3.prettyToken=function(e){switch(e){case"\uFEFF":return"<BOM>";case"\x02":return"<DOC>";case"\x18":return"<FLOW_END>";case"\x1f":return"<SCALAR>";default:return JSON.stringify(e)}},n3.tokenType=function(e){switch(e){case"\uFEFF":return"byte-order-mark";case"\x02":return"doc-mode";case"\x18":return"flow-error-end";case"\x1f":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null},n3}var n7={};function se(){if(ey)return n7;ey=1;var e=n5();function r(e){switch(e){case void 0:case" ":case"\n":case"\r":case" ":return!0;default:return!1}}let n=new t("0123456789ABCDEFabcdef"),s=new t("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),i=new t(",[]{}"),o=new t(" ,[]{}\n\r "),a=e=>!e||o.has(e);return n7.Lexer=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=this.next??"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||" "===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;" "===t;)t=this.buffer[++r+e];if("\r"===t){let t=this.buffer[r+e+1];if("\n"===t||!t&&!this.atEnd)return e+r+1}return"\n"!==t&&!(r>=this.indentNext)&&(t||this.atEnd)?-1:e+r}if("-"===t||"."===t){let t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&r(this.buffer[e+3]))return -1}return e}getLine(){let e=this.lineEndPos;return(("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e)?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(null===t)return this.setNext("stream");if(t[0]===e.BOM&&(yield*this.pushCount(1),t=t.substring(1)),"%"===t[0]){let e=t.length,r=t.indexOf("#");for(;-1!==r;){let n=t[r-1];if(" "===n||" "===n){e=r-1;break}r=t.indexOf("#",r+1)}for(;;){let r=t[e-1];if(" "===r||" "===r)e-=1;else break}let n=(yield*this.pushCount(e))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let e=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-e),yield*this.pushNewline(),"stream"}return yield e.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let e=this.peek(3);if(("---"===e||"..."===e)&&r(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!r(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&r(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(a),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,s=-1;do(t=yield*this.pushNewline())>0?(n=yield*this.pushSpaces(!1),this.indentValue=s=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);let i=this.getLine();if(null===i)return this.setNext("flow");if((-1!==s&&s<this.indentNext&&"#"!==i[0]||0===s&&(i.startsWith("---")||i.startsWith("..."))&&r(i[3]))&&(s!==this.indentNext-1||1!==this.flowLevel||"]"!==i[0]&&"}"!==i[0]))return this.flowLevel=0,yield e.FLOW_END,yield*this.parseLineStart();let o=0;for(;","===i[o];)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i[o+=yield*this.pushIndicators()]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(a),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let e=this.charAt(1);if(this.flowKey||r(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}let r=this.buffer.substring(0,t),n=r.indexOf("\n",this.pos);if(-1!==n){for(;-1!==n;){let e=this.continueScalar(n+1);if(-1===e)break;n=r.indexOf("\n",e)}-1!==n&&(t=n-("\r"===r[n-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil(e=>r(e)||"#"===e)}*parseBlockScalar(){let t,r=this.pos-1,n=0;e:for(let e=this.pos;t=this.buffer[e];++e)switch(t){case" ":n+=1;break;case"\n":r=e,n=0;break;case"\r":{let t=this.buffer[e+1];if(!t&&!this.atEnd)return this.setNext("block-scalar");if("\n"===t)break}default:break e}if(!t&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=n:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{let e=this.continueScalar(r+1);if(-1===e)break;r=this.buffer.indexOf("\n",e)}while(-1!==r);if(-1===r){if(!this.atEnd)return this.setNext("block-scalar");r=this.buffer.length}}let s=r+1;for(t=this.buffer[s];" "===t;)t=this.buffer[++s];if(" "===t){for(;" "===t||" "===t||"\r"===t||"\n"===t;)t=this.buffer[++s];r=s-1}else if(!this.blockScalarKeep)for(;;){let e=r-1,t=this.buffer[e];"\r"===t&&(t=this.buffer[--e]);let s=e;for(;" "===t;)t=this.buffer[--e];if("\n"===t&&e>=this.pos&&e+1+n>s)r=e;else break}return yield e.SCALAR,yield*this.pushToIndex(r+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let t,n=this.flowLevel>0,s=this.pos-1,o=this.pos-1;for(;t=this.buffer[++o];)if(":"===t){let e=this.buffer[o+1];if(r(e)||n&&i.has(e))break;s=o}else if(r(t)){let e=this.buffer[o+1];if("\r"===t&&("\n"===e?(o+=1,t="\n",e=this.buffer[o+1]):s=o),"#"===e||n&&i.has(e))break;if("\n"===t){let e=this.continueScalar(o+1);if(-1===e)break;o=Math.max(o,e-2)}}else{if(n&&i.has(t))break;s=o}return t||this.atEnd?(yield e.SCALAR,yield*this.pushToIndex(s+1,!0),n?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){let e=0;for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue;case"&":e+=yield*this.pushUntil(a),e+=yield*this.pushSpaces(!0);continue;case"-":case"?":case":":{let t=this.flowLevel>0,n=this.charAt(1);if(r(n)||t&&i.has(n)){t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue}}}break}return e}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!r(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(s.has(t))t=this.buffer[++e];else if("%"===t&&n.has(this.buffer[e+1])&&n.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,r=this.pos-1;do t=this.buffer[++r];while(" "===t||e&&" "===t);let n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},n7}var st={};function sr(){return eb||(eb=1,st.LineCounter=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t<r;){let n=t+r>>1;this.lineStarts[n]<e?t=n+1:r=n}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(0===t)return{line:0,col:e};let n=this.lineStarts[t-1];return{line:t,col:e-n+1}}}}),st}var sn={};function ss(){if(ek)return sn;ek=1;var e=n5(),t=se();function r(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function n(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return -1}function s(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function i(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function o(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function a(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let r=0;r<t.length;++r)e.push(t[r])}function l(e){if("flow-seq-start"===e.start.type)for(let t of e.items)!t.sep||t.value||r(t.start,"explicit-key-ind")||r(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,s(t.value)?t.value.end?a(t.value.end,t.sep):t.value.end=t.sep:a(t.start,t.sep),delete t.sep)}return sn.Parser=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new t.Lexer,this.onNewLine=e}*parse(e,t=!1){for(let r of(this.onNewLine&&0===this.offset&&this.onNewLine(0),this.lexer.lex(e,t)))yield*this.next(r);t||(yield*this.end())}*next(t){if(this.source=t,rd.env.LOG_TOKENS&&console.log("|",e.prettyToken(t)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}let r=e.tokenType(t);if(r)if("scalar"===r)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&" "===t[0]&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{let e=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:e,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if("doc-end"===this.type&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{let e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&l(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{let r=e.items[e.items.length-1];if(r.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(r.sep)r.value=t;else{Object.assign(r,{key:t,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{let r=e.items[e.items.length-1];r.value?e.items.push({start:[],value:t}):r.value=t;break}case"flow-collection":{let r=e.items[e.items.length-1];!r||r.value?e.items.push({start:[],key:t,sep:[]}):r.sep?r.value=t:Object.assign(r,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if(("document"===e.type||"block-map"===e.type||"block-seq"===e.type)&&("block-map"===t.type||"block-seq"===t.type)){let r=t.items[t.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&-1===n(r.start)&&(0===t.indent||r.start.every(e=>"comment"!==e.type||e.indent<t.indent))&&("document"===e.type?e.end=r.start:e.items.push({start:r.start}),t.items.splice(-1,1))}}else yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};"doc-start"===this.type&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":-1!==n(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return;case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){let t,r=o(i(this.peek(2)));e.end?((t=e.end).push(this.sourceToken),delete e.end):t=[this.sourceToken];let n={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:t}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=n}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let r="end"in t.value?t.value.end:void 0,n=Array.isArray(r)?r[r.length-1]:void 0;n?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let r=e.items[e.items.length-2],n=r?.value?.end;if(Array.isArray(n)){a(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,i=n&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type,a=[];if(i&&t.sep&&!t.value){let r=[];for(let n=0;n<t.sep.length;++n){let s=t.sep[n];switch(s.type){case"newline":r.push(n);break;case"space":break;case"comment":s.indent>e.indent&&(r.length=0);break;default:r.length=0}}r.length>=2&&(a=t.sep.splice(r[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(a.push(this.sourceToken),e.items.push({start:a}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":t.sep||t.explicitKey?i||t.value?(a.push(this.sourceToken),e.items.push({start:a,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(r(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]});else if(s(t.key)&&!r(t.sep,"newline")){let e=o(t.start),r=t.key,n=t.sep;n.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:r,sep:n}]})}else a.length>0?t.sep=t.sep.concat(a,this.sourceToken):t.sep.push(this.sourceToken);else if(r(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=o(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:a,key:null,sep:[this.sourceToken]}):r(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let r=this.flowScalar(this.type);i||t.value?(e.items.push({start:a,key:r,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(r):(Object.assign(t,{key:r,sep:[]}),this.onKeyLine=!0);return}default:{let s=this.startBlockValue(e);if(s){if("block-seq"===s.type){if(!t.explicitKey&&t.sep&&!r(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else n&&e.items.push({start:a});this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let r="end"in t.value?t.value.end:void 0,n=Array.isArray(r)?r[r.length-1]:void 0;n?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let r=e.items[e.items.length-2],n=r?.value?.end;if(Array.isArray(n)){a(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||r(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do yield*this.pop(),e=this.peek(1);while(e?.type==="flow-collection")}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let r=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:r,sep:[]}):t.sep?this.stack.push(r):Object.assign(t,{key:r,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if("block-map"!==t.type||("map-value-ind"!==this.type||t.indent!==e.indent)&&("newline"!==this.type||t.items[t.items.length-1].sep))if("map-value-ind"===this.type&&"flow-collection"!==t.type){let r=o(i(t));l(e);let n=e.end.splice(1,e.end.length);n.push(this.sourceToken);let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e);else yield*this.pop(),yield*this.step()}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=o(i(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=o(i(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every(e=>"newline"===e.type||"space"===e.type)}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}},sn}var si={},so=function(){if(ew)return rp;ew=1;var e=n9(),t=n_(),r=nN(),n=nP(),s=rN(),i=rg(),o=rz(),a=rP(),l=r3(),c=r5(),u=n5(),p=se(),f=sr(),d=ss(),h=function(){if(ev)return si;ev=1;var e=n9(),t=n_(),r=nP(),n=rG(),s=rg(),i=sr(),o=ss();function a(e){let t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new i.LineCounter||null,prettyErrors:t}}function l(t,n={}){let{lineCounter:s,prettyErrors:i}=a(n),c=new o.Parser(s?.addNewLine),u=new e.Composer(n),p=null;for(let e of u.compose(c.parse(t),!0,t.length))if(p){if("silent"!==p.options.logLevel){p.errors.push(new r.YAMLParseError(e.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else p=e;return i&&s&&(p.errors.forEach(r.prettifyError(t,s)),p.warnings.forEach(r.prettifyError(t,s))),p}return si.parse=function(e,t,r){let s;"function"==typeof t?s=t:void 0===r&&t&&"object"==typeof t&&(r=t);let i=l(e,r);if(!i)return null;if(i.warnings.forEach(e=>n.warn(i.options.logLevel,e)),i.errors.length>0)if("silent"!==i.options.logLevel)throw i.errors[0];else i.errors=[];return i.toJS(Object.assign({reviver:s},r))},si.parseAllDocuments=function(t,n={}){let{lineCounter:s,prettyErrors:i}=a(n),l=new o.Parser(s?.addNewLine),c=new e.Composer(n),u=Array.from(c.compose(l.parse(t)));if(i&&s)for(let e of u)e.errors.forEach(r.prettifyError(t,s)),e.warnings.forEach(r.prettifyError(t,s));return u.length>0?u:Object.assign([],{empty:!0},c.streamInfo())},si.parseDocument=l,si.stringify=function(e,r,n){let i=null;if("function"==typeof r||Array.isArray(r)?i=r:void 0===n&&r&&(n=r),"string"==typeof n&&(n=n.length),"number"==typeof n){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){let{keepUndefined:e}=n??r??{};if(!e)return}return s.isDocument(e)&&!i?e.toString(n):new t.Document(e,i,n).toString(n)},si}(),m=rb();return rp.Composer=e.Composer,rp.Document=t.Document,rp.Schema=r.Schema,rp.YAMLError=n.YAMLError,rp.YAMLParseError=n.YAMLParseError,rp.YAMLWarning=n.YAMLWarning,rp.Alias=s.Alias,rp.isAlias=i.isAlias,rp.isCollection=i.isCollection,rp.isDocument=i.isDocument,rp.isMap=i.isMap,rp.isNode=i.isNode,rp.isPair=i.isPair,rp.isScalar=i.isScalar,rp.isSeq=i.isSeq,rp.Pair=o.Pair,rp.Scalar=a.Scalar,rp.YAMLMap=l.YAMLMap,rp.YAMLSeq=c.YAMLSeq,rp.CST=u,rp.Lexer=p.Lexer,rp.LineCounter=f.LineCounter,rp.Parser=d.Parser,rp.parse=h.parse,rp.parseAllDocuments=h.parseAllDocuments,rp.parseDocument=h.parseDocument,rp.stringify=h.stringify,rp.visit=m.visit,rp.visitAsync=m.visitAsync,rp}(),sa=eD.a(so);let sl={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ExportAllDeclaration:["exported","source","attributes"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportAttribute:["key","value"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportExpression:["source","options"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]};for(let e of Object.keys(sl))Object.freeze(sl[e]);function sc(e){return su(e,null)}function su(e,t){return sp[e.type](e,t)}Object.freeze(sl);let sp={Program:e=>0===e.body.length?null:1===e.body.length?sp.YAMLDocument(e.body[0]):e.body.map(e=>sp.YAMLDocument(e)),YAMLDocument:e=>e.content?su(e.content,e.version):null,YAMLMapping(e,t){let r={};for(let n of e.pairs){let e="1.1"===t&&function(e){let t=e.key;return null!=e.value&&null!=t&&"YAMLScalar"===t.type&&"plain"===t.style&&"<<"===t.strValue}(n)?function(e){if(Array.isArray(e)){let t=[];for(let r of e){if(!sf(r))return null;t.push(r)}return t}return sf(e)?[e]:null}(su(n.value,t)):null;if(e)for(let t of e)for(let e of Object.keys(t))Object.prototype.hasOwnProperty.call(r,e)||(r[e]=t[e]);else Object.assign(r,su(n,t))}return r},YAMLPair(e,t){let r={},n=e.key?su(e.key,t):null;return"string"!=typeof n&&"number"!=typeof n&&(n=String(n)),r[n]=e.value?su(e.value,t):null,r},YAMLSequence(e,t){let r=[];for(let n of e.entries)r.push(n?su(n,t):null);return r},YAMLScalar:e=>e.value,YAMLAlias(e,t){let r=function(e){let t=e.parent,r=null;for(;t;){if("YAMLDocument"===t.type){r=t;break}t=t.parent}let n=r.anchors[e.name];if(!n)return null;let s={anchor:null,distance:1/0};for(let t of n)if(t.range[0]<e.range[0]){let r=e.range[0]-t.range[0];s.distance>=r&&(s={anchor:t,distance:r})}return s.anchor}(e);return r?su(r.parent,t):null},YAMLWithMeta(e,t){if(e.tag){let r=e.value;if(null==r)return sd(e.tag,"","",t);if("YAMLScalar"===r.type){if("plain"===r.style)return sd(e.tag,r.strValue,r.strValue,t);if("double-quoted"===r.style||"single-quoted"===r.style)return sd(e.tag,r.raw,r.strValue,t)}for(let n of sA[t||"1.2"])if(n.tag===e.tag.tag&&n.testNode(r))return n.resolveNode(r)}return null==e.value?null:su(e.value,t)}};function sf(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function sd(e,t,r,n){for(let t of sE[n||"1.2"])if(t.tag===e.tag&&t.testString(r))return t.resolveString(r);let s=e.tag.startsWith("!")?e.tag:`!<${e.tag}>`;return so.parseDocument(`${n?`%YAML ${n}`:""}
24
+ ${e}`:r}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:a(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(let t of e)yield*this.next(t);yield*this.end(t,r)}*next(e){switch(rf.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,r,n)=>{let s=o(e);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",r,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=s.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new r.YAMLParseError(o(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){this.errors.push(new r.YAMLParseError(o(e),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let t=i.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}
25
+ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new r.YAMLParseError(o(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=Object.assign({_directives:this.directives},this.options),n=new t.Document(void 0,e);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,r,r],this.decorate(n,!1),yield n}}},rp}var n3={},n9={},n6={},n4={};function n8(){if(eb)return n3;eb=1;var e=function(){if(eg)return n9;eg=1;var e=nz(),t=n0(),r=nP(),n=rK();function s(e,t){if(t)for(let r of t)switch(r.type){case"space":case"comment":e.push(r);break;case"newline":return e.push(r),!0}return!1}function i(e,t,r){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=r,e.source=t;break;case"block-scalar":{let n=e.props.slice(1),s=t.length;for(let t of("block-scalar-header"===e.props[0].type&&(s-=e.props[0].source.length),n))t.offset+=s;delete e.props,Object.assign(e,{type:r,source:t,end:n});break}case"block-map":case"block-seq":{let n={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:r,source:t,end:[n]});break}default:{let n="indent"in e?e.indent:-1,s="end"in e&&Array.isArray(e.end)?e.end.filter(e=>"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(let t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:r,indent:n,source:t,end:s})}}}return n9.createScalarToken=function(e,t){let{implicitKey:r=!1,indent:i,inFlow:o=!1,offset:a=-1,type:l="PLAIN"}=t,c=n.stringifyString({type:l,value:e},{implicitKey:r,indent:i>0?" ".repeat(i):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),u=t.end??[{type:"newline",offset:-1,indent:i,source:"\n"}];switch(c[0]){case"|":case">":{let e=c.indexOf("\n"),t=c.substring(0,e),r=c.substring(e+1)+"\n",n=[{type:"block-scalar-header",offset:a,indent:i,source:t}];return s(n,u)||n.push({type:"newline",offset:-1,indent:i,source:"\n"}),{type:"block-scalar",offset:a,indent:i,props:n,source:r}}case'"':return{type:"double-quoted-scalar",offset:a,indent:i,source:c,end:u};case"'":return{type:"single-quoted-scalar",offset:a,indent:i,source:c,end:u};default:return{type:"scalar",offset:a,indent:i,source:c,end:u}}},n9.resolveAsScalar=function(n,s=!0,i){if(n){let o=(e,t,n)=>{let s="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(i)i(s,t,n);else throw new r.YAMLParseError([s,s+1],t,n)};switch(n.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return t.resolveFlowScalar(n,s,o);case"block-scalar":return e.resolveBlockScalar({options:{strict:s}},n,o)}}return null},n9.setScalarValue=function(e,t,r={}){let{afterKey:o=!1,implicitKey:a=!1,inFlow:l=!1,type:c}=r,u="indent"in e?e.indent:null;if(o&&"number"==typeof u&&(u+=2),!c)switch(e.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{let t=e.props[0];if("block-scalar-header"!==t.type)throw Error("Invalid block scalar header");c=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}let p=n.stringifyString({type:c,value:t},{implicitKey:a||null===u,indent:null!==u&&u>0?" ".repeat(u):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}});switch(p[0]){case"|":case">":!function(e,t){let r=t.indexOf("\n"),n=t.substring(0,r),i=t.substring(r+1)+"\n";if("block-scalar"===e.type){let t=e.props[0];if("block-scalar-header"!==t.type)throw Error("Invalid block scalar header");t.source=n,e.source=i}else{let{offset:t}=e,r="indent"in e?e.indent:-1,o=[{type:"block-scalar-header",offset:t,indent:r,source:n}];for(let t of(s(o,"end"in e?e.end:void 0)||o.push({type:"newline",offset:-1,indent:r,source:"\n"}),Object.keys(e)))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:r,props:o,source:i})}}(e,p);break;case'"':i(e,p,"double-quoted-scalar");break;case"'":i(e,p,"single-quoted-scalar");break;default:i(e,p,"scalar")}},n9}(),t=function(){if(em)return n6;function e(r){switch(r.type){case"block-scalar":{let t="";for(let n of r.props)t+=e(n);return t+r.source}case"block-map":case"block-seq":{let e="";for(let n of r.items)e+=t(n);return e}case"flow-collection":{let e=r.start.source;for(let n of r.items)e+=t(n);for(let t of r.end)e+=t.source;return e}case"document":{let e=t(r);if(r.end)for(let t of r.end)e+=t.source;return e}default:{let e=r.source;if("end"in r&&r.end)for(let t of r.end)e+=t.source;return e}}}function t({start:r,key:n,sep:s,value:i}){let o="";for(let e of r)o+=e.source;if(n&&(o+=e(n)),s)for(let e of s)o+=e.source;return i&&(o+=e(i)),o}return em=1,n6.stringify=r=>"type"in r?e(r):t(r),n6}(),r=function(){if(ey)return n4;ey=1;let e=Symbol("break visit"),t=Symbol("skip children"),r=Symbol("remove item");function n(t,n){"type"in t&&"document"===t.type&&(t={start:t.start,value:t.value}),function t(n,s,i){let o=i(s,n);if("symbol"==typeof o)return o;for(let a of["key","value"]){let l=s[a];if(l&&"items"in l){for(let s=0;s<l.items.length;++s){let o=t(Object.freeze(n.concat([[a,s]])),l.items[s],i);if("number"==typeof o)s=o-1;else{if(o===e)return e;o===r&&(l.items.splice(s,1),s-=1)}}"function"==typeof o&&"key"===a&&(o=o(s,n))}}return"function"==typeof o?o(s,n):o}(Object.freeze([]),t,n)}return n.BREAK=e,n.SKIP=t,n.REMOVE=r,n.itemAtPath=(e,t)=>{let r=e;for(let[e,n]of t){let t=r?.[e];if(!t||!("items"in t))return;r=t.items[n]}return r},n.parentCollection=(e,t)=>{let r=n.itemAtPath(e,t.slice(0,-1)),s=t[t.length-1][0],i=r?.[s];if(i&&"items"in i)return i;throw Error("Parent collection not found")},n4.visit=n,n4}();return n3.createScalarToken=e.createScalarToken,n3.resolveAsScalar=e.resolveAsScalar,n3.setScalarValue=e.setScalarValue,n3.stringify=t.stringify,n3.visit=r.visit,n3.BOM="\uFEFF",n3.DOCUMENT="\x02",n3.FLOW_END="\x18",n3.SCALAR="\x1f",n3.isCollection=e=>!!e&&"items"in e,n3.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),n3.prettyToken=function(e){switch(e){case"\uFEFF":return"<BOM>";case"\x02":return"<DOC>";case"\x18":return"<FLOW_END>";case"\x1f":return"<SCALAR>";default:return JSON.stringify(e)}},n3.tokenType=function(e){switch(e){case"\uFEFF":return"byte-order-mark";case"\x02":return"doc-mode";case"\x18":return"flow-error-end";case"\x1f":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null},n3}var n5={};function n7(){if(ev)return n5;ev=1;var e=n8();function t(e){switch(e){case void 0:case" ":case"\n":case"\r":case" ":return!0;default:return!1}}let n=new r("0123456789ABCDEFabcdef"),s=new r("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),i=new r(",[]{}"),o=new r(" ,[]{}\n\r "),a=e=>!e||o.has(e);return n5.Lexer=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=this.next??"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||" "===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let r=this.buffer[e];if(this.indentNext>0){let t=0;for(;" "===r;)r=this.buffer[++t+e];if("\r"===r){let r=this.buffer[t+e+1];if("\n"===r||!r&&!this.atEnd)return e+t+1}return"\n"!==r&&!(t>=this.indentNext)&&(r||this.atEnd)?-1:e+t}if("-"===r||"."===r){let r=this.buffer.substr(e,3);if(("---"===r||"..."===r)&&t(this.buffer[e+3]))return -1}return e}getLine(){let e=this.lineEndPos;return(("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e)?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(null===t)return this.setNext("stream");if(t[0]===e.BOM&&(yield*this.pushCount(1),t=t.substring(1)),"%"===t[0]){let e=t.length,r=t.indexOf("#");for(;-1!==r;){let n=t[r-1];if(" "===n||" "===n){e=r-1;break}r=t.indexOf("#",r+1)}for(;;){let r=t[e-1];if(" "===r||" "===r)e-=1;else break}let n=(yield*this.pushCount(e))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let e=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-e),yield*this.pushNewline(),"stream"}return yield e.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let e=this.peek(3);if(("---"===e||"..."===e)&&t(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!t(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&t(r)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(a),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let r,n,s=-1;do(r=yield*this.pushNewline())>0?(n=yield*this.pushSpaces(!1),this.indentValue=s=n):n=0,n+=yield*this.pushSpaces(!0);while(r+n>0);let i=this.getLine();if(null===i)return this.setNext("flow");if((-1!==s&&s<this.indentNext&&"#"!==i[0]||0===s&&(i.startsWith("---")||i.startsWith("..."))&&t(i[3]))&&(s!==this.indentNext-1||1!==this.flowLevel||"]"!==i[0]&&"}"!==i[0]))return this.flowLevel=0,yield e.FLOW_END,yield*this.parseLineStart();let o=0;for(;","===i[o];)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i[o+=yield*this.pushIndicators()]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(a),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let e=this.charAt(1);if(this.flowKey||t(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}let r=this.buffer.substring(0,t),n=r.indexOf("\n",this.pos);if(-1!==n){for(;-1!==n;){let e=this.continueScalar(n+1);if(-1===e)break;n=r.indexOf("\n",e)}-1!==n&&(t=n-("\r"===r[n-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil(e=>t(e)||"#"===e)}*parseBlockScalar(){let t,r=this.pos-1,n=0;e:for(let e=this.pos;t=this.buffer[e];++e)switch(t){case" ":n+=1;break;case"\n":r=e,n=0;break;case"\r":{let t=this.buffer[e+1];if(!t&&!this.atEnd)return this.setNext("block-scalar");if("\n"===t)break}default:break e}if(!t&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=n:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{let e=this.continueScalar(r+1);if(-1===e)break;r=this.buffer.indexOf("\n",e)}while(-1!==r);if(-1===r){if(!this.atEnd)return this.setNext("block-scalar");r=this.buffer.length}}let s=r+1;for(t=this.buffer[s];" "===t;)t=this.buffer[++s];if(" "===t){for(;" "===t||" "===t||"\r"===t||"\n"===t;)t=this.buffer[++s];r=s-1}else if(!this.blockScalarKeep)for(;;){let e=r-1,t=this.buffer[e];"\r"===t&&(t=this.buffer[--e]);let s=e;for(;" "===t;)t=this.buffer[--e];if("\n"===t&&e>=this.pos&&e+1+n>s)r=e;else break}return yield e.SCALAR,yield*this.pushToIndex(r+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let r,n=this.flowLevel>0,s=this.pos-1,o=this.pos-1;for(;r=this.buffer[++o];)if(":"===r){let e=this.buffer[o+1];if(t(e)||n&&i.has(e))break;s=o}else if(t(r)){let e=this.buffer[o+1];if("\r"===r&&("\n"===e?(o+=1,r="\n",e=this.buffer[o+1]):s=o),"#"===e||n&&i.has(e))break;if("\n"===r){let e=this.continueScalar(o+1);if(-1===e)break;o=Math.max(o,e-2)}}else{if(n&&i.has(r))break;s=o}return r||this.atEnd?(yield e.SCALAR,yield*this.pushToIndex(s+1,!0),n?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){let e=0;for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue;case"&":e+=yield*this.pushUntil(a),e+=yield*this.pushSpaces(!0);continue;case"-":case"?":case":":{let r=this.flowLevel>0,n=this.charAt(1);if(t(n)||r&&i.has(n)){r?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue}}}break}return e}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,r=this.buffer[e];for(;!t(r)&&">"!==r;)r=this.buffer[++e];return yield*this.pushToIndex(">"===r?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(s.has(t))t=this.buffer[++e];else if("%"===t&&n.has(this.buffer[e+1])&&n.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,r=this.pos-1;do t=this.buffer[++r];while(" "===t||e&&" "===t);let n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},n5}var se={};function st(){return ek||(ek=1,se.LineCounter=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t<r;){let n=t+r>>1;this.lineStarts[n]<e?t=n+1:r=n}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(0===t)return{line:0,col:e};let n=this.lineStarts[t-1];return{line:t,col:e-n+1}}}}),se}var sr={};function sn(){if(ew)return sr;ew=1;var e=n8(),t=n7();function r(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function n(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return -1}function s(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function i(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function o(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function a(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let r=0;r<t.length;++r)e.push(t[r])}function l(e){if("flow-seq-start"===e.start.type)for(let t of e.items)!t.sep||t.value||r(t.start,"explicit-key-ind")||r(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,s(t.value)?t.value.end?a(t.value.end,t.sep):t.value.end=t.sep:a(t.start,t.sep),delete t.sep)}return sr.Parser=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new t.Lexer,this.onNewLine=e}*parse(e,t=!1){for(let r of(this.onNewLine&&0===this.offset&&this.onNewLine(0),this.lexer.lex(e,t)))yield*this.next(r);t||(yield*this.end())}*next(t){if(this.source=t,rf.env.LOG_TOKENS&&console.log("|",e.prettyToken(t)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}let r=e.tokenType(t);if(r)if("scalar"===r)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&" "===t[0]&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{let e=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:e,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if("doc-end"===this.type&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{let e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&l(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{let r=e.items[e.items.length-1];if(r.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(r.sep)r.value=t;else{Object.assign(r,{key:t,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{let r=e.items[e.items.length-1];r.value?e.items.push({start:[],value:t}):r.value=t;break}case"flow-collection":{let r=e.items[e.items.length-1];!r||r.value?e.items.push({start:[],key:t,sep:[]}):r.sep?r.value=t:Object.assign(r,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if(("document"===e.type||"block-map"===e.type||"block-seq"===e.type)&&("block-map"===t.type||"block-seq"===t.type)){let r=t.items[t.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&-1===n(r.start)&&(0===t.indent||r.start.every(e=>"comment"!==e.type||e.indent<t.indent))&&("document"===e.type?e.end=r.start:e.items.push({start:r.start}),t.items.splice(-1,1))}}else yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};"doc-start"===this.type&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":-1!==n(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return;case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){let t,r=o(i(this.peek(2)));e.end?((t=e.end).push(this.sourceToken),delete e.end):t=[this.sourceToken];let n={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:t}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=n}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let r="end"in t.value?t.value.end:void 0,n=Array.isArray(r)?r[r.length-1]:void 0;n?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let r=e.items[e.items.length-2],n=r?.value?.end;if(Array.isArray(n)){a(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,i=n&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type,a=[];if(i&&t.sep&&!t.value){let r=[];for(let n=0;n<t.sep.length;++n){let s=t.sep[n];switch(s.type){case"newline":r.push(n);break;case"space":break;case"comment":s.indent>e.indent&&(r.length=0);break;default:r.length=0}}r.length>=2&&(a=t.sep.splice(r[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(a.push(this.sourceToken),e.items.push({start:a}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":t.sep||t.explicitKey?i||t.value?(a.push(this.sourceToken),e.items.push({start:a,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(r(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]});else if(s(t.key)&&!r(t.sep,"newline")){let e=o(t.start),r=t.key,n=t.sep;n.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:r,sep:n}]})}else a.length>0?t.sep=t.sep.concat(a,this.sourceToken):t.sep.push(this.sourceToken);else if(r(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=o(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:a,key:null,sep:[this.sourceToken]}):r(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let r=this.flowScalar(this.type);i||t.value?(e.items.push({start:a,key:r,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(r):(Object.assign(t,{key:r,sep:[]}),this.onKeyLine=!0);return}default:{let s=this.startBlockValue(e);if(s){if("block-seq"===s.type){if(!t.explicitKey&&t.sep&&!r(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else n&&e.items.push({start:a});this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let r="end"in t.value?t.value.end:void 0,n=Array.isArray(r)?r[r.length-1]:void 0;n?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let r=e.items[e.items.length-2],n=r?.value?.end;if(Array.isArray(n)){a(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||r(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do yield*this.pop(),e=this.peek(1);while(e?.type==="flow-collection")}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let r=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:r,sep:[]}):t.sep?this.stack.push(r):Object.assign(t,{key:r,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if("block-map"!==t.type||("map-value-ind"!==this.type||t.indent!==e.indent)&&("newline"!==this.type||t.items[t.items.length-1].sep))if("map-value-ind"===this.type&&"flow-collection"!==t.type){let r=o(i(t));l(e);let n=e.end.splice(1,e.end.length);n.push(this.sourceToken);let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e);else yield*this.pop(),yield*this.step()}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=o(i(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=o(i(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every(e=>"newline"===e.type||"space"===e.type)}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}},sr}var ss={},si=function(){if(ex)return ru;ex=1;var e=n2(),t=n_(),r=nN(),n=nP(),s=rN(),i=rg(),o=rQ(),a=rP(),l=r3(),c=r8(),u=n8(),p=n7(),f=st(),h=sn(),d=function(){if(eS)return ss;eS=1;var e=n2(),t=n_(),r=nP(),n=rG(),s=rg(),i=st(),o=sn();function a(e){let t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new i.LineCounter||null,prettyErrors:t}}function l(t,n={}){let{lineCounter:s,prettyErrors:i}=a(n),c=new o.Parser(s?.addNewLine),u=new e.Composer(n),p=null;for(let e of u.compose(c.parse(t),!0,t.length))if(p){if("silent"!==p.options.logLevel){p.errors.push(new r.YAMLParseError(e.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else p=e;return i&&s&&(p.errors.forEach(r.prettifyError(t,s)),p.warnings.forEach(r.prettifyError(t,s))),p}return ss.parse=function(e,t,r){let s;"function"==typeof t?s=t:void 0===r&&t&&"object"==typeof t&&(r=t);let i=l(e,r);if(!i)return null;if(i.warnings.forEach(e=>n.warn(i.options.logLevel,e)),i.errors.length>0)if("silent"!==i.options.logLevel)throw i.errors[0];else i.errors=[];return i.toJS(Object.assign({reviver:s},r))},ss.parseAllDocuments=function(t,n={}){let{lineCounter:s,prettyErrors:i}=a(n),l=new o.Parser(s?.addNewLine),c=new e.Composer(n),u=Array.from(c.compose(l.parse(t)));if(i&&s)for(let e of u)e.errors.forEach(r.prettifyError(t,s)),e.warnings.forEach(r.prettifyError(t,s));return u.length>0?u:Object.assign([],{empty:!0},c.streamInfo())},ss.parseDocument=l,ss.stringify=function(e,r,n){let i=null;if("function"==typeof r||Array.isArray(r)?i=r:void 0===n&&r&&(n=r),"string"==typeof n&&(n=n.length),"number"==typeof n){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){let{keepUndefined:e}=n??r??{};if(!e)return}return s.isDocument(e)&&!i?e.toString(n):new t.Document(e,i,n).toString(n)},ss}(),g=ry();return ru.Composer=e.Composer,ru.Document=t.Document,ru.Schema=r.Schema,ru.YAMLError=n.YAMLError,ru.YAMLParseError=n.YAMLParseError,ru.YAMLWarning=n.YAMLWarning,ru.Alias=s.Alias,ru.isAlias=i.isAlias,ru.isCollection=i.isCollection,ru.isDocument=i.isDocument,ru.isMap=i.isMap,ru.isNode=i.isNode,ru.isPair=i.isPair,ru.isScalar=i.isScalar,ru.isSeq=i.isSeq,ru.Pair=o.Pair,ru.Scalar=a.Scalar,ru.YAMLMap=l.YAMLMap,ru.YAMLSeq=c.YAMLSeq,ru.CST=u,ru.Lexer=p.Lexer,ru.LineCounter=f.LineCounter,ru.Parser=h.Parser,ru.parse=d.parse,ru.parseAllDocuments=d.parseAllDocuments,ru.parseDocument=d.parseDocument,ru.stringify=d.stringify,ru.visit=g.visit,ru.visitAsync=g.visitAsync,ru}(),so=eF.a(si);let sa={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ExportAllDeclaration:["exported","source","attributes"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportAttribute:["key","value"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportExpression:["source","options"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]};for(let e of Object.keys(sa))Object.freeze(sa[e]);function sl(e){return sc(e,null)}function sc(e,t){return su[e.type](e,t)}Object.freeze(sa);let su={Program:e=>0===e.body.length?null:1===e.body.length?su.YAMLDocument(e.body[0]):e.body.map(e=>su.YAMLDocument(e)),YAMLDocument:e=>e.content?sc(e.content,e.version):null,YAMLMapping(e,t){let r={};for(let n of e.pairs){let e="1.1"===t&&function(e){let t=e.key;return null!=e.value&&null!=t&&"YAMLScalar"===t.type&&"plain"===t.style&&"<<"===t.strValue}(n)?function(e){if(Array.isArray(e)){let t=[];for(let r of e){if(!sp(r))return null;t.push(r)}return t}return sp(e)?[e]:null}(sc(n.value,t)):null;if(e)for(let t of e)for(let e of Object.keys(t))Object.prototype.hasOwnProperty.call(r,e)||(r[e]=t[e]);else Object.assign(r,sc(n,t))}return r},YAMLPair(e,t){let r={},n=e.key?sc(e.key,t):null;return"string"!=typeof n&&"number"!=typeof n&&(n=String(n)),r[n]=e.value?sc(e.value,t):null,r},YAMLSequence(e,t){let r=[];for(let n of e.entries)r.push(n?sc(n,t):null);return r},YAMLScalar:e=>e.value,YAMLAlias(e,t){let r=function(e){let t=e.parent,r=null;for(;t;){if("YAMLDocument"===t.type){r=t;break}t=t.parent}let n=r.anchors[e.name];if(!n)return null;let s={anchor:null,distance:1/0};for(let t of n)if(t.range[0]<e.range[0]){let r=e.range[0]-t.range[0];s.distance>=r&&(s={anchor:t,distance:r})}return s.anchor}(e);return r?sc(r.parent,t):null},YAMLWithMeta(e,t){if(e.tag){let r=e.value;if(null==r)return sf(e.tag,"","",t);if("YAMLScalar"===r.type){if("plain"===r.style)return sf(e.tag,r.strValue,r.strValue,t);if("double-quoted"===r.style||"single-quoted"===r.style)return sf(e.tag,r.raw,r.strValue,t)}for(let n of sE[t||"1.2"])if(n.tag===e.tag.tag&&n.testNode(r))return n.resolveNode(r)}return null==e.value?null:sc(e.value,t)}};function sp(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function sf(e,t,r,n){for(let t of sx[n||"1.2"])if(t.tag===e.tag&&t.testString(r))return t.resolveString(r);let s=e.tag.startsWith("!")?e.tag:`!<${e.tag}>`;return si.parseDocument(`${n?`%YAML ${n}`:""}
26
26
  ---
27
- ${s} ${t}`).toJSON()}let sh={tag:"tag:yaml.org,2002:omap",testNode:e=>"YAMLSequence"===e.type&&e.entries.every(e=>e?.type==="YAMLMapping"&&1===e.pairs.length),resolveNode(e){let t={};for(let r of e.entries)for(let e of r.pairs)t[e.key?sc(e.key):e.key]=e.value?sc(e.value):e.value;return t}},sm={tag:"tag:yaml.org,2002:set",testNode:e=>"YAMLMapping"===e.type&&e.pairs.every(e=>null!=e.key&&null==e.value),resolveNode(e){let t=[];for(let r of e.pairs)t.push(sc(r.key));return t}},sg={tag:"tag:yaml.org,2002:null",testString:e=>!e||"null"===e||"Null"===e||"NULL"===e||"~"===e,resolveString:()=>null},sy={tag:"tag:yaml.org,2002:float",testString:e=>/^[+-]?(?:\.inf|\.Inf|\.INF)$/u.test(e),resolveString:e=>e.startsWith("-")?-1/0:1/0},sb={tag:"tag:yaml.org,2002:float",testString:e=>".NaN"===e||".nan"===e||".NAN"===e,resolveString:()=>0/0},sk={tag:"tag:yaml.org,2002:str",testString:()=>!0,resolveString:e=>e},sv=[sg,{tag:"tag:yaml.org,2002:bool",testString:e=>"true"===e||"True"===e||"TRUE"===e,resolveString:()=>!0},{tag:"tag:yaml.org,2002:bool",testString:e=>"false"===e||"False"===e||"FALSE"===e,resolveString:()=>!1},{tag:"tag:yaml.org,2002:int",testString:e=>/^[+-]?\d+$/u.test(e),resolveString:e=>parseInt(e,10)},{tag:"tag:yaml.org,2002:int",testString:e=>/^0o[0-7]+$/u.test(e),resolveString:e=>parseInt(e.slice(2),8)},{tag:"tag:yaml.org,2002:int",testString:e=>/^0x[\dA-Fa-f]+$/u.test(e),resolveString:e=>parseInt(e.slice(2),16)},{tag:"tag:yaml.org,2002:float",testString:e=>/^[+-]?(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?$/iu.test(e),resolveString:e=>parseFloat(e)},sy,sb,sk],sw=[sh,sm];function sS(e,t,r){return e.startsWith("-")||e.startsWith("+")?parseInt(e[0]+e.slice(t+1).replace(/_/gu,""),r):parseInt(e.slice(t).replace(/_/gu,""),r)}function sx(e,t){let r=e.shift().replace(/_/gu,""),n=e.pop().replace(/_/gu,""),s=!1;(r.startsWith("-")||r.startsWith("+"))&&(s=r.startsWith("-"),r=r.slice(1));let i=parseInt(r,10);for(;e.length;)i*=60,i+=parseInt(e.shift().replace(/_/gu,""),10);return i*=60,i+=t?parseInt(n,10):parseFloat(n),s?-i:i}let sE={next:sv,"1.2":sv,"1.1":[sg,{tag:"tag:yaml.org,2002:bool",testString:e=>/^(?:y|Y|yes|Yes|YES|true|True|TRUE|on|On|ON)$/u.test(e),resolveString:()=>!0},{tag:"tag:yaml.org,2002:bool",testString:e=>/^(?:n|N|no|No|NO|false|False|FALSE|off|Off|OFF)$/u.test(e),resolveString:()=>!1},{tag:"tag:yaml.org,2002:int",testString:e=>/^[+-]?0[0-7_]+$/u.test(e),resolveString:e=>sS(e,1,8)},{tag:"tag:yaml.org,2002:int",testString:e=>/^[+-]?(?:0|[1-9][\d_]*)$/u.test(e),resolveString:e=>sS(e,0,10)},{tag:"tag:yaml.org,2002:int",testString:e=>/^[+-]?0b[01_]+$/u.test(e),resolveString:e=>sS(e,2,2)},{tag:"tag:yaml.org,2002:int",testString:e=>/^[+-]?0x[\dA-F_a-f]+$/u.test(e),resolveString:e=>sS(e,2,16)},{tag:"tag:yaml.org,2002:int",testString:e=>/^[+-]?[1-9][\d_]*(?::[0-5]?\d)+$/u.test(e),resolveString:e=>sx(e.split(/:/u),!0)},{tag:"tag:yaml.org,2002:float",testString:e=>/^[+-]?(?:\d[\d_]*)?\.[\d_]*(?:e[+-]?\d+)?$/iu.test(e)||/^[+-]?(?:\d[\d_]*)?(?:e[+-]?\d+)?$/iu.test(e),resolveString:e=>parseFloat(e.replace(/_/gu,""))},{tag:"tag:yaml.org,2002:float",testString:e=>/^[+-]?\d[\d_]*(?::[0-5]?\d)+\.[\d_]*$/u.test(e),resolveString:e=>sx(e.split(/:/u),!1)},sy,sb,sk]},sA={next:sw,"1.2":sw,"1.1":[sh,sm]},sC=so.isPair;var sT=class{constructor(e,t){this.index=0,this.array=e,this.ctx=t}first(){let e;for(;e=this.array[this.index];){if(sD(e,this.ctx)){this.index++;continue}return e}return null}consume(){let e=this.first();return e&&this.index++,e}back(){this.index--}each(e){let t;for(;t=this.consume();)e(t)}};function sO(e){return so.isMap(e)?"MAP":so.isSeq(e)?"SEQ":so.isScalar(e)?"SCALAR":so.isAlias(e)?"ALIAS":sC(e)?"PAIR":so.isDocument(e)?"DOCUMENT":"unknown"}function*sL(e,t,r,n){for(let s of t)yield function(e,t,r,n){let s,i=r.getConvertLocation(...sU(t)),o=r.code.slice(...i.range),a=t.source.trim().split(/[\t ]+/),l=a.shift();if("%YAML"===l)s={type:"YAMLDirective",value:o,kind:"YAML",version:e?e.yaml.version:t.source.slice(6).trim(),parent:n,...i};else if("%TAG"===l){let[e,t]=a;s={type:"YAMLDirective",value:o,kind:"TAG",handle:e,prefix:t,parent:n,...i}}else s={type:"YAMLDirective",value:o,kind:null,parent:n,...i};return r.addToken("Directive",i.range),s}(e,s,r,n)}function sN(e,t,r,n,s,i){var o,a,l,c,u,p,f,d,h,m,g,y;if(!r)throw n.throwError(`unknown error: AST is null. Unable to process content CST (${t.type}).`,t);if(r.srcToken!==t)throw n.throwError(`unknown error: CST is mismatched. Unable to process content CST (${t.type}: ${r.srcToken?.type}).`,t);if("block-scalar"===t.type){if(!so.isScalar(r))throw n.throwError(`unknown error: AST is not Scalar (${sO(r)}). Unable to process Scalar CST.`,t);return function(e,t,r,n,s,i){var o,a;let l,c,u,p=t.offset;for(let e of t.props){if(sD(e,n)){p=e.offset+e.source.length;continue}if("block-scalar-header"===e.type){p=(c=n.addToken("Punctuator",sU(e))).range[1];continue}throw n.throwUnexpectedTokenError(e)}let f=c.value,d=r.source?(o=p+t.source.length,a=n,l=o,"\n"===a.code[l-1]&&l>1&&(l--,"\r"===a.code[l-1]&&l>1&&l--),l):n.lastSkipSpaces(t.offset,c.range[1]),h=n.getConvertLocation(c.range[0],d);if(f.startsWith(">")){u={type:"YAMLScalar",style:"folded",...m(f),value:r.source,parent:s,...h};let e=n.code.slice(p,d),t=[p+/^[^\S\n\r]*/.exec(e)[0].length,d];t[0]<t[1]&&n.addToken("BlockFolded",t)}else{u={type:"YAMLScalar",style:"literal",...m(f),value:r.source,parent:s,...h};let e=n.code.slice(p,d),t=[p+/^[^\S\n\r]*/.exec(e)[0].length,d];t[0]<t[1]&&n.addToken("BlockLiteral",t)}return sP(e,r,n,s,u,i,u);function m(e){let t=/([+-]?)(\d*)([+-]?)$/u.exec(e),r=null,n="clip";if(t){r=t[2]?Number(t[2]):null;let e=t[3]||t[1];n="+"===e?"keep":"-"===e?"strip":"clip"}return{chomping:n,indent:r}}}(e,t,r,n,s,i)}if("block-seq"===t.type){if(!so.isSeq(r))throw n.throwError(`unknown error: AST is not Seq (${sO(r)}). Unable to process Seq CST.`,t);return function(e,t,r,n,s,i){let o,a={type:"YAMLSequence",style:"block",entries:[],parent:s,...n.getConvertLocation(t.offset,t.offset)},l=[...r.items];for(let e of t.items){let t,r,s=new sT(e.start,n);for(;r=s.consume();){if("seq-item-ind"===r.type){if(t)throw n.throwUnexpectedTokenError(r);o=t=n.addToken("Punctuator",sU(r));continue}s.back();break}if(0===l.length){let t=s.first()||e.key||e.sep?.[0]||e.value;if(!t)break;throw n.throwUnexpectedTokenError(t)}a.entries.push(function(e,t,r,n,s,i,o){if(t.key)throw n.throwUnexpectedTokenError(t.key);if(t.sep)throw n.throwUnexpectedTokenError(t.sep);if(t.value){if(sC(r)){if("block-map"===t.value.type)return s$(e,t.value,r,n,s,i);if("flow-collection"===t.value.type)return s_(e,t.value,r,n,s,i);throw n.throwError(`unknown error: CST is not block-map and flow-collection (${t.value.type}). Unable to process Pair AST.`,t.value)}return sN(e,t.value,r,n,s,i)}if(!sj(r))throw n.throwError(`unknown error: AST is not Scalar and null (${sO(r)}). Unable to process empty seq item CST.`,e.first()??o);return sP(e,r,n,s,null,i,null)}(s,e,l.shift()||null,n,a,i,(a.entries[a.entries.length-1]||a).range[1]))}return sY(a,a.entries[a.entries.length-1]||o),sP(e,r,n,s,a,i,a)}(e,t,r,n,s,i)}if("block-map"===t.type){if(!so.isMap(r))throw n.throwError(`unknown error: AST is not Map and Pair (${sO(r)}). Unable to process Map CST.`,t);return s$(e,t,r,n,s,i)}if("flow-collection"===t.type)return s_(e,t,r,n,s,i);if("scalar"===t.type){if(!so.isScalar(r))throw n.throwError(`unknown error: AST is not Scalar (${sO(r)}). Unable to process Scalar CST.`,t);return function(e,t,r,n,s,i){let o,a=n.getConvertLocation(...sU(t));if(a.range[0]<a.range[1]){let l=r.source||t.source,c=function(e,t){for(let r of sE[t])if(r.testString(e))return r.resolveString(e);return e}(l,i.version||"1.2");o={type:"YAMLScalar",style:"plain",strValue:l,value:c,raw:n.code.slice(...a.range),parent:s,...a};let u=typeof c;"boolean"===u?n.addToken("Boolean",a.range):"number"===u&&isFinite(Number(c))?n.addToken("Numeric",a.range):null===c?n.addToken("Null",a.range):n.addToken("Identifier",a.range),o=sP(e,r,n,s,o,i,a)}else o=sP(e,r,n,s,null,i,a);return t.end?.forEach(e=>sR(e,n)),o}(e,t,r,n,s,i)}if("double-quoted-scalar"===t.type){let f,d,h;if(!so.isScalar(r))throw n.throwError(`unknown error: AST is not Scalar (${sO(r)}). Unable to process Scalar CST.`,t);return o=e,a=t,l=r,c=n,u=s,p=i,f=c.getConvertLocation(...sU(a)),h={type:"YAMLScalar",style:"double-quoted",strValue:d=l.source,value:d,raw:c.code.slice(...f.range),parent:u,...f},c.addToken("String",f.range),a.end?.forEach(e=>sR(e,c)),sP(o,l,c,u,h,p,h)}if("single-quoted-scalar"===t.type){let o,a,l;if(!so.isScalar(r))throw n.throwError(`unknown error: AST is not Scalar (${sO(r)}). Unable to process Scalar CST.`,t);return f=e,d=t,h=r,m=n,g=s,y=i,o=m.getConvertLocation(...sU(d)),l={type:"YAMLScalar",style:"single-quoted",strValue:a=h.source,value:a,raw:m.code.slice(...o.range),parent:g,...o},m.addToken("String",o.range),d.end?.forEach(e=>sR(e,m)),sP(f,h,m,g,l,y,l)}if("alias"===t.type){if(!so.isAlias(r))throw n.throwError(`unknown error: AST is not Alias (${sO(r)}). Unable to process Alias CST.`,t);return function(e,t,r,n){let[s,i]=sU(t),o=r.getConvertLocation(s,r.lastSkipSpaces(s,i)),a={type:"YAMLAlias",name:t.source.slice(1),parent:n,...o};r.addToken("Punctuator",[o.range[0],o.range[0]+1]);let l=[o.range[0]+1,o.range[1]];l[0]<l[1]&&r.addToken("Identifier",l);let c=e.first();if(c)throw r.throwUnexpectedTokenError(c);return t.end?.forEach(e=>sR(e,r)),a}(e,t,n,s)}throw Error(`Unsupported node: ${t.type}`)}function s$(e,t,r,n,s,i){let o,a;if(sC(r)){if(r.srcToken!==t.items[0])throw n.throwError(`unknown error: CST is mismatched. Unable to process mapping CST (${t.type}: "CollectionItem").`,t)}else if(r.srcToken!==t)throw n.throwError(`unknown error: CST is mismatched. Unable to process mapping CST (${t.type}: ${r.srcToken?.type}).`,t);let l={type:"YAMLMapping",style:"block",pairs:[],parent:s,...n.getConvertLocation(t.offset,t.offset)},c=sM(r);for(let e of t.items){let t,r=new sT(e.start,n),s=null;for(;t=r.consume();){if("explicit-key-ind"===t.type){if(s)throw n.throwUnexpectedTokenError(t);a=s=n.addToken("Punctuator",sU(t)),o??=s;continue}r.back();break}let u=c.shift();if(!u){let t=r.first()||s||e.key||e.sep?.[0]||e.value;if(!t)break;throw n.throwUnexpectedTokenError(t)}l.pairs.push(sI(s,r,e,u,n,l,i))}return(sK(l,o),sK(l,l.pairs[0]),sY(l,l.pairs[l.pairs.length-1]||a),so.isMap(r))?sP(e,r,n,s,l,i,l):l}function s_(e,t,r,n,s,i){if("flow-map-start"===t.start.type){let o=n.addToken("Punctuator",sU(t.start));if(!so.isMap(r)&&!sC(r))throw n.throwError(`unknown error: AST is not Map and Pair (${sO(r)}). Unable to process flow map CST.`,t);return function(e,t,r,n,s,i,o){let a,l,c={type:"YAMLMapping",style:"flow",pairs:[],parent:i,...s.getConvertLocation(t.range[0],r.offset)},u=sM(n);for(let e of r.items){let t,r=new sT(e.start,s),n=null;for(;t=r.consume();){if("comma"===t.type){a=s.addToken("Punctuator",sU(t));continue}if("explicit-key-ind"===t.type){if(n)throw s.throwUnexpectedTokenError(t);a=n=s.addToken("Punctuator",sU(t));continue}r.back();break}let i=u.shift();if(!i){let t=r.first()||n||e.key||e.sep?.[0]||e.value;if(!t)break;throw s.throwUnexpectedTokenError(t)}c.pairs.push(sI(n,r,e,i,s,c,o))}for(let e of r.end)if(!sD(e,s)){if("flow-map-end"===e.type){l=s.addToken("Punctuator",sU(e));continue}throw s.throwUnexpectedTokenError(e)}return(sY(c,l||c.pairs[c.pairs.length-1]||a),so.isMap(n))?sP(e,n,s,i,c,o,c):c}(e,o,t,r,n,s,i)}if("flow-seq-start"===t.start.type){let o=n.addToken("Punctuator",sU(t.start));if(!so.isSeq(r)||!r.flow)throw n.throwError(`unknown error: AST is not flow Seq (${sO(r)}). Unable to process flow seq CST.`,t);return function(e,t,r,n,s,i,o){let a,l,c={type:"YAMLSequence",style:"flow",entries:[],parent:i,...s.getConvertLocation(t.range[0],r.offset)},u=[...n.items];for(let e of r.items){let r,n=new sT(e.start,s);for(;r=n.consume();){if("comma"===r.type){a=s.addToken("Punctuator",sU(r));continue}n.back();break}if(0===u.length){let t=n.first()||e.key||e.sep?.[0]||e.value;if(!t)break;throw s.throwUnexpectedTokenError(t)}let i=u.shift();sC(i)||(e.key||e.sep)&&so.isMap(i)?c.entries.push(function(e,t,r){let n,i=null;for(;n=e.consume();){if("comma"===n.type){s.addToken("Punctuator",sU(n));continue}if("explicit-key-ind"===n.type){if(i)throw s.throwUnexpectedTokenError(n);i=s.addToken("Punctuator",sU(n));continue}e.back();break}let a=t.key??t.sep[0],l={type:"YAMLMapping",style:"block",pairs:[],parent:c,...s.getConvertLocation(i?.range[0]??a.offset,i?.range[1]??a.offset)},u=sI(i,e,t,sM(r)[0],s,l,o);return l.pairs.push(u),sK(l,i||u),sY(l,u||i),l}(n,e,i)):c.entries.push(function(e,t,r,n,s,i,o){if(t)return sN(e,t,r,n,s,i);if(!sj(r))throw n.throwError(`unknown error: AST is not Scalar and null (${sO(r)}). Unable to process empty seq item CST.`,e.first()??o);return sP(e,r,n,s,null,i,null)}(n,e.value||null,i||null,s,c,o,(c.entries[c.entries.length-1]||a||t).range[1]))}for(let e of r.end)if(!sD(e,s)){if("flow-seq-end"===e.type){l=s.addToken("Punctuator",sU(e));continue}throw s.throwUnexpectedTokenError(e)}return sY(c,l||c.entries[c.entries.length-1]||a),sP(e,n,s,i,c,o,c)}(e,o,t,r,n,s,i)}throw n.throwUnexpectedTokenError(t.start)}function sI(e,t,r,n,s,i,o){let a,l,c=e?.range[0]??t.first()?.offset??r.key?.offset??r.sep?.[0]?.offset??r.value?.offset??-1,u={type:"YAMLPair",key:null,value:null,parent:i,...s.getConvertLocation(c,c)};u.key=function(e,t,r,n,s,i,o){if(t)return sN(e,t,r,n,s,i);if(!sj(r))throw n.throwError(`unknown error: AST is not Scalar and null (${sO(r)}). Unable to process empty map key CST.`,e.first()??o);return sP(e,r,n,s,null,i,null)}(t,r.key||null,n.key,s,u,o,c);let p=new sT(r.sep||[],s);for(;l=p.consume();){if("map-value-ind"===l.type){if(a)throw s.throwUnexpectedTokenError(l);a=s.addToken("Punctuator",sU(l));continue}p.back();break}return u.value=function(e,t,r,n,s,i,o){if(t)return sN(e,t,r,n,s,i);if(!sj(r))throw n.throwError(`unknown error: AST is not Scalar and null (${sO(r)}). Unable to process empty map value CST.`,e.first()??o);return sP(e,r,n,s,null,i,null)}(p,r.value||null,n.value,s,u,o,c),sY(u,u.value||a||u.key||e),u}function sP(e,t,r,n,s,i,o){let a=null;function l(e){var t;return a||(a={type:"YAMLWithMeta",anchor:null,tag:null,value:s,parent:n,...o?{range:[...o.range],loc:{start:sq((t=o.loc).start),end:sq(t.end)}}:r.getConvertLocation(...sU(e))},s&&(s.parent=a)),a}return e.each(e=>{var n,s,o,a,c,u,p,f;if("anchor"===e.type){let t,c,u,p,f,d=l(e),h=(n=e,s=r,o=d,a=i,t=n.source.slice(1),u={type:"YAMLAnchor",name:t,parent:o,...c=s.getConvertLocation(...sU(n))},(a.anchors[t]||(a.anchors[t]=[])).push(u),p=[c.range[0],c.range[0]+1],s.addToken("Punctuator",p),(f=[p[1],c.range[1]])[0]<f[1]&&s.addToken("Identifier",f),u);d.anchor=h,sK(d,h),sY(d,h)}else if("tag"===e.type){let n,s,i,o,a,d,h=l(e),m=(c=e,u=t?.tag??null,p=r,f=h,n=c.source.startsWith("!!")?2:1,"!"===(s=u??c.source.slice(n))&&(s="tag:yaml.org,2002:str"),i=p.getConvertLocation(...sU(c)),o={type:"YAMLTag",tag:s,raw:c.source,parent:f,...i},a=[i.range[0],i.range[0]+n],p.addToken("Punctuator",a),(d=[a[1],i.range[1]])[0]<d[1]&&p.addToken("Identifier",d),o);h.tag=m,sK(h,m),sY(h,m)}else throw r.throwUnexpectedTokenError(e)}),a||s}function sj(e){return so.isScalar(e)||null==e}function sM(e){return so.isMap(e)?[...e.items]:[e]}function sD(e,t){if("space"===e.type||"newline"===e.type)return!0;if("flow-error-end"===e.type||"error"===e.type)throw t.throwUnexpectedTokenError(e);if("comment"===e.type){let r={type:"Block",value:e.source.slice(1),...t.getConvertLocation(...sU(e))};return t.addComment(r),!0}return!1}function sR(e,t){if(!sD(e,t))throw t.throwUnexpectedTokenError(e)}function sF(e){return e.sort((e,t)=>e.range[0]>t.range[0]?1:e.range[0]<t.range[0]?-1:e.range[1]>t.range[1]?1:e.range[1]<t.range[1]?-1:0)}function sq(e){return{line:e.line,column:e.column}}function sB(e,t){let r=e.length;for(let n=t;n<r;n++)if(e[n].trim())return n;return r}function sU(e){return[e.offset,e.offset+e.source.length]}function sK(e,t){t&&t.range[0]<e.range[0]&&(e.range[0]=t.range[0],e.loc.start=sq(t.loc.start))}function sY(e,t){t&&e.range[1]<t.range[1]&&(e.range[1]=t.range[1],e.loc.end=sq(t.loc.end))}var sW=class{constructor(t,r){this.tokens=[],this.comments=[],this.locsMap=new e,this.options=function(e){if(!e)return{};let t={},r=e.defaultYAMLVersion;if("string"==typeof r||"number"==typeof r){let e=String(r);"1.2"===e||"1.1"===e?t.version=e:t.version="next"}return t}(r),this.code=t,this.lineCounter=new so.LineCounter}getLocFromIndex(e){let t=this.locsMap.get(e);if(!t){let{line:r,col:n}=this.lineCounter.linePos(e);t={line:r,column:n-1},this.locsMap.set(e,t)}return{line:t.line,column:t.column}}getConvertLocation(e,t){return{range:[e,t],loc:{start:this.getLocFromIndex(e),end:this.getLocFromIndex(t)}}}addComment(e){this.comments.push(e)}addToken(e,t){let r={type:e,value:this.code.slice(...t),...this.getConvertLocation(...t)};return this.tokens.push(r),r}throwUnexpectedTokenError(e){let t="source"in e?`'${e.source}'`:e.type;throw this.throwError(`Unexpected token: ${t}`,e)}throwError(e,t){let r="number"==typeof t?t:"offset"in t?t.offset:t.range[0],n=this.getLocFromIndex(r);throw new sQ(e,r,n.line,n.column)}lastSkipSpaces(e,t){let r=this.code;for(let n=t-1;n>=e;n--)if(r[n].trim())return n+1;return e}};function sJ(e,t){let r=new sW(e,t);return function(e,t){let{cstNodes:r}=e,n={type:"Program",body:[],comments:t.comments,sourceType:"module",tokens:t.tokens,parent:null,...t.getConvertLocation(0,t.code.length)},s=[],i=null,o=[];for(let n of r)if(!sD(n,t)){if("doc-end"===n.type){if(!i)throw t.throwUnexpectedTokenError(n);i.docEnd=n,o.push(i),i=null,n.end?.forEach(e=>sR(e,t));continue}if(i&&(o.push(i),i=null),"directive"===n.type){s.push(n);continue}if("document"===n.type){i={doc:n,node:e.nodes[o.length],directives:s},s=[];continue}throw t.throwUnexpectedTokenError(n)}if(i&&(o.push(i),i=null),s.length>0&&o.push({doc:null,node:null,directives:s}),o.length>0){let r=0;n.body=o.map(s=>{let i=function(e,{directives:t,doc:r,node:n,docEnd:s},i,o,a){let l;if(!r||!n){let r=sB(i.code,a),n=i.getConvertLocation(r,r),l={type:"YAMLDocument",directives:[],content:null,parent:o,anchors:{},version:e.streamInfo.directives.yaml.version,...n};l.directives.push(...sL(null,t,i,l));let c=l.directives[l.directives.length-1];return s&&(c=i.addToken("Marker",sU(s))),sY(l,c),l}let c=i.getConvertLocation(sB(i.code,a),n.range[1]),u={type:"YAMLDocument",directives:[],content:null,parent:o,anchors:{},version:n.directives.yaml.version,...c};u.directives.push(...sL(n.directives,t,i,u));let p=u.directives[u.directives.length-1],f=new sT(r.start,i);for(;l=f.consume();){if("doc-start"===l.type){p=i.addToken("Marker",sU(l));continue}f.back();break}return u.content=function(e,t,r,n,s){if(t)return sN(e,t,r,n,s,s);let i=e.first();if(i){if(so.isScalar(r)&&""===r.source)return sP(e,r,n,s,null,s,n.getConvertLocation(r.range[0],r.range[1]));throw n.throwUnexpectedTokenError(i)}return null}(f,r.value||null,n.contents,i,u),p=u.content||p,r.end&&r.end.forEach(e=>sR(e,i)),s&&(p=i.addToken("Marker",sU(s))),sY(u,p),u}(e,s,t,n,r);return r=i.range[1],i})}else{let r=sB(t.code,0);n.body.push({type:"YAMLDocument",directives:[],content:null,parent:n,anchors:{},version:e.streamInfo.directives.yaml.version,...t.getConvertLocation(r,r)})}sF(t.comments),sF(t.tokens);let a=n.body[n.body.length-1];return a&&sY(a,t.comments[t.comments.length-1]),n}(function(e){let{lineCounter:t}=e,r=new so.Parser(t.addNewLine),n=new so.Composer({...e.options,keepSourceTokens:!0,lineCounter:t}),s=[...r.parse(e.code)],i=[];for(let t of n.compose(s)){for(let r of t.errors)throw e.throwError(r.message,r.pos[0]);i.push(t)}return{nodes:i,cstNodes:s,streamInfo:n.streamInfo()}}(r),r)}let sH=function(e){let r=Object.assign({},sl);for(let n of Object.keys(e))if(Object.hasOwn(r,n)){let s=new t(e[n]);for(let e of r[n])s.add(e);r[n]=Object.freeze(Array.from(s))}else r[n]=Object.freeze(Array.from(e[n]));return Object.freeze(r)}({Program:["body"],YAMLDocument:["directives","content"],YAMLDirective:[],YAMLMapping:["pairs"],YAMLPair:["key","value"],YAMLSequence:["entries"],YAMLWithMeta:["anchor","tag","value"],YAMLScalar:[],YAMLAlias:[],YAMLAnchor:[],YAMLTag:[]});function sG(e){let t=null;return"comments"!==e&&"leadingComments"!==e&&"loc"!==e&&"parent"!==e&&"range"!==e&&"tokens"!==e&&"trailingComments"!==e&&null!==(t=this[e])&&"object"==typeof t&&("string"==typeof t.type||Array.isArray(t))}function*sV(e,t){let r=e[t];if(Array.isArray(r))for(let e of r)sX(e)&&(yield e);else sX(r)&&(yield r)}function sX(e){return null!==e&&"object"==typeof e&&"string"==typeof e.type}var sQ=class extends SyntaxError{constructor(e,t,r,n){super(e),this.index=t,this.lineNumber=r,this.column=n}},sz=(e=>{let t={};for(var r in e)ru(t,r,{get:e[r],enumerable:!0});return ru(t,Symbol.toStringTag,{value:"Module"}),t})({name:()=>sZ,version:()=>s0});let sZ="yaml-eslint-parser",s0="2.1.0";var s1=Object.freeze({__proto__:null,ParseError:sQ,VisitorKeys:sH,getStaticYAMLValue:sc,meta:sz,name:sZ,parseForESLint:function(e,t){return{ast:sJ(e,t),visitorKeys:sH,services:{isYAML:!0}}},parseYAML:sJ,traverseNodes:function(e,t){!function e(t,r,n){for(let s of(n.enterNode(t,r),((n.visitorKeys||sH)[t.type]||Object.keys(t).filter(sG,t)).filter(e=>!sV(t,e).next().done)))for(let r of sV(t,s))e(r,t,n);n.leaveNode(t,r)}(e,null,t)}});let s2=/^[A-Za-z]:\//;function s9(e=""){return e?e.replace(/\\/g,"/").replace(s2,e=>e.toUpperCase()):e}let s3=/^[/\\]{2}/,s6=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,s8=/^[A-Za-z]:$/,s4=function(e){if(0===e.length)return".";let t=(e=s9(e)).match(s3),r=it(e),n="/"===e[e.length-1];return 0===(e=ie(e,!r)).length?r?"/":n?"./":".":(n&&(e+="/"),s8.test(e)&&(e+="/"),t)?r?`//${e}`:`//./${e}`:r&&!it(e)?`/${e}`:e},s5=function(...e){let t="";for(let r of e)if(r)if(t.length>0){let e="/"===t[t.length-1],n="/"===r[0];e&&n?t+=r.slice(1):t+=e||n?r:`/${r}`}else t+=r;return s4(t)},s7=function(...e){e=e.map(e=>s9(e));let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){let s=n>=0?e[n]:"u">typeof process&&"function"==typeof process.cwd?process.cwd().replace(/\\/g,"/"):"/";s&&0!==s.length&&(t=`${s}/${t}`,r=it(s))}return(t=ie(t,!r),r&&!it(t))?`/${t}`:t.length>0?t:"."};function ie(e,t){let r="",n=0,s=-1,i=0,o=null;for(let a=0;a<=e.length;++a){if(a<e.length)o=e[a];else if("/"===o)break;else o="/";if("/"===o){if(s===a-1||1===i);else if(2===i){if(r.length<2||2!==n||"."!==r[r.length-1]||"."!==r[r.length-2]){if(r.length>2){let e=r.lastIndexOf("/");-1===e?(r="",n=0):n=(r=r.slice(0,e)).length-1-r.lastIndexOf("/"),s=a,i=0;continue}else if(r.length>0){r="",n=0,s=a,i=0;continue}}t&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+=`/${e.slice(s+1,a)}`:r=e.slice(s+1,a),n=a-s-1;s=a,i=0}else"."===o&&-1!==i?++i:i=-1}return r}let it=function(e){return s6.test(e)},ir=function(e){let t=s9(e).replace(/\/$/,"").split("/").slice(0,-1);return 1===t.length&&s8.test(t[0])&&(t[0]+="/"),t.join("/")||(it(e)?"/":".")},is=function(e,t){let r=s9(e).split("/"),n="";for(let e=r.length-1;e>=0;e--){let t=r[e];if(t){n=t;break}}return t&&n.endsWith(t)?n.slice(0,-t.length):n};var ii=tt.createRequire("u"<typeof document?require("url").pathToFileURL(__filename).href:tn&&"SCRIPT"===tn.tagName.toUpperCase()&&tn.src||new URL("index.cjs",document.baseURI).href);let io=/[\\/]/g;function ia(e,t){return e.replace(io,t)}let il=/^[a-z]:[\\/]$/i;function ic(e,t){var r;let n,{resolvePaths:s,normalizePath:i,pathSeparator:o}=t,a="win32"===process.platform&&e.includes("/")||e.startsWith(".");return s&&(e=e7.resolve(e)),((i||a)&&(r=e,(n=e7.normalize(r)).length>1&&n[n.length-1]===e7.sep&&(n=n.substring(0,n.length-1)),e=n),"."===e)?"":ia(e[e.length-1]!==o?e+o:e,o)}function iu(e,t){return t+e}function ip(e){return e}let id=(e,t)=>{t.push(e||".")},ih=(e,t,r)=>{let n=e||".";r.every(e=>e(n,!0))&&t.push(n)},im=()=>{},ig=(e,t,r,n)=>{n.every(t=>t(e,!1))&&r.files++},iy=(e,t,r,n)=>{n.every(t=>t(e,!1))&&t.push(e)},ib=(e,t,r,n)=>{r.files++},ik=(e,t)=>{t.push(e)},iv=()=>{},iw=e=>e,iS=()=>[""].slice(0,0),ix=(e,t,r)=>{e.push({directory:t,files:r,dir:t})},iE=()=>{},iA=function(e,t,r){let{queue:n,fs:s,options:{suppressErrors:i}}=t;n.enqueue(),s.realpath(e,(o,a)=>{if(o)return n.dequeue(i?null:o,t);s.stat(a,(s,o)=>s?n.dequeue(i?null:s,t):o.isDirectory()&&iT(e,a,t)?n.dequeue(null,t):void(r(o,a),n.dequeue(null,t)))})},iC=function(e,t,r){let{queue:n,fs:s,options:{suppressErrors:i}}=t;n.enqueue();try{let n=s.realpathSync(e),i=s.statSync(n);if(i.isDirectory()&&iT(e,n,t))return;r(i,n)}catch(e){if(!i)throw e}};function iT(e,t,r){if(r.options.useRealPaths){var n,s;return n=t,(s=r).visited.includes(n+s.options.pathSeparator)}let i=e7.dirname(e),o=1;for(;i!==r.root&&o<2;){let e=r.symlinks.get(i);e&&(e===t||e.startsWith(t)||t.startsWith(e))?o++:i=e7.dirname(i)}return r.symlinks.set(e,t),o>1}let iO=e=>e.counts,iL=e=>e.groups,iN=e=>e.paths,i$=e=>e.paths.slice(0,e.options.maxFiles),i_=(e,t,r)=>(iM(t,r,e.counts,e.options.suppressErrors),null),iI=(e,t,r)=>(iM(t,r,e.paths,e.options.suppressErrors),null),iP=(e,t,r)=>(iM(t,r,e.paths.slice(0,e.options.maxFiles),e.options.suppressErrors),null),ij=(e,t,r)=>(iM(t,r,e.groups,e.options.suppressErrors),null);function iM(e,t,r,n){t(e&&!n?e:null,r)}let iD={withFileTypes:!0},iR=(e,t,r,n,s)=>{if(e.queue.enqueue(),n<0)return e.queue.dequeue(null,e);let{fs:i}=e;e.visited.push(t),e.counts.directories++,i.readdir(t||".",iD,(t,i=[])=>{s(i,r,n),e.queue.dequeue(e.options.suppressErrors?null:t,e)})},iF=(e,t,r,n,s)=>{let{fs:i}=e;if(n<0)return;e.visited.push(t),e.counts.directories++;let o=[];try{o=i.readdirSync(t||".",iD)}catch(t){if(!e.options.suppressErrors)throw t}s(o,r,n)};var iq=class{count=0;constructor(e){this.onQueueEmpty=e}enqueue(){return this.count++,this.count}dequeue(e,t){this.onQueueEmpty&&(--this.count<=0||e)&&(this.onQueueEmpty(e,t),e&&(t.controller.abort(),this.onQueueEmpty=void 0))}},iB=class{_files=0;_directories=0;set files(e){this._files=e}get files(){return this._files}set directories(e){this._directories=e}get directories(){return this._directories}get dirs(){return this._directories}},iU=class{aborted=!1;abort(){this.aborted=!0}},iK=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(t,r,n){var s,i;this.isSynchronous=!n,this.callbackInvoker=function(e,t){let{onlyCounts:r,group:n,maxFiles:s}=e;return r?t?iO:i_:n?t?iL:ij:s?t?i$:iP:t?iN:iI}(r,this.isSynchronous),this.root=ic(t,r),this.state={root:"/"===(s=this.root)||il.test(s)?this.root:this.root.slice(0,-1),paths:[""].slice(0,0),groups:[],counts:new iB,options:r,queue:new iq((e,t)=>this.callbackInvoker(t,e,n)),symlinks:new e,visited:[""].slice(0,0),controller:new iU,fs:r.fs||tu},this.joinPath=function(e,t){let{relativePaths:r,includeBasePath:n}=t;return r&&e?function(r,n){return n.startsWith(e)?n.slice(e.length)+r:ia(e7.relative(e,n),t.pathSeparator)+t.pathSeparator+r}:n?iu:ip}(this.root,r),this.pushDirectory=function(e,t){let{includeDirs:r,filters:n,relativePaths:s}=t;if(!r)return im;if(s)return n&&n.length?function(t,r,n){let s=t.substring(e.length)||".";n.every(e=>e(s,!0))&&r.push(s)}:function(t,r){r.push(t.substring(e.length)||".")};return n&&n.length?ih:id}(this.root,r),this.pushFile=function(e){let{excludeFiles:t,filters:r,onlyCounts:n}=e;return t?iv:r&&r.length?n?ig:iy:n?ib:ik}(r),this.getArray=r.group?iS:iw,this.groupFiles=r.group?ix:iE,this.resolveSymlink=(i=this.isSynchronous,!r.resolveSymlinks||r.excludeSymlinks?null:i?iC:iA),this.walkDirectory=this.isSynchronous?iF:iR}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,t,r)=>{let{paths:n,options:{filters:s,resolveSymlinks:i,excludeSymlinks:o,exclude:a,maxFiles:l,signal:c,useRealPaths:u,pathSeparator:p},controller:f}=this.state;if(f.aborted||c&&c.aborted||l&&n.length>l)return;let d=this.getArray(this.state.paths);for(let l=0;l<e.length;++l){let c=e[l];if(c.isFile()||c.isSymbolicLink()&&!i&&!o){let e=this.joinPath(c.name,t);this.pushFile(e,d,this.state.counts,s)}else if(c.isDirectory()){let e=t+c.name+this.state.options.pathSeparator;if(a&&a(c.name,e))continue;this.pushDirectory(e,n,s),this.walkDirectory(this.state,e,e,r-1,this.walk)}else if(this.resolveSymlink&&c.isSymbolicLink()){let e=t+c.name;this.resolveSymlink(e,this.state,(t,n)=>{if(t.isDirectory())n=ic(n,this.state.options),a&&a(c.name,u?n:e+p)||this.walkDirectory(this.state,n,u?n:e+p,r-1,this.walk);else{n=u?n:e;let t=e7.basename(n),r=ic(e7.dirname(n),this.state.options);n=this.joinPath(t,r),this.pushFile(n,d,this.state.counts,s)}})}}this.groupFiles(this.state.groups,t,d)}};function iY(e,t,r){new iK(e,t,r).start()}var iW=class{constructor(e,t){this.root=e,this.options=t}withPromise(){var e,t;return e=this.root,t=this.options,new Promise((r,n)=>{iY(e,t,(e,t)=>{if(e)return n(e);r(t)})})}withCallback(e){iY(this.root,this.options,e)}sync(){return new iK(this.root,this.options).start()}};let iJ=null;try{ii.resolve("picomatch"),iJ=ii("picomatch")}catch{}var iH=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:e7.sep,filters:[]};globFunction;constructor(e){this.options={...this.options,...e},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(e){return this.options.pathSeparator=e,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(e){return this.options.maxDepth=e,this}withMaxFiles(e){return this.options.maxFiles=e,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:e=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=e,this.withFullPaths()}withAbortSignal(e){return this.options.signal=e,this}normalize(){return this.options.normalizePath=!0,this}filter(e){return this.options.filters.push(e),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(e){return this.options.exclude=e,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(e){return new iW(e||".",this.options)}withGlobFunction(e){return this.globFunction=e,this}crawlWithOptions(e,t){return this.options={...this.options,...t},new iW(e||".",this.options)}glob(...e){return this.globFunction?this.globWithOptions(e):this.globWithOptions(e,{dot:!0})}globWithOptions(e,...t){let r=this.globFunction||iJ;if(!r)throw Error("Please specify a glob function to use glob matching.");var n=this.globCache[e.join("\0")];return n||(n=r(e,...t),this.globCache[e.join("\0")]=n),this.options.filters.push(e=>n(e)),this}},iG={};function iV(){if(ex)return eS;ex=1;let e="[^\\\\/]",t="[^/]",r="(?:\\/|$)",n="(?:^|\\/)",s=`\\.{1,2}${r}`,i=`(?!${n}${s})`,o=`(?!\\.{0,1}${r})`,a=`(?!${s})`,l=`${t}*?`,c={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:"(?=.)",QMARK:t,END_ANCHOR:r,DOTS_SLASH:s,NO_DOT:"(?!\\.)",NO_DOTS:i,NO_DOT_SLASH:o,NO_DOTS_SLASH:a,QMARK_NO_DOT:"[^.\\/]",STAR:l,START_ANCHOR:n,SEP:"/"},u={...c,SLASH_LITERAL:"[\\\\/]",QMARK:e,STAR:`${e}*?`,DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"};return eS={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?u:c}}function iX(){return eE||(eE=1,!function(e){let{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:r,REGEX_SPECIAL_CHARS:n,REGEX_SPECIAL_CHARS_GLOBAL:s}=iV();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>n.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(s,"\\$1"),e.toPosixSlashes=e=>e.replace(t,"/"),e.isWindows=()=>{if("u">typeof navigator&&navigator.platform){let e=navigator.platform.toLowerCase();return"win32"===e||"windows"===e}return"u">typeof process&&!!process.platform&&"win32"===process.platform},e.removeBackslashes=e=>e.replace(r,e=>"\\"===e?"":e),e.escapeLast=(t,r,n)=>{let s=t.lastIndexOf(r,n);return -1===s?t:"\\"===t[s-1]?e.escapeLast(t,r,s-1):`${t.slice(0,s)}\\${t.slice(s)}`},e.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r},e.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",s=r.contains?"":"$",i=`${n}(?:${e})${s}`;return!0===t.negated&&(i=`(?:^(?!${i}).*$)`),i},e.basename=(e,{windows:t}={})=>{let r=e.split(t?/[\\/]/:"/"),n=r[r.length-1];return""===n?r[r.length-2]:n}}(iG)),iG}var iQ=function(){if(e_)return e$;e_=1;let e=function(){if(eN)return eL;eN=1;let e=function(){if(eC)return eA;eC=1;let e=iX(),{CHAR_ASTERISK:t,CHAR_AT:r,CHAR_BACKWARD_SLASH:n,CHAR_COMMA:s,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:c,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_PLUS:p,CHAR_QUESTION_MARK:f,CHAR_RIGHT_CURLY_BRACE:d,CHAR_RIGHT_PARENTHESES:h,CHAR_RIGHT_SQUARE_BRACKET:m}=iV(),g=e=>e===a||e===n,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return eA=(b,k)=>{let v,w,S=k||{},x=b.length-1,E=!0===S.parts||!0===S.scanToEnd,A=[],C=[],T=[],O=b,L=-1,N=0,$=0,_=!1,I=!1,P=!1,j=!1,M=!1,D=!1,R=!1,F=!1,q=!1,B=!1,U=0,K={value:"",depth:0,isGlob:!1},Y=()=>L>=x,W=()=>O.charCodeAt(L+1),J=()=>(v=w,O.charCodeAt(++L));for(;L<x;){let e;if((w=J())===n){R=K.backslashes=!0,(w=J())===l&&(D=!0);continue}if(!0===D||w===l){for(U++;!0!==Y()&&(w=J());){if(w===n){R=K.backslashes=!0,J();continue}if(w===l){U++;continue}if(!0!==D&&w===i&&(w=J())===i||!0!==D&&w===s){if(_=K.isBrace=!0,P=K.isGlob=!0,B=!0,!0===E)continue;break}if(w===d&&0==--U){D=!1,_=K.isBrace=!0,B=!0;break}}if(!0===E)continue;break}if(w===a){if(A.push(L),C.push(K),K={value:"",depth:0,isGlob:!1},!0===B)continue;if(v===i&&L===N+1){N+=2;continue}$=L+1;continue}if(!0!==S.noext&&!0==(w===p||w===r||w===t||w===f||w===o)&&W()===c){if(P=K.isGlob=!0,j=K.isExtglob=!0,B=!0,w===o&&L===N&&(q=!0),!0===E){for(;!0!==Y()&&(w=J());){if(w===n){R=K.backslashes=!0,w=J();continue}if(w===h){P=K.isGlob=!0,B=!0;break}}continue}break}if(w===t){if(v===t&&(M=K.isGlobstar=!0),P=K.isGlob=!0,B=!0,!0===E)continue;break}if(w===f){if(P=K.isGlob=!0,B=!0,!0===E)continue;break}if(w===u){for(;!0!==Y()&&(e=J());){if(e===n){R=K.backslashes=!0,J();continue}if(e===m){I=K.isBracket=!0,P=K.isGlob=!0,B=!0;break}}if(!0===E)continue;break}if(!0!==S.nonegate&&w===o&&L===N){F=K.negated=!0,N++;continue}if(!0!==S.noparen&&w===c){if(P=K.isGlob=!0,!0===E){for(;!0!==Y()&&(w=J());){if(w===c){R=K.backslashes=!0,w=J();continue}if(w===h){B=!0;break}}continue}break}if(!0===P){if(B=!0,!0===E)continue;break}}!0===S.noext&&(j=!1,P=!1);let H=O,G="",V="";N>0&&(G=O.slice(0,N),O=O.slice(N),$-=N),H&&!0===P&&$>0?(H=O.slice(0,$),V=O.slice($)):!0===P?(H="",V=O):H=O,H&&""!==H&&"/"!==H&&H!==O&&g(H.charCodeAt(H.length-1))&&(H=H.slice(0,-1)),!0===S.unescape&&(V&&(V=e.removeBackslashes(V)),H&&!0===R&&(H=e.removeBackslashes(H)));let X={prefix:G,input:b,start:N,base:H,glob:V,isBrace:_,isBracket:I,isGlob:P,isExtglob:j,isGlobstar:M,negated:F,negatedExtglob:q};if(!0===S.tokens&&(X.maxDepth=0,g(w)||C.push(K),X.tokens=C),!0===S.parts||!0===S.tokens){let e;for(let t=0;t<A.length;t++){let r=e?e+1:N,n=A[t],s=b.slice(r,n);S.tokens&&(0===t&&0!==N?(C[t].isPrefix=!0,C[t].value=G):C[t].value=s,y(C[t]),X.maxDepth+=C[t].depth),(0!==t||""!==s)&&T.push(s),e=n}if(e&&e+1<b.length){let t=b.slice(e+1);T.push(t),S.tokens&&(C[C.length-1].value=t,y(C[C.length-1]),X.maxDepth+=C[C.length-1].depth)}X.slashes=A,X.parts=T}return X}}(),r=function(){if(eO)return eT;eO=1;let e=iV(),r=iX(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:s,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:o,REPLACEMENTS:a}=e,l=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();let n=`[${e.join("-")}]`;try{new RegExp(n)}catch(t){return e.map(e=>r.escapeRegex(e)).join("..")}return n},c=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,u=e=>{let t=[],r=0,n=0,s=0,i="",o=!1;for(let a of e){if(!0===o){i+=a,o=!1;continue}if("\\"===a){i+=a,o=!0;continue}if('"'===a){s=+(1!==s),i+=a;continue}if(0===s){if("["===a)r++;else if("]"===a&&r>0)r--;else if(0===r){if("("===a)n++;else if(")"===a&&n>0)n--;else if("|"===a&&0===n){t.push(i),i="";continue}}}i+=a}return t.push(i),t},p=e=>{let t=e.trim(),r=!0;for(;!0===r;)r=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),r=!0);if((e=>{let t=!1;for(let r of e){if(!0===t){t=!1;continue}if("\\"===r){t=!0;continue}if(/[?*+@!()[\]{}]/.test(r))return!1}return!0})(t))return t.replace(/\\(.)/g,"$1")},f=(e,t=!0)=>{if("+"!==e[0]&&"*"!==e[0]||"("!==e[1])return;let r=0,n=0,s=0,i=!1;for(let o=1;o<e.length;o++){let a=e[o];if(!0===i){i=!1;continue}if("\\"===a){i=!0;continue}if('"'===a){s=+(1!==s);continue}if(1!==s){if("["===a){r++;continue}if("]"===a&&r>0){r--;continue}if(!(r>0)){if("("===a){n++;continue}if(")"===a&&0==--n){if(!0===t&&o!==e.length-1)return;return{type:e[0],body:e.slice(2,o),end:o}}}}}},d=e=>{let t=0,r=[];for(;t<e.length;){let n=f(e.slice(t),!1);if(!n||"*"!==n.type)return;let s=u(n.body).map(e=>e.trim());if(1!==s.length)return;let i=p(s[0]);if(!i||1!==i.length)return;r.push(i),t+=n.end+1}if(!(r.length<1))return r},h=e=>{let t=0,r=e.trim(),n=f(r);for(;n;)t++,n=f(r=n.body.trim());return t},m=(f,g)=>{let y;if("string"!=typeof f)throw TypeError("Expected a string");f=a[f]||f;let b={...g},k="number"==typeof b.maxLength?Math.min(n,b.maxLength):n,v=f.length;if(v>k)throw SyntaxError(`Input length: ${v}, exceeds maximum allowed length: ${k}`);let w={type:"bos",value:"",output:b.prepend||""},S=[w],x=b.capture?"":"?:",E=e.globChars(b.windows),A=e.extglobChars(E),{DOT_LITERAL:C,PLUS_LITERAL:T,SLASH_LITERAL:O,ONE_CHAR:L,DOTS_SLASH:N,NO_DOT:$,NO_DOT_SLASH:_,NO_DOTS_SLASH:I,QMARK:P,QMARK_NO_DOT:j,STAR:M,START_ANCHOR:D}=E,R=e=>`(${x}(?:(?!${D}${e.dot?N:C}).)*?)`,F=b.dot?"":$,q=b.dot?P:j,B=!0===b.bash?R(b):M;b.capture&&(B=`(${B})`),"boolean"==typeof b.noext&&(b.noextglob=b.noext);let U={input:f,index:-1,start:0,dot:!0===b.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:S};v=(f=r.removePrefix(f,U)).length;let K=[],Y=[],W=[],J=w,H=()=>U.index===v-1,G=U.peek=(e=1)=>f[U.index+e],V=U.advance=()=>f[++U.index]||"",X=()=>f.slice(U.index+1),Q=(e="",t=0)=>{U.consumed+=e,U.index+=t},z=e=>{U.output+=null!=e.output?e.output:e.value,Q(e.value)},Z=()=>{let e=1;for(;"!"===G()&&("("!==G(2)||"?"===G(3));)V(),U.start++,e++;return e%2!=0&&(U.negated=!0,U.start++,!0)},ee=e=>{U[e]++,W.push(e)},et=e=>{U[e]--,W.pop()},er=e=>{if("globstar"===J.type){let t=U.braces>0&&("comma"===e.type||"brace"===e.type),r=!0===e.extglob||K.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||r||(U.output=U.output.slice(0,-J.output.length),J.type="star",J.value="*",J.output=B,U.output+=J.output)}if(K.length&&"paren"!==e.type&&(K[K.length-1].inner+=e.value),(e.value||e.output)&&z(e),J&&"text"===J.type&&"text"===e.type){J.output=(J.output||J.value)+e.value,J.value+=e.value;return}e.prev=J,S.push(e),J=e},en=(e,t)=>{let r={...A[t],conditions:1,inner:""};r.prev=J,r.parens=U.parens,r.output=U.output,r.startIndex=U.index,r.tokensIndex=S.length;let n=(b.capture?"(":"")+r.open;ee("parens"),er({type:e,value:t,output:U.output?"":L}),er({type:"paren",extglob:!0,value:V(),output:n}),K.push(r)},es=n=>{let s,i=f.slice(n.startIndex,U.index+1),o=((n,s)=>{if(!1===s.maxExtglobRecursion)return{risky:!1};let i="number"==typeof s.maxExtglobRecursion?s.maxExtglobRecursion:e.DEFAULT_MAX_EXTGLOB_RECURSION,o=u(n).map(e=>e.trim());if(o.length>1&&(o.some(e=>""===e)||o.some(e=>/^[*?]+$/.test(e))||(e=>{let t=e.map(p).filter(Boolean);for(let e=0;e<t.length;e++)for(let r=e+1;r<t.length;r++){let n=t[e],s=t[r],i=n[0];if(i&&n===i.repeat(n.length)&&s===i.repeat(s.length)&&(n===s||n.startsWith(s)||s.startsWith(n)))return!0}return!1})(o)))return{risky:!0};let a=[],l=!1,c=!0;for(let e of o){let t=d(e);if(t){l=!0,a.push(...t);continue}let r=p(e);if(r&&1===r.length){a.push(r);continue}if(c=!1,h(e)>i)return{risky:!0}}if(l){var f;let e;return c?{risky:!0,safeOutput:(e=1===(f=[...new t(a)]).length?r.escapeRegex(f[0]):`[${f.map(e=>r.escapeRegex(e)).join("")}]`,`${e}*`)}:{risky:!0}}return{risky:!1}})(f.slice(n.startIndex+2,U.index),b);if(("plus"===n.type||"star"===n.type)&&o.risky){let e=o.safeOutput?(n.output?"":L)+(b.capture?`(${o.safeOutput})`:o.safeOutput):void 0,t=S[n.tokensIndex];t.type="text",t.value=i,t.output=e||r.escapeRegex(i);for(let e=n.tokensIndex+1;e<S.length;e++)S[e].value="",S[e].output="",delete S[e].suffix;U.output=n.output+t.output,U.backtrack=!0,er({type:"paren",extglob:!0,value:y,output:""}),et("parens");return}let a=n.close+(b.capture?")":"");if("negate"===n.type){let e=B;if(n.inner&&n.inner.length>1&&n.inner.includes("/")&&(e=R(b)),(e!==B||H()||/^\)+$/.test(X()))&&(a=n.close=`)$))${e}`),n.inner.includes("*")&&(s=X())&&/^\.[^\\/.]+$/.test(s)){let t=m(s,{...g,fastpaths:!1}).output;a=n.close=`)${t})${e})`}"bos"===n.prev.type&&(U.negatedExtglob=!0)}er({type:"paren",extglob:!0,value:y,output:a}),et("parens")};if(!1!==b.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(f)){let e=!1,t=f.replace(o,(t,r,n,s,i,o)=>"\\"===s?(e=!0,t):"?"===s?r?r+s+(i?P.repeat(i.length):""):0===o?q+(i?P.repeat(i.length):""):P.repeat(n.length):"."===s?C.repeat(n.length):"*"===s?r?r+s+(i?B:""):B:r?t:`\\${t}`);return(!0===e&&(t=!0===b.unescape?t.replace(/\\/g,""):t.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),t===f&&!0===b.contains)?U.output=f:U.output=r.wrapOutput(t,U,g),U}for(;!H();){if("\0"===(y=V()))continue;if("\\"===y){let e=G();if("/"===e&&!0!==b.bash||"."===e||";"===e)continue;if(!e){er({type:"text",value:y+="\\"});continue}let t=/^\\+/.exec(X()),r=0;if(t&&t[0].length>2&&(r=t[0].length,U.index+=r,r%2!=0&&(y+="\\")),!0===b.unescape?y=V():y+=V(),0===U.brackets){er({type:"text",value:y});continue}}if(U.brackets>0&&("]"!==y||"["===J.value||"[^"===J.value)){if(!1!==b.posix&&":"===y){let e=J.value.slice(1);if(e.includes("[")&&(J.posix=!0,e.includes(":"))){let e=J.value.lastIndexOf("["),t=J.value.slice(0,e),r=s[J.value.slice(e+2)];if(r){J.value=t+r,U.backtrack=!0,V(),w.output||1!==S.indexOf(J)||(w.output=L);continue}}}("["===y&&":"!==G()||"-"===y&&"]"===G())&&(y=`\\${y}`),"]"===y&&("["===J.value||"[^"===J.value)&&(y=`\\${y}`),!0===b.posix&&"!"===y&&"["===J.value&&(y="^"),J.value+=y,z({value:y});continue}if(1===U.quotes&&'"'!==y){y=r.escapeRegex(y),J.value+=y,z({value:y});continue}if('"'===y){U.quotes=+(1!==U.quotes),!0===b.keepQuotes&&er({type:"text",value:y});continue}if("("===y){ee("parens"),er({type:"paren",value:y});continue}if(")"===y){if(0===U.parens&&!0===b.strictBrackets)throw SyntaxError(c("opening","("));let e=K[K.length-1];if(e&&U.parens===e.parens+1){es(K.pop());continue}er({type:"paren",value:y,output:U.parens?")":"\\)"}),et("parens");continue}if("["===y){if(!0!==b.nobracket&&X().includes("]"))ee("brackets");else{if(!0!==b.nobracket&&!0===b.strictBrackets)throw SyntaxError(c("closing","]"));y=`\\${y}`}er({type:"bracket",value:y});continue}if("]"===y){if(!0===b.nobracket||J&&"bracket"===J.type&&1===J.value.length){er({type:"text",value:y,output:`\\${y}`});continue}if(0===U.brackets){if(!0===b.strictBrackets)throw SyntaxError(c("opening","["));er({type:"text",value:y,output:`\\${y}`});continue}et("brackets");let e=J.value.slice(1);if(!0===J.posix||"^"!==e[0]||e.includes("/")||(y=`/${y}`),J.value+=y,z({value:y}),!1===b.literalBrackets||r.hasRegexChars(e))continue;let t=r.escapeRegex(J.value);if(U.output=U.output.slice(0,-J.value.length),!0===b.literalBrackets){U.output+=t,J.value=t;continue}J.value=`(${x}${t}|${J.value})`,U.output+=J.value;continue}if("{"===y&&!0!==b.nobrace){ee("braces");let e={type:"brace",value:y,output:"(",outputIndex:U.output.length,tokensIndex:U.tokens.length};Y.push(e),er(e);continue}if("}"===y){let e=Y[Y.length-1];if(!0===b.nobrace||!e){er({type:"text",value:y,output:y});continue}let t=")";if(!0===e.dots){let e=S.slice(),r=[];for(let t=e.length-1;t>=0&&(S.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&r.unshift(e[t].value);t=l(r,b),U.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){let r=U.output.slice(0,e.outputIndex),n=U.tokens.slice(e.tokensIndex);for(let s of(e.value=e.output="\\{",y=t="\\}",U.output=r,n))U.output+=s.output||s.value}er({type:"brace",value:y,output:t}),et("braces"),Y.pop();continue}if("|"===y){K.length>0&&K[K.length-1].conditions++,er({type:"text",value:y});continue}if(","===y){let e=y,t=Y[Y.length-1];t&&"braces"===W[W.length-1]&&(t.comma=!0,e="|"),er({type:"comma",value:y,output:e});continue}if("/"===y){if("dot"===J.type&&U.index===U.start+1){U.start=U.index+1,U.consumed="",U.output="",S.pop(),J=w;continue}er({type:"slash",value:y,output:O});continue}if("."===y){if(U.braces>0&&"dot"===J.type){"."===J.value&&(J.output=C);let e=Y[Y.length-1];J.type="dots",J.output+=y,J.value+=y,e.dots=!0;continue}if(U.braces+U.parens===0&&"bos"!==J.type&&"slash"!==J.type){er({type:"text",value:y,output:C});continue}er({type:"dot",value:y,output:C});continue}if("?"===y){if(!(J&&"("===J.value)&&!0!==b.noextglob&&"("===G()&&"?"!==G(2)){en("qmark",y);continue}if(J&&"paren"===J.type){let e=G(),t=y;("("!==J.value||/[!=<:]/.test(e))&&("<"!==e||/<([!=]|\w+>)/.test(X()))||(t=`\\${y}`),er({type:"text",value:y,output:t});continue}if(!0!==b.dot&&("slash"===J.type||"bos"===J.type)){er({type:"qmark",value:y,output:j});continue}er({type:"qmark",value:y,output:P});continue}if("!"===y){if(!0!==b.noextglob&&"("===G()&&("?"!==G(2)||!/[!=<:]/.test(G(3)))){en("negate",y);continue}if(!0!==b.nonegate&&0===U.index){Z();continue}}if("+"===y){if(!0!==b.noextglob&&"("===G()&&"?"!==G(2)){en("plus",y);continue}if(J&&"("===J.value||!1===b.regex){er({type:"plus",value:y,output:T});continue}if(J&&("bracket"===J.type||"paren"===J.type||"brace"===J.type)||U.parens>0){er({type:"plus",value:y});continue}er({type:"plus",value:T});continue}if("@"===y){if(!0!==b.noextglob&&"("===G()&&"?"!==G(2)){er({type:"at",extglob:!0,value:y,output:""});continue}er({type:"text",value:y});continue}if("*"!==y){("$"===y||"^"===y)&&(y=`\\${y}`);let e=i.exec(X());e&&(y+=e[0],U.index+=e[0].length),er({type:"text",value:y});continue}if(J&&("globstar"===J.type||!0===J.star)){J.type="star",J.star=!0,J.value+=y,J.output=B,U.backtrack=!0,U.globstar=!0,Q(y);continue}let e=X();if(!0!==b.noextglob&&/^\([^?]/.test(e)){en("star",y);continue}if("star"===J.type){if(!0===b.noglobstar){Q(y);continue}let t=J.prev,r=t.prev,n="slash"===t.type||"bos"===t.type,s=r&&("star"===r.type||"globstar"===r.type);if(!0===b.bash&&(!n||e[0]&&"/"!==e[0])){er({type:"star",value:y,output:""});continue}let i=U.braces>0&&("comma"===t.type||"brace"===t.type),o=K.length&&("pipe"===t.type||"paren"===t.type);if(!n&&"paren"!==t.type&&!i&&!o){er({type:"star",value:y,output:""});continue}for(;"/**"===e.slice(0,3);){let t=f[U.index+4];if(t&&"/"!==t)break;e=e.slice(3),Q("/**",3)}if("bos"===t.type&&H()){J.type="globstar",J.value+=y,J.output=R(b),U.output=J.output,U.globstar=!0,Q(y);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!s&&H()){U.output=U.output.slice(0,-(t.output+J.output).length),t.output=`(?:${t.output}`,J.type="globstar",J.output=R(b)+(b.strictSlashes?")":"|$)"),J.value+=y,U.globstar=!0,U.output+=t.output+J.output,Q(y);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){let r=void 0!==e[1]?"|$":"";U.output=U.output.slice(0,-(t.output+J.output).length),t.output=`(?:${t.output}`,J.type="globstar",J.output=`${R(b)}${O}|${O}${r})`,J.value+=y,U.output+=t.output+J.output,U.globstar=!0,Q(y+V()),er({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){J.type="globstar",J.value+=y,J.output=`(?:^|${O}|${R(b)}${O})`,U.output=J.output,U.globstar=!0,Q(y+V()),er({type:"slash",value:"/",output:""});continue}U.output=U.output.slice(0,-J.output.length),J.type="globstar",J.output=R(b),J.value+=y,U.output+=J.output,U.globstar=!0,Q(y);continue}let t={type:"star",value:y,output:B};if(!0===b.bash){t.output=".*?",("bos"===J.type||"slash"===J.type)&&(t.output=F+t.output),er(t);continue}if(J&&("bracket"===J.type||"paren"===J.type)&&!0===b.regex){t.output=y,er(t);continue}(U.index===U.start||"slash"===J.type||"dot"===J.type)&&("dot"===J.type?(U.output+=_,J.output+=_):!0===b.dot?(U.output+=I,J.output+=I):(U.output+=F,J.output+=F),"*"!==G()&&(U.output+=L,J.output+=L)),er(t)}for(;U.brackets>0;){if(!0===b.strictBrackets)throw SyntaxError(c("closing","]"));U.output=r.escapeLast(U.output,"["),et("brackets")}for(;U.parens>0;){if(!0===b.strictBrackets)throw SyntaxError(c("closing",")"));U.output=r.escapeLast(U.output,"("),et("parens")}for(;U.braces>0;){if(!0===b.strictBrackets)throw SyntaxError(c("closing","}"));U.output=r.escapeLast(U.output,"{"),et("braces")}if(!0!==b.strictSlashes&&("star"===J.type||"bracket"===J.type)&&er({type:"maybe_slash",value:"",output:`${O}?`}),!0===U.backtrack)for(let e of(U.output="",U.tokens))U.output+=null!=e.output?e.output:e.value,e.suffix&&(U.output+=e.suffix);return U};return m.fastpaths=(t,s)=>{let i={...s},o="number"==typeof i.maxLength?Math.min(n,i.maxLength):n,l=t.length;if(l>o)throw SyntaxError(`Input length: ${l}, exceeds maximum allowed length: ${o}`);t=a[t]||t;let{DOT_LITERAL:c,SLASH_LITERAL:u,ONE_CHAR:p,DOTS_SLASH:f,NO_DOT:d,NO_DOTS:h,NO_DOTS_SLASH:m,STAR:g,START_ANCHOR:y}=e.globChars(i.windows),b=i.dot?h:d,k=i.dot?m:d,v=i.capture?"":"?:",w=!0===i.bash?".*?":g;i.capture&&(w=`(${w})`);let S=e=>!0===e.noglobstar?w:`(${v}(?:(?!${y}${e.dot?f:c}).)*?)`,x=e=>{switch(e){case"*":return`${b}${p}${w}`;case".*":return`${c}${p}${w}`;case"*.*":return`${b}${w}${c}${p}${w}`;case"*/*":return`${b}${w}${u}${p}${k}${w}`;case"**":return b+S(i);case"**/*":return`(?:${b}${S(i)}${u})?${k}${p}${w}`;case"**/*.*":return`(?:${b}${S(i)}${u})?${k}${w}${c}${p}${w}`;case"**/.*":return`(?:${b}${S(i)}${u})?${c}${p}${w}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let r=x(t[1]);if(!r)return;return r+c+t[2]}}},E=x(r.removePrefix(t,{negated:!1,prefix:""}));return E&&!0!==i.strictSlashes&&(E+=`${u}?`),E},eT=m}(),n=iX(),s=iV(),i=(e,t,r=!1)=>{if(Array.isArray(e)){let n=e.map(e=>i(e,t,r));return e=>{for(let t of n){let r=t(e);if(r)return r}return!1}}let n=e&&"object"==typeof e&&!Array.isArray(e)&&e.tokens&&e.input;if(""===e||"string"!=typeof e&&!n)throw TypeError("Expected pattern to be a non-empty string");let s=t||{},o=s.windows,a=n?i.compileRe(e,t):i.makeRe(e,t,!1,!0),l=a.state;delete a.state;let c=()=>!1;if(s.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};c=i(s.ignore,e,r)}let u=(r,n=!1)=>{let{isMatch:u,match:p,output:f}=i.test(r,a,t,{glob:e,posix:o}),d={glob:e,state:l,regex:a,posix:o,input:r,output:f,match:p,isMatch:u};return("function"==typeof s.onResult&&s.onResult(d),!1===u)?(d.isMatch=!1,!!n&&d):c(r)?("function"==typeof s.onIgnore&&s.onIgnore(d),d.isMatch=!1,!!n&&d):("function"==typeof s.onMatch&&s.onMatch(d),!n||d)};return r&&(u.state=l),u};return i.test=(e,t,r,{glob:s,posix:o}={})=>{if("string"!=typeof e)throw TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};let a=r||{},l=a.format||(o?n.toPosixSlashes:null),c=e===s,u=c&&l?l(e):e;return!1===c&&(c=(u=l?l(e):e)===s),(!1===c||!0===a.capture)&&(c=!0===a.matchBase||!0===a.basename?i.matchBase(e,t,r,o):t.exec(u)),{isMatch:!!c,match:c,output:u}},i.matchBase=(e,t,r,s=r&&r.windows)=>(t instanceof RegExp?t:i.makeRe(t,r)).test(n.basename(e,{windows:s})),i.isMatch=(e,t,r)=>i(t,r)(e),i.parse=(e,t)=>Array.isArray(e)?e.map(e=>i.parse(e,t)):r(e,{...t,fastpaths:!1}),i.scan=(t,r)=>e(t,r),i.compileRe=(e,t,r=!1,n=!1)=>{if(!0===r)return e.output;let s=t||{},o=s.contains?"":"^",a=s.contains?"":"$",l=`${o}(?:${e.output})${a}`;e&&!0===e.negated&&(l=`^(?!${l}).*$`);let c=i.toRegex(l,t);return!0===n&&(c.state=e),c},i.makeRe=(e,t={},n=!1,s=!1)=>{if(!e||"string"!=typeof e)throw TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1!==t.fastpaths&&("."===e[0]||"*"===e[0])&&(o.output=r.fastpaths(e,t)),o.output||(o=r(e,t)),i.compileRe(o,t,n,s)},i.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},i.constants=s,eL=i}(),r=iX();function n(t,s,i=!1){return s&&(null===s.windows||void 0===s.windows)&&(s={...s,windows:r.isWindows()}),e(t,s,i)}return Object.assign(n,e),e$=n}(),iz=eD.a(iQ);let iZ=Array.isArray,i0=/\\/g,i1=/^[A-Za-z]:$/,i2="win32"===process.platform,i9=/^(\/?\.\.)+$/,i3=/^[A-Z]:\/$/i,i6=i2?e=>i3.test(e):e=>"/"===e;function i8(e,t,r){if(e===t||t.startsWith(`${e}/`)){if(r){let t=e.length+ +!i6(e);return(e,r)=>e.slice(t,r?-1:void 0)||"."}let n=t.slice(e.length+1);return n?(e,t)=>{if("."===e)return n;let r=`${n}/${e}`;return t?r.slice(0,-1):r}:(e,t)=>t&&"."!==e?e.slice(0,-1):e}return r?t=>e7.posix.relative(e,t)||".":r=>e7.posix.relative(e,`${t}/${r}`)||"."}function i4(e){return e.replace(i1,e=>`${e}/`)}let i5={parts:!0};function i7(e){var t;let r=iz.scan(e,i5);return(null==(t=r.parts)?void 0:t.length)?r.parts:[e]}let oe=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,ot=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,or=i2?e=>e.replace(ot,"\\$&"):e=>e.replace(oe,"\\$&");function on(...e){console.log(`[tinyglobby ${(new Date).toLocaleTimeString("es")}]`,...e)}function os(e){return"string"==typeof e?[e]:null!=e?e:[]}let oi=/^(\/?\.\.)+/,oo=/\\(?=[()[\]{}!*+?@|])/g;function oa(e,t,r,n){var s;let i=t.cwd,o=e;"/"===e[e.length-1]&&(o=e.slice(0,-1)),"*"!==o[o.length-1]&&t.expandDirectories&&(o+="/**");let a=or(i);o=e7.isAbsolute(o.replace(oo,""))?e7.posix.relative(a,o):e7.posix.normalize(o);let l=null==(s=oi.exec(o))?void 0:s[0],c=i7(o);if(l){let e=(l.length+1)/3,t=0,n=a.split("/");for(;t<e&&c[t+e]===n[n.length+t-e];)o=o.slice(0,(e-t-1)*3)+o.slice((e-t)*3+c[t+e].length+1)||".",t++;let s=e7.posix.join(i,l.slice(3*t));"."!==s[0]&&r.root.length>s.length&&(r.root=i4(s),r.depthOffset=-e+t)}if(!n&&r.depthOffset>=0){null!=r.commonPath||(r.commonPath=c);let e=[],t=Math.min(r.commonPath.length,c.length);for(let n=0;n<t;n++){let t=c[n];if("**"===t&&!c[n+1]){e.pop();break}if(n===c.length-1||t!==r.commonPath[n]||function(e){let t=iz.scan(e);return t.isGlob||t.negated}(t))break;e.push(t)}r.depthOffset=e.length,r.commonPath=e,r.root=i4(e.length>0?e7.posix.join(i,...e):i)}return o}let ol={caseSensitiveMatch:!0,debug:!!process.env.TINYGLOBBY_DEBUG,expandDirectories:!0,followSymbolicLinks:!0,onlyFiles:!0};function oc(e,t){let[r,n]=function(e,t={}){var r;if(e&&(null==t?void 0:t.patterns))throw Error("Cannot pass patterns as both an argument and an option");let n=iZ(e)||"string"==typeof e,s=os(null!=(r=n?e:e.patterns)?r:"**/*"),i=function(e){let t=Object.assign({},e);for(let e in ol)void 0===t[e]&&Object.assign(t,{[e]:ol[e]});return t.cwd=(t.cwd instanceof URL?te.fileURLToPath(t.cwd):e7.resolve(t.cwd||process.cwd())).replace(i0,"/"),t.ignore=os(t.ignore),t.fs&&(t.fs={readdir:t.fs.readdir||e5.readdir,readdirSync:t.fs.readdirSync||e5.readdirSync,realpath:t.fs.realpath||e5.realpath,realpathSync:t.fs.realpathSync||e5.realpathSync,stat:t.fs.stat||e5.stat,statSync:t.fs.statSync||e5.statSync}),t.debug&&on("globbing with options:",t),t}(n?t:e);return s.length>0?function(e,t){let r,n=e.cwd,s={root:n,depthOffset:0},i=function(e,t,r){let n=[],s=[];for(let t of e.ignore)t&&("!"!==t[0]||"("===t[1])&&s.push(oa(t,e,r,!0));for(let i of t)i&&("!"!==i[0]||"("===i[1]?n.push(oa(i,e,r,!1)):("!"!==i[1]||"("===i[2])&&s.push(oa(i.slice(1),e,r,!0)));return{match:n,ignore:s}}(e,t,s);e.debug&&on("internal processing patterns:",i);let{absolute:o,caseSensitiveMatch:a,debug:l,dot:c,followSymbolicLinks:u,onlyDirectories:p}=e,f=s.root.replace(i0,""),d={dot:c,nobrace:!1===e.braceExpansion,nocase:!a,noextglob:!1===e.extglob,noglobstar:!1===e.globstar,posix:!0},h=iz(i.match,d),m=iz(i.ignore,d),g=function(e,t={}){let r,n,s=e.length,i=Array(s),o=Array(s);for(r=0;r<s;r++){let s=i7(e[r]);i[r]=s;let a=s.length,l=Array(a);for(n=0;n<a;n++)l[n]=iz(s[n],t);o[r]=l}return e=>{let a=e.split("/");if(".."===a[0]&&i9.test(e))return!0;for(r=0;r<s;r++){let e=i[r],s=o[r],l=a.length,c=Math.min(l,e.length);for(n=0;n<c;){let r=e[n];if(r.includes("/"))return!0;if(!s[n](a[n]))break;if(!t.noglobstar&&"**"===r)return!0;n++}if(n===l)return!0}return!1}}(i.match,d),y=i8(n,f,o),b=o?y:i8(n,f,!0),k=(e,t)=>{let r=b(t,!0);return"."!==r&&!g(r)||m(r)};void 0!==e.deep&&(r=Math.round(e.deep-s.depthOffset));let v=new iH({filters:[l?(e,t)=>{let r=y(e,t),n=h(r)&&!m(r);return n&&on(`matched ${r}`),n}:(e,t)=>{let r=y(e,t);return h(r)&&!m(r)}],exclude:l?(e,t)=>{let r=k(e,t);return on(`${r?"skipped":"crawling"} ${t}`),r}:k,fs:e.fs,pathSeparator:"/",relativePaths:!o,resolvePaths:o,includeBasePath:o,resolveSymlinks:u,excludeSymlinks:!u,excludeFiles:p,includeDirs:p||!e.onlyFiles,maxDepth:r,signal:e.signal}).crawl(f);return e.debug&&on("internal properties:",{...s,root:f}),[v,n!==f&&!o&&function(e,t){if(t.startsWith(`${e}/`)){let r=t.slice(e.length+1);return e=>`${r}/${e}`}return r=>{let n=e7.posix.relative(e,`${t}/${r}`);return"/"===r[r.length-1]&&""!==n?`${n}/`:n||"."}}(n,f)]}(i,s):[]}(e,t);return r?function(e,t){if(t)for(let r=e.length-1;r>=0;r--)e[r]=t(e[r]);return e}(r.sync(),n):[]}function ou(e,t){return ej.isAbsolute(e)?e:ej.resolve(t||".",e)}function op(e,t){let r,n;for(r of function(e,t){let{last:r,cwd:n}=t||{},s=ou(e,n),i=ou(r||"/",n),o,a=[];for(;o!==i&&(a.push(s),(s=ej.dirname(o=s))!==o););return a}(t&&t.cwd||"",t))if(n=ej.join(r,e),eP.existsSync(n))return n}let of=(r=e=>`https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/${e.startsWith("json-")?`json/${e}`:`yaml/${e}`}.test.ts`,function({name:e,meta:t,...n}){return function({name:e,create:t,defaultOptions:r,meta:n}){return{name:e,create:e=>t(e,e.options.map((e,t)=>({...r?.[t]||{},...e||{}}))),defaultOptions:r,meta:n}}({name:e,meta:{...t,docs:{...t.docs,url:r(e)}},...n})});function od(e){if(!e.filename.endsWith("package.json"))return;let t=e.sourceCode.ast.body[0];if("JSONObjectExpression"===t.expression.type)return t.expression}function*oh(e,t){let r=od(e);if(r)for(let e of t){let t=e.split("."),n=r;for(let e=0;e<t.length;e++){let r=n.properties.find(r=>"JSONLiteral"===r.key.type&&r.key.value===t[e]);if(!r?.value||"JSONObjectExpression"!==r.value.type){n=void 0;break}n=r.value}if(n&&n!==r)for(let e of n.properties)"JSONLiteral"===e.value.type&&"JSONLiteral"===e.key.type&&"string"==typeof e.value.value&&(yield{packageName:String(e.key.value),specifier:String(e.value.value),property:e})}}let om=["**/node_modules/**","**/dist/**","**/build/**"],og={},oy=new e;function ob(e){let t=e.filename,r=e.settings.pnpm?.ensureWorkspaceFile,n=op("pnpm-workspace.yaml",{cwd:ir(t)});if(!n)if(r)n=function(e){let t=op("package.json",{cwd:ir(e)});if(!t)throw Error("Could not find package.json to create pnpm-workspace.yaml");let r=s7(ir(t),"pnpm-workspace.yaml");return eP.writeFileSync(r,""),r}(t);else throw Error("pnpm-workspace.yaml not found");let s=og[n];if(s&&!s.hasQueue()&&Date.now()-s.lastRead>1e4&&(og[n]=void 0,s=void 0),!s){var i;let e,t,r;i=n,t=function(e){let t=so.parseDocument(e),r=!1;function n(e,n){let s=1===e.length?t.contents:t.getIn(e.slice(0,-1));s||(s=t.createNode({}),t.setIn(e.slice(0,-1),s));let i=e[e.length-1],o=s.items.find(e=>"string"==typeof e.key?e.key===i:e.key.value===i),a=s.items.map(e=>"string"==typeof e.key?e.key:String(e.key.value));if(o)if(so.isAlias(o.value)){var l,c;let e,s=(l=t,c=o.value,so.visit(l,{Scalar:(t,r,n)=>{r.anchor===c.source&&"string"==typeof r.value&&(e=r)}}),e);s&&s.value!==n&&(s.value=n,r=!0)}else o.value&&"string"!=typeof o.value?o.value.value!==n&&(o.value.value=n,r=!0):o.value!==n&&(o.value=n,r=!0);else{let e=0;for(;e<a.length&&!(a[e].localeCompare(i)>0);e++);o=new so.Pair(i,n),s.items.splice(e,0,o),r=!0}}function s(e,r,n){let s=t.toJSON()||{},i="default"===e?s.catalog?.[r]:s.catalogs?.[e]?.[r];if(i===n)return{conflicts:!1,newCatalogName:e,existingSpecifier:i};if(i){let t=n.replace(/\^/g,"h").replace(/~/g,"t").replace(/\./g,"_").replace(/</g,"l").replace(/>/g,"g").replace(/=/g,"e").replace(/\*/g,"s").replace(/@/g,"a").replace(/\|/g,"p").replace(/&/g,"n").replace(/-/g,"m").replace(/\+/g,"u").replace(/\s/g,"_");return{conflicts:!0,existingSpecifier:i,newCatalogName:"default"===e?`conflicts_${r}_${t}`:`conflicts_${e}_${t}`}}return{conflicts:!1,newCatalogName:e}}function i(e,r,s){let i=t.toJSON()?.catalogs?.default!==void 0;"default"!==e||i?n(["catalogs",e,r],s):n(["catalog",r],s)}return{getDocument:()=>t,setContent:function(n){e=n,t=so.parseDocument(e),r=!1},hasChanged:()=>r,toJSON:()=>t.toJSON(),toString:r=>{let n=e.split("'").length>=e.split('"').length;return t.toString({singleQuote:n,...r})},setPath:n,setPackage:i,setPackageNoConflicts:function(e,t,r){let{newCatalogName:n}=s(e,t,r);i(n,t,r)},getPackageCatalogs:function(e){let r=[],n=t.toJSON()||{};if(n.catalogs)for(let t of Object.keys(n.catalogs))n.catalogs[t]?.[e]&&r.push(t);return n.catalog&&n.catalog[e]&&r.push("default"),r},hasSpecifierConflicts:s}}(eP.readFileSync(i,"utf-8")),r=[],s={filepath:i,lastRead:Date.now(),...t,hasQueue:()=>null!=e,queueChange:(n,s)=>{"pre"===s?r.unshift(n):r.push(n),null!=e&&clearTimeout(e),e=setTimeout(()=>{e=void 0;let n=[...r];for(let e of(r.length=0,n))e(t);t.hasChanged()&&eP.writeFileSync(i,t.toString())},1e3)}},og[n]=s}return s}function ok(e){let r=e.toJSON()?.packages,n=s7(ir(e.filepath)),s=s4(s7(n,"package.json"));if(void 0===r)return new t([s,...ov(n,["**/package.json"],om)]);if(!Array.isArray(r))return new t([s]);let i=function(e){let t=[],r=[...om];for(let n of e){if("string"!=typeof n)return;n.startsWith("!")?r.push(oS(n.slice(1))):t.push(oS(n))}return{include:t,exclude:r}}(r);return new t(i?[s,...ov(n,i.include,i.exclude)]:[s])}function ov(e,r,n){let s=JSON.stringify({root:e,includeGlobs:r,excludeGlobs:n}),i=oy.get(s);if(i)return i;let o=new t;if(0===r.length)return oy.set(s,o),o;for(let t of oc(r,{cwd:e,dot:!1,ignore:n,absolute:!0,expandDirectories:!1,onlyFiles:!0}))o.add(s4(t));return oy.set(s,o),o}function ow(e,t){if(!e.endsWith("package.json"))return!1;let r=s4(s7(s7(ir(t.filepath)),e));return ok(t).has(r)}function oS(e){return e.endsWith("package.json")?e:s5(e,"package.json")}let ox=["dependencies","devDependencies"];var oE=of({name:"json-enforce-catalog",meta:{type:"layout",docs:{description:'Enforce using "catalog:" in `package.json`'},fixable:"code",schema:[{type:"object",properties:{allowedProtocols:{type:"array",description:"Allowed protocols in specifier to not be converted to catalog",items:{type:"string"}},autofix:{type:"boolean",description:"Whether to autofix the linting error",default:!0},defaultCatalog:{type:"string",description:"Default catalog to use when moving version to catalog with autofix"},reuseExistingCatalog:{type:"boolean",description:"Whether to reuse existing catalog when moving version to catalog with autofix",default:!0},conflicts:{type:"string",description:"Strategy to handle conflicts when adding packages to catalogs",enum:["new-catalog","overrides","error"],default:"new-catalog"},fields:{type:"array",description:"Fields to check for catalog",items:{type:"string"},default:ox},ignores:{type:"array",description:"Ignore certain packages that require version specification",items:{type:"string"},default:[]}},additionalProperties:!1}],messages:{expectCatalog:'Expect to use catalog instead of plain specifier, got "{{specifier}}" for package "{{packageName}}".'}},defaultOptions:[{}],create(e,[t]){let{allowedProtocols:r=["workspace","link","file"],defaultCatalog:n="default",autofix:s=!0,reuseExistingCatalog:i=!0,conflicts:o="new-catalog",fields:a=ox,ignores:l=[]}=t||{},c=ob(e);if(!c||!ow(e.filename,c))return{};for(let{packageName:t,specifier:u,property:p}of oh(e,a)){if(u.startsWith("catalog:")||l.includes(t)||r?.some(e=>u.startsWith(e)))continue;let a=i&&c.getPackageCatalogs(t)[0]||n,f=c.hasSpecifierConflicts(a,t,u),d=s;"error"===o&&f.conflicts&&(d=!1),"new-catalog"===o&&f.conflicts&&(a=f.newCatalogName),e.report({node:p.value,messageId:"expectCatalog",data:{specifier:u,packageName:t},fix:d?e=>(c.queueChange(()=>{c.setPackage(a,t,u)}),e.replaceText(p.value,"default"===a?JSON.stringify("catalog:"):JSON.stringify(`catalog:${a}`))):void 0})}return{}}}),oA=of({name:"json-prefer-workspace-settings",meta:{type:"layout",docs:{description:"Prefer having pnpm settings in `pnpm-workspace.yaml` instead of `package.json`. This requires pnpm v10.6+, see https://github.com/orgs/pnpm/discussions/9037."},fixable:"code",schema:[{type:"object",properties:{autofix:{type:"boolean",description:"Whether to autofix the linting error",default:!0}},additionalProperties:!1}],messages:{unexpectedPnpmSettings:"Unexpected pnpm settings in package.json, should move to pnpm-workspace.yaml"}},defaultOptions:[{}],create(e,[t={}]){let{autofix:r=!0}=t||{},n=od(e);if(!n)return{};let s=n.properties.find(e=>"JSONLiteral"===e.key.type&&"pnpm"===e.key.value);if(!s)return{};let i=ob(e);return i&&ow(e.filename,i)&&e.report({node:s,messageId:"unexpectedPnpmSettings",fix:r?t=>{let r=JSON.parse(e.sourceCode.text).pnpm,n=[];!function e(t,r){if("object"!=typeof t||null===t||Array.isArray(t))n.push([r,t]);else for(let n in t)e(t[n],[...r,n])}(r,[]),i.queueChange(()=>{for(let[e,t]of n)i.setPath(e,t)});let o=s.range[0],a=s.range[1],l=e.sourceCode.getTokenBefore(s);l&&(o=l.range[1]);let c=e.sourceCode.getTokenAfter(s);return c?.type==="Punctuator"&&","===c.value&&(a=c.range[1]),t.removeRange([o,a])}:void 0}),{}}});let oC=["dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions","overrides","pnpm.overrides"],oT={"json-enforce-catalog":oE,"json-valid-catalog":of({name:"json-valid-catalog",meta:{type:"layout",docs:{description:"Enforce using valid catalog in `package.json`"},fixable:"code",schema:[{type:"object",properties:{autoInsert:{type:"boolean",description:"Whether to auto insert to catalog if missing",default:!0},autoInsertDefaultSpecifier:{type:"string",description:"Default specifier to use when auto inserting to catalog",default:"^0.0.0"},autofix:{type:"boolean",description:"Whether to autofix the linting error",default:!0},enforceNoConflict:{type:"boolean",description:"Whether to enforce no conflicts when adding packages to catalogs (will create version-specific catalogs)",default:!0},fields:{type:"array",description:"Fields to check for catalog",default:oC}},additionalProperties:!1}],messages:{invalidCatalog:'Catalog "{{specifier}}" for package "{{packageName}}" is not defined in `pnpm-workspace.yaml`.'}},defaultOptions:[{}],create(e,[t={}]){let{autoInsert:r=!0,autofix:n=!0,autoInsertDefaultSpecifier:s="^0.0.0",fields:i=oC}=t||{},o=ob(e);if(!o||!ow(e.filename,o))return{};for(let{packageName:t,specifier:a,property:l}of oh(e,i)){if(!a.startsWith("catalog:"))continue;let i=a.replace(/^catalog:/,"").trim()||"default",c=o.getPackageCatalogs(t);c.includes(i)||e.report({node:l.value,messageId:"invalidCatalog",data:{specifier:a,packageName:t},fix:n&&(r||c.length)?e=>{let n=c[0];return!n&&r&&(n=i,o.queueChange(()=>{o.setPackage(n,t,s)},"pre")),e.replaceText(l.value,"default"===n?JSON.stringify("catalog:"):JSON.stringify(`catalog:${n}`))}:void 0})}return{}}}),"json-prefer-workspace-settings":oA};function oO(e){if(null===e)return"null";let t=Object.prototype.toString.call(e).slice(8,-1).toLowerCase();return"object"==typeof e||"function"==typeof e?t:typeof e}var oL=of({name:"yaml-enforce-settings",meta:{type:"problem",fixable:"code",docs:{description:"Enforce settings in `pnpm-workspace.yaml`"},schema:[{type:"object",additionalProperties:!1,properties:{autofix:{type:"boolean",description:"Whether to autofix the linting error",default:!0},settings:{description:"Exact settings to enforce, for both keys and values. Auto-fixable.",type:"object"},requiredFields:{description:"Required settings fields to enforce, regardless of their values. Not-autofixable.",type:"array",items:{type:"string"}},forbiddenFields:{description:"Forbidden settings fields to enforce, regardless of their values. Not-autofixable.",type:"array",items:{type:"string"}}}}],messages:{requiredFieldsMissing:"Required settings fields {{keys}} are missing in `pnpm-workspace.yaml`.",settingMissing:'Setting "{{key}}" is missing in `pnpm-workspace.yaml`.',settingMismatch:'Setting "{{key}}" has mismatch value. Expected: {{expected}}, Actual: {{actual}}.',forbiddenFieldFound:'Forbidden setting field "{{key}}" is found in `pnpm-workspace.yaml`.'}},defaultOptions:[{autofix:!0,settings:{},requiredFields:[],forbiddenFields:[]}],create(e,[t={}]){let{autofix:r=!0,settings:n={},requiredFields:s=[],forbiddenFields:i=[]}=t||{};if(0===Object.keys(n).length&&0===s.length&&0===i.length)throw Error("Either `settings` or `requiredFields` or `forbiddenFields` must be provided, this rule is not functional currently.");if("pnpm-workspace.yaml"!==is(e.filename))return{};let o=ob(e);if(!o||s4(o.filepath)!==s4(e.filename)||o.hasChanged()||o.hasQueue())return{};o.setContent(e.sourceCode.text);let a=o.toJSON()||{},l=o.getDocument(),c=[];for(let e of s)Object.hasOwn(a,e)||c.push(e);for(let t of(c.length>0&&e.report({loc:{start:e.sourceCode.getLocFromIndex(0),end:e.sourceCode.getLocFromIndex(0)},messageId:"requiredFieldsMissing",data:{keys:c.map(e=>JSON.stringify(e)).join(", ")}}),i)){let r=l.getIn([t],!0);r&&e.report({loc:{start:e.sourceCode.getLocFromIndex(r?.range?.[0]??0),end:e.sourceCode.getLocFromIndex(r?.range?.[1]??0)},messageId:"forbiddenFieldFound",data:{key:t}})}for(let[t,s]of Object.entries(n)){if(function e(t,r){let n=oO(t);if(n!==oO(r))return!1;if("array"===n)return t.length===r.length&&t.every((t,n)=>e(t,r[n]));if("object"===n){let n=Object.keys(t);return n.length===Object.keys(r).length&&n.every(n=>e(t[n],r[n]))}return Object.is(t,r)}(a[t],s))continue;let n=l.getIn([t],!0),i=a[t],o=JSON.stringify(s),c=void 0!==i?JSON.stringify(i):"undefined";if(n){let i;if(!n.range)throw Error("Node range is not found");let a=l.contents;if(a?.items){for(let e of a.items)if(e.key&&"object"==typeof e.key&&"value"in e.key&&e.key.value===t){i=e;break}}let u=n.range[0],p=n.range[1];i?.key?.range&&i?.value?.range&&(u=i.key.range[0],p=i.value.range[1]),e.report({loc:{start:e.sourceCode.getLocFromIndex(u),end:e.sourceCode.getLocFromIndex(p)},messageId:"settingMismatch",data:{key:t,expected:o,actual:c},fix:r?e=>{let r=`
28
- ${sa.stringify({[t]:s},{collectionStyle:"block"})}
27
+ ${s} ${t}`).toJSON()}let sh={tag:"tag:yaml.org,2002:omap",testNode:e=>"YAMLSequence"===e.type&&e.entries.every(e=>e?.type==="YAMLMapping"&&1===e.pairs.length),resolveNode(e){let t={};for(let r of e.entries)for(let e of r.pairs)t[e.key?sl(e.key):e.key]=e.value?sl(e.value):e.value;return t}},sd={tag:"tag:yaml.org,2002:set",testNode:e=>"YAMLMapping"===e.type&&e.pairs.every(e=>null!=e.key&&null==e.value),resolveNode(e){let t=[];for(let r of e.pairs)t.push(sl(r.key));return t}},sg={tag:"tag:yaml.org,2002:null",testString:e=>!e||"null"===e||"Null"===e||"NULL"===e||"~"===e,resolveString:()=>null},sm={tag:"tag:yaml.org,2002:float",testString:e=>/^[+-]?(?:\.inf|\.Inf|\.INF)$/u.test(e),resolveString:e=>e.startsWith("-")?-1/0:1/0},sy={tag:"tag:yaml.org,2002:float",testString:e=>".NaN"===e||".nan"===e||".NAN"===e,resolveString:()=>0/0},sb={tag:"tag:yaml.org,2002:str",testString:()=>!0,resolveString:e=>e},sv=[sg,{tag:"tag:yaml.org,2002:bool",testString:e=>"true"===e||"True"===e||"TRUE"===e,resolveString:()=>!0},{tag:"tag:yaml.org,2002:bool",testString:e=>"false"===e||"False"===e||"FALSE"===e,resolveString:()=>!1},{tag:"tag:yaml.org,2002:int",testString:e=>/^[+-]?\d+$/u.test(e),resolveString:e=>parseInt(e,10)},{tag:"tag:yaml.org,2002:int",testString:e=>/^0o[0-7]+$/u.test(e),resolveString:e=>parseInt(e.slice(2),8)},{tag:"tag:yaml.org,2002:int",testString:e=>/^0x[\dA-Fa-f]+$/u.test(e),resolveString:e=>parseInt(e.slice(2),16)},{tag:"tag:yaml.org,2002:float",testString:e=>/^[+-]?(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?$/iu.test(e),resolveString:e=>parseFloat(e)},sm,sy,sb],sk=[sh,sd];function sw(e,t,r){return e.startsWith("-")||e.startsWith("+")?parseInt(e[0]+e.slice(t+1).replace(/_/gu,""),r):parseInt(e.slice(t).replace(/_/gu,""),r)}function sS(e,t){let r=e.shift().replace(/_/gu,""),n=e.pop().replace(/_/gu,""),s=!1;(r.startsWith("-")||r.startsWith("+"))&&(s=r.startsWith("-"),r=r.slice(1));let i=parseInt(r,10);for(;e.length;)i*=60,i+=parseInt(e.shift().replace(/_/gu,""),10);return i*=60,i+=t?parseInt(n,10):parseFloat(n),s?-i:i}let sx={next:sv,"1.2":sv,"1.1":[sg,{tag:"tag:yaml.org,2002:bool",testString:e=>/^(?:y|Y|yes|Yes|YES|true|True|TRUE|on|On|ON)$/u.test(e),resolveString:()=>!0},{tag:"tag:yaml.org,2002:bool",testString:e=>/^(?:n|N|no|No|NO|false|False|FALSE|off|Off|OFF)$/u.test(e),resolveString:()=>!1},{tag:"tag:yaml.org,2002:int",testString:e=>/^[+-]?0[0-7_]+$/u.test(e),resolveString:e=>sw(e,1,8)},{tag:"tag:yaml.org,2002:int",testString:e=>/^[+-]?(?:0|[1-9][\d_]*)$/u.test(e),resolveString:e=>sw(e,0,10)},{tag:"tag:yaml.org,2002:int",testString:e=>/^[+-]?0b[01_]+$/u.test(e),resolveString:e=>sw(e,2,2)},{tag:"tag:yaml.org,2002:int",testString:e=>/^[+-]?0x[\dA-F_a-f]+$/u.test(e),resolveString:e=>sw(e,2,16)},{tag:"tag:yaml.org,2002:int",testString:e=>/^[+-]?[1-9][\d_]*(?::[0-5]?\d)+$/u.test(e),resolveString:e=>sS(e.split(/:/u),!0)},{tag:"tag:yaml.org,2002:float",testString:e=>/^[+-]?(?:\d[\d_]*)?\.[\d_]*(?:e[+-]?\d+)?$/iu.test(e)||/^[+-]?(?:\d[\d_]*)?(?:e[+-]?\d+)?$/iu.test(e),resolveString:e=>parseFloat(e.replace(/_/gu,""))},{tag:"tag:yaml.org,2002:float",testString:e=>/^[+-]?\d[\d_]*(?::[0-5]?\d)+\.[\d_]*$/u.test(e),resolveString:e=>sS(e.split(/:/u),!1)},sm,sy,sb]},sE={next:sk,"1.2":sk,"1.1":[sh,sd]},sA=si.isPair;var sC=class{constructor(e,t){this.index=0,this.array=e,this.ctx=t}first(){let e;for(;e=this.array[this.index];){if(sD(e,this.ctx)){this.index++;continue}return e}return null}consume(){let e=this.first();return e&&this.index++,e}back(){this.index--}each(e){let t;for(;t=this.consume();)e(t)}};function sT(e){return si.isMap(e)?"MAP":si.isSeq(e)?"SEQ":si.isScalar(e)?"SCALAR":si.isAlias(e)?"ALIAS":sA(e)?"PAIR":si.isDocument(e)?"DOCUMENT":"unknown"}function*sO(e,t,r,n){for(let s of t)yield function(e,t,r,n){let s,i=r.getConvertLocation(...sq(t)),o=r.code.slice(...i.range),a=t.source.trim().split(/[\t ]+/),l=a.shift();if("%YAML"===l)s={type:"YAMLDirective",value:o,kind:"YAML",version:e?e.yaml.version:t.source.slice(6).trim(),parent:n,...i};else if("%TAG"===l){let[e,t]=a;s={type:"YAMLDirective",value:o,kind:"TAG",handle:e,prefix:t,parent:n,...i}}else s={type:"YAMLDirective",value:o,kind:null,parent:n,...i};return r.addToken("Directive",i.range),s}(e,s,r,n)}function sN(e,t,r,n,s,i){var o,a,l,c,u,p,f,h,d,g,m,y;if(!r)throw n.throwError(`unknown error: AST is null. Unable to process content CST (${t.type}).`,t);if(r.srcToken!==t)throw n.throwError(`unknown error: CST is mismatched. Unable to process content CST (${t.type}: ${r.srcToken?.type}).`,t);if("block-scalar"===t.type){if(!si.isScalar(r))throw n.throwError(`unknown error: AST is not Scalar (${sT(r)}). Unable to process Scalar CST.`,t);return function(e,t,r,n,s,i){var o,a;let l,c,u,p=t.offset;for(let e of t.props){if(sD(e,n)){p=e.offset+e.source.length;continue}if("block-scalar-header"===e.type){p=(c=n.addToken("Punctuator",sq(e))).range[1];continue}throw n.throwUnexpectedTokenError(e)}let f=c.value,h=r.source?(o=p+t.source.length,a=n,l=o,"\n"===a.code[l-1]&&l>1&&(l--,"\r"===a.code[l-1]&&l>1&&l--),l):n.lastSkipSpaces(t.offset,c.range[1]),d=n.getConvertLocation(c.range[0],h);if(f.startsWith(">")){u={type:"YAMLScalar",style:"folded",...g(f),value:r.source,parent:s,...d};let e=n.code.slice(p,h),t=[p+/^[^\S\n\r]*/.exec(e)[0].length,h];t[0]<t[1]&&n.addToken("BlockFolded",t)}else{u={type:"YAMLScalar",style:"literal",...g(f),value:r.source,parent:s,...d};let e=n.code.slice(p,h),t=[p+/^[^\S\n\r]*/.exec(e)[0].length,h];t[0]<t[1]&&n.addToken("BlockLiteral",t)}return sP(e,r,n,s,u,i,u);function g(e){let t=/([+-]?)(\d*)([+-]?)$/u.exec(e),r=null,n="clip";if(t){r=t[2]?Number(t[2]):null;let e=t[3]||t[1];n="+"===e?"keep":"-"===e?"strip":"clip"}return{chomping:n,indent:r}}}(e,t,r,n,s,i)}if("block-seq"===t.type){if(!si.isSeq(r))throw n.throwError(`unknown error: AST is not Seq (${sT(r)}). Unable to process Seq CST.`,t);return function(e,t,r,n,s,i){let o,a={type:"YAMLSequence",style:"block",entries:[],parent:s,...n.getConvertLocation(t.offset,t.offset)},l=[...r.items];for(let e of t.items){let t,r,s=new sC(e.start,n);for(;r=s.consume();){if("seq-item-ind"===r.type){if(t)throw n.throwUnexpectedTokenError(r);o=t=n.addToken("Punctuator",sq(r));continue}s.back();break}if(0===l.length){let t=s.first()||e.key||e.sep?.[0]||e.value;if(!t)break;throw n.throwUnexpectedTokenError(t)}a.entries.push(function(e,t,r,n,s,i,o){if(t.key)throw n.throwUnexpectedTokenError(t.key);if(t.sep)throw n.throwUnexpectedTokenError(t.sep);if(t.value){if(sA(r)){if("block-map"===t.value.type)return sL(e,t.value,r,n,s,i);if("flow-collection"===t.value.type)return s_(e,t.value,r,n,s,i);throw n.throwError(`unknown error: CST is not block-map and flow-collection (${t.value.type}). Unable to process Pair AST.`,t.value)}return sN(e,t.value,r,n,s,i)}if(!s$(r))throw n.throwError(`unknown error: AST is not Scalar and null (${sT(r)}). Unable to process empty seq item CST.`,e.first()??o);return sP(e,r,n,s,null,i,null)}(s,e,l.shift()||null,n,a,i,(a.entries[a.entries.length-1]||a).range[1]))}return sK(a,a.entries[a.entries.length-1]||o),sP(e,r,n,s,a,i,a)}(e,t,r,n,s,i)}if("block-map"===t.type){if(!si.isMap(r))throw n.throwError(`unknown error: AST is not Map and Pair (${sT(r)}). Unable to process Map CST.`,t);return sL(e,t,r,n,s,i)}if("flow-collection"===t.type)return s_(e,t,r,n,s,i);if("scalar"===t.type){if(!si.isScalar(r))throw n.throwError(`unknown error: AST is not Scalar (${sT(r)}). Unable to process Scalar CST.`,t);return function(e,t,r,n,s,i){let o,a=n.getConvertLocation(...sq(t));if(a.range[0]<a.range[1]){let l=r.source||t.source,c=function(e,t){for(let r of sx[t])if(r.testString(e))return r.resolveString(e);return e}(l,i.version||"1.2");o={type:"YAMLScalar",style:"plain",strValue:l,value:c,raw:n.code.slice(...a.range),parent:s,...a};let u=typeof c;"boolean"===u?n.addToken("Boolean",a.range):"number"===u&&isFinite(Number(c))?n.addToken("Numeric",a.range):null===c?n.addToken("Null",a.range):n.addToken("Identifier",a.range),o=sP(e,r,n,s,o,i,a)}else o=sP(e,r,n,s,null,i,a);return t.end?.forEach(e=>sM(e,n)),o}(e,t,r,n,s,i)}if("double-quoted-scalar"===t.type){let f,h,d;if(!si.isScalar(r))throw n.throwError(`unknown error: AST is not Scalar (${sT(r)}). Unable to process Scalar CST.`,t);return o=e,a=t,l=r,c=n,u=s,p=i,f=c.getConvertLocation(...sq(a)),d={type:"YAMLScalar",style:"double-quoted",strValue:h=l.source,value:h,raw:c.code.slice(...f.range),parent:u,...f},c.addToken("String",f.range),a.end?.forEach(e=>sM(e,c)),sP(o,l,c,u,d,p,d)}if("single-quoted-scalar"===t.type){let o,a,l;if(!si.isScalar(r))throw n.throwError(`unknown error: AST is not Scalar (${sT(r)}). Unable to process Scalar CST.`,t);return f=e,h=t,d=r,g=n,m=s,y=i,o=g.getConvertLocation(...sq(h)),l={type:"YAMLScalar",style:"single-quoted",strValue:a=d.source,value:a,raw:g.code.slice(...o.range),parent:m,...o},g.addToken("String",o.range),h.end?.forEach(e=>sM(e,g)),sP(f,d,g,m,l,y,l)}if("alias"===t.type){if(!si.isAlias(r))throw n.throwError(`unknown error: AST is not Alias (${sT(r)}). Unable to process Alias CST.`,t);return function(e,t,r,n){let[s,i]=sq(t),o=r.getConvertLocation(s,r.lastSkipSpaces(s,i)),a={type:"YAMLAlias",name:t.source.slice(1),parent:n,...o};r.addToken("Punctuator",[o.range[0],o.range[0]+1]);let l=[o.range[0]+1,o.range[1]];l[0]<l[1]&&r.addToken("Identifier",l);let c=e.first();if(c)throw r.throwUnexpectedTokenError(c);return t.end?.forEach(e=>sM(e,r)),a}(e,t,n,s)}throw Error(`Unsupported node: ${t.type}`)}function sL(e,t,r,n,s,i){let o,a;if(sA(r)){if(r.srcToken!==t.items[0])throw n.throwError(`unknown error: CST is mismatched. Unable to process mapping CST (${t.type}: "CollectionItem").`,t)}else if(r.srcToken!==t)throw n.throwError(`unknown error: CST is mismatched. Unable to process mapping CST (${t.type}: ${r.srcToken?.type}).`,t);let l={type:"YAMLMapping",style:"block",pairs:[],parent:s,...n.getConvertLocation(t.offset,t.offset)},c=sj(r);for(let e of t.items){let t,r=new sC(e.start,n),s=null;for(;t=r.consume();){if("explicit-key-ind"===t.type){if(s)throw n.throwUnexpectedTokenError(t);a=s=n.addToken("Punctuator",sq(t)),o??=s;continue}r.back();break}let u=c.shift();if(!u){let t=r.first()||s||e.key||e.sep?.[0]||e.value;if(!t)break;throw n.throwUnexpectedTokenError(t)}l.pairs.push(sI(s,r,e,u,n,l,i))}return(sU(l,o),sU(l,l.pairs[0]),sK(l,l.pairs[l.pairs.length-1]||a),si.isMap(r))?sP(e,r,n,s,l,i,l):l}function s_(e,t,r,n,s,i){if("flow-map-start"===t.start.type){let o=n.addToken("Punctuator",sq(t.start));if(!si.isMap(r)&&!sA(r))throw n.throwError(`unknown error: AST is not Map and Pair (${sT(r)}). Unable to process flow map CST.`,t);return function(e,t,r,n,s,i,o){let a,l,c={type:"YAMLMapping",style:"flow",pairs:[],parent:i,...s.getConvertLocation(t.range[0],r.offset)},u=sj(n);for(let e of r.items){let t,r=new sC(e.start,s),n=null;for(;t=r.consume();){if("comma"===t.type){a=s.addToken("Punctuator",sq(t));continue}if("explicit-key-ind"===t.type){if(n)throw s.throwUnexpectedTokenError(t);a=n=s.addToken("Punctuator",sq(t));continue}r.back();break}let i=u.shift();if(!i){let t=r.first()||n||e.key||e.sep?.[0]||e.value;if(!t)break;throw s.throwUnexpectedTokenError(t)}c.pairs.push(sI(n,r,e,i,s,c,o))}for(let e of r.end)if(!sD(e,s)){if("flow-map-end"===e.type){l=s.addToken("Punctuator",sq(e));continue}throw s.throwUnexpectedTokenError(e)}return(sK(c,l||c.pairs[c.pairs.length-1]||a),si.isMap(n))?sP(e,n,s,i,c,o,c):c}(e,o,t,r,n,s,i)}if("flow-seq-start"===t.start.type){let o=n.addToken("Punctuator",sq(t.start));if(!si.isSeq(r)||!r.flow)throw n.throwError(`unknown error: AST is not flow Seq (${sT(r)}). Unable to process flow seq CST.`,t);return function(e,t,r,n,s,i,o){let a,l,c={type:"YAMLSequence",style:"flow",entries:[],parent:i,...s.getConvertLocation(t.range[0],r.offset)},u=[...n.items];for(let e of r.items){let r,n=new sC(e.start,s);for(;r=n.consume();){if("comma"===r.type){a=s.addToken("Punctuator",sq(r));continue}n.back();break}if(0===u.length){let t=n.first()||e.key||e.sep?.[0]||e.value;if(!t)break;throw s.throwUnexpectedTokenError(t)}let i=u.shift();sA(i)||(e.key||e.sep)&&si.isMap(i)?c.entries.push(function(e,t,r){let n,i=null;for(;n=e.consume();){if("comma"===n.type){s.addToken("Punctuator",sq(n));continue}if("explicit-key-ind"===n.type){if(i)throw s.throwUnexpectedTokenError(n);i=s.addToken("Punctuator",sq(n));continue}e.back();break}let a=t.key??t.sep[0],l={type:"YAMLMapping",style:"block",pairs:[],parent:c,...s.getConvertLocation(i?.range[0]??a.offset,i?.range[1]??a.offset)},u=sI(i,e,t,sj(r)[0],s,l,o);return l.pairs.push(u),sU(l,i||u),sK(l,u||i),l}(n,e,i)):c.entries.push(function(e,t,r,n,s,i,o){if(t)return sN(e,t,r,n,s,i);if(!s$(r))throw n.throwError(`unknown error: AST is not Scalar and null (${sT(r)}). Unable to process empty seq item CST.`,e.first()??o);return sP(e,r,n,s,null,i,null)}(n,e.value||null,i||null,s,c,o,(c.entries[c.entries.length-1]||a||t).range[1]))}for(let e of r.end)if(!sD(e,s)){if("flow-seq-end"===e.type){l=s.addToken("Punctuator",sq(e));continue}throw s.throwUnexpectedTokenError(e)}return sK(c,l||c.entries[c.entries.length-1]||a),sP(e,n,s,i,c,o,c)}(e,o,t,r,n,s,i)}throw n.throwUnexpectedTokenError(t.start)}function sI(e,t,r,n,s,i,o){let a,l,c=e?.range[0]??t.first()?.offset??r.key?.offset??r.sep?.[0]?.offset??r.value?.offset??-1,u={type:"YAMLPair",key:null,value:null,parent:i,...s.getConvertLocation(c,c)};u.key=function(e,t,r,n,s,i,o){if(t)return sN(e,t,r,n,s,i);if(!s$(r))throw n.throwError(`unknown error: AST is not Scalar and null (${sT(r)}). Unable to process empty map key CST.`,e.first()??o);return sP(e,r,n,s,null,i,null)}(t,r.key||null,n.key,s,u,o,c);let p=new sC(r.sep||[],s);for(;l=p.consume();){if("map-value-ind"===l.type){if(a)throw s.throwUnexpectedTokenError(l);a=s.addToken("Punctuator",sq(l));continue}p.back();break}return u.value=function(e,t,r,n,s,i,o){if(t)return sN(e,t,r,n,s,i);if(!s$(r))throw n.throwError(`unknown error: AST is not Scalar and null (${sT(r)}). Unable to process empty map value CST.`,e.first()??o);return sP(e,r,n,s,null,i,null)}(p,r.value||null,n.value,s,u,o,c),sK(u,u.value||a||u.key||e),u}function sP(e,t,r,n,s,i,o){let a=null;function l(e){var t;return a||(a={type:"YAMLWithMeta",anchor:null,tag:null,value:s,parent:n,...o?{range:[...o.range],loc:{start:sF((t=o.loc).start),end:sF(t.end)}}:r.getConvertLocation(...sq(e))},s&&(s.parent=a)),a}return e.each(e=>{var n,s,o,a,c,u,p,f;if("anchor"===e.type){let t,c,u,p,f,h=l(e),d=(n=e,s=r,o=h,a=i,t=n.source.slice(1),u={type:"YAMLAnchor",name:t,parent:o,...c=s.getConvertLocation(...sq(n))},(a.anchors[t]||(a.anchors[t]=[])).push(u),p=[c.range[0],c.range[0]+1],s.addToken("Punctuator",p),(f=[p[1],c.range[1]])[0]<f[1]&&s.addToken("Identifier",f),u);h.anchor=d,sU(h,d),sK(h,d)}else if("tag"===e.type){let n,s,i,o,a,h,d=l(e),g=(c=e,u=t?.tag??null,p=r,f=d,n=c.source.startsWith("!!")?2:1,"!"===(s=u??c.source.slice(n))&&(s="tag:yaml.org,2002:str"),i=p.getConvertLocation(...sq(c)),o={type:"YAMLTag",tag:s,raw:c.source,parent:f,...i},a=[i.range[0],i.range[0]+n],p.addToken("Punctuator",a),(h=[a[1],i.range[1]])[0]<h[1]&&p.addToken("Identifier",h),o);d.tag=g,sU(d,g),sK(d,g)}else throw r.throwUnexpectedTokenError(e)}),a||s}function s$(e){return si.isScalar(e)||null==e}function sj(e){return si.isMap(e)?[...e.items]:[e]}function sD(e,t){if("space"===e.type||"newline"===e.type)return!0;if("flow-error-end"===e.type||"error"===e.type)throw t.throwUnexpectedTokenError(e);if("comment"===e.type){let r={type:"Block",value:e.source.slice(1),...t.getConvertLocation(...sq(e))};return t.addComment(r),!0}return!1}function sM(e,t){if(!sD(e,t))throw t.throwUnexpectedTokenError(e)}function sR(e){return e.sort((e,t)=>e.range[0]>t.range[0]?1:e.range[0]<t.range[0]?-1:e.range[1]>t.range[1]?1:e.range[1]<t.range[1]?-1:0)}function sF(e){return{line:e.line,column:e.column}}function sB(e,t){let r=e.length;for(let n=t;n<r;n++)if(e[n].trim())return n;return r}function sq(e){return[e.offset,e.offset+e.source.length]}function sU(e,t){t&&t.range[0]<e.range[0]&&(e.range[0]=t.range[0],e.loc.start=sF(t.loc.start))}function sK(e,t){t&&e.range[1]<t.range[1]&&(e.range[1]=t.range[1],e.loc.end=sF(t.loc.end))}var sW=class{constructor(t,r){this.tokens=[],this.comments=[],this.locsMap=new e,this.options=function(e){if(!e)return{};let t={},r=e.defaultYAMLVersion;if("string"==typeof r||"number"==typeof r){let e=String(r);"1.2"===e||"1.1"===e?t.version=e:t.version="next"}return t}(r),this.code=t,this.lineCounter=new si.LineCounter}getLocFromIndex(e){let t=this.locsMap.get(e);if(!t){let{line:r,col:n}=this.lineCounter.linePos(e);t={line:r,column:n-1},this.locsMap.set(e,t)}return{line:t.line,column:t.column}}getConvertLocation(e,t){return{range:[e,t],loc:{start:this.getLocFromIndex(e),end:this.getLocFromIndex(t)}}}addComment(e){this.comments.push(e)}addToken(e,t){let r={type:e,value:this.code.slice(...t),...this.getConvertLocation(...t)};return this.tokens.push(r),r}throwUnexpectedTokenError(e){let t="source"in e?`'${e.source}'`:e.type;throw this.throwError(`Unexpected token: ${t}`,e)}throwError(e,t){let r="number"==typeof t?t:"offset"in t?t.offset:t.range[0],n=this.getLocFromIndex(r);throw new sX(e,r,n.line,n.column)}lastSkipSpaces(e,t){let r=this.code;for(let n=t-1;n>=e;n--)if(r[n].trim())return n+1;return e}};function sY(e,t){let r=new sW(e,t);return function(e,t){let{cstNodes:r}=e,n={type:"Program",body:[],comments:t.comments,sourceType:"module",tokens:t.tokens,parent:null,...t.getConvertLocation(0,t.code.length)},s=[],i=null,o=[];for(let n of r)if(!sD(n,t)){if("doc-end"===n.type){if(!i)throw t.throwUnexpectedTokenError(n);i.docEnd=n,o.push(i),i=null,n.end?.forEach(e=>sM(e,t));continue}if(i&&(o.push(i),i=null),"directive"===n.type){s.push(n);continue}if("document"===n.type){i={doc:n,node:e.nodes[o.length],directives:s},s=[];continue}throw t.throwUnexpectedTokenError(n)}if(i&&(o.push(i),i=null),s.length>0&&o.push({doc:null,node:null,directives:s}),o.length>0){let r=0;n.body=o.map(s=>{let i=function(e,{directives:t,doc:r,node:n,docEnd:s},i,o,a){let l;if(!r||!n){let r=sB(i.code,a),n=i.getConvertLocation(r,r),l={type:"YAMLDocument",directives:[],content:null,parent:o,anchors:{},version:e.streamInfo.directives.yaml.version,...n};l.directives.push(...sO(null,t,i,l));let c=l.directives[l.directives.length-1];return s&&(c=i.addToken("Marker",sq(s))),sK(l,c),l}let c=i.getConvertLocation(sB(i.code,a),n.range[1]),u={type:"YAMLDocument",directives:[],content:null,parent:o,anchors:{},version:n.directives.yaml.version,...c};u.directives.push(...sO(n.directives,t,i,u));let p=u.directives[u.directives.length-1],f=new sC(r.start,i);for(;l=f.consume();){if("doc-start"===l.type){p=i.addToken("Marker",sq(l));continue}f.back();break}return u.content=function(e,t,r,n,s){if(t)return sN(e,t,r,n,s,s);let i=e.first();if(i){if(si.isScalar(r)&&""===r.source)return sP(e,r,n,s,null,s,n.getConvertLocation(r.range[0],r.range[1]));throw n.throwUnexpectedTokenError(i)}return null}(f,r.value||null,n.contents,i,u),p=u.content||p,r.end&&r.end.forEach(e=>sM(e,i)),s&&(p=i.addToken("Marker",sq(s))),sK(u,p),u}(e,s,t,n,r);return r=i.range[1],i})}else{let r=sB(t.code,0);n.body.push({type:"YAMLDocument",directives:[],content:null,parent:n,anchors:{},version:e.streamInfo.directives.yaml.version,...t.getConvertLocation(r,r)})}sR(t.comments),sR(t.tokens);let a=n.body[n.body.length-1];return a&&sK(a,t.comments[t.comments.length-1]),n}(function(e){let{lineCounter:t}=e,r=new si.Parser(t.addNewLine),n=new si.Composer({...e.options,keepSourceTokens:!0,lineCounter:t}),s=[...r.parse(e.code)],i=[];for(let t of n.compose(s)){for(let r of t.errors)throw e.throwError(r.message,r.pos[0]);i.push(t)}return{nodes:i,cstNodes:s,streamInfo:n.streamInfo()}}(r),r)}let sJ=function(e){let t=Object.assign({},sa);for(let n of Object.keys(e))if(Object.hasOwn(t,n)){let s=new r(e[n]);for(let e of t[n])s.add(e);t[n]=Object.freeze(Array.from(s))}else t[n]=Object.freeze(Array.from(e[n]));return Object.freeze(t)}({Program:["body"],YAMLDocument:["directives","content"],YAMLDirective:[],YAMLMapping:["pairs"],YAMLPair:["key","value"],YAMLSequence:["entries"],YAMLWithMeta:["anchor","tag","value"],YAMLScalar:[],YAMLAlias:[],YAMLAnchor:[],YAMLTag:[]});function sG(e){let t=null;return"comments"!==e&&"leadingComments"!==e&&"loc"!==e&&"parent"!==e&&"range"!==e&&"tokens"!==e&&"trailingComments"!==e&&null!==(t=this[e])&&"object"==typeof t&&("string"==typeof t.type||Array.isArray(t))}function*sH(e,t){let r=e[t];if(Array.isArray(r))for(let e of r)sV(e)&&(yield e);else sV(r)&&(yield r)}function sV(e){return null!==e&&"object"==typeof e&&"string"==typeof e.type}var sX=class extends SyntaxError{constructor(e,t,r,n){super(e),this.index=t,this.lineNumber=r,this.column=n}},sQ=(e=>{let t={};for(var r in e)rc(t,r,{get:e[r],enumerable:!0});return rc(t,Symbol.toStringTag,{value:"Module"}),t})({name:()=>sz,version:()=>sZ});let sz="yaml-eslint-parser",sZ="2.1.0";var s0=Object.freeze({__proto__:null,ParseError:sX,VisitorKeys:sJ,getStaticYAMLValue:sl,meta:sQ,name:sz,parseForESLint:function(e,t){return{ast:sY(e,t),visitorKeys:sJ,services:{isYAML:!0}}},parseYAML:sY,traverseNodes:function(e,t){!function e(t,r,n){for(let s of(n.enterNode(t,r),((n.visitorKeys||sJ)[t.type]||Object.keys(t).filter(sG,t)).filter(e=>!sH(t,e).next().done)))for(let r of sH(t,s))e(r,t,n);n.leaveNode(t,r)}(e,null,t)}});function s1(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s2(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,s,i,o,a=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t);else for(;!(l=(n=i.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,s=e}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw s}}return a}}(e,t)||s9(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s3(e){return(s3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s9(e,t){if(e){if("string"==typeof e)return s1(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s1(e,t):void 0}}function s6(e,t){return e(t={exports:{}},t.exports),t.exports}var s4=s6(function(e,t){!function e(t){var r,n,s,i,o,a;function l(e){var t,r,n={};for(t in e)e.hasOwnProperty(t)&&(r=e[t],n[t]="object"==typeof r&&null!==r?l(r):r);return n}function c(e,t){this.parent=e,this.key=t}function u(e,t,r,n){this.node=e,this.path=t,this.wrap=r,this.ref=n}function p(){}function f(e){return null!=e&&"object"==typeof e&&"string"==typeof e.type}function h(e,t){return(e===r.ObjectExpression||e===r.ObjectPattern)&&"properties"===t}function d(e,t){for(var r=e.length-1;r>=0;--r)if(e[r].node===t)return!0;return!1}function g(e,t){return(new p).traverse(e,t)}return r={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",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"},s={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},n={Break:i={},Skip:o={},Remove:a={}},c.prototype.replace=function(e){this.parent[this.key]=e},c.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},p.prototype.path=function(){var e,t,r,n,s;function i(e,t){if(Array.isArray(t))for(r=0,n=t.length;r<n;++r)e.push(t[r]);else e.push(t)}if(!this.__current.path)return null;for(s=[],e=2,t=this.__leavelist.length;e<t;++e)i(s,this.__leavelist[e].path);return i(s,this.__current.path),s},p.prototype.type=function(){return this.current().type||this.__current.wrap},p.prototype.parents=function(){var e,t,r;for(r=[],e=1,t=this.__leavelist.length;e<t;++e)r.push(this.__leavelist[e].node);return r},p.prototype.current=function(){return this.__current.node},p.prototype.__execute=function(e,t){var r,n;return n=void 0,r=this.__current,this.__current=t,this.__state=null,e&&(n=e.call(this,t.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=r,n},p.prototype.notify=function(e){this.__state=e},p.prototype.skip=function(){this.notify(o)},p.prototype.break=function(){this.notify(i)},p.prototype.remove=function(){this.notify(a)},p.prototype.__initialize=function(e,t){this.visitor=t,this.root=e,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,"iteration"===t.fallback?this.__fallback=Object.keys:"function"==typeof t.fallback&&(this.__fallback=t.fallback),this.__keys=s,t.keys&&(this.__keys=Object.assign(Object.create(this.__keys),t.keys))},p.prototype.traverse=function(e,t){var r,n,s,a,l,c,p,g,m,y,b,v;for(this.__initialize(e,t),v={},r=this.__worklist,n=this.__leavelist,r.push(new u(e,null,null,null)),n.push(new u(null,null,null,null));r.length;)if((s=r.pop())!==v){if(s.node){if(c=this.__execute(t.enter,s),this.__state===i||c===i)return;if(r.push(v),n.push(s),this.__state===o||c===o)continue;if(l=(a=s.node).type||s.wrap,!(y=this.__keys[l])){if(!this.__fallback)throw Error("Unknown node type "+l+".");y=this.__fallback(a)}for(g=y.length;(g-=1)>=0;)if(b=a[p=y[g]]){if(Array.isArray(b)){for(m=b.length;(m-=1)>=0;)if(b[m]&&!d(n,b[m])){if(h(l,y[g]))s=new u(b[m],[p,m],"Property",null);else{if(!f(b[m]))continue;s=new u(b[m],[p,m],null,null)}r.push(s)}}else if(f(b)){if(d(n,b))continue;r.push(new u(b,p,null,null))}}}}else if(s=n.pop(),c=this.__execute(t.leave,s),this.__state===i||c===i)return},p.prototype.replace=function(e,t){var r,n,s,l,p,d,g,m,y,b,v,k,w;function S(e){var t,n,s,i;if(e.ref.remove()){for(n=e.ref.key,i=e.ref.parent,t=r.length;t--;)if((s=r[t]).ref&&s.ref.parent===i){if(s.ref.key<n)break;--s.ref.key}}}for(this.__initialize(e,t),v={},r=this.__worklist,n=this.__leavelist,d=new u(e,null,null,new c(k={root:e},"root")),r.push(d),n.push(d);r.length;)if((d=r.pop())!==v){if(void 0!==(p=this.__execute(t.enter,d))&&p!==i&&p!==o&&p!==a&&(d.ref.replace(p),d.node=p),this.__state!==a&&p!==a||(S(d),d.node=null),this.__state===i||p===i)return k.root;if((s=d.node)&&(r.push(v),n.push(d),this.__state!==o&&p!==o)){if(l=s.type||d.wrap,!(y=this.__keys[l])){if(!this.__fallback)throw Error("Unknown node type "+l+".");y=this.__fallback(s)}for(g=y.length;(g-=1)>=0;)if(b=s[w=y[g]])if(Array.isArray(b)){for(m=b.length;(m-=1)>=0;)if(b[m]){if(h(l,y[g]))d=new u(b[m],[w,m],"Property",new c(b,m));else{if(!f(b[m]))continue;d=new u(b[m],[w,m],null,new c(b,m))}r.push(d)}}else f(b)&&r.push(new u(b,w,null,new c(s,w)))}}else if(d=n.pop(),void 0!==(p=this.__execute(t.leave,d))&&p!==i&&p!==o&&p!==a&&d.ref.replace(p),this.__state!==a&&p!==a||S(d),this.__state===i||p===i)break;return k.root},t.Syntax=r,t.traverse=g,t.replace=function(e,t){return(new p).replace(e,t)},t.attachComments=function(e,t,r){var s,i,o,a,c=[];if(!e.range)throw Error("attachComments needs range information");if(!r.length){if(t.length){for(o=0,i=t.length;o<i;o+=1)(s=l(t[o])).extendedRange=[0,e.range[0]],c.push(s);e.leadingComments=c}return e}for(o=0,i=t.length;o<i;o+=1)c.push(function(e,t){var r;return r=function(e,t){var r,n,s,i;for(n=e.length,s=0;n;)t(e[i=s+(r=n>>>1)])?n=r:(s=i+1,n-=r+1);return s}(t,function(t){return t.range[0]>e.range[0]}),e.extendedRange=[e.range[0],e.range[1]],r!==t.length&&(e.extendedRange[1]=t[r].range[0]),(r-=1)>=0&&(e.extendedRange[0]=t[r].range[1]),e}(l(t[o]),r));return a=0,g(e,{enter:function(e){for(var t;a<c.length&&!((t=c[a]).extendedRange[1]>e.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),c.splice(a,1)):a+=1;return a===c.length?n.Break:c[a].extendedRange[0]>e.range[1]?n.Skip:void 0}}),a=0,g(e,{leave:function(e){for(var t;a<c.length&&(t=c[a],!(e.range[1]<t.extendedRange[0]));)e.range[1]===t.extendedRange[0]?(e.trailingComments||(e.trailingComments=[]),e.trailingComments.push(t),c.splice(a,1)):a+=1;return a===c.length?n.Break:c[a].extendedRange[0]>e.range[1]?n.Skip:void 0}}),e},t.VisitorKeys=s,t.VisitorOption=n,t.Controller=p,t.cloneEnvironment=function(){return e({})},t}(t)}),s8=s6(function(e){e.exports&&(e.exports=function(){function e(t,r,n,s){this.message=t,this.expected=r,this.found=n,this.location=s,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e)}return function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(e,Error),e.buildMessage=function(e,t){var r={literal:function(e){return'"'+s(e.text)+'"'},class:function(e){var t,r="";for(t=0;t<e.parts.length;t++)r+=e.parts[t]instanceof Array?i(e.parts[t][0])+"-"+i(e.parts[t][1]):i(e.parts[t]);return"["+(e.inverted?"^":"")+r+"]"},any:function(e){return"any character"},end:function(e){return"end of input"},other:function(e){return e.description}};function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function s(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+n(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+n(e)})}function i(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+n(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+n(e)})}return"Expected "+function(e){var t,n,s,i=Array(e.length);for(t=0;t<e.length;t++)i[t]=r[(s=e[t]).type](s);if(i.sort(),i.length>0){for(t=1,n=1;t<i.length;t++)i[t-1]!==i[t]&&(i[n]=i[t],n++);i.length=n}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}(e)+" but "+(t?'"'+s(t)+'"':"end of input")+" found."},{SyntaxError:e,parse:function(r,n){n=void 0!==n?n:{};var s,i,o,a,l={},c={start:ew},u=ew,p=em(" ",!1),f=/^[^ [\],():#!=><~+.]/,h=ey([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),d=em(">",!1),g=em("~",!1),m=em("+",!1),y=em(",",!1),b=function(e,t){return[e].concat(t.map(function(e){return e[3]}))},v=em("!",!1),k=em("*",!1),w=em("#",!1),S=em("[",!1),x=em("]",!1),E=/^[><!]/,A=ey([">","<","!"],!1,!1),C=em("=",!1),T=function(e){return(e||"")+"="},O=/^[><]/,N=ey([">","<"],!1,!1),L=em(".",!1),_=function(e,t,r){return{type:"attribute",name:e,operator:t,value:r}},I=em('"',!1),P=/^[^\\"]/,$=ey(["\\",'"'],!0,!1),j=em("\\",!1),D={type:"any"},M=function(e,t){return e+t},R=function(e){return{type:"literal",value:e.join("").replace(/\\(.)/g,function(e,t){switch(t){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return" ";case"v":return"\v";default:return t}})}},F=em("'",!1),B=/^[^\\']/,q=ey(["\\","'"],!0,!1),U=/^[0-9]/,K=ey([["0","9"]],!1,!1),W=em("type(",!1),Y=/^[^ )]/,J=ey([" ",")"],!0,!1),G=em(")",!1),H=/^[imsu]/,V=ey(["i","m","s","u"],!1,!1),X=em("/",!1),Q=/^[^\]\\]/,z=ey(["]","\\"],!0,!1),Z=/^[^\/\\[]/,ee=ey(["/","\\","["],!0,!1),et=em(":not(",!1),er=em(":matches(",!1),en=function(e){return{type:"matches",selectors:e}},es=em(":is(",!1),ei=em(":has(",!1),eo=em(":first-child",!1),ea=em(":last-child",!1),el=em(":nth-child(",!1),ec=em(":nth-last-child(",!1),eu=em(":",!1),ep=0,ef=[{line:1,column:1}],eh=0,ed=[],eg={};if("startRule"in n){if(!(n.startRule in c))throw Error("Can't start parsing from rule \""+n.startRule+'".');u=c[n.startRule]}function em(e,t){return{type:"literal",text:e,ignoreCase:t}}function ey(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function eb(e){var t,n=ef[e];if(n)return n;for(t=e-1;!ef[t];)t--;for(n={line:(n=ef[t]).line,column:n.column};t<e;)10===r.charCodeAt(t)?(n.line++,n.column=1):n.column++,t++;return ef[e]=n,n}function ev(e,t){var r=eb(e),n=eb(t);return{start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:n.line,column:n.column}}}function ek(e){ep<eh||(ep>eh&&(eh=ep,ed=[]),ed.push(e))}function ew(){var e,t,r,n,s=36*ep+0,i=eg[s];return i?(ep=i.nextPos,i.result):(e=ep,(t=eS())!==l&&(r=eA())!==l&&eS()!==l?e=t=1===(n=r).length?n[0]:{type:"matches",selectors:n}:(ep=e,e=l),e===l&&(e=ep,(t=eS())!==l&&(t=void 0),e=t),eg[s]={nextPos:ep,result:e},e)}function eS(){var e,t,n=36*ep+1,s=eg[n];if(s)return ep=s.nextPos,s.result;for(e=[],32===r.charCodeAt(ep)?(t=" ",ep++):(t=l,ek(p));t!==l;)e.push(t),32===r.charCodeAt(ep)?(t=" ",ep++):(t=l,ek(p));return eg[n]={nextPos:ep,result:e},e}function ex(){var e,t,n,s=36*ep+2,i=eg[s];if(i)return ep=i.nextPos,i.result;if(t=[],f.test(r.charAt(ep))?(n=r.charAt(ep),ep++):(n=l,ek(h)),n!==l)for(;n!==l;)t.push(n),f.test(r.charAt(ep))?(n=r.charAt(ep),ep++):(n=l,ek(h));else t=l;return t!==l&&(t=t.join("")),e=t,eg[s]={nextPos:ep,result:e},e}function eE(){var e,t,n,s=36*ep+3,i=eg[s];return i?(ep=i.nextPos,i.result):(e=ep,(t=eS())!==l?(62===r.charCodeAt(ep)?(n=">",ep++):(n=l,ek(d)),n!==l&&eS()!==l?e=t="child":(ep=e,e=l)):(ep=e,e=l),e===l&&(e=ep,(t=eS())!==l?(126===r.charCodeAt(ep)?(n="~",ep++):(n=l,ek(g)),n!==l&&eS()!==l?e=t="sibling":(ep=e,e=l)):(ep=e,e=l),e===l&&(e=ep,(t=eS())!==l?(43===r.charCodeAt(ep)?(n="+",ep++):(n=l,ek(m)),n!==l&&eS()!==l?e=t="adjacent":(ep=e,e=l)):(ep=e,e=l),e===l&&(e=ep,32===r.charCodeAt(ep)?(t=" ",ep++):(t=l,ek(p)),t!==l&&(n=eS())!==l?e=t="descendant":(ep=e,e=l)))),eg[s]={nextPos:ep,result:e},e)}function eA(){var e,t,n,s,i,o,a,c,u=36*ep+5,p=eg[u];if(p)return ep=p.nextPos,p.result;if(e=ep,(t=eT())!==l){for(n=[],s=ep,(i=eS())!==l?(44===r.charCodeAt(ep)?(o=",",ep++):(o=l,ek(y)),o!==l&&(a=eS())!==l&&(c=eT())!==l?s=i=[i,o,a,c]:(ep=s,s=l)):(ep=s,s=l);s!==l;)n.push(s),s=ep,(i=eS())!==l?(44===r.charCodeAt(ep)?(o=",",ep++):(o=l,ek(y)),o!==l&&(a=eS())!==l&&(c=eT())!==l?s=i=[i,o,a,c]:(ep=s,s=l)):(ep=s,s=l);n!==l?e=t=b(t,n):(ep=e,e=l)}else ep=e,e=l;return eg[u]={nextPos:ep,result:e},e}function eC(){var e,t,r,n,s,i=36*ep+6,o=eg[i];return o?(ep=o.nextPos,o.result):(e=ep,(t=eE())===l&&(t=null),t!==l&&(r=eT())!==l?(s=r,e=t=(n=t)?{type:n,left:{type:"exactNode"},right:s}:s):(ep=e,e=l),eg[i]={nextPos:ep,result:e},e)}function eT(){var e,t,r,n,s,i,o,a=36*ep+7,c=eg[a];if(c)return ep=c.nextPos,c.result;if(e=ep,(t=eO())!==l){for(r=[],n=ep,(s=eE())!==l&&(i=eO())!==l?n=s=[s,i]:(ep=n,n=l);n!==l;)r.push(n),n=ep,(s=eE())!==l&&(i=eO())!==l?n=s=[s,i]:(ep=n,n=l);r!==l?(o=t,e=t=r.reduce(function(e,t){return{type:t[0],left:e,right:t[1]}},o)):(ep=e,e=l)}else ep=e,e=l;return eg[a]={nextPos:ep,result:e},e}function eO(){var e,t,n,s,i,o,a,c=36*ep+8,u=eg[c];if(u)return ep=u.nextPos,u.result;if(e=ep,33===r.charCodeAt(ep)?(t="!",ep++):(t=l,ek(v)),t===l&&(t=null),t!==l){if(n=[],(s=eN())!==l)for(;s!==l;)n.push(s),s=eN();else n=l;n!==l?(i=t,a=1===(o=n).length?o[0]:{type:"compound",selectors:o},i&&(a.subject=!0),e=t=a):(ep=e,e=l)}else ep=e,e=l;return eg[c]={nextPos:ep,result:e},e}function eN(){var e,n,s,i,o,a,c,u,p,f,h,d,g,m,Q,z,Z,ee,ef,eh,ed,em,ey,eb,ev,ew,eE,eT,eO,eN,eD,eM,eR,eF,eB,eq,eU,eK,eW,eY,eJ,eG,eH,eV,eX,eQ,ez,eZ,e0,e1,e2,e3,e9,e6,e4,e8,e5,e7,te,tt,tr,tn,ts,ti,to,ta,tl,tc,tu,tp,tf,th,td,tg=36*ep+9,tm=eg[tg];return tm?(ep=tm.nextPos,tm.result):((td=(i=eg[s=36*ep+10])?(ep=i.nextPos,i.result):(42===r.charCodeAt(ep)?(n="*",ep++):(n=l,ek(k)),n!==l&&(n={type:"wildcard",value:n}),e=n,eg[s]={nextPos:ep,result:e},e))===l&&(td=(p=eg[u=36*ep+11])?(ep=p.nextPos,p.result):(o=ep,35===r.charCodeAt(ep)?(a="#",ep++):(a=l,ek(w)),a===l&&(a=null),a!==l&&(c=ex())!==l?o=a={type:"identifier",value:c}:(ep=o,o=l),eg[u]={nextPos:ep,result:o},o))===l&&(td=(Q=eg[m=36*ep+12])?(ep=Q.nextPos,Q.result):(f=ep,91===r.charCodeAt(ep)?(h="[",ep++):(h=l,ek(S)),h!==l&&eS()!==l&&(d=(ed=eg[eh=36*ep+16])?(ep=ed.nextPos,ed.result):(z=ep,(Z=eL())!==l&&eS()!==l&&(ee=(ew=eg[ev=36*ep+14])?(ep=ew.nextPos,ew.result):(em=ep,33===r.charCodeAt(ep)?(ey="!",ep++):(ey=l,ek(v)),ey===l&&(ey=null),ey!==l?(61===r.charCodeAt(ep)?(eb="=",ep++):(eb=l,ek(C)),eb!==l?em=ey=T(ey):(ep=em,em=l)):(ep=em,em=l),eg[ev]={nextPos:ep,result:em},em))!==l&&eS()!==l?((ef=function(){var e,t,n,s,i,o=36*ep+20,a=eg[o];if(a)return ep=a.nextPos,a.result;if(e=ep,"type("===r.substr(ep,5)?(t="type(",ep+=5):(t=l,ek(W)),t!==l)if(eS()!==l){if(n=[],Y.test(r.charAt(ep))?(s=r.charAt(ep),ep++):(s=l,ek(J)),s!==l)for(;s!==l;)n.push(s),Y.test(r.charAt(ep))?(s=r.charAt(ep),ep++):(s=l,ek(J));else n=l;n!==l&&(s=eS())!==l?(41===r.charCodeAt(ep)?(i=")",ep++):(i=l,ek(G)),i!==l?e=t={type:"type",value:n.join("")}:(ep=e,e=l)):(ep=e,e=l)}else ep=e,e=l;else ep=e,e=l;return eg[o]={nextPos:ep,result:e},e}())===l&&(ef=function(){var e,n,s,i,o,a,c=36*ep+22,u=eg[c];if(u)return ep=u.nextPos,u.result;if(e=ep,47===r.charCodeAt(ep)?(n="/",ep++):(n=l,ek(X)),n!==l){if(s=[],(i=e_())===l&&(i=eI())===l&&(i=eP()),i!==l)for(;i!==l;)s.push(i),(i=e_())===l&&(i=eI())===l&&(i=eP());else s=l;s!==l?(47===r.charCodeAt(ep)?(i="/",ep++):(i=l,ek(X)),i!==l?((o=function(){var e,t,n=36*ep+21,s=eg[n];if(s)return ep=s.nextPos,s.result;if(e=[],H.test(r.charAt(ep))?(t=r.charAt(ep),ep++):(t=l,ek(V)),t!==l)for(;t!==l;)e.push(t),H.test(r.charAt(ep))?(t=r.charAt(ep),ep++):(t=l,ek(V));else e=l;return eg[n]={nextPos:ep,result:e},e}())===l&&(o=null),o!==l?(a=o,e=n={type:"regexp",value:new t(s.join(""),a?a.join(""):"")}):(ep=e,e=l)):(ep=e,e=l)):(ep=e,e=l)}else ep=e,e=l;return eg[c]={nextPos:ep,result:e},e}()),ef!==l?z=Z=_(Z,ee,ef):(ep=z,z=l)):(ep=z,z=l),z===l&&(z=ep,(Z=eL())!==l&&eS()!==l&&(ee=(eD=eg[eN=36*ep+13])?(ep=eD.nextPos,eD.result):(eE=ep,E.test(r.charAt(ep))?(eT=r.charAt(ep),ep++):(eT=l,ek(A)),eT===l&&(eT=null),eT!==l?(61===r.charCodeAt(ep)?(eO="=",ep++):(eO=l,ek(C)),eO!==l?eE=eT=T(eT):(ep=eE,eE=l)):(ep=eE,eE=l),eE===l&&(O.test(r.charAt(ep))?(eE=r.charAt(ep),ep++):(eE=l,ek(N))),eg[eN]={nextPos:ep,result:eE},eE))!==l&&eS()!==l?((ef=function(){var e,t,n,s,i,o,a=36*ep+17,c=eg[a];if(c)return ep=c.nextPos,c.result;if(e=ep,34===r.charCodeAt(ep)?(t='"',ep++):(t=l,ek(I)),t!==l){for(n=[],P.test(r.charAt(ep))?(s=r.charAt(ep),ep++):(s=l,ek($)),s===l&&(s=ep,92===r.charCodeAt(ep)?(i="\\",ep++):(i=l,ek(j)),i!==l?(r.length>ep?(o=r.charAt(ep),ep++):(o=l,ek(D)),o!==l?s=i=M(i,o):(ep=s,s=l)):(ep=s,s=l));s!==l;)n.push(s),P.test(r.charAt(ep))?(s=r.charAt(ep),ep++):(s=l,ek($)),s===l&&(s=ep,92===r.charCodeAt(ep)?(i="\\",ep++):(i=l,ek(j)),i!==l?(r.length>ep?(o=r.charAt(ep),ep++):(o=l,ek(D)),o!==l?s=i=M(i,o):(ep=s,s=l)):(ep=s,s=l));n!==l?(34===r.charCodeAt(ep)?(s='"',ep++):(s=l,ek(I)),s!==l?e=t=R(n):(ep=e,e=l)):(ep=e,e=l)}else ep=e,e=l;if(e===l)if(e=ep,39===r.charCodeAt(ep)?(t="'",ep++):(t=l,ek(F)),t!==l){for(n=[],B.test(r.charAt(ep))?(s=r.charAt(ep),ep++):(s=l,ek(q)),s===l&&(s=ep,92===r.charCodeAt(ep)?(i="\\",ep++):(i=l,ek(j)),i!==l?(r.length>ep?(o=r.charAt(ep),ep++):(o=l,ek(D)),o!==l?s=i=M(i,o):(ep=s,s=l)):(ep=s,s=l));s!==l;)n.push(s),B.test(r.charAt(ep))?(s=r.charAt(ep),ep++):(s=l,ek(q)),s===l&&(s=ep,92===r.charCodeAt(ep)?(i="\\",ep++):(i=l,ek(j)),i!==l?(r.length>ep?(o=r.charAt(ep),ep++):(o=l,ek(D)),o!==l?s=i=M(i,o):(ep=s,s=l)):(ep=s,s=l));n!==l?(39===r.charCodeAt(ep)?(s="'",ep++):(s=l,ek(F)),s!==l?e=t=R(n):(ep=e,e=l)):(ep=e,e=l)}else ep=e,e=l;return eg[a]={nextPos:ep,result:e},e}())===l&&(ef=function(){var e,t,n,s,i,o,a=36*ep+18,c=eg[a];if(c)return ep=c.nextPos,c.result;for(e=ep,t=ep,n=[],U.test(r.charAt(ep))?(s=r.charAt(ep),ep++):(s=l,ek(K));s!==l;)n.push(s),U.test(r.charAt(ep))?(s=r.charAt(ep),ep++):(s=l,ek(K));if(n!==l?(46===r.charCodeAt(ep)?(s=".",ep++):(s=l,ek(L)),s!==l?t=n=[n,s]:(ep=t,t=l)):(ep=t,t=l),t===l&&(t=null),t!==l){if(n=[],U.test(r.charAt(ep))?(s=r.charAt(ep),ep++):(s=l,ek(K)),s!==l)for(;s!==l;)n.push(s),U.test(r.charAt(ep))?(s=r.charAt(ep),ep++):(s=l,ek(K));else n=l;n!==l?(o=n,e=t={type:"literal",value:parseFloat(((i=t)?[].concat.apply([],i).join(""):"")+o.join(""))}):(ep=e,e=l)}else ep=e,e=l;return eg[a]={nextPos:ep,result:e},e}())===l&&(ef=(eB=eg[eF=36*ep+19])?(ep=eB.nextPos,eB.result):((eR=ex())!==l&&(eR={type:"literal",value:eR}),eM=eR,eg[eF]={nextPos:ep,result:eM},eM)),ef!==l?z=Z=_(Z,ee,ef):(ep=z,z=l)):(ep=z,z=l),z===l&&(z=ep,(Z=eL())!==l&&(Z={type:"attribute",name:Z}),z=Z)),eg[eh]={nextPos:ep,result:z},z))!==l&&eS()!==l?(93===r.charCodeAt(ep)?(g="]",ep++):(g=l,ek(x)),g!==l?f=h=d:(ep=f,f=l)):(ep=f,f=l),eg[m]={nextPos:ep,result:f},f))===l&&(td=function(){var e,t,n,s,i,o,a,c=36*ep+26,u=eg[c];if(u)return ep=u.nextPos,u.result;if(e=ep,46===r.charCodeAt(ep)?(t=".",ep++):(t=l,ek(L)),t!==l)if((n=ex())!==l){for(s=[],i=ep,46===r.charCodeAt(ep)?(o=".",ep++):(o=l,ek(L)),o!==l&&(a=ex())!==l?i=o=[o,a]:(ep=i,i=l);i!==l;)s.push(i),i=ep,46===r.charCodeAt(ep)?(o=".",ep++):(o=l,ek(L)),o!==l&&(a=ex())!==l?i=o=[o,a]:(ep=i,i=l);s!==l?e=t={type:"field",name:s.reduce(function(e,t){return e+t[0]+t[1]},n)}:(ep=e,e=l)}else ep=e,e=l;else ep=e,e=l;return eg[c]={nextPos:ep,result:e},e}())===l&&(td=(eJ=eg[eY=36*ep+27])?(ep=eJ.nextPos,eJ.result):(eq=ep,":not("===r.substr(ep,5)?(eU=":not(",ep+=5):(eU=l,ek(et)),eU!==l&&eS()!==l&&(eK=eA())!==l&&eS()!==l?(41===r.charCodeAt(ep)?(eW=")",ep++):(eW=l,ek(G)),eW!==l?eq=eU={type:"not",selectors:eK}:(ep=eq,eq=l)):(ep=eq,eq=l),eg[eY]={nextPos:ep,result:eq},eq))===l&&(td=(ez=eg[eQ=36*ep+28])?(ep=ez.nextPos,ez.result):(eG=ep,":matches("===r.substr(ep,9)?(eH=":matches(",ep+=9):(eH=l,ek(er)),eH!==l&&eS()!==l&&(eV=eA())!==l&&eS()!==l?(41===r.charCodeAt(ep)?(eX=")",ep++):(eX=l,ek(G)),eX!==l?eG=eH=en(eV):(ep=eG,eG=l)):(ep=eG,eG=l),eg[eQ]={nextPos:ep,result:eG},eG))===l&&(td=(e9=eg[e3=36*ep+29])?(ep=e9.nextPos,e9.result):(eZ=ep,":is("===r.substr(ep,4)?(e0=":is(",ep+=4):(e0=l,ek(es)),e0!==l&&eS()!==l&&(e1=eA())!==l&&eS()!==l?(41===r.charCodeAt(ep)?(e2=")",ep++):(e2=l,ek(G)),e2!==l?eZ=e0=en(e1):(ep=eZ,eZ=l)):(ep=eZ,eZ=l),eg[e3]={nextPos:ep,result:eZ},eZ))===l&&(td=(te=eg[e7=36*ep+30])?(ep=te.nextPos,te.result):(e6=ep,":has("===r.substr(ep,5)?(e4=":has(",ep+=5):(e4=l,ek(ei)),e4!==l&&eS()!==l&&(e8=function(){var e,t,n,s,i,o,a,c,u=36*ep+4,p=eg[u];if(p)return ep=p.nextPos,p.result;if(e=ep,(t=eC())!==l){for(n=[],s=ep,(i=eS())!==l?(44===r.charCodeAt(ep)?(o=",",ep++):(o=l,ek(y)),o!==l&&(a=eS())!==l&&(c=eC())!==l?s=i=[i,o,a,c]:(ep=s,s=l)):(ep=s,s=l);s!==l;)n.push(s),s=ep,(i=eS())!==l?(44===r.charCodeAt(ep)?(o=",",ep++):(o=l,ek(y)),o!==l&&(a=eS())!==l&&(c=eC())!==l?s=i=[i,o,a,c]:(ep=s,s=l)):(ep=s,s=l);n!==l?e=t=b(t,n):(ep=e,e=l)}else ep=e,e=l;return eg[u]={nextPos:ep,result:e},e}())!==l&&eS()!==l?(41===r.charCodeAt(ep)?(e5=")",ep++):(e5=l,ek(G)),e5!==l?e6=e4={type:"has",selectors:e8}:(ep=e6,e6=l)):(ep=e6,e6=l),eg[e7]={nextPos:ep,result:e6},e6))===l&&(td=(ts=eg[tn=36*ep+31])?(ep=ts.nextPos,ts.result):(":first-child"===r.substr(ep,12)?(tr=":first-child",ep+=12):(tr=l,ek(eo)),tr!==l&&(tr=e$(1)),tt=tr,eg[tn]={nextPos:ep,result:tt},tt))===l&&(td=(tl=eg[ta=36*ep+32])?(ep=tl.nextPos,tl.result):(":last-child"===r.substr(ep,11)?(to=":last-child",ep+=11):(to=l,ek(ea)),to!==l&&(to=ej(1)),ti=to,eg[ta]={nextPos:ep,result:ti},ti))===l&&(td=function(){var e,t,n,s,i,o=36*ep+33,a=eg[o];if(a)return ep=a.nextPos,a.result;if(e=ep,":nth-child("===r.substr(ep,11)?(t=":nth-child(",ep+=11):(t=l,ek(el)),t!==l)if(eS()!==l){if(n=[],U.test(r.charAt(ep))?(s=r.charAt(ep),ep++):(s=l,ek(K)),s!==l)for(;s!==l;)n.push(s),U.test(r.charAt(ep))?(s=r.charAt(ep),ep++):(s=l,ek(K));else n=l;n!==l&&(s=eS())!==l?(41===r.charCodeAt(ep)?(i=")",ep++):(i=l,ek(G)),i!==l?e=t=e$(parseInt(n.join(""),10)):(ep=e,e=l)):(ep=e,e=l)}else ep=e,e=l;else ep=e,e=l;return eg[o]={nextPos:ep,result:e},e}())===l&&(td=function(){var e,t,n,s,i,o=36*ep+34,a=eg[o];if(a)return ep=a.nextPos,a.result;if(e=ep,":nth-last-child("===r.substr(ep,16)?(t=":nth-last-child(",ep+=16):(t=l,ek(ec)),t!==l)if(eS()!==l){if(n=[],U.test(r.charAt(ep))?(s=r.charAt(ep),ep++):(s=l,ek(K)),s!==l)for(;s!==l;)n.push(s),U.test(r.charAt(ep))?(s=r.charAt(ep),ep++):(s=l,ek(K));else n=l;n!==l&&(s=eS())!==l?(41===r.charCodeAt(ep)?(i=")",ep++):(i=l,ek(G)),i!==l?e=t=ej(parseInt(n.join(""),10)):(ep=e,e=l)):(ep=e,e=l)}else ep=e,e=l;else ep=e,e=l;return eg[o]={nextPos:ep,result:e},e}())===l&&(td=(th=eg[tf=36*ep+35])?(ep=th.nextPos,th.result):(tc=ep,58===r.charCodeAt(ep)?(tu=":",ep++):(tu=l,ek(eu)),tu!==l&&(tp=ex())!==l?tc=tu={type:"class",name:tp}:(ep=tc,tc=l),eg[tf]={nextPos:ep,result:tc},tc)),eg[tg]={nextPos:ep,result:td},td)}function eL(){var e,t,n,s,i,o,a,c=36*ep+15,u=eg[c];if(u)return ep=u.nextPos,u.result;if(e=ep,(t=ex())!==l){for(n=[],s=ep,46===r.charCodeAt(ep)?(i=".",ep++):(i=l,ek(L)),i!==l&&(o=ex())!==l?s=i=[i,o]:(ep=s,s=l);s!==l;)n.push(s),s=ep,46===r.charCodeAt(ep)?(i=".",ep++):(i=l,ek(L)),i!==l&&(o=ex())!==l?s=i=[i,o]:(ep=s,s=l);n!==l?(a=t,e=t=[].concat.apply([a],n).join("")):(ep=e,e=l)}else ep=e,e=l;return eg[c]={nextPos:ep,result:e},e}function e_(){var e,t,n,s,i=36*ep+23,o=eg[i];if(o)return ep=o.nextPos,o.result;if(e=ep,91===r.charCodeAt(ep)?(t="[",ep++):(t=l,ek(S)),t!==l){if(n=[],Q.test(r.charAt(ep))?(s=r.charAt(ep),ep++):(s=l,ek(z)),s===l&&(s=eI()),s!==l)for(;s!==l;)n.push(s),Q.test(r.charAt(ep))?(s=r.charAt(ep),ep++):(s=l,ek(z)),s===l&&(s=eI());else n=l;n!==l?(93===r.charCodeAt(ep)?(s="]",ep++):(s=l,ek(x)),s!==l?e=t="["+n.join("")+"]":(ep=e,e=l)):(ep=e,e=l)}else ep=e,e=l;return eg[i]={nextPos:ep,result:e},e}function eI(){var e,t,n,s=36*ep+24,i=eg[s];return i?(ep=i.nextPos,i.result):(e=ep,92===r.charCodeAt(ep)?(t="\\",ep++):(t=l,ek(j)),t!==l?(r.length>ep?(n=r.charAt(ep),ep++):(n=l,ek(D)),n!==l?e=t="\\"+n:(ep=e,e=l)):(ep=e,e=l),eg[s]={nextPos:ep,result:e},e)}function eP(){var e,t,n,s=36*ep+25,i=eg[s];if(i)return ep=i.nextPos,i.result;if(t=[],Z.test(r.charAt(ep))?(n=r.charAt(ep),ep++):(n=l,ek(ee)),n!==l)for(;n!==l;)t.push(n),Z.test(r.charAt(ep))?(n=r.charAt(ep),ep++):(n=l,ek(ee));else t=l;return t!==l&&(t=t.join("")),e=t,eg[s]={nextPos:ep,result:e},e}function e$(e){return{type:"nth-child",index:{type:"literal",value:e}}}function ej(e){return{type:"nth-last-child",index:{type:"literal",value:e}}}if((s=u())!==l&&ep===r.length)return s;throw s!==l&&ep<r.length&&ek({type:"end"}),i=ed,o=eh<r.length?r.charAt(eh):null,a=eh<r.length?ev(eh,eh+1):ev(eh,eh),new e(e.buildMessage(i,o),i,o,a)}}}())});function s5(e,t){for(var r=0;r<t.length&&null!=e;++r)e=e[t[r]];return e}var s7="function"==typeof WeakMap?new n:null;function ie(e){if(null==e)return function(){return!0};if(null!=s7){var t=s7.get(e);return null!=t||(t=it(e),s7.set(e,t)),t}return it(e)}function it(e){switch(e.type){case"wildcard":return function(){return!0};case"identifier":var t=e.value.toLowerCase();return function(e,r,n){return t===e[n&&n.nodeTypeKey||"type"].toLowerCase()};case"exactNode":return function(e,t){return 0===t.length};case"field":var r=e.name.split(".");return function(e,t){return function e(t,r,n,s){for(var i=r,o=s;o<n.length;++o){if(null==i)return!1;var a=i[n[o]];if(Array.isArray(a)){for(var l=0;l<a.length;++l)if(e(t,a[l],n,o+1))return!0;return!1}i=a}return t===i}(e,t[r.length-1],r,0)};case"matches":var n=e.selectors.map(ie);return function(e,t,r){for(var s=0;s<n.length;++s)if(n[s](e,t,r))return!0;return!1};case"compound":var s=e.selectors.map(ie);return function(e,t,r){for(var n=0;n<s.length;++n)if(!s[n](e,t,r))return!1;return!0};case"not":var i=e.selectors.map(ie);return function(e,t,r){for(var n=0;n<i.length;++n)if(i[n](e,t,r))return!1;return!0};case"has":var o=e.selectors.map(ie);return function(e,t,r){var n=!1,s=[];return s4.traverse(e,{enter:function(e,t){null!=t&&s.unshift(t);for(var i=0;i<o.length;++i)if(o[i](e,s,r))return n=!0,void this.break()},leave:function(){s.shift()},keys:r&&r.visitorKeys,fallback:r&&r.fallback||"iteration"}),n};case"child":var a=ie(e.left),l=ie(e.right);return function(e,t,r){return!!(t.length>0&&l(e,t,r))&&a(t[0],t.slice(1),r)};case"descendant":var c=ie(e.left),u=ie(e.right);return function(e,t,r){if(u(e,t,r)){for(var n=0,s=t.length;n<s;++n)if(c(t[n],t.slice(n+1),r))return!0}return!1};case"attribute":var p=e.name.split(".");switch(e.operator){case void 0:return function(e){return null!=s5(e,p)};case"=":switch(e.value.type){case"regexp":return function(t){var r=s5(t,p);return"string"==typeof r&&e.value.value.test(r)};case"literal":var f="".concat(e.value.value);return function(e){return f==="".concat(s5(e,p))};case"type":return function(t){return e.value.value===s3(s5(t,p))}}throw Error("Unknown selector value type: ".concat(e.value.type));case"!=":switch(e.value.type){case"regexp":return function(t){return!e.value.value.test(s5(t,p))};case"literal":var h="".concat(e.value.value);return function(e){return h!=="".concat(s5(e,p))};case"type":return function(t){return e.value.value!==s3(s5(t,p))}}throw Error("Unknown selector value type: ".concat(e.value.type));case"<=":return function(t){return s5(t,p)<=e.value.value};case"<":return function(t){return s5(t,p)<e.value.value};case">":return function(t){return s5(t,p)>e.value.value};case">=":return function(t){return s5(t,p)>=e.value.value}}throw Error("Unknown operator: ".concat(e.operator));case"sibling":var d=ie(e.left),g=ie(e.right);return function(t,r,n){return g(t,r,n)&&ii(t,d,r,"LEFT_SIDE",n)||e.left.subject&&d(t,r,n)&&ii(t,g,r,"RIGHT_SIDE",n)};case"adjacent":var m=ie(e.left),y=ie(e.right);return function(t,r,n){return y(t,r,n)&&io(t,m,r,"LEFT_SIDE",n)||e.right.subject&&m(t,r,n)&&io(t,y,r,"RIGHT_SIDE",n)};case"nth-child":var b=e.index.value,v=ie(e.right);return function(e,t,r){return v(e,t,r)&&ia(e,t,b,r)};case"nth-last-child":var k=-e.index.value,w=ie(e.right);return function(e,t,r){return w(e,t,r)&&ia(e,t,k,r)};case"class":var S=e.name.toLowerCase();return function(t,r,n){if(n&&n.matchClass)return n.matchClass(e.name,t,r);if(n&&n.nodeTypeKey)return!1;switch(S){case"statement":if("Statement"===t.type.slice(-9))return!0;case"declaration":return"Declaration"===t.type.slice(-11);case"pattern":if("Pattern"===t.type.slice(-7))return!0;case"expression":return"Expression"===t.type.slice(-10)||"Literal"===t.type.slice(-7)||"Identifier"===t.type&&(0===r.length||"MetaProperty"!==r[0].type)||"MetaProperty"===t.type;case"function":return"FunctionDeclaration"===t.type||"FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type}throw Error("Unknown class name: ".concat(e.name))}}throw Error("Unknown selector type: ".concat(e.type))}function ir(e,t){var r=t&&t.nodeTypeKey||"type",n=e[r];return t&&t.visitorKeys&&t.visitorKeys[n]?t.visitorKeys[n]:s4.VisitorKeys[n]?s4.VisitorKeys[n]:t&&"function"==typeof t.fallback?t.fallback(e):Object.keys(e).filter(function(e){return e!==r})}function is(e,t){var r=t&&t.nodeTypeKey||"type";return null!==e&&"object"===s3(e)&&"string"==typeof e[r]}function ii(e,t,r,n,s){var i=s2(r,1)[0];if(!i)return!1;for(var o=ir(i,s),a=0;a<o.length;++a){var l=i[o[a]];if(Array.isArray(l)){var c=l.indexOf(e);if(c<0)continue;var u=void 0,p=void 0;"LEFT_SIDE"===n?(u=0,p=c):(u=c+1,p=l.length);for(var f=u;f<p;++f)if(is(l[f],s)&&t(l[f],r,s))return!0}}return!1}function io(e,t,r,n,s){var i=s2(r,1)[0];if(!i)return!1;for(var o=ir(i,s),a=0;a<o.length;++a){var l=i[o[a]];if(Array.isArray(l)){var c=l.indexOf(e);if(c<0)continue;if("LEFT_SIDE"===n&&c>0&&is(l[c-1],s)&&t(l[c-1],r,s)||"RIGHT_SIDE"===n&&c<l.length-1&&is(l[c+1],s)&&t(l[c+1],r,s))return!0}}return!1}function ia(e,t,r,n){if(0===r)return!1;var s=s2(t,1)[0];if(!s)return!1;for(var i=ir(s,n),o=0;o<i.length;++o){var a=s[i[o]];if(Array.isArray(a)){var l=r<0?a.length+r:r-1;if(l>=0&&l<a.length&&a[l]===e)return!0}}return!1}function il(e,t,r,n){if(t){var s=[],i=ie(t),o=(function e(t,r){if(null==t||"object"!=s3(t))return[];null==r&&(r=t);for(var n=t.subject?[r]:[],s=Object.keys(t),i=0;i<s.length;++i){var o,a=s[i],l=t[a];n.push.apply(n,function(e){if(Array.isArray(e))return s1(e)}(o=e(l,"left"===a?l:r))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||s9(o)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}return n})(t).map(ie);s4.traverse(e,{enter:function(e,t){if(null!=t&&s.unshift(t),i(e,s,n))if(o.length)for(var a=0,l=o.length;a<l;++a){o[a](e,s,n)&&r(e,t,s);for(var c=0,u=s.length;c<u;++c){var p=s.slice(c+1);o[a](s[c],p,n)&&r(s[c],t,p)}}else r(e,t,s)},leave:function(){s.shift()},keys:n&&n.visitorKeys,fallback:n&&n.fallback||"iteration"})}}function ic(e,t,r){var n=[];return il(e,t,function(e){n.push(e)},r),n}function iu(e){return s8.parse(e)}function ip(e,t,r){return ic(e,iu(t),r)}function ih(e,t){return new Proxy(Object.isFrozen(e)?{__proto__:e}:e,{get:(e,r,n)=>id(t(e,r,n),e,n)})}function id(e,t,r){return"function"==typeof e?function(...n){return e.apply(this===r?t:this,n)}:e}ip.parse=iu,ip.match=ic,ip.traverse=il,ip.matches=function(e,t,r,n){return!t||!!e&&(r||(r=[]),ie(t)(e,r,n))},ip.query=ip;let ig=new r(["Array","Boolean","Document","Element","Identifier","Infinity","Member","NaN","Null","Number","Object","String"]);function im(e){return ig.has(e.type)}function iy(e){return{start:ib(e.start),end:ib(e.end)}}function ib(e){return{line:e.line,column:e.column-1}}function iv(e){return{start:ik(e.start),end:ik(e.end)}}function ik(e){return{line:e.line,column:e.column+1}}let iw=new n,iS=new n;function ix(t){let r=iS.get(t.ast);if(r)return r;let n=function(t){let r=iw.get(t.ast);if(r)return r;let n=new e,s={BlockComment:e=>({type:"Block",get value(){return t.text.slice(e.range[0]+2,e.range[1]-2)},range:e.range,loc:iy(e.loc)}),LineComment:e=>({type:"Line",get value(){return t.text.slice(e.range[0]+2,e.range[1])},range:e.range,loc:iy(e.loc)}),Boolean:e=>i("Keyword",e),Null:e=>i("Keyword",e),Identifier:e=>i("Identifier",e),Infinity(e){let r=t.text.slice(...e.range);return r.startsWith("-")||r.startsWith("+")?[o(r[0],{range:[e.range[0],e.range[0]+1],loc:{start:e.loc.start,end:{line:e.loc.start.line,column:e.loc.start.column+1}}}),i("Identifier",{range:[e.range[0]+1,e.range[1]],loc:{start:{line:e.loc.start.line,column:e.loc.start.column+1},end:e.loc.end}})]:i("Identifier",e)},NaN(e){let r=t.text.slice(...e.range);return r.startsWith("-")||r.startsWith("+")?[o(r[0],{range:[e.range[0],e.range[0]+1],loc:{start:e.loc.start,end:{line:e.loc.start.line,column:e.loc.start.column+1}}}),i("Identifier",{range:[e.range[0]+1,e.range[1]],loc:{start:{line:e.loc.start.line,column:e.loc.start.column+1},end:e.loc.end}})]:i("Identifier",e)},Number(e){let r=t.text.slice(...e.range);return r.startsWith("-")||r.startsWith("+")?[o(r[0],{range:[e.range[0],e.range[0]+1],loc:{start:e.loc.start,end:{line:e.loc.start.line,column:e.loc.start.column+1}}}),i("Numeric",{range:[e.range[0]+1,e.range[1]],loc:{start:{line:e.loc.start.line,column:e.loc.start.column+1},end:e.loc.end}})]:i("Numeric",e)},String:e=>i("String",e),Colon:e=>o(":",e),Comma:e=>o(",",e),LBracket:e=>o("[",e),LBrace:e=>o("{",e),RBracket:e=>o("]",e),RBrace:e=>o("}",e)};return iw.set(t.ast,a),a;function i(e,r){return{type:e,get value(){return t.text.slice(...r.range)},range:r.range,loc:iy(r.loc)}}function o(e,t){return{type:"Punctuator",value:e,range:t.range,loc:iy(t.loc)}}function a(e){if(n.has(e))return n.get(e);let t=s[e.type](e);return n.set(e,t),t}}(t),s=new e,i={Array(e){let t;return{get parent(){return a(e)},type:"JSONArrayExpression",get elements(){return null!=t?t:t=e.elements.map(e=>l(e.value))},range:e.range,loc:iy(e.loc)}},Boolean:e=>({get parent(){return a(e)},type:"JSONLiteral",value:e.value,bigint:null,regex:null,get raw(){return t.text.slice(...e.range)},range:e.range,loc:iy(e.loc)}),Null:e=>({get parent(){return a(e)},type:"JSONLiteral",value:null,bigint:null,regex:null,get raw(){return t.text.slice(...e.range)},range:e.range,loc:iy(e.loc)}),Number(e){let r=t.text.slice(...e.range);if(r.startsWith("-")||r.startsWith("+")){let n=[e.range[0]+1,e.range[1]],s=t.text.slice(...n),i={get parent(){return o},type:"JSONLiteral",value:Math.abs(e.value),bigint:null,regex:null,raw:s,range:n,loc:iy({start:{line:e.loc.start.line,column:e.loc.start.column+1},end:e.loc.end})},o={get parent(){return a(e)},type:"JSONUnaryExpression",operator:r[0],prefix:!0,argument:i,range:e.range,loc:iy(e.loc)};return[o,i]}return{get parent(){return a(e)},type:"JSONLiteral",value:e.value,bigint:null,regex:null,get raw(){return t.text.slice(...e.range)},range:e.range,loc:iy(e.loc)}},String:e=>({get parent(){return a(e)},type:"JSONLiteral",value:e.value,bigint:null,regex:null,get raw(){return t.text.slice(...e.range)},range:e.range,loc:iy(e.loc)}),Document(e){let t,r,s,i={get parent(){return a(e)},type:"Program",get body(){return c},get comments(){return null!=s?s:s=e.tokens.filter(e=>"LineComment"===e.type||"BlockComment"===e.type).flatMap(n)},get tokens(){return null!=r?r:r=e.tokens.filter(e=>"LineComment"!==e.type&&"BlockComment"!==e.type).flatMap(n)},range:e.range,loc:iy(e.loc)},o={parent:i,type:"JSONExpressionStatement",get expression(){return null!=t?t:t=l(e.body)},range:e.body.range,loc:iy(e.body.loc)},c=[o];return[i,o]},Object(e){let t;return{get parent(){return a(e)},type:"JSONObjectExpression",get properties(){return null!=t?t:t=e.members.map(l)},range:e.range,loc:iy(e.loc)}},Member(e){let t,r;return{get parent(){return a(e)},type:"JSONProperty",get key(){return null!=t?t:t=l(e.name)},get value(){return null!=r?r:r=l(e.value)},kind:"init",method:!1,shorthand:!1,computed:!1,range:e.range,loc:iy(e.loc)}},Identifier:e=>({get parent(){return a(e)},type:"JSONIdentifier",name:e.name,range:e.range,loc:iy(e.loc)}),Infinity(e){let r=t.text.slice(...e.range);if(r.startsWith("-")||r.startsWith("+")){let t={get parent(){return n},type:"JSONIdentifier",name:"Infinity",range:[e.range[0]+1,e.range[1]],loc:iy({start:{line:e.loc.start.line,column:e.loc.start.column+1},end:e.loc.end})},n={get parent(){return a(e)},type:"JSONUnaryExpression",operator:r[0],prefix:!0,argument:t,range:e.range,loc:iy(e.loc)};return[n,t]}return{get parent(){return a(e)},type:"JSONIdentifier",name:"Infinity",range:e.range,loc:iy(e.loc)}},NaN(e){let r=t.text.slice(...e.range);if(r.startsWith("-")||r.startsWith("+")){let t={get parent(){return n},type:"JSONIdentifier",name:"NaN",range:[e.range[0]+1,e.range[1]],loc:iy({start:{line:e.loc.start.line,column:e.loc.start.column+1},end:e.loc.end})},n={get parent(){return a(e)},type:"JSONUnaryExpression",operator:r[0],prefix:!0,argument:t,range:e.range,loc:iy(e.loc)};return[n,t]}return{get parent(){return a(e)},type:"JSONIdentifier",name:"NaN",range:e.range,loc:iy(e.loc)}}};return iS.set(t.ast,o),o;function o(e){let t;if(s.has(e))return s.get(e);let r=i[e.type](e);return Array.isArray(r)?s.set(e,t={node:r[0],nodes:r}):s.set(e,t={node:r}),t}function a(e){let r=t.getParent(e);if(!r)return null;if("Element"===r.type)return a(r);let n=o(r);return n.nodes?n.nodes[n.nodes.length-1]:n.node}function l(e){return o(e).node}}let iE=new e([["Program",["Document"]],["JSONExpressionStatement",["Document"]],["JSONLiteral",["Boolean","String","Null","Number"]],["JSONArrayExpression",["Array"]],["JSONObjectExpression",["Object"]],["JSONProperty",["Member"]],["JSONIdentifier",["Identifier","Infinity","NaN"]],["JSONUnaryExpression",["Number","Infinity","NaN"]]]),iA=/^[a-z]+$/iu,iC=new n,iT=/^[A-Za-z]:\//;function iO(e=""){return e?e.replace(/\\/g,"/").replace(iT,e=>e.toUpperCase()):e}let iN=/^[/\\]{2}/,iL=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,i_=/^[A-Za-z]:$/,iI=function(e){if(0===e.length)return".";let t=(e=iO(e)).match(iN),r=iD(e),n="/"===e[e.length-1];return 0===(e=ij(e,!r)).length?r?"/":n?"./":".":(n&&(e+="/"),i_.test(e)&&(e+="/"),t)?r?`//${e}`:`//./${e}`:r&&!iD(e)?`/${e}`:e},iP=function(...e){let t="";for(let r of e)if(r)if(t.length>0){let e="/"===t[t.length-1],n="/"===r[0];e&&n?t+=r.slice(1):t+=e||n?r:`/${r}`}else t+=r;return iI(t)},i$=function(...e){e=e.map(e=>iO(e));let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){let s=n>=0?e[n]:"u">typeof process&&"function"==typeof process.cwd?process.cwd().replace(/\\/g,"/"):"/";s&&0!==s.length&&(t=`${s}/${t}`,r=iD(s))}return(t=ij(t,!r),r&&!iD(t))?`/${t}`:t.length>0?t:"."};function ij(e,t){let r="",n=0,s=-1,i=0,o=null;for(let a=0;a<=e.length;++a){if(a<e.length)o=e[a];else if("/"===o)break;else o="/";if("/"===o){if(s===a-1||1===i);else if(2===i){if(r.length<2||2!==n||"."!==r[r.length-1]||"."!==r[r.length-2]){if(r.length>2){let e=r.lastIndexOf("/");-1===e?(r="",n=0):n=(r=r.slice(0,e)).length-1-r.lastIndexOf("/"),s=a,i=0;continue}else if(r.length>0){r="",n=0,s=a,i=0;continue}}t&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+=`/${e.slice(s+1,a)}`:r=e.slice(s+1,a),n=a-s-1;s=a,i=0}else"."===o&&-1!==i?++i:i=-1}return r}let iD=function(e){return iL.test(e)},iM=function(e){let t=iO(e).replace(/\/$/,"").split("/").slice(0,-1);return 1===t.length&&i_.test(t[0])&&(t[0]+="/"),t.join("/")||(iD(e)?"/":".")},iR=function(e,t){let r=iO(e).split("/"),n="";for(let e=r.length-1;e>=0;e--){let t=r[e];if(t){n=t;break}}return t&&n.endsWith(t)?n.slice(0,-t.length):n};var iF=ts.createRequire("u"<typeof document?require("url").pathToFileURL(__filename).href:to&&"SCRIPT"===to.tagName.toUpperCase()&&to.src||new URL("index.cjs",document.baseURI).href);let iB=/[\\/]/g;function iq(e,t){return e.replace(iB,t)}let iU=/^[a-z]:[\\/]$/i;function iK(e,t){var r;let n,{resolvePaths:s,normalizePath:i,pathSeparator:o}=t,a="win32"===process.platform&&e.includes("/")||e.startsWith(".");return s&&(e=tr.resolve(e)),((i||a)&&(r=e,(n=tr.normalize(r)).length>1&&n[n.length-1]===tr.sep&&(n=n.substring(0,n.length-1)),e=n),"."===e)?"":iq(e[e.length-1]!==o?e+o:e,o)}function iW(e,t){return t+e}function iY(e){return e}let iJ=(e,t)=>{t.push(e||".")},iG=(e,t,r)=>{let n=e||".";r.every(e=>e(n,!0))&&t.push(n)},iH=()=>{},iV=(e,t,r,n)=>{n.every(t=>t(e,!1))&&r.files++},iX=(e,t,r,n)=>{n.every(t=>t(e,!1))&&t.push(e)},iQ=(e,t,r,n)=>{r.files++},iz=(e,t)=>{t.push(e)},iZ=()=>{},i0=e=>e,i1=()=>[""].slice(0,0),i2=(e,t,r)=>{e.push({directory:t,files:r,dir:t})},i3=()=>{},i9=function(e,t,r){let{queue:n,fs:s,options:{suppressErrors:i}}=t;n.enqueue(),s.realpath(e,(o,a)=>{if(o)return n.dequeue(i?null:o,t);s.stat(a,(s,o)=>s?n.dequeue(i?null:s,t):o.isDirectory()&&i4(e,a,t)?n.dequeue(null,t):void(r(o,a),n.dequeue(null,t)))})},i6=function(e,t,r){let{queue:n,fs:s,options:{suppressErrors:i}}=t;n.enqueue();try{let n=s.realpathSync(e),i=s.statSync(n);if(i.isDirectory()&&i4(e,n,t))return;r(i,n)}catch(e){if(!i)throw e}};function i4(e,t,r){if(r.options.useRealPaths){var n,s;return n=t,(s=r).visited.includes(n+s.options.pathSeparator)}let i=tr.dirname(e),o=1;for(;i!==r.root&&o<2;){let e=r.symlinks.get(i);e&&(e===t||e.startsWith(t)||t.startsWith(e))?o++:i=tr.dirname(i)}return r.symlinks.set(e,t),o>1}let i8=e=>e.counts,i5=e=>e.groups,i7=e=>e.paths,oe=e=>e.paths.slice(0,e.options.maxFiles),ot=(e,t,r)=>(oi(t,r,e.counts,e.options.suppressErrors),null),or=(e,t,r)=>(oi(t,r,e.paths,e.options.suppressErrors),null),on=(e,t,r)=>(oi(t,r,e.paths.slice(0,e.options.maxFiles),e.options.suppressErrors),null),os=(e,t,r)=>(oi(t,r,e.groups,e.options.suppressErrors),null);function oi(e,t,r,n){t(e&&!n?e:null,r)}let oo={withFileTypes:!0},oa=(e,t,r,n,s)=>{if(e.queue.enqueue(),n<0)return e.queue.dequeue(null,e);let{fs:i}=e;e.visited.push(t),e.counts.directories++,i.readdir(t||".",oo,(t,i=[])=>{s(i,r,n),e.queue.dequeue(e.options.suppressErrors?null:t,e)})},ol=(e,t,r,n,s)=>{let{fs:i}=e;if(n<0)return;e.visited.push(t),e.counts.directories++;let o=[];try{o=i.readdirSync(t||".",oo)}catch(t){if(!e.options.suppressErrors)throw t}s(o,r,n)};var oc=class{count=0;constructor(e){this.onQueueEmpty=e}enqueue(){return this.count++,this.count}dequeue(e,t){this.onQueueEmpty&&(--this.count<=0||e)&&(this.onQueueEmpty(e,t),e&&(t.controller.abort(),this.onQueueEmpty=void 0))}},ou=class{_files=0;_directories=0;set files(e){this._files=e}get files(){return this._files}set directories(e){this._directories=e}get directories(){return this._directories}get dirs(){return this._directories}},op=class{aborted=!1;abort(){this.aborted=!0}},of=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(t,r,n){var s,i;this.isSynchronous=!n,this.callbackInvoker=function(e,t){let{onlyCounts:r,group:n,maxFiles:s}=e;return r?t?i8:ot:n?t?i5:os:s?t?oe:on:t?i7:or}(r,this.isSynchronous),this.root=iK(t,r),this.state={root:"/"===(s=this.root)||iU.test(s)?this.root:this.root.slice(0,-1),paths:[""].slice(0,0),groups:[],counts:new ou,options:r,queue:new oc((e,t)=>this.callbackInvoker(t,e,n)),symlinks:new e,visited:[""].slice(0,0),controller:new op,fs:r.fs||th},this.joinPath=function(e,t){let{relativePaths:r,includeBasePath:n}=t;return r&&e?function(r,n){return n.startsWith(e)?n.slice(e.length)+r:iq(tr.relative(e,n),t.pathSeparator)+t.pathSeparator+r}:n?iW:iY}(this.root,r),this.pushDirectory=function(e,t){let{includeDirs:r,filters:n,relativePaths:s}=t;if(!r)return iH;if(s)return n&&n.length?function(t,r,n){let s=t.substring(e.length)||".";n.every(e=>e(s,!0))&&r.push(s)}:function(t,r){r.push(t.substring(e.length)||".")};return n&&n.length?iG:iJ}(this.root,r),this.pushFile=function(e){let{excludeFiles:t,filters:r,onlyCounts:n}=e;return t?iZ:r&&r.length?n?iV:iX:n?iQ:iz}(r),this.getArray=r.group?i1:i0,this.groupFiles=r.group?i2:i3,this.resolveSymlink=(i=this.isSynchronous,!r.resolveSymlinks||r.excludeSymlinks?null:i?i6:i9),this.walkDirectory=this.isSynchronous?ol:oa}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,t,r)=>{let{paths:n,options:{filters:s,resolveSymlinks:i,excludeSymlinks:o,exclude:a,maxFiles:l,signal:c,useRealPaths:u,pathSeparator:p},controller:f}=this.state;if(f.aborted||c&&c.aborted||l&&n.length>l)return;let h=this.getArray(this.state.paths);for(let l=0;l<e.length;++l){let c=e[l];if(c.isFile()||c.isSymbolicLink()&&!i&&!o){let e=this.joinPath(c.name,t);this.pushFile(e,h,this.state.counts,s)}else if(c.isDirectory()){let e=t+c.name+this.state.options.pathSeparator;if(a&&a(c.name,e))continue;this.pushDirectory(e,n,s),this.walkDirectory(this.state,e,e,r-1,this.walk)}else if(this.resolveSymlink&&c.isSymbolicLink()){let e=t+c.name;this.resolveSymlink(e,this.state,(t,n)=>{if(t.isDirectory())n=iK(n,this.state.options),a&&a(c.name,u?n:e+p)||this.walkDirectory(this.state,n,u?n:e+p,r-1,this.walk);else{n=u?n:e;let t=tr.basename(n),r=iK(tr.dirname(n),this.state.options);n=this.joinPath(t,r),this.pushFile(n,h,this.state.counts,s)}})}}this.groupFiles(this.state.groups,t,h)}};function oh(e,t,r){new of(e,t,r).start()}var od=class{constructor(e,t){this.root=e,this.options=t}withPromise(){var e,t;return e=this.root,t=this.options,new Promise((r,n)=>{oh(e,t,(e,t)=>{if(e)return n(e);r(t)})})}withCallback(e){oh(this.root,this.options,e)}sync(){return new of(this.root,this.options).start()}};let og=null;try{iF.resolve("picomatch"),og=iF("picomatch")}catch{}var om=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:tr.sep,filters:[]};globFunction;constructor(e){this.options={...this.options,...e},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(e){return this.options.pathSeparator=e,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(e){return this.options.maxDepth=e,this}withMaxFiles(e){return this.options.maxFiles=e,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:e=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=e,this.withFullPaths()}withAbortSignal(e){return this.options.signal=e,this}normalize(){return this.options.normalizePath=!0,this}filter(e){return this.options.filters.push(e),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(e){return this.options.exclude=e,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(e){return new od(e||".",this.options)}withGlobFunction(e){return this.globFunction=e,this}crawlWithOptions(e,t){return this.options={...this.options,...t},new od(e||".",this.options)}glob(...e){return this.globFunction?this.globWithOptions(e):this.globWithOptions(e,{dot:!0})}globWithOptions(e,...t){let r=this.globFunction||og;if(!r)throw Error("Please specify a glob function to use glob matching.");var n=this.globCache[e.join("\0")];return n||(n=r(e,...t),this.globCache[e.join("\0")]=n),this.options.filters.push(e=>n(e)),this}},oy={};function ob(){if(eA)return eE;eA=1;let e="[^\\\\/]",t="[^/]",r="(?:\\/|$)",n="(?:^|\\/)",s=`\\.{1,2}${r}`,i=`(?!${n}${s})`,o=`(?!\\.{0,1}${r})`,a=`(?!${s})`,l=`${t}*?`,c={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:"(?=.)",QMARK:t,END_ANCHOR:r,DOTS_SLASH:s,NO_DOT:"(?!\\.)",NO_DOTS:i,NO_DOT_SLASH:o,NO_DOTS_SLASH:a,QMARK_NO_DOT:"[^.\\/]",STAR:l,START_ANCHOR:n,SEP:"/"},u={...c,SLASH_LITERAL:"[\\\\/]",QMARK:e,STAR:`${e}*?`,DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"};return eE={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?u:c}}function ov(){return eC||(eC=1,!function(e){let{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:r,REGEX_SPECIAL_CHARS:n,REGEX_SPECIAL_CHARS_GLOBAL:s}=ob();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>n.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(s,"\\$1"),e.toPosixSlashes=e=>e.replace(t,"/"),e.isWindows=()=>{if("u">typeof navigator&&navigator.platform){let e=navigator.platform.toLowerCase();return"win32"===e||"windows"===e}return"u">typeof process&&!!process.platform&&"win32"===process.platform},e.removeBackslashes=e=>e.replace(r,e=>"\\"===e?"":e),e.escapeLast=(t,r,n)=>{let s=t.lastIndexOf(r,n);return -1===s?t:"\\"===t[s-1]?e.escapeLast(t,r,s-1):`${t.slice(0,s)}\\${t.slice(s)}`},e.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r},e.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",s=r.contains?"":"$",i=`${n}(?:${e})${s}`;return!0===t.negated&&(i=`(?:^(?!${i}).*$)`),i},e.basename=(e,{windows:t}={})=>{let r=e.split(t?/[\\/]/:"/"),n=r[r.length-1];return""===n?r[r.length-2]:n}}(oy)),oy}var ok=function(){if(e$)return eP;e$=1;let e=function(){if(eI)return e_;eI=1;let e=function(){if(eO)return eT;eO=1;let e=ov(),{CHAR_ASTERISK:t,CHAR_AT:r,CHAR_BACKWARD_SLASH:n,CHAR_COMMA:s,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:c,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_PLUS:p,CHAR_QUESTION_MARK:f,CHAR_RIGHT_CURLY_BRACE:h,CHAR_RIGHT_PARENTHESES:d,CHAR_RIGHT_SQUARE_BRACKET:g}=ob(),m=e=>e===a||e===n,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return eT=(b,v)=>{let k,w,S=v||{},x=b.length-1,E=!0===S.parts||!0===S.scanToEnd,A=[],C=[],T=[],O=b,N=-1,L=0,_=0,I=!1,P=!1,$=!1,j=!1,D=!1,M=!1,R=!1,F=!1,B=!1,q=!1,U=0,K={value:"",depth:0,isGlob:!1},W=()=>N>=x,Y=()=>O.charCodeAt(N+1),J=()=>(k=w,O.charCodeAt(++N));for(;N<x;){let e;if((w=J())===n){R=K.backslashes=!0,(w=J())===l&&(M=!0);continue}if(!0===M||w===l){for(U++;!0!==W()&&(w=J());){if(w===n){R=K.backslashes=!0,J();continue}if(w===l){U++;continue}if(!0!==M&&w===i&&(w=J())===i||!0!==M&&w===s){if(I=K.isBrace=!0,$=K.isGlob=!0,q=!0,!0===E)continue;break}if(w===h&&0==--U){M=!1,I=K.isBrace=!0,q=!0;break}}if(!0===E)continue;break}if(w===a){if(A.push(N),C.push(K),K={value:"",depth:0,isGlob:!1},!0===q)continue;if(k===i&&N===L+1){L+=2;continue}_=N+1;continue}if(!0!==S.noext&&!0==(w===p||w===r||w===t||w===f||w===o)&&Y()===c){if($=K.isGlob=!0,j=K.isExtglob=!0,q=!0,w===o&&N===L&&(B=!0),!0===E){for(;!0!==W()&&(w=J());){if(w===n){R=K.backslashes=!0,w=J();continue}if(w===d){$=K.isGlob=!0,q=!0;break}}continue}break}if(w===t){if(k===t&&(D=K.isGlobstar=!0),$=K.isGlob=!0,q=!0,!0===E)continue;break}if(w===f){if($=K.isGlob=!0,q=!0,!0===E)continue;break}if(w===u){for(;!0!==W()&&(e=J());){if(e===n){R=K.backslashes=!0,J();continue}if(e===g){P=K.isBracket=!0,$=K.isGlob=!0,q=!0;break}}if(!0===E)continue;break}if(!0!==S.nonegate&&w===o&&N===L){F=K.negated=!0,L++;continue}if(!0!==S.noparen&&w===c){if($=K.isGlob=!0,!0===E){for(;!0!==W()&&(w=J());){if(w===c){R=K.backslashes=!0,w=J();continue}if(w===d){q=!0;break}}continue}break}if(!0===$){if(q=!0,!0===E)continue;break}}!0===S.noext&&(j=!1,$=!1);let G=O,H="",V="";L>0&&(H=O.slice(0,L),O=O.slice(L),_-=L),G&&!0===$&&_>0?(G=O.slice(0,_),V=O.slice(_)):!0===$?(G="",V=O):G=O,G&&""!==G&&"/"!==G&&G!==O&&m(G.charCodeAt(G.length-1))&&(G=G.slice(0,-1)),!0===S.unescape&&(V&&(V=e.removeBackslashes(V)),G&&!0===R&&(G=e.removeBackslashes(G)));let X={prefix:H,input:b,start:L,base:G,glob:V,isBrace:I,isBracket:P,isGlob:$,isExtglob:j,isGlobstar:D,negated:F,negatedExtglob:B};if(!0===S.tokens&&(X.maxDepth=0,m(w)||C.push(K),X.tokens=C),!0===S.parts||!0===S.tokens){let e;for(let t=0;t<A.length;t++){let r=e?e+1:L,n=A[t],s=b.slice(r,n);S.tokens&&(0===t&&0!==L?(C[t].isPrefix=!0,C[t].value=H):C[t].value=s,y(C[t]),X.maxDepth+=C[t].depth),(0!==t||""!==s)&&T.push(s),e=n}if(e&&e+1<b.length){let t=b.slice(e+1);T.push(t),S.tokens&&(C[C.length-1].value=t,y(C[C.length-1]),X.maxDepth+=C[C.length-1].depth)}X.slashes=A,X.parts=T}return X}}(),n=function(){if(eL)return eN;eL=1;let e=ob(),n=ov(),{MAX_LENGTH:s,POSIX_REGEX_SOURCE:i,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:a,REPLACEMENTS:l}=e,c=(e,r)=>{if("function"==typeof r.expandRange)return r.expandRange(...e,r);e.sort();let s=`[${e.join("-")}]`;try{new t(s)}catch(t){return e.map(e=>n.escapeRegex(e)).join("..")}return s},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,p=e=>{let t=[],r=0,n=0,s=0,i="",o=!1;for(let a of e){if(!0===o){i+=a,o=!1;continue}if("\\"===a){i+=a,o=!0;continue}if('"'===a){s=+(1!==s),i+=a;continue}if(0===s){if("["===a)r++;else if("]"===a&&r>0)r--;else if(0===r){if("("===a)n++;else if(")"===a&&n>0)n--;else if("|"===a&&0===n){t.push(i),i="";continue}}}i+=a}return t.push(i),t},f=e=>{let t=e.trim(),r=!0;for(;!0===r;)r=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),r=!0);if((e=>{let t=!1;for(let r of e){if(!0===t){t=!1;continue}if("\\"===r){t=!0;continue}if(/[?*+@!()[\]{}]/.test(r))return!1}return!0})(t))return t.replace(/\\(.)/g,"$1")},h=(e,t=!0)=>{if("+"!==e[0]&&"*"!==e[0]||"("!==e[1])return;let r=0,n=0,s=0,i=!1;for(let o=1;o<e.length;o++){let a=e[o];if(!0===i){i=!1;continue}if("\\"===a){i=!0;continue}if('"'===a){s=+(1!==s);continue}if(1!==s){if("["===a){r++;continue}if("]"===a&&r>0){r--;continue}if(!(r>0)){if("("===a){n++;continue}if(")"===a&&0==--n){if(!0===t&&o!==e.length-1)return;return{type:e[0],body:e.slice(2,o),end:o}}}}}},d=e=>{let t=0,r=[];for(;t<e.length;){let n=h(e.slice(t),!1);if(!n||"*"!==n.type)return;let s=p(n.body).map(e=>e.trim());if(1!==s.length)return;let i=f(s[0]);if(!i||1!==i.length)return;r.push(i),t+=n.end+1}if(!(r.length<1))return r},g=e=>{let t=0,r=e.trim(),n=h(r);for(;n;)t++,n=h(r=n.body.trim());return t},m=(t,h)=>{let y;if("string"!=typeof t)throw TypeError("Expected a string");t=l[t]||t;let b={...h},v="number"==typeof b.maxLength?Math.min(s,b.maxLength):s,k=t.length;if(k>v)throw SyntaxError(`Input length: ${k}, exceeds maximum allowed length: ${v}`);let w={type:"bos",value:"",output:b.prepend||""},S=[w],x=b.capture?"":"?:",E=e.globChars(b.windows),A=e.extglobChars(E),{DOT_LITERAL:C,PLUS_LITERAL:T,SLASH_LITERAL:O,ONE_CHAR:N,DOTS_SLASH:L,NO_DOT:_,NO_DOT_SLASH:I,NO_DOTS_SLASH:P,QMARK:$,QMARK_NO_DOT:j,STAR:D,START_ANCHOR:M}=E,R=e=>`(${x}(?:(?!${M}${e.dot?L:C}).)*?)`,F=b.dot?"":_,B=b.dot?$:j,q=!0===b.bash?R(b):D;b.capture&&(q=`(${q})`),"boolean"==typeof b.noext&&(b.noextglob=b.noext);let U={input:t,index:-1,start:0,dot:!0===b.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:S};k=(t=n.removePrefix(t,U)).length;let K=[],W=[],Y=[],J=w,G=()=>U.index===k-1,H=U.peek=(e=1)=>t[U.index+e],V=U.advance=()=>t[++U.index]||"",X=()=>t.slice(U.index+1),Q=(e="",t=0)=>{U.consumed+=e,U.index+=t},z=e=>{U.output+=null!=e.output?e.output:e.value,Q(e.value)},Z=()=>{let e=1;for(;"!"===H()&&("("!==H(2)||"?"===H(3));)V(),U.start++,e++;return e%2!=0&&(U.negated=!0,U.start++,!0)},ee=e=>{U[e]++,Y.push(e)},et=e=>{U[e]--,Y.pop()},er=e=>{if("globstar"===J.type){let t=U.braces>0&&("comma"===e.type||"brace"===e.type),r=!0===e.extglob||K.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||r||(U.output=U.output.slice(0,-J.output.length),J.type="star",J.value="*",J.output=q,U.output+=J.output)}if(K.length&&"paren"!==e.type&&(K[K.length-1].inner+=e.value),(e.value||e.output)&&z(e),J&&"text"===J.type&&"text"===e.type){J.output=(J.output||J.value)+e.value,J.value+=e.value;return}e.prev=J,S.push(e),J=e},en=(e,t)=>{let r={...A[t],conditions:1,inner:""};r.prev=J,r.parens=U.parens,r.output=U.output,r.startIndex=U.index,r.tokensIndex=S.length;let n=(b.capture?"(":"")+r.open;ee("parens"),er({type:e,value:t,output:U.output?"":N}),er({type:"paren",extglob:!0,value:V(),output:n}),K.push(r)},es=s=>{let i,o=t.slice(s.startIndex,U.index+1),a=((t,s)=>{if(!1===s.maxExtglobRecursion)return{risky:!1};let i="number"==typeof s.maxExtglobRecursion?s.maxExtglobRecursion:e.DEFAULT_MAX_EXTGLOB_RECURSION,o=p(t).map(e=>e.trim());if(o.length>1&&(o.some(e=>""===e)||o.some(e=>/^[*?]+$/.test(e))||(e=>{let t=e.map(f).filter(Boolean);for(let e=0;e<t.length;e++)for(let r=e+1;r<t.length;r++){let n=t[e],s=t[r],i=n[0];if(i&&n===i.repeat(n.length)&&s===i.repeat(s.length)&&(n===s||n.startsWith(s)||s.startsWith(n)))return!0}return!1})(o)))return{risky:!0};let a=[],l=!1,c=!0;for(let e of o){let t=d(e);if(t){l=!0,a.push(...t);continue}let r=f(e);if(r&&1===r.length){a.push(r);continue}if(c=!1,g(e)>i)return{risky:!0}}if(l){var u;let e;return c?{risky:!0,safeOutput:(e=1===(u=[...new r(a)]).length?n.escapeRegex(u[0]):`[${u.map(e=>n.escapeRegex(e)).join("")}]`,`${e}*`)}:{risky:!0}}return{risky:!1}})(t.slice(s.startIndex+2,U.index),b);if(("plus"===s.type||"star"===s.type)&&a.risky){let e=a.safeOutput?(s.output?"":N)+(b.capture?`(${a.safeOutput})`:a.safeOutput):void 0,t=S[s.tokensIndex];t.type="text",t.value=o,t.output=e||n.escapeRegex(o);for(let e=s.tokensIndex+1;e<S.length;e++)S[e].value="",S[e].output="",delete S[e].suffix;U.output=s.output+t.output,U.backtrack=!0,er({type:"paren",extglob:!0,value:y,output:""}),et("parens");return}let l=s.close+(b.capture?")":"");if("negate"===s.type){let e=q;if(s.inner&&s.inner.length>1&&s.inner.includes("/")&&(e=R(b)),(e!==q||G()||/^\)+$/.test(X()))&&(l=s.close=`)$))${e}`),s.inner.includes("*")&&(i=X())&&/^\.[^\\/.]+$/.test(i)){let t=m(i,{...h,fastpaths:!1}).output;l=s.close=`)${t})${e})`}"bos"===s.prev.type&&(U.negatedExtglob=!0)}er({type:"paren",extglob:!0,value:y,output:l}),et("parens")};if(!1!==b.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(t)){let e=!1,r=t.replace(a,(t,r,n,s,i,o)=>"\\"===s?(e=!0,t):"?"===s?r?r+s+(i?$.repeat(i.length):""):0===o?B+(i?$.repeat(i.length):""):$.repeat(n.length):"."===s?C.repeat(n.length):"*"===s?r?r+s+(i?q:""):q:r?t:`\\${t}`);return(!0===e&&(r=!0===b.unescape?r.replace(/\\/g,""):r.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),r===t&&!0===b.contains)?U.output=t:U.output=n.wrapOutput(r,U,h),U}for(;!G();){if("\0"===(y=V()))continue;if("\\"===y){let e=H();if("/"===e&&!0!==b.bash||"."===e||";"===e)continue;if(!e){er({type:"text",value:y+="\\"});continue}let t=/^\\+/.exec(X()),r=0;if(t&&t[0].length>2&&(r=t[0].length,U.index+=r,r%2!=0&&(y+="\\")),!0===b.unescape?y=V():y+=V(),0===U.brackets){er({type:"text",value:y});continue}}if(U.brackets>0&&("]"!==y||"["===J.value||"[^"===J.value)){if(!1!==b.posix&&":"===y){let e=J.value.slice(1);if(e.includes("[")&&(J.posix=!0,e.includes(":"))){let e=J.value.lastIndexOf("["),t=J.value.slice(0,e),r=i[J.value.slice(e+2)];if(r){J.value=t+r,U.backtrack=!0,V(),w.output||1!==S.indexOf(J)||(w.output=N);continue}}}("["===y&&":"!==H()||"-"===y&&"]"===H())&&(y=`\\${y}`),"]"===y&&("["===J.value||"[^"===J.value)&&(y=`\\${y}`),!0===b.posix&&"!"===y&&"["===J.value&&(y="^"),J.value+=y,z({value:y});continue}if(1===U.quotes&&'"'!==y){y=n.escapeRegex(y),J.value+=y,z({value:y});continue}if('"'===y){U.quotes=+(1!==U.quotes),!0===b.keepQuotes&&er({type:"text",value:y});continue}if("("===y){ee("parens"),er({type:"paren",value:y});continue}if(")"===y){if(0===U.parens&&!0===b.strictBrackets)throw SyntaxError(u("opening","("));let e=K[K.length-1];if(e&&U.parens===e.parens+1){es(K.pop());continue}er({type:"paren",value:y,output:U.parens?")":"\\)"}),et("parens");continue}if("["===y){if(!0!==b.nobracket&&X().includes("]"))ee("brackets");else{if(!0!==b.nobracket&&!0===b.strictBrackets)throw SyntaxError(u("closing","]"));y=`\\${y}`}er({type:"bracket",value:y});continue}if("]"===y){if(!0===b.nobracket||J&&"bracket"===J.type&&1===J.value.length){er({type:"text",value:y,output:`\\${y}`});continue}if(0===U.brackets){if(!0===b.strictBrackets)throw SyntaxError(u("opening","["));er({type:"text",value:y,output:`\\${y}`});continue}et("brackets");let e=J.value.slice(1);if(!0===J.posix||"^"!==e[0]||e.includes("/")||(y=`/${y}`),J.value+=y,z({value:y}),!1===b.literalBrackets||n.hasRegexChars(e))continue;let t=n.escapeRegex(J.value);if(U.output=U.output.slice(0,-J.value.length),!0===b.literalBrackets){U.output+=t,J.value=t;continue}J.value=`(${x}${t}|${J.value})`,U.output+=J.value;continue}if("{"===y&&!0!==b.nobrace){ee("braces");let e={type:"brace",value:y,output:"(",outputIndex:U.output.length,tokensIndex:U.tokens.length};W.push(e),er(e);continue}if("}"===y){let e=W[W.length-1];if(!0===b.nobrace||!e){er({type:"text",value:y,output:y});continue}let t=")";if(!0===e.dots){let e=S.slice(),r=[];for(let t=e.length-1;t>=0&&(S.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&r.unshift(e[t].value);t=c(r,b),U.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){let r=U.output.slice(0,e.outputIndex),n=U.tokens.slice(e.tokensIndex);for(let s of(e.value=e.output="\\{",y=t="\\}",U.output=r,n))U.output+=s.output||s.value}er({type:"brace",value:y,output:t}),et("braces"),W.pop();continue}if("|"===y){K.length>0&&K[K.length-1].conditions++,er({type:"text",value:y});continue}if(","===y){let e=y,t=W[W.length-1];t&&"braces"===Y[Y.length-1]&&(t.comma=!0,e="|"),er({type:"comma",value:y,output:e});continue}if("/"===y){if("dot"===J.type&&U.index===U.start+1){U.start=U.index+1,U.consumed="",U.output="",S.pop(),J=w;continue}er({type:"slash",value:y,output:O});continue}if("."===y){if(U.braces>0&&"dot"===J.type){"."===J.value&&(J.output=C);let e=W[W.length-1];J.type="dots",J.output+=y,J.value+=y,e.dots=!0;continue}if(U.braces+U.parens===0&&"bos"!==J.type&&"slash"!==J.type){er({type:"text",value:y,output:C});continue}er({type:"dot",value:y,output:C});continue}if("?"===y){if(!(J&&"("===J.value)&&!0!==b.noextglob&&"("===H()&&"?"!==H(2)){en("qmark",y);continue}if(J&&"paren"===J.type){let e=H(),t=y;("("!==J.value||/[!=<:]/.test(e))&&("<"!==e||/<([!=]|\w+>)/.test(X()))||(t=`\\${y}`),er({type:"text",value:y,output:t});continue}if(!0!==b.dot&&("slash"===J.type||"bos"===J.type)){er({type:"qmark",value:y,output:j});continue}er({type:"qmark",value:y,output:$});continue}if("!"===y){if(!0!==b.noextglob&&"("===H()&&("?"!==H(2)||!/[!=<:]/.test(H(3)))){en("negate",y);continue}if(!0!==b.nonegate&&0===U.index){Z();continue}}if("+"===y){if(!0!==b.noextglob&&"("===H()&&"?"!==H(2)){en("plus",y);continue}if(J&&"("===J.value||!1===b.regex){er({type:"plus",value:y,output:T});continue}if(J&&("bracket"===J.type||"paren"===J.type||"brace"===J.type)||U.parens>0){er({type:"plus",value:y});continue}er({type:"plus",value:T});continue}if("@"===y){if(!0!==b.noextglob&&"("===H()&&"?"!==H(2)){er({type:"at",extglob:!0,value:y,output:""});continue}er({type:"text",value:y});continue}if("*"!==y){("$"===y||"^"===y)&&(y=`\\${y}`);let e=o.exec(X());e&&(y+=e[0],U.index+=e[0].length),er({type:"text",value:y});continue}if(J&&("globstar"===J.type||!0===J.star)){J.type="star",J.star=!0,J.value+=y,J.output=q,U.backtrack=!0,U.globstar=!0,Q(y);continue}let e=X();if(!0!==b.noextglob&&/^\([^?]/.test(e)){en("star",y);continue}if("star"===J.type){if(!0===b.noglobstar){Q(y);continue}let r=J.prev,n=r.prev,s="slash"===r.type||"bos"===r.type,i=n&&("star"===n.type||"globstar"===n.type);if(!0===b.bash&&(!s||e[0]&&"/"!==e[0])){er({type:"star",value:y,output:""});continue}let o=U.braces>0&&("comma"===r.type||"brace"===r.type),a=K.length&&("pipe"===r.type||"paren"===r.type);if(!s&&"paren"!==r.type&&!o&&!a){er({type:"star",value:y,output:""});continue}for(;"/**"===e.slice(0,3);){let r=t[U.index+4];if(r&&"/"!==r)break;e=e.slice(3),Q("/**",3)}if("bos"===r.type&&G()){J.type="globstar",J.value+=y,J.output=R(b),U.output=J.output,U.globstar=!0,Q(y);continue}if("slash"===r.type&&"bos"!==r.prev.type&&!i&&G()){U.output=U.output.slice(0,-(r.output+J.output).length),r.output=`(?:${r.output}`,J.type="globstar",J.output=R(b)+(b.strictSlashes?")":"|$)"),J.value+=y,U.globstar=!0,U.output+=r.output+J.output,Q(y);continue}if("slash"===r.type&&"bos"!==r.prev.type&&"/"===e[0]){let t=void 0!==e[1]?"|$":"";U.output=U.output.slice(0,-(r.output+J.output).length),r.output=`(?:${r.output}`,J.type="globstar",J.output=`${R(b)}${O}|${O}${t})`,J.value+=y,U.output+=r.output+J.output,U.globstar=!0,Q(y+V()),er({type:"slash",value:"/",output:""});continue}if("bos"===r.type&&"/"===e[0]){J.type="globstar",J.value+=y,J.output=`(?:^|${O}|${R(b)}${O})`,U.output=J.output,U.globstar=!0,Q(y+V()),er({type:"slash",value:"/",output:""});continue}U.output=U.output.slice(0,-J.output.length),J.type="globstar",J.output=R(b),J.value+=y,U.output+=J.output,U.globstar=!0,Q(y);continue}let r={type:"star",value:y,output:q};if(!0===b.bash){r.output=".*?",("bos"===J.type||"slash"===J.type)&&(r.output=F+r.output),er(r);continue}if(J&&("bracket"===J.type||"paren"===J.type)&&!0===b.regex){r.output=y,er(r);continue}(U.index===U.start||"slash"===J.type||"dot"===J.type)&&("dot"===J.type?(U.output+=I,J.output+=I):!0===b.dot?(U.output+=P,J.output+=P):(U.output+=F,J.output+=F),"*"!==H()&&(U.output+=N,J.output+=N)),er(r)}for(;U.brackets>0;){if(!0===b.strictBrackets)throw SyntaxError(u("closing","]"));U.output=n.escapeLast(U.output,"["),et("brackets")}for(;U.parens>0;){if(!0===b.strictBrackets)throw SyntaxError(u("closing",")"));U.output=n.escapeLast(U.output,"("),et("parens")}for(;U.braces>0;){if(!0===b.strictBrackets)throw SyntaxError(u("closing","}"));U.output=n.escapeLast(U.output,"{"),et("braces")}if(!0!==b.strictSlashes&&("star"===J.type||"bracket"===J.type)&&er({type:"maybe_slash",value:"",output:`${O}?`}),!0===U.backtrack)for(let e of(U.output="",U.tokens))U.output+=null!=e.output?e.output:e.value,e.suffix&&(U.output+=e.suffix);return U};return m.fastpaths=(t,r)=>{let i={...r},o="number"==typeof i.maxLength?Math.min(s,i.maxLength):s,a=t.length;if(a>o)throw SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`);t=l[t]||t;let{DOT_LITERAL:c,SLASH_LITERAL:u,ONE_CHAR:p,DOTS_SLASH:f,NO_DOT:h,NO_DOTS:d,NO_DOTS_SLASH:g,STAR:m,START_ANCHOR:y}=e.globChars(i.windows),b=i.dot?d:h,v=i.dot?g:h,k=i.capture?"":"?:",w=!0===i.bash?".*?":m;i.capture&&(w=`(${w})`);let S=e=>!0===e.noglobstar?w:`(${k}(?:(?!${y}${e.dot?f:c}).)*?)`,x=e=>{switch(e){case"*":return`${b}${p}${w}`;case".*":return`${c}${p}${w}`;case"*.*":return`${b}${w}${c}${p}${w}`;case"*/*":return`${b}${w}${u}${p}${v}${w}`;case"**":return b+S(i);case"**/*":return`(?:${b}${S(i)}${u})?${v}${p}${w}`;case"**/*.*":return`(?:${b}${S(i)}${u})?${v}${w}${c}${p}${w}`;case"**/.*":return`(?:${b}${S(i)}${u})?${c}${p}${w}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let r=x(t[1]);if(!r)return;return r+c+t[2]}}},E=x(n.removePrefix(t,{negated:!1,prefix:""}));return E&&!0!==i.strictSlashes&&(E+=`${u}?`),E},eN=m}(),s=ov(),i=ob(),o=(e,t,r=!1)=>{if(Array.isArray(e)){let n=e.map(e=>o(e,t,r));return e=>{for(let t of n){let r=t(e);if(r)return r}return!1}}let n=e&&"object"==typeof e&&!Array.isArray(e)&&e.tokens&&e.input;if(""===e||"string"!=typeof e&&!n)throw TypeError("Expected pattern to be a non-empty string");let s=t||{},i=s.windows,a=n?o.compileRe(e,t):o.makeRe(e,t,!1,!0),l=a.state;delete a.state;let c=()=>!1;if(s.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};c=o(s.ignore,e,r)}let u=(r,n=!1)=>{let{isMatch:u,match:p,output:f}=o.test(r,a,t,{glob:e,posix:i}),h={glob:e,state:l,regex:a,posix:i,input:r,output:f,match:p,isMatch:u};return("function"==typeof s.onResult&&s.onResult(h),!1===u)?(h.isMatch=!1,!!n&&h):c(r)?("function"==typeof s.onIgnore&&s.onIgnore(h),h.isMatch=!1,!!n&&h):("function"==typeof s.onMatch&&s.onMatch(h),!n||h)};return r&&(u.state=l),u};return o.test=(e,t,r,{glob:n,posix:i}={})=>{if("string"!=typeof e)throw TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};let a=r||{},l=a.format||(i?s.toPosixSlashes:null),c=e===n,u=c&&l?l(e):e;return!1===c&&(c=(u=l?l(e):e)===n),(!1===c||!0===a.capture)&&(c=!0===a.matchBase||!0===a.basename?o.matchBase(e,t,r,i):t.exec(u)),{isMatch:!!c,match:c,output:u}},o.matchBase=(e,t,r,n=r&&r.windows)=>(t instanceof RegExp?t:o.makeRe(t,r)).test(s.basename(e,{windows:n})),o.isMatch=(e,t,r)=>o(t,r)(e),o.parse=(e,t)=>Array.isArray(e)?e.map(e=>o.parse(e,t)):n(e,{...t,fastpaths:!1}),o.scan=(t,r)=>e(t,r),o.compileRe=(e,t,r=!1,n=!1)=>{if(!0===r)return e.output;let s=t||{},i=s.contains?"":"^",a=s.contains?"":"$",l=`${i}(?:${e.output})${a}`;e&&!0===e.negated&&(l=`^(?!${l}).*$`);let c=o.toRegex(l,t);return!0===n&&(c.state=e),c},o.makeRe=(e,t={},r=!1,s=!1)=>{if(!e||"string"!=typeof e)throw TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return!1!==t.fastpaths&&("."===e[0]||"*"===e[0])&&(i.output=n.fastpaths(e,t)),i.output||(i=n(e,t)),o.compileRe(i,t,r,s)},o.toRegex=(e,r)=>{try{let n=r||{};return new t(e,n.flags||(n.nocase?"i":""))}catch(e){if(r&&!0===r.debug)throw e;return/$^/}},o.constants=i,e_=o}(),n=ov();function s(t,r,i=!1){return r&&(null===r.windows||void 0===r.windows)&&(r={...r,windows:n.isWindows()}),e(t,r,i)}return Object.assign(s,e),eP=s}(),ow=eF.a(ok);let oS=Array.isArray,ox=/\\/g,oE=/^[A-Za-z]:$/,oA="win32"===process.platform,oC=/^(\/?\.\.)+$/,oT=/^[A-Z]:\/$/i,oO=oA?e=>oT.test(e):e=>"/"===e;function oN(e,t,r){if(e===t||t.startsWith(`${e}/`)){if(r){let t=e.length+ +!oO(e);return(e,r)=>e.slice(t,r?-1:void 0)||"."}let n=t.slice(e.length+1);return n?(e,t)=>{if("."===e)return n;let r=`${n}/${e}`;return t?r.slice(0,-1):r}:(e,t)=>t&&"."!==e?e.slice(0,-1):e}return r?t=>tr.posix.relative(e,t)||".":r=>tr.posix.relative(e,`${t}/${r}`)||"."}function oL(e){return e.replace(oE,e=>`${e}/`)}let o_={parts:!0};function oI(e){var t;let r=ow.scan(e,o_);return(null==(t=r.parts)?void 0:t.length)?r.parts:[e]}let oP=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,o$=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,oj=oA?e=>e.replace(o$,"\\$&"):e=>e.replace(oP,"\\$&");function oD(...e){console.log(`[tinyglobby ${(new Date).toLocaleTimeString("es")}]`,...e)}function oM(e){return"string"==typeof e?[e]:null!=e?e:[]}let oR=/^(\/?\.\.)+/,oF=/\\(?=[()[\]{}!*+?@|])/g;function oB(e,t,r,n){var s;let i=t.cwd,o=e;"/"===e[e.length-1]&&(o=e.slice(0,-1)),"*"!==o[o.length-1]&&t.expandDirectories&&(o+="/**");let a=oj(i);o=tr.isAbsolute(o.replace(oF,""))?tr.posix.relative(a,o):tr.posix.normalize(o);let l=null==(s=oR.exec(o))?void 0:s[0],c=oI(o);if(l){let e=(l.length+1)/3,t=0,n=a.split("/");for(;t<e&&c[t+e]===n[n.length+t-e];)o=o.slice(0,(e-t-1)*3)+o.slice((e-t)*3+c[t+e].length+1)||".",t++;let s=tr.posix.join(i,l.slice(3*t));"."!==s[0]&&r.root.length>s.length&&(r.root=oL(s),r.depthOffset=-e+t)}if(!n&&r.depthOffset>=0){null!=r.commonPath||(r.commonPath=c);let e=[],t=Math.min(r.commonPath.length,c.length);for(let n=0;n<t;n++){let t=c[n];if("**"===t&&!c[n+1]){e.pop();break}if(n===c.length-1||t!==r.commonPath[n]||function(e){let t=ow.scan(e);return t.isGlob||t.negated}(t))break;e.push(t)}r.depthOffset=e.length,r.commonPath=e,r.root=oL(e.length>0?tr.posix.join(i,...e):i)}return o}let oq={caseSensitiveMatch:!0,debug:!!process.env.TINYGLOBBY_DEBUG,expandDirectories:!0,followSymbolicLinks:!0,onlyFiles:!0};function oU(e,t){let[r,n]=function(e,t={}){var r;if(e&&(null==t?void 0:t.patterns))throw Error("Cannot pass patterns as both an argument and an option");let n=oS(e)||"string"==typeof e,s=oM(null!=(r=n?e:e.patterns)?r:"**/*"),i=function(e){let t=Object.assign({},e);for(let e in oq)void 0===t[e]&&Object.assign(t,{[e]:oq[e]});return t.cwd=(t.cwd instanceof URL?tn.fileURLToPath(t.cwd):tr.resolve(t.cwd||process.cwd())).replace(ox,"/"),t.ignore=oM(t.ignore),t.fs&&(t.fs={readdir:t.fs.readdir||tt.readdir,readdirSync:t.fs.readdirSync||tt.readdirSync,realpath:t.fs.realpath||tt.realpath,realpathSync:t.fs.realpathSync||tt.realpathSync,stat:t.fs.stat||tt.stat,statSync:t.fs.statSync||tt.statSync}),t.debug&&oD("globbing with options:",t),t}(n?t:e);return s.length>0?function(e,t){let r,n=e.cwd,s={root:n,depthOffset:0},i=function(e,t,r){let n=[],s=[];for(let t of e.ignore)t&&("!"!==t[0]||"("===t[1])&&s.push(oB(t,e,r,!0));for(let i of t)i&&("!"!==i[0]||"("===i[1]?n.push(oB(i,e,r,!1)):("!"!==i[1]||"("===i[2])&&s.push(oB(i.slice(1),e,r,!0)));return{match:n,ignore:s}}(e,t,s);e.debug&&oD("internal processing patterns:",i);let{absolute:o,caseSensitiveMatch:a,debug:l,dot:c,followSymbolicLinks:u,onlyDirectories:p}=e,f=s.root.replace(ox,""),h={dot:c,nobrace:!1===e.braceExpansion,nocase:!a,noextglob:!1===e.extglob,noglobstar:!1===e.globstar,posix:!0},d=ow(i.match,h),g=ow(i.ignore,h),m=function(e,t={}){let r,n,s=e.length,i=Array(s),o=Array(s);for(r=0;r<s;r++){let s=oI(e[r]);i[r]=s;let a=s.length,l=Array(a);for(n=0;n<a;n++)l[n]=ow(s[n],t);o[r]=l}return e=>{let a=e.split("/");if(".."===a[0]&&oC.test(e))return!0;for(r=0;r<s;r++){let e=i[r],s=o[r],l=a.length,c=Math.min(l,e.length);for(n=0;n<c;){let r=e[n];if(r.includes("/"))return!0;if(!s[n](a[n]))break;if(!t.noglobstar&&"**"===r)return!0;n++}if(n===l)return!0}return!1}}(i.match,h),y=oN(n,f,o),b=o?y:oN(n,f,!0),v=(e,t)=>{let r=b(t,!0);return"."!==r&&!m(r)||g(r)};void 0!==e.deep&&(r=Math.round(e.deep-s.depthOffset));let k=new om({filters:[l?(e,t)=>{let r=y(e,t),n=d(r)&&!g(r);return n&&oD(`matched ${r}`),n}:(e,t)=>{let r=y(e,t);return d(r)&&!g(r)}],exclude:l?(e,t)=>{let r=v(e,t);return oD(`${r?"skipped":"crawling"} ${t}`),r}:v,fs:e.fs,pathSeparator:"/",relativePaths:!o,resolvePaths:o,includeBasePath:o,resolveSymlinks:u,excludeSymlinks:!u,excludeFiles:p,includeDirs:p||!e.onlyFiles,maxDepth:r,signal:e.signal}).crawl(f);return e.debug&&oD("internal properties:",{...s,root:f}),[k,n!==f&&!o&&function(e,t){if(t.startsWith(`${e}/`)){let r=t.slice(e.length+1);return e=>`${r}/${e}`}return r=>{let n=tr.posix.relative(e,`${t}/${r}`);return"/"===r[r.length-1]&&""!==n?`${n}/`:n||"."}}(n,f)]}(i,s):[]}(e,t);return r?function(e,t){if(t)for(let r=e.length-1;r>=0;r--)e[r]=t(e[r]);return e}(r.sync(),n):[]}function oK(e,t){return eM.isAbsolute(e)?e:eM.resolve(t||".",e)}function oW(e,t){let r,n;for(r of function(e,t){let{last:r,cwd:n}=t||{},s=oK(e,n),i=oK(r||"/",n),o,a=[];for(;o!==i&&(a.push(s),(s=eM.dirname(o=s))!==o););return a}(t&&t.cwd||"",t))if(n=eM.join(r,e),eD.existsSync(n))return n}let oY=(s=e=>`https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/${e.startsWith("json-")?`json/${e}`:`yaml/${e}`}.test.ts`,function({name:t,meta:n,...i}){return function({name:t,create:n,defaultOptions:s,meta:i}){return{name:t,create:function(t){if(iC.has(t))return iC.get(t);let n=(n,...s)=>{var i,o,a,l;let c,u=n.sourceCode;return u&&(null==(i=u.ast)?void 0:i.type)==="Document"&&(null==(a=null==(o=u.ast.loc)?void 0:o.start)?void 0:a.column)===1&&u.ast.body&&im(u.ast.body)&&"function"==typeof u.getParent?function(t,n){let s=ix(n),i=new e,o=new r;for(let[e,n]of Object.entries(t)){if(!n)continue;o.add(e);let t=function(e){let t=e.endsWith(":exit"),n=function(e){let t=e.split(",").map(e=>e.trim());if(t.every(e=>iA.test(e))){let e=new r(t),n=[];for(let r of t){let t=iE.get(r);t?n.push(...t):e.delete(r)}return n.length?{query:n.join(","),match:t=>e.has(t.type)}:null}if("*"===e)return{query:"*",match:()=>!0};let n=ip.parse(e);return{query:"*",match:e=>{let t=e,r=[];for(;t.parent;)r.push(t.parent),t=t.parent;return ip.matches(e,n,r,{visitorKeys:e8.VisitorKeys})}}}(t?e.slice(0,-5):e);return n&&(t?{query:`${n.query}:exit`,match:n.match}:n)}(e);if(!t)continue;let{query:s,match:a}=t;o.add(s);let l=i.get(s);l||(l=[],i.set(s,l)),l.push(e=>{a(e)&&n(e)})}let a={};for(let e of o)a[e]=r=>{var n;if(im(r)){if("Element"!==r.type){let t=i.get(e);if(!t)return;(e.endsWith(":exit")?function(e,t){let r=s(e);if(r.nodes)for(let e=r.nodes.length-1;e>=0;e--)t(r.nodes[e]);else t(r.node)}:function(e,t){let r=s(e);if(r.nodes)for(let e of r.nodes)t(e);else t(r.node)})(r,e=>{t.forEach(t=>t(e))})}}else null==(n=t[e])||n.call(t,r)};return a}(t((l={get sourceCode(){let e,t;return null!=c?c:(e=ix(u),t=new te.SourceCode({text:u.text,ast:e(u.ast).nodes[0],parserServices:{isJSON:!0},visitorKeys:e8.VisitorKeys}),c=ih(u,(e,r,n)=>{let s=id(Reflect.get(t,r),t,e);return void 0!==s?s:Reflect.get(u,r,n)}))},report(e){let t={...e};"loc"in t&&t.loc&&("line"in t.loc?t.loc=ik(t.loc):t.loc=iv(t.loc)),"node"in t&&t.node&&(t.node={...t.node,loc:iv(t.node.loc)}),n.report(t)}},ih(n,(e,t)=>t in l?l[t]:Reflect.get(n,t))),...s),u):t(n,...s)};return iC.set(t,n),n}(e=>n(e,e.options.map((e,t)=>({...s?.[t]||{},...e||{}})))),defaultOptions:s,meta:i}}({name:t,meta:{...n,docs:{...n.docs,url:s(t)}},...i})});function oJ(e){if(!e.filename.endsWith("package.json"))return;let t=e.sourceCode.ast.body[0];if("JSONObjectExpression"===t.expression.type)return t.expression}function*oG(e,t){let r=oJ(e);if(r)for(let e of t){let t=e.split("."),n=r;for(let e=0;e<t.length;e++){let r=n.properties.find(r=>"JSONLiteral"===r.key.type&&r.key.value===t[e]);if(!r?.value||"JSONObjectExpression"!==r.value.type){n=void 0;break}n=r.value}if(n&&n!==r)for(let e of n.properties)"JSONLiteral"===e.value.type&&"JSONLiteral"===e.key.type&&"string"==typeof e.value.value&&(yield{packageName:String(e.key.value),specifier:String(e.value.value),property:e})}}let oH=["**/node_modules/**","**/dist/**","**/build/**"],oV={},oX=new e;function oQ(e){let t=e.filename,r=e.settings.pnpm?.ensureWorkspaceFile,n=oW("pnpm-workspace.yaml",{cwd:iM(t)});if(!n)if(r)n=function(e){let t=oW("package.json",{cwd:iM(e)});if(!t)throw Error("Could not find package.json to create pnpm-workspace.yaml");let r=i$(iM(t),"pnpm-workspace.yaml");return eD.writeFileSync(r,""),r}(t);else throw Error("pnpm-workspace.yaml not found");let s=oV[n];if(s&&!s.hasQueue()&&Date.now()-s.lastRead>1e4&&(oV[n]=void 0,s=void 0),!s){var i;let e,t,r;i=n,t=function(e){let t=si.parseDocument(e),r=!1;function n(e,n){let s=1===e.length?t.contents:t.getIn(e.slice(0,-1));s||(s=t.createNode({}),t.setIn(e.slice(0,-1),s));let i=e[e.length-1],o=s.items.find(e=>"string"==typeof e.key?e.key===i:e.key.value===i),a=s.items.map(e=>"string"==typeof e.key?e.key:String(e.key.value));if(o)if(si.isAlias(o.value)){var l,c;let e,s=(l=t,c=o.value,si.visit(l,{Scalar:(t,r,n)=>{r.anchor===c.source&&"string"==typeof r.value&&(e=r)}}),e);s&&s.value!==n&&(s.value=n,r=!0)}else o.value&&"string"!=typeof o.value?o.value.value!==n&&(o.value.value=n,r=!0):o.value!==n&&(o.value=n,r=!0);else{let e=0;for(;e<a.length&&!(a[e].localeCompare(i)>0);e++);o=new si.Pair(i,n),s.items.splice(e,0,o),r=!0}}function s(e,r,n){let s=t.toJSON()||{},i="default"===e?s.catalog?.[r]:s.catalogs?.[e]?.[r];if(i===n)return{conflicts:!1,newCatalogName:e,existingSpecifier:i};if(i){let t=n.replace(/\^/g,"h").replace(/~/g,"t").replace(/\./g,"_").replace(/</g,"l").replace(/>/g,"g").replace(/=/g,"e").replace(/\*/g,"s").replace(/@/g,"a").replace(/\|/g,"p").replace(/&/g,"n").replace(/-/g,"m").replace(/\+/g,"u").replace(/\s/g,"_");return{conflicts:!0,existingSpecifier:i,newCatalogName:"default"===e?`conflicts_${r}_${t}`:`conflicts_${e}_${t}`}}return{conflicts:!1,newCatalogName:e}}function i(e,r,s){let i=t.toJSON()?.catalogs?.default!==void 0;"default"!==e||i?n(["catalogs",e,r],s):n(["catalog",r],s)}return{getDocument:()=>t,setContent:function(n){e=n,t=si.parseDocument(e),r=!1},hasChanged:()=>r,toJSON:()=>t.toJSON(),toString:r=>{let n=e.split("'").length>=e.split('"').length;return t.toString({singleQuote:n,...r})},setPath:n,setPackage:i,setPackageNoConflicts:function(e,t,r){let{newCatalogName:n}=s(e,t,r);i(n,t,r)},getPackageCatalogs:function(e){let r=[],n=t.toJSON()||{};if(n.catalogs)for(let t of Object.keys(n.catalogs))n.catalogs[t]?.[e]&&r.push(t);return n.catalog&&n.catalog[e]&&r.push("default"),r},hasSpecifierConflicts:s}}(eD.readFileSync(i,"utf-8")),r=[],s={filepath:i,lastRead:Date.now(),...t,hasQueue:()=>null!=e,queueChange:(n,s)=>{"pre"===s?r.unshift(n):r.push(n),null!=e&&clearTimeout(e),e=setTimeout(()=>{e=void 0;let n=[...r];for(let e of(r.length=0,n))e(t);t.hasChanged()&&eD.writeFileSync(i,t.toString())},1e3)}},oV[n]=s}return s}function oz(e){let t=e.toJSON()?.packages,n=i$(iM(e.filepath)),s=iI(i$(n,"package.json"));if(void 0===t)return new r([s,...oZ(n,["**/package.json"],oH)]);if(!Array.isArray(t))return new r([s]);let i=function(e){let t=[],r=[...oH];for(let n of e){if("string"!=typeof n)return;n.startsWith("!")?r.push(o1(n.slice(1))):t.push(o1(n))}return{include:t,exclude:r}}(t);return new r(i?[s,...oZ(n,i.include,i.exclude)]:[s])}function oZ(e,t,n){let s=JSON.stringify({root:e,includeGlobs:t,excludeGlobs:n}),i=oX.get(s);if(i)return i;let o=new r;if(0===t.length)return oX.set(s,o),o;for(let r of oU(t,{cwd:e,dot:!1,ignore:n,absolute:!0,expandDirectories:!1,onlyFiles:!0}))o.add(iI(r));return oX.set(s,o),o}function o0(e,t){if(!e.endsWith("package.json"))return!1;let r=iI(i$(i$(iM(t.filepath)),e));return oz(t).has(r)}function o1(e){return e.endsWith("package.json")?e:iP(e,"package.json")}let o2=["dependencies","devDependencies"];var o3=oY({name:"json-enforce-catalog",meta:{type:"layout",docs:{description:'Enforce using "catalog:" in `package.json`'},fixable:"code",schema:[{type:"object",properties:{allowedProtocols:{type:"array",description:"Allowed protocols in specifier to not be converted to catalog",items:{type:"string"}},autofix:{type:"boolean",description:"Whether to autofix the linting error",default:!0},defaultCatalog:{type:"string",description:"Default catalog to use when moving version to catalog with autofix"},reuseExistingCatalog:{type:"boolean",description:"Whether to reuse existing catalog when moving version to catalog with autofix",default:!0},conflicts:{type:"string",description:"Strategy to handle conflicts when adding packages to catalogs",enum:["new-catalog","overrides","error"],default:"new-catalog"},fields:{type:"array",description:"Fields to check for catalog",items:{type:"string"},default:o2},ignores:{type:"array",description:"Ignore certain packages that require version specification",items:{type:"string"},default:[]}},additionalProperties:!1}],messages:{expectCatalog:'Expect to use catalog instead of plain specifier, got "{{specifier}}" for package "{{packageName}}".'}},defaultOptions:[{}],create(e,[t]){let{allowedProtocols:r=["workspace","link","file"],defaultCatalog:n="default",autofix:s=!0,reuseExistingCatalog:i=!0,conflicts:o="new-catalog",fields:a=o2,ignores:l=[]}=t||{},c=oQ(e);if(!c||!o0(e.filename,c))return{};for(let{packageName:t,specifier:u,property:p}of oG(e,a)){if(u.startsWith("catalog:")||l.includes(t)||r?.some(e=>u.startsWith(e)))continue;let a=i&&c.getPackageCatalogs(t)[0]||n,f=c.hasSpecifierConflicts(a,t,u),h=s;"error"===o&&f.conflicts&&(h=!1),"new-catalog"===o&&f.conflicts&&(a=f.newCatalogName),e.report({node:p.value,messageId:"expectCatalog",data:{specifier:u,packageName:t},fix:h?e=>(c.queueChange(()=>{c.setPackage(a,t,u)}),e.replaceText(p.value,"default"===a?JSON.stringify("catalog:"):JSON.stringify(`catalog:${a}`))):void 0})}return{}}}),o9=oY({name:"json-prefer-workspace-settings",meta:{type:"layout",docs:{description:"Prefer having pnpm settings in `pnpm-workspace.yaml` instead of `package.json`. This requires pnpm v10.6+, see https://github.com/orgs/pnpm/discussions/9037."},fixable:"code",schema:[{type:"object",properties:{autofix:{type:"boolean",description:"Whether to autofix the linting error",default:!0}},additionalProperties:!1}],messages:{unexpectedPnpmSettings:"Unexpected pnpm settings in package.json, should move to pnpm-workspace.yaml"}},defaultOptions:[{}],create(e,[t={}]){let{autofix:r=!0}=t||{},n=oJ(e);if(!n)return{};let s=n.properties.find(e=>"JSONLiteral"===e.key.type&&"pnpm"===e.key.value);if(!s)return{};let i=oQ(e);return i&&o0(e.filename,i)&&e.report({node:s,messageId:"unexpectedPnpmSettings",fix:r?t=>{let r=JSON.parse(e.sourceCode.text).pnpm,n=[];!function e(t,r){if("object"!=typeof t||null===t||Array.isArray(t))n.push([r,t]);else for(let n in t)e(t[n],[...r,n])}(r,[]),i.queueChange(()=>{for(let[e,t]of n)i.setPath(e,t)});let o=s.range[0],a=s.range[1],l=e.sourceCode.getTokenBefore(s);l&&(o=l.range[1]);let c=e.sourceCode.getTokenAfter(s);return c?.type==="Punctuator"&&","===c.value&&(a=c.range[1]),t.removeRange([o,a])}:void 0}),{}}});let o6=["dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions","overrides","pnpm.overrides"],o4={"json-enforce-catalog":o3,"json-valid-catalog":oY({name:"json-valid-catalog",meta:{type:"layout",docs:{description:"Enforce using valid catalog in `package.json`"},fixable:"code",schema:[{type:"object",properties:{autoInsert:{type:"boolean",description:"Whether to auto insert to catalog if missing",default:!0},autoInsertDefaultSpecifier:{type:"string",description:"Default specifier to use when auto inserting to catalog",default:"^0.0.0"},autofix:{type:"boolean",description:"Whether to autofix the linting error",default:!0},enforceNoConflict:{type:"boolean",description:"Whether to enforce no conflicts when adding packages to catalogs (will create version-specific catalogs)",default:!0},fields:{type:"array",description:"Fields to check for catalog",default:o6}},additionalProperties:!1}],messages:{invalidCatalog:'Catalog "{{specifier}}" for package "{{packageName}}" is not defined in `pnpm-workspace.yaml`.'}},defaultOptions:[{}],create(e,[t={}]){let{autoInsert:r=!0,autofix:n=!0,autoInsertDefaultSpecifier:s="^0.0.0",fields:i=o6}=t||{},o=oQ(e);if(!o||!o0(e.filename,o))return{};for(let{packageName:t,specifier:a,property:l}of oG(e,i)){if(!a.startsWith("catalog:"))continue;let i=a.replace(/^catalog:/,"").trim()||"default",c=o.getPackageCatalogs(t);c.includes(i)||e.report({node:l.value,messageId:"invalidCatalog",data:{specifier:a,packageName:t},fix:n&&(r||c.length)?e=>{let n=c[0];return!n&&r&&(n=i,o.queueChange(()=>{o.setPackage(n,t,s)},"pre")),e.replaceText(l.value,"default"===n?JSON.stringify("catalog:"):JSON.stringify(`catalog:${n}`))}:void 0})}return{}}}),"json-prefer-workspace-settings":o9};function o8(e){return e.loc.start.line!==e.loc.end.line}function o5(e){let t=e.key;if(t?.type==="YAMLScalar"&&"string"==typeof t.value)return t.value}var o7=oY({name:"yaml-blank-lines",meta:{type:"layout",docs:{description:"Require blank lines around multi-line entries in `pnpm-workspace.yaml`, and disallow them between single-line entries"},fixable:"whitespace",schema:[],messages:{missingBlankLine:"Expected a blank line before `{{key}}`.",unexpectedBlankLine:"Unexpected blank line before `{{key}}`.",extraBlankLines:"Expected only one blank line before `{{key}}`."}},defaultOptions:[],create(t){if("pnpm-workspace.yaml"!==iR(t.filename))return{};let{sourceCode:r}=t,n=r.ast,s=r.text.includes("\r\n")?"\r\n":"\n";for(let i of n.body){let o=i.content;if(o?.type!=="YAMLMapping"||"block"!==o.style)continue;let a=o.pairs,l=[];for(let e of a){let t=l.at(-1);t&&function(e,t){let r=o5(e),n=o5(t);if(!r||!n)return!1;let[s,i]=r.length<n.length?[r,n]:[n,r];return i.length>s.length&&i.startsWith(s)&&i[s.length]===i[s.length].toUpperCase()&&i[s.length]!==i[s.length].toLowerCase()}(t.at(-1),e)?t.push(e):l.push([e])}let c=new e;for(let[e,t]of l.entries()){for(let e of t.slice(1))c.set(e,0);let r=l[e-1];r&&c.set(t[0],r.some(o8)||t.some(o8)?1:0)}for(let e=1;e<a.length;e++){let i=a[e-1],o=a[e];if(n.comments.some(e=>e.loc.start.line>i.loc.end.line&&e.loc.end.line<o.loc.start.line))continue;let l=o.loc.start.line-i.loc.end.line-1,u=c.get(o)??0;if(l===u)continue;let p=0===u?"unexpectedBlankLine":0===l?"missingBlankLine":"extraBlankLines",f=r.getIndexFromLoc({line:i.loc.end.line+1,column:0}),h=r.getIndexFromLoc({line:o.loc.start.line,column:0});t.report({loc:o.key?.loc??o.loc,messageId:p,data:{key:o.key?r.text.slice(...o.key.range):""},fix:e=>e.replaceTextRange([f,h],s.repeat(u))})}}return{}}});function ae(e){if(null===e)return"null";let t=Object.prototype.toString.call(e).slice(8,-1).toLowerCase();return"object"==typeof e||"function"==typeof e?t:typeof e}var at=oY({name:"yaml-enforce-settings",meta:{type:"problem",fixable:"code",docs:{description:"Enforce settings in `pnpm-workspace.yaml`"},schema:[{type:"object",additionalProperties:!1,properties:{autofix:{type:"boolean",description:"Whether to autofix the linting error",default:!0},settings:{description:"Exact settings to enforce, for both keys and values. Auto-fixable.",type:"object"},requiredFields:{description:"Required settings fields to enforce, regardless of their values. Not-autofixable.",type:"array",items:{type:"string"}},forbiddenFields:{description:"Forbidden settings fields to enforce, regardless of their values. Not-autofixable.",type:"array",items:{type:"string"}}}}],messages:{requiredFieldsMissing:"Required settings fields {{keys}} are missing in `pnpm-workspace.yaml`.",settingMissing:'Setting "{{key}}" is missing in `pnpm-workspace.yaml`.',settingMismatch:'Setting "{{key}}" has mismatch value. Expected: {{expected}}, Actual: {{actual}}.',forbiddenFieldFound:'Forbidden setting field "{{key}}" is found in `pnpm-workspace.yaml`.'}},defaultOptions:[{autofix:!0,settings:{},requiredFields:[],forbiddenFields:[]}],create(e,[t={}]){let{autofix:r=!0,settings:n={},requiredFields:s=[],forbiddenFields:i=[]}=t||{};if(0===Object.keys(n).length&&0===s.length&&0===i.length)throw Error("Either `settings` or `requiredFields` or `forbiddenFields` must be provided, this rule is not functional currently.");if("pnpm-workspace.yaml"!==iR(e.filename))return{};let o=oQ(e);if(!o||iI(o.filepath)!==iI(e.filename)||o.hasChanged()||o.hasQueue())return{};o.setContent(e.sourceCode.text);let a=o.toJSON()||{},l=o.getDocument(),c=[];for(let e of s)Object.hasOwn(a,e)||c.push(e);for(let t of(c.length>0&&e.report({loc:{start:e.sourceCode.getLocFromIndex(0),end:e.sourceCode.getLocFromIndex(0)},messageId:"requiredFieldsMissing",data:{keys:c.map(e=>JSON.stringify(e)).join(", ")}}),i)){let r=l.getIn([t],!0);r&&e.report({loc:{start:e.sourceCode.getLocFromIndex(r?.range?.[0]??0),end:e.sourceCode.getLocFromIndex(r?.range?.[1]??0)},messageId:"forbiddenFieldFound",data:{key:t}})}for(let[t,s]of Object.entries(n)){if(function e(t,r){let n=ae(t);if(n!==ae(r))return!1;if("array"===n)return t.length===r.length&&t.every((t,n)=>e(t,r[n]));if("object"===n){let n=Object.keys(t);return n.length===Object.keys(r).length&&n.every(n=>e(t[n],r[n]))}return Object.is(t,r)}(a[t],s))continue;let n=l.getIn([t],!0),i=a[t],o=JSON.stringify(s),c=void 0!==i?JSON.stringify(i):"undefined";if(n){let i;if(!n.range)throw Error("Node range is not found");let a=l.contents;if(a?.items){for(let e of a.items)if(e.key&&"object"==typeof e.key&&"value"in e.key&&e.key.value===t){i=e;break}}let u=n.range[0],p=n.range[1];i?.key?.range&&i?.value?.range&&(u=i.key.range[0],p=i.value.range[1]),e.report({loc:{start:e.sourceCode.getLocFromIndex(u),end:e.sourceCode.getLocFromIndex(p)},messageId:"settingMismatch",data:{key:t,expected:o,actual:c},fix:r?e=>{let r=`
28
+ ${so.stringify({[t]:s},{collectionStyle:"block"})}
29
29
  `;return e.replaceTextRange([u,p],r)}:void 0})}else{if(null!=a[t])throw Error("Node should not be undefined");e.report({loc:{start:e.sourceCode.getLocFromIndex(0),end:e.sourceCode.getLocFromIndex(0)},messageId:"settingMismatch",data:{key:t,expected:o,actual:c},fix:r?e=>{let r=`
30
- ${sa.stringify({[t]:s},{collectionStyle:"block"})}
31
- `;return e.insertTextBeforeRange([0,0],r)}:void 0})}}return{}}}),oN=of({name:"yaml-no-anonymous-catalog",meta:{type:"problem",docs:{description:"Disallow the anonymous `catalog:` in `pnpm-workspace.yaml` in favor of named catalogs"},schema:[],messages:{unexpectedAnonymousCatalog:"Avoid the anonymous `catalog:`. Use a named catalog (`catalogs: <name>:`) instead."}},defaultOptions:[],create(e){if("pnpm-workspace.yaml"!==is(e.filename))return{};let t=ob(e);if(!t||s4(t.filepath)!==s4(e.filename)||t.hasChanged()||t.hasQueue())return{};t.setContent(e.sourceCode.text);let r=t.getDocument().contents;if(!so.isMap(r))return{};let n=r.items.find(e=>so.isScalar(e.key)&&"catalog"===e.key.value)?.key;return so.isScalar(n)&&n.range&&e.report({loc:{start:e.sourceCode.getLocFromIndex(n.range[0]),end:e.sourceCode.getLocFromIndex(n.range[1])},messageId:"unexpectedAnonymousCatalog"}),{}}}),o$=of({name:"yaml-no-duplicate-catalog-item",meta:{type:"problem",docs:{description:"Disallow duplicate catalog items in `pnpm-workspace.yaml`"},fixable:"code",schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"}},checkDuplicates:{type:"string",enum:["name-only","exact-version"],description:'Determines what constitutes a duplicate: "name-only" errors on any duplicate package name, "exact-version" only errors on identical version strings',default:"name-only"}},additionalProperties:!1}],messages:{duplicateCatalogItem:'Catalog item "{{name}}" with version "{{version}}" is already defined in the "{{existingCatalog}}" catalog. You may want to remove one of them.'}},defaultOptions:[{}],create(t,[r={}]){if("pnpm-workspace.yaml"!==is(t.filename))return{};let n=ob(t);if(!n||s4(n.filepath)!==s4(t.filename)||n.hasChanged()||n.hasQueue())return{};let{allow:s=[],checkDuplicates:i="name-only"}=r;n.setContent(t.sourceCode.text);let o=n.toJSON()||{},a=new e,l={...o.catalogs,default:o.catalog??o.catalogs?.default},c=n.getDocument();for(let[e,r]of Object.entries(l))if(r)for(let[n,l]of Object.entries(r)){if(s.includes(n))continue;let r=a.get(n);if(r){if("name-only"===i||r.version===l){let s=c.getIn("default"===e&&o.catalog?["catalog",n]:["catalogs",e,n],!0),i=t.sourceCode.getLocFromIndex(s.range[0]),a=t.sourceCode.getLocFromIndex(s.range[1]);t.report({loc:{start:i,end:a},messageId:"duplicateCatalogItem",data:{name:n,version:String(l),currentCatalog:e,existingCatalog:r.catalog}})}}else a.set(n,{catalog:e,version:String(l)})}return{}}});function o_(e,t,r,n){let s=e.sourceCode.getLocFromIndex(t.range[0]),i=e.sourceCode.getLocFromIndex(t.range[1]);e.report({loc:{start:s,end:i},messageId:r,data:n})}let oI={"yaml-no-unused-catalog-item":of({name:"yaml-no-unused-catalog-item",meta:{type:"problem",docs:{description:"Disallow unused catalogs in `pnpm-workspace.yaml`"},fixable:"code",schema:[],messages:{unusedCatalogItem:'Catalog item "{{catalogItem}}" is not used in any package.json.'}},defaultOptions:[],create(t){if("pnpm-workspace.yaml"!==is(t.filename))return{};let r=ob(t);if(!r||s4(r.filepath)!==s4(t.filename)||r.hasChanged()||r.hasQueue())return{};r.setContent(t.sourceCode.text);let n=r.toJSON()||{},s=new e,i=r.getDocument(),o={default:i.getIn(["catalog"])};for(let e of i.getIn(["catalogs"])?.items||[])o[String(e.key)]=e.value;for(let[e,t]of Object.entries(o))if(t)for(let r of t.items)s.set(`${String(r.key)}:${e}`,r);for(let[e,t]of Object.entries(n.overrides||{}))if(t.startsWith("catalog:")){let r=t.slice(8)||"default";s.delete(`${e}:${r}`)}if(0===s.size)return{};let a=Array.from(ok(r)).filter(e=>eP.existsSync(e)).sort(),l=["dependencies","devDependencies","peerDependencies","optionalDependencies","overrides","resolutions","pnpm.overrides"];for(let e of a){let t=JSON.parse(eP.readFileSync(e,"utf-8"));for(let e of l){let r=function(e,t){let r=e;for(let e of t)if(!(r=r[e]))return;return r}(t,e.split("."));if(r)for(let[e,t]of Object.entries(r)){if(!t.startsWith("catalog:"))continue;let r=`${e}:${t.slice(8)||"default"}`;s.delete(r)}}}if(s.size>0)for(let[e,r]of Array.from(s.entries()).sort((e,t)=>e[0].localeCompare(t[0]))){let n=t.sourceCode.getLocFromIndex(r.key.range[0]),s=t.sourceCode.getLocFromIndex(r.value.range.at(-1));t.report({loc:{start:n,end:s},messageId:"unusedCatalogItem",data:{catalogItem:e}})}return{}}}),"yaml-no-duplicate-catalog-item":o$,"yaml-no-anonymous-catalog":oN,"yaml-valid-packages":of({name:"yaml-valid-packages",meta:{type:"problem",docs:{description:"Ensure all package patterns in `pnpm-workspace.yaml` match at least one directory"},schema:[],messages:{noMatch:'Package pattern "{{pattern}}" does not match any directories with a package.json file.',invalidType:"Package pattern must be a string, got {{type}}."}},defaultOptions:[],create(e){if("pnpm-workspace.yaml"!==is(e.filename))return{};let t=ob(e);if(!t||s4(t.filepath)!==s4(e.filename)||t.hasChanged()||t.hasQueue())return{};t.setContent(e.sourceCode.text);let r=t.toJSON()||{};if(!r.packages||!Array.isArray(r.packages))return{};let n=t.getDocument().getIn(["packages"]);if(!n)return{};let s=s7(ir(e.filename));for(let t=0;t<r.packages.length;t++){let i=n.items[t];if(!i?.range)continue;let o=r.packages[t];if("string"!=typeof o){o_(e,i,"invalidType",{type:typeof o});continue}0===oc(s5(o,"package.json"),{cwd:s,dot:!1,ignore:["**/node_modules/**","**/dist/**","**/build/**"],absolute:!1,expandDirectories:!1,onlyFiles:!0}).length&&o_(e,i,"noMatch",{pattern:o})}return{}}}),"yaml-enforce-settings":oL},oP={meta:{name:"eslint-plugin-pnpm",version:"1.7.0"},rules:{...oT,...oI}},oj=[{name:"pnpm/package.json",files:["package.json","**/package.json"],languageOptions:{parser:ta},plugins:{pnpm:oP},rules:{"pnpm/json-enforce-catalog":"error","pnpm/json-valid-catalog":"error","pnpm/json-prefer-workspace-settings":"error"}}],oM={recommended:[...oj],json:oj,yaml:[{name:"pnpm/pnpm-workspace-yaml",files:["pnpm-workspace.yaml"],languageOptions:{parser:s1},plugins:{pnpm:oP},rules:{"pnpm/yaml-no-unused-catalog-item":"error","pnpm/yaml-no-duplicate-catalog-item":"error","pnpm/yaml-valid-packages":"error"}}]};function oD(e,t=!1){return"boolean"==typeof e?e:null==e?t:"enable"in e?"boolean"==typeof e.enable?e.enable:t:!tr.isObjectEmpty(e)||t}function oR(e,...t){let r;if("boolean"==typeof e||void 0===e)r={};else{let{enable:t,...n}=e;r=n}return t.length?e2.defu(r,...t):r}oP.configs=oM;let oF=e=>eI.isPackageExists(e,"string"==typeof __dirname?__dirname:void 0);async function oq(e,...t){let r=Date.now(),n=[];await rc("@eslint-sukka/js"),await rc("@eslint-sukka/json"),await rc("@eslint-sukka/ts"),await rc("@eslint-sukka/legacy");let s=oF("@types/node"),i=oD(e?.ts,oF("typescript")||s),o=oF("next"),a=oD(e?.react,o||oF("react")||oF("@types/react"));if(n.push(tA(e?.ignores),[{name:"sukka/eslint-comments",plugins:{"@eslint-community/eslint-comments":eU,sukka:eI.memo(eK,"@eslint-sukka/eslint-plugin-sukka-full"),"vibe-proof":eI.memo(eY.eslint_plugin_vibe_proof,"eslint-plugin-vibe-proof")},rules:{"@eslint-community/eslint-comments/disable-enable-pair":["error",{allowWholeFile:!0}],"@eslint-community/eslint-comments/no-aggregating-enable":"error","@eslint-community/eslint-comments/no-duplicate-disable":"error","@eslint-community/eslint-comments/no-unlimited-disable":"error","@eslint-community/eslint-comments/no-unused-enable":"error","vibe-proof/ban-eslint-disable":["error","allow-with-description"],"sukka/migrate-vibe-proof-eslint-disable":"error"}}]),oD(e?.stylistic,!0)&&n.push(function({ts:e,react:t}){return[{name:"sukka/stylistic",plugins:{"@stylistic":eJ.stylistic_eslint_plugin,sukka:eI.memo(eK,"@eslint-sukka/eslint-plugin-sukka-full")},rules:Object.assign(eH.literal({"no-nested-ternary":"off","@stylistic/dot-location":["error","property"],"@stylistic/no-multi-spaces":["error",{ignoreEOLComments:!1}],"@stylistic/wrap-iife":["error","inside",{functionPrototypeMethods:!1}],"@stylistic/no-extra-parens":["off","all",{conditionalAssign:!0,nestedBinaryExpressions:!1,returnAssign:!1,ignoreJSX:"all",enforceForArrowConditionals:!1}],"@stylistic/arrow-spacing":["error",{before:!0,after:!0}],"@stylistic/generator-star-spacing":["error",{before:!0,after:!1}],"@stylistic/no-confusing-arrow":["error",{allowParens:!0}],"@stylistic/template-curly-spacing":["error","never"],"@stylistic/yield-star-spacing":["error","before"],"@stylistic/array-bracket-newline":["error","consistent"],"@stylistic/array-bracket-spacing":["error","never"],"@stylistic/array-element-newline":["off",{multiline:!0,minItems:5}],"@stylistic/block-spacing":["error","always"],"@stylistic/brace-style":["error","1tbs",{allowSingleLine:!0}],"@stylistic/comma-dangle":["error","never"],"@stylistic/comma-spacing":["error",{before:!1,after:!0}],"@stylistic/comma-style":["error","last",{exceptions:{ArrayExpression:!1,ArrayPattern:!1,ArrowFunctionExpression:!1,CallExpression:!1,FunctionDeclaration:!1,FunctionExpression:!1,ImportDeclaration:!1,ObjectExpression:!1,ObjectPattern:!1,VariableDeclaration:!1,NewExpression:!1}}],"@stylistic/computed-property-spacing":["error","never"],"@stylistic/eol-last":["error","always"],"@stylistic/function-call-spacing":["error","never"],"@stylistic/function-call-argument-newline":["off","consistent"],"@stylistic/function-paren-newline":["error","consistent"],"@stylistic/implicit-arrow-linebreak":["error","beside"],"@stylistic/indent":["error",2,{SwitchCase:1,VariableDeclarator:"first",MemberExpression:1,StaticBlock:{body:1}}],"@stylistic/indent-binary-ops":["error",2],"@stylistic/key-spacing":["error",{beforeColon:!1,afterColon:!0}],"@stylistic/linebreak-style":["error","unix"],"@stylistic/lines-around-comment":"off","@stylistic/lines-around-directive":"off","@stylistic/lines-between-class-members":["error","always",{exceptAfterSingleLine:!0}],"@stylistic/multiline-ternary":["error","always-multiline"],"@stylistic/newline-per-chained-call":["error",{ignoreChainWithDepth:6}],"@stylistic/new-parens":"error","@stylistic/no-mixed-operators":["error",{groups:[["**","+"],["**","-"],["**","*"],["**","/"],["%","+"],["%","-"],["%","*"],["%","/"],["%","**"],["==","!=","===","!==",">",">=","<","<="],["&&","||"],["in","instanceof"]],allowSamePrecedence:!0}],"@stylistic/no-mixed-spaces-and-tabs":"error","@stylistic/no-multiple-empty-lines":["error",{max:1,maxBOF:0,maxEOF:0}],"@stylistic/no-spaced-func":"off","@stylistic/no-tabs":"error","@stylistic/no-trailing-spaces":"error","@stylistic/no-whitespace-before-property":"error","@stylistic/nonblock-statement-body-position":"error","@stylistic/object-curly-newline":["error",{consistent:!0}],"@stylistic/object-curly-spacing":["error","always"],"@stylistic/object-property-newline":"off","@stylistic/one-var-declaration-per-line":"off","@stylistic/operator-linebreak":["error","before",{overrides:{"=":"after"}}],"@stylistic/padded-blocks":["error","never"],"@stylistic/padding-line-between-statements":["error",{blankLine:"always",prev:"directive",next:"*"},{blankLine:"always",prev:"*",next:["class","with"]},{blankLine:"always",prev:["class","with"],next:"*"}],"@stylistic/quotes":["error","single"],"@stylistic/quote-props":["error","as-needed",{keywords:!1,unnecessary:!0,numbers:!1}],"@stylistic/jsx-quotes":["error","prefer-double"],"@stylistic/rest-spread-spacing":["error","never"],"@stylistic/semi":["error","always"],"@stylistic/semi-spacing":["error",{before:!1,after:!0}],"@stylistic/semi-style":["error","last"],"@stylistic/space-before-blocks":"error","@stylistic/space-before-function-paren":["error",{anonymous:"always",named:"never",asyncArrow:"always"}],"@stylistic/space-in-parens":["error","never"],"@stylistic/space-infix-ops":"error","@stylistic/space-unary-ops":["error",{words:!0,nonwords:!1,overrides:{}}],"@stylistic/spaced-comment":["error","always",{line:{exceptions:["-","+"],markers:["=","!","/"]},block:{exceptions:["-","+"],markers:["=","!",":","::"],balanced:!0}}],"@stylistic/switch-colon-spacing":["error",{after:!0,before:!1}],"@stylistic/template-tag-spacing":["error","never"],"@stylistic/wrap-regex":"off","@stylistic/keyword-spacing":["error",{before:!0,after:!0,overrides:{return:{after:!0},throw:{after:!0},case:{after:!0}}}]}),e?eH.literal({"@stylistic/member-delimiter-style":["error",{multiline:{delimiter:"comma",requireLast:!1},singleline:{delimiter:"comma",requireLast:!1}}],"@stylistic/lines-between-class-members":["error","always",{exceptAfterSingleLine:!0,exceptAfterOverload:!0}],"@stylistic/padding-line-between-statements":["error",{blankLine:"always",prev:"directive",next:"*"},{blankLine:"always",prev:"*",next:["class","with"]},{blankLine:"always",prev:["class","with"],next:"*"},{blankLine:"any",prev:["interface","type"],next:["interface","type"]}],"@stylistic/type-annotation-spacing":"error","@stylistic/arrow-spacing":["error",{before:!0,after:!0}],"@stylistic/type-generic-spacing":"error","@stylistic/type-named-tuple-spacing":"error"}):{},t?eH.literal({"@stylistic/jsx-pascal-case":["error",{allowAllCaps:!0,ignore:[]}],"@stylistic/jsx-curly-spacing":["error","never",{allowMultiline:!0}],"@stylistic/jsx-indent-props":["error",2],"@stylistic/jsx-max-props-per-line":["error",{maximum:1,when:"multiline"}],"@stylistic/jsx-wrap-multilines":["error",{declaration:"parens-new-line",assignment:"parens-new-line",return:"parens-new-line",arrow:"parens-new-line",condition:"ignore",logical:"ignore",prop:"ignore"}],"@stylistic/jsx-first-prop-new-line":["error","multiline-multiprop"],"@stylistic/jsx-function-call-newline":["error","multiline"],"@stylistic/jsx-equals-spacing":["error","never"],"@stylistic/jsx-indent":"off","@stylistic/jsx-child-element-spacing":"error","@stylistic/jsx-closing-bracket-location":["error","line-aligned"],"@stylistic/jsx-tag-spacing":["error",{closingSlash:"never",beforeSelfClosing:"always",afterOpening:"never",beforeClosing:"never"}],"@stylistic/jsx-curly-brace-presence":["error",{props:"never",children:"never"}],"@stylistic/jsx-self-closing-comp":"error","@stylistic/jsx-curly-newline":["error",{multiline:"consistent",singleline:"consistent"}]}):{})},eI.UNSAFE_excludeJsonYamlFiles(eK.configs.stylistic_unicorn)]}({ts:i,react:a})),oD(e?.js,!0)&&n.push(rn(oR(e?.js)),function({typescript:e}){return[eI.UNSAFE_excludeJsonYamlFiles({name:"sukka/promise",plugins:{promise:eW},rules:{"promise/always-return":e?"off":["error",{ignoreLastCallback:!0}],"promise/no-return-wrap":"error","promise/param-names":"error","promise/catch-or-return":["error",{allowFinally:!0,terminationMethod:["catch","asCallback","finally"]}],"promise/no-native":"off","promise/no-nesting":"warn","promise/no-promise-in-callback":"warn","promise/no-callback-in-promise":"warn","promise/avoid-new":"off","promise/no-new-statics":"error","promise/no-return-in-finally":"warn","promise/valid-params":"warn","promise/prefer-catch":"error"}})]}({typescript:i}),tC()),oD(e?.yaml,eI.isDirectDependency("yaml")||eI.isDirectDependency("js-yaml"))&&n.push((await rl("@eslint-sukka/yaml")).yaml()),oD(e?.json,!0)&&n.push(rs()),i){let t=e?.isInEditor??(!(e9.isCI||process.env.CI||process.env.GIT_PARAMS||process.env.VSCODE_GIT_COMMAND||process.env.npm_lifecycle_script?.startsWith("lint-staged"))&&!!(process.env.VSCODE_PID||process.env.VSCODE_CWD||process.env.JETBRAINS_IDE||process.env.VIM||process.env.NVIM));n.push(function(e){let{allowJs:t=!1,tsconfigPath:r=!0,tsconfigRootDir:n=eM.cwd(),componentExtensions:s=[],isInEditor:i=!1,allowDefaultProject:o=["next.config.ts","rollup.config.ts","webpack.config.ts"]}=e,a="string"==typeof __dirname?__dirname:void 0,l=eI.packageResolver.sync(a,"@typescript-eslint/parser"),c=eF.nullthrow(l.path,"[eslint-config-sukka#ts] Expect @typescript-eslint/parser to exist"),u=[eI.constants.GLOB_TS,eI.constants.GLOB_TSX,...s.map(e=>`**/*.${e}`),...t?[eI.constants.GLOB_JS]:[]];return[{name:"@eslint-sukka/ts base",files:u,plugins:{"@typescript-eslint":eI.asPlugin(eZ),"import-x":eX,"unused-imports":eI.memo(eV,"eslint-plugin-unused-imports")},languageOptions:{parser:e0,sourceType:"module",parserOptions:{sourceType:"module",ecmaVersion:"latest",...!0===r?{projectService:{allowDefaultProject:o,loadTypeScriptPlugins:i}}:{project:r},tsconfigRootDir:n,ecmaFeatures:{jsx:!0},jsxPragma:void 0,warnOnUnsupportedTypeScriptVersion:!0}},settings:{"import-x/extensions":ra,"import-x/external-module-folders":["node_modules","node_modules/@types"],"import-x/resolver-next":[e1.createTypeScriptImportResolver()],"import-x/parsers":{[c]:ro}},rules:{...ez.configs.base.rules,...eI.collectRules([...ez.configs.recommendedTypeChecked,...ez.configs.stylisticTypeChecked]),...eX.configs.typescript.rules,...ri,"@typescript-eslint/ban-ts-comment":["error",{"ts-expect-error":"allow-with-description","ts-ignore":!0,"ts-nocheck":!0,"ts-check":!1,minimumDescriptionLength:10}],"@typescript-eslint/naming-convention":["warn",{selector:"variable",format:["camelCase","PascalCase","UPPER_CASE","snake_case"],leadingUnderscore:"allowSingleOrDouble",trailingUnderscore:"allowSingleOrDouble"},{selector:"function",format:["camelCase","PascalCase"],leadingUnderscore:"allowSingleOrDouble",trailingUnderscore:"allowSingleOrDouble"},{selector:"typeLike",format:["PascalCase"],leadingUnderscore:"allowSingleOrDouble",trailingUnderscore:"allowSingleOrDouble"}],"@typescript-eslint/consistent-type-assertions":["error",{assertionStyle:"as",objectLiteralTypeAssertions:"allow"}],"@typescript-eslint/no-unnecessary-type-conversion":"error","@typescript-eslint/require-await":"error","@typescript-eslint/await-thenable":"error","@typescript-eslint/no-for-in-array":"error","@typescript-eslint/no-misused-promises":["error",{checksVoidReturn:!1}],"@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0,allowAny:!0,allowBoolean:!0,allowNever:!0}],"@typescript-eslint/unbound-method":"error","@typescript-eslint/consistent-type-imports":["warn",{prefer:"type-imports",disallowTypeAnnotations:!1,fixStyle:"separate-type-imports"}],"@typescript-eslint/no-import-type-side-effects":"warn","@typescript-eslint/consistent-type-exports":["warn",{fixMixedExportsWithInlineTypeSpecifier:!0}],"@typescript-eslint/consistent-type-definitions":"warn","@typescript-eslint/consistent-generic-constructors":["error","constructor"],"@typescript-eslint/no-base-to-string":["error",{ignoredTypeNames:["Error","RegExp","URL","URLSearchParams"]}],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-extraneous-class":["warn",{allowConstructorOnly:!0,allowEmpty:!0,allowWithDecorator:!0}],"@typescript-eslint/no-invalid-void-type":["off",{allowInGenericTypeArguments:!0,allowAsThisParameter:!0}],"@typescript-eslint/no-non-null-asserted-nullish-coalescing":"error","@typescript-eslint/no-unnecessary-boolean-literal-compare":"error","@typescript-eslint/no-unnecessary-condition":["warn",{allowConstantLoopConditions:!0}],"@typescript-eslint/no-unnecessary-type-arguments":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/non-nullable-type-assertion-style":"error","@typescript-eslint/prefer-includes":"error","@typescript-eslint/prefer-literal-enum-member":["error",{allowBitwiseExpressions:!0}],"@typescript-eslint/prefer-nullish-coalescing":"off","@typescript-eslint/prefer-return-this-type":"error","@typescript-eslint/prefer-optional-chain":"error","@typescript-eslint/prefer-reduce-type-parameter":"error","@typescript-eslint/unified-signatures":["error",{ignoreDifferentlyNamedParameters:!0}],"@typescript-eslint/prefer-for-of":"off","@typescript-eslint/prefer-function-type":"off","@typescript-eslint/consistent-indexed-object-style":"off","@typescript-eslint/prefer-enum-initializers":"warn","@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-meaningless-void-operator":"warn","@typescript-eslint/no-unnecessary-qualifier":"warn","@typescript-eslint/array-type":["warn",{default:"array-simple"}],"no-restricted-imports":["error",{paths:eI.RESTRICTED_IMPORT}],"@typescript-eslint/no-empty-object-type":["error",{allowInterfaces:"with-single-extends",allowObjectTypes:"never",allowWithName:"Props$"}],"@typescript-eslint/no-unsafe-function-type":"warn","@typescript-eslint/no-restricted-types":["error",{types:{FC:{message:"To declare a component, you don't have to use FC to annotate it. To type something that accepts/is a React Component, use ComponentType<T>.",fixWith:"ComponentType"},"React.FC":{message:"To declare a component, simply use single object parameter that returns React.ReactNode. To type something that accepts/is a React Component, use React.ComponentType<T>.",fixWith:"React.ComponentType"},ReactElement:{message:"In most cases, you want ReactNode. Only ignore this rule when you working with cloneElement.",fixWith:"ReactNode"},"React.ReactElement":{message:"In most cases, you want React.ReactNode. Only ignore this rule when you are working with cloneElement.",fixWith:"React.ReactNode"}}}],"@typescript-eslint/no-unsafe-assignment":"off","@typescript-eslint/no-unsafe-argument":"off","@typescript-eslint/no-unsafe-return":"off","@typescript-eslint/no-unsafe-call":"off","@typescript-eslint/no-unsafe-member-access":"off","@typescript-eslint/no-explicit-any":"warn","no-loop-func":"warn","@typescript-eslint/no-redundant-type-constituents":"off","@typescript-eslint/no-floating-promises":"off","@typescript-eslint/no-unsafe-enum-comparison":"error","@typescript-eslint/prefer-regexp-exec":"warn","@typescript-eslint/no-deprecated":"warn","@typescript-eslint/no-unnecessary-template-expression":"warn","@typescript-eslint/prefer-readonly":"error","@typescript-eslint/class-literal-property-style":"error","@typescript-eslint/no-useless-default-assignment":"warn","@typescript-eslint/class-methods-use-this":["error",{exceptMethods:[],ignoreClassesThatImplementAnInterface:"public-fields"}],"no-restricted-syntax":["error",...eI.RESTRICTED_SYNTAX,{message:'Unnecessary "as const"',selector:"VariableDeclarator > TSAsExpression[expression.properties.length=0] > TSTypeReference > Identifier[name=const]"},{message:'Unnecessary "as const"',selector:"VariableDeclarator[id.typeAnnotation] > TSAsExpression > TSTypeReference > Identifier[name=const]"},{message:'Static class methods requires "this: void", or change to arrow function',selector:'MethodDefinition[static=true][kind!="get"][kind!="set"] > FunctionExpression:not([params.0.name=this][params.0.typeAnnotation.typeAnnotation.type=TSVoidKeyword])'},{message:'Public "static" fields should be read-only',selector:'PropertyDefinition[readonly!=true][static=true][accessibility!="private"][accessibility!="protected"]'},{message:"Construct signature should be first",selector:"TSInterfaceBody > :not(TSConstructSignatureDeclaration) ~ TSConstructSignatureDeclaration"},{message:"Call signature should be first",selector:"TSInterfaceBody > :not(TSCallSignatureDeclaration, TSConstructSignatureDeclaration) ~ TSCallSignatureDeclaration"},...e["~_internal_react_enabled_do_not_use_or_you_will_be_fired"]?[{selector:"JSXAttribute[name.name='ref'][value.type='Literal']",message:"[Deprecated] Use callback refs instead."},{selector:"AssignmentExpression[operator='='][left.property.name='propTypes']",message:"[Deprecated] Use TypeScript or another type-checking solution instead."},{selector:"AssignmentExpression[operator='='][left.property.name='defaultProps']",message:"[Deprecated] Use ES6 default parameters instead."},{selector:"ImportDeclaration[importKind='type'][source.value='react']:has(ImportSpecifier)",message:"Use React UMD global types (e.g. React.ReactNode) instead of named type imports from 'react'."}]:[]],"@typescript-eslint/no-namespace":"off","@typescript-eslint/prefer-string-starts-ends-with":["error",{allowSingleElementEquality:"always"}],"@typescript-eslint/switch-exhaustiveness-check":["error",{allowDefaultCaseForExhaustiveSwitch:!0,considerDefaultExhaustiveForUnions:!0}],"@typescript-eslint/parameter-properties":["warn",{prefer:"parameter-property"}],"no-throw-literal":"off","@typescript-eslint/only-throw-error":["error",{allowRethrowing:!0,allowThrowingAny:!0,allowThrowingUnknown:!0}],"@typescript-eslint/no-unused-vars":"off","unused-imports/no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0}],"unused-imports/no-unused-imports":i?"error":"off","import-x/consistent-type-specifier-style":["error","prefer-top-level"],"import-x/named":"off","import-x/namespace":"off","import-x/default":"off","import-x/no-named-as-default-member":"off","import-x/no-deprecated":"off"}},eI.withFiles(eK.configs.recommended_extra_with_typed_lint,u),eI.withFiles(eI.asFlatConfig(eY.eslint_plugin_vibe_proof.configs.common_type_checked),u),{name:"@eslint-sukka/ts dts",files:["**/*.d.ts"],plugins:{"import-x":eX},rules:{"import-x/no-duplicates":"off","unused-imports/no-unused-vars":"off","unused-imports/no-unused-imports":"off"}},{name:"@eslint-sukka/ts jest/mocha",files:["**/*.{test,spec}.ts?(x)"],rules:{"no-unused-expressions":"off"}},{name:"@eslint-sukka/ts commonjs",files:["**/*.js","**/*.cjs"],plugins:{"@typescript-eslint":eI.asPlugin(eZ)},rules:{"@typescript-eslint/no-require-imports":"off"}}]}({isInEditor:t,...oR(e?.ts),"~_internal_react_enabled_do_not_use_or_you_will_be_fired":a}))}if(a)if(i){let t=await rl("@eslint-sukka/react"),r=oF("@remix-run/node")||oF("@remix-run/react")||oF("@remix-run/serve")||oF("@remix-run/dev");n.push(t.react(oR(e?.react,{nextjs:o,remix:r,reactRefresh:{allowConstantExport:oF("vite")}}))),oD(e?.next,o)&&n.push(t.next()),oD(e?.stylex,oF("@stylexjs/stylex")||oF("stylex-webpack"))&&n.push(t.stylex(oR(e?.stylex)))}else console.warn("[eslint-config-sukka] React preset will not be enabled when TypeScript is missing.");oD(e?.node,s||oF("@types/bun"))&&n.push((await rl("@eslint-sukka/node")).node({...oR(e?.node),hasTypeScript:i,hasReact:a})),oD(e?.legacy)&&n.push(function(e={}){return[{name:"@eslint-sukka/legacy base",...e.files&&{files:e.files},rules:{"prefer-numeric-literals":"off","no-restricted-properties":["error",{object:"arguments",property:"callee",message:"arguments.callee is deprecated"},{property:"__defineGetter__",message:"Please use Object.defineProperty instead."},{property:"__defineSetter__",message:"Please use Object.defineProperty instead."}],"no-var":"off","prefer-object-spread":"off",strict:["error","safe"],"sukka/unicorn/prefer-default-parameters":"off","sukka/unicorn/prefer-logical-operator-over-ternary":"off","sukka/unicorn/prefer-optional-catch-binding":"off","sukka/unicorn/prefer-abort-signal-timeout":"off","sukka/unicorn/prefer-aggregate-error":"off","sukka/unicorn/prefer-observer-apis":"off","sukka/unicorn/prefer-set-methods":"off"},languageOptions:{globals:{...(e.browser??!0)&&eI.globals.browser,...(e.node??!1)&&eI.globals.node}}}]}(oR(e?.legacy))),oD(e?.pnpm,!0)&&n.push([{name:"@eslint-sukka pnpm/package.json",files:["**/package.json"],languageOptions:{parser:ta},plugins:{pnpm:oP},rules:{"pnpm/json-enforce-catalog":"off","pnpm/json-valid-catalog":"error","pnpm/json-prefer-workspace-settings":"error","pnpm/yaml-no-duplicate-catalog-item":["error",{checkDuplicates:"exact-version"}],"pnpm/yaml-no-unused-catalog-item":"error","pnpm/yaml-valid-packages":"error"}}]),n.push(t);let l=(await Promise.all(n)).flat();return process.env.TIMING&&console.log(`[eslint-config-sukka] Timing: ${Date.now()-r}ms`),l}exports.constants=eI.constants,exports.ignores=tA,exports.sukka=oq;
30
+ ${so.stringify({[t]:s},{collectionStyle:"block"})}
31
+ `;return e.insertTextBeforeRange([0,0],r)}:void 0})}}return{}}}),ar=oY({name:"yaml-no-anonymous-catalog",meta:{type:"problem",docs:{description:"Disallow the anonymous `catalog:` in `pnpm-workspace.yaml` in favor of named catalogs"},schema:[],messages:{unexpectedAnonymousCatalog:"Avoid the anonymous `catalog:`. Use a named catalog (`catalogs: <name>:`) instead."}},defaultOptions:[],create(e){if("pnpm-workspace.yaml"!==iR(e.filename))return{};let t=oQ(e);if(!t||iI(t.filepath)!==iI(e.filename)||t.hasChanged()||t.hasQueue())return{};t.setContent(e.sourceCode.text);let r=t.getDocument().contents;if(!si.isMap(r))return{};let n=r.items.find(e=>si.isScalar(e.key)&&"catalog"===e.key.value)?.key;return si.isScalar(n)&&n.range&&e.report({loc:{start:e.sourceCode.getLocFromIndex(n.range[0]),end:e.sourceCode.getLocFromIndex(n.range[1])},messageId:"unexpectedAnonymousCatalog"}),{}}}),an=oY({name:"yaml-no-duplicate-catalog-item",meta:{type:"problem",docs:{description:"Disallow duplicate catalog items in `pnpm-workspace.yaml`"},fixable:"code",schema:[{type:"object",properties:{allow:{type:"array",items:{type:"string"}},checkDuplicates:{type:"string",enum:["name-only","exact-version"],description:'Determines what constitutes a duplicate: "name-only" errors on any duplicate package name, "exact-version" only errors on identical version strings',default:"name-only"}},additionalProperties:!1}],messages:{duplicateCatalogItem:'Catalog item "{{name}}" with version "{{version}}" is already defined in the "{{existingCatalog}}" catalog. You may want to remove one of them.'}},defaultOptions:[{}],create(t,[r={}]){if("pnpm-workspace.yaml"!==iR(t.filename))return{};let n=oQ(t);if(!n||iI(n.filepath)!==iI(t.filename)||n.hasChanged()||n.hasQueue())return{};let{allow:s=[],checkDuplicates:i="name-only"}=r;n.setContent(t.sourceCode.text);let o=n.toJSON()||{},a=new e,l={...o.catalogs,default:o.catalog??o.catalogs?.default},c=n.getDocument();for(let[e,r]of Object.entries(l))if(r)for(let[n,l]of Object.entries(r)){if(s.includes(n))continue;let r=a.get(n);if(r){if("name-only"===i||r.version===l){let s=c.getIn("default"===e&&o.catalog?["catalog",n]:["catalogs",e,n],!0),i=t.sourceCode.getLocFromIndex(s.range[0]),a=t.sourceCode.getLocFromIndex(s.range[1]);t.report({loc:{start:i,end:a},messageId:"duplicateCatalogItem",data:{name:n,version:String(l),currentCatalog:e,existingCatalog:r.catalog}})}}else a.set(n,{catalog:e,version:String(l)})}return{}}});function as(e,t,r,n){let s=e.sourceCode.getLocFromIndex(t.range[0]),i=e.sourceCode.getLocFromIndex(t.range[1]);e.report({loc:{start:s,end:i},messageId:r,data:n})}let ai={"yaml-no-unused-catalog-item":oY({name:"yaml-no-unused-catalog-item",meta:{type:"problem",docs:{description:"Disallow unused catalogs in `pnpm-workspace.yaml`"},fixable:"code",schema:[],messages:{unusedCatalogItem:'Catalog item "{{catalogItem}}" is not used in any package.json.'}},defaultOptions:[],create(t){if("pnpm-workspace.yaml"!==iR(t.filename))return{};let r=oQ(t);if(!r||iI(r.filepath)!==iI(t.filename)||r.hasChanged()||r.hasQueue())return{};r.setContent(t.sourceCode.text);let n=r.toJSON()||{},s=new e,i=r.getDocument(),o={default:i.getIn(["catalog"])};for(let e of i.getIn(["catalogs"])?.items||[])o[String(e.key)]=e.value;for(let[e,t]of Object.entries(o))if(t)for(let r of t.items)s.set(`${String(r.key)}:${e}`,r);for(let[e,t]of Object.entries(n.overrides||{}))if(t.startsWith("catalog:")){let r=t.slice(8)||"default";s.delete(`${e}:${r}`)}if(0===s.size)return{};let a=Array.from(oz(r)).filter(e=>eD.existsSync(e)).sort(),l=["dependencies","devDependencies","peerDependencies","optionalDependencies","overrides","resolutions","pnpm.overrides"];for(let e of a){let t=JSON.parse(eD.readFileSync(e,"utf-8"));for(let e of l){let r=function(e,t){let r=e;for(let e of t)if(!(r=r[e]))return;return r}(t,e.split("."));if(r)for(let[e,t]of Object.entries(r)){if(!t.startsWith("catalog:"))continue;let r=`${e}:${t.slice(8)||"default"}`;s.delete(r)}}}if(s.size>0)for(let[e,r]of Array.from(s.entries()).sort((e,t)=>e[0].localeCompare(t[0]))){let n=t.sourceCode.getLocFromIndex(r.key.range[0]),s=t.sourceCode.getLocFromIndex(r.value.range.at(-1));t.report({loc:{start:n,end:s},messageId:"unusedCatalogItem",data:{catalogItem:e}})}return{}}}),"yaml-no-duplicate-catalog-item":an,"yaml-no-anonymous-catalog":ar,"yaml-valid-packages":oY({name:"yaml-valid-packages",meta:{type:"problem",docs:{description:"Ensure all package patterns in `pnpm-workspace.yaml` match at least one directory"},schema:[],messages:{noMatch:'Package pattern "{{pattern}}" does not match any directories with a package.json file.',invalidType:"Package pattern must be a string, got {{type}}."}},defaultOptions:[],create(e){if("pnpm-workspace.yaml"!==iR(e.filename))return{};let t=oQ(e);if(!t||iI(t.filepath)!==iI(e.filename)||t.hasChanged()||t.hasQueue())return{};t.setContent(e.sourceCode.text);let r=t.toJSON()||{};if(!r.packages||!Array.isArray(r.packages))return{};let n=t.getDocument().getIn(["packages"]);if(!n)return{};let s=i$(iM(e.filename));for(let t=0;t<r.packages.length;t++){let i=n.items[t];if(!i?.range)continue;let o=r.packages[t];if("string"!=typeof o){as(e,i,"invalidType",{type:typeof o});continue}0===oU(iP(o,"package.json"),{cwd:s,dot:!1,ignore:["**/node_modules/**","**/dist/**","**/build/**"],absolute:!1,expandDirectories:!1,onlyFiles:!0}).length&&as(e,i,"noMatch",{pattern:o})}return{}}}),"yaml-enforce-settings":at,"yaml-blank-lines":o7},ao={meta:{name:"eslint-plugin-pnpm",version:"1.9.1"},rules:{...o4,...ai}},aa=[{name:"pnpm/package.json",files:["package.json","**/package.json"],languageOptions:{parser:tu},plugins:{pnpm:ao},rules:{"pnpm/json-enforce-catalog":"error","pnpm/json-valid-catalog":"error","pnpm/json-prefer-workspace-settings":"error"}}],al=[{name:"pnpm/pnpm-workspace-yaml",files:["pnpm-workspace.yaml"],languageOptions:{parser:s0},plugins:{pnpm:ao},rules:{"pnpm/yaml-no-unused-catalog-item":"error","pnpm/yaml-no-duplicate-catalog-item":"error","pnpm/yaml-valid-packages":"error"}}];function ac(e,t=!1){return"boolean"==typeof e?e:null==e?t:"enable"in e?"boolean"==typeof e.enable?e.enable:t:!ti.isObjectEmpty(e)||t}function au(e,...t){let r;if("boolean"==typeof e||void 0===e)r={};else{let{enable:t,...n}=e;r=n}return t.length?e9.defu(r,...t):r}ao.configs={recommended:[...aa],json:aa,yaml:al};let ap=e=>ej.isPackageExists(e,"string"==typeof __dirname?__dirname:void 0);async function af(e,...t){let r=Date.now(),n=[];await rl("@eslint-sukka/js"),await rl("@eslint-sukka/json"),await rl("@eslint-sukka/ts"),await rl("@eslint-sukka/legacy");let s=ap("@types/node"),i=ac(e?.ts,ap("typescript")||s),o=ap("next"),a=ac(e?.react,o||ap("react")||ap("@types/react"));if(n.push(tN(e?.ignores),[{name:"sukka/eslint-comments",plugins:{"@eslint-community/eslint-comments":eW,sukka:ej.memo(eY,"@eslint-sukka/eslint-plugin-sukka-full"),"vibe-proof":ej.memo(eJ.eslint_plugin_vibe_proof,"eslint-plugin-vibe-proof")},rules:{"@eslint-community/eslint-comments/disable-enable-pair":["error",{allowWholeFile:!0}],"@eslint-community/eslint-comments/no-aggregating-enable":"error","@eslint-community/eslint-comments/no-duplicate-disable":"error","@eslint-community/eslint-comments/no-unlimited-disable":"error","@eslint-community/eslint-comments/no-unused-enable":"error","vibe-proof/ban-eslint-disable":["error","allow-with-description"],"sukka/migrate-vibe-proof-eslint-disable":"error"}}]),ac(e?.stylistic,!0)&&n.push(function({ts:e,react:t}){return[{name:"sukka/stylistic",plugins:{"@stylistic":eH.stylistic_eslint_plugin,sukka:ej.memo(eY,"@eslint-sukka/eslint-plugin-sukka-full")},rules:Object.assign(eV.literal({"no-nested-ternary":"off","@stylistic/dot-location":["error","property"],"@stylistic/no-multi-spaces":["error",{ignoreEOLComments:!1}],"@stylistic/wrap-iife":["error","inside",{functionPrototypeMethods:!1}],"@stylistic/no-extra-parens":["off","all",{conditionalAssign:!0,nestedBinaryExpressions:!1,returnAssign:!1,ignoreJSX:"all",enforceForArrowConditionals:!1}],"@stylistic/arrow-spacing":["error",{before:!0,after:!0}],"@stylistic/generator-star-spacing":["error",{before:!0,after:!1}],"@stylistic/no-confusing-arrow":["error",{allowParens:!0}],"@stylistic/template-curly-spacing":["error","never"],"@stylistic/yield-star-spacing":["error","before"],"@stylistic/array-bracket-newline":["error","consistent"],"@stylistic/array-bracket-spacing":["error","never"],"@stylistic/array-element-newline":["off",{multiline:!0,minItems:5}],"@stylistic/block-spacing":["error","always"],"@stylistic/brace-style":["error","1tbs",{allowSingleLine:!0}],"@stylistic/comma-dangle":["error","never"],"@stylistic/comma-spacing":["error",{before:!1,after:!0}],"@stylistic/comma-style":["error","last",{exceptions:{ArrayExpression:!1,ArrayPattern:!1,ArrowFunctionExpression:!1,CallExpression:!1,FunctionDeclaration:!1,FunctionExpression:!1,ImportDeclaration:!1,ObjectExpression:!1,ObjectPattern:!1,VariableDeclaration:!1,NewExpression:!1}}],"@stylistic/computed-property-spacing":["error","never"],"@stylistic/eol-last":["error","always"],"@stylistic/function-call-spacing":["error","never"],"@stylistic/function-call-argument-newline":["off","consistent"],"@stylistic/function-paren-newline":["error","consistent"],"@stylistic/implicit-arrow-linebreak":["error","beside"],"@stylistic/indent":["error",2,{SwitchCase:1,VariableDeclarator:"first",MemberExpression:1,StaticBlock:{body:1}}],"@stylistic/indent-binary-ops":["error",2],"@stylistic/key-spacing":["error",{beforeColon:!1,afterColon:!0}],"@stylistic/linebreak-style":["error","unix"],"@stylistic/lines-around-comment":"off","@stylistic/lines-around-directive":"off","@stylistic/lines-between-class-members":["error","always",{exceptAfterSingleLine:!0}],"@stylistic/multiline-ternary":["error","always-multiline"],"@stylistic/newline-per-chained-call":["error",{ignoreChainWithDepth:6}],"@stylistic/new-parens":"error","@stylistic/no-mixed-operators":["error",{groups:[["**","+"],["**","-"],["**","*"],["**","/"],["%","+"],["%","-"],["%","*"],["%","/"],["%","**"],["==","!=","===","!==",">",">=","<","<="],["&&","||"],["in","instanceof"]],allowSamePrecedence:!0}],"@stylistic/no-mixed-spaces-and-tabs":"error","@stylistic/no-multiple-empty-lines":["error",{max:1,maxBOF:0,maxEOF:0}],"@stylistic/no-spaced-func":"off","@stylistic/no-tabs":"error","@stylistic/no-trailing-spaces":"error","@stylistic/no-whitespace-before-property":"error","@stylistic/nonblock-statement-body-position":"error","@stylistic/object-curly-newline":["error",{consistent:!0}],"@stylistic/object-curly-spacing":["error","always"],"@stylistic/object-property-newline":"off","@stylistic/one-var-declaration-per-line":"off","@stylistic/operator-linebreak":["error","before",{overrides:{"=":"after"}}],"@stylistic/padded-blocks":["error","never"],"@stylistic/padding-line-between-statements":["error",{blankLine:"always",prev:"directive",next:"*"},{blankLine:"always",prev:"*",next:["class","with"]},{blankLine:"always",prev:["class","with"],next:"*"}],"@stylistic/quotes":["error","single"],"@stylistic/quote-props":["error","as-needed",{keywords:!1,unnecessary:!0,numbers:!1}],"@stylistic/jsx-quotes":["error","prefer-double"],"@stylistic/rest-spread-spacing":["error","never"],"@stylistic/semi":["error","always"],"@stylistic/semi-spacing":["error",{before:!1,after:!0}],"@stylistic/semi-style":["error","last"],"@stylistic/space-before-blocks":"error","@stylistic/space-before-function-paren":["error",{anonymous:"always",named:"never",asyncArrow:"always"}],"@stylistic/space-in-parens":["error","never"],"@stylistic/space-infix-ops":"error","@stylistic/space-unary-ops":["error",{words:!0,nonwords:!1,overrides:{}}],"@stylistic/spaced-comment":["error","always",{line:{exceptions:["-","+"],markers:["=","!","/"]},block:{exceptions:["-","+"],markers:["=","!",":","::"],balanced:!0}}],"@stylistic/switch-colon-spacing":["error",{after:!0,before:!1}],"@stylistic/template-tag-spacing":["error","never"],"@stylistic/wrap-regex":"off","@stylistic/keyword-spacing":["error",{before:!0,after:!0,overrides:{return:{after:!0},throw:{after:!0},case:{after:!0}}}]}),e?eV.literal({"@stylistic/member-delimiter-style":["error",{multiline:{delimiter:"comma",requireLast:!1},singleline:{delimiter:"comma",requireLast:!1}}],"@stylistic/lines-between-class-members":["error","always",{exceptAfterSingleLine:!0,exceptAfterOverload:!0}],"@stylistic/padding-line-between-statements":["error",{blankLine:"always",prev:"directive",next:"*"},{blankLine:"always",prev:"*",next:["class","with"]},{blankLine:"always",prev:["class","with"],next:"*"},{blankLine:"any",prev:["interface","type"],next:["interface","type"]}],"@stylistic/type-annotation-spacing":"error","@stylistic/arrow-spacing":["error",{before:!0,after:!0}],"@stylistic/type-generic-spacing":"error","@stylistic/type-named-tuple-spacing":"error"}):{},t?eV.literal({"@stylistic/jsx-pascal-case":["error",{allowAllCaps:!0,ignore:[]}],"@stylistic/jsx-curly-spacing":["error","never",{allowMultiline:!0}],"@stylistic/jsx-indent-props":["error",2],"@stylistic/jsx-max-props-per-line":["error",{maximum:1,when:"multiline"}],"@stylistic/jsx-wrap-multilines":["error",{declaration:"parens-new-line",assignment:"parens-new-line",return:"parens-new-line",arrow:"parens-new-line",condition:"ignore",logical:"ignore",prop:"ignore"}],"@stylistic/jsx-first-prop-new-line":["error","multiline-multiprop"],"@stylistic/jsx-function-call-newline":["error","multiline"],"@stylistic/jsx-equals-spacing":["error","never"],"@stylistic/jsx-indent":"off","@stylistic/jsx-child-element-spacing":"error","@stylistic/jsx-closing-bracket-location":["error","line-aligned"],"@stylistic/jsx-tag-spacing":["error",{closingSlash:"never",beforeSelfClosing:"always",afterOpening:"never",beforeClosing:"never"}],"@stylistic/jsx-curly-brace-presence":["error",{props:"never",children:"never"}],"@stylistic/jsx-self-closing-comp":"error","@stylistic/jsx-curly-newline":["error",{multiline:"consistent",singleline:"consistent"}]}):{})},ej.UNSAFE_excludeJsonYamlFiles(eY.configs.stylistic_unicorn)]}({ts:i,react:a})),ac(e?.js,!0)&&n.push(rr(au(e?.js)),function({typescript:e}){return[ej.UNSAFE_excludeJsonYamlFiles({name:"sukka/promise",plugins:{promise:eG},rules:{"promise/always-return":e?"off":["error",{ignoreLastCallback:!0}],"promise/no-return-wrap":"error","promise/param-names":"error","promise/catch-or-return":["error",{allowFinally:!0,terminationMethod:["catch","asCallback","finally"]}],"promise/no-native":"off","promise/no-nesting":"warn","promise/no-promise-in-callback":"warn","promise/no-callback-in-promise":"warn","promise/avoid-new":"off","promise/no-new-statics":"error","promise/no-return-in-finally":"warn","promise/valid-params":"warn","promise/prefer-catch":"error"}})]}({typescript:i}),tL()),ac(e?.yaml,ej.isDirectDependency("yaml")||ej.isDirectDependency("js-yaml"))&&n.push((await ra("@eslint-sukka/yaml")).yaml()),ac(e?.json,!0)&&n.push(rn()),i){let t=e?.isInEditor??(!(e6.isCI||process.env.CI||process.env.GIT_PARAMS||process.env.VSCODE_GIT_COMMAND||process.env.npm_lifecycle_script?.startsWith("lint-staged"))&&!!(process.env.VSCODE_PID||process.env.VSCODE_CWD||process.env.JETBRAINS_IDE||process.env.VIM||process.env.NVIM));n.push(function(e){let{allowJs:t=!1,tsconfigPath:r=!0,tsconfigRootDir:n=eR.cwd(),componentExtensions:s=[],isInEditor:i=!1,allowDefaultProject:o=["next.config.ts","rollup.config.ts","webpack.config.ts"]}=e,a="string"==typeof __dirname?__dirname:void 0,l=ej.packageResolver.sync(a,"@typescript-eslint/parser"),c=eq.nullthrow(l.path,"[eslint-config-sukka#ts] Expect @typescript-eslint/parser to exist"),u=[ej.constants.GLOB_TS,ej.constants.GLOB_TSX,...s.map(e=>`**/*.${e}`),...t?[ej.constants.GLOB_JS]:[]];return[{name:"@eslint-sukka/ts base",files:u,plugins:{"@typescript-eslint":ej.asPlugin(e1),"import-x":ez,"unused-imports":ej.memo(eQ,"eslint-plugin-unused-imports")},languageOptions:{parser:e2,sourceType:"module",parserOptions:{sourceType:"module",ecmaVersion:"latest",...!0===r?{projectService:{allowDefaultProject:o,loadTypeScriptPlugins:i}}:{project:r},tsconfigRootDir:n,ecmaFeatures:{jsx:!0},jsxPragma:void 0,warnOnUnsupportedTypeScriptVersion:!0}},settings:{"import-x/extensions":ro,"import-x/external-module-folders":["node_modules","node_modules/@types"],"import-x/resolver-next":[e3.createTypeScriptImportResolver()],"import-x/parsers":{[c]:ri}},rules:{...e0.configs.base.rules,...ej.collectRules([...e0.configs.recommendedTypeChecked,...e0.configs.stylisticTypeChecked]),...ez.configs.typescript.rules,...rs,"@typescript-eslint/ban-ts-comment":["error",{"ts-expect-error":"allow-with-description","ts-ignore":!0,"ts-nocheck":!0,"ts-check":!1,minimumDescriptionLength:10}],"@typescript-eslint/naming-convention":["warn",{selector:"variable",format:["camelCase","PascalCase","UPPER_CASE","snake_case"],leadingUnderscore:"allowSingleOrDouble",trailingUnderscore:"allowSingleOrDouble"},{selector:"function",format:["camelCase","PascalCase"],leadingUnderscore:"allowSingleOrDouble",trailingUnderscore:"allowSingleOrDouble"},{selector:"typeLike",format:["PascalCase"],leadingUnderscore:"allowSingleOrDouble",trailingUnderscore:"allowSingleOrDouble"}],"@typescript-eslint/consistent-type-assertions":["error",{assertionStyle:"as",objectLiteralTypeAssertions:"allow"}],"@typescript-eslint/no-unnecessary-type-conversion":"error","@typescript-eslint/require-await":"error","@typescript-eslint/await-thenable":"error","@typescript-eslint/no-for-in-array":"error","@typescript-eslint/no-misused-promises":["error",{checksVoidReturn:!1}],"@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0,allowAny:!0,allowBoolean:!0,allowNever:!0}],"@typescript-eslint/unbound-method":"error","@typescript-eslint/consistent-type-imports":["warn",{prefer:"type-imports",disallowTypeAnnotations:!1,fixStyle:"separate-type-imports"}],"@typescript-eslint/no-import-type-side-effects":"warn","@typescript-eslint/consistent-type-exports":["warn",{fixMixedExportsWithInlineTypeSpecifier:!0}],"@typescript-eslint/consistent-type-definitions":"warn","@typescript-eslint/consistent-generic-constructors":["error","constructor"],"@typescript-eslint/no-base-to-string":["error",{ignoredTypeNames:["Error","RegExp","URL","URLSearchParams"]}],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-extraneous-class":["warn",{allowConstructorOnly:!0,allowEmpty:!0,allowWithDecorator:!0}],"@typescript-eslint/no-invalid-void-type":["off",{allowInGenericTypeArguments:!0,allowAsThisParameter:!0}],"@typescript-eslint/no-non-null-asserted-nullish-coalescing":"error","@typescript-eslint/no-unnecessary-boolean-literal-compare":"error","@typescript-eslint/no-unnecessary-condition":["warn",{allowConstantLoopConditions:!0}],"@typescript-eslint/no-unnecessary-type-arguments":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/non-nullable-type-assertion-style":"error","@typescript-eslint/prefer-includes":"error","@typescript-eslint/prefer-literal-enum-member":["error",{allowBitwiseExpressions:!0}],"@typescript-eslint/prefer-nullish-coalescing":"off","@typescript-eslint/prefer-return-this-type":"error","@typescript-eslint/prefer-optional-chain":"error","@typescript-eslint/prefer-reduce-type-parameter":"error","@typescript-eslint/unified-signatures":["error",{ignoreDifferentlyNamedParameters:!0}],"@typescript-eslint/prefer-for-of":"off","@typescript-eslint/prefer-function-type":"off","@typescript-eslint/consistent-indexed-object-style":"off","@typescript-eslint/prefer-enum-initializers":"warn","@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-meaningless-void-operator":"warn","@typescript-eslint/no-unnecessary-qualifier":"warn","@typescript-eslint/array-type":["warn",{default:"array-simple"}],"no-restricted-imports":["error",{paths:ej.RESTRICTED_IMPORT}],"@typescript-eslint/no-empty-object-type":["error",{allowInterfaces:"with-single-extends",allowObjectTypes:"never",allowWithName:"Props$"}],"@typescript-eslint/no-unsafe-function-type":"warn","@typescript-eslint/no-restricted-types":["error",{types:{FC:{message:"To declare a component, you don't have to use FC to annotate it. To type something that accepts/is a React Component, use ComponentType<T>.",fixWith:"ComponentType"},"React.FC":{message:"To declare a component, simply use single object parameter that returns React.ReactNode. To type something that accepts/is a React Component, use React.ComponentType<T>.",fixWith:"React.ComponentType"},ReactElement:{message:"In most cases, you want ReactNode. Only ignore this rule when you working with cloneElement.",fixWith:"ReactNode"},"React.ReactElement":{message:"In most cases, you want React.ReactNode. Only ignore this rule when you are working with cloneElement.",fixWith:"React.ReactNode"}}}],"@typescript-eslint/no-unsafe-assignment":"off","@typescript-eslint/no-unsafe-argument":"off","@typescript-eslint/no-unsafe-return":"off","@typescript-eslint/no-unsafe-call":"off","@typescript-eslint/no-unsafe-member-access":"off","@typescript-eslint/no-explicit-any":"warn","no-loop-func":"warn","@typescript-eslint/no-redundant-type-constituents":"off","@typescript-eslint/no-floating-promises":"off","@typescript-eslint/no-unsafe-enum-comparison":"error","@typescript-eslint/prefer-regexp-exec":"warn","@typescript-eslint/no-deprecated":"warn","@typescript-eslint/no-unnecessary-template-expression":"warn","@typescript-eslint/prefer-readonly":"error","@typescript-eslint/class-literal-property-style":"error","@typescript-eslint/no-useless-default-assignment":"warn","@typescript-eslint/no-unsafe-enum-assignment":"error","@typescript-eslint/class-methods-use-this":["error",{exceptMethods:[],ignoreClassesThatImplementAnInterface:"public-fields"}],"no-restricted-syntax":["error",...ej.RESTRICTED_SYNTAX,{message:'Unnecessary "as const"',selector:"VariableDeclarator > TSAsExpression[expression.properties.length=0] > TSTypeReference > Identifier[name=const]"},{message:'Unnecessary "as const"',selector:"VariableDeclarator[id.typeAnnotation] > TSAsExpression > TSTypeReference > Identifier[name=const]"},{message:'Static class methods requires "this: void", or change to arrow function',selector:'MethodDefinition[static=true][kind!="get"][kind!="set"] > FunctionExpression:not([params.0.name=this][params.0.typeAnnotation.typeAnnotation.type=TSVoidKeyword])'},{message:'Public "static" fields should be read-only',selector:'PropertyDefinition[readonly!=true][static=true][accessibility!="private"][accessibility!="protected"]'},{message:"Construct signature should be first",selector:"TSInterfaceBody > :not(TSConstructSignatureDeclaration) ~ TSConstructSignatureDeclaration"},{message:"Call signature should be first",selector:"TSInterfaceBody > :not(TSCallSignatureDeclaration, TSConstructSignatureDeclaration) ~ TSCallSignatureDeclaration"},...e["~_internal_react_enabled_do_not_use_or_you_will_be_fired"]?[{selector:"JSXAttribute[name.name='ref'][value.type='Literal']",message:"[Deprecated] Use callback refs instead."},{selector:"AssignmentExpression[operator='='][left.property.name='propTypes']",message:"[Deprecated] Use TypeScript or another type-checking solution instead."},{selector:"AssignmentExpression[operator='='][left.property.name='defaultProps']",message:"[Deprecated] Use ES6 default parameters instead."},{selector:"ImportDeclaration[importKind='type'][source.value='react']:has(ImportSpecifier)",message:"Use React UMD global types (e.g. React.ReactNode) instead of named type imports from 'react'."}]:[]],"@typescript-eslint/no-namespace":"off","@typescript-eslint/prefer-string-starts-ends-with":["error",{allowSingleElementEquality:"always"}],"@typescript-eslint/switch-exhaustiveness-check":["error",{allowDefaultCaseForExhaustiveSwitch:!0,considerDefaultExhaustiveForUnions:!0}],"@typescript-eslint/parameter-properties":["warn",{prefer:"parameter-property"}],"no-throw-literal":"off","@typescript-eslint/only-throw-error":["error",{allowRethrowing:!0,allowThrowingAny:!0,allowThrowingUnknown:!0}],"@typescript-eslint/no-unused-vars":"off","unused-imports/no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0}],"unused-imports/no-unused-imports":i?"error":"off","import-x/consistent-type-specifier-style":["error","prefer-top-level"],"import-x/named":"off","import-x/namespace":"off","import-x/default":"off","import-x/no-named-as-default-member":"off","import-x/no-deprecated":"off"}},ej.withFiles(eY.configs.recommended_extra_with_typed_lint,u),ej.withFiles(ej.asFlatConfig(eJ.eslint_plugin_vibe_proof.configs.common_type_checked),u),{name:"@eslint-sukka/ts dts",files:["**/*.d.ts"],plugins:{"import-x":ez},rules:{"import-x/no-duplicates":"off","unused-imports/no-unused-vars":"off","unused-imports/no-unused-imports":"off"}},{name:"@eslint-sukka/ts jest/mocha",files:["**/*.{test,spec}.ts?(x)"],rules:{"no-unused-expressions":"off"}},{name:"@eslint-sukka/ts commonjs",files:["**/*.js","**/*.cjs"],plugins:{"@typescript-eslint":ej.asPlugin(e1)},rules:{"@typescript-eslint/no-require-imports":"off"}}]}({isInEditor:t,...au(e?.ts),"~_internal_react_enabled_do_not_use_or_you_will_be_fired":a}))}if(a)if(i){let t=await ra("@eslint-sukka/react"),r=ap("@remix-run/node")||ap("@remix-run/react")||ap("@remix-run/serve")||ap("@remix-run/dev");n.push(t.react(au(e?.react,{nextjs:o,remix:r,reactRefresh:{allowConstantExport:ap("vite")}}))),ac(e?.next,o)&&n.push(t.next()),ac(e?.stylex,ap("@stylexjs/stylex")||ap("stylex-webpack"))&&n.push(t.stylex(au(e?.stylex)))}else console.warn("[eslint-config-sukka] React preset will not be enabled when TypeScript is missing.");ac(e?.node,s||ap("@types/bun"))&&n.push((await ra("@eslint-sukka/node")).node({...au(e?.node),hasTypeScript:i,hasReact:a})),ac(e?.legacy)&&n.push(function(e={}){return[{name:"@eslint-sukka/legacy base",...e.files&&{files:e.files},rules:{"prefer-numeric-literals":"off","no-restricted-properties":["error",{object:"arguments",property:"callee",message:"arguments.callee is deprecated"},{property:"__defineGetter__",message:"Please use Object.defineProperty instead."},{property:"__defineSetter__",message:"Please use Object.defineProperty instead."}],"no-var":"off","prefer-object-spread":"off",strict:["error","safe"],"sukka/unicorn/prefer-default-parameters":"off","sukka/unicorn/prefer-logical-operator-over-ternary":"off","sukka/unicorn/prefer-optional-catch-binding":"off","sukka/unicorn/prefer-abort-signal-timeout":"off","sukka/unicorn/prefer-aggregate-error":"off","sukka/unicorn/prefer-observer-apis":"off","sukka/unicorn/prefer-set-methods":"off"},languageOptions:{globals:{...(e.browser??!0)&&ej.globals.browser,...(e.node??!1)&&ej.globals.node}}}]}(au(e?.legacy))),ac(e?.pnpm,!0)&&n.push([{name:"@eslint-sukka pnpm/package.json",files:["**/package.json"],languageOptions:{parser:tu},plugins:{pnpm:ao},rules:{"pnpm/json-enforce-catalog":"off","pnpm/json-valid-catalog":"error","pnpm/json-prefer-workspace-settings":"error","pnpm/yaml-no-duplicate-catalog-item":["error",{checkDuplicates:"exact-version"}],"pnpm/yaml-no-unused-catalog-item":"error","pnpm/yaml-valid-packages":"error"}}]),n.push(t);let l=(await Promise.all(n)).flat();return process.env.TIMING&&console.log(`[eslint-config-sukka] Timing: ${Date.now()-r}ms`),l}exports.constants=ej.constants,exports.ignores=tN,exports.sukka=af;