faf-cli 7.10.1 → 7.12.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.js CHANGED
@@ -1,146 +1,146 @@
1
- import{createRequire as k4}from"node:module";var h4=Object.defineProperty;var F=($,Z)=>()=>(Z||$((Z={exports:{}}).exports,Z),Z.exports);var y4=($)=>$;function v4($,Z){this[$]=y4.bind(null,Z)}var f4=($,Z)=>{for(var Q in Z)h4($,Q,{get:Z[Q],enumerable:!0,configurable:!0,set:v4.bind(Z,Q)})};var t0=k4(import.meta.url);var w=F((J5)=>{var H$=Symbol.for("yaml.alias"),$6=Symbol.for("yaml.document"),i1=Symbol.for("yaml.map"),Z6=Symbol.for("yaml.pair"),U$=Symbol.for("yaml.scalar"),r1=Symbol.for("yaml.seq"),Q0=Symbol.for("yaml.node.type"),t4=($)=>!!$&&typeof $==="object"&&$[Q0]===H$,e4=($)=>!!$&&typeof $==="object"&&$[Q0]===$6,$5=($)=>!!$&&typeof $==="object"&&$[Q0]===i1,Z5=($)=>!!$&&typeof $==="object"&&$[Q0]===Z6,Q6=($)=>!!$&&typeof $==="object"&&$[Q0]===U$,Q5=($)=>!!$&&typeof $==="object"&&$[Q0]===r1;function X6($){if($&&typeof $==="object")switch($[Q0]){case i1:case r1:return!0}return!1}function X5($){if($&&typeof $==="object")switch($[Q0]){case H$:case i1:case U$:case r1:return!0}return!1}var z5=($)=>(Q6($)||X6($))&&!!$.anchor;J5.ALIAS=H$;J5.DOC=$6;J5.MAP=i1;J5.NODE_TYPE=Q0;J5.PAIR=Z6;J5.SCALAR=U$;J5.SEQ=r1;J5.hasAnchor=z5;J5.isAlias=t4;J5.isCollection=X6;J5.isDocument=e4;J5.isMap=$5;J5.isNode=X5;J5.isPair=Z5;J5.isScalar=Q6;J5.isSeq=Q5});var X1=F((F5)=>{var y=w(),u=Symbol("break visit"),z6=Symbol("skip children"),o=Symbol("remove node");function a1($,Z){let Q=J6(Z);if(y.isDocument($)){if(x0(null,$.contents,Q,Object.freeze([$]))===o)$.contents=null}else x0(null,$,Q,Object.freeze([]))}a1.BREAK=u;a1.SKIP=z6;a1.REMOVE=o;function x0($,Z,Q,X){let z=H6($,Z,Q,X);if(y.isNode(z)||y.isPair(z))return U6($,X,z),x0($,z,Q,X);if(typeof z!=="symbol"){if(y.isCollection(Z)){X=Object.freeze(X.concat(Z));for(let J=0;J<Z.items.length;++J){let H=x0(J,Z.items[J],Q,X);if(typeof H==="number")J=H-1;else if(H===u)return u;else if(H===o)Z.items.splice(J,1),J-=1}}else if(y.isPair(Z)){X=Object.freeze(X.concat(Z));let J=x0("key",Z.key,Q,X);if(J===u)return u;else if(J===o)Z.key=null;let H=x0("value",Z.value,Q,X);if(H===u)return u;else if(H===o)Z.value=null}}return z}async function n1($,Z){let Q=J6(Z);if(y.isDocument($)){if(await g0(null,$.contents,Q,Object.freeze([$]))===o)$.contents=null}else await g0(null,$,Q,Object.freeze([]))}n1.BREAK=u;n1.SKIP=z6;n1.REMOVE=o;async function g0($,Z,Q,X){let z=await H6($,Z,Q,X);if(y.isNode(z)||y.isPair(z))return U6($,X,z),g0($,z,Q,X);if(typeof z!=="symbol"){if(y.isCollection(Z)){X=Object.freeze(X.concat(Z));for(let J=0;J<Z.items.length;++J){let H=await g0(J,Z.items[J],Q,X);if(typeof H==="number")J=H-1;else if(H===u)return u;else if(H===o)Z.items.splice(J,1),J-=1}}else if(y.isPair(Z)){X=Object.freeze(X.concat(Z));let J=await g0("key",Z.key,Q,X);if(J===u)return u;else if(J===o)Z.key=null;let H=await g0("value",Z.value,Q,X);if(H===u)return u;else if(H===o)Z.value=null}}return z}function J6($){if(typeof $==="object"&&($.Collection||$.Node||$.Value))return Object.assign({Alias:$.Node,Map:$.Node,Scalar:$.Node,Seq:$.Node},$.Value&&{Map:$.Value,Scalar:$.Value,Seq:$.Value},$.Collection&&{Map:$.Collection,Seq:$.Collection},$);return $}function H6($,Z,Q,X){if(typeof Q==="function")return Q($,Z,X);if(y.isMap(Z))return Q.Map?.($,Z,X);if(y.isSeq(Z))return Q.Seq?.($,Z,X);if(y.isPair(Z))return Q.Pair?.($,Z,X);if(y.isScalar(Z))return Q.Scalar?.($,Z,X);if(y.isAlias(Z))return Q.Alias?.($,Z,X);return}function U6($,Z,Q){let X=Z[Z.length-1];if(y.isCollection(X))X.items[$]=Q;else if(y.isPair(X))if($==="key")X.key=Q;else X.value=Q;else if(y.isDocument(X))X.contents=Q;else{let z=y.isAlias(X)?"alias":"scalar";throw Error(`Cannot replace node with ${z} parent`)}}F5.visit=a1;F5.visitAsync=n1});var q$=F((w5)=>{var q6=w(),P5=X1(),T5={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},C5=($)=>$.replace(/[!,[\]{}]/g,(Z)=>T5[Z]);class m{constructor($,Z){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},m.defaultYaml,$),this.tags=Object.assign({},m.defaultTags,Z)}clone(){let $=new m(this.yaml,this.tags);return $.docStart=this.docStart,$}atDocument(){let $=new m(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:m.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},m.defaultTags);break}return $}add($,Z){if(this.atNextDocument)this.yaml={explicit:m.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},m.defaultTags),this.atNextDocument=!1;let Q=$.trim().split(/[ \t]+/),X=Q.shift();switch(X){case"%TAG":{if(Q.length!==2){if(Z(0,"%TAG directive should contain exactly two parts"),Q.length<2)return!1}let[z,J]=Q;return this.tags[z]=J,!0}case"%YAML":{if(this.yaml.explicit=!0,Q.length!==1)return Z(0,"%YAML directive should contain exactly one part"),!1;let[z]=Q;if(z==="1.1"||z==="1.2")return this.yaml.version=z,!0;else{let J=/^\d+\.\d+$/.test(z);return Z(6,`Unsupported YAML version ${z}`,J),!1}}default:return Z(0,`Unknown directive ${X}`,!0),!1}}tagName($,Z){if($==="!")return"!";if($[0]!=="!")return Z(`Not a valid tag: ${$}`),null;if($[1]==="<"){let J=$.slice(2,-1);if(J==="!"||J==="!!")return Z(`Verbatim tags aren't resolved, so ${$} is invalid.`),null;if($[$.length-1]!==">")Z("Verbatim tags must end with a >");return J}let[,Q,X]=$.match(/^(.*!)([^!]*)$/s);if(!X)Z(`The ${$} tag has no suffix`);let z=this.tags[Q];if(z)try{return z+decodeURIComponent(X)}catch(J){return Z(String(J)),null}if(Q==="!")return $;return Z(`Could not resolve tag: ${$}`),null}tagString($){for(let[Z,Q]of Object.entries(this.tags))if($.startsWith(Q))return Z+C5($.substring(Q.length));return $[0]==="!"?$:`!<${$}>`}toString($){let Z=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],Q=Object.entries(this.tags),X;if($&&Q.length>0&&q6.isNode($.contents)){let z={};P5.visit($.contents,(J,H)=>{if(q6.isNode(H)&&H.tag)z[H.tag]=!0}),X=Object.keys(z)}else X=[];for(let[z,J]of Q){if(z==="!!"&&J==="tag:yaml.org,2002:")continue;if(!$||X.some((H)=>H.startsWith(J)))Z.push(`%TAG ${z} ${J}`)}return Z.join(`
2
- `)}}m.defaultYaml={explicit:!1,version:"1.2"};m.defaultTags={"!!":"tag:yaml.org,2002:"};w5.Directives=m});var s1=F((x5)=>{var Y6=w(),E5=X1();function S5($){if(/[\x00-\x19\s,[\]{}]/.test($)){let Q=`Anchor must not contain whitespace or control characters: ${JSON.stringify($)}`;throw Error(Q)}return!0}function B6($){let Z=new Set;return E5.visit($,{Value(Q,X){if(X.anchor)Z.add(X.anchor)}}),Z}function G6($,Z){for(let Q=1;;++Q){let X=`${$}${Q}`;if(!Z.has(X))return X}}function j5($,Z){let Q=[],X=new Map,z=null;return{onAnchor:(J)=>{Q.push(J),z??(z=B6($));let H=G6(Z,z);return z.add(H),H},setAnchors:()=>{for(let J of Q){let H=X.get(J);if(typeof H==="object"&&H.anchor&&(Y6.isScalar(H.node)||Y6.isCollection(H.node)))H.node.anchor=H.anchor;else{let U=Error("Failed to resolve repeated object (this should not happen)");throw U.source=J,U}}},sourceObjects:X}}x5.anchorIsValid=S5;x5.anchorNames=B6;x5.createNodeAnchors=j5;x5.findNewAnchor=G6});var Y$=F((f5)=>{function z1($,Z,Q,X){if(X&&typeof X==="object")if(Array.isArray(X))for(let z=0,J=X.length;z<J;++z){let H=X[z],U=z1($,X,String(z),H);if(U===void 0)delete X[z];else if(U!==H)X[z]=U}else if(X instanceof Map)for(let z of Array.from(X.keys())){let J=X.get(z),H=z1($,X,z,J);if(H===void 0)X.delete(z);else if(H!==J)X.set(z,H)}else if(X instanceof Set)for(let z of Array.from(X)){let J=z1($,X,z,z);if(J===void 0)X.delete(z);else if(J!==z)X.delete(z),X.add(J)}else for(let[z,J]of Object.entries(X)){let H=z1($,X,z,J);if(H===void 0)delete X[z];else if(H!==J)X[z]=H}return $.call(Z,Q,X)}f5.applyReviver=z1});var H0=F((m5)=>{var u5=w();function V6($,Z,Q){if(Array.isArray($))return $.map((X,z)=>V6(X,String(z),Q));if($&&typeof $.toJSON==="function"){if(!Q||!u5.hasAnchor($))return $.toJSON(Z,Q);let X={aliasCount:0,count:1,res:void 0};Q.anchors.set($,X),Q.onCreate=(J)=>{X.res=J,delete Q.onCreate};let z=$.toJSON(Z,Q);if(Q.onCreate)Q.onCreate(z);return z}if(typeof $==="bigint"&&!Q?.keep)return Number($);return $}m5.toJS=V6});var o1=F((c5)=>{var p5=Y$(),W6=w(),d5=H0();class _6{constructor($){Object.defineProperty(this,W6.NODE_TYPE,{value:$})}clone(){let $=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)$.range=this.range.slice();return $}toJS($,{mapAsMap:Z,maxAliasCount:Q,onAnchor:X,reviver:z}={}){if(!W6.isDocument($))throw TypeError("A document argument is required");let J={anchors:new Map,doc:$,keep:!0,mapAsMap:Z===!0,mapKeyWarned:!1,maxAliasCount:typeof Q==="number"?Q:100},H=d5.toJS(this,"",J);if(typeof X==="function")for(let{count:U,res:q}of J.anchors.values())X(q,U);return typeof z==="function"?p5.applyReviver(z,{"":H},"",H):H}}c5.NodeBase=_6});var J1=F((o5)=>{var r5=s1(),a5=X1(),h0=w(),n5=o1(),s5=H0();class O6 extends n5.NodeBase{constructor($){super(h0.ALIAS);this.source=$,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve($,Z){if(Z?.maxAliasCount===0)throw ReferenceError("Alias resolution is disabled");let Q;if(Z?.aliasResolveCache)Q=Z.aliasResolveCache;else if(Q=[],a5.visit($,{Node:(z,J)=>{if(h0.isAlias(J)||h0.hasAnchor(J))Q.push(J)}}),Z)Z.aliasResolveCache=Q;let X=void 0;for(let z of Q){if(z===this)break;if(z.anchor===this.source)X=z}return X}toJSON($,Z){if(!Z)return{source:this.source};let{anchors:Q,doc:X,maxAliasCount:z}=Z,J=this.resolve(X,Z);if(!J){let U=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(U)}let H=Q.get(J);if(!H)s5.toJS(J,null,Z),H=Q.get(J);if(H?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(z>=0){if(H.count+=1,H.aliasCount===0)H.aliasCount=t1(X,J,Q);if(H.count*H.aliasCount>z)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return H.res}toString($,Z,Q){let X=`*${this.source}`;if($){if(r5.anchorIsValid(this.source),$.options.verifyAliasOrder&&!$.anchors.has(this.source)){let z=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(z)}if($.implicitKey)return`${X} `}return X}}function t1($,Z,Q){if(h0.isAlias(Z)){let X=Z.resolve($),z=Q&&X&&Q.get(X);return z?z.count*z.aliasCount:0}else if(h0.isCollection(Z)){let X=0;for(let z of Z.items){let J=t1($,z,Q);if(J>X)X=J}return X}else if(h0.isPair(Z)){let X=t1($,Z.key,Q),z=t1($,Z.value,Q);return Math.max(X,z)}return 1}o5.Alias=O6});var h=F((X3)=>{var e5=w(),$3=o1(),Z3=H0(),Q3=($)=>!$||typeof $!=="function"&&typeof $!=="object";class M0 extends $3.NodeBase{constructor($){super(e5.SCALAR);this.value=$}toJSON($,Z){return Z?.keep?this.value:Z3.toJS(this.value,$,Z)}toString(){return String(this.value)}}M0.BLOCK_FOLDED="BLOCK_FOLDED";M0.BLOCK_LITERAL="BLOCK_LITERAL";M0.PLAIN="PLAIN";M0.QUOTE_DOUBLE="QUOTE_DOUBLE";M0.QUOTE_SINGLE="QUOTE_SINGLE";X3.Scalar=M0;X3.isScalarValue=Q3});var H1=F((B3)=>{var H3=J1(),L0=w(),D6=h(),U3="tag:yaml.org,2002:";function q3($,Z,Q){if(Z){let X=Q.filter((J)=>J.tag===Z),z=X.find((J)=>!J.format)??X[0];if(!z)throw Error(`Tag ${Z} not found`);return z}return Q.find((X)=>X.identify?.($)&&!X.format)}function Y3($,Z,Q){if(L0.isDocument($))$=$.contents;if(L0.isNode($))return $;if(L0.isPair($)){let G=Q.schema[L0.MAP].createNode?.(Q.schema,null,Q);return G.items.push($),G}if($ instanceof String||$ instanceof Number||$ instanceof Boolean||typeof BigInt<"u"&&$ instanceof BigInt)$=$.valueOf();let{aliasDuplicateObjects:X,onAnchor:z,onTagObj:J,schema:H,sourceObjects:U}=Q,q=void 0;if(X&&$&&typeof $==="object")if(q=U.get($),q)return q.anchor??(q.anchor=z($)),new H3.Alias(q.anchor);else q={anchor:null,node:null},U.set($,q);if(Z?.startsWith("!!"))Z=U3+Z.slice(2);let Y=q3($,Z,H.tags);if(!Y){if($&&typeof $.toJSON==="function")$=$.toJSON();if(!$||typeof $!=="object"){let G=new D6.Scalar($);if(q)q.node=G;return G}Y=$ instanceof Map?H[L0.MAP]:(Symbol.iterator in Object($))?H[L0.SEQ]:H[L0.MAP]}if(J)J(Y),delete Q.onTagObj;let B=Y?.createNode?Y.createNode(Q.schema,$,Q):typeof Y?.nodeClass?.from==="function"?Y.nodeClass.from(Q.schema,$,Q):new D6.Scalar($);if(Z)B.tag=Z;else if(!Y.default)B.tag=Y.tag;if(q)q.node=B;return B}B3.createNode=Y3});var e1=F((_3)=>{var V3=H1(),t=w(),W3=o1();function B$($,Z,Q){let X=Q;for(let z=Z.length-1;z>=0;--z){let J=Z[z];if(typeof J==="number"&&Number.isInteger(J)&&J>=0){let H=[];H[J]=X,X=H}else X=new Map([[J,X]])}return V3.createNode(X,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:$,sourceObjects:new Map})}var I6=($)=>$==null||typeof $==="object"&&!!$[Symbol.iterator]().next().done;class K6 extends W3.NodeBase{constructor($,Z){super($);Object.defineProperty(this,"schema",{value:Z,configurable:!0,enumerable:!1,writable:!0})}clone($){let Z=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if($)Z.schema=$;if(Z.items=Z.items.map((Q)=>t.isNode(Q)||t.isPair(Q)?Q.clone($):Q),this.range)Z.range=this.range.slice();return Z}addIn($,Z){if(I6($))this.add(Z);else{let[Q,...X]=$,z=this.get(Q,!0);if(t.isCollection(z))z.addIn(X,Z);else if(z===void 0&&this.schema)this.set(Q,B$(this.schema,X,Z));else throw Error(`Expected YAML collection at ${Q}. Remaining path: ${X}`)}}deleteIn($){let[Z,...Q]=$;if(Q.length===0)return this.delete(Z);let X=this.get(Z,!0);if(t.isCollection(X))return X.deleteIn(Q);else throw Error(`Expected YAML collection at ${Z}. Remaining path: ${Q}`)}getIn($,Z){let[Q,...X]=$,z=this.get(Q,!0);if(X.length===0)return!Z&&t.isScalar(z)?z.value:z;else return t.isCollection(z)?z.getIn(X,Z):void 0}hasAllNullValues($){return this.items.every((Z)=>{if(!t.isPair(Z))return!1;let Q=Z.value;return Q==null||$&&t.isScalar(Q)&&Q.value==null&&!Q.commentBefore&&!Q.comment&&!Q.tag})}hasIn($){let[Z,...Q]=$;if(Q.length===0)return this.has(Z);let X=this.get(Z,!0);return t.isCollection(X)?X.hasIn(Q):!1}setIn($,Z){let[Q,...X]=$;if(X.length===0)this.set(Q,Z);else{let z=this.get(Q,!0);if(t.isCollection(z))z.setIn(X,Z);else if(z===void 0&&this.schema)this.set(Q,B$(this.schema,X,Z));else throw Error(`Expected YAML collection at ${Q}. Remaining path: ${X}`)}}}_3.Collection=K6;_3.collectionFromPath=B$;_3.isEmptyPath=I6});var U1=F((L3)=>{var K3=($)=>$.replace(/^(?!$)(?: $)?/gm,"#");function G$($,Z){if(/^\n+$/.test($))return $.substring(1);return Z?$.replace(/^(?! *$)/gm,Z):$}var M3=($,Z,Q)=>$.endsWith(`
3
- `)?G$(Q,Z):Q.includes(`
1
+ import{createRequire as _4}from"node:module";var G4=Object.defineProperty;var P=($,Z)=>()=>(Z||$((Z={exports:{}}).exports,Z),Z.exports);var V4=($)=>$;function B4($,Z){this[$]=V4.bind(null,Z)}var W4=($,Z)=>{for(var Q in Z)G4($,Q,{get:Z[Q],enumerable:!0,configurable:!0,set:B4.bind(Z,Q)})};var H2=_4(import.meta.url);var j=P((g4)=>{var K$=Symbol.for("yaml.alias"),I6=Symbol.for("yaml.document"),$1=Symbol.for("yaml.map"),K6=Symbol.for("yaml.pair"),L$=Symbol.for("yaml.scalar"),Z1=Symbol.for("yaml.seq"),G0=Symbol.for("yaml.node.type"),w4=($)=>!!$&&typeof $==="object"&&$[G0]===K$,C4=($)=>!!$&&typeof $==="object"&&$[G0]===I6,b4=($)=>!!$&&typeof $==="object"&&$[G0]===$1,E4=($)=>!!$&&typeof $==="object"&&$[G0]===K6,L6=($)=>!!$&&typeof $==="object"&&$[G0]===L$,j4=($)=>!!$&&typeof $==="object"&&$[G0]===Z1;function R6($){if($&&typeof $==="object")switch($[G0]){case $1:case Z1:return!0}return!1}function S4($){if($&&typeof $==="object")switch($[G0]){case K$:case $1:case L$:case Z1:return!0}return!1}var x4=($)=>(L6($)||R6($))&&!!$.anchor;g4.ALIAS=K$;g4.DOC=I6;g4.MAP=$1;g4.NODE_TYPE=G0;g4.PAIR=K6;g4.SCALAR=L$;g4.SEQ=Z1;g4.hasAnchor=x4;g4.isAlias=w4;g4.isCollection=R6;g4.isDocument=C4;g4.isMap=b4;g4.isNode=S4;g4.isPair=E4;g4.isScalar=L6;g4.isSeq=j4});var G2=P((o4)=>{var v=j(),p=Symbol("break visit"),M6=Symbol("skip children"),X0=Symbol("remove node");function Q1($,Z){let Q=F6(Z);if(v.isDocument($)){if(m0(null,$.contents,Q,Object.freeze([$]))===X0)$.contents=null}else m0(null,$,Q,Object.freeze([]))}Q1.BREAK=p;Q1.SKIP=M6;Q1.REMOVE=X0;function m0($,Z,Q,X){let z=N6($,Z,Q,X);if(v.isNode(z)||v.isPair(z))return P6($,X,z),m0($,z,Q,X);if(typeof z!=="symbol"){if(v.isCollection(Z)){X=Object.freeze(X.concat(Z));for(let J=0;J<Z.items.length;++J){let H=m0(J,Z.items[J],Q,X);if(typeof H==="number")J=H-1;else if(H===p)return p;else if(H===X0)Z.items.splice(J,1),J-=1}}else if(v.isPair(Z)){X=Object.freeze(X.concat(Z));let J=m0("key",Z.key,Q,X);if(J===p)return p;else if(J===X0)Z.key=null;let H=m0("value",Z.value,Q,X);if(H===p)return p;else if(H===X0)Z.value=null}}return z}async function X1($,Z){let Q=F6(Z);if(v.isDocument($)){if(await p0(null,$.contents,Q,Object.freeze([$]))===X0)$.contents=null}else await p0(null,$,Q,Object.freeze([]))}X1.BREAK=p;X1.SKIP=M6;X1.REMOVE=X0;async function p0($,Z,Q,X){let z=await N6($,Z,Q,X);if(v.isNode(z)||v.isPair(z))return P6($,X,z),p0($,z,Q,X);if(typeof z!=="symbol"){if(v.isCollection(Z)){X=Object.freeze(X.concat(Z));for(let J=0;J<Z.items.length;++J){let H=await p0(J,Z.items[J],Q,X);if(typeof H==="number")J=H-1;else if(H===p)return p;else if(H===X0)Z.items.splice(J,1),J-=1}}else if(v.isPair(Z)){X=Object.freeze(X.concat(Z));let J=await p0("key",Z.key,Q,X);if(J===p)return p;else if(J===X0)Z.key=null;let H=await p0("value",Z.value,Q,X);if(H===p)return p;else if(H===X0)Z.value=null}}return z}function F6($){if(typeof $==="object"&&($.Collection||$.Node||$.Value))return Object.assign({Alias:$.Node,Map:$.Node,Scalar:$.Node,Seq:$.Node},$.Value&&{Map:$.Value,Scalar:$.Value,Seq:$.Value},$.Collection&&{Map:$.Collection,Seq:$.Collection},$);return $}function N6($,Z,Q,X){if(typeof Q==="function")return Q($,Z,X);if(v.isMap(Z))return Q.Map?.($,Z,X);if(v.isSeq(Z))return Q.Seq?.($,Z,X);if(v.isPair(Z))return Q.Pair?.($,Z,X);if(v.isScalar(Z))return Q.Scalar?.($,Z,X);if(v.isAlias(Z))return Q.Alias?.($,Z,X);return}function P6($,Z,Q){let X=Z[Z.length-1];if(v.isCollection(X))X.items[$]=Q;else if(v.isPair(X))if($==="key")X.key=Q;else X.value=Q;else if(v.isDocument(X))X.contents=Q;else{let z=v.isAlias(X)?"alias":"scalar";throw Error(`Cannot replace node with ${z} parent`)}}o4.visit=Q1;o4.visitAsync=X1});var R$=P((X3)=>{var A6=j(),$3=G2(),Z3={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Q3=($)=>$.replace(/[!,[\]{}]/g,(Z)=>Z3[Z]);class c{constructor($,Z){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},c.defaultYaml,$),this.tags=Object.assign({},c.defaultTags,Z)}clone(){let $=new c(this.yaml,this.tags);return $.docStart=this.docStart,$}atDocument(){let $=new c(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:c.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},c.defaultTags);break}return $}add($,Z){if(this.atNextDocument)this.yaml={explicit:c.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},c.defaultTags),this.atNextDocument=!1;let Q=$.trim().split(/[ \t]+/),X=Q.shift();switch(X){case"%TAG":{if(Q.length!==2){if(Z(0,"%TAG directive should contain exactly two parts"),Q.length<2)return!1}let[z,J]=Q;return this.tags[z]=J,!0}case"%YAML":{if(this.yaml.explicit=!0,Q.length!==1)return Z(0,"%YAML directive should contain exactly one part"),!1;let[z]=Q;if(z==="1.1"||z==="1.2")return this.yaml.version=z,!0;else{let J=/^\d+\.\d+$/.test(z);return Z(6,`Unsupported YAML version ${z}`,J),!1}}default:return Z(0,`Unknown directive ${X}`,!0),!1}}tagName($,Z){if($==="!")return"!";if($[0]!=="!")return Z(`Not a valid tag: ${$}`),null;if($[1]==="<"){let J=$.slice(2,-1);if(J==="!"||J==="!!")return Z(`Verbatim tags aren't resolved, so ${$} is invalid.`),null;if($[$.length-1]!==">")Z("Verbatim tags must end with a >");return J}let[,Q,X]=$.match(/^(.*!)([^!]*)$/s);if(!X)Z(`The ${$} tag has no suffix`);let z=this.tags[Q];if(z)try{return z+decodeURIComponent(X)}catch(J){return Z(String(J)),null}if(Q==="!")return $;return Z(`Could not resolve tag: ${$}`),null}tagString($){for(let[Z,Q]of Object.entries(this.tags))if($.startsWith(Q))return Z+Q3($.substring(Q.length));return $[0]==="!"?$:`!<${$}>`}toString($){let Z=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],Q=Object.entries(this.tags),X;if($&&Q.length>0&&A6.isNode($.contents)){let z={};$3.visit($.contents,(J,H)=>{if(A6.isNode(H)&&H.tag)z[H.tag]=!0}),X=Object.keys(z)}else X=[];for(let[z,J]of Q){if(z==="!!"&&J==="tag:yaml.org,2002:")continue;if(!$||X.some((H)=>H.startsWith(J)))Z.push(`%TAG ${z} ${J}`)}return Z.join(`
2
+ `)}}c.defaultYaml={explicit:!1,version:"1.2"};c.defaultTags={"!!":"tag:yaml.org,2002:"};X3.Directives=c});var z1=P((q3)=>{var T6=j(),J3=G2();function H3($){if(/[\x00-\x19\s,[\]{}]/.test($)){let Q=`Anchor must not contain whitespace or control characters: ${JSON.stringify($)}`;throw Error(Q)}return!0}function w6($){let Z=new Set;return J3.visit($,{Value(Q,X){if(X.anchor)Z.add(X.anchor)}}),Z}function C6($,Z){for(let Q=1;;++Q){let X=`${$}${Q}`;if(!Z.has(X))return X}}function U3($,Z){let Q=[],X=new Map,z=null;return{onAnchor:(J)=>{Q.push(J),z??(z=w6($));let H=C6(Z,z);return z.add(H),H},setAnchors:()=>{for(let J of Q){let H=X.get(J);if(typeof H==="object"&&H.anchor&&(T6.isScalar(H.node)||T6.isCollection(H.node)))H.node.anchor=H.anchor;else{let U=Error("Failed to resolve repeated object (this should not happen)");throw U.source=J,U}}},sourceObjects:X}}q3.anchorIsValid=H3;q3.anchorNames=w6;q3.createNodeAnchors=U3;q3.findNewAnchor=C6});var M$=P((W3)=>{function V2($,Z,Q,X){if(X&&typeof X==="object")if(Array.isArray(X))for(let z=0,J=X.length;z<J;++z){let H=X[z],U=V2($,X,String(z),H);if(U===void 0)delete X[z];else if(U!==H)X[z]=U}else if(X instanceof Map)for(let z of Array.from(X.keys())){let J=X.get(z),H=V2($,X,z,J);if(H===void 0)X.delete(z);else if(H!==J)X.set(z,H)}else if(X instanceof Set)for(let z of Array.from(X)){let J=V2($,X,z,z);if(J===void 0)X.delete(z);else if(J!==z)X.delete(z),X.add(J)}else for(let[z,J]of Object.entries(X)){let H=V2($,X,z,J);if(H===void 0)delete X[z];else if(H!==J)X[z]=H}return $.call(Z,Q,X)}W3.applyReviver=V2});var _0=P((D3)=>{var O3=j();function b6($,Z,Q){if(Array.isArray($))return $.map((X,z)=>b6(X,String(z),Q));if($&&typeof $.toJSON==="function"){if(!Q||!O3.hasAnchor($))return $.toJSON(Z,Q);let X={aliasCount:0,count:1,res:void 0};Q.anchors.set($,X),Q.onCreate=(J)=>{X.res=J,delete Q.onCreate};let z=$.toJSON(Z,Q);if(Q.onCreate)Q.onCreate(z);return z}if(typeof $==="bigint"&&!Q?.keep)return Number($);return $}D3.toJS=b6});var J1=P((R3)=>{var K3=M$(),E6=j(),L3=_0();class j6{constructor($){Object.defineProperty(this,E6.NODE_TYPE,{value:$})}clone(){let $=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)$.range=this.range.slice();return $}toJS($,{mapAsMap:Z,maxAliasCount:Q,onAnchor:X,reviver:z}={}){if(!E6.isDocument($))throw TypeError("A document argument is required");let J={anchors:new Map,doc:$,keep:!0,mapAsMap:Z===!0,mapKeyWarned:!1,maxAliasCount:typeof Q==="number"?Q:100},H=L3.toJS(this,"",J);if(typeof X==="function")for(let{count:U,res:q}of J.anchors.values())X(q,U);return typeof z==="function"?K3.applyReviver(z,{"":H},"",H):H}}R3.NodeBase=j6});var B2=P((T3)=>{var F3=z1(),N3=G2(),l0=j(),P3=J1(),A3=_0();class S6 extends P3.NodeBase{constructor($){super(l0.ALIAS);this.source=$,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve($,Z){if(Z?.maxAliasCount===0)throw ReferenceError("Alias resolution is disabled");let Q;if(Z?.aliasResolveCache)Q=Z.aliasResolveCache;else if(Q=[],N3.visit($,{Node:(z,J)=>{if(l0.isAlias(J)||l0.hasAnchor(J))Q.push(J)}}),Z)Z.aliasResolveCache=Q;let X=void 0;for(let z of Q){if(z===this)break;if(z.anchor===this.source)X=z}return X}toJSON($,Z){if(!Z)return{source:this.source};let{anchors:Q,doc:X,maxAliasCount:z}=Z,J=this.resolve(X,Z);if(!J){let U=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(U)}let H=Q.get(J);if(!H)A3.toJS(J,null,Z),H=Q.get(J);if(H?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(z>=0){if(H.count+=1,H.aliasCount===0)H.aliasCount=H1(X,J,Q);if(H.count*H.aliasCount>z)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return H.res}toString($,Z,Q){let X=`*${this.source}`;if($){if(F3.anchorIsValid(this.source),$.options.verifyAliasOrder&&!$.anchors.has(this.source)){let z=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(z)}if($.implicitKey)return`${X} `}return X}}function H1($,Z,Q){if(l0.isAlias(Z)){let X=Z.resolve($),z=Q&&X&&Q.get(X);return z?z.count*z.aliasCount:0}else if(l0.isCollection(Z)){let X=0;for(let z of Z.items){let J=H1($,z,Q);if(J>X)X=J}return X}else if(l0.isPair(Z)){let X=H1($,Z.key,Q),z=H1($,Z.value,Q);return Math.max(X,z)}return 1}T3.Alias=S6});var h=P((S3)=>{var C3=j(),b3=J1(),E3=_0(),j3=($)=>!$||typeof $!=="function"&&typeof $!=="object";class w0 extends b3.NodeBase{constructor($){super(C3.SCALAR);this.value=$}toJSON($,Z){return Z?.keep?this.value:E3.toJS(this.value,$,Z)}toString(){return String(this.value)}}w0.BLOCK_FOLDED="BLOCK_FOLDED";w0.BLOCK_LITERAL="BLOCK_LITERAL";w0.PLAIN="PLAIN";w0.QUOTE_DOUBLE="QUOTE_DOUBLE";w0.QUOTE_SINGLE="QUOTE_SINGLE";S3.Scalar=w0;S3.isScalarValue=j3});var W2=P((k3)=>{var y3=B2(),C0=j(),x6=h(),h3="tag:yaml.org,2002:";function v3($,Z,Q){if(Z){let X=Q.filter((J)=>J.tag===Z),z=X.find((J)=>!J.format)??X[0];if(!z)throw Error(`Tag ${Z} not found`);return z}return Q.find((X)=>X.identify?.($)&&!X.format)}function f3($,Z,Q){if(C0.isDocument($))$=$.contents;if(C0.isNode($))return $;if(C0.isPair($)){let V=Q.schema[C0.MAP].createNode?.(Q.schema,null,Q);return V.items.push($),V}if($ instanceof String||$ instanceof Number||$ instanceof Boolean||typeof BigInt<"u"&&$ instanceof BigInt)$=$.valueOf();let{aliasDuplicateObjects:X,onAnchor:z,onTagObj:J,schema:H,sourceObjects:U}=Q,q=void 0;if(X&&$&&typeof $==="object")if(q=U.get($),q)return q.anchor??(q.anchor=z($)),new y3.Alias(q.anchor);else q={anchor:null,node:null},U.set($,q);if(Z?.startsWith("!!"))Z=h3+Z.slice(2);let Y=v3($,Z,H.tags);if(!Y){if($&&typeof $.toJSON==="function")$=$.toJSON();if(!$||typeof $!=="object"){let V=new x6.Scalar($);if(q)q.node=V;return V}Y=$ instanceof Map?H[C0.MAP]:(Symbol.iterator in Object($))?H[C0.SEQ]:H[C0.MAP]}if(J)J(Y),delete Q.onTagObj;let G=Y?.createNode?Y.createNode(Q.schema,$,Q):typeof Y?.nodeClass?.from==="function"?Y.nodeClass.from(Q.schema,$,Q):new x6.Scalar($);if(Z)G.tag=Z;else if(!Y.default)G.tag=Y.tag;if(q)q.node=G;return G}k3.createNode=f3});var U1=P((l3)=>{var m3=W2(),z0=j(),p3=J1();function F$($,Z,Q){let X=Q;for(let z=Z.length-1;z>=0;--z){let J=Z[z];if(typeof J==="number"&&Number.isInteger(J)&&J>=0){let H=[];H[J]=X,X=H}else X=new Map([[J,X]])}return m3.createNode(X,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:$,sourceObjects:new Map})}var g6=($)=>$==null||typeof $==="object"&&!!$[Symbol.iterator]().next().done;class y6 extends p3.NodeBase{constructor($,Z){super($);Object.defineProperty(this,"schema",{value:Z,configurable:!0,enumerable:!1,writable:!0})}clone($){let Z=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if($)Z.schema=$;if(Z.items=Z.items.map((Q)=>z0.isNode(Q)||z0.isPair(Q)?Q.clone($):Q),this.range)Z.range=this.range.slice();return Z}addIn($,Z){if(g6($))this.add(Z);else{let[Q,...X]=$,z=this.get(Q,!0);if(z0.isCollection(z))z.addIn(X,Z);else if(z===void 0&&this.schema)this.set(Q,F$(this.schema,X,Z));else throw Error(`Expected YAML collection at ${Q}. Remaining path: ${X}`)}}deleteIn($){let[Z,...Q]=$;if(Q.length===0)return this.delete(Z);let X=this.get(Z,!0);if(z0.isCollection(X))return X.deleteIn(Q);else throw Error(`Expected YAML collection at ${Z}. Remaining path: ${Q}`)}getIn($,Z){let[Q,...X]=$,z=this.get(Q,!0);if(X.length===0)return!Z&&z0.isScalar(z)?z.value:z;else return z0.isCollection(z)?z.getIn(X,Z):void 0}hasAllNullValues($){return this.items.every((Z)=>{if(!z0.isPair(Z))return!1;let Q=Z.value;return Q==null||$&&z0.isScalar(Q)&&Q.value==null&&!Q.commentBefore&&!Q.comment&&!Q.tag})}hasIn($){let[Z,...Q]=$;if(Q.length===0)return this.has(Z);let X=this.get(Z,!0);return z0.isCollection(X)?X.hasIn(Q):!1}setIn($,Z){let[Q,...X]=$;if(X.length===0)this.set(Q,Z);else{let z=this.get(Q,!0);if(z0.isCollection(z))z.setIn(X,Z);else if(z===void 0&&this.schema)this.set(Q,F$(this.schema,X,Z));else throw Error(`Expected YAML collection at ${Q}. Remaining path: ${X}`)}}}l3.Collection=y6;l3.collectionFromPath=F$;l3.isEmptyPath=g6});var _2=P((a3)=>{var r3=($)=>$.replace(/^(?!$)(?: $)?/gm,"#");function N$($,Z){if(/^\n+$/.test($))return $.substring(1);return Z?$.replace(/^(?! *$)/gm,Z):$}var n3=($,Z,Q)=>$.endsWith(`
3
+ `)?N$(Q,Z):Q.includes(`
4
4
  `)?`
5
- `+G$(Q,Z):($.endsWith(" ")?"":" ")+Q;L3.indentComment=G$;L3.lineComment=M3;L3.stringifyComment=K3});var L6=F((P3)=>{function A3($,Z,Q="flow",{indentAtStart:X,lineWidth:z=80,minContentWidth:J=20,onFold:H,onOverflow:U}={}){if(!z||z<0)return $;if(z<J)J=0;let q=Math.max(1+J,1+z-Z.length);if($.length<=q)return $;let Y=[],B={},G=z-Z.length;if(typeof X==="number")if(X>z-Math.max(2,J))Y.push(0);else G=z-X;let V=void 0,_=void 0,D=!1,W=-1,O=-1,I=-1;if(Q==="block"){if(W=M6($,W,Z.length),W!==-1)G=W+q}for(let N;N=$[W+=1];){if(Q==="quoted"&&N==="\\"){switch(O=W,$[W+1]){case"x":W+=3;break;case"u":W+=5;break;case"U":W+=9;break;default:W+=1}I=W}if(N===`
6
- `){if(Q==="block")W=M6($,W,Z.length);G=W+Z.length+q,V=void 0}else{if(N===" "&&_&&_!==" "&&_!==`
7
- `&&_!=="\t"){let P=$[W+1];if(P&&P!==" "&&P!==`
8
- `&&P!=="\t")V=W}if(W>=G)if(V)Y.push(V),G=V+q,V=void 0;else if(Q==="quoted"){while(_===" "||_==="\t")_=N,N=$[W+=1],D=!0;let P=W>I+1?W-2:O-1;if(B[P])return $;Y.push(P),B[P]=!0,G=P+q,V=void 0}else D=!0}_=N}if(D&&U)U();if(Y.length===0)return $;if(H)H();let R=$.slice(0,Y[0]);for(let N=0;N<Y.length;++N){let P=Y[N],T=Y[N+1]||$.length;if(P===0)R=`
9
- ${Z}${$.slice(0,T)}`;else{if(Q==="quoted"&&B[P])R+=`${$[P]}\\`;R+=`
10
- ${Z}${$.slice(P+1,T)}`}}return R}function M6($,Z,Q){let X=Z,z=Z+1,J=$[z];while(J===" "||J==="\t")if(Z<z+Q)J=$[++Z];else{do J=$[++Z];while(J&&J!==`
11
- `);X=Z,z=Z+1,J=$[z]}return X}P3.FOLD_BLOCK="block";P3.FOLD_FLOW="flow";P3.FOLD_QUOTED="quoted";P3.foldFlowLines=A3});var Y1=F((x3)=>{var c=h(),U0=L6(),Z2=($,Z)=>({indentAtStart:Z?$.indent.length:$.indentAtStart,lineWidth:$.options.lineWidth,minContentWidth:$.options.minContentWidth}),Q2=($)=>/^(%|---|\.\.\.)/m.test($);function E3($,Z,Q){if(!Z||Z<0)return!1;let X=Z-Q,z=$.length;if(z<=X)return!1;for(let J=0,H=0;J<z;++J)if($[J]===`
12
- `){if(J-H>X)return!0;if(H=J+1,z-H<=X)return!1}return!0}function q1($,Z){let Q=JSON.stringify($);if(Z.options.doubleQuotedAsJSON)return Q;let{implicitKey:X}=Z,z=Z.options.doubleQuotedMinMultiLineLength,J=Z.indent||(Q2($)?" ":""),H="",U=0;for(let q=0,Y=Q[q];Y;Y=Q[++q]){if(Y===" "&&Q[q+1]==="\\"&&Q[q+2]==="n")H+=Q.slice(U,q)+"\\ ",q+=1,U=q,Y="\\";if(Y==="\\")switch(Q[q+1]){case"u":{H+=Q.slice(U,q);let B=Q.substr(q+2,4);switch(B){case"0000":H+="\\0";break;case"0007":H+="\\a";break;case"000b":H+="\\v";break;case"001b":H+="\\e";break;case"0085":H+="\\N";break;case"00a0":H+="\\_";break;case"2028":H+="\\L";break;case"2029":H+="\\P";break;default:if(B.substr(0,2)==="00")H+="\\x"+B.substr(2);else H+=Q.substr(q,6)}q+=5,U=q+1}break;case"n":if(X||Q[q+2]==='"'||Q.length<z)q+=1;else{H+=Q.slice(U,q)+`
5
+ `+N$(Q,Z):($.endsWith(" ")?"":" ")+Q;a3.indentComment=N$;a3.lineComment=n3;a3.stringifyComment=r3});var v6=P(($7)=>{function e3($,Z,Q="flow",{indentAtStart:X,lineWidth:z=80,minContentWidth:J=20,onFold:H,onOverflow:U}={}){if(!z||z<0)return $;if(z<J)J=0;let q=Math.max(1+J,1+z-Z.length);if($.length<=q)return $;let Y=[],G={},V=z-Z.length;if(typeof X==="number")if(X>z-Math.max(2,J))Y.push(0);else V=z-X;let B=void 0,_=void 0,D=!1,W=-1,O=-1,I=-1;if(Q==="block"){if(W=h6($,W,Z.length),W!==-1)V=W+q}for(let F;F=$[W+=1];){if(Q==="quoted"&&F==="\\"){switch(O=W,$[W+1]){case"x":W+=3;break;case"u":W+=5;break;case"U":W+=9;break;default:W+=1}I=W}if(F===`
6
+ `){if(Q==="block")W=h6($,W,Z.length);V=W+Z.length+q,B=void 0}else{if(F===" "&&_&&_!==" "&&_!==`
7
+ `&&_!=="\t"){let A=$[W+1];if(A&&A!==" "&&A!==`
8
+ `&&A!=="\t")B=W}if(W>=V)if(B)Y.push(B),V=B+q,B=void 0;else if(Q==="quoted"){while(_===" "||_==="\t")_=F,F=$[W+=1],D=!0;let A=W>I+1?W-2:O-1;if(G[A])return $;Y.push(A),G[A]=!0,V=A+q,B=void 0}else D=!0}_=F}if(D&&U)U();if(Y.length===0)return $;if(H)H();let N=$.slice(0,Y[0]);for(let F=0;F<Y.length;++F){let A=Y[F],w=Y[F+1]||$.length;if(A===0)N=`
9
+ ${Z}${$.slice(0,w)}`;else{if(Q==="quoted"&&G[A])N+=`${$[A]}\\`;N+=`
10
+ ${Z}${$.slice(A+1,w)}`}}return N}function h6($,Z,Q){let X=Z,z=Z+1,J=$[z];while(J===" "||J==="\t")if(Z<z+Q)J=$[++Z];else{do J=$[++Z];while(J&&J!==`
11
+ `);X=Z,z=Z+1,J=$[z]}return X}$7.FOLD_BLOCK="block";$7.FOLD_FLOW="flow";$7.FOLD_QUOTED="quoted";$7.foldFlowLines=e3});var D2=P((q7)=>{var s=h(),O0=v6(),Y1=($,Z)=>({indentAtStart:Z?$.indent.length:$.indentAtStart,lineWidth:$.options.lineWidth,minContentWidth:$.options.minContentWidth}),G1=($)=>/^(%|---|\.\.\.)/m.test($);function J7($,Z,Q){if(!Z||Z<0)return!1;let X=Z-Q,z=$.length;if(z<=X)return!1;for(let J=0,H=0;J<z;++J)if($[J]===`
12
+ `){if(J-H>X)return!0;if(H=J+1,z-H<=X)return!1}return!0}function O2($,Z){let Q=JSON.stringify($);if(Z.options.doubleQuotedAsJSON)return Q;let{implicitKey:X}=Z,z=Z.options.doubleQuotedMinMultiLineLength,J=Z.indent||(G1($)?" ":""),H="",U=0;for(let q=0,Y=Q[q];Y;Y=Q[++q]){if(Y===" "&&Q[q+1]==="\\"&&Q[q+2]==="n")H+=Q.slice(U,q)+"\\ ",q+=1,U=q,Y="\\";if(Y==="\\")switch(Q[q+1]){case"u":{H+=Q.slice(U,q);let G=Q.substr(q+2,4);switch(G){case"0000":H+="\\0";break;case"0007":H+="\\a";break;case"000b":H+="\\v";break;case"001b":H+="\\e";break;case"0085":H+="\\N";break;case"00a0":H+="\\_";break;case"2028":H+="\\L";break;case"2029":H+="\\P";break;default:if(G.substr(0,2)==="00")H+="\\x"+G.substr(2);else H+=Q.substr(q,6)}q+=5,U=q+1}break;case"n":if(X||Q[q+2]==='"'||Q.length<z)q+=1;else{H+=Q.slice(U,q)+`
13
13
 
14
14
  `;while(Q[q+2]==="\\"&&Q[q+3]==="n"&&Q[q+4]!=='"')H+=`
15
- `,q+=2;if(H+=J,Q[q+2]===" ")H+="\\";q+=1,U=q+1}break;default:q+=1}}return H=U?H+Q.slice(U):Q,X?H:U0.foldFlowLines(H,J,U0.FOLD_QUOTED,Z2(Z,!1))}function V$($,Z){if(Z.options.singleQuote===!1||Z.implicitKey&&$.includes(`
16
- `)||/[ \t]\n|\n[ \t]/.test($))return q1($,Z);let Q=Z.indent||(Q2($)?" ":""),X="'"+$.replace(/'/g,"''").replace(/\n+/g,`$&
17
- ${Q}`)+"'";return Z.implicitKey?X:U0.foldFlowLines(X,Q,U0.FOLD_FLOW,Z2(Z,!1))}function y0($,Z){let{singleQuote:Q}=Z.options,X;if(Q===!1)X=q1;else{let z=$.includes('"'),J=$.includes("'");if(z&&!J)X=V$;else if(J&&!z)X=q1;else X=Q?V$:q1}return X($,Z)}var W$;try{W$=new RegExp(`(^|(?<!
15
+ `,q+=2;if(H+=J,Q[q+2]===" ")H+="\\";q+=1,U=q+1}break;default:q+=1}}return H=U?H+Q.slice(U):Q,X?H:O0.foldFlowLines(H,J,O0.FOLD_QUOTED,Y1(Z,!1))}function P$($,Z){if(Z.options.singleQuote===!1||Z.implicitKey&&$.includes(`
16
+ `)||/[ \t]\n|\n[ \t]/.test($))return O2($,Z);let Q=Z.indent||(G1($)?" ":""),X="'"+$.replace(/'/g,"''").replace(/\n+/g,`$&
17
+ ${Q}`)+"'";return Z.implicitKey?X:O0.foldFlowLines(X,Q,O0.FOLD_FLOW,Y1(Z,!1))}function d0($,Z){let{singleQuote:Q}=Z.options,X;if(Q===!1)X=O2;else{let z=$.includes('"'),J=$.includes("'");if(z&&!J)X=P$;else if(J&&!z)X=O2;else X=Q?P$:O2}return X($,Z)}var A$;try{A$=new RegExp(`(^|(?<!
18
18
  ))
19
19
  +(?!
20
- |$)`,"g")}catch{W$=/\n+(?!\n|$)/g}function $2({comment:$,type:Z,value:Q},X,z,J){let{blockQuote:H,commentString:U,lineWidth:q}=X.options;if(!H||/\n[\t ]+$/.test(Q))return y0(Q,X);let Y=X.indent||(X.forceBlockIndent||Q2(Q)?" ":""),B=H==="literal"?!0:H==="folded"||Z===c.Scalar.BLOCK_FOLDED?!1:Z===c.Scalar.BLOCK_LITERAL?!0:!E3(Q,q,Y.length);if(!Q)return B?`|
20
+ |$)`,"g")}catch{A$=/\n+(?!\n|$)/g}function q1({comment:$,type:Z,value:Q},X,z,J){let{blockQuote:H,commentString:U,lineWidth:q}=X.options;if(!H||/\n[\t ]+$/.test(Q))return d0(Q,X);let Y=X.indent||(X.forceBlockIndent||G1(Q)?" ":""),G=H==="literal"?!0:H==="folded"||Z===s.Scalar.BLOCK_FOLDED?!1:Z===s.Scalar.BLOCK_LITERAL?!0:!J7(Q,q,Y.length);if(!Q)return G?`|
21
21
  `:`>
22
- `;let G,V;for(V=Q.length;V>0;--V){let T=Q[V-1];if(T!==`
23
- `&&T!=="\t"&&T!==" ")break}let _=Q.substring(V),D=_.indexOf(`
24
- `);if(D===-1)G="-";else if(Q===_||D!==_.length-1){if(G="+",J)J()}else G="";if(_){if(Q=Q.slice(0,-_.length),_[_.length-1]===`
25
- `)_=_.slice(0,-1);_=_.replace(W$,`$&${Y}`)}let W=!1,O,I=-1;for(O=0;O<Q.length;++O){let T=Q[O];if(T===" ")W=!0;else if(T===`
26
- `)I=O;else break}let R=Q.substring(0,I<O?I+1:O);if(R)Q=Q.substring(R.length),R=R.replace(/\n+/g,`$&${Y}`);let P=(W?Y?"2":"1":"")+G;if($){if(P+=" "+U($.replace(/ ?[\r\n]+/g," ")),z)z()}if(!B){let T=Q.replace(/\n+/g,`
27
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${Y}`),A=!1,C=Z2(X,!0);if(H!=="folded"&&Z!==c.Scalar.BLOCK_FOLDED)C.onOverflow=()=>{A=!0};let L=U0.foldFlowLines(`${R}${T}${_}`,Y,U0.FOLD_BLOCK,C);if(!A)return`>${P}
28
- ${Y}${L}`}return Q=Q.replace(/\n+/g,`$&${Y}`),`|${P}
29
- ${Y}${R}${Q}${_}`}function S3($,Z,Q,X){let{type:z,value:J}=$,{actualString:H,implicitKey:U,indent:q,indentStep:Y,inFlow:B}=Z;if(U&&J.includes(`
30
- `)||B&&/[[\]{},]/.test(J))return y0(J,Z);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(J))return U||B||!J.includes(`
31
- `)?y0(J,Z):$2($,Z,Q,X);if(!U&&!B&&z!==c.Scalar.PLAIN&&J.includes(`
32
- `))return $2($,Z,Q,X);if(Q2(J)){if(q==="")return Z.forceBlockIndent=!0,$2($,Z,Q,X);else if(U&&q===Y)return y0(J,Z)}let G=J.replace(/\n+/g,`$&
33
- ${q}`);if(H){let V=(W)=>W.default&&W.tag!=="tag:yaml.org,2002:str"&&W.test?.test(G),{compat:_,tags:D}=Z.doc.schema;if(D.some(V)||_?.some(V))return y0(J,Z)}return U?G:U0.foldFlowLines(G,q,U0.FOLD_FLOW,Z2(Z,!1))}function j3($,Z,Q,X){let{implicitKey:z,inFlow:J}=Z,H=typeof $.value==="string"?$:Object.assign({},$,{value:String($.value)}),{type:U}=$;if(U!==c.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(H.value))U=c.Scalar.QUOTE_DOUBLE}let q=(B)=>{switch(B){case c.Scalar.BLOCK_FOLDED:case c.Scalar.BLOCK_LITERAL:return z||J?y0(H.value,Z):$2(H,Z,Q,X);case c.Scalar.QUOTE_DOUBLE:return q1(H.value,Z);case c.Scalar.QUOTE_SINGLE:return V$(H.value,Z);case c.Scalar.PLAIN:return S3(H,Z,Q,X);default:return null}},Y=q(U);if(Y===null){let{defaultKeyType:B,defaultStringType:G}=Z.options,V=z&&B||G;if(Y=q(V),Y===null)throw Error(`Unsupported default string type ${V}`)}return Y}x3.stringifyString=j3});var B1=F((l3)=>{var h3=s1(),q0=w(),y3=U1(),v3=Y1();function f3($,Z){let Q=Object.assign({blockQuote:!0,commentString:y3.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},$.schema.toStringOptions,Z),X;switch(Q.collectionStyle){case"block":X=!1;break;case"flow":X=!0;break;default:X=null}return{anchors:new Set,doc:$,flowCollectionPadding:Q.flowCollectionPadding?" ":"",indent:"",indentStep:typeof Q.indent==="number"?" ".repeat(Q.indent):" ",inFlow:X,options:Q}}function k3($,Z){if(Z.tag){let z=$.filter((J)=>J.tag===Z.tag);if(z.length>0)return z.find((J)=>J.format===Z.format)??z[0]}let Q=void 0,X;if(q0.isScalar(Z)){X=Z.value;let z=$.filter((J)=>J.identify?.(X));if(z.length>1){let J=z.filter((H)=>H.test);if(J.length>0)z=J}Q=z.find((J)=>J.format===Z.format)??z.find((J)=>!J.format)}else X=Z,Q=$.find((z)=>z.nodeClass&&X instanceof z.nodeClass);if(!Q){let z=X?.constructor?.name??(X===null?"null":typeof X);throw Error(`Tag not resolved for ${z} value`)}return Q}function u3($,Z,{anchors:Q,doc:X}){if(!X.directives)return"";let z=[],J=(q0.isScalar($)||q0.isCollection($))&&$.anchor;if(J&&h3.anchorIsValid(J))Q.add(J),z.push(`&${J}`);let H=$.tag??(Z.default?null:Z.tag);if(H)z.push(X.directives.tagString(H));return z.join(" ")}function m3($,Z,Q,X){if(q0.isPair($))return $.toString(Z,Q,X);if(q0.isAlias($)){if(Z.doc.directives)return $.toString(Z);if(Z.resolvedAliases?.has($))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(Z.resolvedAliases)Z.resolvedAliases.add($);else Z.resolvedAliases=new Set([$]);$=$.resolve(Z.doc)}}let z=void 0,J=q0.isNode($)?$:Z.doc.createNode($,{onTagObj:(q)=>z=q});z??(z=k3(Z.doc.schema.tags,J));let H=u3(J,z,Z);if(H.length>0)Z.indentAtStart=(Z.indentAtStart??0)+H.length+1;let U=typeof z.stringify==="function"?z.stringify(J,Z,Q,X):q0.isScalar(J)?v3.stringifyString(J,Z,Q,X):J.toString(Z,Q,X);if(!H)return U;return q0.isScalar(J)||U[0]==="{"||U[0]==="["?`${H} ${U}`:`${H}
34
- ${Z.indent}${U}`}l3.createStringifyContext=f3;l3.stringify=m3});var N6=F((i3)=>{var X0=w(),R6=h(),F6=B1(),G1=U1();function c3({key:$,value:Z},Q,X,z){let{allNullValues:J,doc:H,indent:U,indentStep:q,options:{commentString:Y,indentSeq:B,simpleKeys:G}}=Q,V=X0.isNode($)&&$.comment||null;if(G){if(V)throw Error("With simple keys, key nodes cannot have comments");if(X0.isCollection($)||!X0.isNode($)&&typeof $==="object")throw Error("With simple keys, collection cannot be used as a key value")}let _=!G&&(!$||V&&Z==null&&!Q.inFlow||X0.isCollection($)||(X0.isScalar($)?$.type===R6.Scalar.BLOCK_FOLDED||$.type===R6.Scalar.BLOCK_LITERAL:typeof $==="object"));Q=Object.assign({},Q,{allNullValues:!1,implicitKey:!_&&(G||!J),indent:U+q});let D=!1,W=!1,O=F6.stringify($,Q,()=>D=!0,()=>W=!0);if(!_&&!Q.inFlow&&O.length>1024){if(G)throw Error("With simple keys, single line scalar must not span more than 1024 characters");_=!0}if(Q.inFlow){if(J||Z==null){if(D&&X)X();return O===""?"?":_?`? ${O}`:O}}else if(J&&!G||Z==null&&_){if(O=`? ${O}`,V&&!D)O+=G1.lineComment(O,Q.indent,Y(V));else if(W&&z)z();return O}if(D)V=null;if(_){if(V)O+=G1.lineComment(O,Q.indent,Y(V));O=`? ${O}
35
- ${U}:`}else if(O=`${O}:`,V)O+=G1.lineComment(O,Q.indent,Y(V));let I,R,N;if(X0.isNode(Z))I=!!Z.spaceBefore,R=Z.commentBefore,N=Z.comment;else if(I=!1,R=null,N=null,Z&&typeof Z==="object")Z=H.createNode(Z);if(Q.implicitKey=!1,!_&&!V&&X0.isScalar(Z))Q.indentAtStart=O.length+1;if(W=!1,!B&&q.length>=2&&!Q.inFlow&&!_&&X0.isSeq(Z)&&!Z.flow&&!Z.tag&&!Z.anchor)Q.indent=Q.indent.substring(2);let P=!1,T=F6.stringify(Z,Q,()=>P=!0,()=>W=!0),A=" ";if(V||I||R){if(A=I?`
36
- `:"",R){let C=Y(R);A+=`
37
- ${G1.indentComment(C,Q.indent)}`}if(T===""&&!Q.inFlow){if(A===`
38
- `&&N)A=`
22
+ `;let V,B;for(B=Q.length;B>0;--B){let w=Q[B-1];if(w!==`
23
+ `&&w!=="\t"&&w!==" ")break}let _=Q.substring(B),D=_.indexOf(`
24
+ `);if(D===-1)V="-";else if(Q===_||D!==_.length-1){if(V="+",J)J()}else V="";if(_){if(Q=Q.slice(0,-_.length),_[_.length-1]===`
25
+ `)_=_.slice(0,-1);_=_.replace(A$,`$&${Y}`)}let W=!1,O,I=-1;for(O=0;O<Q.length;++O){let w=Q[O];if(w===" ")W=!0;else if(w===`
26
+ `)I=O;else break}let N=Q.substring(0,I<O?I+1:O);if(N)Q=Q.substring(N.length),N=N.replace(/\n+/g,`$&${Y}`);let A=(W?Y?"2":"1":"")+V;if($){if(A+=" "+U($.replace(/ ?[\r\n]+/g," ")),z)z()}if(!G){let w=Q.replace(/\n+/g,`
27
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${Y}`),T=!1,C=Y1(X,!0);if(H!=="folded"&&Z!==s.Scalar.BLOCK_FOLDED)C.onOverflow=()=>{T=!0};let L=O0.foldFlowLines(`${N}${w}${_}`,Y,O0.FOLD_BLOCK,C);if(!T)return`>${A}
28
+ ${Y}${L}`}return Q=Q.replace(/\n+/g,`$&${Y}`),`|${A}
29
+ ${Y}${N}${Q}${_}`}function H7($,Z,Q,X){let{type:z,value:J}=$,{actualString:H,implicitKey:U,indent:q,indentStep:Y,inFlow:G}=Z;if(U&&J.includes(`
30
+ `)||G&&/[[\]{},]/.test(J))return d0(J,Z);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(J))return U||G||!J.includes(`
31
+ `)?d0(J,Z):q1($,Z,Q,X);if(!U&&!G&&z!==s.Scalar.PLAIN&&J.includes(`
32
+ `))return q1($,Z,Q,X);if(G1(J)){if(q==="")return Z.forceBlockIndent=!0,q1($,Z,Q,X);else if(U&&q===Y)return d0(J,Z)}let V=J.replace(/\n+/g,`$&
33
+ ${q}`);if(H){let B=(W)=>W.default&&W.tag!=="tag:yaml.org,2002:str"&&W.test?.test(V),{compat:_,tags:D}=Z.doc.schema;if(D.some(B)||_?.some(B))return d0(J,Z)}return U?V:O0.foldFlowLines(V,q,O0.FOLD_FLOW,Y1(Z,!1))}function U7($,Z,Q,X){let{implicitKey:z,inFlow:J}=Z,H=typeof $.value==="string"?$:Object.assign({},$,{value:String($.value)}),{type:U}=$;if(U!==s.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(H.value))U=s.Scalar.QUOTE_DOUBLE}let q=(G)=>{switch(G){case s.Scalar.BLOCK_FOLDED:case s.Scalar.BLOCK_LITERAL:return z||J?d0(H.value,Z):q1(H,Z,Q,X);case s.Scalar.QUOTE_DOUBLE:return O2(H.value,Z);case s.Scalar.QUOTE_SINGLE:return P$(H.value,Z);case s.Scalar.PLAIN:return H7(H,Z,Q,X);default:return null}},Y=q(U);if(Y===null){let{defaultKeyType:G,defaultStringType:V}=Z.options,B=z&&G||V;if(Y=q(B),Y===null)throw Error(`Unsupported default string type ${B}`)}return Y}q7.stringifyString=U7});var I2=P((I7)=>{var G7=z1(),D0=j(),V7=_2(),B7=D2();function W7($,Z){let Q=Object.assign({blockQuote:!0,commentString:V7.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},$.schema.toStringOptions,Z),X;switch(Q.collectionStyle){case"block":X=!1;break;case"flow":X=!0;break;default:X=null}return{anchors:new Set,doc:$,flowCollectionPadding:Q.flowCollectionPadding?" ":"",indent:"",indentStep:typeof Q.indent==="number"?" ".repeat(Q.indent):" ",inFlow:X,options:Q}}function _7($,Z){if(Z.tag){let z=$.filter((J)=>J.tag===Z.tag);if(z.length>0)return z.find((J)=>J.format===Z.format)??z[0]}let Q=void 0,X;if(D0.isScalar(Z)){X=Z.value;let z=$.filter((J)=>J.identify?.(X));if(z.length>1){let J=z.filter((H)=>H.test);if(J.length>0)z=J}Q=z.find((J)=>J.format===Z.format)??z.find((J)=>!J.format)}else X=Z,Q=$.find((z)=>z.nodeClass&&X instanceof z.nodeClass);if(!Q){let z=X?.constructor?.name??(X===null?"null":typeof X);throw Error(`Tag not resolved for ${z} value`)}return Q}function O7($,Z,{anchors:Q,doc:X}){if(!X.directives)return"";let z=[],J=(D0.isScalar($)||D0.isCollection($))&&$.anchor;if(J&&G7.anchorIsValid(J))Q.add(J),z.push(`&${J}`);let H=$.tag??(Z.default?null:Z.tag);if(H)z.push(X.directives.tagString(H));return z.join(" ")}function D7($,Z,Q,X){if(D0.isPair($))return $.toString(Z,Q,X);if(D0.isAlias($)){if(Z.doc.directives)return $.toString(Z);if(Z.resolvedAliases?.has($))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(Z.resolvedAliases)Z.resolvedAliases.add($);else Z.resolvedAliases=new Set([$]);$=$.resolve(Z.doc)}}let z=void 0,J=D0.isNode($)?$:Z.doc.createNode($,{onTagObj:(q)=>z=q});z??(z=_7(Z.doc.schema.tags,J));let H=O7(J,z,Z);if(H.length>0)Z.indentAtStart=(Z.indentAtStart??0)+H.length+1;let U=typeof z.stringify==="function"?z.stringify(J,Z,Q,X):D0.isScalar(J)?B7.stringifyString(J,Z,Q,X):J.toString(Z,Q,X);if(!H)return U;return D0.isScalar(J)||U[0]==="{"||U[0]==="["?`${H} ${U}`:`${H}
34
+ ${Z.indent}${U}`}I7.createStringifyContext=W7;I7.stringify=D7});var u6=P((M7)=>{var V0=j(),f6=h(),k6=I2(),K2=_2();function R7({key:$,value:Z},Q,X,z){let{allNullValues:J,doc:H,indent:U,indentStep:q,options:{commentString:Y,indentSeq:G,simpleKeys:V}}=Q,B=V0.isNode($)&&$.comment||null;if(V){if(B)throw Error("With simple keys, key nodes cannot have comments");if(V0.isCollection($)||!V0.isNode($)&&typeof $==="object")throw Error("With simple keys, collection cannot be used as a key value")}let _=!V&&(!$||B&&Z==null&&!Q.inFlow||V0.isCollection($)||(V0.isScalar($)?$.type===f6.Scalar.BLOCK_FOLDED||$.type===f6.Scalar.BLOCK_LITERAL:typeof $==="object"));Q=Object.assign({},Q,{allNullValues:!1,implicitKey:!_&&(V||!J),indent:U+q});let D=!1,W=!1,O=k6.stringify($,Q,()=>D=!0,()=>W=!0);if(!_&&!Q.inFlow&&O.length>1024){if(V)throw Error("With simple keys, single line scalar must not span more than 1024 characters");_=!0}if(Q.inFlow){if(J||Z==null){if(D&&X)X();return O===""?"?":_?`? ${O}`:O}}else if(J&&!V||Z==null&&_){if(O=`? ${O}`,B&&!D)O+=K2.lineComment(O,Q.indent,Y(B));else if(W&&z)z();return O}if(D)B=null;if(_){if(B)O+=K2.lineComment(O,Q.indent,Y(B));O=`? ${O}
35
+ ${U}:`}else if(O=`${O}:`,B)O+=K2.lineComment(O,Q.indent,Y(B));let I,N,F;if(V0.isNode(Z))I=!!Z.spaceBefore,N=Z.commentBefore,F=Z.comment;else if(I=!1,N=null,F=null,Z&&typeof Z==="object")Z=H.createNode(Z);if(Q.implicitKey=!1,!_&&!B&&V0.isScalar(Z))Q.indentAtStart=O.length+1;if(W=!1,!G&&q.length>=2&&!Q.inFlow&&!_&&V0.isSeq(Z)&&!Z.flow&&!Z.tag&&!Z.anchor)Q.indent=Q.indent.substring(2);let A=!1,w=k6.stringify(Z,Q,()=>A=!0,()=>W=!0),T=" ";if(B||I||N){if(T=I?`
36
+ `:"",N){let C=Y(N);T+=`
37
+ ${K2.indentComment(C,Q.indent)}`}if(w===""&&!Q.inFlow){if(T===`
38
+ `&&F)T=`
39
39
 
40
- `}else A+=`
41
- ${Q.indent}`}else if(!_&&X0.isCollection(Z)){let C=T[0],L=T.indexOf(`
42
- `),S=L!==-1,E=Q.inFlow??Z.flow??Z.items.length===0;if(S||!E){let d=!1;if(S&&(C==="&"||C==="!")){let j=T.indexOf(" ");if(C==="&"&&j!==-1&&j<L&&T[j+1]==="!")j=T.indexOf(" ",j+1);if(j===-1||L<j)d=!0}if(!d)A=`
43
- ${Q.indent}`}}else if(T===""||T[0]===`
44
- `)A="";if(O+=A+T,Q.inFlow){if(P&&X)X()}else if(N&&!P)O+=G1.lineComment(O,Q.indent,Y(N));else if(W&&z)z();return O}i3.stringifyPair=c3});var _$=F((s3)=>{var A6=t0("process");function a3($,...Z){if($==="debug")console.log(...Z)}function n3($,Z){if($==="debug"||$==="warn")if(typeof A6.emitWarning==="function")A6.emitWarning(Z);else console.warn(Z)}s3.debug=a3;s3.warn=n3});var H2=F(($7)=>{var J2=w(),P6=h(),X2="<<",z2={identify:($)=>$===X2||typeof $==="symbol"&&$.description===X2,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new P6.Scalar(Symbol(X2)),{addToJSMap:T6}),stringify:()=>X2},e3=($,Z)=>(z2.identify(Z)||J2.isScalar(Z)&&(!Z.type||Z.type===P6.Scalar.PLAIN)&&z2.identify(Z.value))&&$?.doc.schema.tags.some((Q)=>Q.tag===z2.tag&&Q.default);function T6($,Z,Q){let X=C6($,Q);if(J2.isSeq(X))for(let z of X.items)O$($,Z,z);else if(Array.isArray(X))for(let z of X)O$($,Z,z);else O$($,Z,X)}function O$($,Z,Q){let X=C6($,Q);if(!J2.isMap(X))throw Error("Merge sources must be maps or map aliases");let z=X.toJSON(null,$,Map);for(let[J,H]of z)if(Z instanceof Map){if(!Z.has(J))Z.set(J,H)}else if(Z instanceof Set)Z.add(J);else if(!Object.prototype.hasOwnProperty.call(Z,J))Object.defineProperty(Z,J,{value:H,writable:!0,enumerable:!0,configurable:!0});return Z}function C6($,Z){return $&&J2.isAlias(Z)?Z.resolve($.doc,$):Z}$7.addMergeToJSMap=T6;$7.isMergeKey=e3;$7.merge=z2});var I$=F((q7)=>{var z7=_$(),w6=H2(),J7=B1(),b6=w(),D$=H0();function H7($,Z,{key:Q,value:X}){if(b6.isNode(Q)&&Q.addToJSMap)Q.addToJSMap($,Z,X);else if(w6.isMergeKey($,Q))w6.addMergeToJSMap($,Z,X);else{let z=D$.toJS(Q,"",$);if(Z instanceof Map)Z.set(z,D$.toJS(X,z,$));else if(Z instanceof Set)Z.add(z);else{let J=U7(Q,z,$),H=D$.toJS(X,J,$);if(J in Z)Object.defineProperty(Z,J,{value:H,writable:!0,enumerable:!0,configurable:!0});else Z[J]=H}}return Z}function U7($,Z,Q){if(Z===null)return"";if(typeof Z!=="object")return String(Z);if(b6.isNode($)&&Q?.doc){let X=J7.createStringifyContext(Q.doc,{});X.anchors=new Set;for(let J of Q.anchors.keys())X.anchors.add(J.anchor);X.inFlow=!0,X.inStringifyKey=!0;let z=$.toString(X);if(!Q.mapKeyWarned){let J=JSON.stringify(z);if(J.length>40)J=J.substring(0,36)+'..."';z7.warn(Q.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${J}. Set mapAsMap: true to use object keys.`),Q.mapKeyWarned=!0}return z}return JSON.stringify(Z)}q7.addPairToJSMap=H7});var Y0=F((W7)=>{var E6=H1(),B7=N6(),G7=I$(),U2=w();function V7($,Z,Q){let X=E6.createNode($,void 0,Q),z=E6.createNode(Z,void 0,Q);return new q2(X,z)}class q2{constructor($,Z=null){Object.defineProperty(this,U2.NODE_TYPE,{value:U2.PAIR}),this.key=$,this.value=Z}clone($){let{key:Z,value:Q}=this;if(U2.isNode(Z))Z=Z.clone($);if(U2.isNode(Q))Q=Q.clone($);return new q2(Z,Q)}toJSON($,Z){let Q=Z?.mapAsMap?new Map:{};return G7.addPairToJSMap(Z,Q,this)}toString($,Z,Q){return $?.doc?B7.stringifyPair(this,$,Z,Q):JSON.stringify(this)}}W7.Pair=q2;W7.createPair=V7});var K$=F((M7)=>{var R0=w(),S6=B1(),Y2=U1();function D7($,Z,Q){return(Z.inFlow??$.flow?K7:I7)($,Z,Q)}function I7({comment:$,items:Z},Q,{blockItemPrefix:X,flowChars:z,itemIndent:J,onChompKeep:H,onComment:U}){let{indent:q,options:{commentString:Y}}=Q,B=Object.assign({},Q,{indent:J,type:null}),G=!1,V=[];for(let D=0;D<Z.length;++D){let W=Z[D],O=null;if(R0.isNode(W)){if(!G&&W.spaceBefore)V.push("");if(B2(Q,V,W.commentBefore,G),W.comment)O=W.comment}else if(R0.isPair(W)){let R=R0.isNode(W.key)?W.key:null;if(R){if(!G&&R.spaceBefore)V.push("");B2(Q,V,R.commentBefore,G)}}G=!1;let I=S6.stringify(W,B,()=>O=null,()=>G=!0);if(O)I+=Y2.lineComment(I,J,Y(O));if(G&&O)G=!1;V.push(X+I)}let _;if(V.length===0)_=z.start+z.end;else{_=V[0];for(let D=1;D<V.length;++D){let W=V[D];_+=W?`
40
+ `}else T+=`
41
+ ${Q.indent}`}else if(!_&&V0.isCollection(Z)){let C=w[0],L=w.indexOf(`
42
+ `),S=L!==-1,E=Q.inFlow??Z.flow??Z.items.length===0;if(S||!E){let m=!1;if(S&&(C==="&"||C==="!")){let M=w.indexOf(" ");if(C==="&"&&M!==-1&&M<L&&w[M+1]==="!")M=w.indexOf(" ",M+1);if(M===-1||L<M)m=!0}if(!m)T=`
43
+ ${Q.indent}`}}else if(w===""||w[0]===`
44
+ `)T="";if(O+=T+w,Q.inFlow){if(A&&X)X()}else if(F&&!A)O+=K2.lineComment(O,Q.indent,Y(F));else if(W&&z)z();return O}M7.stringifyPair=R7});var T$=P((A7)=>{var m6=H2("process");function N7($,...Z){if($==="debug")console.log(...Z)}function P7($,Z){if($==="debug"||$==="warn")if(typeof m6.emitWarning==="function")m6.emitWarning(Z);else console.warn(Z)}A7.debug=N7;A7.warn=P7});var _1=P((b7)=>{var W1=j(),p6=h(),V1="<<",B1={identify:($)=>$===V1||typeof $==="symbol"&&$.description===V1,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new p6.Scalar(Symbol(V1)),{addToJSMap:l6}),stringify:()=>V1},C7=($,Z)=>(B1.identify(Z)||W1.isScalar(Z)&&(!Z.type||Z.type===p6.Scalar.PLAIN)&&B1.identify(Z.value))&&$?.doc.schema.tags.some((Q)=>Q.tag===B1.tag&&Q.default);function l6($,Z,Q){let X=d6($,Q);if(W1.isSeq(X))for(let z of X.items)w$($,Z,z);else if(Array.isArray(X))for(let z of X)w$($,Z,z);else w$($,Z,X)}function w$($,Z,Q){let X=d6($,Q);if(!W1.isMap(X))throw Error("Merge sources must be maps or map aliases");let z=X.toJSON(null,$,Map);for(let[J,H]of z)if(Z instanceof Map){if(!Z.has(J))Z.set(J,H)}else if(Z instanceof Set)Z.add(J);else if(!Object.prototype.hasOwnProperty.call(Z,J))Object.defineProperty(Z,J,{value:H,writable:!0,enumerable:!0,configurable:!0});return Z}function d6($,Z){return $&&W1.isAlias(Z)?Z.resolve($.doc,$):Z}b7.addMergeToJSMap=l6;b7.isMergeKey=C7;b7.merge=B1});var b$=P((v7)=>{var x7=T$(),c6=_1(),g7=I2(),i6=j(),C$=_0();function y7($,Z,{key:Q,value:X}){if(i6.isNode(Q)&&Q.addToJSMap)Q.addToJSMap($,Z,X);else if(c6.isMergeKey($,Q))c6.addMergeToJSMap($,Z,X);else{let z=C$.toJS(Q,"",$);if(Z instanceof Map)Z.set(z,C$.toJS(X,z,$));else if(Z instanceof Set)Z.add(z);else{let J=h7(Q,z,$),H=C$.toJS(X,J,$);if(J in Z)Object.defineProperty(Z,J,{value:H,writable:!0,enumerable:!0,configurable:!0});else Z[J]=H}}return Z}function h7($,Z,Q){if(Z===null)return"";if(typeof Z!=="object")return String(Z);if(i6.isNode($)&&Q?.doc){let X=g7.createStringifyContext(Q.doc,{});X.anchors=new Set;for(let J of Q.anchors.keys())X.anchors.add(J.anchor);X.inFlow=!0,X.inStringifyKey=!0;let z=$.toString(X);if(!Q.mapKeyWarned){let J=JSON.stringify(z);if(J.length>40)J=J.substring(0,36)+'..."';x7.warn(Q.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${J}. Set mapAsMap: true to use object keys.`),Q.mapKeyWarned=!0}return z}return JSON.stringify(Z)}v7.addPairToJSMap=y7});var I0=P((p7)=>{var r6=W2(),k7=u6(),u7=b$(),O1=j();function m7($,Z,Q){let X=r6.createNode($,void 0,Q),z=r6.createNode(Z,void 0,Q);return new D1(X,z)}class D1{constructor($,Z=null){Object.defineProperty(this,O1.NODE_TYPE,{value:O1.PAIR}),this.key=$,this.value=Z}clone($){let{key:Z,value:Q}=this;if(O1.isNode(Z))Z=Z.clone($);if(O1.isNode(Q))Q=Q.clone($);return new D1(Z,Q)}toJSON($,Z){let Q=Z?.mapAsMap?new Map:{};return u7.addPairToJSMap(Z,Q,this)}toString($,Z,Q){return $?.doc?k7.stringifyPair(this,$,Z,Q):JSON.stringify(this)}}p7.Pair=D1;p7.createPair=m7});var E$=P((n7)=>{var b0=j(),n6=I2(),I1=_2();function c7($,Z,Q){return(Z.inFlow??$.flow?r7:i7)($,Z,Q)}function i7({comment:$,items:Z},Q,{blockItemPrefix:X,flowChars:z,itemIndent:J,onChompKeep:H,onComment:U}){let{indent:q,options:{commentString:Y}}=Q,G=Object.assign({},Q,{indent:J,type:null}),V=!1,B=[];for(let D=0;D<Z.length;++D){let W=Z[D],O=null;if(b0.isNode(W)){if(!V&&W.spaceBefore)B.push("");if(K1(Q,B,W.commentBefore,V),W.comment)O=W.comment}else if(b0.isPair(W)){let N=b0.isNode(W.key)?W.key:null;if(N){if(!V&&N.spaceBefore)B.push("");K1(Q,B,N.commentBefore,V)}}V=!1;let I=n6.stringify(W,G,()=>O=null,()=>V=!0);if(O)I+=I1.lineComment(I,J,Y(O));if(V&&O)V=!1;B.push(X+I)}let _;if(B.length===0)_=z.start+z.end;else{_=B[0];for(let D=1;D<B.length;++D){let W=B[D];_+=W?`
45
45
  ${q}${W}`:`
46
46
  `}}if($){if(_+=`
47
- `+Y2.indentComment(Y($),q),U)U()}else if(G&&H)H();return _}function K7({items:$},Z,{flowChars:Q,itemIndent:X}){let{indent:z,indentStep:J,flowCollectionPadding:H,options:{commentString:U}}=Z;X+=J;let q=Object.assign({},Z,{indent:X,inFlow:!0,type:null}),Y=!1,B=0,G=[];for(let D=0;D<$.length;++D){let W=$[D],O=null;if(R0.isNode(W)){if(W.spaceBefore)G.push("");if(B2(Z,G,W.commentBefore,!1),W.comment)O=W.comment}else if(R0.isPair(W)){let R=R0.isNode(W.key)?W.key:null;if(R){if(R.spaceBefore)G.push("");if(B2(Z,G,R.commentBefore,!1),R.comment)Y=!0}let N=R0.isNode(W.value)?W.value:null;if(N){if(N.comment)O=N.comment;if(N.commentBefore)Y=!0}else if(W.value==null&&R?.comment)O=R.comment}if(O)Y=!0;let I=S6.stringify(W,q,()=>O=null);if(Y||(Y=G.length>B||I.includes(`
48
- `)),D<$.length-1)I+=",";else if(Z.options.trailingComma){if(Z.options.lineWidth>0)Y||(Y=G.reduce((R,N)=>R+N.length+2,2)+(I.length+2)>Z.options.lineWidth);if(Y)I+=","}if(O)I+=Y2.lineComment(I,X,U(O));G.push(I),B=G.length}let{start:V,end:_}=Q;if(G.length===0)return V+_;else{if(!Y){let D=G.reduce((W,O)=>W+O.length+2,2);Y=Z.options.lineWidth>0&&D>Z.options.lineWidth}if(Y){let D=V;for(let W of G)D+=W?`
47
+ `+I1.indentComment(Y($),q),U)U()}else if(V&&H)H();return _}function r7({items:$},Z,{flowChars:Q,itemIndent:X}){let{indent:z,indentStep:J,flowCollectionPadding:H,options:{commentString:U}}=Z;X+=J;let q=Object.assign({},Z,{indent:X,inFlow:!0,type:null}),Y=!1,G=0,V=[];for(let D=0;D<$.length;++D){let W=$[D],O=null;if(b0.isNode(W)){if(W.spaceBefore)V.push("");if(K1(Z,V,W.commentBefore,!1),W.comment)O=W.comment}else if(b0.isPair(W)){let N=b0.isNode(W.key)?W.key:null;if(N){if(N.spaceBefore)V.push("");if(K1(Z,V,N.commentBefore,!1),N.comment)Y=!0}let F=b0.isNode(W.value)?W.value:null;if(F){if(F.comment)O=F.comment;if(F.commentBefore)Y=!0}else if(W.value==null&&N?.comment)O=N.comment}if(O)Y=!0;let I=n6.stringify(W,q,()=>O=null);if(Y||(Y=V.length>G||I.includes(`
48
+ `)),D<$.length-1)I+=",";else if(Z.options.trailingComma){if(Z.options.lineWidth>0)Y||(Y=V.reduce((N,F)=>N+F.length+2,2)+(I.length+2)>Z.options.lineWidth);if(Y)I+=","}if(O)I+=I1.lineComment(I,X,U(O));V.push(I),G=V.length}let{start:B,end:_}=Q;if(V.length===0)return B+_;else{if(!Y){let D=V.reduce((W,O)=>W+O.length+2,2);Y=Z.options.lineWidth>0&&D>Z.options.lineWidth}if(Y){let D=B;for(let W of V)D+=W?`
49
49
  ${J}${z}${W}`:`
50
50
  `;return`${D}
51
- ${z}${_}`}else return`${V}${H}${G.join(" ")}${H}${_}`}}function B2({indent:$,options:{commentString:Z}},Q,X,z){if(X&&z)X=X.replace(/^\n+/,"");if(X){let J=Y2.indentComment(Z(X),$);Q.push(J.trimStart())}}M7.stringifyCollection=D7});var G0=F((P7)=>{var R7=K$(),F7=I$(),N7=e1(),B0=w(),G2=Y0(),A7=h();function V1($,Z){let Q=B0.isScalar(Z)?Z.value:Z;for(let X of $)if(B0.isPair(X)){if(X.key===Z||X.key===Q)return X;if(B0.isScalar(X.key)&&X.key.value===Q)return X}return}class j6 extends N7.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor($){super(B0.MAP,$);this.items=[]}static from($,Z,Q){let{keepUndefined:X,replacer:z}=Q,J=new this($),H=(U,q)=>{if(typeof z==="function")q=z.call(Z,U,q);else if(Array.isArray(z)&&!z.includes(U))return;if(q!==void 0||X)J.items.push(G2.createPair(U,q,Q))};if(Z instanceof Map)for(let[U,q]of Z)H(U,q);else if(Z&&typeof Z==="object")for(let U of Object.keys(Z))H(U,Z[U]);if(typeof $.sortMapEntries==="function")J.items.sort($.sortMapEntries);return J}add($,Z){let Q;if(B0.isPair($))Q=$;else if(!$||typeof $!=="object"||!("key"in $))Q=new G2.Pair($,$?.value);else Q=new G2.Pair($.key,$.value);let X=V1(this.items,Q.key),z=this.schema?.sortMapEntries;if(X){if(!Z)throw Error(`Key ${Q.key} already set`);if(B0.isScalar(X.value)&&A7.isScalarValue(Q.value))X.value.value=Q.value;else X.value=Q.value}else if(z){let J=this.items.findIndex((H)=>z(Q,H)<0);if(J===-1)this.items.push(Q);else this.items.splice(J,0,Q)}else this.items.push(Q)}delete($){let Z=V1(this.items,$);if(!Z)return!1;return this.items.splice(this.items.indexOf(Z),1).length>0}get($,Z){let X=V1(this.items,$)?.value;return(!Z&&B0.isScalar(X)?X.value:X)??void 0}has($){return!!V1(this.items,$)}set($,Z){this.add(new G2.Pair($,Z),!0)}toJSON($,Z,Q){let X=Q?new Q:Z?.mapAsMap?new Map:{};if(Z?.onCreate)Z.onCreate(X);for(let z of this.items)F7.addPairToJSMap(Z,X,z);return X}toString($,Z,Q){if(!$)return JSON.stringify(this);for(let X of this.items)if(!B0.isPair(X))throw Error(`Map items must all be pairs; found ${JSON.stringify(X)} instead`);if(!$.allNullValues&&this.hasAllNullValues(!1))$=Object.assign({},$,{allNullValues:!0});return R7.stringifyCollection(this,$,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:$.indent||"",onChompKeep:Q,onComment:Z})}}P7.YAMLMap=j6;P7.findPair=V1});var v0=F((E7)=>{var w7=w(),x6=G0(),b7={collection:"map",default:!0,nodeClass:x6.YAMLMap,tag:"tag:yaml.org,2002:map",resolve($,Z){if(!w7.isMap($))Z("Expected a mapping for this tag");return $},createNode:($,Z,Q)=>x6.YAMLMap.from($,Z,Q)};E7.map=b7});var V0=F((v7)=>{var j7=H1(),x7=K$(),g7=e1(),W2=w(),h7=h(),y7=H0();class g6 extends g7.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor($){super(W2.SEQ,$);this.items=[]}add($){this.items.push($)}delete($){let Z=V2($);if(typeof Z!=="number")return!1;return this.items.splice(Z,1).length>0}get($,Z){let Q=V2($);if(typeof Q!=="number")return;let X=this.items[Q];return!Z&&W2.isScalar(X)?X.value:X}has($){let Z=V2($);return typeof Z==="number"&&Z<this.items.length}set($,Z){let Q=V2($);if(typeof Q!=="number")throw Error(`Expected a valid index, not ${$}.`);let X=this.items[Q];if(W2.isScalar(X)&&h7.isScalarValue(Z))X.value=Z;else this.items[Q]=Z}toJSON($,Z){let Q=[];if(Z?.onCreate)Z.onCreate(Q);let X=0;for(let z of this.items)Q.push(y7.toJS(z,String(X++),Z));return Q}toString($,Z,Q){if(!$)return JSON.stringify(this);return x7.stringifyCollection(this,$,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:($.indent||"")+" ",onChompKeep:Q,onComment:Z})}static from($,Z,Q){let{replacer:X}=Q,z=new this($);if(Z&&Symbol.iterator in Object(Z)){let J=0;for(let H of Z){if(typeof X==="function"){let U=Z instanceof Set?H:String(J++);H=X.call(Z,U,H)}z.items.push(j7.createNode(H,void 0,Q))}}return z}}function V2($){let Z=W2.isScalar($)?$.value:$;if(Z&&typeof Z==="string")Z=Number(Z);return typeof Z==="number"&&Number.isInteger(Z)&&Z>=0?Z:null}v7.YAMLSeq=g6});var f0=F((m7)=>{var k7=w(),h6=V0(),u7={collection:"seq",default:!0,nodeClass:h6.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve($,Z){if(!k7.isSeq($))Z("Expected a sequence for this tag");return $},createNode:($,Z,Q)=>h6.YAMLSeq.from($,Z,Q)};m7.seq=u7});var W1=F((c7)=>{var p7=Y1(),d7={identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify($,Z,Q,X){return Z=Object.assign({actualString:!0},Z),p7.stringifyString($,Z,Q,X)}};c7.string=d7});var _2=F((r7)=>{var y6=h(),v6={identify:($)=>$==null,createNode:()=>new y6.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new y6.Scalar(null),stringify:({source:$},Z)=>typeof $==="string"&&v6.test.test($)?$:Z.options.nullStr};r7.nullTag=v6});var M$=F((s7)=>{var n7=h(),f6={identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:($)=>new n7.Scalar($[0]==="t"||$[0]==="T"),stringify({source:$,value:Z},Q){if($&&f6.test.test($)){let X=$[0]==="t"||$[0]==="T";if(Z===X)return $}return Z?Q.options.trueStr:Q.options.falseStr}};s7.boolTag=f6});var k0=F((e7)=>{function t7({format:$,minFractionDigits:Z,tag:Q,value:X}){if(typeof X==="bigint")return String(X);let z=typeof X==="number"?X:Number(X);if(!isFinite(z))return isNaN(z)?".nan":z<0?"-.inf":".inf";let J=Object.is(X,-0)?"-0":JSON.stringify(X);if(!$&&Z&&(!Q||Q==="tag:yaml.org,2002:float")&&/^-?\d/.test(J)&&!J.includes("e")){let H=J.indexOf(".");if(H<0)H=J.length,J+=".";let U=Z-(J.length-H-1);while(U-- >0)J+="0"}return J}e7.stringifyNumber=t7});var R$=F((JQ)=>{var ZQ=h(),L$=k0(),QQ={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:L$.stringifyNumber},XQ={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($),stringify($){let Z=Number($.value);return isFinite(Z)?Z.toExponential():L$.stringifyNumber($)}},zQ={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve($){let Z=new ZQ.Scalar(parseFloat($)),Q=$.indexOf(".");if(Q!==-1&&$[$.length-1]==="0")Z.minFractionDigits=$.length-Q-1;return Z},stringify:L$.stringifyNumber};JQ.float=zQ;JQ.floatExp=XQ;JQ.floatNaN=QQ});var N$=F((VQ)=>{var k6=k0(),O2=($)=>typeof $==="bigint"||Number.isInteger($),F$=($,Z,Q,{intAsBigInt:X})=>X?BigInt($):parseInt($.substring(Z),Q);function u6($,Z,Q){let{value:X}=$;if(O2(X)&&X>=0)return Q+X.toString(Z);return k6.stringifyNumber($)}var YQ={identify:($)=>O2($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:($,Z,Q)=>F$($,2,8,Q),stringify:($)=>u6($,8,"0o")},BQ={identify:O2,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:($,Z,Q)=>F$($,0,10,Q),stringify:k6.stringifyNumber},GQ={identify:($)=>O2($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:($,Z,Q)=>F$($,2,16,Q),stringify:($)=>u6($,16,"0x")};VQ.int=BQ;VQ.intHex=GQ;VQ.intOct=YQ});var m6=F((FQ)=>{var DQ=v0(),IQ=_2(),KQ=f0(),MQ=W1(),LQ=M$(),A$=R$(),P$=N$(),RQ=[DQ.map,KQ.seq,MQ.string,IQ.nullTag,LQ.boolTag,P$.intOct,P$.int,P$.intHex,A$.floatNaN,A$.floatExp,A$.float];FQ.schema=RQ});var p6=F((EQ)=>{var AQ=h(),PQ=v0(),TQ=f0();function l6($){return typeof $==="bigint"||Number.isInteger($)}var D2=({value:$})=>JSON.stringify($),CQ=[{identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify:D2},{identify:($)=>$==null,createNode:()=>new AQ.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:D2},{identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:($)=>$==="true",stringify:D2},{identify:l6,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:($,Z,{intAsBigInt:Q})=>Q?BigInt($):parseInt($,10),stringify:({value:$})=>l6($)?$.toString():JSON.stringify($)},{identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:($)=>parseFloat($),stringify:D2}],wQ={default:!0,tag:"",test:/^/,resolve($,Z){return Z(`Unresolved plain scalar ${JSON.stringify($)}`),$}},bQ=[PQ.map,TQ.seq].concat(CQ,wQ);EQ.schema=bQ});var C$=F((gQ)=>{var _1=t0("buffer"),T$=h(),jQ=Y1(),xQ={identify:($)=>$ instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve($,Z){if(typeof _1.Buffer==="function")return _1.Buffer.from($,"base64");else if(typeof atob==="function"){let Q=atob($.replace(/[\n\r]/g,"")),X=new Uint8Array(Q.length);for(let z=0;z<Q.length;++z)X[z]=Q.charCodeAt(z);return X}else return Z("This environment does not support reading binary tags; either Buffer or atob is required"),$},stringify({comment:$,type:Z,value:Q},X,z,J){if(!Q)return"";let H=Q,U;if(typeof _1.Buffer==="function")U=H instanceof _1.Buffer?H.toString("base64"):_1.Buffer.from(H.buffer).toString("base64");else if(typeof btoa==="function"){let q="";for(let Y=0;Y<H.length;++Y)q+=String.fromCharCode(H[Y]);U=btoa(q)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(Z??(Z=T$.Scalar.BLOCK_LITERAL),Z!==T$.Scalar.QUOTE_DOUBLE){let q=Math.max(X.options.lineWidth-X.indent.length,X.options.minContentWidth),Y=Math.ceil(U.length/q),B=Array(Y);for(let G=0,V=0;G<Y;++G,V+=q)B[G]=U.substr(V,q);U=B.join(Z===T$.Scalar.BLOCK_LITERAL?`
52
- `:" ")}return jQ.stringifyString({comment:$,type:Z,value:U},X,z,J)}};gQ.binary=xQ});var K2=F((kQ)=>{var I2=w(),w$=Y0(),yQ=h(),vQ=V0();function d6($,Z){if(I2.isSeq($))for(let Q=0;Q<$.items.length;++Q){let X=$.items[Q];if(I2.isPair(X))continue;else if(I2.isMap(X)){if(X.items.length>1)Z("Each pair must have its own sequence indicator");let z=X.items[0]||new w$.Pair(new yQ.Scalar(null));if(X.commentBefore)z.key.commentBefore=z.key.commentBefore?`${X.commentBefore}
51
+ ${z}${_}`}else return`${B}${H}${V.join(" ")}${H}${_}`}}function K1({indent:$,options:{commentString:Z}},Q,X,z){if(X&&z)X=X.replace(/^\n+/,"");if(X){let J=I1.indentComment(Z(X),$);Q.push(J.trimStart())}}n7.stringifyCollection=c7});var L0=P(($Q)=>{var s7=E$(),o7=b$(),t7=U1(),K0=j(),L1=I0(),e7=h();function L2($,Z){let Q=K0.isScalar(Z)?Z.value:Z;for(let X of $)if(K0.isPair(X)){if(X.key===Z||X.key===Q)return X;if(K0.isScalar(X.key)&&X.key.value===Q)return X}return}class a6 extends t7.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor($){super(K0.MAP,$);this.items=[]}static from($,Z,Q){let{keepUndefined:X,replacer:z}=Q,J=new this($),H=(U,q)=>{if(typeof z==="function")q=z.call(Z,U,q);else if(Array.isArray(z)&&!z.includes(U))return;if(q!==void 0||X)J.items.push(L1.createPair(U,q,Q))};if(Z instanceof Map)for(let[U,q]of Z)H(U,q);else if(Z&&typeof Z==="object")for(let U of Object.keys(Z))H(U,Z[U]);if(typeof $.sortMapEntries==="function")J.items.sort($.sortMapEntries);return J}add($,Z){let Q;if(K0.isPair($))Q=$;else if(!$||typeof $!=="object"||!("key"in $))Q=new L1.Pair($,$?.value);else Q=new L1.Pair($.key,$.value);let X=L2(this.items,Q.key),z=this.schema?.sortMapEntries;if(X){if(!Z)throw Error(`Key ${Q.key} already set`);if(K0.isScalar(X.value)&&e7.isScalarValue(Q.value))X.value.value=Q.value;else X.value=Q.value}else if(z){let J=this.items.findIndex((H)=>z(Q,H)<0);if(J===-1)this.items.push(Q);else this.items.splice(J,0,Q)}else this.items.push(Q)}delete($){let Z=L2(this.items,$);if(!Z)return!1;return this.items.splice(this.items.indexOf(Z),1).length>0}get($,Z){let X=L2(this.items,$)?.value;return(!Z&&K0.isScalar(X)?X.value:X)??void 0}has($){return!!L2(this.items,$)}set($,Z){this.add(new L1.Pair($,Z),!0)}toJSON($,Z,Q){let X=Q?new Q:Z?.mapAsMap?new Map:{};if(Z?.onCreate)Z.onCreate(X);for(let z of this.items)o7.addPairToJSMap(Z,X,z);return X}toString($,Z,Q){if(!$)return JSON.stringify(this);for(let X of this.items)if(!K0.isPair(X))throw Error(`Map items must all be pairs; found ${JSON.stringify(X)} instead`);if(!$.allNullValues&&this.hasAllNullValues(!1))$=Object.assign({},$,{allNullValues:!0});return s7.stringifyCollection(this,$,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:$.indent||"",onChompKeep:Q,onComment:Z})}}$Q.YAMLMap=a6;$Q.findPair=L2});var c0=P((JQ)=>{var XQ=j(),s6=L0(),zQ={collection:"map",default:!0,nodeClass:s6.YAMLMap,tag:"tag:yaml.org,2002:map",resolve($,Z){if(!XQ.isMap($))Z("Expected a mapping for this tag");return $},createNode:($,Z,Q)=>s6.YAMLMap.from($,Z,Q)};JQ.map=zQ});var R0=P((BQ)=>{var UQ=W2(),qQ=E$(),YQ=U1(),M1=j(),GQ=h(),VQ=_0();class o6 extends YQ.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor($){super(M1.SEQ,$);this.items=[]}add($){this.items.push($)}delete($){let Z=R1($);if(typeof Z!=="number")return!1;return this.items.splice(Z,1).length>0}get($,Z){let Q=R1($);if(typeof Q!=="number")return;let X=this.items[Q];return!Z&&M1.isScalar(X)?X.value:X}has($){let Z=R1($);return typeof Z==="number"&&Z<this.items.length}set($,Z){let Q=R1($);if(typeof Q!=="number")throw Error(`Expected a valid index, not ${$}.`);let X=this.items[Q];if(M1.isScalar(X)&&GQ.isScalarValue(Z))X.value=Z;else this.items[Q]=Z}toJSON($,Z){let Q=[];if(Z?.onCreate)Z.onCreate(Q);let X=0;for(let z of this.items)Q.push(VQ.toJS(z,String(X++),Z));return Q}toString($,Z,Q){if(!$)return JSON.stringify(this);return qQ.stringifyCollection(this,$,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:($.indent||"")+" ",onChompKeep:Q,onComment:Z})}static from($,Z,Q){let{replacer:X}=Q,z=new this($);if(Z&&Symbol.iterator in Object(Z)){let J=0;for(let H of Z){if(typeof X==="function"){let U=Z instanceof Set?H:String(J++);H=X.call(Z,U,H)}z.items.push(UQ.createNode(H,void 0,Q))}}return z}}function R1($){let Z=M1.isScalar($)?$.value:$;if(Z&&typeof Z==="string")Z=Number(Z);return typeof Z==="number"&&Number.isInteger(Z)&&Z>=0?Z:null}BQ.YAMLSeq=o6});var i0=P((DQ)=>{var _Q=j(),t6=R0(),OQ={collection:"seq",default:!0,nodeClass:t6.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve($,Z){if(!_Q.isSeq($))Z("Expected a sequence for this tag");return $},createNode:($,Z,Q)=>t6.YAMLSeq.from($,Z,Q)};DQ.seq=OQ});var R2=P((RQ)=>{var KQ=D2(),LQ={identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify($,Z,Q,X){return Z=Object.assign({actualString:!0},Z),KQ.stringifyString($,Z,Q,X)}};RQ.string=LQ});var F1=P((FQ)=>{var e6=h(),$9={identify:($)=>$==null,createNode:()=>new e6.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new e6.Scalar(null),stringify:({source:$},Z)=>typeof $==="string"&&$9.test.test($)?$:Z.options.nullStr};FQ.nullTag=$9});var j$=P((AQ)=>{var PQ=h(),Z9={identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:($)=>new PQ.Scalar($[0]==="t"||$[0]==="T"),stringify({source:$,value:Z},Q){if($&&Z9.test.test($)){let X=$[0]==="t"||$[0]==="T";if(Z===X)return $}return Z?Q.options.trueStr:Q.options.falseStr}};AQ.boolTag=Z9});var r0=P((CQ)=>{function wQ({format:$,minFractionDigits:Z,tag:Q,value:X}){if(typeof X==="bigint")return String(X);let z=typeof X==="number"?X:Number(X);if(!isFinite(z))return isNaN(z)?".nan":z<0?"-.inf":".inf";let J=Object.is(X,-0)?"-0":JSON.stringify(X);if(!$&&Z&&(!Q||Q==="tag:yaml.org,2002:float")&&/^-?\d/.test(J)&&!J.includes("e")){let H=J.indexOf(".");if(H<0)H=J.length,J+=".";let U=Z-(J.length-H-1);while(U-- >0)J+="0"}return J}CQ.stringifyNumber=wQ});var x$=P((gQ)=>{var EQ=h(),S$=r0(),jQ={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:S$.stringifyNumber},SQ={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($),stringify($){let Z=Number($.value);return isFinite(Z)?Z.toExponential():S$.stringifyNumber($)}},xQ={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve($){let Z=new EQ.Scalar(parseFloat($)),Q=$.indexOf(".");if(Q!==-1&&$[$.length-1]==="0")Z.minFractionDigits=$.length-Q-1;return Z},stringify:S$.stringifyNumber};gQ.float=xQ;gQ.floatExp=SQ;gQ.floatNaN=jQ});var y$=P((mQ)=>{var Q9=r0(),N1=($)=>typeof $==="bigint"||Number.isInteger($),g$=($,Z,Q,{intAsBigInt:X})=>X?BigInt($):parseInt($.substring(Z),Q);function X9($,Z,Q){let{value:X}=$;if(N1(X)&&X>=0)return Q+X.toString(Z);return Q9.stringifyNumber($)}var fQ={identify:($)=>N1($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:($,Z,Q)=>g$($,2,8,Q),stringify:($)=>X9($,8,"0o")},kQ={identify:N1,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:($,Z,Q)=>g$($,0,10,Q),stringify:Q9.stringifyNumber},uQ={identify:($)=>N1($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:($,Z,Q)=>g$($,2,16,Q),stringify:($)=>X9($,16,"0x")};mQ.int=kQ;mQ.intHex=uQ;mQ.intOct=fQ});var z9=P((oQ)=>{var cQ=c0(),iQ=F1(),rQ=i0(),nQ=R2(),aQ=j$(),h$=x$(),v$=y$(),sQ=[cQ.map,rQ.seq,nQ.string,iQ.nullTag,aQ.boolTag,v$.intOct,v$.int,v$.intHex,h$.floatNaN,h$.floatExp,h$.float];oQ.schema=sQ});var H9=P((JX)=>{var eQ=h(),$X=c0(),ZX=i0();function J9($){return typeof $==="bigint"||Number.isInteger($)}var P1=({value:$})=>JSON.stringify($),QX=[{identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify:P1},{identify:($)=>$==null,createNode:()=>new eQ.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:P1},{identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:($)=>$==="true",stringify:P1},{identify:J9,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:($,Z,{intAsBigInt:Q})=>Q?BigInt($):parseInt($,10),stringify:({value:$})=>J9($)?$.toString():JSON.stringify($)},{identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:($)=>parseFloat($),stringify:P1}],XX={default:!0,tag:"",test:/^/,resolve($,Z){return Z(`Unresolved plain scalar ${JSON.stringify($)}`),$}},zX=[$X.map,ZX.seq].concat(QX,XX);JX.schema=zX});var k$=P((YX)=>{var M2=H2("buffer"),f$=h(),UX=D2(),qX={identify:($)=>$ instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve($,Z){if(typeof M2.Buffer==="function")return M2.Buffer.from($,"base64");else if(typeof atob==="function"){let Q=atob($.replace(/[\n\r]/g,"")),X=new Uint8Array(Q.length);for(let z=0;z<Q.length;++z)X[z]=Q.charCodeAt(z);return X}else return Z("This environment does not support reading binary tags; either Buffer or atob is required"),$},stringify({comment:$,type:Z,value:Q},X,z,J){if(!Q)return"";let H=Q,U;if(typeof M2.Buffer==="function")U=H instanceof M2.Buffer?H.toString("base64"):M2.Buffer.from(H.buffer).toString("base64");else if(typeof btoa==="function"){let q="";for(let Y=0;Y<H.length;++Y)q+=String.fromCharCode(H[Y]);U=btoa(q)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(Z??(Z=f$.Scalar.BLOCK_LITERAL),Z!==f$.Scalar.QUOTE_DOUBLE){let q=Math.max(X.options.lineWidth-X.indent.length,X.options.minContentWidth),Y=Math.ceil(U.length/q),G=Array(Y);for(let V=0,B=0;V<Y;++V,B+=q)G[V]=U.substr(B,q);U=G.join(Z===f$.Scalar.BLOCK_LITERAL?`
52
+ `:" ")}return UX.stringifyString({comment:$,type:Z,value:U},X,z,J)}};YX.binary=qX});var T1=P((_X)=>{var A1=j(),u$=I0(),VX=h(),BX=R0();function U9($,Z){if(A1.isSeq($))for(let Q=0;Q<$.items.length;++Q){let X=$.items[Q];if(A1.isPair(X))continue;else if(A1.isMap(X)){if(X.items.length>1)Z("Each pair must have its own sequence indicator");let z=X.items[0]||new u$.Pair(new VX.Scalar(null));if(X.commentBefore)z.key.commentBefore=z.key.commentBefore?`${X.commentBefore}
53
53
  ${z.key.commentBefore}`:X.commentBefore;if(X.comment){let J=z.value??z.key;J.comment=J.comment?`${X.comment}
54
- ${J.comment}`:X.comment}X=z}$.items[Q]=I2.isPair(X)?X:new w$.Pair(X)}else Z("Expected a sequence for this tag");return $}function c6($,Z,Q){let{replacer:X}=Q,z=new vQ.YAMLSeq($);z.tag="tag:yaml.org,2002:pairs";let J=0;if(Z&&Symbol.iterator in Object(Z))for(let H of Z){if(typeof X==="function")H=X.call(Z,String(J++),H);let U,q;if(Array.isArray(H))if(H.length===2)U=H[0],q=H[1];else throw TypeError(`Expected [key, value] tuple: ${H}`);else if(H&&H instanceof Object){let Y=Object.keys(H);if(Y.length===1)U=Y[0],q=H[U];else throw TypeError(`Expected tuple with one key, not ${Y.length} keys`)}else U=H;z.items.push(w$.createPair(U,q,Q))}return z}var fQ={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:d6,createNode:c6};kQ.createPairs=c6;kQ.pairs=fQ;kQ.resolvePairs=d6});var E$=F((cQ)=>{var i6=w(),b$=H0(),O1=G0(),pQ=V0(),r6=K2();class F0 extends pQ.YAMLSeq{constructor(){super();this.add=O1.YAMLMap.prototype.add.bind(this),this.delete=O1.YAMLMap.prototype.delete.bind(this),this.get=O1.YAMLMap.prototype.get.bind(this),this.has=O1.YAMLMap.prototype.has.bind(this),this.set=O1.YAMLMap.prototype.set.bind(this),this.tag=F0.tag}toJSON($,Z){if(!Z)return super.toJSON($);let Q=new Map;if(Z?.onCreate)Z.onCreate(Q);for(let X of this.items){let z,J;if(i6.isPair(X))z=b$.toJS(X.key,"",Z),J=b$.toJS(X.value,z,Z);else z=b$.toJS(X,"",Z);if(Q.has(z))throw Error("Ordered maps must not include duplicate keys");Q.set(z,J)}return Q}static from($,Z,Q){let X=r6.createPairs($,Z,Q),z=new this;return z.items=X.items,z}}F0.tag="tag:yaml.org,2002:omap";var dQ={collection:"seq",identify:($)=>$ instanceof Map,nodeClass:F0,default:!1,tag:"tag:yaml.org,2002:omap",resolve($,Z){let Q=r6.resolvePairs($,Z),X=[];for(let{key:z}of Q.items)if(i6.isScalar(z))if(X.includes(z.value))Z(`Ordered maps must not include duplicate keys: ${z.value}`);else X.push(z.value);return Object.assign(new F0,Q)},createNode:($,Z,Q)=>F0.from($,Z,Q)};cQ.YAMLOMap=F0;cQ.omap=dQ});var t6=F((aQ)=>{var a6=h();function n6({value:$,source:Z},Q){if(Z&&($?s6:o6).test.test(Z))return Z;return $?Q.options.trueStr:Q.options.falseStr}var s6={identify:($)=>$===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new a6.Scalar(!0),stringify:n6},o6={identify:($)=>$===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new a6.Scalar(!1),stringify:n6};aQ.falseTag=o6;aQ.trueTag=s6});var e6=F((ZX)=>{var oQ=h(),S$=k0(),tQ={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:S$.stringifyNumber},eQ={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($.replace(/_/g,"")),stringify($){let Z=Number($.value);return isFinite(Z)?Z.toExponential():S$.stringifyNumber($)}},$X={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve($){let Z=new oQ.Scalar(parseFloat($.replace(/_/g,""))),Q=$.indexOf(".");if(Q!==-1){let X=$.substring(Q+1).replace(/_/g,"");if(X[X.length-1]==="0")Z.minFractionDigits=X.length}return Z},stringify:S$.stringifyNumber};ZX.float=$X;ZX.floatExp=eQ;ZX.floatNaN=tQ});var Z9=F((YX)=>{var $9=k0(),D1=($)=>typeof $==="bigint"||Number.isInteger($);function M2($,Z,Q,{intAsBigInt:X}){let z=$[0];if(z==="-"||z==="+")Z+=1;if($=$.substring(Z).replace(/_/g,""),X){switch(Q){case 2:$=`0b${$}`;break;case 8:$=`0o${$}`;break;case 16:$=`0x${$}`;break}let H=BigInt($);return z==="-"?BigInt(-1)*H:H}let J=parseInt($,Q);return z==="-"?-1*J:J}function j$($,Z,Q){let{value:X}=$;if(D1(X)){let z=X.toString(Z);return X<0?"-"+Q+z.substr(1):Q+z}return $9.stringifyNumber($)}var JX={identify:D1,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:($,Z,Q)=>M2($,2,2,Q),stringify:($)=>j$($,2,"0b")},HX={identify:D1,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:($,Z,Q)=>M2($,1,8,Q),stringify:($)=>j$($,8,"0")},UX={identify:D1,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:($,Z,Q)=>M2($,0,10,Q),stringify:$9.stringifyNumber},qX={identify:D1,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:($,Z,Q)=>M2($,2,16,Q),stringify:($)=>j$($,16,"0x")};YX.int=UX;YX.intBin=JX;YX.intHex=qX;YX.intOct=HX});var x$=F((OX)=>{var F2=w(),L2=Y0(),R2=G0();class N0 extends R2.YAMLMap{constructor($){super($);this.tag=N0.tag}add($){let Z;if(F2.isPair($))Z=$;else if($&&typeof $==="object"&&"key"in $&&"value"in $&&$.value===null)Z=new L2.Pair($.key,null);else Z=new L2.Pair($,null);if(!R2.findPair(this.items,Z.key))this.items.push(Z)}get($,Z){let Q=R2.findPair(this.items,$);return!Z&&F2.isPair(Q)?F2.isScalar(Q.key)?Q.key.value:Q.key:Q}set($,Z){if(typeof Z!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof Z}`);let Q=R2.findPair(this.items,$);if(Q&&!Z)this.items.splice(this.items.indexOf(Q),1);else if(!Q&&Z)this.items.push(new L2.Pair($))}toJSON($,Z){return super.toJSON($,Z,Set)}toString($,Z,Q){if(!$)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},$,{allNullValues:!0}),Z,Q);else throw Error("Set items must all have null values")}static from($,Z,Q){let{replacer:X}=Q,z=new this($);if(Z&&Symbol.iterator in Object(Z))for(let J of Z){if(typeof X==="function")J=X.call(Z,J,J);z.items.push(L2.createPair(J,null,Q))}return z}}N0.tag="tag:yaml.org,2002:set";var _X={collection:"map",identify:($)=>$ instanceof Set,nodeClass:N0,default:!1,tag:"tag:yaml.org,2002:set",createNode:($,Z,Q)=>N0.from($,Z,Q),resolve($,Z){if(F2.isMap($))if($.hasAllNullValues(!0))return Object.assign(new N0,$);else Z("Set items must all have null values");else Z("Expected a mapping for this tag");return $}};OX.YAMLSet=N0;OX.set=_X});var h$=F((RX)=>{var KX=k0();function g$($,Z){let Q=$[0],X=Q==="-"||Q==="+"?$.substring(1):$,z=(H)=>Z?BigInt(H):Number(H),J=X.replace(/_/g,"").split(":").reduce((H,U)=>H*z(60)+z(U),z(0));return Q==="-"?z(-1)*J:J}function Q9($){let{value:Z}=$,Q=(H)=>H;if(typeof Z==="bigint")Q=(H)=>BigInt(H);else if(isNaN(Z)||!isFinite(Z))return KX.stringifyNumber($);let X="";if(Z<0)X="-",Z*=Q(-1);let z=Q(60),J=[Z%z];if(Z<60)J.unshift(0);else if(Z=(Z-J[0])/z,J.unshift(Z%z),Z>=60)Z=(Z-J[0])/z,J.unshift(Z);return X+J.map((H)=>String(H).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var MX={identify:($)=>typeof $==="bigint"||Number.isInteger($),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:($,Z,{intAsBigInt:Q})=>g$($,Q),stringify:Q9},LX={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:($)=>g$($,!1),stringify:Q9},X9={identify:($)=>$ 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($){let Z=$.match(X9.test);if(!Z)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,Q,X,z,J,H,U]=Z.map(Number),q=Z[7]?Number((Z[7]+"00").substr(1,3)):0,Y=Date.UTC(Q,X-1,z,J||0,H||0,U||0,q),B=Z[8];if(B&&B!=="Z"){let G=g$(B,!1);if(Math.abs(G)<30)G*=60;Y-=60000*G}return new Date(Y)},stringify:({value:$})=>$?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};RX.floatTime=LX;RX.intTime=MX;RX.timestamp=X9});var J9=F((hX)=>{var PX=v0(),TX=_2(),CX=f0(),wX=W1(),bX=C$(),z9=t6(),y$=e6(),N2=Z9(),EX=H2(),SX=E$(),jX=K2(),xX=x$(),v$=h$(),gX=[PX.map,CX.seq,wX.string,TX.nullTag,z9.trueTag,z9.falseTag,N2.intBin,N2.intOct,N2.int,N2.intHex,y$.floatNaN,y$.floatExp,y$.float,bX.binary,EX.merge,SX.omap,jX.pairs,xX.set,v$.intTime,v$.floatTime,v$.timestamp];hX.schema=gX});var O9=F((dX)=>{var Y9=v0(),vX=_2(),B9=f0(),fX=W1(),kX=M$(),f$=R$(),k$=N$(),uX=m6(),mX=p6(),G9=C$(),I1=H2(),V9=E$(),W9=K2(),H9=J9(),_9=x$(),A2=h$(),U9=new Map([["core",uX.schema],["failsafe",[Y9.map,B9.seq,fX.string]],["json",mX.schema],["yaml11",H9.schema],["yaml-1.1",H9.schema]]),q9={binary:G9.binary,bool:kX.boolTag,float:f$.float,floatExp:f$.floatExp,floatNaN:f$.floatNaN,floatTime:A2.floatTime,int:k$.int,intHex:k$.intHex,intOct:k$.intOct,intTime:A2.intTime,map:Y9.map,merge:I1.merge,null:vX.nullTag,omap:V9.omap,pairs:W9.pairs,seq:B9.seq,set:_9.set,timestamp:A2.timestamp},lX={"tag:yaml.org,2002:binary":G9.binary,"tag:yaml.org,2002:merge":I1.merge,"tag:yaml.org,2002:omap":V9.omap,"tag:yaml.org,2002:pairs":W9.pairs,"tag:yaml.org,2002:set":_9.set,"tag:yaml.org,2002:timestamp":A2.timestamp};function pX($,Z,Q){let X=U9.get(Z);if(X&&!$)return Q&&!X.includes(I1.merge)?X.concat(I1.merge):X.slice();let z=X;if(!z)if(Array.isArray($))z=[];else{let J=Array.from(U9.keys()).filter((H)=>H!=="yaml11").map((H)=>JSON.stringify(H)).join(", ");throw Error(`Unknown schema "${Z}"; use one of ${J} or define customTags array`)}if(Array.isArray($))for(let J of $)z=z.concat(J);else if(typeof $==="function")z=$(z.slice());if(Q)z=z.concat(I1.merge);return z.reduce((J,H)=>{let U=typeof H==="string"?q9[H]:H;if(!U){let q=JSON.stringify(H),Y=Object.keys(q9).map((B)=>JSON.stringify(B)).join(", ");throw Error(`Unknown custom tag ${q}; use one of ${Y}`)}if(!J.includes(U))J.push(U);return J},[])}dX.coreKnownTags=lX;dX.getTags=pX});var l$=F((oX)=>{var u$=w(),rX=v0(),aX=f0(),nX=W1(),P2=O9(),sX=($,Z)=>$.key<Z.key?-1:$.key>Z.key?1:0;class m${constructor({compat:$,customTags:Z,merge:Q,resolveKnownTags:X,schema:z,sortMapEntries:J,toStringDefaults:H}){this.compat=Array.isArray($)?P2.getTags($,"compat"):$?P2.getTags(null,$):null,this.name=typeof z==="string"&&z||"core",this.knownTags=X?P2.coreKnownTags:{},this.tags=P2.getTags(Z,this.name,Q),this.toStringOptions=H??null,Object.defineProperty(this,u$.MAP,{value:rX.map}),Object.defineProperty(this,u$.SCALAR,{value:nX.string}),Object.defineProperty(this,u$.SEQ,{value:aX.seq}),this.sortMapEntries=typeof J==="function"?J:J===!0?sX:null}clone(){let $=Object.create(m$.prototype,Object.getOwnPropertyDescriptors(this));return $.tags=this.tags.slice(),$}}oX.Schema=m$});var D9=F((Zz)=>{var eX=w(),p$=B1(),K1=U1();function $z($,Z){let Q=[],X=Z.directives===!0;if(Z.directives!==!1&&$.directives){let q=$.directives.toString($);if(q)Q.push(q),X=!0;else if($.directives.docStart)X=!0}if(X)Q.push("---");let z=p$.createStringifyContext($,Z),{commentString:J}=z.options;if($.commentBefore){if(Q.length!==1)Q.unshift("");let q=J($.commentBefore);Q.unshift(K1.indentComment(q,""))}let H=!1,U=null;if($.contents){if(eX.isNode($.contents)){if($.contents.spaceBefore&&X)Q.push("");if($.contents.commentBefore){let B=J($.contents.commentBefore);Q.push(K1.indentComment(B,""))}z.forceBlockIndent=!!$.comment,U=$.contents.comment}let q=U?void 0:()=>H=!0,Y=p$.stringify($.contents,z,()=>U=null,q);if(U)Y+=K1.lineComment(Y,"",J(U));if((Y[0]==="|"||Y[0]===">")&&Q[Q.length-1]==="---")Q[Q.length-1]=`--- ${Y}`;else Q.push(Y)}else Q.push(p$.stringify($.contents,z));if($.directives?.docEnd)if($.comment){let q=J($.comment);if(q.includes(`
55
- `))Q.push("..."),Q.push(K1.indentComment(q,""));else Q.push(`... ${q}`)}else Q.push("...");else{let q=$.comment;if(q&&H)q=q.replace(/^\n+/,"");if(q){if((!H||U)&&Q[Q.length-1]!=="")Q.push("");Q.push(K1.indentComment(J(q),""))}}return Q.join(`
54
+ ${J.comment}`:X.comment}X=z}$.items[Q]=A1.isPair(X)?X:new u$.Pair(X)}else Z("Expected a sequence for this tag");return $}function q9($,Z,Q){let{replacer:X}=Q,z=new BX.YAMLSeq($);z.tag="tag:yaml.org,2002:pairs";let J=0;if(Z&&Symbol.iterator in Object(Z))for(let H of Z){if(typeof X==="function")H=X.call(Z,String(J++),H);let U,q;if(Array.isArray(H))if(H.length===2)U=H[0],q=H[1];else throw TypeError(`Expected [key, value] tuple: ${H}`);else if(H&&H instanceof Object){let Y=Object.keys(H);if(Y.length===1)U=Y[0],q=H[U];else throw TypeError(`Expected tuple with one key, not ${Y.length} keys`)}else U=H;z.items.push(u$.createPair(U,q,Q))}return z}var WX={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:U9,createNode:q9};_X.createPairs=q9;_X.pairs=WX;_X.resolvePairs=U9});var p$=P((RX)=>{var Y9=j(),m$=_0(),F2=L0(),KX=R0(),G9=T1();class E0 extends KX.YAMLSeq{constructor(){super();this.add=F2.YAMLMap.prototype.add.bind(this),this.delete=F2.YAMLMap.prototype.delete.bind(this),this.get=F2.YAMLMap.prototype.get.bind(this),this.has=F2.YAMLMap.prototype.has.bind(this),this.set=F2.YAMLMap.prototype.set.bind(this),this.tag=E0.tag}toJSON($,Z){if(!Z)return super.toJSON($);let Q=new Map;if(Z?.onCreate)Z.onCreate(Q);for(let X of this.items){let z,J;if(Y9.isPair(X))z=m$.toJS(X.key,"",Z),J=m$.toJS(X.value,z,Z);else z=m$.toJS(X,"",Z);if(Q.has(z))throw Error("Ordered maps must not include duplicate keys");Q.set(z,J)}return Q}static from($,Z,Q){let X=G9.createPairs($,Z,Q),z=new this;return z.items=X.items,z}}E0.tag="tag:yaml.org,2002:omap";var LX={collection:"seq",identify:($)=>$ instanceof Map,nodeClass:E0,default:!1,tag:"tag:yaml.org,2002:omap",resolve($,Z){let Q=G9.resolvePairs($,Z),X=[];for(let{key:z}of Q.items)if(Y9.isScalar(z))if(X.includes(z.value))Z(`Ordered maps must not include duplicate keys: ${z.value}`);else X.push(z.value);return Object.assign(new E0,Q)},createNode:($,Z,Q)=>E0.from($,Z,Q)};RX.YAMLOMap=E0;RX.omap=LX});var O9=P((NX)=>{var V9=h();function B9({value:$,source:Z},Q){if(Z&&($?W9:_9).test.test(Z))return Z;return $?Q.options.trueStr:Q.options.falseStr}var W9={identify:($)=>$===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new V9.Scalar(!0),stringify:B9},_9={identify:($)=>$===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new V9.Scalar(!1),stringify:B9};NX.falseTag=_9;NX.trueTag=W9});var D9=P((EX)=>{var TX=h(),l$=r0(),wX={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:l$.stringifyNumber},CX={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($.replace(/_/g,"")),stringify($){let Z=Number($.value);return isFinite(Z)?Z.toExponential():l$.stringifyNumber($)}},bX={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve($){let Z=new TX.Scalar(parseFloat($.replace(/_/g,""))),Q=$.indexOf(".");if(Q!==-1){let X=$.substring(Q+1).replace(/_/g,"");if(X[X.length-1]==="0")Z.minFractionDigits=X.length}return Z},stringify:l$.stringifyNumber};EX.float=bX;EX.floatExp=CX;EX.floatNaN=wX});var K9=P((fX)=>{var I9=r0(),N2=($)=>typeof $==="bigint"||Number.isInteger($);function w1($,Z,Q,{intAsBigInt:X}){let z=$[0];if(z==="-"||z==="+")Z+=1;if($=$.substring(Z).replace(/_/g,""),X){switch(Q){case 2:$=`0b${$}`;break;case 8:$=`0o${$}`;break;case 16:$=`0x${$}`;break}let H=BigInt($);return z==="-"?BigInt(-1)*H:H}let J=parseInt($,Q);return z==="-"?-1*J:J}function d$($,Z,Q){let{value:X}=$;if(N2(X)){let z=X.toString(Z);return X<0?"-"+Q+z.substr(1):Q+z}return I9.stringifyNumber($)}var gX={identify:N2,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:($,Z,Q)=>w1($,2,2,Q),stringify:($)=>d$($,2,"0b")},yX={identify:N2,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:($,Z,Q)=>w1($,1,8,Q),stringify:($)=>d$($,8,"0")},hX={identify:N2,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:($,Z,Q)=>w1($,0,10,Q),stringify:I9.stringifyNumber},vX={identify:N2,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:($,Z,Q)=>w1($,2,16,Q),stringify:($)=>d$($,16,"0x")};fX.int=hX;fX.intBin=gX;fX.intHex=vX;fX.intOct=yX});var c$=P((dX)=>{var E1=j(),C1=I0(),b1=L0();class j0 extends b1.YAMLMap{constructor($){super($);this.tag=j0.tag}add($){let Z;if(E1.isPair($))Z=$;else if($&&typeof $==="object"&&"key"in $&&"value"in $&&$.value===null)Z=new C1.Pair($.key,null);else Z=new C1.Pair($,null);if(!b1.findPair(this.items,Z.key))this.items.push(Z)}get($,Z){let Q=b1.findPair(this.items,$);return!Z&&E1.isPair(Q)?E1.isScalar(Q.key)?Q.key.value:Q.key:Q}set($,Z){if(typeof Z!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof Z}`);let Q=b1.findPair(this.items,$);if(Q&&!Z)this.items.splice(this.items.indexOf(Q),1);else if(!Q&&Z)this.items.push(new C1.Pair($))}toJSON($,Z){return super.toJSON($,Z,Set)}toString($,Z,Q){if(!$)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},$,{allNullValues:!0}),Z,Q);else throw Error("Set items must all have null values")}static from($,Z,Q){let{replacer:X}=Q,z=new this($);if(Z&&Symbol.iterator in Object(Z))for(let J of Z){if(typeof X==="function")J=X.call(Z,J,J);z.items.push(C1.createPair(J,null,Q))}return z}}j0.tag="tag:yaml.org,2002:set";var lX={collection:"map",identify:($)=>$ instanceof Set,nodeClass:j0,default:!1,tag:"tag:yaml.org,2002:set",createNode:($,Z,Q)=>j0.from($,Z,Q),resolve($,Z){if(E1.isMap($))if($.hasAllNullValues(!0))return Object.assign(new j0,$);else Z("Set items must all have null values");else Z("Expected a mapping for this tag");return $}};dX.YAMLSet=j0;dX.set=lX});var r$=P((sX)=>{var rX=r0();function i$($,Z){let Q=$[0],X=Q==="-"||Q==="+"?$.substring(1):$,z=(H)=>Z?BigInt(H):Number(H),J=X.replace(/_/g,"").split(":").reduce((H,U)=>H*z(60)+z(U),z(0));return Q==="-"?z(-1)*J:J}function L9($){let{value:Z}=$,Q=(H)=>H;if(typeof Z==="bigint")Q=(H)=>BigInt(H);else if(isNaN(Z)||!isFinite(Z))return rX.stringifyNumber($);let X="";if(Z<0)X="-",Z*=Q(-1);let z=Q(60),J=[Z%z];if(Z<60)J.unshift(0);else if(Z=(Z-J[0])/z,J.unshift(Z%z),Z>=60)Z=(Z-J[0])/z,J.unshift(Z);return X+J.map((H)=>String(H).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var nX={identify:($)=>typeof $==="bigint"||Number.isInteger($),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:($,Z,{intAsBigInt:Q})=>i$($,Q),stringify:L9},aX={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:($)=>i$($,!1),stringify:L9},R9={identify:($)=>$ 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($){let Z=$.match(R9.test);if(!Z)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,Q,X,z,J,H,U]=Z.map(Number),q=Z[7]?Number((Z[7]+"00").substr(1,3)):0,Y=Date.UTC(Q,X-1,z,J||0,H||0,U||0,q),G=Z[8];if(G&&G!=="Z"){let V=i$(G,!1);if(Math.abs(V)<30)V*=60;Y-=60000*V}return new Date(Y)},stringify:({value:$})=>$?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};sX.floatTime=aX;sX.intTime=nX;sX.timestamp=R9});var F9=P((Gz)=>{var $z=c0(),Zz=F1(),Qz=i0(),Xz=R2(),zz=k$(),M9=O9(),n$=D9(),j1=K9(),Jz=_1(),Hz=p$(),Uz=T1(),qz=c$(),a$=r$(),Yz=[$z.map,Qz.seq,Xz.string,Zz.nullTag,M9.trueTag,M9.falseTag,j1.intBin,j1.intOct,j1.int,j1.intHex,n$.floatNaN,n$.floatExp,n$.float,zz.binary,Jz.merge,Hz.omap,Uz.pairs,qz.set,a$.intTime,a$.floatTime,a$.timestamp];Gz.schema=Yz});var S9=P((Lz)=>{var T9=c0(),Bz=F1(),w9=i0(),Wz=R2(),_z=j$(),s$=x$(),o$=y$(),Oz=z9(),Dz=H9(),C9=k$(),P2=_1(),b9=p$(),E9=T1(),N9=F9(),j9=c$(),S1=r$(),P9=new Map([["core",Oz.schema],["failsafe",[T9.map,w9.seq,Wz.string]],["json",Dz.schema],["yaml11",N9.schema],["yaml-1.1",N9.schema]]),A9={binary:C9.binary,bool:_z.boolTag,float:s$.float,floatExp:s$.floatExp,floatNaN:s$.floatNaN,floatTime:S1.floatTime,int:o$.int,intHex:o$.intHex,intOct:o$.intOct,intTime:S1.intTime,map:T9.map,merge:P2.merge,null:Bz.nullTag,omap:b9.omap,pairs:E9.pairs,seq:w9.seq,set:j9.set,timestamp:S1.timestamp},Iz={"tag:yaml.org,2002:binary":C9.binary,"tag:yaml.org,2002:merge":P2.merge,"tag:yaml.org,2002:omap":b9.omap,"tag:yaml.org,2002:pairs":E9.pairs,"tag:yaml.org,2002:set":j9.set,"tag:yaml.org,2002:timestamp":S1.timestamp};function Kz($,Z,Q){let X=P9.get(Z);if(X&&!$)return Q&&!X.includes(P2.merge)?X.concat(P2.merge):X.slice();let z=X;if(!z)if(Array.isArray($))z=[];else{let J=Array.from(P9.keys()).filter((H)=>H!=="yaml11").map((H)=>JSON.stringify(H)).join(", ");throw Error(`Unknown schema "${Z}"; use one of ${J} or define customTags array`)}if(Array.isArray($))for(let J of $)z=z.concat(J);else if(typeof $==="function")z=$(z.slice());if(Q)z=z.concat(P2.merge);return z.reduce((J,H)=>{let U=typeof H==="string"?A9[H]:H;if(!U){let q=JSON.stringify(H),Y=Object.keys(A9).map((G)=>JSON.stringify(G)).join(", ");throw Error(`Unknown custom tag ${q}; use one of ${Y}`)}if(!J.includes(U))J.push(U);return J},[])}Lz.coreKnownTags=Iz;Lz.getTags=Kz});var $8=P((Tz)=>{var t$=j(),Fz=c0(),Nz=i0(),Pz=R2(),x1=S9(),Az=($,Z)=>$.key<Z.key?-1:$.key>Z.key?1:0;class e${constructor({compat:$,customTags:Z,merge:Q,resolveKnownTags:X,schema:z,sortMapEntries:J,toStringDefaults:H}){this.compat=Array.isArray($)?x1.getTags($,"compat"):$?x1.getTags(null,$):null,this.name=typeof z==="string"&&z||"core",this.knownTags=X?x1.coreKnownTags:{},this.tags=x1.getTags(Z,this.name,Q),this.toStringOptions=H??null,Object.defineProperty(this,t$.MAP,{value:Fz.map}),Object.defineProperty(this,t$.SCALAR,{value:Pz.string}),Object.defineProperty(this,t$.SEQ,{value:Nz.seq}),this.sortMapEntries=typeof J==="function"?J:J===!0?Az:null}clone(){let $=Object.create(e$.prototype,Object.getOwnPropertyDescriptors(this));return $.tags=this.tags.slice(),$}}Tz.Schema=e$});var x9=P((Ez)=>{var Cz=j(),Z8=I2(),A2=_2();function bz($,Z){let Q=[],X=Z.directives===!0;if(Z.directives!==!1&&$.directives){let q=$.directives.toString($);if(q)Q.push(q),X=!0;else if($.directives.docStart)X=!0}if(X)Q.push("---");let z=Z8.createStringifyContext($,Z),{commentString:J}=z.options;if($.commentBefore){if(Q.length!==1)Q.unshift("");let q=J($.commentBefore);Q.unshift(A2.indentComment(q,""))}let H=!1,U=null;if($.contents){if(Cz.isNode($.contents)){if($.contents.spaceBefore&&X)Q.push("");if($.contents.commentBefore){let G=J($.contents.commentBefore);Q.push(A2.indentComment(G,""))}z.forceBlockIndent=!!$.comment,U=$.contents.comment}let q=U?void 0:()=>H=!0,Y=Z8.stringify($.contents,z,()=>U=null,q);if(U)Y+=A2.lineComment(Y,"",J(U));if((Y[0]==="|"||Y[0]===">")&&Q[Q.length-1]==="---")Q[Q.length-1]=`--- ${Y}`;else Q.push(Y)}else Q.push(Z8.stringify($.contents,z));if($.directives?.docEnd)if($.comment){let q=J($.comment);if(q.includes(`
55
+ `))Q.push("..."),Q.push(A2.indentComment(q,""));else Q.push(`... ${q}`)}else Q.push("...");else{let q=$.comment;if(q&&H)q=q.replace(/^\n+/,"");if(q){if((!H||U)&&Q[Q.length-1]!=="")Q.push("");Q.push(A2.indentComment(J(q),""))}}return Q.join(`
56
56
  `)+`
57
- `}Zz.stringifyDocument=$z});var M1=F((Bz)=>{var Xz=J1(),u0=e1(),l=w(),zz=Y0(),Jz=H0(),Hz=l$(),Uz=D9(),d$=s1(),qz=Y$(),Yz=H1(),c$=q$();class i${constructor($,Z,Q){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,l.NODE_TYPE,{value:l.DOC});let X=null;if(typeof Z==="function"||Array.isArray(Z))X=Z;else if(Q===void 0&&Z)Q=Z,Z=void 0;let z=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},Q);this.options=z;let{version:J}=z;if(Q?._directives){if(this.directives=Q._directives.atDocument(),this.directives.yaml.explicit)J=this.directives.yaml.version}else this.directives=new c$.Directives({version:J});this.setSchema(J,Q),this.contents=$===void 0?null:this.createNode($,X,Q)}clone(){let $=Object.create(i$.prototype,{[l.NODE_TYPE]:{value:l.DOC}});if($.commentBefore=this.commentBefore,$.comment=this.comment,$.errors=this.errors.slice(),$.warnings=this.warnings.slice(),$.options=Object.assign({},this.options),this.directives)$.directives=this.directives.clone();if($.schema=this.schema.clone(),$.contents=l.isNode(this.contents)?this.contents.clone($.schema):this.contents,this.range)$.range=this.range.slice();return $}add($){if(m0(this.contents))this.contents.add($)}addIn($,Z){if(m0(this.contents))this.contents.addIn($,Z)}createAlias($,Z){if(!$.anchor){let Q=d$.anchorNames(this);$.anchor=!Z||Q.has(Z)?d$.findNewAnchor(Z||"a",Q):Z}return new Xz.Alias($.anchor)}createNode($,Z,Q){let X=void 0;if(typeof Z==="function")$=Z.call({"":$},"",$),X=Z;else if(Array.isArray(Z)){let W=(I)=>typeof I==="number"||I instanceof String||I instanceof Number,O=Z.filter(W).map(String);if(O.length>0)Z=Z.concat(O);X=Z}else if(Q===void 0&&Z)Q=Z,Z=void 0;let{aliasDuplicateObjects:z,anchorPrefix:J,flow:H,keepUndefined:U,onTagObj:q,tag:Y}=Q??{},{onAnchor:B,setAnchors:G,sourceObjects:V}=d$.createNodeAnchors(this,J||"a"),_={aliasDuplicateObjects:z??!0,keepUndefined:U??!1,onAnchor:B,onTagObj:q,replacer:X,schema:this.schema,sourceObjects:V},D=Yz.createNode($,Y,_);if(H&&l.isCollection(D))D.flow=!0;return G(),D}createPair($,Z,Q={}){let X=this.createNode($,null,Q),z=this.createNode(Z,null,Q);return new zz.Pair(X,z)}delete($){return m0(this.contents)?this.contents.delete($):!1}deleteIn($){if(u0.isEmptyPath($)){if(this.contents==null)return!1;return this.contents=null,!0}return m0(this.contents)?this.contents.deleteIn($):!1}get($,Z){return l.isCollection(this.contents)?this.contents.get($,Z):void 0}getIn($,Z){if(u0.isEmptyPath($))return!Z&&l.isScalar(this.contents)?this.contents.value:this.contents;return l.isCollection(this.contents)?this.contents.getIn($,Z):void 0}has($){return l.isCollection(this.contents)?this.contents.has($):!1}hasIn($){if(u0.isEmptyPath($))return this.contents!==void 0;return l.isCollection(this.contents)?this.contents.hasIn($):!1}set($,Z){if(this.contents==null)this.contents=u0.collectionFromPath(this.schema,[$],Z);else if(m0(this.contents))this.contents.set($,Z)}setIn($,Z){if(u0.isEmptyPath($))this.contents=Z;else if(this.contents==null)this.contents=u0.collectionFromPath(this.schema,Array.from($),Z);else if(m0(this.contents))this.contents.setIn($,Z)}setSchema($,Z={}){if(typeof $==="number")$=String($);let Q;switch($){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new c$.Directives({version:"1.1"});Q={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=$;else this.directives=new c$.Directives({version:$});Q={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;Q=null;break;default:{let X=JSON.stringify($);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${X}`)}}if(Z.schema instanceof Object)this.schema=Z.schema;else if(Q)this.schema=new Hz.Schema(Object.assign(Q,Z));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:$,jsonArg:Z,mapAsMap:Q,maxAliasCount:X,onAnchor:z,reviver:J}={}){let H={anchors:new Map,doc:this,keep:!$,mapAsMap:Q===!0,mapKeyWarned:!1,maxAliasCount:typeof X==="number"?X:100},U=Jz.toJS(this.contents,Z??"",H);if(typeof z==="function")for(let{count:q,res:Y}of H.anchors.values())z(Y,q);return typeof J==="function"?qz.applyReviver(J,{"":U},"",U):U}toJSON($,Z){return this.toJS({json:!0,jsonArg:$,mapAsMap:!1,onAnchor:Z})}toString($={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in $&&(!Number.isInteger($.indent)||Number($.indent)<=0)){let Z=JSON.stringify($.indent);throw Error(`"indent" option must be a positive integer, not ${Z}`)}return Uz.stringifyDocument(this,$)}}function m0($){if(l.isCollection($))return!0;throw Error("Expected a YAML collection as document contents")}Bz.Document=i$});var L1=F((Wz)=>{class T2 extends Error{constructor($,Z,Q,X){super();this.name=$,this.code=Q,this.message=X,this.pos=Z}}class I9 extends T2{constructor($,Z,Q){super("YAMLParseError",$,Z,Q)}}class K9 extends T2{constructor($,Z,Q){super("YAMLWarning",$,Z,Q)}}var Vz=($,Z)=>(Q)=>{if(Q.pos[0]===-1)return;Q.linePos=Q.pos.map((U)=>Z.linePos(U));let{line:X,col:z}=Q.linePos[0];Q.message+=` at line ${X}, column ${z}`;let J=z-1,H=$.substring(Z.lineStarts[X-1],Z.lineStarts[X]).replace(/[\n\r]+$/,"");if(J>=60&&H.length>80){let U=Math.min(J-39,H.length-79);H="…"+H.substring(U),J-=U-1}if(H.length>80)H=H.substring(0,79)+"…";if(X>1&&/^ *$/.test(H.substring(0,J))){let U=$.substring(Z.lineStarts[X-2],Z.lineStarts[X-1]);if(U.length>80)U=U.substring(0,79)+`…
57
+ `}Ez.stringifyDocument=bz});var T2=P((kz)=>{var Sz=B2(),n0=U1(),i=j(),xz=I0(),gz=_0(),yz=$8(),hz=x9(),Q8=z1(),vz=M$(),fz=W2(),X8=R$();class z8{constructor($,Z,Q){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,i.NODE_TYPE,{value:i.DOC});let X=null;if(typeof Z==="function"||Array.isArray(Z))X=Z;else if(Q===void 0&&Z)Q=Z,Z=void 0;let z=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},Q);this.options=z;let{version:J}=z;if(Q?._directives){if(this.directives=Q._directives.atDocument(),this.directives.yaml.explicit)J=this.directives.yaml.version}else this.directives=new X8.Directives({version:J});this.setSchema(J,Q),this.contents=$===void 0?null:this.createNode($,X,Q)}clone(){let $=Object.create(z8.prototype,{[i.NODE_TYPE]:{value:i.DOC}});if($.commentBefore=this.commentBefore,$.comment=this.comment,$.errors=this.errors.slice(),$.warnings=this.warnings.slice(),$.options=Object.assign({},this.options),this.directives)$.directives=this.directives.clone();if($.schema=this.schema.clone(),$.contents=i.isNode(this.contents)?this.contents.clone($.schema):this.contents,this.range)$.range=this.range.slice();return $}add($){if(a0(this.contents))this.contents.add($)}addIn($,Z){if(a0(this.contents))this.contents.addIn($,Z)}createAlias($,Z){if(!$.anchor){let Q=Q8.anchorNames(this);$.anchor=!Z||Q.has(Z)?Q8.findNewAnchor(Z||"a",Q):Z}return new Sz.Alias($.anchor)}createNode($,Z,Q){let X=void 0;if(typeof Z==="function")$=Z.call({"":$},"",$),X=Z;else if(Array.isArray(Z)){let W=(I)=>typeof I==="number"||I instanceof String||I instanceof Number,O=Z.filter(W).map(String);if(O.length>0)Z=Z.concat(O);X=Z}else if(Q===void 0&&Z)Q=Z,Z=void 0;let{aliasDuplicateObjects:z,anchorPrefix:J,flow:H,keepUndefined:U,onTagObj:q,tag:Y}=Q??{},{onAnchor:G,setAnchors:V,sourceObjects:B}=Q8.createNodeAnchors(this,J||"a"),_={aliasDuplicateObjects:z??!0,keepUndefined:U??!1,onAnchor:G,onTagObj:q,replacer:X,schema:this.schema,sourceObjects:B},D=fz.createNode($,Y,_);if(H&&i.isCollection(D))D.flow=!0;return V(),D}createPair($,Z,Q={}){let X=this.createNode($,null,Q),z=this.createNode(Z,null,Q);return new xz.Pair(X,z)}delete($){return a0(this.contents)?this.contents.delete($):!1}deleteIn($){if(n0.isEmptyPath($)){if(this.contents==null)return!1;return this.contents=null,!0}return a0(this.contents)?this.contents.deleteIn($):!1}get($,Z){return i.isCollection(this.contents)?this.contents.get($,Z):void 0}getIn($,Z){if(n0.isEmptyPath($))return!Z&&i.isScalar(this.contents)?this.contents.value:this.contents;return i.isCollection(this.contents)?this.contents.getIn($,Z):void 0}has($){return i.isCollection(this.contents)?this.contents.has($):!1}hasIn($){if(n0.isEmptyPath($))return this.contents!==void 0;return i.isCollection(this.contents)?this.contents.hasIn($):!1}set($,Z){if(this.contents==null)this.contents=n0.collectionFromPath(this.schema,[$],Z);else if(a0(this.contents))this.contents.set($,Z)}setIn($,Z){if(n0.isEmptyPath($))this.contents=Z;else if(this.contents==null)this.contents=n0.collectionFromPath(this.schema,Array.from($),Z);else if(a0(this.contents))this.contents.setIn($,Z)}setSchema($,Z={}){if(typeof $==="number")$=String($);let Q;switch($){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new X8.Directives({version:"1.1"});Q={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=$;else this.directives=new X8.Directives({version:$});Q={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;Q=null;break;default:{let X=JSON.stringify($);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${X}`)}}if(Z.schema instanceof Object)this.schema=Z.schema;else if(Q)this.schema=new yz.Schema(Object.assign(Q,Z));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:$,jsonArg:Z,mapAsMap:Q,maxAliasCount:X,onAnchor:z,reviver:J}={}){let H={anchors:new Map,doc:this,keep:!$,mapAsMap:Q===!0,mapKeyWarned:!1,maxAliasCount:typeof X==="number"?X:100},U=gz.toJS(this.contents,Z??"",H);if(typeof z==="function")for(let{count:q,res:Y}of H.anchors.values())z(Y,q);return typeof J==="function"?vz.applyReviver(J,{"":U},"",U):U}toJSON($,Z){return this.toJS({json:!0,jsonArg:$,mapAsMap:!1,onAnchor:Z})}toString($={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in $&&(!Number.isInteger($.indent)||Number($.indent)<=0)){let Z=JSON.stringify($.indent);throw Error(`"indent" option must be a positive integer, not ${Z}`)}return hz.stringifyDocument(this,$)}}function a0($){if(i.isCollection($))return!0;throw Error("Expected a YAML collection as document contents")}kz.Document=z8});var w2=P((pz)=>{class g1 extends Error{constructor($,Z,Q,X){super();this.name=$,this.code=Q,this.message=X,this.pos=Z}}class g9 extends g1{constructor($,Z,Q){super("YAMLParseError",$,Z,Q)}}class y9 extends g1{constructor($,Z,Q){super("YAMLWarning",$,Z,Q)}}var mz=($,Z)=>(Q)=>{if(Q.pos[0]===-1)return;Q.linePos=Q.pos.map((U)=>Z.linePos(U));let{line:X,col:z}=Q.linePos[0];Q.message+=` at line ${X}, column ${z}`;let J=z-1,H=$.substring(Z.lineStarts[X-1],Z.lineStarts[X]).replace(/[\n\r]+$/,"");if(J>=60&&H.length>80){let U=Math.min(J-39,H.length-79);H="…"+H.substring(U),J-=U-1}if(H.length>80)H=H.substring(0,79)+"…";if(X>1&&/^ *$/.test(H.substring(0,J))){let U=$.substring(Z.lineStarts[X-2],Z.lineStarts[X-1]);if(U.length>80)U=U.substring(0,79)+`…
58
58
  `;H=U+H}if(/[^ ]/.test(H)){let U=1,q=Q.linePos[1];if(q?.line===X&&q.col>z)U=Math.max(1,Math.min(q.col-z,80-J));let Y=" ".repeat(J)+"^".repeat(U);Q.message+=`:
59
59
 
60
60
  ${H}
61
61
  ${Y}
62
- `}};Wz.YAMLError=T2;Wz.YAMLParseError=I9;Wz.YAMLWarning=K9;Wz.prettifyError=Vz});var R1=F((Mz)=>{function Kz($,{flow:Z,indicator:Q,next:X,offset:z,onError:J,parentIndent:H,startOnNewline:U}){let q=!1,Y=U,B=U,G="",V="",_=!1,D=!1,W=null,O=null,I=null,R=null,N=null,P=null,T=null;for(let L of $){if(D){if(L.type!=="space"&&L.type!=="newline"&&L.type!=="comma")J(L.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");D=!1}if(W){if(Y&&L.type!=="comment"&&L.type!=="newline")J(W,"TAB_AS_INDENT","Tabs are not allowed as indentation");W=null}switch(L.type){case"space":if(!Z&&(Q!=="doc-start"||X?.type!=="flow-collection")&&L.source.includes("\t"))W=L;B=!0;break;case"comment":{if(!B)J(L,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let S=L.source.substring(1)||" ";if(!G)G=S;else G+=V+S;V="",Y=!1;break}case"newline":if(Y){if(G)G+=L.source;else if(!P||Q!=="seq-item-ind")q=!0}else V+=L.source;if(Y=!0,_=!0,O||I)R=L;B=!0;break;case"anchor":if(O)J(L,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(L.source.endsWith(":"))J(L.offset+L.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);O=L,T??(T=L.offset),Y=!1,B=!1,D=!0;break;case"tag":{if(I)J(L,"MULTIPLE_TAGS","A node can have at most one tag");I=L,T??(T=L.offset),Y=!1,B=!1,D=!0;break}case Q:if(O||I)J(L,"BAD_PROP_ORDER",`Anchors and tags must be after the ${L.source} indicator`);if(P)J(L,"UNEXPECTED_TOKEN",`Unexpected ${L.source} in ${Z??"collection"}`);P=L,Y=Q==="seq-item-ind"||Q==="explicit-key-ind",B=!1;break;case"comma":if(Z){if(N)J(L,"UNEXPECTED_TOKEN",`Unexpected , in ${Z}`);N=L,Y=!1,B=!1;break}default:J(L,"UNEXPECTED_TOKEN",`Unexpected ${L.type} token`),Y=!1,B=!1}}let A=$[$.length-1],C=A?A.offset+A.source.length:z;if(D&&X&&X.type!=="space"&&X.type!=="newline"&&X.type!=="comma"&&(X.type!=="scalar"||X.source!==""))J(X.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(W&&(Y&&W.indent<=H||X?.type==="block-map"||X?.type==="block-seq"))J(W,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:N,found:P,spaceBefore:q,comment:G,hasNewline:_,anchor:O,tag:I,newlineAfterProp:R,end:C,start:T??C}}Mz.resolveProps=Kz});var C2=F((Rz)=>{function r$($){if(!$)return null;switch($.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if($.source.includes(`
63
- `))return!0;if($.end){for(let Z of $.end)if(Z.type==="newline")return!0}return!1;case"flow-collection":for(let Z of $.items){for(let Q of Z.start)if(Q.type==="newline")return!0;if(Z.sep){for(let Q of Z.sep)if(Q.type==="newline")return!0}if(r$(Z.key)||r$(Z.value))return!0}return!1;default:return!0}}Rz.containsNewline=r$});var a$=F((Pz)=>{var Nz=C2();function Az($,Z,Q){if(Z?.type==="flow-collection"){let X=Z.end[0];if(X.indent===$&&(X.source==="]"||X.source==="}")&&Nz.containsNewline(Z))Q(X,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Pz.flowIndentCheck=Az});var n$=F((wz)=>{var M9=w();function Cz($,Z,Q){let{uniqueKeys:X}=$.options;if(X===!1)return!1;let z=typeof X==="function"?X:(J,H)=>J===H||M9.isScalar(J)&&M9.isScalar(H)&&J.value===H.value;return Z.some((J)=>z(J.key,Q))}wz.mapIncludes=Cz});var A9=F((gz)=>{var L9=Y0(),Ez=G0(),R9=R1(),Sz=C2(),F9=a$(),jz=n$(),N9="All mapping items must start at the same column";function xz({composeNode:$,composeEmptyNode:Z},Q,X,z,J){let U=new(J?.nodeClass??Ez.YAMLMap)(Q.schema);if(Q.atRoot)Q.atRoot=!1;let q=X.offset,Y=null;for(let B of X.items){let{start:G,key:V,sep:_,value:D}=B,W=R9.resolveProps(G,{indicator:"explicit-key-ind",next:V??_?.[0],offset:q,onError:z,parentIndent:X.indent,startOnNewline:!0}),O=!W.found;if(O){if(V){if(V.type==="block-seq")z(q,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in V&&V.indent!==X.indent)z(q,"BAD_INDENT",N9)}if(!W.anchor&&!W.tag&&!_){if(Y=W.end,W.comment)if(U.comment)U.comment+=`
64
- `+W.comment;else U.comment=W.comment;continue}if(W.newlineAfterProp||Sz.containsNewline(V))z(V??G[G.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(W.found?.indent!==X.indent)z(q,"BAD_INDENT",N9);Q.atKey=!0;let I=W.end,R=V?$(Q,V,W,z):Z(Q,I,G,null,W,z);if(Q.schema.compat)F9.flowIndentCheck(X.indent,V,z);if(Q.atKey=!1,jz.mapIncludes(Q,U.items,R))z(I,"DUPLICATE_KEY","Map keys must be unique");let N=R9.resolveProps(_??[],{indicator:"map-value-ind",next:D,offset:R.range[2],onError:z,parentIndent:X.indent,startOnNewline:!V||V.type==="block-scalar"});if(q=N.end,N.found){if(O){if(D?.type==="block-map"&&!N.hasNewline)z(q,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(Q.options.strict&&W.start<N.found.offset-1024)z(R.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let P=D?$(Q,D,N,z):Z(Q,q,_,null,N,z);if(Q.schema.compat)F9.flowIndentCheck(X.indent,D,z);q=P.range[2];let T=new L9.Pair(R,P);if(Q.options.keepSourceTokens)T.srcToken=B;U.items.push(T)}else{if(O)z(R.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(N.comment)if(R.comment)R.comment+=`
65
- `+N.comment;else R.comment=N.comment;let P=new L9.Pair(R);if(Q.options.keepSourceTokens)P.srcToken=B;U.items.push(P)}}if(Y&&Y<q)z(Y,"IMPOSSIBLE","Map comment with trailing content");return U.range=[X.offset,q,Y??q],U}gz.resolveBlockMap=xz});var P9=F((uz)=>{var yz=V0(),vz=R1(),fz=a$();function kz({composeNode:$,composeEmptyNode:Z},Q,X,z,J){let U=new(J?.nodeClass??yz.YAMLSeq)(Q.schema);if(Q.atRoot)Q.atRoot=!1;if(Q.atKey)Q.atKey=!1;let q=X.offset,Y=null;for(let{start:B,value:G}of X.items){let V=vz.resolveProps(B,{indicator:"seq-item-ind",next:G,offset:q,onError:z,parentIndent:X.indent,startOnNewline:!0});if(!V.found)if(V.anchor||V.tag||G)if(G?.type==="block-seq")z(V.end,"BAD_INDENT","All sequence items must start at the same column");else z(q,"MISSING_CHAR","Sequence item without - indicator");else{if(Y=V.end,V.comment)U.comment=V.comment;continue}let _=G?$(Q,G,V,z):Z(Q,V.end,B,null,V,z);if(Q.schema.compat)fz.flowIndentCheck(X.indent,G,z);q=_.range[2],U.items.push(_)}return U.range=[X.offset,q,Y??q],U}uz.resolveBlockSeq=kz});var l0=F((pz)=>{function lz($,Z,Q,X){let z="";if($){let J=!1,H="";for(let U of $){let{source:q,type:Y}=U;switch(Y){case"space":J=!0;break;case"comment":{if(Q&&!J)X(U,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let B=q.substring(1)||" ";if(!z)z=B;else z+=H+B;H="";break}case"newline":if(z)H+=q;J=!0;break;default:X(U,"UNEXPECTED_TOKEN",`Unexpected ${Y} at node end`)}Z+=q.length}}return{comment:z,offset:Z}}pz.resolveEnd=lz});var w9=F((tz)=>{var cz=w(),iz=Y0(),T9=G0(),rz=V0(),az=l0(),C9=R1(),nz=C2(),sz=n$(),s$="Block collections are not allowed within flow collections",o$=($)=>$&&($.type==="block-map"||$.type==="block-seq");function oz({composeNode:$,composeEmptyNode:Z},Q,X,z,J){let H=X.start.source==="{",U=H?"flow map":"flow sequence",Y=new(J?.nodeClass??(H?T9.YAMLMap:rz.YAMLSeq))(Q.schema);Y.flow=!0;let B=Q.atRoot;if(B)Q.atRoot=!1;if(Q.atKey)Q.atKey=!1;let G=X.offset+X.start.source.length;for(let O=0;O<X.items.length;++O){let I=X.items[O],{start:R,key:N,sep:P,value:T}=I,A=C9.resolveProps(R,{flow:U,indicator:"explicit-key-ind",next:N??P?.[0],offset:G,onError:z,parentIndent:X.indent,startOnNewline:!1});if(!A.found){if(!A.anchor&&!A.tag&&!P&&!T){if(O===0&&A.comma)z(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${U}`);else if(O<X.items.length-1)z(A.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${U}`);if(A.comment)if(Y.comment)Y.comment+=`
66
- `+A.comment;else Y.comment=A.comment;G=A.end;continue}if(!H&&Q.options.strict&&nz.containsNewline(N))z(N,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(O===0){if(A.comma)z(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${U}`)}else{if(!A.comma)z(A.start,"MISSING_CHAR",`Missing , between ${U} items`);if(A.comment){let C="";$:for(let L of R)switch(L.type){case"comma":case"space":break;case"comment":C=L.source.substring(1);break $;default:break $}if(C){let L=Y.items[Y.items.length-1];if(cz.isPair(L))L=L.value??L.key;if(L.comment)L.comment+=`
67
- `+C;else L.comment=C;A.comment=A.comment.substring(C.length+1)}}}if(!H&&!P&&!A.found){let C=T?$(Q,T,A,z):Z(Q,A.end,P,null,A,z);if(Y.items.push(C),G=C.range[2],o$(T))z(C.range,"BLOCK_IN_FLOW",s$)}else{Q.atKey=!0;let C=A.end,L=N?$(Q,N,A,z):Z(Q,C,R,null,A,z);if(o$(N))z(L.range,"BLOCK_IN_FLOW",s$);Q.atKey=!1;let S=C9.resolveProps(P??[],{flow:U,indicator:"map-value-ind",next:T,offset:L.range[2],onError:z,parentIndent:X.indent,startOnNewline:!1});if(S.found){if(!H&&!A.found&&Q.options.strict){if(P)for(let j of P){if(j===S.found)break;if(j.type==="newline"){z(j,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(A.start<S.found.offset-1024)z(S.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(T)if("source"in T&&T.source?.[0]===":")z(T,"MISSING_CHAR",`Missing space after : in ${U}`);else z(S.start,"MISSING_CHAR",`Missing , or : between ${U} items`);let E=T?$(Q,T,S,z):S.found?Z(Q,S.end,P,null,S,z):null;if(E){if(o$(T))z(E.range,"BLOCK_IN_FLOW",s$)}else if(S.comment)if(L.comment)L.comment+=`
68
- `+S.comment;else L.comment=S.comment;let d=new iz.Pair(L,E);if(Q.options.keepSourceTokens)d.srcToken=I;if(H){let j=Y;if(sz.mapIncludes(Q,j.items,L))z(C,"DUPLICATE_KEY","Map keys must be unique");j.items.push(d)}else{let j=new T9.YAMLMap(Q.schema);j.flow=!0,j.items.push(d);let I0=(E??L).range;j.range=[L.range[0],I0[1],I0[2]],Y.items.push(j)}G=E?E.range[2]:S.end}}let V=H?"}":"]",[_,...D]=X.end,W=G;if(_?.source===V)W=_.offset+_.source.length;else{let O=U[0].toUpperCase()+U.substring(1),I=B?`${O} must end with a ${V}`:`${O} in block collection must be sufficiently indented and end with a ${V}`;if(z(G,B?"MISSING_CHAR":"BAD_INDENT",I),_&&_.source.length!==1)D.unshift(_)}if(D.length>0){let O=az.resolveEnd(D,W,Q.options.strict,z);if(O.comment)if(Y.comment)Y.comment+=`
69
- `+O.comment;else Y.comment=O.comment;Y.range=[X.offset,W,O.offset]}else Y.range=[X.offset,W,W];return Y}tz.resolveFlowCollection=oz});var b9=F((qJ)=>{var $J=w(),ZJ=h(),QJ=G0(),XJ=V0(),zJ=A9(),JJ=P9(),HJ=w9();function t$($,Z,Q,X,z,J){let H=Q.type==="block-map"?zJ.resolveBlockMap($,Z,Q,X,J):Q.type==="block-seq"?JJ.resolveBlockSeq($,Z,Q,X,J):HJ.resolveFlowCollection($,Z,Q,X,J),U=H.constructor;if(z==="!"||z===U.tagName)return H.tag=U.tagName,H;if(z)H.tag=z;return H}function UJ($,Z,Q,X,z){let J=X.tag,H=!J?null:Z.directives.tagName(J.source,(V)=>z(J,"TAG_RESOLVE_FAILED",V));if(Q.type==="block-seq"){let{anchor:V,newlineAfterProp:_}=X,D=V&&J?V.offset>J.offset?V:J:V??J;if(D&&(!_||_.offset<D.offset))z(D,"MISSING_CHAR","Missing newline after block sequence props")}let U=Q.type==="block-map"?"map":Q.type==="block-seq"?"seq":Q.start.source==="{"?"map":"seq";if(!J||!H||H==="!"||H===QJ.YAMLMap.tagName&&U==="map"||H===XJ.YAMLSeq.tagName&&U==="seq")return t$($,Z,Q,z,H);let q=Z.schema.tags.find((V)=>V.tag===H&&V.collection===U);if(!q){let V=Z.schema.knownTags[H];if(V?.collection===U)Z.schema.tags.push(Object.assign({},V,{default:!1})),q=V;else{if(V)z(J,"BAD_COLLECTION_TYPE",`${V.tag} used for ${U} collection, but expects ${V.collection??"scalar"}`,!0);else z(J,"TAG_RESOLVE_FAILED",`Unresolved tag: ${H}`,!0);return t$($,Z,Q,z,H)}}let Y=t$($,Z,Q,z,H,q),B=q.resolve?.(Y,(V)=>z(J,"TAG_RESOLVE_FAILED",V),Z.options)??Y,G=$J.isNode(B)?B:new ZJ.Scalar(B);if(G.range=Y.range,G.tag=H,q?.format)G.format=q.format;return G}qJ.composeCollection=UJ});var $8=F((WJ)=>{var e$=h();function BJ($,Z,Q){let X=Z.offset,z=GJ(Z,$.options.strict,Q);if(!z)return{value:"",type:null,comment:"",range:[X,X,X]};let J=z.mode===">"?e$.Scalar.BLOCK_FOLDED:e$.Scalar.BLOCK_LITERAL,H=Z.source?VJ(Z.source):[],U=H.length;for(let W=H.length-1;W>=0;--W){let O=H[W][1];if(O===""||O==="\r")U=W;else break}if(U===0){let W=z.chomp==="+"&&H.length>0?`
70
- `.repeat(Math.max(1,H.length-1)):"",O=X+z.length;if(Z.source)O+=Z.source.length;return{value:W,type:J,comment:z.comment,range:[X,O,O]}}let q=Z.indent+z.indent,Y=Z.offset+z.length,B=0;for(let W=0;W<U;++W){let[O,I]=H[W];if(I===""||I==="\r"){if(z.indent===0&&O.length>q)q=O.length}else{if(O.length<q)Q(Y+O.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(z.indent===0)q=O.length;if(B=W,q===0&&!$.atRoot)Q(Y,"BAD_INDENT","Block scalar values in collections must be indented");break}Y+=O.length+I.length+1}for(let W=H.length-1;W>=U;--W)if(H[W][0].length>q)U=W+1;let G="",V="",_=!1;for(let W=0;W<B;++W)G+=H[W][0].slice(q)+`
71
- `;for(let W=B;W<U;++W){let[O,I]=H[W];Y+=O.length+I.length+1;let R=I[I.length-1]==="\r";if(R)I=I.slice(0,-1);if(I&&O.length<q){let P=`Block scalar lines must not be less indented than their ${z.indent?"explicit indentation indicator":"first line"}`;Q(Y-I.length-(R?2:1),"BAD_INDENT",P),O=""}if(J===e$.Scalar.BLOCK_LITERAL)G+=V+O.slice(q)+I,V=`
72
- `;else if(O.length>q||I[0]==="\t"){if(V===" ")V=`
73
- `;else if(!_&&V===`
74
- `)V=`
62
+ `}};pz.YAMLError=g1;pz.YAMLParseError=g9;pz.YAMLWarning=y9;pz.prettifyError=mz});var C2=P((nz)=>{function rz($,{flow:Z,indicator:Q,next:X,offset:z,onError:J,parentIndent:H,startOnNewline:U}){let q=!1,Y=U,G=U,V="",B="",_=!1,D=!1,W=null,O=null,I=null,N=null,F=null,A=null,w=null;for(let L of $){if(D){if(L.type!=="space"&&L.type!=="newline"&&L.type!=="comma")J(L.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");D=!1}if(W){if(Y&&L.type!=="comment"&&L.type!=="newline")J(W,"TAB_AS_INDENT","Tabs are not allowed as indentation");W=null}switch(L.type){case"space":if(!Z&&(Q!=="doc-start"||X?.type!=="flow-collection")&&L.source.includes("\t"))W=L;G=!0;break;case"comment":{if(!G)J(L,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let S=L.source.substring(1)||" ";if(!V)V=S;else V+=B+S;B="",Y=!1;break}case"newline":if(Y){if(V)V+=L.source;else if(!A||Q!=="seq-item-ind")q=!0}else B+=L.source;if(Y=!0,_=!0,O||I)N=L;G=!0;break;case"anchor":if(O)J(L,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(L.source.endsWith(":"))J(L.offset+L.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);O=L,w??(w=L.offset),Y=!1,G=!1,D=!0;break;case"tag":{if(I)J(L,"MULTIPLE_TAGS","A node can have at most one tag");I=L,w??(w=L.offset),Y=!1,G=!1,D=!0;break}case Q:if(O||I)J(L,"BAD_PROP_ORDER",`Anchors and tags must be after the ${L.source} indicator`);if(A)J(L,"UNEXPECTED_TOKEN",`Unexpected ${L.source} in ${Z??"collection"}`);A=L,Y=Q==="seq-item-ind"||Q==="explicit-key-ind",G=!1;break;case"comma":if(Z){if(F)J(L,"UNEXPECTED_TOKEN",`Unexpected , in ${Z}`);F=L,Y=!1,G=!1;break}default:J(L,"UNEXPECTED_TOKEN",`Unexpected ${L.type} token`),Y=!1,G=!1}}let T=$[$.length-1],C=T?T.offset+T.source.length:z;if(D&&X&&X.type!=="space"&&X.type!=="newline"&&X.type!=="comma"&&(X.type!=="scalar"||X.source!==""))J(X.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(W&&(Y&&W.indent<=H||X?.type==="block-map"||X?.type==="block-seq"))J(W,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:F,found:A,spaceBefore:q,comment:V,hasNewline:_,anchor:O,tag:I,newlineAfterProp:N,end:C,start:w??C}}nz.resolveProps=rz});var y1=P((sz)=>{function J8($){if(!$)return null;switch($.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if($.source.includes(`
63
+ `))return!0;if($.end){for(let Z of $.end)if(Z.type==="newline")return!0}return!1;case"flow-collection":for(let Z of $.items){for(let Q of Z.start)if(Q.type==="newline")return!0;if(Z.sep){for(let Q of Z.sep)if(Q.type==="newline")return!0}if(J8(Z.key)||J8(Z.value))return!0}return!1;default:return!0}}sz.containsNewline=J8});var H8=P(($J)=>{var tz=y1();function ez($,Z,Q){if(Z?.type==="flow-collection"){let X=Z.end[0];if(X.indent===$&&(X.source==="]"||X.source==="}")&&tz.containsNewline(Z))Q(X,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}$J.flowIndentCheck=ez});var U8=P((XJ)=>{var h9=j();function QJ($,Z,Q){let{uniqueKeys:X}=$.options;if(X===!1)return!1;let z=typeof X==="function"?X:(J,H)=>J===H||h9.isScalar(J)&&h9.isScalar(H)&&J.value===H.value;return Z.some((J)=>z(J.key,Q))}XJ.mapIncludes=QJ});var m9=P((YJ)=>{var v9=I0(),JJ=L0(),f9=C2(),HJ=y1(),k9=H8(),UJ=U8(),u9="All mapping items must start at the same column";function qJ({composeNode:$,composeEmptyNode:Z},Q,X,z,J){let U=new(J?.nodeClass??JJ.YAMLMap)(Q.schema);if(Q.atRoot)Q.atRoot=!1;let q=X.offset,Y=null;for(let G of X.items){let{start:V,key:B,sep:_,value:D}=G,W=f9.resolveProps(V,{indicator:"explicit-key-ind",next:B??_?.[0],offset:q,onError:z,parentIndent:X.indent,startOnNewline:!0}),O=!W.found;if(O){if(B){if(B.type==="block-seq")z(q,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in B&&B.indent!==X.indent)z(q,"BAD_INDENT",u9)}if(!W.anchor&&!W.tag&&!_){if(Y=W.end,W.comment)if(U.comment)U.comment+=`
64
+ `+W.comment;else U.comment=W.comment;continue}if(W.newlineAfterProp||HJ.containsNewline(B))z(B??V[V.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(W.found?.indent!==X.indent)z(q,"BAD_INDENT",u9);Q.atKey=!0;let I=W.end,N=B?$(Q,B,W,z):Z(Q,I,V,null,W,z);if(Q.schema.compat)k9.flowIndentCheck(X.indent,B,z);if(Q.atKey=!1,UJ.mapIncludes(Q,U.items,N))z(I,"DUPLICATE_KEY","Map keys must be unique");let F=f9.resolveProps(_??[],{indicator:"map-value-ind",next:D,offset:N.range[2],onError:z,parentIndent:X.indent,startOnNewline:!B||B.type==="block-scalar"});if(q=F.end,F.found){if(O){if(D?.type==="block-map"&&!F.hasNewline)z(q,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(Q.options.strict&&W.start<F.found.offset-1024)z(N.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let A=D?$(Q,D,F,z):Z(Q,q,_,null,F,z);if(Q.schema.compat)k9.flowIndentCheck(X.indent,D,z);q=A.range[2];let w=new v9.Pair(N,A);if(Q.options.keepSourceTokens)w.srcToken=G;U.items.push(w)}else{if(O)z(N.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(F.comment)if(N.comment)N.comment+=`
65
+ `+F.comment;else N.comment=F.comment;let A=new v9.Pair(N);if(Q.options.keepSourceTokens)A.srcToken=G;U.items.push(A)}}if(Y&&Y<q)z(Y,"IMPOSSIBLE","Map comment with trailing content");return U.range=[X.offset,q,Y??q],U}YJ.resolveBlockMap=qJ});var p9=P((OJ)=>{var VJ=R0(),BJ=C2(),WJ=H8();function _J({composeNode:$,composeEmptyNode:Z},Q,X,z,J){let U=new(J?.nodeClass??VJ.YAMLSeq)(Q.schema);if(Q.atRoot)Q.atRoot=!1;if(Q.atKey)Q.atKey=!1;let q=X.offset,Y=null;for(let{start:G,value:V}of X.items){let B=BJ.resolveProps(G,{indicator:"seq-item-ind",next:V,offset:q,onError:z,parentIndent:X.indent,startOnNewline:!0});if(!B.found)if(B.anchor||B.tag||V)if(V?.type==="block-seq")z(B.end,"BAD_INDENT","All sequence items must start at the same column");else z(q,"MISSING_CHAR","Sequence item without - indicator");else{if(Y=B.end,B.comment)U.comment=B.comment;continue}let _=V?$(Q,V,B,z):Z(Q,B.end,G,null,B,z);if(Q.schema.compat)WJ.flowIndentCheck(X.indent,V,z);q=_.range[2],U.items.push(_)}return U.range=[X.offset,q,Y??q],U}OJ.resolveBlockSeq=_J});var s0=P((KJ)=>{function IJ($,Z,Q,X){let z="";if($){let J=!1,H="";for(let U of $){let{source:q,type:Y}=U;switch(Y){case"space":J=!0;break;case"comment":{if(Q&&!J)X(U,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let G=q.substring(1)||" ";if(!z)z=G;else z+=H+G;H="";break}case"newline":if(z)H+=q;J=!0;break;default:X(U,"UNEXPECTED_TOKEN",`Unexpected ${Y} at node end`)}Z+=q.length}}return{comment:z,offset:Z}}KJ.resolveEnd=IJ});var c9=P((wJ)=>{var RJ=j(),MJ=I0(),l9=L0(),FJ=R0(),NJ=s0(),d9=C2(),PJ=y1(),AJ=U8(),q8="Block collections are not allowed within flow collections",Y8=($)=>$&&($.type==="block-map"||$.type==="block-seq");function TJ({composeNode:$,composeEmptyNode:Z},Q,X,z,J){let H=X.start.source==="{",U=H?"flow map":"flow sequence",Y=new(J?.nodeClass??(H?l9.YAMLMap:FJ.YAMLSeq))(Q.schema);Y.flow=!0;let G=Q.atRoot;if(G)Q.atRoot=!1;if(Q.atKey)Q.atKey=!1;let V=X.offset+X.start.source.length;for(let O=0;O<X.items.length;++O){let I=X.items[O],{start:N,key:F,sep:A,value:w}=I,T=d9.resolveProps(N,{flow:U,indicator:"explicit-key-ind",next:F??A?.[0],offset:V,onError:z,parentIndent:X.indent,startOnNewline:!1});if(!T.found){if(!T.anchor&&!T.tag&&!A&&!w){if(O===0&&T.comma)z(T.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${U}`);else if(O<X.items.length-1)z(T.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${U}`);if(T.comment)if(Y.comment)Y.comment+=`
66
+ `+T.comment;else Y.comment=T.comment;V=T.end;continue}if(!H&&Q.options.strict&&PJ.containsNewline(F))z(F,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(O===0){if(T.comma)z(T.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${U}`)}else{if(!T.comma)z(T.start,"MISSING_CHAR",`Missing , between ${U} items`);if(T.comment){let C="";$:for(let L of N)switch(L.type){case"comma":case"space":break;case"comment":C=L.source.substring(1);break $;default:break $}if(C){let L=Y.items[Y.items.length-1];if(RJ.isPair(L))L=L.value??L.key;if(L.comment)L.comment+=`
67
+ `+C;else L.comment=C;T.comment=T.comment.substring(C.length+1)}}}if(!H&&!A&&!T.found){let C=w?$(Q,w,T,z):Z(Q,T.end,A,null,T,z);if(Y.items.push(C),V=C.range[2],Y8(w))z(C.range,"BLOCK_IN_FLOW",q8)}else{Q.atKey=!0;let C=T.end,L=F?$(Q,F,T,z):Z(Q,C,N,null,T,z);if(Y8(F))z(L.range,"BLOCK_IN_FLOW",q8);Q.atKey=!1;let S=d9.resolveProps(A??[],{flow:U,indicator:"map-value-ind",next:w,offset:L.range[2],onError:z,parentIndent:X.indent,startOnNewline:!1});if(S.found){if(!H&&!T.found&&Q.options.strict){if(A)for(let M of A){if(M===S.found)break;if(M.type==="newline"){z(M,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(T.start<S.found.offset-1024)z(S.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(w)if("source"in w&&w.source?.[0]===":")z(w,"MISSING_CHAR",`Missing space after : in ${U}`);else z(S.start,"MISSING_CHAR",`Missing , or : between ${U} items`);let E=w?$(Q,w,S,z):S.found?Z(Q,S.end,A,null,S,z):null;if(E){if(Y8(w))z(E.range,"BLOCK_IN_FLOW",q8)}else if(S.comment)if(L.comment)L.comment+=`
68
+ `+S.comment;else L.comment=S.comment;let m=new MJ.Pair(L,E);if(Q.options.keepSourceTokens)m.srcToken=I;if(H){let M=Y;if(AJ.mapIncludes(Q,M.items,L))z(C,"DUPLICATE_KEY","Map keys must be unique");M.items.push(m)}else{let M=new l9.YAMLMap(Q.schema);M.flow=!0,M.items.push(m);let b=(E??L).range;M.range=[L.range[0],b[1],b[2]],Y.items.push(M)}V=E?E.range[2]:S.end}}let B=H?"}":"]",[_,...D]=X.end,W=V;if(_?.source===B)W=_.offset+_.source.length;else{let O=U[0].toUpperCase()+U.substring(1),I=G?`${O} must end with a ${B}`:`${O} in block collection must be sufficiently indented and end with a ${B}`;if(z(V,G?"MISSING_CHAR":"BAD_INDENT",I),_&&_.source.length!==1)D.unshift(_)}if(D.length>0){let O=NJ.resolveEnd(D,W,Q.options.strict,z);if(O.comment)if(Y.comment)Y.comment+=`
69
+ `+O.comment;else Y.comment=O.comment;Y.range=[X.offset,W,O.offset]}else Y.range=[X.offset,W,W];return Y}wJ.resolveFlowCollection=TJ});var i9=P((vJ)=>{var bJ=j(),EJ=h(),jJ=L0(),SJ=R0(),xJ=m9(),gJ=p9(),yJ=c9();function G8($,Z,Q,X,z,J){let H=Q.type==="block-map"?xJ.resolveBlockMap($,Z,Q,X,J):Q.type==="block-seq"?gJ.resolveBlockSeq($,Z,Q,X,J):yJ.resolveFlowCollection($,Z,Q,X,J),U=H.constructor;if(z==="!"||z===U.tagName)return H.tag=U.tagName,H;if(z)H.tag=z;return H}function hJ($,Z,Q,X,z){let J=X.tag,H=!J?null:Z.directives.tagName(J.source,(B)=>z(J,"TAG_RESOLVE_FAILED",B));if(Q.type==="block-seq"){let{anchor:B,newlineAfterProp:_}=X,D=B&&J?B.offset>J.offset?B:J:B??J;if(D&&(!_||_.offset<D.offset))z(D,"MISSING_CHAR","Missing newline after block sequence props")}let U=Q.type==="block-map"?"map":Q.type==="block-seq"?"seq":Q.start.source==="{"?"map":"seq";if(!J||!H||H==="!"||H===jJ.YAMLMap.tagName&&U==="map"||H===SJ.YAMLSeq.tagName&&U==="seq")return G8($,Z,Q,z,H);let q=Z.schema.tags.find((B)=>B.tag===H&&B.collection===U);if(!q){let B=Z.schema.knownTags[H];if(B?.collection===U)Z.schema.tags.push(Object.assign({},B,{default:!1})),q=B;else{if(B)z(J,"BAD_COLLECTION_TYPE",`${B.tag} used for ${U} collection, but expects ${B.collection??"scalar"}`,!0);else z(J,"TAG_RESOLVE_FAILED",`Unresolved tag: ${H}`,!0);return G8($,Z,Q,z,H)}}let Y=G8($,Z,Q,z,H,q),G=q.resolve?.(Y,(B)=>z(J,"TAG_RESOLVE_FAILED",B),Z.options)??Y,V=bJ.isNode(G)?G:new EJ.Scalar(G);if(V.range=Y.range,V.tag=H,q?.format)V.format=q.format;return V}vJ.composeCollection=hJ});var B8=P((pJ)=>{var V8=h();function kJ($,Z,Q){let X=Z.offset,z=uJ(Z,$.options.strict,Q);if(!z)return{value:"",type:null,comment:"",range:[X,X,X]};let J=z.mode===">"?V8.Scalar.BLOCK_FOLDED:V8.Scalar.BLOCK_LITERAL,H=Z.source?mJ(Z.source):[],U=H.length;for(let W=H.length-1;W>=0;--W){let O=H[W][1];if(O===""||O==="\r")U=W;else break}if(U===0){let W=z.chomp==="+"&&H.length>0?`
70
+ `.repeat(Math.max(1,H.length-1)):"",O=X+z.length;if(Z.source)O+=Z.source.length;return{value:W,type:J,comment:z.comment,range:[X,O,O]}}let q=Z.indent+z.indent,Y=Z.offset+z.length,G=0;for(let W=0;W<U;++W){let[O,I]=H[W];if(I===""||I==="\r"){if(z.indent===0&&O.length>q)q=O.length}else{if(O.length<q)Q(Y+O.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(z.indent===0)q=O.length;if(G=W,q===0&&!$.atRoot)Q(Y,"BAD_INDENT","Block scalar values in collections must be indented");break}Y+=O.length+I.length+1}for(let W=H.length-1;W>=U;--W)if(H[W][0].length>q)U=W+1;let V="",B="",_=!1;for(let W=0;W<G;++W)V+=H[W][0].slice(q)+`
71
+ `;for(let W=G;W<U;++W){let[O,I]=H[W];Y+=O.length+I.length+1;let N=I[I.length-1]==="\r";if(N)I=I.slice(0,-1);if(I&&O.length<q){let A=`Block scalar lines must not be less indented than their ${z.indent?"explicit indentation indicator":"first line"}`;Q(Y-I.length-(N?2:1),"BAD_INDENT",A),O=""}if(J===V8.Scalar.BLOCK_LITERAL)V+=B+O.slice(q)+I,B=`
72
+ `;else if(O.length>q||I[0]==="\t"){if(B===" ")B=`
73
+ `;else if(!_&&B===`
74
+ `)B=`
75
75
 
76
- `;G+=V+O.slice(q)+I,V=`
77
- `,_=!0}else if(I==="")if(V===`
78
- `)G+=`
79
- `;else V=`
80
- `;else G+=V+I,V=" ",_=!1}switch(z.chomp){case"-":break;case"+":for(let W=U;W<H.length;++W)G+=`
81
- `+H[W][0].slice(q);if(G[G.length-1]!==`
82
- `)G+=`
83
- `;break;default:G+=`
84
- `}let D=X+z.length+Z.source.length;return{value:G,type:J,comment:z.comment,range:[X,D,D]}}function GJ({offset:$,props:Z},Q,X){if(Z[0].type!=="block-scalar-header")return X(Z[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:z}=Z[0],J=z[0],H=0,U="",q=-1;for(let V=1;V<z.length;++V){let _=z[V];if(!U&&(_==="-"||_==="+"))U=_;else{let D=Number(_);if(!H&&D)H=D;else if(q===-1)q=$+V}}if(q!==-1)X(q,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${z}`);let Y=!1,B="",G=z.length;for(let V=1;V<Z.length;++V){let _=Z[V];switch(_.type){case"space":Y=!0;case"newline":G+=_.source.length;break;case"comment":if(Q&&!Y)X(_,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");G+=_.source.length,B=_.source.substring(1);break;case"error":X(_,"UNEXPECTED_TOKEN",_.message),G+=_.source.length;break;default:{let D=`Unexpected token in block scalar header: ${_.type}`;X(_,"UNEXPECTED_TOKEN",D);let W=_.source;if(W&&typeof W==="string")G+=W.length}}}return{mode:J,indent:H,chomp:U,comment:B,length:G}}function VJ($){let Z=$.split(/\n( *)/),Q=Z[0],X=Q.match(/^( *)/),J=[X?.[1]?[X[1],Q.slice(X[1].length)]:["",Q]];for(let H=1;H<Z.length;H+=2)J.push([Z[H],Z[H+1]]);return J}WJ.resolveBlockScalar=BJ});var Q8=F((NJ)=>{var Z8=h(),OJ=l0();function DJ($,Z,Q){let{offset:X,type:z,source:J,end:H}=$,U,q,Y=(V,_,D)=>Q(X+V,_,D);switch(z){case"scalar":U=Z8.Scalar.PLAIN,q=IJ(J,Y);break;case"single-quoted-scalar":U=Z8.Scalar.QUOTE_SINGLE,q=KJ(J,Y);break;case"double-quoted-scalar":U=Z8.Scalar.QUOTE_DOUBLE,q=MJ(J,Y);break;default:return Q($,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${z}`),{value:"",type:null,comment:"",range:[X,X+J.length,X+J.length]}}let B=X+J.length,G=OJ.resolveEnd(H,B,Z,Q);return{value:q,type:U,comment:G.comment,range:[X,B,G.offset]}}function IJ($,Z){let Q="";switch($[0]){case"\t":Q="a tab character";break;case",":Q="flow indicator character ,";break;case"%":Q="directive indicator character %";break;case"|":case">":{Q=`block scalar indicator ${$[0]}`;break}case"@":case"`":{Q=`reserved character ${$[0]}`;break}}if(Q)Z(0,"BAD_SCALAR_START",`Plain value cannot start with ${Q}`);return E9($)}function KJ($,Z){if($[$.length-1]!=="'"||$.length===1)Z($.length,"MISSING_CHAR","Missing closing 'quote");return E9($.slice(1,-1)).replace(/''/g,"'")}function E9($){let Z,Q;try{Z=new RegExp(`(.*?)(?<![ ])[ ]*\r?
76
+ `;V+=B+O.slice(q)+I,B=`
77
+ `,_=!0}else if(I==="")if(B===`
78
+ `)V+=`
79
+ `;else B=`
80
+ `;else V+=B+I,B=" ",_=!1}switch(z.chomp){case"-":break;case"+":for(let W=U;W<H.length;++W)V+=`
81
+ `+H[W][0].slice(q);if(V[V.length-1]!==`
82
+ `)V+=`
83
+ `;break;default:V+=`
84
+ `}let D=X+z.length+Z.source.length;return{value:V,type:J,comment:z.comment,range:[X,D,D]}}function uJ({offset:$,props:Z},Q,X){if(Z[0].type!=="block-scalar-header")return X(Z[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:z}=Z[0],J=z[0],H=0,U="",q=-1;for(let B=1;B<z.length;++B){let _=z[B];if(!U&&(_==="-"||_==="+"))U=_;else{let D=Number(_);if(!H&&D)H=D;else if(q===-1)q=$+B}}if(q!==-1)X(q,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${z}`);let Y=!1,G="",V=z.length;for(let B=1;B<Z.length;++B){let _=Z[B];switch(_.type){case"space":Y=!0;case"newline":V+=_.source.length;break;case"comment":if(Q&&!Y)X(_,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");V+=_.source.length,G=_.source.substring(1);break;case"error":X(_,"UNEXPECTED_TOKEN",_.message),V+=_.source.length;break;default:{let D=`Unexpected token in block scalar header: ${_.type}`;X(_,"UNEXPECTED_TOKEN",D);let W=_.source;if(W&&typeof W==="string")V+=W.length}}}return{mode:J,indent:H,chomp:U,comment:G,length:V}}function mJ($){let Z=$.split(/\n( *)/),Q=Z[0],X=Q.match(/^( *)/),J=[X?.[1]?[X[1],Q.slice(X[1].length)]:["",Q]];for(let H=1;H<Z.length;H+=2)J.push([Z[H],Z[H+1]]);return J}pJ.resolveBlockScalar=kJ});var _8=P((tJ)=>{var W8=h(),dJ=s0();function cJ($,Z,Q){let{offset:X,type:z,source:J,end:H}=$,U,q,Y=(B,_,D)=>Q(X+B,_,D);switch(z){case"scalar":U=W8.Scalar.PLAIN,q=iJ(J,Y);break;case"single-quoted-scalar":U=W8.Scalar.QUOTE_SINGLE,q=rJ(J,Y);break;case"double-quoted-scalar":U=W8.Scalar.QUOTE_DOUBLE,q=nJ(J,Y);break;default:return Q($,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${z}`),{value:"",type:null,comment:"",range:[X,X+J.length,X+J.length]}}let G=X+J.length,V=dJ.resolveEnd(H,G,Z,Q);return{value:q,type:U,comment:V.comment,range:[X,G,V.offset]}}function iJ($,Z){let Q="";switch($[0]){case"\t":Q="a tab character";break;case",":Q="flow indicator character ,";break;case"%":Q="directive indicator character %";break;case"|":case">":{Q=`block scalar indicator ${$[0]}`;break}case"@":case"`":{Q=`reserved character ${$[0]}`;break}}if(Q)Z(0,"BAD_SCALAR_START",`Plain value cannot start with ${Q}`);return r9($)}function rJ($,Z){if($[$.length-1]!=="'"||$.length===1)Z($.length,"MISSING_CHAR","Missing closing 'quote");return r9($.slice(1,-1)).replace(/''/g,"'")}function r9($){let Z,Q;try{Z=new RegExp(`(.*?)(?<![ ])[ ]*\r?
85
85
  `,"sy"),Q=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
86
86
  `,"sy")}catch{Z=/(.*?)[ \t]*\r?\n/sy,Q=/[ \t]*(.*?)[ \t]*\r?\n/sy}let X=Z.exec($);if(!X)return $;let z=X[1],J=" ",H=Z.lastIndex;Q.lastIndex=H;while(X=Q.exec($)){if(X[1]==="")if(J===`
87
87
  `)z+=J;else J=`
88
- `;else z+=J+X[1],J=" ";H=Q.lastIndex}let U=/[ \t]*(.*)/sy;return U.lastIndex=H,X=U.exec($),z+J+(X?.[1]??"")}function MJ($,Z){let Q="";for(let X=1;X<$.length-1;++X){let z=$[X];if(z==="\r"&&$[X+1]===`
88
+ `;else z+=J+X[1],J=" ";H=Q.lastIndex}let U=/[ \t]*(.*)/sy;return U.lastIndex=H,X=U.exec($),z+J+(X?.[1]??"")}function nJ($,Z){let Q="";for(let X=1;X<$.length-1;++X){let z=$[X];if(z==="\r"&&$[X+1]===`
89
89
  `)continue;if(z===`
90
- `){let{fold:J,offset:H}=LJ($,X);Q+=J,X=H}else if(z==="\\"){let J=$[++X],H=RJ[J];if(H)Q+=H;else if(J===`
90
+ `){let{fold:J,offset:H}=aJ($,X);Q+=J,X=H}else if(z==="\\"){let J=$[++X],H=sJ[J];if(H)Q+=H;else if(J===`
91
91
  `){J=$[X+1];while(J===" "||J==="\t")J=$[++X+1]}else if(J==="\r"&&$[X+1]===`
92
- `){J=$[++X+1];while(J===" "||J==="\t")J=$[++X+1]}else if(J==="x"||J==="u"||J==="U"){let U=J==="x"?2:J==="u"?4:8;Q+=FJ($,X+1,U,Z),X+=U}else{let U=$.substr(X-1,2);Z(X-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${U}`),Q+=U}}else if(z===" "||z==="\t"){let J=X,H=$[X+1];while(H===" "||H==="\t")H=$[++X+1];if(H!==`
92
+ `){J=$[++X+1];while(J===" "||J==="\t")J=$[++X+1]}else if(J==="x"||J==="u"||J==="U"){let U=J==="x"?2:J==="u"?4:8;Q+=oJ($,X+1,U,Z),X+=U}else{let U=$.substr(X-1,2);Z(X-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${U}`),Q+=U}}else if(z===" "||z==="\t"){let J=X,H=$[X+1];while(H===" "||H==="\t")H=$[++X+1];if(H!==`
93
93
  `&&!(H==="\r"&&$[X+2]===`
94
- `))Q+=X>J?$.slice(J,X+1):z}else Q+=z}if($[$.length-1]!=='"'||$.length===1)Z($.length,"MISSING_CHAR",'Missing closing "quote');return Q}function LJ($,Z){let Q="",X=$[Z+1];while(X===" "||X==="\t"||X===`
94
+ `))Q+=X>J?$.slice(J,X+1):z}else Q+=z}if($[$.length-1]!=='"'||$.length===1)Z($.length,"MISSING_CHAR",'Missing closing "quote');return Q}function aJ($,Z){let Q="",X=$[Z+1];while(X===" "||X==="\t"||X===`
95
95
  `||X==="\r"){if(X==="\r"&&$[Z+2]!==`
96
96
  `)break;if(X===`
97
97
  `)Q+=`
98
- `;Z+=1,X=$[Z+1]}if(!Q)Q=" ";return{fold:Q,offset:Z}}var RJ={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
99
- `,r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function FJ($,Z,Q,X){let z=$.substr(Z,Q),H=z.length===Q&&/^[0-9a-fA-F]+$/.test(z)?parseInt(z,16):NaN;try{return String.fromCodePoint(H)}catch{let U=$.substr(Z-2,Q+2);return X(Z-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${U}`),U}}NJ.resolveFlowScalar=DJ});var j9=F((EJ)=>{var A0=w(),S9=h(),PJ=$8(),TJ=Q8();function CJ($,Z,Q,X){let{value:z,type:J,comment:H,range:U}=Z.type==="block-scalar"?PJ.resolveBlockScalar($,Z,X):TJ.resolveFlowScalar(Z,$.options.strict,X),q=Q?$.directives.tagName(Q.source,(G)=>X(Q,"TAG_RESOLVE_FAILED",G)):null,Y;if($.options.stringKeys&&$.atKey)Y=$.schema[A0.SCALAR];else if(q)Y=wJ($.schema,z,q,Q,X);else if(Z.type==="scalar")Y=bJ($,z,Z,X);else Y=$.schema[A0.SCALAR];let B;try{let G=Y.resolve(z,(V)=>X(Q??Z,"TAG_RESOLVE_FAILED",V),$.options);B=A0.isScalar(G)?G:new S9.Scalar(G)}catch(G){let V=G instanceof Error?G.message:String(G);X(Q??Z,"TAG_RESOLVE_FAILED",V),B=new S9.Scalar(z)}if(B.range=U,B.source=z,J)B.type=J;if(q)B.tag=q;if(Y.format)B.format=Y.format;if(H)B.comment=H;return B}function wJ($,Z,Q,X,z){if(Q==="!")return $[A0.SCALAR];let J=[];for(let U of $.tags)if(!U.collection&&U.tag===Q)if(U.default&&U.test)J.push(U);else return U;for(let U of J)if(U.test?.test(Z))return U;let H=$.knownTags[Q];if(H&&!H.collection)return $.tags.push(Object.assign({},H,{default:!1,test:void 0})),H;return z(X,"TAG_RESOLVE_FAILED",`Unresolved tag: ${Q}`,Q!=="tag:yaml.org,2002:str"),$[A0.SCALAR]}function bJ({atKey:$,directives:Z,schema:Q},X,z,J){let H=Q.tags.find((U)=>(U.default===!0||$&&U.default==="key")&&U.test?.test(X))||Q[A0.SCALAR];if(Q.compat){let U=Q.compat.find((q)=>q.default&&q.test?.test(X))??Q[A0.SCALAR];if(H.tag!==U.tag){let q=Z.tagString(H.tag),Y=Z.tagString(U.tag),B=`Value may be parsed as either ${q} or ${Y}`;J(z,"TAG_RESOLVE_FAILED",B,!0)}}return H}EJ.composeScalar=CJ});var x9=F((xJ)=>{function jJ($,Z,Q){if(Z){Q??(Q=Z.length);for(let X=Q-1;X>=0;--X){let z=Z[X];switch(z.type){case"space":case"comment":case"newline":$-=z.source.length;continue}z=Z[++X];while(z?.type==="space")$+=z.source.length,z=Z[++X];break}}return $}xJ.emptyScalarPosition=jJ});var y9=F((lJ)=>{var hJ=J1(),yJ=w(),vJ=b9(),g9=j9(),fJ=l0(),kJ=x9(),uJ={composeNode:h9,composeEmptyNode:X8};function h9($,Z,Q,X){let z=$.atKey,{spaceBefore:J,comment:H,anchor:U,tag:q}=Q,Y,B=!0;switch(Z.type){case"alias":if(Y=mJ($,Z,X),U||q)X(Z,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(Y=g9.composeScalar($,Z,q,X),U)Y.anchor=U.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":try{if(Y=vJ.composeCollection(uJ,$,Z,Q,X),U)Y.anchor=U.source.substring(1)}catch(G){let V=G instanceof Error?G.message:String(G);X(Z,"RESOURCE_EXHAUSTION",V)}break;default:{let G=Z.type==="error"?Z.message:`Unsupported token (type: ${Z.type})`;X(Z,"UNEXPECTED_TOKEN",G),B=!1}}if(Y??(Y=X8($,Z.offset,void 0,null,Q,X)),U&&Y.anchor==="")X(U,"BAD_ALIAS","Anchor cannot be an empty string");if(z&&$.options.stringKeys&&(!yJ.isScalar(Y)||typeof Y.value!=="string"||Y.tag&&Y.tag!=="tag:yaml.org,2002:str"))X(q??Z,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(J)Y.spaceBefore=!0;if(H)if(Z.type==="scalar"&&Z.source==="")Y.comment=H;else Y.commentBefore=H;if($.options.keepSourceTokens&&B)Y.srcToken=Z;return Y}function X8($,Z,Q,X,{spaceBefore:z,comment:J,anchor:H,tag:U,end:q},Y){let B={type:"scalar",offset:kJ.emptyScalarPosition(Z,Q,X),indent:-1,source:""},G=g9.composeScalar($,B,U,Y);if(H){if(G.anchor=H.source.substring(1),G.anchor==="")Y(H,"BAD_ALIAS","Anchor cannot be an empty string")}if(z)G.spaceBefore=!0;if(J)G.comment=J,G.range[2]=q;return G}function mJ({options:$},{offset:Z,source:Q,end:X},z){let J=new hJ.Alias(Q.substring(1));if(J.source==="")z(Z,"BAD_ALIAS","Alias cannot be an empty string");if(J.source.endsWith(":"))z(Z+Q.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let H=Z+Q.length,U=fJ.resolveEnd(X,H,$.strict,z);if(J.range=[Z,H,U.offset],U.comment)J.comment=U.comment;return J}lJ.composeEmptyNode=X8;lJ.composeNode=h9});var f9=F((nJ)=>{var cJ=M1(),v9=y9(),iJ=l0(),rJ=R1();function aJ($,Z,{offset:Q,start:X,value:z,end:J},H){let U=Object.assign({_directives:Z},$),q=new cJ.Document(void 0,U),Y={atKey:!1,atRoot:!0,directives:q.directives,options:q.options,schema:q.schema},B=rJ.resolveProps(X,{indicator:"doc-start",next:z??J?.[0],offset:Q,onError:H,parentIndent:0,startOnNewline:!0});if(B.found){if(q.directives.docStart=!0,z&&(z.type==="block-map"||z.type==="block-seq")&&!B.hasNewline)H(B.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}q.contents=z?v9.composeNode(Y,z,B,H):v9.composeEmptyNode(Y,B.end,X,null,B,H);let G=q.contents.range[2],V=iJ.resolveEnd(J,G,!1,H);if(V.comment)q.comment=V.comment;return q.range=[Q,G,V.offset],q}nJ.composeDoc=aJ});var z8=F((QH)=>{var oJ=t0("process"),tJ=q$(),eJ=M1(),F1=L1(),k9=w(),$H=f9(),ZH=l0();function N1($){if(typeof $==="number")return[$,$+1];if(Array.isArray($))return $.length===2?$:[$[0],$[1]];let{offset:Z,source:Q}=$;return[Z,Z+(typeof Q==="string"?Q.length:1)]}function u9($){let Z="",Q=!1,X=!1;for(let z=0;z<$.length;++z){let J=$[z];switch(J[0]){case"#":Z+=(Z===""?"":X?`
98
+ `;Z+=1,X=$[Z+1]}if(!Q)Q=" ";return{fold:Q,offset:Z}}var sJ={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
99
+ `,r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function oJ($,Z,Q,X){let z=$.substr(Z,Q),H=z.length===Q&&/^[0-9a-fA-F]+$/.test(z)?parseInt(z,16):NaN;try{return String.fromCodePoint(H)}catch{let U=$.substr(Z-2,Q+2);return X(Z-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${U}`),U}}tJ.resolveFlowScalar=cJ});var a9=P((JH)=>{var S0=j(),n9=h(),$H=B8(),ZH=_8();function QH($,Z,Q,X){let{value:z,type:J,comment:H,range:U}=Z.type==="block-scalar"?$H.resolveBlockScalar($,Z,X):ZH.resolveFlowScalar(Z,$.options.strict,X),q=Q?$.directives.tagName(Q.source,(V)=>X(Q,"TAG_RESOLVE_FAILED",V)):null,Y;if($.options.stringKeys&&$.atKey)Y=$.schema[S0.SCALAR];else if(q)Y=XH($.schema,z,q,Q,X);else if(Z.type==="scalar")Y=zH($,z,Z,X);else Y=$.schema[S0.SCALAR];let G;try{let V=Y.resolve(z,(B)=>X(Q??Z,"TAG_RESOLVE_FAILED",B),$.options);G=S0.isScalar(V)?V:new n9.Scalar(V)}catch(V){let B=V instanceof Error?V.message:String(V);X(Q??Z,"TAG_RESOLVE_FAILED",B),G=new n9.Scalar(z)}if(G.range=U,G.source=z,J)G.type=J;if(q)G.tag=q;if(Y.format)G.format=Y.format;if(H)G.comment=H;return G}function XH($,Z,Q,X,z){if(Q==="!")return $[S0.SCALAR];let J=[];for(let U of $.tags)if(!U.collection&&U.tag===Q)if(U.default&&U.test)J.push(U);else return U;for(let U of J)if(U.test?.test(Z))return U;let H=$.knownTags[Q];if(H&&!H.collection)return $.tags.push(Object.assign({},H,{default:!1,test:void 0})),H;return z(X,"TAG_RESOLVE_FAILED",`Unresolved tag: ${Q}`,Q!=="tag:yaml.org,2002:str"),$[S0.SCALAR]}function zH({atKey:$,directives:Z,schema:Q},X,z,J){let H=Q.tags.find((U)=>(U.default===!0||$&&U.default==="key")&&U.test?.test(X))||Q[S0.SCALAR];if(Q.compat){let U=Q.compat.find((q)=>q.default&&q.test?.test(X))??Q[S0.SCALAR];if(H.tag!==U.tag){let q=Z.tagString(H.tag),Y=Z.tagString(U.tag),G=`Value may be parsed as either ${q} or ${Y}`;J(z,"TAG_RESOLVE_FAILED",G,!0)}}return H}JH.composeScalar=QH});var s9=P((qH)=>{function UH($,Z,Q){if(Z){Q??(Q=Z.length);for(let X=Q-1;X>=0;--X){let z=Z[X];switch(z.type){case"space":case"comment":case"newline":$-=z.source.length;continue}z=Z[++X];while(z?.type==="space")$+=z.source.length,z=Z[++X];break}}return $}qH.emptyScalarPosition=UH});var e9=P((IH)=>{var GH=B2(),VH=j(),BH=i9(),o9=a9(),WH=s0(),_H=s9(),OH={composeNode:t9,composeEmptyNode:O8};function t9($,Z,Q,X){let z=$.atKey,{spaceBefore:J,comment:H,anchor:U,tag:q}=Q,Y,G=!0;switch(Z.type){case"alias":if(Y=DH($,Z,X),U||q)X(Z,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(Y=o9.composeScalar($,Z,q,X),U)Y.anchor=U.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":try{if(Y=BH.composeCollection(OH,$,Z,Q,X),U)Y.anchor=U.source.substring(1)}catch(V){let B=V instanceof Error?V.message:String(V);X(Z,"RESOURCE_EXHAUSTION",B)}break;default:{let V=Z.type==="error"?Z.message:`Unsupported token (type: ${Z.type})`;X(Z,"UNEXPECTED_TOKEN",V),G=!1}}if(Y??(Y=O8($,Z.offset,void 0,null,Q,X)),U&&Y.anchor==="")X(U,"BAD_ALIAS","Anchor cannot be an empty string");if(z&&$.options.stringKeys&&(!VH.isScalar(Y)||typeof Y.value!=="string"||Y.tag&&Y.tag!=="tag:yaml.org,2002:str"))X(q??Z,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(J)Y.spaceBefore=!0;if(H)if(Z.type==="scalar"&&Z.source==="")Y.comment=H;else Y.commentBefore=H;if($.options.keepSourceTokens&&G)Y.srcToken=Z;return Y}function O8($,Z,Q,X,{spaceBefore:z,comment:J,anchor:H,tag:U,end:q},Y){let G={type:"scalar",offset:_H.emptyScalarPosition(Z,Q,X),indent:-1,source:""},V=o9.composeScalar($,G,U,Y);if(H){if(V.anchor=H.source.substring(1),V.anchor==="")Y(H,"BAD_ALIAS","Anchor cannot be an empty string")}if(z)V.spaceBefore=!0;if(J)V.comment=J,V.range[2]=q;return V}function DH({options:$},{offset:Z,source:Q,end:X},z){let J=new GH.Alias(Q.substring(1));if(J.source==="")z(Z,"BAD_ALIAS","Alias cannot be an empty string");if(J.source.endsWith(":"))z(Z+Q.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let H=Z+Q.length,U=WH.resolveEnd(X,H,$.strict,z);if(J.range=[Z,H,U.offset],U.comment)J.comment=U.comment;return J}IH.composeEmptyNode=O8;IH.composeNode=t9});var ZZ=P((PH)=>{var RH=T2(),$Z=e9(),MH=s0(),FH=C2();function NH($,Z,{offset:Q,start:X,value:z,end:J},H){let U=Object.assign({_directives:Z},$),q=new RH.Document(void 0,U),Y={atKey:!1,atRoot:!0,directives:q.directives,options:q.options,schema:q.schema},G=FH.resolveProps(X,{indicator:"doc-start",next:z??J?.[0],offset:Q,onError:H,parentIndent:0,startOnNewline:!0});if(G.found){if(q.directives.docStart=!0,z&&(z.type==="block-map"||z.type==="block-seq")&&!G.hasNewline)H(G.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}q.contents=z?$Z.composeNode(Y,z,G,H):$Z.composeEmptyNode(Y,G.end,X,null,G,H);let V=q.contents.range[2],B=MH.resolveEnd(J,V,!1,H);if(B.comment)q.comment=B.comment;return q.range=[Q,V,B.offset],q}PH.composeDoc=NH});var D8=P((jH)=>{var TH=H2("process"),wH=R$(),CH=T2(),b2=w2(),QZ=j(),bH=ZZ(),EH=s0();function E2($){if(typeof $==="number")return[$,$+1];if(Array.isArray($))return $.length===2?$:[$[0],$[1]];let{offset:Z,source:Q}=$;return[Z,Z+(typeof Q==="string"?Q.length:1)]}function XZ($){let Z="",Q=!1,X=!1;for(let z=0;z<$.length;++z){let J=$[z];switch(J[0]){case"#":Z+=(Z===""?"":X?`
100
100
 
101
101
  `:`
102
- `)+(J.substring(1)||" "),Q=!0,X=!1;break;case"%":if($[z+1]?.[0]!=="#")z+=1;Q=!1;break;default:if(!Q)X=!0;Q=!1}}return{comment:Z,afterEmptyLine:X}}class m9{constructor($={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(Z,Q,X,z)=>{let J=N1(Z);if(z)this.warnings.push(new F1.YAMLWarning(J,Q,X));else this.errors.push(new F1.YAMLParseError(J,Q,X))},this.directives=new tJ.Directives({version:$.version||"1.2"}),this.options=$}decorate($,Z){let{comment:Q,afterEmptyLine:X}=u9(this.prelude);if(Q){let z=$.contents;if(Z)$.comment=$.comment?`${$.comment}
103
- ${Q}`:Q;else if(X||$.directives.docStart||!z)$.commentBefore=Q;else if(k9.isCollection(z)&&!z.flow&&z.items.length>0){let J=z.items[0];if(k9.isPair(J))J=J.key;let H=J.commentBefore;J.commentBefore=H?`${Q}
102
+ `)+(J.substring(1)||" "),Q=!0,X=!1;break;case"%":if($[z+1]?.[0]!=="#")z+=1;Q=!1;break;default:if(!Q)X=!0;Q=!1}}return{comment:Z,afterEmptyLine:X}}class zZ{constructor($={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(Z,Q,X,z)=>{let J=E2(Z);if(z)this.warnings.push(new b2.YAMLWarning(J,Q,X));else this.errors.push(new b2.YAMLParseError(J,Q,X))},this.directives=new wH.Directives({version:$.version||"1.2"}),this.options=$}decorate($,Z){let{comment:Q,afterEmptyLine:X}=XZ(this.prelude);if(Q){let z=$.contents;if(Z)$.comment=$.comment?`${$.comment}
103
+ ${Q}`:Q;else if(X||$.directives.docStart||!z)$.commentBefore=Q;else if(QZ.isCollection(z)&&!z.flow&&z.items.length>0){let J=z.items[0];if(QZ.isPair(J))J=J.key;let H=J.commentBefore;J.commentBefore=H?`${Q}
104
104
  ${H}`:Q}else{let J=z.commentBefore;z.commentBefore=J?`${Q}
105
- ${J}`:Q}}if(Z){for(let z=0;z<this.errors.length;++z)$.errors.push(this.errors[z]);for(let z=0;z<this.warnings.length;++z)$.warnings.push(this.warnings[z])}else $.errors=this.errors,$.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:u9(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose($,Z=!1,Q=-1){for(let X of $)yield*this.next(X);yield*this.end(Z,Q)}*next($){if(oJ.env.LOG_STREAM)console.dir($,{depth:null});switch($.type){case"directive":this.directives.add($.source,(Z,Q,X)=>{let z=N1($);z[0]+=Z,this.onError(z,"BAD_DIRECTIVE",Q,X)}),this.prelude.push($.source),this.atDirectives=!0;break;case"document":{let Z=$H.composeDoc(this.options,this.directives,$,this.onError);if(this.atDirectives&&!Z.directives.docStart)this.onError($,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(Z,!1),this.doc)yield this.doc;this.doc=Z,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push($.source);break;case"error":{let Z=$.source?`${$.message}: ${JSON.stringify($.source)}`:$.message,Q=new F1.YAMLParseError(N1($),"UNEXPECTED_TOKEN",Z);if(this.atDirectives||!this.doc)this.errors.push(Q);else this.doc.errors.push(Q);break}case"doc-end":{if(!this.doc){this.errors.push(new F1.YAMLParseError(N1($),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let Z=ZH.resolveEnd($.end,$.offset+$.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),Z.comment){let Q=this.doc.comment;this.doc.comment=Q?`${Q}
106
- ${Z.comment}`:Z.comment}this.doc.range[2]=Z.offset;break}default:this.errors.push(new F1.YAMLParseError(N1($),"UNEXPECTED_TOKEN",`Unsupported token ${$.type}`))}}*end($=!1,Z=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if($){let Q=Object.assign({_directives:this.directives},this.options),X=new eJ.Document(void 0,Q);if(this.atDirectives)this.onError(Z,"MISSING_CHAR","Missing directives-end indicator line");X.range=[0,Z,Z],this.decorate(X,!1),yield X}}}QH.Composer=m9});var d9=F((GH)=>{var zH=$8(),JH=Q8(),HH=L1(),l9=Y1();function UH($,Z=!0,Q){if($){let X=(z,J,H)=>{let U=typeof z==="number"?z:Array.isArray(z)?z[0]:z.offset;if(Q)Q(U,J,H);else throw new HH.YAMLParseError([U,U+1],J,H)};switch($.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return JH.resolveFlowScalar($,Z,X);case"block-scalar":return zH.resolveBlockScalar({options:{strict:Z}},$,X)}}return null}function qH($,Z){let{implicitKey:Q=!1,indent:X,inFlow:z=!1,offset:J=-1,type:H="PLAIN"}=Z,U=l9.stringifyString({type:H,value:$},{implicitKey:Q,indent:X>0?" ".repeat(X):"",inFlow:z,options:{blockQuote:!0,lineWidth:-1}}),q=Z.end??[{type:"newline",offset:-1,indent:X,source:`
105
+ ${J}`:Q}}if(Z){for(let z=0;z<this.errors.length;++z)$.errors.push(this.errors[z]);for(let z=0;z<this.warnings.length;++z)$.warnings.push(this.warnings[z])}else $.errors=this.errors,$.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:XZ(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose($,Z=!1,Q=-1){for(let X of $)yield*this.next(X);yield*this.end(Z,Q)}*next($){if(TH.env.LOG_STREAM)console.dir($,{depth:null});switch($.type){case"directive":this.directives.add($.source,(Z,Q,X)=>{let z=E2($);z[0]+=Z,this.onError(z,"BAD_DIRECTIVE",Q,X)}),this.prelude.push($.source),this.atDirectives=!0;break;case"document":{let Z=bH.composeDoc(this.options,this.directives,$,this.onError);if(this.atDirectives&&!Z.directives.docStart)this.onError($,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(Z,!1),this.doc)yield this.doc;this.doc=Z,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push($.source);break;case"error":{let Z=$.source?`${$.message}: ${JSON.stringify($.source)}`:$.message,Q=new b2.YAMLParseError(E2($),"UNEXPECTED_TOKEN",Z);if(this.atDirectives||!this.doc)this.errors.push(Q);else this.doc.errors.push(Q);break}case"doc-end":{if(!this.doc){this.errors.push(new b2.YAMLParseError(E2($),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let Z=EH.resolveEnd($.end,$.offset+$.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),Z.comment){let Q=this.doc.comment;this.doc.comment=Q?`${Q}
106
+ ${Z.comment}`:Z.comment}this.doc.range[2]=Z.offset;break}default:this.errors.push(new b2.YAMLParseError(E2($),"UNEXPECTED_TOKEN",`Unsupported token ${$.type}`))}}*end($=!1,Z=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if($){let Q=Object.assign({_directives:this.directives},this.options),X=new CH.Document(void 0,Q);if(this.atDirectives)this.onError(Z,"MISSING_CHAR","Missing directives-end indicator line");X.range=[0,Z,Z],this.decorate(X,!1),yield X}}}jH.Composer=zZ});var UZ=P((uH)=>{var xH=B8(),gH=_8(),yH=w2(),JZ=D2();function hH($,Z=!0,Q){if($){let X=(z,J,H)=>{let U=typeof z==="number"?z:Array.isArray(z)?z[0]:z.offset;if(Q)Q(U,J,H);else throw new yH.YAMLParseError([U,U+1],J,H)};switch($.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return gH.resolveFlowScalar($,Z,X);case"block-scalar":return xH.resolveBlockScalar({options:{strict:Z}},$,X)}}return null}function vH($,Z){let{implicitKey:Q=!1,indent:X,inFlow:z=!1,offset:J=-1,type:H="PLAIN"}=Z,U=JZ.stringifyString({type:H,value:$},{implicitKey:Q,indent:X>0?" ".repeat(X):"",inFlow:z,options:{blockQuote:!0,lineWidth:-1}}),q=Z.end??[{type:"newline",offset:-1,indent:X,source:`
107
107
  `}];switch(U[0]){case"|":case">":{let Y=U.indexOf(`
108
- `),B=U.substring(0,Y),G=U.substring(Y+1)+`
109
- `,V=[{type:"block-scalar-header",offset:J,indent:X,source:B}];if(!p9(V,q))V.push({type:"newline",offset:-1,indent:X,source:`
110
- `});return{type:"block-scalar",offset:J,indent:X,props:V,source:G}}case'"':return{type:"double-quoted-scalar",offset:J,indent:X,source:U,end:q};case"'":return{type:"single-quoted-scalar",offset:J,indent:X,source:U,end:q};default:return{type:"scalar",offset:J,indent:X,source:U,end:q}}}function YH($,Z,Q={}){let{afterKey:X=!1,implicitKey:z=!1,inFlow:J=!1,type:H}=Q,U="indent"in $?$.indent:null;if(X&&typeof U==="number")U+=2;if(!H)switch($.type){case"single-quoted-scalar":H="QUOTE_SINGLE";break;case"double-quoted-scalar":H="QUOTE_DOUBLE";break;case"block-scalar":{let Y=$.props[0];if(Y.type!=="block-scalar-header")throw Error("Invalid block scalar header");H=Y.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:H="PLAIN"}let q=l9.stringifyString({type:H,value:Z},{implicitKey:z||U===null,indent:U!==null&&U>0?" ".repeat(U):"",inFlow:J,options:{blockQuote:!0,lineWidth:-1}});switch(q[0]){case"|":case">":BH($,q);break;case'"':J8($,q,"double-quoted-scalar");break;case"'":J8($,q,"single-quoted-scalar");break;default:J8($,q,"scalar")}}function BH($,Z){let Q=Z.indexOf(`
108
+ `),G=U.substring(0,Y),V=U.substring(Y+1)+`
109
+ `,B=[{type:"block-scalar-header",offset:J,indent:X,source:G}];if(!HZ(B,q))B.push({type:"newline",offset:-1,indent:X,source:`
110
+ `});return{type:"block-scalar",offset:J,indent:X,props:B,source:V}}case'"':return{type:"double-quoted-scalar",offset:J,indent:X,source:U,end:q};case"'":return{type:"single-quoted-scalar",offset:J,indent:X,source:U,end:q};default:return{type:"scalar",offset:J,indent:X,source:U,end:q}}}function fH($,Z,Q={}){let{afterKey:X=!1,implicitKey:z=!1,inFlow:J=!1,type:H}=Q,U="indent"in $?$.indent:null;if(X&&typeof U==="number")U+=2;if(!H)switch($.type){case"single-quoted-scalar":H="QUOTE_SINGLE";break;case"double-quoted-scalar":H="QUOTE_DOUBLE";break;case"block-scalar":{let Y=$.props[0];if(Y.type!=="block-scalar-header")throw Error("Invalid block scalar header");H=Y.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:H="PLAIN"}let q=JZ.stringifyString({type:H,value:Z},{implicitKey:z||U===null,indent:U!==null&&U>0?" ".repeat(U):"",inFlow:J,options:{blockQuote:!0,lineWidth:-1}});switch(q[0]){case"|":case">":kH($,q);break;case'"':I8($,q,"double-quoted-scalar");break;case"'":I8($,q,"single-quoted-scalar");break;default:I8($,q,"scalar")}}function kH($,Z){let Q=Z.indexOf(`
111
111
  `),X=Z.substring(0,Q),z=Z.substring(Q+1)+`
112
- `;if($.type==="block-scalar"){let J=$.props[0];if(J.type!=="block-scalar-header")throw Error("Invalid block scalar header");J.source=X,$.source=z}else{let{offset:J}=$,H="indent"in $?$.indent:-1,U=[{type:"block-scalar-header",offset:J,indent:H,source:X}];if(!p9(U,"end"in $?$.end:void 0))U.push({type:"newline",offset:-1,indent:H,source:`
113
- `});for(let q of Object.keys($))if(q!=="type"&&q!=="offset")delete $[q];Object.assign($,{type:"block-scalar",indent:H,props:U,source:z})}}function p9($,Z){if(Z)for(let Q of Z)switch(Q.type){case"space":case"comment":$.push(Q);break;case"newline":return $.push(Q),!0}return!1}function J8($,Z,Q){switch($.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":$.type=Q,$.source=Z;break;case"block-scalar":{let X=$.props.slice(1),z=Z.length;if($.props[0].type==="block-scalar-header")z-=$.props[0].source.length;for(let J of X)J.offset+=z;delete $.props,Object.assign($,{type:Q,source:Z,end:X});break}case"block-map":case"block-seq":{let z={type:"newline",offset:$.offset+Z.length,indent:$.indent,source:`
114
- `};delete $.items,Object.assign($,{type:Q,source:Z,end:[z]});break}default:{let X="indent"in $?$.indent:-1,z="end"in $&&Array.isArray($.end)?$.end.filter((J)=>J.type==="space"||J.type==="comment"||J.type==="newline"):[];for(let J of Object.keys($))if(J!=="type"&&J!=="offset")delete $[J];Object.assign($,{type:Q,indent:X,source:Z,end:z})}}}GH.createScalarToken=qH;GH.resolveAsScalar=UH;GH.setScalarValue=YH});var c9=F((DH)=>{var OH=($)=>("type"in $)?b2($):w2($);function b2($){switch($.type){case"block-scalar":{let Z="";for(let Q of $.props)Z+=b2(Q);return Z+$.source}case"block-map":case"block-seq":{let Z="";for(let Q of $.items)Z+=w2(Q);return Z}case"flow-collection":{let Z=$.start.source;for(let Q of $.items)Z+=w2(Q);for(let Q of $.end)Z+=Q.source;return Z}case"document":{let Z=w2($);if($.end)for(let Q of $.end)Z+=Q.source;return Z}default:{let Z=$.source;if("end"in $&&$.end)for(let Q of $.end)Z+=Q.source;return Z}}}function w2({start:$,key:Z,sep:Q,value:X}){let z="";for(let J of $)z+=J.source;if(Z)z+=b2(Z);if(Q)for(let J of Q)z+=J.source;if(X)z+=b2(X);return z}DH.stringify=OH});var a9=F((MH)=>{var H8=Symbol("break visit"),KH=Symbol("skip children"),i9=Symbol("remove item");function P0($,Z){if("type"in $&&$.type==="document")$={start:$.start,value:$.value};r9(Object.freeze([]),$,Z)}P0.BREAK=H8;P0.SKIP=KH;P0.REMOVE=i9;P0.itemAtPath=($,Z)=>{let Q=$;for(let[X,z]of Z){let J=Q?.[X];if(J&&"items"in J)Q=J.items[z];else return}return Q};P0.parentCollection=($,Z)=>{let Q=P0.itemAtPath($,Z.slice(0,-1)),X=Z[Z.length-1][0],z=Q?.[X];if(z&&"items"in z)return z;throw Error("Parent collection not found")};function r9($,Z,Q){let X=Q(Z,$);if(typeof X==="symbol")return X;for(let z of["key","value"]){let J=Z[z];if(J&&"items"in J){for(let H=0;H<J.items.length;++H){let U=r9(Object.freeze($.concat([[z,H]])),J.items[H],Q);if(typeof U==="number")H=U-1;else if(U===H8)return H8;else if(U===i9)J.items.splice(H,1),H-=1}if(typeof X==="function"&&z==="key")X=X(Z,$)}}return typeof X==="function"?X(Z,$):X}MH.visit=P0});var E2=F((CH)=>{var U8=d9(),RH=c9(),FH=a9(),q8="\uFEFF",Y8="\x02",B8="\x18",G8="\x1F",NH=($)=>!!$&&("items"in $),AH=($)=>!!$&&($.type==="scalar"||$.type==="single-quoted-scalar"||$.type==="double-quoted-scalar"||$.type==="block-scalar");function PH($){switch($){case q8:return"<BOM>";case Y8:return"<DOC>";case B8:return"<FLOW_END>";case G8:return"<SCALAR>";default:return JSON.stringify($)}}function TH($){switch($){case q8:return"byte-order-mark";case Y8:return"doc-mode";case B8:return"flow-error-end";case G8:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
112
+ `;if($.type==="block-scalar"){let J=$.props[0];if(J.type!=="block-scalar-header")throw Error("Invalid block scalar header");J.source=X,$.source=z}else{let{offset:J}=$,H="indent"in $?$.indent:-1,U=[{type:"block-scalar-header",offset:J,indent:H,source:X}];if(!HZ(U,"end"in $?$.end:void 0))U.push({type:"newline",offset:-1,indent:H,source:`
113
+ `});for(let q of Object.keys($))if(q!=="type"&&q!=="offset")delete $[q];Object.assign($,{type:"block-scalar",indent:H,props:U,source:z})}}function HZ($,Z){if(Z)for(let Q of Z)switch(Q.type){case"space":case"comment":$.push(Q);break;case"newline":return $.push(Q),!0}return!1}function I8($,Z,Q){switch($.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":$.type=Q,$.source=Z;break;case"block-scalar":{let X=$.props.slice(1),z=Z.length;if($.props[0].type==="block-scalar-header")z-=$.props[0].source.length;for(let J of X)J.offset+=z;delete $.props,Object.assign($,{type:Q,source:Z,end:X});break}case"block-map":case"block-seq":{let z={type:"newline",offset:$.offset+Z.length,indent:$.indent,source:`
114
+ `};delete $.items,Object.assign($,{type:Q,source:Z,end:[z]});break}default:{let X="indent"in $?$.indent:-1,z="end"in $&&Array.isArray($.end)?$.end.filter((J)=>J.type==="space"||J.type==="comment"||J.type==="newline"):[];for(let J of Object.keys($))if(J!=="type"&&J!=="offset")delete $[J];Object.assign($,{type:Q,indent:X,source:Z,end:z})}}}uH.createScalarToken=vH;uH.resolveAsScalar=hH;uH.setScalarValue=fH});var qZ=P((cH)=>{var dH=($)=>("type"in $)?v1($):h1($);function v1($){switch($.type){case"block-scalar":{let Z="";for(let Q of $.props)Z+=v1(Q);return Z+$.source}case"block-map":case"block-seq":{let Z="";for(let Q of $.items)Z+=h1(Q);return Z}case"flow-collection":{let Z=$.start.source;for(let Q of $.items)Z+=h1(Q);for(let Q of $.end)Z+=Q.source;return Z}case"document":{let Z=h1($);if($.end)for(let Q of $.end)Z+=Q.source;return Z}default:{let Z=$.source;if("end"in $&&$.end)for(let Q of $.end)Z+=Q.source;return Z}}}function h1({start:$,key:Z,sep:Q,value:X}){let z="";for(let J of $)z+=J.source;if(Z)z+=v1(Z);if(Q)for(let J of Q)z+=J.source;if(X)z+=v1(X);return z}cH.stringify=dH});var VZ=P((nH)=>{var K8=Symbol("break visit"),rH=Symbol("skip children"),YZ=Symbol("remove item");function x0($,Z){if("type"in $&&$.type==="document")$={start:$.start,value:$.value};GZ(Object.freeze([]),$,Z)}x0.BREAK=K8;x0.SKIP=rH;x0.REMOVE=YZ;x0.itemAtPath=($,Z)=>{let Q=$;for(let[X,z]of Z){let J=Q?.[X];if(J&&"items"in J)Q=J.items[z];else return}return Q};x0.parentCollection=($,Z)=>{let Q=x0.itemAtPath($,Z.slice(0,-1)),X=Z[Z.length-1][0],z=Q?.[X];if(z&&"items"in z)return z;throw Error("Parent collection not found")};function GZ($,Z,Q){let X=Q(Z,$);if(typeof X==="symbol")return X;for(let z of["key","value"]){let J=Z[z];if(J&&"items"in J){for(let H=0;H<J.items.length;++H){let U=GZ(Object.freeze($.concat([[z,H]])),J.items[H],Q);if(typeof U==="number")H=U-1;else if(U===K8)return K8;else if(U===YZ)J.items.splice(H,1),H-=1}if(typeof X==="function"&&z==="key")X=X(Z,$)}}return typeof X==="function"?X(Z,$):X}nH.visit=x0});var f1=P((QU)=>{var L8=UZ(),sH=qZ(),oH=VZ(),R8="\uFEFF",M8="\x02",F8="\x18",N8="\x1F",tH=($)=>!!$&&("items"in $),eH=($)=>!!$&&($.type==="scalar"||$.type==="single-quoted-scalar"||$.type==="double-quoted-scalar"||$.type==="block-scalar");function $U($){switch($){case R8:return"<BOM>";case M8:return"<DOC>";case F8:return"<FLOW_END>";case N8:return"<SCALAR>";default:return JSON.stringify($)}}function ZU($){switch($){case R8:return"byte-order-mark";case M8:return"doc-mode";case F8:return"flow-error-end";case N8:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
115
115
  `:case`\r
116
- `: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($[0]){case" ":case"\t":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}CH.createScalarToken=U8.createScalarToken;CH.resolveAsScalar=U8.resolveAsScalar;CH.setScalarValue=U8.setScalarValue;CH.stringify=RH.stringify;CH.visit=FH.visit;CH.BOM=q8;CH.DOCUMENT=Y8;CH.FLOW_END=B8;CH.SCALAR=G8;CH.isCollection=NH;CH.isScalar=AH;CH.prettyToken=PH;CH.tokenType=TH});var W8=F((pH)=>{var A1=E2();function i($){switch($){case void 0:case" ":case`
117
- `:case"\r":case"\t":return!0;default:return!1}}var n9=new Set("0123456789ABCDEFabcdef"),mH=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),S2=new Set(",[]{}"),lH=new Set(` ,[]{}
118
- \r `),V8=($)=>!$||lH.has($);class s9{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($,Z=!1){if($){if(typeof $!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+$:$,this.lineEndPos=null}this.atEnd=!Z;let Q=this.next??"stream";while(Q&&(Z||this.hasChars(1)))Q=yield*this.parseNext(Q)}atLineEnd(){let $=this.pos,Z=this.buffer[$];while(Z===" "||Z==="\t")Z=this.buffer[++$];if(!Z||Z==="#"||Z===`
116
+ `: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($[0]){case" ":case"\t":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}QU.createScalarToken=L8.createScalarToken;QU.resolveAsScalar=L8.resolveAsScalar;QU.setScalarValue=L8.setScalarValue;QU.stringify=sH.stringify;QU.visit=oH.visit;QU.BOM=R8;QU.DOCUMENT=M8;QU.FLOW_END=F8;QU.SCALAR=N8;QU.isCollection=tH;QU.isScalar=eH;QU.prettyToken=$U;QU.tokenType=ZU});var A8=P((KU)=>{var j2=f1();function o($){switch($){case void 0:case" ":case`
117
+ `:case"\r":case"\t":return!0;default:return!1}}var BZ=new Set("0123456789ABCDEFabcdef"),DU=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),k1=new Set(",[]{}"),IU=new Set(` ,[]{}
118
+ \r `),P8=($)=>!$||IU.has($);class WZ{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($,Z=!1){if($){if(typeof $!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+$:$,this.lineEndPos=null}this.atEnd=!Z;let Q=this.next??"stream";while(Q&&(Z||this.hasChars(1)))Q=yield*this.parseNext(Q)}atLineEnd(){let $=this.pos,Z=this.buffer[$];while(Z===" "||Z==="\t")Z=this.buffer[++$];if(!Z||Z==="#"||Z===`
119
119
  `)return!0;if(Z==="\r")return this.buffer[$+1]===`
120
120
  `;return!1}charAt($){return this.buffer[this.pos+$]}continueScalar($){let Z=this.buffer[$];if(this.indentNext>0){let Q=0;while(Z===" ")Z=this.buffer[++Q+$];if(Z==="\r"){let X=this.buffer[Q+$+1];if(X===`
121
121
  `||!X&&!this.atEnd)return $+Q+1}return Z===`
122
- `||Q>=this.indentNext||!Z&&!this.atEnd?$+Q:-1}if(Z==="-"||Z==="."){let Q=this.buffer.substr($,3);if((Q==="---"||Q==="...")&&i(this.buffer[$+3]))return-1}return $}getLine(){let $=this.lineEndPos;if(typeof $!=="number"||$!==-1&&$<this.pos)$=this.buffer.indexOf(`
123
- `,this.pos),this.lineEndPos=$;if($===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[$-1]==="\r")$-=1;return this.buffer.substring(this.pos,$)}hasChars($){return this.pos+$<=this.buffer.length}setNext($){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=$,null}peek($){return this.buffer.substr(this.pos,$)}*parseNext($){switch($){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 $=this.getLine();if($===null)return this.setNext("stream");if($[0]===A1.BOM)yield*this.pushCount(1),$=$.substring(1);if($[0]==="%"){let Z=$.length,Q=$.indexOf("#");while(Q!==-1){let z=$[Q-1];if(z===" "||z==="\t"){Z=Q-1;break}else Q=$.indexOf("#",Q+1)}while(!0){let z=$[Z-1];if(z===" "||z==="\t")Z-=1;else break}let X=(yield*this.pushCount(Z))+(yield*this.pushSpaces(!0));return yield*this.pushCount($.length-X),this.pushNewline(),"stream"}if(this.atLineEnd()){let Z=yield*this.pushSpaces(!0);return yield*this.pushCount($.length-Z),yield*this.pushNewline(),"stream"}return yield A1.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let $=this.charAt(0);if(!$&&!this.atEnd)return this.setNext("line-start");if($==="-"||$==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let Z=this.peek(3);if((Z==="---"||Z==="...")&&i(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,Z==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!i(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[$,Z]=this.peek(2);if(!Z&&!this.atEnd)return this.setNext("block-start");if(($==="-"||$==="?"||$===":")&&i(Z)){let Q=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=Q,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let $=this.getLine();if($===null)return this.setNext("doc");let Z=yield*this.pushIndicators();switch($[Z]){case"#":yield*this.pushCount($.length-Z);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(V8),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return Z+=yield*this.parseBlockScalarHeader(),Z+=yield*this.pushSpaces(!0),yield*this.pushCount($.length-Z),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let $,Z,Q=-1;do{if($=yield*this.pushNewline(),$>0)Z=yield*this.pushSpaces(!1),this.indentValue=Q=Z;else Z=0;Z+=yield*this.pushSpaces(!0)}while($+Z>0);let X=this.getLine();if(X===null)return this.setNext("flow");if(Q!==-1&&Q<this.indentNext&&X[0]!=="#"||Q===0&&(X.startsWith("---")||X.startsWith("..."))&&i(X[3])){if(!(Q===this.indentNext-1&&this.flowLevel===1&&(X[0]==="]"||X[0]==="}")))return this.flowLevel=0,yield A1.FLOW_END,yield*this.parseLineStart()}let z=0;while(X[z]===",")z+=yield*this.pushCount(1),z+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(z+=yield*this.pushIndicators(),X[z]){case void 0:return"flow";case"#":return yield*this.pushCount(X.length-z),"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(V8),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let J=this.charAt(1);if(this.flowKey||i(J)||J===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let $=this.charAt(0),Z=this.buffer.indexOf($,this.pos+1);if($==="'")while(Z!==-1&&this.buffer[Z+1]==="'")Z=this.buffer.indexOf("'",Z+2);else while(Z!==-1){let z=0;while(this.buffer[Z-1-z]==="\\")z+=1;if(z%2===0)break;Z=this.buffer.indexOf('"',Z+1)}let Q=this.buffer.substring(0,Z),X=Q.indexOf(`
122
+ `||Q>=this.indentNext||!Z&&!this.atEnd?$+Q:-1}if(Z==="-"||Z==="."){let Q=this.buffer.substr($,3);if((Q==="---"||Q==="...")&&o(this.buffer[$+3]))return-1}return $}getLine(){let $=this.lineEndPos;if(typeof $!=="number"||$!==-1&&$<this.pos)$=this.buffer.indexOf(`
123
+ `,this.pos),this.lineEndPos=$;if($===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[$-1]==="\r")$-=1;return this.buffer.substring(this.pos,$)}hasChars($){return this.pos+$<=this.buffer.length}setNext($){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=$,null}peek($){return this.buffer.substr(this.pos,$)}*parseNext($){switch($){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 $=this.getLine();if($===null)return this.setNext("stream");if($[0]===j2.BOM)yield*this.pushCount(1),$=$.substring(1);if($[0]==="%"){let Z=$.length,Q=$.indexOf("#");while(Q!==-1){let z=$[Q-1];if(z===" "||z==="\t"){Z=Q-1;break}else Q=$.indexOf("#",Q+1)}while(!0){let z=$[Z-1];if(z===" "||z==="\t")Z-=1;else break}let X=(yield*this.pushCount(Z))+(yield*this.pushSpaces(!0));return yield*this.pushCount($.length-X),this.pushNewline(),"stream"}if(this.atLineEnd()){let Z=yield*this.pushSpaces(!0);return yield*this.pushCount($.length-Z),yield*this.pushNewline(),"stream"}return yield j2.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let $=this.charAt(0);if(!$&&!this.atEnd)return this.setNext("line-start");if($==="-"||$==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let Z=this.peek(3);if((Z==="---"||Z==="...")&&o(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,Z==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!o(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[$,Z]=this.peek(2);if(!Z&&!this.atEnd)return this.setNext("block-start");if(($==="-"||$==="?"||$===":")&&o(Z)){let Q=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=Q,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let $=this.getLine();if($===null)return this.setNext("doc");let Z=yield*this.pushIndicators();switch($[Z]){case"#":yield*this.pushCount($.length-Z);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(P8),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return Z+=yield*this.parseBlockScalarHeader(),Z+=yield*this.pushSpaces(!0),yield*this.pushCount($.length-Z),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let $,Z,Q=-1;do{if($=yield*this.pushNewline(),$>0)Z=yield*this.pushSpaces(!1),this.indentValue=Q=Z;else Z=0;Z+=yield*this.pushSpaces(!0)}while($+Z>0);let X=this.getLine();if(X===null)return this.setNext("flow");if(Q!==-1&&Q<this.indentNext&&X[0]!=="#"||Q===0&&(X.startsWith("---")||X.startsWith("..."))&&o(X[3])){if(!(Q===this.indentNext-1&&this.flowLevel===1&&(X[0]==="]"||X[0]==="}")))return this.flowLevel=0,yield j2.FLOW_END,yield*this.parseLineStart()}let z=0;while(X[z]===",")z+=yield*this.pushCount(1),z+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(z+=yield*this.pushIndicators(),X[z]){case void 0:return"flow";case"#":return yield*this.pushCount(X.length-z),"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(P8),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let J=this.charAt(1);if(this.flowKey||o(J)||J===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let $=this.charAt(0),Z=this.buffer.indexOf($,this.pos+1);if($==="'")while(Z!==-1&&this.buffer[Z+1]==="'")Z=this.buffer.indexOf("'",Z+2);else while(Z!==-1){let z=0;while(this.buffer[Z-1-z]==="\\")z+=1;if(z%2===0)break;Z=this.buffer.indexOf('"',Z+1)}let Q=this.buffer.substring(0,Z),X=Q.indexOf(`
124
124
  `,this.pos);if(X!==-1){while(X!==-1){let z=this.continueScalar(X+1);if(z===-1)break;X=Q.indexOf(`
125
- `,z)}if(X!==-1)Z=X-(Q[X-1]==="\r"?2:1)}if(Z===-1){if(!this.atEnd)return this.setNext("quoted-scalar");Z=this.buffer.length}return yield*this.pushToIndex(Z+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let $=this.pos;while(!0){let Z=this.buffer[++$];if(Z==="+")this.blockScalarKeep=!0;else if(Z>"0"&&Z<="9")this.blockScalarIndent=Number(Z)-1;else if(Z!=="-")break}return yield*this.pushUntil((Z)=>i(Z)||Z==="#")}*parseBlockScalar(){let $=this.pos-1,Z=0,Q;$:for(let z=this.pos;Q=this.buffer[z];++z)switch(Q){case" ":Z+=1;break;case`
125
+ `,z)}if(X!==-1)Z=X-(Q[X-1]==="\r"?2:1)}if(Z===-1){if(!this.atEnd)return this.setNext("quoted-scalar");Z=this.buffer.length}return yield*this.pushToIndex(Z+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let $=this.pos;while(!0){let Z=this.buffer[++$];if(Z==="+")this.blockScalarKeep=!0;else if(Z>"0"&&Z<="9")this.blockScalarIndent=Number(Z)-1;else if(Z!=="-")break}return yield*this.pushUntil((Z)=>o(Z)||Z==="#")}*parseBlockScalar(){let $=this.pos-1,Z=0,Q;$:for(let z=this.pos;Q=this.buffer[z];++z)switch(Q){case" ":Z+=1;break;case`
126
126
  `:$=z,Z=0;break;case"\r":{let J=this.buffer[z+1];if(!J&&!this.atEnd)return this.setNext("block-scalar");if(J===`
127
127
  `)break}default:break $}if(!Q&&!this.atEnd)return this.setNext("block-scalar");if(Z>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=Z;else this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let z=this.continueScalar($+1);if(z===-1)break;$=this.buffer.indexOf(`
128
128
  `,z)}while($!==-1);if($===-1){if(!this.atEnd)return this.setNext("block-scalar");$=this.buffer.length}}let X=$+1;Q=this.buffer[X];while(Q===" ")Q=this.buffer[++X];if(Q==="\t"){while(Q==="\t"||Q===" "||Q==="\r"||Q===`
129
129
  `)Q=this.buffer[++X];$=X-1}else if(!this.blockScalarKeep)do{let z=$-1,J=this.buffer[z];if(J==="\r")J=this.buffer[--z];let H=z;while(J===" ")J=this.buffer[--z];if(J===`
130
- `&&z>=this.pos&&z+1+Z>H)$=z;else break}while(!0);return yield A1.SCALAR,yield*this.pushToIndex($+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let $=this.flowLevel>0,Z=this.pos-1,Q=this.pos-1,X;while(X=this.buffer[++Q])if(X===":"){let z=this.buffer[Q+1];if(i(z)||$&&S2.has(z))break;Z=Q}else if(i(X)){let z=this.buffer[Q+1];if(X==="\r")if(z===`
130
+ `&&z>=this.pos&&z+1+Z>H)$=z;else break}while(!0);return yield j2.SCALAR,yield*this.pushToIndex($+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let $=this.flowLevel>0,Z=this.pos-1,Q=this.pos-1,X;while(X=this.buffer[++Q])if(X===":"){let z=this.buffer[Q+1];if(o(z)||$&&k1.has(z))break;Z=Q}else if(o(X)){let z=this.buffer[Q+1];if(X==="\r")if(z===`
131
131
  `)Q+=1,X=`
132
- `,z=this.buffer[Q+1];else Z=Q;if(z==="#"||$&&S2.has(z))break;if(X===`
133
- `){let J=this.continueScalar(Q+1);if(J===-1)break;Q=Math.max(Q,J-2)}}else{if($&&S2.has(X))break;Z=Q}if(!X&&!this.atEnd)return this.setNext("plain-scalar");return yield A1.SCALAR,yield*this.pushToIndex(Z+1,!0),$?"flow":"doc"}*pushCount($){if($>0)return yield this.buffer.substr(this.pos,$),this.pos+=$,$;return 0}*pushToIndex($,Z){let Q=this.buffer.slice(this.pos,$);if(Q)return yield Q,this.pos+=Q.length,Q.length;else if(Z)yield"";return 0}*pushIndicators(){let $=0;$:while(!0){switch(this.charAt(0)){case"!":$+=yield*this.pushTag(),$+=yield*this.pushSpaces(!0);continue $;case"&":$+=yield*this.pushUntil(V8),$+=yield*this.pushSpaces(!0);continue $;case"-":case"?":case":":{let Z=this.flowLevel>0,Q=this.charAt(1);if(i(Q)||Z&&S2.has(Q)){if(!Z)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;$+=yield*this.pushCount(1),$+=yield*this.pushSpaces(!0);continue $}}}break $}return $}*pushTag(){if(this.charAt(1)==="<"){let $=this.pos+2,Z=this.buffer[$];while(!i(Z)&&Z!==">")Z=this.buffer[++$];return yield*this.pushToIndex(Z===">"?$+1:$,!1)}else{let $=this.pos+1,Z=this.buffer[$];while(Z)if(mH.has(Z))Z=this.buffer[++$];else if(Z==="%"&&n9.has(this.buffer[$+1])&&n9.has(this.buffer[$+2]))Z=this.buffer[$+=3];else break;return yield*this.pushToIndex($,!1)}}*pushNewline(){let $=this.buffer[this.pos];if($===`
132
+ `,z=this.buffer[Q+1];else Z=Q;if(z==="#"||$&&k1.has(z))break;if(X===`
133
+ `){let J=this.continueScalar(Q+1);if(J===-1)break;Q=Math.max(Q,J-2)}}else{if($&&k1.has(X))break;Z=Q}if(!X&&!this.atEnd)return this.setNext("plain-scalar");return yield j2.SCALAR,yield*this.pushToIndex(Z+1,!0),$?"flow":"doc"}*pushCount($){if($>0)return yield this.buffer.substr(this.pos,$),this.pos+=$,$;return 0}*pushToIndex($,Z){let Q=this.buffer.slice(this.pos,$);if(Q)return yield Q,this.pos+=Q.length,Q.length;else if(Z)yield"";return 0}*pushIndicators(){let $=0;$:while(!0){switch(this.charAt(0)){case"!":$+=yield*this.pushTag(),$+=yield*this.pushSpaces(!0);continue $;case"&":$+=yield*this.pushUntil(P8),$+=yield*this.pushSpaces(!0);continue $;case"-":case"?":case":":{let Z=this.flowLevel>0,Q=this.charAt(1);if(o(Q)||Z&&k1.has(Q)){if(!Z)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;$+=yield*this.pushCount(1),$+=yield*this.pushSpaces(!0);continue $}}}break $}return $}*pushTag(){if(this.charAt(1)==="<"){let $=this.pos+2,Z=this.buffer[$];while(!o(Z)&&Z!==">")Z=this.buffer[++$];return yield*this.pushToIndex(Z===">"?$+1:$,!1)}else{let $=this.pos+1,Z=this.buffer[$];while(Z)if(DU.has(Z))Z=this.buffer[++$];else if(Z==="%"&&BZ.has(this.buffer[$+1])&&BZ.has(this.buffer[$+2]))Z=this.buffer[$+=3];else break;return yield*this.pushToIndex($,!1)}}*pushNewline(){let $=this.buffer[this.pos];if($===`
134
134
  `)return yield*this.pushCount(1);else if($==="\r"&&this.charAt(1)===`
135
- `)return yield*this.pushCount(2);else return 0}*pushSpaces($){let Z=this.pos-1,Q;do Q=this.buffer[++Z];while(Q===" "||$&&Q==="\t");let X=Z-this.pos;if(X>0)yield this.buffer.substr(this.pos,X),this.pos=Z;return X}*pushUntil($){let Z=this.pos,Q=this.buffer[Z];while(!$(Q))Q=this.buffer[++Z];return yield*this.pushToIndex(Z,!1)}}pH.Lexer=s9});var _8=F((cH)=>{class o9{constructor(){this.lineStarts=[],this.addNewLine=($)=>this.lineStarts.push($),this.linePos=($)=>{let Z=0,Q=this.lineStarts.length;while(Z<Q){let z=Z+Q>>1;if(this.lineStarts[z]<$)Z=z+1;else Q=z}if(this.lineStarts[Z]===$)return{line:Z+1,col:1};if(Z===0)return{line:0,col:$};let X=this.lineStarts[Z-1];return{line:Z,col:$-X+1}}}}cH.LineCounter=o9});var O8=F((nH)=>{var rH=t0("process"),t9=E2(),aH=W8();function W0($,Z){for(let Q=0;Q<$.length;++Q)if($[Q].type===Z)return!0;return!1}function e9($){for(let Z=0;Z<$.length;++Z)switch($[Z].type){case"space":case"comment":case"newline":break;default:return Z}return-1}function ZZ($){switch($?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function j2($){switch($.type){case"document":return $.start;case"block-map":{let Z=$.items[$.items.length-1];return Z.sep??Z.start}case"block-seq":return $.items[$.items.length-1].start;default:return[]}}function p0($){if($.length===0)return[];let Z=$.length;$:while(--Z>=0)switch($[Z].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break $}while($[++Z]?.type==="space");return $.splice(Z,$.length)}function x2($,Z){if(Z.length<1e5)Array.prototype.push.apply($,Z);else for(let Q=0;Q<Z.length;++Q)$.push(Z[Q])}function $Z($){if($.start.type==="flow-seq-start"){for(let Z of $.items)if(Z.sep&&!Z.value&&!W0(Z.start,"explicit-key-ind")&&!W0(Z.sep,"map-value-ind")){if(Z.key)Z.value=Z.key;if(delete Z.key,ZZ(Z.value))if(Z.value.end)x2(Z.value.end,Z.sep);else Z.value.end=Z.sep;else x2(Z.start,Z.sep);delete Z.sep}}}class QZ{constructor($){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new aH.Lexer,this.onNewLine=$}*parse($,Z=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let Q of this.lexer.lex($,Z))yield*this.next(Q);if(!Z)yield*this.end()}*next($){if(this.source=$,rH.env.LOG_TOKENS)console.log("|",t9.prettyToken($));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=$.length;return}let Z=t9.tokenType($);if(!Z){let Q=`Not a YAML token: ${$}`;yield*this.pop({type:"error",offset:this.offset,message:Q,source:$}),this.offset+=$.length}else if(Z==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=Z,yield*this.step(),Z){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+$.length);break;case"space":if(this.atNewLine&&$[0]===" ")this.indent+=$.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=$.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=$.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let $=this.peek(1);if(this.type==="doc-end"&&$?.type!=="doc-end"){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!$)return yield*this.stream();switch($.type){case"document":return yield*this.document($);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar($);case"block-scalar":return yield*this.blockScalar($);case"block-map":return yield*this.blockMap($);case"block-seq":return yield*this.blockSequence($);case"flow-collection":return yield*this.flowCollection($);case"doc-end":return yield*this.documentEnd($)}yield*this.pop()}peek($){return this.stack[this.stack.length-$]}*pop($){let Z=$??this.stack.pop();if(!Z)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield Z;else{let Q=this.peek(1);if(Z.type==="block-scalar")Z.indent="indent"in Q?Q.indent:0;else if(Z.type==="flow-collection"&&Q.type==="document")Z.indent=0;if(Z.type==="flow-collection")$Z(Z);switch(Q.type){case"document":Q.value=Z;break;case"block-scalar":Q.props.push(Z);break;case"block-map":{let X=Q.items[Q.items.length-1];if(X.value){Q.items.push({start:[],key:Z,sep:[]}),this.onKeyLine=!0;return}else if(X.sep)X.value=Z;else{Object.assign(X,{key:Z,sep:[]}),this.onKeyLine=!X.explicitKey;return}break}case"block-seq":{let X=Q.items[Q.items.length-1];if(X.value)Q.items.push({start:[],value:Z});else X.value=Z;break}case"flow-collection":{let X=Q.items[Q.items.length-1];if(!X||X.value)Q.items.push({start:[],key:Z,sep:[]});else if(X.sep)X.value=Z;else Object.assign(X,{key:Z,sep:[]});return}default:yield*this.pop(),yield*this.pop(Z)}if((Q.type==="document"||Q.type==="block-map"||Q.type==="block-seq")&&(Z.type==="block-map"||Z.type==="block-seq")){let X=Z.items[Z.items.length-1];if(X&&!X.sep&&!X.value&&X.start.length>0&&e9(X.start)===-1&&(Z.indent===0||X.start.every((z)=>z.type!=="comment"||z.indent<Z.indent))){if(Q.type==="document")Q.end=X.start;else Q.items.push({start:X.start});Z.items.splice(-1,1)}}}}*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 $={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")$.start.push(this.sourceToken);this.stack.push($);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document($){if($.value)return yield*this.lineEnd($);switch(this.type){case"doc-start":{if(e9($.start)!==-1)yield*this.pop(),yield*this.step();else $.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":$.start.push(this.sourceToken);return}let Z=this.startBlockValue($);if(Z)this.stack.push(Z);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar($){if(this.type==="map-value-ind"){let Z=j2(this.peek(2)),Q=p0(Z),X;if($.end)X=$.end,X.push(this.sourceToken),delete $.end;else X=[this.sourceToken];let z={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:Q,key:$,sep:X}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=z}else yield*this.lineEnd($)}*blockScalar($){switch(this.type){case"space":case"comment":case"newline":$.props.push(this.sourceToken);return;case"scalar":if($.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let Z=this.source.indexOf(`
135
+ `)return yield*this.pushCount(2);else return 0}*pushSpaces($){let Z=this.pos-1,Q;do Q=this.buffer[++Z];while(Q===" "||$&&Q==="\t");let X=Z-this.pos;if(X>0)yield this.buffer.substr(this.pos,X),this.pos=Z;return X}*pushUntil($){let Z=this.pos,Q=this.buffer[Z];while(!$(Q))Q=this.buffer[++Z];return yield*this.pushToIndex(Z,!1)}}KU.Lexer=WZ});var T8=P((RU)=>{class _Z{constructor(){this.lineStarts=[],this.addNewLine=($)=>this.lineStarts.push($),this.linePos=($)=>{let Z=0,Q=this.lineStarts.length;while(Z<Q){let z=Z+Q>>1;if(this.lineStarts[z]<$)Z=z+1;else Q=z}if(this.lineStarts[Z]===$)return{line:Z+1,col:1};if(Z===0)return{line:0,col:$};let X=this.lineStarts[Z-1];return{line:Z,col:$-X+1}}}}RU.LineCounter=_Z});var w8=P((PU)=>{var FU=H2("process"),OZ=f1(),NU=A8();function M0($,Z){for(let Q=0;Q<$.length;++Q)if($[Q].type===Z)return!0;return!1}function DZ($){for(let Z=0;Z<$.length;++Z)switch($[Z].type){case"space":case"comment":case"newline":break;default:return Z}return-1}function KZ($){switch($?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function u1($){switch($.type){case"document":return $.start;case"block-map":{let Z=$.items[$.items.length-1];return Z.sep??Z.start}case"block-seq":return $.items[$.items.length-1].start;default:return[]}}function o0($){if($.length===0)return[];let Z=$.length;$:while(--Z>=0)switch($[Z].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break $}while($[++Z]?.type==="space");return $.splice(Z,$.length)}function m1($,Z){if(Z.length<1e5)Array.prototype.push.apply($,Z);else for(let Q=0;Q<Z.length;++Q)$.push(Z[Q])}function IZ($){if($.start.type==="flow-seq-start"){for(let Z of $.items)if(Z.sep&&!Z.value&&!M0(Z.start,"explicit-key-ind")&&!M0(Z.sep,"map-value-ind")){if(Z.key)Z.value=Z.key;if(delete Z.key,KZ(Z.value))if(Z.value.end)m1(Z.value.end,Z.sep);else Z.value.end=Z.sep;else m1(Z.start,Z.sep);delete Z.sep}}}class LZ{constructor($){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new NU.Lexer,this.onNewLine=$}*parse($,Z=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let Q of this.lexer.lex($,Z))yield*this.next(Q);if(!Z)yield*this.end()}*next($){if(this.source=$,FU.env.LOG_TOKENS)console.log("|",OZ.prettyToken($));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=$.length;return}let Z=OZ.tokenType($);if(!Z){let Q=`Not a YAML token: ${$}`;yield*this.pop({type:"error",offset:this.offset,message:Q,source:$}),this.offset+=$.length}else if(Z==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=Z,yield*this.step(),Z){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+$.length);break;case"space":if(this.atNewLine&&$[0]===" ")this.indent+=$.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=$.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=$.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let $=this.peek(1);if(this.type==="doc-end"&&$?.type!=="doc-end"){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!$)return yield*this.stream();switch($.type){case"document":return yield*this.document($);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar($);case"block-scalar":return yield*this.blockScalar($);case"block-map":return yield*this.blockMap($);case"block-seq":return yield*this.blockSequence($);case"flow-collection":return yield*this.flowCollection($);case"doc-end":return yield*this.documentEnd($)}yield*this.pop()}peek($){return this.stack[this.stack.length-$]}*pop($){let Z=$??this.stack.pop();if(!Z)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield Z;else{let Q=this.peek(1);if(Z.type==="block-scalar")Z.indent="indent"in Q?Q.indent:0;else if(Z.type==="flow-collection"&&Q.type==="document")Z.indent=0;if(Z.type==="flow-collection")IZ(Z);switch(Q.type){case"document":Q.value=Z;break;case"block-scalar":Q.props.push(Z);break;case"block-map":{let X=Q.items[Q.items.length-1];if(X.value){Q.items.push({start:[],key:Z,sep:[]}),this.onKeyLine=!0;return}else if(X.sep)X.value=Z;else{Object.assign(X,{key:Z,sep:[]}),this.onKeyLine=!X.explicitKey;return}break}case"block-seq":{let X=Q.items[Q.items.length-1];if(X.value)Q.items.push({start:[],value:Z});else X.value=Z;break}case"flow-collection":{let X=Q.items[Q.items.length-1];if(!X||X.value)Q.items.push({start:[],key:Z,sep:[]});else if(X.sep)X.value=Z;else Object.assign(X,{key:Z,sep:[]});return}default:yield*this.pop(),yield*this.pop(Z)}if((Q.type==="document"||Q.type==="block-map"||Q.type==="block-seq")&&(Z.type==="block-map"||Z.type==="block-seq")){let X=Z.items[Z.items.length-1];if(X&&!X.sep&&!X.value&&X.start.length>0&&DZ(X.start)===-1&&(Z.indent===0||X.start.every((z)=>z.type!=="comment"||z.indent<Z.indent))){if(Q.type==="document")Q.end=X.start;else Q.items.push({start:X.start});Z.items.splice(-1,1)}}}}*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 $={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")$.start.push(this.sourceToken);this.stack.push($);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document($){if($.value)return yield*this.lineEnd($);switch(this.type){case"doc-start":{if(DZ($.start)!==-1)yield*this.pop(),yield*this.step();else $.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":$.start.push(this.sourceToken);return}let Z=this.startBlockValue($);if(Z)this.stack.push(Z);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar($){if(this.type==="map-value-ind"){let Z=u1(this.peek(2)),Q=o0(Z),X;if($.end)X=$.end,X.push(this.sourceToken),delete $.end;else X=[this.sourceToken];let z={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:Q,key:$,sep:X}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=z}else yield*this.lineEnd($)}*blockScalar($){switch(this.type){case"space":case"comment":case"newline":$.props.push(this.sourceToken);return;case"scalar":if($.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let Z=this.source.indexOf(`
136
136
  `)+1;while(Z!==0)this.onNewLine(this.offset+Z),Z=this.source.indexOf(`
137
- `,Z)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap($){let Z=$.items[$.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,Z.value){let Q="end"in Z.value?Z.value.end:void 0;if((Array.isArray(Q)?Q[Q.length-1]:void 0)?.type==="comment")Q?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"space":case"comment":if(Z.value)$.items.push({start:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else{if(this.atIndentedComment(Z.start,$.indent)){let X=$.items[$.items.length-2]?.value?.end;if(Array.isArray(X)){x2(X,Z.start),X.push(this.sourceToken),$.items.pop();return}}Z.start.push(this.sourceToken)}return}if(this.indent>=$.indent){let Q=!this.onKeyLine&&this.indent===$.indent,X=Q&&(Z.sep||Z.explicitKey)&&this.type!=="seq-item-ind",z=[];if(X&&Z.sep&&!Z.value){let J=[];for(let H=0;H<Z.sep.length;++H){let U=Z.sep[H];switch(U.type){case"newline":J.push(H);break;case"space":break;case"comment":if(U.indent>$.indent)J.length=0;break;default:J.length=0}}if(J.length>=2)z=Z.sep.splice(J[1])}switch(this.type){case"anchor":case"tag":if(X||Z.value)z.push(this.sourceToken),$.items.push({start:z}),this.onKeyLine=!0;else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"explicit-key-ind":if(!Z.sep&&!Z.explicitKey)Z.start.push(this.sourceToken),Z.explicitKey=!0;else if(X||Z.value)z.push(this.sourceToken),$.items.push({start:z,explicitKey:!0});else this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]});this.onKeyLine=!0;return;case"map-value-ind":if(Z.explicitKey)if(!Z.sep)if(W0(Z.start,"newline"))Object.assign(Z,{key:null,sep:[this.sourceToken]});else{let J=p0(Z.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:J,key:null,sep:[this.sourceToken]}]})}else if(Z.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(W0(Z.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:z,key:null,sep:[this.sourceToken]}]});else if(ZZ(Z.key)&&!W0(Z.sep,"newline")){let J=p0(Z.start),H=Z.key,U=Z.sep;U.push(this.sourceToken),delete Z.key,delete Z.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:J,key:H,sep:U}]})}else if(z.length>0)Z.sep=Z.sep.concat(z,this.sourceToken);else Z.sep.push(this.sourceToken);else if(!Z.sep)Object.assign(Z,{key:null,sep:[this.sourceToken]});else if(Z.value||X)$.items.push({start:z,key:null,sep:[this.sourceToken]});else if(W0(Z.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else Z.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let J=this.flowScalar(this.type);if(X||Z.value)$.items.push({start:z,key:J,sep:[]}),this.onKeyLine=!0;else if(Z.sep)this.stack.push(J);else Object.assign(Z,{key:J,sep:[]}),this.onKeyLine=!0;return}default:{let J=this.startBlockValue($);if(J){if(J.type==="block-seq"){if(!Z.explicitKey&&Z.sep&&!W0(Z.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else if(Q)$.items.push({start:z});this.stack.push(J);return}}}}yield*this.pop(),yield*this.step()}*blockSequence($){let Z=$.items[$.items.length-1];switch(this.type){case"newline":if(Z.value){let Q="end"in Z.value?Z.value.end:void 0;if((Array.isArray(Q)?Q[Q.length-1]:void 0)?.type==="comment")Q?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else Z.start.push(this.sourceToken);return;case"space":case"comment":if(Z.value)$.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(Z.start,$.indent)){let X=$.items[$.items.length-2]?.value?.end;if(Array.isArray(X)){x2(X,Z.start),X.push(this.sourceToken),$.items.pop();return}}Z.start.push(this.sourceToken)}return;case"anchor":case"tag":if(Z.value||this.indent<=$.indent)break;Z.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==$.indent)break;if(Z.value||W0(Z.start,"seq-item-ind"))$.items.push({start:[this.sourceToken]});else Z.start.push(this.sourceToken);return}if(this.indent>$.indent){let Q=this.startBlockValue($);if(Q){this.stack.push(Q);return}}yield*this.pop(),yield*this.step()}*flowCollection($){let Z=$.items[$.items.length-1];if(this.type==="flow-error-end"){let Q;do yield*this.pop(),Q=this.peek(1);while(Q?.type==="flow-collection")}else if($.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!Z||Z.sep)$.items.push({start:[this.sourceToken]});else Z.start.push(this.sourceToken);return;case"map-value-ind":if(!Z||Z.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else Object.assign(Z,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!Z||Z.value)$.items.push({start:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let X=this.flowScalar(this.type);if(!Z||Z.value)$.items.push({start:[],key:X,sep:[]});else if(Z.sep)this.stack.push(X);else Object.assign(Z,{key:X,sep:[]});return}case"flow-map-end":case"flow-seq-end":$.end.push(this.sourceToken);return}let Q=this.startBlockValue($);if(Q)this.stack.push(Q);else yield*this.pop(),yield*this.step()}else{let Q=this.peek(2);if(Q.type==="block-map"&&(this.type==="map-value-ind"&&Q.indent===$.indent||this.type==="newline"&&!Q.items[Q.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&Q.type!=="flow-collection"){let X=j2(Q),z=p0(X);$Z($);let J=$.end.splice(1,$.end.length);J.push(this.sourceToken);let H={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:z,key:$,sep:J}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=H}else yield*this.lineEnd($)}}flowScalar($){if(this.onNewLine){let Z=this.source.indexOf(`
137
+ `,Z)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap($){let Z=$.items[$.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,Z.value){let Q="end"in Z.value?Z.value.end:void 0;if((Array.isArray(Q)?Q[Q.length-1]:void 0)?.type==="comment")Q?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"space":case"comment":if(Z.value)$.items.push({start:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else{if(this.atIndentedComment(Z.start,$.indent)){let X=$.items[$.items.length-2]?.value?.end;if(Array.isArray(X)){m1(X,Z.start),X.push(this.sourceToken),$.items.pop();return}}Z.start.push(this.sourceToken)}return}if(this.indent>=$.indent){let Q=!this.onKeyLine&&this.indent===$.indent,X=Q&&(Z.sep||Z.explicitKey)&&this.type!=="seq-item-ind",z=[];if(X&&Z.sep&&!Z.value){let J=[];for(let H=0;H<Z.sep.length;++H){let U=Z.sep[H];switch(U.type){case"newline":J.push(H);break;case"space":break;case"comment":if(U.indent>$.indent)J.length=0;break;default:J.length=0}}if(J.length>=2)z=Z.sep.splice(J[1])}switch(this.type){case"anchor":case"tag":if(X||Z.value)z.push(this.sourceToken),$.items.push({start:z}),this.onKeyLine=!0;else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"explicit-key-ind":if(!Z.sep&&!Z.explicitKey)Z.start.push(this.sourceToken),Z.explicitKey=!0;else if(X||Z.value)z.push(this.sourceToken),$.items.push({start:z,explicitKey:!0});else this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]});this.onKeyLine=!0;return;case"map-value-ind":if(Z.explicitKey)if(!Z.sep)if(M0(Z.start,"newline"))Object.assign(Z,{key:null,sep:[this.sourceToken]});else{let J=o0(Z.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:J,key:null,sep:[this.sourceToken]}]})}else if(Z.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(M0(Z.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:z,key:null,sep:[this.sourceToken]}]});else if(KZ(Z.key)&&!M0(Z.sep,"newline")){let J=o0(Z.start),H=Z.key,U=Z.sep;U.push(this.sourceToken),delete Z.key,delete Z.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:J,key:H,sep:U}]})}else if(z.length>0)Z.sep=Z.sep.concat(z,this.sourceToken);else Z.sep.push(this.sourceToken);else if(!Z.sep)Object.assign(Z,{key:null,sep:[this.sourceToken]});else if(Z.value||X)$.items.push({start:z,key:null,sep:[this.sourceToken]});else if(M0(Z.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else Z.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let J=this.flowScalar(this.type);if(X||Z.value)$.items.push({start:z,key:J,sep:[]}),this.onKeyLine=!0;else if(Z.sep)this.stack.push(J);else Object.assign(Z,{key:J,sep:[]}),this.onKeyLine=!0;return}default:{let J=this.startBlockValue($);if(J){if(J.type==="block-seq"){if(!Z.explicitKey&&Z.sep&&!M0(Z.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else if(Q)$.items.push({start:z});this.stack.push(J);return}}}}yield*this.pop(),yield*this.step()}*blockSequence($){let Z=$.items[$.items.length-1];switch(this.type){case"newline":if(Z.value){let Q="end"in Z.value?Z.value.end:void 0;if((Array.isArray(Q)?Q[Q.length-1]:void 0)?.type==="comment")Q?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else Z.start.push(this.sourceToken);return;case"space":case"comment":if(Z.value)$.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(Z.start,$.indent)){let X=$.items[$.items.length-2]?.value?.end;if(Array.isArray(X)){m1(X,Z.start),X.push(this.sourceToken),$.items.pop();return}}Z.start.push(this.sourceToken)}return;case"anchor":case"tag":if(Z.value||this.indent<=$.indent)break;Z.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==$.indent)break;if(Z.value||M0(Z.start,"seq-item-ind"))$.items.push({start:[this.sourceToken]});else Z.start.push(this.sourceToken);return}if(this.indent>$.indent){let Q=this.startBlockValue($);if(Q){this.stack.push(Q);return}}yield*this.pop(),yield*this.step()}*flowCollection($){let Z=$.items[$.items.length-1];if(this.type==="flow-error-end"){let Q;do yield*this.pop(),Q=this.peek(1);while(Q?.type==="flow-collection")}else if($.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!Z||Z.sep)$.items.push({start:[this.sourceToken]});else Z.start.push(this.sourceToken);return;case"map-value-ind":if(!Z||Z.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else Object.assign(Z,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!Z||Z.value)$.items.push({start:[this.sourceToken]});else if(Z.sep)Z.sep.push(this.sourceToken);else Z.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let X=this.flowScalar(this.type);if(!Z||Z.value)$.items.push({start:[],key:X,sep:[]});else if(Z.sep)this.stack.push(X);else Object.assign(Z,{key:X,sep:[]});return}case"flow-map-end":case"flow-seq-end":$.end.push(this.sourceToken);return}let Q=this.startBlockValue($);if(Q)this.stack.push(Q);else yield*this.pop(),yield*this.step()}else{let Q=this.peek(2);if(Q.type==="block-map"&&(this.type==="map-value-ind"&&Q.indent===$.indent||this.type==="newline"&&!Q.items[Q.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&Q.type!=="flow-collection"){let X=u1(Q),z=o0(X);IZ($);let J=$.end.splice(1,$.end.length);J.push(this.sourceToken);let H={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:z,key:$,sep:J}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=H}else yield*this.lineEnd($)}}flowScalar($){if(this.onNewLine){let Z=this.source.indexOf(`
138
138
  `)+1;while(Z!==0)this.onNewLine(this.offset+Z),Z=this.source.indexOf(`
139
- `,Z)+1}return{type:$,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue($){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 Z=j2($),Q=p0(Z);return Q.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Q,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let Z=j2($),Q=p0(Z);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Q,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment($,Z){if(this.type!=="comment")return!1;if(this.indent<=Z)return!1;return $.every((Q)=>Q.type==="newline"||Q.type==="space")}*documentEnd($){if(this.type!=="doc-mode"){if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd($){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;case"space":case"comment":default:if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}nH.Parser=QZ});var UZ=F((zU)=>{var XZ=z8(),oH=M1(),P1=L1(),tH=_$(),eH=w(),$U=_8(),zZ=O8();function JZ($){let Z=$.prettyErrors!==!1;return{lineCounter:$.lineCounter||Z&&new $U.LineCounter||null,prettyErrors:Z}}function ZU($,Z={}){let{lineCounter:Q,prettyErrors:X}=JZ(Z),z=new zZ.Parser(Q?.addNewLine),J=new XZ.Composer(Z),H=Array.from(J.compose(z.parse($)));if(X&&Q)for(let U of H)U.errors.forEach(P1.prettifyError($,Q)),U.warnings.forEach(P1.prettifyError($,Q));if(H.length>0)return H;return Object.assign([],{empty:!0},J.streamInfo())}function HZ($,Z={}){let{lineCounter:Q,prettyErrors:X}=JZ(Z),z=new zZ.Parser(Q?.addNewLine),J=new XZ.Composer(Z),H=null;for(let U of J.compose(z.parse($),!0,$.length))if(!H)H=U;else if(H.options.logLevel!=="silent"){H.errors.push(new P1.YAMLParseError(U.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(X&&Q)H.errors.forEach(P1.prettifyError($,Q)),H.warnings.forEach(P1.prettifyError($,Q));return H}function QU($,Z,Q){let X=void 0;if(typeof Z==="function")X=Z;else if(Q===void 0&&Z&&typeof Z==="object")Q=Z;let z=HZ($,Q);if(!z)return null;if(z.warnings.forEach((J)=>tH.warn(z.options.logLevel,J)),z.errors.length>0)if(z.options.logLevel!=="silent")throw z.errors[0];else z.errors=[];return z.toJS(Object.assign({reviver:X},Q))}function XU($,Z,Q){let X=null;if(typeof Z==="function"||Array.isArray(Z))X=Z;else if(Q===void 0&&Z)Q=Z;if(typeof Q==="string")Q=Q.length;if(typeof Q==="number"){let z=Math.round(Q);Q=z<1?void 0:z>8?{indent:8}:{indent:z}}if($===void 0){let{keepUndefined:z}=Q??Z??{};if(!z)return}if(eH.isDocument($)&&!X)return $.toString(Q);return new oH.Document($,X,Q).toString(Q)}zU.parse=QU;zU.parseAllDocuments=ZU;zU.parseDocument=HZ;zU.stringify=XU});var v=[{index:1,path:"project.name",label:"Name",description:"Project name",category:"project"},{index:2,path:"project.goal",label:"Goal",description:"Goal (use case)",category:"project"},{index:3,path:"project.main_language",label:"Language",description:"Primary language",category:"project"},{index:4,path:"human_context.who",label:"Who",description:"Who is this for?",category:"human"},{index:5,path:"human_context.what",label:"What",description:"What are they building",category:"human"},{index:6,path:"human_context.why",label:"Why",description:"Why does it exist",category:"human"},{index:7,path:"human_context.where",label:"Where",description:"Where does it run",category:"human"},{index:8,path:"human_context.when",label:"When",description:"When was it started / timeline",category:"human"},{index:9,path:"human_context.how",label:"How",description:"How is it built",category:"human"},{index:10,path:"stack.frontend",canonical:"stack.framework",label:"Framework",description:"Framework (React, Svelte, etc.)",category:"frontend"},{index:11,path:"stack.css_framework",canonical:"stack.css",label:"CSS",description:"CSS framework",category:"frontend"},{index:12,path:"stack.ui_library",label:"UI Library",description:"UI component library",category:"frontend"},{index:13,path:"stack.state_management",canonical:"stack.state",label:"State",description:"State management",category:"frontend"},{index:14,path:"stack.backend",label:"Backend",description:"Backend framework",category:"backend"},{index:15,path:"stack.api_type",canonical:"stack.api",label:"API",description:"API style (REST, GraphQL, etc.)",category:"backend"},{index:16,path:"stack.runtime",label:"Runtime",description:"Runtime (Node, Bun, Python, etc.)",category:"backend"},{index:17,path:"stack.database",canonical:"stack.db",label:"Database",description:"Database",category:"backend"},{index:18,path:"stack.connection",label:"Connection",description:"Connection method (Prisma, etc.)",category:"backend"},{index:19,path:"stack.hosting",label:"Hosting",description:"Hosting platform",category:"universal"},{index:20,path:"stack.build",label:"Build",description:"Build tool",category:"universal"},{index:21,path:"stack.cicd",label:"CI/CD",description:"CI/CD",category:"universal"},{index:22,path:"stack.monorepo_tool",label:"Monorepo",description:"Monorepo tool",category:"enterprise_infra"},{index:23,path:"stack.package_manager",canonical:"stack.pkg_manager",label:"Package Manager",description:"Package manager",category:"enterprise_infra"},{index:24,path:"stack.workspaces",label:"Workspaces",description:"Workspace configuration",category:"enterprise_infra"},{index:25,path:"monorepo.packages_count",label:"Packages",description:"Number of packages",category:"enterprise_infra"},{index:26,path:"monorepo.build_orchestrator",label:"Build Orchestrator",description:"Build orchestration tool",category:"enterprise_infra"},{index:27,path:"stack.admin",label:"Admin",description:"Admin panel",category:"enterprise_app"},{index:28,path:"stack.cache",label:"Cache",description:"Caching layer",category:"enterprise_app"},{index:29,path:"stack.search",label:"Search",description:"Search engine",category:"enterprise_app"},{index:30,path:"stack.storage",label:"Storage",description:"Object storage",category:"enterprise_app"},{index:31,path:"monorepo.versioning_strategy",label:"Versioning",description:"Version strategy",category:"enterprise_ops"},{index:32,path:"monorepo.shared_configs",label:"Shared Configs",description:"Shared configs",category:"enterprise_ops"},{index:33,path:"monorepo.remote_cache",label:"Remote Cache",description:"Remote build cache",category:"enterprise_ops"}],e0=new Map(v.flatMap(($)=>$.canonical?[[$.path,$],[$.canonical,$]]:[[$.path,$]])),XV=new Map(v.filter(($)=>$.canonical).map(($)=>[$.canonical,$.path])),zV=new Map(v.filter(($)=>$.canonical).map(($)=>[$.path,$.canonical]));function n8($,Z){let Q=(z)=>{let J=z.split("."),H=$;for(let U of J)if(H&&typeof H==="object"&&U in H)H=H[U];else return;return H},X=Q(Z.path);if(X!==void 0)return X;if(Z.canonical)return Q(Z.canonical);return}function u4($){return v.filter((Z)=>Z.category===$)}var m4=v.filter(($)=>$.index<=21),l4=v,p1=new Set(["describe your project goal","development teams","cloud platform","null","none","unknown","n/a","not applicable"]);function K0($){if($===null||$===void 0||$==="")return!0;if(typeof $==="string")return p1.has($.toLowerCase().trim());if(Array.isArray($)&&$.length===0)return!0;if(typeof $==="object"&&Object.keys($).length===0)return!0;return!1}var S0={documentation:["project","human"],intent:["project","human"],encyclopedia:["project","human"],cli:["project","human","universal"],library:["project","human","universal"],sdk:["project","human","universal"],wasm:["project","human","universal"],html:["project","human","universal"],"server-card":["project","human","universal"],frontend:["project","frontend","human","universal"],website:["project","frontend","human","universal"],mobile:["project","frontend","human","universal"],app:["project","frontend","human","universal"],extension:["project","frontend","human","universal"],mcp:["project","backend","human","universal"],backend:["project","backend","universal","human"],"data-science":["project","backend","human","universal"],fullstack:["project","frontend","backend","universal","human"],svelte:["project","frontend","backend","universal","human"],framework:["project","frontend","backend","universal","human"],"monorepo-root":["project","human","enterprise_infra","enterprise_app","enterprise_ops"],mcpaas:["project","backend","universal","human","enterprise_app","enterprise_ops"],saas:["project","frontend","backend","universal","human","enterprise_app"],enterprise:["project","frontend","backend","universal","human","enterprise_infra","enterprise_app","enterprise_ops"]};var $$=($)=>(Z)=>`\x1B[${$}m${Z}\x1B[0m`,d1=$$("1"),$1=$$("2"),HV=$$("3"),Z1={cyan:"#00D4D4",cyanDeep:"#0E8C8C",orange:"#FF6B35"},c1=($)=>`\x1B[38;2;0;212;212m${$}\x1B[0m`,Z$=($)=>`\x1B[38;2;14;140;140m${$}\x1B[0m`,j0=($)=>`\x1B[38;5;208m${$}\x1B[0m`;var Z0=[{name:"TROPHY",indicator:`${j0("✪")} ${j0("TROPHY")}`,threshold:100},{name:"GOLD",indicator:`${j0(d1("★"))} ${j0("GOLD")}`,threshold:99},{name:"SILVER",indicator:`${c1("◆")} ${c1("SILVER")}`,threshold:95},{name:"BRONZE",indicator:`${Z$("◇")} ${Z$("BRONZE")}`,threshold:85},{name:"GREEN",indicator:`${d1("●")} GREEN`,threshold:70},{name:"YELLOW",indicator:`${$1("●")} YELLOW`,threshold:55},{name:"RED",indicator:`${$1("○")} RED`,threshold:1},{name:"WHITE",indicator:`${$1("♡")}`,threshold:0}];function Q1($){for(let Z of Z0)if($>=Z.threshold)return Z;return Z0[Z0.length-1]}function p4($){let Z=Q1($),Q=Z0.indexOf(Z);return Q>0?Z0[Q-1]:null}var z$={};f4(z$,{validate:()=>c4,sdkVersion:()=>s4,scoreFafb:()=>n4,scoreEnterprise:()=>d4,score:()=>X$,fafbInfo:()=>a4,decompile:()=>r4,compile:()=>i4});var Q$=null;function J0(){if(Q$)return Q$;try{let $=t0("faf-scoring-kernel");return Q$=$,$}catch{throw Error(`faf-scoring-kernel not installed.
139
+ `,Z)+1}return{type:$,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue($){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 Z=u1($),Q=o0(Z);return Q.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Q,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let Z=u1($),Q=o0(Z);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Q,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment($,Z){if(this.type!=="comment")return!1;if(this.indent<=Z)return!1;return $.every((Q)=>Q.type==="newline"||Q.type==="space")}*documentEnd($){if(this.type!=="doc-mode"){if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd($){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;case"space":case"comment":default:if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}PU.Parser=LZ});var PZ=P((xU)=>{var RZ=D8(),TU=T2(),S2=w2(),wU=T$(),CU=j(),bU=T8(),MZ=w8();function FZ($){let Z=$.prettyErrors!==!1;return{lineCounter:$.lineCounter||Z&&new bU.LineCounter||null,prettyErrors:Z}}function EU($,Z={}){let{lineCounter:Q,prettyErrors:X}=FZ(Z),z=new MZ.Parser(Q?.addNewLine),J=new RZ.Composer(Z),H=Array.from(J.compose(z.parse($)));if(X&&Q)for(let U of H)U.errors.forEach(S2.prettifyError($,Q)),U.warnings.forEach(S2.prettifyError($,Q));if(H.length>0)return H;return Object.assign([],{empty:!0},J.streamInfo())}function NZ($,Z={}){let{lineCounter:Q,prettyErrors:X}=FZ(Z),z=new MZ.Parser(Q?.addNewLine),J=new RZ.Composer(Z),H=null;for(let U of J.compose(z.parse($),!0,$.length))if(!H)H=U;else if(H.options.logLevel!=="silent"){H.errors.push(new S2.YAMLParseError(U.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(X&&Q)H.errors.forEach(S2.prettifyError($,Q)),H.warnings.forEach(S2.prettifyError($,Q));return H}function jU($,Z,Q){let X=void 0;if(typeof Z==="function")X=Z;else if(Q===void 0&&Z&&typeof Z==="object")Q=Z;let z=NZ($,Q);if(!z)return null;if(z.warnings.forEach((J)=>wU.warn(z.options.logLevel,J)),z.errors.length>0)if(z.options.logLevel!=="silent")throw z.errors[0];else z.errors=[];return z.toJS(Object.assign({reviver:X},Q))}function SU($,Z,Q){let X=null;if(typeof Z==="function"||Array.isArray(Z))X=Z;else if(Q===void 0&&Z)Q=Z;if(typeof Q==="string")Q=Q.length;if(typeof Q==="number"){let z=Math.round(Q);Q=z<1?void 0:z>8?{indent:8}:{indent:z}}if($===void 0){let{keepUndefined:z}=Q??Z??{};if(!z)return}if(CU.isDocument($)&&!X)return $.toString(Q);return new TU.Document($,X,Q).toString(Q)}xU.parse=jU;xU.parseAllDocuments=EU;xU.parseDocument=NZ;xU.stringify=SU});var f=[{index:1,path:"project.name",label:"Name",description:"Project name",category:"project"},{index:2,path:"project.goal",label:"Goal",description:"Goal (use case)",category:"project"},{index:3,path:"project.main_language",label:"Language",description:"Primary language",category:"project"},{index:4,path:"human_context.who",label:"Who",description:"Who is this for?",category:"human"},{index:5,path:"human_context.what",label:"What",description:"What are they building",category:"human"},{index:6,path:"human_context.why",label:"Why",description:"Why does it exist",category:"human"},{index:7,path:"human_context.where",label:"Where",description:"Where does it run",category:"human"},{index:8,path:"human_context.when",label:"When",description:"When was it started / timeline",category:"human"},{index:9,path:"human_context.how",label:"How",description:"How is it built",category:"human"},{index:10,path:"stack.frontend",canonical:"stack.framework",label:"Framework",description:"Framework (React, Svelte, etc.)",category:"frontend"},{index:11,path:"stack.css_framework",canonical:"stack.css",label:"CSS",description:"CSS framework",category:"frontend"},{index:12,path:"stack.ui_library",label:"UI Library",description:"UI component library",category:"frontend"},{index:13,path:"stack.state_management",canonical:"stack.state",label:"State",description:"State management",category:"frontend"},{index:14,path:"stack.backend",label:"Backend",description:"Backend framework",category:"backend"},{index:15,path:"stack.api_type",canonical:"stack.api",label:"API",description:"API style (REST, GraphQL, etc.)",category:"backend"},{index:16,path:"stack.runtime",label:"Runtime",description:"Runtime (Node, Bun, Python, etc.)",category:"backend"},{index:17,path:"stack.database",canonical:"stack.db",label:"Database",description:"Database",category:"backend"},{index:18,path:"stack.connection",label:"Connection",description:"Connection method (Prisma, etc.)",category:"backend"},{index:19,path:"stack.hosting",label:"Hosting",description:"Hosting platform",category:"universal"},{index:20,path:"stack.build",label:"Build",description:"Build tool",category:"universal"},{index:21,path:"stack.cicd",label:"CI/CD",description:"CI/CD",category:"universal"},{index:22,path:"stack.monorepo_tool",label:"Monorepo",description:"Monorepo tool",category:"enterprise_infra"},{index:23,path:"stack.package_manager",canonical:"stack.pkg_manager",label:"Package Manager",description:"Package manager",category:"enterprise_infra"},{index:24,path:"stack.workspaces",label:"Workspaces",description:"Workspace configuration",category:"enterprise_infra"},{index:25,path:"monorepo.packages_count",label:"Packages",description:"Number of packages",category:"enterprise_infra"},{index:26,path:"monorepo.build_orchestrator",label:"Build Orchestrator",description:"Build orchestration tool",category:"enterprise_infra"},{index:27,path:"stack.admin",label:"Admin",description:"Admin panel",category:"enterprise_app"},{index:28,path:"stack.cache",label:"Cache",description:"Caching layer",category:"enterprise_app"},{index:29,path:"stack.search",label:"Search",description:"Search engine",category:"enterprise_app"},{index:30,path:"stack.storage",label:"Storage",description:"Object storage",category:"enterprise_app"},{index:31,path:"monorepo.versioning_strategy",label:"Versioning",description:"Version strategy",category:"enterprise_ops"},{index:32,path:"monorepo.shared_configs",label:"Shared Configs",description:"Shared configs",category:"enterprise_ops"},{index:33,path:"monorepo.remote_cache",label:"Remote Cache",description:"Remote build cache",category:"enterprise_ops"}],A0=new Map(f.flatMap(($)=>$.canonical?[[$.path,$],[$.canonical,$]]:[[$.path,$]])),RW=new Map(f.filter(($)=>$.canonical).map(($)=>[$.canonical,$.path])),MW=new Map(f.filter(($)=>$.canonical).map(($)=>[$.path,$.canonical]));function B6($,Z){let Q=(z)=>{let J=z.split("."),H=$;for(let U of J)if(H&&typeof H==="object"&&U in H)H=H[U];else return;return H},X=Q(Z.path);if(X!==void 0)return X;if(Z.canonical)return Q(Z.canonical);return}function O4($){return f.filter((Z)=>Z.category===$)}var D4=f.filter(($)=>$.index<=21),I4=f,o2=new Set(["describe your project goal","development teams","cloud platform","null","none","unknown","n/a","not applicable"]);function T0($){if($===null||$===void 0||$==="")return!0;if(typeof $==="string")return o2.has($.toLowerCase().trim());if(Array.isArray($)&&$.length===0)return!0;if(typeof $==="object"&&Object.keys($).length===0)return!0;return!1}var k0={documentation:["project","human"],intent:["project","human"],encyclopedia:["project","human"],cli:["project","human","universal"],library:["project","human","universal"],sdk:["project","human","universal"],wasm:["project","human","universal"],html:["project","human","universal"],"server-card":["project","human","universal"],frontend:["project","frontend","human","universal"],website:["project","frontend","human","universal"],mobile:["project","frontend","human","universal"],app:["project","frontend","human","universal"],extension:["project","frontend","human","universal"],mcp:["project","backend","human","universal"],backend:["project","backend","universal","human"],"data-science":["project","backend","human","universal"],fullstack:["project","frontend","backend","universal","human"],svelte:["project","frontend","backend","universal","human"],framework:["project","frontend","backend","universal","human"],"monorepo-root":["project","human","enterprise_infra","enterprise_app","enterprise_ops"],mcpaas:["project","backend","universal","human","enterprise_app","enterprise_ops"],saas:["project","frontend","backend","universal","human","enterprise_app"],enterprise:["project","frontend","backend","universal","human","enterprise_infra","enterprise_app","enterprise_ops"]};var B$=($)=>(Z)=>`\x1B[${$}m${Z}\x1B[0m`,t2=B$("1"),U2=B$("2"),NW=B$("3"),q2={cyan:"#00D4D4",cyanDeep:"#0E8C8C",orange:"#FF6B35"},e2=($)=>`\x1B[38;2;0;212;212m${$}\x1B[0m`,W$=($)=>`\x1B[38;2;14;140;140m${$}\x1B[0m`,u0=($)=>`\x1B[38;5;208m${$}\x1B[0m`;var Y0=[{name:"TROPHY",indicator:`${u0("✪")} ${u0("TROPHY")}`,threshold:100},{name:"GOLD",indicator:`${u0(t2("★"))} ${u0("GOLD")}`,threshold:99},{name:"SILVER",indicator:`${e2("◆")} ${e2("SILVER")}`,threshold:95},{name:"BRONZE",indicator:`${W$("◇")} ${W$("BRONZE")}`,threshold:85},{name:"GREEN",indicator:`${t2("●")} GREEN`,threshold:70},{name:"YELLOW",indicator:`${U2("●")} YELLOW`,threshold:55},{name:"RED",indicator:`${U2("○")} RED`,threshold:1},{name:"WHITE",indicator:`${U2("♡")}`,threshold:0}];function Y2($){for(let Z of Y0)if($>=Z.threshold)return Z;return Y0[Y0.length-1]}function K4($){let Z=Y2($),Q=Y0.indexOf(Z);return Q>0?Y0[Q-1]:null}var D$={};W4(D$,{validate:()=>R4,sdkVersion:()=>A4,scoreFafb:()=>P4,scoreEnterprise:()=>L4,score:()=>O$,fafbInfo:()=>N4,decompile:()=>F4,compile:()=>M4});var _$=null;function W0(){if(_$)return _$;try{let $=H2("faf-scoring-kernel");return _$=$,$}catch{throw Error(`faf-scoring-kernel not installed.
140
140
 
141
141
  Run: npm install faf-scoring-kernel
142
- `)}}function X$($){return JSON.parse(J0().score_faf($))}function d4($){return JSON.parse(J0().score_faf_enterprise($))}function c4($){return J0().validate_faf($)}function i4($){return J0().compile_fafb($)}function r4($){return JSON.parse(J0().decompile_fafb($))}function a4($){return JSON.parse(J0().fafb_info($))}function n4($){return JSON.parse(J0().score_fafb($))}function s4(){return J0().sdk_version()}var s8=/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/;function o8($){let Z=$?.about?.represents;return typeof Z==="string"&&Z.length>0}function t8($){let Z=$.match(/^about:\s*\n((?:[ \t]+.*\n?)*)/m);if(!Z)return null;let Q=Z[1]??"",X=Q.match(/^[ \t]+represents:\s*(\S+)\s*$/m);if(!X)return null;let z=X[1],J=Q.match(/^[ \t]+source_score:\s*(\d+)\s*$/m),H=-1;if(J){let U=parseInt(J[1],10);if(U>=0&&U<=100)H=U}return{represents:z,sourceScore:H}}function e8($){return{score:$.score,tier:Q1($.score),populated:$.populated,empty:$.empty,ignored:$.ignored,active:$.active,total:$.total,slots:$.slots}}function J$($){let Z=t8($);if(Z){let Q=Z.sourceScore;return{score:Q,tier:Q>=0?Q1(Q):Z0[Z0.length-1],populated:0,empty:0,ignored:0,active:0,total:0,slots:{},inherited:!0,represents:Z.represents}}return e8(X$($))}function o4($){let Z=[];if(!$||typeof $!=="object")return Z.push("File is not a valid YAML mapping"),{valid:!1,errors:Z};let Q=$;if(!Q.faf_version)Z.push("Missing required field: faf_version");if(!Q.project?.name)Z.push("Missing required field: project.name");if(Q.app_type==="about")Z.push("about is not an app_type — declare about.represents (owner/repo) instead");if(Q.about!==void 0){if(!o8(Q)||typeof Q.about.represents!=="string")Z.push("about.represents is required (owner/repo of the source codebase)");else if(!s8.test(Q.about.represents))Z.push(`about.represents must be "owner/repo" format (got: ${Q.about.represents})`);if(Q.about.source_score!==void 0){let X=Q.about.source_score;if(typeof X!=="number"||X<0||X>100)Z.push(`about.source_score must be a number 0-100 (got: ${X})`)}}return{valid:Z.length===0,errors:Z}}import{readFileSync as GZ,writeFileSync as yW,existsSync as YZ}from"fs";import{join as BZ,dirname as iU,basename as fW}from"path";var YU=z8(),BU=M1(),GU=l$(),D8=L1(),VU=J1(),_0=w(),WU=Y0(),_U=h(),OU=G0(),DU=V0(),xW=E2(),IU=W8(),KU=_8(),MU=O8(),g2=UZ(),qZ=X1();var LU=YU.Composer,RU=BU.Document,FU=GU.Schema,NU=D8.YAMLError,AU=D8.YAMLParseError,PU=D8.YAMLWarning,TU=VU.Alias,CU=_0.isAlias,wU=_0.isCollection,bU=_0.isDocument,EU=_0.isMap,SU=_0.isNode,jU=_0.isPair,xU=_0.isScalar,gU=_0.isSeq,hU=WU.Pair,yU=_U.Scalar,vU=OU.YAMLMap,fU=DU.YAMLSeq;var kU=IU.Lexer,uU=KU.LineCounter,mU=MU.Parser,r=g2.parse,lU=g2.parseAllDocuments,pU=g2.parseDocument,h2=g2.stringify,dU=qZ.visit,cU=qZ.visitAsync;function rU($){let Z=GZ($,"utf-8");return r(Z)}function VZ($){return GZ($,"utf-8")}function WZ($=process.cwd()){let Z=["project.faf",".faf"];for(let X of Z){let z=BZ($,X);if(YZ(z))return z}let Q=iU($);if(Q!==$)for(let X of Z){let z=BZ(Q,X);if(YZ(z))return z}return null}import{writeFileSync as aU}from"fs";import{join as nU}from"path";var _Z=Z1.orange,sU=Z1.cyan,oU=Z1.cyanDeep,tU="#FF9500",eU="#FF3B30",$q="#E6EDF3",Zq="#6E7681",OZ={TROPHY:{glyph:"✪",color:_Z},GOLD:{glyph:"★",color:_Z},SILVER:{glyph:"◆",color:sU},BRONZE:{glyph:"◇",color:oU},GREEN:{glyph:"●",color:$q},YELLOW:{glyph:"●",color:tU},RED:{glyph:"○",color:eU},WHITE:{glyph:"♡",color:Zq}};function d0($){return String($??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}var DZ=["who","what","why","where","when","how"];function y2($){return $.filter(([,Z])=>Z!==void 0&&Z!==null&&String(Z).trim()!=="").map(([Z,Q])=>`<div class="row"><div class="k">${d0(Z)}</div><div class="v">${d0(Q)}</div></div>`).join(`
143
- `)}function IZ($,Z,Q="project.faf"){let X=d0($.project?.name??"Project"),z=Z.tier?.name??"WHITE",J=OZ[z]??OZ.WHITE,H=Z.inherited?Z.represents?`inherited from ${d0(Z.represents)}`:"inherited":`${Z.score}%`,U=z==="TROPHY"&&!Z.inherited,q=$.human_context??{},Y=DZ.map((W)=>[W,q[W]]),B=Object.entries(q).filter(([W])=>!DZ.includes(W)),G=[["goal",$.project?.goal],["main_language",$.project?.main_language],["type",$.project?.type],["framework",$.project?.framework],["faf_version",$.faf_version]],V=Object.entries($.stack??{}),_=V.filter(([,W])=>W&&W!=="slotignored"&&String(W).trim()!==""),D=V.filter(([,W])=>W==="slotignored").length;return`<!DOCTYPE html>
142
+ `)}}function O$($){return JSON.parse(W0().score_faf($))}function L4($){return JSON.parse(W0().score_faf_enterprise($))}function R4($){return W0().validate_faf($)}function M4($){return W0().compile_fafb($)}function F4($){return JSON.parse(W0().decompile_fafb($))}function N4($){return JSON.parse(W0().fafb_info($))}function P4($){return JSON.parse(W0().score_fafb($))}function A4(){return W0().sdk_version()}var W6=/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/;function _6($){let Z=$?.about?.represents;return typeof Z==="string"&&Z.length>0}function O6($){let Z=$.match(/^about:\s*\n((?:[ \t]+.*\n?)*)/m);if(!Z)return null;let Q=Z[1]??"",X=Q.match(/^[ \t]+represents:\s*(\S+)\s*$/m);if(!X)return null;let z=X[1],J=Q.match(/^[ \t]+source_score:\s*(\d+)\s*$/m),H=-1;if(J){let U=parseInt(J[1],10);if(U>=0&&U<=100)H=U}return{represents:z,sourceScore:H}}function D6($){return{score:$.score,tier:Y2($.score),populated:$.populated,empty:$.empty,ignored:$.ignored,active:$.active,total:$.total,slots:$.slots}}function I$($){let Z=O6($);if(Z){let Q=Z.sourceScore;return{score:Q,tier:Q>=0?Y2(Q):Y0[Y0.length-1],populated:0,empty:0,ignored:0,active:0,total:0,slots:{},inherited:!0,represents:Z.represents}}return D6(O$($))}function T4($){let Z=[];if(!$||typeof $!=="object")return Z.push("File is not a valid YAML mapping"),{valid:!1,errors:Z};let Q=$;if(!Q.faf_version)Z.push("Missing required field: faf_version");if(!Q.project?.name)Z.push("Missing required field: project.name");if(Q.app_type==="about")Z.push("about is not an app_type — declare about.represents (owner/repo) instead");if(Q.about!==void 0){if(!_6(Q)||typeof Q.about.represents!=="string")Z.push("about.represents is required (owner/repo of the source codebase)");else if(!W6.test(Q.about.represents))Z.push(`about.represents must be "owner/repo" format (got: ${Q.about.represents})`);if(Q.about.source_score!==void 0){let X=Q.about.source_score;if(typeof X!=="number"||X<0||X>100)Z.push(`about.source_score must be a number 0-100 (got: ${X})`)}}return{valid:Z.length===0,errors:Z}}import{readFileSync as CZ,writeFileSync as Mq,existsSync as TZ}from"fs";import{join as wZ,dirname as Fq,basename as $O}from"path";var fU=D8(),kU=T2(),uU=$8(),C8=w2(),mU=B2(),F0=j(),pU=I0(),lU=h(),dU=L0(),cU=R0(),s_=f1(),iU=A8(),rU=T8(),nU=w8(),p1=PZ(),AZ=G2();var aU=fU.Composer,sU=kU.Document,oU=uU.Schema,tU=C8.YAMLError,eU=C8.YAMLParseError,$q=C8.YAMLWarning,Zq=mU.Alias,Qq=F0.isAlias,Xq=F0.isCollection,zq=F0.isDocument,Jq=F0.isMap,Hq=F0.isNode,Uq=F0.isPair,qq=F0.isScalar,Yq=F0.isSeq,Gq=pU.Pair,Vq=lU.Scalar,Bq=dU.YAMLMap,Wq=cU.YAMLSeq;var _q=iU.Lexer,Oq=rU.LineCounter,Dq=nU.Parser,t=p1.parse,Iq=p1.parseAllDocuments,Kq=p1.parseDocument,x2=p1.stringify,Lq=AZ.visit,Rq=AZ.visitAsync;function Nq($){let Z=CZ($,"utf-8");return t(Z)}function bZ($){let Z=$._meta,Q={...$};delete Q._meta;let X=x2(Q,{lineWidth:0});if(Z?.found&&Z.found.length>0){let z=Z.found.join(" + ");X=X.replace(/^(\s+type:\s+\S+)(\s*)$/m,(J,H,U)=>{if(U.includes("#"))return J;return`${H} # found: ${z}`})}return X}function Pq($,Z){Mq($,bZ(Z),"utf-8")}function EZ($){return CZ($,"utf-8")}function jZ($=process.cwd()){let Z=["project.faf",".faf"];for(let X of Z){let z=wZ($,X);if(TZ(z))return z}let Q=Fq($);if(Q!==$)for(let X of Z){let z=wZ(Q,X);if(TZ(z))return z}return null}import{existsSync as Aq,statSync as SZ}from"fs";import{dirname as Tq,join as wq}from"path";var Cq=["CLAUDE.md","AGENTS.md",".cursorrules","GEMINI.md"],bq=1000;function Eq($,Z=Tq($)){let Q=SZ($).mtimeMs,X=Cq.map((z)=>{let J=wq(Z,z);if(!Aq(J))return{file:z,exists:!1,mtime_ms:null,status:"missing",delta_ms:null};let H=SZ(J).mtimeMs,U=H-Q,q;if(Math.abs(U)<bq)q="in-sync";else if(U>0)q="newer";else q="older";return{file:z,exists:!0,mtime_ms:H,status:q,delta_ms:U}});return{source:$,source_mtime_ms:Q,targets:X,drifted:X.filter((z)=>z.status==="newer"||z.status==="older").length,in_sync:X.filter((z)=>z.status==="in-sync").length,missing:X.filter((z)=>z.status==="missing").length}}import{writeFileSync as jq}from"fs";import{join as Sq}from"path";import{deprecate as xq}from"node:util";var xZ=q2.orange,gq=q2.cyan,yq=q2.cyanDeep,hq="#FF9500",vq="#FF3B30",fq="#E6EDF3",kq="#6E7681",gZ={TROPHY:{glyph:"✪",color:xZ},GOLD:{glyph:"★",color:xZ},SILVER:{glyph:"◆",color:gq},BRONZE:{glyph:"◇",color:yq},GREEN:{glyph:"●",color:fq},YELLOW:{glyph:"●",color:hq},RED:{glyph:"○",color:vq},WHITE:{glyph:"♡",color:kq}};function t0($){return String($??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}var yZ=["who","what","why","where","when","how"];function l1($){return $.filter(([,Z])=>Z!==void 0&&Z!==null&&String(Z).trim()!=="").map(([Z,Q])=>`<div class="row"><div class="k">${t0(Z)}</div><div class="v">${t0(Q)}</div></div>`).join(`
143
+ `)}function b8($,Z,Q="project.faf"){let X=t0($.project?.name??"Project"),z=Z.tier?.name??"WHITE",J=gZ[z]??gZ.WHITE,H=Z.inherited?Z.represents?`inherited from ${t0(Z.represents)}`:"inherited":`${Z.score}%`,U=z==="TROPHY"&&!Z.inherited,q=$.human_context??{},Y=yZ.map((W)=>[W,q[W]]),G=Object.entries(q).filter(([W])=>!yZ.includes(W)),V=[["goal",$.project?.goal],["main_language",$.project?.main_language],["type",$.project?.type],["framework",$.project?.framework],["faf_version",$.faf_version]],B=Object.entries($.stack??{}),_=B.filter(([,W])=>W&&W!=="slotignored"&&String(W).trim()!==""),D=B.filter(([,W])=>W==="slotignored").length;return`<!DOCTYPE html>
144
144
  <html lang="en">
145
145
  <head>
146
146
  <meta charset="UTF-8">
@@ -181,7 +181,7 @@ footer strong{color:#e6edf3}
181
181
  <div class="eyebrow">project.faf · visual render</div>
182
182
  <header>
183
183
  <h1>${X}</h1>
184
- <span class="badge">${J.glyph} ${d0(z)}</span>
184
+ <span class="badge">${J.glyph} ${t0(z)}</span>
185
185
  <span class="score">${H}</span>
186
186
  </header>
187
187
  <div class="meter"><span></span></div>
@@ -189,44 +189,56 @@ ${U?'<p class="award statline"><span class="awd-pre">✅ All Required slots fill
189
189
 
190
190
  <section>
191
191
  <h2>The 6 W's</h2>
192
- ${y2(Y)||'<p class="muted">No human_context yet.</p>'}
193
- ${B.length?y2(B):""}
192
+ ${l1(Y)||'<p class="muted">No human_context yet.</p>'}
193
+ ${G.length?l1(G):""}
194
194
  </section>
195
195
 
196
196
  <section>
197
197
  <h2>Project</h2>
198
- ${y2(G)||'<p class="muted">—</p>'}
198
+ ${l1(V)||'<p class="muted">—</p>'}
199
199
  </section>
200
200
 
201
201
  <section>
202
202
  <h2>Stack</h2>
203
- ${_.length?y2(_):'<p class="muted">No active stack slots.</p>'}
203
+ ${_.length?l1(_):'<p class="muted">No active stack slots.</p>'}
204
204
  </section>
205
205
 
206
206
  <footer>
207
- Rendered on-demand from your current <strong>${d0(Q)}</strong><br>
207
+ Rendered on-demand from your current <strong>${t0(Q)}</strong><br>
208
208
  <strong>Humans like visuals. <span style="color:#00D4D4">We gave them one.</span></strong>
209
209
  </footer>
210
210
  </div>
211
211
  </body>
212
212
  </html>
213
- `}function Qq($,Z,Q,X="project.faf"){aU(nU($,"project.html"),IZ(Z,Q,X),"utf-8")}import{writeFileSync as Xq}from"fs";import{join as zq}from"path";var KZ="application/vnd.faf+yaml",Jq="https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json",Hq=/^[a-zA-Z0-9.-]+\/[a-zA-Z0-9._-]+$/;function LZ($){let Z=String($.project?.name??"project").trim();if(Z.includes("/")&&Hq.test(Z))return Z;let Q=$.project?.homepage??$.project?.website??$.project?.url,X="local";if(Q)try{X=new URL(Q).hostname.replace(/^www\./,"").split(".").reverse().join(".")}catch{}let z=Z.replace(/[^a-zA-Z0-9._-]/g,"-").replace(/^-+|-+$/g,"")||"project";return`${X}/${z}`}function Uq($){let Z=String($.project?.goal??$.context??$.project?.name??"MCP server").replace(/\s+/g," ").trim();if(!Z)return"MCP server";return Z.length<=100?Z:`${Z.slice(0,97).trimEnd()}...`}function c0($,Z={}){return{faf:Z.fafPointer??"./project.faf",mediaType:KZ,iana:`https://www.iana.org/assignments/media-types/${KZ}`,deterministic:!0,...Z.scoreEndpoint?{scoreEndpoint:Z.scoreEndpoint}:{},generated:$.generated??Z.now??new Date().toISOString()}}function v2($,Z={}){let Q={$schema:Jq,name:LZ($),version:String($.project?.version??"0.1.0"),description:Uq($)},X=M8($)??$.project?.name;if(X&&X.length<=100)Q.title=X;let z=$.project?.homepage??$.project?.website??$.project?.url;if(z)Q.websiteUrl=z;if(Z.remoteUrl)Q.remotes=[{type:"streamable-http",url:Z.remoteUrl}];return Q._meta={"one.faf/context":c0($,Z)},Q}var RZ="io.modelcontextprotocol.registry/publisher-provided",MZ=4096;function I8($,Z={}){let Q={"one.faf/context":c0($,Z)},X=new TextEncoder().encode(JSON.stringify(Q)).length;if(X>MZ)throw Error(`publisher-provided _meta is ${X}B — exceeds the registry ${MZ}B cap`);return{[RZ]:Q}}function K8($){return LZ($)}function M8($){let Z=$.project?.title;if(typeof Z==="string"){let Q=Z.trim();if(Q&&Q.length<=100)return Q}return}function qq($,Z,Q={}){let X=v2(Z,Q),z=zq($,"server-card");return Xq(z,`${JSON.stringify(X,null,2)}
214
- `,"utf-8"),z}import{existsSync as FZ,mkdirSync as nW,readFileSync as Yq,writeFileSync as sW}from"fs";import{dirname as Bq,join as NZ}from"path";var AZ="https://faf.one/context",Gq="JSONRPC",PZ="1.0",Vq=["a2a","mcp","registry","catalog"];function Wq($){return r(Yq($,"utf-8"))}function _q($=process.cwd()){let Z=["agent.fafa",".fafa"];for(let X of Z){let z=NZ($,X);if(FZ(z))return z}let Q=Bq($);if(Q!==$)for(let X of Z){let z=NZ(Q,X);if(FZ(z))return z}return null}function Oq($){return($.endpoints??[]).filter((Z)=>String(Z.protocol??"").toLowerCase()==="a2a"&&Z.location)}function L8($,Z={}){let Q=Oq($);if(Q.length>0)return Q;let X=Z.doorUrl?.trim();if(X)return[{protocol:"a2a",location:X,version:PZ}];return[]}function TZ($,Z,Q={}){let X=$.agent??{},z=L8($,Q);if(z.length===0)throw Error("No A2A endpoint in .fafa (need endpoints[].protocol: a2a + location). Will not invent a door.");let J=String(X.displayName??$.metadata?.persona??X.name??"").trim(),H=String(X.description??"").trim(),U=String(X.version??"").trim(),q=String(X.vendor??"").trim(),Y=String(X.homepage??"").trim();if(!J||!H||!U||!q||!Y)throw Error("A2A card needs agent.displayName|name, description, version, vendor, homepage in .fafa");let B=c0(Z,Q),G=($.capabilities??[]).map((V)=>{let _=String(V.name??"").trim();if(!_)throw Error("A2A skill missing capabilities[].name");let D=Array.isArray(V.tags)?V.tags.map(String):[];return{id:_,name:_,description:String(V.description??"").trim()||_,tags:D}});return{name:J,description:H,supportedInterfaces:z.map((V)=>({url:String(V.location),protocolBinding:Gq,protocolVersion:String(V.version??PZ)})),provider:{organization:q,url:Y},version:U,capabilities:{streaming:!1,pushNotifications:!1,extendedAgentCard:!1,extensions:[{uri:AZ,description:"FAF context provenance — the durable context block (one context, every door).",required:!1,params:B}]},defaultInputModes:["text/plain","application/json"],defaultOutputModes:["text/plain","application/json"],skills:G}}function Dq($){let Z=$.agent?.homepage;if(!Z)return"local";try{return new URL(Z).hostname.replace(/^www\./,"")}catch{return"local"}}function Iq($,Z){if(Z.a2aCardUrl)return Z.a2aCardUrl;let Q=$.agent?.homepage;if(Q)try{return new URL("/.well-known/agent-card.json",Q).href}catch{}return"/.well-known/agent-card.json"}function Kq($,Z,Q={}){let X=Dq($),z=$.agent??{},J=String(z.name??"agent"),H=Q.now??Z.generated??new Date().toISOString(),U=[];if(L8($,Q).length>0)U.push({identifier:`urn:air:${X}:a2a:${J}`,displayName:String(z.displayName??z.name??"A2A Agent Card"),type:"application/a2a-agent-card+json",description:"A2A v1.0 Agent Card. Projected from .fafa.",url:Iq($,Q),updatedAt:H});let q=Mq($,"fafa");if(q)U.push({identifier:`urn:air:${X}:agent:${J}`,displayName:String(z.displayName??z.name??".fafa"),type:"application/vnd.fafa+yaml",description:"FAF agent passport (.fafa).",url:q,updatedAt:H});return U}function Mq($,Z){let Q=$.agent?.homepage;if(!Q)return;try{return new URL(`/.well-known/${Z}`,Q).href}catch{return}}function Lq($,Z){let Q=$.findIndex((X)=>X.identifier===Z.identifier);if(Q>=0)return Q;if(Z.type==="application/a2a-agent-card+json"||Z.type==="application/json"||Z.identifier.includes(":a2a:"))return $.findIndex((X)=>X.identifier.includes(":a2a:")||X.type==="application/a2a-agent-card+json"||String(X.url??"").includes("agent-card.json"));if(Z.type==="application/vnd.fafa+yaml")return $.findIndex((X)=>X.type==="application/vnd.fafa+yaml");return-1}function Rq($,Z){let Q=$?{...$,entries:[...$.entries??[]]}:{specVersion:"1.0",entries:[]};for(let X of Z){let z=Lq(Q.entries,X);if(z>=0)Q.entries[z]={...Q.entries[z],url:X.url,type:X.type,...X.updatedAt?{updatedAt:X.updatedAt}:{}};else Q.entries.push(X)}return Q}function Fq($){let Z=$.opts??{},Q=new Set($.targets?.length?$.targets:Vq),z={block:c0($.faf,Z)};if(Q.has("mcp"))z.mcp=v2($.faf,Z);if(Q.has("registry")){let J=M8($.faf);z.registry={name:K8($.faf),...J?{title:J}:{},_meta:I8($.faf,Z)}}if(Q.has("a2a")||Q.has("catalog")){if(!$.fafa){if($.targets?.includes("a2a")||$.targets?.includes("catalog"))throw Error("A2A/catalog require a .fafa (agent.fafa). Will not invent an agent.")}}if(Q.has("a2a")&&$.fafa)if(L8($.fafa,Z).length===0){if($.targets?.includes("a2a"))throw Error("No A2A endpoint in .fafa (need endpoints[].protocol: a2a + location). Will not invent a door.")}else z.a2a=TZ($.fafa,$.faf,Z);if(Q.has("catalog")&&$.fafa)z.catalog=Kq($.fafa,$.faf,Z);return Nq(z),z}function Nq($){let Z=JSON.stringify($.block),Q=[];if($.a2a)Q.push(JSON.stringify($.a2a.capabilities.extensions[0].params));if($.mcp){let X=$.mcp._meta;Q.push(JSON.stringify(X["one.faf/context"]))}if($.registry){let X=$.registry._meta["io.modelcontextprotocol.registry/publisher-provided"];Q.push(JSON.stringify(X["one.faf/context"]))}for(let X of Q)if(X!==Z)throw Error("context block drifted across card targets — one projector, one block")}var R8=["ephemeral","standard","high","critical"],O0=Object.fromEntries(R8.map(($,Z)=>[$,Z])),f2=new Set(["user","feedback","project","reference"]),F8=new Set(["version","profile","namepoint","created","last_etched","retention","index","memory"]),N8=new Set(["facts","sessions","preferences","custom"]),A8={low:"ephemeral",medium:"standard"};import{readFileSync as Aq,writeFileSync as Pq,existsSync as Tq}from"fs";function i0(){return new Date().toISOString().replace(/\.\d{3}Z$/,"Z")}function k($){return $===null||$===void 0}function T1($){if(k($))return"standard";if(A8[$])return A8[$];if($ in O0)return $;return"standard"}var Cq=new Set(["text","id","type","priority","tags","links","timestamp","source"]);function CZ($){if(typeof $==="string")return{text:$,id:null,type:null,priority:"standard",tags:[],links:[],timestamp:null,source:null,extra:{}};if(!$||typeof $!=="object"||!("text"in $))throw Error(`fact must be a string or a mapping with 'text': ${JSON.stringify($)}`);let Z=$,Q={};for(let[X,z]of Object.entries(Z))if(!Cq.has(X))Q[X]=z;return{text:String(Z.text),id:Z.id??null,type:Z.type??null,priority:T1(Z.priority),tags:Array.isArray(Z.tags)?Z.tags.slice():[],links:Array.isArray(Z.links)?Z.links.slice():[],timestamp:Z.timestamp??null,source:Z.source??null,extra:Q}}function wZ($){if(k($.id)&&k($.type)&&$.tags.length===0&&$.links.length===0&&k($.timestamp)&&k($.source)&&Object.keys($.extra).length===0&&$.priority==="standard")return $.text;let Q={text:$.text};if(!k($.id))Q.id=$.id;if(!k($.type))Q.type=$.type;if(Q.priority=$.priority,$.tags.length)Q.tags=$.tags;if($.links.length)Q.links=$.links;if(!k($.timestamp))Q.timestamp=$.timestamp;if(!k($.source))Q.source=$.source;return Object.assign(Q,$.extra),Q}class T0{namepoint;profile;retention;created;last_etched;_facts;_byId;_index;_sessions;_preferences;_custom;_extra;_memoryExtra;constructor($,Z={}){this.namepoint=$,this.profile=Z.profile??"knowledge",this.retention=Z.retention??"forever",this.created=Z.created??i0(),this.last_etched=this.created,this._facts=Z.facts?Z.facts.slice():[],this._byId=new Map,this._facts.forEach((Q,X)=>{if(!k(Q.id))this._byId.set(Q.id,X)}),this._index=Z.index?Z.index.slice():[],this._sessions=Z.sessions?structuredClone(Z.sessions):[],this._preferences=Z.preferences?{...Z.preferences}:{},this._custom=Z.custom?{...Z.custom}:{},this._extra=Z.extra?{...Z.extra}:{},this._memoryExtra=Z.memoryExtra?{...Z.memoryExtra}:{}}get facts(){return this._facts}get index(){return this._index}get sessions(){return this._sessions}get preferences(){return this._preferences}get custom(){return this._custom}get extra(){return this._extra}get memoryExtra(){return this._memoryExtra}static load($){if(!Tq($))throw Error(`soul file not found: ${$}`);let Z=Aq($,"utf-8"),Q=r(Z);if(!Q||typeof Q!=="object")throw Error("soul is not a YAML mapping");let X=Q.memory&&typeof Q.memory==="object"?Q.memory:{},z=Array.isArray(X.facts)?X.facts:[],J={};for(let[q,Y]of Object.entries(Q))if(!F8.has(q))J[q]=structuredClone(Y);let H={};for(let[q,Y]of Object.entries(X))if(!N8.has(q))H[q]=structuredClone(Y);let U=new T0(String(Q.namepoint??$.replace(/.*\//,"").replace(/\.fafm$/,"")),{profile:String(Q.profile??"voice"),facts:z.map(CZ),retention:String(Q.retention??"forever"),created:Q.created??null,index:Array.isArray(Q.index)?Q.index.slice():[],sessions:Array.isArray(X.sessions)?structuredClone(X.sessions):[],preferences:X.preferences&&typeof X.preferences==="object"?structuredClone(X.preferences):{},custom:X.custom&&typeof X.custom==="object"?structuredClone(X.custom):{},extra:J,memoryExtra:H});return U.last_etched=String(Q.last_etched??U.created),U}static fromFile($){return T0.load($)}toDoc(){let $={facts:this._facts.map(wZ),sessions:structuredClone(this._sessions),preferences:structuredClone(this._preferences),custom:structuredClone(this._custom)};for(let[Q,X]of Object.entries(this._memoryExtra))if(!N8.has(Q))$[Q]=structuredClone(X);let Z={version:"1.1",profile:this.profile,namepoint:this.namepoint,created:this.created,last_etched:this.last_etched,retention:this.retention,index:this._index.slice(),memory:$};for(let[Q,X]of Object.entries(this._extra))if(!F8.has(Q))Z[Q]=structuredClone(X);return Z}toYaml(){return h2(this.toDoc(),{lineWidth:100})}rebuildIndex($=80){return this._index=this._facts.map((Z)=>`${Z.id??"?"} — ${Z.text.slice(0,$)}`),this._index}save($,Z={}){if(Z.reindex!==!1)this.rebuildIndex();return Pq($,this.toYaml(),"utf-8"),$}toFile($,Z={}){return this.save($,Z)}add($){if(!k($.id)&&this._byId.has($.id)){let Z=this._byId.get($.id);if(Z!==void 0)this._facts[Z]=$}else if(this._facts.push($),!k($.id))this._byId.set($.id,this._facts.length-1);if($.timestamp&&$.timestamp>(this.last_etched||""))this.last_etched=$.timestamp;return $}etch($,Z={}){return this.add({text:$,id:Z.id??null,type:Z.type??null,priority:T1(Z.priority),tags:Z.tags?Z.tags.slice():[],links:Z.links?Z.links.slice():[],timestamp:i0(),source:Z.source??null,extra:{}})}recall($,Z={}){let Q=O0[T1(Z.minPriority??"ephemeral")]??0,X=($??"").toLowerCase(),z=new Set(Z.tags??[]),J=[];this._facts.forEach((U,q)=>{if(X&&!U.text.toLowerCase().includes(X))return;if(z.size>0&&![...z].some((Y)=>U.tags.includes(Y)))return;if(!k(Z.type)&&U.type!==Z.type)return;if((O0[U.priority]??1)<Q)return;J.push([q,U])}),J.sort((U,q)=>{let Y=O0[U[1].priority]??1,B=O0[q[1].priority]??1;if(B!==Y)return B-Y;let G=U[1].timestamp??"",V=q[1].timestamp??"";if(V!==G)return V<G?-1:V>G?1:0;return q[0]-U[0]});let H=J.map(([,U])=>U);if(!k(Z.limit))return H.slice(0,Z.limit);return H}getFact($){let Z=this._byId.get($);return Z===void 0?null:this._facts[Z]}deleteFact($){let Z=this._byId.get($);if(Z===void 0)return!1;return this._facts.splice(Z,1),this._byId.clear(),this._facts.forEach((Q,X)=>{if(!k(Q.id))this._byId.set(Q.id,X)}),!0}}import{readdirSync as wq,readFileSync as bq,statSync as bZ,existsSync as Eq}from"fs";import{join as Sq,basename as EZ,resolve as jq}from"path";var SZ=new Set(["MEMORY.md","MEMORY-FULL.md","README.md"]),xq=/\[\[([^\]]+)\]\]/g;function gq($){let Z=bZ($).mtimeMs;return new Date(Z).toISOString().replace(/\.\d{3}Z$/,"Z")}function hq($){if(!$.startsWith("---"))return{fm:null,body:$};let Z=$.split("---");if(Z.length<3)return{fm:null,body:$};try{let Q=r(Z[1]);if(!Q||typeof Q!=="object")return{fm:null,body:Z.slice(2).join("---").trim()};return{fm:Q,body:Z.slice(2).join("---").trim()}}catch{return{fm:null,body:$}}}function yq($,Z,Q){if(!Q.name)return null;let X=Q.metadata&&typeof Q.metadata==="object"?Q.metadata:{},z=X.type;if(typeof z!=="string"||!f2.has(z))return null;let J=String(Q.name).trim(),U=(Q.description!==void 0&&Q.description!==null&&String(Q.description).trim()?String(Q.description).trim():"")||J,q={};if(X.originSessionId)q.provenance=[`session:${X.originSessionId}`];let Y=[...new Set([...Z.matchAll(xq)].map((B)=>B[1]))].sort();return{text:U,id:J,type:z,priority:"standard",tags:[],links:Y,timestamp:gq($),source:`claude-code memory: ${EZ($)}`,extra:q}}function jZ($,Z={}){let Q=jq($);if(!Eq(Q))throw Error(`Claude memory directory not found: ${Q}`);if(!bZ(Q).isDirectory())throw Error(`Claude memory path is not a directory: ${Q}`);let X=Z.skip??SZ,z=Z.namepoint??`@claude-code:${EZ(Q)}`,J=[],H=wq(Q).filter((G)=>G.endsWith(".md")).sort();for(let G of H){if(X.has(G))continue;let V=Sq(Q,G),_;try{_=bq(V,"utf-8")}catch{continue}let{fm:D,body:W}=hq(_);if(!D)continue;let O=yq(V,W,D);if(O)J.push(O)}let U=J.map((G)=>G.timestamp).filter(Boolean),q=U.length?U.reduce((G,V)=>G<V?G:V):i0(),Y=U.length?U.reduce((G,V)=>G>V?G:V):q,B=new T0(z,{profile:"knowledge",facts:J,created:q});return B.last_etched=Y,B.rebuildIndex(),B}var vZ="faf-interview/1",r0="(terse — 3-4 words)",P8=[{path:"project.name",question:"What is the name of this project?",header:"Name",type:"text",required:!0},{path:"project.goal",question:"What does this project do? (one sentence)",header:"Goal",type:"text",required:!0},{path:"human_context.who",question:`Who is this for? ${r0}`,header:"Who",type:"text",required:!0},{path:"human_context.what",question:`What are they building? ${r0}`,header:"What",type:"text",required:!0},{path:"human_context.why",question:`Why does it exist? ${r0}`,header:"Why",type:"text",required:!0},{path:"human_context.where",question:`Where does it run or ship? ${r0}`,header:"Where",type:"text",required:!0},{path:"human_context.when",question:`When — timeline or stage? ${r0}`,header:"When",type:"text",required:!0},{path:"human_context.how",question:`How is it built or used? ${r0}`,header:"How",type:"text",required:!0}],fZ=[{path:"project.main_language",question:"What is the primary programming language?",header:"Language",type:"select",required:!0,options:[{label:"TypeScript",value:"TypeScript",description:"JavaScript with types"},{label:"JavaScript",value:"JavaScript",description:"Vanilla JS or Node.js"},{label:"Python",value:"Python",description:"Python 3.x"},{label:"Rust",value:"Rust",description:"Systems programming"},{label:"Go",value:"Go",description:"Golang"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.frontend",question:"What frontend framework does it use?",header:"Frontend",type:"select",required:!1,options:[{label:"React",value:"React",description:"React.js"},{label:"Vue",value:"Vue",description:"Vue.js"},{label:"Svelte",value:"Svelte",description:"Svelte/SvelteKit"},{label:"Next.js",value:"Next.js",description:"React framework"},{label:"None",value:"None",description:"No frontend"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.backend",question:"What backend framework does it use?",header:"Backend",type:"select",required:!1,options:[{label:"Express",value:"Express",description:"Node.js Express"},{label:"Fastify",value:"Fastify",description:"Node.js Fastify"},{label:"Django",value:"Django",description:"Python Django"},{label:"FastAPI",value:"FastAPI",description:"Python FastAPI"},{label:"None",value:"None",description:"No backend"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.database",question:"What database does it use?",header:"Database",type:"select",required:!1,options:[{label:"PostgreSQL",value:"PostgreSQL",description:"Postgres"},{label:"MySQL",value:"MySQL",description:"MySQL/MariaDB"},{label:"SQLite",value:"SQLite",description:"Embedded SQL"},{label:"MongoDB",value:"MongoDB",description:"Document store"},{label:"None",value:"None",description:"No database"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.runtime",question:"What runtime does it run on?",header:"Runtime",type:"text",required:!1},{path:"stack.hosting",question:"Where is it hosted or distributed?",header:"Hosting",type:"text",required:!1},{path:"stack.build",question:"What is the build tool?",header:"Build",type:"text",required:!1},{path:"stack.cicd",question:"What CI/CD does it use?",header:"CI/CD",type:"text",required:!1}],a0=[...P8,...fZ],kZ=new Map(a0.map(($)=>[$.path,$])),vq=Object.fromEntries(a0.map(($)=>[$.path,$]));function T8($){let Z=kZ.get($);if(Z)return Z.question;let Q=e0.get($)??v.find((X)=>X.canonical===$);return Q?`${Q.description}?`.replace(/\?\?$/,"?"):`${$}?`}function fq($,Z){return a0.filter((Q)=>{let X=Q.path.split("."),z=$;for(let J of X)if(z&&typeof z==="object"&&J in z)z=z[J];else{z=void 0;break}if(z==="slotignored")return!1;return Z(z)})}var kq=new Set(["developers","development teams","development team","teams","development","cloud platform","web platform","platform","best practices","improve development efficiency","development efficiency","modern development practices","modern development","test-driven development","production/stable","production","stable","app","project","tool"]),uq=[["npm",/\bnpm\b/i],["PyPI",/\bpypi\b/i],["crates.io",/\bcrates\.io\b/i],["Homebrew",/\bhomebrew\b/i],["Docker",/\bdocker\b/i],["Cloudflare",/\bcloudflare\b/i],["Vercel",/\bvercel\b/i],["Netlify",/\bnetlify\b/i],["AWS",/\baws\b/i],["Cloud Run",/\bcloud run\b/i],["edge",/\bedge\b/i],["browser",/\bbrowser\b/i],["WASM",/\bwasm\b/i],["GitHub",/\bgithub\b/i],["MCP Registry",/\bmcp registry\b/i],["Chrome Web Store",/\bchrome web store\b/i],["Smithery",/\bsmithery\b/i]],xZ=($)=>kq.has($.toLowerCase().trim()),mq=/^(?:with|and|or|using|for|to|that|who|whom|whose|the|a|an|in|on|of|via|by|&)$/i;function gZ($,Z=5){let Q=$.trim().split(/\s+/).filter(Boolean).slice(0,Z);while(Q.length&&mq.test(Q[Q.length-1].replace(/[.,;:]+$/,"")))Q.pop();return Q.join(" ")}function uZ($){let Z={};if(!$||typeof $!=="string")return Z;let Q=$.trim(),X=Q.replace(/^[^A-Za-z0-9]+/,"").split(/\s+(?:for|that|which|to)\s+|\s+[—–]\s+|\s-\s|:\s|\.\s|,\s/)[0].trim(),z=gZ(X);if(z.split(/\s+/).filter(Boolean).length>=2&&!xZ(z))Z.what=z;let J=uq.filter(([,q])=>q.test(Q)).map(([q])=>q);if(J.length)Z.where=J.slice(0,4).join(", ");let H=Q.match(/\bfor ((?:[A-Za-z][\w./+-]* )?(?:any |all )?(?:developers?|teams?|engineers?|builders?|users?|integrators?)\b[^.,;:—]*)/i),U=gZ((H?.[1]||"").trim().replace(/\s+/g," "));if(U&&!xZ(U))Z.who=U;return Z}function hZ($,Z){let Q=$;for(let X of Z.split("."))if(Q&&typeof Q==="object"&&X in Q)Q=Q[X];else return;return Q}function yZ($){if(typeof $!=="string")return!1;let Z=$.trim();if(!Z||Z==="slotignored")return!1;return!K0(Z)}function lq($,Z={}){let Q=$&&typeof $==="object"?$:{},X=hZ(Q,"project.goal"),z=(yZ(X)?String(X).trim():"")||(Z.goal??"").trim(),J=uZ(z),H=Z.detailed??{},U={"project.goal":z||void 0,"human_context.what":J.what,"human_context.where":J.where,"human_context.who":J.who},q=(_)=>{let D=U[_];if(D)return{value:D,source:"project goal",confidence:0.9};let W=_.startsWith("human_context.")?_.slice(14):"",O=W?H[W]:void 0;return O?{value:O.value,source:O.source,confidence:O.confidence}:void 0},Y=P8.map((_,D)=>{let W={n:D+1,path:_.path,header:_.header,question:_.question},O=hZ(Q,_.path);if(yZ(O))return{...W,value:String(O).trim(),status:"filled",seeded:!1};let I=q(_.path);if(I)return{...W,value:I.value,status:"seeded",seeded:!0,source:I.source,confidence:I.confidence};return{...W,value:"",status:"empty",seeded:!1}}),B=Y.filter((_)=>_.status==="filled").length,G=Y.filter((_)=>_.status==="seeded").length,V=Y.filter((_)=>_.status==="empty").length;return{version:vZ,rows:Y,filledCount:B,seededCount:G,emptyCount:V,complete:V===0}}function k2($){if($===null||$===void 0)return!0;if(typeof $==="string"){let Z=$.trim();return Z===""||K0(Z)}return!1}function pq($,Z){let Q=$;for(let X of Z.split("."))if(Q&&typeof Q==="object"&&X in Q)Q=Q[X];else return;return Q}function mZ($){if($==="project.goal")return!0;return e0.get($)?.category==="human"}function lZ($,Z=k2){let Q=[],X=[];for(let z of a0){let J=pq($,z.path);if(J==="slotignored")continue;if(!Z(J))continue;(mZ(z.path)?Q:X).push(z.path)}return{human:Q,sourceable:X}}function pZ($,Z,Q=k2){let X=lZ(Z,Q),z;if($>=100||X.human.length===0&&X.sourceable.length===0)z="done";else if(X.sourceable.length>0)z="can-source";else z="needs-human";let J=z==="needs-human"?C8(X):[];return{status:z,score:$,gaps:X,ask:J}}function C8($){return $.human.map((Z)=>({path:Z,question:T8(Z)}))}function dq($,Z={}){let Q=Math.max(1,Z.maxRounds??5),X=Z.isEmpty??k2,z=[],J=0;for(let U=0;U<=Q;U++){let q=$.read();if(!q)return{status:"no-faf",score:0,rounds:J,history:z,ask:[]};let Y=$.score(q.yaml);z.push(Y);let B=pZ(Y,q.data,X);if(B.status==="done")return{status:"done",score:Y,rounds:J,history:z,ask:[]};if(B.status==="needs-human")return{status:"needs-human",score:Y,rounds:J,history:z,ask:B.ask};if(z.length>=2&&Y<=z[z.length-2])return B.gaps.human.length?{status:"needs-human",score:Y,rounds:J,history:z,ask:C8(B.gaps)}:{status:"stuck",score:Y,rounds:J,history:z,ask:[]};if(J>=Q)return{status:"capped",score:Y,rounds:J,history:z,ask:C8(B.gaps)};$.runAuto(),J++}return{status:"capped",score:z[z.length-1]??0,rounds:J,history:z,ask:[]}}import{createHash as cZ}from"crypto";var w8="faf-bench/1",cq={"project.name":"What is the project's name?","project.goal":"What is the project's goal — what is it for?","project.main_language":"What is the primary programming language?","human_context.who":"Who is this project for?","human_context.what":"What are they building?","human_context.why":"Why does this project exist?","human_context.where":"Where does it run or get distributed?","human_context.when":"When — what is the project's timeline or stage?","human_context.how":"How is it built or used?"};function iq($,Z){return cq[$]??`What is the project's ${Z.replace(/\s*\(.*\)$/,"").toLowerCase()}?`}var iZ=[["typescript","ts"],["javascript","js"],["python","py","python3"],["node","nodejs","node js","node.js"],["github actions","gh actions","actions"],["postgresql","postgres","pg"],["kubernetes","k8s"],["npm","npm registry"],["cloudflare workers","cf workers","workers"],["google cloud run","cloud run","gcp cloud run"]],C1=new Map;iZ.forEach(($,Z)=>$.forEach((Q)=>C1.set(Q,Z)));var rq=new Set(["a","an","the","and","or","of","for","to","in","on","with","is","it","its","their","your","via","by","using","use","used"]);function u2($){return $.toLowerCase().replace(/[^a-z0-9\s.+#-]/g," ").replace(/\.(?=\s|$)/g," ").replace(/\s+/g," ").trim()}function dZ($){return u2($).split(" ").filter((Z)=>Z&&!rq.has(Z))}function rZ($,Z){let Q=u2($),X=u2(Z);if(!Q||!X)return!1;if(Q===X)return!0;let z=C1.get(Q);if(z!==void 0&&C1.get(X)===z)return!0;let J=dZ($);if(J.length===0)return!1;let H=new Set(dZ(Z));return J.every((U)=>{if(H.has(U))return!0;let q=C1.get(U);return q!==void 0&&[...H].some((Y)=>C1.get(Y)===q)})}function aq($){let Z=J$($),Q=r($),X=[],z={},J=0;for(let q of v){if(Z.slots[q.path]!=="populated")continue;let Y=n8(Q,q);if(typeof Y!=="string")continue;let B=Y.trim();if(!B||p1.has(B.toLowerCase()))continue;J+=1,X.push({n:J,path:q.path,question:iq(q.path,q.description)}),z[J]=B}let H=JSON.stringify({v:w8,q:X.map((q)=>[q.path,q.question])}),U=cZ("sha256").update(H).digest("hex").slice(0,12);return{version:w8,qsetHash:U,questions:X,answers:z}}function nq($){return{version:$.version,qsetHash:$.qsetHash,questions:$.questions}}function sq($,Z){let Q=$.questions.map((z)=>{let J=Z[String(z.n)]??Z[z.path]??"";return{n:z.n,path:z.path,ok:typeof J==="string"&&J.trim()!==""&&rZ($.answers[z.n],J)}}),X=$.questions.filter((z)=>!Q[z.n-1].ok);return{correct:Q.filter((z)=>z.ok).length,total:$.questions.length,misses:X,perQuestion:Q}}function oq($,Z){let Q=JSON.stringify({v:$.version,repo:Z??null,qset:$.qsetHash,protocol:$.protocol,cold:$.cold??null,faf:$.faf??null});return{projection:Q,hash:cZ("sha256").update(Q).digest("hex")}}import{existsSync as gB,readdirSync as B4,readFileSync as hB}from"fs";import{join as v8,dirname as yB,extname as vB,resolve as fB}from"path";var b8={"package.json":{frameworks:["Node.js","JavaScript","TypeScript"],slots:{packageManager:"npm/yarn/pnpm",mainLanguage:"JavaScript/TypeScript"},priority:35,intelligence:"ultra-high"},"README.md":{frameworks:[],slots:{targetUser:"developers",coreProblem:"understanding project",missionPurpose:"project documentation"},priority:25,intelligence:"high"},"requirements.txt":{frameworks:["Python"],slots:{packageManager:"pip",mainLanguage:"Python"},priority:35,intelligence:"ultra-high"},Pipfile:{frameworks:["Python"],slots:{packageManager:"pipenv",mainLanguage:"Python"},priority:35,intelligence:"ultra-high"},"pyproject.toml":{frameworks:["Python"],slots:{mainLanguage:"Python",runtime:"Python",backend:"Python"},priority:36,intelligence:"ultra-high"},Gemfile:{frameworks:["Ruby"],slots:{packageManager:"bundler",mainLanguage:"Ruby"},priority:35,intelligence:"ultra-high"},"Gemfile.lock":{frameworks:["Ruby"],slots:{packageManager:"bundler",mainLanguage:"Ruby"},priority:34,intelligence:"high"},"composer.json":{frameworks:["PHP","Laravel","Symfony"],slots:{packageManager:"composer",mainLanguage:"PHP"},priority:35,intelligence:"ultra-high"},"Cargo.toml":{frameworks:["Rust"],slots:{packageManager:"cargo",mainLanguage:"Rust",buildTool:"cargo"},priority:36,intelligence:"ultra-high"},"go.mod":{frameworks:["Go"],slots:{packageManager:"go modules",mainLanguage:"Go",buildTool:"go build"},priority:36,intelligence:"ultra-high"},"Package.swift":{frameworks:["Swift"],slots:{packageManager:"spm",mainLanguage:"Swift",buildTool:"swift build"},priority:36,intelligence:"ultra-high"},"*.csproj":{frameworks:["C#",".NET"],slots:{packageManager:"NuGet",mainLanguage:"C#",buildTool:"dotnet"},priority:36,intelligence:"ultra-high"},"pubspec.yaml":{frameworks:["Dart"],slots:{packageManager:"pub",mainLanguage:"Dart"},priority:35,intelligence:"ultra-high"},"pom.xml":{frameworks:["Java"],slots:{packageManager:"maven",mainLanguage:"Java",buildTool:"maven"},priority:35,intelligence:"ultra-high"},"build.gradle":{frameworks:["Java","Gradle"],slots:{packageManager:"gradle",mainLanguage:"Java",buildTool:"gradle"},priority:35,intelligence:"ultra-high"},"settings.gradle":{frameworks:["Java","Gradle"],slots:{packageManager:"gradle",mainLanguage:"Java",buildTool:"gradle"},priority:34,intelligence:"high"},"settings.gradle.kts":{frameworks:["Kotlin","Gradle"],slots:{packageManager:"gradle",mainLanguage:"Kotlin",buildTool:"gradle"},priority:34,intelligence:"high"},"next.config.js":{frameworks:["Next.js"],slots:{framework:"Next.js",runtime:"Node.js",buildTool:"Next.js",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"next.config.mjs":{frameworks:["Next.js"],slots:{framework:"Next.js",runtime:"Node.js",buildTool:"Next.js",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"next.config.ts":{frameworks:["Next.js 13+"],slots:{framework:"Next.js 13+",runtime:"Node.js",buildTool:"Next.js",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"nuxt.config.js":{frameworks:["Nuxt 2"],slots:{framework:"Nuxt 2",runtime:"Node.js",buildTool:"Nuxt",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"nuxt.config.ts":{frameworks:["Nuxt 3"],slots:{framework:"Nuxt 3",runtime:"Node.js",buildTool:"Nuxt",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"svelte.config.js":{frameworks:["SvelteKit"],slots:{framework:"SvelteKit",buildTool:"Vite",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"angular.json":{frameworks:["Angular"],slots:{framework:"Angular",buildTool:"Angular CLI",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"manifest.json":{frameworks:["Chrome Extension","Browser Extension"],slots:{framework:"Chrome Extension",runtime:"Chrome/Browser",mainLanguage:"JavaScript",hosting:"Chrome Web Store",apiType:"Chrome APIs"},priority:35,intelligence:"ultra-high",confirmWith:["popup.html","background.js","content.js"]},"vue.config.js":{frameworks:["Vue"],slots:{framework:"Vue",buildTool:"Vue CLI",mainLanguage:"JavaScript"},priority:30,intelligence:"high"},"remix.config.js":{frameworks:["Remix"],slots:{framework:"Remix",runtime:"Node.js",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"gatsby-config.js":{frameworks:["Gatsby"],slots:{framework:"Gatsby",buildTool:"Gatsby",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"gatsby-config.ts":{frameworks:["Gatsby"],slots:{framework:"Gatsby",buildTool:"Gatsby",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"astro.config.mjs":{frameworks:["Astro"],slots:{framework:"Astro",buildTool:"Vite",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"redwood.toml":{frameworks:["RedwoodJS"],slots:{framework:"RedwoodJS",buildTool:"Webpack",mainLanguage:"JavaScript/TypeScript",server:"Node.js",database:"Prisma"},priority:30,intelligence:"high"},"blitz.config.ts":{frameworks:["Blitz.js"],slots:{framework:"Blitz.js",buildTool:"Next.js",mainLanguage:"TypeScript",server:"Node.js",database:"Prisma"},priority:30,intelligence:"high"},"qwik.config.ts":{frameworks:["Qwik"],slots:{framework:"Qwik",buildTool:"Vite",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"manage.py":{frameworks:["Django"],slots:{framework:"Django",backend:"Django",mainLanguage:"Python",server:"Django",apiType:"Django Views"},priority:30,intelligence:"high"},artisan:{frameworks:["Laravel"],slots:{framework:"Laravel",backend:"Laravel",mainLanguage:"PHP",server:"PHP",apiType:"Laravel Routes"},priority:30,intelligence:"high"},"mix.exs":{frameworks:["Phoenix","Elixir"],slots:{framework:"Phoenix",backend:"Phoenix",mainLanguage:"Elixir",server:"BEAM"},priority:30,intelligence:"high"},"nest-cli.json":{frameworks:["NestJS"],slots:{framework:"NestJS",backend:"NestJS",mainLanguage:"TypeScript",server:"Node.js",apiType:"REST API"},priority:30,intelligence:"high"},"strapi.config.js":{frameworks:["Strapi"],slots:{backend:"Strapi",apiType:"REST API",database:"Required",server:"Node.js"},priority:30,intelligence:"high"},Dockerfile:{frameworks:["Docker"],slots:{hosting:"Docker",connection:"Containerized"},priority:30,intelligence:"high"},"docker-compose.yml":{frameworks:["Docker Compose"],slots:{hosting:"Docker",connection:"Multi-container"},priority:30,intelligence:"high"},"docker-compose.yaml":{frameworks:["Docker Compose"],slots:{hosting:"Docker",connection:"Multi-container"},priority:30,intelligence:"high"},"kubernetes.yml":{frameworks:["Kubernetes"],slots:{hosting:"Kubernetes",connection:"Orchestrated"},priority:30,intelligence:"high"},"k8s.yaml":{frameworks:["Kubernetes"],slots:{hosting:"Kubernetes",connection:"Orchestrated"},priority:30,intelligence:"high"},"vercel.json":{frameworks:["Vercel"],slots:{hosting:"Vercel",cicd:"Vercel"},priority:30,intelligence:"high"},"netlify.toml":{frameworks:["Netlify"],slots:{hosting:"Netlify",cicd:"Netlify"},priority:30,intelligence:"high"},"render.yaml":{frameworks:["Render"],slots:{hosting:"Render",cicd:"Render"},priority:30,intelligence:"high"},"fly.toml":{frameworks:["Fly.io"],slots:{hosting:"Fly.io",cicd:"Fly.io"},priority:30,intelligence:"high"},"railway.json":{frameworks:["Railway"],slots:{hosting:"Railway",cicd:"Railway"},priority:30,intelligence:"high"},"railway.toml":{frameworks:["Railway"],slots:{hosting:"Railway",cicd:"Railway"},priority:30,intelligence:"high"},"app.yaml":{frameworks:["Google App Engine"],slots:{hosting:"Google Cloud",cicd:"Google Cloud"},priority:30,intelligence:"high"},Procfile:{frameworks:["Heroku"],slots:{hosting:"Heroku",cicd:"Heroku"},priority:30,intelligence:"high"},"vite.config.js":{frameworks:["Vite"],slots:{buildTool:"Vite"},priority:25,intelligence:"medium"},"vite.config.ts":{frameworks:["Vite"],slots:{buildTool:"Vite",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"webpack.config.js":{frameworks:["Webpack"],slots:{buildTool:"Webpack"},priority:25,intelligence:"medium"},"rollup.config.js":{frameworks:["Rollup"],slots:{buildTool:"Rollup"},priority:25,intelligence:"medium"},"esbuild.config.js":{frameworks:["esbuild"],slots:{buildTool:"esbuild"},priority:25,intelligence:"medium"},"parcel.config.js":{frameworks:["Parcel"],slots:{buildTool:"Parcel"},priority:25,intelligence:"medium"},"snowpack.config.js":{frameworks:["Snowpack"],slots:{buildTool:"Snowpack"},priority:25,intelligence:"medium"},"tsconfig.json":{frameworks:["TypeScript"],slots:{mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"jsconfig.json":{frameworks:["JavaScript"],slots:{mainLanguage:"JavaScript"},priority:20,intelligence:"medium"},"babel.config.js":{frameworks:["Babel"],slots:{buildTool:"Babel"},priority:20,intelligence:"medium"},".babelrc":{frameworks:["Babel"],slots:{buildTool:"Babel"},priority:20,intelligence:"medium"},"jest.config.js":{frameworks:["Jest"],slots:{cicd:"Jest"},priority:25,intelligence:"medium"},"jest.config.ts":{frameworks:["Jest"],slots:{cicd:"Jest",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"vitest.config.ts":{frameworks:["Vitest"],slots:{cicd:"Vitest",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"cypress.config.js":{frameworks:["Cypress"],slots:{cicd:"Cypress"},priority:25,intelligence:"medium"},"playwright.config.ts":{frameworks:["Playwright"],slots:{cicd:"Playwright",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"karma.conf.js":{frameworks:["Karma"],slots:{cicd:"Karma"},priority:20,intelligence:"medium"},"mocha.opts":{frameworks:["Mocha"],slots:{cicd:"Mocha"},priority:20,intelligence:"medium"},".rspec":{frameworks:["RSpec"],slots:{cicd:"RSpec",mainLanguage:"Ruby"},priority:25,intelligence:"medium"},"pytest.ini":{frameworks:["Pytest"],slots:{cicd:"Pytest",mainLanguage:"Python"},priority:25,intelligence:"medium"},"phpunit.xml":{frameworks:["PHPUnit"],slots:{cicd:"PHPUnit",mainLanguage:"PHP"},priority:25,intelligence:"medium"},"schema.prisma":{frameworks:["Prisma"],slots:{database:"Prisma ORM",connection:"Prisma"},priority:25,intelligence:"medium"},"drizzle.config.ts":{frameworks:["Drizzle"],slots:{database:"Drizzle ORM",connection:"Drizzle",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"ormconfig.js":{frameworks:["TypeORM"],slots:{database:"TypeORM",connection:"TypeORM"},priority:25,intelligence:"medium"},"knexfile.js":{frameworks:["Knex.js"],slots:{database:"Knex.js",connection:"Knex.js"},priority:25,intelligence:"medium"},"sequelize.config.js":{frameworks:["Sequelize"],slots:{database:"Sequelize",connection:"Sequelize"},priority:25,intelligence:"medium"},"alembic.ini":{frameworks:["Alembic"],slots:{database:"Alembic",mainLanguage:"Python"},priority:25,intelligence:"medium"},".github/workflows":{frameworks:["GitHub Actions"],slots:{cicd:"GitHub Actions"},priority:25,intelligence:"medium"},".gitlab-ci.yml":{frameworks:["GitLab CI"],slots:{cicd:"GitLab CI"},priority:25,intelligence:"medium"},Jenkinsfile:{frameworks:["Jenkins"],slots:{cicd:"Jenkins"},priority:25,intelligence:"medium"},".circleci/config.yml":{frameworks:["CircleCI"],slots:{cicd:"CircleCI"},priority:25,intelligence:"medium"},".travis.yml":{frameworks:["Travis CI"],slots:{cicd:"Travis CI"},priority:25,intelligence:"medium"},"azure-pipelines.yml":{frameworks:["Azure DevOps"],slots:{cicd:"Azure DevOps"},priority:25,intelligence:"medium"},"bitbucket-pipelines.yml":{frameworks:["Bitbucket Pipelines"],slots:{cicd:"Bitbucket Pipelines"},priority:25,intelligence:"medium"},"tailwind.config.js":{frameworks:["Tailwind CSS"],slots:{cssFramework:"Tailwind CSS"},priority:20,intelligence:"medium"},"tailwind.config.ts":{frameworks:["Tailwind CSS"],slots:{cssFramework:"Tailwind CSS",mainLanguage:"TypeScript"},priority:20,intelligence:"medium"},"postcss.config.js":{frameworks:["PostCSS"],slots:{cssFramework:"PostCSS"},priority:20,intelligence:"medium"},"uno.config.ts":{frameworks:["UnoCSS"],slots:{cssFramework:"UnoCSS",mainLanguage:"TypeScript"},priority:20,intelligence:"medium"},"styled-components.config.js":{frameworks:["styled-components"],slots:{cssFramework:"styled-components",uiLibrary:"styled-components"},priority:20,intelligence:"medium"},"emotion.config.js":{frameworks:["Emotion"],slots:{cssFramework:"Emotion",uiLibrary:"Emotion"},priority:20,intelligence:"medium"},"metro.config.js":{frameworks:["React Native"],slots:{framework:"React Native",mainLanguage:"JavaScript"},priority:25,intelligence:"medium"},"expo.config.js":{frameworks:["Expo"],slots:{framework:"React Native",buildTool:"Expo"},priority:25,intelligence:"medium"},"app.json":{frameworks:["React Native","Expo"],slots:{framework:"React Native"},priority:20,intelligence:"medium",confirmWith:["expo"]},"capacitor.config.ts":{frameworks:["Capacitor"],slots:{framework:"Capacitor",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"ionic.config.json":{frameworks:["Ionic"],slots:{framework:"Ionic",uiLibrary:"Ionic"},priority:25,intelligence:"medium"},"nx.json":{frameworks:["Nx"],slots:{buildTool:"Nx"},priority:25,intelligence:"medium"},"turbo.json":{frameworks:["Turborepo"],slots:{buildTool:"Turborepo"},priority:25,intelligence:"medium"},"lerna.json":{frameworks:["Lerna"],slots:{buildTool:"Lerna"},priority:25,intelligence:"medium"},"rush.json":{frameworks:["Rush"],slots:{buildTool:"Rush"},priority:25,intelligence:"medium"},"pnpm-workspace.yaml":{frameworks:["pnpm workspaces"],slots:{packageManager:"pnpm",buildTool:"pnpm workspaces"},priority:25,intelligence:"medium"},"*.svelte":{frameworks:["Svelte","SvelteKit"],slots:{framework:"Svelte"},priority:15,intelligence:"low"},"*.vue":{frameworks:["Vue"],slots:{framework:"Vue"},priority:15,intelligence:"low"},"*.jsx":{frameworks:["React"],slots:{framework:"React",mainLanguage:"JavaScript"},priority:15,intelligence:"low"},"*.ts":{frameworks:["TypeScript"],slots:{mainLanguage:"TypeScript"},priority:15,intelligence:"low"},"*.tsx":{frameworks:["React","TypeScript"],slots:{framework:"React",mainLanguage:"TypeScript"},priority:15,intelligence:"low"},"*.py":{frameworks:["Python"],slots:{mainLanguage:"Python"},priority:15,intelligence:"low"},"*.rb":{frameworks:["Ruby"],slots:{mainLanguage:"Ruby"},priority:15,intelligence:"low"},"*.php":{frameworks:["PHP"],slots:{mainLanguage:"PHP"},priority:15,intelligence:"low"},"*.java":{frameworks:["Java"],slots:{mainLanguage:"Java"},priority:15,intelligence:"low"},"*.kt":{frameworks:["Kotlin"],slots:{mainLanguage:"Kotlin"},priority:15,intelligence:"low"},"*.swift":{frameworks:["Swift"],slots:{mainLanguage:"Swift"},priority:15,intelligence:"low"},"*.go":{frameworks:["Go"],slots:{mainLanguage:"Go"},priority:15,intelligence:"low"},"*.rs":{frameworks:["Rust"],slots:{mainLanguage:"Rust"},priority:15,intelligence:"low"},"*.dart":{frameworks:["Flutter","Dart"],slots:{mainLanguage:"Dart"},priority:15,intelligence:"low"},"*.ex":{frameworks:["Elixir"],slots:{mainLanguage:"Elixir"},priority:15,intelligence:"low"},"*.exs":{frameworks:["Elixir"],slots:{mainLanguage:"Elixir"},priority:15,intelligence:"low"},"*.scala":{frameworks:["Scala"],slots:{mainLanguage:"Scala"},priority:15,intelligence:"low"},"*.clj":{frameworks:["Clojure"],slots:{mainLanguage:"Clojure"},priority:15,intelligence:"low"},"*.lua":{frameworks:["Lua"],slots:{mainLanguage:"Lua"},priority:15,intelligence:"low"},"*.r":{frameworks:["R"],slots:{mainLanguage:"R"},priority:15,intelligence:"low"},"*.R":{frameworks:["R"],slots:{mainLanguage:"R"},priority:15,intelligence:"low"},"*.jl":{frameworks:["Julia"],slots:{mainLanguage:"Julia"},priority:15,intelligence:"low"},"*.nim":{frameworks:["Nim"],slots:{mainLanguage:"Nim"},priority:15,intelligence:"low"},"*.zig":{frameworks:["Zig"],slots:{mainLanguage:"Zig"},priority:15,intelligence:"low"},"build.zig":{frameworks:["Zig"],slots:{packageManager:"Zig Package Manager",mainLanguage:"Zig",buildTool:"zig build",framework:"Zig",build:"zig build"},priority:35,intelligence:"ultra-high"},"openapi.json":{frameworks:["OpenAPI"],slots:{apiType:"REST API",backend:"API Server"},priority:30,intelligence:"high"},"openapi.yaml":{frameworks:["OpenAPI"],slots:{apiType:"REST API",backend:"API Server"},priority:30,intelligence:"high"},"swagger.json":{frameworks:["Swagger"],slots:{apiType:"REST API",backend:"API Server"},priority:30,intelligence:"high"},"graphql.schema":{frameworks:["GraphQL"],slots:{apiType:"GraphQL",backend:"GraphQL Server"},priority:30,intelligence:"high"},"schema.graphql":{frameworks:["GraphQL"],slots:{apiType:"GraphQL",backend:"GraphQL Server"},priority:30,intelligence:"high"},".graphqlconfig":{frameworks:["GraphQL"],slots:{apiType:"GraphQL"},priority:25,intelligence:"medium"},"redux.config.js":{frameworks:["Redux"],slots:{stateManagement:"Redux"},priority:20,intelligence:"medium"},"mobx.config.js":{frameworks:["MobX"],slots:{stateManagement:"MobX"},priority:20,intelligence:"medium"},"vuex.config.js":{frameworks:["Vuex"],slots:{stateManagement:"Vuex",framework:"Vue"},priority:20,intelligence:"medium"},"pinia.config.js":{frameworks:["Pinia"],slots:{stateManagement:"Pinia",framework:"Vue"},priority:20,intelligence:"medium"},"zustand.config.js":{frameworks:["Zustand"],slots:{stateManagement:"Zustand"},priority:20,intelligence:"medium"},".eslintrc.js":{frameworks:["ESLint"],slots:{},priority:15,intelligence:"low"},".eslintrc.json":{frameworks:["ESLint"],slots:{},priority:15,intelligence:"low"},".prettierrc":{frameworks:["Prettier"],slots:{},priority:15,intelligence:"low"},".prettierrc.json":{frameworks:["Prettier"],slots:{},priority:15,intelligence:"low"},"biome.json":{frameworks:["Biome"],slots:{},priority:15,intelligence:"low"},".editorconfig":{frameworks:["EditorConfig"],slots:{},priority:10,intelligence:"low"},"serverless.yml":{frameworks:["Serverless Framework"],slots:{hosting:"AWS Lambda/Azure/GCP",backend:"Serverless",apiType:"API Gateway"},priority:30,intelligence:"high"},"serverless.yaml":{frameworks:["Serverless Framework"],slots:{hosting:"AWS Lambda/Azure/GCP",backend:"Serverless",apiType:"API Gateway"},priority:30,intelligence:"high"},"sam.yaml":{frameworks:["AWS SAM"],slots:{hosting:"AWS Lambda",backend:"AWS SAM",cicd:"AWS SAM CLI"},priority:30,intelligence:"high"},"template.yaml":{frameworks:["AWS SAM","CloudFormation"],slots:{hosting:"AWS",backend:"AWS SAM/CloudFormation",cicd:"AWS"},priority:25,intelligence:"medium",confirmWith:["samconfig.toml"]},"amplify.yml":{frameworks:["AWS Amplify"],slots:{hosting:"AWS Amplify",backend:"AWS Amplify",cicd:"AWS Amplify"},priority:30,intelligence:"high"},Podfile:{frameworks:["CocoaPods","Swift"],slots:{packageManager:"CocoaPods",mainLanguage:"Swift/Objective-C"},priority:30,intelligence:"high"},"build.gradle.kts":{frameworks:["Kotlin","Gradle"],slots:{packageManager:"gradle",mainLanguage:"Kotlin",buildTool:"gradle"},priority:35,intelligence:"ultra-high"},"*.ipynb":{frameworks:["Jupyter","Python"],slots:{mainLanguage:"Python",framework:"Jupyter Notebook"},priority:30,intelligence:"high"},MLproject:{frameworks:["MLflow"],slots:{mainLanguage:"Python",framework:"MLflow",backend:"MLflow",cicd:"MLflow"},priority:30,intelligence:"high"},"dvc.yaml":{frameworks:["DVC","Data Version Control"],slots:{mainLanguage:"Python",framework:"DVC",cicd:"DVC Pipelines"},priority:30,intelligence:"high"},"dvc.lock":{frameworks:["DVC"],slots:{framework:"DVC"},priority:20,intelligence:"medium"},"wrangler.toml":{frameworks:["Cloudflare Workers","Cloudflare"],slots:{hosting:"Cloudflare Workers",backend:"Cloudflare Workers",runtime:"V8 Isolates"},priority:30,intelligence:"high"},"deno.json":{frameworks:["Deno"],slots:{runtime:"Deno",mainLanguage:"TypeScript",packageManager:"Deno"},priority:30,intelligence:"high"},"bun.lockb":{frameworks:["Bun"],slots:{runtime:"Bun",packageManager:"Bun",mainLanguage:"TypeScript/JavaScript"},priority:30,intelligence:"high"},"codecov.yml":{frameworks:["Codecov"],slots:{cicd:"Codecov"},priority:25,intelligence:"high"},"dependabot.yml":{frameworks:["Dependabot","GitHub"],slots:{cicd:"Dependabot"},priority:25,intelligence:"high"},"renovate.json":{frameworks:["Renovate"],slots:{cicd:"Renovate"},priority:25,intelligence:"high"},Makefile:{frameworks:["Make","GNU Make"],slots:{buildTool:"Make"},priority:30,intelligence:"high"},"CMakeLists.txt":{frameworks:["CMake","C","C++"],slots:{buildTool:"CMake",mainLanguage:"C/C++"},priority:30,intelligence:"high"},"meson.build":{frameworks:["Meson","C","C++"],slots:{buildTool:"Meson",mainLanguage:"C/C++"},priority:30,intelligence:"high"},"*.c":{frameworks:["C"],slots:{mainLanguage:"C"},priority:30,intelligence:"high"},"*.cpp":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:30,intelligence:"high"},"*.cc":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:30,intelligence:"high"},"*.cxx":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:25,intelligence:"high"},"*.h":{frameworks:["C","C++"],slots:{mainLanguage:"C/C++"},priority:25,intelligence:"high"},"*.hpp":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:25,intelligence:"high"},"*.hxx":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:20,intelligence:"medium"},".env":{frameworks:[],slots:{},priority:20,intelligence:"medium"},".env.example":{frameworks:[],slots:{},priority:25,intelligence:"high"},".env.local":{frameworks:[],slots:{},priority:20,intelligence:"medium"},".env.development":{frameworks:[],slots:{},priority:20,intelligence:"medium"},".env.production":{frameworks:[],slots:{},priority:20,intelligence:"medium"},"skaffold.yaml":{frameworks:["Skaffold","Kubernetes"],slots:{hosting:"Kubernetes",cicd:"Skaffold"},priority:30,intelligence:"high"},"Chart.yaml":{frameworks:["Helm","Kubernetes"],slots:{hosting:"Kubernetes",backend:"Helm"},priority:30,intelligence:"high"},"values.yaml":{frameworks:["Helm","Kubernetes"],slots:{hosting:"Kubernetes"},priority:25,intelligence:"high",confirmWith:["Chart.yaml"]},"pulumi.yaml":{frameworks:["Pulumi"],slots:{hosting:"Cloud",cicd:"Pulumi"},priority:30,intelligence:"high"},"Pulumi.yaml":{frameworks:["Pulumi"],slots:{hosting:"Cloud",cicd:"Pulumi"},priority:30,intelligence:"high"},"terragrunt.hcl":{frameworks:["Terragrunt","Terraform"],slots:{hosting:"Cloud",cicd:"Terragrunt"},priority:30,intelligence:"high"},"ansible.yml":{frameworks:["Ansible"],slots:{cicd:"Ansible"},priority:30,intelligence:"high"},"playbook.yml":{frameworks:["Ansible"],slots:{cicd:"Ansible"},priority:25,intelligence:"high"},"*.cs":{frameworks:["C#",".NET","Unity"],slots:{mainLanguage:"C#"},priority:30,intelligence:"high"},"*.m":{frameworks:["Objective-C","iOS"],slots:{mainLanguage:"Objective-C"},priority:25,intelligence:"high"},".nvmrc":{frameworks:["Node.js","nvm"],slots:{runtime:"Node.js"},priority:25,intelligence:"high"},".tool-versions":{frameworks:["asdf"],slots:{},priority:25,intelligence:"high"},".ruby-version":{frameworks:["Ruby","rbenv"],slots:{mainLanguage:"Ruby",runtime:"Ruby"},priority:25,intelligence:"high"},".python-version":{frameworks:["Python","pyenv"],slots:{mainLanguage:"Python",runtime:"Python"},priority:25,intelligence:"high"},".dockerignore":{frameworks:["Docker"],slots:{},priority:20,intelligence:"medium"},".gitattributes":{frameworks:["Git"],slots:{},priority:15,intelligence:"low"},".npmrc":{frameworks:["npm","Node.js"],slots:{packageManager:"npm"},priority:20,intelligence:"medium"},"sonar-project.properties":{frameworks:["SonarQube","SonarCloud"],slots:{cicd:"SonarQube"},priority:25,intelligence:"high"},"*.fs":{frameworks:["F#",".NET"],slots:{mainLanguage:"F#"},priority:25,intelligence:"high"},"*.mm":{frameworks:["Objective-C++","iOS","macOS"],slots:{mainLanguage:"Objective-C++"},priority:25,intelligence:"high"},"build.zig.zon":{frameworks:["Zig"],slots:{mainLanguage:"Zig",packageManager:"Zig Package Manager",buildTool:"zig build"},priority:35,intelligence:"ultra-high"},"gleam.toml":{frameworks:["Gleam","BEAM","Erlang"],slots:{mainLanguage:"Gleam",runtime:"BEAM",packageManager:"Gleam"},priority:30,intelligence:"high"},"bunfig.toml":{frameworks:["Bun"],slots:{runtime:"Bun",packageManager:"Bun",buildTool:"Bun"},priority:30,intelligence:"high"},"mise.toml":{frameworks:["mise"],slots:{},priority:25,intelligence:"high"},".mise.toml":{frameworks:["mise"],slots:{},priority:25,intelligence:"high"},"manifest.toml":{frameworks:["Flox","Nix"],slots:{},priority:25,intelligence:"high",confirmWith:[".flox"]},justfile:{frameworks:["Just"],slots:{buildTool:"Just"},priority:25,intelligence:"high"},".pre-commit-config.yaml":{frameworks:["pre-commit"],slots:{cicd:"pre-commit"},priority:25,intelligence:"high"},"CLAUDE.md":{frameworks:["Claude Code"],slots:{},priority:30,intelligence:"high",confirmWith:[".claude"]}};import{existsSync as aZ,readFileSync as eq,readdirSync as $Y}from"fs";import{join as E8}from"path";var n0={version:2,_doc:"SINGLE SOURCE of Dart/Flutter detection KNOWLEDGE (A+B hybrid, the Truth-is-faf-cli spec). faf-cli imports this directly; faf-python-sdk vendors a synced copy (phase 2); MCPs compose it. Bolster Dart/Flutter by editing THIS file. Logic stays in dart.ts. Refreshed 2026-08-01 (knowledge v2) — community receipt on top of 6.13.0 Dart Edition.",flutterDeps:["flutter"],mcpDeps:["dart_mcp","mcp_server","mcp_dart","dart_mcp_server","mcp","dart_mcpserver"],serverFrameworks:[["serverpod","Serverpod"],["dart_frog","Dart Frog"],["conduit","Conduit"],["angel3_framework","Angel3"],["alfred","Alfred"],["shelf","Shelf"],["jaspr","Jaspr"],["relic","Relic"]],stateManagement:[["flutter_riverpod","Riverpod"],["hooks_riverpod","Riverpod"],["riverpod_annotation","Riverpod"],["riverpod","Riverpod"],["flutter_bloc","Bloc"],["bloc","Bloc"],["provider","Provider"],["get","GetX"],["flutter_mobx","MobX"],["mobx","MobX"],["signals","Signals"],["flutter_hooks","Hooks"]],routing:[["go_router","go_router"],["auto_route","auto_route"],["beamer","Beamer"],["routemaster","Routemaster"]]};var ZY=n0.flutterDeps,QY=n0.mcpDeps,XY=n0.serverFrameworks,zY=n0.stateManagement,JY=n0.routing;function HY($){let Z=new Set,Q=!1;for(let X of $.split(`
215
- `)){if(/^(dependencies|dev_dependencies|dependency_overrides):\s*$/.test(X)){Q=!0;continue}if(/^\S/.test(X))Q=!1;if(Q){let z=X.match(/^\s{2}([a-zA-Z0-9_]+):/);if(z)Z.add(z[1].toLowerCase())}}return Z}function m2($){let Z=E8($,"pubspec.yaml");if(!aZ(Z))return null;let Q;try{Q=eq(Z,"utf-8")}catch{return null}let X=HY(Q),z=(N)=>X.has(N.toLowerCase()),J=ZY.some(z)||/^flutter:\s*$/m.test(Q)||/\bsdk:\s*flutter\b/.test(Q),H=QY.find(z),U=XY.find(([N])=>z(N)),q=zY.find(([N])=>z(N)),Y=q?q[1]:"",B=JY.find(([N])=>z(N)),G=B?B[1]:"",V=z("flutter_test")?"flutter_test":z("test")?"test":"",_=/^executables:\s*$/m.test(Q),D=!1;try{D=$Y(E8($,"bin")).some((N)=>N.endsWith(".dart"))}catch{}let W=_||D,O,I="",R;if(J)if(I="Flutter",aZ(E8($,"lib","main.dart"))||/^publish_to:\s*['"]?none\b/m.test(Q))O="mobile",R="pubspec.yaml (Flutter app)";else O="library",R="pubspec.yaml (Flutter package)";else if(H)O="mcp",R=`pubspec.yaml + ${H} (Dart MCP server)`;else if(U)O="backend",I=U[1],R=`pubspec.yaml + ${U[0]} (Dart backend)`;else if(W)O="cli",R=_?"pubspec.yaml executables: (Dart CLI)":"pubspec.yaml + bin/*.dart (Dart CLI)";else O="library",R="pubspec.yaml (Dart package)";return{appType:O,isFlutter:J,framework:I,stateManagement:Y,routing:G,testing:V,found:R}}import{existsSync as S8,readFileSync as oZ,readdirSync as nZ,statSync as qY}from"fs";import{join as p2}from"path";var l2={version:1,_doc:"SINGLE SOURCE of Go detection KNOWLEDGE (A+B hybrid, Truth-is-faf-cli). faf-cli imports this directly; SDKs/MCPs compose it. Bolster Go by editing THIS file. Logic stays in go.ts. Content-aware: go.mod ≠ one bucket — backend · CLI · MCP · library. 2026-08-01 initial (Dart composition pattern).",mcpModules:["github.com/mark3labs/mcp-go","github.com/modelcontextprotocol/go-sdk","github.com/metoro-io/mcp-golang","github.com/ThinkInAIXYZ/go-mcp"],serverFrameworks:[["github.com/gin-gonic/gin","Gin"],["github.com/labstack/echo","Echo"],["github.com/labstack/echo/v4","Echo"],["github.com/gofiber/fiber","Fiber"],["github.com/gofiber/fiber/v2","Fiber"],["github.com/go-chi/chi","Chi"],["github.com/go-chi/chi/v5","Chi"],["github.com/gorilla/mux","Gorilla Mux"],["github.com/gofiber/fiber/v3","Fiber"],["google.golang.org/grpc","gRPC"],["connectrpc.com/connect","Connect"],["github.com/go-kratos/kratos","Kratos"],["github.com/go-kratos/kratos/v2","Kratos"],["github.com/zeromicro/go-zero","go-zero"],["github.com/cloudwego/hertz","Hertz"]],cliFrameworks:[["github.com/spf13/cobra","Cobra"],["github.com/urfave/cli","urfave/cli"],["github.com/urfave/cli/v2","urfave/cli"],["github.com/alecthomas/kingpin","Kingpin"],["github.com/alecthomas/kong","Kong"]]};var YY=l2.mcpModules,BY=l2.serverFrameworks,GY=l2.cliFrameworks;function VY($){let Z=new Set,Q=!1;for(let X of $.split(`
216
- `)){let z=X.replace(/\/\/.*$/,"").trim();if(!z)continue;if(/^require\s*\(\s*$/.test(z)){Q=!0;continue}if(Q){if(z===")"){Q=!1;continue}let H=z.match(/^(\S+)/);if(H)Z.add(H[1].toLowerCase());continue}let J=z.match(/^require\s+(\S+)/);if(J&&J[1]!=="(")Z.add(J[1].toLowerCase())}return Z}function tZ($,Z){let Q=Z.toLowerCase();for(let X of $)if(X===Q||X.startsWith(`${Q}/`))return!0;return!1}function sZ($,Z){let Q;for(let X of Z){if(!tZ($,X[0]))continue;if(!Q||X[0].length>Q[0].length)Q=X}return Q}function WY($,Z){let Q;for(let X of Z){if(!tZ($,X))continue;if(!Q||X.length>Q.length)Q=X}return Q}function _Y($){let Z=$.match(/^module\s+(\S+)/m);return Z?Z[1]:""}function OY($){let Z=p2($,"cmd");if(!S8(Z))return!1;try{for(let Q of nZ(Z)){let X=p2(Z,Q);try{if(qY(X).isDirectory()){if(nZ(X).some((J)=>J.endsWith(".go")))return!0}else if(Q.endsWith(".go"))return!0}catch{}}}catch{}return!1}function DY($){let Z=p2($,"main.go");if(!S8(Z))return!1;try{let Q=oZ(Z,"utf-8");return/^package\s+main\b/m.test(Q)}catch{return!1}}function d2($){let Z=p2($,"go.mod");if(!S8(Z))return null;let Q;try{Q=oZ(Z,"utf-8")}catch{return null}let X=_Y(Q),z=VY(Q),J=WY(z,YY),H=sZ(z,BY),U=sZ(z,GY),q=OY($),Y=DY($),B,G="",V;if(J)B="mcp",V=`go.mod + ${J} (Go MCP server)`;else if(H)B="backend",G=H[1],V=`go.mod + ${H[0]} (Go backend)`;else if(U)B="cli",G=U[1],V=`go.mod + ${U[0]} (Go CLI)`;else if(q)B="cli",V="go.mod + cmd/ (Go CLI layout)";else if(Y&&!H)B="cli",V="go.mod + main.go package main (Go CLI)";else B="library",V="go.mod (Go module)";return{appType:B,modulePath:X,framework:G,found:V}}import{existsSync as KY,readFileSync as MY,readdirSync as LY}from"fs";import{join as RY}from"path";var C0={version:1,_doc:"SINGLE SOURCE of C# /.NET detection KNOWLEDGE (Truth-is-faf-cli). faf-cli imports this; SDKs/MCPs compose it. Bolster C# by editing THIS file. Logic stays in csharp.ts. Content-aware: .csproj alone ≠ type — Sdk first, then props/packages. Kill line: .csproj alone ≠ type. 2026-08-01 initial.",mcpPackages:["ModelContextProtocol","ModelContextProtocol.AspNetCore","ModelContextProtocol.Core","ModelContextProtocol.Extensions.Tasks","ModelContextProtocol.Extensions.Apps"],cliPackages:[["System.CommandLine","System.CommandLine"],["Spectre.Console.Cli","Spectre.Console"],["Spectre.Console","Spectre.Console"],["McMaster.Extensions.CommandLineUtils","McMaster"]],testPackages:[["Microsoft.NET.Test.Sdk","VSTest"],["xunit.v3","xUnit"],["xunit","xUnit"],["NUnit","NUnit"],["MSTest.TestFramework","MSTest"],["MSTest","MSTest"]],grpcServerPackages:["Grpc.AspNetCore"],specializedSdks:[["Microsoft.NET.Sdk.Web","web","ASP.NET Core"],["Microsoft.NET.Sdk.Worker","worker","Worker"],["Microsoft.NET.Sdk.BlazorWebAssembly","blazor-wasm","Blazor WebAssembly"],["Microsoft.NET.Sdk.Razor","razor-lib","Razor Class Library"],["MSTest.Sdk","test","MSTest"],["Aspire.AppHost.Sdk","aspire","Aspire AppHost"]],baseSdk:"Microsoft.NET.Sdk"};var FY=C0.mcpPackages.map(($)=>$.toLowerCase()),NY=C0.cliPackages.map(([$,Z])=>[$.toLowerCase(),Z]),AY=C0.testPackages.map(([$,Z])=>[$.toLowerCase(),Z]),PY=C0.grpcServerPackages.map(($)=>$.toLowerCase()),TY=C0.specializedSdks,eZ=C0.baseSdk.toLowerCase();function CY($){let Z=$.match(/<Project\b[^>]*\bSdk\s*=\s*"([^"/]+)(?:\/[^"]*)?"/i),Q=$.match(/<Sdk\b[^>]*\bName\s*=\s*"([^"]+)"/i),X=(Z?.[1]||Q?.[1]||"").trim(),z=($.match(/<OutputType>\s*([^<]+?)\s*<\/OutputType>/i)?.[1]||"").trim(),J=$.match(/<TargetFramework>\s*([^<]+?)\s*<\/TargetFramework>/i)?.[1],U=($.match(/<TargetFrameworks>\s*([^<]+?)\s*<\/TargetFrameworks>/i)?.[1]||J||"").trim(),q=/<IsTestProject>\s*true\s*<\/IsTestProject>/i.test($),Y=/<UseMaui>\s*true\s*<\/UseMaui>/i.test($),B=/<UseWPF>\s*true\s*<\/UseWPF>/i.test($),G=/<UseWindowsForms>\s*true\s*<\/UseWindowsForms>/i.test($),V=new Set;for(let D of $.matchAll(/<PackageReference\b[^>]*\bInclude\s*=\s*"([^"]+)"/gi))V.add(D[1].toLowerCase());for(let D of $.matchAll(/<PackageReference\s+Include\s*=\s*"([^"]+)"/gi))V.add(D[1].toLowerCase());let _=new Set;for(let D of $.matchAll(/<FrameworkReference\b[^>]*\bInclude\s*=\s*"([^"]+)"/gi))_.add(D[1].toLowerCase());return{sdk:X,outputType:z,targetFramework:U,isTestProject:q,useMaui:Y,useWpf:B,useWindowsForms:G,packages:V,frameworkRefs:_}}function j8($,Z){let Q=Z.toLowerCase();if($.has(Q))return!0;for(let X of $)if(X===Q||X.startsWith(`${Q}.`))return!0;return!1}function $4($,Z){let Q;for(let[X,z]of Z){if(!j8($,X))continue;if(!Q||X.length>Q[0].length)Q=[X,z]}return Q}function wY($){let Z;for(let Q of FY){if(!j8($,Q))continue;if(!Z||Q.length>Z.length)Z=Q}for(let Q of $)if(Q==="modelcontextprotocol"||Q.startsWith("modelcontextprotocol.")){if(!Z||Q.length>Z.length)Z=Q}return Z}function bY($){let Z=$.toLowerCase();if(!Z)return;let Q;for(let X of TY){let z=X[0].toLowerCase();if(Z===z||Z.startsWith(`${z}/`)){if(!Q||z.length>Q[0].length)Q=X}}return Q}function c2($){let Z=$.toLowerCase();return Z==="exe"||Z==="winexe"}function EY($,Z){if($==="mcp")return 0;if($==="mobile")return 1;if($==="backend")return 2;if($==="cli")return 3;if(Z&&Z!=="")return 4;return 5}function SY($,Z){let Q=Z.replace(/\.csproj$/i,""),{sdk:X,packages:z,frameworkRefs:J,outputType:H}=$,U,q="",Y,B=wY(z),G=bY(X),V=$4(z,AY),_=$4(z,NY),D=PY.some((O)=>j8(z,O)),W=J.has("microsoft.aspnetcore.app");if(B)U="mcp",q="MCP",Y=`${Z} + ${B} (C# MCP server)`;else if($.isTestProject||G?.[1]==="test"||V)U="library",q=V?.[1]||(G?.[1]==="test"?G[2]:"Test"),Y=`${Z} + test (${q})`;else if($.useMaui)U="mobile",q="MAUI",Y=`${Z} + UseMaui (MAUI)`;else if($.useWpf||$.useWindowsForms)U="backend",q=$.useWpf&&$.useWindowsForms?"WPF+WinForms":$.useWpf?"WPF":"Windows Forms",Y=`${Z} + ${q}`;else if(G?.[1]==="web")U="backend",q=D?"gRPC":G[2],Y=`${Z} + Sdk=${G[0]}${D?" + Grpc.AspNetCore":""} (ASP.NET Core)`;else if(G?.[1]==="worker")U="backend",q=G[2],Y=`${Z} + Sdk=${G[0]} (Worker)`;else if(G?.[1]==="blazor-wasm")U="backend",q=G[2],Y=`${Z} + Sdk=${G[0]} (Blazor WASM)`;else if(G?.[1]==="aspire")U="backend",q=G[2],Y=`${Z} + Sdk=${G[0]} (Aspire)`;else if(G?.[1]==="razor-lib")U="library",q=G[2],Y=`${Z} + Sdk=${G[0]} (Razor class library)`;else if(W&&c2(H))U="backend",q="ASP.NET Core",Y=`${Z} + FrameworkReference Microsoft.AspNetCore.App (host)`;else if(W&&!c2(H))U="library",q="ASP.NET Core",Y=`${Z} + FrameworkReference Microsoft.AspNetCore.App (web library)`;else if(_&&(c2(H)||!H))U="cli",q=_[1],Y=`${Z} + ${_[0]} (C# CLI)`;else if(c2(H))U="cli",Y=`${Z} + OutputType=Exe (C# console)`;else{U="library";let O=X?` Sdk=${X}`:"";if(Y=`${Z}${O} (C# class library)`.replace(" Sdk=Microsoft.NET.Sdk",""),!X||X.toLowerCase()===eZ||X.toLowerCase().startsWith(`${eZ}/`))Y=`${Z} (C# class library)`}return{appType:U,projectName:Q,targetFramework:$.targetFramework,sdk:X||"Microsoft.NET.Sdk",framework:q,found:Y}}function s0($){if(!KY($))return[];try{return LY($).filter((Z)=>Z.toLowerCase().endsWith(".csproj")).sort()}catch{return[]}}function i2($){let Z=s0($);if(Z.length===0)return null;let Q=null,X=999;for(let z of Z){let J=RY($,z),H;try{H=MY(J,"utf-8")}catch{continue}let U=CY(H),q=SY(U,z),Y=EY(q.appType,q.framework);if(!Q||Y<X)Q=q,X=Y}return Q}import{existsSync as w0,readFileSync as xY,readdirSync as gY,statSync as hY}from"fs";import{join as p}from"path";var a={version:1,_doc:"SINGLE SOURCE of JVM (Java/Kotlin) detection KNOWLEDGE (Truth-is-faf-cli). faf-cli imports this; SDKs/MCPs compose it. Bolster JVM by editing THIS file. Logic stays in jvm.ts. Kill line: pom / gradle alone ≠ type. Content-aware: plugins · parents · packaging · deps · version catalogs. One brand JVM — Android/KMP are facets, not a second Kotlin Edition. 2026-08-03 initial (post-intel).",mcpArtifacts:["io.modelcontextprotocol.sdk:mcp","io.modelcontextprotocol.sdk:mcp-core","io.modelcontextprotocol.sdk:mcp-spring-webflux","io.modelcontextprotocol.sdk:mcp-spring-webmvc","org.springframework.ai:spring-ai-starter-mcp-server","org.springframework.ai:spring-ai-starter-mcp-server-webmvc","org.springframework.ai:spring-ai-starter-mcp-server-webflux","org.springframework.ai:spring-ai-starter-mcp-client","org.springframework.ai:spring-ai-mcp-server-spring-boot-starter","org.springframework.ai:spring-ai-mcp-client-spring-boot-starter","io.modelcontextprotocol:kotlin-sdk","io.modelcontextprotocol.kotlin:mcp"],webPlugins:[["org.springframework.boot","Spring Boot"],["io.quarkus","Quarkus"],["io.quarkus.gradle.plugin","Quarkus"],["io.micronaut.application","Micronaut"],["io.micronaut.library","Micronaut"]],webParents:[["org.springframework.boot:spring-boot-starter-parent","Spring Boot"],["io.quarkus.platform:quarkus-bom","Quarkus"],["io.micronaut.platform:micronaut-parent","Micronaut"]],webArtifacts:[["org.springframework.boot:spring-boot-starter-web","Spring Boot"],["org.springframework.boot:spring-boot-starter-webflux","Spring Boot"],["org.springframework.boot:spring-boot-starter","Spring Boot"],["io.quarkus:quarkus-core","Quarkus"],["io.micronaut:micronaut-http-server-netty","Micronaut"],["io.ktor:ktor-server-core","Ktor"],["io.ktor:ktor-server-netty","Ktor"],["io.ktor:ktor-server-cio","Ktor"]],androidPlugins:["com.android.application","com.android.library","com.android.kotlin.multiplatform.library"],kmpPlugins:["org.jetbrains.kotlin.multiplatform","kotlin-multiplatform"],jvmKotlinPlugins:["org.jetbrains.kotlin.jvm","kotlin-jvm","org.jetbrains.kotlin.android","kotlin-android"],cliPlugins:[["org.gradle.application","application"],["application","application"]],cliArtifacts:[["info.picocli:picocli","Picocli"],["com.github.ajalt.clikt:clikt","Clikt"],["com.github.ajalt.clikt:clikt-jvm","Clikt"]],libraryPlugins:["java-library","org.gradle.java-library"]};var yY=a.mcpArtifacts.map(($)=>$.toLowerCase()),vY=a.webPlugins.map(([$,Z])=>[$.toLowerCase(),Z]),fY=a.webParents.map(([$,Z])=>[$.toLowerCase(),Z]),kY=a.webArtifacts.map(([$,Z])=>[$.toLowerCase(),Z]),a_=a.androidPlugins.map(($)=>$.toLowerCase()),uY=a.kmpPlugins.map(($)=>$.toLowerCase()),mY=a.jvmKotlinPlugins.map(($)=>$.toLowerCase()),lY=a.cliPlugins.map(([$,Z])=>[$.toLowerCase(),Z]),pY=a.cliArtifacts.map(([$,Z])=>[$.toLowerCase(),Z]),dY=a.libraryPlugins.map(($)=>$.toLowerCase()),cY=["pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts"];function x8($){return cY.some((Z)=>w0(p($,Z)))}function b1($){try{return xY($,"utf-8")}catch{return null}}function iY($){let Z=new Map,Q=new Map,X="";for(let z of $.split(`
217
- `)){let J=z.replace(/#.*$/,"").trim();if(!J)continue;let H=J.match(/^\[([^\]]+)\]$/);if(H){X=H[1].trim().toLowerCase();continue}let U=J.match(/^([A-Za-z0-9_.-]+)\s*=\s*\{[^}]*\bid\s*=\s*"([^"]+)"/);if(U&&(X==="plugins"||X.endsWith(".plugins"))){Z.set(U[1].replace(/-/g,".").toLowerCase(),U[2].toLowerCase()),Z.set(U[1].toLowerCase(),U[2].toLowerCase());continue}let q=J.match(/^([A-Za-z0-9_.-]+)\s*=\s*\{[^}]*\bmodule\s*=\s*"([^"]+)"/);if(q&&(X==="libraries"||X.endsWith(".libraries"))){let G=q[1].toLowerCase();Q.set(G,q[2].toLowerCase()),Q.set(G.replace(/-/g,"."),q[2].toLowerCase());continue}let Y=J.match(/^([A-Za-z0-9_.-]+)\s*=\s*\{[^}]*\bgroup\s*=\s*"([^"]+)"[^}]*\bname\s*=\s*"([^"]+)"/);if(Y&&(X==="libraries"||X.endsWith(".libraries"))){let G=`${Y[2]}:${Y[3]}`.toLowerCase(),V=Y[1].toLowerCase();Q.set(V,G),Q.set(V.replace(/-/g,"."),G);continue}let B=J.match(/^([A-Za-z0-9_.-]+)\s*=\s*"([^"]+)"/);if(B){let G=B[1].toLowerCase(),V=B[2];if(X==="plugins"||X.endsWith(".plugins")){let _=V.split(":")[0].toLowerCase();Z.set(G,_),Z.set(G.replace(/-/g,"."),_)}else if(X==="libraries"||X.endsWith(".libraries")){let _=V.split(":");if(_.length>=2){let D=`${_[0]}:${_[1]}`.toLowerCase();Q.set(G,D),Q.set(G.replace(/-/g,"."),D)}}}}return{plugins:Z,libraries:Q}}function rY($){let Z=p($,"gradle","libs.versions.toml");if(!w0(Z))return{plugins:new Map,libraries:new Map};let Q=b1(Z);if(!Q)return{plugins:new Map,libraries:new Map};return iY(Q)}function aY($){let Z=[];for(let Q of $.matchAll(/include\s*\(\s*([^)]+)\)/g))for(let X of Q[1].split(",")){let z=X.replace(/['":\s]/g,"").replace(/^:/,"");if(z)Z.push(z.replace(/:/g,"/"))}for(let Q of $.matchAll(/include\s+((?:['"][^'"]+['"]\s*,?\s*)+)/g))for(let X of Q[1].split(",")){let z=X.replace(/['":\s]/g,"").replace(/^:/,"");if(z)Z.push(z.replace(/:/g,"/"))}for(let Q of $.matchAll(/project\s*\(\s*["']:([^"']+)["']\s*\)\s*\.projectDir\s*=\s*file\s*\(\s*["']([^"']+)["']\s*\)/g))Z.push(Q[2].replace(/^\.\//,""));return[...new Set(Z)]}function nY($,Z){let Q=new Set;for(let X of $.matchAll(/\bid\s*\(\s*["']([^"']+)["']\s*\)/g))Q.add(X[1].toLowerCase());for(let X of $.matchAll(/\bid\s+['"]([^'"]+)['"]/g))Q.add(X[1].toLowerCase());for(let X of $.matchAll(/plugins\s*\{([\s\S]*?)\}/g))for(let z of X[1].split(/[\n;]/)){let J=z.replace(/\/\/.*$/,"").trim();if(!J||J.startsWith("id")||J.startsWith("kotlin")||J.startsWith("alias"))continue;let H=J.match(/^`([a-zA-Z0-9.-]+)`$/)||J.match(/^([a-zA-Z][a-zA-Z0-9.-]*)$/);if(H)Q.add(H[1].toLowerCase())}for(let X of $.matchAll(/\bkotlin\s*\(\s*["']([^"']+)["']\s*\)/g)){let z=X[1].toLowerCase();if(z==="jvm")Q.add("org.jetbrains.kotlin.jvm");else if(z==="multiplatform")Q.add("org.jetbrains.kotlin.multiplatform");else if(z==="android")Q.add("org.jetbrains.kotlin.android");else Q.add(`org.jetbrains.kotlin.${z}`)}for(let X of $.matchAll(/libs\.plugins\.([A-Za-z0-9_.]+)/g)){let z=X[1].toLowerCase(),J=Z.plugins.get(z)||Z.plugins.get(z.replace(/\./g,"-"))||Z.plugins.get(z.replace(/-/g,"."));if(J)Q.add(J);else if(z.includes("spring")&&z.includes("boot"))Q.add("org.springframework.boot")}for(let X of $.matchAll(/apply\s+plugin\s*:\s*['"]([^'"]+)['"]/g))Q.add(X[1].toLowerCase());return Q}function sY($,Z){let Q=new Set;for(let X of $.matchAll(/["']([A-Za-z0-9_.-]+:[A-Za-z0-9_.-]+)(?::[^"']+)?["']/g))Q.add(X[1].toLowerCase());for(let X of $.matchAll(/libs\.([A-Za-z0-9_.]+)/g)){let z=X[1].toLowerCase();if(z.startsWith("plugins."))continue;let J=[z,z.replace(/\./g,"-"),z.replace(/-/g,".")];for(let H of J){let U=Z.libraries.get(H);if(U){Q.add(U.includes(":")?U.split(":").slice(0,2).join(":"):U);break}}}return Q}function X4($){let Z=($.match(/<packaging>\s*([^<]+?)\s*<\/packaging>/i)?.[1]||"jar").trim().toLowerCase(),Q=new Set,X=$.match(/<parent>([\s\S]*?)<\/parent>/i);if(X){let H=X[1].match(/<groupId>\s*([^<]+?)\s*<\/groupId>/i)?.[1]?.trim(),U=X[1].match(/<artifactId>\s*([^<]+?)\s*<\/artifactId>/i)?.[1]?.trim();if(H&&U)Q.add(`${H}:${U}`.toLowerCase())}let z=new Set;for(let H of $.matchAll(/<dependency>([\s\S]*?)<\/dependency>/gi)){let U=H[1].match(/<groupId>\s*([^<]+?)\s*<\/groupId>/i)?.[1]?.trim(),q=H[1].match(/<artifactId>\s*([^<]+?)\s*<\/artifactId>/i)?.[1]?.trim();if(U&&q)z.add(`${U}:${q}`.toLowerCase())}let J=[];for(let H of $.matchAll(/<module>\s*([^<]+?)\s*<\/module>/gi))J.push(H[1].trim());return{packaging:Z,parents:Q,artifacts:z,modules:J}}function z0($,Z){let Q=Z.toLowerCase();if($.has(Q))return!0;for(let X of $)if(X===Q||X.endsWith(`.${Q}`)||X===Q.replace(/^org\.gradle\./,""))return!0;return!1}function w1($,Z,Q){let X;for(let[z,J]of Z){let H=!1;if(Q==="plugin")H=z0($,z);else if(H=$.has(z)||[...$].some((U)=>U===z||U.startsWith(`${z}:`)||U.startsWith(`${z}.`)),!H&&Q==="artifact")H=[...$].some((U)=>U===z||U.startsWith(`${z}`));if(!H)continue;if(!X||z.length>X[0].length)X=[z,J]}return X}function oY($){let Z;for(let Q of yY)for(let X of $){if(X===Q||X.startsWith(`${Q}:`)||X.startsWith(Q.replace(/:mcp$/,":"))){if(!Z||Q.length>Z.length)Z=Q}if(X.startsWith("io.modelcontextprotocol")||X.includes("spring-ai-starter-mcp")||X.includes("spring-ai-mcp")){if(!Z||X.length>Z.length)Z=X}}return Z}function z4($){let Z=new Set,Q=!1,X=!1,z=[p($,"src"),p($,"src","main")],J=(H,U)=>{if(U>4||!w0(H))return;let q;try{q=gY(H)}catch{return}for(let Y of q){if(Y==="androidMain"||Y==="commonMain"||Y==="jvmMain"||Y==="iosMain")Z.add(Y);let B=p(H,Y);try{if(hY(B).isDirectory())J(B,U+1);else if(Y.endsWith(".kt")||Y.endsWith(".kts"))Q=!0;else if(Y.endsWith(".java"))X=!0}catch{}}};for(let H of z)J(H,0);return{kotlin:Q,java:X,hints:Z}}function tY($){let Z=[],Q=$.plugins,X=$.artifacts,z=uY.some((P)=>z0(Q,P))||$.sourceHints.has("commonMain"),J=z0(Q,"com.android.application"),H=z0(Q,"com.android.library")||z0(Q,"com.android.kotlin.multiplatform.library");if(J||H)Z.push("android");if(z)Z.push("multiplatform");let U=oY(X),q=w1(Q,vY,"plugin"),Y=w1($.parents,fY,"parent"),B=w1(X,kY,"artifact"),G=w1(Q,lY,"plugin"),V=w1(X,pY,"artifact"),_=dY.some((P)=>z0(Q,P)),D=$.packaging==="pom",W,O="",I;if(J)W="mobile",O=z?"Android+KMP":"Android",I=`${$.path||"root"} + com.android.application (${O})`;else if(U)W="mcp",O="MCP",Z.push("mcp"),I=`${$.path||"root"} + ${U} (JVM MCP server)`;else if(q||Y||B){W="backend",O=q?.[1]||Y?.[1]||B?.[1]||"JVM";let P=q?.[0]||Y?.[0]||B?.[0]||"web";I=`${$.path||"root"} + ${P} (JVM backend)`}else if(z&&!H)W="library",O="Kotlin Multiplatform",I=`${$.path||"root"} + kotlin multiplatform (KMP library)`;else if(H)W="library",O=z?"Android+KMP":"Android",I=`${$.path||"root"} + android library (${O})`;else if(V||$.hasApplicationPlugin&&($.hasMainClass||G)||G&&$.hasMainClass)W="cli",O=V?.[1]||"application",I=V?`${$.path||"root"} + ${V[0]} (JVM CLI)`:`${$.path||"root"} + application plugin (JVM CLI)`;else if($.hasApplicationPlugin&&!_)W="cli",O="application",I=`${$.path||"root"} + application plugin (JVM CLI)`;else if(D)W="library",I=`${$.path||"root"} + packaging=pom (Maven aggregator/BOM)`;else{W="library";let P=$.kotlinSources&&!$.javaSources?"Kotlin":"JVM";if(I=`${$.path||"root"} (${P} library)`,_)I=`${$.path||"root"} + java-library (JVM library)`}let R="Java";if($.kotlinSources&&$.javaSources)R="Java/Kotlin";else if($.kotlinSources||mY.some((P)=>z0(Q,P))||z)R="Kotlin";let N=[...new Set(Z)];return{appType:W,framework:O,facets:N,found:I,buildTool:$.buildTool,mainLanguage:R}}function eY($,Z){if($==="mcp")return 0;if($==="mobile")return 1;if(Z.includes("multiplatform")&&$==="backend")return 2;if($==="backend")return 3;if($==="cli")return 4;if(Z.includes("multiplatform"))return 5;if(Z.includes("android"))return 6;return 7}function Z4($,Z,Q){let X=Z?p($,Z):$,z=p(X,"build.gradle.kts"),J=p(X,"build.gradle"),H=w0(z)?z:w0(J)?J:null;if(!H)return null;let U=b1(H);if(!U)return null;let q=nY(U,Q),Y=sY(U,Q),B=z4(X),G=/mainClass\s*[.=]/.test(U)||/mainClassName\s*=/.test(U)||/Main-Class/.test(U),V=z0(q,"application")||z0(q,"org.gradle.application");return{path:Z||"build.gradle",plugins:q,artifacts:Y,packaging:"jar",parents:new Set,hasMainClass:G,hasApplicationPlugin:V,sourceHints:B.hints,kotlinSources:B.kotlin||H.endsWith(".kts"),javaSources:B.java,buildTool:"gradle"}}function Q4($,Z){let Q=Z?p($,Z):$,X=p(Q,"pom.xml");if(!w0(X))return null;let z=b1(X);if(!z)return null;let{packaging:J,parents:H,artifacts:U}=X4(z),q=z4(Q);return{path:Z?`${Z}/pom.xml`:"pom.xml",plugins:new Set,artifacts:U,packaging:J,parents:H,hasMainClass:/<mainClass>/.test(z),hasApplicationPlugin:!1,sourceHints:q.hints,kotlinSources:q.kotlin,javaSources:q.java,buildTool:"maven"}}function E1($){if(!x8($))return null;let Z=rY($),Q=[],X=null;for(let Y of["settings.gradle.kts","settings.gradle"]){let B=p($,Y);if(w0(B)){X=b1(B);break}}let z=X?aY(X):[],J=Z4($,"",Z);if(J)Q.push(J);for(let Y of z){let B=Z4($,Y,Z);if(B)Q.push(B)}let H=Q4($,"");if(H){Q.push(H);let Y=b1(p($,"pom.xml"));if(Y){let{modules:B}=X4(Y);for(let G of B){let V=Q4($,G);if(V)Q.push(V)}}}if(Q.length===0&&X)return{appType:"library",framework:"",buildTool:"gradle",mainLanguage:"Java/Kotlin",facets:[],found:"settings.gradle (Gradle multi-project root)"};if(Q.length===0)return null;let U=null,q=999;for(let Y of Q){let B=tY(Y),G=eY(B.appType,B.facets);if(!U||G<q)U={appType:B.appType,framework:B.framework,buildTool:B.buildTool,mainLanguage:B.mainLanguage,facets:B.facets,found:B.found},q=G}if(U&&z.length>0&&!U.found.includes("multi-project"));return U}import{existsSync as x1,readFileSync as ZB,readdirSync as r2,statSync as QB}from"fs";import{join as n}from"path";var S1={version:1,_doc:"SINGLE SOURCE of Ruby detection KNOWLEDGE (Truth-is-faf-cli). faf-cli imports this; SDKs/MCPs compose it. Kill line: Gemfile alone ≠ Rails. Content-aware: gem names + light layout. 2026-08-03 initial (post-intel ruby-edition).",mcpGems:["mcp","fast-mcp","fast_mcp","rails-mcp-server","rails_mcp_server","ruby-mcp-client","ruby_mcp_client","ruby_llm-mcp","ruby_llm_mcp"],webGems:[["rails","Rails"],["railties","Rails"],["sinatra","Sinatra"],["sinatra-contrib","Sinatra"],["roda","Roda"],["grape","Grape"],["hanami","Hanami"],["hanami-controller","Hanami"],["rack","Rack"]],cliGems:[["thor","Thor"],["gli","GLI"],["commander","Commander"],["slop","Slop"]],railsLayoutFiles:["config/application.rb","config/routes.rb","bin/rails","config/environment.rb"]};var XB=S1.mcpGems.map(($)=>$.toLowerCase()),zB=S1.webGems.map(([$,Z])=>[$.toLowerCase(),Z]),J4=S1.cliGems.map(([$,Z])=>[$.toLowerCase(),Z]),JB=S1.railsLayoutFiles;function HB($){return x1(n($,"Gemfile"))||x1(n($,"gems.rb"))||UB($)}function UB($){try{return r2($).some((Z)=>Z.endsWith(".gemspec"))}catch{return!1}}function j1($){try{return ZB($,"utf-8")}catch{return null}}function qB($){let Z=new Set;for(let Q of $.split(`
218
- `)){let X=Q.replace(/#.*$/,"").trim();if(!X)continue;let z=X.match(/^\s*gem\s+['"]([^'"]+)['"]/i)||X.match(/^\s*gem\s+:([A-Za-z0-9_.-]+)/i);if(z)Z.add(z[1].toLowerCase())}return Z}function YB($){let Z=new Set,Q=!1;for(let X of $.split(`
219
- `)){let z=X.replace(/\r$/,"");if(/^\s*specs:\s*$/.test(z)){Q=!0;continue}if(Q){if(/^[A-Z]/.test(z)||z.startsWith("PLATFORMS")||z.startsWith("DEPENDENCIES")||z.startsWith("BUNDLED")||z.startsWith("RUBY VERSION")||z.startsWith("CHECKSUMS")){Q=!1;continue}let J=z.match(/^\s{2,}([a-zA-Z0-9_.-]+)\s*\(/);if(J)Z.add(J[1].toLowerCase())}}return Z}function BB($){let Z=new Set;for(let Q of $.split(`
220
- `)){let z=Q.replace(/#.*$/,"").match(/add_(?:runtime_|development_)?dependency\s*\(?\s*['"]([^'"]+)['"]/i);if(z)Z.add(z[1].toLowerCase())}return Z}function GB($){let Z=new Set,Q=[];for(let z of["Gemfile","gems.rb"]){let J=n($,z),H=j1(J);if(H){for(let U of qB(H))Z.add(U);Q.push(z)}}let X=j1(n($,"Gemfile.lock"))||j1(n($,"gems.locked"));if(X){for(let z of YB(X))Z.add(z);Q.push("Gemfile.lock")}try{for(let z of r2($)){if(!z.endsWith(".gemspec"))continue;let J=j1(n($,z));if(J){for(let H of BB(J))Z.add(H);Q.push(z)}}}catch{}return{gems:Z,sources:Q}}function g1($,Z){let Q=Z.toLowerCase();if($.has(Q))return!0;return!1}function g8($,Z){let Q;for(let[X,z]of Z){if(!g1($,X))continue;if(!Q||X.length>Q[0].length)Q=[X,z]}return Q}function VB($){let Z;for(let Q of XB)if(g1($,Q)&&(!Z||Q.length>Z.length))Z=Q;return Z}function H4($){for(let Z of JB)if(x1(n($,Z)))return Z;return}function WB($,Z){let Q=g8(Z,J4);if(Q)return{hit:!0,why:Q[0]};try{for(let z of r2($)){if(!z.endsWith(".gemspec"))continue;let J=j1(n($,z));if(J&&/executables\s*=/.test(J)&&!/executables\s*=\s*\[\s*\]/.test(J))return{hit:!0,why:`${z} executables`}}}catch{}let X=n($,"bin");if(x1(X))try{let J=r2(X).filter((H)=>{if(H==="setup"||H==="console"||H==="rake")return!1;try{return QB(n(X,H)).isFile()}catch{return!1}}).filter((H)=>H!=="rails");if(J.length>0&&!g1(Z,"rails")&&!H4($))return{hit:!0,why:`bin/${J[0]}`}}catch{}return{hit:!1,why:""}}function a2($){if(!HB($))return null;let{gems:Z,sources:Q}=GB($),X=Q[0]||"Gemfile",z=Q.some((O)=>O==="Gemfile"||O==="gems.rb"||O.includes("lock"))?"bundler":"rubygems",J=VB(Z),H=g8(Z,zB),U=H4($),q=g1(Z,"rails")||g1(Z,"railties"),Y=WB($,Z),B=x1(n($,"config.ru")),G=q||!!U,V=H&&H[1]!=="Rails"&&!(H[0]==="rack"&&!B)?H:void 0,_,D="",W;if(J)_="mcp",D="MCP",W=`${X} + gem ${J} (Ruby MCP)`;else if(G)if(_="backend",D="Rails",q&&U)W=`${X} + rails + ${U} (Rails)`;else if(q)W=`${X} + gem rails (Rails)`;else W=`${U} (Rails layout)`;else if(V)_="backend",D=V[1],W=`${X} + gem ${V[0]} (Ruby backend)`;else if(Y.hit)_="cli",D=g8(Z,J4)?.[1]||"",W=`${X} + ${Y.why} (Ruby CLI)`;else _="library",W=`${X} (Ruby library)`;return{appType:_,framework:D,packageManager:z,found:W}}import{existsSync as h8,readFileSync as OB,readdirSync as DB,statSync as IB}from"fs";import{join as h1}from"path";var e={version:1,_doc:"SINGLE SOURCE of Swift detection KNOWLEDGE (Truth-is-faf-cli). Kill line: Package.swift alone ≠ app. Static parse of products + package URLs + product names + light xcodeproj productType. Never execute Package.swift / swift build. 2026-08-03 post-intel swift-edition.",mcpPackageUrls:["modelcontextprotocol/swift-sdk","github.com/modelcontextprotocol/swift-sdk"],mcpProducts:["MCP"],serverPackageUrls:[["vapor/vapor","Vapor"],["github.com/vapor/vapor","Vapor"],["hummingbird-project/hummingbird","Hummingbird"],["github.com/hummingbird-project/hummingbird","Hummingbird"]],serverProducts:[["Vapor","Vapor"],["Hummingbird","Hummingbird"]],cliPackageUrls:[["apple/swift-argument-parser","ArgumentParser"],["github.com/apple/swift-argument-parser","ArgumentParser"]],cliProducts:[["ArgumentParser","ArgumentParser"]],appProductTypes:["com.apple.product-type.application"],cliProductTypes:["com.apple.product-type.tool"],vaporLayoutFiles:["Sources/App/configure.swift","Sources/App/routes.swift","Sources/App/entrypoint.swift"]};var KB=e.mcpPackageUrls.map(($)=>$.toLowerCase()),MB=e.mcpProducts.map(($)=>$.toLowerCase()),LB=e.serverPackageUrls.map(([$,Z])=>[$.toLowerCase(),Z]),RB=e.serverProducts.map(([$,Z])=>[$.toLowerCase(),Z]),FB=e.cliPackageUrls.map(([$,Z])=>[$.toLowerCase(),Z]),NB=e.cliProducts.map(([$,Z])=>[$.toLowerCase(),Z]),AB=e.appProductTypes,PB=e.cliProductTypes,TB=e.vaporLayoutFiles;function CB($){return h8(h1($,"Package.swift"))||y8($).length>0}function y8($){try{return DB($).filter((Z)=>{if(!Z.endsWith(".xcodeproj"))return!1;try{return IB(h1($,Z)).isDirectory()}catch{return!1}})}catch{return[]}}function Y4($){try{return OB($,"utf-8")}catch{return null}}function wB($){let Z=bB($),Q=Z.toLowerCase(),X=[],z=/\.package\s*\(\s*url\s*:\s*"([^"]+)"/gi,J;while((J=z.exec(Z))!==null)X.push(J[1]);let H=/\.package\s*\(\s*url\s*:\s*'([^']+)'/gi;while((J=H.exec(Z))!==null)X.push(J[1]);let U=[],q=/\.product\s*\(\s*name\s*:\s*"([^"]+)"/gi;while((J=q.exec(Z))!==null)U.push(J[1]);let Y=/\.product\s*\(\s*name\s*:\s*'([^']+)'/gi;while((J=Y.exec(Z))!==null)U.push(J[1]);let B=/\.library\s*\(/.test(Q),G=/\.executable\s*\(/.test(Q),V=/\.plugin\s*\(/.test(Q)&&!B&&!G?!0:/\bproducts\s*:\s*\[[\s\S]*?\.plugin\s*\(/.test(Q),_=/\.executabletarget\s*\(/.test(Q),D=/\.target\s*\(/.test(Q)&&!_?!0:(Q.match(/\.target\s*\(/g)||[]).length>(Q.match(/\.executabletarget\s*\(/g)||[]).length+(Q.match(/\.testtarget\s*\(/g)||[]).length;return{packageUrls:X,productNames:U,hasLibraryProduct:B,hasExecutableProduct:G,hasPluginProduct:!!V,hasExecutableTarget:_,hasLibraryTarget:D}}function bB($){let Z="",Q=0;while(Q<$.length){if($[Q]==='"'||$[Q]==="'"){let X=$[Q];Z+=X,Q++;while(Q<$.length){if($[Q]==="\\"&&Q+1<$.length){Z+=$[Q]+$[Q+1],Q+=2;continue}if(Z+=$[Q],$[Q]===X){Q++;break}Q++}continue}if($[Q]==="/"&&$[Q+1]==="/"){Q+=2;while(Q<$.length&&$[Q]!==`
221
- `)Q++;continue}if($[Q]==="/"&&$[Q+1]==="*"){Q+=2;while(Q<$.length&&!($[Q]==="*"&&$[Q+1]==="/"))Q++;Q+=2;continue}Z+=$[Q],Q++}return Z}function EB($,Z){let Q=$.map((z)=>z.toLowerCase()),X;for(let z of Z)for(let J of Q)if(J.includes(z)&&(!X||z.length>X.length))X=z;return X}function U4($,Z){let Q=$.map((z)=>z.toLowerCase()),X;for(let[z,J]of Z)for(let H of Q)if(H.includes(z)&&(!X||z.length>X[0].length))X=[z,J];return X}function q4($,Z){let Q=$.map((z)=>z.toLowerCase()),X;for(let[z,J]of Z)if(Q.includes(z)&&(!X||z.length>X[0].length))X=[z,J];return X}function SB($){let Z=$.map((Q)=>Q.toLowerCase());return MB.some((Q)=>Z.includes(Q))}function jB($){let Z=!1,Q=!1,X;for(let z of y8($)){let J=h1($,z,"project.pbxproj"),H=Y4(J);if(!H)continue;for(let U of AB)if(H.includes(U))Z=!0,X=U;for(let U of PB)if(H.includes(U)){if(Q=!0,!X)X=U}}return{hasApplication:Z,hasTool:Q,hit:X}}function xB($){for(let Z of TB)if(h8(h1($,Z)))return Z;return}function y1($){if(!CB($))return null;let Z=h1($,"Package.swift"),Q=h8(Z),X=y8($),z=X.length>0,J=null;if(Q){let S=Y4(Z);if(S)J=wB(S)}let H=z?jB($):{hasApplication:!1,hasTool:!1},U=xB($),q=J?.packageUrls??[],Y=J?.productNames??[],B=EB(q,KB),G=SB(Y),V=U4(q,LB),_=q4(Y,RB),D=U4(q,FB),W=q4(Y,NB),O=!!(B||G),I=!!(V||_||U),R=!!(J?.hasExecutableProduct||J?.hasExecutableTarget),N=!!(D||W),P=H.hasApplication,T=Q&&z?"spm+xcode":Q?"spm":"xcode",A,C="",L;if(O)if(A="mcp",C="MCP",G)L="Package.swift + product MCP (Swift MCP)";else L=`Package.swift + ${B} (Swift MCP)`;else if(I)if(A="backend",C=_?.[1]||V?.[1]||(U?"Vapor":""),_)L=`Package.swift + product ${_[1]} (Swift backend)`;else if(V)L=`Package.swift + ${V[1]} (Swift backend)`;else L=`${U} (Swift backend layout)`;else if(P)A="app",C="",L=`${X[0]} + ${H.hit||"application"} (Swift app)`;else if(N||R&&!I&&!O)if(A="cli",C=W?.[1]||D?.[1]||"",W)L=`Package.swift + product ${W[1]} (Swift CLI)`;else if(D)L=`Package.swift + ${D[1]} (Swift CLI)`;else if(J?.hasExecutableProduct)L="Package.swift + .executable product (Swift CLI)";else L="Package.swift + .executableTarget (Swift CLI)";else if(H.hasTool&&!Q)A="cli",L=`${X[0]} + tool productType (Swift CLI)`;else if(Q)if(A="library",J?.hasLibraryProduct)L="Package.swift + .library product (Swift library)";else L="Package.swift (Swift library)";else A="library",L=`${X[0]||"xcodeproj"} (Swift — no classifying productType)`;return{appType:A,framework:C,packageManager:T,found:L}}var kB=new Set(["node_modules",".git","dist","build","venv",".venv","__pycache__","target","coverage",".next",".svelte-kit","vendor"]),uB=new Set([".py",".ts",".tsx",".js",".jsx",".svelte",".vue",".rb",".go",".rs",".php",".java",".kt",".swift"]),mB={mainLanguage:["project","main_language"],main_language:["project","main_language"],framework:["stack","frontend"],cssFramework:["stack","css_framework"],css:["stack","css_framework"],uiLibrary:["stack","ui_library"],ui_library:["stack","ui_library"],stateManagement:["stack","state_management"],state:["stack","state_management"],backend:["stack","backend"],apiType:["stack","api_type"],api:["stack","api_type"],runtime:["stack","runtime"],database:["stack","database"],db:["stack","database"],connection:["stack","connection"],hosting:["stack","hosting"],buildTool:["stack","build"],build_tool:["stack","build"],build:["stack","build"],packageManager:["stack","package_manager"],pkg_manager:["stack","package_manager"],cicd:["stack","cicd"]},lB=[["packageManager","package-manager"],["pkg_manager","package-manager"],["mainLanguage","language"],["main_language","language"],["framework","framework"],["backend","backend"],["database","database"],["db","database"],["cicd","ci-cd"],["hosting","hosting"],["buildTool","build"],["build_tool","build"],["build","build"],["runtime","runtime"],["cssFramework","css"],["css","css"],["uiLibrary","ui-library"],["stateManagement","state-management"],["apiType","api"],["api","api"]];function pB($,Z){for(let[Q,X]of lB)if(Q in $)return X;return Z.length>0?"framework":"config"}function dB($){try{let Z=JSON.parse(hB($,"utf-8")),Q=["background","content_scripts","action","browser_action","permissions"].some((X)=>(X in Z));if(typeof Z.manifest_version==="number"&&Q)return"chrome";return"other"}catch{return"other"}}function cB($){let Z=[],Q=fB($),X=gB(v8($,".git")),z=new Set;for(let J=0;J<10;J++){let H;try{H=B4(Q)}catch{break}for(let q of H){if(q.toLowerCase().endsWith(".csproj")){let B=i2(Q);if(B){let G={mainLanguage:"C#",packageManager:"NuGet",buildTool:"dotnet"};if(B.appType==="backend"&&B.framework)G.backend=B.framework;else if(B.appType==="cli"&&B.framework)G.framework=B.framework;else if(B.appType==="mcp")G.apiType="MCP";else if(B.appType==="mobile"&&B.framework)G.framework=B.framework;if(B.targetFramework)G.runtime=B.targetFramework;let V=B.framework?[B.framework,"C#",".NET"]:["C#",".NET"];Z.push({slots:G,priority:36,frameworks:V,fileName:q})}continue}if(q.endsWith(".xcodeproj")){let B=y1(Q);if(B){let G={mainLanguage:"Swift",packageManager:B.packageManager==="spm"?"spm":"Xcode",buildTool:B.packageManager.includes("spm")?"swift build":"xcodebuild"};if(B.appType==="backend"&&B.framework)G.backend=B.framework;else if(B.appType==="cli"&&B.framework)G.framework=B.framework;else if(B.appType==="mcp")G.apiType="MCP";else if(B.appType==="app")G.framework=B.framework||"Swift App";let V=B.framework?[B.framework,"Swift"]:["Swift"];Z.push({slots:G,priority:36,frameworks:V,fileName:q})}continue}let Y=b8[q];if(!Y)continue;if(q==="manifest.json"&&dB(v8(Q,q))!=="chrome")continue;if(q==="pubspec.yaml"){let B=m2(Q);if(B){let G={mainLanguage:"Dart",packageManager:"pub"};if(B.isFlutter){if(G.framework="Flutter",B.stateManagement)G.stateManagement=B.stateManagement}else if(B.appType==="backend"&&B.framework)G.backend=B.framework;else if(B.appType==="mcp")G.apiType="MCP";Z.push({slots:G,priority:Y.priority,frameworks:B.isFlutter?["Flutter","Dart"]:["Dart"],fileName:q});continue}}if(q==="go.mod"){let B=d2(Q);if(B){let G={mainLanguage:"Go",packageManager:"go modules",buildTool:"go build"};if(B.appType==="backend"&&B.framework)G.backend=B.framework;else if(B.appType==="cli"&&B.framework)G.framework=B.framework;else if(B.appType==="mcp")G.apiType="MCP";let V=B.framework?[B.framework,"Go"]:["Go"];Z.push({slots:G,priority:Y.priority,frameworks:V,fileName:q});continue}}if(q==="Gemfile"||q==="Gemfile.lock"||q==="gems.rb"){let B=a2(Q);if(B){let G={mainLanguage:"Ruby",packageManager:B.packageManager};if(B.appType==="backend"&&B.framework)G.backend=B.framework;else if(B.appType==="cli"&&B.framework)G.framework=B.framework;else if(B.appType==="mcp")G.apiType="MCP";let V=B.framework?[B.framework,"Ruby"]:["Ruby"];Z.push({slots:G,priority:Y.priority??35,frameworks:V,fileName:q});continue}}if(q==="Package.swift"){let B=y1(Q);if(B){let G={mainLanguage:"Swift",packageManager:B.packageManager==="xcode"?"Xcode":"spm",buildTool:"swift build"};if(B.appType==="backend"&&B.framework)G.backend=B.framework;else if(B.appType==="cli"&&B.framework)G.framework=B.framework;else if(B.appType==="mcp")G.apiType="MCP";else if(B.appType==="app")G.framework=B.framework||"SwiftUI/App";let V=B.framework?[B.framework,"Swift"]:["Swift"];Z.push({slots:G,priority:Y.priority??36,frameworks:V,fileName:q});continue}}if(q==="pom.xml"||q==="build.gradle"||q==="build.gradle.kts"||q==="settings.gradle"||q==="settings.gradle.kts"){if(z.has(Q))continue;z.add(Q);let B=E1(Q);if(B){let G={mainLanguage:B.mainLanguage==="Java/Kotlin"?"Kotlin":B.mainLanguage,packageManager:B.buildTool==="maven"?"maven":"gradle",buildTool:B.buildTool};if(B.appType==="backend"&&B.framework)G.backend=B.framework;else if(B.appType==="cli"&&B.framework)G.framework=B.framework;else if(B.appType==="mcp")G.apiType="MCP";else if(B.appType==="mobile")G.framework=B.framework||"Android";if(B.facets.includes("multiplatform"))G.framework=B.framework||"Kotlin Multiplatform";let V=B.framework?[B.framework,"JVM",B.mainLanguage==="Kotlin"?"Kotlin":"Java"]:["JVM",B.mainLanguage==="Kotlin"?"Kotlin":"Java"];Z.push({slots:G,priority:Y.priority??35,frameworks:V,fileName:q});continue}}Z.push({slots:Y.slots||{},priority:Y.priority,frameworks:Y.frameworks,fileName:q})}if(X&&J===0)break;let U=yB(Q);if(U===Q)break;Q=U}return Z}function iB($){let Z=[];for(let Q of V4($,2,{count:0})){let X=b8[`*${Q}`],z=X?.slots?.mainLanguage;if(z)Z.push({slots:{mainLanguage:z},priority:X.priority,frameworks:X.frameworks})}return Z}function G4($){let Z=[...cB($),...iB($)],Q={},X={},z=new Set;for(let Y of Z){Y.frameworks.forEach((B)=>z.add(B));for(let[B,G]of Object.entries(Y.slots))if(G&&!G.includes("/")&&(!(B in Q)||Y.priority>X[B]))Q[B]=G,X[B]=Y.priority}let J=new Map;for(let Y of Z){if(!Y.fileName)continue;if(!J.has(Y.fileName))J.set(Y.fileName,{fileName:Y.fileName,category:pB(Y.slots,Y.frameworks),priority:Y.priority})}let H=[...J.values()].sort((Y,B)=>B.priority-Y.priority||Y.fileName.localeCompare(B.fileName)),U=[];if(Q.mainLanguage)U.push(Q.mainLanguage.toLowerCase());if(Q.framework)U.push(Q.framework.toLowerCase());let q=U.length>0?U.join("-"):"unknown-stack";return{slotFills:Q,frameworks:[...z],confirmedCount:Z.length,discoveredFormats:H,stackSignature:q}}function f8($){let{slotFills:Z}=G4($),Q={};for(let[X,z]of Object.entries(Z)){let J=mB[X];if(!J||!z)continue;let[H,U]=J;if(H==="project")(Q.project??={})[U]=z;else(Q.stack??={})[U]=z}return Q}function V4($,Z,Q){let X=new Set;if(Z<0||Q.count>400)return X;let z;try{z=B4($,{withFileTypes:!0})}catch{return X}for(let J of z){if(Q.count++>400)break;if(!J.isDirectory()){let H=vB(J.name);if(uB.has(H))X.add(H);continue}if(kB.has(J.name)||J.name.startsWith("."))continue;for(let H of V4(v8($,J.name),Z-1,Q))X.add(H)}return X}import{existsSync as W4,readFileSync as _4}from"fs";import{join as O4}from"path";var f=($,Z,Q)=>({value:$,source:Z,confidence:Q});function D4($,Z={}){let Q=Z.toolingRoot?null:rB($),X=aB($),z={},J=(H,U)=>{if(U)z[H]=U};return J("what",oB(Q,X)),J("who",tB(X)),J("why",eB(X)),J("where",$G(Q,X)),J("when",ZG(X)),J("how",QG(Q,X)),z}function k8($,Z={}){let Q=D4($,Z),X={};return Object.keys(Q).forEach((z)=>{let J=Q[z];if(J)X[z]=J.value}),X}function rB($){let Z=O4($,"package.json");if(!W4(Z))return null;try{return JSON.parse(_4(Z,"utf-8"))}catch{return null}}function aB($){let Z=O4($,"README.md");if(!W4(Z))return"";let Q;try{Q=_4(Z,"utf-8")}catch{return""}return Q.replace(/<!--[\s\S]*?-->/g,"").split(`
213
+ `}function uq($,Z,Q,X="project.faf"){jq(Sq($,"project.html"),b8(Z,Q,X),"utf-8")}var mq=xq(b8,"faf-cli: generateProjectHtml is deprecated, use renderProjectHtml","FAF0001");import{writeFileSync as pq}from"fs";import{join as lq}from"path";import{deprecate as dq}from"node:util";var hZ="application/vnd.faf+yaml",cq="https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json",iq=/^[a-zA-Z0-9.-]+\/[a-zA-Z0-9._-]+$/;function fZ($){let Z=String($.project?.name??"project").trim();if(Z.includes("/")&&iq.test(Z))return Z;let Q=$.project?.homepage??$.project?.website??$.project?.url,X="local";if(Q)try{X=new URL(Q).hostname.replace(/^www\./,"").split(".").reverse().join(".")}catch{}let z=Z.replace(/[^a-zA-Z0-9._-]/g,"-").replace(/^-+|-+$/g,"")||"project";return`${X}/${z}`}function rq($){let Z=String($.project?.goal??$.context??$.project?.name??"MCP server").replace(/\s+/g," ").trim();if(!Z)return"MCP server";return Z.length<=100?Z:`${Z.slice(0,97).trimEnd()}...`}function e0($,Z={}){return{faf:Z.fafPointer??"./project.faf",mediaType:hZ,iana:`https://www.iana.org/assignments/media-types/${hZ}`,deterministic:!0,...Z.scoreEndpoint?{scoreEndpoint:Z.scoreEndpoint}:{},generated:$.generated??Z.now??new Date().toISOString()}}function g2($,Z={}){let Q={$schema:cq,name:fZ($),version:String($.project?.version??"0.1.0"),description:rq($)},X=S8($)??$.project?.name;if(X&&X.length<=100)Q.title=X;let z=$.project?.homepage??$.project?.website??$.project?.url;if(z)Q.websiteUrl=z;if(Z.remoteUrl)Q.remotes=[{type:"streamable-http",url:Z.remoteUrl}];return Q._meta={"one.faf/context":e0($,Z)},Q}var kZ="io.modelcontextprotocol.registry/publisher-provided",vZ=4096;function E8($,Z={}){let Q={"one.faf/context":e0($,Z)},X=new TextEncoder().encode(JSON.stringify(Q)).length;if(X>vZ)throw Error(`publisher-provided _meta is ${X}B — exceeds the registry ${vZ}B cap`);return{[kZ]:Q}}function j8($){return fZ($)}function S8($){let Z=$.project?.title;if(typeof Z==="string"){let Q=Z.trim();if(Q&&Q.length<=100)return Q}return}function nq($,Z,Q={}){let X=g2(Z,Q),z=lq($,"server-card");return pq(z,`${JSON.stringify(X,null,2)}
214
+ `,"utf-8"),z}var aq=dq(g2,"faf-cli: generateServerCard is deprecated, use buildServerCard","FAF0002");import{existsSync as uZ,mkdirSync as DO,readFileSync as sq,writeFileSync as IO}from"fs";import{dirname as oq,join as mZ}from"path";import{deprecate as tq}from"node:util";var pZ="https://faf.one/context",eq="JSONRPC",lZ="1.0",$Y=["a2a","mcp","registry","catalog"];function ZY($){return t(sq($,"utf-8"))}function QY($=process.cwd()){let Z=["agent.fafa",".fafa"];for(let X of Z){let z=mZ($,X);if(uZ(z))return z}let Q=oq($);if(Q!==$)for(let X of Z){let z=mZ(Q,X);if(uZ(z))return z}return null}function XY($){return($.endpoints??[]).filter((Z)=>String(Z.protocol??"").toLowerCase()==="a2a"&&Z.location)}function x8($,Z={}){let Q=XY($);if(Q.length>0)return Q;let X=Z.doorUrl?.trim();if(X)return[{protocol:"a2a",location:X,version:lZ}];return[]}function g8($,Z,Q={}){let X=$.agent??{},z=x8($,Q);if(z.length===0)throw Error("No A2A endpoint in .fafa (need endpoints[].protocol: a2a + location). Will not invent a door.");let J=String(X.displayName??$.metadata?.persona??X.name??"").trim(),H=String(X.description??"").trim(),U=String(X.version??"").trim(),q=String(X.vendor??"").trim(),Y=String(X.homepage??"").trim();if(!J||!H||!U||!q||!Y)throw Error("A2A card needs agent.displayName|name, description, version, vendor, homepage in .fafa");let G=e0(Z,Q),V=($.capabilities??[]).map((B)=>{let _=String(B.name??"").trim();if(!_)throw Error("A2A skill missing capabilities[].name");let D=Array.isArray(B.tags)?B.tags.map(String):[];return{id:_,name:_,description:String(B.description??"").trim()||_,tags:D}});return{name:J,description:H,supportedInterfaces:z.map((B)=>({url:String(B.location),protocolBinding:eq,protocolVersion:String(B.version??lZ)})),provider:{organization:q,url:Y},version:U,capabilities:{streaming:!1,pushNotifications:!1,extendedAgentCard:!1,extensions:[{uri:pZ,description:"FAF context provenance — the durable context block (one context, every door).",required:!1,params:G}]},defaultInputModes:["text/plain","application/json"],defaultOutputModes:["text/plain","application/json"],skills:V}}var zY=tq(g8,"faf-cli: generateA2ACard is deprecated, use buildA2ACard","FAF0003");function JY($){let Z=$.agent?.homepage;if(!Z)return"local";try{return new URL(Z).hostname.replace(/^www\./,"")}catch{return"local"}}function HY($,Z){if(Z.a2aCardUrl)return Z.a2aCardUrl;let Q=$.agent?.homepage;if(Q)try{return new URL("/.well-known/agent-card.json",Q).href}catch{}return"/.well-known/agent-card.json"}function UY($,Z,Q={}){let X=JY($),z=$.agent??{},J=String(z.name??"agent"),H=Q.now??Z.generated??new Date().toISOString(),U=[];if(x8($,Q).length>0)U.push({identifier:`urn:air:${X}:a2a:${J}`,displayName:String(z.displayName??z.name??"A2A Agent Card"),type:"application/a2a-agent-card+json",description:"A2A v1.0 Agent Card. Projected from .fafa.",url:HY($,Q),updatedAt:H});let q=qY($,"fafa");if(q)U.push({identifier:`urn:air:${X}:agent:${J}`,displayName:String(z.displayName??z.name??".fafa"),type:"application/vnd.fafa+yaml",description:"FAF agent passport (.fafa).",url:q,updatedAt:H});return U}function qY($,Z){let Q=$.agent?.homepage;if(!Q)return;try{return new URL(`/.well-known/${Z}`,Q).href}catch{return}}function YY($,Z){let Q=$.findIndex((X)=>X.identifier===Z.identifier);if(Q>=0)return Q;if(Z.type==="application/a2a-agent-card+json"||Z.type==="application/json"||Z.identifier.includes(":a2a:"))return $.findIndex((X)=>X.identifier.includes(":a2a:")||X.type==="application/a2a-agent-card+json"||String(X.url??"").includes("agent-card.json"));if(Z.type==="application/vnd.fafa+yaml")return $.findIndex((X)=>X.type==="application/vnd.fafa+yaml");return-1}function GY($,Z){let Q=$?{...$,entries:[...$.entries??[]]}:{specVersion:"1.0",entries:[]};for(let X of Z){let z=YY(Q.entries,X);if(z>=0)Q.entries[z]={...Q.entries[z],url:X.url,type:X.type,...X.updatedAt?{updatedAt:X.updatedAt}:{}};else Q.entries.push(X)}return Q}function VY($){let Z=$.opts??{},Q=new Set($.targets?.length?$.targets:$Y),z={block:e0($.faf,Z)};if(Q.has("mcp"))z.mcp=g2($.faf,Z);if(Q.has("registry")){let J=S8($.faf);z.registry={name:j8($.faf),...J?{title:J}:{},_meta:E8($.faf,Z)}}if(Q.has("a2a")||Q.has("catalog")){if(!$.fafa){if($.targets?.includes("a2a")||$.targets?.includes("catalog"))throw Error("A2A/catalog require a .fafa (agent.fafa). Will not invent an agent.")}}if(Q.has("a2a")&&$.fafa)if(x8($.fafa,Z).length===0){if($.targets?.includes("a2a"))throw Error("No A2A endpoint in .fafa (need endpoints[].protocol: a2a + location). Will not invent a door.")}else z.a2a=g8($.fafa,$.faf,Z);if(Q.has("catalog")&&$.fafa)z.catalog=UY($.fafa,$.faf,Z);return BY(z),z}function BY($){let Z=JSON.stringify($.block),Q=[];if($.a2a)Q.push(JSON.stringify($.a2a.capabilities.extensions[0].params));if($.mcp){let X=$.mcp._meta;Q.push(JSON.stringify(X["one.faf/context"]))}if($.registry){let X=$.registry._meta["io.modelcontextprotocol.registry/publisher-provided"];Q.push(JSON.stringify(X["one.faf/context"]))}for(let X of Q)if(X!==Z)throw Error("context block drifted across card targets — one projector, one block")}var y8=["ephemeral","standard","high","critical"],N0=Object.fromEntries(y8.map(($,Z)=>[$,Z])),d1=new Set(["user","feedback","project","reference"]),h8=new Set(["version","profile","namepoint","created","last_etched","retention","index","memory"]),v8=new Set(["facts","sessions","preferences","custom"]),f8={low:"ephemeral",medium:"standard"};import{readFileSync as WY,writeFileSync as _Y,existsSync as OY}from"fs";function $2(){return new Date().toISOString().replace(/\.\d{3}Z$/,"Z")}function u($){return $===null||$===void 0}function y2($){if(u($))return"standard";if(f8[$])return f8[$];if($ in N0)return $;return"standard"}var DY=new Set(["text","id","type","priority","tags","links","timestamp","source"]);function dZ($){if(typeof $==="string")return{text:$,id:null,type:null,priority:"standard",tags:[],links:[],timestamp:null,source:null,extra:{}};if(!$||typeof $!=="object"||!("text"in $))throw Error(`fact must be a string or a mapping with 'text': ${JSON.stringify($)}`);let Z=$,Q={};for(let[X,z]of Object.entries(Z))if(!DY.has(X))Q[X]=z;return{text:String(Z.text),id:Z.id??null,type:Z.type??null,priority:y2(Z.priority),tags:Array.isArray(Z.tags)?Z.tags.slice():[],links:Array.isArray(Z.links)?Z.links.slice():[],timestamp:Z.timestamp??null,source:Z.source??null,extra:Q}}function cZ($){if(u($.id)&&u($.type)&&$.tags.length===0&&$.links.length===0&&u($.timestamp)&&u($.source)&&Object.keys($.extra).length===0&&$.priority==="standard")return $.text;let Q={text:$.text};if(!u($.id))Q.id=$.id;if(!u($.type))Q.type=$.type;if(Q.priority=$.priority,$.tags.length)Q.tags=$.tags;if($.links.length)Q.links=$.links;if(!u($.timestamp))Q.timestamp=$.timestamp;if(!u($.source))Q.source=$.source;return Object.assign(Q,$.extra),Q}class g0{namepoint;profile;retention;created;last_etched;_facts;_byId;_index;_sessions;_preferences;_custom;_extra;_memoryExtra;constructor($,Z={}){this.namepoint=$,this.profile=Z.profile??"knowledge",this.retention=Z.retention??"forever",this.created=Z.created??$2(),this.last_etched=this.created,this._facts=Z.facts?Z.facts.slice():[],this._byId=new Map,this._facts.forEach((Q,X)=>{if(!u(Q.id))this._byId.set(Q.id,X)}),this._index=Z.index?Z.index.slice():[],this._sessions=Z.sessions?structuredClone(Z.sessions):[],this._preferences=Z.preferences?{...Z.preferences}:{},this._custom=Z.custom?{...Z.custom}:{},this._extra=Z.extra?{...Z.extra}:{},this._memoryExtra=Z.memoryExtra?{...Z.memoryExtra}:{}}get facts(){return this._facts}get index(){return this._index}get sessions(){return this._sessions}get preferences(){return this._preferences}get custom(){return this._custom}get extra(){return this._extra}get memoryExtra(){return this._memoryExtra}static load($){if(!OY($))throw Error(`soul file not found: ${$}`);let Z=WY($,"utf-8"),Q=t(Z);if(!Q||typeof Q!=="object")throw Error("soul is not a YAML mapping");let X=Q.memory&&typeof Q.memory==="object"?Q.memory:{},z=Array.isArray(X.facts)?X.facts:[],J={};for(let[q,Y]of Object.entries(Q))if(!h8.has(q))J[q]=structuredClone(Y);let H={};for(let[q,Y]of Object.entries(X))if(!v8.has(q))H[q]=structuredClone(Y);let U=new g0(String(Q.namepoint??$.replace(/.*\//,"").replace(/\.fafm$/,"")),{profile:String(Q.profile??"voice"),facts:z.map(dZ),retention:String(Q.retention??"forever"),created:Q.created??null,index:Array.isArray(Q.index)?Q.index.slice():[],sessions:Array.isArray(X.sessions)?structuredClone(X.sessions):[],preferences:X.preferences&&typeof X.preferences==="object"?structuredClone(X.preferences):{},custom:X.custom&&typeof X.custom==="object"?structuredClone(X.custom):{},extra:J,memoryExtra:H});return U.last_etched=String(Q.last_etched??U.created),U}static fromFile($){return g0.load($)}toDoc(){let $={facts:this._facts.map(cZ),sessions:structuredClone(this._sessions),preferences:structuredClone(this._preferences),custom:structuredClone(this._custom)};for(let[Q,X]of Object.entries(this._memoryExtra))if(!v8.has(Q))$[Q]=structuredClone(X);let Z={version:"1.1",profile:this.profile,namepoint:this.namepoint,created:this.created,last_etched:this.last_etched,retention:this.retention,index:this._index.slice(),memory:$};for(let[Q,X]of Object.entries(this._extra))if(!h8.has(Q))Z[Q]=structuredClone(X);return Z}toYaml(){return x2(this.toDoc(),{lineWidth:100})}rebuildIndex($=80){return this._index=this._facts.map((Z)=>`${Z.id??"?"} — ${Z.text.slice(0,$)}`),this._index}save($,Z={}){if(Z.reindex!==!1)this.rebuildIndex();return _Y($,this.toYaml(),"utf-8"),$}toFile($,Z={}){return this.save($,Z)}add($){if(!u($.id)&&this._byId.has($.id)){let Z=this._byId.get($.id);if(Z!==void 0)this._facts[Z]=$}else if(this._facts.push($),!u($.id))this._byId.set($.id,this._facts.length-1);if($.timestamp&&$.timestamp>(this.last_etched||""))this.last_etched=$.timestamp;return $}etch($,Z={}){return this.add({text:$,id:Z.id??null,type:Z.type??null,priority:y2(Z.priority),tags:Z.tags?Z.tags.slice():[],links:Z.links?Z.links.slice():[],timestamp:$2(),source:Z.source??null,extra:{}})}recall($,Z={}){let Q=N0[y2(Z.minPriority??"ephemeral")]??0,X=($??"").toLowerCase(),z=new Set(Z.tags??[]),J=[];this._facts.forEach((U,q)=>{if(X&&!U.text.toLowerCase().includes(X))return;if(z.size>0&&![...z].some((Y)=>U.tags.includes(Y)))return;if(!u(Z.type)&&U.type!==Z.type)return;if((N0[U.priority]??1)<Q)return;J.push([q,U])}),J.sort((U,q)=>{let Y=N0[U[1].priority]??1,G=N0[q[1].priority]??1;if(G!==Y)return G-Y;let V=U[1].timestamp??"",B=q[1].timestamp??"";if(B!==V)return B<V?-1:B>V?1:0;return q[0]-U[0]});let H=J.map(([,U])=>U);if(!u(Z.limit))return H.slice(0,Z.limit);return H}getFact($){let Z=this._byId.get($);return Z===void 0?null:this._facts[Z]}deleteFact($){let Z=this._byId.get($);if(Z===void 0)return!1;return this._facts.splice(Z,1),this._byId.clear(),this._facts.forEach((Q,X)=>{if(!u(Q.id))this._byId.set(Q.id,X)}),!0}}import{readdirSync as IY,readFileSync as KY,statSync as iZ,existsSync as LY}from"fs";import{join as RY,basename as rZ,resolve as MY}from"path";var nZ=new Set(["MEMORY.md","MEMORY-FULL.md","README.md"]),FY=/\[\[([^\]]+)\]\]/g;function NY($){let Z=iZ($).mtimeMs;return new Date(Z).toISOString().replace(/\.\d{3}Z$/,"Z")}function PY($){if(!$.startsWith("---"))return{fm:null,body:$};let Z=$.split("---");if(Z.length<3)return{fm:null,body:$};try{let Q=t(Z[1]);if(!Q||typeof Q!=="object")return{fm:null,body:Z.slice(2).join("---").trim()};return{fm:Q,body:Z.slice(2).join("---").trim()}}catch{return{fm:null,body:$}}}function AY($,Z,Q){if(!Q.name)return null;let X=Q.metadata&&typeof Q.metadata==="object"?Q.metadata:{},z=X.type;if(typeof z!=="string"||!d1.has(z))return null;let J=String(Q.name).trim(),U=(Q.description!==void 0&&Q.description!==null&&String(Q.description).trim()?String(Q.description).trim():"")||J,q={};if(X.originSessionId)q.provenance=[`session:${X.originSessionId}`];let Y=[...new Set([...Z.matchAll(FY)].map((G)=>G[1]))].sort();return{text:U,id:J,type:z,priority:"standard",tags:[],links:Y,timestamp:NY($),source:`claude-code memory: ${rZ($)}`,extra:q}}function aZ($,Z={}){let Q=MY($);if(!LY(Q))throw Error(`Claude memory directory not found: ${Q}`);if(!iZ(Q).isDirectory())throw Error(`Claude memory path is not a directory: ${Q}`);let X=Z.skip??nZ,z=Z.namepoint??`@claude-code:${rZ(Q)}`,J=[],H=IY(Q).filter((V)=>V.endsWith(".md")).sort();for(let V of H){if(X.has(V))continue;let B=RY(Q,V),_;try{_=KY(B,"utf-8")}catch{continue}let{fm:D,body:W}=PY(_);if(!D)continue;let O=AY(B,W,D);if(O)J.push(O)}let U=J.map((V)=>V.timestamp).filter(Boolean),q=U.length?U.reduce((V,B)=>V<B?V:B):$2(),Y=U.length?U.reduce((V,B)=>V>B?V:B):q,G=new g0(z,{profile:"knowledge",facts:J,created:q});return G.last_etched=Y,G.rebuildIndex(),G}var $5="faf-interview/1",Z2="(terse — 3-4 words)",k8=[{path:"project.name",question:"What is the name of this project?",header:"Name",type:"text",required:!0},{path:"project.goal",question:"What does this project do? (one sentence)",header:"Goal",type:"text",required:!0},{path:"human_context.who",question:`Who is this for? ${Z2}`,header:"Who",type:"text",required:!0},{path:"human_context.what",question:`What are they building? ${Z2}`,header:"What",type:"text",required:!0},{path:"human_context.why",question:`Why does it exist? ${Z2}`,header:"Why",type:"text",required:!0},{path:"human_context.where",question:`Where does it run or ship? ${Z2}`,header:"Where",type:"text",required:!0},{path:"human_context.when",question:`When — timeline or stage? ${Z2}`,header:"When",type:"text",required:!0},{path:"human_context.how",question:`How is it built or used? ${Z2}`,header:"How",type:"text",required:!0}],Z5=[{path:"project.main_language",question:"What is the primary programming language?",header:"Language",type:"select",required:!0,options:[{label:"TypeScript",value:"TypeScript",description:"JavaScript with types"},{label:"JavaScript",value:"JavaScript",description:"Vanilla JS or Node.js"},{label:"Python",value:"Python",description:"Python 3.x"},{label:"Rust",value:"Rust",description:"Systems programming"},{label:"Go",value:"Go",description:"Golang"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.frontend",question:"What frontend framework does it use?",header:"Frontend",type:"select",required:!1,options:[{label:"React",value:"React",description:"React.js"},{label:"Vue",value:"Vue",description:"Vue.js"},{label:"Svelte",value:"Svelte",description:"Svelte/SvelteKit"},{label:"Next.js",value:"Next.js",description:"React framework"},{label:"None",value:"None",description:"No frontend"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.backend",question:"What backend framework does it use?",header:"Backend",type:"select",required:!1,options:[{label:"Express",value:"Express",description:"Node.js Express"},{label:"Fastify",value:"Fastify",description:"Node.js Fastify"},{label:"Django",value:"Django",description:"Python Django"},{label:"FastAPI",value:"FastAPI",description:"Python FastAPI"},{label:"None",value:"None",description:"No backend"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.database",question:"What database does it use?",header:"Database",type:"select",required:!1,options:[{label:"PostgreSQL",value:"PostgreSQL",description:"Postgres"},{label:"MySQL",value:"MySQL",description:"MySQL/MariaDB"},{label:"SQLite",value:"SQLite",description:"Embedded SQL"},{label:"MongoDB",value:"MongoDB",description:"Document store"},{label:"None",value:"None",description:"No database"},{label:"Other",value:"Other",description:"Specify manually"}]},{path:"stack.runtime",question:"What runtime does it run on?",header:"Runtime",type:"text",required:!1},{path:"stack.hosting",question:"Where is it hosted or distributed?",header:"Hosting",type:"text",required:!1},{path:"stack.build",question:"What is the build tool?",header:"Build",type:"text",required:!1},{path:"stack.cicd",question:"What CI/CD does it use?",header:"CI/CD",type:"text",required:!1}],Q2=[...k8,...Z5],Q5=new Map(Q2.map(($)=>[$.path,$])),TY=Object.fromEntries(Q2.map(($)=>[$.path,$]));function u8($){let Z=Q5.get($);if(Z)return Z.question;let Q=A0.get($)??f.find((X)=>X.canonical===$);return Q?`${Q.description}?`.replace(/\?\?$/,"?"):`${$}?`}function wY($,Z){return Q2.filter((Q)=>{let X=Q.path.split("."),z=$;for(let J of X)if(z&&typeof z==="object"&&J in z)z=z[J];else{z=void 0;break}if(z==="slotignored")return!1;return Z(z)})}var CY=new Set(["developers","development teams","development team","teams","development","cloud platform","web platform","platform","best practices","improve development efficiency","development efficiency","modern development practices","modern development","test-driven development","production/stable","production","stable","app","project","tool"]),bY=[["npm",/\bnpm\b/i],["PyPI",/\bpypi\b/i],["crates.io",/\bcrates\.io\b/i],["Homebrew",/\bhomebrew\b/i],["Docker",/\bdocker\b/i],["Cloudflare",/\bcloudflare\b/i],["Vercel",/\bvercel\b/i],["Netlify",/\bnetlify\b/i],["AWS",/\baws\b/i],["Cloud Run",/\bcloud run\b/i],["edge",/\bedge\b/i],["browser",/\bbrowser\b/i],["WASM",/\bwasm\b/i],["GitHub",/\bgithub\b/i],["MCP Registry",/\bmcp registry\b/i],["Chrome Web Store",/\bchrome web store\b/i],["Smithery",/\bsmithery\b/i]],sZ=($)=>CY.has($.toLowerCase().trim()),EY=/^(?:with|and|or|using|for|to|that|who|whom|whose|the|a|an|in|on|of|via|by|&)$/i;function oZ($,Z=5){let Q=$.trim().split(/\s+/).filter(Boolean).slice(0,Z);while(Q.length&&EY.test(Q[Q.length-1].replace(/[.,;:]+$/,"")))Q.pop();return Q.join(" ")}function X5($){let Z={};if(!$||typeof $!=="string")return Z;let Q=$.trim(),X=Q.replace(/^[^A-Za-z0-9]+/,"").split(/\s+(?:for|that|which|to)\s+|\s+[—–]\s+|\s-\s|:\s|\.\s|,\s/)[0].trim(),z=oZ(X);if(z.split(/\s+/).filter(Boolean).length>=2&&!sZ(z))Z.what=z;let J=bY.filter(([,q])=>q.test(Q)).map(([q])=>q);if(J.length)Z.where=J.slice(0,4).join(", ");let H=Q.match(/\bfor ((?:[A-Za-z][\w./+-]* )?(?:any |all )?(?:developers?|teams?|engineers?|builders?|users?|integrators?)\b[^.,;:—]*)/i),U=oZ((H?.[1]||"").trim().replace(/\s+/g," "));if(U&&!sZ(U))Z.who=U;return Z}function tZ($,Z){let Q=$;for(let X of Z.split("."))if(Q&&typeof Q==="object"&&X in Q)Q=Q[X];else return;return Q}function eZ($){if(typeof $!=="string")return!1;let Z=$.trim();if(!Z||Z==="slotignored")return!1;return!T0(Z)}function jY($,Z={}){let Q=$&&typeof $==="object"?$:{},X=tZ(Q,"project.goal"),z=(eZ(X)?String(X).trim():"")||(Z.goal??"").trim(),J=X5(z),H=Z.detailed??{},U={"project.goal":z||void 0,"human_context.what":J.what,"human_context.where":J.where,"human_context.who":J.who},q=(_)=>{let D=U[_];if(D)return{value:D,source:"project goal",confidence:0.9};let W=_.startsWith("human_context.")?_.slice(14):"",O=W?H[W]:void 0;return O?{value:O.value,source:O.source,confidence:O.confidence}:void 0},Y=k8.map((_,D)=>{let W={n:D+1,path:_.path,header:_.header,question:_.question},O=tZ(Q,_.path);if(eZ(O))return{...W,value:String(O).trim(),status:"filled",seeded:!1};let I=q(_.path);if(I)return{...W,value:I.value,status:"seeded",seeded:!0,source:I.source,confidence:I.confidence};return{...W,value:"",status:"empty",seeded:!1}}),G=Y.filter((_)=>_.status==="filled").length,V=Y.filter((_)=>_.status==="seeded").length,B=Y.filter((_)=>_.status==="empty").length;return{version:$5,rows:Y,filledCount:G,seededCount:V,emptyCount:B,complete:B===0}}function c1($){if($===null||$===void 0)return!0;if(typeof $==="string"){let Z=$.trim();return Z===""||T0(Z)}return!1}function SY($,Z){let Q=$;for(let X of Z.split("."))if(Q&&typeof Q==="object"&&X in Q)Q=Q[X];else return;return Q}function z5($){if($==="project.goal")return!0;return A0.get($)?.category==="human"}function J5($,Z=c1){let Q=[],X=[];for(let z of Q2){let J=SY($,z.path);if(J==="slotignored")continue;if(!Z(J))continue;(z5(z.path)?Q:X).push(z.path)}return{human:Q,sourceable:X}}function H5($,Z,Q=c1){let X=J5(Z,Q),z;if($>=100||X.human.length===0&&X.sourceable.length===0)z="done";else if(X.sourceable.length>0)z="can-source";else z="needs-human";let J=z==="needs-human"?m8(X):[];return{status:z,score:$,gaps:X,ask:J}}function m8($){return $.human.map((Z)=>({path:Z,question:u8(Z)}))}function xY($,Z={}){let Q=Math.max(1,Z.maxRounds??5),X=Z.isEmpty??c1,z=[],J=0;for(let U=0;U<=Q;U++){let q=$.read();if(!q)return{status:"no-faf",score:0,rounds:J,history:z,ask:[]};let Y=$.score(q.yaml);z.push(Y);let G=H5(Y,q.data,X);if(G.status==="done")return{status:"done",score:Y,rounds:J,history:z,ask:[]};if(G.status==="needs-human")return{status:"needs-human",score:Y,rounds:J,history:z,ask:G.ask};if(z.length>=2&&Y<=z[z.length-2])return G.gaps.human.length?{status:"needs-human",score:Y,rounds:J,history:z,ask:m8(G.gaps)}:{status:"stuck",score:Y,rounds:J,history:z,ask:[]};if(J>=Q)return{status:"capped",score:Y,rounds:J,history:z,ask:m8(G.gaps)};$.runAuto(),J++}return{status:"capped",score:z[z.length-1]??0,rounds:J,history:z,ask:[]}}import{createHash as q5}from"crypto";var p8="faf-bench/1",gY={"project.name":"What is the project's name?","project.goal":"What is the project's goal — what is it for?","project.main_language":"What is the primary programming language?","human_context.who":"Who is this project for?","human_context.what":"What are they building?","human_context.why":"Why does this project exist?","human_context.where":"Where does it run or get distributed?","human_context.when":"When — what is the project's timeline or stage?","human_context.how":"How is it built or used?"};function yY($,Z){return gY[$]??`What is the project's ${Z.replace(/\s*\(.*\)$/,"").toLowerCase()}?`}var Y5=[["typescript","ts"],["javascript","js"],["python","py","python3"],["node","nodejs","node js","node.js"],["github actions","gh actions","actions"],["postgresql","postgres","pg"],["kubernetes","k8s"],["npm","npm registry"],["cloudflare workers","cf workers","workers"],["google cloud run","cloud run","gcp cloud run"]],h2=new Map;Y5.forEach(($,Z)=>$.forEach((Q)=>h2.set(Q,Z)));var hY=new Set(["a","an","the","and","or","of","for","to","in","on","with","is","it","its","their","your","via","by","using","use","used"]);function i1($){return $.toLowerCase().replace(/[^a-z0-9\s.+#-]/g," ").replace(/\.(?=\s|$)/g," ").replace(/\s+/g," ").trim()}function U5($){return i1($).split(" ").filter((Z)=>Z&&!hY.has(Z))}function G5($,Z){let Q=i1($),X=i1(Z);if(!Q||!X)return!1;if(Q===X)return!0;let z=h2.get(Q);if(z!==void 0&&h2.get(X)===z)return!0;let J=U5($);if(J.length===0)return!1;let H=new Set(U5(Z));return J.every((U)=>{if(H.has(U))return!0;let q=h2.get(U);return q!==void 0&&[...H].some((Y)=>h2.get(Y)===q)})}function vY($){let Z=I$($),Q=t($),X=[],z={},J=0;for(let q of f){if(Z.slots[q.path]!=="populated")continue;let Y=B6(Q,q);if(typeof Y!=="string")continue;let G=Y.trim();if(!G||o2.has(G.toLowerCase()))continue;J+=1,X.push({n:J,path:q.path,question:yY(q.path,q.description)}),z[J]=G}let H=JSON.stringify({v:p8,q:X.map((q)=>[q.path,q.question])}),U=q5("sha256").update(H).digest("hex").slice(0,12);return{version:p8,qsetHash:U,questions:X,answers:z}}function fY($){return{version:$.version,qsetHash:$.qsetHash,questions:$.questions}}function kY($,Z){let Q=$.questions.map((z)=>{let J=Z[String(z.n)]??Z[z.path]??"";return{n:z.n,path:z.path,ok:typeof J==="string"&&J.trim()!==""&&G5($.answers[z.n],J)}}),X=$.questions.filter((z)=>!Q[z.n-1].ok);return{correct:Q.filter((z)=>z.ok).length,total:$.questions.length,misses:X,perQuestion:Q}}function uY($,Z){let Q=JSON.stringify({v:$.version,repo:Z??null,qset:$.qsetHash,protocol:$.protocol,cold:$.cold??null,faf:$.faf??null});return{projection:Q,hash:q5("sha256").update(Q).digest("hex")}}import{existsSync as NV,readdirSync as w5,readFileSync as PV}from"fs";import{join as o8,dirname as AV,extname as TV,resolve as wV}from"path";var l8={"package.json":{frameworks:["Node.js","JavaScript","TypeScript"],slots:{packageManager:"npm/yarn/pnpm",mainLanguage:"JavaScript/TypeScript"},priority:35,intelligence:"ultra-high"},"README.md":{frameworks:[],slots:{targetUser:"developers",coreProblem:"understanding project",missionPurpose:"project documentation"},priority:25,intelligence:"high"},"requirements.txt":{frameworks:["Python"],slots:{packageManager:"pip",mainLanguage:"Python"},priority:35,intelligence:"ultra-high"},Pipfile:{frameworks:["Python"],slots:{packageManager:"pipenv",mainLanguage:"Python"},priority:35,intelligence:"ultra-high"},"pyproject.toml":{frameworks:["Python"],slots:{mainLanguage:"Python",runtime:"Python",backend:"Python"},priority:36,intelligence:"ultra-high"},Gemfile:{frameworks:["Ruby"],slots:{packageManager:"bundler",mainLanguage:"Ruby"},priority:35,intelligence:"ultra-high"},"Gemfile.lock":{frameworks:["Ruby"],slots:{packageManager:"bundler",mainLanguage:"Ruby"},priority:34,intelligence:"high"},"composer.json":{frameworks:["PHP","Laravel","Symfony"],slots:{packageManager:"composer",mainLanguage:"PHP"},priority:35,intelligence:"ultra-high"},"Cargo.toml":{frameworks:["Rust"],slots:{packageManager:"cargo",mainLanguage:"Rust",buildTool:"cargo"},priority:36,intelligence:"ultra-high"},"go.mod":{frameworks:["Go"],slots:{packageManager:"go modules",mainLanguage:"Go",buildTool:"go build"},priority:36,intelligence:"ultra-high"},"Package.swift":{frameworks:["Swift"],slots:{packageManager:"spm",mainLanguage:"Swift",buildTool:"swift build"},priority:36,intelligence:"ultra-high"},"*.csproj":{frameworks:["C#",".NET"],slots:{packageManager:"NuGet",mainLanguage:"C#",buildTool:"dotnet"},priority:36,intelligence:"ultra-high"},"pubspec.yaml":{frameworks:["Dart"],slots:{packageManager:"pub",mainLanguage:"Dart"},priority:35,intelligence:"ultra-high"},"pom.xml":{frameworks:["Java"],slots:{packageManager:"maven",mainLanguage:"Java",buildTool:"maven"},priority:35,intelligence:"ultra-high"},"build.gradle":{frameworks:["Java","Gradle"],slots:{packageManager:"gradle",mainLanguage:"Java",buildTool:"gradle"},priority:35,intelligence:"ultra-high"},"settings.gradle":{frameworks:["Java","Gradle"],slots:{packageManager:"gradle",mainLanguage:"Java",buildTool:"gradle"},priority:34,intelligence:"high"},"settings.gradle.kts":{frameworks:["Kotlin","Gradle"],slots:{packageManager:"gradle",mainLanguage:"Kotlin",buildTool:"gradle"},priority:34,intelligence:"high"},"next.config.js":{frameworks:["Next.js"],slots:{framework:"Next.js",runtime:"Node.js",buildTool:"Next.js",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"next.config.mjs":{frameworks:["Next.js"],slots:{framework:"Next.js",runtime:"Node.js",buildTool:"Next.js",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"next.config.ts":{frameworks:["Next.js 13+"],slots:{framework:"Next.js 13+",runtime:"Node.js",buildTool:"Next.js",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"nuxt.config.js":{frameworks:["Nuxt 2"],slots:{framework:"Nuxt 2",runtime:"Node.js",buildTool:"Nuxt",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"nuxt.config.ts":{frameworks:["Nuxt 3"],slots:{framework:"Nuxt 3",runtime:"Node.js",buildTool:"Nuxt",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"svelte.config.js":{frameworks:["SvelteKit"],slots:{framework:"SvelteKit",buildTool:"Vite",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"angular.json":{frameworks:["Angular"],slots:{framework:"Angular",buildTool:"Angular CLI",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"manifest.json":{frameworks:["Chrome Extension","Browser Extension"],slots:{framework:"Chrome Extension",runtime:"Chrome/Browser",mainLanguage:"JavaScript",hosting:"Chrome Web Store",apiType:"Chrome APIs"},priority:35,intelligence:"ultra-high",confirmWith:["popup.html","background.js","content.js"]},"vue.config.js":{frameworks:["Vue"],slots:{framework:"Vue",buildTool:"Vue CLI",mainLanguage:"JavaScript"},priority:30,intelligence:"high"},"remix.config.js":{frameworks:["Remix"],slots:{framework:"Remix",runtime:"Node.js",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"gatsby-config.js":{frameworks:["Gatsby"],slots:{framework:"Gatsby",buildTool:"Gatsby",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"gatsby-config.ts":{frameworks:["Gatsby"],slots:{framework:"Gatsby",buildTool:"Gatsby",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"astro.config.mjs":{frameworks:["Astro"],slots:{framework:"Astro",buildTool:"Vite",mainLanguage:"JavaScript",server:"Node.js"},priority:30,intelligence:"high"},"redwood.toml":{frameworks:["RedwoodJS"],slots:{framework:"RedwoodJS",buildTool:"Webpack",mainLanguage:"JavaScript/TypeScript",server:"Node.js",database:"Prisma"},priority:30,intelligence:"high"},"blitz.config.ts":{frameworks:["Blitz.js"],slots:{framework:"Blitz.js",buildTool:"Next.js",mainLanguage:"TypeScript",server:"Node.js",database:"Prisma"},priority:30,intelligence:"high"},"qwik.config.ts":{frameworks:["Qwik"],slots:{framework:"Qwik",buildTool:"Vite",mainLanguage:"TypeScript",server:"Node.js"},priority:30,intelligence:"high"},"manage.py":{frameworks:["Django"],slots:{framework:"Django",backend:"Django",mainLanguage:"Python",server:"Django",apiType:"Django Views"},priority:30,intelligence:"high"},artisan:{frameworks:["Laravel"],slots:{framework:"Laravel",backend:"Laravel",mainLanguage:"PHP",server:"PHP",apiType:"Laravel Routes"},priority:30,intelligence:"high"},"mix.exs":{frameworks:["Phoenix","Elixir"],slots:{framework:"Phoenix",backend:"Phoenix",mainLanguage:"Elixir",server:"BEAM"},priority:30,intelligence:"high"},"nest-cli.json":{frameworks:["NestJS"],slots:{framework:"NestJS",backend:"NestJS",mainLanguage:"TypeScript",server:"Node.js",apiType:"REST API"},priority:30,intelligence:"high"},"strapi.config.js":{frameworks:["Strapi"],slots:{backend:"Strapi",apiType:"REST API",database:"Required",server:"Node.js"},priority:30,intelligence:"high"},Dockerfile:{frameworks:["Docker"],slots:{hosting:"Docker",connection:"Containerized"},priority:30,intelligence:"high"},"docker-compose.yml":{frameworks:["Docker Compose"],slots:{hosting:"Docker",connection:"Multi-container"},priority:30,intelligence:"high"},"docker-compose.yaml":{frameworks:["Docker Compose"],slots:{hosting:"Docker",connection:"Multi-container"},priority:30,intelligence:"high"},"kubernetes.yml":{frameworks:["Kubernetes"],slots:{hosting:"Kubernetes",connection:"Orchestrated"},priority:30,intelligence:"high"},"k8s.yaml":{frameworks:["Kubernetes"],slots:{hosting:"Kubernetes",connection:"Orchestrated"},priority:30,intelligence:"high"},"vercel.json":{frameworks:["Vercel"],slots:{hosting:"Vercel",cicd:"Vercel"},priority:30,intelligence:"high"},"netlify.toml":{frameworks:["Netlify"],slots:{hosting:"Netlify",cicd:"Netlify"},priority:30,intelligence:"high"},"render.yaml":{frameworks:["Render"],slots:{hosting:"Render",cicd:"Render"},priority:30,intelligence:"high"},"fly.toml":{frameworks:["Fly.io"],slots:{hosting:"Fly.io",cicd:"Fly.io"},priority:30,intelligence:"high"},"railway.json":{frameworks:["Railway"],slots:{hosting:"Railway",cicd:"Railway"},priority:30,intelligence:"high"},"railway.toml":{frameworks:["Railway"],slots:{hosting:"Railway",cicd:"Railway"},priority:30,intelligence:"high"},"app.yaml":{frameworks:["Google App Engine"],slots:{hosting:"Google Cloud",cicd:"Google Cloud"},priority:30,intelligence:"high"},Procfile:{frameworks:["Heroku"],slots:{hosting:"Heroku",cicd:"Heroku"},priority:30,intelligence:"high"},"vite.config.js":{frameworks:["Vite"],slots:{buildTool:"Vite"},priority:25,intelligence:"medium"},"vite.config.ts":{frameworks:["Vite"],slots:{buildTool:"Vite",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"webpack.config.js":{frameworks:["Webpack"],slots:{buildTool:"Webpack"},priority:25,intelligence:"medium"},"rollup.config.js":{frameworks:["Rollup"],slots:{buildTool:"Rollup"},priority:25,intelligence:"medium"},"esbuild.config.js":{frameworks:["esbuild"],slots:{buildTool:"esbuild"},priority:25,intelligence:"medium"},"parcel.config.js":{frameworks:["Parcel"],slots:{buildTool:"Parcel"},priority:25,intelligence:"medium"},"snowpack.config.js":{frameworks:["Snowpack"],slots:{buildTool:"Snowpack"},priority:25,intelligence:"medium"},"tsconfig.json":{frameworks:["TypeScript"],slots:{mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"jsconfig.json":{frameworks:["JavaScript"],slots:{mainLanguage:"JavaScript"},priority:20,intelligence:"medium"},"babel.config.js":{frameworks:["Babel"],slots:{buildTool:"Babel"},priority:20,intelligence:"medium"},".babelrc":{frameworks:["Babel"],slots:{buildTool:"Babel"},priority:20,intelligence:"medium"},"jest.config.js":{frameworks:["Jest"],slots:{cicd:"Jest"},priority:25,intelligence:"medium"},"jest.config.ts":{frameworks:["Jest"],slots:{cicd:"Jest",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"vitest.config.ts":{frameworks:["Vitest"],slots:{cicd:"Vitest",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"cypress.config.js":{frameworks:["Cypress"],slots:{cicd:"Cypress"},priority:25,intelligence:"medium"},"playwright.config.ts":{frameworks:["Playwright"],slots:{cicd:"Playwright",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"karma.conf.js":{frameworks:["Karma"],slots:{cicd:"Karma"},priority:20,intelligence:"medium"},"mocha.opts":{frameworks:["Mocha"],slots:{cicd:"Mocha"},priority:20,intelligence:"medium"},".rspec":{frameworks:["RSpec"],slots:{cicd:"RSpec",mainLanguage:"Ruby"},priority:25,intelligence:"medium"},"pytest.ini":{frameworks:["Pytest"],slots:{cicd:"Pytest",mainLanguage:"Python"},priority:25,intelligence:"medium"},"phpunit.xml":{frameworks:["PHPUnit"],slots:{cicd:"PHPUnit",mainLanguage:"PHP"},priority:25,intelligence:"medium"},"schema.prisma":{frameworks:["Prisma"],slots:{database:"Prisma ORM",connection:"Prisma"},priority:25,intelligence:"medium"},"drizzle.config.ts":{frameworks:["Drizzle"],slots:{database:"Drizzle ORM",connection:"Drizzle",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"ormconfig.js":{frameworks:["TypeORM"],slots:{database:"TypeORM",connection:"TypeORM"},priority:25,intelligence:"medium"},"knexfile.js":{frameworks:["Knex.js"],slots:{database:"Knex.js",connection:"Knex.js"},priority:25,intelligence:"medium"},"sequelize.config.js":{frameworks:["Sequelize"],slots:{database:"Sequelize",connection:"Sequelize"},priority:25,intelligence:"medium"},"alembic.ini":{frameworks:["Alembic"],slots:{database:"Alembic",mainLanguage:"Python"},priority:25,intelligence:"medium"},".github/workflows":{frameworks:["GitHub Actions"],slots:{cicd:"GitHub Actions"},priority:25,intelligence:"medium"},".gitlab-ci.yml":{frameworks:["GitLab CI"],slots:{cicd:"GitLab CI"},priority:25,intelligence:"medium"},Jenkinsfile:{frameworks:["Jenkins"],slots:{cicd:"Jenkins"},priority:25,intelligence:"medium"},".circleci/config.yml":{frameworks:["CircleCI"],slots:{cicd:"CircleCI"},priority:25,intelligence:"medium"},".travis.yml":{frameworks:["Travis CI"],slots:{cicd:"Travis CI"},priority:25,intelligence:"medium"},"azure-pipelines.yml":{frameworks:["Azure DevOps"],slots:{cicd:"Azure DevOps"},priority:25,intelligence:"medium"},"bitbucket-pipelines.yml":{frameworks:["Bitbucket Pipelines"],slots:{cicd:"Bitbucket Pipelines"},priority:25,intelligence:"medium"},"tailwind.config.js":{frameworks:["Tailwind CSS"],slots:{cssFramework:"Tailwind CSS"},priority:20,intelligence:"medium"},"tailwind.config.ts":{frameworks:["Tailwind CSS"],slots:{cssFramework:"Tailwind CSS",mainLanguage:"TypeScript"},priority:20,intelligence:"medium"},"postcss.config.js":{frameworks:["PostCSS"],slots:{cssFramework:"PostCSS"},priority:20,intelligence:"medium"},"uno.config.ts":{frameworks:["UnoCSS"],slots:{cssFramework:"UnoCSS",mainLanguage:"TypeScript"},priority:20,intelligence:"medium"},"styled-components.config.js":{frameworks:["styled-components"],slots:{cssFramework:"styled-components",uiLibrary:"styled-components"},priority:20,intelligence:"medium"},"emotion.config.js":{frameworks:["Emotion"],slots:{cssFramework:"Emotion",uiLibrary:"Emotion"},priority:20,intelligence:"medium"},"metro.config.js":{frameworks:["React Native"],slots:{framework:"React Native",mainLanguage:"JavaScript"},priority:25,intelligence:"medium"},"expo.config.js":{frameworks:["Expo"],slots:{framework:"React Native",buildTool:"Expo"},priority:25,intelligence:"medium"},"app.json":{frameworks:["React Native","Expo"],slots:{framework:"React Native"},priority:20,intelligence:"medium",confirmWith:["expo"]},"capacitor.config.ts":{frameworks:["Capacitor"],slots:{framework:"Capacitor",mainLanguage:"TypeScript"},priority:25,intelligence:"medium"},"ionic.config.json":{frameworks:["Ionic"],slots:{framework:"Ionic",uiLibrary:"Ionic"},priority:25,intelligence:"medium"},"nx.json":{frameworks:["Nx"],slots:{buildTool:"Nx"},priority:25,intelligence:"medium"},"turbo.json":{frameworks:["Turborepo"],slots:{buildTool:"Turborepo"},priority:25,intelligence:"medium"},"lerna.json":{frameworks:["Lerna"],slots:{buildTool:"Lerna"},priority:25,intelligence:"medium"},"rush.json":{frameworks:["Rush"],slots:{buildTool:"Rush"},priority:25,intelligence:"medium"},"pnpm-workspace.yaml":{frameworks:["pnpm workspaces"],slots:{packageManager:"pnpm",buildTool:"pnpm workspaces"},priority:25,intelligence:"medium"},"*.svelte":{frameworks:["Svelte","SvelteKit"],slots:{framework:"Svelte"},priority:15,intelligence:"low"},"*.vue":{frameworks:["Vue"],slots:{framework:"Vue"},priority:15,intelligence:"low"},"*.jsx":{frameworks:["React"],slots:{framework:"React",mainLanguage:"JavaScript"},priority:15,intelligence:"low"},"*.ts":{frameworks:["TypeScript"],slots:{mainLanguage:"TypeScript"},priority:15,intelligence:"low"},"*.tsx":{frameworks:["React","TypeScript"],slots:{framework:"React",mainLanguage:"TypeScript"},priority:15,intelligence:"low"},"*.py":{frameworks:["Python"],slots:{mainLanguage:"Python"},priority:15,intelligence:"low"},"*.rb":{frameworks:["Ruby"],slots:{mainLanguage:"Ruby"},priority:15,intelligence:"low"},"*.php":{frameworks:["PHP"],slots:{mainLanguage:"PHP"},priority:15,intelligence:"low"},"*.java":{frameworks:["Java"],slots:{mainLanguage:"Java"},priority:15,intelligence:"low"},"*.kt":{frameworks:["Kotlin"],slots:{mainLanguage:"Kotlin"},priority:15,intelligence:"low"},"*.swift":{frameworks:["Swift"],slots:{mainLanguage:"Swift"},priority:15,intelligence:"low"},"*.go":{frameworks:["Go"],slots:{mainLanguage:"Go"},priority:15,intelligence:"low"},"*.rs":{frameworks:["Rust"],slots:{mainLanguage:"Rust"},priority:15,intelligence:"low"},"*.dart":{frameworks:["Flutter","Dart"],slots:{mainLanguage:"Dart"},priority:15,intelligence:"low"},"*.ex":{frameworks:["Elixir"],slots:{mainLanguage:"Elixir"},priority:15,intelligence:"low"},"*.exs":{frameworks:["Elixir"],slots:{mainLanguage:"Elixir"},priority:15,intelligence:"low"},"*.scala":{frameworks:["Scala"],slots:{mainLanguage:"Scala"},priority:15,intelligence:"low"},"*.clj":{frameworks:["Clojure"],slots:{mainLanguage:"Clojure"},priority:15,intelligence:"low"},"*.lua":{frameworks:["Lua"],slots:{mainLanguage:"Lua"},priority:15,intelligence:"low"},"*.r":{frameworks:["R"],slots:{mainLanguage:"R"},priority:15,intelligence:"low"},"*.R":{frameworks:["R"],slots:{mainLanguage:"R"},priority:15,intelligence:"low"},"*.jl":{frameworks:["Julia"],slots:{mainLanguage:"Julia"},priority:15,intelligence:"low"},"*.nim":{frameworks:["Nim"],slots:{mainLanguage:"Nim"},priority:15,intelligence:"low"},"*.zig":{frameworks:["Zig"],slots:{mainLanguage:"Zig"},priority:15,intelligence:"low"},"build.zig":{frameworks:["Zig"],slots:{packageManager:"Zig Package Manager",mainLanguage:"Zig",buildTool:"zig build",framework:"Zig",build:"zig build"},priority:35,intelligence:"ultra-high"},"openapi.json":{frameworks:["OpenAPI"],slots:{apiType:"REST API",backend:"API Server"},priority:30,intelligence:"high"},"openapi.yaml":{frameworks:["OpenAPI"],slots:{apiType:"REST API",backend:"API Server"},priority:30,intelligence:"high"},"swagger.json":{frameworks:["Swagger"],slots:{apiType:"REST API",backend:"API Server"},priority:30,intelligence:"high"},"graphql.schema":{frameworks:["GraphQL"],slots:{apiType:"GraphQL",backend:"GraphQL Server"},priority:30,intelligence:"high"},"schema.graphql":{frameworks:["GraphQL"],slots:{apiType:"GraphQL",backend:"GraphQL Server"},priority:30,intelligence:"high"},".graphqlconfig":{frameworks:["GraphQL"],slots:{apiType:"GraphQL"},priority:25,intelligence:"medium"},"redux.config.js":{frameworks:["Redux"],slots:{stateManagement:"Redux"},priority:20,intelligence:"medium"},"mobx.config.js":{frameworks:["MobX"],slots:{stateManagement:"MobX"},priority:20,intelligence:"medium"},"vuex.config.js":{frameworks:["Vuex"],slots:{stateManagement:"Vuex",framework:"Vue"},priority:20,intelligence:"medium"},"pinia.config.js":{frameworks:["Pinia"],slots:{stateManagement:"Pinia",framework:"Vue"},priority:20,intelligence:"medium"},"zustand.config.js":{frameworks:["Zustand"],slots:{stateManagement:"Zustand"},priority:20,intelligence:"medium"},".eslintrc.js":{frameworks:["ESLint"],slots:{},priority:15,intelligence:"low"},".eslintrc.json":{frameworks:["ESLint"],slots:{},priority:15,intelligence:"low"},".prettierrc":{frameworks:["Prettier"],slots:{},priority:15,intelligence:"low"},".prettierrc.json":{frameworks:["Prettier"],slots:{},priority:15,intelligence:"low"},"biome.json":{frameworks:["Biome"],slots:{},priority:15,intelligence:"low"},".editorconfig":{frameworks:["EditorConfig"],slots:{},priority:10,intelligence:"low"},"serverless.yml":{frameworks:["Serverless Framework"],slots:{hosting:"AWS Lambda/Azure/GCP",backend:"Serverless",apiType:"API Gateway"},priority:30,intelligence:"high"},"serverless.yaml":{frameworks:["Serverless Framework"],slots:{hosting:"AWS Lambda/Azure/GCP",backend:"Serverless",apiType:"API Gateway"},priority:30,intelligence:"high"},"sam.yaml":{frameworks:["AWS SAM"],slots:{hosting:"AWS Lambda",backend:"AWS SAM",cicd:"AWS SAM CLI"},priority:30,intelligence:"high"},"template.yaml":{frameworks:["AWS SAM","CloudFormation"],slots:{hosting:"AWS",backend:"AWS SAM/CloudFormation",cicd:"AWS"},priority:25,intelligence:"medium",confirmWith:["samconfig.toml"]},"amplify.yml":{frameworks:["AWS Amplify"],slots:{hosting:"AWS Amplify",backend:"AWS Amplify",cicd:"AWS Amplify"},priority:30,intelligence:"high"},Podfile:{frameworks:["CocoaPods","Swift"],slots:{packageManager:"CocoaPods",mainLanguage:"Swift/Objective-C"},priority:30,intelligence:"high"},"build.gradle.kts":{frameworks:["Kotlin","Gradle"],slots:{packageManager:"gradle",mainLanguage:"Kotlin",buildTool:"gradle"},priority:35,intelligence:"ultra-high"},"*.ipynb":{frameworks:["Jupyter","Python"],slots:{mainLanguage:"Python",framework:"Jupyter Notebook"},priority:30,intelligence:"high"},MLproject:{frameworks:["MLflow"],slots:{mainLanguage:"Python",framework:"MLflow",backend:"MLflow",cicd:"MLflow"},priority:30,intelligence:"high"},"dvc.yaml":{frameworks:["DVC","Data Version Control"],slots:{mainLanguage:"Python",framework:"DVC",cicd:"DVC Pipelines"},priority:30,intelligence:"high"},"dvc.lock":{frameworks:["DVC"],slots:{framework:"DVC"},priority:20,intelligence:"medium"},"wrangler.toml":{frameworks:["Cloudflare Workers","Cloudflare"],slots:{hosting:"Cloudflare Workers",backend:"Cloudflare Workers",runtime:"V8 Isolates"},priority:30,intelligence:"high"},"deno.json":{frameworks:["Deno"],slots:{runtime:"Deno",mainLanguage:"TypeScript",packageManager:"Deno"},priority:30,intelligence:"high"},"bun.lockb":{frameworks:["Bun"],slots:{runtime:"Bun",packageManager:"Bun",mainLanguage:"TypeScript/JavaScript"},priority:30,intelligence:"high"},"codecov.yml":{frameworks:["Codecov"],slots:{cicd:"Codecov"},priority:25,intelligence:"high"},"dependabot.yml":{frameworks:["Dependabot","GitHub"],slots:{cicd:"Dependabot"},priority:25,intelligence:"high"},"renovate.json":{frameworks:["Renovate"],slots:{cicd:"Renovate"},priority:25,intelligence:"high"},Makefile:{frameworks:["Make","GNU Make"],slots:{buildTool:"Make"},priority:30,intelligence:"high"},"CMakeLists.txt":{frameworks:["CMake","C","C++"],slots:{buildTool:"CMake",mainLanguage:"C/C++"},priority:30,intelligence:"high"},"meson.build":{frameworks:["Meson","C","C++"],slots:{buildTool:"Meson",mainLanguage:"C/C++"},priority:30,intelligence:"high"},"*.c":{frameworks:["C"],slots:{mainLanguage:"C"},priority:30,intelligence:"high"},"*.cpp":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:30,intelligence:"high"},"*.cc":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:30,intelligence:"high"},"*.cxx":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:25,intelligence:"high"},"*.h":{frameworks:["C","C++"],slots:{mainLanguage:"C/C++"},priority:25,intelligence:"high"},"*.hpp":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:25,intelligence:"high"},"*.hxx":{frameworks:["C++"],slots:{mainLanguage:"C++"},priority:20,intelligence:"medium"},".env":{frameworks:[],slots:{},priority:20,intelligence:"medium"},".env.example":{frameworks:[],slots:{},priority:25,intelligence:"high"},".env.local":{frameworks:[],slots:{},priority:20,intelligence:"medium"},".env.development":{frameworks:[],slots:{},priority:20,intelligence:"medium"},".env.production":{frameworks:[],slots:{},priority:20,intelligence:"medium"},"skaffold.yaml":{frameworks:["Skaffold","Kubernetes"],slots:{hosting:"Kubernetes",cicd:"Skaffold"},priority:30,intelligence:"high"},"Chart.yaml":{frameworks:["Helm","Kubernetes"],slots:{hosting:"Kubernetes",backend:"Helm"},priority:30,intelligence:"high"},"values.yaml":{frameworks:["Helm","Kubernetes"],slots:{hosting:"Kubernetes"},priority:25,intelligence:"high",confirmWith:["Chart.yaml"]},"pulumi.yaml":{frameworks:["Pulumi"],slots:{hosting:"Cloud",cicd:"Pulumi"},priority:30,intelligence:"high"},"Pulumi.yaml":{frameworks:["Pulumi"],slots:{hosting:"Cloud",cicd:"Pulumi"},priority:30,intelligence:"high"},"terragrunt.hcl":{frameworks:["Terragrunt","Terraform"],slots:{hosting:"Cloud",cicd:"Terragrunt"},priority:30,intelligence:"high"},"ansible.yml":{frameworks:["Ansible"],slots:{cicd:"Ansible"},priority:30,intelligence:"high"},"playbook.yml":{frameworks:["Ansible"],slots:{cicd:"Ansible"},priority:25,intelligence:"high"},"*.cs":{frameworks:["C#",".NET","Unity"],slots:{mainLanguage:"C#"},priority:30,intelligence:"high"},"*.m":{frameworks:["Objective-C","iOS"],slots:{mainLanguage:"Objective-C"},priority:25,intelligence:"high"},".nvmrc":{frameworks:["Node.js","nvm"],slots:{runtime:"Node.js"},priority:25,intelligence:"high"},".tool-versions":{frameworks:["asdf"],slots:{},priority:25,intelligence:"high"},".ruby-version":{frameworks:["Ruby","rbenv"],slots:{mainLanguage:"Ruby",runtime:"Ruby"},priority:25,intelligence:"high"},".python-version":{frameworks:["Python","pyenv"],slots:{mainLanguage:"Python",runtime:"Python"},priority:25,intelligence:"high"},".dockerignore":{frameworks:["Docker"],slots:{},priority:20,intelligence:"medium"},".gitattributes":{frameworks:["Git"],slots:{},priority:15,intelligence:"low"},".npmrc":{frameworks:["npm","Node.js"],slots:{packageManager:"npm"},priority:20,intelligence:"medium"},"sonar-project.properties":{frameworks:["SonarQube","SonarCloud"],slots:{cicd:"SonarQube"},priority:25,intelligence:"high"},"*.fs":{frameworks:["F#",".NET"],slots:{mainLanguage:"F#"},priority:25,intelligence:"high"},"*.mm":{frameworks:["Objective-C++","iOS","macOS"],slots:{mainLanguage:"Objective-C++"},priority:25,intelligence:"high"},"build.zig.zon":{frameworks:["Zig"],slots:{mainLanguage:"Zig",packageManager:"Zig Package Manager",buildTool:"zig build"},priority:35,intelligence:"ultra-high"},"gleam.toml":{frameworks:["Gleam","BEAM","Erlang"],slots:{mainLanguage:"Gleam",runtime:"BEAM",packageManager:"Gleam"},priority:30,intelligence:"high"},"bunfig.toml":{frameworks:["Bun"],slots:{runtime:"Bun",packageManager:"Bun",buildTool:"Bun"},priority:30,intelligence:"high"},"mise.toml":{frameworks:["mise"],slots:{},priority:25,intelligence:"high"},".mise.toml":{frameworks:["mise"],slots:{},priority:25,intelligence:"high"},"manifest.toml":{frameworks:["Flox","Nix"],slots:{},priority:25,intelligence:"high",confirmWith:[".flox"]},justfile:{frameworks:["Just"],slots:{buildTool:"Just"},priority:25,intelligence:"high"},".pre-commit-config.yaml":{frameworks:["pre-commit"],slots:{cicd:"pre-commit"},priority:25,intelligence:"high"},"CLAUDE.md":{frameworks:["Claude Code"],slots:{},priority:30,intelligence:"high",confirmWith:[".claude"]}};import{existsSync as V5,readFileSync as pY,readdirSync as lY}from"fs";import{join as d8}from"path";var X2={version:2,_doc:"SINGLE SOURCE of Dart/Flutter detection KNOWLEDGE (A+B hybrid, the Truth-is-faf-cli spec). faf-cli imports this directly; faf-python-sdk vendors a synced copy (phase 2); MCPs compose it. Bolster Dart/Flutter by editing THIS file. Logic stays in dart.ts. Refreshed 2026-08-01 (knowledge v2) — community receipt on top of 6.13.0 Dart Edition.",flutterDeps:["flutter"],mcpDeps:["dart_mcp","mcp_server","mcp_dart","dart_mcp_server","mcp","dart_mcpserver"],serverFrameworks:[["serverpod","Serverpod"],["dart_frog","Dart Frog"],["conduit","Conduit"],["angel3_framework","Angel3"],["alfred","Alfred"],["shelf","Shelf"],["jaspr","Jaspr"],["relic","Relic"]],stateManagement:[["flutter_riverpod","Riverpod"],["hooks_riverpod","Riverpod"],["riverpod_annotation","Riverpod"],["riverpod","Riverpod"],["flutter_bloc","Bloc"],["bloc","Bloc"],["provider","Provider"],["get","GetX"],["flutter_mobx","MobX"],["mobx","MobX"],["signals","Signals"],["flutter_hooks","Hooks"]],routing:[["go_router","go_router"],["auto_route","auto_route"],["beamer","Beamer"],["routemaster","Routemaster"]]};var dY=X2.flutterDeps,cY=X2.mcpDeps,iY=X2.serverFrameworks,rY=X2.stateManagement,nY=X2.routing;function aY($){let Z=new Set,Q=!1;for(let X of $.split(`
215
+ `)){if(/^(dependencies|dev_dependencies|dependency_overrides):\s*$/.test(X)){Q=!0;continue}if(/^\S/.test(X))Q=!1;if(Q){let z=X.match(/^\s{2}([a-zA-Z0-9_]+):/);if(z)Z.add(z[1].toLowerCase())}}return Z}function r1($){let Z=d8($,"pubspec.yaml");if(!V5(Z))return null;let Q;try{Q=pY(Z,"utf-8")}catch{return null}let X=aY(Q),z=(F)=>X.has(F.toLowerCase()),J=dY.some(z)||/^flutter:\s*$/m.test(Q)||/\bsdk:\s*flutter\b/.test(Q),H=cY.find(z),U=iY.find(([F])=>z(F)),q=rY.find(([F])=>z(F)),Y=q?q[1]:"",G=nY.find(([F])=>z(F)),V=G?G[1]:"",B=z("flutter_test")?"flutter_test":z("test")?"test":"",_=/^executables:\s*$/m.test(Q),D=!1;try{D=lY(d8($,"bin")).some((F)=>F.endsWith(".dart"))}catch{}let W=_||D,O,I="",N;if(J)if(I="Flutter",V5(d8($,"lib","main.dart"))||/^publish_to:\s*['"]?none\b/m.test(Q))O="mobile",N="pubspec.yaml (Flutter app)";else O="library",N="pubspec.yaml (Flutter package)";else if(H)O="mcp",N=`pubspec.yaml + ${H} (Dart MCP server)`;else if(U)O="backend",I=U[1],N=`pubspec.yaml + ${U[0]} (Dart backend)`;else if(W)O="cli",N=_?"pubspec.yaml executables: (Dart CLI)":"pubspec.yaml + bin/*.dart (Dart CLI)";else O="library",N="pubspec.yaml (Dart package)";return{appType:O,isFlutter:J,framework:I,stateManagement:Y,routing:V,testing:B,found:N}}import{existsSync as c8,readFileSync as _5,readdirSync as B5,statSync as oY}from"fs";import{join as a1}from"path";var n1={version:1,_doc:"SINGLE SOURCE of Go detection KNOWLEDGE (A+B hybrid, Truth-is-faf-cli). faf-cli imports this directly; SDKs/MCPs compose it. Bolster Go by editing THIS file. Logic stays in go.ts. Content-aware: go.mod ≠ one bucket — backend · CLI · MCP · library. 2026-08-01 initial (Dart composition pattern).",mcpModules:["github.com/mark3labs/mcp-go","github.com/modelcontextprotocol/go-sdk","github.com/metoro-io/mcp-golang","github.com/ThinkInAIXYZ/go-mcp"],serverFrameworks:[["github.com/gin-gonic/gin","Gin"],["github.com/labstack/echo","Echo"],["github.com/labstack/echo/v4","Echo"],["github.com/gofiber/fiber","Fiber"],["github.com/gofiber/fiber/v2","Fiber"],["github.com/go-chi/chi","Chi"],["github.com/go-chi/chi/v5","Chi"],["github.com/gorilla/mux","Gorilla Mux"],["github.com/gofiber/fiber/v3","Fiber"],["google.golang.org/grpc","gRPC"],["connectrpc.com/connect","Connect"],["github.com/go-kratos/kratos","Kratos"],["github.com/go-kratos/kratos/v2","Kratos"],["github.com/zeromicro/go-zero","go-zero"],["github.com/cloudwego/hertz","Hertz"]],cliFrameworks:[["github.com/spf13/cobra","Cobra"],["github.com/urfave/cli","urfave/cli"],["github.com/urfave/cli/v2","urfave/cli"],["github.com/alecthomas/kingpin","Kingpin"],["github.com/alecthomas/kong","Kong"]]};var tY=n1.mcpModules,eY=n1.serverFrameworks,$G=n1.cliFrameworks;function ZG($){let Z=new Set,Q=!1;for(let X of $.split(`
216
+ `)){let z=X.replace(/\/\/.*$/,"").trim();if(!z)continue;if(/^require\s*\(\s*$/.test(z)){Q=!0;continue}if(Q){if(z===")"){Q=!1;continue}let H=z.match(/^(\S+)/);if(H)Z.add(H[1].toLowerCase());continue}let J=z.match(/^require\s+(\S+)/);if(J&&J[1]!=="(")Z.add(J[1].toLowerCase())}return Z}function O5($,Z){let Q=Z.toLowerCase();for(let X of $)if(X===Q||X.startsWith(`${Q}/`))return!0;return!1}function W5($,Z){let Q;for(let X of Z){if(!O5($,X[0]))continue;if(!Q||X[0].length>Q[0].length)Q=X}return Q}function QG($,Z){let Q;for(let X of Z){if(!O5($,X))continue;if(!Q||X.length>Q.length)Q=X}return Q}function XG($){let Z=$.match(/^module\s+(\S+)/m);return Z?Z[1]:""}function zG($){let Z=a1($,"cmd");if(!c8(Z))return!1;try{for(let Q of B5(Z)){let X=a1(Z,Q);try{if(oY(X).isDirectory()){if(B5(X).some((J)=>J.endsWith(".go")))return!0}else if(Q.endsWith(".go"))return!0}catch{}}}catch{}return!1}function JG($){let Z=a1($,"main.go");if(!c8(Z))return!1;try{let Q=_5(Z,"utf-8");return/^package\s+main\b/m.test(Q)}catch{return!1}}function s1($){let Z=a1($,"go.mod");if(!c8(Z))return null;let Q;try{Q=_5(Z,"utf-8")}catch{return null}let X=XG(Q),z=ZG(Q),J=QG(z,tY),H=W5(z,eY),U=W5(z,$G),q=zG($),Y=JG($),G,V="",B;if(J)G="mcp",B=`go.mod + ${J} (Go MCP server)`;else if(H)G="backend",V=H[1],B=`go.mod + ${H[0]} (Go backend)`;else if(U)G="cli",V=U[1],B=`go.mod + ${U[0]} (Go CLI)`;else if(q)G="cli",B="go.mod + cmd/ (Go CLI layout)";else if(Y&&!H)G="cli",B="go.mod + main.go package main (Go CLI)";else G="library",B="go.mod (Go module)";return{appType:G,modulePath:X,framework:V,found:B}}import{existsSync as UG,readFileSync as qG,readdirSync as YG}from"fs";import{join as GG}from"path";var y0={version:1,_doc:"SINGLE SOURCE of C# /.NET detection KNOWLEDGE (Truth-is-faf-cli). faf-cli imports this; SDKs/MCPs compose it. Bolster C# by editing THIS file. Logic stays in csharp.ts. Content-aware: .csproj alone ≠ type — Sdk first, then props/packages. Kill line: .csproj alone ≠ type. 2026-08-01 initial.",mcpPackages:["ModelContextProtocol","ModelContextProtocol.AspNetCore","ModelContextProtocol.Core","ModelContextProtocol.Extensions.Tasks","ModelContextProtocol.Extensions.Apps"],cliPackages:[["System.CommandLine","System.CommandLine"],["Spectre.Console.Cli","Spectre.Console"],["Spectre.Console","Spectre.Console"],["McMaster.Extensions.CommandLineUtils","McMaster"]],testPackages:[["Microsoft.NET.Test.Sdk","VSTest"],["xunit.v3","xUnit"],["xunit","xUnit"],["NUnit","NUnit"],["MSTest.TestFramework","MSTest"],["MSTest","MSTest"]],grpcServerPackages:["Grpc.AspNetCore"],specializedSdks:[["Microsoft.NET.Sdk.Web","web","ASP.NET Core"],["Microsoft.NET.Sdk.Worker","worker","Worker"],["Microsoft.NET.Sdk.BlazorWebAssembly","blazor-wasm","Blazor WebAssembly"],["Microsoft.NET.Sdk.Razor","razor-lib","Razor Class Library"],["MSTest.Sdk","test","MSTest"],["Aspire.AppHost.Sdk","aspire","Aspire AppHost"]],baseSdk:"Microsoft.NET.Sdk"};var VG=y0.mcpPackages.map(($)=>$.toLowerCase()),BG=y0.cliPackages.map(([$,Z])=>[$.toLowerCase(),Z]),WG=y0.testPackages.map(([$,Z])=>[$.toLowerCase(),Z]),_G=y0.grpcServerPackages.map(($)=>$.toLowerCase()),OG=y0.specializedSdks,D5=y0.baseSdk.toLowerCase();function DG($){let Z=$.match(/<Project\b[^>]*\bSdk\s*=\s*"([^"/]+)(?:\/[^"]*)?"/i),Q=$.match(/<Sdk\b[^>]*\bName\s*=\s*"([^"]+)"/i),X=(Z?.[1]||Q?.[1]||"").trim(),z=($.match(/<OutputType>\s*([^<]+?)\s*<\/OutputType>/i)?.[1]||"").trim(),J=$.match(/<TargetFramework>\s*([^<]+?)\s*<\/TargetFramework>/i)?.[1],U=($.match(/<TargetFrameworks>\s*([^<]+?)\s*<\/TargetFrameworks>/i)?.[1]||J||"").trim(),q=/<IsTestProject>\s*true\s*<\/IsTestProject>/i.test($),Y=/<UseMaui>\s*true\s*<\/UseMaui>/i.test($),G=/<UseWPF>\s*true\s*<\/UseWPF>/i.test($),V=/<UseWindowsForms>\s*true\s*<\/UseWindowsForms>/i.test($),B=new Set;for(let D of $.matchAll(/<PackageReference\b[^>]*\bInclude\s*=\s*"([^"]+)"/gi))B.add(D[1].toLowerCase());for(let D of $.matchAll(/<PackageReference\s+Include\s*=\s*"([^"]+)"/gi))B.add(D[1].toLowerCase());let _=new Set;for(let D of $.matchAll(/<FrameworkReference\b[^>]*\bInclude\s*=\s*"([^"]+)"/gi))_.add(D[1].toLowerCase());return{sdk:X,outputType:z,targetFramework:U,isTestProject:q,useMaui:Y,useWpf:G,useWindowsForms:V,packages:B,frameworkRefs:_}}function i8($,Z){let Q=Z.toLowerCase();if($.has(Q))return!0;for(let X of $)if(X===Q||X.startsWith(`${Q}.`))return!0;return!1}function I5($,Z){let Q;for(let[X,z]of Z){if(!i8($,X))continue;if(!Q||X.length>Q[0].length)Q=[X,z]}return Q}function IG($){let Z;for(let Q of VG){if(!i8($,Q))continue;if(!Z||Q.length>Z.length)Z=Q}for(let Q of $)if(Q==="modelcontextprotocol"||Q.startsWith("modelcontextprotocol.")){if(!Z||Q.length>Z.length)Z=Q}return Z}function KG($){let Z=$.toLowerCase();if(!Z)return;let Q;for(let X of OG){let z=X[0].toLowerCase();if(Z===z||Z.startsWith(`${z}/`)){if(!Q||z.length>Q[0].length)Q=X}}return Q}function o1($){let Z=$.toLowerCase();return Z==="exe"||Z==="winexe"}function LG($,Z){if($==="mcp")return 0;if($==="mobile")return 1;if($==="backend")return 2;if($==="cli")return 3;if(Z&&Z!=="")return 4;return 5}function RG($,Z){let Q=Z.replace(/\.csproj$/i,""),{sdk:X,packages:z,frameworkRefs:J,outputType:H}=$,U,q="",Y,G=IG(z),V=KG(X),B=I5(z,WG),_=I5(z,BG),D=_G.some((O)=>i8(z,O)),W=J.has("microsoft.aspnetcore.app");if(G)U="mcp",q="MCP",Y=`${Z} + ${G} (C# MCP server)`;else if($.isTestProject||V?.[1]==="test"||B)U="library",q=B?.[1]||(V?.[1]==="test"?V[2]:"Test"),Y=`${Z} + test (${q})`;else if($.useMaui)U="mobile",q="MAUI",Y=`${Z} + UseMaui (MAUI)`;else if($.useWpf||$.useWindowsForms)U="backend",q=$.useWpf&&$.useWindowsForms?"WPF+WinForms":$.useWpf?"WPF":"Windows Forms",Y=`${Z} + ${q}`;else if(V?.[1]==="web")U="backend",q=D?"gRPC":V[2],Y=`${Z} + Sdk=${V[0]}${D?" + Grpc.AspNetCore":""} (ASP.NET Core)`;else if(V?.[1]==="worker")U="backend",q=V[2],Y=`${Z} + Sdk=${V[0]} (Worker)`;else if(V?.[1]==="blazor-wasm")U="backend",q=V[2],Y=`${Z} + Sdk=${V[0]} (Blazor WASM)`;else if(V?.[1]==="aspire")U="backend",q=V[2],Y=`${Z} + Sdk=${V[0]} (Aspire)`;else if(V?.[1]==="razor-lib")U="library",q=V[2],Y=`${Z} + Sdk=${V[0]} (Razor class library)`;else if(W&&o1(H))U="backend",q="ASP.NET Core",Y=`${Z} + FrameworkReference Microsoft.AspNetCore.App (host)`;else if(W&&!o1(H))U="library",q="ASP.NET Core",Y=`${Z} + FrameworkReference Microsoft.AspNetCore.App (web library)`;else if(_&&(o1(H)||!H))U="cli",q=_[1],Y=`${Z} + ${_[0]} (C# CLI)`;else if(o1(H))U="cli",Y=`${Z} + OutputType=Exe (C# console)`;else{U="library";let O=X?` Sdk=${X}`:"";if(Y=`${Z}${O} (C# class library)`.replace(" Sdk=Microsoft.NET.Sdk",""),!X||X.toLowerCase()===D5||X.toLowerCase().startsWith(`${D5}/`))Y=`${Z} (C# class library)`}return{appType:U,projectName:Q,targetFramework:$.targetFramework,sdk:X||"Microsoft.NET.Sdk",framework:q,found:Y}}function z2($){if(!UG($))return[];try{return YG($).filter((Z)=>Z.toLowerCase().endsWith(".csproj")).sort()}catch{return[]}}function t1($){let Z=z2($);if(Z.length===0)return null;let Q=null,X=999;for(let z of Z){let J=GG($,z),H;try{H=qG(J,"utf-8")}catch{continue}let U=DG(H),q=RG(U,z),Y=LG(q.appType,q.framework);if(!Q||Y<X)Q=q,X=Y}return Q}import{existsSync as h0,readFileSync as FG,readdirSync as NG,statSync as PG}from"fs";import{join as r}from"path";var e={version:1,_doc:"SINGLE SOURCE of JVM (Java/Kotlin) detection KNOWLEDGE (Truth-is-faf-cli). faf-cli imports this; SDKs/MCPs compose it. Bolster JVM by editing THIS file. Logic stays in jvm.ts. Kill line: pom / gradle alone ≠ type. Content-aware: plugins · parents · packaging · deps · version catalogs. One brand JVM — Android/KMP are facets, not a second Kotlin Edition. 2026-08-03 initial (post-intel).",mcpArtifacts:["io.modelcontextprotocol.sdk:mcp","io.modelcontextprotocol.sdk:mcp-core","io.modelcontextprotocol.sdk:mcp-spring-webflux","io.modelcontextprotocol.sdk:mcp-spring-webmvc","org.springframework.ai:spring-ai-starter-mcp-server","org.springframework.ai:spring-ai-starter-mcp-server-webmvc","org.springframework.ai:spring-ai-starter-mcp-server-webflux","org.springframework.ai:spring-ai-starter-mcp-client","org.springframework.ai:spring-ai-mcp-server-spring-boot-starter","org.springframework.ai:spring-ai-mcp-client-spring-boot-starter","io.modelcontextprotocol:kotlin-sdk","io.modelcontextprotocol.kotlin:mcp"],webPlugins:[["org.springframework.boot","Spring Boot"],["io.quarkus","Quarkus"],["io.quarkus.gradle.plugin","Quarkus"],["io.micronaut.application","Micronaut"],["io.micronaut.library","Micronaut"]],webParents:[["org.springframework.boot:spring-boot-starter-parent","Spring Boot"],["io.quarkus.platform:quarkus-bom","Quarkus"],["io.micronaut.platform:micronaut-parent","Micronaut"]],webArtifacts:[["org.springframework.boot:spring-boot-starter-web","Spring Boot"],["org.springframework.boot:spring-boot-starter-webflux","Spring Boot"],["org.springframework.boot:spring-boot-starter","Spring Boot"],["io.quarkus:quarkus-core","Quarkus"],["io.micronaut:micronaut-http-server-netty","Micronaut"],["io.ktor:ktor-server-core","Ktor"],["io.ktor:ktor-server-netty","Ktor"],["io.ktor:ktor-server-cio","Ktor"]],androidPlugins:["com.android.application","com.android.library","com.android.kotlin.multiplatform.library"],kmpPlugins:["org.jetbrains.kotlin.multiplatform","kotlin-multiplatform"],jvmKotlinPlugins:["org.jetbrains.kotlin.jvm","kotlin-jvm","org.jetbrains.kotlin.android","kotlin-android"],cliPlugins:[["org.gradle.application","application"],["application","application"]],cliArtifacts:[["info.picocli:picocli","Picocli"],["com.github.ajalt.clikt:clikt","Clikt"],["com.github.ajalt.clikt:clikt-jvm","Clikt"]],libraryPlugins:["java-library","org.gradle.java-library"]};var AG=e.mcpArtifacts.map(($)=>$.toLowerCase()),TG=e.webPlugins.map(([$,Z])=>[$.toLowerCase(),Z]),wG=e.webParents.map(([$,Z])=>[$.toLowerCase(),Z]),CG=e.webArtifacts.map(([$,Z])=>[$.toLowerCase(),Z]),DD=e.androidPlugins.map(($)=>$.toLowerCase()),bG=e.kmpPlugins.map(($)=>$.toLowerCase()),EG=e.jvmKotlinPlugins.map(($)=>$.toLowerCase()),jG=e.cliPlugins.map(([$,Z])=>[$.toLowerCase(),Z]),SG=e.cliArtifacts.map(([$,Z])=>[$.toLowerCase(),Z]),xG=e.libraryPlugins.map(($)=>$.toLowerCase()),gG=["pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts"];function r8($){return gG.some((Z)=>h0(r($,Z)))}function f2($){try{return FG($,"utf-8")}catch{return null}}function yG($){let Z=new Map,Q=new Map,X="";for(let z of $.split(`
217
+ `)){let J=z.replace(/#.*$/,"").trim();if(!J)continue;let H=J.match(/^\[([^\]]+)\]$/);if(H){X=H[1].trim().toLowerCase();continue}let U=J.match(/^([A-Za-z0-9_.-]+)\s*=\s*\{[^}]*\bid\s*=\s*"([^"]+)"/);if(U&&(X==="plugins"||X.endsWith(".plugins"))){Z.set(U[1].replace(/-/g,".").toLowerCase(),U[2].toLowerCase()),Z.set(U[1].toLowerCase(),U[2].toLowerCase());continue}let q=J.match(/^([A-Za-z0-9_.-]+)\s*=\s*\{[^}]*\bmodule\s*=\s*"([^"]+)"/);if(q&&(X==="libraries"||X.endsWith(".libraries"))){let V=q[1].toLowerCase();Q.set(V,q[2].toLowerCase()),Q.set(V.replace(/-/g,"."),q[2].toLowerCase());continue}let Y=J.match(/^([A-Za-z0-9_.-]+)\s*=\s*\{[^}]*\bgroup\s*=\s*"([^"]+)"[^}]*\bname\s*=\s*"([^"]+)"/);if(Y&&(X==="libraries"||X.endsWith(".libraries"))){let V=`${Y[2]}:${Y[3]}`.toLowerCase(),B=Y[1].toLowerCase();Q.set(B,V),Q.set(B.replace(/-/g,"."),V);continue}let G=J.match(/^([A-Za-z0-9_.-]+)\s*=\s*"([^"]+)"/);if(G){let V=G[1].toLowerCase(),B=G[2];if(X==="plugins"||X.endsWith(".plugins")){let _=B.split(":")[0].toLowerCase();Z.set(V,_),Z.set(V.replace(/-/g,"."),_)}else if(X==="libraries"||X.endsWith(".libraries")){let _=B.split(":");if(_.length>=2){let D=`${_[0]}:${_[1]}`.toLowerCase();Q.set(V,D),Q.set(V.replace(/-/g,"."),D)}}}}return{plugins:Z,libraries:Q}}function hG($){let Z=r($,"gradle","libs.versions.toml");if(!h0(Z))return{plugins:new Map,libraries:new Map};let Q=f2(Z);if(!Q)return{plugins:new Map,libraries:new Map};return yG(Q)}function vG($){let Z=[];for(let Q of $.matchAll(/include\s*\(\s*([^)]+)\)/g))for(let X of Q[1].split(",")){let z=X.replace(/['":\s]/g,"").replace(/^:/,"");if(z)Z.push(z.replace(/:/g,"/"))}for(let Q of $.matchAll(/include\s+((?:['"][^'"]+['"]\s*,?\s*)+)/g))for(let X of Q[1].split(",")){let z=X.replace(/['":\s]/g,"").replace(/^:/,"");if(z)Z.push(z.replace(/:/g,"/"))}for(let Q of $.matchAll(/project\s*\(\s*["']:([^"']+)["']\s*\)\s*\.projectDir\s*=\s*file\s*\(\s*["']([^"']+)["']\s*\)/g))Z.push(Q[2].replace(/^\.\//,""));return[...new Set(Z)]}function fG($,Z){let Q=new Set;for(let X of $.matchAll(/\bid\s*\(\s*["']([^"']+)["']\s*\)/g))Q.add(X[1].toLowerCase());for(let X of $.matchAll(/\bid\s+['"]([^'"]+)['"]/g))Q.add(X[1].toLowerCase());for(let X of $.matchAll(/plugins\s*\{([\s\S]*?)\}/g))for(let z of X[1].split(/[\n;]/)){let J=z.replace(/\/\/.*$/,"").trim();if(!J||J.startsWith("id")||J.startsWith("kotlin")||J.startsWith("alias"))continue;let H=J.match(/^`([a-zA-Z0-9.-]+)`$/)||J.match(/^([a-zA-Z][a-zA-Z0-9.-]*)$/);if(H)Q.add(H[1].toLowerCase())}for(let X of $.matchAll(/\bkotlin\s*\(\s*["']([^"']+)["']\s*\)/g)){let z=X[1].toLowerCase();if(z==="jvm")Q.add("org.jetbrains.kotlin.jvm");else if(z==="multiplatform")Q.add("org.jetbrains.kotlin.multiplatform");else if(z==="android")Q.add("org.jetbrains.kotlin.android");else Q.add(`org.jetbrains.kotlin.${z}`)}for(let X of $.matchAll(/libs\.plugins\.([A-Za-z0-9_.]+)/g)){let z=X[1].toLowerCase(),J=Z.plugins.get(z)||Z.plugins.get(z.replace(/\./g,"-"))||Z.plugins.get(z.replace(/-/g,"."));if(J)Q.add(J);else if(z.includes("spring")&&z.includes("boot"))Q.add("org.springframework.boot")}for(let X of $.matchAll(/apply\s+plugin\s*:\s*['"]([^'"]+)['"]/g))Q.add(X[1].toLowerCase());return Q}function kG($,Z){let Q=new Set;for(let X of $.matchAll(/["']([A-Za-z0-9_.-]+:[A-Za-z0-9_.-]+)(?::[^"']+)?["']/g))Q.add(X[1].toLowerCase());for(let X of $.matchAll(/libs\.([A-Za-z0-9_.]+)/g)){let z=X[1].toLowerCase();if(z.startsWith("plugins."))continue;let J=[z,z.replace(/\./g,"-"),z.replace(/-/g,".")];for(let H of J){let U=Z.libraries.get(H);if(U){Q.add(U.includes(":")?U.split(":").slice(0,2).join(":"):U);break}}}return Q}function R5($){let Z=($.match(/<packaging>\s*([^<]+?)\s*<\/packaging>/i)?.[1]||"jar").trim().toLowerCase(),Q=new Set,X=$.match(/<parent>([\s\S]*?)<\/parent>/i);if(X){let H=X[1].match(/<groupId>\s*([^<]+?)\s*<\/groupId>/i)?.[1]?.trim(),U=X[1].match(/<artifactId>\s*([^<]+?)\s*<\/artifactId>/i)?.[1]?.trim();if(H&&U)Q.add(`${H}:${U}`.toLowerCase())}let z=new Set;for(let H of $.matchAll(/<dependency>([\s\S]*?)<\/dependency>/gi)){let U=H[1].match(/<groupId>\s*([^<]+?)\s*<\/groupId>/i)?.[1]?.trim(),q=H[1].match(/<artifactId>\s*([^<]+?)\s*<\/artifactId>/i)?.[1]?.trim();if(U&&q)z.add(`${U}:${q}`.toLowerCase())}let J=[];for(let H of $.matchAll(/<module>\s*([^<]+?)\s*<\/module>/gi))J.push(H[1].trim());return{packaging:Z,parents:Q,artifacts:z,modules:J}}function B0($,Z){let Q=Z.toLowerCase();if($.has(Q))return!0;for(let X of $)if(X===Q||X.endsWith(`.${Q}`)||X===Q.replace(/^org\.gradle\./,""))return!0;return!1}function v2($,Z,Q){let X;for(let[z,J]of Z){let H=!1;if(Q==="plugin")H=B0($,z);else if(H=$.has(z)||[...$].some((U)=>U===z||U.startsWith(`${z}:`)||U.startsWith(`${z}.`)),!H&&Q==="artifact")H=[...$].some((U)=>U===z||U.startsWith(`${z}`));if(!H)continue;if(!X||z.length>X[0].length)X=[z,J]}return X}function uG($){let Z;for(let Q of AG)for(let X of $){if(X===Q||X.startsWith(`${Q}:`)||X.startsWith(Q.replace(/:mcp$/,":"))){if(!Z||Q.length>Z.length)Z=Q}if(X.startsWith("io.modelcontextprotocol")||X.includes("spring-ai-starter-mcp")||X.includes("spring-ai-mcp")){if(!Z||X.length>Z.length)Z=X}}return Z}function M5($){let Z=new Set,Q=!1,X=!1,z=[r($,"src"),r($,"src","main")],J=(H,U)=>{if(U>4||!h0(H))return;let q;try{q=NG(H)}catch{return}for(let Y of q){if(Y==="androidMain"||Y==="commonMain"||Y==="jvmMain"||Y==="iosMain")Z.add(Y);let G=r(H,Y);try{if(PG(G).isDirectory())J(G,U+1);else if(Y.endsWith(".kt")||Y.endsWith(".kts"))Q=!0;else if(Y.endsWith(".java"))X=!0}catch{}}};for(let H of z)J(H,0);return{kotlin:Q,java:X,hints:Z}}function mG($){let Z=[],Q=$.plugins,X=$.artifacts,z=bG.some((A)=>B0(Q,A))||$.sourceHints.has("commonMain"),J=B0(Q,"com.android.application"),H=B0(Q,"com.android.library")||B0(Q,"com.android.kotlin.multiplatform.library");if(J||H)Z.push("android");if(z)Z.push("multiplatform");let U=uG(X),q=v2(Q,TG,"plugin"),Y=v2($.parents,wG,"parent"),G=v2(X,CG,"artifact"),V=v2(Q,jG,"plugin"),B=v2(X,SG,"artifact"),_=xG.some((A)=>B0(Q,A)),D=$.packaging==="pom",W,O="",I;if(J)W="mobile",O=z?"Android+KMP":"Android",I=`${$.path||"root"} + com.android.application (${O})`;else if(U)W="mcp",O="MCP",Z.push("mcp"),I=`${$.path||"root"} + ${U} (JVM MCP server)`;else if(q||Y||G){W="backend",O=q?.[1]||Y?.[1]||G?.[1]||"JVM";let A=q?.[0]||Y?.[0]||G?.[0]||"web";I=`${$.path||"root"} + ${A} (JVM backend)`}else if(z&&!H)W="library",O="Kotlin Multiplatform",I=`${$.path||"root"} + kotlin multiplatform (KMP library)`;else if(H)W="library",O=z?"Android+KMP":"Android",I=`${$.path||"root"} + android library (${O})`;else if(B||$.hasApplicationPlugin&&($.hasMainClass||V)||V&&$.hasMainClass)W="cli",O=B?.[1]||"application",I=B?`${$.path||"root"} + ${B[0]} (JVM CLI)`:`${$.path||"root"} + application plugin (JVM CLI)`;else if($.hasApplicationPlugin&&!_)W="cli",O="application",I=`${$.path||"root"} + application plugin (JVM CLI)`;else if(D)W="library",I=`${$.path||"root"} + packaging=pom (Maven aggregator/BOM)`;else{W="library";let A=$.kotlinSources&&!$.javaSources?"Kotlin":"JVM";if(I=`${$.path||"root"} (${A} library)`,_)I=`${$.path||"root"} + java-library (JVM library)`}let N="Java";if($.kotlinSources&&$.javaSources)N="Java/Kotlin";else if($.kotlinSources||EG.some((A)=>B0(Q,A))||z)N="Kotlin";let F=[...new Set(Z)];return{appType:W,framework:O,facets:F,found:I,buildTool:$.buildTool,mainLanguage:N}}function pG($,Z){if($==="mcp")return 0;if($==="mobile")return 1;if(Z.includes("multiplatform")&&$==="backend")return 2;if($==="backend")return 3;if($==="cli")return 4;if(Z.includes("multiplatform"))return 5;if(Z.includes("android"))return 6;return 7}function K5($,Z,Q){let X=Z?r($,Z):$,z=r(X,"build.gradle.kts"),J=r(X,"build.gradle"),H=h0(z)?z:h0(J)?J:null;if(!H)return null;let U=f2(H);if(!U)return null;let q=fG(U,Q),Y=kG(U,Q),G=M5(X),V=/mainClass\s*[.=]/.test(U)||/mainClassName\s*=/.test(U)||/Main-Class/.test(U),B=B0(q,"application")||B0(q,"org.gradle.application");return{path:Z||"build.gradle",plugins:q,artifacts:Y,packaging:"jar",parents:new Set,hasMainClass:V,hasApplicationPlugin:B,sourceHints:G.hints,kotlinSources:G.kotlin||H.endsWith(".kts"),javaSources:G.java,buildTool:"gradle"}}function L5($,Z){let Q=Z?r($,Z):$,X=r(Q,"pom.xml");if(!h0(X))return null;let z=f2(X);if(!z)return null;let{packaging:J,parents:H,artifacts:U}=R5(z),q=M5(Q);return{path:Z?`${Z}/pom.xml`:"pom.xml",plugins:new Set,artifacts:U,packaging:J,parents:H,hasMainClass:/<mainClass>/.test(z),hasApplicationPlugin:!1,sourceHints:q.hints,kotlinSources:q.kotlin,javaSources:q.java,buildTool:"maven"}}function k2($){if(!r8($))return null;let Z=hG($),Q=[],X=null;for(let Y of["settings.gradle.kts","settings.gradle"]){let G=r($,Y);if(h0(G)){X=f2(G);break}}let z=X?vG(X):[],J=K5($,"",Z);if(J)Q.push(J);for(let Y of z){let G=K5($,Y,Z);if(G)Q.push(G)}let H=L5($,"");if(H){Q.push(H);let Y=f2(r($,"pom.xml"));if(Y){let{modules:G}=R5(Y);for(let V of G){let B=L5($,V);if(B)Q.push(B)}}}if(Q.length===0&&X)return{appType:"library",framework:"",buildTool:"gradle",mainLanguage:"Java/Kotlin",facets:[],found:"settings.gradle (Gradle multi-project root)"};if(Q.length===0)return null;let U=null,q=999;for(let Y of Q){let G=mG(Y),V=pG(G.appType,G.facets);if(!U||V<q)U={appType:G.appType,framework:G.framework,buildTool:G.buildTool,mainLanguage:G.mainLanguage,facets:G.facets,found:G.found},q=V}if(U&&z.length>0&&!U.found.includes("multi-project"));return U}import{existsSync as p2,readFileSync as dG,readdirSync as e1,statSync as cG}from"fs";import{join as $0}from"path";var u2={version:1,_doc:"SINGLE SOURCE of Ruby detection KNOWLEDGE (Truth-is-faf-cli). faf-cli imports this; SDKs/MCPs compose it. Kill line: Gemfile alone ≠ Rails. Content-aware: gem names + light layout. 2026-08-03 initial (post-intel ruby-edition).",mcpGems:["mcp","fast-mcp","fast_mcp","rails-mcp-server","rails_mcp_server","ruby-mcp-client","ruby_mcp_client","ruby_llm-mcp","ruby_llm_mcp"],webGems:[["rails","Rails"],["railties","Rails"],["sinatra","Sinatra"],["sinatra-contrib","Sinatra"],["roda","Roda"],["grape","Grape"],["hanami","Hanami"],["hanami-controller","Hanami"],["rack","Rack"]],cliGems:[["thor","Thor"],["gli","GLI"],["commander","Commander"],["slop","Slop"]],railsLayoutFiles:["config/application.rb","config/routes.rb","bin/rails","config/environment.rb"]};var iG=u2.mcpGems.map(($)=>$.toLowerCase()),rG=u2.webGems.map(([$,Z])=>[$.toLowerCase(),Z]),F5=u2.cliGems.map(([$,Z])=>[$.toLowerCase(),Z]),nG=u2.railsLayoutFiles;function aG($){return p2($0($,"Gemfile"))||p2($0($,"gems.rb"))||sG($)}function sG($){try{return e1($).some((Z)=>Z.endsWith(".gemspec"))}catch{return!1}}function m2($){try{return dG($,"utf-8")}catch{return null}}function oG($){let Z=new Set;for(let Q of $.split(`
218
+ `)){let X=Q.replace(/#.*$/,"").trim();if(!X)continue;let z=X.match(/^\s*gem\s+['"]([^'"]+)['"]/i)||X.match(/^\s*gem\s+:([A-Za-z0-9_.-]+)/i);if(z)Z.add(z[1].toLowerCase())}return Z}function tG($){let Z=new Set,Q=!1;for(let X of $.split(`
219
+ `)){let z=X.replace(/\r$/,"");if(/^\s*specs:\s*$/.test(z)){Q=!0;continue}if(Q){if(/^[A-Z]/.test(z)||z.startsWith("PLATFORMS")||z.startsWith("DEPENDENCIES")||z.startsWith("BUNDLED")||z.startsWith("RUBY VERSION")||z.startsWith("CHECKSUMS")){Q=!1;continue}let J=z.match(/^\s{2,}([a-zA-Z0-9_.-]+)\s*\(/);if(J)Z.add(J[1].toLowerCase())}}return Z}function eG($){let Z=new Set;for(let Q of $.split(`
220
+ `)){let z=Q.replace(/#.*$/,"").match(/add_(?:runtime_|development_)?dependency\s*\(?\s*['"]([^'"]+)['"]/i);if(z)Z.add(z[1].toLowerCase())}return Z}function $V($){let Z=new Set,Q=[];for(let z of["Gemfile","gems.rb"]){let J=$0($,z),H=m2(J);if(H){for(let U of oG(H))Z.add(U);Q.push(z)}}let X=m2($0($,"Gemfile.lock"))||m2($0($,"gems.locked"));if(X){for(let z of tG(X))Z.add(z);Q.push("Gemfile.lock")}try{for(let z of e1($)){if(!z.endsWith(".gemspec"))continue;let J=m2($0($,z));if(J){for(let H of eG(J))Z.add(H);Q.push(z)}}}catch{}return{gems:Z,sources:Q}}function l2($,Z){let Q=Z.toLowerCase();if($.has(Q))return!0;return!1}function n8($,Z){let Q;for(let[X,z]of Z){if(!l2($,X))continue;if(!Q||X.length>Q[0].length)Q=[X,z]}return Q}function ZV($){let Z;for(let Q of iG)if(l2($,Q)&&(!Z||Q.length>Z.length))Z=Q;return Z}function N5($){for(let Z of nG)if(p2($0($,Z)))return Z;return}function QV($,Z){let Q=n8(Z,F5);if(Q)return{hit:!0,why:Q[0]};try{for(let z of e1($)){if(!z.endsWith(".gemspec"))continue;let J=m2($0($,z));if(J&&/executables\s*=/.test(J)&&!/executables\s*=\s*\[\s*\]/.test(J))return{hit:!0,why:`${z} executables`}}}catch{}let X=$0($,"bin");if(p2(X))try{let J=e1(X).filter((H)=>{if(H==="setup"||H==="console"||H==="rake")return!1;try{return cG($0(X,H)).isFile()}catch{return!1}}).filter((H)=>H!=="rails");if(J.length>0&&!l2(Z,"rails")&&!N5($))return{hit:!0,why:`bin/${J[0]}`}}catch{}return{hit:!1,why:""}}function $$($){if(!aG($))return null;let{gems:Z,sources:Q}=$V($),X=Q[0]||"Gemfile",z=Q.some((O)=>O==="Gemfile"||O==="gems.rb"||O.includes("lock"))?"bundler":"rubygems",J=ZV(Z),H=n8(Z,rG),U=N5($),q=l2(Z,"rails")||l2(Z,"railties"),Y=QV($,Z),G=p2($0($,"config.ru")),V=q||!!U,B=H&&H[1]!=="Rails"&&!(H[0]==="rack"&&!G)?H:void 0,_,D="",W;if(J)_="mcp",D="MCP",W=`${X} + gem ${J} (Ruby MCP)`;else if(V)if(_="backend",D="Rails",q&&U)W=`${X} + rails + ${U} (Rails)`;else if(q)W=`${X} + gem rails (Rails)`;else W=`${U} (Rails layout)`;else if(B)_="backend",D=B[1],W=`${X} + gem ${B[0]} (Ruby backend)`;else if(Y.hit)_="cli",D=n8(Z,F5)?.[1]||"",W=`${X} + ${Y.why} (Ruby CLI)`;else _="library",W=`${X} (Ruby library)`;return{appType:_,framework:D,packageManager:z,found:W}}import{existsSync as a8,readFileSync as zV,readdirSync as JV,statSync as HV}from"fs";import{join as d2}from"path";var J0={version:1,_doc:"SINGLE SOURCE of Swift detection KNOWLEDGE (Truth-is-faf-cli). Kill line: Package.swift alone ≠ app. Static parse of products + package URLs + product names + light xcodeproj productType. Never execute Package.swift / swift build. 2026-08-03 post-intel swift-edition.",mcpPackageUrls:["modelcontextprotocol/swift-sdk","github.com/modelcontextprotocol/swift-sdk"],mcpProducts:["MCP"],serverPackageUrls:[["vapor/vapor","Vapor"],["github.com/vapor/vapor","Vapor"],["hummingbird-project/hummingbird","Hummingbird"],["github.com/hummingbird-project/hummingbird","Hummingbird"]],serverProducts:[["Vapor","Vapor"],["Hummingbird","Hummingbird"]],cliPackageUrls:[["apple/swift-argument-parser","ArgumentParser"],["github.com/apple/swift-argument-parser","ArgumentParser"]],cliProducts:[["ArgumentParser","ArgumentParser"]],appProductTypes:["com.apple.product-type.application"],cliProductTypes:["com.apple.product-type.tool"],vaporLayoutFiles:["Sources/App/configure.swift","Sources/App/routes.swift","Sources/App/entrypoint.swift"]};var UV=J0.mcpPackageUrls.map(($)=>$.toLowerCase()),qV=J0.mcpProducts.map(($)=>$.toLowerCase()),YV=J0.serverPackageUrls.map(([$,Z])=>[$.toLowerCase(),Z]),GV=J0.serverProducts.map(([$,Z])=>[$.toLowerCase(),Z]),VV=J0.cliPackageUrls.map(([$,Z])=>[$.toLowerCase(),Z]),BV=J0.cliProducts.map(([$,Z])=>[$.toLowerCase(),Z]),WV=J0.appProductTypes,_V=J0.cliProductTypes,OV=J0.vaporLayoutFiles;function DV($){return a8(d2($,"Package.swift"))||s8($).length>0}function s8($){try{return JV($).filter((Z)=>{if(!Z.endsWith(".xcodeproj"))return!1;try{return HV(d2($,Z)).isDirectory()}catch{return!1}})}catch{return[]}}function T5($){try{return zV($,"utf-8")}catch{return null}}function IV($){let Z=KV($),Q=Z.toLowerCase(),X=[],z=/\.package\s*\(\s*url\s*:\s*"([^"]+)"/gi,J;while((J=z.exec(Z))!==null)X.push(J[1]);let H=/\.package\s*\(\s*url\s*:\s*'([^']+)'/gi;while((J=H.exec(Z))!==null)X.push(J[1]);let U=[],q=/\.product\s*\(\s*name\s*:\s*"([^"]+)"/gi;while((J=q.exec(Z))!==null)U.push(J[1]);let Y=/\.product\s*\(\s*name\s*:\s*'([^']+)'/gi;while((J=Y.exec(Z))!==null)U.push(J[1]);let G=/\.library\s*\(/.test(Q),V=/\.executable\s*\(/.test(Q),B=/\.plugin\s*\(/.test(Q)&&!G&&!V?!0:/\bproducts\s*:\s*\[[\s\S]*?\.plugin\s*\(/.test(Q),_=/\.executabletarget\s*\(/.test(Q),D=/\.target\s*\(/.test(Q)&&!_?!0:(Q.match(/\.target\s*\(/g)||[]).length>(Q.match(/\.executabletarget\s*\(/g)||[]).length+(Q.match(/\.testtarget\s*\(/g)||[]).length;return{packageUrls:X,productNames:U,hasLibraryProduct:G,hasExecutableProduct:V,hasPluginProduct:!!B,hasExecutableTarget:_,hasLibraryTarget:D}}function KV($){let Z="",Q=0;while(Q<$.length){if($[Q]==='"'||$[Q]==="'"){let X=$[Q];Z+=X,Q++;while(Q<$.length){if($[Q]==="\\"&&Q+1<$.length){Z+=$[Q]+$[Q+1],Q+=2;continue}if(Z+=$[Q],$[Q]===X){Q++;break}Q++}continue}if($[Q]==="/"&&$[Q+1]==="/"){Q+=2;while(Q<$.length&&$[Q]!==`
221
+ `)Q++;continue}if($[Q]==="/"&&$[Q+1]==="*"){Q+=2;while(Q<$.length&&!($[Q]==="*"&&$[Q+1]==="/"))Q++;Q+=2;continue}Z+=$[Q],Q++}return Z}function LV($,Z){let Q=$.map((z)=>z.toLowerCase()),X;for(let z of Z)for(let J of Q)if(J.includes(z)&&(!X||z.length>X.length))X=z;return X}function P5($,Z){let Q=$.map((z)=>z.toLowerCase()),X;for(let[z,J]of Z)for(let H of Q)if(H.includes(z)&&(!X||z.length>X[0].length))X=[z,J];return X}function A5($,Z){let Q=$.map((z)=>z.toLowerCase()),X;for(let[z,J]of Z)if(Q.includes(z)&&(!X||z.length>X[0].length))X=[z,J];return X}function RV($){let Z=$.map((Q)=>Q.toLowerCase());return qV.some((Q)=>Z.includes(Q))}function MV($){let Z=!1,Q=!1,X;for(let z of s8($)){let J=d2($,z,"project.pbxproj"),H=T5(J);if(!H)continue;for(let U of WV)if(H.includes(U))Z=!0,X=U;for(let U of _V)if(H.includes(U)){if(Q=!0,!X)X=U}}return{hasApplication:Z,hasTool:Q,hit:X}}function FV($){for(let Z of OV)if(a8(d2($,Z)))return Z;return}function c2($){if(!DV($))return null;let Z=d2($,"Package.swift"),Q=a8(Z),X=s8($),z=X.length>0,J=null;if(Q){let S=T5(Z);if(S)J=IV(S)}let H=z?MV($):{hasApplication:!1,hasTool:!1},U=FV($),q=J?.packageUrls??[],Y=J?.productNames??[],G=LV(q,UV),V=RV(Y),B=P5(q,YV),_=A5(Y,GV),D=P5(q,VV),W=A5(Y,BV),O=!!(G||V),I=!!(B||_||U),N=!!(J?.hasExecutableProduct||J?.hasExecutableTarget),F=!!(D||W),A=H.hasApplication,w=Q&&z?"spm+xcode":Q?"spm":"xcode",T,C="",L;if(O)if(T="mcp",C="MCP",V)L="Package.swift + product MCP (Swift MCP)";else L=`Package.swift + ${G} (Swift MCP)`;else if(I)if(T="backend",C=_?.[1]||B?.[1]||(U?"Vapor":""),_)L=`Package.swift + product ${_[1]} (Swift backend)`;else if(B)L=`Package.swift + ${B[1]} (Swift backend)`;else L=`${U} (Swift backend layout)`;else if(A)T="app",C="",L=`${X[0]} + ${H.hit||"application"} (Swift app)`;else if(F||N&&!I&&!O)if(T="cli",C=W?.[1]||D?.[1]||"",W)L=`Package.swift + product ${W[1]} (Swift CLI)`;else if(D)L=`Package.swift + ${D[1]} (Swift CLI)`;else if(J?.hasExecutableProduct)L="Package.swift + .executable product (Swift CLI)";else L="Package.swift + .executableTarget (Swift CLI)";else if(H.hasTool&&!Q)T="cli",L=`${X[0]} + tool productType (Swift CLI)`;else if(Q)if(T="library",J?.hasLibraryProduct)L="Package.swift + .library product (Swift library)";else L="Package.swift (Swift library)";else T="library",L=`${X[0]||"xcodeproj"} (Swift — no classifying productType)`;return{appType:T,framework:C,packageManager:w,found:L}}var CV=new Set(["node_modules",".git","dist","build","venv",".venv","__pycache__","target","coverage",".next",".svelte-kit","vendor"]),bV=new Set([".py",".ts",".tsx",".js",".jsx",".svelte",".vue",".rb",".go",".rs",".php",".java",".kt",".swift"]),EV={mainLanguage:["project","main_language"],main_language:["project","main_language"],framework:["stack","frontend"],cssFramework:["stack","css_framework"],css:["stack","css_framework"],uiLibrary:["stack","ui_library"],ui_library:["stack","ui_library"],stateManagement:["stack","state_management"],state:["stack","state_management"],backend:["stack","backend"],apiType:["stack","api_type"],api:["stack","api_type"],runtime:["stack","runtime"],database:["stack","database"],db:["stack","database"],connection:["stack","connection"],hosting:["stack","hosting"],buildTool:["stack","build"],build_tool:["stack","build"],build:["stack","build"],packageManager:["stack","package_manager"],pkg_manager:["stack","package_manager"],cicd:["stack","cicd"]},jV=[["packageManager","package-manager"],["pkg_manager","package-manager"],["mainLanguage","language"],["main_language","language"],["framework","framework"],["backend","backend"],["database","database"],["db","database"],["cicd","ci-cd"],["hosting","hosting"],["buildTool","build"],["build_tool","build"],["build","build"],["runtime","runtime"],["cssFramework","css"],["css","css"],["uiLibrary","ui-library"],["stateManagement","state-management"],["apiType","api"],["api","api"]];function SV($,Z){for(let[Q,X]of jV)if(Q in $)return X;return Z.length>0?"framework":"config"}function xV($){try{let Z=JSON.parse(PV($,"utf-8")),Q=["background","content_scripts","action","browser_action","permissions"].some((X)=>(X in Z));if(typeof Z.manifest_version==="number"&&Q)return"chrome";return"other"}catch{return"other"}}function gV($){let Z=[],Q=wV($),X=NV(o8($,".git")),z=new Set;for(let J=0;J<10;J++){let H;try{H=w5(Q)}catch{break}for(let q of H){if(q.toLowerCase().endsWith(".csproj")){let G=t1(Q);if(G){let V={mainLanguage:"C#",packageManager:"NuGet",buildTool:"dotnet"};if(G.appType==="backend"&&G.framework)V.backend=G.framework;else if(G.appType==="cli"&&G.framework)V.framework=G.framework;else if(G.appType==="mcp")V.apiType="MCP";else if(G.appType==="mobile"&&G.framework)V.framework=G.framework;if(G.targetFramework)V.runtime=G.targetFramework;let B=G.framework?[G.framework,"C#",".NET"]:["C#",".NET"];Z.push({slots:V,priority:36,frameworks:B,fileName:q})}continue}if(q.endsWith(".xcodeproj")){let G=c2(Q);if(G){let V={mainLanguage:"Swift",packageManager:G.packageManager==="spm"?"spm":"Xcode",buildTool:G.packageManager.includes("spm")?"swift build":"xcodebuild"};if(G.appType==="backend"&&G.framework)V.backend=G.framework;else if(G.appType==="cli"&&G.framework)V.framework=G.framework;else if(G.appType==="mcp")V.apiType="MCP";else if(G.appType==="app")V.framework=G.framework||"Swift App";let B=G.framework?[G.framework,"Swift"]:["Swift"];Z.push({slots:V,priority:36,frameworks:B,fileName:q})}continue}let Y=l8[q];if(!Y)continue;if(q==="manifest.json"&&xV(o8(Q,q))!=="chrome")continue;if(q==="pubspec.yaml"){let G=r1(Q);if(G){let V={mainLanguage:"Dart",packageManager:"pub"};if(G.isFlutter){if(V.framework="Flutter",G.stateManagement)V.stateManagement=G.stateManagement}else if(G.appType==="backend"&&G.framework)V.backend=G.framework;else if(G.appType==="mcp")V.apiType="MCP";Z.push({slots:V,priority:Y.priority,frameworks:G.isFlutter?["Flutter","Dart"]:["Dart"],fileName:q});continue}}if(q==="go.mod"){let G=s1(Q);if(G){let V={mainLanguage:"Go",packageManager:"go modules",buildTool:"go build"};if(G.appType==="backend"&&G.framework)V.backend=G.framework;else if(G.appType==="cli"&&G.framework)V.framework=G.framework;else if(G.appType==="mcp")V.apiType="MCP";let B=G.framework?[G.framework,"Go"]:["Go"];Z.push({slots:V,priority:Y.priority,frameworks:B,fileName:q});continue}}if(q==="Gemfile"||q==="Gemfile.lock"||q==="gems.rb"){let G=$$(Q);if(G){let V={mainLanguage:"Ruby",packageManager:G.packageManager};if(G.appType==="backend"&&G.framework)V.backend=G.framework;else if(G.appType==="cli"&&G.framework)V.framework=G.framework;else if(G.appType==="mcp")V.apiType="MCP";let B=G.framework?[G.framework,"Ruby"]:["Ruby"];Z.push({slots:V,priority:Y.priority??35,frameworks:B,fileName:q});continue}}if(q==="Package.swift"){let G=c2(Q);if(G){let V={mainLanguage:"Swift",packageManager:G.packageManager==="xcode"?"Xcode":"spm",buildTool:"swift build"};if(G.appType==="backend"&&G.framework)V.backend=G.framework;else if(G.appType==="cli"&&G.framework)V.framework=G.framework;else if(G.appType==="mcp")V.apiType="MCP";else if(G.appType==="app")V.framework=G.framework||"SwiftUI/App";let B=G.framework?[G.framework,"Swift"]:["Swift"];Z.push({slots:V,priority:Y.priority??36,frameworks:B,fileName:q});continue}}if(q==="pom.xml"||q==="build.gradle"||q==="build.gradle.kts"||q==="settings.gradle"||q==="settings.gradle.kts"){if(z.has(Q))continue;z.add(Q);let G=k2(Q);if(G){let V={mainLanguage:G.mainLanguage==="Java/Kotlin"?"Kotlin":G.mainLanguage,packageManager:G.buildTool==="maven"?"maven":"gradle",buildTool:G.buildTool};if(G.appType==="backend"&&G.framework)V.backend=G.framework;else if(G.appType==="cli"&&G.framework)V.framework=G.framework;else if(G.appType==="mcp")V.apiType="MCP";else if(G.appType==="mobile")V.framework=G.framework||"Android";if(G.facets.includes("multiplatform"))V.framework=G.framework||"Kotlin Multiplatform";let B=G.framework?[G.framework,"JVM",G.mainLanguage==="Kotlin"?"Kotlin":"Java"]:["JVM",G.mainLanguage==="Kotlin"?"Kotlin":"Java"];Z.push({slots:V,priority:Y.priority??35,frameworks:B,fileName:q});continue}}Z.push({slots:Y.slots||{},priority:Y.priority,frameworks:Y.frameworks,fileName:q})}if(X&&J===0)break;let U=AV(Q);if(U===Q)break;Q=U}return Z}function yV($){let Z=[];for(let Q of b5($,2,{count:0})){let X=l8[`*${Q}`],z=X?.slots?.mainLanguage;if(z)Z.push({slots:{mainLanguage:z},priority:X.priority,frameworks:X.frameworks})}return Z}function C5($){let Z=[...gV($),...yV($)],Q={},X={},z=new Set;for(let Y of Z){Y.frameworks.forEach((G)=>z.add(G));for(let[G,V]of Object.entries(Y.slots))if(V&&!V.includes("/")&&(!(G in Q)||Y.priority>X[G]))Q[G]=V,X[G]=Y.priority}let J=new Map;for(let Y of Z){if(!Y.fileName)continue;if(!J.has(Y.fileName))J.set(Y.fileName,{fileName:Y.fileName,category:SV(Y.slots,Y.frameworks),priority:Y.priority})}let H=[...J.values()].sort((Y,G)=>G.priority-Y.priority||Y.fileName.localeCompare(G.fileName)),U=[];if(Q.mainLanguage)U.push(Q.mainLanguage.toLowerCase());if(Q.framework)U.push(Q.framework.toLowerCase());let q=U.length>0?U.join("-"):"unknown-stack";return{slotFills:Q,frameworks:[...z],confirmedCount:Z.length,discoveredFormats:H,stackSignature:q}}function Z$($){let{slotFills:Z}=C5($),Q={};for(let[X,z]of Object.entries(Z)){let J=EV[X];if(!J||!z)continue;let[H,U]=J;if(H==="project")(Q.project??={})[U]=z;else(Q.stack??={})[U]=z}return Q}function b5($,Z,Q){let X=new Set;if(Z<0||Q.count>400)return X;let z;try{z=w5($,{withFileTypes:!0})}catch{return X}for(let J of z){if(Q.count++>400)break;if(!J.isDirectory()){let H=TV(J.name);if(bV.has(H))X.add(H);continue}if(CV.has(J.name)||J.name.startsWith("."))continue;for(let H of b5(o8($,J.name),Z-1,Q))X.add(H)}return X}import{existsSync as E5,readFileSync as j5}from"fs";import{join as S5}from"path";var k=($,Z,Q)=>({value:$,source:Z,confidence:Q});function x5($,Z={}){let Q=Z.toolingRoot?null:hV($),X=vV($),z={},J=(H,U)=>{if(U)z[H]=U};return J("what",uV(Q,X)),J("who",mV(X)),J("why",pV(X)),J("where",lV(Q,X)),J("when",dV(X)),J("how",cV(Q,X)),z}function Q$($,Z={}){let Q=x5($,Z),X={};return Object.keys(Q).forEach((z)=>{let J=Q[z];if(J)X[z]=J.value}),X}function hV($){let Z=S5($,"package.json");if(!E5(Z))return null;try{return JSON.parse(j5(Z,"utf-8"))}catch{return null}}function vV($){let Z=S5($,"README.md");if(!E5(Z))return"";let Q;try{Q=j5(Z,"utf-8")}catch{return""}return Q.replace(/<!--[\s\S]*?-->/g,"").split(`
222
222
  `).filter((X)=>!/^\s*\[!\[/.test(X)&&!/^\s*!\[/.test(X)).join(`
223
- `).replace(/<[^>]+>/g,"").replace(/!\[[^\]]*\]\([^)]*\)/g,"").trim()}function b0($){return $.replace(/\s+/g," ").replace(/[#*`>]/g,"").trim().slice(0,280)}function nB($){if(!$)return 0;return($.match(/\[[^\]]*\]\([^)]*\)/g)??[]).join("").length/$.length}function o0($,Z){let Q=new RegExp(`##?\\s+(${Z})\\s*\\n+([\\s\\S]+?)(?:\\n\\n|\\n##?|$)`,"i"),X=$.match(Q);if(!X||!X[2]||X[2].trim().length<=20||nB(X[2])>0.4)return null;return{body:b0(X[2]),heading:X[1].trim()}}function sB($){let Z=$.trim();if(/^>/.test(Z))return!0;if(/\b(nightly (release|build)|pre-?release|work[-\s]in[-\s]progress|rough edges|early (access|testing|preview)|use at your own risk|not (yet )?production[-\s]?ready|expect (rough|breaking)|experimental release)\b/i.test(Z))return!0;let Q=Z.split(/[·|]/).map((X)=>X.trim()).filter(Boolean);if(Q.length>=3&&Q.every((X)=>X.length<=24))return!0;return!1}function v1($,Z,Q=30){for(let X of Z){let z=$.match(X);if(z&&z[1]&&z[1].trim().length>=Q)return b0(z[1])}return null}function oB($,Z){if($?.description&&$.description.length>20)return f(b0($.description),"package.json:description",0.95);let Q=o0(Z,"Purpose|What|About|Overview|Description");if(Q)return f(Q.body,`README:## ${Q.heading}`,0.8);let X=Z.split(/\n\s*\n/).map((J)=>J.replace(/\s+/g," ").trim()).find((J)=>J.length>30&&!J.startsWith("#")&&!sB(J));if(X)return f(b0(X),"README:first-paragraph",0.5);let z=v1(Z,[/(?:core|main|primary)\s+(?:problem|challenge)(?:\s+is)?\s*:?\s*([^.\n]{30,})/i,/solves?\s+(?:the\s+)?(?:problem\s+of\s+)?([^.\n]{30,})/i]);return z?f(z,"README:problem-heuristic",0.6):null}function tB($){let Z=o0($,"Audience|Who|Who is this for|Who it.s for");if(Z)return f(Z.body,`README:## ${Z.heading}`,0.8);let Q=v1($,[/\b(?:designed|built|made)\s+for\s+((?:[a-z][a-z-]*\s+)?(?:developers?|teams?|engineers?|builders?|founders?)[^.\n]{0,80})/i,/\bfor\s+((?:[a-z][a-z-]*\s+)?(?:developers?|teams?|engineers?|builders?|founders?)[^.\n]{0,80})/i],8);return Q?f(Q,"README:audience-heuristic",0.6):null}function eB($){let Z=o0($,"Why|Mission|Motivation|Rationale|Vision");if(Z)return f(Z.body,`README:## ${Z.heading}`,0.8);let Q=v1($,[/(?:our\s+|the\s+)?(?:mission|purpose|goal)\s+is\s+([^.\n]{30,})/i,/\b(?:mission|purpose|goal)\s*:\s*([^.\n]{30,})/i,/(?:built|created|designed)\s+(?:because|to)\s+([^.\n]{30,})/i]);return Q?f(Q,"README:mission-heuristic",0.6):null}function $G($,Z){let Q=typeof $?.repository==="string"?$.repository:$?.repository?.url;if(Q)return f(b0(Q.replace(/^git\+/,"").replace(/\.git$/,"")),"package.json:repository",0.95);if($?.homepage)return f(b0($.homepage),"package.json:homepage",0.9);let X=v1(Z,[/\b(?:deployed|hosted|available|published)\s+(?:on|at|via)\s+([^.\n]{3,80})/i],3);return X?f(X,"README:deploy-heuristic",0.6):null}function ZG($){let Z=o0($,"Timeline|Status|Release|Roadmap");if(Z)return f(Z.body,`README:## ${Z.heading}`,0.8);let Q=v1($,[/\b(production\s+since\s+[^.\n]{4,60})/i,/\b((?:in\s+)?(?:production|beta|alpha|development)\s+since\s+[^.\n]{4,60})/i,/\bsince\s+((?:[A-Z][a-z]+\s+)?\d{4}[^.\n]{0,40})/],4);return Q?f(Q,"README:since-heuristic",0.6):null}function QG($,Z){let Q=$?.scripts?Object.keys($.scripts):[],X=["start","dev","build"].filter((H)=>Q.includes(H));if(X.length)return f(b0(X.map((H)=>`npm run ${H}`).join(", ")),"package.json:scripts",0.9);let z=o0(Z,"Usage|Getting Started|Install|Installation|Quick Start");if(z)return f(z.body,`README:## ${z.heading}`,0.8);let J=o0(Z,"Architecture|Approach|How it works|Methodology|How");return J?f(J.body,`README:## ${J.heading}`,0.7):null}var I4="3.0";import{existsSync as M,readFileSync as $0,readdirSync as u8}from"fs";import{join as K}from"path";var K4=[{name:"Next.js",slug:"nextjs",category:"frontend",signals:[{type:"dependency",key:"next"},{type:"file",pattern:"next.config.*"}]},{name:"React",slug:"react",category:"frontend",signals:[{type:"dependency",key:"react"}]},{name:"SvelteKit",slug:"sveltekit",category:"frontend",signals:[{type:"dependency",key:"@sveltejs/kit"},{type:"file",pattern:"svelte.config.*"}]},{name:"Svelte",slug:"svelte",category:"frontend",signals:[{type:"dependency",key:"svelte"},{type:"devDependency",key:"svelte"}]},{name:"Vue.js",slug:"vue",category:"frontend",signals:[{type:"dependency",key:"vue"}]},{name:"Nuxt",slug:"nuxt",category:"frontend",signals:[{type:"dependency",key:"nuxt"},{type:"file",pattern:"nuxt.config.*"}]},{name:"Angular",slug:"angular",category:"frontend",signals:[{type:"dependency",key:"@angular/core"},{type:"file",pattern:"angular.json"}]},{name:"Astro",slug:"astro",category:"frontend",signals:[{type:"dependency",key:"astro"},{type:"file",pattern:"astro.config.*"}]},{name:"Solid",slug:"solid",category:"frontend",signals:[{type:"dependency",key:"solid-js"}]},{name:"Remix",slug:"remix",category:"frontend",signals:[{type:"dependency",key:"@remix-run/react"}]},{name:"Gatsby",slug:"gatsby",category:"frontend",signals:[{type:"dependency",key:"gatsby"},{type:"file",pattern:"gatsby-config.*"}]},{name:"Qwik",slug:"qwik",category:"frontend",signals:[{type:"dependency",key:"@builder.io/qwik"}]},{name:"Vercel (SvelteKit)",slug:"adapter-vercel",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-vercel"},{type:"devDependency",key:"@sveltejs/adapter-vercel"}]},{name:"Node (SvelteKit)",slug:"adapter-node",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-node"},{type:"devDependency",key:"@sveltejs/adapter-node"}]},{name:"Static (SvelteKit)",slug:"adapter-static",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-static"},{type:"devDependency",key:"@sveltejs/adapter-static"}]},{name:"Cloudflare (SvelteKit)",slug:"adapter-cloudflare",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-cloudflare"},{type:"devDependency",key:"@sveltejs/adapter-cloudflare"}]},{name:"Netlify (SvelteKit)",slug:"adapter-netlify",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-netlify"},{type:"devDependency",key:"@sveltejs/adapter-netlify"}]},{name:"Tailwind CSS",slug:"tailwind",category:"css",signals:[{type:"dependency",key:"tailwindcss"},{type:"devDependency",key:"tailwindcss"},{type:"file",pattern:"tailwind.config.*"}]},{name:"Bootstrap",slug:"bootstrap",category:"css",signals:[{type:"dependency",key:"bootstrap"}]},{name:"Styled Components",slug:"styled-components",category:"css",signals:[{type:"dependency",key:"styled-components"}]},{name:"shadcn/ui",slug:"shadcn",category:"ui",signals:[{type:"file",pattern:"components.json"},{type:"dependency",key:"@radix-ui/react-dialog"}]},{name:"Material UI",slug:"mui",category:"ui",signals:[{type:"dependency",key:"@mui/material"}]},{name:"Chakra UI",slug:"chakra",category:"ui",signals:[{type:"dependency",key:"@chakra-ui/react"}]},{name:"Ant Design",slug:"antd",category:"ui",signals:[{type:"dependency",key:"antd"}]},{name:"Redux",slug:"redux",category:"state",signals:[{type:"dependency",key:"@reduxjs/toolkit"}]},{name:"Zustand",slug:"zustand",category:"state",signals:[{type:"dependency",key:"zustand"}]},{name:"Jotai",slug:"jotai",category:"state",signals:[{type:"dependency",key:"jotai"}]},{name:"Pinia",slug:"pinia",category:"state",signals:[{type:"dependency",key:"pinia"}]},{name:"Express",slug:"express",category:"backend",signals:[{type:"dependency",key:"express"}]},{name:"Fastify",slug:"fastify",category:"backend",signals:[{type:"dependency",key:"fastify"}]},{name:"Hono",slug:"hono",category:"backend",signals:[{type:"dependency",key:"hono"}]},{name:"Elysia",slug:"elysia",category:"backend",signals:[{type:"dependency",key:"elysia"}]},{name:"NestJS",slug:"nestjs",category:"backend",signals:[{type:"dependency",key:"@nestjs/core"}]},{name:"Koa",slug:"koa",category:"backend",signals:[{type:"dependency",key:"koa"}]},{name:"Django",slug:"django",category:"backend",signals:[{type:"file",pattern:"manage.py"},{type:"file",pattern:"settings.py"}]},{name:"Flask",slug:"flask",category:"backend",signals:[{type:"content",pattern:"app.py",key:"flask"}]},{name:"FastAPI",slug:"fastapi",category:"backend",signals:[{type:"content",pattern:"main.py",key:"fastapi"}]},{name:"Rails",slug:"rails",category:"backend",signals:[{type:"content",pattern:"Gemfile",key:"rails"},{type:"content",pattern:"Gemfile.lock",key:"rails ("},{type:"file",pattern:"config/application.rb"},{type:"file",pattern:"config/routes.rb"}]},{name:"Spring Boot",slug:"spring",category:"backend",signals:[{type:"content",pattern:"pom.xml",key:"spring-boot"},{type:"content",pattern:"build.gradle",key:"springframework.boot"},{type:"content",pattern:"build.gradle.kts",key:"springframework.boot"},{type:"content",pattern:"gradle/libs.versions.toml",key:"springframework.boot"}]},{name:"Vapor",slug:"vapor",category:"backend",signals:[{type:"content",pattern:"Package.swift",key:"vapor/vapor"},{type:"content",pattern:"Package.swift",key:'product(name: "Vapor"'},{type:"content",pattern:"Package.swift",key:"product(name: 'Vapor'"},{type:"file",pattern:"Sources/App/configure.swift"}]},{name:"Hummingbird",slug:"hummingbird",category:"backend",signals:[{type:"content",pattern:"Package.swift",key:"hummingbird-project/hummingbird"},{type:"content",pattern:"Package.swift",key:'product(name: "Hummingbird"'},{type:"content",pattern:"Package.swift",key:"product(name: 'Hummingbird'"}]},{name:"Prisma",slug:"prisma",category:"database",signals:[{type:"dependency",key:"prisma"},{type:"devDependency",key:"prisma"},{type:"file",pattern:"prisma/schema.prisma"}]},{name:"Drizzle",slug:"drizzle",category:"database",signals:[{type:"dependency",key:"drizzle-orm"},{type:"file",pattern:"drizzle.config.*"}]},{name:"TypeORM",slug:"typeorm",category:"database",signals:[{type:"dependency",key:"typeorm"}]},{name:"Mongoose",slug:"mongoose",category:"database",signals:[{type:"dependency",key:"mongoose"}]},{name:"Vite",slug:"vite",category:"build",signals:[{type:"dependency",key:"vite"},{type:"devDependency",key:"vite"},{type:"file",pattern:"vite.config.*"}]},{name:"webpack",slug:"webpack",category:"build",signals:[{type:"dependency",key:"webpack"},{type:"devDependency",key:"webpack"},{type:"file",pattern:"webpack.config.*"}]},{name:"esbuild",slug:"esbuild",category:"build",signals:[{type:"dependency",key:"esbuild"},{type:"devDependency",key:"esbuild"}]},{name:"Turbopack",slug:"turbopack",category:"build",signals:[{type:"file",pattern:"turbo.json"}]},{name:"Jest",slug:"jest",category:"testing",signals:[{type:"devDependency",key:"jest"},{type:"file",pattern:"jest.config.*"}]},{name:"Vitest",slug:"vitest",category:"testing",signals:[{type:"devDependency",key:"vitest"}]},{name:"Playwright",slug:"playwright",category:"testing",signals:[{type:"devDependency",key:"@playwright/test"},{type:"file",pattern:"playwright.config.*"}]},{name:"Cypress",slug:"cypress",category:"testing",signals:[{type:"devDependency",key:"cypress"},{type:"file",pattern:"cypress.config.*"}]},{name:"Turborepo",slug:"turborepo",category:"monorepo",signals:[{type:"devDependency",key:"turbo"},{type:"file",pattern:"turbo.json"}]},{name:"Nx",slug:"nx",category:"monorepo",signals:[{type:"devDependency",key:"nx"},{type:"file",pattern:"nx.json"}]},{name:"Lerna",slug:"lerna",category:"monorepo",signals:[{type:"devDependency",key:"lerna"},{type:"file",pattern:"lerna.json"}]},{name:"MCP SDK",slug:"mcp",category:"ai",signals:[{type:"dependency",key:"@modelcontextprotocol/sdk"}]},{name:"Anthropic SDK",slug:"anthropic",category:"ai",signals:[{type:"dependency",key:"@anthropic-ai/sdk"}]},{name:"OpenAI SDK",slug:"openai",category:"ai",signals:[{type:"dependency",key:"openai"}]},{name:"LangChain",slug:"langchain",category:"ai",signals:[{type:"dependency",key:"langchain"}]},{name:"Vercel",slug:"vercel",category:"hosting",signals:[{type:"file",pattern:"vercel.json"}]},{name:"Netlify",slug:"netlify",category:"hosting",signals:[{type:"file",pattern:"netlify.toml"}]},{name:"Docker",slug:"docker",category:"hosting",signals:[{type:"file",pattern:"Dockerfile"},{type:"file",pattern:"docker-compose.yml"}]},{name:"Cloudflare Workers",slug:"cloudflare",category:"hosting",signals:[{type:"file",pattern:"wrangler.toml"},{type:"dependency",key:"wrangler"}]},{name:"GitHub Actions",slug:"github-actions",category:"cicd",signals:[{type:"file",pattern:".github/workflows/*.yml"}]},{name:"Commander.js",slug:"commander",category:"cli",signals:[{type:"dependency",key:"commander"}]}];function XG($){let Z=K($,"Cargo.toml");if(!M(Z))return null;try{let X=$0(Z,"utf-8").match(/^\s*\[package\][\s\S]*?^\s*name\s*=\s*"([^"]+)"/m);return X?X[1]:null}catch{return null}}function zG($){let Z=K($,"Cargo.toml");if(!M(Z))return!1;try{let Q=$0(Z,"utf-8");return/^\s*\[\[bin\]\]/m.test(Q)}catch{return!1}}function JG($,Z){if(Z?.keywords?.some((X)=>/^sdk(?:\s|-|$)|-sdk$/i.test(X)))return'package.json keywords contains "sdk"';if(Z?.name&&/(?:^|[-_/])sdk(?:[-_/]|$)/i.test(Z.name))return`package.json name "${Z.name}" → sdk`;let Q=XG($);if(Q&&/(?:^|[-_])sdk(?:[-_]|$)/i.test(Q))return`Cargo.toml name "${Q}" → sdk`;return null}function HG($){let Z=["manifest.json","public/manifest.json","src/manifest.json","app/manifest.json","extension/manifest.json","dist/manifest.json"];for(let Q of Z){let X=K($,Q);if(!M(X))continue;try{let z=JSON.parse($0(X,"utf-8"));if(typeof z.manifest_version==="number")return`${Q} manifest_version ${z.manifest_version} (browser extension)`}catch{}}return null}function UG($){let Z=/(numpy|pandas|jupyter|scikit-learn|sklearn|pytorch|tensorflow|matplotlib|scipy)/i,Q=K($,"pyproject.toml");if(M(Q))try{let J=$0(Q,"utf-8").match(Z);if(J)return`pyproject.toml depends on ${J[1]}`}catch{}let X=K($,"requirements.txt");if(M(X))try{let J=$0(X,"utf-8").match(Z);if(J)return`requirements.txt contains ${J[1]}`}catch{}return null}function qG($,Z){let Q=["react-native","expo","@capacitor/core","@ionic/core"];if(Z){for(let X of Q)if(Z.dependencies?.[X]||Z.devDependencies?.[X])return`${X} dependency`}if(M(K($,"ios"))&&M(K($,"android")))return"ios/ + android/ dirs";return null}function YG($,Z){let Q=K($,"Cargo.toml");if(M(Q))try{let z=$0(Q,"utf-8");if(/crate-type\s*=\s*\[[^\]]*"cdylib"/.test(z))return'Cargo.toml crate-type = ["cdylib"]';if(/wasm-bindgen|wasm-pack/i.test(z))return"Cargo.toml wasm-bindgen/wasm-pack"}catch{}let X=K($,"build.zig");if(M(X))try{let z=$0(X,"utf-8");if(/\.wasm\b|wasm32|setOutputFormat\(\.wasm/i.test(z))return"build.zig wasm target"}catch{}if(Z?.keywords?.some((z)=>/^wasm(?:-|$)|webassembly/i.test(z)))return'package.json keywords contains "wasm"';return null}function BG($,Z){if(!M(K($,"index.html")))return null;if(Z?.dependencies||Z?.devDependencies){let Q={...Z.dependencies??{},...Z.devDependencies??{}};if(["react","vue","svelte","@sveltejs/kit","next","nuxt","astro","gatsby","solid-js","qwik"].some((z)=>Q[z]))return null}return"index.html (vanilla, no frontend framework)"}function GG($,Z){if(Z?.name&&/specification|^@.*\/spec/i.test(Z.name))return`package name "${Z.name}" → documentation`;if(Z?.keywords?.some((Q)=>/^(specification|format-spec|standard)$/i.test(Q)))return'package keywords contains "specification"';if(Z?.bin)return null;if(Z?.files&&Z.files.length>0){let Q=/^(dist|src|lib|build|bin)(\/|$)|\/(dist|src|lib|build|bin)(\/|$)|(\.|\/)(js|ts|tsx|jsx|mjs|cjs|py|rs|go)$/,X=Z.files.some((J)=>Q.test(J)),z=Z.files.some((J)=>/\.(md|MD)$|examples?\//.test(J)||J==="README.md"||J==="docs"||J==="docs/");if(!X&&z)return"package.json files = docs/examples only (no source)"}return null}function VG($,Z,Q){let X=Q.find((z)=>z.slug==="astro"||z.slug==="gatsby");if(X)return`${X.name} (static-site framework)`;if(Z?.keywords?.some((z)=>/^(website|marketing|landing|brochure|portfolio)$/i.test(z)))return'package keywords contains "website"/"marketing"/"landing"';return null}function WG($,Z){if(!Z)return null;let Q={...Z.dependencies??{},...Z.devDependencies??{}},X=["@clerk/nextjs","@clerk/clerk-react","next-auth","@auth/core","auth0","@auth0/nextjs-auth0"],z=["stripe","@stripe/stripe-js","lemonsqueezy"],J=X.some((U)=>Q[U]),H=z.some((U)=>Q[U]);if(J&&H)return"auth + payment dependencies";return null}function _G($,Z,Q){if(Z?.keywords?.some((J)=>/mcpaas/i.test(J)))return'package keywords contains "mcpaas"';if(Z?.name&&/mcpaas/i.test(Z.name))return`package name "${Z.name}" → mcpaas`;let X=Q.some((J)=>J.slug==="mcp"),z=Q.some((J)=>J.category==="database");if(X&&z&&Z?.dependencies&&Object.keys(Z.dependencies).length>10)return"MCP + database + complex deps (platform shape)";return null}function OG($,Z){if(!Z?.private)return null;if(!(!!Z.workspaces||M(K($,"pnpm-workspace.yaml"))))return null;return"private workspace + multi-package"}var DG=new Set(["node_modules","dist","build","out","vendor","target","coverage","docs","doc","e2e","tests","test","__tests__","scripts","deploy","bin","public","examples","example","fixtures","assets","static","migrations","config","contracts","proto","protos"]),M4=/^(Python|Go|Rust|Ruby|Java|Kotlin)$/,IG=new Set(["frontend","backend","database","css","ui","state"]);function KG($){if(M(K($,"pyproject.toml"))||M(K($,"manage.py"))||M(K($,"setup.py"))||n2($,"requirements*.txt"))return!0;if(M(K($,"go.mod")))return!0;if(M(K($,"Cargo.toml")))return!0;if(M(K($,"Gemfile")))return!0;if(M(K($,"pom.xml"))||n2($,"build.gradle*"))return!0;if(s0($).length>0)return!0;let Z=D0($);if(Z&&Object.keys(Z.dependencies??{}).length>0)return!0;return!1}function s2($){let Z;try{Z=u8($,{withFileTypes:!0})}catch{return[]}let Q=[];for(let X of Z){if(!X.isDirectory()||X.name.startsWith(".")||DG.has(X.name))continue;let z=K($,X.name);if(!KG(z))continue;let J=t2(z);if(J==="Unknown")continue;let H=o2(z).filter((B)=>IG.has(B.category)),U=H.find((B)=>B.category==="frontend"),q=H.find((B)=>B.category==="backend"),Y=U??q??H[0]??null;Q.push({name:X.name,language:J,topFramework:Y?.name??null,frontend:!!U,backend:!!q||M4.test(J),hasFramework:!!Y,appRoot:M(K(z,"manage.py"))||M(K(z,"config.ru"))||M(K(z,"bin/rails"))||M(K(z,"artisan"))})}return Q}function MG($,Z){if(Z?.workspaces||M(K($,"pnpm-workspace.yaml")))return null;let Q=s2($),X=new Set(Q.map((z)=>z.language));if(Q.length<2||X.size<2)return null;if(!Q.some((z)=>z.frontend)||!Q.some((z)=>z.backend))return null;return`polyglot: ${Q.map((z)=>`${z.name}/ (${z.language})`).join(", ")}`}function L4($){let Z=s2($);if(Z.length<2)return null;let Q=(H)=>(H.appRoot?2:0)+(M4.test(H.language)?2:0)+(H.hasFramework?1:0)+(H.frontend?0.5:0),X=[...Z].sort((H,U)=>Q(U)-Q(H)),z=new Set,J=[];for(let H of X){if(z.has(H.language))continue;z.add(H.language);let U=H.frontend?"frontend":H.backend?"backend":"service";J.push(H.topFramework?`${H.language} (${H.topFramework} · ${U})`:`${H.language} (${U})`)}return J.join("; ")}function D0($){let Z=K($,"package.json");if(!M(Z))return null;try{return JSON.parse($0(Z,"utf-8"))}catch{return null}}function n2($,Z){if(!Z.includes("*"))return M(K($,Z));let Q=Z.split("/");if(Q.length===1){let U=Z.split("*")[0];try{return u8($).some((q)=>q.startsWith(U))}catch{return!1}}let X=K($,...Q.slice(0,-1)),z=Q[Q.length-1],J=z.split("*")[0],H=z.split("*")[1]||"";try{return u8(X).some((U)=>U.startsWith(J)&&U.endsWith(H))}catch{return!1}}function LG($,Z,Q){switch($.type){case"dependency":return!!Z?.dependencies?.[$.key];case"devDependency":return!!Z?.devDependencies?.[$.key];case"file":return n2(Q,$.pattern);case"content":{if(!$.pattern||!$.key)return!1;if(!n2(Q,$.pattern))return!1;try{let X=K(Q,$.pattern);if(!M(X))return!1;return $0(X,"utf-8").toLowerCase().includes($.key.toLowerCase())}catch{return!1}}default:return!1}}function o2($){let Z=D0($);return K4.map((Q)=>{let z=Q.signals.filter((J)=>LG(J,Z,$)).length/Q.signals.length;return{name:Q.name,slug:Q.slug,category:Q.category,confidence:z}}).filter((Q)=>Q.confidence>0).sort((Q,X)=>X.confidence-Q.confidence)}function t2($){let Z=D0($);if(Z?.devDependencies?.typescript||Z?.dependencies?.typescript)return"TypeScript";if(M(K($,"tsconfig.json")))return"TypeScript";if(M(K($,"Cargo.toml")))return"Rust";if(M(K($,"go.mod")))return"Go";if(s0($).length>0)return"C#";if(M(K($,"pyproject.toml"))||M(K($,"setup.py")))return"Python";if(M(K($,"Gemfile")))return"Ruby";if(x8($)){let Q=E1($);if(Q)return Q.mainLanguage==="Java/Kotlin"?"Kotlin":Q.mainLanguage;return"Java"}if(M(K($,"Package.swift")))return"Swift";if(M(K($,"build.zig")))return"Zig";if(M(K($,"pubspec.yaml")))return"Dart";if(Z)return"JavaScript";return"Unknown"}function R4($){let Z=D0($),Q=o2($),X=[],z=GG($,Z);if(z)return X.push(z),{type:"documentation",found:X};let J=JG($,Z);if(J)return X.push(J),{type:"sdk",found:X};let H=HG($);if(H)return X.push(H),{type:"extension",found:X};let U=_G($,Z,Q);if(U)return X.push(U),{type:"mcpaas",found:X};let q=WG($,Z);if(q)return X.push(q),{type:"saas",found:X};let Y=YG($,Z);if(Y)return X.push(Y),{type:"wasm",found:X};let B=m2($);if(B)return X.push(B.found),{type:B.appType,found:X};let G=d2($);if(G)return X.push(G.found),{type:G.appType,found:X};let V=i2($);if(V)return X.push(V.found),{type:V.appType,found:X};let _=E1($);if(_)return X.push(_.found),{type:_.appType,found:X};let D=a2($);if(D)return X.push(D.found),{type:D.appType,found:X};let W=y1($);if(W)return X.push(W.found),{type:W.appType,found:X};let O=qG($,Z);if(O)return X.push(O),{type:"mobile",found:X};if(Q.some((g)=>g.slug==="mcp"))return X.push("MCP SDK signal"),{type:"mcp",found:X};if(Z?.bin)return X.push("package.json bin"),{type:"cli",found:X};if(zG($))return X.push("Cargo.toml [[bin]]"),{type:"cli",found:X};if(M(K($,"build.zig"))){if(X.push("build.zig"),M(K($,"src/main.zig")))return X.push("src/main.zig"),{type:"cli",found:X};if(M(K($,"src/root.zig")))return X.push("src/root.zig"),{type:"library",found:X}}let R=Q.some((g)=>g.slug==="svelte"||g.slug==="sveltekit");if(Z?.private===!0&&(M(K($,"pnpm-workspace.yaml"))||Z?.workspaces!==void 0)&&R)return X.push("private workspace","Svelte"),{type:"framework",found:X};if(R)return X.push("Svelte/SvelteKit"),{type:"svelte",found:X};let P=Q.some((g)=>g.category==="frontend"),T=Q.some((g)=>g.category==="backend");if(Z?.private&&(Z.workspaces||M(K($,"pnpm-workspace.yaml")))&&P&&T)return X.push("private workspace + frontend + backend frameworks"),{type:"enterprise",found:X};let A=OG($,Z);if(A)return X.push(A),{type:"monorepo-root",found:X};let C=VG($,Z,Q);if(C)return X.push(C),{type:"website",found:X};if(Q.some((g)=>g.slug==="nextjs"||g.slug==="nuxt"))return X.push(Q.find((g)=>g.slug==="nextjs")?"Next.js":"Nuxt"),{type:"fullstack",found:X};let S=Q.some((g)=>g.category==="frontend"),E=Q.some((g)=>g.category==="backend");if(S&&E)return X.push("frontend framework","backend framework"),{type:"fullstack",found:X};if(S)return X.push("frontend framework"),{type:"frontend",found:X};if(E)return X.push("backend framework"),{type:"backend",found:X};let d=UG($);if(d)return X.push(d),{type:"data-science",found:X};let j=BG($,Z);if(j)return X.push(j),{type:"html",found:X};let I0=MG($,Z);if(I0)return X.push(I0),{type:"fullstack",found:X};if(Z?.main&&!Z?.bin)return X.push("package.json main (no bin)"),{type:"library",found:X};return X.push("no classifying signals — fallback"),{type:"library",found:X}}function F4($){if(M(K($,"bunfig.toml")))return"Bun";if(M(K($,"deno.json"))||M(K($,"deno.jsonc")))return"Deno";if(D0($))return"Node.js";if(M(K($,"Cargo.toml")))return"Rust";if(M(K($,"go.mod")))return"Go";if(s0($).length>0)return".NET";if(M(K($,"pubspec.yaml")))return"Dart";return"Unknown"}function N4($){if(M(K($,"pubspec.yaml")))return"pub";if(M(K($,"go.mod")))return"go modules";if(s0($).length>0)return"NuGet";if(M(K($,"pom.xml")))return"maven";if(M(K($,"build.gradle"))||M(K($,"build.gradle.kts"))||M(K($,"settings.gradle"))||M(K($,"settings.gradle.kts")))return"gradle";if(M(K($,"bun.lockb"))||M(K($,"bun.lock")))return"bun";if(M(K($,"pnpm-lock.yaml")))return"pnpm";if(M(K($,"yarn.lock")))return"yarn";if(M(K($,"package-lock.json")))return"npm";return"npm"}function A4($){if(M(K($,".github/workflows")))return"GitHub Actions";if(M(K($,".gitlab-ci.yml")))return"GitLab CI";if(M(K($,".circleci")))return"CircleCI";if(M(K($,"Jenkinsfile")))return"Jenkins";return null}function P4($){if(M(K($,"vercel.json")))return"Vercel";if(M(K($,"netlify.toml")))return"Netlify";if(M(K($,"wrangler.toml")))return"Cloudflare";if(M(K($,"Dockerfile")))return"Docker";if(M(K($,"fly.toml")))return"Fly.io";if(M(K($,"render.yaml")))return"Render";return null}function T4($){let Z=K($,"svelte.config.js");if(!M(Z))return null;try{let X=$0(Z,"utf-8").match(/@sveltejs\/adapter-(\w+)/);if(X){let z=X[1];switch(z){case"vercel":return"Vercel";case"node":return"Node";case"static":return"Static";case"cloudflare":return"Cloudflare";case"netlify":return"Netlify";case"auto":return"Auto";default:return z}}return null}catch{return null}}function C4($){let Z=D0($);if(Z?.devDependencies?.vite||Z?.dependencies?.vite)return"Vite";if(Z?.devDependencies?.webpack||Z?.dependencies?.webpack)return"webpack";if(Z?.devDependencies?.esbuild||Z?.dependencies?.esbuild)return"esbuild";if(M(K($,"tsconfig.json"))&&Z?.devDependencies?.typescript)return"TypeScript (tsc)";return null}function w4($){return["package.json","Cargo.toml","pyproject.toml","go.mod","build.zig","build.zig.zon","src/index.ts","src/index.js","src/main.ts","src/cli.ts","src/main.rs","src/lib.rs","src/main.zig","src/root.zig","src/__init__.py","main.py","__main__.py","main.go","cmd/main.go","README.md","SPECIFICATION.md","BINARY-FORMAT.md","tsconfig.json","wrangler.toml","vercel.json"].filter((Q)=>M(K($,Q)))}function b4($,Z){let Q={};if(Z?.scripts){for(let X of["build","test","lint","dev","start"])if(Z.scripts[X]){let z=M(K($,"bun.lock"))||M(K($,"bun.lockb"))?"bun run":"npm run";Q[X]=`${z} ${X}`}}if(M(K($,"Cargo.toml"))){if(!Q.build)Q.build="cargo build --release";if(!Q.test)Q.test="cargo test";if(!Q.lint)Q.lint="cargo clippy"}if(M(K($,"build.zig"))){if(!Q.build)Q.build="zig build";if(!Q.test)Q.test="zig build test"}if(M(K($,"go.mod"))){if(!Q.build)Q.build="go build ./...";if(!Q.test)Q.test="go test ./..."}if(M(K($,"pyproject.toml"))||M(K($,"pytest.ini"))){if(!Q.test)Q.test="pytest"}return Q}function E4($,Z,Q,X){let z=[];if(X&&X!=="Unknown")z.push(X);let J=new Set(["frontend","backend","database","build","css","state","monorepo"]);for(let H of Q)if(J.has(H.category))z.push(H.name);if(M(K($,"bunfig.toml")))z.push("Bun");else if(M(K($,"deno.json"))||M(K($,"deno.jsonc")))z.push("Deno");if(z.length<3&&Z?.dependencies){let H=Object.keys(Z.dependencies).slice(0,5);for(let U of H)if(!z.some((q)=>q.toLowerCase().includes(U.toLowerCase())))z.push(U)}return z}function S4($){let Z=D0($),Q=o2($),X=R4($),z=X.type,J=X.found.some((b)=>b.startsWith("polyglot:")),H=J&&L4($)||t2($),U=F4($),q=N4($),Y=A4($),B=P4($),G=C4($),V=Q.find((b)=>b.category==="frontend"),_=Q.find((b)=>b.category==="css"),D=Q.find((b)=>b.category==="ui"),W=Q.find((b)=>b.category==="state"),O=Q.find((b)=>b.category==="backend"),I=Q.find((b)=>b.category==="database"),R=S0[z]||S0.library,N=z==="framework",P=Q.some((b)=>b.slug==="svelte"||b.slug==="sveltekit"),T=N&&P?"svelte":N?null:null,A=z==="svelte"||T==="svelte",C=A?T4($):null,L=A&&Q.some((b)=>b.slug==="sveltekit"),S=new Set(["css_framework","ui_library","database","connection","hosting"]),E={},d=v.filter((b)=>b.path.startsWith("stack."));for(let b of d){let x=b.path.replace("stack.","");if(!R.includes(b.category)){E[x]="slotignored";continue}if(N&&S.has(x)){E[x]="slotignored";continue}switch(x){case"frontend":E[x]=V?.name??(z==="cli"?"CLI":"");break;case"css_framework":E[x]=_?.name??"";break;case"ui_library":E[x]=D?.name??"";break;case"state_management":E[x]=A?W?.name??"Runes":W?.name??"";break;case"backend":E[x]=A?L?"SvelteKit":O?.name??"":O?.name??"";break;case"api_type":E[x]=L?"Server Routes":"";break;case"runtime":E[x]=U!=="Unknown"?U:"";break;case"database":E[x]=I?.name??"";break;case"connection":E[x]=I?.name??"";break;case"hosting":if(A&&C)E[x]=C;else E[x]=B??"";break;case"build":E[x]=A?"Vite":G??"";break;case"cicd":E[x]=Y??"";break;case"package_manager":E[x]=q;break;default:E[x]="";break}}let j={},I0=v.filter((b)=>b.path.startsWith("monorepo."));for(let b of I0){let x=b.path.replace("monorepo.","");if(!R.includes(b.category))j[x]="slotignored";else j[x]=""}let g={name:Z?.name??$.split("/").pop()??"project",goal:J?"":Z?.description??"",main_language:H,type:z};if(N&&T)g.framework=T;let m1=E4($,Z,Q,J?t2($):H);if(J){for(let b of s2($))for(let x of[b.language,b.topFramework])if(x&&!m1.includes(x))m1.push(x)}let r8=w4($),a8=b4($,Z),l1={faf_version:I4,project:g,stack:E,human_context:{who:"",what:J?"":Z?.description??"",why:"",where:"",when:"",how:""},monorepo:j,_meta:{found:X.found}};if(m1.length>0)l1.tech_stack=m1;if(r8.length>0)l1.key_files=r8;if(Object.keys(a8).length>0)l1.commands=a8;return l1}import{existsSync as FG,readFileSync as NG}from"fs";import{join as AG}from"path";var j4={MIN_LENGTH:8,MAX_LENGTH:280},RG=[/^(see|see\s+the?)\s+readme/i,/^(tbd|todo|fixme|coming\s+soon)\b/i,/^(software|application|app|project|tool|library|framework)\.?$/i,/^(for\s+users|for\s+developers)\.?$/i,/^(description|goal|name|title)\.?$/i,/^lorem\s+ipsum/i,/^example(\s+\w+)?\.?$/i];function s($){let Z=$.trim();if(Z.length<j4.MIN_LENGTH)return!1;if(Z.length>j4.MAX_LENGTH)return!1;if(RG.some((Q)=>Q.test(Z)))return!1;if(/^[\s|\-*+]/.test(Z))return!1;if(Z.split(`
224
- `).length>4)return!1;return!0}function PG($){let Z=$.split(`
223
+ `).replace(/<[^>]+>/g,"").replace(/!\[[^\]]*\]\([^)]*\)/g,"").trim()}function v0($){return $.replace(/\s+/g," ").replace(/[#*`>]/g,"").trim().slice(0,280)}function fV($){if(!$)return 0;return($.match(/\[[^\]]*\]\([^)]*\)/g)??[]).join("").length/$.length}function J2($,Z){let Q=new RegExp(`##?\\s+(${Z})\\s*\\n+([\\s\\S]+?)(?:\\n\\n|\\n##?|$)`,"i"),X=$.match(Q);if(!X||!X[2]||X[2].trim().length<=20||fV(X[2])>0.4)return null;return{body:v0(X[2]),heading:X[1].trim()}}function kV($){let Z=$.trim();if(/^>/.test(Z))return!0;if(/\b(nightly (release|build)|pre-?release|work[-\s]in[-\s]progress|rough edges|early (access|testing|preview)|use at your own risk|not (yet )?production[-\s]?ready|expect (rough|breaking)|experimental release)\b/i.test(Z))return!0;let Q=Z.split(/[·|]/).map((X)=>X.trim()).filter(Boolean);if(Q.length>=3&&Q.every((X)=>X.length<=24))return!0;return!1}function i2($,Z,Q=30){for(let X of Z){let z=$.match(X);if(z&&z[1]&&z[1].trim().length>=Q)return v0(z[1])}return null}function uV($,Z){if($?.description&&$.description.length>20)return k(v0($.description),"package.json:description",0.95);let Q=J2(Z,"Purpose|What|About|Overview|Description");if(Q)return k(Q.body,`README:## ${Q.heading}`,0.8);let X=Z.split(/\n\s*\n/).map((J)=>J.replace(/\s+/g," ").trim()).find((J)=>J.length>30&&!J.startsWith("#")&&!kV(J));if(X)return k(v0(X),"README:first-paragraph",0.5);let z=i2(Z,[/(?:core|main|primary)\s+(?:problem|challenge)(?:\s+is)?\s*:?\s*([^.\n]{30,})/i,/solves?\s+(?:the\s+)?(?:problem\s+of\s+)?([^.\n]{30,})/i]);return z?k(z,"README:problem-heuristic",0.6):null}function mV($){let Z=J2($,"Audience|Who|Who is this for|Who it.s for");if(Z)return k(Z.body,`README:## ${Z.heading}`,0.8);let Q=i2($,[/\b(?:designed|built|made)\s+for\s+((?:[a-z][a-z-]*\s+)?(?:developers?|teams?|engineers?|builders?|founders?)[^.\n]{0,80})/i,/\bfor\s+((?:[a-z][a-z-]*\s+)?(?:developers?|teams?|engineers?|builders?|founders?)[^.\n]{0,80})/i],8);return Q?k(Q,"README:audience-heuristic",0.6):null}function pV($){let Z=J2($,"Why|Mission|Motivation|Rationale|Vision");if(Z)return k(Z.body,`README:## ${Z.heading}`,0.8);let Q=i2($,[/(?:our\s+|the\s+)?(?:mission|purpose|goal)\s+is\s+([^.\n]{30,})/i,/\b(?:mission|purpose|goal)\s*:\s*([^.\n]{30,})/i,/(?:built|created|designed)\s+(?:because|to)\s+([^.\n]{30,})/i]);return Q?k(Q,"README:mission-heuristic",0.6):null}function lV($,Z){let Q=typeof $?.repository==="string"?$.repository:$?.repository?.url;if(Q)return k(v0(Q.replace(/^git\+/,"").replace(/\.git$/,"")),"package.json:repository",0.95);if($?.homepage)return k(v0($.homepage),"package.json:homepage",0.9);let X=i2(Z,[/\b(?:deployed|hosted|available|published)\s+(?:on|at|via)\s+([^.\n]{3,80})/i],3);return X?k(X,"README:deploy-heuristic",0.6):null}function dV($){let Z=J2($,"Timeline|Status|Release|Roadmap");if(Z)return k(Z.body,`README:## ${Z.heading}`,0.8);let Q=i2($,[/\b(production\s+since\s+[^.\n]{4,60})/i,/\b((?:in\s+)?(?:production|beta|alpha|development)\s+since\s+[^.\n]{4,60})/i,/\bsince\s+((?:[A-Z][a-z]+\s+)?\d{4}[^.\n]{0,40})/],4);return Q?k(Q,"README:since-heuristic",0.6):null}function cV($,Z){let Q=$?.scripts?Object.keys($.scripts):[],X=["start","dev","build"].filter((H)=>Q.includes(H));if(X.length)return k(v0(X.map((H)=>`npm run ${H}`).join(", ")),"package.json:scripts",0.9);let z=J2(Z,"Usage|Getting Started|Install|Installation|Quick Start");if(z)return k(z.body,`README:## ${z.heading}`,0.8);let J=J2(Z,"Architecture|Approach|How it works|Methodology|How");return J?k(J.body,`README:## ${J.heading}`,0.7):null}var g5="3.0";import{existsSync as R,readFileSync as H0,readdirSync as t8}from"fs";import{join as K}from"path";var y5=[{name:"Next.js",slug:"nextjs",category:"frontend",signals:[{type:"dependency",key:"next"},{type:"file",pattern:"next.config.*"}]},{name:"React",slug:"react",category:"frontend",signals:[{type:"dependency",key:"react"}]},{name:"SvelteKit",slug:"sveltekit",category:"frontend",signals:[{type:"dependency",key:"@sveltejs/kit"},{type:"file",pattern:"svelte.config.*"}]},{name:"Svelte",slug:"svelte",category:"frontend",signals:[{type:"dependency",key:"svelte"},{type:"devDependency",key:"svelte"}]},{name:"Vue.js",slug:"vue",category:"frontend",signals:[{type:"dependency",key:"vue"}]},{name:"Nuxt",slug:"nuxt",category:"frontend",signals:[{type:"dependency",key:"nuxt"},{type:"file",pattern:"nuxt.config.*"}]},{name:"Angular",slug:"angular",category:"frontend",signals:[{type:"dependency",key:"@angular/core"},{type:"file",pattern:"angular.json"}]},{name:"Astro",slug:"astro",category:"frontend",signals:[{type:"dependency",key:"astro"},{type:"file",pattern:"astro.config.*"}]},{name:"Solid",slug:"solid",category:"frontend",signals:[{type:"dependency",key:"solid-js"}]},{name:"Remix",slug:"remix",category:"frontend",signals:[{type:"dependency",key:"@remix-run/react"}]},{name:"Gatsby",slug:"gatsby",category:"frontend",signals:[{type:"dependency",key:"gatsby"},{type:"file",pattern:"gatsby-config.*"}]},{name:"Qwik",slug:"qwik",category:"frontend",signals:[{type:"dependency",key:"@builder.io/qwik"}]},{name:"Vercel (SvelteKit)",slug:"adapter-vercel",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-vercel"},{type:"devDependency",key:"@sveltejs/adapter-vercel"}]},{name:"Node (SvelteKit)",slug:"adapter-node",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-node"},{type:"devDependency",key:"@sveltejs/adapter-node"}]},{name:"Static (SvelteKit)",slug:"adapter-static",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-static"},{type:"devDependency",key:"@sveltejs/adapter-static"}]},{name:"Cloudflare (SvelteKit)",slug:"adapter-cloudflare",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-cloudflare"},{type:"devDependency",key:"@sveltejs/adapter-cloudflare"}]},{name:"Netlify (SvelteKit)",slug:"adapter-netlify",category:"hosting",signals:[{type:"dependency",key:"@sveltejs/adapter-netlify"},{type:"devDependency",key:"@sveltejs/adapter-netlify"}]},{name:"Tailwind CSS",slug:"tailwind",category:"css",signals:[{type:"dependency",key:"tailwindcss"},{type:"devDependency",key:"tailwindcss"},{type:"file",pattern:"tailwind.config.*"}]},{name:"Bootstrap",slug:"bootstrap",category:"css",signals:[{type:"dependency",key:"bootstrap"}]},{name:"Styled Components",slug:"styled-components",category:"css",signals:[{type:"dependency",key:"styled-components"}]},{name:"shadcn/ui",slug:"shadcn",category:"ui",signals:[{type:"file",pattern:"components.json"},{type:"dependency",key:"@radix-ui/react-dialog"}]},{name:"Material UI",slug:"mui",category:"ui",signals:[{type:"dependency",key:"@mui/material"}]},{name:"Chakra UI",slug:"chakra",category:"ui",signals:[{type:"dependency",key:"@chakra-ui/react"}]},{name:"Ant Design",slug:"antd",category:"ui",signals:[{type:"dependency",key:"antd"}]},{name:"Redux",slug:"redux",category:"state",signals:[{type:"dependency",key:"@reduxjs/toolkit"}]},{name:"Zustand",slug:"zustand",category:"state",signals:[{type:"dependency",key:"zustand"}]},{name:"Jotai",slug:"jotai",category:"state",signals:[{type:"dependency",key:"jotai"}]},{name:"Pinia",slug:"pinia",category:"state",signals:[{type:"dependency",key:"pinia"}]},{name:"Express",slug:"express",category:"backend",signals:[{type:"dependency",key:"express"}]},{name:"Fastify",slug:"fastify",category:"backend",signals:[{type:"dependency",key:"fastify"}]},{name:"Hono",slug:"hono",category:"backend",signals:[{type:"dependency",key:"hono"}]},{name:"Elysia",slug:"elysia",category:"backend",signals:[{type:"dependency",key:"elysia"}]},{name:"NestJS",slug:"nestjs",category:"backend",signals:[{type:"dependency",key:"@nestjs/core"}]},{name:"Koa",slug:"koa",category:"backend",signals:[{type:"dependency",key:"koa"}]},{name:"Django",slug:"django",category:"backend",signals:[{type:"file",pattern:"manage.py"},{type:"file",pattern:"settings.py"}]},{name:"Flask",slug:"flask",category:"backend",signals:[{type:"content",pattern:"app.py",key:"flask"}]},{name:"FastAPI",slug:"fastapi",category:"backend",signals:[{type:"content",pattern:"main.py",key:"fastapi"}]},{name:"Rails",slug:"rails",category:"backend",signals:[{type:"content",pattern:"Gemfile",key:"rails"},{type:"content",pattern:"Gemfile.lock",key:"rails ("},{type:"file",pattern:"config/application.rb"},{type:"file",pattern:"config/routes.rb"}]},{name:"Spring Boot",slug:"spring",category:"backend",signals:[{type:"content",pattern:"pom.xml",key:"spring-boot"},{type:"content",pattern:"build.gradle",key:"springframework.boot"},{type:"content",pattern:"build.gradle.kts",key:"springframework.boot"},{type:"content",pattern:"gradle/libs.versions.toml",key:"springframework.boot"}]},{name:"Vapor",slug:"vapor",category:"backend",signals:[{type:"content",pattern:"Package.swift",key:"vapor/vapor"},{type:"content",pattern:"Package.swift",key:'product(name: "Vapor"'},{type:"content",pattern:"Package.swift",key:"product(name: 'Vapor'"},{type:"file",pattern:"Sources/App/configure.swift"}]},{name:"Hummingbird",slug:"hummingbird",category:"backend",signals:[{type:"content",pattern:"Package.swift",key:"hummingbird-project/hummingbird"},{type:"content",pattern:"Package.swift",key:'product(name: "Hummingbird"'},{type:"content",pattern:"Package.swift",key:"product(name: 'Hummingbird'"}]},{name:"Prisma",slug:"prisma",category:"database",signals:[{type:"dependency",key:"prisma"},{type:"devDependency",key:"prisma"},{type:"file",pattern:"prisma/schema.prisma"}]},{name:"Drizzle",slug:"drizzle",category:"database",signals:[{type:"dependency",key:"drizzle-orm"},{type:"file",pattern:"drizzle.config.*"}]},{name:"TypeORM",slug:"typeorm",category:"database",signals:[{type:"dependency",key:"typeorm"}]},{name:"Mongoose",slug:"mongoose",category:"database",signals:[{type:"dependency",key:"mongoose"}]},{name:"Vite",slug:"vite",category:"build",signals:[{type:"dependency",key:"vite"},{type:"devDependency",key:"vite"},{type:"file",pattern:"vite.config.*"}]},{name:"webpack",slug:"webpack",category:"build",signals:[{type:"dependency",key:"webpack"},{type:"devDependency",key:"webpack"},{type:"file",pattern:"webpack.config.*"}]},{name:"esbuild",slug:"esbuild",category:"build",signals:[{type:"dependency",key:"esbuild"},{type:"devDependency",key:"esbuild"}]},{name:"Turbopack",slug:"turbopack",category:"build",signals:[{type:"file",pattern:"turbo.json"}]},{name:"Jest",slug:"jest",category:"testing",signals:[{type:"devDependency",key:"jest"},{type:"file",pattern:"jest.config.*"}]},{name:"Vitest",slug:"vitest",category:"testing",signals:[{type:"devDependency",key:"vitest"}]},{name:"Playwright",slug:"playwright",category:"testing",signals:[{type:"devDependency",key:"@playwright/test"},{type:"file",pattern:"playwright.config.*"}]},{name:"Cypress",slug:"cypress",category:"testing",signals:[{type:"devDependency",key:"cypress"},{type:"file",pattern:"cypress.config.*"}]},{name:"Turborepo",slug:"turborepo",category:"monorepo",signals:[{type:"devDependency",key:"turbo"},{type:"file",pattern:"turbo.json"}]},{name:"Nx",slug:"nx",category:"monorepo",signals:[{type:"devDependency",key:"nx"},{type:"file",pattern:"nx.json"}]},{name:"Lerna",slug:"lerna",category:"monorepo",signals:[{type:"devDependency",key:"lerna"},{type:"file",pattern:"lerna.json"}]},{name:"MCP SDK",slug:"mcp",category:"ai",signals:[{type:"dependency",key:"@modelcontextprotocol/sdk"}]},{name:"Anthropic SDK",slug:"anthropic",category:"ai",signals:[{type:"dependency",key:"@anthropic-ai/sdk"}]},{name:"OpenAI SDK",slug:"openai",category:"ai",signals:[{type:"dependency",key:"openai"}]},{name:"LangChain",slug:"langchain",category:"ai",signals:[{type:"dependency",key:"langchain"}]},{name:"Vercel",slug:"vercel",category:"hosting",signals:[{type:"file",pattern:"vercel.json"}]},{name:"Netlify",slug:"netlify",category:"hosting",signals:[{type:"file",pattern:"netlify.toml"}]},{name:"Docker",slug:"docker",category:"hosting",signals:[{type:"file",pattern:"Dockerfile"},{type:"file",pattern:"docker-compose.yml"}]},{name:"Cloudflare Workers",slug:"cloudflare",category:"hosting",signals:[{type:"file",pattern:"wrangler.toml"},{type:"dependency",key:"wrangler"}]},{name:"GitHub Actions",slug:"github-actions",category:"cicd",signals:[{type:"file",pattern:".github/workflows/*.yml"}]},{name:"Commander.js",slug:"commander",category:"cli",signals:[{type:"dependency",key:"commander"}]}];function iV($){let Z=K($,"Cargo.toml");if(!R(Z))return null;try{let X=H0(Z,"utf-8").match(/^\s*\[package\][\s\S]*?^\s*name\s*=\s*"([^"]+)"/m);return X?X[1]:null}catch{return null}}function rV($){let Z=K($,"Cargo.toml");if(!R(Z))return!1;try{let Q=H0(Z,"utf-8");return/^\s*\[\[bin\]\]/m.test(Q)}catch{return!1}}function nV($,Z){if(Z?.keywords?.some((X)=>/^sdk(?:\s|-|$)|-sdk$/i.test(X)))return'package.json keywords contains "sdk"';if(Z?.name&&/(?:^|[-_/])sdk(?:[-_/]|$)/i.test(Z.name))return`package.json name "${Z.name}" → sdk`;let Q=iV($);if(Q&&/(?:^|[-_])sdk(?:[-_]|$)/i.test(Q))return`Cargo.toml name "${Q}" → sdk`;return null}function aV($){let Z=["manifest.json","public/manifest.json","src/manifest.json","app/manifest.json","extension/manifest.json","dist/manifest.json"];for(let Q of Z){let X=K($,Q);if(!R(X))continue;try{let z=JSON.parse(H0(X,"utf-8"));if(typeof z.manifest_version==="number")return`${Q} manifest_version ${z.manifest_version} (browser extension)`}catch{}}return null}function sV($){let Z=/(numpy|pandas|jupyter|scikit-learn|sklearn|pytorch|tensorflow|matplotlib|scipy)/i,Q=K($,"pyproject.toml");if(R(Q))try{let J=H0(Q,"utf-8").match(Z);if(J)return`pyproject.toml depends on ${J[1]}`}catch{}let X=K($,"requirements.txt");if(R(X))try{let J=H0(X,"utf-8").match(Z);if(J)return`requirements.txt contains ${J[1]}`}catch{}return null}function oV($,Z){let Q=["react-native","expo","@capacitor/core","@ionic/core"];if(Z){for(let X of Q)if(Z.dependencies?.[X]||Z.devDependencies?.[X])return`${X} dependency`}if(R(K($,"ios"))&&R(K($,"android")))return"ios/ + android/ dirs";return null}function tV($,Z){let Q=K($,"Cargo.toml");if(R(Q))try{let z=H0(Q,"utf-8");if(/crate-type\s*=\s*\[[^\]]*"cdylib"/.test(z))return'Cargo.toml crate-type = ["cdylib"]';if(/wasm-bindgen|wasm-pack/i.test(z))return"Cargo.toml wasm-bindgen/wasm-pack"}catch{}let X=K($,"build.zig");if(R(X))try{let z=H0(X,"utf-8");if(/\.wasm\b|wasm32|setOutputFormat\(\.wasm/i.test(z))return"build.zig wasm target"}catch{}if(Z?.keywords?.some((z)=>/^wasm(?:-|$)|webassembly/i.test(z)))return'package.json keywords contains "wasm"';return null}function eV($,Z){if(!R(K($,"index.html")))return null;if(Z?.dependencies||Z?.devDependencies){let Q={...Z.dependencies??{},...Z.devDependencies??{}};if(["react","vue","svelte","@sveltejs/kit","next","nuxt","astro","gatsby","solid-js","qwik"].some((z)=>Q[z]))return null}return"index.html (vanilla, no frontend framework)"}function $B($,Z){if(Z?.name&&/specification|^@.*\/spec/i.test(Z.name))return`package name "${Z.name}" → documentation`;if(Z?.keywords?.some((Q)=>/^(specification|format-spec|standard)$/i.test(Q)))return'package keywords contains "specification"';if(Z?.bin)return null;if(Z?.files&&Z.files.length>0){let Q=/^(dist|src|lib|build|bin)(\/|$)|\/(dist|src|lib|build|bin)(\/|$)|(\.|\/)(js|ts|tsx|jsx|mjs|cjs|py|rs|go)$/,X=Z.files.some((J)=>Q.test(J)),z=Z.files.some((J)=>/\.(md|MD)$|examples?\//.test(J)||J==="README.md"||J==="docs"||J==="docs/");if(!X&&z)return"package.json files = docs/examples only (no source)"}return null}function ZB($,Z,Q){let X=Q.find((z)=>z.slug==="astro"||z.slug==="gatsby");if(X)return`${X.name} (static-site framework)`;if(Z?.keywords?.some((z)=>/^(website|marketing|landing|brochure|portfolio)$/i.test(z)))return'package keywords contains "website"/"marketing"/"landing"';return null}function QB($,Z){if(!Z)return null;let Q={...Z.dependencies??{},...Z.devDependencies??{}},X=["@clerk/nextjs","@clerk/clerk-react","next-auth","@auth/core","auth0","@auth0/nextjs-auth0"],z=["stripe","@stripe/stripe-js","lemonsqueezy"],J=X.some((U)=>Q[U]),H=z.some((U)=>Q[U]);if(J&&H)return"auth + payment dependencies";return null}function XB($,Z,Q){if(Z?.keywords?.some((J)=>/mcpaas/i.test(J)))return'package keywords contains "mcpaas"';if(Z?.name&&/mcpaas/i.test(Z.name))return`package name "${Z.name}" → mcpaas`;let X=Q.some((J)=>J.slug==="mcp"),z=Q.some((J)=>J.category==="database");if(X&&z&&Z?.dependencies&&Object.keys(Z.dependencies).length>10)return"MCP + database + complex deps (platform shape)";return null}function zB($,Z){if(!Z?.private)return null;if(!(!!Z.workspaces||R(K($,"pnpm-workspace.yaml"))))return null;return"private workspace + multi-package"}var JB=new Set(["node_modules","dist","build","out","vendor","target","coverage","docs","doc","e2e","tests","test","__tests__","scripts","deploy","bin","public","examples","example","fixtures","assets","static","migrations","config","contracts","proto","protos"]),h5=/^(Python|Go|Rust|Ruby|Java|Kotlin)$/,HB=new Set(["frontend","backend","database","css","ui","state"]);function UB($){if(R(K($,"pyproject.toml"))||R(K($,"manage.py"))||R(K($,"setup.py"))||X$($,"requirements*.txt"))return!0;if(R(K($,"go.mod")))return!0;if(R(K($,"Cargo.toml")))return!0;if(R(K($,"Gemfile")))return!0;if(R(K($,"pom.xml"))||X$($,"build.gradle*"))return!0;if(z2($).length>0)return!0;let Z=P0($);if(Z&&Object.keys(Z.dependencies??{}).length>0)return!0;return!1}function z$($){let Z;try{Z=t8($,{withFileTypes:!0})}catch{return[]}let Q=[];for(let X of Z){if(!X.isDirectory()||X.name.startsWith(".")||JB.has(X.name))continue;let z=K($,X.name);if(!UB(z))continue;let J=H$(z);if(J==="Unknown")continue;let H=J$(z).filter((G)=>HB.has(G.category)),U=H.find((G)=>G.category==="frontend"),q=H.find((G)=>G.category==="backend"),Y=U??q??H[0]??null;Q.push({name:X.name,language:J,topFramework:Y?.name??null,frontend:!!U,backend:!!q||h5.test(J),hasFramework:!!Y,appRoot:R(K(z,"manage.py"))||R(K(z,"config.ru"))||R(K(z,"bin/rails"))||R(K(z,"artisan"))})}return Q}function qB($,Z){if(Z?.workspaces||R(K($,"pnpm-workspace.yaml")))return null;let Q=z$($),X=new Set(Q.map((z)=>z.language));if(Q.length<2||X.size<2)return null;if(!Q.some((z)=>z.frontend)||!Q.some((z)=>z.backend))return null;return`polyglot: ${Q.map((z)=>`${z.name}/ (${z.language})`).join(", ")}`}function v5($){let Z=z$($);if(Z.length<2)return null;let Q=(H)=>(H.appRoot?2:0)+(h5.test(H.language)?2:0)+(H.hasFramework?1:0)+(H.frontend?0.5:0),X=[...Z].sort((H,U)=>Q(U)-Q(H)),z=new Set,J=[];for(let H of X){if(z.has(H.language))continue;z.add(H.language);let U=H.frontend?"frontend":H.backend?"backend":"service";J.push(H.topFramework?`${H.language} (${H.topFramework} · ${U})`:`${H.language} (${U})`)}return J.join("; ")}function P0($){let Z=K($,"package.json");if(!R(Z))return null;try{return JSON.parse(H0(Z,"utf-8"))}catch{return null}}function X$($,Z){if(!Z.includes("*"))return R(K($,Z));let Q=Z.split("/");if(Q.length===1){let U=Z.split("*")[0];try{return t8($).some((q)=>q.startsWith(U))}catch{return!1}}let X=K($,...Q.slice(0,-1)),z=Q[Q.length-1],J=z.split("*")[0],H=z.split("*")[1]||"";try{return t8(X).some((U)=>U.startsWith(J)&&U.endsWith(H))}catch{return!1}}function YB($,Z,Q){switch($.type){case"dependency":return!!Z?.dependencies?.[$.key];case"devDependency":return!!Z?.devDependencies?.[$.key];case"file":return X$(Q,$.pattern);case"content":{if(!$.pattern||!$.key)return!1;if(!X$(Q,$.pattern))return!1;try{let X=K(Q,$.pattern);if(!R(X))return!1;return H0(X,"utf-8").toLowerCase().includes($.key.toLowerCase())}catch{return!1}}default:return!1}}function J$($){let Z=P0($);return y5.map((Q)=>{let z=Q.signals.filter((J)=>YB(J,Z,$)).length/Q.signals.length;return{name:Q.name,slug:Q.slug,category:Q.category,confidence:z}}).filter((Q)=>Q.confidence>0).sort((Q,X)=>X.confidence-Q.confidence)}function H$($){let Z=P0($);if(Z?.devDependencies?.typescript||Z?.dependencies?.typescript)return"TypeScript";if(R(K($,"tsconfig.json")))return"TypeScript";if(R(K($,"Cargo.toml")))return"Rust";if(R(K($,"go.mod")))return"Go";if(z2($).length>0)return"C#";if(R(K($,"pyproject.toml"))||R(K($,"setup.py")))return"Python";if(R(K($,"Gemfile")))return"Ruby";if(r8($)){let Q=k2($);if(Q)return Q.mainLanguage==="Java/Kotlin"?"Kotlin":Q.mainLanguage;return"Java"}if(R(K($,"Package.swift")))return"Swift";if(R(K($,"build.zig")))return"Zig";if(R(K($,"pubspec.yaml")))return"Dart";if(Z)return"JavaScript";return"Unknown"}function f5($){let Z=P0($),Q=J$($),X=[],z=$B($,Z);if(z)return X.push(z),{type:"documentation",found:X};let J=nV($,Z);if(J)return X.push(J),{type:"sdk",found:X};let H=aV($);if(H)return X.push(H),{type:"extension",found:X};let U=XB($,Z,Q);if(U)return X.push(U),{type:"mcpaas",found:X};let q=QB($,Z);if(q)return X.push(q),{type:"saas",found:X};let Y=tV($,Z);if(Y)return X.push(Y),{type:"wasm",found:X};let G=r1($);if(G)return X.push(G.found),{type:G.appType,found:X};let V=s1($);if(V)return X.push(V.found),{type:V.appType,found:X};let B=t1($);if(B)return X.push(B.found),{type:B.appType,found:X};let _=k2($);if(_)return X.push(_.found),{type:_.appType,found:X};let D=$$($);if(D)return X.push(D.found),{type:D.appType,found:X};let W=c2($);if(W)return X.push(W.found),{type:W.appType,found:X};let O=oV($,Z);if(O)return X.push(O),{type:"mobile",found:X};if(Q.some((x)=>x.slug==="mcp"))return X.push("MCP SDK signal"),{type:"mcp",found:X};if(Z?.bin)return X.push("package.json bin"),{type:"cli",found:X};if(rV($))return X.push("Cargo.toml [[bin]]"),{type:"cli",found:X};if(R(K($,"build.zig"))){if(X.push("build.zig"),R(K($,"src/main.zig")))return X.push("src/main.zig"),{type:"cli",found:X};if(R(K($,"src/root.zig")))return X.push("src/root.zig"),{type:"library",found:X}}let N=Q.some((x)=>x.slug==="svelte"||x.slug==="sveltekit");if(Z?.private===!0&&(R(K($,"pnpm-workspace.yaml"))||Z?.workspaces!==void 0)&&N)return X.push("private workspace","Svelte"),{type:"framework",found:X};if(N)return X.push("Svelte/SvelteKit"),{type:"svelte",found:X};let A=Q.some((x)=>x.category==="frontend"),w=Q.some((x)=>x.category==="backend");if(Z?.private&&(Z.workspaces||R(K($,"pnpm-workspace.yaml")))&&A&&w)return X.push("private workspace + frontend + backend frameworks"),{type:"enterprise",found:X};let T=zB($,Z);if(T)return X.push(T),{type:"monorepo-root",found:X};let C=ZB($,Z,Q);if(C)return X.push(C),{type:"website",found:X};if(Q.some((x)=>x.slug==="nextjs"||x.slug==="nuxt"))return X.push(Q.find((x)=>x.slug==="nextjs")?"Next.js":"Nuxt"),{type:"fullstack",found:X};let S=Q.some((x)=>x.category==="frontend"),E=Q.some((x)=>x.category==="backend");if(S&&E)return X.push("frontend framework","backend framework"),{type:"fullstack",found:X};if(S)return X.push("frontend framework"),{type:"frontend",found:X};if(E)return X.push("backend framework"),{type:"backend",found:X};let m=sV($);if(m)return X.push(m),{type:"data-science",found:X};let M=eV($,Z);if(M)return X.push(M),{type:"html",found:X};let b=qB($,Z);if(b)return X.push(b),{type:"fullstack",found:X};if(Z?.main&&!Z?.bin)return X.push("package.json main (no bin)"),{type:"library",found:X};return X.push("no classifying signals — fallback"),{type:"library",found:X}}function k5($){if(R(K($,"bunfig.toml")))return"Bun";if(R(K($,"deno.json"))||R(K($,"deno.jsonc")))return"Deno";if(P0($))return"Node.js";if(R(K($,"Cargo.toml")))return"Rust";if(R(K($,"go.mod")))return"Go";if(z2($).length>0)return".NET";if(R(K($,"pubspec.yaml")))return"Dart";return"Unknown"}function u5($){if(R(K($,"pubspec.yaml")))return"pub";if(R(K($,"go.mod")))return"go modules";if(z2($).length>0)return"NuGet";if(R(K($,"pom.xml")))return"maven";if(R(K($,"build.gradle"))||R(K($,"build.gradle.kts"))||R(K($,"settings.gradle"))||R(K($,"settings.gradle.kts")))return"gradle";if(R(K($,"bun.lockb"))||R(K($,"bun.lock")))return"bun";if(R(K($,"pnpm-lock.yaml")))return"pnpm";if(R(K($,"yarn.lock")))return"yarn";if(R(K($,"package-lock.json")))return"npm";return"npm"}function m5($){if(R(K($,".github/workflows")))return"GitHub Actions";if(R(K($,".gitlab-ci.yml")))return"GitLab CI";if(R(K($,".circleci")))return"CircleCI";if(R(K($,"Jenkinsfile")))return"Jenkins";return null}function p5($){if(R(K($,"vercel.json")))return"Vercel";if(R(K($,"netlify.toml")))return"Netlify";if(R(K($,"wrangler.toml")))return"Cloudflare";if(R(K($,"Dockerfile")))return"Docker";if(R(K($,"fly.toml")))return"Fly.io";if(R(K($,"render.yaml")))return"Render";return null}function l5($){let Z=K($,"svelte.config.js");if(!R(Z))return null;try{let X=H0(Z,"utf-8").match(/@sveltejs\/adapter-(\w+)/);if(X){let z=X[1];switch(z){case"vercel":return"Vercel";case"node":return"Node";case"static":return"Static";case"cloudflare":return"Cloudflare";case"netlify":return"Netlify";case"auto":return"Auto";default:return z}}return null}catch{return null}}function d5($){let Z=P0($);if(Z?.devDependencies?.vite||Z?.dependencies?.vite)return"Vite";if(Z?.devDependencies?.webpack||Z?.dependencies?.webpack)return"webpack";if(Z?.devDependencies?.esbuild||Z?.dependencies?.esbuild)return"esbuild";if(R(K($,"tsconfig.json"))&&Z?.devDependencies?.typescript)return"TypeScript (tsc)";return null}function U$($){return["package.json","Cargo.toml","pyproject.toml","go.mod","build.zig","build.zig.zon","src/index.ts","src/index.js","src/main.ts","src/cli.ts","src/main.rs","src/lib.rs","src/main.zig","src/root.zig","src/__init__.py","main.py","__main__.py","main.go","cmd/main.go","README.md","SPECIFICATION.md","BINARY-FORMAT.md","tsconfig.json","wrangler.toml","vercel.json"].filter((Q)=>R(K($,Q)))}function q$($,Z){let Q={};if(Z?.scripts){for(let X of["build","test","lint","dev","start"])if(Z.scripts[X]){let z=R(K($,"bun.lock"))||R(K($,"bun.lockb"))?"bun run":"npm run";Q[X]=`${z} ${X}`}}if(R(K($,"Cargo.toml"))){if(!Q.build)Q.build="cargo build --release";if(!Q.test)Q.test="cargo test";if(!Q.lint)Q.lint="cargo clippy"}if(R(K($,"build.zig"))){if(!Q.build)Q.build="zig build";if(!Q.test)Q.test="zig build test"}if(R(K($,"go.mod"))){if(!Q.build)Q.build="go build ./...";if(!Q.test)Q.test="go test ./..."}if(R(K($,"pyproject.toml"))||R(K($,"pytest.ini"))){if(!Q.test)Q.test="pytest"}return Q}function c5($,Z,Q,X){let z=[];if(X&&X!=="Unknown")z.push(X);let J=new Set(["frontend","backend","database","build","css","state","monorepo"]);for(let H of Q)if(J.has(H.category))z.push(H.name);if(R(K($,"bunfig.toml")))z.push("Bun");else if(R(K($,"deno.json"))||R(K($,"deno.jsonc")))z.push("Deno");if(z.length<3&&Z?.dependencies){let H=Object.keys(Z.dependencies).slice(0,5);for(let U of H)if(!z.some((q)=>q.toLowerCase().includes(U.toLowerCase())))z.push(U)}return z}function e8($){let Z=P0($),Q=J$($),X=f5($),z=X.type,J=X.found.some((g)=>g.startsWith("polyglot:")),H=J&&v5($)||H$($),U=k5($),q=u5($),Y=m5($),G=p5($),V=d5($),B=Q.find((g)=>g.category==="frontend"),_=Q.find((g)=>g.category==="css"),D=Q.find((g)=>g.category==="ui"),W=Q.find((g)=>g.category==="state"),O=Q.find((g)=>g.category==="backend"),I=Q.find((g)=>g.category==="database"),N=k0[z]||k0.library,F=z==="framework",A=Q.some((g)=>g.slug==="svelte"||g.slug==="sveltekit"),w=F&&A?"svelte":F?null:null,T=z==="svelte"||w==="svelte",C=T?l5($):null,L=T&&Q.some((g)=>g.slug==="sveltekit"),S=new Set(["css_framework","ui_library","database","connection","hosting"]),E={},m=f.filter((g)=>g.path.startsWith("stack."));for(let g of m){let y=g.path.replace("stack.","");if(!N.includes(g.category)){E[y]="slotignored";continue}if(F&&S.has(y)){E[y]="slotignored";continue}switch(y){case"frontend":E[y]=B?.name??(z==="cli"?"CLI":"");break;case"css_framework":E[y]=_?.name??"";break;case"ui_library":E[y]=D?.name??"";break;case"state_management":E[y]=T?W?.name??"Runes":W?.name??"";break;case"backend":E[y]=T?L?"SvelteKit":O?.name??"":O?.name??"";break;case"api_type":E[y]=L?"Server Routes":"";break;case"runtime":E[y]=U!=="Unknown"?U:"";break;case"database":E[y]=I?.name??"";break;case"connection":E[y]=I?.name??"";break;case"hosting":if(T&&C)E[y]=C;else E[y]=G??"";break;case"build":E[y]=T?"Vite":V??"";break;case"cicd":E[y]=Y??"";break;case"package_manager":E[y]=q;break;default:E[y]="";break}}let M={},b=f.filter((g)=>g.path.startsWith("monorepo."));for(let g of b){let y=g.path.replace("monorepo.","");if(!N.includes(g.category))M[y]="slotignored";else M[y]=""}let x={name:Z?.name??$.split("/").pop()??"project",goal:J?"":Z?.description??"",main_language:H,type:z};if(F&&w)x.framework=w;let a=c5($,Z,Q,J?H$($):H);if(J){for(let g of z$($))for(let y of[g.language,g.topFramework])if(y&&!a.includes(y))a.push(y)}let G6=U$($),V6=q$($,Z),s2={faf_version:g5,project:x,stack:E,human_context:{who:"",what:J?"":Z?.description??"",why:"",where:"",when:"",how:""},monorepo:M,_meta:{found:X.found}};if(a.length>0)s2.tech_stack=a;if(G6.length>0)s2.key_files=G6;if(Object.keys(V6).length>0)s2.commands=V6;return s2}import{existsSync as VB,readFileSync as BB}from"fs";import{join as WB}from"path";var i5={MIN_LENGTH:8,MAX_LENGTH:280},GB=[/^(see|see\s+the?)\s+readme/i,/^(tbd|todo|fixme|coming\s+soon)\b/i,/^(software|application|app|project|tool|library|framework)\.?$/i,/^(for\s+users|for\s+developers)\.?$/i,/^(description|goal|name|title)\.?$/i,/^lorem\s+ipsum/i,/^example(\s+\w+)?\.?$/i];function Z0($){let Z=$.trim();if(Z.length<i5.MIN_LENGTH)return!1;if(Z.length>i5.MAX_LENGTH)return!1;if(GB.some((Q)=>Q.test(Z)))return!1;if(/^[\s|\-*+]/.test(Z))return!1;if(Z.split(`
224
+ `).length>4)return!1;return!0}function _B($){let Z=$.split(`
225
225
  `),Q=0;while(Q<Z.length&&/^(#\s|$)/.test(Z[Q].trim()))Q++;while(Q<Z.length){let X=Z[Q].trim();if(/^\[!\[/.test(X)){Q++;continue}if(/^!\[/.test(X)){Q++;continue}if(/^<img\s/i.test(X)){Q++;continue}if(X===""){Q++;continue}break}return Z.slice(Q).join(`
226
- `)}function TG($){let Q=PG($).split(`
227
- `),X=[];for(let z of Q){let J=z.trim();if(J===""){if(X.length>0)break;continue}if(/^(#|>|```|---|\||\s*[-*+]\s|\d+\.\s)/.test(J))break;if(/^\*\*[^*]+\*\*\s*$/.test(J)&&X.length===0)continue;X.push(J)}if(X.length===0)return null;return X.join(" ").trim()}function E0($,Z){let Q=$.split(`
228
- `),X=0;while(X<Q.length){let J=Q[X].trim().match(/^(#{1,6})\s+(.+)$/);if(J&&Z.test(J[2])){let H=J[1].length,U=[];X++;while(X<Q.length){let q=Q[X].trim(),Y=q.match(/^(#{1,6})\s+/);if(Y&&Y[1].length<=H)break;if(q===""){if(U.length>0)break;X++;continue}if(/^(>|```|---|\||\s*[-*+]\s|\d+\.\s)/.test(q))break;U.push(q),X++}if(U.length===0)return null;return U.join(" ").trim()}X++}return null}function CG($){let Z=E0($,/^(use\s+cases?|goal)\b/i);if(Z&&s(Z))return Z;let Q=TG($);if(Q&&s(Q))return Q;return}function wG($){let Z=E0($,/^(about|description|overview|what(\s+is\s+this)?)\b/i);if(Z&&s(Z))return Z;return}function bG($){let Z=E0($,/^(audience|users?|for\s+whom|who(\s+is\s+this\s+for)?)\b/i);if(Z&&s(Z))return Z;return}function EG($){let Z=E0($,/^(why|motivation|problem|rationale)\b/i);if(Z&&s(Z))return Z;return}function SG($){let Z=E0($,/^(deployment|where(\s+it\s+runs)?|hosting)\b/i);if(Z&&s(Z))return Z;return}function jG($){let Z=E0($,/^(status|history|timeline|since|launched)\b/i);if(Z&&s(Z))return Z;return}function xG($){let Z=E0($,/^(architecture|how(\s+it\s+works)?|approach|design)\b/i);if(Z&&s(Z))return Z;return}function m8($){let Z=["README.md","README.MD","Readme.md","readme.md"],Q=null;for(let _ of Z){let D=AG($,_);if(FG(D)){Q=D;break}}if(!Q)return{};let X;try{X=NG(Q,"utf-8")}catch{return{}}X=X.replace(/<!--[\s\S]*?-->/g,"");let z={},J=CG(X);if(J)z.project={goal:J};let H={},U=wG(X);if(U)H.what=U;let q=bG(X);if(q)H.who=q;let Y=EG(X);if(Y)H.why=Y;let B=SG(X);if(B)H.where=B;let G=jG(X);if(G)H.when=G;let V=xG(X);if(V)H.how=V;if(Object.keys(H).length>0)z.human_context=H;return z}import{existsSync as gG,readFileSync as hG}from"fs";import{join as yG}from"path";function vG($,Z){let Q=$.split(`
229
- `),X=!1;for(let z of Q){let J=z.trim();if(/^\[/.test(J)){X=J==="[package]";continue}if(!X)continue;let H=J.match(new RegExp(`^${Z}\\s*=\\s*(.+)$`));if(H){let U=H[1].trim();U=U.replace(/\s*#.*$/,"").trim();let q=U.match(/^"((?:[^"\\]|\\.)*)"$/)||U.match(/^'((?:[^'\\]|\\.)*)'$/);if(q)return q[1];return U}}return null}function l8($){let Z=yG($,"Cargo.toml");if(!gG(Z))return{};let Q;try{Q=hG(Z,"utf-8")}catch{return{}}let X=vG(Q,"description");if(X&&s(X))return{project:{goal:X}};return{}}import{readFileSync as fG,readdirSync as kG}from"fs";import{join as x4}from"path";var uG=[{re:/^postgres|postgis|pgvector/,slot:"database",label:"PostgreSQL"},{re:/^mysql/,slot:"database",label:"MySQL"},{re:/^mariadb/,slot:"database",label:"MariaDB"},{re:/^mongo/,slot:"database",label:"MongoDB"},{re:/clickhouse/,slot:"database",label:"ClickHouse"},{re:/^cockroach/,slot:"database",label:"CockroachDB"},{re:/^redis|^valkey/,slot:"cache",label:"Redis"},{re:/^memcached/,slot:"cache",label:"Memcached"},{re:/elasticsearch/,slot:"search",label:"Elasticsearch"},{re:/opensearch/,slot:"search",label:"OpenSearch"},{re:/meilisearch/,slot:"search",label:"Meilisearch"},{re:/typesense/,slot:"search",label:"Typesense"},{re:/qdrant/,slot:"search",label:"Qdrant (vector)"},{re:/weaviate/,slot:"search",label:"Weaviate (vector)"},{re:/^minio/,slot:"storage",label:"MinIO (S3-compatible)"},{re:/localstack/,slot:"storage",label:"LocalStack (AWS)"},{re:/rabbitmq/,slot:"runtime",label:"RabbitMQ"},{re:/kafka/,slot:"runtime",label:"Kafka"},{re:/nats/,slot:"runtime",label:"NATS"},{re:/temporalio\/|temporal-server|temporal:/,slot:"runtime",label:"Temporal"}],mG=new Set(["node_modules",".git","dist","build","vendor","target","e2e","tests","test"]);function lG($){let Z=[],Q=(X,z)=>{let J;try{J=kG(X,{withFileTypes:!0})}catch{return}for(let H of J)if(H.isFile()&&/^(docker-)?compose.*\.ya?ml$/i.test(H.name))Z.push(x4(X,H.name));else if(H.isDirectory()&&z>0&&!H.name.startsWith(".")&&!mG.has(H.name))Q(x4(X,H.name),z-1)};return Q($,1),Z}function f1($){return[...$].join(" · ")}function p8($){let Z=lG($);if(Z.length===0)return{};let Q={database:new Set,cache:new Set,search:new Set,storage:new Set,runtime:new Set};for(let z of Z){let J;try{J=fG(z,"utf-8")}catch{continue}for(let H of J.matchAll(/^\s*image:\s*["']?([^\s"'#]+)/gm)){let U=H[1].toLowerCase(),q=U.replace(/:[^/]*$/,"").split("/").pop()??U,Y=U.replace(/:[^/]*$/,"");for(let{re:B,slot:G,label:V}of uG)if(B.test(q)||B.test(Y))Q[G].add(V)}}let X={};if(Q.database.size)X.database=f1(Q.database);if(Q.cache.size)X.cache=f1(Q.cache);if(Q.search.size)X.search=f1(Q.search);if(Q.storage.size)X.storage=f1(Q.storage);if(Q.runtime.size)X.runtime=`Docker Compose (${f1(Q.runtime)})`;if(Object.keys(X).length===0&&!Q.runtime.size)return{stack:{hosting:"Docker Compose"}};return X.hosting="Docker Compose",{stack:X}}import{existsSync as e2,readFileSync as pG,readdirSync as dG}from"fs";import{join as k1}from"path";var cG=new Set(["node_modules",".git","dist","build","vendor","target","e2e","docs","scripts"]),iG=[{file:"Makefile",runner:"make",targets:($)=>[...$.matchAll(/^([a-zA-Z][\w-]*)\s*:(?!=)/gm)].map((Z)=>Z[1])},{file:"justfile",runner:"just",targets:($)=>[...$.matchAll(/^([a-zA-Z][\w-]*)\s*(?:\([^)]*\))?\s*:/gm)].map((Z)=>Z[1])},{file:"Taskfile.yml",runner:"task",targets:($)=>{let Z=$.indexOf("tasks:");if(Z===-1)return[];return[...$.slice(Z).matchAll(/^\s{2}([a-zA-Z][\w-]*):/gm)].map((Q)=>Q[1])}}];function d8($,Z){for(let Q of Z){let X=$.find((z)=>Q.test(z));if(X)return X}return null}function rG($){let Z=[$];try{for(let Q of dG($,{withFileTypes:!0}))if(Q.isDirectory()&&!Q.name.startsWith(".")&&!cG.has(Q.name))Z.push(k1($,Q.name))}catch{}return Z}function aG($){let Z=0;if(e2(k1($,"manage.py"))||e2(k1($,"pyproject.toml"))||e2(k1($,"Gemfile")))Z+=3;if(/(?:^|\/)(backend|api|server|core|app)$/.test($))Z+=2;return Z}function c8($){let Z=[];for(let X of rG($)){let z=X===$,J=z?"":`cd ${X.slice($.length+1)} && `;for(let H of iG){let U=k1(X,H.file);if(!e2(U))continue;let q;try{q=pG(U,"utf-8")}catch{continue}let Y=H.targets(q);if(Y.length===0)continue;let B={},G=d8(Y,[/^test$/i,/^tests$/i,/test-all/i,/^test-unit/i,/^test/i]),V=d8(Y,[/^build$/i,/^compile$/i,/^build/i]),_=d8(Y,[/^check-all$/i,/^check$/i,/^lint$/i,/^lint/i,/^fmt$/i,/^format$/i]);if(G)B.test=`${J}${H.runner} ${G}`;if(V)B.build=`${J}${H.runner} ${V}`;if(_)B.lint=`${J}${H.runner} ${_}`;if(Object.keys(B).length===0)continue;Z.push({score:Object.keys(B).length+(z?10:aG(X)),commands:B})}}let Q=Z.sort((X,z)=>z.score-X.score)[0];return Q?{commands:Q.commands}:{}}import{existsSync as nG}from"fs";import{join as sG}from"path";var oG=[".env.example",".env.sample",".env.template",".env.dist","env.example",".env.local.example"];function i8($){for(let Z of oG)if(nG(sG($,Z)))return{security:{secrets:".env",example:Z}};return{}}function tG($,Z){let Q={project:{...Z.project??{},...$.project??{}},human_context:{...Z.human_context??{},...$.human_context??{}},stack:{...Z.stack??{},...$.stack??{}},commands:{...Z.commands??{},...$.commands??{}},security:{...Z.security??{},...$.security??{}}};for(let X of["project","human_context","stack","commands","security"])if(Q[X]&&Object.keys(Q[X]).length===0)delete Q[X];return Q}function g4($){return[m8($),l8($),p8($),c8($),i8($)].reduce(tG,{})}function eG($){let Z=S4($),Q=g4($),X={};if(Q.stack)X.stack=Q.stack;if(Q.commands)X.commands=Q.commands;if(Q.security)X.security=Q.security;let z={};if(Q.project)z.project=Q.project;if(Q.human_context)z.human_context=Q.human_context;let J=u1(u1(X,Z),z);$V(J);let U=(Z._meta?.found??[]).some((Y)=>Y.startsWith("polyglot:")),q=u1(J,f8($));return u1(q,{human_context:k8($,{toolingRoot:U})})}function $V($){let Z=$.project?.type??"library",Q=S0[Z]||S0.library;for(let X of v){if(Q.includes(X.category))continue;let[z,J]=X.path.split(".");if(z==="stack"&&$.stack)$.stack[J]="slotignored";if(z==="monorepo"&&$.monorepo)$.monorepo[J]="slotignored"}}function u1($,Z){let Q={...$};for(let[X,z]of Object.entries(Z)){let J=Q[X];if(K0(J))Q[X]=z;else if(typeof z==="object"&&z!==null&&!Array.isArray(z)&&typeof J==="object"&&J!==null&&!Array.isArray(J))Q[X]=u1(J,z)}return Q}export{qq as writeServerCard,Qq as writeProjectHtml,o4 as validateFaf,i0 as utcNow,Rq as upsertCatalog,f8 as turboCatSlots,G4 as turboCatScan,u4 as slotsByCategory,uZ as seedSixWsFromGoal,J$ as scoreFafYaml,dq as runLoop,D4 as relentlessContextDetailed,k8 as relentlessContext,K8 as registryName,I8 as registryMeta,Wq as readFafa,VZ as readFafRaw,rU as readFaf,T8 as questionForSlot,nq as publicQuestions,Fq as projectCards,u2 as normalizeAnswer,pZ as loopVerdict,z$ as kernel,K0 as isPlaceholder,mZ as isHumanSlot,k2 as isEmptyValue,fq as interviewForMissing,sq as gradeAnswers,Q1 as getTier,p4 as getNextTier,v2 as generateServerCard,IZ as generateProjectHtml,TZ as generateA2ACard,jZ as fromClaudeDir,_q as findFafaFile,WZ as findFafFile,c0 as fafContextBlock,e8 as enrichScore,aq as deriveQuestionSet,lZ as classifyGaps,T1 as canonicalPriority,lq as buildTableOf8,oq as buildReceipt,eG as assembleFreshFaf,rZ as answersMatch,Z0 as TIERS,fZ as STACK_INTERVIEW,e0 as SLOT_BY_PATH,v as SLOTS,P8 as SIX_WS_INTERVIEW,RZ as REGISTRY_PUBLISHER_KEY,O0 as PRIORITY_RANK,R8 as PRIORITY_ORDER,p1 as PLACEHOLDERS,f2 as KNOWLEDGE_TYPES,vZ as INTERVIEW_VERSION,vq as INTERVIEW_PATHS,kZ as INTERVIEW_BY_PATH,a0 as INTERVIEW,T0 as FafmSoul,Z1 as FAF_HEX,l4 as ENTERPRISE_SLOTS,w8 as BENCH_VERSION,m4 as BASE_SLOTS,iZ as ALIAS_GROUPS,AZ as A2A_CONTEXT_URI};
226
+ `)}function OB($){let Q=_B($).split(`
227
+ `),X=[];for(let z of Q){let J=z.trim();if(J===""){if(X.length>0)break;continue}if(/^(#|>|```|---|\||\s*[-*+]\s|\d+\.\s)/.test(J))break;if(/^\*\*[^*]+\*\*\s*$/.test(J)&&X.length===0)continue;X.push(J)}if(X.length===0)return null;return X.join(" ").trim()}function f0($,Z){let Q=$.split(`
228
+ `),X=0;while(X<Q.length){let J=Q[X].trim().match(/^(#{1,6})\s+(.+)$/);if(J&&Z.test(J[2])){let H=J[1].length,U=[];X++;while(X<Q.length){let q=Q[X].trim(),Y=q.match(/^(#{1,6})\s+/);if(Y&&Y[1].length<=H)break;if(q===""){if(U.length>0)break;X++;continue}if(/^(>|```|---|\||\s*[-*+]\s|\d+\.\s)/.test(q))break;U.push(q),X++}if(U.length===0)return null;return U.join(" ").trim()}X++}return null}function DB($){let Z=f0($,/^(use\s+cases?|goal)\b/i);if(Z&&Z0(Z))return Z;let Q=OB($);if(Q&&Z0(Q))return Q;return}function IB($){let Z=f0($,/^(about|description|overview|what(\s+is\s+this)?)\b/i);if(Z&&Z0(Z))return Z;return}function KB($){let Z=f0($,/^(audience|users?|for\s+whom|who(\s+is\s+this\s+for)?)\b/i);if(Z&&Z0(Z))return Z;return}function LB($){let Z=f0($,/^(why|motivation|problem|rationale)\b/i);if(Z&&Z0(Z))return Z;return}function RB($){let Z=f0($,/^(deployment|where(\s+it\s+runs)?|hosting)\b/i);if(Z&&Z0(Z))return Z;return}function MB($){let Z=f0($,/^(status|history|timeline|since|launched)\b/i);if(Z&&Z0(Z))return Z;return}function FB($){let Z=f0($,/^(architecture|how(\s+it\s+works)?|approach|design)\b/i);if(Z&&Z0(Z))return Z;return}function $6($){let Z=["README.md","README.MD","Readme.md","readme.md"],Q=null;for(let _ of Z){let D=WB($,_);if(VB(D)){Q=D;break}}if(!Q)return{};let X;try{X=BB(Q,"utf-8")}catch{return{}}X=X.replace(/<!--[\s\S]*?-->/g,"");let z={},J=DB(X);if(J)z.project={goal:J};let H={},U=IB(X);if(U)H.what=U;let q=KB(X);if(q)H.who=q;let Y=LB(X);if(Y)H.why=Y;let G=RB(X);if(G)H.where=G;let V=MB(X);if(V)H.when=V;let B=FB(X);if(B)H.how=B;if(Object.keys(H).length>0)z.human_context=H;return z}import{existsSync as NB,readFileSync as PB}from"fs";import{join as AB}from"path";function TB($,Z){let Q=$.split(`
229
+ `),X=!1;for(let z of Q){let J=z.trim();if(/^\[/.test(J)){X=J==="[package]";continue}if(!X)continue;let H=J.match(new RegExp(`^${Z}\\s*=\\s*(.+)$`));if(H){let U=H[1].trim();U=U.replace(/\s*#.*$/,"").trim();let q=U.match(/^"((?:[^"\\]|\\.)*)"$/)||U.match(/^'((?:[^'\\]|\\.)*)'$/);if(q)return q[1];return U}}return null}function Z6($){let Z=AB($,"Cargo.toml");if(!NB(Z))return{};let Q;try{Q=PB(Z,"utf-8")}catch{return{}}let X=TB(Q,"description");if(X&&Z0(X))return{project:{goal:X}};return{}}import{readFileSync as wB,readdirSync as CB}from"fs";import{join as r5}from"path";var bB=[{re:/^postgres|postgis|pgvector/,slot:"database",label:"PostgreSQL"},{re:/^mysql/,slot:"database",label:"MySQL"},{re:/^mariadb/,slot:"database",label:"MariaDB"},{re:/^mongo/,slot:"database",label:"MongoDB"},{re:/clickhouse/,slot:"database",label:"ClickHouse"},{re:/^cockroach/,slot:"database",label:"CockroachDB"},{re:/^redis|^valkey/,slot:"cache",label:"Redis"},{re:/^memcached/,slot:"cache",label:"Memcached"},{re:/elasticsearch/,slot:"search",label:"Elasticsearch"},{re:/opensearch/,slot:"search",label:"OpenSearch"},{re:/meilisearch/,slot:"search",label:"Meilisearch"},{re:/typesense/,slot:"search",label:"Typesense"},{re:/qdrant/,slot:"search",label:"Qdrant (vector)"},{re:/weaviate/,slot:"search",label:"Weaviate (vector)"},{re:/^minio/,slot:"storage",label:"MinIO (S3-compatible)"},{re:/localstack/,slot:"storage",label:"LocalStack (AWS)"},{re:/rabbitmq/,slot:"runtime",label:"RabbitMQ"},{re:/kafka/,slot:"runtime",label:"Kafka"},{re:/nats/,slot:"runtime",label:"NATS"},{re:/temporalio\/|temporal-server|temporal:/,slot:"runtime",label:"Temporal"}],EB=new Set(["node_modules",".git","dist","build","vendor","target","e2e","tests","test"]);function jB($){let Z=[],Q=(X,z)=>{let J;try{J=CB(X,{withFileTypes:!0})}catch{return}for(let H of J)if(H.isFile()&&/^(docker-)?compose.*\.ya?ml$/i.test(H.name))Z.push(r5(X,H.name));else if(H.isDirectory()&&z>0&&!H.name.startsWith(".")&&!EB.has(H.name))Q(r5(X,H.name),z-1)};return Q($,1),Z}function r2($){return[...$].join(" · ")}function Q6($){let Z=jB($);if(Z.length===0)return{};let Q={database:new Set,cache:new Set,search:new Set,storage:new Set,runtime:new Set};for(let z of Z){let J;try{J=wB(z,"utf-8")}catch{continue}for(let H of J.matchAll(/^\s*image:\s*["']?([^\s"'#]+)/gm)){let U=H[1].toLowerCase(),q=U.replace(/:[^/]*$/,"").split("/").pop()??U,Y=U.replace(/:[^/]*$/,"");for(let{re:G,slot:V,label:B}of bB)if(G.test(q)||G.test(Y))Q[V].add(B)}}let X={};if(Q.database.size)X.database=r2(Q.database);if(Q.cache.size)X.cache=r2(Q.cache);if(Q.search.size)X.search=r2(Q.search);if(Q.storage.size)X.storage=r2(Q.storage);if(Q.runtime.size)X.runtime=`Docker Compose (${r2(Q.runtime)})`;if(Object.keys(X).length===0&&!Q.runtime.size)return{stack:{hosting:"Docker Compose"}};return X.hosting="Docker Compose",{stack:X}}import{existsSync as Y$,readFileSync as SB,readdirSync as xB}from"fs";import{join as n2}from"path";var gB=new Set(["node_modules",".git","dist","build","vendor","target","e2e","docs","scripts"]),yB=[{file:"Makefile",runner:"make",targets:($)=>[...$.matchAll(/^([a-zA-Z][\w-]*)\s*:(?!=)/gm)].map((Z)=>Z[1])},{file:"justfile",runner:"just",targets:($)=>[...$.matchAll(/^([a-zA-Z][\w-]*)\s*(?:\([^)]*\))?\s*:/gm)].map((Z)=>Z[1])},{file:"Taskfile.yml",runner:"task",targets:($)=>{let Z=$.indexOf("tasks:");if(Z===-1)return[];return[...$.slice(Z).matchAll(/^\s{2}([a-zA-Z][\w-]*):/gm)].map((Q)=>Q[1])}}];function X6($,Z){for(let Q of Z){let X=$.find((z)=>Q.test(z));if(X)return X}return null}function hB($){let Z=[$];try{for(let Q of xB($,{withFileTypes:!0}))if(Q.isDirectory()&&!Q.name.startsWith(".")&&!gB.has(Q.name))Z.push(n2($,Q.name))}catch{}return Z}function vB($){let Z=0;if(Y$(n2($,"manage.py"))||Y$(n2($,"pyproject.toml"))||Y$(n2($,"Gemfile")))Z+=3;if(/(?:^|\/)(backend|api|server|core|app)$/.test($))Z+=2;return Z}function z6($){let Z=[];for(let X of hB($)){let z=X===$,J=z?"":`cd ${X.slice($.length+1)} && `;for(let H of yB){let U=n2(X,H.file);if(!Y$(U))continue;let q;try{q=SB(U,"utf-8")}catch{continue}let Y=H.targets(q);if(Y.length===0)continue;let G={},V=X6(Y,[/^test$/i,/^tests$/i,/test-all/i,/^test-unit/i,/^test/i]),B=X6(Y,[/^build$/i,/^compile$/i,/^build/i]),_=X6(Y,[/^check-all$/i,/^check$/i,/^lint$/i,/^lint/i,/^fmt$/i,/^format$/i]);if(V)G.test=`${J}${H.runner} ${V}`;if(B)G.build=`${J}${H.runner} ${B}`;if(_)G.lint=`${J}${H.runner} ${_}`;if(Object.keys(G).length===0)continue;Z.push({score:Object.keys(G).length+(z?10:vB(X)),commands:G})}}let Q=Z.sort((X,z)=>z.score-X.score)[0];return Q?{commands:Q.commands}:{}}import{existsSync as fB}from"fs";import{join as kB}from"path";var uB=[".env.example",".env.sample",".env.template",".env.dist","env.example",".env.local.example"];function J6($){for(let Z of uB)if(fB(kB($,Z)))return{security:{secrets:".env",example:Z}};return{}}function mB($,Z){let Q={project:{...Z.project??{},...$.project??{}},human_context:{...Z.human_context??{},...$.human_context??{}},stack:{...Z.stack??{},...$.stack??{}},commands:{...Z.commands??{},...$.commands??{}},security:{...Z.security??{},...$.security??{}}};for(let X of["project","human_context","stack","commands","security"])if(Q[X]&&Object.keys(Q[X]).length===0)delete Q[X];return Q}function H6($){return[$6($),Z6($),Q6($),z6($),J6($)].reduce(mB,{})}function pB($){let Z=e8($),Q=H6($),X={};if(Q.stack)X.stack=Q.stack;if(Q.commands)X.commands=Q.commands;if(Q.security)X.security=Q.security;let z={};if(Q.project)z.project=Q.project;if(Q.human_context)z.human_context=Q.human_context;let J=U0(U0(X,Z),z);dB(J);let U=(Z._meta?.found??[]).some((Y)=>Y.startsWith("polyglot:")),q=U0(J,Z$($));return U0(q,{human_context:Q$($,{toolingRoot:U})})}function lB($,Z){let Q=U0(Z,H6($)),X=U0(Q,e8($)),z=U0(X,Z$($));return U0(z,{human_context:Q$($)})}function dB($){let Z=$.project?.type??"library",Q=k0[Z]||k0.library;for(let X of f){if(Q.includes(X.category))continue;let[z,J]=X.path.split(".");if(z==="stack"&&$.stack)$.stack[J]="slotignored";if(z==="monorepo"&&$.monorepo)$.monorepo[J]="slotignored"}}function U0($,Z){let Q={...$};for(let[X,z]of Object.entries(Z)){let J=Q[X];if(T0(J))Q[X]=z;else if(typeof z==="object"&&z!==null&&!Array.isArray(z)&&typeof J==="object"&&J!==null&&!Array.isArray(J))Q[X]=U0(J,z)}return Q}import{join as XW}from"path";import{readFileSync as sB,existsSync as oB,statSync as lI}from"fs";import{join as $4}from"path";import{readFileSync as cB,writeFileSync as G$,existsSync as iB}from"fs";var U6="<!-- faf:start -->",q6="<!-- faf:end -->",rB="<!-- faf: ";function s5($){return $.match(/[^\r\n]*(?:\r\n|\r|\n|$)/g)?.filter((Z,Q,X)=>Z!==""||Q<X.length-1)??[]}var o5=($)=>$.replace(/\r?\n$|\r$/,""),nB=($)=>$.startsWith("```")||$.startsWith("~~~");function n5($,Z,Q,X){let z=0,J=!1,H=-1;for(let U of s5($)){let q=o5(U),Y=z===0&&q.charCodeAt(0)===65279?1:0,G=q.slice(Y),V=G.trimEnd();if(H===-1){if(X&&nB(G.trim()))J=!J;else if(!J&&V===Z)H=z+Y}else if(V===Q)return{start:H,end:z+q.length};z+=U.length}return null}function a5($,Z){return s5($).some((Q)=>o5(Q).replace(/^\uFEFF/,"").trimEnd()===Z)}function t5($,Z=U6,Q=q6){return n5($,Z,Q,!0)??n5($,Z,Q,!1)}function Q0($,Z,Q=U6,X=q6){let z=`${Q}
230
+ ${Z.trim()}
231
+ ${X}`;if(!iB($)){G$($,`${z}
232
+ `,"utf-8");return}let J=cB($,"utf-8"),H=t5(J,Q,X);if(H){G$($,`${J.slice(0,H.start)}${z}${J.slice(H.end)}`,"utf-8");return}if(J.trimStart().startsWith(rB)&&!a5(J,Q)&&!a5(J,X)){G$($,`${z}
233
+ `,"utf-8");return}G$($,`${z}
230
234
 
231
- //# debugId=88C508916E2BB3DC64756E2164756E21
235
+ ${J}`,"utf-8")}var aB=new Set(["API","CI","CD","MCP","CLI","SDK","UI","UX","AI","ML","DB","ORM","OS","HTTP","HTTPS","REST","RPC","JSON","YAML","XML","SQL","CSS","HTML","AWS","GCP","CDN","DNS","JWT","ID","IP","URL","URI","TS","JS"]);function Y6($){return $.split("_").map((Z)=>{if(!Z)return Z;let Q=Z.toUpperCase();return aB.has(Q)?Q:Z.charAt(0).toUpperCase()+Z.slice(1)}).join(" ")}function l($){return typeof $==="string"&&$.trim()!==""&&$.trim()!=="slotignored"}function n($){let Z=A0.get($);if(Z?.label)return Z.label;let Q=$.includes(".")?$.slice($.lastIndexOf(".")+1):$;return Y6(Q)}var Z4="CLAUDE.md",tB="STATUS: BI-SYNC ACTIVE";function eB($){let Z=$4($,Z4);if(!oB(Z))return null;return sB(Z,"utf-8")}function $W($,Z){Q0($4($,Z4),Z)}function q0($,Z={}){let Q=String($.project?.name??"").trim(),X=String($.project?.main_language??"").trim(),z=String($.project?.type??"").trim(),J=String($.project?.goal??"").trim(),H=`<!-- faf: ${[Q,X,z,J].join(" | ")} -->`,U=[];if(Z.doc)U.push(`doc=${Z.doc}`);else U.push(`claim=${Z.claim??"project.faf"}`);if(typeof Z.score==="number")U.push(`score=${Z.score}`);if(U.push(`family=${Z.family??"FAF"}`),Z.siblings&&Z.siblings.length>0)U.push(`siblings=${Z.siblings.join(",")}`);let q=`<!-- faf: ${U.join(" | ")} -->`;return`${H}
236
+ ${q}`}function ZW($){let Z=[],Q=$.project?.name??"Project",X=$.project?.main_language??"",z=$.project?.goal??"";if(Z.push(q0($)),Z.push(""),Z.push(`# CLAUDE.md — ${Q}`),Z.push(""),z)Z.push("## What This Is"),Z.push(""),Z.push(z),Z.push("");let J=$.stack??{},H=[];if(X)H.push(`**Language:** ${X}`);for(let[Y,G]of Object.entries(J))if(G&&G!=="slotignored"&&String(G).trim())H.push(`**${n(`stack.${Y}`)}:** ${G}`);if(H.length>0){Z.push("## Stack"),Z.push("");for(let Y of H)Z.push(`- ${Y}`);Z.push("")}let U=$.human_context??{},q=[["who",U.who],["what",U.what],["why",U.why],["where",U.where],["when",U.when],["how",U.how]].filter(([,Y])=>Y&&String(Y).trim()).map(([Y,G])=>`- **${n(`human_context.${Y}`)}:** ${G}`);if(q.length>0)Z.push("## Context"),Z.push(""),Z.push(...q),Z.push("");return Z.push("---"),Z.push(""),Z.push(`*${tB} — ${new Date().toISOString()}*`),Z.push(""),Z.join(`
237
+ `)}function e5($){return $.replace(/\s+v\d+(?:\.\d+)*\s*$/i,"").trim()}function QW($){let Z={project:{}},Q=$.match(/^# CLAUDE\.md\s*[—–-]\s*(.+)$/m);if(Q)Z.project.name=e5(Q[1].trim());if(!Z.project.name){let J=$.match(/\*\*Name:\*\*\s*(.+)/);if(J)Z.project.name=e5(J[1].trim())}let X=$.match(/## What This Is\s*\n\s*\n(.+)/);if(X)Z.project.goal=X[1].trim();if(!Z.project.goal){let J=$.match(/\*\*What Building:\*\*\s*(.+)/);if(J)Z.project.goal=J[1].trim()}let z=$.match(/\*\*Language:\*\*\s*(.+)/);if(z)Z.project.main_language=z[1].trim();if(!Z.project.main_language){let J=$.match(/\*\*Main Language:\*\*\s*(.+)/);if(J)Z.project.main_language=J[1].trim()}return Z}var d=($)=>$!==null&&$!==void 0&&$!==""&&$!=="slotignored"&&!(Array.isArray($)&&$.length===0),Q4=($)=>Array.isArray($)?$.join(", "):String($),zW=new Set(["commit_style","communication","response_style","explanation_level","explanations","documentation","code_first"]),JW=new Set(["target_user","core_problem","mission_purpose"]);function X4($){let Z=[],Q=(M="")=>Z.push(M),X=$.ai_instructions,z=$.preferences,J=$.instant_context,H=$.security,U=$.commands,q=$.key_files??J?.key_files,Y=d($.project?.default_branch)?String($.project?.default_branch):"main",G=U?Object.entries(U).filter(([,M])=>d(M)):[],V=G.filter(([M])=>/test/i.test(M)),B=G.filter(([M])=>/lint|check/i.test(M)&&!/test/i.test(M)),_=G.filter(([M])=>!/test|lint|check/i.test(M)),D=(M)=>{let b=M.toLowerCase();if(/install|deps/.test(b))return 0;if(/^build$|build/.test(b)&&!/rebuild/.test(b))return 1;if(/^dev$|develop/.test(b))return 2;if(/^start$|run/.test(b))return 3;return 4},W=[..._].sort((M,b)=>D(M[0])-D(b[0])||M[0].localeCompare(b[0])),O=[...V,...B],I=V[0]?.[1],N=W.find(([M])=>/build/i.test(M))?.[1];Q(q0($)),Q(),Q(`# AGENTS.md — ${$.project?.name??"Project"}`),Q();let F=[];if($.project?.main_language)F.push(String($.project.main_language));if(d($.project?.type))F.push(`type: ${String($.project?.type)}`);if(d($.project?.version))F.push(`v${String($.project?.version)}`);let A=$.project?.goal?String($.project.goal).trim():"";if(F.length)A+=(A?" — ":"")+F.join(" · ");if(A)Q(A),Q();if(Q("> Authored by faf — do not edit the managed block; refresh with `faf export --agents`. Hand-written content outside the managed block is preserved."),Q(),W.length){Q("## Setup & build"),Q(),Q("```bash");for(let[M,b]of W)Q(`${b} # ${M}`);Q("```"),Q()}if(O.length){Q("## Run the tests"),Q(),Q("```bash");for(let[,M]of O)Q(M);Q("```"),Q()}if(q&&q.length){Q("## Where things live"),Q();let M=q.map((b)=>{let x=String(b),a=x.indexOf(" — ");return a>0?{path:x.slice(0,a),role:x.slice(a+3)}:{path:x,role:""}});if(M.some((b)=>b.role)){Q("| Path | Role |"),Q("|------|------|");for(let b of M)Q(`| \`${b.path}\` | ${b.role} |`)}else for(let b of M)Q(`- \`${b.path}\``);Q()}let w=new Map,T=(M)=>{if(!M)return;for(let[b,x]of Object.entries(M)){if(zW.has(b)||!d(x))continue;let a=Y6(b);if(!w.has(a))w.set(a,Q4(x))}};T(X?.working_style),T(z);let C=$.conventions??[];if(w.size||C.length){Q("## Conventions"),Q();for(let[M,b]of w)Q(`- **${M}:** ${b}`);for(let M of C)if(d(M))Q(`- ${M}`);Q()}let L=(X?.warnings??[]).filter((M)=>d(M)),S=["read the tree"];if(I)S.push(`run the tests (\`${I}\`)`);if(N)S.push("build the project");for(let[,M]of B.slice(0,1))S.push(`\`${M}\``);Q("## Guardrails"),Q();for(let M of L)Q(`- ${M}`);Q(`- **Always OK:** ${[...new Set(S)].join(" · ")}.`),Q("- **Ask first:** dependency installs, deletions, migrations, schema changes, publish/release."),Q(`- **Never:** force-push · push straight to \`${Y}\` (branch and open a PR) · commit secrets.`),Q();let E=[];for(let[,M]of B)E.push(`\`${M}\` exits 0`);for(let[,M]of V)E.push(`\`${M}\` passes`);if(E.push("changes committed with a conventional message"),Q("## Definition of Done"),Q(),Q(`Done when: ${[...new Set(E)].join(" · ")}.`),Q(),Q("## When stuck"),Q(),Q(`Ask a clarifying question, propose a short plan, or open a draft PR with notes — do not push large speculative changes to \`${Y}\`.`),Q(),H&&(d(H.secrets)||(H.never??[]).length)){if(Q("## Security & secrets"),Q(),d(H.secrets)){let M=d(H.example)?` (see \`${H.example}\`)`:"";Q(`- Secrets live in \`${H.secrets}\`${M}. Never read or commit them.`)}for(let M of H.never??[])if(d(M))Q(`- Never read or commit \`${M}\`.`);Q()}if(Q("## Commit & PR"),Q(),z&&d(z.commit_style))Q(`- Commit style: ${Q4(z.commit_style)}`);else Q("- Conventional Commits preferred (`feat:`, `fix:`, `chore:`, …).");if(Q(`- Branch off \`${Y}\` and open a PR — never commit to \`${Y}\` directly.`),Q("- If build/test scripts or layout change, refresh this file in the **same PR** (`faf export --agents`)."),Q(),$.stack){let M=[];for(let[b,x]of Object.entries($.stack)){if(JW.has(b))continue;if(l(x))M.push(`- **${n(`stack.${b}`)}:** ${x.trim()}`)}if(M.length){Q("## Stack"),Q();for(let b of M)Q(b);Q()}}let m=$.generated;if(d(m))Q(`*Context authored: ${String(m)}*`);return Z.join(`
238
+ `)}function HW($,Z){Q0(XW($,"AGENTS.md"),X4(Z))}import{join as UW}from"path";var qW=($)=>$!==null&&$!==void 0&&$!==""&&$!=="slotignored"&&!(Array.isArray($)&&$.length===0),YW=new Set(["target_user","core_problem","mission_purpose"]);function z4($){let Z=[],Q=$.instant_context,X=$.commands,z=$.key_files??Q?.key_files,J=X?Object.entries(X).filter(([,B])=>qW(B)):[],H=J.filter(([B])=>/test/i.test(B)),U=J.filter(([B])=>/lint|check/i.test(B)&&!/test/i.test(B)),q=J.filter(([B])=>!/test|lint|check/i.test(B)),Y=(B)=>{let _=B.toLowerCase();if(/install|deps/.test(_))return 0;if(/^build$|build/.test(_)&&!/rebuild/.test(_))return 1;if(/^dev$|develop/.test(_))return 2;if(/^start$|run/.test(_))return 3;return 4},G=[...q].sort((B,_)=>Y(B[0])-Y(_[0])||B[0].localeCompare(_[0])),V=[...H,...U];if(Z.push(q0($)),Z.push(""),Z.push(`# GEMINI.md — ${$.project?.name??"Project"}`),Z.push(""),Z.push("> Authored from project.faf — refresh with `faf export --gemini`."),Z.push(""),$.project?.name)Z.push(`Project: ${$.project.name}`);if($.project?.goal)Z.push(`Goal: ${$.project.goal}`);if($.project?.main_language)Z.push(`Language: ${$.project.main_language}`);if(G.length){Z.push(""),Z.push("## Setup & build"),Z.push(""),Z.push("```bash");for(let[B,_]of G)Z.push(`${_} # ${B}`);Z.push("```")}if(V.length){Z.push(""),Z.push("## Test & verify"),Z.push(""),Z.push("```bash");for(let[,B]of V)Z.push(B);Z.push("```")}if(z&&z.length){Z.push(""),Z.push("## Where things live"),Z.push("");for(let B of z)Z.push(`- \`${B}\``)}if($.stack){let B=[];for(let[_,D]of Object.entries($.stack)){if(YW.has(_))continue;if(l(D))B.push(`- ${n(`stack.${_}`)}: ${D.trim()}`)}if(B.length){Z.push(""),Z.push("## Stack");for(let _ of B)Z.push(_)}}return Z.push(""),Z.push("## Before changing things"),Z.push(""),Z.push("- Ask first: dependency installs, deletions, migrations, schema changes, publish/release."),Z.push("- Never: force-push · push straight to `main` · commit secrets."),Z.push(""),Z.join(`
239
+ `)}function GW($,Z){Q0(UW($,"GEMINI.md"),z4(Z))}import{join as VW}from"path";function J4($){let Z=[];if(Z.push(q0($)),Z.push(""),Z.push("# .cursorrules"),Z.push(`# Authored from project.faf — ${$.project?.name??"Project"}`),Z.push(""),$.project?.main_language)Z.push(`language: ${$.project.main_language}`);if($.stack){Z.push(""),Z.push("# Stack");for(let[Q,X]of Object.entries($.stack))if(l(X))Z.push(`# ${n(`stack.${Q}`)}: ${X.trim()}`)}return Z.push(""),Z.join(`
240
+ `)}function BW($,Z){Q0(VW($,".cursorrules"),J4(Z),"# faf:start","# faf:end")}import{join as H4}from"path";import{mkdirSync as WW}from"fs";var U4=[["install","Install with"],["build","Build with"],["test","Test with"],["lint","Lint with"],["run","Run with"],["start","Start with"],["dev","Run the dev server with"]],_W=new Set([...U4.map(([$])=>$),"cicd"]);function q4($){let Z=[],Q=$.project?.name??"Project";if(Z.push(q0($)),Z.push(""),Z.push(`# GitHub Copilot Instructions — ${Q}`),Z.push(""),Z.push("> Authored from project.faf by FAF. Copilot reads these instructions on every request in this repository — keep them short and broadly applicable."),Z.push(""),l($.project?.goal))Z.push($.project.goal.trim()),Z.push("");let X=$.stack??{},z=[];if(l($.project?.main_language))z.push(`- **Language:** ${$.project.main_language.trim()}`);for(let[Y,G]of Object.entries(X)){if(_W.has(Y))continue;if(l(G))z.push(`- **${n(`stack.${Y}`)}:** ${G.trim()}`)}if(z.length>0)Z.push("## Tech stack","",...z,"");let J=[];for(let[Y,G]of U4){let V=X[Y];if(l(V))J.push(`- ${G} \`${V.trim()}\`.`)}if(l(X.cicd))J.push(`- CI runs on ${X.cicd.trim()}.`);if(J.length>0)Z.push("## Build & run","",...J,"");let H=$.human_context??{},q=[["who",H.who],["what",H.what],["why",H.why],["where",H.where],["when",H.when],["how",H.how]].filter(([,Y])=>l(Y)).map(([Y,G])=>`- **${n(`human_context.${Y}`)}:** ${G.trim()}`);if(q.length>0)Z.push("## Project context","",...q,"");return Z.join(`
241
+ `)}function OW($,Z){WW(H4($,".github"),{recursive:!0}),Q0(H4($,".github","copilot-instructions.md"),q4(Z))}import{existsSync as V$,readFileSync as Y4}from"fs";import{join as a2}from"path";function DW($,Z){let Q=[],X=(q)=>V$(a2($,q)),z=(q)=>{try{return Y4(a2($,q),"utf-8")}catch{return""}};if(X("tsconfig.json")&&/"strict"\s*:\s*true/.test(z("tsconfig.json")))Q.push("TypeScript strict mode (tsconfig.json)");if(Z?.type==="module")Q.push("ESM modules (`type: module`)");let J=[],H=Z?.devDependencies??{};if(X(".eslintrc")||X(".eslintrc.json")||X(".eslintrc.cjs")||X("eslint.config.js")||X("eslint.config.mjs")||"eslint"in H)J.push("ESLint");if(X(".prettierrc")||X(".prettierrc.json")||X("prettier.config.js")||"prettier"in H)J.push("Prettier");let U=X("pyproject.toml")?z("pyproject.toml"):"";if(/\[tool\.black\]/.test(U))J.push("black");if(/\[tool\.ruff\]/.test(U))J.push("ruff");if(/\[tool\.mypy\]/.test(U))J.push("mypy");if(X("rustfmt.toml")||X(".rustfmt.toml"))J.push("rustfmt");if(J.length)Q.push(`Style enforced by ${J.join(" · ")} — obey the configs`);return Q}function IW($,Z){let Q={...Z},X=null,z=a2($,"package.json");if(V$(z))try{X=JSON.parse(Y4(z,"utf-8"))}catch{X=null}let J=q$($,X);if(Object.keys(J).length)Q.commands={...J,...Z.commands??{}};let H=Z.key_files??Z.instant_context?.key_files;if(!H||H.length===0){let U=U$($);if(U.length)Q.key_files=U}if(!Z.security){let q=[".env",".env.local",".env.development"].find((Y)=>V$(a2($,Y)));if(q){let Y=[".env.example",".env.sample",".env.template"].find((G)=>V$(a2($,G)));Q.security={secrets:q,...Y?{example:Y}:{}}}}if(!Z.conventions){let U=DW($,X);if(U.length)Q.conventions=U}return Q}export{nq as writeServerCard,uq as writeProjectHtml,GW as writeGeminiMd,Pq as writeFaf,BW as writeCursorrules,OW as writeCopilotInstructions,$W as writeClaudeMd,HW as writeAgentsMd,T4 as validateFaf,$2 as utcNow,GY as upsertCatalog,lB as updateExistingFaf,Z$ as turboCatSlots,C5 as turboCatScan,O4 as slotsByCategory,bZ as serializeFaf,X5 as seedSixWsFromGoal,I$ as scoreFafYaml,xY as runLoop,b8 as renderProjectHtml,z4 as renderGeminiMd,J4 as renderCursorrules,q4 as renderCopilotInstructions,ZW as renderClaudeMd,X4 as renderAgentsMd,x5 as relentlessContextDetailed,Q$ as relentlessContext,j8 as registryName,E8 as registryMeta,ZY as readFafa,EZ as readFafRaw,Nq as readFaf,eB as readClaudeMd,u8 as questionForSlot,fY as publicQuestions,VY as projectCards,QW as parseClaudeMd,i1 as normalizeAnswer,H5 as loopVerdict,D$ as kernel,T0 as isPlaceholder,z5 as isHumanSlot,c1 as isEmptyValue,wY as interviewForMissing,Q0 as injectFafBlock,kY as gradeAnswers,Y2 as getTier,K4 as getNextTier,aq as generateServerCard,mq as generateProjectHtml,zY as generateA2ACard,aZ as fromClaudeDir,QY as findFafaFile,jZ as findFafFile,t5 as findFafBlock,U0 as fillEmpties,q0 as fafMetaTag,e0 as fafContextBlock,D6 as enrichScore,IW as enrichFromRepo,vY as deriveQuestionSet,Eq as computeDrift,J5 as classifyGaps,y2 as canonicalPriority,jY as buildTableOf8,g2 as buildServerCard,uY as buildReceipt,g8 as buildA2ACard,pB as assembleFreshFaf,G5 as answersMatch,Y0 as TIERS,Z5 as STACK_INTERVIEW,A0 as SLOT_BY_PATH,f as SLOTS,k8 as SIX_WS_INTERVIEW,kZ as REGISTRY_PUBLISHER_KEY,N0 as PRIORITY_RANK,y8 as PRIORITY_ORDER,o2 as PLACEHOLDERS,d1 as KNOWLEDGE_TYPES,$5 as INTERVIEW_VERSION,TY as INTERVIEW_PATHS,Q5 as INTERVIEW_BY_PATH,Q2 as INTERVIEW,g0 as FafmSoul,U6 as FAF_START,q2 as FAF_HEX,q6 as FAF_END,I4 as ENTERPRISE_SLOTS,p8 as BENCH_VERSION,D4 as BASE_SLOTS,Y5 as ALIAS_GROUPS,pZ as A2A_CONTEXT_URI};
242
+
243
+ //# debugId=BF5C086D07C3FBEC64756E2164756E21
232
244
  //# sourceMappingURL=index.js.map