@timo9378/flow2code 0.1.6 → 0.1.7
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/CHANGELOG.md +16 -0
- package/dist/cli.js +54 -18
- package/dist/compiler.cjs +17 -12
- package/dist/compiler.js +17 -12
- package/dist/server.js +16 -12
- package/out/404.html +1 -1
- package/out/__next.__PAGE__.txt +2 -2
- package/out/__next._full.txt +2 -2
- package/out/__next._head.txt +1 -1
- package/out/__next._index.txt +1 -1
- package/out/__next._tree.txt +1 -1
- package/out/_next/static/chunks/{bfa275b7488d8b70.js → 2fd98ca28cbab9a6.js} +1 -1
- package/out/_next/static/chunks/4ce13068a7e61854.js +25 -0
- package/out/_next/static/chunks/{5f1a9fec0e69c483.js → fd3c7cf5ea219c74.js} +1 -1
- package/out/_not-found/__next._full.txt +1 -1
- package/out/_not-found/__next._head.txt +1 -1
- package/out/_not-found/__next._index.txt +1 -1
- package/out/_not-found/__next._not-found/__PAGE__.txt +1 -1
- package/out/_not-found/__next._not-found.txt +1 -1
- package/out/_not-found/__next._tree.txt +1 -1
- package/out/_not-found.html +1 -1
- package/out/_not-found.txt +1 -1
- package/out/index.html +2 -2
- package/out/index.txt +2 -2
- package/package.json +1 -1
- /package/out/_next/static/{wFX9tOZWtEdER7XrtbgHQ → 4eCLtLp-IPL1tppPGnHZE}/_buildManifest.js +0 -0
- /package/out/_next/static/{wFX9tOZWtEdER7XrtbgHQ → 4eCLtLp-IPL1tppPGnHZE}/_clientMiddlewareManifest.json +0 -0
- /package/out/_next/static/{wFX9tOZWtEdER7XrtbgHQ → 4eCLtLp-IPL1tppPGnHZE}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33958,e=>{"use strict";let t,s=Symbol.for("yaml.alias"),n=Symbol.for("yaml.document"),i=Symbol.for("yaml.map"),r=Symbol.for("yaml.pair"),o=Symbol.for("yaml.scalar"),l=Symbol.for("yaml.seq"),a=Symbol.for("yaml.node.type"),c=e=>!!e&&"object"==typeof e&&e[a]===s,u=e=>!!e&&"object"==typeof e&&e[a]===n,f=e=>!!e&&"object"==typeof e&&e[a]===i,h=e=>!!e&&"object"==typeof e&&e[a]===r,d=e=>!!e&&"object"==typeof e&&e[a]===o,p=e=>!!e&&"object"==typeof e&&e[a]===l;function m(e){if(e&&"object"==typeof e)switch(e[a]){case i:case l:return!0}return!1}function y(e){if(e&&"object"==typeof e)switch(e[a]){case s:case i:case o:case l:return!0}return!1}let g=e=>(d(e)||m(e))&&!!e.anchor,b=Symbol("break visit"),k=Symbol("skip children"),w=Symbol("remove node");function v(e,t){let s=O(t);u(e)?S(null,e.contents,s,Object.freeze([e]))===w&&(e.contents=null):S(null,e,s,Object.freeze([]))}function S(e,t,s,n){let i=A(e,t,s,n);if(y(i)||h(i))return T(e,n,i),S(e,i,s,n);if("symbol"!=typeof i){if(m(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){let i=S(e,t.items[e],s,n);if("number"==typeof i)e=i-1;else{if(i===b)return b;i===w&&(t.items.splice(e,1),e-=1)}}}else if(h(t)){n=Object.freeze(n.concat(t));let e=S("key",t.key,s,n);if(e===b)return b;e===w&&(t.key=null);let i=S("value",t.value,s,n);if(i===b)return b;i===w&&(t.value=null)}}return i}async function E(e,t){let s=O(t);u(e)?await N(null,e.contents,s,Object.freeze([e]))===w&&(e.contents=null):await N(null,e,s,Object.freeze([]))}async function N(e,t,s,n){let i=await A(e,t,s,n);if(y(i)||h(i))return T(e,n,i),N(e,i,s,n);if("symbol"!=typeof i){if(m(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){let i=await N(e,t.items[e],s,n);if("number"==typeof i)e=i-1;else{if(i===b)return b;i===w&&(t.items.splice(e,1),e-=1)}}}else if(h(t)){n=Object.freeze(n.concat(t));let e=await N("key",t.key,s,n);if(e===b)return b;e===w&&(t.key=null);let i=await N("value",t.value,s,n);if(i===b)return b;i===w&&(t.value=null)}}return i}function O(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function A(e,t,s,n){return"function"==typeof s?s(e,t,n):f(t)?s.Map?.(e,t,n):p(t)?s.Seq?.(e,t,n):h(t)?s.Pair?.(e,t,n):d(t)?s.Scalar?.(e,t,n):c(t)?s.Alias?.(e,t,n):void 0}function T(e,t,s){let n=t[t.length-1];if(m(n))n.items[e]=s;else if(h(n))"key"===e?n.key=s:n.value=s;else if(u(n))n.contents=s;else{let e=c(n)?"alias":"scalar";throw Error(`Cannot replace node with ${e} parent`)}}v.BREAK=b,v.SKIP=k,v.REMOVE=w,E.BREAK=b,E.SKIP=k,E.REMOVE=w;let L={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},x=e=>e.replace(/[!,[\]{}]/g,e=>L[e]);class I{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},I.defaultYaml,e),this.tags=Object.assign({},I.defaultTags,t)}clone(){let e=new I(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new I(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:I.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},I.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:I.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},I.defaultTags),this.atNextDocument=!1);let s=e.trim().split(/[ \t]+/),n=s.shift();switch(n){case"%TAG":{if(2!==s.length&&(t(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;let[e,n]=s;return this.tags[e]=n,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==s.length)return t(0,"%YAML directive should contain exactly one part"),!1;let[e]=s;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;{let s=/^\d+\.\d+$/.test(e);return t(6,`Unsupported YAML version ${e}`,s),!1}}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){let s=e.slice(2,-1);return"!"===s||"!!"===s?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),s)}let[,s,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);let i=this.tags[s];if(i)try{return i+decodeURIComponent(n)}catch(e){return t(String(e)),null}return"!"===s?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,s]of Object.entries(this.tags))if(e.startsWith(s))return t+x(e.substring(s.length));return"!"===e[0]?e:`!<${e}>`}toString(e){let t,s=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);if(e&&n.length>0&&y(e.contents)){let s={};v(e.contents,(e,t)=>{y(t)&&t.tag&&(s[t.tag]=!0)}),t=Object.keys(s)}else t=[];for(let[i,r]of n)("!!"!==i||"tag:yaml.org,2002:"!==r)&&(!e||t.some(e=>e.startsWith(r)))&&s.push(`%TAG ${i} ${r}`);return s.join("\n")}}function $(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=JSON.stringify(e);throw Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function C(e){let t=new Set;return v(e,{Value(e,s){s.anchor&&t.add(s.anchor)}}),t}function _(e,t){for(let s=1;;++s){let n=`${e}${s}`;if(!t.has(n))return n}}function B(e,t,s,n){if(n&&"object"==typeof n)if(Array.isArray(n))for(let t=0,s=n.length;t<s;++t){let s=n[t],i=B(e,n,String(t),s);void 0===i?delete n[t]:i!==s&&(n[t]=i)}else if(n instanceof Map)for(let t of Array.from(n.keys())){let s=n.get(t),i=B(e,n,t,s);void 0===i?n.delete(t):i!==s&&n.set(t,i)}else if(n instanceof Set)for(let t of Array.from(n)){let s=B(e,n,t,t);void 0===s?n.delete(t):s!==t&&(n.delete(t),n.add(s))}else for(let[t,s]of Object.entries(n)){let i=B(e,n,t,s);void 0===i?delete n[t]:i!==s&&(n[t]=i)}return e.call(t,s,n)}function M(e,t,s){if(Array.isArray(e))return e.map((e,t)=>M(e,String(t),s));if(e&&"function"==typeof e.toJSON){if(!s||!g(e))return e.toJSON(t,s);let n={aliasCount:0,count:1,res:void 0};s.anchors.set(e,n),s.onCreate=e=>{n.res=e,delete s.onCreate};let i=e.toJSON(t,s);return s.onCreate&&s.onCreate(i),i}return"bigint"!=typeof e||s?.keep?e:Number(e)}I.defaultYaml={explicit:!1,version:"1.2"},I.defaultTags={"!!":"tag:yaml.org,2002:"};class K{constructor(e){Object.defineProperty(this,a,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:s,onAnchor:n,reviver:i}={}){if(!u(e))throw TypeError("A document argument is required");let r={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof s?s:100},o=M(this,"",r);if("function"==typeof n)for(let{count:e,res:t}of r.anchors.values())n(t,e);return"function"==typeof i?B(i,{"":o},"",o):o}}class D extends K{constructor(e){super(s),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(e,t){let s,n;for(let i of(t?.aliasResolveCache?s=t.aliasResolveCache:(s=[],v(e,{Node:(e,t)=>{(c(t)||g(t))&&s.push(t)}}),t&&(t.aliasResolveCache=s)),s)){if(i===this)break;i.anchor===this.source&&(n=i)}return n}toJSON(e,t){if(!t)return{source:this.source};let{anchors:s,doc:n,maxAliasCount:i}=t,r=this.resolve(n,t);if(!r)throw ReferenceError(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);let o=s.get(r);if(o||(M(r,null,t),o=s.get(r)),o?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0&&(o.count+=1,0===o.aliasCount&&(o.aliasCount=function e(t,s,n){if(c(s)){let e=s.resolve(t),i=n&&e&&n.get(e);return i?i.count*i.aliasCount:0}if(m(s)){let i=0;for(let r of s.items){let s=e(t,r,n);s>i&&(i=s)}return i}return h(s)?Math.max(e(t,s.key,n),e(t,s.value,n)):1}(n,r,s)),o.count*o.aliasCount>i))throw ReferenceError("Excessive alias count indicates a resource exhaustion attack");return o.res}toString(e,t,s){let n=`*${this.source}`;if(e){if($(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source))throw Error(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);if(e.implicitKey)return`${n} `}return n}}let j=e=>!e||"function"!=typeof e&&"object"!=typeof e;class q extends K{constructor(e){super(o),this.value=e}toJSON(e,t){return t?.keep?this.value:M(this.value,e,t)}toString(){return String(this.value)}}function P(e,t,s){let n;if(u(e)&&(e=e.contents),y(e))return e;if(h(e)){let t=s.schema[i].createNode?.(s.schema,null,s);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"u">typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:o,onTagObj:a,schema:c,sourceObjects:f}=s;if(r&&e&&"object"==typeof e){if(n=f.get(e))return n.anchor??(n.anchor=o(e)),new D(n.anchor);n={anchor:null,node:null},f.set(e,n)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let d=function(e,t,s){if(t){let e=s.filter(e=>e.tag===t),n=e.find(e=>!e.format)??e[0];if(!n)throw Error(`Tag ${t} not found`);return n}return s.find(t=>t.identify?.(e)&&!t.format)}(e,t,c.tags);if(!d){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){let t=new q(e);return n&&(n.node=t),t}d=e instanceof Map?c[i]:Symbol.iterator in Object(e)?c[l]:c[i]}a&&(a(d),delete s.onTagObj);let p=d?.createNode?d.createNode(s.schema,e,s):"function"==typeof d?.nodeClass?.from?d.nodeClass.from(s.schema,e,s):new q(e);return t?p.tag=t:d.default||(p.tag=d.tag),n&&(n.node=p),p}function U(e,t,s){let n=s;for(let e=t.length-1;e>=0;--e){let s=t[e];if("number"==typeof s&&Number.isInteger(s)&&s>=0){let e=[];e[s]=n,n=e}else n=new Map([[s,n]])}return P(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}q.BLOCK_FOLDED="BLOCK_FOLDED",q.BLOCK_LITERAL="BLOCK_LITERAL",q.PLAIN="PLAIN",q.QUOTE_DOUBLE="QUOTE_DOUBLE",q.QUOTE_SINGLE="QUOTE_SINGLE";let R=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class F extends K{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>y(t)||h(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(R(e))this.add(t);else{let[s,...n]=e,i=this.get(s,!0);if(m(i))i.addIn(n,t);else if(void 0===i&&this.schema)this.set(s,U(this.schema,n,t));else throw Error(`Expected YAML collection at ${s}. Remaining path: ${n}`)}}deleteIn(e){let[t,...s]=e;if(0===s.length)return this.delete(t);let n=this.get(t,!0);if(m(n))return n.deleteIn(s);throw Error(`Expected YAML collection at ${t}. Remaining path: ${s}`)}getIn(e,t){let[s,...n]=e,i=this.get(s,!0);return 0===n.length?!t&&d(i)?i.value:i:m(i)?i.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!h(t))return!1;let s=t.value;return null==s||e&&d(s)&&null==s.value&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){let[t,...s]=e;if(0===s.length)return this.has(t);let n=this.get(t,!0);return!!m(n)&&n.hasIn(s)}setIn(e,t){let[s,...n]=e;if(0===n.length)this.set(s,t);else{let e=this.get(s,!0);if(m(e))e.setIn(n,t);else if(void 0===e&&this.schema)this.set(s,U(this.schema,n,t));else throw Error(`Expected YAML collection at ${s}. Remaining path: ${n}`)}}}let J=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function V(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}let Y=(e,t,s)=>e.endsWith("\n")?V(s,t):s.includes("\n")?"\n"+V(s,t):(e.endsWith(" ")?"":" ")+s,W="flow",G="block",Q="quoted";function H(e,t,s="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:r=20,onFold:o,onOverflow:l}={}){let a,c,u;if(!i||i<0)return e;i<r&&(r=0);let f=Math.max(1+r,1+i-t.length);if(e.length<=f)return e;let h=[],d={},p=i-t.length;"number"==typeof n&&(n>i-Math.max(2,r)?h.push(0):p=i-n);let m=!1,y=-1,g=-1,b=-1;for(s===G&&-1!==(y=X(e,y,t.length))&&(p=y+f);u=e[y+=1];){if(s===Q&&"\\"===u){switch(g=y,e[y+1]){case"x":y+=3;break;case"u":y+=5;break;case"U":y+=9;break;default:y+=1}b=y}if("\n"===u)s===G&&(y=X(e,y,t.length)),p=y+t.length+f,a=void 0;else{if(" "===u&&c&&" "!==c&&"\n"!==c&&" "!==c){let t=e[y+1];t&&" "!==t&&"\n"!==t&&" "!==t&&(a=y)}if(y>=p)if(a)h.push(a),p=a+f,a=void 0;else if(s===Q){for(;" "===c||" "===c;)c=u,u=e[y+=1],m=!0;let t=y>b+1?y-2:g-1;if(d[t])return e;h.push(t),d[t]=!0,p=t+f,a=void 0}else m=!0}c=u}if(m&&l&&l(),0===h.length)return e;o&&o();let k=e.slice(0,h[0]);for(let n=0;n<h.length;++n){let i=h[n],r=h[n+1]||e.length;0===i?k=`
|
|
2
|
+
${t}${e.slice(0,r)}`:(s===Q&&d[i]&&(k+=`${e[i]}\\`),k+=`
|
|
3
|
+
${t}${e.slice(i+1,r)}`)}return k}function X(e,t,s){let n=t,i=t+1,r=e[i];for(;" "===r||" "===r;)if(t<i+s)r=e[++t];else{do r=e[++t];while(r&&"\n"!==r)n=t,r=e[i=t+1]}return n}let z=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth});function Z(e,t){let s=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return s;let{implicitKey:n}=t,i=t.options.doubleQuotedMinMultiLineLength,r=t.indent||(/^(%|---|\.\.\.)/m.test(e)?" ":""),o="",l=0;for(let e=0,t=s[e];t;t=s[++e])if(" "===t&&"\\"===s[e+1]&&"n"===s[e+2]&&(o+=s.slice(l,e)+"\\ ",e+=1,l=e,t="\\"),"\\"===t)switch(s[e+1]){case"u":{o+=s.slice(l,e);let t=s.substr(e+2,4);switch(t){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:"00"===t.substr(0,2)?o+="\\x"+t.substr(2):o+=s.substr(e,6)}e+=5,l=e+1}break;case"n":if(n||'"'===s[e+2]||s.length<i)e+=1;else{for(o+=s.slice(l,e)+"\n\n";"\\"===s[e+2]&&"n"===s[e+3]&&'"'!==s[e+4];)o+="\n",e+=2;o+=r," "===s[e+2]&&(o+="\\"),e+=1,l=e+1}break;default:e+=1}return o=l?o+s.slice(l):s,n?o:H(o,r,Q,z(t,!1))}function ee(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return Z(e,t);let s=t.indent||(/^(%|---|\.\.\.)/m.test(e)?" ":""),n="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
4
|
+
${s}`)+"'";return t.implicitKey?n:H(n,s,W,z(t,!1))}function et(e,t){let s,{singleQuote:n}=t.options;if(!1===n)s=Z;else{let t=e.includes('"'),i=e.includes("'");s=t&&!i?ee:i&&!t?Z:n?ee:Z}return s(e,t)}try{t=RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{t=/\n+(?!\n|$)/g}function es({comment:e,type:s,value:n},i,r,o){let l,a,c,u,{blockQuote:f,commentString:h,lineWidth:d}=i.options;if(!f||/\n[\t ]+$/.test(n))return et(n,i);let p=i.indent||(i.forceBlockIndent||(u=n,/^(%|---|\.\.\.)/m.test(u))?" ":""),m="literal"===f||"folded"!==f&&s!==q.BLOCK_FOLDED&&(s===q.BLOCK_LITERAL||!function(e,t,s){if(!t||t<0)return!1;let n=t-s,i=e.length;if(i<=n)return!1;for(let t=0,s=0;t<i;++t)if("\n"===e[t]){if(t-s>n)return!0;if(i-(s=t+1)<=n)return!1}return!0}(n,d,p.length));if(!n)return m?"|\n":">\n";for(a=n.length;a>0;--a){let e=n[a-1];if("\n"!==e&&" "!==e&&" "!==e)break}let y=n.substring(a),g=y.indexOf("\n");-1===g?l="-":n===y||g!==y.length-1?(l="+",o&&o()):l="",y&&(n=n.slice(0,-y.length),"\n"===y[y.length-1]&&(y=y.slice(0,-1)),y=y.replace(t,`$&${p}`));let b=!1,k=-1;for(c=0;c<n.length;++c){let e=n[c];if(" "===e)b=!0;else if("\n"===e)k=c;else break}let w=n.substring(0,k<c?k+1:c);w&&(n=n.substring(w.length),w=w.replace(/\n+/g,`$&${p}`));let v=p?"2":"1",S=(b?v:"")+l;if(e&&(S+=" "+h(e.replace(/ ?[\r\n]+/g," ")),r&&r()),!m){let e=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`),t=!1,r=z(i,!0);"folded"!==f&&s!==q.BLOCK_FOLDED&&(r.onOverflow=()=>{t=!0});let o=H(`${w}${e}${y}`,p,G,r);if(!t)return`>${S}
|
|
5
|
+
${p}${o}`}return n=n.replace(/\n+/g,`$&${p}`),`|${S}
|
|
6
|
+
${p}${w}${n}${y}`}function en(e,t,s,n){let{implicitKey:i,inFlow:r}=t,o="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)}),{type:l}=e;l!==q.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(l=q.QUOTE_DOUBLE);let a=e=>{switch(e){case q.BLOCK_FOLDED:case q.BLOCK_LITERAL:return i||r?et(o.value,t):es(o,t,s,n);case q.QUOTE_DOUBLE:return Z(o.value,t);case q.QUOTE_SINGLE:return ee(o.value,t);case q.PLAIN:return function(e,t,s,n){let{type:i,value:r}=e,{actualString:o,implicitKey:l,indent:a,indentStep:c,inFlow:u}=t;if(l&&r.includes("\n")||u&&/[[\]{},]/.test(r))return et(r,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return l||u||!r.includes("\n")?et(r,t):es(e,t,s,n);if(!l&&!u&&i!==q.PLAIN&&r.includes("\n"))return es(e,t,s,n);if(/^(%|---|\.\.\.)/m.test(r)){if(""===a)return t.forceBlockIndent=!0,es(e,t,s,n);else if(l&&a===c)return et(r,t)}let f=r.replace(/\n+/g,`$&
|
|
7
|
+
${a}`);if(o){let e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(f),{compat:s,tags:n}=t.doc.schema;if(n.some(e)||s?.some(e))return et(r,t)}return l?f:H(f,a,W,z(t,!1))}(o,t,s,n);default:return null}},c=a(l);if(null===c){let{defaultKeyType:e,defaultStringType:s}=t.options,n=i&&e||s;if(null===(c=a(n)))throw Error(`Unsupported default string type ${n}`)}return c}function ei(e,t){let s,n=Object.assign({blockQuote:!0,commentString:J,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,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);switch(n.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof n.indent?" ".repeat(n.indent):" ",inFlow:s,options:n}}function er(e,t,s,n){let i;if(h(e))return e.toString(t,s,n);if(c(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let r=y(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??(i=function(e,t){let s,n;if(t.tag){let s=e.filter(e=>e.tag===t.tag);if(s.length>0)return s.find(e=>e.format===t.format)??s[0]}if(d(t)){s=t.value;let i=e.filter(e=>e.identify?.(s));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else s=t,n=e.find(e=>e.nodeClass&&s instanceof e.nodeClass);if(!n){let e=s?.constructor?.name??(null===s?"null":typeof s);throw Error(`Tag not resolved for ${e} value`)}return n}(t.doc.schema.tags,r));let o=function(e,t,{anchors:s,doc:n}){if(!n.directives)return"";let i=[],r=(d(e)||m(e))&&e.anchor;r&&$(r)&&(s.add(r),i.push(`&${r}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(n.directives.tagString(o)),i.join(" ")}(r,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let l="function"==typeof i.stringify?i.stringify(r,t,s,n):d(r)?en(r,t,s,n):r.toString(t,s,n);return o?d(r)||"{"===l[0]||"["===l[0]?`${o} ${l}`:`${o}
|
|
8
|
+
${t.indent}${l}`:l}function eo(e,t){("debug"===e||"warn"===e)&&console.warn(t)}let el={identify:e=>"<<"===e||"symbol"==typeof e&&"<<"===e.description,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new q(Symbol("<<")),{addToJSMap:ea}),stringify:()=>"<<"};function ea(e,t,s){if(p(s=e&&c(s)?s.resolve(e.doc):s))for(let n of s.items)ec(e,t,n);else if(Array.isArray(s))for(let n of s)ec(e,t,n);else ec(e,t,s)}function ec(e,t,s){let n=e&&c(s)?s.resolve(e.doc):s;if(!f(n))throw Error("Merge sources must be maps or map aliases");for(let[s,i]of n.toJSON(null,e,Map))t instanceof Map?t.has(s)||t.set(s,i):t instanceof Set?t.add(s):Object.prototype.hasOwnProperty.call(t,s)||Object.defineProperty(t,s,{value:i,writable:!0,enumerable:!0,configurable:!0});return t}function eu(e,t,{key:s,value:n}){if(y(s)&&s.addToJSMap)s.addToJSMap(e,t,n);else if((el.identify(s)||d(s)&&(!s.type||s.type===q.PLAIN)&&el.identify(s.value))&&e?.doc.schema.tags.some(e=>e.tag===el.tag&&e.default))ea(e,t,n);else{let i=M(s,"",e);if(t instanceof Map)t.set(i,M(n,i,e));else if(t instanceof Set)t.add(i);else{let r=function(e,t,s){if(null===t)return"";if("object"!=typeof t)return String(t);if(y(e)&&s?.doc){let t=ei(s.doc,{});for(let e of(t.anchors=new Set,s.anchors.keys()))t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let n=e.toString(t);if(!s.mapKeyWarned){let e=JSON.stringify(n);e.length>40&&(e=e.substring(0,36)+'..."'),eo(s.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),s.mapKeyWarned=!0}return n}return JSON.stringify(t)}(s,i,e),o=M(n,r,e);r in t?Object.defineProperty(t,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[r]=o}}return t}function ef(e,t,s){return new eh(P(e,void 0,s),P(t,void 0,s))}class eh{constructor(e,t=null){Object.defineProperty(this,a,{value:r}),this.key=e,this.value=t}clone(e){let{key:t,value:s}=this;return y(t)&&(t=t.clone(e)),y(s)&&(s=s.clone(e)),new eh(t,s)}toJSON(e,t){let s=t?.mapAsMap?new Map:{};return eu(t,s,this)}toString(e,t,s){return e?.doc?function({key:e,value:t},s,n,i){let r,o,l,{allNullValues:a,doc:c,indent:u,indentStep:f,options:{commentString:h,indentSeq:g,simpleKeys:b}}=s,k=y(e)&&e.comment||null;if(b){if(k)throw Error("With simple keys, key nodes cannot have comments");if(m(e)||!y(e)&&"object"==typeof e)throw Error("With simple keys, collection cannot be used as a key value")}let w=!b&&(!e||k&&null==t&&!s.inFlow||m(e)||(d(e)?e.type===q.BLOCK_FOLDED||e.type===q.BLOCK_LITERAL:"object"==typeof e));s=Object.assign({},s,{allNullValues:!1,implicitKey:!w&&(b||!a),indent:u+f});let v=!1,S=!1,E=er(e,s,()=>v=!0,()=>S=!0);if(!w&&!s.inFlow&&E.length>1024){if(b)throw Error("With simple keys, single line scalar must not span more than 1024 characters");w=!0}if(s.inFlow){if(a||null==t)return v&&n&&n(),""===E?"?":w?`? ${E}`:E}else if(a&&!b||null==t&&w)return E=`? ${E}`,k&&!v?E+=Y(E,s.indent,h(k)):S&&i&&i(),E;v&&(k=null),w?(k&&(E+=Y(E,s.indent,h(k))),E=`? ${E}
|
|
9
|
+
${u}:`):(E=`${E}:`,k&&(E+=Y(E,s.indent,h(k)))),y(t)?(r=!!t.spaceBefore,o=t.commentBefore,l=t.comment):(r=!1,o=null,l=null,t&&"object"==typeof t&&(t=c.createNode(t))),s.implicitKey=!1,!w&&!k&&d(t)&&(s.indentAtStart=E.length+1),S=!1,!(!g&&f.length>=2&&!s.inFlow&&!w&&p(t))||t.flow||t.tag||t.anchor||(s.indent=s.indent.substring(2));let N=!1,O=er(t,s,()=>N=!0,()=>S=!0),A=" ";if(k||r||o){if(A=r?"\n":"",o){let e=h(o);A+=`
|
|
10
|
+
${V(e,s.indent)}`}""!==O||s.inFlow?A+=`
|
|
11
|
+
${s.indent}`:"\n"===A&&l&&(A="\n\n")}else if(!w&&m(t)){let e=O[0],n=O.indexOf("\n"),i=-1!==n,r=s.inFlow??t.flow??0===t.items.length;if(i||!r){let t=!1;if(i&&("&"===e||"!"===e)){let s=O.indexOf(" ");"&"===e&&-1!==s&&s<n&&"!"===O[s+1]&&(s=O.indexOf(" ",s+1)),(-1===s||n<s)&&(t=!0)}t||(A=`
|
|
12
|
+
${s.indent}`)}}else(""===O||"\n"===O[0])&&(A="");return E+=A+O,s.inFlow?N&&n&&n():l&&!N?E+=Y(E,s.indent,h(l)):S&&i&&i(),E}(this,e,t,s):JSON.stringify(this)}}function ed(e,t,s){return(t.inFlow??e.flow?function({items:e},t,{flowChars:s,itemIndent:n}){let{indent:i,indentStep:r,flowCollectionPadding:o,options:{commentString:l}}=t,a=Object.assign({},t,{indent:n+=r,inFlow:!0,type:null}),c=!1,u=0,f=[];for(let s=0;s<e.length;++s){let i=e[s],r=null;if(y(i))i.spaceBefore&&f.push(""),ep(t,f,i.commentBefore,!1),i.comment&&(r=i.comment);else if(h(i)){let e=y(i.key)?i.key:null;e&&(e.spaceBefore&&f.push(""),ep(t,f,e.commentBefore,!1),e.comment&&(c=!0));let s=y(i.value)?i.value:null;s?(s.comment&&(r=s.comment),s.commentBefore&&(c=!0)):null==i.value&&e?.comment&&(r=e.comment)}r&&(c=!0);let o=er(i,a,()=>r=null);s<e.length-1&&(o+=","),r&&(o+=Y(o,n,l(r))),!c&&(f.length>u||o.includes("\n"))&&(c=!0),f.push(o),u=f.length}let{start:d,end:p}=s;if(0===f.length)return d+p;if(!c){let e=f.reduce((e,t)=>e+t.length+2,2);c=t.options.lineWidth>0&&e>t.options.lineWidth}if(!c)return`${d}${o}${f.join(" ")}${o}${p}`;{let e=d;for(let t of f)e+=t?`
|
|
13
|
+
${r}${i}${t}`:"\n";return`${e}
|
|
14
|
+
${i}${p}`}}:function({comment:e,items:t},s,{blockItemPrefix:n,flowChars:i,itemIndent:r,onChompKeep:o,onComment:l}){let a,{indent:c,options:{commentString:u}}=s,f=Object.assign({},s,{indent:r,type:null}),d=!1,p=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(y(i))!d&&i.spaceBefore&&p.push(""),ep(s,p,i.commentBefore,d),i.comment&&(o=i.comment);else if(h(i)){let e=y(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&p.push(""),ep(s,p,e.commentBefore,d))}d=!1;let l=er(i,f,()=>o=null,()=>d=!0);o&&(l+=Y(l,r,u(o))),d&&o&&(d=!1),p.push(n+l)}if(0===p.length)a=i.start+i.end;else{a=p[0];for(let e=1;e<p.length;++e){let t=p[e];a+=t?`
|
|
15
|
+
${c}${t}`:"\n"}}return e?(a+="\n"+V(u(e),c),l&&l()):d&&o&&o(),a})(e,t,s)}function ep({indent:e,options:{commentString:t}},s,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let i=V(t(n),e);s.push(i.trimStart())}}function em(e,t){let s=d(t)?t.value:t;for(let n of e)if(h(n)&&(n.key===t||n.key===s||d(n.key)&&n.key.value===s))return n}class ey extends F{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(i,e),this.items=[]}static from(e,t,s){let{keepUndefined:n,replacer:i}=s,r=new this(e),o=(e,o)=>{if("function"==typeof i)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(void 0!==o||n)&&r.items.push(ef(e,o,s))};if(t instanceof Map)for(let[e,s]of t)o(e,s);else if(t&&"object"==typeof t)for(let e of Object.keys(t))o(e,t[e]);return"function"==typeof e.sortMapEntries&&r.items.sort(e.sortMapEntries),r}add(e,t){let s;s=h(e)?e:e&&"object"==typeof e&&"key"in e?new eh(e.key,e.value):new eh(e,e?.value);let n=em(this.items,s.key),i=this.schema?.sortMapEntries;if(n){if(!t)throw Error(`Key ${s.key} already set`);d(n.value)&&j(s.value)?n.value.value=s.value:n.value=s.value}else if(i){let e=this.items.findIndex(e=>0>i(s,e));-1===e?this.items.push(s):this.items.splice(e,0,s)}else this.items.push(s)}delete(e){let t=em(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){let s=em(this.items,e),n=s?.value;return(!t&&d(n)?n.value:n)??void 0}has(e){return!!em(this.items,e)}set(e,t){this.add(new eh(e,t),!0)}toJSON(e,t,s){let n=s?new s:t?.mapAsMap?new Map:{};for(let e of(t?.onCreate&&t.onCreate(n),this.items))eu(t,n,e);return n}toString(e,t,s){if(!e)return JSON.stringify(this);for(let e of this.items)if(!h(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),ed(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:t})}}let eg={collection:"map",default:!0,nodeClass:ey,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(f(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,s)=>ey.from(e,t,s)};class eb extends F{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(l,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=ek(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){let s=ek(e);if("number"!=typeof s)return;let n=this.items[s];return!t&&d(n)?n.value:n}has(e){let t=ek(e);return"number"==typeof t&&t<this.items.length}set(e,t){let s=ek(e);if("number"!=typeof s)throw Error(`Expected a valid index, not ${e}.`);let n=this.items[s];d(n)&&j(t)?n.value=t:this.items[s]=t}toJSON(e,t){let s=[];t?.onCreate&&t.onCreate(s);let n=0;for(let e of this.items)s.push(M(e,String(n++),t));return s}toString(e,t,s){return e?ed(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:t}):JSON.stringify(this)}static from(e,t,s){let{replacer:n}=s,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let r of t){if("function"==typeof n){let s=t instanceof Set?r:String(e++);r=n.call(t,s,r)}i.items.push(P(r,void 0,s))}}return i}}function ek(e){let t=d(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}let ew={collection:"seq",default:!0,nodeClass:eb,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(p(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,s)=>eb.from(e,t,s)},ev={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,s,n)=>en(e,t=Object.assign({actualString:!0},t),s,n)},eS={identify:e=>null==e,createNode:()=>new q(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new q(null),stringify:({source:e},t)=>"string"==typeof e&&eS.test.test(e)?e:t.options.nullStr},eE={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new q("t"===e[0]||"T"===e[0]),stringify:({source:e,value:t},s)=>e&&eE.test.test(e)&&t===("t"===e[0]||"T"===e[0])?e:t?s.options.trueStr:s.options.falseStr};function eN({format:e,minFractionDigits:t,tag:s,value:n}){if("bigint"==typeof n)return String(n);let i="number"==typeof n?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=Object.is(n,-0)?"-0":JSON.stringify(n);if(!e&&t&&(!s||"tag:yaml.org,2002:float"===s)&&/^\d/.test(r)){let e=r.indexOf(".");e<0&&(e=r.length,r+=".");let s=t-(r.length-e-1);for(;s-- >0;)r+="0"}return r}let eO={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?-1/0:1/0,stringify:eN},eA={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():eN(e)}},eT={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new q(parseFloat(e)),s=e.indexOf(".");return -1!==s&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-s-1),t},stringify:eN},eL=e=>"bigint"==typeof e||Number.isInteger(e),ex=(e,t,s,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),s);function eI(e,t,s){let{value:n}=e;return eL(n)&&n>=0?s+n.toString(t):eN(e)}let e$={identify:e=>eL(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,s)=>ex(e,2,8,s),stringify:e=>eI(e,8,"0o")},eC={identify:eL,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,s)=>ex(e,0,10,s),stringify:eN},e_={identify:e=>eL(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,s)=>ex(e,2,16,s),stringify:e=>eI(e,16,"0x")},eB=[eg,ew,ev,eS,eE,e$,eC,e_,eO,eA,eT];function eM(e){return"bigint"==typeof e||Number.isInteger(e)}let eK=({value:e})=>JSON.stringify(e),eD=[eg,ew].concat([{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:eK},{identify:e=>null==e,createNode:()=>new q(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:eK},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:eK},{identify:eM,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:s})=>s?BigInt(e):parseInt(e,10),stringify:({value:e})=>eM(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:eK}],{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)}),ej={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"!=typeof atob)return t("This environment does not support reading binary tags; either Buffer or atob is required"),e;{let t=atob(e.replace(/[\n\r]/g,"")),s=new Uint8Array(t.length);for(let e=0;e<t.length;++e)s[e]=t.charCodeAt(e);return s}},stringify({comment:e,type:t,value:s},n,i,r){let o;if(!s)return"";if("function"==typeof btoa){let e="";for(let t=0;t<s.length;++t)e+=String.fromCharCode(s[t]);o=btoa(e)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=q.BLOCK_LITERAL),t!==q.QUOTE_DOUBLE){let e=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),s=Math.ceil(o.length/e),i=Array(s);for(let t=0,n=0;t<s;++t,n+=e)i[t]=o.substr(n,e);o=i.join(t===q.BLOCK_LITERAL?"\n":" ")}return en({comment:e,type:t,value:o},n,i,r)}};function eq(e,t){if(p(e))for(let s=0;s<e.items.length;++s){let n=e.items[s];if(!h(n)){if(f(n)){n.items.length>1&&t("Each pair must have its own sequence indicator");let e=n.items[0]||new eh(new q(null));if(n.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${n.commentBefore}
|
|
16
|
+
${e.key.commentBefore}`:n.commentBefore),n.comment){let t=e.value??e.key;t.comment=t.comment?`${n.comment}
|
|
17
|
+
${t.comment}`:n.comment}n=e}e.items[s]=h(n)?n:new eh(n)}}else t("Expected a sequence for this tag");return e}function eP(e,t,s){let{replacer:n}=s,i=new eb(e);i.tag="tag:yaml.org,2002:pairs";let r=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let o,l;if("function"==typeof n&&(e=n.call(t,String(r++),e)),Array.isArray(e))if(2===e.length)o=e[0],l=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`);else if(e&&e instanceof Object){let t=Object.keys(e);if(1===t.length)l=e[o=t[0]];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(ef(o,l,s))}return i}let eU={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:eq,createNode:eP};class eR extends eb{constructor(){super(),this.add=ey.prototype.add.bind(this),this.delete=ey.prototype.delete.bind(this),this.get=ey.prototype.get.bind(this),this.has=ey.prototype.has.bind(this),this.set=ey.prototype.set.bind(this),this.tag=eR.tag}toJSON(e,t){if(!t)return super.toJSON(e);let s=new Map;for(let e of(t?.onCreate&&t.onCreate(s),this.items)){let n,i;if(h(e)?(n=M(e.key,"",t),i=M(e.value,n,t)):n=M(e,"",t),s.has(n))throw Error("Ordered maps must not include duplicate keys");s.set(n,i)}return s}static from(e,t,s){let n=eP(e,t,s),i=new this;return i.items=n.items,i}}eR.tag="tag:yaml.org,2002:omap";let eF={collection:"seq",identify:e=>e instanceof Map,nodeClass:eR,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let s=eq(e,t),n=[];for(let{key:e}of s.items)d(e)&&(n.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):n.push(e.value));return Object.assign(new eR,s)},createNode:(e,t,s)=>eR.from(e,t,s)};function eJ({value:e,source:t},s){return t&&(e?eV:eY).test.test(t)?t:e?s.options.trueStr:s.options.falseStr}let eV={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new q(!0),stringify:eJ},eY={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new q(!1),stringify:eJ},eW=e=>"bigint"==typeof e||Number.isInteger(e);function eG(e,t,s,{intAsBigInt:n}){let i=e[0];if(("-"===i||"+"===i)&&(t+=1),e=e.substring(t).replace(/_/g,""),n){switch(s){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return"-"===i?BigInt(-1)*t:t}let r=parseInt(e,s);return"-"===i?-1*r:r}function eQ(e,t,s){let{value:n}=e;if(eW(n)){let e=n.toString(t);return n<0?"-"+s+e.substr(1):s+e}return eN(e)}class eH extends ey{constructor(e){super(e),this.tag=eH.tag}add(e){let t;t=h(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new eh(e.key,null):new eh(e,null),em(this.items,t.key)||this.items.push(t)}get(e,t){let s=em(this.items,e);return!t&&h(s)?d(s.key)?s.key.value:s.key:s}set(e,t){if("boolean"!=typeof t)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let s=em(this.items,e);s&&!t?this.items.splice(this.items.indexOf(s),1):!s&&t&&this.items.push(new eh(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,s);throw Error("Set items must all have null values")}static from(e,t,s){let{replacer:n}=s,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof n&&(e=n.call(t,e,e)),i.items.push(ef(e,null,s));return i}}eH.tag="tag:yaml.org,2002:set";let eX={collection:"map",identify:e=>e instanceof Set,nodeClass:eH,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,s)=>eH.from(e,t,s),resolve(e,t){if(f(e))if(e.hasAllNullValues(!0))return Object.assign(new eH,e);else t("Set items must all have null values");else t("Expected a mapping for this tag");return e}};function ez(e,t){let s=e[0],n="-"===s||"+"===s?e.substring(1):e,i=e=>t?BigInt(e):Number(e),r=n.replace(/_/g,"").split(":").reduce((e,t)=>e*i(60)+i(t),i(0));return"-"===s?i(-1)*r:r}function eZ(e){let{value:t}=e,s=e=>e;if("bigint"==typeof t)s=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return eN(e);let n="";t<0&&(n="-",t*=s(-1));let i=s(60),r=[t%i];return t<60?r.unshift(0):(t=(t-r[0])/i,r.unshift(t%i),t>=60&&(t=(t-r[0])/i,r.unshift(t))),n+r.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}let e0={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:s})=>ez(e,s),stringify:eZ},e1={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>ez(e,!1),stringify:eZ},e2={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(e2.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,s,n,i,r,o,l]=t.map(Number),a=Date.UTC(s,n-1,i,r||0,o||0,l||0,t[7]?Number((t[7]+"00").substr(1,3)):0),c=t[8];if(c&&"Z"!==c){let e=ez(c,!1);30>Math.abs(e)&&(e*=60),a-=6e4*e}return new Date(a)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},e9=[eg,ew,ev,eS,eV,eY,{identify:eW,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,s)=>eG(e,2,2,s),stringify:e=>eQ(e,2,"0b")},{identify:eW,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,s)=>eG(e,1,8,s),stringify:e=>eQ(e,8,"0")},{identify:eW,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,s)=>eG(e,0,10,s),stringify:eN},{identify:eW,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,s)=>eG(e,2,16,s),stringify:e=>eQ(e,16,"0x")},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?-1/0:1/0,stringify:eN},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():eN(e)}},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new q(parseFloat(e.replace(/_/g,""))),s=e.indexOf(".");if(-1!==s){let n=e.substring(s+1).replace(/_/g,"");"0"===n[n.length-1]&&(t.minFractionDigits=n.length)}return t},stringify:eN},ej,el,eF,eU,eX,e0,e1,e2],e8=new Map([["core",eB],["failsafe",[eg,ew,ev]],["json",eD],["yaml11",e9],["yaml-1.1",e9]]),e3={binary:ej,bool:eE,float:eT,floatExp:eA,floatNaN:eO,floatTime:e1,int:eC,intHex:e_,intOct:e$,intTime:e0,map:eg,merge:el,null:eS,omap:eF,pairs:eU,seq:ew,set:eX,timestamp:e2},e6={"tag:yaml.org,2002:binary":ej,"tag:yaml.org,2002:merge":el,"tag:yaml.org,2002:omap":eF,"tag:yaml.org,2002:pairs":eU,"tag:yaml.org,2002:set":eX,"tag:yaml.org,2002:timestamp":e2};function e7(e,t,s){let n=e8.get(t);if(n&&!e)return s&&!n.includes(el)?n.concat(el):n.slice();let i=n;if(!i)if(Array.isArray(e))i=[];else{let e=Array.from(e8.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}if(Array.isArray(e))for(let t of e)i=i.concat(t);else"function"==typeof e&&(i=e(i.slice()));return s&&(i=i.concat(el)),i.reduce((e,t)=>{let s="string"==typeof t?e3[t]:t;if(!s){let e=JSON.stringify(t),s=Object.keys(e3).map(e=>JSON.stringify(e)).join(", ");throw Error(`Unknown custom tag ${e}; use one of ${s}`)}return e.includes(s)||e.push(s),e},[])}let e4=(e,t)=>e.key<t.key?-1:+(e.key>t.key);class e5{constructor({compat:e,customTags:t,merge:s,resolveKnownTags:n,schema:r,sortMapEntries:a,toStringDefaults:c}){this.compat=Array.isArray(e)?e7(e,"compat"):e?e7(null,e):null,this.name="string"==typeof r&&r||"core",this.knownTags=n?e6:{},this.tags=e7(t,this.name,s),this.toStringOptions=c??null,Object.defineProperty(this,i,{value:eg}),Object.defineProperty(this,o,{value:ev}),Object.defineProperty(this,l,{value:ew}),this.sortMapEntries="function"==typeof a?a:!0===a?e4:null}clone(){let e=Object.create(e5.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}class te{constructor(e,t,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,a,{value:n});let i=null;"function"==typeof t||Array.isArray(t)?i=t:void 0===s&&t&&(s=t,t=void 0);const r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=r;let{version:o}=r;s?._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new I({version:o}),this.setSchema(o,s),this.contents=void 0===e?null:this.createNode(e,i,s)}clone(){let e=Object.create(te.prototype,{[a]:{value:n}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=y(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){tt(this.contents)&&this.contents.add(e)}addIn(e,t){tt(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let s=C(this);e.anchor=!t||s.has(t)?_(t||"a",s):t}return new D(e.anchor)}createNode(e,t,s){var n,i;let r,o,l,a;if("function"==typeof t)e=t.call({"":e},"",e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>"number"==typeof e||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else void 0===s&&t&&(s=t,t=void 0);let{aliasDuplicateObjects:c,anchorPrefix:u,flow:f,keepUndefined:h,onTagObj:p,tag:y}=s??{},{onAnchor:g,setAnchors:b,sourceObjects:k}=(n=this,i=u||"a",o=[],l=new Map,a=null,{onAnchor:e=>{o.push(e),a??(a=C(n));let t=_(i,a);return a.add(t),t},setAnchors:()=>{for(let e of o){let t=l.get(e);if("object"==typeof t&&t.anchor&&(d(t.node)||m(t.node)))t.node.anchor=t.anchor;else{let t=Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}}},sourceObjects:l}),w={aliasDuplicateObjects:c??!0,keepUndefined:h??!1,onAnchor:g,onTagObj:p,replacer:r,schema:this.schema,sourceObjects:k},v=P(e,y,w);return f&&m(v)&&(v.flow=!0),b(),v}createPair(e,t,s={}){return new eh(this.createNode(e,null,s),this.createNode(t,null,s))}delete(e){return!!tt(this.contents)&&this.contents.delete(e)}deleteIn(e){return R(e)?null!=this.contents&&(this.contents=null,!0):!!tt(this.contents)&&this.contents.deleteIn(e)}get(e,t){return m(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return R(e)?!t&&d(this.contents)?this.contents.value:this.contents:m(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!m(this.contents)&&this.contents.has(e)}hasIn(e){return R(e)?void 0!==this.contents:!!m(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=U(this.schema,[e],t):tt(this.contents)&&this.contents.set(e,t)}setIn(e,t){R(e)?this.contents=t:null==this.contents?this.contents=U(this.schema,Array.from(e),t):tt(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let s;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new I({version:"1.1"}),s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new I({version:e}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(s)this.schema=new e5(Object.assign(s,t));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:s,maxAliasCount:n,onAnchor:i,reviver:r}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===s,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},l=M(this.contents,t??"",o);if("function"==typeof i)for(let{count:e,res:t}of o.anchors.values())i(t,e);return"function"==typeof r?B(r,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||0>=Number(e.indent))){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return function(e,t){let s=[],n=!0===t.directives;if(!1!==t.directives&&e.directives){let t=e.directives.toString(e);t?(s.push(t),n=!0):e.directives.docStart&&(n=!0)}n&&s.push("---");let i=ei(e,t),{commentString:r}=i.options;if(e.commentBefore){1!==s.length&&s.unshift("");let t=r(e.commentBefore);s.unshift(V(t,""))}let o=!1,l=null;if(e.contents){if(y(e.contents)){if(e.contents.spaceBefore&&n&&s.push(""),e.contents.commentBefore){let t=r(e.contents.commentBefore);s.push(V(t,""))}i.forceBlockIndent=!!e.comment,l=e.contents.comment}let t=l?void 0:()=>o=!0,a=er(e.contents,i,()=>l=null,t);l&&(a+=Y(a,"",r(l))),("|"===a[0]||">"===a[0])&&"---"===s[s.length-1]?s[s.length-1]=`--- ${a}`:s.push(a)}else s.push(er(e.contents,i));if(e.directives?.docEnd)if(e.comment){let t=r(e.comment);t.includes("\n")?(s.push("..."),s.push(V(t,""))):s.push(`... ${t}`)}else s.push("...");else{let t=e.comment;t&&o&&(t=t.replace(/^\n+/,"")),t&&((!o||l)&&""!==s[s.length-1]&&s.push(""),s.push(V(r(t),"")))}return s.join("\n")+"\n"}(this,e)}}function tt(e){if(m(e))return!0;throw Error("Expected a YAML collection as document contents")}class ts extends Error{constructor(e,t,s,n){super(),this.name=e,this.code=s,this.message=n,this.pos=t}}class tn extends ts{constructor(e,t,s){super("YAMLParseError",e,t,s)}}class ti extends ts{constructor(e,t,s){super("YAMLWarning",e,t,s)}}let tr=(e,t)=>s=>{if(-1===s.pos[0])return;s.linePos=s.pos.map(e=>t.linePos(e));let{line:n,col:i}=s.linePos[0];s.message+=` at line ${n}, column ${i}`;let r=i-1,o=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){let e=Math.min(r-39,o.length-79);o="…"+o.substring(e),r-=e-1}if(o.length>80&&(o=o.substring(0,79)+"…"),n>1&&/^ *$/.test(o.substring(0,r))){let s=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);s.length>80&&(s=s.substring(0,79)+"…\n"),o=s+o}if(/[^ ]/.test(o)){let e=1,t=s.linePos[1];t?.line===n&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-r)));let l=" ".repeat(r)+"^".repeat(e);s.message+=`:
|
|
18
|
+
|
|
19
|
+
${o}
|
|
20
|
+
${l}
|
|
21
|
+
`}};function to(e,{flow:t,indicator:s,next:n,offset:i,onError:r,parentIndent:o,startOnNewline:l}){let a=!1,c=l,u=l,f="",h="",d=!1,p=!1,m=null,y=null,g=null,b=null,k=null,w=null,v=null;for(let i of e)switch(p&&("space"!==i.type&&"newline"!==i.type&&"comma"!==i.type&&r(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p=!1),m&&(c&&"comment"!==i.type&&"newline"!==i.type&&r(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),i.type){case"space":!t&&("doc-start"!==s||n?.type!=="flow-collection")&&i.source.includes(" ")&&(m=i),u=!0;break;case"comment":{u||r(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let e=i.source.substring(1)||" ";f?f+=h+e:f=e,h="",c=!1;break}case"newline":c?f?f+=i.source:w&&"seq-item-ind"===s||(a=!0):h+=i.source,c=!0,d=!0,(y||g)&&(b=i),u=!0;break;case"anchor":y&&r(i,"MULTIPLE_ANCHORS","A node can have at most one anchor"),i.source.endsWith(":")&&r(i.offset+i.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),y=i,v??(v=i.offset),c=!1,u=!1,p=!0;break;case"tag":g&&r(i,"MULTIPLE_TAGS","A node can have at most one tag"),g=i,v??(v=i.offset),c=!1,u=!1,p=!0;break;case s:(y||g)&&r(i,"BAD_PROP_ORDER",`Anchors and tags must be after the ${i.source} indicator`),w&&r(i,"UNEXPECTED_TOKEN",`Unexpected ${i.source} in ${t??"collection"}`),w=i,c="seq-item-ind"===s||"explicit-key-ind"===s,u=!1;break;case"comma":if(t){k&&r(i,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),k=i,c=!1,u=!1;break}default:r(i,"UNEXPECTED_TOKEN",`Unexpected ${i.type} token`),c=!1,u=!1}let S=e[e.length-1],E=S?S.offset+S.source.length:i;return p&&n&&"space"!==n.type&&"newline"!==n.type&&"comma"!==n.type&&("scalar"!==n.type||""!==n.source)&&r(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(c&&m.indent<=o||n?.type==="block-map"||n?.type==="block-seq")&&r(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:k,found:w,spaceBefore:a,comment:f,hasNewline:d,anchor:y,tag:g,newlineAfterProp:b,end:E,start:v??E}}function tl(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end){for(let t of e.end)if("newline"===t.type)return!0}return!1;case"flow-collection":for(let t of e.items){for(let e of t.start)if("newline"===e.type)return!0;if(t.sep){for(let e of t.sep)if("newline"===e.type)return!0}if(tl(t.key)||tl(t.value))return!0}return!1;default:return!0}}function ta(e,t,s){if(t?.type==="flow-collection"){let n=t.end[0];n.indent===e&&("]"===n.source||"}"===n.source)&&tl(t)&&s(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function tc(e,t,s){let{uniqueKeys:n}=e.options;if(!1===n)return!1;let i="function"==typeof n?n:(e,t)=>e===t||d(e)&&d(t)&&e.value===t.value;return t.some(e=>i(e.key,s))}let tu="All mapping items must start at the same column";function tf(e,t,s,n){let i="";if(e){let r=!1,o="";for(let l of e){let{source:e,type:a}=l;switch(a){case"space":r=!0;break;case"comment":{s&&!r&&n(l,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let t=e.substring(1)||" ";i?i+=o+t:i=t,o="";break}case"newline":i&&(o+=e),r=!0;break;default:n(l,"UNEXPECTED_TOKEN",`Unexpected ${a} at node end`)}t+=e.length}}return{comment:i,offset:t}}let th="Block collections are not allowed within flow collections",td=e=>e&&("block-map"===e.type||"block-seq"===e.type);function tp(e,t,s,n,i,r){let o="block-map"===s.type?function({composeNode:e,composeEmptyNode:t},s,n,i,r){let o=new(r?.nodeClass??ey)(s.schema);s.atRoot&&(s.atRoot=!1);let l=n.offset,a=null;for(let r of n.items){let{start:c,key:u,sep:f,value:h}=r,d=to(c,{indicator:"explicit-key-ind",next:u??f?.[0],offset:l,onError:i,parentIndent:n.indent,startOnNewline:!0}),p=!d.found;if(p){if(u&&("block-seq"===u.type?i(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in u&&u.indent!==n.indent&&i(l,"BAD_INDENT",tu)),!d.anchor&&!d.tag&&!f){a=d.end,d.comment&&(o.comment?o.comment+="\n"+d.comment:o.comment=d.comment);continue}(d.newlineAfterProp||tl(u))&&i(u??c[c.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else d.found?.indent!==n.indent&&i(l,"BAD_INDENT",tu);s.atKey=!0;let m=d.end,y=u?e(s,u,d,i):t(s,m,c,null,d,i);s.schema.compat&&ta(n.indent,u,i),s.atKey=!1,tc(s,o.items,y)&&i(m,"DUPLICATE_KEY","Map keys must be unique");let g=to(f??[],{indicator:"map-value-ind",next:h,offset:y.range[2],onError:i,parentIndent:n.indent,startOnNewline:!u||"block-scalar"===u.type});if(l=g.end,g.found){p&&(h?.type!=="block-map"||g.hasNewline||i(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),s.options.strict&&d.start<g.found.offset-1024&&i(y.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let a=h?e(s,h,g,i):t(s,l,f,null,g,i);s.schema.compat&&ta(n.indent,h,i),l=a.range[2];let c=new eh(y,a);s.options.keepSourceTokens&&(c.srcToken=r),o.items.push(c)}else{p&&i(y.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),g.comment&&(y.comment?y.comment+="\n"+g.comment:y.comment=g.comment);let e=new eh(y);s.options.keepSourceTokens&&(e.srcToken=r),o.items.push(e)}}return a&&a<l&&i(a,"IMPOSSIBLE","Map comment with trailing content"),o.range=[n.offset,l,a??l],o}(e,t,s,n,r):"block-seq"===s.type?function({composeNode:e,composeEmptyNode:t},s,n,i,r){let o=new(r?.nodeClass??eb)(s.schema);s.atRoot&&(s.atRoot=!1),s.atKey&&(s.atKey=!1);let l=n.offset,a=null;for(let{start:r,value:c}of n.items){let u=to(r,{indicator:"seq-item-ind",next:c,offset:l,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!u.found)if(u.anchor||u.tag||c)c?.type==="block-seq"?i(u.end,"BAD_INDENT","All sequence items must start at the same column"):i(l,"MISSING_CHAR","Sequence item without - indicator");else{a=u.end,u.comment&&(o.comment=u.comment);continue}let f=c?e(s,c,u,i):t(s,u.end,r,null,u,i);s.schema.compat&&ta(n.indent,c,i),l=f.range[2],o.items.push(f)}return o.range=[n.offset,l,a??l],o}(e,t,s,n,r):function({composeNode:e,composeEmptyNode:t},s,n,i,r){let o="{"===n.start.source,l=o?"flow map":"flow sequence",a=new(r?.nodeClass??(o?ey:eb))(s.schema);a.flow=!0;let c=s.atRoot;c&&(s.atRoot=!1),s.atKey&&(s.atKey=!1);let u=n.offset+n.start.source.length;for(let r=0;r<n.items.length;++r){let c=n.items[r],{start:f,key:d,sep:p,value:m}=c,y=to(f,{flow:l,indicator:"explicit-key-ind",next:d??p?.[0],offset:u,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!y.found){if(!y.anchor&&!y.tag&&!p&&!m){0===r&&y.comma?i(y.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`):r<n.items.length-1&&i(y.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${l}`),y.comment&&(a.comment?a.comment+="\n"+y.comment:a.comment=y.comment),u=y.end;continue}!o&&s.options.strict&&tl(d)&&i(d,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===r)y.comma&&i(y.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`);else if(y.comma||i(y.start,"MISSING_CHAR",`Missing , between ${l} items`),y.comment){let e="";e:for(let t of f)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}if(e){let t=a.items[a.items.length-1];h(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,y.comment=y.comment.substring(e.length+1)}}if(o||p||y.found){s.atKey=!0;let r=y.end,h=d?e(s,d,y,i):t(s,r,f,null,y,i);td(d)&&i(h.range,"BLOCK_IN_FLOW",th),s.atKey=!1;let g=to(p??[],{flow:l,indicator:"map-value-ind",next:m,offset:h.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(g.found){if(!o&&!y.found&&s.options.strict){if(p)for(let e of p){if(e===g.found)break;if("newline"===e.type){i(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}y.start<g.found.offset-1024&&i(g.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else m&&("source"in m&&m.source?.[0]===":"?i(m,"MISSING_CHAR",`Missing space after : in ${l}`):i(g.start,"MISSING_CHAR",`Missing , or : between ${l} items`));let b=m?e(s,m,g,i):g.found?t(s,g.end,p,null,g,i):null;b?td(m)&&i(b.range,"BLOCK_IN_FLOW",th):g.comment&&(h.comment?h.comment+="\n"+g.comment:h.comment=g.comment);let k=new eh(h,b);if(s.options.keepSourceTokens&&(k.srcToken=c),o)tc(s,a.items,h)&&i(r,"DUPLICATE_KEY","Map keys must be unique"),a.items.push(k);else{let e=new ey(s.schema);e.flow=!0,e.items.push(k);let t=(b??h).range;e.range=[h.range[0],t[1],t[2]],a.items.push(e)}u=b?b.range[2]:g.end}else{let n=m?e(s,m,y,i):t(s,y.end,p,null,y,i);a.items.push(n),u=n.range[2],td(m)&&i(n.range,"BLOCK_IN_FLOW",th)}}let f=o?"}":"]",[d,...p]=n.end,m=u;if(d?.source===f)m=d.offset+d.source.length;else{let e=l[0].toUpperCase()+l.substring(1),t=c?`${e} must end with a ${f}`:`${e} in block collection must be sufficiently indented and end with a ${f}`;i(u,c?"MISSING_CHAR":"BAD_INDENT",t),d&&1!==d.source.length&&p.unshift(d)}if(p.length>0){let e=tf(p,m,s.options.strict,i);e.comment&&(a.comment?a.comment+="\n"+e.comment:a.comment=e.comment),a.range=[n.offset,m,e.offset]}else a.range=[n.offset,m,m];return a}(e,t,s,n,r),l=o.constructor;return"!"===i||i===l.tagName?o.tag=l.tagName:i&&(o.tag=i),o}function tm(e,t,s){let n=t.offset,i=function({offset:e,props:t},s,n){if("block-scalar-header"!==t[0].type)return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=t[0],r=i[0],o=0,l="",a=-1;for(let t=1;t<i.length;++t){let s=i[t];if(l||"-"!==s&&"+"!==s){let n=Number(s);!o&&n?o=n:-1===a&&(a=e+t)}else l=s}-1!==a&&n(a,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,u="",f=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case"space":c=!0;case"newline":f+=i.source.length;break;case"comment":s&&!c&&n(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=i.source.length,u=i.source.substring(1);break;case"error":n(i,"UNEXPECTED_TOKEN",i.message),f+=i.source.length;break;default:{let e=`Unexpected token in block scalar header: ${i.type}`;n(i,"UNEXPECTED_TOKEN",e);let t=i.source;t&&"string"==typeof t&&(f+=t.length)}}}return{mode:r,indent:o,chomp:l,comment:u,length:f}}(t,e.options.strict,s);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let r=">"===i.mode?q.BLOCK_FOLDED:q.BLOCK_LITERAL,o=t.source?function(e){let t=e.split(/\n( *)/),s=t[0],n=s.match(/^( *)/),i=[n?.[1]?[n[1],s.slice(n[1].length)]:["",s]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}(t.source):[],l=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(""===t||"\r"===t)l=e;else break}if(0===l){let e="+"===i.chomp&&o.length>0?"\n".repeat(Math.max(1,o.length-1)):"",s=n+i.length;return t.source&&(s+=t.source.length),{value:e,type:r,comment:i.comment,range:[n,s,s]}}let a=t.indent+i.indent,c=t.offset+i.length,u=0;for(let t=0;t<l;++t){let[n,r]=o[t];if(""===r||"\r"===r)0===i.indent&&n.length>a&&(a=n.length);else{n.length<a&&s(c+n.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),0===i.indent&&(a=n.length),u=t,0!==a||e.atRoot||s(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=n.length+r.length+1}for(let e=o.length-1;e>=l;--e)o[e][0].length>a&&(l=e+1);let f="",h="",d=!1;for(let e=0;e<u;++e)f+=o[e][0].slice(a)+"\n";for(let e=u;e<l;++e){let[t,n]=o[e];c+=t.length+n.length+1;let l="\r"===n[n.length-1];if(l&&(n=n.slice(0,-1)),n&&t.length<a){let e=i.indent?"explicit indentation indicator":"first line",r=`Block scalar lines must not be less indented than their ${e}`;s(c-n.length-(l?2:1),"BAD_INDENT",r),t=""}r===q.BLOCK_LITERAL?(f+=h+t.slice(a)+n,h="\n"):t.length>a||" "===n[0]?(" "===h?h="\n":d||"\n"!==h||(h="\n\n"),f+=h+t.slice(a)+n,h="\n",d=!0):""===n?"\n"===h?f+="\n":h="\n":(f+=h+n,h=" ",d=!1)}switch(i.chomp){case"-":break;case"+":for(let e=l;e<o.length;++e)f+="\n"+o[e][0].slice(a);"\n"!==f[f.length-1]&&(f+="\n");break;default:f+="\n"}let p=n+i.length+t.source.length;return{value:f,type:r,comment:i.comment,range:[n,p,p]}}function ty(e,t,s){let n,i,{offset:r,type:o,source:l,end:a}=e,c=(e,t,n)=>s(r+e,t,n);switch(o){case"scalar":n=q.PLAIN,i=function(e,t){let s="";switch(e[0]){case" ":s="a tab character";break;case",":s="flow indicator character ,";break;case"%":s="directive indicator character %";break;case"|":case">":s=`block scalar indicator ${e[0]}`;break;case"@":case"`":s=`reserved character ${e[0]}`}return s&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${s}`),tg(e)}(l,c);break;case"single-quoted-scalar":var u,f;n=q.QUOTE_SINGLE,u=l,f=c,("'"!==u[u.length-1]||1===u.length)&&f(u.length,"MISSING_CHAR","Missing closing 'quote"),i=tg(u.slice(1,-1)).replace(/''/g,"'");break;case"double-quoted-scalar":n=q.QUOTE_DOUBLE,i=function(e,t){let s="";for(let n=1;n<e.length-1;++n){let i=e[n];if("\r"!==i||"\n"!==e[n+1])if("\n"===i){let{fold:t,offset:i}=function(e,t){let s="",n=e[t+1];for(;(" "===n||" "===n||"\n"===n||"\r"===n)&&("\r"!==n||"\n"===e[t+2]);)"\n"===n&&(s+="\n"),t+=1,n=e[t+1];return s||(s=" "),{fold:s,offset:t}}(e,n);s+=t,n=i}else if("\\"===i){let i=e[++n],r=tb[i];if(r)s+=r;else if("\n"===i)for(i=e[n+1];" "===i||" "===i;)i=e[++n+1];else if("\r"===i&&"\n"===e[n+1])for(i=e[++n+1];" "===i||" "===i;)i=e[++n+1];else if("x"===i||"u"===i||"U"===i){let r={x:2,u:4,U:8}[i];s+=function(e,t,s,n){let i=e.substr(t,s),r=i.length===s&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(r)){let i=e.substr(t-2,s+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),i}return String.fromCodePoint(r)}(e,n+1,r,t),n+=r}else{let i=e.substr(n-1,2);t(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),s+=i}}else if(" "===i||" "===i){let t=n,r=e[n+1];for(;" "===r||" "===r;)r=e[++n+1];"\n"!==r&&("\r"!==r||"\n"!==e[n+2])&&(s+=n>t?e.slice(t,n+1):i)}else s+=i}return('"'!==e[e.length-1]||1===e.length)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),s}(l,c);break;default:return s(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[r,r+l.length,r+l.length]}}let h=r+l.length,d=tf(a,h,t,s);return{value:i,type:n,comment:d.comment,range:[r,h,d.offset]}}function tg(e){let t,s;try{t=RegExp("(.*?)(?<![ ])[ ]*\r?\n","sy"),s=RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,s=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=t.exec(e);if(!n)return e;let i=n[1],r=" ",o=t.lastIndex;for(s.lastIndex=o;n=s.exec(e);)""===n[1]?"\n"===r?i+=r:r="\n":(i+=r+n[1],r=" "),o=s.lastIndex;let l=/[ \t]*(.*)/sy;return l.lastIndex=o,n=l.exec(e),i+r+(n?.[1]??"")}let tb={0:"\0",a:"\x07",b:"\b",e:"\x1b",f:"\f",n:"\n",r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function tk(e,t,s,n){let i,r,{value:l,type:a,comment:c,range:u}="block-scalar"===t.type?tm(e,t,n):ty(t,e.options.strict,n),f=s?e.directives.tagName(s.source,e=>n(s,"TAG_RESOLVE_FAILED",e)):null;i=e.options.stringKeys&&e.atKey?e.schema[o]:f?function(e,t,s,n,i){if("!"===s)return e[o];let r=[];for(let t of e.tags)if(!t.collection&&t.tag===s)if(!t.default||!t.test)return t;else r.push(t);for(let e of r)if(e.test?.test(t))return e;let l=e.knownTags[s];return l&&!l.collection?(e.tags.push(Object.assign({},l,{default:!1,test:void 0})),l):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,"tag:yaml.org,2002:str"!==s),e[o])}(e.schema,l,f,s,n):"scalar"===t.type?function({atKey:e,directives:t,schema:s},n,i,r){let l=s.tags.find(t=>(!0===t.default||e&&"key"===t.default)&&t.test?.test(n))||s[o];if(s.compat){let e=s.compat.find(e=>e.default&&e.test?.test(n))??s[o];if(l.tag!==e.tag){let s=t.tagString(l.tag),n=t.tagString(e.tag);r(i,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${s} or ${n}`,!0)}}return l}(e,l,t,n):e.schema[o];try{let o=i.resolve(l,e=>n(s??t,"TAG_RESOLVE_FAILED",e),e.options);r=d(o)?o:new q(o)}catch(e){n(s??t,"TAG_RESOLVE_FAILED",e instanceof Error?e.message:String(e)),r=new q(l)}return r.range=u,r.source=l,a&&(r.type=a),f&&(r.tag=f),i.format&&(r.format=i.format),c&&(r.comment=c),r}let tw={composeNode:tv,composeEmptyNode:tS};function tv(e,t,s,n){let i,r=e.atKey,{spaceBefore:o,comment:l,anchor:a,tag:c}=s,u=!0;switch(t.type){case"alias":i=function({options:e},{offset:t,source:s,end:n},i){let r=new D(s.substring(1));""===r.source&&i(t,"BAD_ALIAS","Alias cannot be an empty string"),r.source.endsWith(":")&&i(t+s.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=t+s.length,l=tf(n,o,e.strict,i);return r.range=[t,o,l.offset],l.comment&&(r.comment=l.comment),r}(e,t,n),(a||c)&&n(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":i=tk(e,t,c,n),a&&(i.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":i=function(e,t,s,n,i){let r=n.tag,o=r?t.directives.tagName(r.source,e=>i(r,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===s.type){let{anchor:e,newlineAfterProp:t}=n,s=e&&r?e.offset>r.offset?e:r:e??r;s&&(!t||t.offset<s.offset)&&i(s,"MISSING_CHAR","Missing newline after block sequence props")}let l="block-map"===s.type?"map":"block-seq"===s.type?"seq":"{"===s.start.source?"map":"seq";if(!r||!o||"!"===o||o===ey.tagName&&"map"===l||o===eb.tagName&&"seq"===l)return tp(e,t,s,i,o);let a=t.schema.tags.find(e=>e.tag===o&&e.collection===l);if(!a){let n=t.schema.knownTags[o];if(n?.collection!==l)return n?i(r,"BAD_COLLECTION_TYPE",`${n.tag} used for ${l} collection, but expects ${n.collection??"scalar"}`,!0):i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),tp(e,t,s,i,o);t.schema.tags.push(Object.assign({},n,{default:!1})),a=n}let c=tp(e,t,s,i,o,a),u=a.resolve?.(c,e=>i(r,"TAG_RESOLVE_FAILED",e),t.options)??c,f=y(u)?u:new q(u);return f.range=c.range,f.tag=o,a?.format&&(f.format=a.format),f}(tw,e,t,s,n),a&&(i.anchor=a.source.substring(1));break;default:{let r="error"===t.type?t.message:`Unsupported token (type: ${t.type})`;n(t,"UNEXPECTED_TOKEN",r),i=tS(e,t.offset,void 0,null,s,n),u=!1}}return a&&""===i.anchor&&n(a,"BAD_ALIAS","Anchor cannot be an empty string"),r&&e.options.stringKeys&&(!d(i)||"string"!=typeof i.value||i.tag&&"tag:yaml.org,2002:str"!==i.tag)&&n(c??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(i.spaceBefore=!0),l&&("scalar"===t.type&&""===t.source?i.comment=l:i.commentBefore=l),e.options.keepSourceTokens&&u&&(i.srcToken=t),i}function tS(e,t,s,n,{spaceBefore:i,comment:r,anchor:o,tag:l,end:a},c){let u=tk(e,{type:"scalar",offset:function(e,t,s){if(t){s??(s=t.length);for(let n=s-1;n>=0;--n){let s=t[n];switch(s.type){case"space":case"comment":case"newline":e-=s.source.length;continue}for(s=t[++n];s?.type==="space";)e+=s.source.length,s=t[++n];break}}return e}(t,s,n),indent:-1,source:""},l,c);return o&&(u.anchor=o.source.substring(1),""===u.anchor&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(u.spaceBefore=!0),r&&(u.comment=r,u.range[2]=a),u}function tE(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];let{offset:t,source:s}=e;return[t,t+("string"==typeof s?s.length:1)]}function tN(e){let t="",s=!1,n=!1;for(let i=0;i<e.length;++i){let r=e[i];switch(r[0]){case"#":t+=(""===t?"":n?"\n\n":"\n")+(r.substring(1)||" "),s=!0,n=!1;break;case"%":e[i+1]?.[0]!=="#"&&(i+=1),s=!1;break;default:s||(n=!0),s=!1}}return{comment:t,afterEmptyLine:n}}class tO{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,s,n)=>{let i=tE(e);n?this.warnings.push(new ti(i,t,s)):this.errors.push(new tn(i,t,s))},this.directives=new I({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:s,afterEmptyLine:n}=tN(this.prelude);if(s){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
22
|
+
${s}`:s;else if(n||e.directives.docStart||!i)e.commentBefore=s;else if(m(i)&&!i.flow&&i.items.length>0){let e=i.items[0];h(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${s}
|
|
23
|
+
${t}`:s}else{let e=i.commentBefore;i.commentBefore=e?`${s}
|
|
24
|
+
${e}`:s}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:tN(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,s=-1){for(let t of e)yield*this.next(t);yield*this.end(t,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,s,n)=>{let i=tE(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",s,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=function(e,t,{offset:s,start:n,value:i,end:r},o){let l=new te(void 0,Object.assign({_directives:t},e)),a={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},c=to(n,{indicator:"doc-start",next:i??r?.[0],offset:s,onError:o,parentIndent:0,startOnNewline:!0});c.found&&(l.directives.docStart=!0,i&&("block-map"===i.type||"block-seq"===i.type)&&!c.hasNewline&&o(c.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=i?tv(a,i,c,o):tS(a,c.end,n,null,c,o);let u=l.contents.range[2],f=tf(r,u,!1,o);return f.comment&&(l.comment=f.comment),l.range=[s,u,f.offset],l}(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new tn(tE(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){this.errors.push(new tn(tE(e),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let t=tf(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}
|
|
25
|
+
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new tn(tE(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new te(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),e.range=[0,t,t],this.decorate(e,!1),yield e}}}function tA(e,t=!0,s){if(e){let n=(e,t,n)=>{let i="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(s)s(i,t,n);else throw new tn([i,i+1],t,n)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return ty(e,t,n);case"block-scalar":return tm({options:{strict:t}},e,n)}}return null}function tT(e,t){let{implicitKey:s=!1,indent:n,inFlow:i=!1,offset:r=-1,type:o="PLAIN"}=t,l=en({type:o,value:e},{implicitKey:s,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),a=t.end??[{type:"newline",offset:-1,indent:n,source:"\n"}];switch(l[0]){case"|":case">":{let e=l.indexOf("\n"),t=l.substring(0,e),s=l.substring(e+1)+"\n",i=[{type:"block-scalar-header",offset:r,indent:n,source:t}];return tx(i,a)||i.push({type:"newline",offset:-1,indent:n,source:"\n"}),{type:"block-scalar",offset:r,indent:n,props:i,source:s}}case'"':return{type:"double-quoted-scalar",offset:r,indent:n,source:l,end:a};case"'":return{type:"single-quoted-scalar",offset:r,indent:n,source:l,end:a};default:return{type:"scalar",offset:r,indent:n,source:l,end:a}}}function tL(e,t,s={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:r=!1,type:o}=s,l="indent"in e?e.indent:null;if(n&&"number"==typeof l&&(l+=2),!o)switch(e.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let t=e.props[0];if("block-scalar-header"!==t.type)throw Error("Invalid block scalar header");o=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let a=en({type:o,value:t},{implicitKey:i||null===l,indent:null!==l&&l>0?" ".repeat(l):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(a[0]){case"|":case">":!function(e,t){let s=t.indexOf("\n"),n=t.substring(0,s),i=t.substring(s+1)+"\n";if("block-scalar"===e.type){let t=e.props[0];if("block-scalar-header"!==t.type)throw Error("Invalid block scalar header");t.source=n,e.source=i}else{let{offset:t}=e,s="indent"in e?e.indent:-1,r=[{type:"block-scalar-header",offset:t,indent:s,source:n}];for(let t of(tx(r,"end"in e?e.end:void 0)||r.push({type:"newline",offset:-1,indent:s,source:"\n"}),Object.keys(e)))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:s,props:r,source:i})}}(e,a);break;case'"':tI(e,a,"double-quoted-scalar");break;case"'":tI(e,a,"single-quoted-scalar");break;default:tI(e,a,"scalar")}}function tx(e,t){if(t)for(let s of t)switch(s.type){case"space":case"comment":e.push(s);break;case"newline":return e.push(s),!0}return!1}function tI(e,t,s){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=s,e.source=t;break;case"block-scalar":{let n=e.props.slice(1),i=t.length;for(let t of("block-scalar-header"===e.props[0].type&&(i-=e.props[0].source.length),n))t.offset+=i;delete e.props,Object.assign(e,{type:s,source:t,end:n});break}case"block-map":case"block-seq":{let n={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:s,source:t,end:[n]});break}default:{let n="indent"in e?e.indent:-1,i="end"in e&&Array.isArray(e.end)?e.end.filter(e=>"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(let t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:s,indent:n,source:t,end:i})}}}let t$=e=>"type"in e?tC(e):t_(e);function tC(e){switch(e.type){case"block-scalar":{let t="";for(let s of e.props)t+=tC(s);return t+e.source}case"block-map":case"block-seq":{let t="";for(let s of e.items)t+=t_(s);return t}case"flow-collection":{let t=e.start.source;for(let s of e.items)t+=t_(s);for(let s of e.end)t+=s.source;return t}case"document":{let t=t_(e);if(e.end)for(let s of e.end)t+=s.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(let s of e.end)t+=s.source;return t}}}function t_({start:e,key:t,sep:s,value:n}){let i="";for(let t of e)i+=t.source;if(t&&(i+=tC(t)),s)for(let e of s)i+=e.source;return n&&(i+=tC(n)),i}let tB=Symbol("break visit"),tM=Symbol("skip children"),tK=Symbol("remove item");function tD(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),function e(t,s,n){let i=n(s,t);if("symbol"==typeof i)return i;for(let r of["key","value"]){let o=s[r];if(o&&"items"in o){for(let s=0;s<o.items.length;++s){let i=e(Object.freeze(t.concat([[r,s]])),o.items[s],n);if("number"==typeof i)s=i-1;else{if(i===tB)return tB;i===tK&&(o.items.splice(s,1),s-=1)}}"function"==typeof i&&"key"===r&&(i=i(s,t))}}return"function"==typeof i?i(s,t):i}(Object.freeze([]),e,t)}tD.BREAK=tB,tD.SKIP=tM,tD.REMOVE=tK,tD.itemAtPath=(e,t)=>{let s=e;for(let[e,n]of t){let t=s?.[e];if(!t||!("items"in t))return;s=t.items[n]}return s},tD.parentCollection=(e,t)=>{let s=tD.itemAtPath(e,t.slice(0,-1)),n=t[t.length-1][0],i=s?.[n];if(i&&"items"in i)return i;throw Error("Parent collection not found")};let tj=e=>!!e&&"items"in e,tq=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type);function tP(e){switch(e){case"\uFEFF":return"<BOM>";case"\x02":return"<DOC>";case"\x18":return"<FLOW_END>";case"\x1f":return"<SCALAR>";default:return JSON.stringify(e)}}function tU(e){switch(e){case"\uFEFF":return"byte-order-mark";case"\x02":return"doc-mode";case"\x18":return"flow-error-end";case"\x1f":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}e.s(["BOM",()=>"\uFEFF","DOCUMENT",()=>"\x02","FLOW_END",()=>"\x18","SCALAR",()=>"\x1f","isCollection",()=>tj,"isScalar",()=>tq,"prettyToken",()=>tP,"tokenType",()=>tU],11373),e.i(11373),e.s(["BOM",()=>"\uFEFF","DOCUMENT",()=>"\x02","FLOW_END",()=>"\x18","SCALAR",()=>"\x1f","createScalarToken",()=>tT,"isCollection",()=>tj,"isScalar",()=>tq,"prettyToken",()=>tP,"resolveAsScalar",()=>tA,"setScalarValue",()=>tL,"stringify",()=>t$,"tokenType",()=>tU,"visit",()=>tD],35170);var tR=e.i(35170);function tF(e){switch(e){case void 0:case" ":case"\n":case"\r":case" ":return!0;default:return!1}}let tJ=new Set("0123456789ABCDEFabcdef"),tV=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),tY=new Set(",[]{}"),tW=new Set(" ,[]{}\n\r "),tG=e=>!e||tW.has(e);class tQ{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let s=this.next??"stream";for(;s&&(t||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||" "===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let s=0;for(;" "===t;)t=this.buffer[++s+e];if("\r"===t){let t=this.buffer[s+e+1];if("\n"===t||!t&&!this.atEnd)return e+s+1}return"\n"!==t&&!(s>=this.indentNext)&&(t||this.atEnd)?-1:e+s}if("-"===t||"."===t){let t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&tF(this.buffer[e+3]))return -1}return e}getLine(){let e=this.lineEndPos;return(("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e)?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if("\uFEFF"===e[0]&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length,s=e.indexOf("#");for(;-1!==s;){let n=e[s-1];if(" "===n||" "===n){t=s-1;break}s=e.indexOf("#",s+1)}for(;;){let s=e[t-1];if(" "===s||" "===s)t-=1;else break}let n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield"\x02",yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let e=this.peek(3);if(("---"===e||"..."===e)&&tF(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!tF(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&tF(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(tG),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,s=-1;do(e=yield*this.pushNewline())>0?(t=yield*this.pushSpaces(!1),this.indentValue=s=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0)let n=this.getLine();if(null===n)return this.setNext("flow");if((-1!==s&&s<this.indentNext&&"#"!==n[0]||0===s&&(n.startsWith("---")||n.startsWith("..."))&&tF(n[3]))&&(s!==this.indentNext-1||1!==this.flowLevel||"]"!==n[0]&&"}"!==n[0]))return this.flowLevel=0,yield"\x18",yield*this.parseLineStart();let i=0;for(;","===n[i];)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(n[i+=yield*this.pushIndicators()]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-i),"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(tG),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let e=this.charAt(1);if(this.flowKey||tF(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}let s=this.buffer.substring(0,t),n=s.indexOf("\n",this.pos);if(-1!==n){for(;-1!==n;){let e=this.continueScalar(n+1);if(-1===e)break;n=s.indexOf("\n",e)}-1!==n&&(t=n-("\r"===s[n-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil(e=>tF(e)||"#"===e)}*parseBlockScalar(){let e,t=this.pos-1,s=0;e:for(let n=this.pos;e=this.buffer[n];++n)switch(e){case" ":s+=1;break;case"\n":t=n,s=0;break;case"\r":{let e=this.buffer[n+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(s>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=s:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{let e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t)if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let n=t+1;for(e=this.buffer[n];" "===e;)e=this.buffer[++n];if(" "===e){for(;" "===e||" "===e||"\r"===e||"\n"===e;)e=this.buffer[++n];t=n-1}else if(!this.blockScalarKeep)for(;;){let e=t-1,n=this.buffer[e];"\r"===n&&(n=this.buffer[--e]);let i=e;for(;" "===n;)n=this.buffer[--e];if("\n"===n&&e>=this.pos&&e+1+s>i)t=e;else break}return yield"\x1f",yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e,t=this.flowLevel>0,s=this.pos-1,n=this.pos-1;for(;e=this.buffer[++n];)if(":"===e){let e=this.buffer[n+1];if(tF(e)||t&&tY.has(e))break;s=n}else if(tF(e)){let i=this.buffer[n+1];if("\r"===e&&("\n"===i?(n+=1,e="\n",i=this.buffer[n+1]):s=n),"#"===i||t&&tY.has(i))break;if("\n"===e){let e=this.continueScalar(n+1);if(-1===e)break;n=Math.max(n,e-2)}}else{if(t&&tY.has(e))break;s=n}return e||this.atEnd?(yield"\x1f",yield*this.pushToIndex(s+1,!0),t?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(tG))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,t=this.charAt(1);if(tF(t)||e&&tY.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!tF(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(tV.has(t))t=this.buffer[++e];else if("%"===t&&tJ.has(this.buffer[e+1])&&tJ.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,s=this.pos-1;do t=this.buffer[++s];while(" "===t||e&&" "===t)let n=s-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=s),n}*pushUntil(e){let t=this.pos,s=this.buffer[t];for(;!e(s);)s=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class tH{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,s=this.lineStarts.length;for(;t<s;){let n=t+s>>1;this.lineStarts[n]<e?t=n+1:s=n}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(0===t)return{line:0,col:e};let n=this.lineStarts[t-1];return{line:t,col:e-n+1}}}}function tX(e,t){for(let s=0;s<e.length;++s)if(e[s].type===t)return!0;return!1}function tz(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return -1}function tZ(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function t0(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function t1(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function t2(e){if("flow-seq-start"===e.start.type)for(let t of e.items)!t.sep||t.value||tX(t.start,"explicit-key-ind")||tX(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,tZ(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class t9{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new tQ,this.onNewLine=e}*parse(e,t=!1){for(let s of(this.onNewLine&&0===this.offset&&this.onNewLine(0),this.lexer.lex(e,t)))yield*this.next(s);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=tU(e);if(t)if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&" "===e[0]&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if("doc-end"===this.type&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{let e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&t2(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{let s=e.items[e.items.length-1];if(s.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(s.sep)s.value=t;else{Object.assign(s,{key:t,sep:[]}),this.onKeyLine=!s.explicitKey;return}break}case"block-seq":{let s=e.items[e.items.length-1];s.value?e.items.push({start:[],value:t}):s.value=t;break}case"flow-collection":{let s=e.items[e.items.length-1];!s||s.value?e.items.push({start:[],key:t,sep:[]}):s.sep?s.value=t:Object.assign(s,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if(("document"===e.type||"block-map"===e.type||"block-seq"===e.type)&&("block-map"===t.type||"block-seq"===t.type)){let s=t.items[t.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&-1===tz(s.start)&&(0===t.indent||s.start.every(e=>"comment"!==e.type||e.indent<t.indent))&&("document"===e.type?e.end=s.start:e.items.push({start:s.start}),t.items.splice(-1,1))}}else yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};"doc-start"===this.type&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":-1!==tz(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return;case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){let t,s=t1(t0(this.peek(2)));e.end?((t=e.end).push(this.sourceToken),delete e.end):t=[this.sourceToken];let n={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:t}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=n}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let s="end"in t.value?t.value.end:void 0,n=Array.isArray(s)?s[s.length-1]:void 0;n?.type==="comment"?s?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let s=e.items[e.items.length-2],n=s?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let s=!this.onKeyLine&&this.indent===e.indent,n=s&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type,i=[];if(n&&t.sep&&!t.value){let s=[];for(let n=0;n<t.sep.length;++n){let i=t.sep[n];switch(i.type){case"newline":s.push(n);break;case"space":break;case"comment":i.indent>e.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(i=t.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":n||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":t.sep||t.explicitKey?n||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(tX(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(tZ(t.key)&&!tX(t.sep,"newline")){let e=t1(t.start),s=t.key,n=t.sep;n.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:s,sep:n}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else if(tX(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=t1(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||n?e.items.push({start:i,key:null,sep:[this.sourceToken]}):tX(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let s=this.flowScalar(this.type);n||t.value?(e.items.push({start:i,key:s,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(s):(Object.assign(t,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{let n=this.startBlockValue(e);if(n){if("block-seq"===n.type){if(!t.explicitKey&&t.sep&&!tX(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else s&&e.items.push({start:i});this.stack.push(n);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let s="end"in t.value?t.value.end:void 0,n=Array.isArray(s)?s[s.length-1]:void 0;n?.type==="comment"?s?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let s=e.items[e.items.length-2],n=s?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||tX(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do yield*this.pop(),e=this.peek(1);while(e?.type==="flow-collection")}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let s=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:s,sep:[]}):t.sep?this.stack.push(s):Object.assign(t,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let s=this.startBlockValue(e);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if("block-map"!==t.type||("map-value-ind"!==this.type||t.indent!==e.indent)&&("newline"!==this.type||t.items[t.items.length-1].sep))if("map-value-ind"===this.type&&"flow-collection"!==t.type){let s=t1(t0(t));t2(e);let n=e.end.splice(1,e.end.length);n.push(this.sourceToken);let i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e);else yield*this.pop(),yield*this.step()}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=t1(t0(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=t1(t0(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every(e=>"newline"===e.type||"space"===e.type)}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}function t8(e){let t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new tH||null,prettyErrors:t}}function t3(e,t={}){let{lineCounter:s,prettyErrors:n}=t8(t),i=new t9(s?.addNewLine),r=new tO(t),o=Array.from(r.compose(i.parse(e)));if(n&&s)for(let t of o)t.errors.forEach(tr(e,s)),t.warnings.forEach(tr(e,s));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}function t6(e,t={}){let{lineCounter:s,prettyErrors:n}=t8(t),i=new t9(s?.addNewLine),r=new tO(t),o=null;for(let t of r.compose(i.parse(e),!0,e.length))if(o){if("silent"!==o.options.logLevel){o.errors.push(new tn(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else o=t;return n&&s&&(o.errors.forEach(tr(e,s)),o.warnings.forEach(tr(e,s))),o}function t7(e,t,s){let n;"function"==typeof t?n=t:void 0===s&&t&&"object"==typeof t&&(s=t);let i=t6(e,s);if(!i)return null;if(i.warnings.forEach(e=>eo(i.options.logLevel,e)),i.errors.length>0)if("silent"!==i.options.logLevel)throw i.errors[0];else i.errors=[];return i.toJS(Object.assign({reviver:n},s))}function t4(e,t,s){let n=null;if("function"==typeof t||Array.isArray(t)?n=t:void 0===s&&t&&(s=t),"string"==typeof s&&(s=s.length),"number"==typeof s){let e=Math.round(s);s=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){let{keepUndefined:e}=s??t??{};if(!e)return}return u(e)&&!n?e.toString(s):new te(e,n,s).toString(s)}e.s([],70269),e.i(70269),e.s(["Alias",()=>D,"CST",0,tR,"Composer",()=>tO,"Document",()=>te,"Lexer",()=>tQ,"LineCounter",()=>tH,"Pair",()=>eh,"Parser",()=>t9,"Scalar",()=>q,"Schema",()=>e5,"YAMLError",()=>ts,"YAMLMap",()=>ey,"YAMLParseError",()=>tn,"YAMLSeq",()=>eb,"YAMLWarning",()=>ti,"isAlias",()=>c,"isCollection",()=>m,"isDocument",()=>u,"isMap",()=>f,"isNode",()=>y,"isPair",()=>h,"isScalar",()=>d,"isSeq",()=>p,"parse",()=>t7,"parseAllDocuments",()=>t3,"parseDocument",()=>t6,"stringify",()=>t4,"visit",()=>v,"visitAsync",()=>E],16510);var t5=e.i(16510);e.s(["default",0,t5],51113),e.i(51113),e.s(["Alias",()=>D,"CST",()=>tR,"Composer",()=>tO,"Document",()=>te,"Lexer",()=>tQ,"LineCounter",()=>tH,"Pair",()=>eh,"Parser",()=>t9,"Scalar",()=>q,"Schema",()=>e5,"YAMLError",()=>ts,"YAMLMap",()=>ey,"YAMLParseError",()=>tn,"YAMLSeq",()=>eb,"YAMLWarning",()=>ti,"default",0,t5,"isAlias",()=>c,"isCollection",()=>m,"isDocument",()=>u,"isMap",()=>f,"isNode",()=>y,"isPair",()=>h,"isScalar",()=>d,"isSeq",()=>p,"parse",()=>t7,"parseAllDocuments",()=>t3,"parseDocument",()=>t6,"stringify",()=>t4,"visit",()=>v,"visitAsync",()=>E],33958)}]);
|
|
@@ -122,4 +122,4 @@ Given a user's natural language description of an API endpoint or workflow, gene
|
|
|
122
122
|
|
|
123
123
|
## Output
|
|
124
124
|
Return ONLY valid JSON (no markdown, no explanation). The JSON must conform to the FlowIR schema above.
|
|
125
|
-
`;e.s(["EXAMPLE_PROMPTS",0,["Create a GET /api/users endpoint that fetches the user list from https://jsonplaceholder.typicode.com/users and returns it","Create a POST /api/auth/login endpoint that accepts email and password, validates them, and returns a JWT token","Create a GET /api/weather endpoint that calls a weather API and an air quality API in parallel, then merges and returns the results","Create a POST /api/orders endpoint that accepts order data, writes it to the database, and sends a notification","Create a scheduled task that checks the database for expired orders every hour and updates their status"],"FLOW_IR_SYSTEM_PROMPT",0,t])},94501,68773,e=>{"use strict";let t="1.0.0";var a,r,s,o,n,i,d=((a={}).TRIGGER="trigger",a.ACTION="action",a.LOGIC="logic",a.VARIABLE="variable",a.OUTPUT="output",a),u=((r={}).HTTP_WEBHOOK="http_webhook",r.CRON_JOB="cron_job",r.MANUAL="manual",r),l=((s={}).FETCH_API="fetch_api",s.SQL_QUERY="sql_query",s.REDIS_CACHE="redis_cache",s.CUSTOM_CODE="custom_code",s.CALL_SUBFLOW="call_subflow",s),p=((o={}).IF_ELSE="if_else",o.FOR_LOOP="for_loop",o.TRY_CATCH="try_catch",o.PROMISE_ALL="promise_all",o),c=((n={}).DECLARE="declare",n.TRANSFORM="transform",n),g=((i={}).RETURN_RESPONSE="return_response",i);e.s(["ActionType",()=>l,"CURRENT_IR_VERSION",0,t,"LogicType",()=>p,"NodeCategory",()=>d,"OutputType",()=>g,"TriggerType",()=>u,"VariableType",()=>c],68773);let y=[];class T extends Error{fromVersion;targetVersion;constructor(e,t,a){super(e),this.fromVersion=t,this.targetVersion=a,this.name="MigrationError"}}function m(e){let a,r=[];if(!e||"object"!=typeof e)return{valid:!1,errors:[{code:"INVALID_INPUT",message:"IR input must be a non-null object"}]};if(!Array.isArray(e.nodes))return{valid:!1,errors:[{code:"MISSING_NODES",message:"IR is missing required 'nodes' array"}]};if(!Array.isArray(e.edges))return{valid:!1,errors:[{code:"MISSING_EDGES",message:"IR is missing required 'edges' array"}]};let s=e,o=!1;if(function(e,a=t){return e!==a}(e.version))try{let r=function(e,a=t){let r=[],s={...e};if(s.version===a)return{ir:s,applied:r,migrated:!1};let o=y.length+1,n=0;for(;s.version!==a;){if(n++>o)throw new T(`Migration exceeded max iterations (${o}), possible circular migration`,s.version,a);let e=y.find(e=>e.fromVersion===s.version);if(!e)throw new T(`No migration path found from ${s.version} to ${a}`,s.version,a);s=e.migrate(s),r.push(`${e.fromVersion} → ${e.toVersion}: ${e.description}`)}return{ir:s,applied:r,migrated:!0}}({version:e.version,meta:e.meta,nodes:e.nodes,edges:e.edges},t);r.migrated&&(s=r.ir,o=!0,a=r.applied)}catch(t){t instanceof T?r.push({code:"MIGRATION_FAILED",message:`IR version migration failed: ${t.message}`}):r.push({code:"INVALID_VERSION",message:`Unsupported IR version: ${e.version}`})}o||s.version===t||r.push({code:"INVALID_VERSION",message:`Unsupported IR version: ${s.version} (current: ${t})`});let n=new Map(s.nodes.map(e=>[e.id,e])),i=s.nodes.filter(e=>e.category===d.TRIGGER);0===i.length&&r.push({code:"NO_TRIGGER",message:"Workflow must contain at least one trigger node"}),i.length>1&&r.push({code:"MULTIPLE_TRIGGERS",message:`Workflow must have exactly one trigger, found ${i.length}`});let u=new Set;for(let e of s.nodes)u.has(e.id)&&r.push({code:"DUPLICATE_NODE_ID",message:`Duplicate node ID: ${e.id}`,nodeId:e.id}),u.add(e.id);for(let e of s.edges)n.has(e.sourceNodeId)||r.push({code:"INVALID_EDGE_SOURCE",message:`Edge "${e.id}" references non-existent source node "${e.sourceNodeId}"`,edgeId:e.id}),n.has(e.targetNodeId)||r.push({code:"INVALID_EDGE_TARGET",message:`Edge "${e.id}" references non-existent target node "${e.targetNodeId}"`,edgeId:e.id});let l=function(e,t){let a=[],r=new Map;for(let t of e)r.set(t.id,[]);for(let e of t)r.get(e.sourceNodeId)?.push(e.targetNodeId);let s=new Map;for(let t of e)s.set(t.id,0);for(let t of e)0===s.get(t.id)&&function e(t){for(let o of(s.set(t,1),r.get(t)??[]))1===s.get(o)?a.push({code:"CYCLE_DETECTED",message:`Cycle detected: node "${t}" → "${o}"`,nodeId:t}):0===s.get(o)&&e(o);s.set(t,2)}(t.id);return a}(s.nodes,s.edges);r.push(...l);let p=new Set;for(let e of s.edges)p.add(e.sourceNodeId),p.add(e.targetNodeId);for(let e of s.nodes)e.category===d.TRIGGER||p.has(e.id)||r.push({code:"ORPHAN_NODE",message:`Node "${e.id}" (${e.label}) is not connected to any other node`,nodeId:e.id});return{valid:0===r.length,errors:r,migrated:o,migratedIR:o?s:void 0,migrationLog:a}}e.s(["validateFlowIR",()=>m],94501)},29641,e=>{e.v(e=>Promise.resolve().then(()=>e(44497)))},30679,e=>{e.v(e=>Promise.resolve().then(()=>e(94501)))},98984,e=>{e.v(e=>Promise.resolve().then(()=>e(45966)))}]);
|
|
125
|
+
`;e.s(["EXAMPLE_PROMPTS",0,["Create a GET /api/users endpoint that fetches the user list from https://jsonplaceholder.typicode.com/users and returns it","Create a POST /api/auth/login endpoint that accepts email and password, validates them, and returns a JWT token","Create a GET /api/weather endpoint that calls a weather API and an air quality API in parallel, then merges and returns the results","Create a POST /api/orders endpoint that accepts order data, writes it to the database, and sends a notification","Create a scheduled task that checks the database for expired orders every hour and updates their status"],"FLOW_IR_SYSTEM_PROMPT",0,t])},94501,68773,e=>{"use strict";let t="1.0.0";var a,r,s,o,n,i,d=((a={}).TRIGGER="trigger",a.ACTION="action",a.LOGIC="logic",a.VARIABLE="variable",a.OUTPUT="output",a),u=((r={}).HTTP_WEBHOOK="http_webhook",r.CRON_JOB="cron_job",r.MANUAL="manual",r),l=((s={}).FETCH_API="fetch_api",s.SQL_QUERY="sql_query",s.REDIS_CACHE="redis_cache",s.CUSTOM_CODE="custom_code",s.CALL_SUBFLOW="call_subflow",s),p=((o={}).IF_ELSE="if_else",o.FOR_LOOP="for_loop",o.TRY_CATCH="try_catch",o.PROMISE_ALL="promise_all",o),c=((n={}).DECLARE="declare",n.TRANSFORM="transform",n),g=((i={}).RETURN_RESPONSE="return_response",i);e.s(["ActionType",()=>l,"CURRENT_IR_VERSION",0,t,"LogicType",()=>p,"NodeCategory",()=>d,"OutputType",()=>g,"TriggerType",()=>u,"VariableType",()=>c],68773);let y=[];class T extends Error{fromVersion;targetVersion;constructor(e,t,a){super(e),this.fromVersion=t,this.targetVersion=a,this.name="MigrationError"}}function m(e){let a,r=[];if(!e||"object"!=typeof e)return{valid:!1,errors:[{code:"INVALID_INPUT",message:"IR input must be a non-null object"}]};if(!Array.isArray(e.nodes))return{valid:!1,errors:[{code:"MISSING_NODES",message:"IR is missing required 'nodes' array"}]};if(!Array.isArray(e.edges))return{valid:!1,errors:[{code:"MISSING_EDGES",message:"IR is missing required 'edges' array"}]};let s=e,o=!1;if(function(e,a=t){return e!==a}(e.version))try{let r=function(e,a=t){let r=[],s={...e};if(s.version===a)return{ir:s,applied:r,migrated:!1};let o=y.length+1,n=0;for(;s.version!==a;){if(n++>o)throw new T(`Migration exceeded max iterations (${o}), possible circular migration`,s.version,a);let e=y.find(e=>e.fromVersion===s.version);if(!e)throw new T(`No migration path found from ${s.version} to ${a}`,s.version,a);s=e.migrate(s),r.push(`${e.fromVersion} → ${e.toVersion}: ${e.description}`)}return{ir:s,applied:r,migrated:!0}}({version:e.version,meta:e.meta,nodes:e.nodes,edges:e.edges},t);r.migrated&&(s=r.ir,o=!0,a=r.applied)}catch(t){t instanceof T?r.push({code:"MIGRATION_FAILED",message:`IR version migration failed: ${t.message}`}):r.push({code:"INVALID_VERSION",message:`Unsupported IR version: ${e.version}`})}o||s.version===t||r.push({code:"INVALID_VERSION",message:`Unsupported IR version: ${s.version} (current: ${t})`});let n=new Map(s.nodes.map(e=>[e.id,e])),i=s.nodes.filter(e=>e.category===d.TRIGGER);0===i.length&&r.push({code:"NO_TRIGGER",message:"Workflow must contain at least one trigger node"}),i.length>1&&r.push({code:"MULTIPLE_TRIGGERS",message:`Workflow must have exactly one trigger, found ${i.length}`});let u=new Set;for(let e of s.nodes)u.has(e.id)&&r.push({code:"DUPLICATE_NODE_ID",message:`Duplicate node ID: ${e.id}`,nodeId:e.id}),u.add(e.id);for(let e of s.edges)n.has(e.sourceNodeId)||r.push({code:"INVALID_EDGE_SOURCE",message:`Edge "${e.id}" references non-existent source node "${e.sourceNodeId}"`,edgeId:e.id}),n.has(e.targetNodeId)||r.push({code:"INVALID_EDGE_TARGET",message:`Edge "${e.id}" references non-existent target node "${e.targetNodeId}"`,edgeId:e.id});let l=function(e,t){let a=[],r=new Map;for(let t of e)r.set(t.id,[]);for(let e of t)r.get(e.sourceNodeId)?.push(e.targetNodeId);let s=new Map;for(let t of e)s.set(t.id,0);for(let t of e)0===s.get(t.id)&&function e(t){for(let o of(s.set(t,1),r.get(t)??[]))1===s.get(o)?a.push({code:"CYCLE_DETECTED",message:`Cycle detected: node "${t}" → "${o}"`,nodeId:t}):0===s.get(o)&&e(o);s.set(t,2)}(t.id);return a}(s.nodes,s.edges);r.push(...l);let p=new Set;for(let e of s.edges)p.add(e.sourceNodeId),p.add(e.targetNodeId);for(let e of s.nodes)e.category===d.TRIGGER||p.has(e.id)||r.push({code:"ORPHAN_NODE",message:`Node "${e.id}" (${e.label}) is not connected to any other node`,nodeId:e.id});return{valid:0===r.length,errors:r,migrated:o,migratedIR:o?s:void 0,migrationLog:a}}e.s(["validateFlowIR",()=>m],94501)},29641,e=>{e.v(e=>Promise.resolve().then(()=>e(44497)))},30679,e=>{e.v(e=>Promise.resolve().then(()=>e(94501)))},98984,e=>{e.v(e=>Promise.resolve().then(()=>e(45966)))},9830,e=>{e.v(t=>Promise.all(["static/chunks/4ce13068a7e61854.js"].map(t=>e.l(t))).then(()=>t(33958)))}]);
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
b:I[5806,["/_next/static/chunks/b163b5d7cccbcf42.js","/_next/static/chunks/6b84376656bd9887.js"],"MetadataBoundary"]
|
|
10
10
|
d:I[63491,["/_next/static/chunks/b163b5d7cccbcf42.js","/_next/static/chunks/6b84376656bd9887.js"],"default"]
|
|
11
11
|
:HL["/_next/static/chunks/83ab8820627f8bfe.css","style"]
|
|
12
|
-
0:{"P":null,"b":"
|
|
12
|
+
0:{"P":null,"b":"4eCLtLp-IPL1tppPGnHZE","c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/83ab8820627f8bfe.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/acf223168ac429f7.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"antialiased overflow-hidden","children":["$","$L2",null,{"delayDuration":200,"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$4","errorStyles":[],"errorScripts":[["$","script","script-0",{"src":"/_next/static/chunks/b112c2f519e4b429.js","async":true}]],"template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$7",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],null]}],false]],"m":"$undefined","G":["$d",[]],"S":true}
|
|
13
13
|
a:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
|
14
14
|
e:I[22192,["/_next/static/chunks/b163b5d7cccbcf42.js","/_next/static/chunks/6b84376656bd9887.js"],"IconMark"]
|
|
15
15
|
8:null
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
3:I[5806,["/_next/static/chunks/b163b5d7cccbcf42.js","/_next/static/chunks/6b84376656bd9887.js"],"MetadataBoundary"]
|
|
4
4
|
4:"$Sreact.suspense"
|
|
5
5
|
5:I[22192,["/_next/static/chunks/b163b5d7cccbcf42.js","/_next/static/chunks/6b84376656bd9887.js"],"IconMark"]
|
|
6
|
-
0:{"buildId":"
|
|
6
|
+
0:{"buildId":"4eCLtLp-IPL1tppPGnHZE","rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"Flow2Code | Visual AST Compiler"}],["$","meta","1",{"name":"description","content":"Visual backend logic generator: compile canvas nodes directly into native TypeScript code"}],["$","link","2",{"rel":"manifest","href":"/site.webmanifest"}],["$","link","3",{"rel":"icon","href":"/favicon.ico","sizes":"any"}],["$","link","4",{"rel":"icon","href":"/favicon-16x16.png","sizes":"16x16","type":"image/png"}],["$","link","5",{"rel":"icon","href":"/favicon-32x32.png","sizes":"32x32","type":"image/png"}],["$","link","6",{"rel":"apple-touch-icon","href":"/apple-touch-icon.png"}],["$","$L5","7",{}]]}]}]}],null]}],"loading":null,"isPartial":false}
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
4:I[58298,["/_next/static/chunks/acf223168ac429f7.js","/_next/static/chunks/b112c2f519e4b429.js"],"default"]
|
|
5
5
|
5:I[32294,["/_next/static/chunks/b163b5d7cccbcf42.js","/_next/static/chunks/6b84376656bd9887.js"],"default"]
|
|
6
6
|
:HL["/_next/static/chunks/83ab8820627f8bfe.css","style"]
|
|
7
|
-
0:{"buildId":"
|
|
7
|
+
0:{"buildId":"4eCLtLp-IPL1tppPGnHZE","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/83ab8820627f8bfe.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/acf223168ac429f7.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"antialiased overflow-hidden","children":["$","$L2",null,{"delayDuration":200,"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$4","errorStyles":[],"errorScripts":[["$","script","script-0",{"src":"/_next/static/chunks/b112c2f519e4b429.js","async":true}]],"template":["$","$L5",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]}]]}],"loading":null,"isPartial":false}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
1:"$Sreact.fragment"
|
|
2
2
|
2:I[5806,["/_next/static/chunks/b163b5d7cccbcf42.js","/_next/static/chunks/6b84376656bd9887.js"],"OutletBoundary"]
|
|
3
3
|
3:"$Sreact.suspense"
|
|
4
|
-
0:{"buildId":"
|
|
4
|
+
0:{"buildId":"4eCLtLp-IPL1tppPGnHZE","rsc":["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"loading":null,"isPartial":false}
|
|
5
5
|
4:null
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
1:"$Sreact.fragment"
|
|
2
2
|
2:I[95731,["/_next/static/chunks/b163b5d7cccbcf42.js","/_next/static/chunks/6b84376656bd9887.js"],"default"]
|
|
3
3
|
3:I[32294,["/_next/static/chunks/b163b5d7cccbcf42.js","/_next/static/chunks/6b84376656bd9887.js"],"default"]
|
|
4
|
-
0:{"buildId":"
|
|
4
|
+
0:{"buildId":"4eCLtLp-IPL1tppPGnHZE","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
:HL["/_next/static/chunks/83ab8820627f8bfe.css","style"]
|
|
2
|
-
0:{"buildId":"
|
|
2
|
+
0:{"buildId":"4eCLtLp-IPL1tppPGnHZE","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"/_not-found","paramType":null,"paramKey":"/_not-found","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300}
|
package/out/_not-found.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--4eCLtLp_IPL1tppPGnHZE--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/83ab8820627f8bfe.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/b6e8711267bccbbd.js"/><script src="/_next/static/chunks/fbca595129527827.js" async=""></script><script src="/_next/static/chunks/ab8888d4b78b94be.js" async=""></script><script src="/_next/static/chunks/turbopack-576234c945ffdc44.js" async=""></script><script src="/_next/static/chunks/acf223168ac429f7.js" async=""></script><script src="/_next/static/chunks/b163b5d7cccbcf42.js" async=""></script><script src="/_next/static/chunks/6b84376656bd9887.js" async=""></script><script src="/_next/static/chunks/b112c2f519e4b429.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Flow2Code | Visual AST Compiler</title><meta name="description" content="Visual backend logic generator: compile canvas nodes directly into native TypeScript code"/><link rel="manifest" href="/site.webmanifest"/><link rel="icon" href="/favicon.ico" sizes="any"/><link rel="icon" href="/favicon-16x16.png" sizes="16x16" type="image/png"/><link rel="icon" href="/favicon-32x32.png" sizes="32x32" type="image/png"/><link rel="apple-touch-icon" href="/apple-touch-icon.png"/><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="antialiased overflow-hidden"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/b6e8711267bccbbd.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[46798,[\"/_next/static/chunks/acf223168ac429f7.js\"],\"TooltipProvider\"]\n3:I[95731,[\"/_next/static/chunks/b163b5d7cccbcf42.js\",\"/_next/static/chunks/6b84376656bd9887.js\"],\"default\"]\n4:I[58298,[\"/_next/static/chunks/acf223168ac429f7.js\",\"/_next/static/chunks/b112c2f519e4b429.js\"],\"default\"]\n5:I[32294,[\"/_next/static/chunks/b163b5d7cccbcf42.js\",\"/_next/static/chunks/6b84376656bd9887.js\"],\"default\"]\n6:I[5806,[\"/_next/static/chunks/b163b5d7cccbcf42.js\",\"/_next/static/chunks/6b84376656bd9887.js\"],\"OutletBoundary\"]\n7:\"$Sreact.suspense\"\n9:I[5806,[\"/_next/static/chunks/b163b5d7cccbcf42.js\",\"/_next/static/chunks/6b84376656bd9887.js\"],\"ViewportBoundary\"]\nb:I[5806,[\"/_next/static/chunks/b163b5d7cccbcf42.js\",\"/_next/static/chunks/6b84376656bd9887.js\"],\"MetadataBoundary\"]\nd:I[63491,[\"/_next/static/chunks/b163b5d7cccbcf42.js\",\"/_next/static/chunks/6b84376656bd9887.js\"],\"default\"]\n:HL[\"/_next/static/chunks/83ab8820627f8bfe.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"4eCLtLp-IPL1tppPGnHZE\",\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/83ab8820627f8bfe.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/acf223168ac429f7.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"antialiased overflow-hidden\",\"children\":[\"$\",\"$L2\",null,{\"delayDuration\":200,\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$4\",\"errorStyles\":[],\"errorScripts\":[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/b112c2f519e4b429.js\",\"async\":true}]],\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@8\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L9\",null,{\"children\":\"$La\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lc\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",[]],\"S\":true}\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[22192,[\"/_next/static/chunks/b163b5d7cccbcf42.js\",\"/_next/static/chunks/6b84376656bd9887.js\"],\"IconMark\"]\n8:null\nc:[[\"$\",\"title\",\"0\",{\"children\":\"Flow2Code | Visual AST Compiler\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Visual backend logic generator: compile canvas nodes directly into native TypeScript code\"}],[\"$\",\"link\",\"2\",{\"rel\":\"manifest\",\"href\":\"/site.webmanifest\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"sizes\":\"any\"}],[\"$\",\"link\",\"4\",{\"rel\":\"icon\",\"href\":\"/favicon-16x16.png\",\"sizes\":\"16x16\",\"type\":\"image/png\"}],[\"$\",\"link\",\"5\",{\"rel\":\"icon\",\"href\":\"/favicon-32x32.png\",\"sizes\":\"32x32\",\"type\":\"image/png\"}],[\"$\",\"link\",\"6\",{\"rel\":\"apple-touch-icon\",\"href\":\"/apple-touch-icon.png\"}],[\"$\",\"$Le\",\"7\",{}]]\n"])</script></body></html>
|
package/out/_not-found.txt
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
b:I[5806,["/_next/static/chunks/b163b5d7cccbcf42.js","/_next/static/chunks/6b84376656bd9887.js"],"MetadataBoundary"]
|
|
10
10
|
d:I[63491,["/_next/static/chunks/b163b5d7cccbcf42.js","/_next/static/chunks/6b84376656bd9887.js"],"default"]
|
|
11
11
|
:HL["/_next/static/chunks/83ab8820627f8bfe.css","style"]
|
|
12
|
-
0:{"P":null,"b":"
|
|
12
|
+
0:{"P":null,"b":"4eCLtLp-IPL1tppPGnHZE","c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/83ab8820627f8bfe.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/acf223168ac429f7.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"antialiased overflow-hidden","children":["$","$L2",null,{"delayDuration":200,"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$4","errorStyles":[],"errorScripts":[["$","script","script-0",{"src":"/_next/static/chunks/b112c2f519e4b429.js","async":true}]],"template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$7",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],null]}],false]],"m":"$undefined","G":["$d",[]],"S":true}
|
|
13
13
|
a:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
|
14
14
|
e:I[22192,["/_next/static/chunks/b163b5d7cccbcf42.js","/_next/static/chunks/6b84376656bd9887.js"],"IconMark"]
|
|
15
15
|
8:null
|