@karmaniverous/stan-core 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- import e,{existsSync as t,readFileSync as n,rmSync as s}from"node:fs";import{readdir as r,readFile as i,copyFile as o,writeFile as a,stat as c,mkdir as u,rm as l}from"node:fs/promises";import f,{resolve as p,join as d,dirname as h}from"node:path";import{ensureDir as m,pathExists as g,move as y,copy as b,remove as v}from"fs-extra";import _ from"node:process";import{fileURLToPath as w}from"node:url";import S from"process";import k from"buffer";import{createHash as A}from"node:crypto";import{spawn as E}from"node:child_process";import x from"os";import O from"path";import $ from"util";import T from"stream";import N from"events";import R from"fs";const C="archive.tar",P="archive.meta.tar",L="archive.prev.tar",I=(e,t)=>{if("function"==typeof t)try{t(e)}catch{}},M=e=>e.replace(/\\/g,"/").replace(/^\.\/+/,""),D=e=>{if("string"!=typeof e||!e.trim())return null;const t=M(e.trim());if(/^[/\\]/.test(t))return null;const n=t.split("/").filter(Boolean);if(n.some(e=>".."===e))return null;const s=n.join("/");return s.length?s:null},j=e=>M(e).replace(/^\.\/+/,"").replace(/\/+$/,""),z=(e,t)=>{const n=j(e),s=j(t);return s===n||s.startsWith(`${n}/`)},F=(e,t)=>z(`${e}/diff`,t)||z(`${e}/patch`,t),H=(e,t)=>{const n=M(e),s=M(t);return s===`${n}/output/${C}`||s===`${n}/output/archive.diff.tar`||s===`${n}/output/${P}`||s===`${n}/output/archive.warnings.txt`},B=e=>{const t=e.replace(/\\/g,"/");return e=>!(F(t,e)||H(t,e))},K=(e,t)=>{const n=`${t.replace(/\\/g,"/")}/output`;return Array.from(new Set([...e,n]))},U=(e,t)=>{const n=(e??"").trim();n&&"No archive warnings."!==n&&t?.(n)};var W="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function q(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Z,G={exports:{}};var V,J,Y,Q,X,ee,te,ne,se,re,ie,oe=(Z||(Z=1,function(e){function t(e){return Array.isArray(e)?e:[e]}const n=/^\s+$/,s=/(?:[^\\]|^)\\$/,r=/^\\!/,i=/^\\#/,o=/\r?\n/g,a=/^\.{0,2}\/|^\.{1,2}$/,c=/\/$/,u="/";let l="node-ignore";"undefined"!=typeof Symbol&&(l=Symbol.for("node-ignore"));const f=l,p=(e,t,n)=>(Object.defineProperty(e,t,{value:n}),n),d=/([0-z])-([0-z])/g,h=()=>!1,m=[[/^\uFEFF/,()=>""],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,n)=>t+(0===n.indexOf("\\")?" ":"")],[/(\\+?)\s/g,(e,t)=>{const{length:n}=t;return t.slice(0,n-n%2)+" "}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6<n.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,n)=>t+n.replace(/\\\*/g,"[^\\/]*")],[/\\\\\\(?=[$.|*+(){^])/g,()=>"\\"],[/\\\\/g,()=>"\\"],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,s,r)=>"\\"===t?`\\[${n}${(e=>{const{length:t}=e;return e.slice(0,t-t%2)})(s)}${r}`:"]"===r&&s.length%2==0?`[${(e=>e.replace(d,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:""))(n)}${s}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`]],g=/(^|\\\/)?\\\*$/,y="regex",b="checkRegex",v={[y]:(e,t)=>(t?`${t}[^/]+`:"[^/]*")+"(?=$|\\/$)",[b]:(e,t)=>(t?`${t}[^/]*`:"[^/]*")+"(?=$|\\/$)"},_=e=>"string"==typeof e;class w{constructor(e,t,n,s,r,i){this.pattern=e,this.mark=t,this.negative=r,p(this,"body",n),p(this,"ignoreCase",s),p(this,"regexPrefix",i)}get regex(){const e="_"+y;return this[e]?this[e]:this._make(y,e)}get checkRegex(){const e="_"+b;return this[e]?this[e]:this._make(b,e)}_make(e,t){const n=this.regexPrefix.replace(g,v[e]),s=this.ignoreCase?new RegExp(n,"i"):new RegExp(n);return p(this,t,s)}}const S=({pattern:e,mark:t},n)=>{let s=!1,o=e;0===o.indexOf("!")&&(s=!0,o=o.substr(1)),o=o.replace(r,"!").replace(i,"#");const a=(e=>m.reduce((t,[n,s])=>t.replace(n,s.bind(e)),e))(o);return new w(e,t,o,n,s,a)};class k{constructor(e){this._ignoreCase=e,this._rules=[]}_add(e){if(e&&e[f])return this._rules=this._rules.concat(e._rules._rules),void(this._added=!0);if(_(e)&&(e={pattern:e}),(e=>e&&_(e)&&!n.test(e)&&!s.test(e)&&0!==e.indexOf("#"))(e.pattern)){const t=S(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,t(_(e)?(e=>e.split(o).filter(Boolean))(e):e).forEach(this._add,this),this._added}test(e,t,n){let s,r=!1,i=!1;this._rules.forEach(o=>{const{negative:a}=o;i===a&&r!==i||a&&!r&&!i&&!t||o[n].test(e)&&(r=!a,i=a,s=a?void 0:o)});const o={ignored:r,unignored:i};return s&&(o.rule=s),o}}const A=(e,t)=>{throw new t(e)},E=(e,t,n)=>_(e)?e?!E.isNotRelative(e)||n(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):n("path must not be empty",TypeError):n(`path must be a string, but got \`${t}\``,TypeError),x=e=>a.test(e);E.isNotRelative=x,E.convert=e=>e;class O{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){p(this,f,!0),this._rules=new k(t),this._strictPathCheck=!n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(e){return this._rules.add(e)&&this._initCache(),this}addPattern(e){return this.add(e)}_test(e,t,n,s){const r=e&&E.convert(e);return E(r,e,this._strictPathCheck?A:h),this._t(r,t,n,s)}checkIgnore(e){if(!c.test(e))return this.test(e);const t=e.split(u).filter(Boolean);if(t.pop(),t.length){const e=this._t(t.join(u)+u,this._testCache,!0,t);if(e.ignored)return e}return this._rules.test(e,!1,b)}_t(e,t,n,s){if(e in t)return t[e];if(s||(s=e.split(u).filter(Boolean)),s.pop(),!s.length)return t[e]=this._rules.test(e,n,y);const r=this._t(s.join(u)+u,t,n,s);return t[e]=r.ignored?r:this._rules.test(e,n,y)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return t(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}}const $=e=>new O(e),T=()=>{E.convert=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,"/");const e=/^[a-z]:\//i;E.isNotRelative=t=>e.test(t)||x(t)};"undefined"!=typeof process&&"win32"===process.platform&&T(),e.exports=$,$.default=$,e.exports.isPathValid=e=>E(e&&E.convert(e),e,h),p(e.exports,Symbol.for("setupWindows"),T)}(G)),G.exports),ae=q(oe),ce={};function ue(){if(J)return V;J=1;const e="\\\\/",t=`[^${e}]`,n="\\.",s="\\/",r="[^/]",i=`(?:${s}|$)`,o=`(?:^|${s})`,a=`${n}{1,2}${i}`,c={DOT_LITERAL:n,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:s,ONE_CHAR:"(?=.)",QMARK:r,END_ANCHOR:i,DOTS_SLASH:a,NO_DOT:`(?!${n})`,NO_DOTS:`(?!${o}${a})`,NO_DOT_SLASH:`(?!${n}{0,1}${i})`,NO_DOTS_SLASH:`(?!${a})`,QMARK_NO_DOT:`[^.${s}]`,STAR:`${r}*?`,START_ANCHOR:o,SEP:"/"},u={...c,SLASH_LITERAL:`[${e}]`,QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${n}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${e}])${n}{1,2}(?:[${e}]|$))`,NO_DOT_SLASH:`(?!${n}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`,SEP:"\\"};return V={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?u:c}}function le(){return Y||(Y=1,function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:r}=ue();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>s.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(r,"\\$1"),e.toPosixSlashes=e=>e.replace(t,"/"),e.isWindows=()=>{if("undefined"!=typeof navigator&&navigator.platform){const e=navigator.platform.toLowerCase();return"win32"===e||"windows"===e}return!("undefined"==typeof process||!process.platform)&&"win32"===process.platform},e.removeBackslashes=e=>e.replace(n,e=>"\\"===e?"":e),e.escapeLast=(t,n,s)=>{const r=t.lastIndexOf(n,s);return-1===r?t:"\\"===t[r-1]?e.escapeLast(t,n,r-1):`${t.slice(0,r)}\\${t.slice(r)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let s=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(s=`(?:^(?!${s}).*$)`),s},e.basename=(e,{windows:t}={})=>{const n=e.split(t?/[\\/]/:"/"),s=n[n.length-1];return""===s?n[n.length-2]:s}}(ce)),ce}function fe(){if(X)return Q;X=1;const e=le(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:s,CHAR_COMMA:r,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:u,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:f,CHAR_QUESTION_MARK:p,CHAR_RIGHT_CURLY_BRACE:d,CHAR_RIGHT_PARENTHESES:h,CHAR_RIGHT_SQUARE_BRACKET:m}=ue(),g=e=>e===a||e===s,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return Q=(b,v)=>{const _=v||{},w=b.length-1,S=!0===_.parts||!0===_.scanToEnd,k=[],A=[],E=[];let x,O,$=b,T=-1,N=0,R=0,C=!1,P=!1,L=!1,I=!1,M=!1,D=!1,j=!1,z=!1,F=!1,H=!1,B=0,K={value:"",depth:0,isGlob:!1};const U=()=>T>=w,W=()=>$.charCodeAt(T+1),q=()=>(x=O,$.charCodeAt(++T));for(;T<w;){let e;if(O=q(),O!==s){if(!0===D||O===c){for(B++;!0!==U()&&(O=q());)if(O!==s)if(O!==c){if(!0!==D&&O===i&&(O=q())===i){if(C=K.isBrace=!0,L=K.isGlob=!0,H=!0,!0===S)continue;break}if(!0!==D&&O===r){if(C=K.isBrace=!0,L=K.isGlob=!0,H=!0,!0===S)continue;break}if(O===d&&(B--,0===B)){D=!1,C=K.isBrace=!0,H=!0;break}}else B++;else j=K.backslashes=!0,q();if(!0===S)continue;break}if(O!==a){if(!0!==_.noext){if(!0===(O===f||O===n||O===t||O===p||O===o)&&W()===u){if(L=K.isGlob=!0,I=K.isExtglob=!0,H=!0,O===o&&T===N&&(F=!0),!0===S){for(;!0!==U()&&(O=q());)if(O!==s){if(O===h){L=K.isGlob=!0,H=!0;break}}else j=K.backslashes=!0,O=q();continue}break}}if(O===t){if(x===t&&(M=K.isGlobstar=!0),L=K.isGlob=!0,H=!0,!0===S)continue;break}if(O===p){if(L=K.isGlob=!0,H=!0,!0===S)continue;break}if(O===l){for(;!0!==U()&&(e=q());)if(e!==s){if(e===m){P=K.isBracket=!0,L=K.isGlob=!0,H=!0;break}}else j=K.backslashes=!0,q();if(!0===S)continue;break}if(!0===_.nonegate||O!==o||T!==N){if(!0!==_.noparen&&O===u){if(L=K.isGlob=!0,!0===S){for(;!0!==U()&&(O=q());)if(O!==u){if(O===h){H=!0;break}}else j=K.backslashes=!0,O=q();continue}break}if(!0===L){if(H=!0,!0===S)continue;break}}else z=K.negated=!0,N++}else{if(k.push(T),A.push(K),K={value:"",depth:0,isGlob:!1},!0===H)continue;if(x===i&&T===N+1){N+=2;continue}R=T+1}}else j=K.backslashes=!0,O=q(),O===c&&(D=!0)}!0===_.noext&&(I=!1,L=!1);let Z=$,G="",V="";N>0&&(G=$.slice(0,N),$=$.slice(N),R-=N),Z&&!0===L&&R>0?(Z=$.slice(0,R),V=$.slice(R)):!0===L?(Z="",V=$):Z=$,Z&&""!==Z&&"/"!==Z&&Z!==$&&g(Z.charCodeAt(Z.length-1))&&(Z=Z.slice(0,-1)),!0===_.unescape&&(V&&(V=e.removeBackslashes(V)),Z&&!0===j&&(Z=e.removeBackslashes(Z)));const J={prefix:G,input:b,start:N,base:Z,glob:V,isBrace:C,isBracket:P,isGlob:L,isExtglob:I,isGlobstar:M,negated:z,negatedExtglob:F};if(!0===_.tokens&&(J.maxDepth=0,g(O)||A.push(K),J.tokens=A),!0===_.parts||!0===_.tokens){let e;for(let t=0;t<k.length;t++){const n=e?e+1:N,s=k[t],r=b.slice(n,s);_.tokens&&(0===t&&0!==N?(A[t].isPrefix=!0,A[t].value=G):A[t].value=r,y(A[t]),J.maxDepth+=A[t].depth),0===t&&""===r||E.push(r),e=s}if(e&&e+1<b.length){const t=b.slice(e+1);E.push(t),_.tokens&&(A[A.length-1].value=t,y(A[A.length-1]),J.maxDepth+=A[A.length-1].depth)}J.slashes=k,J.parts=E}return J},Q}function pe(){if(te)return ee;te=1;const e=ue(),t=le(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:s,REGEX_NON_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:o}=e,a=(e,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...e,n);e.sort();const s=`[${e.join("-")}]`;try{new RegExp(s)}catch(n){return e.map(e=>t.escapeRegex(e)).join("..")}return s},c=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,u=(l,f)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=o[l]||l;const p={...f},d="number"==typeof p.maxLength?Math.min(n,p.maxLength):n;let h=l.length;if(h>d)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${d}`);const m={type:"bos",value:"",output:p.prepend||""},g=[m],y=p.capture?"":"?:",b=e.globChars(p.windows),v=e.extglobChars(b),{DOT_LITERAL:_,PLUS_LITERAL:w,SLASH_LITERAL:S,ONE_CHAR:k,DOTS_SLASH:A,NO_DOT:E,NO_DOT_SLASH:x,NO_DOTS_SLASH:O,QMARK:$,QMARK_NO_DOT:T,STAR:N,START_ANCHOR:R}=b,C=e=>`(${y}(?:(?!${R}${e.dot?A:_}).)*?)`,P=p.dot?"":E,L=p.dot?$:T;let I=!0===p.bash?C(p):N;p.capture&&(I=`(${I})`),"boolean"==typeof p.noext&&(p.noextglob=p.noext);const M={input:l,index:-1,start:0,dot:!0===p.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};l=t.removePrefix(l,M),h=l.length;const D=[],j=[],z=[];let F,H=m;const B=()=>M.index===h-1,K=M.peek=(e=1)=>l[M.index+e],U=M.advance=()=>l[++M.index]||"",W=()=>l.slice(M.index+1),q=(e="",t=0)=>{M.consumed+=e,M.index+=t},Z=e=>{M.output+=null!=e.output?e.output:e.value,q(e.value)},G=()=>{let e=1;for(;"!"===K()&&("("!==K(2)||"?"===K(3));)U(),M.start++,e++;return e%2!=0&&(M.negated=!0,M.start++,!0)},V=e=>{M[e]++,z.push(e)},J=e=>{M[e]--,z.pop()},Y=e=>{if("globstar"===H.type){const t=M.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||D.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(M.output=M.output.slice(0,-H.output.length),H.type="star",H.value="*",H.output=I,M.output+=H.output)}if(D.length&&"paren"!==e.type&&(D[D.length-1].inner+=e.value),(e.value||e.output)&&Z(e),H&&"text"===H.type&&"text"===e.type)return H.output=(H.output||H.value)+e.value,void(H.value+=e.value);e.prev=H,g.push(e),H=e},Q=(e,t)=>{const n={...v[t],conditions:1,inner:""};n.prev=H,n.parens=M.parens,n.output=M.output;const s=(p.capture?"(":"")+n.open;V("parens"),Y({type:e,value:t,output:M.output?"":k}),Y({type:"paren",extglob:!0,value:U(),output:s}),D.push(n)},X=e=>{let t,n=e.close+(p.capture?")":"");if("negate"===e.type){let s=I;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(s=C(p)),(s!==I||B()||/^\)+$/.test(W()))&&(n=e.close=`)$))${s}`),e.inner.includes("*")&&(t=W())&&/^\.[^\\/.]+$/.test(t)){const r=u(t,{...f,fastpaths:!1}).output;n=e.close=`)${r})${s})`}"bos"===e.prev.type&&(M.negatedExtglob=!0)}Y({type:"paren",extglob:!0,value:F,output:n}),J("parens")};if(!1!==p.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let e=!1,n=l.replace(i,(t,n,s,r,i,o)=>"\\"===r?(e=!0,t):"?"===r?n?n+r+(i?$.repeat(i.length):""):0===o?L+(i?$.repeat(i.length):""):$.repeat(s.length):"."===r?_.repeat(s.length):"*"===r?n?n+r+(i?I:""):I:n?t:`\\${t}`);return!0===e&&(n=!0===p.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===l&&!0===p.contains?(M.output=l,M):(M.output=t.wrapOutput(n,M,f),M)}for(;!B();){if(F=U(),"\0"===F)continue;if("\\"===F){const e=K();if("/"===e&&!0!==p.bash)continue;if("."===e||";"===e)continue;if(!e){F+="\\",Y({type:"text",value:F});continue}const t=/^\\+/.exec(W());let n=0;if(t&&t[0].length>2&&(n=t[0].length,M.index+=n,n%2!=0&&(F+="\\")),!0===p.unescape?F=U():F+=U(),0===M.brackets){Y({type:"text",value:F});continue}}if(M.brackets>0&&("]"!==F||"["===H.value||"[^"===H.value)){if(!1!==p.posix&&":"===F){const e=H.value.slice(1);if(e.includes("[")&&(H.posix=!0,e.includes(":"))){const e=H.value.lastIndexOf("["),t=H.value.slice(0,e),n=H.value.slice(e+2),r=s[n];if(r){H.value=t+r,M.backtrack=!0,U(),m.output||1!==g.indexOf(H)||(m.output=k);continue}}}("["===F&&":"!==K()||"-"===F&&"]"===K())&&(F=`\\${F}`),"]"!==F||"["!==H.value&&"[^"!==H.value||(F=`\\${F}`),!0===p.posix&&"!"===F&&"["===H.value&&(F="^"),H.value+=F,Z({value:F});continue}if(1===M.quotes&&'"'!==F){F=t.escapeRegex(F),H.value+=F,Z({value:F});continue}if('"'===F){M.quotes=1===M.quotes?0:1,!0===p.keepQuotes&&Y({type:"text",value:F});continue}if("("===F){V("parens"),Y({type:"paren",value:F});continue}if(")"===F){if(0===M.parens&&!0===p.strictBrackets)throw new SyntaxError(c("opening","("));const e=D[D.length-1];if(e&&M.parens===e.parens+1){X(D.pop());continue}Y({type:"paren",value:F,output:M.parens?")":"\\)"}),J("parens");continue}if("["===F){if(!0!==p.nobracket&&W().includes("]"))V("brackets");else{if(!0!==p.nobracket&&!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));F=`\\${F}`}Y({type:"bracket",value:F});continue}if("]"===F){if(!0===p.nobracket||H&&"bracket"===H.type&&1===H.value.length){Y({type:"text",value:F,output:`\\${F}`});continue}if(0===M.brackets){if(!0===p.strictBrackets)throw new SyntaxError(c("opening","["));Y({type:"text",value:F,output:`\\${F}`});continue}J("brackets");const e=H.value.slice(1);if(!0===H.posix||"^"!==e[0]||e.includes("/")||(F=`/${F}`),H.value+=F,Z({value:F}),!1===p.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(H.value);if(M.output=M.output.slice(0,-H.value.length),!0===p.literalBrackets){M.output+=n,H.value=n;continue}H.value=`(${y}${n}|${H.value})`,M.output+=H.value;continue}if("{"===F&&!0!==p.nobrace){V("braces");const e={type:"brace",value:F,output:"(",outputIndex:M.output.length,tokensIndex:M.tokens.length};j.push(e),Y(e);continue}if("}"===F){const e=j[j.length-1];if(!0===p.nobrace||!e){Y({type:"text",value:F,output:F});continue}let t=")";if(!0===e.dots){const e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=a(n,p),M.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=M.output.slice(0,e.outputIndex),s=M.tokens.slice(e.tokensIndex);e.value=e.output="\\{",F=t="\\}",M.output=n;for(const e of s)M.output+=e.output||e.value}Y({type:"brace",value:F,output:t}),J("braces"),j.pop();continue}if("|"===F){D.length>0&&D[D.length-1].conditions++,Y({type:"text",value:F});continue}if(","===F){let e=F;const t=j[j.length-1];t&&"braces"===z[z.length-1]&&(t.comma=!0,e="|"),Y({type:"comma",value:F,output:e});continue}if("/"===F){if("dot"===H.type&&M.index===M.start+1){M.start=M.index+1,M.consumed="",M.output="",g.pop(),H=m;continue}Y({type:"slash",value:F,output:S});continue}if("."===F){if(M.braces>0&&"dot"===H.type){"."===H.value&&(H.output=_);const e=j[j.length-1];H.type="dots",H.output+=F,H.value+=F,e.dots=!0;continue}if(M.braces+M.parens===0&&"bos"!==H.type&&"slash"!==H.type){Y({type:"text",value:F,output:_});continue}Y({type:"dot",value:F,output:_});continue}if("?"===F){if(!(H&&"("===H.value)&&!0!==p.noextglob&&"("===K()&&"?"!==K(2)){Q("qmark",F);continue}if(H&&"paren"===H.type){const e=K();let t=F;("("===H.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(W()))&&(t=`\\${F}`),Y({type:"text",value:F,output:t});continue}if(!0!==p.dot&&("slash"===H.type||"bos"===H.type)){Y({type:"qmark",value:F,output:T});continue}Y({type:"qmark",value:F,output:$});continue}if("!"===F){if(!0!==p.noextglob&&"("===K()&&("?"!==K(2)||!/[!=<:]/.test(K(3)))){Q("negate",F);continue}if(!0!==p.nonegate&&0===M.index){G();continue}}if("+"===F){if(!0!==p.noextglob&&"("===K()&&"?"!==K(2)){Q("plus",F);continue}if(H&&"("===H.value||!1===p.regex){Y({type:"plus",value:F,output:w});continue}if(H&&("bracket"===H.type||"paren"===H.type||"brace"===H.type)||M.parens>0){Y({type:"plus",value:F});continue}Y({type:"plus",value:w});continue}if("@"===F){if(!0!==p.noextglob&&"("===K()&&"?"!==K(2)){Y({type:"at",extglob:!0,value:F,output:""});continue}Y({type:"text",value:F});continue}if("*"!==F){"$"!==F&&"^"!==F||(F=`\\${F}`);const e=r.exec(W());e&&(F+=e[0],M.index+=e[0].length),Y({type:"text",value:F});continue}if(H&&("globstar"===H.type||!0===H.star)){H.type="star",H.star=!0,H.value+=F,H.output=I,M.backtrack=!0,M.globstar=!0,q(F);continue}let e=W();if(!0!==p.noextglob&&/^\([^?]/.test(e)){Q("star",F);continue}if("star"===H.type){if(!0===p.noglobstar){q(F);continue}const t=H.prev,n=t.prev,s="slash"===t.type||"bos"===t.type,r=n&&("star"===n.type||"globstar"===n.type);if(!0===p.bash&&(!s||e[0]&&"/"!==e[0])){Y({type:"star",value:F,output:""});continue}const i=M.braces>0&&("comma"===t.type||"brace"===t.type),o=D.length&&("pipe"===t.type||"paren"===t.type);if(!s&&"paren"!==t.type&&!i&&!o){Y({type:"star",value:F,output:""});continue}for(;"/**"===e.slice(0,3);){const t=l[M.index+4];if(t&&"/"!==t)break;e=e.slice(3),q("/**",3)}if("bos"===t.type&&B()){H.type="globstar",H.value+=F,H.output=C(p),M.output=H.output,M.globstar=!0,q(F);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!r&&B()){M.output=M.output.slice(0,-(t.output+H.output).length),t.output=`(?:${t.output}`,H.type="globstar",H.output=C(p)+(p.strictSlashes?")":"|$)"),H.value+=F,M.globstar=!0,M.output+=t.output+H.output,q(F);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const n=void 0!==e[1]?"|$":"";M.output=M.output.slice(0,-(t.output+H.output).length),t.output=`(?:${t.output}`,H.type="globstar",H.output=`${C(p)}${S}|${S}${n})`,H.value+=F,M.output+=t.output+H.output,M.globstar=!0,q(F+U()),Y({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){H.type="globstar",H.value+=F,H.output=`(?:^|${S}|${C(p)}${S})`,M.output=H.output,M.globstar=!0,q(F+U()),Y({type:"slash",value:"/",output:""});continue}M.output=M.output.slice(0,-H.output.length),H.type="globstar",H.output=C(p),H.value+=F,M.output+=H.output,M.globstar=!0,q(F);continue}const n={type:"star",value:F,output:I};!0!==p.bash?!H||"bracket"!==H.type&&"paren"!==H.type||!0!==p.regex?(M.index!==M.start&&"slash"!==H.type&&"dot"!==H.type||("dot"===H.type?(M.output+=x,H.output+=x):!0===p.dot?(M.output+=O,H.output+=O):(M.output+=P,H.output+=P),"*"!==K()&&(M.output+=k,H.output+=k)),Y(n)):(n.output=F,Y(n)):(n.output=".*?","bos"!==H.type&&"slash"!==H.type||(n.output=P+n.output),Y(n))}for(;M.brackets>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));M.output=t.escapeLast(M.output,"["),J("brackets")}for(;M.parens>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing",")"));M.output=t.escapeLast(M.output,"("),J("parens")}for(;M.braces>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","}"));M.output=t.escapeLast(M.output,"{"),J("braces")}if(!0===p.strictSlashes||"star"!==H.type&&"bracket"!==H.type||Y({type:"maybe_slash",value:"",output:`${S}?`}),!0===M.backtrack){M.output="";for(const e of M.tokens)M.output+=null!=e.output?e.output:e.value,e.suffix&&(M.output+=e.suffix)}return M};return u.fastpaths=(s,r)=>{const i={...r},a="number"==typeof i.maxLength?Math.min(n,i.maxLength):n,c=s.length;if(c>a)throw new SyntaxError(`Input length: ${c}, exceeds maximum allowed length: ${a}`);s=o[s]||s;const{DOT_LITERAL:u,SLASH_LITERAL:l,ONE_CHAR:f,DOTS_SLASH:p,NO_DOT:d,NO_DOTS:h,NO_DOTS_SLASH:m,STAR:g,START_ANCHOR:y}=e.globChars(i.windows),b=i.dot?h:d,v=i.dot?m:d,_=i.capture?"":"?:";let w=!0===i.bash?".*?":g;i.capture&&(w=`(${w})`);const S=e=>!0===e.noglobstar?w:`(${_}(?:(?!${y}${e.dot?p:u}).)*?)`,k=e=>{switch(e){case"*":return`${b}${f}${w}`;case".*":return`${u}${f}${w}`;case"*.*":return`${b}${w}${u}${f}${w}`;case"*/*":return`${b}${w}${l}${f}${v}${w}`;case"**":return b+S(i);case"**/*":return`(?:${b}${S(i)}${l})?${v}${f}${w}`;case"**/*.*":return`(?:${b}${S(i)}${l})?${v}${w}${u}${f}${w}`;case"**/.*":return`(?:${b}${S(i)}${l})?${u}${f}${w}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=k(t[1]);if(!n)return;return n+u+t[2]}}},A=t.removePrefix(s,{negated:!1,prefix:""});let E=k(A);return E&&!0!==i.strictSlashes&&(E+=`${l}?`),E},ee=u}function de(){if(se)return ne;se=1;const e=fe(),t=pe(),n=le(),s=ue(),r=(e,t,n=!1)=>{if(Array.isArray(e)){const s=e.map(e=>r(e,t,n)),i=e=>{for(const t of s){const n=t(e);if(n)return n}return!1};return i}const s=(i=e)&&"object"==typeof i&&!Array.isArray(i)&&e.tokens&&e.input;var i;if(""===e||"string"!=typeof e&&!s)throw new TypeError("Expected pattern to be a non-empty string");const o=t||{},a=o.windows,c=s?r.compileRe(e,t):r.makeRe(e,t,!1,!0),u=c.state;delete c.state;let l=()=>!1;if(o.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};l=r(o.ignore,e,n)}const f=(n,s=!1)=>{const{isMatch:i,match:f,output:p}=r.test(n,c,t,{glob:e,posix:a}),d={glob:e,state:u,regex:c,posix:a,input:n,output:p,match:f,isMatch:i};return"function"==typeof o.onResult&&o.onResult(d),!1===i?(d.isMatch=!1,!!s&&d):l(n)?("function"==typeof o.onIgnore&&o.onIgnore(d),d.isMatch=!1,!!s&&d):("function"==typeof o.onMatch&&o.onMatch(d),!s||d)};return n&&(f.state=u),f};return r.test=(e,t,s,{glob:i,posix:o}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=s||{},c=a.format||(o?n.toPosixSlashes:null);let u=e===i,l=u&&c?c(e):e;return!1===u&&(l=c?c(e):e,u=l===i),!1!==u&&!0!==a.capture||(u=!0===a.matchBase||!0===a.basename?r.matchBase(e,t,s,o):t.exec(l)),{isMatch:Boolean(u),match:u,output:l}},r.matchBase=(e,t,s)=>(t instanceof RegExp?t:r.makeRe(t,s)).test(n.basename(e)),r.isMatch=(e,t,n)=>r(t,n)(e),r.parse=(e,n)=>Array.isArray(e)?e.map(e=>r.parse(e,n)):t(e,{...n,fastpaths:!1}),r.scan=(t,n)=>e(t,n),r.compileRe=(e,t,n=!1,s=!1)=>{if(!0===n)return e.output;const i=t||{},o=i.contains?"":"^",a=i.contains?"":"$";let c=`${o}(?:${e.output})${a}`;e&&!0===e.negated&&(c=`^(?!${c}).*$`);const u=r.toRegex(c,t);return!0===s&&(u.state=e),u},r.makeRe=(e,n={},s=!1,i=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1===n.fastpaths||"."!==e[0]&&"*"!==e[0]||(o.output=t.fastpaths(e,n)),o.output||(o=t(e,n)),r.compileRe(o,n,s,i)},r.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},r.constants=s,ne=r}function he(){if(ie)return re;ie=1;const e=de(),t=le();function n(n,s,r=!1){return!s||null!==s.windows&&void 0!==s.windows||(s={...s,windows:t.isWindows()}),e(n,s,r)}return Object.assign(n,e),re=n}var me=q(he());const ge=e=>e&&"object"==typeof e?e:null,ye=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),be=async(e,t,n,s={})=>{const r=s.moduleLabel??"(module)";let i;try{i=await e()}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`failed to import ${r}: ${t}`)}const o=ge(i);if(!o)throw new Error(`invalid module shape for ${r}: expected an object`);if(ye(o,t)){const e=o[t];if(n(e))return e}const a=ge(o.default);if(a&&ye(a,t)){const e=a[t];if(n(e))return e}if(s.acceptCallableDefault){const e=o.default;if(n(e))return e}throw new Error(`export "${t}" not found in ${r}`)};async function ve(e){const t=[],n=["."];for(;n.length;){const s=n.pop(),i=p(e,s),o=await r(i,{withFileTypes:!0});for(const e of o){const r="."===s?e.name:d(s,e.name);e.isDirectory()?n.push(r):t.push(r.replace(/\\/g,"/"))}}return t}const _e=e=>{const t=j(e);if(!/[*?[\]{}()!]/.test(n=t)&&!n.includes("**"))return t?e=>z(t,e):()=>!1;var n;const s=me(t,{dot:!0});return e=>s(e)};async function we(e,{cwd:n,stanPath:s,includeOutputDir:r,includes:o=[],excludes:a=[]}){const c=s.replace(/\\/g,"/"),u=((e,t)=>{const n=new Set;for(const s of e){if("package.json"===s)continue;if(!s.endsWith("/package.json"))continue;const e=s.slice(0,-13);e.startsWith("node_modules/")||e.startsWith(".git/")||e===t||e.startsWith(`${t}/`)||e.length>0&&n.add(e)}return Array.from(n)})(e,c),l=await(async e=>{const n=p(e,".gitignore");if(!t(n))return null;try{const e=await i(n,"utf8"),t=ae();return t.add(e),t}catch{return null}})(n),f=[e=>z("node_modules",e),e=>z(".git",e),...l?[e=>l.ignores(e)]:[],...a.map(_e),...u.map(e=>t=>z(e,t)),e=>F(c,e)];r||f.push(e=>z(`${c}/output`,e));const d=e.filter(e=>!f.some(t=>t(e)));if(o.length>0){const t=o.map(_e),n=new Set(d);for(const s of e)t.some(e=>e(s))&&n.add(s);const s=[e=>z(".git",e),e=>F(c,e),...r?[]:[e=>z(`${c}/output`,e)],...a.map(_e)],i=new Set(e.filter(e=>n.has(e)&&!s.some(t=>t(e))));return e.filter(e=>i.has(e))}return d}async function Se(e,t){const n=(await be(()=>Promise.resolve().then(function(){return ju}),"makeStanDirs",e=>"function"==typeof e,{moduleLabel:"./paths",acceptCallableDefault:!0}))(e,t);return await m(n.rootAbs),await m(n.outputAbs),await m(n.diffAbs),await m(n.patchAbs),{rootAbs:n.rootAbs,outputAbs:n.outputAbs,diffAbs:n.diffAbs,patchAbs:n.patchAbs}}async function ke(e,t){const n=await Se(e,t);return{outDir:n.outputAbs,diffDir:n.diffAbs}}async function Ae(e,n,s={}){const{includeOutputDir:r=!1,fileName:i,includes:a=[],excludes:c=[]}=s;let u=i??"archive.tar";u.endsWith(".tar")||(u+=".tar");const{outDir:l,diffDir:f}=await ke(e,n),d=await ve(e),h=await we(d,{cwd:e,stanPath:n,includeOutputDir:r,includes:a,excludes:c}),m=p(l,u),g=p(f,L);if(t(m))try{await o(m,g)}catch{}const y=await be(()=>import("./classifier-Bqzr65UC.js"),"classifyForArchive",e=>"function"==typeof e,{moduleLabel:"./classifier",acceptCallableDefault:!0}),{textFiles:b,excludedBinaries:v,largeText:_,warningsBody:w}=await y(e,h),S=b;U(w,s.onArchiveWarnings),I({kind:"archive",mode:"denylist",stanPath:n,outputFile:m,includeOutputDir:r,hasWarnings:v.length>0||_.length>0,counts:{candidates:d.length,selected:h.length,archived:S.length,excludedBinaries:v.length,largeText:_.length}},s.onSelectionReport);const k=await import("./index-WrHikElU.js");if(r?await k.create({file:m,cwd:e,filter:B(n)},K(S,n)):await k.create({file:m,cwd:e,filter:B(n)},S),!t(g))try{await o(m,g)}catch{}return m}const Ee=(e,t=e=>e)=>(e=>{const t=e.reduce((e,t)=>{const n=t;return e[n]||(e[n]=t),e},{});return Object.values(t)})(e.map(e=>t(e).trim()).filter(e=>e.length>0)).sort((e,t)=>e.localeCompare(t));async function xe(e,n,s,r){const{outDir:i}=await ke(e,n),o=n.replace(/\\/g,"/"),a=`${o}/system/`,c=`${o}/system/.docs.meta.json`,u=`${o}/context/dependency.meta.json`,l=`${o}/context/dependency.state.json`,f=await ve(e);if(!f.includes(u)||!t(p(e,u)))throw new Error(`dependency meta not found at ${u}; generate dependency meta before creating archive.meta.tar`);const d=f.filter(e=>e.startsWith(a)).filter(e=>e!==c),h=(await we(f,{cwd:e,stanPath:n,includeOutputDir:!1,includes:s?.includes??[],excludes:s?.excludes??[]})).filter(e=>!e.includes("/")),m=f.includes(l)&&t(p(e,l)),g=Ee([...d,u,...m?[l]:[],...h]),y=p(i,P);I({kind:"meta",mode:"allowlist",stanPath:n,outputFile:y,hasWarnings:!1,counts:{candidates:f.length,selected:g.length,archived:g.length,excludedBinaries:0,largeText:0}},r?.onSelectionReport);const b=await import("./index-WrHikElU.js");return await b.create({file:y,cwd:e,filter:B(n)},g),y}const Oe=".stan",$e="code -g {file}",Te=e=>e instanceof URL?w(e):e;function Ne({cwd:t}={}){const n=function(t,{cwd:n=_.cwd(),type:s="file",stopAt:r}={}){let i=f.resolve(Te(n)??"");const{root:o}=f.parse(i);r=f.resolve(i,Te(r)??o);const a=f.isAbsolute(t);for(;i;){const n=a?t:f.join(i,t);try{const t=e.statSync(n,{throwIfNoEntry:!1});if("file"===s&&t?.isFile()||"directory"===s&&t?.isDirectory())return n}catch{}if(i===r||i===o)break;i=f.dirname(i)}}("package.json",{cwd:t});return n&&f.dirname(n)}const Re=["stan.config.yml","stan.config.yaml","stan.config.json"],Ce=e=>{for(const n of Re){const s=p(e,n);if(t(s))return s}return null},Pe=e=>{const t=Ce(e);if(t)return t;const n=new Set;let s=e;for(;s;){const e=Ne({cwd:s});if(!e||n.has(e))break;n.add(e);const t=Ce(e);if(t)return t;const r=h(e);if(r===e||n.has(r))break;s=r}return null};var Le,Ie={},Me={},De={},je={};function ze(){if(Le)return je;Le=1;const e=Symbol.for("yaml.alias"),t=Symbol.for("yaml.document"),n=Symbol.for("yaml.map"),s=Symbol.for("yaml.pair"),r=Symbol.for("yaml.scalar"),i=Symbol.for("yaml.seq"),o=Symbol.for("yaml.node.type"),a=e=>!!e&&"object"==typeof e&&e[o]===r;function c(e){if(e&&"object"==typeof e)switch(e[o]){case n:case i:return!0}return!1}return je.ALIAS=e,je.DOC=t,je.MAP=n,je.NODE_TYPE=o,je.PAIR=s,je.SCALAR=r,je.SEQ=i,je.hasAnchor=e=>(a(e)||c(e))&&!!e.anchor,je.isAlias=t=>!!t&&"object"==typeof t&&t[o]===e,je.isCollection=c,je.isDocument=e=>!!e&&"object"==typeof e&&e[o]===t,je.isMap=e=>!!e&&"object"==typeof e&&e[o]===n,je.isNode=function(t){if(t&&"object"==typeof t)switch(t[o]){case e:case n:case r:case i:return!0}return!1},je.isPair=e=>!!e&&"object"==typeof e&&e[o]===s,je.isScalar=a,je.isSeq=e=>!!e&&"object"==typeof e&&e[o]===i,je}var Fe,He,Be={};function Ke(){if(Fe)return Be;Fe=1;var e=ze();const t=Symbol("break visit"),n=Symbol("skip children"),s=Symbol("remove node");function r(t,n){const r=c(n);if(e.isDocument(t)){i(null,t.contents,r,Object.freeze([t]))===s&&(t.contents=null)}else i(null,t,r,Object.freeze([]))}function i(n,r,o,a){const c=u(n,r,o,a);if(e.isNode(c)||e.isPair(c))return l(n,a,c),i(n,c,o,a);if("symbol"!=typeof c)if(e.isCollection(r)){a=Object.freeze(a.concat(r));for(let e=0;e<r.items.length;++e){const n=i(e,r.items[e],o,a);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===s&&(r.items.splice(e,1),e-=1)}}}else if(e.isPair(r)){a=Object.freeze(a.concat(r));const e=i("key",r.key,o,a);if(e===t)return t;e===s&&(r.key=null);const n=i("value",r.value,o,a);if(n===t)return t;n===s&&(r.value=null)}return c}async function o(t,n){const r=c(n);if(e.isDocument(t)){await a(null,t.contents,r,Object.freeze([t]))===s&&(t.contents=null)}else await a(null,t,r,Object.freeze([]))}async function a(n,r,i,o){const c=await u(n,r,i,o);if(e.isNode(c)||e.isPair(c))return l(n,o,c),a(n,c,i,o);if("symbol"!=typeof c)if(e.isCollection(r)){o=Object.freeze(o.concat(r));for(let e=0;e<r.items.length;++e){const n=await a(e,r.items[e],i,o);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===s&&(r.items.splice(e,1),e-=1)}}}else if(e.isPair(r)){o=Object.freeze(o.concat(r));const e=await a("key",r.key,i,o);if(e===t)return t;e===s&&(r.key=null);const n=await a("value",r.value,i,o);if(n===t)return t;n===s&&(r.value=null)}return c}function c(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function u(t,n,s,r){return"function"==typeof s?s(t,n,r):e.isMap(n)?s.Map?.(t,n,r):e.isSeq(n)?s.Seq?.(t,n,r):e.isPair(n)?s.Pair?.(t,n,r):e.isScalar(n)?s.Scalar?.(t,n,r):e.isAlias(n)?s.Alias?.(t,n,r):void 0}function l(t,n,s){const r=n[n.length-1];if(e.isCollection(r))r.items[t]=s;else if(e.isPair(r))"key"===t?r.key=s:r.value=s;else{if(!e.isDocument(r)){const t=e.isAlias(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${t} parent`)}r.contents=s}}return r.BREAK=t,r.SKIP=n,r.REMOVE=s,o.BREAK=t,o.SKIP=n,o.REMOVE=s,Be.visit=r,Be.visitAsync=o,Be}function Ue(){if(He)return De;He=1;var e=ze(),t=Ke();const n={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},s=e=>e.replace(/[!,[\]{}]/g,e=>n[e]);class r{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},r.defaultYaml,e),this.tags=Object.assign({},r.defaultTags,t)}clone(){const e=new r(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new r(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:r.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},r.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:r.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},r.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),s=n.shift();switch(s){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[e,s]=n;return this.tags[e]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==n.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=n;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;return t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1}default:return t(0,`Unknown directive ${s}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const n=e.slice(2,-1);return"!"===n||"!!"===n?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),n)}const[,n,s]=e.match(/^(.*!)([^!]*)$/s);s||t(`The ${e} tag has no suffix`);const r=this.tags[n];if(r)try{return r+decodeURIComponent(s)}catch(e){return t(String(e)),null}return"!"===n?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+s(e.substring(n.length));return"!"===e[0]?e:`!<${e}>`}toString(n){const s=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let i;if(n&&r.length>0&&e.isNode(n.contents)){const s={};t.visit(n.contents,(t,n)=>{e.isNode(n)&&n.tag&&(s[n.tag]=!0)}),i=Object.keys(s)}else i=[];for(const[e,t]of r)"!!"===e&&"tag:yaml.org,2002:"===t||n&&!i.some(e=>e.startsWith(t))||s.push(`%TAG ${e} ${t}`);return s.join("\n")}}return r.defaultYaml={explicit:!1,version:"1.2"},r.defaultTags={"!!":"tag:yaml.org,2002:"},De.Directives=r,De}var We,qe={},Ze={},Ge={};function Ve(){if(We)return Ge;We=1;var e=ze(),t=Ke();function n(e){const n=new Set;return t.visit(e,{Value(e,t){t.anchor&&n.add(t.anchor)}}),n}function s(e,t){for(let n=1;;++n){const s=`${e}${n}`;if(!t.has(s))return s}}return Ge.anchorIsValid=function(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0},Ge.anchorNames=n,Ge.createNodeAnchors=function(t,r){const i=[],o=new Map;let a=null;return{onAnchor:e=>{i.push(e),a??(a=n(t));const o=s(r,a);return a.add(o),o},setAnchors:()=>{for(const t of i){const n=o.get(t);if("object"!=typeof n||!n.anchor||!e.isScalar(n.node)&&!e.isCollection(n.node)){const e=new Error("Failed to resolve repeated object (this should not happen)");throw e.source=t,e}n.node.anchor=n.anchor}},sourceObjects:o}},Ge.findNewAnchor=s,Ge}var Je,Ye={},Qe={};function Xe(){if(Je)return Qe;return Je=1,Qe.applyReviver=function e(t,n,s,r){if(r&&"object"==typeof r)if(Array.isArray(r))for(let n=0,s=r.length;n<s;++n){const s=r[n],i=e(t,r,String(n),s);void 0===i?delete r[n]:i!==s&&(r[n]=i)}else if(r instanceof Map)for(const n of Array.from(r.keys())){const s=r.get(n),i=e(t,r,n,s);void 0===i?r.delete(n):i!==s&&r.set(n,i)}else if(r instanceof Set)for(const n of Array.from(r)){const s=e(t,r,n,n);void 0===s?r.delete(n):s!==n&&(r.delete(n),r.add(s))}else for(const[n,s]of Object.entries(r)){const i=e(t,r,n,s);void 0===i?delete r[n]:i!==s&&(r[n]=i)}return t.call(n,s,r)},Qe}var et,tt,nt,st={};function rt(){if(et)return st;et=1;var e=ze();return st.toJS=function t(n,s,r){if(Array.isArray(n))return n.map((e,n)=>t(e,String(n),r));if(n&&"function"==typeof n.toJSON){if(!r||!e.hasAnchor(n))return n.toJSON(s,r);const t={aliasCount:0,count:1,res:void 0};r.anchors.set(n,t),r.onCreate=e=>{t.res=e,delete r.onCreate};const i=n.toJSON(s,r);return r.onCreate&&r.onCreate(i),i}return"bigint"!=typeof n||r?.keep?n:Number(n)},st}function it(){if(tt)return Ye;tt=1;var e=Xe(),t=ze(),n=rt();return Ye.NodeBase=class{constructor(e){Object.defineProperty(this,t.NODE_TYPE,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(s,{mapAsMap:r,maxAliasCount:i,onAnchor:o,reviver:a}={}){if(!t.isDocument(s))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:s,keep:!0,mapAsMap:!0===r,mapKeyWarned:!1,maxAliasCount:"number"==typeof i?i:100},u=n.toJS(this,"",c);if("function"==typeof o)for(const{count:e,res:t}of c.anchors.values())o(t,e);return"function"==typeof a?e.applyReviver(a,{"":u},"",u):u}},Ye}function ot(){if(nt)return Ze;nt=1;var e=Ve(),t=Ke(),n=ze(),s=it(),r=rt();let i=class extends s.NodeBase{constructor(e){super(n.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,s){let r,i;s?.aliasResolveCache?r=s.aliasResolveCache:(r=[],t.visit(e,{Node:(e,t)=>{(n.isAlias(t)||n.hasAnchor(t))&&r.push(t)}}),s&&(s.aliasResolveCache=r));for(const e of r){if(e===this)break;e.anchor===this.source&&(i=e)}return i}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:s,maxAliasCount:i}=t,a=this.resolve(s,t);if(!a){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let c=n.get(a);if(c||(r.toJS(a,null,t),c=n.get(a)),void 0===c?.res){throw new ReferenceError("This should not happen: Alias anchor was not resolved?")}if(i>=0&&(c.count+=1,0===c.aliasCount&&(c.aliasCount=o(s,a,n)),c.count*c.aliasCount>i)){throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return c.res}toString(t,n,s){const r=`*${this.source}`;if(t){if(e.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(t.implicitKey)return`${r} `}return r}};function o(e,t,s){if(n.isAlias(t)){const n=t.resolve(e),r=s&&n&&s.get(n);return r?r.count*r.aliasCount:0}if(n.isCollection(t)){let n=0;for(const r of t.items){const t=o(e,r,s);t>n&&(n=t)}return n}if(n.isPair(t)){const n=o(e,t.key,s),r=o(e,t.value,s);return Math.max(n,r)}return 1}return Ze.Alias=i,Ze}var at,ct,ut,lt={},ft={},pt={};function dt(){if(at)return pt;at=1;var e=ze(),t=it(),n=rt();let s=class extends t.NodeBase{constructor(t){super(e.SCALAR),this.value=t}toJSON(e,t){return t?.keep?this.value:n.toJS(this.value,e,t)}toString(){return String(this.value)}};return s.BLOCK_FOLDED="BLOCK_FOLDED",s.BLOCK_LITERAL="BLOCK_LITERAL",s.PLAIN="PLAIN",s.QUOTE_DOUBLE="QUOTE_DOUBLE",s.QUOTE_SINGLE="QUOTE_SINGLE",pt.Scalar=s,pt.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e,pt}function ht(){if(ct)return ft;ct=1;var e=ot(),t=ze(),n=dt();return ft.createNode=function(s,r,i){if(t.isDocument(s)&&(s=s.contents),t.isNode(s))return s;if(t.isPair(s)){const e=i.schema[t.MAP].createNode?.(i.schema,null,i);return e.items.push(s),e}(s instanceof String||s instanceof Number||s instanceof Boolean||"undefined"!=typeof BigInt&&s instanceof BigInt)&&(s=s.valueOf());const{aliasDuplicateObjects:o,onAnchor:a,onTagObj:c,schema:u,sourceObjects:l}=i;let f;if(o&&s&&"object"==typeof s){if(f=l.get(s),f)return f.anchor??(f.anchor=a(s)),new e.Alias(f.anchor);f={anchor:null,node:null},l.set(s,f)}r?.startsWith("!!")&&(r="tag:yaml.org,2002:"+r.slice(2));let p=function(e,t,n){if(t){const e=n.filter(e=>e.tag===t),s=e.find(e=>!e.format)??e[0];if(!s)throw new Error(`Tag ${t} not found`);return s}return n.find(t=>t.identify?.(e)&&!t.format)}(s,r,u.tags);if(!p){if(s&&"function"==typeof s.toJSON&&(s=s.toJSON()),!s||"object"!=typeof s){const e=new n.Scalar(s);return f&&(f.node=e),e}p=s instanceof Map?u[t.MAP]:Symbol.iterator in Object(s)?u[t.SEQ]:u[t.MAP]}c&&(c(p),delete i.onTagObj);const d=p?.createNode?p.createNode(i.schema,s,i):"function"==typeof p?.nodeClass?.from?p.nodeClass.from(i.schema,s,i):new n.Scalar(s);return r?d.tag=r:p.default||(d.tag=p.tag),f&&(f.node=d),d},ft}function mt(){if(ut)return lt;ut=1;var e=ht(),t=ze(),n=it();function s(t,n,s){let r=s;for(let e=n.length-1;e>=0;--e){const t=n[e];if("number"==typeof t&&Number.isInteger(t)&&t>=0){const e=[];e[t]=r,r=e}else r=new Map([[t,r]])}return e.createNode(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const r=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;let i=class extends n.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(n=>t.isNode(n)||t.isPair(n)?n.clone(e):n),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(r(e))this.add(n);else{const[r,...i]=e,o=this.get(r,!0);if(t.isCollection(o))o.addIn(i,n);else{if(void 0!==o||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`);this.set(r,s(this.schema,i,n))}}}deleteIn(e){const[n,...s]=e;if(0===s.length)return this.delete(n);const r=this.get(n,!0);if(t.isCollection(r))return r.deleteIn(s);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${s}`)}getIn(e,n){const[s,...r]=e,i=this.get(s,!0);return 0===r.length?!n&&t.isScalar(i)?i.value:i:t.isCollection(i)?i.getIn(r,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!t.isPair(n))return!1;const s=n.value;return null==s||e&&t.isScalar(s)&&null==s.value&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){const[n,...s]=e;if(0===s.length)return this.has(n);const r=this.get(n,!0);return!!t.isCollection(r)&&r.hasIn(s)}setIn(e,n){const[r,...i]=e;if(0===i.length)this.set(r,n);else{const e=this.get(r,!0);if(t.isCollection(e))e.setIn(i,n);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`);this.set(r,s(this.schema,i,n))}}}};return lt.Collection=i,lt.collectionFromPath=s,lt.isEmptyPath=r,lt}var gt,yt={},bt={},vt={},_t={};function wt(){if(gt)return _t;gt=1;function e(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}return _t.indentComment=e,_t.lineComment=(t,n,s)=>t.endsWith("\n")?e(s,n):s.includes("\n")?"\n"+e(s,n):(t.endsWith(" ")?"":" ")+s,_t.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#"),_t}var St,kt,At,Et,xt={},Ot={};function $t(){if(St)return Ot;St=1;const e="block",t="quoted";function n(e,t,n){let s=t,r=t+1,i=e[r];for(;" "===i||"\t"===i;)if(t<r+n)i=e[++t];else{do{i=e[++t]}while(i&&"\n"!==i);s=t,r=t+1,i=e[r]}return s}return Ot.FOLD_BLOCK=e,Ot.FOLD_FLOW="flow",Ot.FOLD_QUOTED=t,Ot.foldFlowLines=function(s,r,i="flow",{indentAtStart:o,lineWidth:a=80,minContentWidth:c=20,onFold:u,onOverflow:l}={}){if(!a||a<0)return s;a<c&&(c=0);const f=Math.max(1+c,1+a-r.length);if(s.length<=f)return s;const p=[],d={};let h,m,g=a-r.length;"number"==typeof o&&(o>a-Math.max(2,c)?p.push(0):g=a-o);let y=!1,b=-1,v=-1,_=-1;i===e&&(b=n(s,b,r.length),-1!==b&&(g=b+f));for(let o;o=s[b+=1];){if(i===t&&"\\"===o){switch(v=b,s[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}_=b}if("\n"===o)i===e&&(b=n(s,b,r.length)),g=b+r.length+f,h=void 0;else{if(" "===o&&m&&" "!==m&&"\n"!==m&&"\t"!==m){const e=s[b+1];e&&" "!==e&&"\n"!==e&&"\t"!==e&&(h=b)}if(b>=g)if(h)p.push(h),g=h+f,h=void 0;else if(i===t){for(;" "===m||"\t"===m;)m=o,o=s[b+=1],y=!0;const e=b>_+1?b-2:v-1;if(d[e])return s;p.push(e),d[e]=!0,g=e+f,h=void 0}else y=!0}m=o}if(y&&l&&l(),0===p.length)return s;u&&u();let w=s.slice(0,p[0]);for(let e=0;e<p.length;++e){const n=p[e],o=p[e+1]||s.length;0===n?w=`\n${r}${s.slice(0,o)}`:(i===t&&d[n]&&(w+=`${s[n]}\\`),w+=`\n${r}${s.slice(n+1,o)}`)}return w},Ot}function Tt(){if(kt)return xt;kt=1;var e=dt(),t=$t();const n=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),s=e=>/^(%|---|\.\.\.)/m.test(e);function r(e,r){const i=JSON.stringify(e);if(r.options.doubleQuotedAsJSON)return i;const{implicitKey:o}=r,a=r.options.doubleQuotedMinMultiLineLength,c=r.indent||(s(e)?" ":"");let u="",l=0;for(let e=0,t=i[e];t;t=i[++e])if(" "===t&&"\\"===i[e+1]&&"n"===i[e+2]&&(u+=i.slice(l,e)+"\\ ",e+=1,l=e,t="\\"),"\\"===t)switch(i[e+1]){case"u":{u+=i.slice(l,e);const t=i.substr(e+2,4);switch(t){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:"00"===t.substr(0,2)?u+="\\x"+t.substr(2):u+=i.substr(e,6)}e+=5,l=e+1}break;case"n":if(o||'"'===i[e+2]||i.length<a)e+=1;else{for(u+=i.slice(l,e)+"\n\n";"\\"===i[e+2]&&"n"===i[e+3]&&'"'!==i[e+4];)u+="\n",e+=2;u+=c," "===i[e+2]&&(u+="\\"),e+=1,l=e+1}break;default:e+=1}return u=l?u+i.slice(l):i,o?u:t.foldFlowLines(u,c,t.FOLD_QUOTED,n(r,!1))}function i(e,i){if(!1===i.options.singleQuote||i.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return r(e,i);const o=i.indent||(s(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${o}`)+"'";return i.implicitKey?a:t.foldFlowLines(a,o,t.FOLD_FLOW,n(i,!1))}function o(e,t){const{singleQuote:n}=t.options;let s;if(!1===n)s=r;else{const t=e.includes('"'),o=e.includes("'");s=t&&!o?i:o&&!t?r:n?i:r}return s(e,t)}let a;try{a=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{a=/\n+(?!\n|$)/g}function c({comment:r,type:i,value:c},u,l,f){const{blockQuote:p,commentString:d,lineWidth:h}=u.options;if(!p||/\n[\t ]+$/.test(c))return o(c,u);const m=u.indent||(u.forceBlockIndent||s(c)?" ":""),g="literal"===p||"folded"!==p&&i!==e.Scalar.BLOCK_FOLDED&&(i===e.Scalar.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;const s=t-n,r=e.length;if(r<=s)return!1;for(let t=0,n=0;t<r;++t)if("\n"===e[t]){if(t-n>s)return!0;if(n=t+1,r-n<=s)return!1}return!0}(c,h,m.length));if(!c)return g?"|\n":">\n";let y,b;for(b=c.length;b>0;--b){const e=c[b-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let v=c.substring(b);const _=v.indexOf("\n");-1===_?y="-":c===v||_!==v.length-1?(y="+",f&&f()):y="",v&&(c=c.slice(0,-v.length),"\n"===v[v.length-1]&&(v=v.slice(0,-1)),v=v.replace(a,`$&${m}`));let w,S=!1,k=-1;for(w=0;w<c.length;++w){const e=c[w];if(" "===e)S=!0;else{if("\n"!==e)break;k=w}}let A=c.substring(0,k<w?k+1:w);A&&(c=c.substring(A.length),A=A.replace(/\n+/g,`$&${m}`));let E=(S?m?"2":"1":"")+y;if(r&&(E+=" "+d(r.replace(/ ?[\r\n]+/g," ")),l&&l()),!g){const s=c.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${m}`);let r=!1;const o=n(u,!0);"folded"!==p&&i!==e.Scalar.BLOCK_FOLDED&&(o.onOverflow=()=>{r=!0});const a=t.foldFlowLines(`${A}${s}${v}`,m,t.FOLD_BLOCK,o);if(!r)return`>${E}\n${m}${a}`}return`|${E}\n${m}${A}${c=c.replace(/\n+/g,`$&${m}`)}${v}`}return xt.stringifyString=function(a,u,l,f){const{implicitKey:p,inFlow:d}=u,h="string"==typeof a.value?a:Object.assign({},a,{value:String(a.value)});let{type:m}=a;m!==e.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(h.value)&&(m=e.Scalar.QUOTE_DOUBLE);const g=a=>{switch(a){case e.Scalar.BLOCK_FOLDED:case e.Scalar.BLOCK_LITERAL:return p||d?o(h.value,u):c(h,u,l,f);case e.Scalar.QUOTE_DOUBLE:return r(h.value,u);case e.Scalar.QUOTE_SINGLE:return i(h.value,u);case e.Scalar.PLAIN:return function(r,i,a,u){const{type:l,value:f}=r,{actualString:p,implicitKey:d,indent:h,indentStep:m,inFlow:g}=i;if(d&&f.includes("\n")||g&&/[[\]{},]/.test(f))return o(f,i);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(f))return d||g||!f.includes("\n")?o(f,i):c(r,i,a,u);if(!d&&!g&&l!==e.Scalar.PLAIN&&f.includes("\n"))return c(r,i,a,u);if(s(f)){if(""===h)return i.forceBlockIndent=!0,c(r,i,a,u);if(d&&h===m)return o(f,i)}const y=f.replace(/\n+/g,`$&\n${h}`);if(p){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(y),{compat:t,tags:n}=i.doc.schema;if(n.some(e)||t?.some(e))return o(f,i)}return d?y:t.foldFlowLines(y,h,t.FOLD_FLOW,n(i,!1))}(h,u,l,f);default:return null}};let y=g(m);if(null===y){const{defaultKeyType:e,defaultStringType:t}=u.options,n=p&&e||t;if(y=g(n),null===y)throw new Error(`Unsupported default string type ${n}`)}return y},xt}function Nt(){if(At)return vt;At=1;var e=Ve(),t=ze(),n=wt(),s=Tt();return vt.createStringifyContext=function(e,t){const s=Object.assign({blockQuote:!0,commentString:n.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let r;switch(s.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:s.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof s.indent?" ".repeat(s.indent):" ",inFlow:r,options:s}},vt.stringify=function(n,r,i,o){if(t.isPair(n))return n.toString(r,i,o);if(t.isAlias(n)){if(r.doc.directives)return n.toString(r);if(r.resolvedAliases?.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");r.resolvedAliases?r.resolvedAliases.add(n):r.resolvedAliases=new Set([n]),n=n.resolve(r.doc)}let a;const c=t.isNode(n)?n:r.doc.createNode(n,{onTagObj:e=>a=e});a??(a=function(e,n){if(n.tag){const t=e.filter(e=>e.tag===n.tag);if(t.length>0)return t.find(e=>e.format===n.format)??t[0]}let s,r;if(t.isScalar(n)){r=n.value;let t=e.filter(e=>e.identify?.(r));if(t.length>1){const e=t.filter(e=>e.test);e.length>0&&(t=e)}s=t.find(e=>e.format===n.format)??t.find(e=>!e.format)}else r=n,s=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!s)throw new Error(`Tag not resolved for ${r?.constructor?.name??(null===r?"null":typeof r)} value`);return s}(r.doc.schema.tags,c));const u=function(n,s,{anchors:r,doc:i}){if(!i.directives)return"";const o=[],a=(t.isScalar(n)||t.isCollection(n))&&n.anchor;a&&e.anchorIsValid(a)&&(r.add(a),o.push(`&${a}`));const c=n.tag??(s.default?null:s.tag);return c&&o.push(i.directives.tagString(c)),o.join(" ")}(c,a,r);u.length>0&&(r.indentAtStart=(r.indentAtStart??0)+u.length+1);const l="function"==typeof a.stringify?a.stringify(c,r,i,o):t.isScalar(c)?s.stringifyString(c,r,i,o):c.toString(r,i,o);return u?t.isScalar(c)||"{"===l[0]||"["===l[0]?`${u} ${l}`:`${u}\n${r.indent}${l}`:l},vt}function Rt(){if(Et)return bt;Et=1;var e=ze(),t=dt(),n=Nt(),s=wt();return bt.stringifyPair=function({key:r,value:i},o,a,c){const{allNullValues:u,doc:l,indent:f,indentStep:p,options:{commentString:d,indentSeq:h,simpleKeys:m}}=o;let g=e.isNode(r)&&r.comment||null;if(m){if(g)throw new Error("With simple keys, key nodes cannot have comments");if(e.isCollection(r)||!e.isNode(r)&&"object"==typeof r){throw new Error("With simple keys, collection cannot be used as a key value")}}let y=!m&&(!r||g&&null==i&&!o.inFlow||e.isCollection(r)||(e.isScalar(r)?r.type===t.Scalar.BLOCK_FOLDED||r.type===t.Scalar.BLOCK_LITERAL:"object"==typeof r));o=Object.assign({},o,{allNullValues:!1,implicitKey:!y&&(m||!u),indent:f+p});let b,v,_,w=!1,S=!1,k=n.stringify(r,o,()=>w=!0,()=>S=!0);if(!y&&!o.inFlow&&k.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(o.inFlow){if(u||null==i)return w&&a&&a(),""===k?"?":y?`? ${k}`:k}else if(u&&!m||null==i&&y)return k=`? ${k}`,g&&!w?k+=s.lineComment(k,o.indent,d(g)):S&&c&&c(),k;w&&(g=null),y?(g&&(k+=s.lineComment(k,o.indent,d(g))),k=`? ${k}\n${f}:`):(k=`${k}:`,g&&(k+=s.lineComment(k,o.indent,d(g)))),e.isNode(i)?(b=!!i.spaceBefore,v=i.commentBefore,_=i.comment):(b=!1,v=null,_=null,i&&"object"==typeof i&&(i=l.createNode(i))),o.implicitKey=!1,y||g||!e.isScalar(i)||(o.indentAtStart=k.length+1),S=!1,h||!(p.length>=2)||o.inFlow||y||!e.isSeq(i)||i.flow||i.tag||i.anchor||(o.indent=o.indent.substring(2));let A=!1;const E=n.stringify(i,o,()=>A=!0,()=>S=!0);let x=" ";if(g||b||v){if(x=b?"\n":"",v){const e=d(v);x+=`\n${s.indentComment(e,o.indent)}`}""!==E||o.inFlow?x+=`\n${o.indent}`:"\n"===x&&_&&(x="\n\n")}else if(!y&&e.isCollection(i)){const e=E[0],t=E.indexOf("\n"),n=-1!==t,s=o.inFlow??i.flow??0===i.items.length;if(n||!s){let s=!1;if(n&&("&"===e||"!"===e)){let n=E.indexOf(" ");"&"===e&&-1!==n&&n<t&&"!"===E[n+1]&&(n=E.indexOf(" ",n+1)),(-1===n||t<n)&&(s=!0)}s||(x=`\n${o.indent}`)}}else""!==E&&"\n"!==E[0]||(x="");return k+=x+E,o.inFlow?A&&a&&a():_&&!A?k+=s.lineComment(k,o.indent,d(_)):S&&c&&c(),k},bt}var Ct,Pt={},Lt={};function It(){if(Ct)return Lt;Ct=1;var e=S;return Lt.debug=function(e,...t){"debug"===e&&console.log(...t)},Lt.warn=function(t,n){"debug"!==t&&"warn"!==t||("function"==typeof e.emitWarning?e.emitWarning(n):console.warn(n))},Lt}var Mt,Dt,jt,zt={};function Ft(){if(Mt)return zt;Mt=1;var e=ze(),t=dt();const n="<<",s={identify:e=>e===n||"symbol"==typeof e&&e.description===n,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new t.Scalar(Symbol(n)),{addToJSMap:r}),stringify:()=>n};function r(t,n,s){if(s=t&&e.isAlias(s)?s.resolve(t.doc):s,e.isSeq(s))for(const e of s.items)i(t,n,e);else if(Array.isArray(s))for(const e of s)i(t,n,e);else i(t,n,s)}function i(t,n,s){const r=t&&e.isAlias(s)?s.resolve(t.doc):s;if(!e.isMap(r))throw new Error("Merge sources must be maps or map aliases");const i=r.toJSON(null,t,Map);for(const[e,t]of i)n instanceof Map?n.has(e)||n.set(e,t):n instanceof Set?n.add(e):Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(n,e,{value:t,writable:!0,enumerable:!0,configurable:!0});return n}return zt.addMergeToJSMap=r,zt.isMergeKey=(n,r)=>(s.identify(r)||e.isScalar(r)&&(!r.type||r.type===t.Scalar.PLAIN)&&s.identify(r.value))&&n?.doc.schema.tags.some(e=>e.tag===s.tag&&e.default),zt.merge=s,zt}function Ht(){if(Dt)return Pt;Dt=1;var e=It(),t=Ft(),n=Nt(),s=ze(),r=rt();return Pt.addPairToJSMap=function(i,o,{key:a,value:c}){if(s.isNode(a)&&a.addToJSMap)a.addToJSMap(i,o,c);else if(t.isMergeKey(i,a))t.addMergeToJSMap(i,o,c);else{const t=r.toJS(a,"",i);if(o instanceof Map)o.set(t,r.toJS(c,t,i));else if(o instanceof Set)o.add(t);else{const u=function(t,r,i){if(null===r)return"";if("object"!=typeof r)return String(r);if(s.isNode(t)&&i?.doc){const s=n.createStringifyContext(i.doc,{});s.anchors=new Set;for(const e of i.anchors.keys())s.anchors.add(e.anchor);s.inFlow=!0,s.inStringifyKey=!0;const r=t.toString(s);if(!i.mapKeyWarned){let t=JSON.stringify(r);t.length>40&&(t=t.substring(0,36)+'..."'),e.warn(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${t}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return r}return JSON.stringify(r)}(a,t,i),l=r.toJS(c,u,i);u in o?Object.defineProperty(o,u,{value:l,writable:!0,enumerable:!0,configurable:!0}):o[u]=l}}return o},Pt}function Bt(){if(jt)return yt;jt=1;var e=ht(),t=Rt(),n=Ht(),s=ze();let r=class e{constructor(e,t=null){Object.defineProperty(this,s.NODE_TYPE,{value:s.PAIR}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return s.isNode(n)&&(n=n.clone(t)),s.isNode(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){const s=t?.mapAsMap?new Map:{};return n.addPairToJSMap(t,s,this)}toString(e,n,s){return e?.doc?t.stringifyPair(this,e,n,s):JSON.stringify(this)}};return yt.Pair=r,yt.createPair=function(t,n,s){const i=e.createNode(t,void 0,s),o=e.createNode(n,void 0,s);return new r(i,o)},yt}var Kt,Ut,Wt,qt={},Zt={},Gt={},Vt={};function Jt(){if(Kt)return Vt;Kt=1;var e=ze(),t=Nt(),n=wt();function s({comment:s,items:r},o,{blockItemPrefix:a,flowChars:c,itemIndent:u,onChompKeep:l,onComment:f}){const{indent:p,options:{commentString:d}}=o,h=Object.assign({},o,{indent:u,type:null});let m=!1;const g=[];for(let s=0;s<r.length;++s){const c=r[s];let l=null;if(e.isNode(c))!m&&c.spaceBefore&&g.push(""),i(o,g,c.commentBefore,m),c.comment&&(l=c.comment);else if(e.isPair(c)){const t=e.isNode(c.key)?c.key:null;t&&(!m&&t.spaceBefore&&g.push(""),i(o,g,t.commentBefore,m))}m=!1;let f=t.stringify(c,h,()=>l=null,()=>m=!0);l&&(f+=n.lineComment(f,u,d(l))),m&&l&&(m=!1),g.push(a+f)}let y;if(0===g.length)y=c.start+c.end;else{y=g[0];for(let e=1;e<g.length;++e){const t=g[e];y+=t?`\n${p}${t}`:"\n"}}return s?(y+="\n"+n.indentComment(d(s),p),f&&f()):m&&l&&l(),y}function r({items:s},r,{flowChars:o,itemIndent:a}){const{indent:c,indentStep:u,flowCollectionPadding:l,options:{commentString:f}}=r;a+=u;const p=Object.assign({},r,{indent:a,inFlow:!0,type:null});let d=!1,h=0;const m=[];for(let o=0;o<s.length;++o){const c=s[o];let u=null;if(e.isNode(c))c.spaceBefore&&m.push(""),i(r,m,c.commentBefore,!1),c.comment&&(u=c.comment);else if(e.isPair(c)){const t=e.isNode(c.key)?c.key:null;t&&(t.spaceBefore&&m.push(""),i(r,m,t.commentBefore,!1),t.comment&&(d=!0));const n=e.isNode(c.value)?c.value:null;n?(n.comment&&(u=n.comment),n.commentBefore&&(d=!0)):null==c.value&&t?.comment&&(u=t.comment)}u&&(d=!0);let l=t.stringify(c,p,()=>u=null);o<s.length-1&&(l+=","),u&&(l+=n.lineComment(l,a,f(u))),!d&&(m.length>h||l.includes("\n"))&&(d=!0),m.push(l),h=m.length}const{start:g,end:y}=o;if(0===m.length)return g+y;if(!d){const e=m.reduce((e,t)=>e+t.length+2,2);d=r.options.lineWidth>0&&e>r.options.lineWidth}if(d){let e=g;for(const t of m)e+=t?`\n${u}${c}${t}`:"\n";return`${e}\n${c}${y}`}return`${g}${l}${m.join(" ")}${l}${y}`}function i({indent:e,options:{commentString:t}},s,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){const i=n.indentComment(t(r),e);s.push(i.trimStart())}}return Vt.stringifyCollection=function(e,t,n){return(t.inFlow??e.flow?r:s)(e,t,n)},Vt}function Yt(){if(Ut)return Gt;Ut=1;var e=Jt(),t=Ht(),n=mt(),s=ze(),r=Bt(),i=dt();function o(e,t){const n=s.isScalar(t)?t.value:t;for(const r of e)if(s.isPair(r)){if(r.key===t||r.key===n)return r;if(s.isScalar(r.key)&&r.key.value===n)return r}}let a=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(s.MAP,e),this.items=[]}static from(e,t,n){const{keepUndefined:s,replacer:i}=n,o=new this(e),a=(e,a)=>{if("function"==typeof i)a=i.call(t,e,a);else if(Array.isArray(i)&&!i.includes(e))return;(void 0!==a||s)&&o.items.push(r.createPair(e,a,n))};if(t instanceof Map)for(const[e,n]of t)a(e,n);else if(t&&"object"==typeof t)for(const e of Object.keys(t))a(e,t[e]);return"function"==typeof e.sortMapEntries&&o.items.sort(e.sortMapEntries),o}add(e,t){let n;n=s.isPair(e)?e:e&&"object"==typeof e&&"key"in e?new r.Pair(e.key,e.value):new r.Pair(e,e?.value);const a=o(this.items,n.key),c=this.schema?.sortMapEntries;if(a){if(!t)throw new Error(`Key ${n.key} already set`);s.isScalar(a.value)&&i.isScalarValue(n.value)?a.value.value=n.value:a.value=n.value}else if(c){const e=this.items.findIndex(e=>c(n,e)<0);-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){const t=o(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=o(this.items,e),r=n?.value;return(!t&&s.isScalar(r)?r.value:r)??void 0}has(e){return!!o(this.items,e)}set(e,t){this.add(new r.Pair(e,t),!0)}toJSON(e,n,s){const r=s?new s:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(r);for(const e of this.items)t.addPairToJSMap(n,r,e);return r}toString(t,n,r){if(!t)return JSON.stringify(this);for(const e of this.items)if(!s.isPair(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),e.stringifyCollection(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:n})}};return Gt.YAMLMap=a,Gt.findPair=o,Gt}function Qt(){if(Wt)return Zt;Wt=1;var e=ze(),t=Yt();const n={collection:"map",default:!0,nodeClass:t.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:(t,n)=>(e.isMap(t)||n("Expected a mapping for this tag"),t),createNode:(e,n,s)=>t.YAMLMap.from(e,n,s)};return Zt.map=n,Zt}var Xt,en,tn={},nn={};function sn(){if(Xt)return nn;Xt=1;var e=ht(),t=Jt(),n=mt(),s=ze(),r=dt(),i=rt();let o=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(s.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=a(e);if("number"!=typeof t)return!1;return this.items.splice(t,1).length>0}get(e,t){const n=a(e);if("number"!=typeof n)return;const r=this.items[n];return!t&&s.isScalar(r)?r.value:r}has(e){const t=a(e);return"number"==typeof t&&t<this.items.length}set(e,t){const n=a(e);if("number"!=typeof n)throw new Error(`Expected a valid index, not ${e}.`);const i=this.items[n];s.isScalar(i)&&r.isScalarValue(t)?i.value=t:this.items[n]=t}toJSON(e,t){const n=[];t?.onCreate&&t.onCreate(n);let s=0;for(const e of this.items)n.push(i.toJS(e,String(s++),t));return n}toString(e,n,s){return e?t.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:n}):JSON.stringify(this)}static from(t,n,s){const{replacer:r}=s,i=new this(t);if(n&&Symbol.iterator in Object(n)){let t=0;for(let o of n){if("function"==typeof r){const e=n instanceof Set?o:String(t++);o=r.call(n,e,o)}i.items.push(e.createNode(o,void 0,s))}}return i}};function a(e){let t=s.isScalar(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}return nn.YAMLSeq=o,nn}function rn(){if(en)return tn;en=1;var e=ze(),t=sn();const n={collection:"seq",default:!0,nodeClass:t.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:(t,n)=>(e.isSeq(t)||n("Expected a sequence for this tag"),t),createNode:(e,n,s)=>t.YAMLSeq.from(e,n,s)};return tn.seq=n,tn}var on,an={};function cn(){if(on)return an;on=1;var e=Tt();const t={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(t,n,s,r)=>(n=Object.assign({actualString:!0},n),e.stringifyString(t,n,s,r))};return an.string=t,an}var un,ln={},fn={};function pn(){if(un)return fn;un=1;var e=dt();const t={identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new e.Scalar(null),stringify:({source:e},n)=>"string"==typeof e&&t.test.test(e)?e:n.options.nullStr};return fn.nullTag=t,fn}var dn,hn={};function mn(){if(dn)return hn;dn=1;var e=dt();const t={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new e.Scalar("t"===t[0]||"T"===t[0]),stringify({source:e,value:n},s){if(e&&t.test.test(e)){if(n===("t"===e[0]||"T"===e[0]))return e}return n?s.options.trueStr:s.options.falseStr}};return hn.boolTag=t,hn}var gn,yn,bn={},vn={};function _n(){if(gn)return vn;return gn=1,vn.stringifyNumber=function({format:e,minFractionDigits:t,tag:n,value:s}){if("bigint"==typeof s)return String(s);const r="number"==typeof s?s:Number(s);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let i=Object.is(s,-0)?"-0":JSON.stringify(s);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(i)){let e=i.indexOf(".");e<0&&(e=i.length,i+=".");let n=t-(i.length-e-1);for(;n-- >0;)i+="0"}return i},vn}function wn(){if(yn)return bn;yn=1;var e=dt(),t=_n();const n={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]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:t.stringifyNumber},s={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){const n=Number(e.value);return isFinite(n)?n.toExponential():t.stringifyNumber(e)}},r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const n=new e.Scalar(parseFloat(t)),s=t.indexOf(".");return-1!==s&&"0"===t[t.length-1]&&(n.minFractionDigits=t.length-s-1),n},stringify:t.stringifyNumber};return bn.float=r,bn.floatExp=s,bn.floatNaN=n,bn}var Sn,kn={};function An(){if(Sn)return kn;Sn=1;var e=_n();const t=e=>"bigint"==typeof e||Number.isInteger(e),n=(e,t,n,{intAsBigInt:s})=>s?BigInt(e):parseInt(e.substring(t),n);function s(n,s,r){const{value:i}=n;return t(i)&&i>=0?r+i.toString(s):e.stringifyNumber(n)}const r={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,s)=>n(e,2,8,s),stringify:e=>s(e,8,"0o")},i={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,s)=>n(e,0,10,s),stringify:e.stringifyNumber},o={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,s)=>n(e,2,16,s),stringify:e=>s(e,16,"0x")};return kn.int=i,kn.intHex=o,kn.intOct=r,kn}var En,xn={};function On(){if(En)return xn;En=1;var e=Qt(),t=pn(),n=rn(),s=cn(),r=mn(),i=wn(),o=An();const a=[e.map,n.seq,s.string,t.nullTag,r.boolTag,o.intOct,o.int,o.intHex,i.floatNaN,i.floatExp,i.float];return xn.schema=a,xn}var $n,Tn={};function Nn(){if($n)return Tn;$n=1;var e=dt(),t=Qt(),n=rn();function s(e){return"bigint"==typeof e||Number.isInteger(e)}const r=({value:e})=>JSON.stringify(e),i=[{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:r},{identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:r},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:r},{identify:s,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>s(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:r}],o={default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)},a=[t.map,n.seq].concat(i,o);return Tn.schema=a,Tn}var Rn,Cn={};function Pn(){if(Rn)return Cn;Rn=1;var e=k,t=dt(),n=Tt();const s={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,n){if("function"==typeof e.Buffer)return e.Buffer.from(t,"base64");if("function"==typeof atob){const e=atob(t.replace(/[\n\r]/g,"")),n=new Uint8Array(e.length);for(let t=0;t<e.length;++t)n[t]=e.charCodeAt(t);return n}return n("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:s,type:r,value:i},o,a,c){if(!i)return"";const u=i;let l;if("function"==typeof e.Buffer)l=u instanceof e.Buffer?u.toString("base64"):e.Buffer.from(u.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<u.length;++t)e+=String.fromCharCode(u[t]);l=btoa(e)}}if(r??(r=t.Scalar.BLOCK_LITERAL),r!==t.Scalar.QUOTE_DOUBLE){const e=Math.max(o.options.lineWidth-o.indent.length,o.options.minContentWidth),n=Math.ceil(l.length/e),s=new Array(n);for(let t=0,r=0;t<n;++t,r+=e)s[t]=l.substr(r,e);l=s.join(r===t.Scalar.BLOCK_LITERAL?"\n":" ")}return n.stringifyString({comment:s,type:r,value:l},o,a,c)}};return Cn.binary=s,Cn}var Ln,In,Mn={},Dn={};function jn(){if(Ln)return Dn;Ln=1;var e=ze(),t=Bt(),n=dt(),s=sn();function r(s,r){if(e.isSeq(s))for(let i=0;i<s.items.length;++i){let o=s.items[i];if(!e.isPair(o)){if(e.isMap(o)){o.items.length>1&&r("Each pair must have its own sequence indicator");const e=o.items[0]||new t.Pair(new n.Scalar(null));if(o.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${o.commentBefore}\n${e.key.commentBefore}`:o.commentBefore),o.comment){const t=e.value??e.key;t.comment=t.comment?`${o.comment}\n${t.comment}`:o.comment}o=e}s.items[i]=e.isPair(o)?o:new t.Pair(o)}}else r("Expected a sequence for this tag");return s}function i(e,n,r){const{replacer:i}=r,o=new s.YAMLSeq(e);o.tag="tag:yaml.org,2002:pairs";let a=0;if(n&&Symbol.iterator in Object(n))for(let e of n){let s,c;if("function"==typeof i&&(e=i.call(n,String(a++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);s=e[0],c=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);s=t[0],c=e[s]}else s=e;o.items.push(t.createPair(s,c,r))}return o}const o={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:r,createNode:i};return Dn.createPairs=i,Dn.pairs=o,Dn.resolvePairs=r,Dn}function zn(){if(In)return Mn;In=1;var e=ze(),t=rt(),n=Yt(),s=sn(),r=jn();class i extends s.YAMLSeq{constructor(){super(),this.add=n.YAMLMap.prototype.add.bind(this),this.delete=n.YAMLMap.prototype.delete.bind(this),this.get=n.YAMLMap.prototype.get.bind(this),this.has=n.YAMLMap.prototype.has.bind(this),this.set=n.YAMLMap.prototype.set.bind(this),this.tag=i.tag}toJSON(n,s){if(!s)return super.toJSON(n);const r=new Map;s?.onCreate&&s.onCreate(r);for(const n of this.items){let i,o;if(e.isPair(n)?(i=t.toJS(n.key,"",s),o=t.toJS(n.value,i,s)):i=t.toJS(n,"",s),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,o)}return r}static from(e,t,n){const s=r.createPairs(e,t,n),i=new this;return i.items=s.items,i}}i.tag="tag:yaml.org,2002:omap";const o={collection:"seq",identify:e=>e instanceof Map,nodeClass:i,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,n){const s=r.resolvePairs(t,n),o=[];for(const{key:t}of s.items)e.isScalar(t)&&(o.includes(t.value)?n(`Ordered maps must not include duplicate keys: ${t.value}`):o.push(t.value));return Object.assign(new i,s)},createNode:(e,t,n)=>i.from(e,t,n)};return Mn.YAMLOMap=i,Mn.omap=o,Mn}var Fn,Hn={},Bn={};function Kn(){if(Fn)return Bn;Fn=1;var e=dt();function t({value:e,source:t},r){return t&&(e?n:s).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}const n={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new e.Scalar(!0),stringify:t},s={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new e.Scalar(!1),stringify:t};return Bn.falseTag=s,Bn.trueTag=n,Bn}var Un,Wn={};function qn(){if(Un)return Wn;Un=1;var e=dt(),t=_n();const n={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]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:t.stringifyNumber},s={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){const n=Number(e.value);return isFinite(n)?n.toExponential():t.stringifyNumber(e)}},r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const n=new e.Scalar(parseFloat(t.replace(/_/g,""))),s=t.indexOf(".");if(-1!==s){const e=t.substring(s+1).replace(/_/g,"");"0"===e[e.length-1]&&(n.minFractionDigits=e.length)}return n},stringify:t.stringifyNumber};return Wn.float=r,Wn.floatExp=s,Wn.floatNaN=n,Wn}var Zn,Gn={};var Vn,Jn={};function Yn(){if(Vn)return Jn;Vn=1;var e=ze(),t=Bt(),n=Yt();class s extends n.YAMLMap{constructor(e){super(e),this.tag=s.tag}add(s){let r;r=e.isPair(s)?s:s&&"object"==typeof s&&"key"in s&&"value"in s&&null===s.value?new t.Pair(s.key,null):new t.Pair(s,null);n.findPair(this.items,r.key)||this.items.push(r)}get(t,s){const r=n.findPair(this.items,t);return!s&&e.isPair(r)?e.isScalar(r.key)?r.key.value:r.key:r}set(e,s){if("boolean"!=typeof s)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof s);const r=n.findPair(this.items,e);r&&!s?this.items.splice(this.items.indexOf(r),1):!r&&s&&this.items.push(new t.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,n,s){const{replacer:r}=s,i=new this(e);if(n&&Symbol.iterator in Object(n))for(let e of n)"function"==typeof r&&(e=r.call(n,e,e)),i.items.push(t.createPair(e,null,s));return i}}s.tag="tag:yaml.org,2002:set";const r={collection:"map",identify:e=>e instanceof Set,nodeClass:s,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>s.from(e,t,n),resolve(t,n){if(e.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new s,t);n("Set items must all have null values")}else n("Expected a mapping for this tag");return t}};return Jn.YAMLSet=s,Jn.set=r,Jn}var Qn,Xn,es,ts,ns={};function ss(){if(Qn)return ns;Qn=1;var e=_n();function t(e,t){const n=e[0],s="-"===n||"+"===n?e.substring(1):e,r=e=>t?BigInt(e):Number(e),i=s.replace(/_/g,"").split(":").reduce((e,t)=>e*r(60)+r(t),r(0));return"-"===n?r(-1)*i:i}function n(t){let{value:n}=t,s=e=>e;if("bigint"==typeof n)s=e=>BigInt(e);else if(isNaN(n)||!isFinite(n))return e.stringifyNumber(t);let r="";n<0&&(r="-",n*=s(-1));const i=s(60),o=[n%i];return n<60?o.unshift(0):(n=(n-o[0])/i,o.unshift(n%i),n>=60&&(n=(n-o[0])/i,o.unshift(n))),r+o.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const s={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,n,{intAsBigInt:s})=>t(e,s),stringify:n},r={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>t(e,!1),stringify:n},i={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){const n=e.match(i.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,s,r,o,a,c,u]=n.map(Number),l=n[7]?Number((n[7]+"00").substr(1,3)):0;let f=Date.UTC(s,r-1,o,a||0,c||0,u||0,l);const p=n[8];if(p&&"Z"!==p){let e=t(p,!1);Math.abs(e)<30&&(e*=60),f-=6e4*e}return new Date(f)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};return ns.floatTime=r,ns.intTime=s,ns.timestamp=i,ns}function rs(){if(Xn)return Hn;Xn=1;var e=Qt(),t=pn(),n=rn(),s=cn(),r=Pn(),i=Kn(),o=qn(),a=function(){if(Zn)return Gn;Zn=1;var e=_n();const t=e=>"bigint"==typeof e||Number.isInteger(e);function n(e,t,n,{intAsBigInt:s}){const r=e[0];if("-"!==r&&"+"!==r||(t+=1),e=e.substring(t).replace(/_/g,""),s){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===r?BigInt(-1)*t:t}const i=parseInt(e,n);return"-"===r?-1*i:i}function s(n,s,r){const{value:i}=n;if(t(i)){const e=i.toString(s);return i<0?"-"+r+e.substr(1):r+e}return e.stringifyNumber(n)}const r={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,s)=>n(e,2,2,s),stringify:e=>s(e,2,"0b")},i={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,s)=>n(e,1,8,s),stringify:e=>s(e,8,"0")},o={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,s)=>n(e,0,10,s),stringify:e.stringifyNumber},a={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,s)=>n(e,2,16,s),stringify:e=>s(e,16,"0x")};return Gn.int=o,Gn.intBin=r,Gn.intHex=a,Gn.intOct=i,Gn}(),c=Ft(),u=zn(),l=jn(),f=Yn(),p=ss();const d=[e.map,n.seq,s.string,t.nullTag,i.trueTag,i.falseTag,a.intBin,a.intOct,a.int,a.intHex,o.floatNaN,o.floatExp,o.float,r.binary,c.merge,u.omap,l.pairs,f.set,p.intTime,p.floatTime,p.timestamp];return Hn.schema=d,Hn}function is(){if(es)return ln;es=1;var e=Qt(),t=pn(),n=rn(),s=cn(),r=mn(),i=wn(),o=An(),a=On(),c=Nn(),u=Pn(),l=Ft(),f=zn(),p=jn(),d=rs(),h=Yn(),m=ss();const g=new Map([["core",a.schema],["failsafe",[e.map,n.seq,s.string]],["json",c.schema],["yaml11",d.schema],["yaml-1.1",d.schema]]),y={binary:u.binary,bool:r.boolTag,float:i.float,floatExp:i.floatExp,floatNaN:i.floatNaN,floatTime:m.floatTime,int:o.int,intHex:o.intHex,intOct:o.intOct,intTime:m.intTime,map:e.map,merge:l.merge,null:t.nullTag,omap:f.omap,pairs:p.pairs,seq:n.seq,set:h.set,timestamp:m.timestamp},b={"tag:yaml.org,2002:binary":u.binary,"tag:yaml.org,2002:merge":l.merge,"tag:yaml.org,2002:omap":f.omap,"tag:yaml.org,2002:pairs":p.pairs,"tag:yaml.org,2002:set":h.set,"tag:yaml.org,2002:timestamp":m.timestamp};return ln.coreKnownTags=b,ln.getTags=function(e,t,n){const s=g.get(t);if(s&&!e)return n&&!s.includes(l.merge)?s.concat(l.merge):s.slice();let r=s;if(!r){if(!Array.isArray(e)){const e=Array.from(g.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}r=[]}if(Array.isArray(e))for(const t of e)r=r.concat(t);else"function"==typeof e&&(r=e(r.slice()));return n&&(r=r.concat(l.merge)),r.reduce((e,t)=>{const n="string"==typeof t?y[t]:t;if(!n){const e=JSON.stringify(t),n=Object.keys(y).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])},ln}function os(){if(ts)return qt;ts=1;var e=ze(),t=Qt(),n=rn(),s=cn(),r=is();const i=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;return qt.Schema=class o{constructor({compat:o,customTags:a,merge:c,resolveKnownTags:u,schema:l,sortMapEntries:f,toStringDefaults:p}){this.compat=Array.isArray(o)?r.getTags(o,"compat"):o?r.getTags(null,o):null,this.name="string"==typeof l&&l||"core",this.knownTags=u?r.coreKnownTags:{},this.tags=r.getTags(a,this.name,c),this.toStringOptions=p??null,Object.defineProperty(this,e.MAP,{value:t.map}),Object.defineProperty(this,e.SCALAR,{value:s.string}),Object.defineProperty(this,e.SEQ,{value:n.seq}),this.sortMapEntries="function"==typeof f?f:!0===f?i:null}clone(){const e=Object.create(o.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}},qt}var as,cs,us={};function ls(){if(as)return us;as=1;var e=ze(),t=Nt(),n=wt();return us.stringifyDocument=function(s,r){const i=[];let o=!0===r.directives;if(!1!==r.directives&&s.directives){const e=s.directives.toString(s);e?(i.push(e),o=!0):s.directives.docStart&&(o=!0)}o&&i.push("---");const a=t.createStringifyContext(s,r),{commentString:c}=a.options;if(s.commentBefore){1!==i.length&&i.unshift("");const e=c(s.commentBefore);i.unshift(n.indentComment(e,""))}let u=!1,l=null;if(s.contents){if(e.isNode(s.contents)){if(s.contents.spaceBefore&&o&&i.push(""),s.contents.commentBefore){const e=c(s.contents.commentBefore);i.push(n.indentComment(e,""))}a.forceBlockIndent=!!s.comment,l=s.contents.comment}const r=l?void 0:()=>u=!0;let f=t.stringify(s.contents,a,()=>l=null,r);l&&(f+=n.lineComment(f,"",c(l))),"|"!==f[0]&&">"!==f[0]||"---"!==i[i.length-1]?i.push(f):i[i.length-1]=`--- ${f}`}else i.push(t.stringify(s.contents,a));if(s.directives?.docEnd)if(s.comment){const e=c(s.comment);e.includes("\n")?(i.push("..."),i.push(n.indentComment(e,""))):i.push(`... ${e}`)}else i.push("...");else{let e=s.comment;e&&u&&(e=e.replace(/^\n+/,"")),e&&(u&&!l||""===i[i.length-1]||i.push(""),i.push(n.indentComment(c(e),"")))}return i.join("\n")+"\n"},us}function fs(){if(cs)return qe;cs=1;var e=ot(),t=mt(),n=ze(),s=Bt(),r=rt(),i=os(),o=ls(),a=Ve(),c=Xe(),u=ht(),l=Ue();function f(e){if(n.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}return qe.Document=class p{constructor(e,t,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,n.NODE_TYPE,{value:n.DOC});let r=null;"function"==typeof t||Array.isArray(t)?r=t:void 0===s&&t&&(s=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=i;let{version:o}=i;s?._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new l.Directives({version:o}),this.setSchema(o,s),this.contents=void 0===e?null:this.createNode(e,r,s)}clone(){const e=Object.create(p.prototype,{[n.NODE_TYPE]:{value:n.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=n.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){f(this.contents)&&this.contents.add(e)}addIn(e,t){f(this.contents)&&this.contents.addIn(e,t)}createAlias(t,n){if(!t.anchor){const e=a.anchorNames(this);t.anchor=!n||e.has(n)?a.findNewAnchor(n||"a",e):n}return new e.Alias(t.anchor)}createNode(e,t,s){let r;if("function"==typeof t)e=t.call({"":e},"",e),r=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,n=t.filter(e).map(String);n.length>0&&(t=t.concat(n)),r=t}else void 0===s&&t&&(s=t,t=void 0);const{aliasDuplicateObjects:i,anchorPrefix:o,flow:c,keepUndefined:l,onTagObj:f,tag:p}=s??{},{onAnchor:d,setAnchors:h,sourceObjects:m}=a.createNodeAnchors(this,o||"a"),g={aliasDuplicateObjects:i??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:f,replacer:r,schema:this.schema,sourceObjects:m},y=u.createNode(e,p,g);return c&&n.isCollection(y)&&(y.flow=!0),h(),y}createPair(e,t,n={}){const r=this.createNode(e,null,n),i=this.createNode(t,null,n);return new s.Pair(r,i)}delete(e){return!!f(this.contents)&&this.contents.delete(e)}deleteIn(e){return t.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):!!f(this.contents)&&this.contents.deleteIn(e)}get(e,t){return n.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,s){return t.isEmptyPath(e)?!s&&n.isScalar(this.contents)?this.contents.value:this.contents:n.isCollection(this.contents)?this.contents.getIn(e,s):void 0}has(e){return!!n.isCollection(this.contents)&&this.contents.has(e)}hasIn(e){return t.isEmptyPath(e)?void 0!==this.contents:!!n.isCollection(this.contents)&&this.contents.hasIn(e)}set(e,n){null==this.contents?this.contents=t.collectionFromPath(this.schema,[e],n):f(this.contents)&&this.contents.set(e,n)}setIn(e,n){t.isEmptyPath(e)?this.contents=n:null==this.contents?this.contents=t.collectionFromPath(this.schema,Array.from(e),n):f(this.contents)&&this.contents.setIn(e,n)}setSchema(e,t={}){let n;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new l.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new l.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const t=JSON.stringify(e);throw new 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(!n)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new i.Schema(Object.assign(n,t))}}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:s,onAnchor:i,reviver:o}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof s?s:100},u=r.toJS(this.contents,t??"",a);if("function"==typeof i)for(const{count:e,res:t}of a.anchors.values())i(t,e);return"function"==typeof o?c.applyReviver(o,{"":u},"",u):u}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return o.stringifyDocument(this,e)}},qe}var ps,ds={};function hs(){if(ps)return ds;ps=1;class e extends Error{constructor(e,t,n,s){super(),this.name=e,this.code=n,this.message=s,this.pos=t}}return ds.YAMLError=e,ds.YAMLParseError=class extends e{constructor(e,t,n){super("YAMLParseError",e,t,n)}},ds.YAMLWarning=class extends e{constructor(e,t,n){super("YAMLWarning",e,t,n)}},ds.prettifyError=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map(e=>t.linePos(e));const{line:s,col:r}=n.linePos[0];n.message+=` at line ${s}, column ${r}`;let i=r-1,o=e.substring(t.lineStarts[s-1],t.lineStarts[s]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){const e=Math.min(i-39,o.length-79);o="…"+o.substring(e),i-=e-1}if(o.length>80&&(o=o.substring(0,79)+"…"),s>1&&/^ *$/.test(o.substring(0,i))){let n=e.substring(t.lineStarts[s-2],t.lineStarts[s-1]);n.length>80&&(n=n.substring(0,79)+"…\n"),o=n+o}if(/[^ ]/.test(o)){let e=1;const t=n.linePos[1];t?.line===s&&t.col>r&&(e=Math.max(1,Math.min(t.col-r,80-i)));const a=" ".repeat(i)+"^".repeat(e);n.message+=`:\n\n${o}\n${a}\n`}},ds}var ms,gs={},ys={},bs={},vs={},_s={};function ws(){if(ms)return _s;return ms=1,_s.resolveProps=function(e,{flow:t,indicator:n,next:s,offset:r,onError:i,parentIndent:o,startOnNewline:a}){let c=!1,u=a,l=a,f="",p="",d=!1,h=!1,m=null,g=null,y=null,b=null,v=null,_=null,w=null;for(const r of e)switch(h&&("space"!==r.type&&"newline"!==r.type&&"comma"!==r.type&&i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),m&&(u&&"comment"!==r.type&&"newline"!==r.type&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),r.type){case"space":t||"doc-start"===n&&"flow-collection"===s?.type||!r.source.includes("\t")||(m=r),l=!0;break;case"comment":{l||i(r,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=r.source.substring(1)||" ";f?f+=p+e:f=e,p="",u=!1;break}case"newline":u?f?f+=r.source:_&&"seq-item-ind"===n||(c=!0):p+=r.source,u=!0,d=!0,(g||y)&&(b=r),l=!0;break;case"anchor":g&&i(r,"MULTIPLE_ANCHORS","A node can have at most one anchor"),r.source.endsWith(":")&&i(r.offset+r.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=r,w??(w=r.offset),u=!1,l=!1,h=!0;break;case"tag":y&&i(r,"MULTIPLE_TAGS","A node can have at most one tag"),y=r,w??(w=r.offset),u=!1,l=!1,h=!0;break;case n:(g||y)&&i(r,"BAD_PROP_ORDER",`Anchors and tags must be after the ${r.source} indicator`),_&&i(r,"UNEXPECTED_TOKEN",`Unexpected ${r.source} in ${t??"collection"}`),_=r,u="seq-item-ind"===n||"explicit-key-ind"===n,l=!1;break;case"comma":if(t){v&&i(r,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),v=r,u=!1,l=!1;break}default:i(r,"UNEXPECTED_TOKEN",`Unexpected ${r.type} token`),u=!1,l=!1}const S=e[e.length-1],k=S?S.offset+S.source.length:r;return h&&s&&"space"!==s.type&&"newline"!==s.type&&"comma"!==s.type&&("scalar"!==s.type||""!==s.source)&&i(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(u&&m.indent<=o||"block-map"===s?.type||"block-seq"===s?.type)&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:_,spaceBefore:c,comment:f,hasNewline:d,anchor:g,tag:y,newlineAfterProp:b,end:k,start:w??k}},_s}var Ss,ks={};function As(){if(Ss)return ks;return Ss=1,ks.containsNewline=function e(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes("\n"))return!0;if(t.end)for(const e of t.end)if("newline"===e.type)return!0;return!1;case"flow-collection":for(const n of t.items){for(const e of n.start)if("newline"===e.type)return!0;if(n.sep)for(const e of n.sep)if("newline"===e.type)return!0;if(e(n.key)||e(n.value))return!0}return!1;default:return!0}},ks}var Es,xs={};function Os(){if(Es)return xs;Es=1;var e=As();return xs.flowIndentCheck=function(t,n,s){if("flow-collection"===n?.type){const r=n.end[0];if(r.indent===t&&("]"===r.source||"}"===r.source)&&e.containsNewline(n)){s(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}},xs}var $s,Ts,Ns={};function Rs(){if($s)return Ns;$s=1;var e=ze();return Ns.mapIncludes=function(t,n,s){const{uniqueKeys:r}=t.options;if(!1===r)return!1;const i="function"==typeof r?r:(t,n)=>t===n||e.isScalar(t)&&e.isScalar(n)&&t.value===n.value;return n.some(e=>i(e.key,s))},Ns}function Cs(){if(Ts)return vs;Ts=1;var e=Bt(),t=Yt(),n=ws(),s=As(),r=Os(),i=Rs();const o="All mapping items must start at the same column";return vs.resolveBlockMap=function({composeNode:a,composeEmptyNode:c},u,l,f,p){const d=new(p?.nodeClass??t.YAMLMap)(u.schema);u.atRoot&&(u.atRoot=!1);let h=l.offset,m=null;for(const t of l.items){const{start:p,key:g,sep:y,value:b}=t,v=n.resolveProps(p,{indicator:"explicit-key-ind",next:g??y?.[0],offset:h,onError:f,parentIndent:l.indent,startOnNewline:!0}),_=!v.found;if(_){if(g&&("block-seq"===g.type?f(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in g&&g.indent!==l.indent&&f(h,"BAD_INDENT",o)),!v.anchor&&!v.tag&&!y){m=v.end,v.comment&&(d.comment?d.comment+="\n"+v.comment:d.comment=v.comment);continue}(v.newlineAfterProp||s.containsNewline(g))&&f(g??p[p.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else v.found?.indent!==l.indent&&f(h,"BAD_INDENT",o);u.atKey=!0;const w=v.end,S=g?a(u,g,v,f):c(u,w,p,null,v,f);u.schema.compat&&r.flowIndentCheck(l.indent,g,f),u.atKey=!1,i.mapIncludes(u,d.items,S)&&f(w,"DUPLICATE_KEY","Map keys must be unique");const k=n.resolveProps(y??[],{indicator:"map-value-ind",next:b,offset:S.range[2],onError:f,parentIndent:l.indent,startOnNewline:!g||"block-scalar"===g.type});if(h=k.end,k.found){_&&("block-map"!==b?.type||k.hasNewline||f(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),u.options.strict&&v.start<k.found.offset-1024&&f(S.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const n=b?a(u,b,k,f):c(u,h,y,null,k,f);u.schema.compat&&r.flowIndentCheck(l.indent,b,f),h=n.range[2];const s=new e.Pair(S,n);u.options.keepSourceTokens&&(s.srcToken=t),d.items.push(s)}else{_&&f(S.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),k.comment&&(S.comment?S.comment+="\n"+k.comment:S.comment=k.comment);const n=new e.Pair(S);u.options.keepSourceTokens&&(n.srcToken=t),d.items.push(n)}}return m&&m<h&&f(m,"IMPOSSIBLE","Map comment with trailing content"),d.range=[l.offset,h,m??h],d},vs}var Ps,Ls={};function Is(){if(Ps)return Ls;Ps=1;var e=sn(),t=ws(),n=Os();return Ls.resolveBlockSeq=function({composeNode:s,composeEmptyNode:r},i,o,a,c){const u=new(c?.nodeClass??e.YAMLSeq)(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let l=o.offset,f=null;for(const{start:e,value:c}of o.items){const p=t.resolveProps(e,{indicator:"seq-item-ind",next:c,offset:l,onError:a,parentIndent:o.indent,startOnNewline:!0});if(!p.found){if(!(p.anchor||p.tag||c)){f=p.end,p.comment&&(u.comment=p.comment);continue}"block-seq"===c?.type?a(p.end,"BAD_INDENT","All sequence items must start at the same column"):a(l,"MISSING_CHAR","Sequence item without - indicator")}const d=c?s(i,c,p,a):r(i,p.end,e,null,p,a);i.schema.compat&&n.flowIndentCheck(o.indent,c,a),l=d.range[2],u.items.push(d)}return u.range=[o.offset,l,f??l],u},Ls}var Ms,Ds,js,zs={},Fs={};function Hs(){if(Ms)return Fs;return Ms=1,Fs.resolveEnd=function(e,t,n,s){let r="";if(e){let i=!1,o="";for(const a of e){const{source:e,type:c}=a;switch(c){case"space":i=!0;break;case"comment":{n&&!i&&s(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";r?r+=o+t:r=t,o="";break}case"newline":r&&(o+=e),i=!0;break;default:s(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=e.length}}return{comment:r,offset:t}},Fs}function Bs(){if(Ds)return zs;Ds=1;var e=ze(),t=Bt(),n=Yt(),s=sn(),r=Hs(),i=ws(),o=As(),a=Rs();const c="Block collections are not allowed within flow collections",u=e=>e&&("block-map"===e.type||"block-seq"===e.type);return zs.resolveFlowCollection=function({composeNode:l,composeEmptyNode:f},p,d,h,m){const g="{"===d.start.source,y=g?"flow map":"flow sequence",b=new(m?.nodeClass??(g?n.YAMLMap:s.YAMLSeq))(p.schema);b.flow=!0;const v=p.atRoot;v&&(p.atRoot=!1),p.atKey&&(p.atKey=!1);let _=d.offset+d.start.source.length;for(let s=0;s<d.items.length;++s){const r=d.items[s],{start:m,key:v,sep:w,value:S}=r,k=i.resolveProps(m,{flow:y,indicator:"explicit-key-ind",next:v??w?.[0],offset:_,onError:h,parentIndent:d.indent,startOnNewline:!1});if(!k.found){if(!(k.anchor||k.tag||w||S)){0===s&&k.comma?h(k.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`):s<d.items.length-1&&h(k.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${y}`),k.comment&&(b.comment?b.comment+="\n"+k.comment:b.comment=k.comment),_=k.end;continue}!g&&p.options.strict&&o.containsNewline(v)&&h(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===s)k.comma&&h(k.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`);else if(k.comma||h(k.start,"MISSING_CHAR",`Missing , between ${y} items`),k.comment){let t="";e:for(const e of m)switch(e.type){case"comma":case"space":break;case"comment":t=e.source.substring(1);break e;default:break e}if(t){let n=b.items[b.items.length-1];e.isPair(n)&&(n=n.value??n.key),n.comment?n.comment+="\n"+t:n.comment=t,k.comment=k.comment.substring(t.length+1)}}if(g||w||k.found){p.atKey=!0;const e=k.end,s=v?l(p,v,k,h):f(p,e,m,null,k,h);u(v)&&h(s.range,"BLOCK_IN_FLOW",c),p.atKey=!1;const o=i.resolveProps(w??[],{flow:y,indicator:"map-value-ind",next:S,offset:s.range[2],onError:h,parentIndent:d.indent,startOnNewline:!1});if(o.found){if(!g&&!k.found&&p.options.strict){if(w)for(const e of w){if(e===o.found)break;if("newline"===e.type){h(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}k.start<o.found.offset-1024&&h(o.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else S&&("source"in S&&":"===S.source?.[0]?h(S,"MISSING_CHAR",`Missing space after : in ${y}`):h(o.start,"MISSING_CHAR",`Missing , or : between ${y} items`));const A=S?l(p,S,o,h):o.found?f(p,o.end,w,null,o,h):null;A?u(S)&&h(A.range,"BLOCK_IN_FLOW",c):o.comment&&(s.comment?s.comment+="\n"+o.comment:s.comment=o.comment);const E=new t.Pair(s,A);if(p.options.keepSourceTokens&&(E.srcToken=r),g){const t=b;a.mapIncludes(p,t.items,s)&&h(e,"DUPLICATE_KEY","Map keys must be unique"),t.items.push(E)}else{const e=new n.YAMLMap(p.schema);e.flow=!0,e.items.push(E);const t=(A??s).range;e.range=[s.range[0],t[1],t[2]],b.items.push(e)}_=A?A.range[2]:o.end}else{const e=S?l(p,S,k,h):f(p,k.end,w,null,k,h);b.items.push(e),_=e.range[2],u(S)&&h(e.range,"BLOCK_IN_FLOW",c)}}const w=g?"}":"]",[S,...k]=d.end;let A=_;if(S?.source===w)A=S.offset+S.source.length;else{const e=y[0].toUpperCase()+y.substring(1);h(_,v?"MISSING_CHAR":"BAD_INDENT",v?`${e} must end with a ${w}`:`${e} in block collection must be sufficiently indented and end with a ${w}`),S&&1!==S.source.length&&k.unshift(S)}if(k.length>0){const e=r.resolveEnd(k,A,p.options.strict,h);e.comment&&(b.comment?b.comment+="\n"+e.comment:b.comment=e.comment),b.range=[d.offset,A,e.offset]}else b.range=[d.offset,A,A];return b},zs}function Ks(){if(js)return bs;js=1;var e=ze(),t=dt(),n=Yt(),s=sn(),r=Cs(),i=Is(),o=Bs();function a(e,t,n,s,a,c){const u="block-map"===n.type?r.resolveBlockMap(e,t,n,s,c):"block-seq"===n.type?i.resolveBlockSeq(e,t,n,s,c):o.resolveFlowCollection(e,t,n,s,c),l=u.constructor;return"!"===a||a===l.tagName?(u.tag=l.tagName,u):(a&&(u.tag=a),u)}return bs.composeCollection=function(r,i,o,c,u){const l=c.tag,f=l?i.directives.tagName(l.source,e=>u(l,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===o.type){const{anchor:e,newlineAfterProp:t}=c,n=e&&l?e.offset>l.offset?e:l:e??l;if(n&&(!t||t.offset<n.offset)){u(n,"MISSING_CHAR","Missing newline after block sequence props")}}const p="block-map"===o.type?"map":"block-seq"===o.type?"seq":"{"===o.start.source?"map":"seq";if(!l||!f||"!"===f||f===n.YAMLMap.tagName&&"map"===p||f===s.YAMLSeq.tagName&&"seq"===p)return a(r,i,o,u,f);let d=i.schema.tags.find(e=>e.tag===f&&e.collection===p);if(!d){const e=i.schema.knownTags[f];if(e?.collection!==p)return e?u(l,"BAD_COLLECTION_TYPE",`${e.tag} used for ${p} collection, but expects ${e.collection??"scalar"}`,!0):u(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${f}`,!0),a(r,i,o,u,f);i.schema.tags.push(Object.assign({},e,{default:!1})),d=e}const h=a(r,i,o,u,f,d),m=d.resolve?.(h,e=>u(l,"TAG_RESOLVE_FAILED",e),i.options)??h,g=e.isNode(m)?m:new t.Scalar(m);return g.range=h.range,g.tag=f,d?.format&&(g.format=d.format),g},bs}var Us,Ws={},qs={};function Zs(){if(Us)return qs;Us=1;var e=dt();return qs.resolveBlockScalar=function(t,n,s){const r=n.offset,i=function({offset:e,props:t},n,s){if("block-scalar-header"!==t[0].type)return s(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:r}=t[0],i=r[0];let o=0,a="",c=-1;for(let t=1;t<r.length;++t){const n=r[t];if(a||"-"!==n&&"+"!==n){const s=Number(n);!o&&s?o=s:-1===c&&(c=e+t)}else a=n}-1!==c&&s(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${r}`);let u=!1,l="",f=r.length;for(let e=1;e<t.length;++e){const r=t[e];switch(r.type){case"space":u=!0;case"newline":f+=r.source.length;break;case"comment":if(n&&!u){s(r,"MISSING_CHAR","Comments must be separated from other tokens by white space characters")}f+=r.source.length,l=r.source.substring(1);break;case"error":s(r,"UNEXPECTED_TOKEN",r.message),f+=r.source.length;break;default:{s(r,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${r.type}`);const e=r.source;e&&"string"==typeof e&&(f+=e.length)}}}return{mode:i,indent:o,chomp:a,comment:l,length:f}}(n,t.options.strict,s);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};const o=">"===i.mode?e.Scalar.BLOCK_FOLDED:e.Scalar.BLOCK_LITERAL,a=n.source?function(e){const t=e.split(/\n( *)/),n=t[0],s=n.match(/^( *)/),r=[s?.[1]?[s[1],n.slice(s[1].length)]:["",n]];for(let e=1;e<t.length;e+=2)r.push([t[e],t[e+1]]);return r}(n.source):[];let c=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(""!==t&&"\r"!==t)break;c=e}if(0===c){const e="+"===i.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let t=r+i.length;return n.source&&(t+=n.source.length),{value:e,type:o,comment:i.comment,range:[r,t,t]}}let u=n.indent+i.indent,l=n.offset+i.length,f=0;for(let e=0;e<c;++e){const[n,r]=a[e];if(""!==r&&"\r"!==r){if(n.length<u){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";s(l+n.length,"MISSING_CHAR",e)}if(0===i.indent&&(u=n.length),f=e,0===u&&!t.atRoot){s(l,"BAD_INDENT","Block scalar values in collections must be indented")}break}0===i.indent&&n.length>u&&(u=n.length),l+=n.length+r.length+1}for(let e=a.length-1;e>=c;--e)a[e][0].length>u&&(c=e+1);let p="",d="",h=!1;for(let e=0;e<f;++e)p+=a[e][0].slice(u)+"\n";for(let t=f;t<c;++t){let[n,r]=a[t];l+=n.length+r.length+1;const c="\r"===r[r.length-1];if(c&&(r=r.slice(0,-1)),r&&n.length<u){const e=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;s(l-r.length-(c?2:1),"BAD_INDENT",e),n=""}o===e.Scalar.BLOCK_LITERAL?(p+=d+n.slice(u)+r,d="\n"):n.length>u||"\t"===r[0]?(" "===d?d="\n":h||"\n"!==d||(d="\n\n"),p+=d+n.slice(u)+r,d="\n",h=!0):""===r?"\n"===d?p+="\n":d="\n":(p+=d+r,d=" ",h=!1)}switch(i.chomp){case"-":break;case"+":for(let e=c;e<a.length;++e)p+="\n"+a[e][0].slice(u);"\n"!==p[p.length-1]&&(p+="\n");break;default:p+="\n"}const m=r+i.length+n.source.length;return{value:p,type:o,comment:i.comment,range:[r,m,m]}},qs}var Gs,Vs,Js={};function Ys(){if(Gs)return Js;Gs=1;var e=dt(),t=Hs();function n(e){let t,n;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy"),n=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let s=t.exec(e);if(!s)return e;let r=s[1],i=" ",o=t.lastIndex;for(n.lastIndex=o;s=n.exec(e);)""===s[1]?"\n"===i?r+=i:i="\n":(r+=i+s[1],i=" "),o=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,s=a.exec(e),r+i+(s?.[1]??"")}function s(e,t){let n="",s=e[t+1];for(;!(" "!==s&&"\t"!==s&&"\n"!==s&&"\r"!==s||"\r"===s&&"\n"!==e[t+2]);)"\n"===s&&(n+="\n"),s=e[(t+=1)+1];return n||(n=" "),{fold:n,offset:t}}const r={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function i(e,t,n,s){const r=e.substr(t,n),i=r.length===n&&/^[0-9a-fA-F]+$/.test(r)?parseInt(r,16):NaN;if(isNaN(i)){const r=e.substr(t-2,n+2);return s(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${r}`),r}return String.fromCodePoint(i)}return Js.resolveFlowScalar=function(o,a,c){const{offset:u,type:l,source:f,end:p}=o;let d,h;const m=(e,t,n)=>c(u+e,t,n);switch(l){case"scalar":d=e.Scalar.PLAIN,h=function(e,t){let s="";switch(e[0]){case"\t":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]}`}s&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${s}`);return n(e)}(f,m);break;case"single-quoted-scalar":d=e.Scalar.QUOTE_SINGLE,h=function(e,t){"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote");return n(e.slice(1,-1)).replace(/''/g,"'")}(f,m);break;case"double-quoted-scalar":d=e.Scalar.QUOTE_DOUBLE,h=function(e,t){let n="";for(let o=1;o<e.length-1;++o){const a=e[o];if("\r"!==a||"\n"!==e[o+1])if("\n"===a){const{fold:t,offset:r}=s(e,o);n+=t,o=r}else if("\\"===a){let s=e[++o];const a=r[s];if(a)n+=a;else if("\n"===s)for(s=e[o+1];" "===s||"\t"===s;)s=e[1+ ++o];else if("\r"===s&&"\n"===e[o+1])for(s=e[1+ ++o];" "===s||"\t"===s;)s=e[1+ ++o];else if("x"===s||"u"===s||"U"===s){const r={x:2,u:4,U:8}[s];n+=i(e,o+1,r,t),o+=r}else{const s=e.substr(o-1,2);t(o-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),n+=s}}else if(" "===a||"\t"===a){const t=o;let s=e[o+1];for(;" "===s||"\t"===s;)s=e[1+ ++o];"\n"===s||"\r"===s&&"\n"===e[o+2]||(n+=o>t?e.slice(t,o+1):a)}else n+=a}'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote');return n}(f,m);break;default:return c(o,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[u,u+f.length,u+f.length]}}const g=u+f.length,y=t.resolveEnd(p,g,a,c);return{value:h,type:d,comment:y.comment,range:[u,g,y.offset]}},Js}function Qs(){if(Vs)return Ws;Vs=1;var e=ze(),t=dt(),n=Zs(),s=Ys();return Ws.composeScalar=function(r,i,o,a){const{value:c,type:u,comment:l,range:f}="block-scalar"===i.type?n.resolveBlockScalar(r,i,a):s.resolveFlowScalar(i,r.options.strict,a),p=o?r.directives.tagName(o.source,e=>a(o,"TAG_RESOLVE_FAILED",e)):null;let d,h;d=r.options.stringKeys&&r.atKey?r.schema[e.SCALAR]:p?function(t,n,s,r,i){if("!"===s)return t[e.SCALAR];const o=[];for(const e of t.tags)if(!e.collection&&e.tag===s){if(!e.default||!e.test)return e;o.push(e)}for(const e of o)if(e.test?.test(n))return e;const a=t.knownTags[s];if(a&&!a.collection)return t.tags.push(Object.assign({},a,{default:!1,test:void 0})),a;return i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,"tag:yaml.org,2002:str"!==s),t[e.SCALAR]}(r.schema,c,p,o,a):"scalar"===i.type?function({atKey:t,directives:n,schema:s},r,i,o){const a=s.tags.find(e=>(!0===e.default||t&&"key"===e.default)&&e.test?.test(r))||s[e.SCALAR];if(s.compat){const t=s.compat.find(e=>e.default&&e.test?.test(r))??s[e.SCALAR];if(a.tag!==t.tag){o(i,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${n.tagString(a.tag)} or ${n.tagString(t.tag)}`,!0)}}return a}(r,c,i,a):r.schema[e.SCALAR];try{const n=d.resolve(c,e=>a(o??i,"TAG_RESOLVE_FAILED",e),r.options);h=e.isScalar(n)?n:new t.Scalar(n)}catch(e){const n=e instanceof Error?e.message:String(e);a(o??i,"TAG_RESOLVE_FAILED",n),h=new t.Scalar(c)}return h.range=f,h.source=c,u&&(h.type=u),p&&(h.tag=p),d.format&&(h.format=d.format),l&&(h.comment=l),h},Ws}var Xs,er,tr,nr,sr={};function rr(){if(Xs)return sr;return Xs=1,sr.emptyScalarPosition=function(e,t,n){if(t){n??(n=t.length);for(let s=n-1;s>=0;--s){let n=t[s];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++s];"space"===n?.type;)e+=n.source.length,n=t[++s];break}}return e},sr}function ir(){if(er)return ys;er=1;var e=ot(),t=ze(),n=Ks(),s=Qs(),r=Hs(),i=rr();const o={composeNode:a,composeEmptyNode:c};function a(i,a,u,l){const f=i.atKey,{spaceBefore:p,comment:d,anchor:h,tag:m}=u;let g,y=!0;switch(a.type){case"alias":g=function({options:t},{offset:n,source:s,end:i},o){const a=new e.Alias(s.substring(1));""===a.source&&o(n,"BAD_ALIAS","Alias cannot be an empty string");a.source.endsWith(":")&&o(n+s.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=n+s.length,u=r.resolveEnd(i,c,t.strict,o);a.range=[n,c,u.offset],u.comment&&(a.comment=u.comment);return a}(i,a,l),(h||m)&&l(a,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":g=s.composeScalar(i,a,m,l),h&&(g.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":g=n.composeCollection(o,i,a,u,l),h&&(g.anchor=h.source.substring(1));break;default:l(a,"UNEXPECTED_TOKEN","error"===a.type?a.message:`Unsupported token (type: ${a.type})`),g=c(i,a.offset,void 0,null,u,l),y=!1}if(h&&""===g.anchor&&l(h,"BAD_ALIAS","Anchor cannot be an empty string"),f&&i.options.stringKeys&&(!t.isScalar(g)||"string"!=typeof g.value||g.tag&&"tag:yaml.org,2002:str"!==g.tag)){l(m??a,"NON_STRING_KEY","With stringKeys, all keys must be strings")}return p&&(g.spaceBefore=!0),d&&("scalar"===a.type&&""===a.source?g.comment=d:g.commentBefore=d),i.options.keepSourceTokens&&y&&(g.srcToken=a),g}function c(e,t,n,r,{spaceBefore:o,comment:a,anchor:c,tag:u,end:l},f){const p={type:"scalar",offset:i.emptyScalarPosition(t,n,r),indent:-1,source:""},d=s.composeScalar(e,p,u,f);return c&&(d.anchor=c.source.substring(1),""===d.anchor&&f(c,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(d.spaceBefore=!0),a&&(d.comment=a,d.range[2]=l),d}return ys.composeEmptyNode=c,ys.composeNode=a,ys}function or(){if(tr)return gs;tr=1;var e=fs(),t=ir(),n=Hs(),s=ws();return gs.composeDoc=function(r,i,{offset:o,start:a,value:c,end:u},l){const f=Object.assign({_directives:i},r),p=new e.Document(void 0,f),d={atKey:!1,atRoot:!0,directives:p.directives,options:p.options,schema:p.schema},h=s.resolveProps(a,{indicator:"doc-start",next:c??u?.[0],offset:o,onError:l,parentIndent:0,startOnNewline:!0});h.found&&(p.directives.docStart=!0,!c||"block-map"!==c.type&&"block-seq"!==c.type||h.hasNewline||l(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),p.contents=c?t.composeNode(d,c,h,l):t.composeEmptyNode(d,h.end,a,null,h,l);const m=p.contents.range[2],g=n.resolveEnd(u,m,!1,l);return g.comment&&(p.comment=g.comment),p.range=[o,m,g.offset],p},gs}function ar(){if(nr)return Me;nr=1;var e=S,t=Ue(),n=fs(),s=hs(),r=ze(),i=or(),o=Hs();function a(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+("string"==typeof n?n.length:1)]}function c(e){let t="",n=!1,s=!1;for(let r=0;r<e.length;++r){const i=e[r];switch(i[0]){case"#":t+=(""===t?"":s?"\n\n":"\n")+(i.substring(1)||" "),n=!0,s=!1;break;case"%":"#"!==e[r+1]?.[0]&&(r+=1),n=!1;break;default:n||(s=!0),n=!1}}return{comment:t,afterEmptyLine:s}}return Me.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{const i=a(e);r?this.warnings.push(new s.YAMLWarning(i,t,n)):this.errors.push(new s.YAMLParseError(i,t,n))},this.directives=new t.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:s}=c(this.prelude);if(n){const i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(s||e.directives.docStart||!i)e.commentBefore=n;else if(r.isCollection(i)&&!i.flow&&i.items.length>0){let e=i.items[0];r.isPair(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{const e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}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:c(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const t of e)yield*this.next(t);yield*this.end(t,n)}*next(t){switch(e.env.LOG_STREAM&&console.dir(t,{depth:null}),t.type){case"directive":this.directives.add(t.source,(e,n,s)=>{const r=a(t);r[0]+=e,this.onError(r,"BAD_DIRECTIVE",n,s)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const e=i.composeDoc(this.options,this.directives,t,this.onError);this.atDirectives&&!e.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(e,!1),this.doc&&(yield this.doc),this.doc=e,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const e=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,n=new s.YAMLParseError(a(t),"UNEXPECTED_TOKEN",e);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const e="Unexpected doc-end without preceding document";this.errors.push(new s.YAMLParseError(a(t),"UNEXPECTED_TOKEN",e));break}this.doc.directives.docEnd=!0;const e=o.resolveEnd(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),e.comment){const t=this.doc.comment;this.doc.comment=t?`${t}\n${e.comment}`:e.comment}this.doc.range[2]=e.offset;break}default:this.errors.push(new s.YAMLParseError(a(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),s=new n.Document(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,t,t],this.decorate(s,!1),yield s}}},Me}var cr,ur={},lr={};function fr(){if(cr)return lr;cr=1;var e=Zs(),t=Ys(),n=hs(),s=Tt();function r(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function i(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const s=e.props.slice(1);let r=t.length;"block-scalar-header"===e.props[0].type&&(r-=e.props[0].source.length);for(const e of s)e.offset+=r;delete e.props,Object.assign(e,{type:n,source:t,end:s});break}case"block-map":case"block-seq":{const s={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:n,source:t,end:[s]});break}default:{const s="indent"in e?e.indent:-1,r="end"in e&&Array.isArray(e.end)?e.end.filter(e=>"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:n,indent:s,source:t,end:r})}}}return lr.createScalarToken=function(e,t){const{implicitKey:n=!1,indent:i,inFlow:o=!1,offset:a=-1,type:c="PLAIN"}=t,u=s.stringifyString({type:c,value:e},{implicitKey:n,indent:i>0?" ".repeat(i):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:i,source:"\n"}];switch(u[0]){case"|":case">":{const e=u.indexOf("\n"),t=u.substring(0,e),n=u.substring(e+1)+"\n",s=[{type:"block-scalar-header",offset:a,indent:i,source:t}];return r(s,l)||s.push({type:"newline",offset:-1,indent:i,source:"\n"}),{type:"block-scalar",offset:a,indent:i,props:s,source:n}}case'"':return{type:"double-quoted-scalar",offset:a,indent:i,source:u,end:l};case"'":return{type:"single-quoted-scalar",offset:a,indent:i,source:u,end:l};default:return{type:"scalar",offset:a,indent:i,source:u,end:l}}},lr.resolveAsScalar=function(s,r=!0,i){if(s){const o=(e,t,s)=>{const r="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!i)throw new n.YAMLParseError([r,r+1],t,s);i(r,t,s)};switch(s.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return t.resolveFlowScalar(s,r,o);case"block-scalar":return e.resolveBlockScalar({options:{strict:r}},s,o)}}return null},lr.setScalarValue=function(e,t,n={}){let{afterKey:o=!1,implicitKey:a=!1,inFlow:c=!1,type:u}=n,l="indent"in e?e.indent:null;if(o&&"number"==typeof l&&(l+=2),!u)switch(e.type){case"single-quoted-scalar":u="QUOTE_SINGLE";break;case"double-quoted-scalar":u="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");u=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}const f=s.stringifyString({type:u,value:t},{implicitKey:a||null===l,indent:null!==l&&l>0?" ".repeat(l):"",inFlow:c,options:{blockQuote:!0,lineWidth:-1}});switch(f[0]){case"|":case">":!function(e,t){const n=t.indexOf("\n"),s=t.substring(0,n),i=t.substring(n+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=s,e.source=i}else{const{offset:t}=e,n="indent"in e?e.indent:-1,o=[{type:"block-scalar-header",offset:t,indent:n,source:s}];r(o,"end"in e?e.end:void 0)||o.push({type:"newline",offset:-1,indent:n,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:n,props:o,source:i})}}(e,f);break;case'"':i(e,f,"double-quoted-scalar");break;case"'":i(e,f,"single-quoted-scalar");break;default:i(e,f,"scalar")}},lr}var pr,dr={};function hr(){if(pr)return dr;pr=1;function e(n){switch(n.type){case"block-scalar":{let t="";for(const s of n.props)t+=e(s);return t+n.source}case"block-map":case"block-seq":{let e="";for(const s of n.items)e+=t(s);return e}case"flow-collection":{let e=n.start.source;for(const s of n.items)e+=t(s);for(const t of n.end)e+=t.source;return e}case"document":{let e=t(n);if(n.end)for(const t of n.end)e+=t.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(const t of n.end)e+=t.source;return e}}}function t({start:t,key:n,sep:s,value:r}){let i="";for(const e of t)i+=e.source;if(n&&(i+=e(n)),s)for(const e of s)i+=e.source;return r&&(i+=e(r)),i}return dr.stringify=n=>"type"in n?e(n):t(n),dr}var mr,gr,yr={};function br(){if(mr)return yr;mr=1;const e=Symbol("break visit"),t=Symbol("skip children"),n=Symbol("remove item");function s(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),r(Object.freeze([]),e,t)}function r(t,s,i){let o=i(s,t);if("symbol"==typeof o)return o;for(const a of["key","value"]){const c=s[a];if(c&&"items"in c){for(let s=0;s<c.items.length;++s){const o=r(Object.freeze(t.concat([[a,s]])),c.items[s],i);if("number"==typeof o)s=o-1;else{if(o===e)return e;o===n&&(c.items.splice(s,1),s-=1)}}"function"==typeof o&&"key"===a&&(o=o(s,t))}}return"function"==typeof o?o(s,t):o}return s.BREAK=e,s.SKIP=t,s.REMOVE=n,s.itemAtPath=(e,t)=>{let n=e;for(const[e,s]of t){const t=n?.[e];if(!t||!("items"in t))return;n=t.items[s]}return n},s.parentCollection=(e,t)=>{const n=s.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&"items"in i)return i;throw new Error("Parent collection not found")},yr.visit=s,yr}function vr(){if(gr)return ur;gr=1;var e=fr(),t=hr(),n=br();return ur.createScalarToken=e.createScalarToken,ur.resolveAsScalar=e.resolveAsScalar,ur.setScalarValue=e.setScalarValue,ur.stringify=t.stringify,ur.visit=n.visit,ur.BOM="\ufeff",ur.DOCUMENT="",ur.FLOW_END="",ur.SCALAR="",ur.isCollection=e=>!!e&&"items"in e,ur.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),ur.prettyToken=function(e){switch(e){case"\ufeff":return"<BOM>";case"":return"<DOC>";case"":return"<FLOW_END>";case"":return"<SCALAR>";default:return JSON.stringify(e)}},ur.tokenType=function(e){switch(e){case"\ufeff":return"byte-order-mark";case"":return"doc-mode";case"":return"flow-error-end";case"":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"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null},ur}var _r,wr={};function Sr(){if(_r)return wr;_r=1;var e=vr();function t(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const n=new Set("0123456789ABCDEFabcdef"),s=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),r=new Set(",[]{}"),i=new Set(" ,[]{}\n\r\t"),o=e=>!e||i.has(e);return wr.Lexer=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\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 n=this.buffer[e];if(this.indentNext>0){let t=0;for(;" "===n;)n=this.buffer[++t+e];if("\r"===n){const n=this.buffer[t+e+1];if("\n"===n||!n&&!this.atEnd)return e+t+1}return"\n"===n||t>=this.indentNext||!n&&!this.atEnd?e+t:-1}if("-"===n||"."===n){const n=this.buffer.substr(e,3);if(("---"===n||"..."===n)&&t(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(null===t)return this.setNext("stream");if(t[0]===e.BOM&&(yield*this.pushCount(1),t=t.substring(1)),"%"===t[0]){let e=t.length,n=t.indexOf("#");for(;-1!==n;){const s=t[n-1];if(" "===s||"\t"===s){e=n-1;break}n=t.indexOf("#",n+1)}for(;;){const n=t[e-1];if(" "!==n&&"\t"!==n)break;e-=1}const s=(yield*this.pushCount(e))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-s),this.pushNewline(),"stream"}if(this.atLineEnd()){const e=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-e),yield*this.pushNewline(),"stream"}return yield e.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){const 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");const e=this.peek(3);if(("---"===e||"..."===e)&&t(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!t(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&t(n)){const 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);const 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(o),"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 n,s,r=-1;do{n=yield*this.pushNewline(),n>0?(s=yield*this.pushSpaces(!1),this.indentValue=r=s):s=0,s+=(yield*this.pushSpaces(!0))}while(n+s>0);const i=this.getLine();if(null===i)return this.setNext("flow");if(-1!==r&&r<this.indentNext&&"#"!==i[0]||0===r&&(i.startsWith("---")||i.startsWith("..."))&&t(i[3])){if(!(r===this.indentNext-1&&1===this.flowLevel&&("]"===i[0]||"}"===i[0])))return this.flowLevel=0,yield e.FLOW_END,yield*this.parseLineStart()}let a=0;for(;","===i[a];)a+=(yield*this.pushCount(1)),a+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(a+=(yield*this.pushIndicators()),i[a]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-a),"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(o),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||t(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let 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)}const n=this.buffer.substring(0,t);let s=n.indexOf("\n",this.pos);if(-1!==s){for(;-1!==s;){const e=this.continueScalar(s+1);if(-1===e)break;s=n.indexOf("\n",e)}-1!==s&&(t=s-("\r"===n[s-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(;;){const t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil(e=>t(e)||"#"===e)}*parseBlockScalar(){let t,n=this.pos-1,s=0;e:for(let e=this.pos;t=this.buffer[e];++e)switch(t){case" ":s+=1;break;case"\n":n=e,s=0;break;case"\r":{const t=this.buffer[e+1];if(!t&&!this.atEnd)return this.setNext("block-scalar");if("\n"===t)break}default:break e}if(!t&&!this.atEnd)return this.setNext("block-scalar");if(s>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=s:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(n+1);if(-1===e)break;n=this.buffer.indexOf("\n",e)}while(-1!==n);if(-1===n){if(!this.atEnd)return this.setNext("block-scalar");n=this.buffer.length}}let r=n+1;for(t=this.buffer[r];" "===t;)t=this.buffer[++r];if("\t"===t){for(;"\t"===t||" "===t||"\r"===t||"\n"===t;)t=this.buffer[++r];n=r-1}else if(!this.blockScalarKeep)for(;;){let e=n-1,t=this.buffer[e];"\r"===t&&(t=this.buffer[--e]);const r=e;for(;" "===t;)t=this.buffer[--e];if(!("\n"===t&&e>=this.pos&&e+1+s>r))break;n=e}return yield e.SCALAR,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let s,i=this.pos-1,o=this.pos-1;for(;s=this.buffer[++o];)if(":"===s){const e=this.buffer[o+1];if(t(e)||n&&r.has(e))break;i=o}else if(t(s)){let e=this.buffer[o+1];if("\r"===s&&("\n"===e?(o+=1,s="\n",e=this.buffer[o+1]):i=o),"#"===e||n&&r.has(e))break;if("\n"===s){const e=this.continueScalar(o+1);if(-1===e)break;o=Math.max(o,e-2)}}else{if(n&&r.has(s))break;i=o}return s||this.atEnd?(yield e.SCALAR,yield*this.pushToIndex(i+1,!0),n?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.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(o))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(t(n)||e&&r.has(n))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,n=this.buffer[e];for(;!t(n)&&">"!==n;)n=this.buffer[++e];return yield*this.pushToIndex(">"===n?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(s.has(t))t=this.buffer[++e];else{if("%"!==t||!n.has(this.buffer[e+1])||!n.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const 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,n=this.pos-1;do{t=this.buffer[++n]}while(" "===t||e&&"\t"===t);const s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},wr}var kr,Ar={};function Er(){if(kr)return Ar;kr=1;return Ar.LineCounter=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){const s=t+n>>1;this.lineStarts[s]<e?t=s+1:n=s}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(0===t)return{line:0,col:e};return{line:t,col:e-this.lineStarts[t-1]+1}}}},Ar}var xr,Or={};function $r(){if(xr)return Or;xr=1;var e=S,t=vr(),n=Sr();function s(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function r(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 i(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 o(e){switch(e.type){case"document":return e.start;case"block-map":{const 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 a(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(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function c(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||s(t.start,"explicit-key-ind")||s(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,i(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)}return Or.Parser=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new n.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(n){if(this.source=n,e.env.LOG_TOKENS&&console.log("|",t.prettyToken(n)),this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=n.length);const s=t.tokenType(n);if(s)if("scalar"===s)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=s,yield*this.step(),s){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+n.length);break;case"space":this.atNewLine&&" "===n[0]&&(this.indent+=n.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=n.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=n.length}else{const e=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:e,source:n}),this.offset+=n.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(){const e=this.peek(1);if("doc-end"!==this.type||"doc-end"===e?.type){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()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const 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&&c(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const n=e.items[e.items.length-1];if(n.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!n.sep)return Object.assign(n,{key:t,sep:[]}),void(this.onKeyLine=!n.explicitKey);n.value=t;break}case"block-seq":{const n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{const n=e.items[e.items.length-1];return void(!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]}))}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)){const n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&-1===r(n.start)&&(0===t.indent||n.start.every(e=>"comment"!==e.type||e.indent<t.indent))&&("document"===e.type?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}else{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}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":return void(-1!==r(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const 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){const t=a(o(this.peek(2)));let n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);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){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const n="end"in t.value?t.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;"comment"===s?.type?n?.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)){const n=e.items[e.items.length-2],s=n?.value?.end;if(Array.isArray(s))return Array.prototype.push.apply(s,t.start),s.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let o=[];if(r&&t.sep&&!t.value){const n=[];for(let s=0;s<t.sep.length;++s){const r=t.sep[s];switch(r.type){case"newline":n.push(s);break;case"space":break;case"comment":r.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(o=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":return void(r||t.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?r||t.value?(o.push(this.sourceToken),e.items.push({start:o,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),void(this.onKeyLine=!0);case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(s(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(i(t.key)&&!s(t.sep,"newline")){const e=a(t.start),n=t.key,s=t.sep;s.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:n,sep:s}]})}else o.length>0?t.sep=t.sep.concat(o,this.sourceToken):t.sep.push(this.sourceToken);else if(s(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=a(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||r?e.items.push({start:o,key:null,sep:[this.sourceToken]}):s(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]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(r||t.value?(e.items.push({start:o,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0))}default:{const r=this.startBlockValue(e);if(r){if("block-seq"===r.type){if(!t.explicitKey&&t.sep&&!s(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else n&&e.items.push({start:o});return void this.stack.push(r)}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const n="end"in t.value?t.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;"comment"===s?.type?n?.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)){const n=e.items[e.items.length-2],s=n?.value?.end;if(Array.isArray(s))return Array.prototype.push.apply(s,t.start),s.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||s(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while("flow-collection"===e?.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!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]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const 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))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const n=a(o(t));c(e);const s=e.end.splice(1,e.end.length);s.push(this.sourceToken);const r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}}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;const t=a(o(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;const t=a(o(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())}}},Or}var Tr,Nr,Rr={};function Cr(){if(Tr)return Rr;Tr=1;var e=ar(),t=fs(),n=hs(),s=It(),r=ze(),i=Er(),o=$r();function a(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new i.LineCounter||null,prettyErrors:t}}function c(t,s={}){const{lineCounter:r,prettyErrors:i}=a(s),c=new o.Parser(r?.addNewLine),u=new e.Composer(s);let l=null;for(const e of u.compose(c.parse(t),!0,t.length))if(l){if("silent"!==l.options.logLevel){l.errors.push(new n.YAMLParseError(e.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else l=e;return i&&r&&(l.errors.forEach(n.prettifyError(t,r)),l.warnings.forEach(n.prettifyError(t,r))),l}return Rr.parse=function(e,t,n){let r;"function"==typeof t?r=t:void 0===n&&t&&"object"==typeof t&&(n=t);const i=c(e,n);if(!i)return null;if(i.warnings.forEach(e=>s.warn(i.options.logLevel,e)),i.errors.length>0){if("silent"!==i.options.logLevel)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))},Rr.parseAllDocuments=function(t,s={}){const{lineCounter:r,prettyErrors:i}=a(s),c=new o.Parser(r?.addNewLine),u=new e.Composer(s),l=Array.from(u.compose(c.parse(t)));if(i&&r)for(const e of l)e.errors.forEach(n.prettifyError(t,r)),e.warnings.forEach(n.prettifyError(t,r));return l.length>0?l:Object.assign([],{empty:!0},u.streamInfo())},Rr.parseDocument=c,Rr.stringify=function(e,n,s){let i=null;if("function"==typeof n||Array.isArray(n)?i=n:void 0===s&&n&&(s=n),"string"==typeof s&&(s=s.length),"number"==typeof s){const e=Math.round(s);s=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=s??n??{};if(!e)return}return r.isDocument(e)&&!i?e.toString(s):new t.Document(e,i,s).toString(s)},Rr}var Pr=function(){if(Nr)return Ie;Nr=1;var e=ar(),t=fs(),n=os(),s=hs(),r=ot(),i=ze(),o=Bt(),a=dt(),c=Yt(),u=sn(),l=vr(),f=Sr(),p=Er(),d=$r(),h=Cr(),m=Ke();return Ie.Composer=e.Composer,Ie.Document=t.Document,Ie.Schema=n.Schema,Ie.YAMLError=s.YAMLError,Ie.YAMLParseError=s.YAMLParseError,Ie.YAMLWarning=s.YAMLWarning,Ie.Alias=r.Alias,Ie.isAlias=i.isAlias,Ie.isCollection=i.isCollection,Ie.isDocument=i.isDocument,Ie.isMap=i.isMap,Ie.isNode=i.isNode,Ie.isPair=i.isPair,Ie.isScalar=i.isScalar,Ie.isSeq=i.isSeq,Ie.Pair=o.Pair,Ie.Scalar=a.Scalar,Ie.YAMLMap=c.YAMLMap,Ie.YAMLSeq=u.YAMLSeq,Ie.CST=l,Ie.Lexer=f.Lexer,Ie.LineCounter=p.LineCounter,Ie.Parser=d.Parser,Ie.parse=h.parse,Ie.parseAllDocuments=h.parseAllDocuments,Ie.parseDocument=h.parseDocument,Ie.stringify=h.stringify,Ie.visit=m.visit,Ie.visitAsync=m.visitAsync,Ie}(),Lr=q(Pr);function Ir(e,t,n){function s(n,s){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:s,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,s);const r=o.prototype,i=Object.keys(r);for(let e=0;e<i.length;e++){const t=i[e];t in n||(n[t]=r[t].bind(n))}}const r=n?.Parent??Object;class i extends r{}function o(e){var t;const r=n?.Parent?new i:this;s(r,e),(t=r._zod).deferred??(t.deferred=[]);for(const e of r._zod.deferred)e();return r}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(o,"init",{value:s}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}class Mr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Dr extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const jr={};function zr(e){return jr}function Fr(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function Hr(e,t){return"bigint"==typeof t?t.toString():t}function Br(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Kr(e){return null==e}function Ur(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const Wr=Symbol("evaluating");function qr(e,t,n){let s;Object.defineProperty(e,t,{get(){if(s!==Wr)return void 0===s&&(s=Wr,s=n()),s},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Zr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Gr(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Vr(e){return JSON.stringify(e)}const Jr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Yr(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const Qr=Br(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function Xr(e){if(!1===Yr(e))return!1;const t=e.constructor;if(void 0===t)return!0;if("function"!=typeof t)return!0;const n=t.prototype;return!1!==Yr(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function ei(e){return Xr(e)?{...e}:Array.isArray(e)?[...e]:e}const ti=new Set(["string","number","symbol"]);function ni(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function si(e,t,n){const s=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(s._zod.parent=e),s}function ri(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}const ii={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function oi(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function ai(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function ci(e){return"string"==typeof e?e:e?.message}function ui(e,t,n){const s={...e,path:e.path??[]};if(!e.message){const r=ci(e.inst?._zod.def?.error?.(e))??ci(t?.error?.(e))??ci(n.customError?.(e))??ci(n.localeError?.(e))??"Invalid input";s.message=r}return delete s.inst,delete s.continue,t?.reportInput||delete s.input,s}function li(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function fi(...e){const[t,n,s]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:s}:{...t}}const pi=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Hr,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},di=Ir("$ZodError",pi),hi=Ir("$ZodError",pi,{Parent:Error});const mi=e=>(t,n,s,r)=>{const i=s?Object.assign(s,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new Mr;if(o.issues.length){const t=new(r?.Err??e)(o.issues.map(e=>ui(e,i,zr())));throw Jr(t,r?.callee),t}return o.value},gi=e=>async(t,n,s,r)=>{const i=s?Object.assign(s,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise&&(o=await o),o.issues.length){const t=new(r?.Err??e)(o.issues.map(e=>ui(e,i,zr())));throw Jr(t,r?.callee),t}return o.value},yi=e=>(t,n,s)=>{const r=s?{...s,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new Mr;return i.issues.length?{success:!1,error:new(e??di)(i.issues.map(e=>ui(e,r,zr())))}:{success:!0,data:i.value}},bi=yi(hi),vi=e=>async(t,n,s)=>{const r=s?Object.assign(s,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(e=>ui(e,r,zr())))}:{success:!0,data:i.value}},_i=vi(hi),wi=e=>(t,n,s)=>{const r=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return mi(e)(t,n,r)},Si=e=>(t,n,s)=>mi(e)(t,n,s),ki=e=>async(t,n,s)=>{const r=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return gi(e)(t,n,r)},Ai=e=>async(t,n,s)=>gi(e)(t,n,s),Ei=e=>(t,n,s)=>{const r=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return yi(e)(t,n,r)},xi=e=>(t,n,s)=>yi(e)(t,n,s),Oi=e=>async(t,n,s)=>{const r=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return vi(e)(t,n,r)},$i=e=>async(t,n,s)=>vi(e)(t,n,s),Ti=/^[cC][^\s-]{8,}$/,Ni=/^[0-9a-z]+$/,Ri=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ci=/^[0-9a-vA-V]{20}$/,Pi=/^[A-Za-z0-9]{27}$/,Li=/^[a-zA-Z0-9_-]{21}$/,Ii=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Mi=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Di=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ji=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const zi=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Fi=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Hi=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Bi=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ki=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ui=/^[A-Za-z0-9_-]*$/,Wi=/^\+[1-9]\d{6,14}$/,qi="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Zi=new RegExp(`^${qi}$`);function Gi(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}const Vi=/^-?\d+$/,Ji=/^-?\d+(?:\.\d+)?$/,Yi=/^[^A-Z]*$/,Qi=/^[^a-z]*$/,Xi=Ir("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),eo={number:"number",bigint:"bigint",object:"date"},to=Ir("$ZodCheckLessThan",(e,t)=>{Xi.init(e,t);const n=eo[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,s=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=s=>{(t.inclusive?s.value<=t.value:s.value<t.value)||s.issues.push({origin:n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:s.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),no=Ir("$ZodCheckGreaterThan",(e,t)=>{Xi.init(e,t);const n=eo[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,s=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=s=>{(t.inclusive?s.value>=t.value:s.value>t.value)||s.issues.push({origin:n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:s.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),so=Ir("$ZodCheckMultipleOf",(e,t)=>{Xi.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){const n=(e.toString().split(".")[1]||"").length,s=t.toString();let r=(s.split(".")[1]||"").length;if(0===r&&/\d?e-\d?/.test(s)){const e=s.match(/\d?e-(\d?)/);e?.[1]&&(r=Number.parseInt(e[1]))}const i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ro=Ir("$ZodCheckNumberFormat",(e,t)=>{Xi.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),s=n?"int":"number",[r,i]=ii[t.format];e._zod.onattach.push(e=>{const s=e._zod.bag;s.format=t.format,s.minimum=r,s.maximum=i,n&&(s.pattern=Vi)}),e._zod.check=o=>{const a=o.value;if(n){if(!Number.isInteger(a))return void o.issues.push({expected:s,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?o.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!t.abort}):o.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!t.abort}))}a<r&&o.issues.push({origin:"number",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>i&&o.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),io=Ir("$ZodCheckMaxLength",(e,t)=>{var n;Xi.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Kr(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const s=n.value;if(s.length<=t.maximum)return;const r=li(s);n.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),oo=Ir("$ZodCheckMinLength",(e,t)=>{var n;Xi.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Kr(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const s=n.value;if(s.length>=t.minimum)return;const r=li(s);n.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),ao=Ir("$ZodCheckLengthEquals",(e,t)=>{var n;Xi.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Kr(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const s=n.value,r=s.length;if(r===t.length)return;const i=li(s),o=r>t.length;n.issues.push({origin:i,...o?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),co=Ir("$ZodCheckStringFormat",(e,t)=>{var n,s;Xi.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(s=e._zod).check??(s.check=()=>{})}),uo=Ir("$ZodCheckRegex",(e,t)=>{co.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),lo=Ir("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Yi),co.init(e,t)}),fo=Ir("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Qi),co.init(e,t)}),po=Ir("$ZodCheckIncludes",(e,t)=>{Xi.init(e,t);const n=ni(t.includes),s=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=s,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(s)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ho=Ir("$ZodCheckStartsWith",(e,t)=>{Xi.init(e,t);const n=new RegExp(`^${ni(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),mo=Ir("$ZodCheckEndsWith",(e,t)=>{Xi.init(e,t);const n=new RegExp(`.*${ni(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),go=Ir("$ZodCheckOverwrite",(e,t)=>{Xi.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class yo{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),s=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of s)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}const bo={major:4,minor:3,patch:6},vo=Ir("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=bo;const s=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&s.unshift(e);for(const t of s)for(const n of t._zod.onattach)n(e);if(0===s.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let s,r=oi(e);for(const i of t){if(i._zod.def.when){if(!i._zod.def.when(e))continue}else if(r)continue;const t=e.issues.length,o=i._zod.check(e);if(o instanceof Promise&&!1===n?.async)throw new Mr;if(s||o instanceof Promise)s=(s??Promise.resolve()).then(async()=>{await o;e.issues.length!==t&&(r||(r=oi(e,t)))});else{if(e.issues.length===t)continue;r||(r=oi(e,t))}}return s?s.then(()=>e):e},n=(n,r,i)=>{if(oi(n))return n.aborted=!0,n;const o=t(r,s,i);if(o instanceof Promise){if(!1===i.async)throw new Mr;return o.then(t=>e._zod.parse(t,i))}return e._zod.parse(o,i)};e._zod.run=(r,i)=>{if(i.skipChecks)return e._zod.parse(r,i);if("backward"===i.direction){const t=e._zod.parse({value:r.value,issues:[]},{...i,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,i)):n(t,r,i)}const o=e._zod.parse(r,i);if(o instanceof Promise){if(!1===i.async)throw new Mr;return o.then(e=>t(e,s,i))}return t(o,s,i)}}qr(e,"~standard",()=>({validate:t=>{try{const n=bi(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return _i(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),_o=Ir("$ZodString",(e,t)=>{var n;vo.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,new RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),e._zod.parse=(n,s)=>{if(t.coerce)try{n.value=String(n.value)}catch(s){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),wo=Ir("$ZodStringFormat",(e,t)=>{co.init(e,t),_o.init(e,t)}),So=Ir("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Mi),wo.init(e,t)}),ko=Ir("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Di(e))}else t.pattern??(t.pattern=Di());wo.init(e,t)}),Ao=Ir("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ji),wo.init(e,t)}),Eo=Ir("$ZodURL",(e,t)=>{wo.init(e,t),e._zod.check=n=>{try{const s=n.value.trim(),r=new URL(s);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=r.href:n.value=s)}catch(s){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),xo=Ir("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),wo.init(e,t)}),Oo=Ir("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Li),wo.init(e,t)}),$o=Ir("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ti),wo.init(e,t)}),To=Ir("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ni),wo.init(e,t)}),No=Ir("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ri),wo.init(e,t)}),Ro=Ir("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ci),wo.init(e,t)}),Co=Ir("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Pi),wo.init(e,t)}),Po=Ir("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=Gi({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const s=`${t}(?:${n.join("|")})`;return new RegExp(`^${qi}T(?:${s})$`)}(t)),wo.init(e,t)}),Lo=Ir("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Zi),wo.init(e,t)}),Io=Ir("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${Gi(t)}$`)),wo.init(e,t)}),Mo=Ir("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Ii),wo.init(e,t)}),Do=Ir("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=zi),wo.init(e,t),e._zod.bag.format="ipv4"}),jo=Ir("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Fi),wo.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),zo=Ir("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Hi),wo.init(e,t)}),Fo=Ir("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Bi),wo.init(e,t),e._zod.check=n=>{const s=n.value.split("/");try{if(2!==s.length)throw new Error;const[e,t]=s;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Ho(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Bo=Ir("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ki),wo.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Ho(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});const Ko=Ir("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ui),wo.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{(function(e){if(!Ui.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Ho(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Uo=Ir("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Wi),wo.init(e,t)});const Wo=Ir("$ZodJWT",(e,t)=>{wo.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[s]=n;if(!s)return!1;const r=JSON.parse(atob(s));return!("typ"in r&&"JWT"!==r?.typ||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),qo=Ir("$ZodNumber",(e,t)=>{vo.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ji,e._zod.parse=(n,s)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const r=n.value;if("number"==typeof r&&!Number.isNaN(r)&&Number.isFinite(r))return n;const i="number"==typeof r?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),n}}),Zo=Ir("$ZodNumberFormat",(e,t)=>{ro.init(e,t),qo.init(e,t)}),Go=Ir("$ZodUnknown",(e,t)=>{vo.init(e,t),e._zod.parse=e=>e}),Vo=Ir("$ZodNever",(e,t)=>{vo.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function Jo(e,t,n){e.issues.length&&t.issues.push(...ai(n,e.issues)),t.value[n]=e.value}const Yo=Ir("$ZodArray",(e,t)=>{vo.init(e,t),e._zod.parse=(n,s)=>{const r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);const i=[];for(let e=0;e<r.length;e++){const o=r[e],a=t.element._zod.run({value:o,issues:[]},s);a instanceof Promise?i.push(a.then(t=>Jo(t,n,e))):Jo(a,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function Qo(e,t,n,s,r){if(e.issues.length){if(r&&!(n in s))return;t.issues.push(...ai(n,e.issues))}void 0===e.value?n in s&&(t.value[n]=void 0):t.value[n]=e.value}function Xo(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=(s=e.shape,Object.keys(s).filter(e=>"optional"===s[e]._zod.optin&&"optional"===s[e]._zod.optout));var s;return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function ea(e,t,n,s,r,i){const o=[],a=r.keySet,c=r.catchall._zod,u=c.def.type,l="optional"===c.optout;for(const r in t){if(a.has(r))continue;if("never"===u){o.push(r);continue}const i=c.run({value:t[r],issues:[]},s);i instanceof Promise?e.push(i.then(e=>Qo(e,n,r,t,l))):Qo(i,n,r,t,l)}return o.length&&n.issues.push({code:"unrecognized_keys",keys:o,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const ta=Ir("$ZodObject",(e,t)=>{vo.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const s=Br(()=>Xo(t));qr(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const s=e[t]._zod;if(s.values){n[t]??(n[t]=new Set);for(const e of s.values)n[t].add(e)}}return n});const r=Yr,i=t.catchall;let o;e._zod.parse=(t,n)=>{o??(o=s.value);const a=t.value;if(!r(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};const c=[],u=o.shape;for(const e of o.keys){const s=u[e],r="optional"===s._zod.optout,i=s._zod.run({value:a[e],issues:[]},n);i instanceof Promise?c.push(i.then(n=>Qo(n,t,e,a,r))):Qo(i,t,e,a,r)}return i?ea(c,a,t,n,s.value,e):c.length?Promise.all(c).then(()=>t):t}}),na=Ir("$ZodObjectJIT",(e,t)=>{ta.init(e,t);const n=e._zod.parse,s=Br(()=>Xo(t));let r;const i=Yr,o=!jr.jitless,a=o&&Qr.value,c=t.catchall;let u;e._zod.parse=(l,f)=>{u??(u=s.value);const p=l.value;return i(p)?o&&a&&!1===f?.async&&!0!==f.jitless?(r||(r=(e=>{const t=new yo(["shape","payload","ctx"]),n=s.value,r=e=>{const t=Vr(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const i=Object.create(null);let o=0;for(const e of n.keys)i[e]="key_"+o++;t.write("const newResult = {};");for(const s of n.keys){const n=i[s],o=Vr(s),a=e[s],c="optional"===a?._zod?.optout;t.write(`const ${n} = ${r(s)};`),c?t.write(`\n if (${n}.issues.length) {\n if (${o} in input) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${o}, ...iss.path] : [${o}]\n })));\n }\n }\n \n if (${n}.value === undefined) {\n if (${o} in input) {\n newResult[${o}] = undefined;\n }\n } else {\n newResult[${o}] = ${n}.value;\n }\n \n `):t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${o}, ...iss.path] : [${o}]\n })));\n }\n \n if (${n}.value === undefined) {\n if (${o} in input) {\n newResult[${o}] = undefined;\n }\n } else {\n newResult[${o}] = ${n}.value;\n }\n \n `)}t.write("payload.value = newResult;"),t.write("return payload;");const a=t.compile();return(t,n)=>a(e,t,n)})(t.shape)),l=r(l,f),c?ea([],p,l,f,u,e):l):n(l,f):(l.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),l)}});function sa(e,t,n,s){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const r=e.filter(e=>!oi(e));return 1===r.length?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>ui(e,s,zr())))}),t)}const ra=Ir("$ZodUnion",(e,t)=>{vo.init(e,t),qr(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),qr(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),qr(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),qr(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>Ur(e.source)).join("|")})$`)}});const n=1===t.options.length,s=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return s(r,i);let o=!1;const a=[];for(const e of t.options){const t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)a.push(t),o=!0;else{if(0===t.issues.length)return t;a.push(t)}}return o?Promise.all(a).then(t=>sa(t,r,e,i)):sa(a,r,e,i)}}),ia=Ir("$ZodIntersection",(e,t)=>{vo.init(e,t),e._zod.parse=(e,n)=>{const s=e.value,r=t.left._zod.run({value:s,issues:[]},n),i=t.right._zod.run({value:s,issues:[]},n);return r instanceof Promise||i instanceof Promise?Promise.all([r,i]).then(([t,n])=>aa(e,t,n)):aa(e,r,i)}});function oa(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(Xr(e)&&Xr(t)){const n=Object.keys(t),s=Object.keys(e).filter(e=>-1!==n.indexOf(e)),r={...e,...t};for(const n of s){const s=oa(e[n],t[n]);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r[n]=s.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let s=0;s<e.length;s++){const r=oa(e[s],t[s]);if(!r.valid)return{valid:!1,mergeErrorPath:[s,...r.mergeErrorPath]};n.push(r.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function aa(e,t,n){const s=new Map;let r;for(const n of t.issues)if("unrecognized_keys"===n.code){r??(r=n);for(const e of n.keys)s.has(e)||s.set(e,{}),s.get(e).l=!0}else e.issues.push(n);for(const t of n.issues)if("unrecognized_keys"===t.code)for(const e of t.keys)s.has(e)||s.set(e,{}),s.get(e).r=!0;else e.issues.push(t);const i=[...s].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(i.length&&r&&e.issues.push({...r,keys:i}),oi(e))return e;const o=oa(t.value,n.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const ca=Ir("$ZodTuple",(e,t)=>{vo.init(e,t);const n=t.items;e._zod.parse=(s,r)=>{const i=s.value;if(!Array.isArray(i))return s.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),s;s.value=[];const o=[],a=[...n].reverse().findIndex(e=>"optional"!==e._zod.optin),c=-1===a?0:n.length-a;if(!t.rest){const t=i.length>n.length,r=i.length<c-1;if(t||r)return s.issues.push({...t?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:i,inst:e,origin:"array"}),s}let u=-1;for(const e of n){if(u++,u>=i.length&&u>=c)continue;const t=e._zod.run({value:i[u],issues:[]},r);t instanceof Promise?o.push(t.then(e=>ua(e,s,u))):ua(t,s,u)}if(t.rest){const e=i.slice(n.length);for(const n of e){u++;const e=t.rest._zod.run({value:n,issues:[]},r);e instanceof Promise?o.push(e.then(e=>ua(e,s,u))):ua(e,s,u)}}return o.length?Promise.all(o).then(()=>s):s}});function ua(e,t,n){e.issues.length&&t.issues.push(...ai(n,e.issues)),t.value[n]=e.value}const la=Ir("$ZodRecord",(e,t)=>{vo.init(e,t),e._zod.parse=(n,s)=>{const r=n.value;if(!Xr(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;const i=[],o=t.keyType._zod.values;if(o){n.value={};const a=new Set;for(const e of o)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){a.add("number"==typeof e?e.toString():e);const o=t.valueType._zod.run({value:r[e],issues:[]},s);o instanceof Promise?i.push(o.then(t=>{t.issues.length&&n.issues.push(...ai(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...ai(e,o.issues)),n.value[e]=o.value)}let c;for(const e in r)a.has(e)||(c=c??[],c.push(e));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:c})}else{n.value={};for(const o of Reflect.ownKeys(r)){if("__proto__"===o)continue;let a=t.keyType._zod.run({value:o,issues:[]},s);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if("string"==typeof o&&Ji.test(o)&&a.issues.length){const e=t.keyType._zod.run({value:Number(o),issues:[]},s);if(e instanceof Promise)throw new Error("Async schemas not supported in object keys currently");0===e.issues.length&&(a=e)}if(a.issues.length){"loose"===t.mode?n.value[o]=r[o]:n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>ui(e,s,zr())),input:o,path:[o],inst:e});continue}const c=t.valueType._zod.run({value:r[o],issues:[]},s);c instanceof Promise?i.push(c.then(e=>{e.issues.length&&n.issues.push(...ai(o,e.issues)),n.value[a.value]=e.value})):(c.issues.length&&n.issues.push(...ai(o,c.issues)),n.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}}),fa=Ir("$ZodEnum",(e,t)=>{vo.init(e,t);const n=Fr(t.entries),s=new Set(n);e._zod.values=s,e._zod.pattern=new RegExp(`^(${n.filter(e=>ti.has(typeof e)).map(e=>"string"==typeof e?ni(e):e.toString()).join("|")})$`),e._zod.parse=(t,r)=>{const i=t.value;return s.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}}),pa=Ir("$ZodTransform",(e,t)=>{vo.init(e,t),e._zod.parse=(n,s)=>{if("backward"===s.direction)throw new Dr(e.constructor.name);const r=t.transform(n.value,n);if(s.async){return(r instanceof Promise?r:Promise.resolve(r)).then(e=>(n.value=e,n))}if(r instanceof Promise)throw new Mr;return n.value=r,n}});function da(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const ha=Ir("$ZodOptional",(e,t)=>{vo.init(e,t),e._zod.optin="optional",e._zod.optout="optional",qr(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),qr(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${Ur(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const s=t.innerType._zod.run(e,n);return s instanceof Promise?s.then(t=>da(t,e.value)):da(s,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),ma=Ir("$ZodExactOptional",(e,t)=>{ha.init(e,t),qr(e._zod,"values",()=>t.innerType._zod.values),qr(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),ga=Ir("$ZodNullable",(e,t)=>{vo.init(e,t),qr(e._zod,"optin",()=>t.innerType._zod.optin),qr(e._zod,"optout",()=>t.innerType._zod.optout),qr(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${Ur(e.source)}|null)$`):void 0}),qr(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),ya=Ir("$ZodDefault",(e,t)=>{vo.init(e,t),e._zod.optin="optional",qr(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const s=t.innerType._zod.run(e,n);return s instanceof Promise?s.then(e=>ba(e,t)):ba(s,t)}});function ba(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const va=Ir("$ZodPrefault",(e,t)=>{vo.init(e,t),e._zod.optin="optional",qr(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),_a=Ir("$ZodNonOptional",(e,t)=>{vo.init(e,t),qr(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,s)=>{const r=t.innerType._zod.run(n,s);return r instanceof Promise?r.then(t=>wa(t,e)):wa(r,e)}});function wa(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Sa=Ir("$ZodCatch",(e,t)=>{vo.init(e,t),qr(e._zod,"optin",()=>t.innerType._zod.optin),qr(e._zod,"optout",()=>t.innerType._zod.optout),qr(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const s=t.innerType._zod.run(e,n);return s instanceof Promise?s.then(s=>(e.value=s.value,s.issues.length&&(e.value=t.catchValue({...e,error:{issues:s.issues.map(e=>ui(e,n,zr()))},input:e.value}),e.issues=[]),e)):(e.value=s.value,s.issues.length&&(e.value=t.catchValue({...e,error:{issues:s.issues.map(e=>ui(e,n,zr()))},input:e.value}),e.issues=[]),e)}}),ka=Ir("$ZodPipe",(e,t)=>{vo.init(e,t),qr(e._zod,"values",()=>t.in._zod.values),qr(e._zod,"optin",()=>t.in._zod.optin),qr(e._zod,"optout",()=>t.out._zod.optout),qr(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const s=t.out._zod.run(e,n);return s instanceof Promise?s.then(e=>Aa(e,t.in,n)):Aa(s,t.in,n)}const s=t.in._zod.run(e,n);return s instanceof Promise?s.then(e=>Aa(e,t.out,n)):Aa(s,t.out,n)}});function Aa(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Ea=Ir("$ZodReadonly",(e,t)=>{vo.init(e,t),qr(e._zod,"propValues",()=>t.innerType._zod.propValues),qr(e._zod,"values",()=>t.innerType._zod.values),qr(e._zod,"optin",()=>t.innerType?._zod?.optin),qr(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const s=t.innerType._zod.run(e,n);return s instanceof Promise?s.then(xa):xa(s)}});function xa(e){return e.value=Object.freeze(e.value),e}const Oa=Ir("$ZodCustom",(e,t)=>{Xi.init(e,t),vo.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const s=n.value,r=t.fn(s);if(r instanceof Promise)return r.then(t=>$a(t,n,s,e));$a(r,n,s,e)}});function $a(e,t,n,s){if(!e){const e={code:"custom",input:n,inst:s,path:[...s._zod.def.path??[]],continue:!s._zod.def.abort};s._zod.def.params&&(e.params=s._zod.def.params),t.issues.push(fi(e))}}var Ta;class Na{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const s={...n,...this._map.get(e)};return Object.keys(s).length?s:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}(Ta=globalThis).__zod_globalRegistry??(Ta.__zod_globalRegistry=new Na);const Ra=globalThis.__zod_globalRegistry;function Ca(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ri(t)})}function Pa(e,t){return new to({check:"less_than",...ri(t),value:e,inclusive:!1})}function La(e,t){return new to({check:"less_than",...ri(t),value:e,inclusive:!0})}function Ia(e,t){return new no({check:"greater_than",...ri(t),value:e,inclusive:!1})}function Ma(e,t){return new no({check:"greater_than",...ri(t),value:e,inclusive:!0})}function Da(e,t){return new so({check:"multiple_of",...ri(t),value:e})}function ja(e,t){return new io({check:"max_length",...ri(t),maximum:e})}function za(e,t){return new oo({check:"min_length",...ri(t),minimum:e})}function Fa(e,t){return new ao({check:"length_equals",...ri(t),length:e})}function Ha(e){return new go({check:"overwrite",tx:e})}function Ba(e){const t=function(e,t){const n=new Xi({check:"custom",...ri(t)});return n._zod.check=e,n}(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(fi(e,n.value,t._zod.def));else{const s=e;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),n.issues.push(fi(s))}},e(n.value,n)));return t}function Ka(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Ra,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ua(e,t,n={path:[],schemaPath:[]}){var s;const r=e._zod.def,i=t.seen.get(e);if(i){i.count++;return n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema}const o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);const a=e._zod.toJSONSchema?.();if(a)o.schema=a;else{const s={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,s);else{const n=o.schema,i=t.processors[r.type];if(!i)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);i(e,t,n,s)}const i=e._zod.parent;i&&(o.ref||(o.ref=i),Ua(i,t,s),t.seen.get(i).isParent=!0)}const c=t.metadataRegistry.get(e);c&&Object.assign(o.schema,c),"input"===t.io&&Za(e)&&(delete o.schema.examples,delete o.schema.default),"input"===t.io&&o.schema._prefault&&((s=o.schema).default??(s.default=o.schema._prefault)),delete o.schema._prefault;return t.seen.get(e).schema}function Wa(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=new Map;for(const t of e.seen.entries()){const n=e.metadataRegistry.get(t[0])?.id;if(n){const e=s.get(n);if(e&&e!==t[0])throw new Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);s.set(n,t[0])}}const r=t=>{if(t[1].schema.$ref)return;const s=t[1],{ref:r,defId:i}=(t=>{const s="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){const n=e.external.registry.get(t[0])?.id,r=e.external.uri??(e=>e);if(n)return{ref:r(n)};const i=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=i,{defId:i,ref:`${r("__shared")}#/${s}/${i}`}}if(t[1]===n)return{ref:"#"};const r=`#/${s}/`,i=t[1].schema.id??"__schema"+e.counter++;return{defId:i,ref:r+i}})(t);s.def={...s.schema},i&&(s.defId=i);const o=s.schema;for(const e in o)delete o[e];o.$ref=r};if("throw"===e.cycles)for(const t of e.seen.entries()){const e=t[1];if(e.cycle)throw new Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const n of e.seen.entries()){const s=n[1];if(t===n[0]){r(n);continue}if(e.external){const s=e.external.registry.get(n[0])?.id;if(t!==n[0]&&s){r(n);continue}}const i=e.metadataRegistry.get(n[0])?.id;i?r(n):(s.cycle||s.count>1&&"ref"===e.reused)&&r(n)}}function qa(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=t=>{const n=e.seen.get(t);if(null===n.ref)return;const r=n.def??n.schema,i={...r},o=n.ref;if(n.ref=null,o){s(o);const n=e.seen.get(o),a=n.schema;!a.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?Object.assign(r,a):(r.allOf=r.allOf??[],r.allOf.push(a)),Object.assign(r,i);if(t._zod.parent===o)for(const e in r)"$ref"!==e&&"allOf"!==e&&(e in i||delete r[e]);if(a.$ref&&n.def)for(const e in r)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(r[e])===JSON.stringify(n.def[e])&&delete r[e]}const a=t._zod.parent;if(a&&a!==o){s(a);const t=e.seen.get(a);if(t?.schema.$ref&&(r.$ref=t.schema.$ref,t.def))for(const e in r)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(r[e])===JSON.stringify(t.def[e])&&delete r[e]}e.override({zodSchema:t,jsonSchema:r,path:n.path??[]})};for(const t of[...e.seen.entries()].reverse())s(t[0]);const r={};if("draft-2020-12"===e.target?r.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?r.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const n=e.external.registry.get(t)?.id;if(!n)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(n)}Object.assign(r,n.def??n.schema);const i=e.external?.defs??{};for(const t of e.seen.entries()){const e=t[1];e.def&&e.defId&&(i[e.defId]=e.def)}e.external||Object.keys(i).length>0&&("draft-2020-12"===e.target?r.$defs=i:r.definitions=i);try{const n=JSON.parse(JSON.stringify(r));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ga(t,"input",e.processors),output:Ga(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw new Error("Error converting schema to JSON.")}}function Za(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const s=e._zod.def;if("transform"===s.type)return!0;if("array"===s.type)return Za(s.element,n);if("set"===s.type)return Za(s.valueType,n);if("lazy"===s.type)return Za(s.getter(),n);if("promise"===s.type||"optional"===s.type||"nonoptional"===s.type||"nullable"===s.type||"readonly"===s.type||"default"===s.type||"prefault"===s.type)return Za(s.innerType,n);if("intersection"===s.type)return Za(s.left,n)||Za(s.right,n);if("record"===s.type||"map"===s.type)return Za(s.keyType,n)||Za(s.valueType,n);if("pipe"===s.type)return Za(s.in,n)||Za(s.out,n);if("object"===s.type){for(const e in s.shape)if(Za(s.shape[e],n))return!0;return!1}if("union"===s.type){for(const e of s.options)if(Za(e,n))return!0;return!1}if("tuple"===s.type){for(const e of s.items)if(Za(e,n))return!0;return!(!s.rest||!Za(s.rest,n))}return!1}const Ga=(e,t,n={})=>s=>{const{libraryOptions:r,target:i}=s??{},o=Ka({...r??{},target:i,io:t,processors:n});return Ua(e,o),Wa(o,e),qa(o,e)},Va={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ja=(e,t,n,s)=>{const r=e._zod.def;Ua(r.innerType,t,s);t.seen.get(e).ref=r.innerType},Ya=Ir("ZodISODateTime",(e,t)=>{Po.init(e,t),Ac.init(e,t)});function Qa(e){return function(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ri(t)})}(Ya,e)}const Xa=Ir("ZodISODate",(e,t)=>{Lo.init(e,t),Ac.init(e,t)});function ec(e){return function(e,t){return new e({type:"string",format:"date",check:"string_format",...ri(t)})}(Xa,e)}const tc=Ir("ZodISOTime",(e,t)=>{Io.init(e,t),Ac.init(e,t)});function nc(e){return function(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ri(t)})}(tc,e)}const sc=Ir("ZodISODuration",(e,t)=>{Mo.init(e,t),Ac.init(e,t)});function rc(e){return function(e,t){return new e({type:"string",format:"duration",check:"string_format",...ri(t)})}(sc,e)}const ic=(e,t)=>{di.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t=e=>e.message){const n={_errors:[]},s=e=>{for(const r of e.issues)if("invalid_union"===r.code&&r.errors.length)r.errors.map(e=>s({issues:e}));else if("invalid_key"===r.code)s({issues:r.issues});else if("invalid_element"===r.code)s({issues:r.issues});else if(0===r.path.length)n._errors.push(t(r));else{let e=n,s=0;for(;s<r.path.length;){const n=r.path[s];s===r.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(r))):e[n]=e[n]||{_errors:[]},e=e[n],s++}}};return s(e),n}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const n={},s=[];for(const r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):s.push(t(r));return{formErrors:s,fieldErrors:n}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Hr,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Hr,2)}},isEmpty:{get:()=>0===e.issues.length}})},oc=Ir("ZodError",ic),ac=Ir("ZodError",ic,{Parent:Error}),cc=mi(ac),uc=gi(ac),lc=yi(ac),fc=vi(ac),pc=wi(ac),dc=Si(ac),hc=ki(ac),mc=Ai(ac),gc=Ei(ac),yc=xi(ac),bc=Oi(ac),vc=$i(ac),_c=Ir("ZodType",(e,t)=>(vo.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ga(e,"input"),output:Ga(e,"output")}}),e.toJSONSchema=((e,t={})=>n=>{const s=Ka({...n,processors:t});return Ua(e,s),Wa(s,e),qa(s,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Gr(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>si(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>cc(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>lc(e,t,n),e.parseAsync=async(t,n)=>uc(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>fc(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>pc(e,t,n),e.decode=(t,n)=>dc(e,t,n),e.encodeAsync=async(t,n)=>hc(e,t,n),e.decodeAsync=async(t,n)=>mc(e,t,n),e.safeEncode=(t,n)=>gc(e,t,n),e.safeDecode=(t,n)=>yc(e,t,n),e.safeEncodeAsync=async(t,n)=>bc(e,t,n),e.safeDecodeAsync=async(t,n)=>vc(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return function(e,t,n){return new e({type:"custom",check:"custom",fn:t,...ri(n)})}(Au,e,t)}(t,n)),e.superRefine=t=>e.check(Ba(t)),e.overwrite=t=>e.check(Ha(t)),e.optional=()=>du(e),e.exactOptional=()=>new hu({type:"optional",innerType:e}),e.nullable=()=>gu(e),e.nullish=()=>du(gu(e)),e.nonoptional=t=>function(e,t){return new vu({type:"nonoptional",innerType:e,...ri(t)})}(e,t),e.array=()=>Xc(e),e.or=t=>su([e,t]),e.and=t=>new ru({type:"intersection",left:e,right:t}),e.transform=t=>Su(e,new fu({type:"transform",transform:t})),e.default=t=>{return n=t,new yu({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():ei(n)}});var n},e.prefault=t=>{return n=t,new bu({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():ei(n)}});var n},e.catch=t=>{return new _u({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>Su(e,t),e.readonly=()=>new ku({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return Ra.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>Ra.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return Ra.get(e);const n=e.clone();return Ra.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),wc=Ir("_ZodString",(e,t)=>{_o.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(t,n,s)=>((e,t,n)=>{const s=n;s.type="string";const{minimum:r,maximum:i,format:o,patterns:a,contentEncoding:c}=e._zod.bag;if("number"==typeof r&&(s.minLength=r),"number"==typeof i&&(s.maxLength=i),o&&(s.format=Va[o]??o,""===s.format&&delete s.format,"time"===o&&delete s.format),c&&(s.contentEncoding=c),a&&a.size>0){const e=[...a];1===e.length?s.pattern=e[0].source:e.length>1&&(s.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,n);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(function(e,t){return new uo({check:"string_format",format:"regex",...ri(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new po({check:"string_format",format:"includes",...ri(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new ho({check:"string_format",format:"starts_with",...ri(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new mo({check:"string_format",format:"ends_with",...ri(t),suffix:e})}(...t)),e.min=(...t)=>e.check(za(...t)),e.max=(...t)=>e.check(ja(...t)),e.length=(...t)=>e.check(Fa(...t)),e.nonempty=(...t)=>e.check(za(1,...t)),e.lowercase=t=>e.check(function(e){return new lo({check:"string_format",format:"lowercase",...ri(e)})}(t)),e.uppercase=t=>e.check(function(e){return new fo({check:"string_format",format:"uppercase",...ri(e)})}(t)),e.trim=()=>e.check(Ha(e=>e.trim())),e.normalize=(...t)=>e.check(function(e){return Ha(t=>t.normalize(e))}(...t)),e.toLowerCase=()=>e.check(Ha(e=>e.toLowerCase())),e.toUpperCase=()=>e.check(Ha(e=>e.toUpperCase())),e.slugify=()=>e.check(Ha(e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e)))}),Sc=Ir("ZodString",(e,t)=>{_o.init(e,t),wc.init(e,t),e.email=t=>e.check(function(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ri(t)})}(Ec,t)),e.url=t=>e.check(function(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ri(t)})}($c,t)),e.jwt=t=>e.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ri(t)})}(Kc,t)),e.emoji=t=>e.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ri(t)})}(Tc,t)),e.guid=t=>e.check(Ca(xc,t)),e.uuid=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ri(t)})}(Oc,t)),e.uuidv4=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ri(t)})}(Oc,t)),e.uuidv6=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ri(t)})}(Oc,t)),e.uuidv7=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ri(t)})}(Oc,t)),e.nanoid=t=>e.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ri(t)})}(Nc,t)),e.guid=t=>e.check(Ca(xc,t)),e.cuid=t=>e.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ri(t)})}(Rc,t)),e.cuid2=t=>e.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ri(t)})}(Cc,t)),e.ulid=t=>e.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ri(t)})}(Pc,t)),e.base64=t=>e.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ri(t)})}(Fc,t)),e.base64url=t=>e.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ri(t)})}(Hc,t)),e.xid=t=>e.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ri(t)})}(Lc,t)),e.ksuid=t=>e.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ri(t)})}(Ic,t)),e.ipv4=t=>e.check(function(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ri(t)})}(Mc,t)),e.ipv6=t=>e.check(function(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ri(t)})}(Dc,t)),e.cidrv4=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ri(t)})}(jc,t)),e.cidrv6=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ri(t)})}(zc,t)),e.e164=t=>e.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ri(t)})}(Bc,t)),e.datetime=t=>e.check(Qa(t)),e.date=t=>e.check(ec(t)),e.time=t=>e.check(nc(t)),e.duration=t=>e.check(rc(t))});function kc(e){return function(e,t){return new e({type:"string",...ri(t)})}(Sc,e)}const Ac=Ir("ZodStringFormat",(e,t)=>{wo.init(e,t),wc.init(e,t)}),Ec=Ir("ZodEmail",(e,t)=>{Ao.init(e,t),Ac.init(e,t)}),xc=Ir("ZodGUID",(e,t)=>{So.init(e,t),Ac.init(e,t)}),Oc=Ir("ZodUUID",(e,t)=>{ko.init(e,t),Ac.init(e,t)}),$c=Ir("ZodURL",(e,t)=>{Eo.init(e,t),Ac.init(e,t)}),Tc=Ir("ZodEmoji",(e,t)=>{xo.init(e,t),Ac.init(e,t)}),Nc=Ir("ZodNanoID",(e,t)=>{Oo.init(e,t),Ac.init(e,t)}),Rc=Ir("ZodCUID",(e,t)=>{$o.init(e,t),Ac.init(e,t)}),Cc=Ir("ZodCUID2",(e,t)=>{To.init(e,t),Ac.init(e,t)}),Pc=Ir("ZodULID",(e,t)=>{No.init(e,t),Ac.init(e,t)}),Lc=Ir("ZodXID",(e,t)=>{Ro.init(e,t),Ac.init(e,t)}),Ic=Ir("ZodKSUID",(e,t)=>{Co.init(e,t),Ac.init(e,t)}),Mc=Ir("ZodIPv4",(e,t)=>{Do.init(e,t),Ac.init(e,t)}),Dc=Ir("ZodIPv6",(e,t)=>{jo.init(e,t),Ac.init(e,t)}),jc=Ir("ZodCIDRv4",(e,t)=>{zo.init(e,t),Ac.init(e,t)}),zc=Ir("ZodCIDRv6",(e,t)=>{Fo.init(e,t),Ac.init(e,t)}),Fc=Ir("ZodBase64",(e,t)=>{Bo.init(e,t),Ac.init(e,t)}),Hc=Ir("ZodBase64URL",(e,t)=>{Ko.init(e,t),Ac.init(e,t)}),Bc=Ir("ZodE164",(e,t)=>{Uo.init(e,t),Ac.init(e,t)}),Kc=Ir("ZodJWT",(e,t)=>{Wo.init(e,t),Ac.init(e,t)}),Uc=Ir("ZodNumber",(e,t)=>{qo.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(t,n,s)=>((e,t,n)=>{const s=n,{minimum:r,maximum:i,format:o,multipleOf:a,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;"string"==typeof o&&o.includes("int")?s.type="integer":s.type="number","number"==typeof u&&("draft-04"===t.target||"openapi-3.0"===t.target?(s.minimum=u,s.exclusiveMinimum=!0):s.exclusiveMinimum=u),"number"==typeof r&&(s.minimum=r,"number"==typeof u&&"draft-04"!==t.target&&(u>=r?delete s.minimum:delete s.exclusiveMinimum)),"number"==typeof c&&("draft-04"===t.target||"openapi-3.0"===t.target?(s.maximum=c,s.exclusiveMaximum=!0):s.exclusiveMaximum=c),"number"==typeof i&&(s.maximum=i,"number"==typeof c&&"draft-04"!==t.target&&(c<=i?delete s.maximum:delete s.exclusiveMaximum)),"number"==typeof a&&(s.multipleOf=a)})(e,t,n),e.gt=(t,n)=>e.check(Ia(t,n)),e.gte=(t,n)=>e.check(Ma(t,n)),e.min=(t,n)=>e.check(Ma(t,n)),e.lt=(t,n)=>e.check(Pa(t,n)),e.lte=(t,n)=>e.check(La(t,n)),e.max=(t,n)=>e.check(La(t,n)),e.int=t=>e.check(Zc(t)),e.safe=t=>e.check(Zc(t)),e.positive=t=>e.check(Ia(0,t)),e.nonnegative=t=>e.check(Ma(0,t)),e.negative=t=>e.check(Pa(0,t)),e.nonpositive=t=>e.check(La(0,t)),e.multipleOf=(t,n)=>e.check(Da(t,n)),e.step=(t,n)=>e.check(Da(t,n)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Wc(e){return function(e,t){return new e({type:"number",checks:[],...ri(t)})}(Uc,e)}const qc=Ir("ZodNumberFormat",(e,t)=>{Zo.init(e,t),Uc.init(e,t)});function Zc(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ri(t)})}(qc,e)}const Gc=Ir("ZodUnknown",(e,t)=>{Go.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Vc(){return new Gc({type:"unknown"})}const Jc=Ir("ZodNever",(e,t)=>{Vo.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.not={}})(0,0,t)});function Yc(e){return function(e,t){return new e({type:"never",...ri(t)})}(Jc,e)}const Qc=Ir("ZodArray",(e,t)=>{Yo.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(t,n,s)=>((e,t,n,s)=>{const r=n,i=e._zod.def,{minimum:o,maximum:a}=e._zod.bag;"number"==typeof o&&(r.minItems=o),"number"==typeof a&&(r.maxItems=a),r.type="array",r.items=Ua(i.element,t,{...s,path:[...s.path,"items"]})})(e,t,n,s),e.element=t.element,e.min=(t,n)=>e.check(za(t,n)),e.nonempty=t=>e.check(za(1,t)),e.max=(t,n)=>e.check(ja(t,n)),e.length=(t,n)=>e.check(Fa(t,n)),e.unwrap=()=>e.element});function Xc(e,t){return function(e,t,n){return new e({type:"array",element:t,...ri(n)})}(Qc,e,t)}const eu=Ir("ZodObject",(e,t)=>{na.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(t,n,s)=>((e,t,n,s)=>{const r=n,i=e._zod.def;r.type="object",r.properties={};const o=i.shape;for(const e in o)r.properties[e]=Ua(o[e],t,{...s,path:[...s.path,"properties",e]});const a=new Set(Object.keys(o)),c=new Set([...a].filter(e=>{const n=i.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));c.size>0&&(r.required=Array.from(c)),"never"===i.catchall?._zod.def.type?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=Ua(i.catchall,t,{...s,path:[...s.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)})(e,t,n,s),qr(e,"shape",()=>t.shape),e.keyof=()=>lu(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Vc()}),e.loose=()=>e.clone({...e._zod.def,catchall:Vc()}),e.strict=()=>e.clone({...e._zod.def,catchall:Yc()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!Xr(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const n=e._zod.def.shape;for(const e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=Gr(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Zr(this,"shape",n),n}});return si(e,s)}(e,t),e.safeExtend=t=>function(e,t){if(!Xr(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Gr(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Zr(this,"shape",n),n}});return si(e,n)}(e,t),e.merge=t=>function(e,t){const n=Gr(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Zr(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return si(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def,s=n.checks;if(s&&s.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return si(e,Gr(e._zod.def,{get shape(){const e={};for(const s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(e[s]=n.shape[s])}return Zr(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,s=n.checks;if(s&&s.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const r=Gr(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete s[e]}return Zr(this,"shape",s),s},checks:[]});return si(e,r)}(e,t),e.partial=(...t)=>function(e,t,n){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const r=Gr(t._zod.def,{get shape(){const s=t._zod.def.shape,r={...s};if(n)for(const t in n){if(!(t in s))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=e?new e({type:"optional",innerType:s[t]}):s[t])}else for(const t in s)r[t]=e?new e({type:"optional",innerType:s[t]}):s[t];return Zr(this,"shape",r),r},checks:[]});return si(t,r)}(pu,e,t[0]),e.required=(...t)=>function(e,t,n){const s=Gr(t._zod.def,{get shape(){const s=t._zod.def.shape,r={...s};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=new e({type:"nonoptional",innerType:s[t]}))}else for(const t in s)r[t]=new e({type:"nonoptional",innerType:s[t]});return Zr(this,"shape",r),r}});return si(t,s)}(vu,e,t[0])});function tu(e,t){const n={type:"object",shape:e??{},...ri(t)};return new eu(n)}const nu=Ir("ZodUnion",(e,t)=>{ra.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(t,n,s)=>((e,t,n,s)=>{const r=e._zod.def,i=!1===r.inclusive,o=r.options.map((e,n)=>Ua(e,t,{...s,path:[...s.path,i?"oneOf":"anyOf",n]}));i?n.oneOf=o:n.anyOf=o})(e,t,n,s),e.options=t.options});function su(e,t){return new nu({type:"union",options:e,...ri(t)})}const ru=Ir("ZodIntersection",(e,t)=>{ia.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(t,n,s)=>((e,t,n,s)=>{const r=e._zod.def,i=Ua(r.left,t,{...s,path:[...s.path,"allOf",0]}),o=Ua(r.right,t,{...s,path:[...s.path,"allOf",1]}),a=e=>"allOf"in e&&1===Object.keys(e).length,c=[...a(i)?i.allOf:[i],...a(o)?o.allOf:[o]];n.allOf=c})(e,t,n,s)});const iu=Ir("ZodTuple",(e,t)=>{ca.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(t,n,s)=>((e,t,n,s)=>{const r=n,i=e._zod.def;r.type="array";const o="draft-2020-12"===t.target?"prefixItems":"items",a="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",c=i.items.map((e,n)=>Ua(e,t,{...s,path:[...s.path,o,n]})),u=i.rest?Ua(i.rest,t,{...s,path:[...s.path,a,..."openapi-3.0"===t.target?[i.items.length]:[]]}):null;"draft-2020-12"===t.target?(r.prefixItems=c,u&&(r.items=u)):"openapi-3.0"===t.target?(r.items={anyOf:c},u&&r.items.anyOf.push(u),r.minItems=c.length,u||(r.maxItems=c.length)):(r.items=c,u&&(r.additionalItems=u));const{minimum:l,maximum:f}=e._zod.bag;"number"==typeof l&&(r.minItems=l),"number"==typeof f&&(r.maxItems=f)})(e,t,n,s),e.rest=t=>e.clone({...e._zod.def,rest:t})});function ou(e,t,n){const s=t instanceof vo;return new iu({type:"tuple",items:e,rest:s?t:null,...ri(s?n:t)})}const au=Ir("ZodRecord",(e,t)=>{la.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(t,n,s)=>((e,t,n,s)=>{const r=n,i=e._zod.def;r.type="object";const o=i.keyType,a=o._zod.bag,c=a?.patterns;if("loose"===i.mode&&c&&c.size>0){const e=Ua(i.valueType,t,{...s,path:[...s.path,"patternProperties","*"]});r.patternProperties={};for(const t of c)r.patternProperties[t.source]=e}else"draft-07"!==t.target&&"draft-2020-12"!==t.target||(r.propertyNames=Ua(i.keyType,t,{...s,path:[...s.path,"propertyNames"]})),r.additionalProperties=Ua(i.valueType,t,{...s,path:[...s.path,"additionalProperties"]});const u=o._zod.values;if(u){const e=[...u].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e)}})(e,t,n,s),e.keyType=t.keyType,e.valueType=t.valueType});function cu(e,t,n){return new au({type:"record",keyType:e,valueType:t,...ri(n)})}const uu=Ir("ZodEnum",(e,t)=>{fa.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(t,n,s)=>((e,t,n)=>{const s=Fr(e._zod.def.entries);s.every(e=>"number"==typeof e)&&(n.type="number"),s.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=s})(e,0,n),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,s)=>{const r={};for(const s of e){if(!n.has(s))throw new Error(`Key ${s} not found in enum`);r[s]=t.entries[s]}return new uu({...t,checks:[],...ri(s),entries:r})},e.exclude=(e,s)=>{const r={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete r[t]}return new uu({...t,checks:[],...ri(s),entries:r})}});function lu(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new uu({type:"enum",entries:n,...ri(t)})}const fu=Ir("ZodTransform",(e,t)=>{pa.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema")})(0,e),e._zod.parse=(n,s)=>{if("backward"===s.direction)throw new Dr(e.constructor.name);n.addIssue=s=>{if("string"==typeof s)n.issues.push(fi(s,n.value,t));else{const t=s;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(fi(t))}};const r=t.transform(n.value,n);return r instanceof Promise?r.then(e=>(n.value=e,n)):(n.value=r,n)}});const pu=Ir("ZodOptional",(e,t)=>{ha.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(t,n,s)=>Ja(e,t,0,s),e.unwrap=()=>e._zod.def.innerType});function du(e){return new pu({type:"optional",innerType:e})}const hu=Ir("ZodExactOptional",(e,t)=>{ma.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(t,n,s)=>Ja(e,t,0,s),e.unwrap=()=>e._zod.def.innerType});const mu=Ir("ZodNullable",(e,t)=>{ga.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(t,n,s)=>((e,t,n,s)=>{const r=e._zod.def,i=Ua(r.innerType,t,s),o=t.seen.get(e);"openapi-3.0"===t.target?(o.ref=r.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]})(e,t,n,s),e.unwrap=()=>e._zod.def.innerType});function gu(e){return new mu({type:"nullable",innerType:e})}const yu=Ir("ZodDefault",(e,t)=>{ya.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(t,n,s)=>((e,t,n,s)=>{const r=e._zod.def;Ua(r.innerType,t,s),t.seen.get(e).ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))})(e,t,n,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});const bu=Ir("ZodPrefault",(e,t)=>{va.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(t,n,s)=>((e,t,n,s)=>{const r=e._zod.def;Ua(r.innerType,t,s),t.seen.get(e).ref=r.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))})(e,t,n,s),e.unwrap=()=>e._zod.def.innerType});const vu=Ir("ZodNonOptional",(e,t)=>{_a.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(t,n,s)=>((e,t,n,s)=>{const r=e._zod.def;Ua(r.innerType,t,s),t.seen.get(e).ref=r.innerType})(e,t,0,s),e.unwrap=()=>e._zod.def.innerType});const _u=Ir("ZodCatch",(e,t)=>{Sa.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(t,n,s)=>((e,t,n,s)=>{const r=e._zod.def;let i;Ua(r.innerType,t,s),t.seen.get(e).ref=r.innerType;try{i=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i})(e,t,n,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});const wu=Ir("ZodPipe",(e,t)=>{ka.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(t,n,s)=>((e,t,n,s)=>{const r=e._zod.def,i="input"===t.io?"transform"===r.in._zod.def.type?r.out:r.in:r.out;Ua(i,t,s),t.seen.get(e).ref=i})(e,t,0,s),e.in=t.in,e.out=t.out});function Su(e,t){return new wu({type:"pipe",in:e,out:t})}const ku=Ir("ZodReadonly",(e,t)=>{Ea.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(t,n,s)=>((e,t,n,s)=>{const r=e._zod.def;Ua(r.innerType,t,s),t.seen.get(e).ref=r.innerType,n.readOnly=!0})(e,t,n,s),e.unwrap=()=>e._zod.def.innerType});const Au=Ir("ZodCustom",(e,t)=>{Oa.init(e,t),_c.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")})(0,e)});const Eu=e=>{if(!e||"object"!=typeof e)return;const t=e,n={};for(const e of Object.keys(t)){const s=t[e];if("string"==typeof s){const t=s.trim();t&&(n[e]=[t])}else if(Array.isArray(s)){const t=s.map(e=>"string"==typeof e?e.trim():"").filter(e=>e.length>0);t.length&&(n[e]=t)}}return Object.keys(n).length?n:void 0},xu=(e,t)=>{const n=t?JSON.parse(e):Lr.parse(e);return n&&"object"==typeof n?n:{}},Ou=Xc(kc()).default([]).optional(),$u=su([kc(),Xc(kc())]),Tu=cu(kc(),$u).optional(),Nu=tu({stanPath:kc().min(1,{message:"stanPath must be a non-empty string"}),includes:Ou,excludes:Ou,imports:Tu}).strict(),Ru=e=>{if(!e||"object"!=typeof e)throw new Error('stan-core: missing or invalid "stan-core" section');try{return Nu.parse(e)}catch(e){throw new Error((e=>e instanceof oc?e.issues.map(e=>{const t=e.path.join(".")||"(root)";let n=e.message;return"stanPath"===t&&/Expected string/i.test(n)&&(n="stanPath must be a non-empty string"),`${t}: ${n}`}).join("\n"):String(e))(e))}},Cu=e=>{const t=Pe(e);if(!t)throw new Error("stan config not found");const s=n(t,"utf8"),r=xu(s,t.endsWith(".json"));if(!Object.prototype.hasOwnProperty.call(r,"stan-core")){throw new Error(`stan-core: missing "stan-core" section in ${t}. Add a top-level "stan-core" object with stanPath/includes/excludes/imports.`)}const i=Ru(r["stan-core"]),o=Eu(i.imports);return{stanPath:i.stanPath,includes:i.includes??[],excludes:i.excludes??[],imports:o}},Pu=async e=>{const t=Pe(e);if(!t)throw new Error("stan config not found");const n=t.replace(/\\/g,"/");return(async(e,t)=>{const n=await i(e,"utf8"),s=xu(n,e.endsWith(".json"));if(!Object.prototype.hasOwnProperty.call(s,"stan-core"))throw new Error(`stan-core: missing "stan-core" section in ${t??e}. Add a top-level "stan-core" object with stanPath/includes/excludes/imports.`);const r=Ru(s["stan-core"]),o=Eu(r.imports);return{stanPath:r.stanPath,includes:r.includes??[],excludes:r.excludes??[],imports:o}})(t,n)},Lu=e=>{try{return Cu(e).stanPath}catch{return Oe}},Iu=async e=>{try{return(await Pu(e)).stanPath}catch{return Oe}};function Mu(e,t){const n=t.replace(/\\/g,"/").replace(/^\.\/+/,"");const s=`${n}/system`,r=`${n}/output`,i=`${n}/diff`,o=`${n}/dist`,a=`${n}/patch`,c=`${n}/imports`;return{rootRel:n,systemRel:s,outputRel:r,diffRel:i,distRel:o,patchRel:a,importsRel:c,rootAbs:p(e,n),systemAbs:p(e,s),outputAbs:p(e,r),diffAbs:p(e,i),distAbs:p(e,o),patchAbs:p(e,a),importsAbs:p(e,c)}}var Du={makeStanDirs:Mu},ju=Object.freeze({__proto__:null,default:Du,makeStanDirs:Mu});const zu=async(e,n,i=!1)=>{const a=Mu(e,n);if(await Se(e,n),!i){const e=p(a.outputAbs,C);if(t(e))try{await o(e,p(a.diffAbs,L))}catch{}const n=await r(a.outputAbs,{withFileTypes:!0});for(const e of n)s(p(a.outputAbs,e.name),{recursive:!0,force:!0})}return a.rootAbs},Fu=".archive.snapshot.json",Hu=".stan_no_changes",Bu=async(e,t)=>{const n={};for(const s of t){const t=p(e,s),r=await i(t);n[s]=A("sha256").update(r).digest("hex")}return n},Ku=e=>d(e,Fu);async function Uu({cwd:e,stanPath:t,includes:n,excludes:s}){const{diffDir:r}=await ke(e,t),i=await ve(e),o=await we(i,{cwd:e,stanPath:t,includeOutputDir:!1,includes:n??[],excludes:s??[]}),c=await Bu(e,o),u=Ku(r);return await a(u,JSON.stringify(c,null,2),"utf8"),u}async function Wu({cwd:e,stanPath:n,baseName:s,includes:r,excludes:o,updateSnapshot:c="createIfMissing",includeOutputDirInDiff:u=!1,onArchiveWarnings:l,onSelectionReport:f}){const{outDir:p,diffDir:h}=await ke(e,n),m=await ve(e),g=await we(m,{cwd:e,stanPath:n,includeOutputDir:!1,includes:r??[],excludes:o??[]}),y=await Bu(e,g),b=Ku(h),v=t(b),_=v?JSON.parse(await i(b,"utf8")):{},w=v?g.filter(e=>!_[e]||_[e]!==y[e]):[...g],S=await(async()=>be(()=>import("./classifier-Bqzr65UC.js"),"classifyForArchive",e=>"function"==typeof e,{moduleLabel:"./classifier",acceptCallableDefault:!0}))(),{textFiles:k,excludedBinaries:A,largeText:E,warningsBody:x}=await S(e,w),O=k;U(x,l);const $=d(p,`${s}.diff.tar`),T=await import("./index-WrHikElU.js"),N=!u&&0===O.length;if(I({kind:"diff",mode:"denylist",stanPath:n,outputFile:$,includeOutputDirInDiff:u,updateSnapshot:c,snapshotExists:v,baseSelected:g.length,sentinelUsed:N,hasWarnings:A.length>0||E.length>0,counts:{candidates:g.length,selected:w.length,archived:O.length,excludedBinaries:A.length,largeText:E.length}},f),u)await T.create({file:$,cwd:e,filter:B(n)},K(O,n));else if(0===O.length){const t=(e=>d(e,Hu))(h);await a(t,"no changes","utf8");const s=[`${n.replace(/\\/g,"/")}/diff/${Hu}`];await T.create({file:$,cwd:e},s)}else{const t=Array.from(new Set([...O]));await T.create({file:$,cwd:e},t)}return"replace"===c?await a(b,JSON.stringify(y,null,2),"utf8"):"createIfMissing"!==c||v||await a(b,JSON.stringify(y,null,2),"utf8"),{diffPath:$}}const qu=e=>{const t=/^###\s+File Ops\s*$/m.exec(e);if(!t)return null;const n=t.index+t[0].length,s=e.slice(n).split(/\r?\n/);let r=0;for(;r<s.length&&""===s[r].trim();)r+=1;const i=[];for(;r<s.length;r+=1){const e=s[r];if(/^#{2,3}\s+/.test(e))break;i.push(e)}const o=i.join("\n").trimEnd();return o.length?o:null},Zu=/^###\s+Patch:\s+(.+?)\s*$/m,Gu=/^###\s+Full Listing:\s+(.+?)\s*$/m,Vu=/^##\s+Commit Message\s*$/m,Ju=/^##\s+.*$|^###\s+.*$/m,Yu=e=>{const t=/^diff --git a\/(.+?) b\/(.+?)\s*$/gm,n=[];let s;for(;s=t.exec(e);)n.push({a:M(s[1]),b:M(s[2])});return n},Qu=e=>{const t=e.split(/\r?\n/);for(const e of t)if(!(e.startsWith("+++")||e.startsWith("---")||e.startsWith("diff --git")||e.startsWith("@@"))&&(e.startsWith("+")||e.startsWith("-")))return!0;return!1},Xu=(e,t={})=>{const n=[];((e,t)=>{const n=qu(e);if(!n)return;const s=n.split(/\r?\n/);for(let e=0;e<s.length;e+=1){const n=s[e].trim();if(!n)continue;const r=n.split(/\s+/),i=r[0],o=r.slice(1),a=`File Ops line ${(e+1).toString()}`,c=e=>t.push(`${a}: ${e}`),u=e=>D(e);if(/^(mv|cp|rm|rmdir|mkdirp)$/.test(i))if("mv"!==i&&"cp"!==i)1===o.length?u(o[0])||c(`${i}: invalid repo-relative path`):c(`expected 1 path, got ${o.length.toString()}`);else{if(2!==o.length){c(`expected 2 paths, got ${o.length.toString()}`);continue}u(o[0])&&u(o[1])||c(`${i}: invalid repo-relative path`)}else c(`unknown verb "${i}"`)}})(e,n);const s=(e=>{const t=[],n=[],s=new RegExp(Ju.source,"gm");let r;for(;r=s.exec(e);)n.push(r.index);n.push(e.length);for(let s=0;s<n.length-1;s+=1){const r=n[s],i=n[s+1],o=e.slice(r,i);if(Vu.test(o))t.push({kind:"commit",start:r,body:o});else{const e=o.match(Zu);e?.[1]&&t.push({kind:"patch",path:M(e[1].trim()),start:r,body:o});const n=o.match(Gu);n?.[1]&&t.push({kind:"full",path:M(n[1].trim()),start:r,body:o})}}return t})(e),r=s.filter(e=>"patch"===e.kind),i=s.filter(e=>"full"===e.kind),o=s.filter(e=>"commit"===e.kind);0===r.length&&n.push("No Patch blocks found");const a=new Map;for(const e of r){const s=e.path??"(unknown)",r=a.get(s)??[];r.push(e),a.set(s,r);const i=Yu(e.body);if(0===i.length?n.push(`Patch for ${s} has no "diff --git a/<path> b/<path>" header; emit a plain unified diff with git-style headers`):1!==i.length&&n.push(`Patch for ${s} contains multiple "diff --git" headers (found ${i.length.toString()}; expected 1)`),/(^|\n)\*{3,}\s*(Begin|End)\s+Patch\b|(^|\n)Index:\s|(^|\n)\*{3,}\s*Add\s+File:/i.test(e.body)&&n.push(`Patch for ${s} contains a forbidden wrapper ("*** Begin Patch", etc). Use plain unified diff only.`),t.dependencyMode){const s=t.stanPath?.trim()||".stan",r=`${M(s)}/context/dependency.state.json`;Yu(e.body).map(e=>M(e.b)).includes(r)&&!Qu(e.body)&&n.push(`Patch for ${r} appears to be a no-op (no + or - hunk lines)`)}}for(const[e,t]of a.entries())t.length>1&&n.push(`Multiple Patch blocks found for ${e} (${t.length.toString()})`);const c=new Map;for(const e of i)c.set(M("string"==typeof e.path?e.path:"(unknown)"),e);for(const e of r){const t=M(e.path),s=c.get(t);!s||e.start<s.start||n.push(`Ordering violation for ${t}: Full Listing appears before Patch`)}if(0===o.length?n.push('Missing "## Commit Message" section'):s.length>0&&"commit"!==s[s.length-1].kind&&n.push("Commit Message is not last"),r.length>0){const e=r.flatMap(e=>{const t=Yu(e.body);return t.length>0?t.map(e=>M(e.b)):[M(e.path??"")].filter(Boolean)}),t=e=>".stan/system/stan.todo.md"===M(e);if(!e.some(e=>t(e))){const s=e=>/^readme\.md$|^changelog\.md$|^license(\.md)?$|^contributing\.md$|^docs\/|^diagrams\//i.test(e.split("/").pop()??e)||e.startsWith("docs/");e.some(e=>!t(e)&&!s(e))&&n.push('Doc cadence violation: Patch present but no Patch for ".stan/system/stan.todo.md"')}}if(t.dependencyMode){const s=t.stanPath?.trim()||".stan",i=`${M(s)}/context/dependency.state.json`,o=r.flatMap(e=>{const t=Yu(e.body);return t.length>0?t.map(e=>M(e.b)):[]}),a=o.includes(i),c=((e,t)=>{const n=new RegExp(`^##\\s+${t.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}\\s*$`,"m").exec(e);if(!n)return null;const s=n.index+n[0].length,r=e.slice(s).split(/\r?\n/);let i=0;for(;i<r.length&&""===r[i].trim();)i+=1;const o=[];for(;i<r.length;i+=1){const e=r[i];if(/^#{2,3}\s+/.test(e))break;o.push(e)}const a=o.join("\n").trimEnd();return a.length?a:null})(e,"Input Data Changes")??"",u=/^\s*-\s*dependency\.state\.json:\s*no change\s*$/m.test(c);a&&u?n.push('dependency mode: both a dependency.state.json Patch and the "dependency.state.json: no change" signal were present; choose exactly one'):a||u||n.push('dependency mode: missing dependency state update; include either a Patch for dependency.state.json or a bullet line "dependency.state.json: no change" under "## Input Data Changes"')}return{ok:0===n.length,errors:n,warnings:[]}},el=e=>{const t=Xu(e);if(!t.ok){const e="Response-format validation failed:\n"+t.errors.map(e=>`- ${e}`).join("\n");throw new Error(e)}},tl=e=>e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),nl=e=>e.endsWith("\n")?e:e+"\n",sl=/[\u200B-\u200D\uFEFF]/g,rl=e=>!!/^diff --git /m.test(e)||(!(!/^---\s+(?:a\/|\S)/m.test(e)||!/^\+\+\+\s+(?:b\/|\S)/m.test(e))||!!/^@@\s+-\d+(?:,\d+)?\s+\+\d+(?:,\d+)?\s+@@/m.test(e)),il=e=>{const t=e.match(/^([`~]{3,})/);if(!t||!t[1])return null;const n=t[1],s=n[0];for(const e of n)if(e!==s)return null;return{ch:s,count:n.length}},ol=e=>{const t=tl(e).replace(sl,"");return nl(t)},al=e=>{const t=(e=>{const t=e.split(/\r?\n/);let n=0;for(;n<t.length&&""===t[n].trim();)n+=1;let s=t.length-1;for(;s>=0&&""===t[s].trim();)s-=1;if(n>s)return e;const r=t[n].trim(),i=t[s].trim(),o=e=>{const t=e.match(/^([`~]{3,})/);if(!t||!t[1])return null;const n=t[1],s=n[0];for(const e of n)if(e!==s)return null;return{ch:s,count:n.length}},a=e=>{const r=t.slice(n+1,s);return[...t.slice(0,n),...r,...t.slice(s+1)].join("\n")},c=o(r),u=o(i);return c&&u&&c.ch===u.ch&&c.count===u.count||/^BEGIN[_ -]?PATCH/i.test(r)&&(l=i,/^END[_ -]?PATCH/i.test(l))||(e=>/^\*{3,}\s*BEGIN\s+PATCH/i.test(e)||/^\*{3,}\s*Begin\s+Patch/i.test(e))(r)&&(e=>/^\*{3,}\s*END\s+PATCH/i.test(e)||/^\*{3,}\s*End\s+Patch/i.test(e))(i)?a():e;var l})(ol(e.trim())),n=ol(t),s=(e=>{const t=e.split("\n");for(let e=0;e<t.length;e+=1){const n=t[e],s=il(n);if(s)for(let n=e+1;n<t.length;n+=1)if(t[n].trimEnd()===s.ch.repeat(s.count)){const s=t.slice(e+1,n).join("\n");if(rl(s))return s;e=n;break}}let n=e.search(/^diff --git /m);return n<0&&(n=e.search(/^---\s+(?:a\/|\S)/m)),n<0?null:e.slice(n).replace(/\n(?:`{3,}|~{3,})\s*$/m,"\n")})(n);return nl(s?ol(s).trimEnd():n)},cl=e=>M(e).replace(/^\.\/+/,"").replace(/\/+$/,""),ul=(e,t)=>((e,t)=>{const n=cl(e),s=cl(t);return s===n||s.startsWith(`${n}/`)})(`${cl(e)}/imports`,t),ll=async(e,t,n=!1,s)=>{const i=[],o=t=>((e,t)=>{const n=f.resolve(e,t),s=f.resolve(e)+f.sep,r=n===f.resolve(e)||n.startsWith(s);return{abs:n,ok:r}})(e,t),a=s?.trim().length?s.trim():null,u=e=>{if(a&&ul(a,e))throw new Error("path targets protected imports area")};for(const e of t){const t={verb:e.verb,status:"ok"};try{const t=e.src;u(t);const{abs:s,ok:i}=o(t);if(!i)throw new Error("path escapes repo root");if("mv"===e.verb||"cp"===e.verb){const t=e.dest;u(t);const{abs:r,ok:i}=o(t);if(!i)throw new Error("path escapes repo root");const a=await g(s),c=await g(r);if(!a)throw new Error("source does not exist");if(c)throw new Error("destination exists (no overwrite)");n||(await m(f.dirname(r)),"mv"===e.verb?await y(s,r,{overwrite:!1}):await b(s,r,{overwrite:!1,errorOnExist:!0}))}else if("rm"===e.verb){if(!await g(s))throw new Error("path does not exist");n||await v(s)}else if("rmdir"===e.verb){let e=null;try{e=await c(s)}catch{e=null}if(!e)throw new Error("directory does not exist");if(!e.isDirectory())throw new Error("not a directory");if((await r(s)).length>0)throw new Error("directory not empty");n||await v(s)}else n||await m(s)}catch(e){t.status="failed",t.message=e instanceof Error?e.message:String(e)}if(i.push(t),"failed"===t.status&&!n)break}const l=i.every(e=>"ok"===e.status);return{ok:l,results:i}},fl=(e,t)=>{const n=[],s=[],r=qu(e);if(!r)return{ops:n,errors:s};const i=t?.trim().length?t.trim():null,o=r.split(/\r?\n/);let a=0;for(const e of o){a+=1;const t=e.trim();if(!t)continue;const r=t.split(/\s+/),o=r[0],c=r.slice(1),u=e=>s.push(`file-ops line ${a.toString()}: ${e}`),l=e=>D(e),f=(e,t)=>!(!i||!ul(i,t))&&(u(`${e}: path targets protected imports area`),!0),p=e=>c.length===e||(u(`expected ${e.toString()} paths, got ${c.length.toString()}`),!1);if("mv"===o||"cp"===o){if(!p(2))continue;const e=l(c[0]),t=l(c[1]);if(!e||!t){u(`${o}: invalid repo-relative path`);continue}if(f(o,e)||f(o,t))continue;n.push({verb:o,src:e,dest:t})}else if("rm"===o||"rmdir"===o||"mkdirp"===o){if(!p(1))continue;const e=l(c[0]);if(!e){u(`${o}: invalid repo-relative path`);continue}if(f(o,e))continue;n.push({verb:o,src:e})}else u(`unknown verb "${o}"`)}return{ops:n,errors:s}};function pl(e){return Array.isArray(e)?e.map(e=>pl(e)):Object.assign(Object.assign({},e),{hunks:e.hunks.map(e=>Object.assign(Object.assign({},e),{lines:e.lines.map((t,n)=>{var s;return t.startsWith("\\")||t.endsWith("\r")||(null===(s=e.lines[n+1])||void 0===s?void 0:s.startsWith("\\"))?t:t+"\r"})}))})}function dl(e){return Array.isArray(e)?e.map(e=>dl(e)):Object.assign(Object.assign({},e),{hunks:e.hunks.map(e=>Object.assign(Object.assign({},e),{lines:e.lines.map(e=>e.endsWith("\r")?e.substring(0,e.length-1):e)}))})}function hl(e){const t=e.split(/\n/),n=[];let s=0;function r(){const e={};for(n.push(e);s<t.length;){const n=t[s];if(/^(---|\+\+\+|@@)\s/.test(n))break;const r=/^(?:Index:|diff(?: -r \w+)+)\s+/.exec(n);r&&(e.index=n.substring(r[0].length).trim()),s++}for(i(e),i(e),e.hunks=[];s<t.length;){const n=t[s];if(/^(Index:\s|diff\s|---\s|\+\+\+\s|===================================================================)/.test(n))break;if(/^@@/.test(n))e.hunks.push(o());else{if(n)throw new Error("Unknown line "+(s+1)+" "+JSON.stringify(n));s++}}}function i(e){const n=/^(---|\+\+\+)\s+/.exec(t[s]);if(n){const r=n[1],i=t[s].substring(3).trim().split("\t",2),o=(i[1]||"").trim();let a=i[0].replace(/\\\\/g,"\\");a.startsWith('"')&&a.endsWith('"')&&(a=a.substr(1,a.length-2)),"---"===r?(e.oldFileName=a,e.oldHeader=o):(e.newFileName=a,e.newHeader=o),s++}}function o(){var e;const n=s,r=t[s++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),i={oldStart:+r[1],oldLines:void 0===r[2]?1:+r[2],newStart:+r[3],newLines:void 0===r[4]?1:+r[4],lines:[]};0===i.oldLines&&(i.oldStart+=1),0===i.newLines&&(i.newStart+=1);let o=0,a=0;for(;s<t.length&&(a<i.oldLines||o<i.newLines||(null===(e=t[s])||void 0===e?void 0:e.startsWith("\\")));s++){const e=0==t[s].length&&s!=t.length-1?" ":t[s][0];if("+"!==e&&"-"!==e&&" "!==e&&"\\"!==e)throw new Error(`Hunk at line ${n+1} contained invalid line ${t[s]}`);i.lines.push(t[s]),"+"===e?o++:"-"===e?a++:" "===e&&(o++,a++)}if(o||1!==i.newLines||(i.newLines=0),a||1!==i.oldLines||(i.oldLines=0),o!==i.newLines)throw new Error("Added line count did not match for hunk at line "+(n+1));if(a!==i.oldLines)throw new Error("Removed line count did not match for hunk at line "+(n+1));return i}for(;s<t.length;)r();return n}function ml(e,t,n){let s=!0,r=!1,i=!1,o=1;return function a(){if(s&&!i){if(r?o++:s=!1,e+o<=n)return e+o;i=!0}if(!r)return i||(s=!0),t<=e-o?e-o++:(r=!0,a())}}function gl(e,t,n={}){let s;if(s="string"==typeof t?hl(t):Array.isArray(t)?t:[t],s.length>1)throw new Error("applyPatch only works with a single input.");return function(e,t,n={}){(n.autoConvertLineEndings||null==n.autoConvertLineEndings)&&(function(e){return e.includes("\r\n")&&!e.startsWith("\n")&&!e.match(/[^\r]\n/)}(e)&&function(e){return Array.isArray(e)||(e=[e]),!e.some(e=>e.hunks.some(e=>e.lines.some(e=>!e.startsWith("\\")&&e.endsWith("\r"))))}(t)?t=pl(t):function(e){return!e.includes("\r\n")&&e.includes("\n")}(e)&&function(e){return Array.isArray(e)||(e=[e]),e.some(e=>e.hunks.some(e=>e.lines.some(e=>e.endsWith("\r"))))&&e.every(e=>e.hunks.every(e=>e.lines.every((t,n)=>{var s;return t.startsWith("\\")||t.endsWith("\r")||(null===(s=e.lines[n+1])||void 0===s?void 0:s.startsWith("\\"))})))}(t)&&(t=dl(t)));const s=e.split("\n"),r=t.hunks,i=n.compareLine||((e,t,n,s)=>t===s),o=n.fuzzFactor||0;let a=0;if(o<0||!Number.isInteger(o))throw new Error("fuzzFactor must be a non-negative integer");if(!r.length)return e;let c="",u=!1,l=!1;for(let e=0;e<r[r.length-1].lines.length;e++){const t=r[r.length-1].lines[e];"\\"==t[0]&&("+"==c[0]?u=!0:"-"==c[0]&&(l=!0)),c=t}if(u){if(l){if(!o&&""==s[s.length-1])return!1}else if(""==s[s.length-1])s.pop();else if(!o)return!1}else if(l)if(""!=s[s.length-1])s.push("");else if(!o)return!1;function f(e,t,n,r=0,o=!0,a=[],c=0){let u=0,l=!1;for(;r<e.length;r++){const p=e[r],d=p.length>0?p[0]:" ",h=p.length>0?p.substr(1):p;if("-"===d){if(!i(t+1,s[t],d,h))return n&&null!=s[t]?(a[c]=s[t],f(e,t+1,n-1,r,!1,a,c+1)):null;t++,u=0}if("+"===d){if(!o)return null;a[c]=h,c++,u=0,l=!0}if(" "===d){if(u++,a[c]=s[t],!i(t+1,s[t],d,h))return l||!n?null:s[t]&&(f(e,t+1,n-1,r+1,!1,a,c+1)||f(e,t+1,n-1,r,!1,a,c+1))||f(e,t,n-1,r+1,!1,a,c);c++,o=!0,l=!1,t++}}return c-=u,t-=u,a.length=c,{patchedLines:a,oldLineLastI:t-1}}const p=[];let d=0;for(let e=0;e<r.length;e++){const t=r[e];let n;const i=s.length-t.oldLines+o;let c;for(let e=0;e<=o;e++){c=t.oldStart+d-1;const s=ml(c,a,i);for(;void 0!==c&&(n=f(t.lines,c,e),!n);c=s());if(n)break}if(!n)return!1;for(let e=a;e<c;e++)p.push(s[e]);for(let e=0;e<n.patchedLines.length;e++){const t=n.patchedLines[e];p.push(t)}a=n.oldLineLastI+1,d=c+1-t.oldStart}for(let e=a;e<s.length;e++)p.push(s[e]);return p.join("\n")}(e,s[0],n)}const yl=async e=>{const t=f.dirname(e);try{await m(t)}catch{}},bl=e=>{if(!e)return null;const t=e.replace(/^a\//,"").replace(/^b\//,"").trim();return t.length?t:null},vl=e=>"string"==typeof e&&"/dev/null"===e.trim(),_l=e=>e.replace(/\r/g,"").replace(/[ \t]+$/g,""),wl=e=>e.replace(/\n/g,"\r\n"),Sl=async e=>{const{cwd:t,cleaned:n,check:s,sandboxRoot:r,stanPath:o=".stan"}=e;let c;try{c=hl(n)}catch{return{okFiles:[],failed:[{path:"(patch)",reason:"invalid unified diff"}],sandboxRoot:r}}const u=c.some(e=>{const t=bl(e.oldFileName),n=bl(e.newFileName);return Boolean(t&&t.length||n&&n.length)});if(!c.length||!u)return{okFiles:[],failed:[{path:"(patch)",reason:"invalid unified diff"}],sandboxRoot:r};const l=[],p=[];for(const e of c){const n=bl(e.newFileName)??bl(e.oldFileName);if(!n){p.push({path:"(unknown)",reason:"no file name in patch header"});continue}const c=n.replace(/^\.\//,"").replace(/\\/g,"/"),u=f.resolve(t,c);if(ul(o,c)){p.push({path:c,reason:"refusing to modify protected imports path"});continue}const d=/\.md$/i.test(c);let h="",m=!1,g=!0;try{const e=await i(u,"utf8");h=e,m=/\r\n/.test(e)}catch{g=!1}const y=vl(e.oldFileName);if(!g&&!y){p.push({path:c,reason:"target file not found"});continue}let b;!g&&y&&(h="",m=!1);try{b=gl(h,e,{compareLine:(e,t,n,s)=>_l(t)===_l(s),fuzzFactor:d?1:0})}catch{p.push({path:c,reason:"unable to parse or place hunk(s)"});continue}if(!1===b||"string"!=typeof b){p.push({path:c,reason:"unable to place hunk(s)"});continue}const v=m?wl(b.replace(/\r/g,"")):b.replace(/\r/g,"");try{if(s){const e=r??f.join(t,o,"patch",".sandbox"),n=f.resolve(e,c);await yl(n),await a(n,v,"utf8")}else{try{await yl(u)}catch{}await a(u,v,"utf8")}l.push(c)}catch{p.push({path:c,reason:"write failed"})}}return{okFiles:l,failed:p,sandboxRoot:r}},kl=async e=>{const{cwd:t,patchAbs:n,cleaned:s,check:r,stripOrder:i=[1,0],stanPath:o=".stan"}=e,c=(e=>{const t=[];{const n=/^diff --git a\/(.+?) b\/(.+?)\s*$/gm;let s;for(;s=n.exec(e);){const e=s[2].trim();e&&"/dev/null"!==e&&t.push(e.replace(/^\.\/+/,"").replace(/\\/g,"/"))}}if(0===t.length){const n=/^\+\+\+\s+(?:b\/)?(.+?)\s*$/gm;let s;for(;s=n.exec(e);){const e=s[1].trim();e&&"/dev/null"!==e&&t.push(e.replace(/^\.\/+/,"").replace(/\\/g,"/"))}}return Array.from(new Set(t))})(s),l=((e,t)=>{const n=[];for(const s of t)ul(e,s)&&n.push(cl(s));return Array.from(new Set(n)).sort((e,t)=>e.localeCompare(t))})(o,c);if(l.length>0){return{ok:!1,result:{ok:!1,tried:[],lastCode:1,captures:[]},js:{okFiles:[],failed:l.map(e=>({path:e,reason:"refusing to modify protected imports path"})),sandboxRoot:void 0}}}const p=i.flatMap(e=>((e,t)=>{const n=e?["--check"]:[];return[{args:[...n,"--3way","--whitespace=nowarn","--recount","--inaccurate-eof",`-p${t.toString()}`],strip:t,label:`3way+nowarn-p${t.toString()}`},{args:[...n,"--3way","--ignore-whitespace","--recount","--inaccurate-eof",`-p${t.toString()}`],strip:t,label:`3way+ignore-p${t.toString()}`},{args:[...n,"--whitespace=nowarn","--recount","--inaccurate-eof",`-p${t.toString()}`],strip:t,label:`2way+nowarn-p${t.toString()}`},{args:[...n,"--ignore-whitespace","--recount","--inaccurate-eof",`-p${t.toString()}`],strip:t,label:`2way+ignore-p${t.toString()}`}]})(r,e)),d=await(async(e,t,n,s="1"===process.env.STAN_DEBUG)=>{const r=[],i=[];for(const o of n){r.push(o.label);const n=await new Promise(n=>{const r=E("git",["apply",...o.args,t],{cwd:e,shell:!1,windowsHide:!0});let a="",c="";const u=r;u.stderr?.on("data",e=>{const t=e.toString("utf8");c+=t,s&&process.stderr.write(t)}),u.stdout?.on("data",e=>{const t=e.toString("utf8");a+=t,s&&process.stdout.write(t)}),r.on("close",e=>{i.push({label:o.label,code:e??0,stdout:a,stderr:c}),n(e??0)})});if(0===n)return{ok:!0,tried:r,lastCode:0,captures:i};s&&console.error(`stan: git apply failed for ${o.label} (exit ${String(n)})`)}return{ok:!1,tried:r,lastCode:1,captures:i}})(t,n,p);if(d.ok)return{ok:!0,result:d,js:null};const h=await Sl({cwd:t,cleaned:s,check:r,stanPath:o});if(h.okFiles.length>0&&0===h.failed.length)return{ok:!0,result:d,js:h};try{const e=await(async(e,t,n,s)=>{const r=t.replace(/\r\n/g,"\n").split("\n");let i=-1,o=null;for(let e=0;e<r.length-1;e+=1)if(/^---\s+\/dev\/null\s*$/.test(r[e])){const t=r[e+1].match(/^\+\+\+\s+b\/(.+)\s*$/);if(t&&t[1]){i=e+1,o=t[1].trim().replace(/^\.\//,"").replace(/\\/g,"/");break}}if(!o||!o.length)return null;const c=r.slice(i+1).join("\n");if(/^---\s+\/dev\/null/m.test(c))return null;const l=[];let p=!1;for(let e=i+1;e<r.length;e+=1){const t=r[e];if(/^diff --git /.test(t))break;if(/^@@ /.test(t))p=!0;else if(p&&/^[ +-]/.test(t)){const e=t[0];"+"!==e&&" "!==e||l.push(t.slice(1))}}let d=l.join("\n");d.endsWith("\n")||(d+="\n");const h=n?f.join(e,s,"patch",".sandbox","F"):e,m=f.resolve(h,o);return await u(f.dirname(m),{recursive:!0}),await a(m,d,"utf8"),{okFiles:[o],failed:[],sandboxRoot:n?h:void 0}})(t,s,r,o);if(e)return{ok:!0,result:d,js:e}}catch{}return{ok:!1,result:d,js:h}};var Al,El={},xl={},Ol={};function $l(){if(Al)return Ol;return Al=1,Object.defineProperty(Ol,"__esModule",{value:!0}),Ol.splitWhen=Ol.flatten=void 0,Ol.flatten=function(e){return e.reduce((e,t)=>[].concat(e,t),[])},Ol.splitWhen=function(e,t){const n=[[]];let s=0;for(const r of e)t(r)?(s++,n[s]=[]):n[s].push(r);return n},Ol}var Tl,Nl={};function Rl(){if(Tl)return Nl;return Tl=1,Object.defineProperty(Nl,"__esModule",{value:!0}),Nl.isEnoentCodeError=void 0,Nl.isEnoentCodeError=function(e){return"ENOENT"===e.code},Nl}var Cl,Pl={};var Ll,Il={};function Ml(){if(Ll)return Il;Ll=1,Object.defineProperty(Il,"__esModule",{value:!0}),Il.convertPosixPathToPattern=Il.convertWindowsPathToPattern=Il.convertPathToPattern=Il.escapePosixPath=Il.escapeWindowsPath=Il.escape=Il.removeLeadingDotSegment=Il.makeAbsolute=Il.unixify=void 0;const e=O,t="win32"===x.platform(),n=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,s=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,r=/^\\\\([.?])/,i=/\\(?![!()+@[\]{}])/g;function o(e){return e.replace(s,"\\$2")}function a(e){return e.replace(n,"\\$2")}function c(e){return o(e).replace(r,"//$1").replace(i,"/")}function u(e){return a(e)}return Il.unixify=function(e){return e.replace(/\\/g,"/")},Il.makeAbsolute=function(t,n){return e.resolve(t,n)},Il.removeLeadingDotSegment=function(e){if("."===e.charAt(0)){const t=e.charAt(1);if("/"===t||"\\"===t)return e.slice(2)}return e},Il.escape=t?o:a,Il.escapeWindowsPath=o,Il.escapePosixPath=a,Il.convertPathToPattern=t?c:u,Il.convertWindowsPathToPattern=c,Il.convertPosixPathToPattern=u,Il}var Dl,jl,zl,Fl,Hl,Bl,Kl={};function Ul(){return jl?Dl:(jl=1,Dl=function(e){if("string"!=typeof e||""===e)return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1})}function Wl(){if(Fl)return zl;Fl=1;var e=Ul(),t={"{":"}","(":")","[":"]"},n=function(e){if("!"===e[0])return!0;for(var n=0,s=-2,r=-2,i=-2,o=-2,a=-2;n<e.length;){if("*"===e[n])return!0;if("?"===e[n+1]&&/[\].+)]/.test(e[n]))return!0;if(-1!==r&&"["===e[n]&&"]"!==e[n+1]&&(r<n&&(r=e.indexOf("]",n)),r>n)){if(-1===a||a>r)return!0;if(-1===(a=e.indexOf("\\",n))||a>r)return!0}if(-1!==i&&"{"===e[n]&&"}"!==e[n+1]&&(i=e.indexOf("}",n))>n&&(-1===(a=e.indexOf("\\",n))||a>i))return!0;if(-1!==o&&"("===e[n]&&"?"===e[n+1]&&/[:!=]/.test(e[n+2])&&")"!==e[n+3]&&(o=e.indexOf(")",n))>n&&(-1===(a=e.indexOf("\\",n))||a>o))return!0;if(-1!==s&&"("===e[n]&&"|"!==e[n+1]&&(s<n&&(s=e.indexOf("|",n)),-1!==s&&")"!==e[s+1]&&(o=e.indexOf(")",s))>s&&(-1===(a=e.indexOf("\\",s))||a>o)))return!0;if("\\"===e[n]){var c=e[n+1];n+=2;var u=t[c];if(u){var l=e.indexOf(u,n);-1!==l&&(n=l+1)}if("!"===e[n])return!0}else n++}return!1},s=function(e){if("!"===e[0])return!0;for(var n=0;n<e.length;){if(/[*?{}()[\]]/.test(e[n]))return!0;if("\\"===e[n]){var s=e[n+1];n+=2;var r=t[s];if(r){var i=e.indexOf(r,n);-1!==i&&(n=i+1)}if("!"===e[n])return!0}else n++}return!1};return zl=function(t,r){if("string"!=typeof t||""===t)return!1;if(e(t))return!0;var i=n;return r&&!1===r.strict&&(i=s),i(t)}}var ql,Zl,Gl,Vl,Jl,Yl,Ql,Xl,ef,tf,nf,sf,rf,of,af,cf,uf,lf,ff,pf={};function df(){return ql||(ql=1,(e=pf).isInteger=e=>"number"==typeof e?Number.isInteger(e):"string"==typeof e&&""!==e.trim()&&Number.isInteger(Number(e)),e.find=(e,t)=>e.nodes.find(e=>e.type===t),e.exceedsLimit=(t,n,s=1,r)=>!1!==r&&!(!e.isInteger(t)||!e.isInteger(n))&&(Number(n)-Number(t))/Number(s)>=r,e.escapeNode=(e,t=0,n)=>{const s=e.nodes[t];s&&(n&&s.type===n||"open"===s.type||"close"===s.type)&&!0!==s.escaped&&(s.value="\\"+s.value,s.escaped=!0)},e.encloseBrace=e=>!("brace"!==e.type||e.commas>>0+e.ranges|0||(e.invalid=!0,0)),e.isInvalidBrace=e=>!("brace"!==e.type||!0!==e.invalid&&!e.dollar&&(e.commas>>0+e.ranges|0&&!0===e.open&&!0===e.close||(e.invalid=!0,0))),e.isOpenOrClose=e=>"open"===e.type||"close"===e.type||!0===e.open||!0===e.close,e.reduce=e=>e.reduce((e,t)=>("text"===t.type&&e.push(t.value),"range"===t.type&&(t.type="text"),e),[]),e.flatten=(...e)=>{const t=[],n=e=>{for(let s=0;s<e.length;s++){const r=e[s];Array.isArray(r)?n(r):void 0!==r&&t.push(r)}return t};return n(e),t}),pf;var e}function hf(){if(Gl)return Zl;Gl=1;const e=df();return Zl=(t,n={})=>{const s=(t,r={})=>{const i=n.escapeInvalid&&e.isInvalidBrace(r),o=!0===t.invalid&&!0===n.escapeInvalid;let a="";if(t.value)return(i||o)&&e.isOpenOrClose(t)?"\\"+t.value:t.value;if(t.value)return t.value;if(t.nodes)for(const e of t.nodes)a+=s(e);return a};return s(t)}}function mf(){return Jl?Vl:(Jl=1,Vl=function(e){return"number"==typeof e?e-e===0:"string"==typeof e&&""!==e.trim()&&(Number.isFinite?Number.isFinite(+e):isFinite(+e))})}function gf(){if(Ql)return Yl;Ql=1;const e=mf(),t=(n,i,o)=>{if(!1===e(n))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===i||n===i)return String(n);if(!1===e(i))throw new TypeError("toRegexRange: expected the second argument to be a number.");let a={relaxZeros:!0,...o};"boolean"==typeof a.strictZeros&&(a.relaxZeros=!1===a.strictZeros);let c=n+":"+i+"="+String(a.relaxZeros)+String(a.shorthand)+String(a.capture)+String(a.wrap);if(t.cache.hasOwnProperty(c))return t.cache[c].result;let u=Math.min(n,i),l=Math.max(n,i);if(1===Math.abs(u-l)){let e=n+"|"+i;return a.capture?`(${e})`:!1===a.wrap?e:`(?:${e})`}let p=f(n)||f(i),d={min:n,max:i,a:u,b:l},h=[],m=[];if(p&&(d.isPadded=p,d.maxLen=String(d.max).length),u<0){m=s(l<0?Math.abs(l):1,Math.abs(u),d,a),u=d.a=0}return l>=0&&(h=s(u,l,d,a)),d.negatives=m,d.positives=h,d.result=function(e,t){let n=r(e,t,"-",!1)||[],s=r(t,e,"",!1)||[],i=r(e,t,"-?",!0)||[];return n.concat(i).concat(s).join("|")}(m,h),!0===a.capture?d.result=`(${d.result})`:!1!==a.wrap&&h.length+m.length>1&&(d.result=`(?:${d.result})`),t.cache[c]=d,d.result};function n(e,t,n){if(e===t)return{pattern:e,count:[],digits:0};let s=function(e,t){let n=[];for(let s=0;s<e.length;s++)n.push([e[s],t[s]]);return n}(e,t),r=s.length,i="",o=0;for(let e=0;e<r;e++){let[t,n]=s[e];t===n?i+=t:"0"!==t||"9"!==n?i+=l(t,n):o++}return o&&(i+=!0===n.shorthand?"\\d":"[0-9]"),{pattern:i,count:[o],digits:r}}function s(e,t,s,r){let o,l=function(e,t){let n=1,s=1,r=a(e,n),o=new Set([t]);for(;e<=r&&r<=t;)o.add(r),n+=1,r=a(e,n);for(r=c(t+1,s)-1;e<r&&r<=t;)o.add(r),s+=1,r=c(t+1,s)-1;return o=[...o],o.sort(i),o}(e,t),f=[],d=e;for(let e=0;e<l.length;e++){let t=l[e],i=n(String(d),String(t),r),a="";s.isPadded||!o||o.pattern!==i.pattern?(s.isPadded&&(a=p(t,s,r)),i.string=a+i.pattern+u(i.count),f.push(i),d=t+1,o=i):(o.count.length>1&&o.count.pop(),o.count.push(i.count[0]),o.string=o.pattern+u(o.count),d=t+1)}return f}function r(e,t,n,s,r){let i=[];for(let r of e){let{string:e}=r;s||o(t,"string",e)||i.push(n+e),s&&o(t,"string",e)&&i.push(n+e)}return i}function i(e,t){return e>t?1:t>e?-1:0}function o(e,t,n){return e.some(e=>e[t]===n)}function a(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function c(e,t){return e-e%Math.pow(10,t)}function u(e){let[t=0,n=""]=e;return n||t>1?`{${t+(n?","+n:"")}}`:""}function l(e,t,n){return`[${e}${t-e===1?"":"-"}${t}]`}function f(e){return/^-?(0+)\d/.test(e)}function p(e,t,n){if(!t.isPadded)return e;let s=Math.abs(t.maxLen-String(e).length),r=!1!==n.relaxZeros;switch(s){case 0:return"";case 1:return r?"0?":"0";case 2:return r?"0{0,2}":"00";default:return r?`0{0,${s}}`:`0{${s}}`}}return t.cache={},t.clearCache=()=>t.cache={},Yl=t}function yf(){if(ef)return Xl;ef=1;const e=$,t=gf(),n=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),s=e=>"number"==typeof e||"string"==typeof e&&""!==e,r=e=>Number.isInteger(+e),i=e=>{let t=`${e}`,n=-1;if("-"===t[0]&&(t=t.slice(1)),"0"===t)return!1;for(;"0"===t[++n];);return n>0},o=(e,t,n)=>{if(t>0){let n="-"===e[0]?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return!1===n?String(e):e},a=(e,t)=>{let n="-"===e[0]?"-":"";for(n&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return n?"-"+e:e},c=(e,n,s,r)=>{if(s)return t(e,n,{wrap:!1,...r});let i=String.fromCharCode(e);return e===n?i:`[${i}-${String.fromCharCode(n)}]`},u=(e,n,s)=>{if(Array.isArray(e)){let t=!0===s.wrap,n=s.capture?"":"?:";return t?`(${n}${e.join("|")})`:e.join("|")}return t(e,n,s)},l=(...t)=>new RangeError("Invalid range arguments: "+e.inspect(...t)),f=(e,t,n)=>{if(!0===n.strictRanges)throw l([e,t]);return[]},p=(e,t,n=1,s={})=>{let r=Number(e),f=Number(t);if(!Number.isInteger(r)||!Number.isInteger(f)){if(!0===s.strictRanges)throw l([e,t]);return[]}0===r&&(r=0),0===f&&(f=0);let p=r>f,d=String(e),h=String(t),m=String(n);n=Math.max(Math.abs(n),1);let g=i(d)||i(h)||i(m),y=g?Math.max(d.length,h.length,m.length):0,b=!1===g&&!1===((e,t,n)=>"string"==typeof e||"string"==typeof t||!0===n.stringify)(e,t,s),v=s.transform||(e=>t=>!0===e?Number(t):String(t))(b);if(s.toRegex&&1===n)return c(a(e,y),a(t,y),!0,s);let _={negatives:[],positives:[]},w=e=>_[e<0?"negatives":"positives"].push(Math.abs(e)),S=[],k=0;for(;p?r>=f:r<=f;)!0===s.toRegex&&n>1?w(r):S.push(o(v(r,k),y,b)),r=p?r-n:r+n,k++;return!0===s.toRegex?n>1?((e,t,n)=>{e.negatives.sort((e,t)=>e<t?-1:e>t?1:0),e.positives.sort((e,t)=>e<t?-1:e>t?1:0);let s,r=t.capture?"":"?:",i="",o="";return e.positives.length&&(i=e.positives.map(e=>a(String(e),n)).join("|")),e.negatives.length&&(o=`-(${r}${e.negatives.map(e=>a(String(e),n)).join("|")})`),s=i&&o?`${i}|${o}`:i||o,t.wrap?`(${r}${s})`:s})(_,s,y):u(S,null,{wrap:!1,...s}):S},d=(e,t,i,o={})=>{if(null==t&&s(e))return[e];if(!s(e)||!s(t))return f(e,t,o);if("function"==typeof i)return d(e,t,1,{transform:i});if(n(i))return d(e,t,0,i);let a={...o};return!0===a.capture&&(a.wrap=!0),i=i||a.step||1,r(i)?r(e)&&r(t)?p(e,t,i,a):((e,t,n=1,s={})=>{if(!r(e)&&e.length>1||!r(t)&&t.length>1)return f(e,t,s);let i=s.transform||(e=>String.fromCharCode(e)),o=`${e}`.charCodeAt(0),a=`${t}`.charCodeAt(0),l=o>a,p=Math.min(o,a),d=Math.max(o,a);if(s.toRegex&&1===n)return c(p,d,!1,s);let h=[],m=0;for(;l?o>=a:o<=a;)h.push(i(o,m)),o=l?o-n:o+n,m++;return!0===s.toRegex?u(h,null,{wrap:!1,options:s}):h})(e,t,Math.max(Math.abs(i),1),a):null==i||n(i)?d(e,t,1,i):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(i,a)};return Xl=d}function bf(){if(uf)return cf;uf=1;const e=hf(),{MAX_LENGTH:t,CHAR_BACKSLASH:n,CHAR_BACKTICK:s,CHAR_COMMA:r,CHAR_DOT:i,CHAR_LEFT_PARENTHESES:o,CHAR_RIGHT_PARENTHESES:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_RIGHT_CURLY_BRACE:u,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_RIGHT_SQUARE_BRACKET:f,CHAR_DOUBLE_QUOTE:p,CHAR_SINGLE_QUOTE:d,CHAR_NO_BREAK_SPACE:h,CHAR_ZERO_WIDTH_NOBREAK_SPACE:m}=af?of:(af=1,of={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"});return cf=(g,y={})=>{if("string"!=typeof g)throw new TypeError("Expected a string");const b=y||{},v="number"==typeof b.maxLength?Math.min(t,b.maxLength):t;if(g.length>v)throw new SyntaxError(`Input length (${g.length}), exceeds max characters (${v})`);const _={type:"root",input:g,nodes:[]},w=[_];let S=_,k=_,A=0;const E=g.length;let x,O=0,$=0;const T=()=>g[O++],N=e=>{if("text"===e.type&&"dot"===k.type&&(k.type="text"),!k||"text"!==k.type||"text"!==e.type)return S.nodes.push(e),e.parent=S,e.prev=k,k=e,e;k.value+=e.value};for(N({type:"bos"});O<E;)if(S=w[w.length-1],x=T(),x!==m&&x!==h)if(x!==n)if(x!==f){if(x===l){let e;for(A++;O<E&&(e=T());)if(x+=e,e!==l)if(e!==n){if(e===f&&(A--,0===A))break}else x+=T();else A++;N({type:"text",value:x});continue}if(x!==o)if(x!==a){if(x===p||x===d||x===s){const e=x;let t;for(!0!==y.keepQuotes&&(x="");O<E&&(t=T());)if(t!==n){if(t===e){!0===y.keepQuotes&&(x+=t);break}x+=t}else x+=t+T();N({type:"text",value:x});continue}if(x===c){$++;const e=k.value&&"$"===k.value.slice(-1)||!0===S.dollar;S=N({type:"brace",open:!0,close:!1,dollar:e,depth:$,commas:0,ranges:0,nodes:[]}),w.push(S),N({type:"open",value:x});continue}if(x===u){if("brace"!==S.type){N({type:"text",value:x});continue}const e="close";S=w.pop(),S.close=!0,N({type:e,value:x}),$--,S=w[w.length-1];continue}if(x===r&&$>0){if(S.ranges>0){S.ranges=0;const t=S.nodes.shift();S.nodes=[t,{type:"text",value:e(S)}]}N({type:"comma",value:x}),S.commas++}else{if(x===i&&$>0&&0===S.commas){const e=S.nodes;if(0===$||0===e.length){N({type:"text",value:x});continue}if("dot"===k.type){if(S.range=[],k.value+=x,k.type="range",3!==S.nodes.length&&5!==S.nodes.length){S.invalid=!0,S.ranges=0,k.type="text";continue}S.ranges++,S.args=[];continue}if("range"===k.type){e.pop();const t=e[e.length-1];t.value+=k.value+x,k=t,S.ranges--;continue}N({type:"dot",value:x});continue}N({type:"text",value:x})}}else{if("paren"!==S.type){N({type:"text",value:x});continue}S=w.pop(),N({type:"text",value:x}),S=w[w.length-1]}else S=N({type:"paren",nodes:[]}),w.push(S),N({type:"text",value:x})}else N({type:"text",value:"\\"+x});else N({type:"text",value:(y.keepEscaping?x:"")+T()});do{if(S=w.pop(),"root"!==S.type){S.nodes.forEach(e=>{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)});const e=w[w.length-1],t=e.nodes.indexOf(S);e.nodes.splice(t,1,...S.nodes)}}while(w.length>0);return N({type:"eos"}),_}}function vf(){if(ff)return lf;ff=1;const e=hf(),t=function(){if(nf)return tf;nf=1;const e=yf(),t=df();return tf=(n,s={})=>{const r=(n,i={})=>{const o=t.isInvalidBrace(i),a=!0===n.invalid&&!0===s.escapeInvalid,c=!0===o||!0===a,u=!0===s.escapeInvalid?"\\":"";let l="";if(!0===n.isOpen)return u+n.value;if(!0===n.isClose)return console.log("node.isClose",u,n.value),u+n.value;if("open"===n.type)return c?u+n.value:"(";if("close"===n.type)return c?u+n.value:")";if("comma"===n.type)return"comma"===n.prev.type?"":c?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){const r=t.reduce(n.nodes),i=e(...r,{...s,wrap:!1,toRegex:!0,strictZeros:!0});if(0!==i.length)return r.length>1&&i.length>1?`(${i})`:i}if(n.nodes)for(const e of n.nodes)l+=r(e,n);return l};return r(n)}}(),n=function(){if(rf)return sf;rf=1;const e=yf(),t=hf(),n=df(),s=(e="",t="",r=!1)=>{const i=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return r?n.flatten(t).map(e=>`{${e}}`):t;for(const n of e)if(Array.isArray(n))for(const e of n)i.push(s(e,t,r));else for(let e of t)!0===r&&"string"==typeof e&&(e=`{${e}}`),i.push(Array.isArray(e)?s(n,e,r):n+e);return n.flatten(i)};return sf=(r,i={})=>{const o=void 0===i.rangeLimit?1e3:i.rangeLimit,a=(r,c={})=>{r.queue=[];let u=c,l=c.queue;for(;"brace"!==u.type&&"root"!==u.type&&u.parent;)u=u.parent,l=u.queue;if(r.invalid||r.dollar)return void l.push(s(l.pop(),t(r,i)));if("brace"===r.type&&!0!==r.invalid&&2===r.nodes.length)return void l.push(s(l.pop(),["{}"]));if(r.nodes&&r.ranges>0){const a=n.reduce(r.nodes);if(n.exceedsLimit(...a,i.step,o))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let c=e(...a,i);return 0===c.length&&(c=t(r,i)),l.push(s(l.pop(),c)),void(r.nodes=[])}const f=n.encloseBrace(r);let p=r.queue,d=r;for(;"brace"!==d.type&&"root"!==d.type&&d.parent;)d=d.parent,p=d.queue;for(let e=0;e<r.nodes.length;e++){const t=r.nodes[e];"comma"!==t.type||"brace"!==r.type?"close"!==t.type?t.value&&"open"!==t.type?p.push(s(p.pop(),t.value)):t.nodes&&a(t,r):l.push(s(l.pop(),p,f)):(1===e&&p.push(""),p.push(""))}return p};return n.flatten(a(r))},sf}(),s=bf(),r=(e,t={})=>{let n=[];if(Array.isArray(e))for(const s of e){const e=r.create(s,t);Array.isArray(e)?n.push(...e):n.push(e)}else n=[].concat(r.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(n=[...new Set(n)]),n};return r.parse=(e,t={})=>s(e,t),r.stringify=(t,n={})=>e("string"==typeof t?r.parse(t,n):t,n),r.compile=(e,n={})=>("string"==typeof e&&(e=r.parse(e,n)),t(e,n)),r.expand=(e,t={})=>{"string"==typeof e&&(e=r.parse(e,t));let s=n(e,t);return!0===t.noempty&&(s=s.filter(Boolean)),!0===t.nodupes&&(s=[...new Set(s)]),s},r.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?r.compile(e,t):r.expand(e,t),lf=r}var _f,wf,Sf,kf,Af,Ef,xf,Of,$f,Tf,Nf,Rf,Cf,Pf,Lf={};function If(){if(wf)return _f;wf=1;const e=O,t="\\\\/",n=`[^${t}]`,s="\\.",r="\\/",i="[^/]",o=`(?:${r}|$)`,a=`(?:^|${r})`,c=`${s}{1,2}${o}`,u={DOT_LITERAL:s,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:r,ONE_CHAR:"(?=.)",QMARK:i,END_ANCHOR:o,DOTS_SLASH:c,NO_DOT:`(?!${s})`,NO_DOTS:`(?!${a}${c})`,NO_DOT_SLASH:`(?!${s}{0,1}${o})`,NO_DOTS_SLASH:`(?!${c})`,QMARK_NO_DOT:`[^.${r}]`,STAR:`${i}*?`,START_ANCHOR:a},l={...u,SLASH_LITERAL:`[${t}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${s}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${s})`,NO_DOTS:`(?!(?:^|[${t}])${s}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${s}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${s}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`};return _f={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:e.sep,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?l:u}}function Mf(){return Sf||(Sf=1,function(e){const t=O,n="win32"===process.platform,{REGEX_BACKSLASH:s,REGEX_REMOVE_BACKSLASH:r,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:o}=If();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>i.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(o,"\\$1"),e.toPosixSlashes=e=>e.replace(s,"/"),e.removeBackslashes=e=>e.replace(r,e=>"\\"===e?"":e),e.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},e.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===n||"\\"===t.sep,e.escapeLast=(t,n,s)=>{const r=t.lastIndexOf(n,s);return-1===r?t:"\\"===t[r-1]?e.escapeLast(t,n,r-1):`${t.slice(0,r)}\\${t.slice(r)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let s=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(s=`(?:^(?!${s}).*$)`),s}}(Lf)),Lf}function Df(){if($f)return Of;$f=1;const e=O,t=function(){if(Af)return kf;Af=1;const e=Mf(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:s,CHAR_COMMA:r,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:u,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:f,CHAR_QUESTION_MARK:p,CHAR_RIGHT_CURLY_BRACE:d,CHAR_RIGHT_PARENTHESES:h,CHAR_RIGHT_SQUARE_BRACKET:m}=If(),g=e=>e===a||e===s,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return kf=(b,v)=>{const _=v||{},w=b.length-1,S=!0===_.parts||!0===_.scanToEnd,k=[],A=[],E=[];let x,O,$=b,T=-1,N=0,R=0,C=!1,P=!1,L=!1,I=!1,M=!1,D=!1,j=!1,z=!1,F=!1,H=!1,B=0,K={value:"",depth:0,isGlob:!1};const U=()=>T>=w,W=()=>$.charCodeAt(T+1),q=()=>(x=O,$.charCodeAt(++T));for(;T<w;){let e;if(O=q(),O!==s){if(!0===D||O===c){for(B++;!0!==U()&&(O=q());)if(O!==s)if(O!==c){if(!0!==D&&O===i&&(O=q())===i){if(C=K.isBrace=!0,L=K.isGlob=!0,H=!0,!0===S)continue;break}if(!0!==D&&O===r){if(C=K.isBrace=!0,L=K.isGlob=!0,H=!0,!0===S)continue;break}if(O===d&&(B--,0===B)){D=!1,C=K.isBrace=!0,H=!0;break}}else B++;else j=K.backslashes=!0,q();if(!0===S)continue;break}if(O!==a){if(!0!==_.noext&&!0==(O===f||O===n||O===t||O===p||O===o)&&W()===u){if(L=K.isGlob=!0,I=K.isExtglob=!0,H=!0,O===o&&T===N&&(F=!0),!0===S){for(;!0!==U()&&(O=q());)if(O!==s){if(O===h){L=K.isGlob=!0,H=!0;break}}else j=K.backslashes=!0,O=q();continue}break}if(O===t){if(x===t&&(M=K.isGlobstar=!0),L=K.isGlob=!0,H=!0,!0===S)continue;break}if(O===p){if(L=K.isGlob=!0,H=!0,!0===S)continue;break}if(O===l){for(;!0!==U()&&(e=q());)if(e!==s){if(e===m){P=K.isBracket=!0,L=K.isGlob=!0,H=!0;break}}else j=K.backslashes=!0,q();if(!0===S)continue;break}if(!0===_.nonegate||O!==o||T!==N){if(!0!==_.noparen&&O===u){if(L=K.isGlob=!0,!0===S){for(;!0!==U()&&(O=q());)if(O!==u){if(O===h){H=!0;break}}else j=K.backslashes=!0,O=q();continue}break}if(!0===L){if(H=!0,!0===S)continue;break}}else z=K.negated=!0,N++}else{if(k.push(T),A.push(K),K={value:"",depth:0,isGlob:!1},!0===H)continue;if(x===i&&T===N+1){N+=2;continue}R=T+1}}else j=K.backslashes=!0,O=q(),O===c&&(D=!0)}!0===_.noext&&(I=!1,L=!1);let Z=$,G="",V="";N>0&&(G=$.slice(0,N),$=$.slice(N),R-=N),Z&&!0===L&&R>0?(Z=$.slice(0,R),V=$.slice(R)):!0===L?(Z="",V=$):Z=$,Z&&""!==Z&&"/"!==Z&&Z!==$&&g(Z.charCodeAt(Z.length-1))&&(Z=Z.slice(0,-1)),!0===_.unescape&&(V&&(V=e.removeBackslashes(V)),Z&&!0===j&&(Z=e.removeBackslashes(Z)));const J={prefix:G,input:b,start:N,base:Z,glob:V,isBrace:C,isBracket:P,isGlob:L,isExtglob:I,isGlobstar:M,negated:z,negatedExtglob:F};if(!0===_.tokens&&(J.maxDepth=0,g(O)||A.push(K),J.tokens=A),!0===_.parts||!0===_.tokens){let e;for(let t=0;t<k.length;t++){const n=e?e+1:N,s=k[t],r=b.slice(n,s);_.tokens&&(0===t&&0!==N?(A[t].isPrefix=!0,A[t].value=G):A[t].value=r,y(A[t]),J.maxDepth+=A[t].depth),0===t&&""===r||E.push(r),e=s}if(e&&e+1<b.length){const t=b.slice(e+1);E.push(t),_.tokens&&(A[A.length-1].value=t,y(A[A.length-1]),J.maxDepth+=A[A.length-1].depth)}J.slashes=k,J.parts=E}return J},kf}(),n=function(){if(xf)return Ef;xf=1;const e=If(),t=Mf(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:s,REGEX_NON_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:o}=e,a=(e,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...e,n);e.sort();const s=`[${e.join("-")}]`;try{new RegExp(s)}catch(n){return e.map(e=>t.escapeRegex(e)).join("..")}return s},c=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,u=(l,f)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=o[l]||l;const p={...f},d="number"==typeof p.maxLength?Math.min(n,p.maxLength):n;let h=l.length;if(h>d)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${d}`);const m={type:"bos",value:"",output:p.prepend||""},g=[m],y=p.capture?"":"?:",b=t.isWindows(f),v=e.globChars(b),_=e.extglobChars(v),{DOT_LITERAL:w,PLUS_LITERAL:S,SLASH_LITERAL:k,ONE_CHAR:A,DOTS_SLASH:E,NO_DOT:x,NO_DOT_SLASH:O,NO_DOTS_SLASH:$,QMARK:T,QMARK_NO_DOT:N,STAR:R,START_ANCHOR:C}=v,P=e=>`(${y}(?:(?!${C}${e.dot?E:w}).)*?)`,L=p.dot?"":x,I=p.dot?T:N;let M=!0===p.bash?P(p):R;p.capture&&(M=`(${M})`),"boolean"==typeof p.noext&&(p.noextglob=p.noext);const D={input:l,index:-1,start:0,dot:!0===p.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};l=t.removePrefix(l,D),h=l.length;const j=[],z=[],F=[];let H,B=m;const K=()=>D.index===h-1,U=D.peek=(e=1)=>l[D.index+e],W=D.advance=()=>l[++D.index]||"",q=()=>l.slice(D.index+1),Z=(e="",t=0)=>{D.consumed+=e,D.index+=t},G=e=>{D.output+=null!=e.output?e.output:e.value,Z(e.value)},V=()=>{let e=1;for(;"!"===U()&&("("!==U(2)||"?"===U(3));)W(),D.start++,e++;return e%2!=0&&(D.negated=!0,D.start++,!0)},J=e=>{D[e]++,F.push(e)},Y=e=>{D[e]--,F.pop()},Q=e=>{if("globstar"===B.type){const t=D.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||j.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(D.output=D.output.slice(0,-B.output.length),B.type="star",B.value="*",B.output=M,D.output+=B.output)}if(j.length&&"paren"!==e.type&&(j[j.length-1].inner+=e.value),(e.value||e.output)&&G(e),B&&"text"===B.type&&"text"===e.type)return B.value+=e.value,void(B.output=(B.output||"")+e.value);e.prev=B,g.push(e),B=e},X=(e,t)=>{const n={..._[t],conditions:1,inner:""};n.prev=B,n.parens=D.parens,n.output=D.output;const s=(p.capture?"(":"")+n.open;J("parens"),Q({type:e,value:t,output:D.output?"":A}),Q({type:"paren",extglob:!0,value:W(),output:s}),j.push(n)},ee=e=>{let t,n=e.close+(p.capture?")":"");if("negate"===e.type){let s=M;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(s=P(p)),(s!==M||K()||/^\)+$/.test(q()))&&(n=e.close=`)$))${s}`),e.inner.includes("*")&&(t=q())&&/^\.[^\\/.]+$/.test(t)){const r=u(t,{...f,fastpaths:!1}).output;n=e.close=`)${r})${s})`}"bos"===e.prev.type&&(D.negatedExtglob=!0)}Q({type:"paren",extglob:!0,value:H,output:n}),Y("parens")};if(!1!==p.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let e=!1,n=l.replace(i,(t,n,s,r,i,o)=>"\\"===r?(e=!0,t):"?"===r?n?n+r+(i?T.repeat(i.length):""):0===o?I+(i?T.repeat(i.length):""):T.repeat(s.length):"."===r?w.repeat(s.length):"*"===r?n?n+r+(i?M:""):M:n?t:`\\${t}`);return!0===e&&(n=!0===p.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===l&&!0===p.contains?(D.output=l,D):(D.output=t.wrapOutput(n,D,f),D)}for(;!K();){if(H=W(),"\0"===H)continue;if("\\"===H){const e=U();if("/"===e&&!0!==p.bash)continue;if("."===e||";"===e)continue;if(!e){H+="\\",Q({type:"text",value:H});continue}const t=/^\\+/.exec(q());let n=0;if(t&&t[0].length>2&&(n=t[0].length,D.index+=n,n%2!=0&&(H+="\\")),!0===p.unescape?H=W():H+=W(),0===D.brackets){Q({type:"text",value:H});continue}}if(D.brackets>0&&("]"!==H||"["===B.value||"[^"===B.value)){if(!1!==p.posix&&":"===H){const e=B.value.slice(1);if(e.includes("[")&&(B.posix=!0,e.includes(":"))){const e=B.value.lastIndexOf("["),t=B.value.slice(0,e),n=B.value.slice(e+2),r=s[n];if(r){B.value=t+r,D.backtrack=!0,W(),m.output||1!==g.indexOf(B)||(m.output=A);continue}}}("["===H&&":"!==U()||"-"===H&&"]"===U())&&(H=`\\${H}`),"]"!==H||"["!==B.value&&"[^"!==B.value||(H=`\\${H}`),!0===p.posix&&"!"===H&&"["===B.value&&(H="^"),B.value+=H,G({value:H});continue}if(1===D.quotes&&'"'!==H){H=t.escapeRegex(H),B.value+=H,G({value:H});continue}if('"'===H){D.quotes=1===D.quotes?0:1,!0===p.keepQuotes&&Q({type:"text",value:H});continue}if("("===H){J("parens"),Q({type:"paren",value:H});continue}if(")"===H){if(0===D.parens&&!0===p.strictBrackets)throw new SyntaxError(c("opening","("));const e=j[j.length-1];if(e&&D.parens===e.parens+1){ee(j.pop());continue}Q({type:"paren",value:H,output:D.parens?")":"\\)"}),Y("parens");continue}if("["===H){if(!0!==p.nobracket&&q().includes("]"))J("brackets");else{if(!0!==p.nobracket&&!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));H=`\\${H}`}Q({type:"bracket",value:H});continue}if("]"===H){if(!0===p.nobracket||B&&"bracket"===B.type&&1===B.value.length){Q({type:"text",value:H,output:`\\${H}`});continue}if(0===D.brackets){if(!0===p.strictBrackets)throw new SyntaxError(c("opening","["));Q({type:"text",value:H,output:`\\${H}`});continue}Y("brackets");const e=B.value.slice(1);if(!0===B.posix||"^"!==e[0]||e.includes("/")||(H=`/${H}`),B.value+=H,G({value:H}),!1===p.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(B.value);if(D.output=D.output.slice(0,-B.value.length),!0===p.literalBrackets){D.output+=n,B.value=n;continue}B.value=`(${y}${n}|${B.value})`,D.output+=B.value;continue}if("{"===H&&!0!==p.nobrace){J("braces");const e={type:"brace",value:H,output:"(",outputIndex:D.output.length,tokensIndex:D.tokens.length};z.push(e),Q(e);continue}if("}"===H){const e=z[z.length-1];if(!0===p.nobrace||!e){Q({type:"text",value:H,output:H});continue}let t=")";if(!0===e.dots){const e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=a(n,p),D.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=D.output.slice(0,e.outputIndex),s=D.tokens.slice(e.tokensIndex);e.value=e.output="\\{",H=t="\\}",D.output=n;for(const e of s)D.output+=e.output||e.value}Q({type:"brace",value:H,output:t}),Y("braces"),z.pop();continue}if("|"===H){j.length>0&&j[j.length-1].conditions++,Q({type:"text",value:H});continue}if(","===H){let e=H;const t=z[z.length-1];t&&"braces"===F[F.length-1]&&(t.comma=!0,e="|"),Q({type:"comma",value:H,output:e});continue}if("/"===H){if("dot"===B.type&&D.index===D.start+1){D.start=D.index+1,D.consumed="",D.output="",g.pop(),B=m;continue}Q({type:"slash",value:H,output:k});continue}if("."===H){if(D.braces>0&&"dot"===B.type){"."===B.value&&(B.output=w);const e=z[z.length-1];B.type="dots",B.output+=H,B.value+=H,e.dots=!0;continue}if(D.braces+D.parens===0&&"bos"!==B.type&&"slash"!==B.type){Q({type:"text",value:H,output:w});continue}Q({type:"dot",value:H,output:w});continue}if("?"===H){if((!B||"("!==B.value)&&!0!==p.noextglob&&"("===U()&&"?"!==U(2)){X("qmark",H);continue}if(B&&"paren"===B.type){const e=U();let n=H;if("<"===e&&!t.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===B.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(q()))&&(n=`\\${H}`),Q({type:"text",value:H,output:n});continue}if(!0!==p.dot&&("slash"===B.type||"bos"===B.type)){Q({type:"qmark",value:H,output:N});continue}Q({type:"qmark",value:H,output:T});continue}if("!"===H){if(!0!==p.noextglob&&"("===U()&&("?"!==U(2)||!/[!=<:]/.test(U(3)))){X("negate",H);continue}if(!0!==p.nonegate&&0===D.index){V();continue}}if("+"===H){if(!0!==p.noextglob&&"("===U()&&"?"!==U(2)){X("plus",H);continue}if(B&&"("===B.value||!1===p.regex){Q({type:"plus",value:H,output:S});continue}if(B&&("bracket"===B.type||"paren"===B.type||"brace"===B.type)||D.parens>0){Q({type:"plus",value:H});continue}Q({type:"plus",value:S});continue}if("@"===H){if(!0!==p.noextglob&&"("===U()&&"?"!==U(2)){Q({type:"at",extglob:!0,value:H,output:""});continue}Q({type:"text",value:H});continue}if("*"!==H){"$"!==H&&"^"!==H||(H=`\\${H}`);const e=r.exec(q());e&&(H+=e[0],D.index+=e[0].length),Q({type:"text",value:H});continue}if(B&&("globstar"===B.type||!0===B.star)){B.type="star",B.star=!0,B.value+=H,B.output=M,D.backtrack=!0,D.globstar=!0,Z(H);continue}let e=q();if(!0!==p.noextglob&&/^\([^?]/.test(e)){X("star",H);continue}if("star"===B.type){if(!0===p.noglobstar){Z(H);continue}const t=B.prev,n=t.prev,s="slash"===t.type||"bos"===t.type,r=n&&("star"===n.type||"globstar"===n.type);if(!0===p.bash&&(!s||e[0]&&"/"!==e[0])){Q({type:"star",value:H,output:""});continue}const i=D.braces>0&&("comma"===t.type||"brace"===t.type),o=j.length&&("pipe"===t.type||"paren"===t.type);if(!s&&"paren"!==t.type&&!i&&!o){Q({type:"star",value:H,output:""});continue}for(;"/**"===e.slice(0,3);){const t=l[D.index+4];if(t&&"/"!==t)break;e=e.slice(3),Z("/**",3)}if("bos"===t.type&&K()){B.type="globstar",B.value+=H,B.output=P(p),D.output=B.output,D.globstar=!0,Z(H);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!r&&K()){D.output=D.output.slice(0,-(t.output+B.output).length),t.output=`(?:${t.output}`,B.type="globstar",B.output=P(p)+(p.strictSlashes?")":"|$)"),B.value+=H,D.globstar=!0,D.output+=t.output+B.output,Z(H);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const n=void 0!==e[1]?"|$":"";D.output=D.output.slice(0,-(t.output+B.output).length),t.output=`(?:${t.output}`,B.type="globstar",B.output=`${P(p)}${k}|${k}${n})`,B.value+=H,D.output+=t.output+B.output,D.globstar=!0,Z(H+W()),Q({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){B.type="globstar",B.value+=H,B.output=`(?:^|${k}|${P(p)}${k})`,D.output=B.output,D.globstar=!0,Z(H+W()),Q({type:"slash",value:"/",output:""});continue}D.output=D.output.slice(0,-B.output.length),B.type="globstar",B.output=P(p),B.value+=H,D.output+=B.output,D.globstar=!0,Z(H);continue}const n={type:"star",value:H,output:M};!0!==p.bash?!B||"bracket"!==B.type&&"paren"!==B.type||!0!==p.regex?(D.index!==D.start&&"slash"!==B.type&&"dot"!==B.type||("dot"===B.type?(D.output+=O,B.output+=O):!0===p.dot?(D.output+=$,B.output+=$):(D.output+=L,B.output+=L),"*"!==U()&&(D.output+=A,B.output+=A)),Q(n)):(n.output=H,Q(n)):(n.output=".*?","bos"!==B.type&&"slash"!==B.type||(n.output=L+n.output),Q(n))}for(;D.brackets>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","]"));D.output=t.escapeLast(D.output,"["),Y("brackets")}for(;D.parens>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing",")"));D.output=t.escapeLast(D.output,"("),Y("parens")}for(;D.braces>0;){if(!0===p.strictBrackets)throw new SyntaxError(c("closing","}"));D.output=t.escapeLast(D.output,"{"),Y("braces")}if(!0===p.strictSlashes||"star"!==B.type&&"bracket"!==B.type||Q({type:"maybe_slash",value:"",output:`${k}?`}),!0===D.backtrack){D.output="";for(const e of D.tokens)D.output+=null!=e.output?e.output:e.value,e.suffix&&(D.output+=e.suffix)}return D};return u.fastpaths=(s,r)=>{const i={...r},a="number"==typeof i.maxLength?Math.min(n,i.maxLength):n,c=s.length;if(c>a)throw new SyntaxError(`Input length: ${c}, exceeds maximum allowed length: ${a}`);s=o[s]||s;const u=t.isWindows(r),{DOT_LITERAL:l,SLASH_LITERAL:f,ONE_CHAR:p,DOTS_SLASH:d,NO_DOT:h,NO_DOTS:m,NO_DOTS_SLASH:g,STAR:y,START_ANCHOR:b}=e.globChars(u),v=i.dot?m:h,_=i.dot?g:h,w=i.capture?"":"?:";let S=!0===i.bash?".*?":y;i.capture&&(S=`(${S})`);const k=e=>!0===e.noglobstar?S:`(${w}(?:(?!${b}${e.dot?d:l}).)*?)`,A=e=>{switch(e){case"*":return`${v}${p}${S}`;case".*":return`${l}${p}${S}`;case"*.*":return`${v}${S}${l}${p}${S}`;case"*/*":return`${v}${S}${f}${p}${_}${S}`;case"**":return v+k(i);case"**/*":return`(?:${v}${k(i)}${f})?${_}${p}${S}`;case"**/*.*":return`(?:${v}${k(i)}${f})?${_}${S}${l}${p}${S}`;case"**/.*":return`(?:${v}${k(i)}${f})?${l}${p}${S}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=A(t[1]);if(!n)return;return n+l+t[2]}}},E=t.removePrefix(s,{negated:!1,prefix:""});let x=A(E);return x&&!0!==i.strictSlashes&&(x+=`${f}?`),x},Ef=u}(),s=Mf(),r=If(),i=(e,t,n=!1)=>{if(Array.isArray(e)){const s=e.map(e=>i(e,t,n)),r=e=>{for(const t of s){const n=t(e);if(n)return n}return!1};return r}const r=(o=e)&&"object"==typeof o&&!Array.isArray(o)&&e.tokens&&e.input;var o;if(""===e||"string"!=typeof e&&!r)throw new TypeError("Expected pattern to be a non-empty string");const a=t||{},c=s.isWindows(t),u=r?i.compileRe(e,t):i.makeRe(e,t,!1,!0),l=u.state;delete u.state;let f=()=>!1;if(a.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};f=i(a.ignore,e,n)}const p=(n,s=!1)=>{const{isMatch:r,match:o,output:p}=i.test(n,u,t,{glob:e,posix:c}),d={glob:e,state:l,regex:u,posix:c,input:n,output:p,match:o,isMatch:r};return"function"==typeof a.onResult&&a.onResult(d),!1===r?(d.isMatch=!1,!!s&&d):f(n)?("function"==typeof a.onIgnore&&a.onIgnore(d),d.isMatch=!1,!!s&&d):("function"==typeof a.onMatch&&a.onMatch(d),!s||d)};return n&&(p.state=l),p};return i.test=(e,t,n,{glob:r,posix:o}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=n||{},c=a.format||(o?s.toPosixSlashes:null);let u=e===r,l=u&&c?c(e):e;return!1===u&&(l=c?c(e):e,u=l===r),!1!==u&&!0!==a.capture||(u=!0===a.matchBase||!0===a.basename?i.matchBase(e,t,n,o):t.exec(l)),{isMatch:Boolean(u),match:u,output:l}},i.matchBase=(t,n,r,o=s.isWindows(r))=>(n instanceof RegExp?n:i.makeRe(n,r)).test(e.basename(t)),i.isMatch=(e,t,n)=>i(t,n)(e),i.parse=(e,t)=>Array.isArray(e)?e.map(e=>i.parse(e,t)):n(e,{...t,fastpaths:!1}),i.scan=(e,n)=>t(e,n),i.compileRe=(e,t,n=!1,s=!1)=>{if(!0===n)return e.output;const r=t||{},o=r.contains?"":"^",a=r.contains?"":"$";let c=`${o}(?:${e.output})${a}`;e&&!0===e.negated&&(c=`^(?!${c}).*$`);const u=i.toRegex(c,t);return!0===s&&(u.state=e),u},i.makeRe=(e,t={},s=!1,r=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(o.output=n.fastpaths(e,t)),o.output||(o=n(e,t)),i.compileRe(o,t,s,r)},i.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},i.constants=r,Of=i}function jf(){return Nf?Tf:(Nf=1,Tf=Df())}function zf(){if(Pf)return Kl;Pf=1,Object.defineProperty(Kl,"__esModule",{value:!0}),Kl.isAbsolute=Kl.partitionAbsoluteAndRelative=Kl.removeDuplicateSlashes=Kl.matchAny=Kl.convertPatternsToRe=Kl.makeRe=Kl.getPatternParts=Kl.expandBraceExpansion=Kl.expandPatternsWithBraceExpansion=Kl.isAffectDepthOfReadingPattern=Kl.endsWithSlashGlobStar=Kl.hasGlobStar=Kl.getBaseDirectory=Kl.isPatternRelatedToParentDirectory=Kl.getPatternsOutsideCurrentDirectory=Kl.getPatternsInsideCurrentDirectory=Kl.getPositivePatterns=Kl.getNegativePatterns=Kl.isPositivePattern=Kl.isNegativePattern=Kl.convertToNegativePattern=Kl.convertToPositivePattern=Kl.isDynamicPattern=Kl.isStaticPattern=void 0;const e=O,t=function(){if(Bl)return Hl;Bl=1;var e=Wl(),t=O.posix.dirname,n="win32"===x.platform(),s=/\\/g,r=/[\{\[].*[\}\]]$/,i=/(^|[^\\])([\{\[]|\([^\)]+$)/,o=/\\([\!\*\?\|\[\]\(\)\{\}])/g;return Hl=function(a,c){Object.assign({flipBackslashes:!0},c).flipBackslashes&&n&&a.indexOf("/")<0&&(a=a.replace(s,"/")),r.test(a)&&(a+="/"),a+="a";do{a=t(a)}while(e(a)||i.test(a));return a.replace(o,"$1")}}(),n=function(){if(Cf)return Rf;Cf=1;const e=$,t=vf(),n=jf(),s=Mf(),r=e=>""===e||"./"===e,i=e=>{const t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},o=(e,t,s)=>{t=[].concat(t),e=[].concat(e);let r=new Set,i=new Set,o=new Set,a=0,c=e=>{o.add(e.output),s&&s.onResult&&s.onResult(e)};for(let o=0;o<t.length;o++){let u=n(String(t[o]),{...s,onResult:c},!0),l=u.state.negated||u.state.negatedExtglob;l&&a++;for(let t of e){let e=u(t,!0);(l?!e.isMatch:e.isMatch)&&(l?r.add(e.output):(r.delete(e.output),i.add(e.output)))}}let u=(a===t.length?[...o]:[...i]).filter(e=>!r.has(e));if(s&&0===u.length){if(!0===s.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===s.nonull||!0===s.nullglob)return s.unescape?t.map(e=>e.replace(/\\/g,"")):t}return u};return o.match=o,o.matcher=(e,t)=>n(e,t),o.any=o.isMatch=(e,t,s)=>n(t,s)(e),o.not=(e,t,n={})=>{t=[].concat(t).map(String);let s=new Set,r=[],i=new Set(o(e,t,{...n,onResult:e=>{n.onResult&&n.onResult(e),r.push(e.output)}}));for(let e of r)i.has(e)||s.add(e);return[...s]},o.contains=(t,n,s)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);if(Array.isArray(n))return n.some(e=>o.contains(t,e,s));if("string"==typeof n){if(r(t)||r(n))return!1;if(t.includes(n)||t.startsWith("./")&&t.slice(2).includes(n))return!0}return o.isMatch(t,n,{...s,contains:!0})},o.matchKeys=(e,t,n)=>{if(!s.isObject(e))throw new TypeError("Expected the first argument to be an object");let r=o(Object.keys(e),t,n),i={};for(let t of r)i[t]=e[t];return i},o.some=(e,t,s)=>{let r=[].concat(e);for(let e of[].concat(t)){let t=n(String(e),s);if(r.some(e=>t(e)))return!0}return!1},o.every=(e,t,s)=>{let r=[].concat(e);for(let e of[].concat(t)){let t=n(String(e),s);if(!r.every(e=>t(e)))return!1}return!0},o.all=(t,s,r)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);return[].concat(s).every(e=>n(e,r)(t))},o.capture=(e,t,r)=>{let i=s.isWindows(r),o=n.makeRe(String(e),{...r,capture:!0}).exec(i?s.toPosixSlashes(t):t);if(o)return o.slice(1).map(e=>void 0===e?"":e)},o.makeRe=(...e)=>n.makeRe(...e),o.scan=(...e)=>n.scan(...e),o.parse=(e,s)=>{let r=[];for(let i of[].concat(e||[]))for(let e of t(String(i),s))r.push(n.parse(e,s));return r},o.braces=(e,n)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return n&&!0===n.nobrace||!i(e)?[e]:t(e,n)},o.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return o.braces(e,{...t,expand:!0})},o.hasBraces=i,Rf=o}(),s=/[*?]|^!/,r=/\[[^[]*]/,i=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,o=/[!*+?@]\([^(]*\)/,a=/,|\.\./,c=/(?!^)\/{2,}/g;function u(e,t={}){return!l(e,t)}function l(e,t={}){return""!==e&&(!(!1!==t.caseSensitiveMatch&&!e.includes("\\"))||(!!(s.test(e)||r.test(e)||i.test(e))||(!(!1===t.extglob||!o.test(e))||!(!1===t.braceExpansion||!function(e){const t=e.indexOf("{");if(-1===t)return!1;const n=e.indexOf("}",t+1);if(-1===n)return!1;const s=e.slice(t,n);return a.test(s)}(e)))))}function f(e){return e.startsWith("!")&&"("!==e[1]}function p(e){return!f(e)}function d(e){return e.startsWith("..")||e.startsWith("./..")}function h(e){return e.endsWith("/**")}function m(e){const t=n.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((e,t)=>e.length-t.length),t.filter(e=>""!==e)}function g(e,t){return n.makeRe(e,t)}function y(t){return e.isAbsolute(t)}return Kl.isStaticPattern=u,Kl.isDynamicPattern=l,Kl.convertToPositivePattern=function(e){return f(e)?e.slice(1):e},Kl.convertToNegativePattern=function(e){return"!"+e},Kl.isNegativePattern=f,Kl.isPositivePattern=p,Kl.getNegativePatterns=function(e){return e.filter(f)},Kl.getPositivePatterns=function(e){return e.filter(p)},Kl.getPatternsInsideCurrentDirectory=function(e){return e.filter(e=>!d(e))},Kl.getPatternsOutsideCurrentDirectory=function(e){return e.filter(d)},Kl.isPatternRelatedToParentDirectory=d,Kl.getBaseDirectory=function(e){return t(e,{flipBackslashes:!1})},Kl.hasGlobStar=function(e){return e.includes("**")},Kl.endsWithSlashGlobStar=h,Kl.isAffectDepthOfReadingPattern=function(t){const n=e.basename(t);return h(t)||u(n)},Kl.expandPatternsWithBraceExpansion=function(e){return e.reduce((e,t)=>e.concat(m(t)),[])},Kl.expandBraceExpansion=m,Kl.getPatternParts=function(e,t){let{parts:s}=n.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return 0===s.length&&(s=[e]),s[0].startsWith("/")&&(s[0]=s[0].slice(1),s.unshift("")),s},Kl.makeRe=g,Kl.convertPatternsToRe=function(e,t){return e.map(e=>g(e,t))},Kl.matchAny=function(e,t){return t.some(t=>t.test(e))},Kl.removeDuplicateSlashes=function(e){return e.replace(c,"/")},Kl.partitionAbsoluteAndRelative=function(e){const t=[],n=[];for(const s of e)y(s)?t.push(s):n.push(s);return[t,n]},Kl.isAbsolute=y,Kl}var Ff,Hf,Bf,Kf={};function Uf(){if(Hf)return Ff;Hf=1;const e=T.PassThrough,t=Array.prototype.slice;function n(t,s){if(Array.isArray(t))for(let e=0,r=t.length;e<r;e++)t[e]=n(t[e],s);else{if(!t._readableState&&t.pipe&&(t=t.pipe(e(s))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}return Ff=function(){const s=[],r=t.call(arguments);let i=!1,o=r[r.length-1];o&&!Array.isArray(o)&&null==o.pipe?r.pop():o={};const a=!1!==o.end,c=!0===o.pipeError;null==o.objectMode&&(o.objectMode=!0);null==o.highWaterMark&&(o.highWaterMark=65536);const u=e(o);function l(){for(let e=0,t=arguments.length;e<t;e++)s.push(n(arguments[e],o));return f(),this}function f(){if(i)return;i=!0;let e=s.shift();if(!e)return void process.nextTick(p);Array.isArray(e)||(e=[e]);let t=e.length+1;function n(){--t>0||(i=!1,f())}function r(e){function t(){e.removeListener("merge2UnpipeEnd",t),e.removeListener("end",t),c&&e.removeListener("error",s),n()}function s(e){u.emit("error",e)}if(e._readableState.endEmitted)return n();e.on("merge2UnpipeEnd",t),e.on("end",t),c&&e.on("error",s),e.pipe(u,{end:!1}),e.resume()}for(let t=0;t<e.length;t++)r(e[t]);n()}function p(){i=!1,u.emit("queueDrain"),a&&u.end()}u.setMaxListeners(0),u.add=l,u.on("unpipe",function(e){e.emit("merge2UnpipeEnd")}),r.length&&l.apply(null,r);return u},Ff}var Wf,qf,Zf,Gf={};function Vf(){if(Wf)return Gf;return Wf=1,Object.defineProperty(Gf,"__esModule",{value:!0}),Gf.isEmpty=Gf.isString=void 0,Gf.isString=function(e){return"string"==typeof e},Gf.isEmpty=function(e){return""===e},Gf}function Jf(){if(qf)return xl;qf=1,Object.defineProperty(xl,"__esModule",{value:!0}),xl.string=xl.stream=xl.pattern=xl.path=xl.fs=xl.errno=xl.array=void 0;const e=$l();xl.array=e;const t=Rl();xl.errno=t;const n=function(){if(Cl)return Pl;Cl=1,Object.defineProperty(Pl,"__esModule",{value:!0}),Pl.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return Pl.createDirentFromStats=function(t,n){return new e(t,n)},Pl}();xl.fs=n;const s=Ml();xl.path=s;const r=zf();xl.pattern=r;const i=function(){if(Bf)return Kf;Bf=1,Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.merge=void 0;const e=Uf();function t(e){e.forEach(e=>e.emit("close"))}return Kf.merge=function(n){const s=e(n);return n.forEach(e=>{e.once("error",e=>s.emit("error",e))}),s.once("close",()=>t(n)),s.once("end",()=>t(n)),s},Kf}();xl.stream=i;const o=Vf();return xl.string=o,xl}var Yf,Qf={},Xf={},ep={},tp={},np={},sp={},rp={},ip={},op={};function ap(){if(Yf)return op;function e(e,t){e(t)}function t(e,t){e(null,t)}return Yf=1,Object.defineProperty(op,"__esModule",{value:!0}),op.read=void 0,op.read=function(n,s,r){s.fs.lstat(n,(i,o)=>{null===i?o.isSymbolicLink()&&s.followSymbolicLink?s.fs.stat(n,(n,i)=>{if(null!==n)return s.throwErrorOnBrokenSymbolicLink?void e(r,n):void t(r,o);s.markSymbolicLink&&(i.isSymbolicLink=()=>!0),t(r,i)}):t(r,o):e(r,i)})},op}var cp,up={};var lp,fp,pp,dp,hp,mp,gp,yp={},bp={};function vp(){if(fp)return yp;fp=1,Object.defineProperty(yp,"__esModule",{value:!0});const e=(lp||(lp=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const t=R;e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(bp)),bp);return yp.default=class{constructor(t={}){this._options=t,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=e.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,t){return null!=e?e:t}},yp}function _p(){if(pp)return ip;pp=1,Object.defineProperty(ip,"__esModule",{value:!0}),ip.statSync=ip.stat=ip.Settings=void 0;const e=ap(),t=(cp||(cp=1,Object.defineProperty(up,"__esModule",{value:!0}),up.read=void 0,up.read=function(e,t){const n=t.fs.lstatSync(e);if(!n.isSymbolicLink()||!t.followSymbolicLink)return n;try{const n=t.fs.statSync(e);return t.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(e){if(!t.throwErrorOnBrokenSymbolicLink)return n;throw e}}),up),n=vp();function s(e={}){return e instanceof n.default?e:new n.default(e)}return ip.Settings=n.default,ip.stat=function(t,n,r){"function"!=typeof n?e.read(t,s(n),r):e.read(t,s(),n)},ip.statSync=function(e,n){const r=s(n);return t.read(e,r)},ip}function wp(){if(hp)return dp;let e;return hp=1,dp="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:W):t=>(e||(e=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))}var Sp,kp={};function Ap(){if(Sp)return kp;Sp=1,Object.defineProperty(kp,"__esModule",{value:!0}),kp.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),n=Number.parseInt(e[1],10),s=t>10,r=10===t&&n>=10;return kp.IS_SUPPORT_READDIR_WITH_FILE_TYPES=s||r,kp}var Ep,xp,Op={},$p={};function Tp(){if(xp)return Op;xp=1,Object.defineProperty(Op,"__esModule",{value:!0}),Op.fs=void 0;const e=function(){if(Ep)return $p;Ep=1,Object.defineProperty($p,"__esModule",{value:!0}),$p.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return $p.createDirentFromStats=function(t,n){return new e(t,n)},$p}();return Op.fs=e,Op}var Np,Rp,Cp={};function Pp(){if(Np)return Cp;return Np=1,Object.defineProperty(Cp,"__esModule",{value:!0}),Cp.joinPathSegments=void 0,Cp.joinPathSegments=function(e,t,n){return e.endsWith(n)?e+t:e+n+t},Cp}function Lp(){if(Rp)return rp;Rp=1,Object.defineProperty(rp,"__esModule",{value:!0}),rp.readdir=rp.readdirWithFileTypes=rp.read=void 0;const e=_p(),t=function(){if(gp)return mp;gp=1,mp=function(t,n){let s,r,i,o=!0;function a(t){function r(){n&&n(t,s),n=null}o?e(r):r()}function c(e,t,n){s[e]=n,(0===--r||t)&&a(t)}Array.isArray(t)?(s=[],r=t.length):(i=Object.keys(t),s={},r=i.length),r?i?i.forEach(function(e){t[e](function(t,n){c(e,t,n)})}):t.forEach(function(e,t){e(function(e,n){c(t,e,n)})}):a(null),o=!1};const e=wp();return mp}(),n=Ap(),s=Tp(),r=Pp();function i(e,n,i){n.fs.readdir(e,{withFileTypes:!0},(o,u)=>{if(null!==o)return void a(i,o);const l=u.map(t=>({dirent:t,name:t.name,path:r.joinPathSegments(e,t.name,n.pathSegmentSeparator)}));if(!n.followSymbolicLinks)return void c(i,l);const f=l.map(e=>function(e,t){return n=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(r,i)=>{if(null!==r)return t.throwErrorOnBrokenSymbolicLink?void n(r):void n(null,e);e.dirent=s.fs.createDirentFromStats(e.name,i),n(null,e)}):n(null,e)}}(e,n));t(f,(e,t)=>{null===e?c(i,t):a(i,e)})})}function o(n,i,o){i.fs.readdir(n,(u,l)=>{if(null!==u)return void a(o,u);const f=l.map(t=>{const o=r.joinPathSegments(n,t,i.pathSegmentSeparator);return n=>{e.stat(o,i.fsStatSettings,(e,r)=>{if(null!==e)return void n(e);const a={name:t,path:o,dirent:s.fs.createDirentFromStats(t,r)};i.stats&&(a.stats=r),n(null,a)})}});t(f,(e,t)=>{null===e?c(o,t):a(o,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return rp.read=function(e,t,s){t.stats||!n.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,t,s):i(e,t,s)},rp.readdirWithFileTypes=i,rp.readdir=o,rp}var Ip,Mp={};var Dp,jp,zp,Fp={},Hp={};function Bp(){return Dp||(Dp=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const t=R;e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Hp)),Hp}function Kp(){if(zp)return sp;zp=1,Object.defineProperty(sp,"__esModule",{value:!0}),sp.Settings=sp.scandirSync=sp.scandir=void 0;const e=Lp(),t=function(){if(Ip)return Mp;Ip=1,Object.defineProperty(Mp,"__esModule",{value:!0}),Mp.readdir=Mp.readdirWithFileTypes=Mp.read=void 0;const e=_p(),t=Ap(),n=Tp(),s=Pp();function r(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(r=>{const i={dirent:r,name:r.name,path:s.joinPathSegments(e,r.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=n.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,r){return r.fs.readdirSync(t).map(i=>{const o=s.joinPathSegments(t,i,r.pathSegmentSeparator),a=e.statSync(o,r.fsStatSettings),c={name:i,path:o,dirent:n.fs.createDirentFromStats(i,a)};return r.stats&&(c.stats=a),c})}return Mp.read=function(e,n){return!n.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?r(e,n):i(e,n)},Mp.readdirWithFileTypes=r,Mp.readdir=i,Mp}(),n=function(){if(jp)return Fp;jp=1,Object.defineProperty(Fp,"__esModule",{value:!0});const e=O,t=_p(),n=Bp();return Fp.default=class{constructor(s={}){this._options=s,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Fp}();function s(e={}){return e instanceof n.default?e:new n.default(e)}return sp.Settings=n.default,sp.scandir=function(t,n,r){"function"!=typeof n?e.read(t,s(n),r):e.read(t,s(),n)},sp.scandirSync=function(e,n){const r=s(n);return t.read(e,r)},sp}var Up,Wp,qp,Zp={exports:{}};function Gp(){if(qp)return Zp.exports;qp=1;var e=Wp?Up:(Wp=1,Up=function(e){var t=new e,n=t;return{get:function(){var s=t;return s.next?t=s.next:(t=new e,n=t),s.next=null,s},release:function(e){n.next=e,n=e}}});function t(t,r,i){if("function"==typeof t&&(i=r,r=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var o=e(s),a=null,c=null,u=0,l=null,f={push:function(e,s){var d=o.get();d.context=t,d.release=p,d.value=e,d.callback=s||n,d.errorHandler=l,u>=i||f.paused?c?(c.next=d,c=d):(a=d,c=d,f.saturated()):(u++,r.call(t,d.value,d.worked))},drain:n,saturated:n,pause:function(){f.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!f.paused)for(;a&&u<i;)u++,p()},running:function(){return u},resume:function(){if(!f.paused)return;if(f.paused=!1,null===a)return u++,void p();for(;a&&u<i;)u++,p()},idle:function(){return 0===u&&0===f.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,s){var d=o.get();d.context=t,d.release=p,d.value=e,d.callback=s||n,d.errorHandler=l,u>=i||f.paused?a?(d.next=a,a=d):(a=d,c=d,f.saturated()):(u++,r.call(t,d.value,d.worked))},empty:n,kill:function(){a=null,c=null,f.drain=n},killAndDrain:function(){a=null,c=null,f.drain(),f.drain=n},error:function(e){l=e}};return f;function p(e){e&&o.release(e);var n=a;n&&u<=i?f.paused?u--:(c===a&&(c=null),a=n.next,n.next=null,r.call(t,n.value,n.worked),null===c&&f.empty()):0===--u&&f.drain()}}function n(){}function s(){this.value=null,this.callback=n,this.next=null,this.release=n,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,s){var r=e.callback,i=e.errorHandler,o=e.value;e.value=null,e.callback=n,e.errorHandler&&i(t,o),r.call(e.context,t,s),e.release(e)}}return Zp.exports=t,Zp.exports.promise=function(e,s,r){"function"==typeof e&&(r=s,s=e,e=null);var i=t(e,function(e,t){s.call(this,e).then(function(e){t(null,e)},t)},r),o=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,n){o(e,function(e,s){e?n(e):t(s)})});return t.catch(n),t},i.unshift=function(e){var t=new Promise(function(t,n){a(e,function(e,s){e?n(e):t(s)})});return t.catch(n),t},i.drained=function(){var e=new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})});return e},i},Zp.exports}var Vp,Jp={};function Yp(){if(Vp)return Jp;return Vp=1,Object.defineProperty(Jp,"__esModule",{value:!0}),Jp.joinPathSegments=Jp.replacePathSegmentSeparator=Jp.isAppliedFilter=Jp.isFatalError=void 0,Jp.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Jp.isAppliedFilter=function(e,t){return null===e||e(t)},Jp.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Jp.joinPathSegments=function(e,t,n){return""===e?t:e.endsWith(n)?e+t:e+n+t},Jp}var Qp,Xp,ed,td={};function nd(){if(Qp)return td;Qp=1,Object.defineProperty(td,"__esModule",{value:!0});const e=Yp();return td.default=class{constructor(t,n){this._root=t,this._settings=n,this._root=e.replacePathSegmentSeparator(t,n.pathSegmentSeparator)}},td}function sd(){if(Xp)return np;Xp=1,Object.defineProperty(np,"__esModule",{value:!0});const e=N,t=Kp(),n=Gp(),s=Yp(),r=nd();class i extends r.default{constructor(s,r){super(s,r),this._settings=r,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=n(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const n={directory:e,base:t};this._queue.push(n,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(n,s)=>{if(null===n){for(const t of s)this._handleEntry(t,e.base);t(null,void 0)}else t(n,void 0)})}_handleError(e){!this._isDestroyed&&s.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const n=e.path;void 0!==t&&(e.path=s.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),s.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&s.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return np.default=i,np}var rd,id={};var od,ad,cd={},ud={};function ld(){if(ad)return cd;ad=1,Object.defineProperty(cd,"__esModule",{value:!0});const e=function(){if(od)return ud;od=1,Object.defineProperty(ud,"__esModule",{value:!0});const e=Kp(),t=Yp(),n=nd();class s extends n.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const n=this._scandir(e,this._settings.fsScandirSettings);for(const e of n)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,n){const s=e.path;void 0!==n&&(e.path=t.joinPathSegments(n,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(s,void 0===n?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return ud.default=s,ud}();return cd.default=class{constructor(t,n){this._root=t,this._settings=n,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},cd}var fd,pd,dd={};function hd(){if(pd)return ep;pd=1,Object.defineProperty(ep,"__esModule",{value:!0}),ep.Settings=ep.walkStream=ep.walkSync=ep.walk=void 0;const e=function(){if(ed)return tp;ed=1,Object.defineProperty(tp,"__esModule",{value:!0});const e=sd();return tp.default=class{constructor(t,n){this._root=t,this._settings=n,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},tp}(),t=function(){if(rd)return id;rd=1,Object.defineProperty(id,"__esModule",{value:!0});const e=T,t=sd();return id.default=class{constructor(n,s){this._root=n,this._settings=s,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},id}(),n=ld(),s=function(){if(fd)return dd;fd=1,Object.defineProperty(dd,"__esModule",{value:!0});const e=O,t=Kp();return dd.default=class{constructor(n={}){this._options=n,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},dd}();function r(e={}){return e instanceof s.default?e:new s.default(e)}return ep.Settings=s.default,ep.walk=function(t,n,s){"function"!=typeof n?new e.default(t,r(n)).read(s):new e.default(t,r()).read(n)},ep.walkSync=function(e,t){const s=r(t);return new n.default(e,s).read()},ep.walkStream=function(e,n){const s=r(n);return new t.default(e,s).read()},ep}var md,gd={};function yd(){if(md)return gd;md=1,Object.defineProperty(gd,"__esModule",{value:!0});const e=O,t=_p(),n=Jf();return gd.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const s={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(s.stats=e),s}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},gd}var bd,vd,_d={};function wd(){if(bd)return _d;bd=1,Object.defineProperty(_d,"__esModule",{value:!0});const e=T,t=_p(),n=hd(),s=yd();class r extends s.default{constructor(){super(...arguments),this._walkStream=n.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,n){const s=t.map(this._getFullEntryPath,this),r=new e.PassThrough({objectMode:!0});r._write=(e,i,o)=>this._getEntry(s[e],t[e],n).then(t=>{null!==t&&n.entryFilter(t)&&r.push(t),e===s.length-1&&r.end(),o()}).catch(o);for(let e=0;e<s.length;e++)r.write(e);return r}_getEntry(e,t,n){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(n.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,n)=>{this._stat(e,this._fsStatSettings,(e,s)=>null===e?t(s):n(e))})}}return _d.default=r,_d}var Sd,kd,Ad,Ed={},xd={},Od={},$d={};function Td(){if(kd)return Od;kd=1,Object.defineProperty(Od,"__esModule",{value:!0});const e=function(){if(Sd)return $d;Sd=1,Object.defineProperty($d,"__esModule",{value:!0});const e=Jf();return $d.default=class{constructor(e,t,n){this._patterns=e,this._settings=t,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),n=this._splitSegmentsIntoSections(t);this._storage.push({complete:n.length<=1,pattern:e,segments:t,sections:n})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},$d}();class t extends e.default{match(e){const t=e.split("/"),n=t.length,s=this._storage.filter(e=>!e.complete||e.segments.length>n);for(const e of s){const s=e.sections[0];if(!e.complete&&n>s.length)return!0;if(t.every((t,n)=>{const s=e.segments[n];return!(!s.dynamic||!s.patternRe.test(t))||!s.dynamic&&s.pattern===t}))return!0}return!1}}return Od.default=t,Od}var Nd,Rd={};var Cd,Pd={};var Ld,Id,Md,Dd={};function jd(){if(Id)return Ed;Id=1,Object.defineProperty(Ed,"__esModule",{value:!0});const e=O,t=function(){if(Ad)return xd;Ad=1,Object.defineProperty(xd,"__esModule",{value:!0});const e=Jf(),t=Td();return xd.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,n){const s=this._getMatcher(t),r=this._getNegativePatternsRe(n);return t=>this._filter(e,t,s,r)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const n=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(n,this._micromatchOptions)}_filter(t,n,s,r){if(this._isSkippedByDeep(t,n.path))return!1;if(this._isSkippedSymbolicLink(n))return!1;const i=e.path.removeLeadingDotSegment(n.path);return!this._isSkippedByPositivePatterns(i,s)&&this._isSkippedByNegativePatterns(i,r)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const n=t.split("/").length;return""===e?n:n-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,n){return!e.pattern.matchAny(t,n)}},xd}(),n=function(){if(Nd)return Rd;Nd=1,Object.defineProperty(Rd,"__esModule",{value:!0});const e=Jf();return Rd.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,n){const[s,r]=e.pattern.partitionAbsoluteAndRelative(n),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(s,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,n){const s=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(s))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const r=this._isMatchToPatternsSet(s,n,t.dirent.isDirectory());return this._settings.unique&&r&&this._createIndexRecord(s),r}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,n){return!!this._isMatchToPatterns(e,t.positive.all,n)&&(!this._isMatchToPatterns(e,t.negative.relative,n)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,n))}_isMatchToAbsoluteNegative(t,n,s){if(0===n.length)return!1;const r=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(r,n,s)}_isMatchToPatterns(t,n,s){if(0===n.length)return!1;const r=e.pattern.matchAny(t,n);return!r&&s?e.pattern.matchAny(t+"/",n):r}},Rd}(),s=function(){if(Cd)return Pd;Cd=1,Object.defineProperty(Pd,"__esModule",{value:!0});const e=Jf();return Pd.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},Pd}(),r=function(){if(Ld)return Dd;Ld=1,Object.defineProperty(Dd,"__esModule",{value:!0});const e=Jf();return Dd.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let n=t.path;return this._settings.absolute&&(n=e.path.makeAbsolute(this._settings.cwd,n),n=e.path.unixify(n)),this._settings.markDirectories&&t.dirent.isDirectory()&&(n+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:n}):n}},Dd}();return Ed.default=class{constructor(e){this._settings=e,this.errorFilter=new s.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new r.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},Ed}function zd(){if(Md)return Qf;Md=1,Object.defineProperty(Qf,"__esModule",{value:!0});const e=function(){if(vd)return Xf;vd=1,Object.defineProperty(Xf,"__esModule",{value:!0});const e=hd(),t=yd(),n=wd();class s extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new n.default(this._settings)}dynamic(e,t){return new Promise((n,s)=>{this._walkAsync(e,t,(e,t)=>{null===e?n(t):s(e)})})}async static(e,t){const n=[],s=this._readerStream.static(e,t);return new Promise((e,t)=>{s.once("error",t),s.on("data",e=>n.push(e)),s.once("end",()=>e(n))})}}return Xf.default=s,Xf}(),t=jd();class n extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),n=this._getReaderOptions(e);return(await this.api(t,e,n)).map(e=>n.transform(e))}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}return Qf.default=n,Qf}var Fd,Hd={};var Bd,Kd,Ud={},Wd={};function qd(){if(Kd)return Ud;Kd=1,Object.defineProperty(Ud,"__esModule",{value:!0});const e=function(){if(Bd)return Wd;Bd=1,Object.defineProperty(Wd,"__esModule",{value:!0});const e=_p(),t=hd(),n=yd();class s extends n.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const n=[];for(const s of e){const e=this._getFullEntryPath(s),r=this._getEntry(e,s,t);null!==r&&t.entryFilter(r)&&n.push(r)}return n}_getEntry(e,t,n){try{const n=this._getStat(e);return this._makeEntry(n,t)}catch(e){if(n.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Wd.default=s,Wd}(),t=jd();class n extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(t,e,n).map(n.transform)}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}return Ud.default=n,Ud}var Zd,Gd,Vd,Jd={};var Yd,Qd,Xd=function(){if(Vd)return Gd;Vd=1;const e=function(){if(Zf)return El;Zf=1,Object.defineProperty(El,"__esModule",{value:!0}),El.convertPatternGroupToTask=El.convertPatternGroupsToTasks=El.groupPatternsByBaseDirectory=El.getNegativePatternsAsPositive=El.getPositivePatterns=El.convertPatternsToTasks=El.generate=void 0;const e=Jf();function t(t,n){let s=t;return n.braceExpansion&&(s=e.pattern.expandPatternsWithBraceExpansion(s)),n.baseNameMatch&&(s=s.map(e=>e.includes("/")?e:`**/${e}`)),s.map(t=>e.pattern.removeDuplicateSlashes(t))}function n(t,n,s){const r=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),u=e.pattern.getPatternsInsideCurrentDirectory(t),l=i(c),f=i(u);return r.push(...o(l,n,s)),"."in f?r.push(a(".",u,n,s)):r.push(...o(f,n,s)),r}function s(t){return e.pattern.getPositivePatterns(t)}function r(t,n){return e.pattern.getNegativePatterns(t).concat(n).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,n)=>{const s=e.pattern.getBaseDirectory(n);return s in t?t[s].push(n):t[s]=[n],t},{})}function o(e,t,n){return Object.keys(e).map(s=>a(s,e[s],t,n))}function a(t,n,s,r){return{dynamic:r,positive:n,negative:s,base:t,patterns:[].concat(n,s.map(e.pattern.convertToNegativePattern))}}return El.generate=function(i,o){const a=t(i,o),c=t(o.ignore,o),u=s(a),l=r(a,c),f=u.filter(t=>e.pattern.isStaticPattern(t,o)),p=u.filter(t=>e.pattern.isDynamicPattern(t,o)),d=n(f,l,!1),h=n(p,l,!0);return d.concat(h)},El.convertPatternsToTasks=n,El.getPositivePatterns=s,El.getNegativePatternsAsPositive=r,El.groupPatternsByBaseDirectory=i,El.convertPatternGroupsToTasks=o,El.convertPatternGroupToTask=a,El}(),t=zd(),n=function(){if(Fd)return Hd;Fd=1,Object.defineProperty(Hd,"__esModule",{value:!0});const e=T,t=wd(),n=jd();class s extends n.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const n=this._getRootDirectory(t),s=this._getReaderOptions(t),r=this.api(n,t,s),i=new e.Readable({objectMode:!0,read:()=>{}});return r.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",s.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>r.destroy()),i}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}return Hd.default=s,Hd}(),s=qd(),r=(Zd||(Zd=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const t=R,n=x,s=Math.max(n.cpus().length,1);e.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:t.lstat,lstatSync:t.lstatSync,stat:t.stat,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync},e.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,s),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},e.DEFAULT_FILE_SYSTEM_ADAPTER),t)}}}(Jd)),Jd),i=Jf();async function o(e,n){c(e);const s=a(e,t.default,n),r=await Promise.all(s);return i.array.flatten(r)}function a(t,n,s){const i=[].concat(t),o=new r.default(s),a=e.generate(i,o),c=new n(o);return a.map(c.read,c)}function c(e){if(![].concat(e).every(e=>i.string.isString(e)&&!i.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(t){function o(e,t){c(e);const n=a(e,s.default,t);return i.array.flatten(n)}function u(e,t){c(e);const s=a(e,n.default,t);return i.stream.merge(s)}var l,f;t.glob=t,t.globSync=o,t.globStream=u,t.async=t,t.sync=o,t.stream=u,t.generateTasks=function(t,n){c(t);const s=[].concat(t),i=new r.default(n);return e.generate(s,i)},t.isDynamicPattern=function(e,t){c(e);const n=new r.default(t);return i.pattern.isDynamicPattern(e,n)},t.escapePath=function(e){return c(e),i.path.escape(e)},t.convertPathToPattern=function(e){return c(e),i.path.convertPathToPattern(e)},(l=t.posix||(t.posix={})).escapePath=function(e){return c(e),i.path.escapePosixPath(e)},l.convertPathToPattern=function(e){return c(e),i.path.convertPosixPathToPattern(e)},(f=t.win32||(t.win32={})).escapePath=function(e){return c(e),i.path.escapeWindowsPath(e)},f.convertPathToPattern=function(e){return c(e),i.path.convertWindowsPathToPattern(e)}}(o||(o={})),Gd=o}(),eh=q(Xd);var th=function(){if(Qd)return Yd;Qd=1;var e=Wl(),t=O.posix.dirname,n="win32"===x.platform(),s="/",r=/\\/g,i=/\\([!*?|[\](){}])/g;function o(t){return!!/\([^()]+$/.test(t)||("{"===t[0]||"["===t[0]||(!!/[^\\][{[]/.test(t)||e(t)))}return Yd=function(e,a){Object.assign({flipBackslashes:!0},a).flipBackslashes&&n&&e.indexOf(s)<0&&(e=e.replace(r,s)),function(e){var t;switch(e.slice(-1)){case"}":t="{";break;case"]":t="[";break;default:return!1}var n=e.indexOf(t);if(n<0)return!1;return e.slice(n+1,-1).includes(s)}(e)&&(e+=s),e+="a";do{e=t(e)}while(o(e));return e.replace(i,"$1")}}(),nh=q(th);const sh=e=>""!==e&&".."!==e,rh=e=>{if("string"!=typeof e||!e.trim())return null;const t=e.trim().replace(/[^A-Za-z0-9@/_-]/g,"_").replace(/\/{2,}/g,"/").trim().split("/").filter(e=>e.length>0);if(0===t.length)return null;for(const e of t)if(!sh(e))return null;return t.join("/")},ih=async e=>{try{return(await c(e)).isFile()}catch{return!1}},oh=async e=>{const{cwd:t,stanPath:n,map:s,onStage:r}=e;if(!s||"object"!=typeof s)return;const i=Mu(t,n),a=f.join(i.rootAbs,"imports");await m(a);const c=Object.keys(s).sort();for(const e of c){const n=s[e]??[];if(!Array.isArray(n)||0===n.length)continue;const i=rh(e);if(!i)continue;const c=f.join(a,i);await l(c,{recursive:!0,force:!0}).catch(()=>{}),await m(c).catch(()=>{});const u=[];for(const e of n){const n=e.trim();if(!n)continue;const s=nh(n.replace(/\\/g,"/"));try{const e=await eh(n,{cwd:t,absolute:!0,dot:!0,onlyFiles:!1,followSymbolicLinks:!1});for(const n of e){if(!await ih(n))continue;const e=f.relative(f.isAbsolute(s)?s:f.resolve(t,s),n).replace(/\\/g,"/");if(!e||e.includes(".."))continue;const r=f.join(c,e);await m(f.dirname(r)).catch(()=>{});try{await o(n,r),u.push(r)}catch{}}}catch{}}try{if("function"==typeof r){r(i,u.map(e=>f.relative(t,e).replace(/\\/g,"/")))}}catch{}}},ah=e=>{const t=j(e);if(!/[*?[\]{}()!]/.test(n=t)&&!n.includes("**"))return t?e=>z(t,e):()=>!1;var n;const s=me(t,{dot:!0});return e=>s(j(e))},ch=e=>{const t=e.map(ah);return 0===t.length?()=>!1:e=>{const n=j(e);for(const e of t)if(e(n))return!0;return!1}},uh=lu(["runtime","type","dynamic"]),lh=["runtime","type","dynamic"],fh=kc().min(1).refine(e=>null!==D(e),{message:'nodeId must be a repo-relative POSIX path (no absolute or "..")'}),ph=Wc().int().min(0),dh=Xc(uh).nonempty().refine(e=>new Set(e).size===e.length,"edgeKinds must not contain duplicates"),hh=su([fh,ou([fh,ph]),ou([fh,ph,dh])]),mh=e=>{if("string"==typeof e)return{nodeId:e,depth:0,edgeKinds:[...lh]};const t=e[0],n=e[1],s=Array.isArray(e[2])?e[2]:lh,r=new Map([["runtime",0],["type",1],["dynamic",2]]),i=[...s].sort((e,t)=>(r.get(e)??99)-(r.get(t)??99));return{nodeId:t,depth:n,edgeKinds:i}},gh=tu({include:Xc(hh),exclude:Xc(hh).optional()}).strict(),yh=e=>{const t=gh.parse(e);return{include:t.include.map(mh),exclude:(t.exclude??[]).map(mh)}},bh=tu({target:fh,kind:uh,resolution:lu(["explicit","implicit"]).optional()}).strict(),vh=tu({size:Wc().int().min(0).optional(),hash:kc().min(1).optional()}).strict(),_h=tu({kind:lu(["source","external","builtin","missing"]),metadata:vh.optional(),description:kc().optional(),locatorAbs:kc().optional()}).strict(),wh=tu({schemaVersion:Wc().int().min(1),nodes:cu(fh,_h),edges:cu(fh,Xc(bh))}).strict().superRefine((e,t)=>{for(const n of Object.keys(e.nodes))Object.prototype.hasOwnProperty.call(e.edges,n)||t.addIssue({code:"custom",message:`edges is missing key for nodeId "${n}"`,path:["edges",n]});const n=".stan/context/abs/";for(const[s,r]of Object.entries(e.nodes))"string"==typeof r.locatorAbs&&r.locatorAbs.length>0&&(s.startsWith(n)||t.addIssue({code:"custom",message:`locatorAbs is only permitted for abs-staged nodeIds under "${n}"`,path:["nodes",s,"locatorAbs"]}))}),Sh=(e,t,n)=>(e.edges[t]??[]).filter(e=>n.has(e.kind)).map(e=>({target:e.target,kind:e.kind})).sort((e,t)=>e.target===t.target?e.kind.localeCompare(t.kind):e.target.localeCompare(t.target)),kh=(e,t)=>{const n=new Set,s=(e=>new Set(e))(t.edgeKinds),r=[{nodeId:t.nodeId,remaining:t.depth}],i=new Map;for(;r.length;){const t=r.shift(),o=i.get(t.nodeId);if("number"==typeof o&&o>=t.remaining)continue;if(i.set(t.nodeId,t.remaining),n.add(t.nodeId),t.remaining<=0)continue;const a=Sh(e,t.nodeId,s);for(const e of a)r.push({nodeId:e.target,remaining:t.remaining-1})}return n},Ah=e=>{const{meta:t,include:n,exclude:s}=e,r=new Set;for(const e of n)for(const n of kh(t,e))r.add(n);const i=new Set;for(const e of s)for(const n of kh(t,e))i.add(n);const o=[];for(const e of r)i.has(e)||o.push(e);return Ee(o)},Eh=e=>!M(e).includes("/"),xh=async e=>{const{cwd:n,stanPath:s,meta:r,selection:o}=e,a=o?.includes??[],c=o?.excludes??[],u=await ve(n),l=j(s),f=`${l}/system/.docs.meta.json`,d=`${l}/system/`,h=`${l}/context/dependency.meta.json`,m=`${l}/context/dependency.state.json`;if(!u.includes(h)||!t(p(n,h)))throw new Error(`dependency meta not found at ${h}; generate it before context-mode archiving`);const g=u.filter(e=>e.startsWith(d)).filter(e=>e!==f),y=(await we(u,{cwd:n,stanPath:s,includeOutputDir:!1,includes:a,excludes:c})).filter(Eh),b=u.includes(m)&&t(p(n,m)),v=Ee([...g,h,...b?[m]:[],...y],M);let _=!1,w=void 0!==e.state?e.state:null;void 0===e.state&&b&&(w=await(async(e,n)=>{const s=p(e,n);if(!t(s))return null;try{const e=await i(s,"utf8");return JSON.parse(e)}catch(e){const t=e instanceof Error?e.message:String(e);throw new Error(`failed to parse JSON at ${M(n)}: ${t}`)}})(n,m),_=!0);const S=null!==w,k=ch(c),A=e=>F(l,e)||H(l,e);let E=[];if(S){const e=yh(w);E=Ah({meta:r,include:e.include,exclude:e.exclude})}const x=E.map(j).filter(e=>!k(e)).filter(e=>!A(e)),O=Ee(x.filter(e=>((e,t)=>{const n=j(e),s=j(t);return z(`${n}/context/npm`,s)||z(`${n}/context/abs`,s)})(l,e))),$=Ee([...v,...x].filter(e=>!k(e)).filter(e=>!A(e)));return{baseFiles:v,selectedNodeIds:Ee(x),stageNodeIds:O,allowlistFiles:$,usedDiskState:_}},Oh=e=>A("sha256").update(e).digest("hex"),$h=(e,t)=>f.resolve(e,...M(t).split("/")),Th=(e,t)=>{const n=j(e),s=j(t);return z(`${n}/context/npm`,s)||z(`${n}/context/abs`,s)},Nh=(e,t,n)=>{const s=t?t[e]:void 0;if(s)return"npm"===s.kind||"abs"===s.kind?s.sourceAbs:null;const r=n[e]?.locatorAbs;return"string"==typeof r&&r.trim().length?r.trim():null},Rh=async e=>{const{cwd:t,stanPath:n,meta:s,sources:r,nodeIds:o,clean:c=!1}=e,u=j(n);if(c){const e=$h(t,`${u}/context/npm`),n=$h(t,`${u}/context/abs`);await v(e).catch(()=>{}),await v(n).catch(()=>{})}const l=Array.isArray(o)&&o.length?o.map(j):Object.keys(r??{}).map(j),p=[],d=[];for(const e of l){if(!Th(u,e)){d.push(e);continue}const n=s.nodes[e];if(!n?.metadata||"string"!=typeof n.metadata.hash)throw new Error(`dependency context staging: missing metadata.hash for nodeId "${e}"`);const o=n.metadata.hash,c=n.metadata.size,l=Nh(e,r,s.nodes);if(!l)throw new Error(`dependency context staging: missing source locator for nodeId "${e}"`);const h=l,g=await i(h),y=g.length,b=Oh(g);if("number"==typeof c&&c!==y)throw new Error(`dependency context staging: size mismatch for "${e}" (expected ${c.toString()} bytes, got ${y.toString()} bytes)`);if(b!==o)throw new Error(`dependency context staging: hash mismatch for "${e}" (expected ${o}, got ${b})`);const v=$h(t,e);await m(f.dirname(v)),await a(v,g),p.push({nodeId:e,sourceAbs:M(h),destAbs:v,hash:b,size:y})}return{staged:p,skipped:d}},Ch=e=>`${j(e)}/context/**`,Ph=(e,t)=>{const n=j(e),s=j(t);return z(`${n}/context/npm`,s)||z(`${n}/context/abs`,s)},Lh=e=>{const{stanPath:t,meta:n,state:s,nodeIdsWhenNoState:r}=e,i=[Ch(t)];if(void 0===s){const e=Array.isArray(r)?r:[];return{includes:i,selectedNodeIds:[],stageNodeIds:Ee(e.map(j)).filter(e=>Ph(t,e))}}const o=yh(s),a=Ah({meta:n,include:o.include,exclude:o.exclude}),c=a.filter(e=>Ph(t,e));return{includes:i,selectedNodeIds:a,stageNodeIds:c}},Ih=async e=>{const{cwd:t,stanPath:n,meta:s,sources:r,plan:i,clean:o=!1}=e,a=await Rh({cwd:t,stanPath:n,meta:{nodes:s.nodes},sources:r,nodeIds:i.stageNodeIds.length?i.stageNodeIds:void 0,clean:o});return{...i,stage:a}},Mh=async e=>{const{cwd:t,stanPath:n,dependency:s,archive:r}=e,i=Lh({stanPath:n,meta:s.meta,state:s.state,nodeIdsWhenNoState:Object.keys(s.sources??{})}),o=await Ih({cwd:t,stanPath:n,meta:s.meta,sources:s.sources,plan:i,clean:s.clean??!1}),a=Ee([...r?.includes??[],...i.includes]);return{...o,archivePath:await Ae(t,n,{...r??{},includes:a})}},Dh=async e=>{const{cwd:t,stanPath:n,dependency:s,diff:r}=e,i=Lh({stanPath:n,meta:s.meta,state:s.state,nodeIdsWhenNoState:Object.keys(s.sources??{})}),o=await Ih({cwd:t,stanPath:n,meta:s.meta,sources:s.sources,plan:i,clean:s.clean??!1}),a=Ee([...r.includes??[],...i.includes]);return{...o,diffPath:(await Wu({cwd:t,stanPath:n,baseName:r.baseName,includes:a,excludes:r.excludes,updateSnapshot:r.updateSnapshot,includeOutputDirInDiff:r.includeOutputDirInDiff,onArchiveWarnings:r.onArchiveWarnings})).diffPath}},jh=(e,t)=>{const n=Object.prototype.hasOwnProperty.call(e.nodes,t)?e.nodes[t]:void 0;if(!n)return null;const s=n.metadata?.size;return"number"!=typeof s||!Number.isFinite(s)||s<0?null:Math.floor(s)},zh=async(e,t)=>{try{const n=f.resolve(e,t),s=await c(n);return s.isFile()?s.size:null}catch{return null}},Fh=(e,t)=>e.bytes===t.bytes?e.path.localeCompare(t.path):t.bytes-e.bytes,Hh=e=>e.reduce((e,t)=>e+t.bytes,0),Bh=async e=>{const{cwd:t,plan:n,meta:s}=e,r="number"==typeof e.topN&&Number.isFinite(e.topN)&&e.topN>=0?Math.floor(e.topN):10,i=new Set(Ee(n.baseFiles,M)),o=new Set(Ee(n.selectedNodeIds,M)),a=Ee(n.allowlistFiles,M),c=[],u=[];for(const e of a){const n=jh(s,e);if("number"==typeof n){u.push({path:e,bytes:n,source:"meta"});continue}const r=await zh(t,e);"number"!=typeof r?(c.push(`missing size for ${e}`),u.push({path:e,bytes:0,source:"missing"})):u.push({path:e,bytes:r,source:"stat"})}const l=Hh(u),f=l/4,p=[],d=[],h=[];for(const e of u){const t=i.has(e.path),n=o.has(e.path);t&&n?h.push(e):t?p.push(e):n&&d.push(e)}const m=[...u].sort(Fh).slice(0,r);return{files:u.length,totalBytes:l,estimatedTokens:f,breakdown:{baseOnly:{files:p.length,bytes:Hh(p)},closureOnly:{files:d.length,bytes:Hh(d)},overlap:{files:h.length,bytes:Hh(h)}},largest:m,warnings:Ee(c)}},Kh=async e=>{const{cwd:t,selection:n,nodeDescriptionLimit:s,nodeDescriptionTags:r,maxErrors:i}=e;try{await(async()=>import("./typescript-B-hfOtw1.js").then(function(e){return e.t}))()}catch{throw new Error('dependency graph mode requires TypeScript; install "typescript" in this environment')}const o=await(async()=>await import("./index-C6LlXnuq.js"))().catch(()=>{throw new Error("dependency graph mode requires @karmaniverous/stan-context; install it alongside stan-core (stan-cli includes it)")});return await o.generateDependencyGraph({cwd:t,config:n??{},nodeDescriptionLimit:s,nodeDescriptionTags:r,maxErrors:i})},Uh=e=>e.replace(/\\/g,"/"),Wh=e=>!Uh(e).split("/").filter(Boolean).some(e=>".."===e),qh=(e,t)=>{const n=Uh(t).replace(/^\.\/+/,"");if(f.isAbsolute(t)){const n=Uh(f.relative(e,t));return n&&!n.startsWith("..")&&Wh(n)?n:null}return n&&!n.startsWith("..")&&Wh(n)?n:null},Zh=(e,t)=>{const n=Uh(t),s=n,r=f.posix.basename(s),i=(o=s,A("sha256").update(o).digest("hex"));var o;return{nodeId:`${Uh(e)}/context/abs/${i}/${r}`,locatorAbs:s,sourceAbsPosix:n}},Gh=e=>{if(!e)return;const t={};return"number"==typeof e.size&&Number.isFinite(e.size)&&e.size>=0&&(t.size=Math.floor(e.size)),"string"==typeof e.hash&&e.hash.length>0&&(t.hash=e.hash),Object.keys(t).length?t:void 0},Vh=e=>{const t={};for(const n of Object.keys(e).sort((e,t)=>e.localeCompare(t)))t[n]=e[n];return t},Jh=async e=>{try{const t=await i(e,"utf8"),n=JSON.parse(t);return n&&"object"==typeof n?n:null}catch{return null}},Yh=async(e,t)=>{const n=await(async e=>{let t=f.dirname(e);for(let e=0;e<64;e+=1){const e=f.join(t,"package.json"),n=await Jh(e);if(n&&"string"==typeof n.name&&"string"==typeof n.version)return t;const s=f.dirname(t);if(s===t)break;t=s}return null})(t);if(!n)return null;const s=await Jh(f.join(n,"package.json")),r="string"==typeof s?.name?s.name:null,i="string"==typeof s?.version?s.version:null;if(!r||!i)return null;const o=Uh(f.relative(n,t));if(!o||o.startsWith("..")||!Wh(o))return null;const a=`${Uh(e)}/context/npm/${Uh(r)}/${Uh(i)}/${o}`;return Wh(a)?{nodeId:a,pkgName:r,pkgVersion:i,pathInPackage:o,sourceAbsPosix:Uh(t)}:null},Qh=async e=>{const t=await Kh(e);return(async(e,t,n)=>{const s=[],r=n.graph??{},i=r.nodes??{},o=r.edges??{};if(Array.isArray(n.errors)&&n.errors.length)for(const e of n.errors)"string"==typeof e&&e.trim()&&s.push(e.trim());const a=n.stats&&"object"==typeof n.stats?n.stats:void 0,c=a&&"number"==typeof a.modules&&"number"==typeof a.edges&&"number"==typeof a.dirty?{modules:a.modules,edges:a.edges,dirty:a.dirty}:void 0,u=new Map,l={};let p=0,d=0;for(const[n,r]of Object.entries(i)){const i=r.kind;if("builtin"!==i)if("missing"!==i){if("source"===i){const t=qh(e,n);t?(u.set(n,t),l[t]={kind:"repo"}):(u.set(n,null),s.push(`dependency graph: dropped un-normalizable source nodeId "${n}"`));continue}if("external"===i){const s=f.isAbsolute(n)?n:f.resolve(e,n),r=await Yh(t,s);if(r)u.set(n,r.nodeId),l[r.nodeId]={kind:"npm",sourceAbs:r.sourceAbsPosix,pkgName:r.pkgName,pkgVersion:r.pkgVersion,pathInPackage:r.pathInPackage};else{const{nodeId:e,locatorAbs:r,sourceAbsPosix:i}=Zh(t,s);u.set(n,e),l[e]={kind:"abs",sourceAbs:i,locatorAbs:r}}continue}u.set(n,null),s.push(`dependency graph: dropped nodeId "${n}" with unknown kind`)}else u.set(n,null),d+=1;else u.set(n,null),p+=1}p>0&&s.push(`dependency graph: omitted ${p.toString()} builtin node(s) from persisted meta`),d>0&&s.push(`dependency graph: omitted ${d.toString()} missing node(s) from persisted meta`);const h={};for(const[e,n]of Object.entries(i)){const s=u.get(e)??null;if(!s)continue;const r=Gh(n.metadata),i="string"==typeof n.description&&n.description.trim()?n.description.trim():void 0,o={kind:"source"===n.kind?"source":"external",...r?{metadata:r}:{},...i?{description:i}:{}};if(s.startsWith(`${Uh(t)}/context/abs/`)){const e=l[s];"abs"===e.kind&&(o.locatorAbs=e.locatorAbs)}h[s]=o}const m=new Set(Object.keys(h)),g={};for(const[e,t]of Object.entries(o)){const n=u.get(e)??null;if(!n||!m.has(n))continue;const s=[];for(const e of t){const t="string"==typeof e.target?e.target:null,n=e.kind;if(!t)continue;const r=u.get(t)??null;if(!r||!m.has(r))continue;if("runtime"!==n&&"type"!==n&&"dynamic"!==n)continue;const i="explicit"===e.resolution||"implicit"===e.resolution?e.resolution:void 0;s.push({target:r,kind:n,...i?{resolution:i}:{}})}s.sort((e,t)=>e.target===t.target?e.kind===t.kind?(e.resolution??"").localeCompare(t.resolution??""):e.kind.localeCompare(t.kind):e.target.localeCompare(t.target));const r=[];for(const e of s){const t=r.at(-1);t&&t.target===e.target&&t.kind===e.kind&&(t.resolution??"")===(e.resolution??"")||r.push(e)}g[n]=r}for(const e of m)Object.prototype.hasOwnProperty.call(g,e)||(g[e]=[]);return{meta:wh.parse({schemaVersion:1,nodes:Vh(h),edges:Vh(g)}),sources:l,warnings:s,stats:c}})(e.cwd,e.stanPath,t)},Xh=e=>e.replace(/\\/g,"/").replace(/^\.\/+/,"");const em=e=>e.replace(/\\/g,"/").replace(/^\.\/+/,"");async function tm(e){const{cwd:n,stanPath:s,baseName:r,relFiles:o,updateSnapshot:c="createIfMissing",includeOutputDirInDiff:u=!1,onArchiveWarnings:l,onSelectionReport:f}=e,p=Ee(o,em),{outDir:h,diffDir:m}=await ke(n,s),g=await Bu(n,p),y=(e=>d(e,Fu))(m),b=t(y),v=b?JSON.parse(await i(y,"utf8")):{},_=b?p.filter(e=>!v[e]||v[e]!==g[e]):[...p],w=await(async()=>be(()=>import("./classifier-Bqzr65UC.js"),"classifyForArchive",e=>"function"==typeof e,{moduleLabel:"@/stan/classifier",acceptCallableDefault:!0}))(),{textFiles:S,excludedBinaries:k,largeText:A,warningsBody:E}=await w(n,_),x=Ee(S);U(E,l);const O=d(h,`${r}.diff.tar`),$=await import("./index-WrHikElU.js"),T=!u&&0===x.length;if(I({kind:"diff",mode:"allowlist",stanPath:s,outputFile:O,includeOutputDirInDiff:u,updateSnapshot:c,snapshotExists:b,baseSelected:p.length,sentinelUsed:T,hasWarnings:k.length>0||A.length>0,counts:{candidates:o.length,selected:_.length,archived:x.length,excludedBinaries:k.length,largeText:A.length}},f),u)await $.create({file:O,cwd:n,filter:B(s)},K(x,s));else if(0===x.length){const e=(e=>d(e,Hu))(m);await a(e,"no changes","utf8");const t=`${em(s)}/diff/${Hu}`;await $.create({file:O,cwd:n},[t])}else await $.create({file:O,cwd:n},x);return"replace"===c?await a(y,JSON.stringify(g,null,2),"utf8"):"createIfMissing"!==c||b||await a(y,JSON.stringify(g,null,2),"utf8"),{diffPath:O}}const nm=async e=>{const{cwd:n,stanPath:s,dependency:r,selection:i,archive:a}=e,c=await xh({cwd:n,stanPath:s,meta:r.meta,state:r.state,selection:i}),u=await Rh({cwd:n,stanPath:s,meta:{nodes:r.meta.nodes},sources:r.sources,nodeIds:c.stageNodeIds,clean:r.clean??!1}),l=await async function(e,n,s,r={}){const{includeOutputDir:i=!1,fileName:a}=r;let c=a??"archive.tar";c.endsWith(".tar")||(c+=".tar");const u=Ee(s,Xh),{outDir:l,diffDir:f}=await ke(e,n),d=p(l,c),h=p(f,L);if(t(d))try{await o(d,h)}catch{}const m=await be(()=>import("./classifier-Bqzr65UC.js"),"classifyForArchive",e=>"function"==typeof e,{moduleLabel:"@/stan/classifier",acceptCallableDefault:!0}),{textFiles:g,excludedBinaries:y,largeText:b,warningsBody:v}=await m(e,u);U(v,r.onArchiveWarnings),I({kind:"archive",mode:"allowlist",stanPath:n,outputFile:d,includeOutputDir:i,hasWarnings:y.length>0||b.length>0,counts:{candidates:s.length,selected:u.length,archived:g.length,excludedBinaries:y.length,largeText:b.length}},r.onSelectionReport);const _=await import("./index-WrHikElU.js");if(await _.create({file:d,cwd:e,filter:B(n)},i?K(g,n):Ee(g)),!t(h))try{await o(d,h)}catch{}return d}(n,s,c.allowlistFiles,{includeOutputDir:!1,fileName:a?.fileName,onArchiveWarnings:a?.onArchiveWarnings});return{archivePath:l,plan:c,stage:u}},sm=async e=>{const{cwd:t,stanPath:n,dependency:s,selection:r,diff:i}=e,o=await xh({cwd:t,stanPath:n,meta:s.meta,state:s.state,selection:r}),a=await Rh({cwd:t,stanPath:n,meta:{nodes:s.meta.nodes},sources:s.sources,nodeIds:o.stageNodeIds,clean:s.clean??!1});return{diffPath:(await tm({cwd:t,stanPath:n,baseName:i.baseName,relFiles:o.allowlistFiles,updateSnapshot:i.updateSnapshot,includeOutputDirInDiff:i.includeOutputDirInDiff,onArchiveWarnings:i.onArchiveWarnings})).diffPath,plan:o,stage:a}},rm=e=>A("sha256").update(e).digest("hex"),im=async e=>{const t=await i(e);return{hash:rm(t),size:t.length}},om=async e=>{const{nodeId:t,node:n}=e;if(!n)return{nodeId:t,kind:"abs",reason:"meta-missing"};const s=(e=>"string"==typeof e?.metadata?.hash&&e.metadata.hash.length?e.metadata.hash:null)(n);if(!s)return{nodeId:t,kind:"abs",reason:"metadata-missing"};const r="string"==typeof n.locatorAbs?n.locatorAbs:"";if(!r.trim())return{nodeId:t,kind:"abs",reason:"locator-missing"};let i=null;try{i=await im(r)}catch{return{nodeId:t,kind:"abs",reason:"file-missing",locatorAbs:r}}const o=(e=>"number"==typeof e?.metadata?.size&&Number.isFinite(e.metadata.size)?e.metadata.size:null)(n);return"number"==typeof o&&o!==i.size?{nodeId:t,kind:"abs",reason:"size-mismatch",locatorAbs:r,expectedSize:o,actualSize:i.size,expectedHash:s,actualHash:i.hash}:i.hash!==s?{nodeId:t,kind:"abs",reason:"hash-mismatch",locatorAbs:r,expectedHash:s,actualHash:i.hash,expectedSize:o??void 0,actualSize:i.size}:null},am=async e=>{try{const{readFile:t}=await import("node:fs/promises"),n=await t(e,"utf8"),s=JSON.parse(n);return s&&"object"==typeof s?s:null}catch{return null}},cm=async e=>{const{cwd:t,stanPath:n,nodeId:s,node:r}=e,i=((e,t)=>{const n=j(e),s=j(t),r=`${n}/context/npm/`;if(!s.startsWith(r))return null;const i=s.slice(r.length).split("/").filter(Boolean);if(i.length<3)return null;if(i[0]?.startsWith("@")){if(i.length<4)return null;const e=`${i[0]}/${i[1]}`,t=i[2],n=i.slice(3).join("/");return e&&t&&n?{pkgName:e,pkgVersion:t,pathInPackage:n}:null}const o=i[0],a=i[1],c=i.slice(2).join("/");return o&&a&&c?{pkgName:o,pkgVersion:a,pathInPackage:c}:null})(n,s);if(!i)return{nodeId:s,kind:"npm",reason:"invalid-nodeId"};if(!r)return{nodeId:s,kind:"npm",reason:"meta-missing",...i};const o=(e=>"string"==typeof e?.metadata?.hash&&e.metadata.hash.length?e.metadata.hash:null)(r);if(!o)return{nodeId:s,kind:"npm",reason:"metadata-missing",...i};const a=(e=>"number"==typeof e?.metadata?.size&&Number.isFinite(e.metadata.size)?e.metadata.size:null)(r),c=await(async(e,t)=>{const n=[];{const s=f.join(e,"node_modules",...t.split("/"),"package.json");await am(s)&&n.push(f.dirname(s))}try{const s=f.join(e,"node_modules",".pnpm"),r=M(f.join(s,"**","node_modules",...t.split("/"),"package.json")),i=await eh(r,{cwd:e,absolute:!0,dot:!0,onlyFiles:!0,followSymbolicLinks:!1});for(const e of i)n.push(f.dirname(e))}catch{}return Ee(n,M)})(t,i.pkgName);if(0===c.length)return{nodeId:s,kind:"npm",reason:"package-not-found",...i,expectedHash:o,expectedSize:a??void 0,candidates:[]};const u=[],l=[];for(const e of c){const t=f.join(e,"package.json"),n=await am(t),s="string"==typeof n?.name?n.name:"",r="string"==typeof n?.version?n.version:"";s===i.pkgName&&r===i.pkgVersion?u.push(e):s===i.pkgName&&l.push(`${e} (version=${r||"unknown"})`)}if(0===u.length)return{nodeId:s,kind:"npm",reason:"package-version-mismatch",...i,expectedHash:o,expectedSize:a??void 0,candidates:l.length?l:c};let p=null;for(const e of u){const t=f.join(e,...i.pathInPackage.split("/"));let n=null;try{n=await im(t)}catch{p={nodeId:s,kind:"npm",reason:"file-missing",...i,candidates:u};continue}if("number"!=typeof a||a===n.size){if(n.hash===o)return null;p={nodeId:s,kind:"npm",reason:"hash-mismatch",...i,expectedHash:o,actualHash:n.hash,expectedSize:a??void 0,actualSize:n.size,candidates:u}}else p={nodeId:s,kind:"npm",reason:"size-mismatch",...i,expectedHash:o,actualHash:n.hash,expectedSize:a,actualSize:n.size,candidates:u}}return p??{nodeId:s,kind:"npm",reason:"hash-mismatch",...i,expectedHash:o,candidates:u}},um=async e=>{const{cwd:t,stanPath:n,meta:s,state:r}=e,i=yh(r),o=Ah({meta:s,include:i.include,exclude:i.exclude}),a=[],c=[],u=j(n),l=e=>s.nodes[e];for(const e of o){if(z(`${u}/context/npm`,e)){a.push(e);const s=await cm({cwd:t,stanPath:n,nodeId:e,node:l(e)});s&&c.push(s);continue}if(z(`${u}/context/abs`,e)){a.push(e);const t=await om({nodeId:e,node:l(e)});t&&c.push(t)}}return{ok:0===c.length,selectedNodeIds:o,checkedNodeIds:a,mismatches:c}},lm=async e=>{const t=await um(e);if(t.ok)return;const n="dependency selection validation failed:\n"+t.mismatches.map(e=>"npm"===e.kind?`- npm: ${e.nodeId}: ${e.reason}`:`- abs: ${e.nodeId}: ${e.reason}`).join("\n");throw new Error(n)},fm=async e=>{const{cwd:t,stanPath:n,meta:s}=e,r=f.join(t,n,"context");await m(r);const i=f.join(r,"dependency.meta.json"),o=JSON.stringify(s,null,2)+"\n";return await a(i,o,"utf8"),i},pm=()=>{const e=(()=>{try{const e=w(import.meta.url);return Ne({cwd:f.dirname(e)})??null}catch{return null}})();if(!e)return null;const n=f.join(e,"dist","stan.system.md");return t(n)?n:null},dm=async(e,n)=>{const s=f.join(e,n,"system"),o=f.join(s,"parts"),c=f.join(s,"stan.system.md");if(await m(s),!t(o))return{target:c,action:"skipped-no-parts",partsDir:o};const u=(await r(o,{withFileTypes:!0})).filter(e=>e.isFile()&&e.name.toLowerCase().endsWith(".md")).map(e=>e.name).sort((e,t)=>e.localeCompare(t,void 0,{numeric:!0}));if(0===u.length)return{target:c,action:"skipped-no-md",partsDir:o};const l=[];for(const e of u){const t=f.join(o,e),n=tl(await i(t,"utf8")).trimEnd();l.push(n)}const p=(e=>`\x3c!-- GENERATED: assembled from ${e}/system/parts; edit parts and run \`npm run gen:system\` --\x3e\n`)(n)+l.join("\n\n")+"\n";return await a(c,p,"utf8"),{target:c,action:"written"}};const hm="0.5.1";export{zu as A,ll as B,hm as C,$e as D,kh as E,Pe as F,pm as G,Pu as H,Cu as I,ch as J,yh as K,fl as L,Lh as M,oh as N,Iu as O,Lu as P,Rh as Q,Ih as R,Bh as S,um as T,lm as U,el as V,Xu as W,Uu as X,fm as Y,ae as a,Oe as b,W as c,me as d,kl as e,Sl as f,q as g,dm as h,Qh as i,xh as j,Ah as k,Ae as l,Wu as m,Dh as n,Mh as o,sm as p,nm as q,eh as r,xe as s,uh as t,bh as u,wh as v,_h as w,hh as x,gh as y,al as z};